wxy 4 miesięcy temu
rodzic
commit
15ae3c9f40

+ 1 - 1
src/views/order/BuyCard/Card.vue

@@ -75,7 +75,7 @@ const state = ref({
         source: null, // 来源
         trafficId: "", // 资费Id
         periodOfSilence: "", // 静默期
-        isTrafficPool: "", // 是否是流量池 1:是 2:否
+        isTrafficPool: "1", // 是否是流量池 1:是 2:否
         quantity: null, // 采购数量
         simType: "" ,// 卡类型
         poolId: null,

+ 6 - 11
src/views/tariffManagement/Management/add.vue

@@ -149,7 +149,7 @@ const state = ref({
         // 流量资费计费
         "trafficBilling": '',
         // 流量资费计费类型
-        "trafficBillingType": '',
+        "trafficBillingType": 'MB',
         // 流量资费计费金
         "trafficBillingAmount": '',
         // MRC金额
@@ -234,11 +234,8 @@ const resetForm = () => {
         formState.value[key] = ''
     })
     delete formState.value.id
-    formState.value.settlementCycleMap = {
-        starTime: '',
-        endTime: ''
-    }
     FormDataList.value = {}
+
 }
 
 const handleDataPlan = async () => {
@@ -274,6 +271,8 @@ watch(() => modelValue.value, val => {
     if (val) {
         handleDictValue()
         handleModelId()
+        formState.value.billingMethod = '1'
+        formState.value.trafficBillingType = 'MB'
     }
 })
 
@@ -295,7 +294,7 @@ watch(
             handleDataPlan()
         }
     },
-    { immediate: true }
+    { immediate: true,deep:true }
 );
 
 
@@ -303,13 +302,9 @@ watch(() => FormDataList.value, val => {
     if (!val.id) return
     Object.keys(formState.value).forEach(key => {
         if (val[key]) {
-            formState.value[key] = val[key]
+            formState.value[key] = key === 'userId' ? Number(val[key]) : val[key];
         }
     })
-    formState.value.userId = Number(formState.value.userId)
-    // if (val.pricing !== '') {
-    //     formState.value.pricing = val.pricing.match(/\d+/)[0] || ''
-    // }
     formState.value.id = val.id
 },{deep:true})
 </script>