吴sir 4 miesięcy temu
rodzic
commit
67d7941efe

+ 2 - 2
src/views/flowPool/index.vue

@@ -582,7 +582,7 @@ const handleTariff = async () => {
 const resetForm = () => {
   visible.value = false;
   Object.keys(formState.value).forEach(key => {
-    if (key != 'trafficPoolType' && key != 'iccids') {
+    if (key != 'trafficPoolType') {
       formState.value[key] = ''
     }
   })
@@ -598,7 +598,7 @@ const handleDictValue = async () => {
 
 
 watch(() => formState.value.simTariffId, val => {
-  if (val == null || val == '') return
+  if (!val) return
   updateCardList({id: val}).then(res => {
     if (res.code === 200) {
       card.value = res.data

+ 9 - 17
src/views/flowPool/rearFlowPool/index.vue

@@ -126,7 +126,7 @@
                 </a-option>
               </a-select>
             </a-form-item>
-            <a-form-item :label="$t('flowPool.ICCIDlabel')" field="simTariffId" v-if="formState.simTariffId!==null">
+            <a-form-item :label="$t('flowPool.ICCIDlabel')" v-if="formState.simTariffId!==null">
               <a-select v-model="formState.iccids" multiple
                         :placeholder="$t('flowPool.ICCIDName')">
                 <a-option v-for=" item in card" :key="item.iccid" :value="item.iccid">{{
@@ -147,7 +147,7 @@
                 <a-option value="GB">GB</a-option>
               </a-select>
             </a-form-item>
-            <a-form-item >
+            <a-form-item>
               <a-button type="primary" html-type="submit" style="margin-right: 10px;">{{
                   $t('form.Confirm')
                 }}
@@ -373,22 +373,14 @@ const intData = async () => {
   }
   const {data} = await trafficPoolList(param)
   dataSource.value = (data.records || []).map((item, index) => {
-    const trafficPoolType = typeList.value.find(val => val.value == item.trafficPoolType)?.label
+    // const trafficPoolType = typeList.value.find(val => val.value == item.trafficPoolType)?.label
     const trafficPoolStatus = trafficList.value.find(val => val.value == item.status)?.label
     const sourceName = sourceList.value.find(val => val.value == item.source)?.label
     return {
       ...item,
       sourceName,// 运营商名称
-      trafficPoolType,
+      // trafficPoolType,
       trafficPoolStatus,
-      poolNumber: "NR0" + (index + 1),
-      cardRariffName: "监控1G月租",
-      cardFlow: "1G/月",
-      cardNum: "11/100",
-      UsedMonth: "1.00G",
-      surplusFlow: "99.0G",
-      totalFlow: "100.0G",
-      exceededFlow: "--",
     }
   })
   pagination.value.total = data.total
@@ -536,7 +528,7 @@ const rules = {
   status: [{required: true, trigger: 'change',}],
   simTariffId: [{required: true, trigger: 'change',}],
   expireTime: [{required: true, trigger: 'change',}],
-  iccids: [{required: true, trigger: 'change',}],
+  // iccids: [{required: true, trigger: 'change',}],
   size: [{required: true, trigger: 'change',}],
   sizeType: [{required: true, trigger: 'change',}],
 };
@@ -548,7 +540,7 @@ const handleSubmit = ({values, errors}) => {
     if (!errors) {
       values.size = Number(values.size)
       if (formState.value.id) {
-        const {code, data} = await updateTrafficPool(values)
+        const {code, data} = await updateTrafficPool(formState.value)
 
         if (code == 200) {
           Message.success({
@@ -559,7 +551,7 @@ const handleSubmit = ({values, errors}) => {
           intData()
         }
       } else {
-        const {code, data} = await addTrafficPool(values)
+        const {code, data} = await addTrafficPool(formState.value)
         if (code == 200) {
           Message.success({
             content: "添加成功!",
@@ -616,7 +608,7 @@ const handleTariff = async () => {
 const resetForm = () => {
   visible.value = false;
   Object.keys(formState.value).forEach(key => {
-    if (key != 'trafficPoolType' && key != 'iccids') {
+    if (key != 'trafficPoolType') {
       formState.value[key] = ''
     }
   })
@@ -632,7 +624,7 @@ const handleDictValue = async () => {
 }
 
 watch(() => formState.value.simTariffId, val => {
-  if (val === null) return
+  if (!val) return
   updateCardList({id: val}).then(res => {
     if (res.code === 200) {
       card.value = res.data

+ 1 - 1
src/views/tariffManagement/customer/index.vue

@@ -92,7 +92,7 @@ const columns = computed(() => [
   {title: t('customer.userTypeName'), dataIndex: 'userType'},
   {title: t('customer.startTime'), dataIndex: 'createdAt'},
   {title: t('customer.updateTime'), dataIndex: 'updatedAt'},
-  {title: t('global.common.operations'), slotName: 'operation', width: 250},
+  // {title: t('global.common.operations'), slotName: 'operation', width: 250},
 ]);
 
 onMounted(() => {