wxy 4 ماه پیش
والد
کامیت
9d27cd5c1e
3فایلهای تغییر یافته به همراه14 افزوده شده و 29 حذف شده
  1. 6 1
      src/api/path/order.js
  2. 8 19
      src/views/order/BuyCard/detaile.vue
  3. 0 9
      src/views/order/BuyCard/index.vue

+ 6 - 1
src/api/path/order.js

@@ -25,7 +25,12 @@ export function viewOrderCard(params){
     return service.get("/admin/sim/orderCard", {params});
 }
 
-// 获取资费下的卡
+// 获取资费
 export function AcquireOrdertariff(params){
      return service.get("/admin/platform/getTariffById", {params});
+}
+
+// 获取资费下的卡
+export function TariffOrderCard(params){
+     return service.get("/admin/platform/getTariffCard", {params});
 }

+ 8 - 19
src/views/order/BuyCard/detaile.vue

@@ -85,7 +85,7 @@
 
 <script setup>
 import { ref, onMounted, toRefs, toRef ,watch} from 'vue';
-import { AcquireOrdertariff, DistributionCard } from '@/api/path/order'
+import { AcquireOrdertariff, DistributionCard,TariffOrderCard } from '@/api/path/order'
 import { Message } from '@arco-design/web-vue';
 import Upload from "@/components/upload/index.vue";
 import { Getdictionary } from '@/mixins/index.js'
@@ -113,24 +113,7 @@ const state = ref({
 const { tariffForm, showCard,res1,res2,res3,userType } = toRefs(state.value)
 const columnsDetail = [{ title: 'ICCID', dataIndex: 'iccid' }
 ]
-const dataDetail = ref([{
-    iccid: '8986061800002054589N',
-    nameAndId: '泰国监控40G共享/53357981207',
-    status: '沉默期'
-},
-{
-    iccid: '8986061800002054588N',
-    nameAndId: '泰国监控40G共享/53357981207',
-    status: '沉默期'
-}, {
-    iccid: '8986061800002054587N',
-    nameAndId: '泰国监控40G共享/53357981207',
-    status: '沉默期'
-}, {
-    iccid: '8986061800002054586N',
-    nameAndId: '泰国监控40G共享/53357981207',
-    status: '沉默期'
-},])
+const dataDetail = ref([])
 
 // 分配卡号
 const customRequest = (options) => {
@@ -139,6 +122,9 @@ const customRequest = (options) => {
     formData.append('orderId', FormDataList.value.id);
     DistributionCard(formData).then(res => {
         Message.success(res.message)
+        res.data[0].forEach(val=>[
+            dataDetail.value.push({iccid:val})
+        ])
     })
 }
 
@@ -155,6 +141,9 @@ watch(() => FormDataList.value, val => {
         tariffForm.value.TariffInfomr = res.data.trafficBilling + '/' + res.data.trafficBillingType
         tariffForm.value.pricingName = tariffForm.value.pricing !== '' ? tariffForm.value.pricing + '/' + res3.value.filter(val => val.value == res.data.currency)[0]?.label : '';
     })
+    TariffOrderCard({id:val.trafficId}).then(res=>{
+        dataDetail.value = res.data
+    })
 },{deep: true})
 
 onMounted(async () => {

+ 0 - 9
src/views/order/BuyCard/index.vue

@@ -106,34 +106,26 @@ const state = ref({
     size: 10,
     current: 1,
   },
-  tariffData: [],
   showAudit: false,
   showStatus: false,
   formContract: {
     id: null,
     contractImg: []
   }, // 文件上传列表
-  showCard: false,
   showDetail: false,
   uploadContract: false,
 });
 
 const {
-  userName,
   userType,
   tableData,
-  formRef,
-  currentIndex,
   FormDataList,
   pageData,
-  tariffData,
   showAudit,
   showStatus,
   formContract,
-  showCard,
   showDetail,
   uploadContract,
-  tariffForm
 } = toRefs(state.value);
 
 const columns = [
@@ -222,7 +214,6 @@ const openDetail = async (item) => {
   FormDataList.value = item
   showDetail.value = true;
 }
-
 // 上传合同
 const handleBeforeOk = () => {
   new Promise((resolve, reject) => {