Bladeren bron

修改iccids初始化被置空的问题

wxy 4 maanden geleden
bovenliggende
commit
9773bc3ba5
2 gewijzigde bestanden met toevoegingen van 11 en 6 verwijderingen
  1. 8 3
      src/views/flowPool/components/add.vue
  2. 3 3
      src/views/order/BuyCard/index.vue

+ 8 - 3
src/views/flowPool/components/add.vue

@@ -50,7 +50,7 @@ const state = ref({
   tariffIdList: [],
   formState: {
     "label": "",
-    "trafficPoolType": props.status,
+    "trafficPoolType": status.value,
     "source": "",
     "status": "",
     "simTariffId": null,
@@ -144,9 +144,9 @@ const handleDictValue = async () => {
 
 
 const selectChange = (val) => {
-  formState.value.iccids = []
   updateCardList({ id: val }).then(res => {
     if (res.code === 200) {
+      formState.value.iccids = []
       card.value = res.data
     }
   })
@@ -156,7 +156,12 @@ watch(() => record.value, val => {
   const datas = JSON.parse(JSON.stringify(val))
   if (props.typeCurrent == 2) {
     formState.value = datas
-    formState.value.iccids = datas.iccids.map(val => val.iccid)
+    updateCardList({ id: val.simTariffId }).then(res => {
+      if (res.code === 200) {
+        formState.value.iccids = val.iccids
+        card.value = res.data
+      }
+    })
   }
 }, { deep: true })
 

+ 3 - 3
src/views/order/BuyCard/index.vue

@@ -19,7 +19,7 @@
       <template #image="{ record }">
         <a-image width="60" height="60" :src="record.contractImg" :preview-props="{
           actionsLayout: ['rotateRight', 'zoomIn', 'zoomOut'],
-        }">
+        }" style="cursor: pointer;">
         </a-image>
       </template>
       <template #id="{ record }">
@@ -47,11 +47,11 @@
               v-if="record.moderationStatus == 2 && userType !== 1">{{ $t('order.unsubscribe') }}</a-button>
           </div>
           <a-button @click="openPriceing(record)" type="text"
-            v-if="record.moderationStatus == 2 && userType == 1">{{ $t('order.UploadAmount') }}</a-button>
+            v-if="record.moderationStatus == 2 && userType == 1 ">{{ $t('order.UploadAmount') }}</a-button>
           <a-button @click="openDetail(record)" type="text">{{ $t('order.view') }}</a-button>
           <!-- <a-button @click="openDetail(record)" type="text" v-if="userType !== 1">套餐</a-button>
           <a-button @click="openDetail(record)" type="text" v-if="userType !== 1">资费</a-button> -->
-          <a-button @click="openEndDate(record)" type="text" v-if="userType==1">{{ $t('order.ChangeValidity') }}</a-button>
+          <a-button @click="openEndDate(record)" type="text" v-if="userType==1 && record.moderationStatus == 2">{{ $t('order.ChangeValidity') }}</a-button>
         </div>
       </template>
     </a-table>