浏览代码

单证 订单数据 同步接口

liangy 2 年之前
父节点
当前提交
b536e609aa
共有 2 个文件被更改,包括 18 次插入9 次删除
  1. 3 2
      src/api/document/order.js
  2. 15 7
      src/views/order/orderList.vue

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

@@ -1,6 +1,6 @@
 /** 单证 -- 订单数据 **/
 
-import { getAction } from '@/api/manage'
+import { getAction, postAction } from '@/api/manage'
 
 // 分页列表查询
 const orderList = params => getAction('/orderData/syOrderData/list', params)
@@ -9,5 +9,6 @@ const orderList = params => getAction('/orderData/syOrderData/list', params)
 const orderByNum = params => getAction('/orderData/syOrderDataItem/lists', params)
 
 //同步
+const syncy = params => postAction('/orderData/syOrderData/tongBu', params)
 
-export { orderList, orderByNum }
+export { orderList, orderByNum, syncy }

+ 15 - 7
src/views/order/orderList.vue

@@ -109,7 +109,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 } from '@api/document/order'
+import { orderList, syncy } from '@api/document/order'
 
 export default {
   name: 'OrderList', // 【单证】 订单数据
@@ -159,8 +159,8 @@ export default {
         { title: '销售部门', width: 100, dataIndex: 'salesDepartment', className: 'replacecolor' },
         { title: '业务员', width: 140, dataIndex: 'salesman', className: 'replacecolor' },
         { title: '币种', width: 90, dataIndex: 'currencyText', className: 'replacecolor' },
-        { title: '品牌方', width: 220, dataIndex: 'brandSide',align: 'left', className: 'replacecolor' },
-        { title: '第三方', width: 220, dataIndex: 'thirdParty',  align: 'left', className: 'replacecolor' },
+        { title: '品牌方', width: 220, dataIndex: 'brandSide', align: 'left', className: 'replacecolor' },
+        { title: '第三方', width: 220, dataIndex: 'thirdParty', align: 'left', className: 'replacecolor' },
         { title: '定金比例(%)', width: 120, dataIndex: 'depositRatio', className: 'replacecolor' },
         { title: '定金', width: 100, dataIndex: 'deposit', className: 'replacecolor' },
         { title: '协同路线', width: 160, dataIndex: 'collaborativeRoute', className: 'replacecolor' },
@@ -234,6 +234,18 @@ export default {
         })
       })
     },
+    // 同步
+    synchronization() {
+      console.log('订单数据--同步')
+      this.$nextTick(() => {
+        syncy().then(res => {
+          if (res.success) {
+            this.getOrderList()
+            console.log('订单数据--同步')
+          }
+        })
+      })
+    },
 
     // 【订单号】 抽屉
     showDrawer(record) {
@@ -264,10 +276,6 @@ export default {
     onDateChange(value, dateString) {
       this.queryParam.orderDate = dateString
     },
-    // 同步
-    synchronization() {
-      console.log('订单数据--同步')
-    },
 
     handleTableChange(pagination, filters, sorter) {
       this.queryParam.pageNo = pagination.current