Browse Source

订单数据节点增加单条同步功能

jbb 2 years ago
parent
commit
2779d29ce4
2 changed files with 37 additions and 4 deletions
  1. 5 2
      src/api/document/order.js
  2. 32 2
      src/views/order/orderList.vue

+ 5 - 2
src/api/document/order.js

@@ -8,7 +8,10 @@ const orderList = params => getAction('/orderData/syOrderData/list', params)
 // 根据订单号查询 (详情)
 const orderByNum = params => getAction('/orderData/syOrderDataItem/lists', params)
 
-//同步
+//全量同步
 const syncy = params => getAction('/sys/quartzJob/execute', params)
 
-export { orderList, orderByNum, syncy }
+//单条同步
+const oneSyncy = params => getAction('/sys/quartzJob/executeByParam', params)
+
+export { orderList, orderByNum, syncy,oneSyncy }

+ 32 - 2
src/views/order/orderList.vue

@@ -99,7 +99,21 @@ c<template>
     <!-- 操作按钮区域 -->
     <a-card :bordered="false" style="marginTop:10px;">
       <div class="table-operator">
-        <a-button type="primary" @click="synchronization" icon="reload">同步</a-button>
+        <a-row :gutter="24">
+          <a-col :md="6" :sm="8">
+              <a-input placeholder="请输入" v-model="dingDan"></a-input>
+          </a-col>
+        
+          <a-col :md="2" :sm="8">
+            <a-button type="primary" @click="synchronization" icon="reload">全量同步</a-button>
+          </a-col>
+           <a-col :md="2" :sm="8">
+            <a-button type="primary" @click="synchronizationOne" icon="reload">单条同步</a-button>
+          </a-col>
+       </a-row>
+        
+        
+
       </div>
 
       <!-- 主表信息  rowKey="id"  :pagination="ipagination" -->
@@ -133,7 +147,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 import OrderDetailDrawer from '@views/order/orderDetailDrawer.vue'
-import { orderList, syncy } from '@api/document/order'
+import { orderList, syncy,oneSyncy } from '@api/document/order'
 export default {
   name: 'OrderList', // 【单证】 订单数据
   mixins: [JeecgListMixin],
@@ -244,6 +258,7 @@ export default {
         salesman:'',//业务员
         pageNo: '' // 初始页
       },
+      dingDan:'',//单条同步订单号
 
       pagination: {
         // total: '',
@@ -296,6 +311,21 @@ export default {
         })
       })
     },
+    //单条同步
+    synchronizationOne(){
+      this.$nextTick(() => {
+        var id = "1570672855704420354",
+        param = this.dingDan
+        oneSyncy({id,param}).then(res => {
+          if (res.success) {
+            this.getOrderList();
+            this.$message.success('同步成功')
+          }else{
+            this.$message.error(res.message)
+          }
+        })
+      })
+    },
 
     // 【订单号】 抽屉
     showDrawer(record) {