ソースを参照

订单变更订单日志

wanghairong 5 ヶ月 前
コミット
3c304ccc56

+ 10 - 0
src/api/path/lotCard.api.js

@@ -43,4 +43,14 @@ export function orderCancel(param) {
 // 取消订单订单
 export function orderFlowData(params) {
   return service.get("/admin/sim/orderFlowData", { params });
+}
+
+// 查询订单日志
+export function getOrderLogsList(params) {
+  return service.post("/metadata/getOrderLogsList", params);
+}
+
+// 获取流量包数据
+export function getDataPlanList(params) {
+  return service.post("/metadata/getDataPlanList", params);
 }

+ 20 - 14
src/views/lotCard/cardList/index.vue

@@ -6,7 +6,7 @@
       <span class="head-title-right">
         <a-popconfirm :content="$t('form.ImportConfirm')" :ok-text="$t('form.Confirm')" :cancel-text="$t('form.Cancel')"
           @ok="handleImport()">
-          <a-button class="m-r-10" type="primary"> {{ $t('form.Import') }}</a-button>
+          <!-- <a-button class="m-r-10" type="primary"> {{ $t('form.Import') }}</a-button> -->
         </a-popconfirm>
       </span>
 
@@ -27,8 +27,8 @@
     </div>
 
     <a-table row-key="iccid" :data="dataSource" :columns="columns" :pagination="pagination"
-      :row-selection="rowSelection" v-model:selectedKeys="selectedKeys" :scroll="{ x: 'auto' }"
-      :expandable="expandable">
+      :row-selection="rowSelection" v-model:selectedKeys="selectedKeys" :scroll="{ x: 'auto' }" :expandable="expandable"
+      @page-change="evChangePage">
       <template #id="{ record }">
         <!-- 查看流量消耗 -->
         <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="handletrafficUseDialog(record)">{{
@@ -94,22 +94,24 @@ const intData = async () => {
       res.data.records?.forEach(async (orderItem, index) => {
 
         const params = {
-          // iccid: orderItem.ICCID,
-          iccid: '89852342022040149139',
+          iccid: orderItem.ICCID,
           childOrderId: orderItem.id,
-          subscriptionKey: "1824754463183432097",
+          subscriptionKey: orderItem.subscription_key,
         }
 
         let trafficList = []
 
-        if (item.iccid == '89852342022040149139' && index < 5 || !(item.iccid == '89852342022040149139')) {
-          const { data } = await orderFlowData(params)
-          trafficList = data.historyData || []
-          orderArr.push({
-            ...orderItem,
-            trafficList
-          })
-        }
+        // if (item.iccid == '89852342022040149139' && index < 5 || !(item.iccid == '89852342022040149139')) {
+        //   const { data } = await orderFlowData(params)
+        //   trafficList = data.historyData || []
+        //   orderArr.push({
+        //     ...orderItem,
+        //     trafficList
+        //   })
+        // }
+        orderArr.push({
+          ...orderItem,
+        })
       })
     })
 
@@ -196,6 +198,10 @@ const handletrafficUseDialog = (data) => {
 }
 
 
+const evChangePage = (page) => {
+  pagination.value.current = page
+  intData()
+}
 const handleSearch = () => {
   formRef.value.validate((errors) => {
     if (!errors) {

+ 3 - 3
src/views/lotCard/cardList/list.vue

@@ -8,9 +8,9 @@
                 </div>
                 <div class="list_item_right">
                     <p>
-                        <span class="list_item_right_span">订单ID:{{ item.orderId }}</span>
-                        <span class="list_item_right_span">订单状态:正常</span>
-                        <span>更新时间:{{ item.updated_at }}</span>
+                        <span class="list_item_right_span">订单ID:{{ item.source_order_id }}</span>
+                        <span>订单状态:正常</span>
+                        <!-- <span>更新时间:{{ item.updated_at }}</span> -->
                     </p>
                     <template v-if="item.trafficList">
                         <p v-for="trafficVal in item.trafficList" :key="trafficVal.id">

+ 8 - 8
src/views/lotCard/orderMange/config.js

@@ -12,14 +12,14 @@ export const columns = [
   { title: window.$t('lotCard.packageStatus'), dataIndex: 'statusName', align: 'center', width: 160 },
   { title: window.$t('lotCard.source'), dataIndex: 'sourceName', align: 'center', width: 100 },
   { title: window.$t('lotCard.UserId'), dataIndex: 'user_id', align: 'center', width: 200 },
-  {
-    title: window.$t('global.common.operations'),
-    dataIndex: 'id',
-    slotName: 'id',
-    align: 'center',
-    width: 180,
-    fixed: "right",
-  }
+  // {
+  //   title: window.$t('global.common.operations'),
+  //   dataIndex: 'id',
+  //   slotName: 'id',
+  //   align: 'center',
+  //   width: 180,
+  //   fixed: "right",
+  // }
 ]
 
 

+ 11 - 6
src/views/lotCard/orderMange/index.vue

@@ -36,16 +36,17 @@
         </div>
 
         <a-table row-key="id" :data="dataSource" :columns="columns" :pagination="pagination"
-            :row-selection="rowSelection" v-model:selectedKeys="selectedKeys" :scroll="{ x: 'auto' }">
+            :row-selection="rowSelection" v-model:selectedKeys="selectedKeys" :scroll="{ x: 'auto' }"
+            @page-change="evChangePage">
             <template #id="{ record }">
-                <!-- 订购生成订单 -->
+                <!-- 获取流量包数据 -->
                 <a-popconfirm :content="$t('lotCard.confirmTitleOrder')" :ok-text="$t('form.Confirm')"
                     :cancel-text="$t('form.Cancel')" @ok="handleOrderDialog(record)">
                     <a class="a-link" v-if="!(record.status == 1 || record.status == 3)" href="javascript:;"
                         style="margin-right: 1rem">{{
                             $t('lotCard.titleOrder') }}</a>
                 </a-popconfirm>
-                <!-- 取消订单-退订 -->
+                <!-- 查看订单日志 -->
 
                 <a-popconfirm :content="$t('lotCard.confirmTitleCancelOrder')" :ok-text="$t('form.Confirm')"
                     :cancel-text="$t('form.Cancel')" @ok="handleUnsubscribeDialog(record)">
@@ -64,7 +65,7 @@ import { onMounted, ref, reactive, getCurrentInstance, nextTick } from "vue";
 import { useRoute } from "vue-router";
 import { columns } from "./config";
 import { Message, Notification } from '@arco-design/web-vue'
-import { orderList, setOrderDataPlan, orderCancel } from "@/api/path/lotCard.api"
+import { getOrderLogsList, setOrderDataPlan, orderCancel } from "@/api/path/lotCard.api"
 import { enum_dict } from "@/hooks/enum";
 import { useSystemStore } from '@/store/modules/systemStore'
 
@@ -110,9 +111,9 @@ const intData = async () => {
     const param = {
         current: pagination.value.current,
         size: pagination.value.pageSize,
-        ...searchForm.value,
+        // ...searchForm.value,
     }
-    const { data } = await orderList(param)
+    const { data } = await getOrderLogsList(param)
     dataSource.value = (data.records || []).map(item => {
         const dictList = JSON.parse(window.localStorage.getItem('dictList')) ?? []
         const statusName = (dictList.filter((dicVal) => dicVal.type_key == enum_dict.SUBSCRIPTION_RELATIONSHIP_STATUS) || []).find(val => val.value == item.status)?.label
@@ -217,6 +218,10 @@ const handleUnsubscribeDialog = async (record) => {
 
 //
 
+const evChangePage = (current) => {
+    pagination.value.current = current
+    intData()
+}
 const handleSearch = () => {
     formRef.value.validate((errors) => {
         if (!errors) {

+ 0 - 0
src/views/lotCard/orderMange/orderDialog.vue