Browse Source

Merge branch 'deploy' of jianguan-web/qpls-md-html into master

陈瑞 4 years ago
parent
commit
7446f72581
80 changed files with 5429 additions and 3933 deletions
  1. 7 0
      src/api/purchase.js
  2. 1 1
      src/components/GlobalHeader/GlobalHeader.vue
  3. 2 2
      src/components/MultiTab/MultiTab.vue
  4. 6 6
      src/components/Table/index.js
  5. 78 78
      src/config/router.config.js
  6. 3 3
      src/permission.js
  7. 7 7
      src/store/modules/websocketStore.js
  8. 56 51
      src/views/allocationManagement/chainTransferIn/detail.vue
  9. 44 37
      src/views/allocationManagement/chainTransferOut/basicInfoModal.vue
  10. 62 57
      src/views/allocationManagement/chainTransferOut/detail.vue
  11. 182 169
      src/views/allocationManagement/chainTransferOut/edit.vue
  12. 47 40
      src/views/allocationManagement/storeTransferOut/basicInfoModal.vue
  13. 58 53
      src/views/allocationManagement/storeTransferOut/detail.vue
  14. 180 167
      src/views/allocationManagement/storeTransferOut/edit.vue
  15. 50 44
      src/views/allocationManagement/warehouseAllocation/basicInfoModal.vue
  16. 1 1
      src/views/allocationManagement/warehouseAllocation/detail.vue
  17. 219 208
      src/views/allocationManagement/warehouseAllocation/edit.vue
  18. 31 24
      src/views/basicData/bulkPartsTypeManagement/editModal.vue
  19. 31 24
      src/views/basicData/customerTypeManagement/editModal.vue
  20. 34 27
      src/views/basicData/expenseType/editModal.vue
  21. 31 24
      src/views/basicData/storeTransferOutTypeManagement/editModal.vue
  22. 25 18
      src/views/bulkManagement/bulkWarehousingOrder/basicInfoModal.vue
  23. 92 87
      src/views/bulkManagement/bulkWarehousingOrder/detail.vue
  24. 238 225
      src/views/bulkManagement/bulkWarehousingOrder/edit.vue
  25. 14 1
      src/views/bulkManagement/bulkWarehousingOrder/list.vue
  26. 91 0
      src/views/common/auditModal.vue
  27. 2 1
      src/views/common/custSatelliteList.vue
  28. 13 13
      src/views/common/productType.js
  29. 14 12
      src/views/customerManagement/customerInfo/detailModal.vue
  30. 123 116
      src/views/customerManagement/customerInfo/edit.vue
  31. 3 3
      src/views/customerManagement/customerInfo/list.vue
  32. 1 1
      src/views/financialManagement/companyCollectionPayment/detail.vue
  33. 1 1
      src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue
  34. 142 133
      src/views/financialManagement/companyReceivablePayable/collectionPayment.vue
  35. 1 1
      src/views/financialManagement/companyReceivablePayable/list.vue
  36. 30 23
      src/views/financialManagement/expenseManagement/edit.vue
  37. 27 7
      src/views/financialManagement/financialCollection/list.vue
  38. 24 6
      src/views/financialManagement/financialPayment/list.vue
  39. 59 54
      src/views/financialManagement/warehousingAudit/detail.vue
  40. 3 3
      src/views/financialManagement/withdrawalManagement/cashOutModal.vue
  41. 14 1
      src/views/inventoryManagement/inventoryQuery/list.vue
  42. 74 47
      src/views/inventoryManagement/satelliteWarehouseInventory/addModal.vue
  43. 40 35
      src/views/inventoryManagement/warehouse/editModal.vue
  44. 44 39
      src/views/inventoryManagement/warehouse/storingLocation/editModal.vue
  45. 6 2
      src/views/notice/list.vue
  46. 31 24
      src/views/productManagement/productBrand/editModal.vue
  47. 34 27
      src/views/productManagement/productCategory/editModal.vue
  48. 138 131
      src/views/productManagement/productInfo/edit.vue
  49. 56 52
      src/views/purchasingManagement/purchaseOrder/basicInfoModal.vue
  50. 133 128
      src/views/purchasingManagement/purchaseOrder/detail.vue
  51. 209 199
      src/views/purchasingManagement/purchaseOrder/edit.vue
  52. 22 14
      src/views/purchasingManagement/purchaseOrder/list.vue
  53. 40 35
      src/views/purchasingManagement/purchaseOrder/receivingAddress/editAddressModal.vue
  54. 68 57
      src/views/purchasingManagement/purchaseOrder/warehousing.vue
  55. 2 2
      src/views/purchasingManagement/purchaseReturn/detail.vue
  56. 143 132
      src/views/purchasingManagement/purchaseReturn/edit.vue
  57. 32 5
      src/views/purchasingManagement/purchaseReturn/list.vue
  58. 446 3
      src/views/reportData/chainReceivedSendStorageReport/list.vue
  59. 159 100
      src/views/reportData/chainSalesDetailReport/list.vue
  60. 61 36
      src/views/reportData/chainSalesReport/list.vue
  61. 11 11
      src/views/reportData/chainStockReport/list.vue
  62. 429 3
      src/views/reportData/receivedSendStorageReport/list.vue
  63. 5 29
      src/views/salesManagement/outboundOrder/list.vue
  64. 34 31
      src/views/salesManagement/quotation/basicInfoModal.vue
  65. 188 181
      src/views/salesManagement/salesQuery/chooseCustomModal.vue
  66. 72 68
      src/views/salesManagement/salesQuery/detail.vue
  67. 141 126
      src/views/salesManagement/salesQuery/edit.vue
  68. 35 25
      src/views/salesManagement/salesQuery/list.vue
  69. 2 0
      src/views/salesManagement/salesQuery/queryPart.vue
  70. 125 118
      src/views/salesManagement/salesReturn/chooseCustomModal.vue
  71. 53 48
      src/views/salesManagement/salesReturn/detail.vue
  72. 9 1
      src/views/salesManagement/salesReturn/queryPart.vue
  73. 153 142
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  74. 144 132
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  75. 53 50
      src/views/salesManagement/urgentItemsOffset/detail.vue
  76. 28 21
      src/views/storeManagement/bind/editModal.vue
  77. 1 1
      src/views/storeManagement/bind/orgList.vue
  78. 2 2
      src/views/storeManagement/bind/orgMultipleList.vue
  79. 61 56
      src/views/storeManagement/userAuthorization/editModal.vue
  80. 98 91
      src/views/supplierManagement/supplierInfo/editModal.vue

+ 7 - 0
src/api/purchase.js

@@ -133,3 +133,10 @@ export const purchaseDetailPrint = params => {
     responseType: 'blob'
     responseType: 'blob'
   })
   })
 }
 }
+export const purchaseTargetList = (params) => {
+  return axios({
+    url: '/purchaseTarget/queryList',
+    data: params,
+    method: 'post'
+  })
+}

+ 1 - 1
src/components/GlobalHeader/GlobalHeader.vue

@@ -74,7 +74,7 @@ export default {
   },
   },
   mounted () {
   mounted () {
     document.addEventListener('scroll', this.handleScroll, { passive: true })
     document.addEventListener('scroll', this.handleScroll, { passive: true })
-    console.log(this.multiTab)
+    // console.log(this.multiTab)
   },
   },
   methods: {
   methods: {
     handleScroll () {
     handleScroll () {

+ 2 - 2
src/components/MultiTab/MultiTab.vue

@@ -26,7 +26,7 @@ export default {
       }
       }
       this.closeThat(val)
       this.closeThat(val)
     }).$on('rename', ({ key, name }) => {
     }).$on('rename', ({ key, name }) => {
-      console.log('rename', key, name)
+      // console.log('rename', key, name)
       try {
       try {
         const item = this.pages.find(item => item.path === key)
         const item = this.pages.find(item => item.path === key)
         item.meta.customTitle = name
         item.meta.customTitle = name
@@ -135,7 +135,7 @@ export default {
     },
     },
     activeKey: function (newPathKey) {
     activeKey: function (newPathKey) {
       const row = this.pages.find(item => item.name == newPathKey)
       const row = this.pages.find(item => item.name == newPathKey)
-      console.log(row.fullPath)
+      // console.log(row.fullPath)
       this.$router.push({ path: row.fullPath })
       this.$router.push({ path: row.fullPath })
     }
     }
   },
   },

+ 6 - 6
src/components/Table/index.js

@@ -89,7 +89,7 @@ export default {
       default: ''
       default: ''
     },
     },
     index: {
     index: {
-      type: [String,Number],
+      type: [String, Number],
       default: ''
       default: ''
     }
     }
   }),
   }),
@@ -127,9 +127,9 @@ export default {
       pageSize: this.pageSize,
       pageSize: this.pageSize,
       showSizeChanger: this.showSizeChanger
       showSizeChanger: this.showSizeChanger
     }) || false
     }) || false
-    console.log('this.localPagination', this.localPagination)
+    // console.log('this.localPagination', this.localPagination)
     this.needTotalList = this.initTotalList(this.columns)
     this.needTotalList = this.initTotalList(this.columns)
-    if(this.defaultLoadData){
+    if (this.defaultLoadData) {
       this.loadData()
       this.loadData()
     }
     }
   },
   },
@@ -170,14 +170,14 @@ export default {
         ...filters
         ...filters
       }
       }
       )
       )
-      console.log('parameter', parameter)
+      // console.log('parameter', parameter)
       const result = this.data(parameter)
       const result = this.data(parameter)
       // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.count, r.data
       // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.count, r.data
       // eslint-disable-next-line
       // eslint-disable-next-line
       if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
       if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
         result.then(r => {
         result.then(r => {
           const list = r.list || r.data || r
           const list = r.list || r.data || r
-          console.log(r,'rrrrrrrrrr')
+          // console.log(r,'rrrrrrrrrr')
           this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
           this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
             current: r.pageNo, // 返回结果中的当前分页数
             current: r.pageNo, // 返回结果中的当前分页数
             total: Number(r.count), // 返回结果中的总记录数
             total: Number(r.count), // 返回结果中的总记录数
@@ -302,7 +302,7 @@ export default {
       if (k === 'rowSelection') {
       if (k === 'rowSelection') {
         if (showAlert && this.rowSelection) {
         if (showAlert && this.rowSelection) {
           // 如果需要使用alert,则重新绑定 rowSelection 事件
           // 如果需要使用alert,则重新绑定 rowSelection 事件
-          console.log('this.rowSelection', this.rowSelection)
+          // console.log('this.rowSelection', this.rowSelection)
           props[k] = {
           props[k] = {
             ...this.rowSelection,
             ...this.rowSelection,
             selectedRows: this.selectedRows,
             selectedRows: this.selectedRows,

+ 78 - 78
src/config/router.config.js

@@ -431,7 +431,7 @@ export const asyncRouterMap = [
                 }
                 }
               },
               },
               {
               {
-                path: 'add/:id/:sn',
+                path: 'add/:id/:sn/:name',
                 name: 'purchaseReturnAdd',
                 name: 'purchaseReturnAdd',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
                 meta: {
                 meta: {
@@ -442,7 +442,7 @@ export const asyncRouterMap = [
                 }
                 }
               },
               },
               {
               {
-                path: 'edit/:id/:sn',
+                path: 'edit/:id/:sn/:name',
                 name: 'purchaseReturnEdit',
                 name: 'purchaseReturnEdit',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
                 meta: {
                 meta: {
@@ -1796,8 +1796,8 @@ export const asyncRouterMap = [
         component: PageView,
         component: PageView,
         meta: {
         meta: {
           title: '报表',
           title: '报表',
-          icon: 'project'
-          // permission: 'M_basicData'
+          icon: 'project',
+          permission: 'M_reportData'
         },
         },
         children: [
         children: [
           {
           {
@@ -1807,8 +1807,8 @@ export const asyncRouterMap = [
             component: RouteView,
             component: RouteView,
             meta: {
             meta: {
               title: '连锁库存总表(天)',
               title: '连锁库存总表(天)',
-              icon: 'profile'
-              // permission: 'M_warehouseList'
+              icon: 'profile',
+              permission: 'M_chainStockReportList'
             },
             },
             hideChildrenInMenu: true,
             hideChildrenInMenu: true,
             children: [
             children: [
@@ -1819,8 +1819,8 @@ export const asyncRouterMap = [
                 meta: {
                 meta: {
                   title: '连锁库存总表列表',
                   title: '连锁库存总表列表',
                   icon: 'profile',
                   icon: 'profile',
-                  hidden: true
-                  // permission: 'M_warehouseList'
+                  hidden: true,
+                  permission: 'M_chainStockReportList'
                 }
                 }
               }
               }
             ]
             ]
@@ -1832,8 +1832,8 @@ export const asyncRouterMap = [
             component: RouteView,
             component: RouteView,
             meta: {
             meta: {
               title: '连锁销售报表(天)',
               title: '连锁销售报表(天)',
-              icon: 'profile'
-              // permission: 'M_warehouseList'
+              icon: 'profile',
+              permission: 'M_chainSalesReportList'
             },
             },
             hideChildrenInMenu: true,
             hideChildrenInMenu: true,
             children: [
             children: [
@@ -1844,8 +1844,8 @@ export const asyncRouterMap = [
                 meta: {
                 meta: {
                   title: '连锁销售报表列表',
                   title: '连锁销售报表列表',
                   icon: 'profile',
                   icon: 'profile',
-                  hidden: true
-                  // permission: 'M_warehouseList'
+                  hidden: true,
+                  permission: 'M_chainSalesReportList'
                 }
                 }
               }
               }
             ]
             ]
@@ -1857,8 +1857,8 @@ export const asyncRouterMap = [
             component: RouteView,
             component: RouteView,
             meta: {
             meta: {
               title: '连锁销售明细报表(天)',
               title: '连锁销售明细报表(天)',
-              icon: 'profile'
-              // permission: 'M_warehouseList'
+              icon: 'profile',
+              permission: 'M_chainSalesDetailReportList'
             },
             },
             hideChildrenInMenu: true,
             hideChildrenInMenu: true,
             children: [
             children: [
@@ -1869,37 +1869,37 @@ export const asyncRouterMap = [
                 meta: {
                 meta: {
                   title: '连锁销售明细报表列表',
                   title: '连锁销售明细报表列表',
                   icon: 'profile',
                   icon: 'profile',
-                  hidden: true
-                  // permission: 'M_warehouseList'
+                  hidden: true,
+                  permission: 'M_chainSalesDetailReportList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/chainReceivedSendStorageReport',
+            redirect: '/reportData/chainReceivedSendStorageReport/list',
+            name: 'chainReceivedSendStorageReport',
+            component: RouteView,
+            meta: {
+              title: '连锁收发存报表',
+              icon: 'profile',
+              permission: 'M_chainReceivedSendStorageReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'chainReceivedSendStorageReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/chainReceivedSendStorageReport/list.vue'),
+                meta: {
+                  title: '连锁收发存报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_chainReceivedSendStorageReportList'
                 }
                 }
               }
               }
             ]
             ]
           },
           },
-          // {
-          //   path: '/reportData/chainReceivedSendStorageReport',
-          //   redirect: '/reportData/chainReceivedSendStorageReport/list',
-          //   name: 'chainReceivedSendStorageReport',
-          //   component: RouteView,
-          //   meta: {
-          //     title: '连锁收发存报表',
-          //     icon: 'profile'
-          //     // permission: 'M_warehouseList'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'chainReceivedSendStorageReportList',
-          //       component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/chainReceivedSendStorageReport/list.vue'),
-          //       meta: {
-          //         title: '连锁收发存报表列表',
-          //         icon: 'profile',
-          //         hidden: true
-          //         // permission: 'M_warehouseList'
-          //       }
-          //     }
-          //   ]
-          // },
           {
           {
             path: '/reportData/customerReport',
             path: '/reportData/customerReport',
             redirect: '/reportData/customerReport/list',
             redirect: '/reportData/customerReport/list',
@@ -1907,8 +1907,8 @@ export const asyncRouterMap = [
             component: RouteView,
             component: RouteView,
             meta: {
             meta: {
               title: '大客户报表(天)',
               title: '大客户报表(天)',
-              icon: 'profile'
-              // permission: 'M_warehouseList'
+              icon: 'profile',
+              permission: 'M_customerReportList'
             },
             },
             hideChildrenInMenu: true,
             hideChildrenInMenu: true,
             children: [
             children: [
@@ -1919,8 +1919,8 @@ export const asyncRouterMap = [
                 meta: {
                 meta: {
                   title: '大客户报表列表',
                   title: '大客户报表列表',
                   icon: 'profile',
                   icon: 'profile',
-                  hidden: true
-                  // permission: 'M_warehouseList'
+                  hidden: true,
+                  permission: 'M_customerReportList'
                 }
                 }
               }
               }
             ]
             ]
@@ -1932,8 +1932,8 @@ export const asyncRouterMap = [
             component: RouteView,
             component: RouteView,
             meta: {
             meta: {
               title: '库存总入报表',
               title: '库存总入报表',
-              icon: 'profile'
-              // permission: 'M_warehouseList'
+              icon: 'profile',
+              permission: 'M_stockIncomeReportList'
             },
             },
             hideChildrenInMenu: true,
             hideChildrenInMenu: true,
             children: [
             children: [
@@ -1944,8 +1944,8 @@ export const asyncRouterMap = [
                 meta: {
                 meta: {
                   title: '库存总入报表列表',
                   title: '库存总入报表列表',
                   icon: 'profile',
                   icon: 'profile',
-                  hidden: true
-                  // permission: 'M_warehouseList'
+                  hidden: true,
+                  permission: 'M_stockIncomeReportList'
                 }
                 }
               }
               }
             ]
             ]
@@ -1957,8 +1957,8 @@ export const asyncRouterMap = [
             component: RouteView,
             component: RouteView,
             meta: {
             meta: {
               title: '库存总出报表',
               title: '库存总出报表',
-              icon: 'profile'
-              // permission: 'M_warehouseList'
+              icon: 'profile',
+              permission: 'M_stockExpenditureReportList'
             },
             },
             hideChildrenInMenu: true,
             hideChildrenInMenu: true,
             children: [
             children: [
@@ -1969,37 +1969,37 @@ export const asyncRouterMap = [
                 meta: {
                 meta: {
                   title: '库存总出报表列表',
                   title: '库存总出报表列表',
                   icon: 'profile',
                   icon: 'profile',
-                  hidden: true
-                  // permission: 'M_warehouseList'
+                  hidden: true,
+                  permission: 'M_stockExpenditureReportList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/receivedSendStorageReport',
+            redirect: '/reportData/receivedSendStorageReport/list',
+            name: 'receivedSendStorageReport',
+            component: RouteView,
+            meta: {
+              title: '收发存报表',
+              icon: 'profile',
+              permission: 'M_receivedSendStorageReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'receivedSendStorageReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/receivedSendStorageReport/list.vue'),
+                meta: {
+                  title: '收发存报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_receivedSendStorageReportList'
                 }
                 }
               }
               }
             ]
             ]
           }
           }
-          // {
-          //   path: '/reportData/receivedSendStorageReport',
-          //   redirect: '/reportData/receivedSendStorageReport/list',
-          //   name: 'receivedSendStorageReport',
-          //   component: RouteView,
-          //   meta: {
-          //     title: '收发存报表',
-          //     icon: 'profile'
-          //     // permission: 'M_warehouseList'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'receivedSendStorageReportList',
-          //       component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/receivedSendStorageReport/list.vue'),
-          //       meta: {
-          //         title: '收发存报表列表',
-          //         icon: 'profile',
-          //         hidden: true
-          //         // permission: 'M_warehouseList'
-          //       }
-          //     }
-          //   ]
-          // }
         ]
         ]
       },
       },
       // auth
       // auth

+ 3 - 3
src/permission.js

@@ -27,7 +27,7 @@ router.beforeEach((to, from, next) => {
       NProgress.done()
       NProgress.done()
     } else {
     } else {
       const userInfo = Vue.ls.get('userName')
       const userInfo = Vue.ls.get('userName')
-      console.log(userInfo)
+      // console.log(userInfo)
       if (userInfo) {
       if (userInfo) {
         store.dispatch('SetInfo', userInfo)
         store.dispatch('SetInfo', userInfo)
       } else {
       } else {
@@ -35,13 +35,13 @@ router.beforeEach((to, from, next) => {
           next({ path: '/user/login', query: { redirect: to.fullPath } })
           next({ path: '/user/login', query: { redirect: to.fullPath } })
         })
         })
       }
       }
-      console.log(store.getters.roles)
+      // console.log(store.getters.roles)
       if (store.getters.roles.permissionList.length === 0) {
       if (store.getters.roles.permissionList.length === 0) {
         store
         store
           .dispatch('GetInfo', token)
           .dispatch('GetInfo', token)
           .then(res => {
           .then(res => {
             const roles = res
             const roles = res
-            console.log(roles, 'roles')
+            // console.log(roles, 'roles')
             if (roles.permissionList.length == 0 || !roles) {
             if (roles.permissionList.length == 0 || !roles) {
               store.dispatch('Logout').then(() => {
               store.dispatch('Logout').then(() => {
                 store.dispatch('ResetRoutes').then(() => {
                 store.dispatch('ResetRoutes').then(() => {

+ 7 - 7
src/store/modules/websocketStore.js

@@ -28,16 +28,16 @@ export default {
       const sid = 'pc/u' + this.getters.userInfo.userid + 'epc'
       const sid = 'pc/u' + this.getters.userInfo.userid + 'epc'
       const protocol = process.env.NODE_ENV == 'production' ? (window.location.protocol == 'http:' ? 'ws:' : 'wss:') : 'ws:'
       const protocol = process.env.NODE_ENV == 'production' ? (window.location.protocol == 'http:' ? 'ws:' : 'wss:') : 'ws:'
       const wsUrl = protocol + baseUrl + sid
       const wsUrl = protocol + baseUrl + sid
-      console.log(process.env.NODE_ENV, wsUrl)
+      // console.log(process.env.NODE_ENV, wsUrl)
       state.websock = new WebSocket(wsUrl)
       state.websock = new WebSocket(wsUrl)
       state.websock.onopen = function () {
       state.websock.onopen = function () {
-        console.log('连接成功!')
+        // console.log('连接成功!')
         _this.dispatch('getUnreadMessageCount')
         _this.dispatch('getUnreadMessageCount')
       }
       }
       state.websock.onmessage = function (e) {
       state.websock.onmessage = function (e) {
-        console.log('ws接收!', e.data)
+        // console.log('ws接收!', e.data)
         if (e.data != 'pong') {
         if (e.data != 'pong') {
-          console.log('进来----------')
+          // console.log('进来----------')
           state.wsMessageData = JSON.parse(e.data)
           state.wsMessageData = JSON.parse(e.data)
         }
         }
       }
       }
@@ -50,7 +50,7 @@ export default {
 
 
       // 发送心跳包
       // 发送心跳包
       state.heartInterId = setInterval(function () {
       state.heartInterId = setInterval(function () {
-        console.log('ws发送心跳!')
+        // console.log('ws发送心跳!')
         if (state.websock.readyState == 3) {
         if (state.websock.readyState == 3) {
           clearInterval(state.heartInterId)
           clearInterval(state.heartInterId)
           _this.commit('WEBSOCKET_INIT', url)
           _this.commit('WEBSOCKET_INIT', url)
@@ -63,7 +63,7 @@ export default {
       clearInterval(state.heartInterId)
       clearInterval(state.heartInterId)
     },
     },
     WEBSOCKET_SEND (state, p) {
     WEBSOCKET_SEND (state, p) {
-      console.log('ws发送!', p)
+      // console.log('ws发送!', p)
       state.websock.send(p)
       state.websock.send(p)
     },
     },
     UPDATE_HOME (state, p) {
     UPDATE_HOME (state, p) {
@@ -89,7 +89,7 @@ export default {
     // 此方法用来获取未读消息条数,接口只返回数值,不返回消息列表
     // 此方法用来获取未读消息条数,接口只返回数值,不返回消息列表
     getUnreadMessageCount ({ state, commit }) {
     getUnreadMessageCount ({ state, commit }) {
       getUnreadCount().then(res => {
       getUnreadCount().then(res => {
-        console.log(res, '---------------请求未读消息', res.data ? res.data.no_read_count : 0)
+        // console.log(res, '---------------请求未读消息', res.data ? res.data.no_read_count : 0)
         commit('setMessageCount', res.data ? res.data.no_read_count : 0)
         commit('setMessageCount', res.data ? res.data.no_read_count : 0)
       })
       })
     },
     },

+ 56 - 51
src/views/allocationManagement/chainTransferIn/detail.vue

@@ -1,57 +1,59 @@
 <template>
 <template>
   <div class="chainTransferInDetail-wrap">
   <div class="chainTransferInDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="chainTransferInDetail-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="chainTransferInDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <a-button
-          v-if="isEdit"
-          type="primary"
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="chainTransferInDetail-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="chainTransferInDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a-button
+            v-if="isEdit"
+            type="primary"
+            size="small"
+            style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+            id="chainTransferInDetail-edit-btn"
+            @click.stop="handleEdit">编辑</a-button>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="chainTransferInDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="chainTransferInDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="调入单号">{{ (basicInfoData&&basicInfoData.allocationLinkagePutNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调出对象">{{ (basicInfoData&&basicInfoData.outTenantName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
+        <!-- 总计 -->
+        <a-alert type="info" showIcon style="margin-bottom:15px">
+          <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
           size="small"
           size="small"
-          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
-          id="chainTransferInDetail-edit-btn"
-          @click.stop="handleEdit">编辑</a-button>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="chainTransferInDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="chainTransferInDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="调入单号">{{ (basicInfoData&&basicInfoData.allocationLinkagePutNo) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调出对象">{{ (basicInfoData&&basicInfoData.outTenantName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
-      <!-- 总计 -->
-      <a-alert type="info" showIcon style="margin-bottom:15px">
-        <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1335 }"
-        bordered>
-      </s-table>
-    </a-card>
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1335 }"
+          bordered>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -65,6 +67,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       // 表头
       // 表头
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
@@ -137,7 +140,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       allocLinkagePutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       allocLinkagePutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 44 - 37
src/views/allocationManagement/chainTransferOut/basicInfoModal.vue

@@ -8,43 +8,45 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow = false"
     @cancle="isShow = false"
     :width="800">
     :width="800">
-    <a-form-model
-      id="chainTransferOut-basicInfo-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
-      <a-form-model-item label="调出产品类型" prop="allocationType">
-        <v-select
-          v-model="form.allocationType"
-          ref="allocationType"
-          id="chainTransferOut-basicInfo-allocationType"
-          code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
-          placeholder="请选择调出产品类型"
-          allowClear
-        ></v-select>
-      </a-form-model-item>
-      <a-form-model-item label="调往对象" prop="putTenantSn">
-        <a-select
-          placeholder="请选择调往对象"
-          allowClear
-          v-model="form.putTenantSn"
-          :showSearch="true"
-          option-filter-prop="children"
-          :filter-option="filterOption">
-          <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
-        </a-select>
-      </a-form-model-item>
-      <a-form-model-item label="备注" prop="remark">
-        <a-textarea id="chainTransferOut-basicInfo-remark" :maxLength="500" v-model="form.remark" placeholder="请输入备注(最多500个字符)" allowClear />
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="chainTransferOut-basicInfo-modal-save" @click="handleSave">保存</a-button>
-      <a-button id="chainTransferOut-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chainTransferOut-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="调出产品类型" prop="allocationType">
+          <v-select
+            v-model="form.allocationType"
+            ref="allocationType"
+            id="chainTransferOut-basicInfo-allocationType"
+            code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+            placeholder="请选择调出产品类型"
+            allowClear
+          ></v-select>
+        </a-form-model-item>
+        <a-form-model-item label="调往对象" prop="putTenantSn">
+          <a-select
+            placeholder="请选择调往对象"
+            allowClear
+            v-model="form.putTenantSn"
+            :showSearch="true"
+            option-filter-prop="children"
+            :filter-option="filterOption">
+            <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="备注" prop="remark">
+          <a-textarea id="chainTransferOut-basicInfo-remark" :maxLength="500" v-model="form.remark" placeholder="请输入备注(最多500个字符)" allowClear />
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="chainTransferOut-basicInfo-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="chainTransferOut-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -63,6 +65,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 4 },
         labelCol: { span: 4 },
@@ -87,13 +90,17 @@ export default {
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
           const form = JSON.parse(JSON.stringify(_this.form))
+          _this.spinning = true
           allocLinkageOutSave(form).then(res => {
           allocLinkageOutSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               setTimeout(() => {
               setTimeout(() => {
                 _this.isShow = false
                 _this.isShow = false
                 _this.$emit('ok', res.data)
                 _this.$emit('ok', res.data)
+                _this.spinning = false
               }, 1000)
               }, 1000)
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 62 - 57
src/views/allocationManagement/chainTransferOut/detail.vue

@@ -1,63 +1,65 @@
 <template>
 <template>
   <div class="chainTransferOutDetail-wrap">
   <div class="chainTransferOutDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutDetail-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="chainTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <a-button
-          v-if="isEdit"
-          type="primary"
-          size="small"
-          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
-          id="chainTransferOutDetail-edit-btn"
-          @click.stop="handleEdit">编辑</a-button>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="chainTransferOutDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="chainTransferOutDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调出单号">{{ (basicInfoData&&basicInfoData.allocationLinkageOutNo) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 产品详情 -->
-    <a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="产品详情">
-          <!-- 总计 -->
-          <a-alert type="info" showIcon style="margin-bottom:15px">
-            <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
-          </a-alert>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutDetail-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="chainTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a-button
+            v-if="isEdit"
+            type="primary"
             size="small"
             size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :scroll="{ x: 1090 }"
-            bordered>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
+            style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+            id="chainTransferOutDetail-edit-btn"
+            @click.stop="handleEdit">编辑</a-button>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="chainTransferOutDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="chainTransferOutDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调出单号">{{ (basicInfoData&&basicInfoData.allocationLinkageOutNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 产品详情 -->
+      <a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="产品详情">
+            <!-- 总计 -->
+            <a-alert type="info" showIcon style="margin-bottom:15px">
+              <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+            </a-alert>
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="columns"
+              :data="loadData"
+              :scroll="{ x: 1090 }"
+              bordered>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -71,6 +73,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       // 表头
       // 表头
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
@@ -143,7 +146,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       allocLinkageOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       allocLinkageOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 182 - 169
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -1,188 +1,190 @@
 <template>
 <template>
   <div class="chainTransferOutEdit-wrap">
   <div class="chainTransferOutEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="chainTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">调往对象:{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</span>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="chainTransferOutEdit-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="chainTransferOutEdit-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 选择产品 -->
-    <a-card size="small" :bordered="false" class="chainTransferOutEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="选择产品">
-          <!-- 筛选条件 -->
-          <div class="table-page-search-wrapper">
-            <a-form layout="inline" @keyup.enter.native="getProductList(1)">
-              <a-row :gutter="15">
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品编码" prop="productCode">
-                    <a-input id="chainTransferOutEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品名称" prop="productName">
-                    <a-input id="chainTransferOutEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="原厂编码" prop="productOrigCode">
-                    <a-input id="chainTransferOutEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
-                  </a-form-item>
-                </a-col>
-                <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="chainTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">调往对象:{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="chainTransferOutEdit-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="chainTransferOutEdit-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 选择产品 -->
+      <a-card size="small" :bordered="false" class="chainTransferOutEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="选择产品">
+            <!-- 筛选条件 -->
+            <div class="table-page-search-wrapper">
+              <a-form layout="inline" @keyup.enter.native="getProductList(1)">
+                <a-row :gutter="15">
                   <a-col :md="6" :sm="24">
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品品牌">
-                      <a-select
-                        placeholder="请选择"
-                        id="chainTransferOutEdit-brandSn"
-                        allowClear
-                        v-model="queryParam.brandSn"
-                        :showSearch="true"
-                        option-filter-prop="children"
-                        :filter-option="filterOption">
-                        <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                      </a-select>
+                    <a-form-item label="产品编码" prop="productCode">
+                      <a-input id="chainTransferOutEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="6" :sm="24">
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品分类">
-                      <a-cascader
-                        @change="changeProductType"
-                        change-on-select
-                        v-model="productType"
-                        expand-trigger="hover"
-                        :options="productTypeList"
-                        :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                        id="chainTransferOutEdit-productType"
-                        placeholder="请选择产品分类"
-                        allowClear />
+                    <a-form-item label="产品名称" prop="productName">
+                      <a-input id="chainTransferOutEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="6" :sm="24">
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="仓库">
-                      <a-select id="chainTransferOutEdit-warehouseSn" placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
-                        <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-                      </a-select>
+                    <a-form-item label="原厂编码" prop="productOrigCode">
+                      <a-input id="chainTransferOutEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
-                </template>
-                <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-                  <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="chainTransferOutEdit-refresh">查询</a-button>
-                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutEdit-reset">重置</a-button>
-                  <a @click="advanced=!advanced" style="margin-left: 8px">
-                    {{ advanced ? '收起' : '展开' }}
-                    <a-icon :type="advanced ? 'up' : 'down'"/>
-                  </a>
-                </a-col>
-              </a-row>
-            </a-form>
-          </div>
-          <!-- 列表 -->
-          <a-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
-            :columns="columns"
-            :customRow="handleClickRow"
-            :dataSource="loadData"
-            :scroll="{ x: 1680, y: 300 }"
-            bordered>
-            <!-- 调出数量 -->
-            <template slot="outQty" slot-scope="text, record">
-              <a-input-number
-                id="chainTransferOutEdit-outQty"
-                v-model="record.outQty"
-                :precision="0"
-                :min="1"
-                :max="record.currentQty"
-                placeholder="请输入"
-                style="width: 100%;" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
-            </template>
-          </a-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="chainTransferOutEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="已选产品">
-          <!-- 总计 -->
-          <a-alert type="info" showIcon style="margin-bottom:15px">
-            <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
-          </a-alert>
-          <!-- 筛选条件 -->
-          <a-row :gutter="15" justify="space-between">
-            <a-col :span="17">
-              <div class="table-page-search-wrapper">
-                <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
-                  <a-row :gutter="15">
-                    <a-col :md="9" :sm="24">
-                      <a-form-item label="产品编码" prop="productCode">
-                        <a-input id="chainTransferOutEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                  <template v-if="advanced">
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="产品品牌">
+                        <a-select
+                          placeholder="请选择"
+                          id="chainTransferOutEdit-brandSn"
+                          allowClear
+                          v-model="queryParam.brandSn"
+                          :showSearch="true"
+                          option-filter-prop="children"
+                          :filter-option="filterOption">
+                          <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                        </a-select>
                       </a-form-item>
                       </a-form-item>
                     </a-col>
                     </a-col>
-                    <a-col :md="9" :sm="24">
-                      <a-form-item label="产品名称" prop="productName">
-                        <a-input id="chainTransferOutEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="产品分类">
+                        <a-cascader
+                          @change="changeProductType"
+                          change-on-select
+                          v-model="productType"
+                          expand-trigger="hover"
+                          :options="productTypeList"
+                          :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                          id="chainTransferOutEdit-productType"
+                          placeholder="请选择产品分类"
+                          allowClear />
                       </a-form-item>
                       </a-form-item>
                     </a-col>
                     </a-col>
-                    <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-                      <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="chainTransferOutList-refresh">查询</a-button>
-                      <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="chainTransferOutList-reset">重置</a-button>
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="仓库">
+                        <a-select id="chainTransferOutEdit-warehouseSn" placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
+                          <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                        </a-select>
+                      </a-form-item>
                     </a-col>
                     </a-col>
-                  </a-row>
-                </a-form>
-              </div>
-            </a-col>
-            <a-col :span="7" style="text-align: right;">
-              <!-- <a-button size="small" style="margin-left: 8px" id="chainTransferOutEdit-import-btn">导入明细</a-button> -->
-              <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button>
-            </a-col>
-          </a-row>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="chooseTable"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="chooseColumns"
-            :data="chooseLoadData"
-            :scroll="{ x: 1695, y: 300 }"
-            bordered>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="chainTransferOutEdit-del-btn">删除</a-button>
-            </template>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="chainTransferOutEdit-submit"
-          size="large"
-          class="button-primary"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+                  </template>
+                  <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                    <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="chainTransferOutEdit-refresh">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutEdit-reset">重置</a-button>
+                    <a @click="advanced=!advanced" style="margin-left: 8px">
+                      {{ advanced ? '收起' : '展开' }}
+                      <a-icon :type="advanced ? 'up' : 'down'"/>
+                    </a>
+                  </a-col>
+                </a-row>
+              </a-form>
+            </div>
+            <!-- 列表 -->
+            <a-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
+              :columns="columns"
+              :customRow="handleClickRow"
+              :dataSource="loadData"
+              :scroll="{ x: 1680, y: 300 }"
+              bordered>
+              <!-- 调出数量 -->
+              <template slot="outQty" slot-scope="text, record">
+                <a-input-number
+                  id="chainTransferOutEdit-outQty"
+                  v-model="record.outQty"
+                  :precision="0"
+                  :min="1"
+                  :max="record.currentQty"
+                  placeholder="请输入"
+                  style="width: 100%;" />
+              </template>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
+              </template>
+            </a-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 已选产品 -->
+      <a-card size="small" :bordered="false" class="chainTransferOutEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="已选产品">
+            <!-- 总计 -->
+            <a-alert type="info" showIcon style="margin-bottom:15px">
+              <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+            </a-alert>
+            <!-- 筛选条件 -->
+            <a-row :gutter="15" justify="space-between">
+              <a-col :span="17">
+                <div class="table-page-search-wrapper">
+                  <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
+                    <a-row :gutter="15">
+                      <a-col :md="9" :sm="24">
+                        <a-form-item label="产品编码" prop="productCode">
+                          <a-input id="chainTransferOutEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                        </a-form-item>
+                      </a-col>
+                      <a-col :md="9" :sm="24">
+                        <a-form-item label="产品名称" prop="productName">
+                          <a-input id="chainTransferOutEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                        </a-form-item>
+                      </a-col>
+                      <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="chainTransferOutList-refresh">查询</a-button>
+                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="chainTransferOutList-reset">重置</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-form>
+                </div>
+              </a-col>
+              <a-col :span="7" style="text-align: right;">
+                <!-- <a-button size="small" style="margin-left: 8px" id="chainTransferOutEdit-import-btn">导入明细</a-button> -->
+                <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button>
+              </a-col>
+            </a-row>
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="chooseTable"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="chooseColumns"
+              :data="chooseLoadData"
+              :scroll="{ x: 1695, y: 300 }"
+              bordered>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="chainTransferOutEdit-del-btn">删除</a-button>
+              </template>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            id="chainTransferOutEdit-submit"
+            size="large"
+            class="button-primary"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -200,6 +202,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       queryParam: {
       queryParam: {
         productCode: '',
         productCode: '',
         productName: '',
         productName: '',
@@ -344,11 +347,15 @@ export default {
         warehouseSn: row.warehouseSn,
         warehouseSn: row.warehouseSn,
         warehouseLocationSn: row.warehouseLocationSn
         warehouseLocationSn: row.warehouseLocationSn
       }
       }
+      this.spinning = true
       allocLinkageOutDetailSave(params).then(res => {
       allocLinkageOutDetailSave(params).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           this.getProductList()
           this.getProductList()
           this.$refs.chooseTable.refresh()
           this.$refs.chooseTable.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -384,12 +391,16 @@ export default {
     //  提交
     //  提交
     handleSubmit () {
     handleSubmit () {
       const _this = this
       const _this = this
+      _this.spinning = true
       allocLinkageOutSubmit({ sn: this.$route.params.sn }).then(res => {
       allocLinkageOutSubmit({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           setTimeout(() => {
           setTimeout(() => {
             _this.handleBack()
             _this.handleBack()
+            _this.spinning = false
           }, 1000)
           }, 1000)
+        } else {
+          _this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -481,7 +492,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       allocLinkageOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       allocLinkageOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 47 - 40
src/views/allocationManagement/storeTransferOut/basicInfoModal.vue

@@ -8,46 +8,48 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow = false"
     @cancle="isShow = false"
     :width="800">
     :width="800">
-    <a-form-model
-      id="storeTransferOut-basicInfo-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
-      <a-form-model-item label="调往对象" prop="putPersonType">
-        <a-radio-group v-model="form.putPersonType" @change="putPersonTypeChange">
-          <a-radio v-for="(item,index) in putPersonTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
-        </a-radio-group>
-      </a-form-model-item>
-      <a-form-model-item label="调往对象名称" :prop="isCustomer ? 'putPersonSn' : 'putPersonName'">
-        <a-select
-          v-if="isCustomer"
-          v-model="form.putPersonSn"
-          placeholder="请选择"
-          allowClear
-          :showSearch="true"
-          option-filter-prop="children"
-          :filter-option="filterOption"
-          @change="putPersonChange">
-          <a-select-option v-for="item in custData" :key="item.customerSn" :value="item.customerSn">{{ item.customerName }}</a-select-option>
-        </a-select>
-        <a-input v-if="!isCustomer" v-model="form.putPersonName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
-      </a-form-model-item>
-      <a-form-model-item label="调拨类型" prop="callOutType">
-        <a-select v-model="form.callOutType" placeholder="请选择调拨类型" allowClear >
-          <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
-        </a-select>
-      </a-form-model-item>
-      <a-form-model-item label="备注" prop="remark">
-        <a-textarea id="storeTransferOut-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="storeTransferOut-basicInfo-modal-save" @click="handleSave">保存</a-button>
-      <a-button id="storeTransferOut-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="storeTransferOut-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="调往对象" prop="putPersonType">
+          <a-radio-group v-model="form.putPersonType" @change="putPersonTypeChange">
+            <a-radio v-for="(item,index) in putPersonTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+        <a-form-model-item label="调往对象名称" :prop="isCustomer ? 'putPersonSn' : 'putPersonName'">
+          <a-select
+            v-if="isCustomer"
+            v-model="form.putPersonSn"
+            placeholder="请选择"
+            allowClear
+            :showSearch="true"
+            option-filter-prop="children"
+            :filter-option="filterOption"
+            @change="putPersonChange">
+            <a-select-option v-for="item in custData" :key="item.customerSn" :value="item.customerSn">{{ item.customerName }}</a-select-option>
+          </a-select>
+          <a-input v-if="!isCustomer" v-model="form.putPersonName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
+        </a-form-model-item>
+        <a-form-model-item label="调拨类型" prop="callOutType">
+          <a-select v-model="form.callOutType" placeholder="请选择调拨类型" allowClear >
+            <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="备注" prop="remark">
+          <a-textarea id="storeTransferOut-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="storeTransferOut-basicInfo-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="storeTransferOut-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -69,6 +71,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 4 },
         labelCol: { span: 4 },
@@ -105,13 +108,17 @@ export default {
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
           const form = JSON.parse(JSON.stringify(_this.form))
+          _this.spinning = true
           storeCallOutSave(form).then(res => {
           storeCallOutSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               setTimeout(() => {
               setTimeout(() => {
                 _this.isShow = false
                 _this.isShow = false
                 _this.$emit('ok', res.data)
                 _this.$emit('ok', res.data)
+                _this.spinning = false
               }, 1000)
               }, 1000)
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 58 - 53
src/views/allocationManagement/storeTransferOut/detail.vue

@@ -1,59 +1,61 @@
 <template>
 <template>
   <div class="storeTransferOutDetail-wrap">
   <div class="storeTransferOutDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutDetail-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="storeTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <a-button
-          v-if="isEdit"
-          type="primary"
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutDetail-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="storeTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a-button
+            v-if="isEdit"
+            type="primary"
+            size="small"
+            style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+            id="storeTransferOutDetail-edit-btn"
+            @click.stop="handleEdit">编辑</a-button>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-checkbox key="4" v-model="printCostChecked">打印成本</a-checkbox>
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="storeTransferOutDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="storeTransferOutDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="调往对象名称">{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="店内调出单号">{{ (basicInfoData&&basicInfoData.storeCallOutNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨类型">{{ (basicInfoData&&basicInfoData.callOutTypeName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont">
+        <!-- 总计 -->
+        <a-alert type="info" showIcon style="margin-bottom:15px">
+          <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
           size="small"
           size="small"
-          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
-          id="storeTransferOutDetail-edit-btn"
-          @click.stop="handleEdit">编辑</a-button>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-checkbox key="4" v-model="printCostChecked">打印成本</a-checkbox>
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="storeTransferOutDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="storeTransferOutDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="调往对象名称">{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="店内调出单号">{{ (basicInfoData&&basicInfoData.storeCallOutNo) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调拨类型">{{ (basicInfoData&&basicInfoData.callOutTypeName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont">
-      <!-- 总计 -->
-      <a-alert type="info" showIcon style="margin-bottom:15px">
-        <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 995 }"
-        bordered>
-      </s-table>
-    </a-card>
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 995 }"
+          bordered>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -67,6 +69,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       // 表头
       // 表头
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
@@ -112,7 +115,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       storeCallOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType, costFlag: this.printCostChecked ? '1' : '0' }).then(res => {
       storeCallOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType, costFlag: this.printCostChecked ? '1' : '0' }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 180 - 167
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -1,185 +1,187 @@
 <template>
 <template>
   <div class="storeTransferOutEdit-wrap">
   <div class="storeTransferOutEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="storeTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">调往对象名称:{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</span>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="storeTransferOutEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="storeTransferOutEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 选择产品 -->
-    <a-card size="small" :bordered="false" class="storeTransferOutEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="选择产品">
-          <!-- 筛选条件 -->
-          <div class="table-page-search-wrapper">
-            <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-              <a-row :gutter="15">
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品编码" prop="productCode">
-                    <a-input id="storeTransferOutEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品名称" prop="productName">
-                    <a-input id="storeTransferOutEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="仓库">
-                    <a-select id="storeTransferOutEdit-warehouseSn" placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
-                      <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col>
-                <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="storeTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">调往对象名称:{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="storeTransferOutEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="storeTransferOutEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 选择产品 -->
+      <a-card size="small" :bordered="false" class="storeTransferOutEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="选择产品">
+            <!-- 筛选条件 -->
+            <div class="table-page-search-wrapper">
+              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+                <a-row :gutter="15">
                   <a-col :md="6" :sm="24">
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品分类">
-                      <a-cascader
-                        @change="changeProductType"
-                        change-on-select
-                        v-model="productType"
-                        expand-trigger="hover"
-                        :options="productTypeList"
-                        :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                        id="storeTransferOutEdit-productType"
-                        placeholder="请选择产品分类"
-                        allowClear />
+                    <a-form-item label="产品编码" prop="productCode">
+                      <a-input id="storeTransferOutEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="6" :sm="24">
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品品牌">
-                      <a-select
-                        placeholder="请选择产品品牌"
-                        id="storeTransferOutEdit-brandSn"
-                        allowClear
-                        v-model="queryParam.brandSn"
-                        :showSearch="true"
-                        option-filter-prop="children"
-                        :filter-option="filterOption">
-                        <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                    <a-form-item label="产品名称" prop="productName">
+                      <a-input id="storeTransferOutEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="仓库">
+                      <a-select id="storeTransferOutEdit-warehouseSn" placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
+                        <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
-                </template>
-                <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
-                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
-                  <a @click="advanced=!advanced" style="margin-left: 8px">
-                    {{ advanced ? '收起' : '展开' }}
-                    <a-icon :type="advanced ? 'up' : 'down'"/>
-                  </a>
-                </a-col>
-              </a-row>
-            </a-form>
-          </div>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
-            :columns="columns"
-            :customRow="handleClickRow"
-            :data="loadData"
-            :scroll="{ x: 1180, y: 300 }"
-            :defaultLoadData="false"
-            bordered>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="storeTransferOutEdit-add-btn">添加</a-button>
-            </template>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="storeTransferOutEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="已选产品">
-          <!-- 总计 -->
-          <a-alert type="info" showIcon style="margin-bottom:15px">
-            <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
-          </a-alert>
-          <!-- 筛选条件 -->
-          <a-row :gutter="15">
-            <a-col :span="20">
-              <div class="table-page-search-wrapper">
-                <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
-                  <a-row :gutter="15">
+                  <template v-if="advanced">
                     <a-col :md="6" :sm="24">
                     <a-col :md="6" :sm="24">
-                      <a-form-item label="产品编码" prop="productCode">
-                        <a-input id="storeTransferOutEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                      <a-form-item label="产品分类">
+                        <a-cascader
+                          @change="changeProductType"
+                          change-on-select
+                          v-model="productType"
+                          expand-trigger="hover"
+                          :options="productTypeList"
+                          :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                          id="storeTransferOutEdit-productType"
+                          placeholder="请选择产品分类"
+                          allowClear />
                       </a-form-item>
                       </a-form-item>
                     </a-col>
                     </a-col>
                     <a-col :md="6" :sm="24">
                     <a-col :md="6" :sm="24">
-                      <a-form-item label="产品名称" prop="productName">
-                        <a-input id="storeTransferOutEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                      <a-form-item label="产品品牌">
+                        <a-select
+                          placeholder="请选择产品品牌"
+                          id="storeTransferOutEdit-brandSn"
+                          allowClear
+                          v-model="queryParam.brandSn"
+                          :showSearch="true"
+                          option-filter-prop="children"
+                          :filter-option="filterOption">
+                          <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                        </a-select>
                       </a-form-item>
                       </a-form-item>
                     </a-col>
                     </a-col>
-                    <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-                      <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
-                      <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
-                    </a-col>
-                  </a-row>
-                </a-form>
-              </div>
-            </a-col>
-            <a-col :span="4" style="text-align: right;">
-              <a-button size="small" id="storeTransferOutEdit-import-btn">导入明细</a-button>
-            </a-col>
-          </a-row>
-          <!-- 列表 -->
-          <a-table
-            class="sTable"
-            ref="chooseTable"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="chooseColumns"
-            :dataSource="chooseLoadData"
-            :scroll="{ x: 1335, y: 300 }"
-            :pagination="choosePaginationProps"
-            bordered>
-            <!-- 调出数量 -->
-            <template slot="outQty" slot-scope="text, record">
-              <a-input-number
-                id="storeTransferOutEdit-outQty"
-                v-model="record.outQty"
-                :precision="0"
-                :min="1"
-                :max="999999"
-                placeholder="请输入"
-                @blur="e => outQtyBlur(e.target.value, record)"
-                style="width: 100%;" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="storeTransferOutEdit-del-btn">删除</a-button>
-            </template>
-          </a-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="storeTransferOutEdit-submit"
-          size="large"
-          class="button-primary"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+                  </template>
+                  <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
+                    <a @click="advanced=!advanced" style="margin-left: 8px">
+                      {{ advanced ? '收起' : '展开' }}
+                      <a-icon :type="advanced ? 'up' : 'down'"/>
+                    </a>
+                  </a-col>
+                </a-row>
+              </a-form>
+            </div>
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
+              :columns="columns"
+              :customRow="handleClickRow"
+              :data="loadData"
+              :scroll="{ x: 1180, y: 300 }"
+              :defaultLoadData="false"
+              bordered>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="storeTransferOutEdit-add-btn">添加</a-button>
+              </template>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 已选产品 -->
+      <a-card size="small" :bordered="false" class="storeTransferOutEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="已选产品">
+            <!-- 总计 -->
+            <a-alert type="info" showIcon style="margin-bottom:15px">
+              <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+            </a-alert>
+            <!-- 筛选条件 -->
+            <a-row :gutter="15">
+              <a-col :span="20">
+                <div class="table-page-search-wrapper">
+                  <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
+                    <a-row :gutter="15">
+                      <a-col :md="6" :sm="24">
+                        <a-form-item label="产品编码" prop="productCode">
+                          <a-input id="storeTransferOutEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                        </a-form-item>
+                      </a-col>
+                      <a-col :md="6" :sm="24">
+                        <a-form-item label="产品名称" prop="productName">
+                          <a-input id="storeTransferOutEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                        </a-form-item>
+                      </a-col>
+                      <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                        <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
+                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-form>
+                </div>
+              </a-col>
+              <a-col :span="4" style="text-align: right;">
+                <a-button size="small" id="storeTransferOutEdit-import-btn">导入明细</a-button>
+              </a-col>
+            </a-row>
+            <!-- 列表 -->
+            <a-table
+              class="sTable"
+              ref="chooseTable"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="chooseColumns"
+              :dataSource="chooseLoadData"
+              :scroll="{ x: 1335, y: 300 }"
+              :pagination="choosePaginationProps"
+              bordered>
+              <!-- 调出数量 -->
+              <template slot="outQty" slot-scope="text, record">
+                <a-input-number
+                  id="storeTransferOutEdit-outQty"
+                  v-model="record.outQty"
+                  :precision="0"
+                  :min="1"
+                  :max="999999"
+                  placeholder="请输入"
+                  @blur="e => outQtyBlur(e.target.value, record)"
+                  style="width: 100%;" />
+              </template>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="storeTransferOutEdit-del-btn">删除</a-button>
+              </template>
+            </a-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            id="storeTransferOutEdit-submit"
+            size="large"
+            class="button-primary"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -197,6 +199,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       queryParam: {
       queryParam: {
         productCode: '',
         productCode: '',
         productName: '',
         productName: '',
@@ -286,7 +289,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       storeCallOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType, costFlag: '0' }).then(res => {
       storeCallOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType, costFlag: '0' }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {
@@ -369,11 +374,15 @@ export default {
           return
           return
         }
         }
       }
       }
+      this.spinning = true
       storeCallOutDetailSave(params).then(res => {
       storeCallOutDetailSave(params).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           this.$refs.table.refresh()
           this.$refs.table.refresh()
           this.getChooseProductList()
           this.getChooseProductList()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -398,12 +407,16 @@ export default {
     //  提交
     //  提交
     handleSubmit () {
     handleSubmit () {
       const _this = this
       const _this = this
+      _this.spinning = true
       storeCallOutSubmit({ id: this.$route.params.id }).then(res => {
       storeCallOutSubmit({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           setTimeout(() => {
           setTimeout(() => {
             _this.handleBack()
             _this.handleBack()
+            _this.spinning = false
           }, 1000)
           }, 1000)
+        } else {
+          _this.spinning = false
         }
         }
       })
       })
     },
     },

+ 50 - 44
src/views/allocationManagement/warehouseAllocation/basicInfoModal.vue

@@ -8,38 +8,40 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow = false"
     @cancle="isShow = false"
     :width="800">
     :width="800">
-    <a-form-model
-      id="warehouseAllocation-basicInfo-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol" >
-      <a-form-model-item required label="调出仓库" prop="outWarehouseSn">
-        <a-select id="warehouseAllocation-basicInfo-outWarehouseSn" allowClear placeholder="请选择调出仓库" v-model="form.outWarehouseSn" >
-          <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">
-            {{ item.name }}
-          </a-select-option>
-        </a-select>
-      </a-form-model-item>
-      <a-form-model-item required label="调入仓库" prop="putWarehouseSn">
-        <a-select id="warehouseAllocation-basicInfo-putWarehouseSn" allowClear placeholder="请选择调入仓库" v-model="form.putWarehouseSn" >
-          <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">
-            {{ item.name }}
-          </a-select-option>
-        </a-select>
-      </a-form-model-item>
-      <a-form-model-item label="关联单号" prop="relevanceNo">
-        <a-input id="warehouseAllocation-basicInfo-relevanceNo" :maxLength="50" v-model="form.relevanceNo" placeholder="请输入关联单号(最多50个字符)" allowClear />
-      </a-form-model-item>
-      <a-form-model-item label="备注" prop="remark">
-        <a-textarea id="warehouseAllocation-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="warehouseAllocation-basicInfo-modal-save" @click="handleSave">保存</a-button>
-      <a-button id="warehouseAllocation-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="warehouseAllocation-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol" >
+        <a-form-model-item required label="调出仓库" prop="outWarehouseSn">
+          <a-select id="warehouseAllocation-basicInfo-outWarehouseSn" allowClear placeholder="请选择调出仓库" v-model="form.outWarehouseSn" >
+            <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">
+              {{ item.name }}
+            </a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item required label="调入仓库" prop="putWarehouseSn">
+          <a-select id="warehouseAllocation-basicInfo-putWarehouseSn" allowClear placeholder="请选择调入仓库" v-model="form.putWarehouseSn" >
+            <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">
+              {{ item.name }}
+            </a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="关联单号" prop="relevanceNo">
+          <a-input id="warehouseAllocation-basicInfo-relevanceNo" :maxLength="50" v-model="form.relevanceNo" placeholder="请输入关联单号(最多50个字符)" allowClear />
+        </a-form-model-item>
+        <a-form-model-item label="备注" prop="remark">
+          <a-textarea id="warehouseAllocation-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="warehouseAllocation-basicInfo-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="warehouseAllocation-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -73,6 +75,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 4 },
         labelCol: { span: 4 },
@@ -88,7 +91,7 @@ export default {
         putWarehouseSn: [{ required: true, message: '请选择调入仓库', trigger: 'blur' }],
         putWarehouseSn: [{ required: true, message: '请选择调入仓库', trigger: 'blur' }],
         outWarehouseSn: [{ required: true, message: '请选择调出仓库', trigger: 'blur' }]
         outWarehouseSn: [{ required: true, message: '请选择调出仓库', trigger: 'blur' }]
       },
       },
-	  warehouseList: [], // 仓库列表
+      warehouseList: [], // 仓库列表
       brandData: [] //  供应商  下拉数据
       brandData: [] //  供应商  下拉数据
     }
     }
   },
   },
@@ -96,7 +99,6 @@ export default {
     // 获取仓库列表
     // 获取仓库列表
     getWarehouseList () {
     getWarehouseList () {
       warehouseAllList({}).then(res => {
       warehouseAllList({}).then(res => {
-		  console.log(res, '-----仓库----')
         if (res.status == 200) {
         if (res.status == 200) {
           this.warehouseList = res.data || []
           this.warehouseList = res.data || []
         } else {
         } else {
@@ -106,19 +108,23 @@ export default {
     },
     },
     //  保存
     //  保存
     handleSave () {
     handleSave () {
-	  this.$refs['ruleForm'].validate(valid => {
+      this.$refs['ruleForm'].validate(valid => {
         if (valid) {
         if (valid) {
-		  allocWarehouseSave(this.form).then(res => {
-		    if (res.status == 200) {
-		      this.isShow = false
-		      this.$emit('ok', res.data)
-		    }
-		  })
+          this.spinning = true
+          allocWarehouseSave(this.form).then(res => {
+            if (res.status == 200) {
+              this.isShow = false
+              this.$emit('ok', res.data)
+              this.spinning = false
+            } else {
+              this.spinning = false
+            }
+          })
         } else {
         } else {
-		  console.log('error submit!!')
-		  return false
+          console.log('error submit!!')
+          return false
         }
         }
-	  })
+      })
     },
     },
     filterOption (input, option) {
     filterOption (input, option) {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 1 - 1
src/views/allocationManagement/warehouseAllocation/detail.vue

@@ -91,7 +91,7 @@ export default {
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '类别', scopedSlots: { customRender: 'productType' }, width: 160, align: 'center' },
         { title: '类别', scopedSlots: { customRender: 'productType' }, width: 160, align: 'center' },
         { title: '数量', dataIndex: 'allocationQty', width: 100, align: 'center' },
         { title: '数量', dataIndex: 'allocationQty', width: 100, align: 'center' },

+ 219 - 208
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -1,227 +1,229 @@
 <template>
 <template>
   <div class="warehouseAllocationEdit-wrap">
   <div class="warehouseAllocationEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="warehouseAllocationEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="warehouseAllocationEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">调出仓库:{{ (basicInfoData&&basicInfoData.outWarehouseName) || '--' }}</span>
-        <span style="margin: 0 15px;color: #666;">调入仓库:{{ (basicInfoData&&basicInfoData.putWarehouseName) || '--' }}</span>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="2" id="warehouseAllocationEdit-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="warehouseAllocationEdit-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
-    <!-- 选择产品 -->
-    <a-card size="small" :bordered="false" class="warehouseAllocationEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="选择产品">
-          <!-- 筛选条件 -->
-          <div class="table-page-search-wrapper">
-            <a-form layout="inline" @keyup.enter.native="getProductList(1)">
-              <a-row :gutter="15">
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品编码" prop="productCode">
-                    <a-input id="warehouseAllocationEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品名称" prop="productName">
-                    <a-input id="warehouseAllocationEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="原厂编码" prop="productOrigCode">
-                    <a-input id="warehouseAllocationEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
-                  </a-form-item>
-                </a-col>
-                <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="warehouseAllocationEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="warehouseAllocationEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">调出仓库:{{ (basicInfoData&&basicInfoData.outWarehouseName) || '--' }}</span>
+          <span style="margin: 0 15px;color: #666;">调入仓库:{{ (basicInfoData&&basicInfoData.putWarehouseName) || '--' }}</span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <!-- <template slot="extra">
+          <a-button key="2" id="warehouseAllocationEdit-preview-btn">打印预览</a-button>
+          <a-button key="1" type="primary" id="warehouseAllocationEdit-print-btn">快速打印</a-button>
+        </template> -->
+      </a-page-header>
+      <!-- 选择产品 -->
+      <a-card size="small" :bordered="false" class="warehouseAllocationEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="选择产品">
+            <!-- 筛选条件 -->
+            <div class="table-page-search-wrapper">
+              <a-form layout="inline" @keyup.enter.native="getProductList(1)">
+                <a-row :gutter="15">
                   <a-col :md="6" :sm="24">
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品品牌">
-                      <a-select
-                        placeholder="请选择产品品牌"
-                        id="warehouseAllocationEdit-brandSn"
-                        allowClear
-                        v-model="queryParam.brandSn"
-                        :showSearch="true"
-                        option-filter-prop="children"
-                        :filter-option="filterOption">
-                        <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                      </a-select>
+                    <a-form-item label="产品编码" prop="productCode">
+                      <a-input id="warehouseAllocationEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="6" :sm="24">
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品分类">
-                      <a-cascader
-                        @change="changeProductType"
-                        change-on-select
-                        v-model="productType"
-                        expand-trigger="hover"
-                        :options="productTypeList"
-                        :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                        id="warehouseAllocationEdit-productType"
-                        placeholder="请选择产品分类"
-                        allowClear />
+                    <a-form-item label="产品名称" prop="productName">
+                      <a-input id="warehouseAllocationEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="6" :sm="24">
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="调出仓位" prop="warehouseLocationSn">
-                      <a-select id="warehouseAllocationEdit-warehouseLocationSn" placeholder="请选择" allowClear v-model="queryParam.warehouseLocationSn" style="width: 100%;">
-                        <a-select-option v-for="item in warehouseOutLocData" :key="item.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
-                      </a-select>
+                    <a-form-item label="原厂编码" prop="productOrigCode">
+                      <a-input id="warehouseAllocationEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
-                </template>
-                <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-                  <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="warehouseAllocationList-refresh">查询</a-button>
-                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationList-reset">重置</a-button>
-                  <a @click="advanced=!advanced" style="margin-left: 8px">
-                    {{ advanced ? '收起' : '展开' }}
-                    <a-icon :type="advanced ? 'up' : 'down'"/>
-                  </a>
-                </a-col>
-              </a-row>
-            </a-form>
-          </div>
-          <!-- 列表 -->
-          <a-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
-            :columns="columns"
-            :customRow="handleClickRow"
-            :dataSource="loadData"
-            :scroll="{ x: 1880, y: 300 }"
-            :pagination="paginationProps"
-            bordered>
-            <!-- 产品分类 -->
-            <template slot="productType" slot-scope="text, record">
-              <span v-if="record.dealerProduct.productTypeName2 || record.dealerProduct.productTypeName3">{{ record.dealerProduct.productTypeName2 }} {{ record.dealerProduct.productTypeName3 ? '>' : '' }} {{ record.dealerProduct.productTypeName3 }}</span>
-              <span v-else>--</span>
-            </template>
-            <!-- 调入仓位 -->
-            <template slot="putWarehouseLocationSn" slot-scope="text, record">
-              <a-select id="warehouseAllocationEdit-putWarehouseLocationSn" placeholder="请选择" v-model="record.putWarehouseLocationSn" style="width: 100%;">
-                <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </template>
-            <!-- 调出数量 -->
-            <template slot="outQty" slot-scope="text, record">
-              <a-input-number
-                id="warehouseAllocationEdit-outQty"
-                v-model="record.outQty"
-                :precision="0"
-                :min="1"
-                :max="record.currentQty"
-                placeholder="请输入"
-                style="width: 100%;" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="warehouseAllocationEdit-add-btn">添加</a-button>
-            </template>
-            </s-table>
-          </a-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="warehouseAllocationEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="已选产品">
-          <!-- 总计 -->
-          <a-alert type="info" showIcon style="margin-bottom:15px">
-            <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
-          </a-alert>
-          <!-- 筛选条件 -->
-          <a-row :gutter="15" justify="space-between">
-            <a-col :span="17">
-              <div class="table-page-search-wrapper">
-                <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
-                  <a-row :gutter="15">
-                    <a-col :md="9" :sm="24">
-                      <a-form-item label="产品编码" prop="productCode">
-                        <a-input id="warehouseAllocationEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                  <template v-if="advanced">
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="产品品牌">
+                        <a-select
+                          placeholder="请选择产品品牌"
+                          id="warehouseAllocationEdit-brandSn"
+                          allowClear
+                          v-model="queryParam.brandSn"
+                          :showSearch="true"
+                          option-filter-prop="children"
+                          :filter-option="filterOption">
+                          <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                        </a-select>
                       </a-form-item>
                       </a-form-item>
                     </a-col>
                     </a-col>
-                    <a-col :md="9" :sm="24">
-                      <a-form-item label="产品名称" prop="productName">
-                        <a-input id="warehouseAllocationEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="产品分类">
+                        <a-cascader
+                          @change="changeProductType"
+                          change-on-select
+                          v-model="productType"
+                          expand-trigger="hover"
+                          :options="productTypeList"
+                          :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                          id="warehouseAllocationEdit-productType"
+                          placeholder="请选择产品分类"
+                          allowClear />
                       </a-form-item>
                       </a-form-item>
                     </a-col>
                     </a-col>
-                    <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-                      <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="warehouseAllocationList-refresh">查询</a-button>
-                      <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="warehouseAllocationList-reset">重置</a-button>
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="调出仓位" prop="warehouseLocationSn">
+                        <a-select id="warehouseAllocationEdit-warehouseLocationSn" placeholder="请选择" allowClear v-model="queryParam.warehouseLocationSn" style="width: 100%;">
+                          <a-select-option v-for="item in warehouseOutLocData" :key="item.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                        </a-select>
+                      </a-form-item>
                     </a-col>
                     </a-col>
-                  </a-row>
-                </a-form>
-              </div>
-            </a-col>
-            <a-col :span="7">
-              <a-button size="small" style="margin-left: 8px" id="chainTransferOutEdit-import-btn">导入明细</a-button>
-              <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="warehouseAllocationEdit-del-all-btn">整单删除</a-button>
-            </a-col>
-          </a-row>
-          <!-- 列表 -->
-          <a-table
-            class="sTable"
-            ref="chooseTable"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="chooseColumns"
-            :dataSource="chooseLoadData"
-            :scroll="{ x: 1680, y: 300 }"
-            :pagination="choosePaginationProps"
-            bordered>
-            <!-- 产品分类 -->
-            <template slot="productType" slot-scope="text, record">
-              <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
-              <span v-else>--</span>
-            </template>
-            <!-- 调入仓位 -->
-            <template slot="putWarehouseLocationSn" slot-scope="text, record">
-              <a-select
-                id="warehouseAllocationEdit-putWarehouseLocationSn"
-                @change="chooseWarehouseLocChange(record)"
-                placeholder="请选择"
-                v-model="record.putWarehouseLocationSn"
-                style="width: 100%;">
-                <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.outWarehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </template>
-            <!-- 调出数量 -->
-            <template slot="outQty" slot-scope="text, record">
-              <a-input-number
-                id="warehouseAllocationEdit-outQty"
-                v-model="record.outQty"
-                :precision="0"
-                :min="1"
-                :max="999999"
-                placeholder="请输入"
-                @blur="e => outQtyBlur(e.target.value, record)"
-                style="width: 100%;" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="warehouseAllocationEdit-del-btn">删除</a-button>
-            </template>
-          </a-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="warehouseAllocationEdit-submit"
-          size="large"
-          class="button-primary"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+                  </template>
+                  <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                    <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="warehouseAllocationList-refresh">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationList-reset">重置</a-button>
+                    <a @click="advanced=!advanced" style="margin-left: 8px">
+                      {{ advanced ? '收起' : '展开' }}
+                      <a-icon :type="advanced ? 'up' : 'down'"/>
+                    </a>
+                  </a-col>
+                </a-row>
+              </a-form>
+            </div>
+            <!-- 列表 -->
+            <a-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
+              :columns="columns"
+              :customRow="handleClickRow"
+              :dataSource="loadData"
+              :scroll="{ x: 1880, y: 300 }"
+              :pagination="paginationProps"
+              bordered>
+              <!-- 产品分类 -->
+              <template slot="productType" slot-scope="text, record">
+                <span v-if="record.dealerProduct.productTypeName2 || record.dealerProduct.productTypeName3">{{ record.dealerProduct.productTypeName2 }} {{ record.dealerProduct.productTypeName3 ? '>' : '' }} {{ record.dealerProduct.productTypeName3 }}</span>
+                <span v-else>--</span>
+              </template>
+              <!-- 调入仓位 -->
+              <template slot="putWarehouseLocationSn" slot-scope="text, record">
+                <a-select id="warehouseAllocationEdit-putWarehouseLocationSn" placeholder="请选择" v-model="record.putWarehouseLocationSn" style="width: 100%;">
+                  <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </template>
+              <!-- 调出数量 -->
+              <template slot="outQty" slot-scope="text, record">
+                <a-input-number
+                  id="warehouseAllocationEdit-outQty"
+                  v-model="record.outQty"
+                  :precision="0"
+                  :min="1"
+                  :max="record.currentQty"
+                  placeholder="请输入"
+                  style="width: 100%;" />
+              </template>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="warehouseAllocationEdit-add-btn">添加</a-button>
+              </template>
+              </s-table>
+            </a-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 已选产品 -->
+      <a-card size="small" :bordered="false" class="warehouseAllocationEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="已选产品">
+            <!-- 总计 -->
+            <a-alert type="info" showIcon style="margin-bottom:15px">
+              <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+            </a-alert>
+            <!-- 筛选条件 -->
+            <a-row :gutter="15" justify="space-between">
+              <a-col :span="17">
+                <div class="table-page-search-wrapper">
+                  <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
+                    <a-row :gutter="15">
+                      <a-col :md="9" :sm="24">
+                        <a-form-item label="产品编码" prop="productCode">
+                          <a-input id="warehouseAllocationEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                        </a-form-item>
+                      </a-col>
+                      <a-col :md="9" :sm="24">
+                        <a-form-item label="产品名称" prop="productName">
+                          <a-input id="warehouseAllocationEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                        </a-form-item>
+                      </a-col>
+                      <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                        <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="warehouseAllocationList-refresh">查询</a-button>
+                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="warehouseAllocationList-reset">重置</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-form>
+                </div>
+              </a-col>
+              <a-col :span="7">
+                <a-button size="small" style="margin-left: 8px" id="chainTransferOutEdit-import-btn">导入明细</a-button>
+                <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="warehouseAllocationEdit-del-all-btn">整单删除</a-button>
+              </a-col>
+            </a-row>
+            <!-- 列表 -->
+            <a-table
+              class="sTable"
+              ref="chooseTable"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="chooseColumns"
+              :dataSource="chooseLoadData"
+              :scroll="{ x: 1680, y: 300 }"
+              :pagination="choosePaginationProps"
+              bordered>
+              <!-- 产品分类 -->
+              <template slot="productType" slot-scope="text, record">
+                <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+                <span v-else>--</span>
+              </template>
+              <!-- 调入仓位 -->
+              <template slot="putWarehouseLocationSn" slot-scope="text, record">
+                <a-select
+                  id="warehouseAllocationEdit-putWarehouseLocationSn"
+                  @change="chooseWarehouseLocChange(record)"
+                  placeholder="请选择"
+                  v-model="record.putWarehouseLocationSn"
+                  style="width: 100%;">
+                  <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.outWarehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </template>
+              <!-- 调出数量 -->
+              <template slot="outQty" slot-scope="text, record">
+                <a-input-number
+                  id="warehouseAllocationEdit-outQty"
+                  v-model="record.outQty"
+                  :precision="0"
+                  :min="1"
+                  :max="999999"
+                  placeholder="请输入"
+                  @blur="e => outQtyBlur(e.target.value, record)"
+                  style="width: 100%;" />
+              </template>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="warehouseAllocationEdit-del-btn">删除</a-button>
+              </template>
+            </a-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            id="warehouseAllocationEdit-submit"
+            size="large"
+            class="button-primary"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -236,6 +238,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       queryParam: {
       queryParam: {
         productCode: '',
         productCode: '',
         productName: '',
         productName: '',
@@ -395,11 +398,15 @@ export default {
           return
           return
         }
         }
       }
       }
+      this.spinning = true
       allocWarehouseDetailSave(params).then(res => {
       allocWarehouseDetailSave(params).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           this.getProductList()
           this.getProductList()
           this.getChooseProductList()
           this.getChooseProductList()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -431,12 +438,16 @@ export default {
     //  提交
     //  提交
     handleSubmit () {
     handleSubmit () {
       const _this = this
       const _this = this
+      _this.spinning = true
       allocWarehouseSubmit({ id: this.$route.params.id }).then(res => {
       allocWarehouseSubmit({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           setTimeout(() => {
           setTimeout(() => {
             _this.handleBack()
             _this.handleBack()
+            _this.spinning = false
           }, 1000)
           }, 1000)
+        } else {
+          _this.spinning = false
         }
         }
       })
       })
     },
     },

+ 31 - 24
src/views/basicData/bulkPartsTypeManagement/editModal.vue

@@ -8,31 +8,33 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="bulkPartsTypeEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="散件类型名称" prop="name">
-          <a-input
-            id="bulkPartsTypeEdit-name"
-            :maxLength="30"
-            v-model.trim="form.name"
-            @change="filterEmpty"
-            placeholder="请输入散件类型名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="bulkParts-type-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="bulkParts-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="bulkPartsTypeEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="散件类型名称" prop="name">
+            <a-input
+              id="bulkPartsTypeEdit-name"
+              :maxLength="30"
+              v-model.trim="form.name"
+              @change="filterEmpty"
+              placeholder="请输入散件类型名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="bulkParts-type-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="bulkParts-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -63,6 +65,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       detailsData: null, //  品牌数据
       detailsData: null, //  品牌数据
       formItemLayout: {
       formItemLayout: {
@@ -94,10 +97,14 @@ export default {
         if (valid) {
         if (valid) {
           const form = _this.form
           const form = _this.form
           form.id = _this.itemId ? _this.itemId : null
           form.id = _this.itemId ? _this.itemId : null
+          _this.spinning = true
           sparePartsPutTypeSave(form).then(res => {
           sparePartsPutTypeSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.isShow = false
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 31 - 24
src/views/basicData/customerTypeManagement/editModal.vue

@@ -8,31 +8,33 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="customerTypeEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="客户类型名称" prop="name">
-          <a-input
-            id="customerTypeEdit-name"
-            :maxLength="30"
-            v-model.trim="form.name"
-            @change="filterEmpty"
-            placeholder="请输入客户类型名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="customer-type-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="customer-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="customerTypeEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="客户类型名称" prop="name">
+            <a-input
+              id="customerTypeEdit-name"
+              :maxLength="30"
+              v-model.trim="form.name"
+              @change="filterEmpty"
+              placeholder="请输入客户类型名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="customer-type-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="customer-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -63,6 +65,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       detailsData: null, //  品牌数据
       detailsData: null, //  品牌数据
       formItemLayout: {
       formItemLayout: {
@@ -94,10 +97,14 @@ export default {
         if (valid) {
         if (valid) {
           const form = _this.form
           const form = _this.form
           form.id = _this.itemId ? _this.itemId : null
           form.id = _this.itemId ? _this.itemId : null
+          _this.spinning = true
           custTypeSave(form).then(res => {
           custTypeSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.isShow = false
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 34 - 27
src/views/basicData/expenseType/editModal.vue

@@ -8,34 +8,36 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="expenseTypeEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="所属类别" v-if="parentType">
-          {{ parentType }}
-        </a-form-model-item>
-        <a-form-model-item label="费用类型名称" prop="name">
-          <a-input
-            v-model.trim="form.name"
-            @change="filterEmpty"
-            id="expenseTypeEdit-name"
-            :maxLength="30"
-            allowClear
-            placeholder="请输入费用类型名称(最多30个字符)" />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="expenseTypeEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="所属类别" v-if="parentType">
+            {{ parentType }}
+          </a-form-model-item>
+          <a-form-model-item label="费用类型名称" prop="name">
+            <a-input
+              v-model.trim="form.name"
+              @change="filterEmpty"
+              id="expenseTypeEdit-name"
+              :maxLength="30"
+              allowClear
+              placeholder="请输入费用类型名称(最多30个字符)" />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -66,6 +68,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 6 },
         labelCol: { span: 6 },
@@ -99,11 +102,15 @@ export default {
           const formData = JSON.parse(JSON.stringify(_this.form))
           const formData = JSON.parse(JSON.stringify(_this.form))
           formData.id = _this.itemId ? _this.itemId : undefined
           formData.id = _this.itemId ? _this.itemId : undefined
           formData.psn = _this.nowData && _this.nowData.psn ? _this.nowData.psn : undefined
           formData.psn = _this.nowData && _this.nowData.psn ? _this.nowData.psn : undefined
+          _this.spinning = true
           costTypeSave(formData).then(res => {
           costTypeSave(formData).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.$emit('ok')
               _this.isShow = false
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 31 - 24
src/views/basicData/storeTransferOutTypeManagement/editModal.vue

@@ -8,31 +8,33 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="storeTransferOutTypeEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="店内调出类型名称" prop="name">
-          <a-input
-            id="storeTransferOutTypeEdit-name"
-            :maxLength="30"
-            v-model.trim="form.name"
-            @change="filterEmpty"
-            placeholder="请输入店内调出类型名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="storeTransferOut-type-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="storeTransferOut-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="storeTransferOutTypeEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="店内调出类型名称" prop="name">
+            <a-input
+              id="storeTransferOutTypeEdit-name"
+              :maxLength="30"
+              v-model.trim="form.name"
+              @change="filterEmpty"
+              placeholder="请输入店内调出类型名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="storeTransferOut-type-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="storeTransferOut-type-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -63,6 +65,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       detailsData: null, //  品牌数据
       detailsData: null, //  品牌数据
       formItemLayout: {
       formItemLayout: {
@@ -94,10 +97,14 @@ export default {
         if (valid) {
         if (valid) {
           const form = _this.form
           const form = _this.form
           form.id = _this.itemId ? _this.itemId : null
           form.id = _this.itemId ? _this.itemId : null
+          _this.spinning = true
           storeCallOutTypeSave(form).then(res => {
           storeCallOutTypeSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.isShow = false
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 25 - 18
src/views/bulkManagement/bulkWarehousingOrder/basicInfoModal.vue

@@ -8,14 +8,15 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <a-form-model
-      id="bulkWarehousingOrder-basicInfo-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol" >
-      <a-form-model-item label="供应商" prop="supplierSn">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="bulkWarehousingOrder-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol" >
+        <a-form-model-item label="供应商" prop="supplierSn">
         <a-select
         <a-select
           placeholder="请输入名称查询,如果没有请点击 '+' 新增"
           placeholder="请输入名称查询,如果没有请点击 '+' 新增"
           allowClear
           allowClear
@@ -27,25 +28,26 @@
           <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn" :disabled="item.enabledFlag==0">{{ item.supplierName }}</a-select-option>
           <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn" :disabled="item.enabledFlag==0">{{ item.supplierName }}</a-select-option>
         </a-select>
         </a-select>
         <a-button icon="plus" size="small" @click="openSupplierModal=true" id="bulkWarehousingOrder-basicInfo-add-btn" style="margin-left: 10px;"></a-button>
         <a-button icon="plus" size="small" @click="openSupplierModal=true" id="bulkWarehousingOrder-basicInfo-add-btn" style="margin-left: 10px;"></a-button>
-      </a-form-model-item>
-      <a-form-model-item label="散件入库类型" prop="sparePartsType">
+        </a-form-model-item>
+        <a-form-model-item label="散件入库类型" prop="sparePartsType">
         <a-select id="bulkWarehousingOrder-basicInfo-sparePartsType" placeholder="请选择散件入库类型" allowClear v-model="form.sparePartsType">
         <a-select id="bulkWarehousingOrder-basicInfo-sparePartsType" placeholder="请选择散件入库类型" allowClear v-model="form.sparePartsType">
           <a-select-option v-for="item in sparePartsPutTypeList" :key="item.sparePartsPutTypeSn" :value="item.sparePartsPutTypeSn">{{ item.name }}</a-select-option>
           <a-select-option v-for="item in sparePartsPutTypeList" :key="item.sparePartsPutTypeSn" :value="item.sparePartsPutTypeSn">{{ item.name }}</a-select-option>
         </a-select>
         </a-select>
-      </a-form-model-item>
-      <a-form-model-item label="备注" prop="remarks">
+        </a-form-model-item>
+        <a-form-model-item label="备注" prop="remarks">
         <a-textarea
         <a-textarea
           id="bulkWarehousingOrder-remarks"
           id="bulkWarehousingOrder-remarks"
           :maxLength="200"
           :maxLength="200"
           v-model="form.remarks"
           v-model="form.remarks"
           placeholder="请输入备注(最多200个字符)"
           placeholder="请输入备注(最多200个字符)"
           allowClear />
           allowClear />
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="bulkWarehousingOrder-basicInfo-modal-save" @click="handleSave">保存</a-button>
-      <a-button id="bulkWarehousingOrder-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="bulkWarehousingOrder-basicInfo-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="bulkWarehousingOrder-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
     <!-- 供应商 -->
     <!-- 供应商 -->
     <supplier-info-edit-modal :openModal="openSupplierModal" @close="closeSupplierModal" @ok="handleOk" :isState="false" />
     <supplier-info-edit-modal :openModal="openSupplierModal" @close="closeSupplierModal" @ok="handleOk" :isState="false" />
   </a-modal>
   </a-modal>
@@ -68,6 +70,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 4 },
         labelCol: { span: 4 },
@@ -98,13 +101,17 @@ export default {
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
           const form = JSON.parse(JSON.stringify(_this.form))
+          _this.spinning = true
           sparePartsPurSave(form).then(res => {
           sparePartsPurSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               setTimeout(() => {
               setTimeout(() => {
                 _this.isShow = false
                 _this.isShow = false
                 _this.$emit('ok', res.data)
                 _this.$emit('ok', res.data)
+                _this.spinning = false
               }, 1000)
               }, 1000)
+            }else{
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 92 - 87
src/views/bulkManagement/bulkWarehousingOrder/detail.vue

@@ -1,93 +1,95 @@
 <template>
 <template>
   <div class="bulkWarehousingOrderDetail-wrap">
   <div class="bulkWarehousingOrderDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="bulkWarehousingOrderDetail-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="bulkWarehousingOrderDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <a-button
-          v-if="isEdit"
-          type="primary"
-          size="small"
-          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
-          id="bulkWarehousingOrderDetail-edit-btn"
-          @click.stop="handleEdit">编辑</a-button>
-        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '--' }}</p>
-      </template>
-      <template slot="tags">
-        <a-tag color="red" v-if="basicInfoData&&basicInfoData.stateDictValue">{{ basicInfoData.stateDictValue }}</a-tag>
-        <a-tag color="orange" v-if="basicInfoData&&basicInfoData.settleStateDictValue">{{ basicInfoData.settleStateDictValue }}</a-tag>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="bulkWarehousingOrderDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="bulkWarehousingOrderDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="散件入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系人">
-              {{ (basicInfoData&&basicInfoData.supplierContactPerson) || '--' }}
-              <span v-if="basicInfoData&&basicInfoData.supplierContactTel">({{ basicInfoData.supplierContactTel }})</span>
-            </a-descriptions-item>
-            <a-descriptions-item label="联系地址">
-              {{ (basicInfoData&&basicInfoData.supplierProvinceName) || '' }}
-              {{ (basicInfoData&&basicInfoData.supplierCityName) || '' }}
-              {{ (basicInfoData&&basicInfoData.supplierCountyName) || '' }}
-              {{ (basicInfoData&&basicInfoData.supplierAddress) || '' }}
-            </a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 产品详情 -->
-    <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="产品详情">
-          <!-- 总计 -->
-          <a-alert type="info" showIcon style="margin-bottom:15px">
-            <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
-          </a-alert>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="bulkWarehousingOrderDetail-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="bulkWarehousingOrderDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a-button
+            v-if="isEdit"
+            type="primary"
             size="small"
             size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :scroll="{ x: 1180 }"
-            bordered>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 单据记录  二期 -->
-    <!-- <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="单据记录">
-          <a-timeline class="timeline-box">
-            <a-timeline-item>2021-02-01 15:22:38   王凯   审核通过</a-timeline-item>
-            <a-timeline-item>
-              <p>2021-02-01 15:22:38   王凯   审核通过</p>
-              <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
-              <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
-            </a-timeline-item>
-            <a-timeline-item>Technical testing 2015-09-01</a-timeline-item>
-            <a-timeline-item>Network problems being solved 2015-09-01</a-timeline-item>
-          </a-timeline>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card> -->
+            style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+            id="bulkWarehousingOrderDetail-edit-btn"
+            @click.stop="handleEdit">编辑</a-button>
+          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '--' }}</p>
+        </template>
+        <template slot="tags">
+          <a-tag color="red" v-if="basicInfoData&&basicInfoData.stateDictValue">{{ basicInfoData.stateDictValue }}</a-tag>
+          <a-tag color="orange" v-if="basicInfoData&&basicInfoData.settleStateDictValue">{{ basicInfoData.settleStateDictValue }}</a-tag>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="bulkWarehousingOrderDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="bulkWarehousingOrderDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="散件入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系人">
+                {{ (basicInfoData&&basicInfoData.supplierContactPerson) || '--' }}
+                <span v-if="basicInfoData&&basicInfoData.supplierContactTel">({{ basicInfoData.supplierContactTel }})</span>
+              </a-descriptions-item>
+              <a-descriptions-item label="联系地址">
+                {{ (basicInfoData&&basicInfoData.supplierProvinceName) || '' }}
+                {{ (basicInfoData&&basicInfoData.supplierCityName) || '' }}
+                {{ (basicInfoData&&basicInfoData.supplierCountyName) || '' }}
+                {{ (basicInfoData&&basicInfoData.supplierAddress) || '' }}
+              </a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 产品详情 -->
+      <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="产品详情">
+            <!-- 总计 -->
+            <a-alert type="info" showIcon style="margin-bottom:15px">
+              <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+            </a-alert>
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="columns"
+              :data="loadData"
+              :scroll="{ x: 1180 }"
+              bordered>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 单据记录  二期 -->
+      <!-- <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="单据记录">
+            <a-timeline class="timeline-box">
+              <a-timeline-item>2021-02-01 15:22:38   王凯   审核通过</a-timeline-item>
+              <a-timeline-item>
+                <p>2021-02-01 15:22:38   王凯   审核通过</p>
+                <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
+                <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
+              </a-timeline-item>
+              <a-timeline-item>Technical testing 2015-09-01</a-timeline-item>
+              <a-timeline-item>Network problems being solved 2015-09-01</a-timeline-item>
+            </a-timeline>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card> -->
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -101,6 +103,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       // 表头
       // 表头
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
@@ -148,7 +151,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       sparePartsPurDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       sparePartsPurDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 238 - 225
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -1,231 +1,233 @@
 <template>
 <template>
   <div class="bulkWarehousingOrderEdit-wrap">
   <div class="bulkWarehousingOrderEdit-wrap">
-    <!-- 内容 -->
-    <a-page-header :ghost="false" :backIcon="false" class="bulkWarehousingOrderEdit-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="bulkWarehousingOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '' }}</p>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="bulkWarehousingOrderEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="bulkWarehousingOrderEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            基础信息
-            <!-- <a-button type="primary" shape="circle" size="small" icon="edit" class="edit-circle-btn" id="bulkWarehousingOrderEdit-edit-circle-btn" @click.stop="handleEditInfo" /> -->
-          </template>
-          <a-descriptions :column="3">
-            <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="散件入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 选择产品 -->
-    <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            选择产品<span class="sub-title">①输入查询条件--->②查找到需要入库的配件--->③录入成本价、数量、仓库、仓位--->④点击“添加”</span>
-          </template>
-          <!-- 选择产品 -->
-          <div>
-            <!-- 搜索条件 -->
-            <div class="table-page-search-wrapper">
-              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                <a-row :gutter="15">
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="关键词">
-                      <a-input id="bulkWarehousingOrderEdit-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="产品名称/产品编码/原厂编码"/>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品品牌">
-                      <a-select
-                        placeholder="请选择产品品牌"
-                        id="bulkWarehousingOrderEdit-productBrandSn"
-                        allowClear
-                        v-model="queryParam.productBrandSn"
-                        :showSearch="true"
-                        option-filter-prop="children"
-                        :filter-option="filterOption">
-                        <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品分类">
-                      <a-cascader
-                        @change="changeProductType"
-                        change-on-select
-                        v-model="productType"
-                        expand-trigger="hover"
-                        :options="productTypeList"
-                        :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                        id="productInfoList-productType"
-                        placeholder="请选择产品分类"
-                        allowClear />
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-button style="margin-bottom: 18px;" type="primary" @click="getDealerProductList(1)" :disabled="disabled" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
-                    <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
-                  </a-col>
-                </a-row>
-              </a-form>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 内容 -->
+      <a-page-header :ghost="false" :backIcon="false" class="bulkWarehousingOrderEdit-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="bulkWarehousingOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '' }}</p>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="bulkWarehousingOrderEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="bulkWarehousingOrderEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1">
+            <template slot="header">
+              基础信息
+              <!-- <a-button type="primary" shape="circle" size="small" icon="edit" class="edit-circle-btn" id="bulkWarehousingOrderEdit-edit-circle-btn" @click.stop="handleEditInfo" /> -->
+            </template>
+            <a-descriptions :column="3">
+              <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="散件入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 选择产品 -->
+      <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1">
+            <template slot="header">
+              选择产品<span class="sub-title">①输入查询条件--->②查找到需要入库的配件--->③录入成本价、数量、仓库、仓位--->④点击“添加”</span>
+            </template>
+            <!-- 选择产品 -->
+            <div>
+              <!-- 搜索条件 -->
+              <div class="table-page-search-wrapper">
+                <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+                  <a-row :gutter="15">
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="关键词">
+                        <a-input id="bulkWarehousingOrderEdit-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="产品名称/产品编码/原厂编码"/>
+                      </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="产品品牌">
+                        <a-select
+                          placeholder="请选择产品品牌"
+                          id="bulkWarehousingOrderEdit-productBrandSn"
+                          allowClear
+                          v-model="queryParam.productBrandSn"
+                          :showSearch="true"
+                          option-filter-prop="children"
+                          :filter-option="filterOption">
+                          <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                        </a-select>
+                      </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="产品分类">
+                        <a-cascader
+                          @change="changeProductType"
+                          change-on-select
+                          v-model="productType"
+                          expand-trigger="hover"
+                          :options="productTypeList"
+                          :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                          id="productInfoList-productType"
+                          placeholder="请选择产品分类"
+                          allowClear />
+                      </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-button style="margin-bottom: 18px;" type="primary" @click="getDealerProductList(1)" :disabled="disabled" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
+                      <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
+                    </a-col>
+                  </a-row>
+                </a-form>
+              </div>
+              <!-- 列表 -->
+              <a-table
+                class="sTable"
+                ref="table"
+                size="small"
+                :rowKey="(record) => record.id"
+                :columns="columns"
+                :customRow="handleClickRow"
+                :dataSource="loadData"
+                :scroll="{ x: 1600, y: 300 }"
+                :pagination="paginationProps"
+                @change="onTableChange"
+                bordered>
+                <!-- 成本价 -->
+                <template slot="putCost" slot-scope="text, record">
+                  <a-input-number
+                    id="bulkWarehousingOrderEdit-putCost"
+                    v-model="record.putCost"
+                    :precision="2"
+                    :min="1"
+                    :max="999999"
+                    placeholder="请输入"
+                    style="width: 100%;" />
+                </template>
+                <!-- 数量 -->
+                <template slot="putQty" slot-scope="text, record">
+                  <a-input-number
+                    id="bulkWarehousingOrderEdit-putQty"
+                    v-model="record.putQty"
+                    :precision="0"
+                    :min="1"
+                    :max="999999"
+                    placeholder="请输入"
+                    style="width: 100%;" />
+                </template>
+                <!-- 仓库仓位 -->
+                <template slot="warehouse" slot-scope="text, record, index">
+                  <a-cascader
+                    @change="e => changeWarehouseCascade(e, record, index, 'dealerProduct')"
+                    v-model="record.warehouseCascade"
+                    expand-trigger="hover"
+                    :allowClear="false"
+                    :options="warehouseCascadeData"
+                    :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+                    id="bulkWarehousingOrderEdit-warehouseCascade"
+                    placeholder="请选择仓库仓位"
+                    style="width: 100%;" />
+                </template>
+                <!-- 操作 -->
+                <template slot="action" slot-scope="text, record">
+                  <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
+                </template>
+              </a-table>
             </div>
             </div>
-            <!-- 列表 -->
-            <a-table
-              class="sTable"
-              ref="table"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="columns"
-              :customRow="handleClickRow"
-              :dataSource="loadData"
-              :scroll="{ x: 1600, y: 300 }"
-              :pagination="paginationProps"
-              @change="onTableChange"
-              bordered>
-              <!-- 成本价 -->
-              <template slot="putCost" slot-scope="text, record">
-                <a-input-number
-                  id="bulkWarehousingOrderEdit-putCost"
-                  v-model="record.putCost"
-                  :precision="2"
-                  :min="1"
-                  :max="999999"
-                  placeholder="请输入"
-                  style="width: 100%;" />
-              </template>
-              <!-- 数量 -->
-              <template slot="putQty" slot-scope="text, record">
-                <a-input-number
-                  id="bulkWarehousingOrderEdit-putQty"
-                  v-model="record.putQty"
-                  :precision="0"
-                  :min="1"
-                  :max="999999"
-                  placeholder="请输入"
-                  style="width: 100%;" />
-              </template>
-              <!-- 仓库仓位 -->
-              <template slot="warehouse" slot-scope="text, record, index">
-                <a-cascader
-                  @change="e => changeWarehouseCascade(e, record, index, 'dealerProduct')"
-                  v-model="record.warehouseCascade"
-                  expand-trigger="hover"
-                  :allowClear="false"
-                  :options="warehouseCascadeData"
-                  :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-                  id="bulkWarehousingOrderEdit-warehouseCascade"
-                  placeholder="请选择仓库仓位"
-                  style="width: 100%;" />
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
-              </template>
-            </a-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            已选产品
-            <a-button size="small" class="import-btn" id="bulkWarehousingOrderEdit-import-btn" @click.stop="handleImport">导入明细</a-button>
-          </template>
-          <!-- 已选产品 -->
-          <div>
-            <!-- 总计 -->
-            <a-alert type="info" showIcon style="margin-bottom:15px">
-              <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
-            </a-alert>
-            <!-- 列表 -->
-            <a-table
-              class="sTable"
-              ref="chooseTable"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="chooseColumns"
-              :dataSource="chooseLoadData"
-              :scroll="{ x: 1700, y: 300 }"
-              :pagination="choosePaginationProps"
-              @change="onChooseTableChange"
-              bordered>
-              <!-- 成本价 -->
-              <template slot="putCost" slot-scope="text, record">
-                <a-input-number
-                  id="bulkWarehousingOrderEdit-choose-putCost"
-                  v-model="record.putCost"
-                  :precision="2"
-                  :min="1"
-                  :max="999999"
-                  placeholder="请输入"
-                  @blur="e => putCostBlur(e.target.value, record)"
-                  style="width: 100%;" />
-              </template>
-              <!-- 数量 -->
-              <template slot="putQty" slot-scope="text, record">
-                <a-input-number
-                  id="bulkWarehousingOrderEdit-choose-putQty"
-                  v-model="record.putQty"
-                  :precision="0"
-                  :min="1"
-                  :max="999999"
-                  placeholder="请输入"
-                  @blur="e => putQtyBlur(e.target.value, record)"
-                  style="width: 100%;" />
-              </template>
-              <!-- 仓库仓位 -->
-              <template slot="warehouse" slot-scope="text, record, index">
-                <a-cascader
-                  @change="e => changeWarehouseCascade(e, record, index, 'sparePartsPurDetail')"
-                  v-model="record.warehouseCascade"
-                  expand-trigger="hover"
-                  :allowClear="false"
-                  :options="warehouseCascadeData"
-                  :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-                  id="bulkWarehousingOrderEdit-choose-warehouseCascade"
-                  placeholder="请选择仓库仓位"
-                  style="width: 100%;" />
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="bulkWarehousingOrderEdit-del-btn">删除</a-button>
-              </template>
-            </a-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="bulkWarehousingOrderEdit-submit"
-          size="large"
-          class="button-primary"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 已选产品 -->
+      <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1">
+            <template slot="header">
+              已选产品
+              <a-button size="small" class="import-btn" id="bulkWarehousingOrderEdit-import-btn" @click.stop="handleImport">导入明细</a-button>
+            </template>
+            <!-- 已选产品 -->
+            <div>
+              <!-- 总计 -->
+              <a-alert type="info" showIcon style="margin-bottom:15px">
+                <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+              </a-alert>
+              <!-- 列表 -->
+              <a-table
+                class="sTable"
+                ref="chooseTable"
+                size="small"
+                :rowKey="(record) => record.id"
+                :columns="chooseColumns"
+                :dataSource="chooseLoadData"
+                :scroll="{ x: 1700, y: 300 }"
+                :pagination="choosePaginationProps"
+                @change="onChooseTableChange"
+                bordered>
+                <!-- 成本价 -->
+                <template slot="putCost" slot-scope="text, record">
+                  <a-input-number
+                    id="bulkWarehousingOrderEdit-choose-putCost"
+                    v-model="record.putCost"
+                    :precision="2"
+                    :min="1"
+                    :max="999999"
+                    placeholder="请输入"
+                    @blur="e => putCostBlur(e.target.value, record)"
+                    style="width: 100%;" />
+                </template>
+                <!-- 数量 -->
+                <template slot="putQty" slot-scope="text, record">
+                  <a-input-number
+                    id="bulkWarehousingOrderEdit-choose-putQty"
+                    v-model="record.putQty"
+                    :precision="0"
+                    :min="1"
+                    :max="999999"
+                    placeholder="请输入"
+                    @blur="e => putQtyBlur(e.target.value, record)"
+                    style="width: 100%;" />
+                </template>
+                <!-- 仓库仓位 -->
+                <template slot="warehouse" slot-scope="text, record, index">
+                  <a-cascader
+                    @change="e => changeWarehouseCascade(e, record, index, 'sparePartsPurDetail')"
+                    v-model="record.warehouseCascade"
+                    expand-trigger="hover"
+                    :allowClear="false"
+                    :options="warehouseCascadeData"
+                    :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+                    id="bulkWarehousingOrderEdit-choose-warehouseCascade"
+                    placeholder="请选择仓库仓位"
+                    style="width: 100%;" />
+                </template>
+                <!-- 操作 -->
+                <template slot="action" slot-scope="text, record">
+                  <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="bulkWarehousingOrderEdit-del-btn">删除</a-button>
+                </template>
+              </a-table>
+            </div>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            id="bulkWarehousingOrderEdit-submit"
+            size="large"
+            class="button-primary"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <!-- 选择基本信息弹框 -->
     <!-- 选择基本信息弹框 -->
     <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
     <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
     <!-- 打印 -->
     <!-- 打印 -->
@@ -246,6 +248,7 @@ export default {
   components: { STable, VSelect, basicInfoModal },
   components: { STable, VSelect, basicInfoModal },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       queryParam: {
       queryParam: {
         queryWord: '',
         queryWord: '',
         productBrandSn: undefined,
         productBrandSn: undefined,
@@ -334,7 +337,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       sparePartsPurDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       sparePartsPurDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {
@@ -449,22 +454,30 @@ export default {
           return
           return
         }
         }
       }
       }
+      this.spinning = true
       sparePartsPurDetailSave(params).then(res => {
       sparePartsPurDetailSave(params).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           this.getChooseDealerProductList()
           this.getChooseDealerProductList()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
     //  提交
     //  提交
     handleSubmit () {
     handleSubmit () {
       const _this = this
       const _this = this
+      _this.spinning = true
       sparePartsPurSubmit({ id: this.$route.params.id }).then(res => {
       sparePartsPurSubmit({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           setTimeout(() => {
           setTimeout(() => {
             _this.handleBack()
             _this.handleBack()
+            _this.spinning = false
           }, 1000)
           }, 1000)
+        } else {
+          _this.spinning = false
         }
         }
       })
       })
     },
     },

+ 14 - 1
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -284,11 +284,24 @@ export default {
     },
     },
     //  导出
     //  导出
     handleExport () {
     handleExport () {
+      const _this = this
       const params = this.queryParam
       const params = this.queryParam
       this.exportLoading = true
       this.exportLoading = true
       sparePartsPurExport(params).then(res => {
       sparePartsPurExport(params).then(res => {
         this.exportLoading = false
         this.exportLoading = false
-        this.download(res)
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
       })
       })
     },
     },
     download (data) {
     download (data) {

+ 91 - 0
src/views/common/auditModal.vue

@@ -0,0 +1,91 @@
+<template>
+  <a-modal
+    centered
+    class="audit-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="416">
+    <div class="audit-main">
+      <a-icon type="question-circle" style="color: #faad14;font-size: 22px;margin-right: 16px;" />
+      <div class="audit-cont">
+        <p class="audit-tit">提示</p>
+        <p class="audit-txt">请点击下方按钮确认操作?</p>
+      </div>
+    </div>
+    <div class="btn-box">
+      <a-button type="primary" class="button-error" @click="handleAuditFail">审核不通过</a-button>
+      <a-button type="primary" class="button-info" @click="handleAuditOk">审核通过</a-button>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  name: 'AuditModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal //  是否打开弹框
+    }
+  },
+  methods: {
+    // 审核通过
+    handleAuditOk () {
+      this.$emit('ok')
+    },
+    // 审核不通过
+    handleAuditFail () {
+      this.$emit('fail')
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .audit-modal{
+    .ant-modal-body{
+      padding: 32px 32px 24px;
+    }
+    .audit-main{
+      display: flex;
+      .audit-cont{
+        .audit-tit{
+          color: rgba(0, 0, 0, 0.85);
+          font-weight: 500;
+          font-size: 16px;
+          line-height: 1.4;
+          margin: 0;
+        }
+        .audit-txt{
+          margin: 8px 0 0;
+          color: rgba(0, 0, 0, 0.65);
+          font-size: 14px;
+          line-height: 1.5;
+        }
+      }
+    }
+    .btn-box{
+      text-align: right;
+      margin-top: 24px;
+    }
+  }
+</style>

+ 2 - 1
src/views/common/custSatelliteList.vue

@@ -1,4 +1,5 @@
 <template>
 <template>
+  <!-- 卫星仓客户 -->
   <a-select
   <a-select
     show-search
     show-search
     label-in-value
     label-in-value
@@ -42,7 +43,7 @@ export default {
         if (fetchId !== this.lastFetchId) {
         if (fetchId !== this.lastFetchId) {
           return
           return
         }
         }
-        this.data = res.data.list || []
+        this.data = res.data && res.data.list ? res.data.list : []
         this.fetching = false
         this.fetching = false
       })
       })
     },
     },

+ 13 - 13
src/views/common/productType.js

@@ -5,7 +5,7 @@ const ProductType = {
         @change="handleChange"
         @change="handleChange"
         change-on-select
         change-on-select
         :value="defaultVal"
         :value="defaultVal"
-		expand-trigger="hover"
+        expand-trigger="hover"
         :options="productTypeList"
         :options="productTypeList"
         :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
         :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
         :id="id"
         :id="id"
@@ -15,33 +15,33 @@ const ProductType = {
   props: {
   props: {
     value: {
     value: {
       type: Array,
       type: Array,
-      defatut: function(){
+      defatut: function () {
         return []
         return []
       }
       }
     },
     },
     id: {
     id: {
       type: String,
       type: String,
       default: ''
       default: ''
-    },
+    }
   },
   },
-  data() {
+  data () {
     return {
     return {
       defaultVal: this.value,
       defaultVal: this.value,
       productTypeList: []
       productTypeList: []
-    };
+    }
   },
   },
   watch: {
   watch: {
-    value(newValue, oldValue) {
+    value (newValue, oldValue) {
       this.defaultVal = newValue
       this.defaultVal = newValue
     }
     }
   },
   },
-  mounted() {
+  mounted () {
     this.getProductType()
     this.getProductType()
   },
   },
   methods: {
   methods: {
-    handleChange(value) {
-      this.defaultVal = value;
-      this.$emit('change', this.defaultVal);
+    handleChange (value) {
+      this.defaultVal = value
+      this.$emit('change', this.defaultVal)
     },
     },
     //  产品分类列表
     //  产品分类列表
     getProductType () {
     getProductType () {
@@ -53,7 +53,7 @@ const ProductType = {
         }
         }
       })
       })
     }
     }
-  },
-};
+  }
+}
 
 
-export default ProductType
+export default ProductType

+ 14 - 12
src/views/customerManagement/customerInfo/detailModal.vue

@@ -10,18 +10,20 @@
     :width="960">
     :width="960">
     <!-- 客户详情 -->
     <!-- 客户详情 -->
     <div>
     <div>
-      <a-descriptions :column="3" bordered size="small" v-if="detailData">
-        <a-descriptions-item label="客户名称:">{{ detailData.customerName || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="联系人:">{{ detailData.contactName || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="联系电话:">{{ detailData.contactTel || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="客户地址:" :span="3">{{ addressStr }}</a-descriptions-item>
-        <a-descriptions-item label="客户传真:">{{ detailData.fax || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="配送方式:">{{ detailData.dispatchTypeDictValue || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="是否卫星仓客户:">{{ detailData.satelliteFlagDictValue || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="价格类型:">{{ detailData.priceTypeDictValue || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="收款方式:">{{ detailData.settleStyleName || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="客户类型:">{{ detailData.customerTypeName || '--' }}</a-descriptions-item>
-      </a-descriptions>
+      <a-spin :spinning="!detailData" tip="Loading...">
+        <a-descriptions :column="3" bordered size="small" v-if="detailData">
+          <a-descriptions-item label="客户名称:">{{ detailData.customerName || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="联系人:">{{ detailData.contactName || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="联系电话:">{{ detailData.contactTel || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="客户地址:" :span="3">{{ addressStr }}</a-descriptions-item>
+          <a-descriptions-item label="客户传真:">{{ detailData.fax || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="配送方式:">{{ detailData.dispatchTypeDictValue || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="是否卫星仓客户:">{{ detailData.satelliteFlagDictValue || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="价格类型:">{{ detailData.priceTypeDictValue || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="收款方式:">{{ detailData.settleStyleName || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="客户类型:">{{ detailData.customerTypeName || '--' }}</a-descriptions-item>
+        </a-descriptions>
+      </a-spin>
       <div class="btn-cont"><a-button id="customer-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
       <div class="btn-cont"><a-button id="customer-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
     </div>
     </div>
   </a-modal>
   </a-modal>

+ 123 - 116
src/views/customerManagement/customerInfo/edit.vue

@@ -6,122 +6,124 @@
         <a id="customerManagementEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         <a id="customerManagementEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
       </template>
       </template>
     </a-page-header>
     </a-page-header>
-    <a-card size="small" :bordered="false" class="customerManagementEdit-table-page-wrapper">
-      <a-form-model
-        id="customerManagementEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-row :gutter="15">
-          <a-col :span="8">
-            <a-form-model-item label="客户名称" prop="customerName">
-              <a-input
-                id="customerManagementEdit-customerName"
-                :maxLength="30"
-                v-model.trim="form.customerName"
-                @change="filterEmpty"
-                placeholder="请输入客户名称(最多30个字符)"
-                allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="联系电话" prop="contactTel">
-              <a-input id="customerManagementEdit-contactTel" :maxLength="11" v-model.trim="form.contactTel" placeholder="请输入联系电话(最多11个字符)" allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="联系人" prop="contactName">
-              <a-input id="customerManagementEdit-contactName" :maxLength="30" v-model.trim="form.contactName" placeholder="请输入联系人(最多30个字符)" allowClear />
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="15">
-          <a-col :span="16">
-            <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
-              <a-row :gutter="15">
-                <!-- 客户地址 -->
-                <a-col span="8">
-                  <a-form-model-item prop="provinceSn">
-                    <a-select id="customerManagementEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
-                      <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                    </a-select>
-                  </a-form-model-item>
-                </a-col>
-                <a-col span="8">
-                  <a-form-model-item prop="citySn">
-                    <a-select id="customerManagementEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
-                      <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                    </a-select>
-                  </a-form-model-item>
-                </a-col>
-                <a-col span="8">
-                  <a-form-model-item prop="countySn">
-                    <a-select id="customerManagementEdit-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
-                      <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                    </a-select>
-                  </a-form-model-item>
-                </a-col>
-              </a-row>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="" prop="customerAddr">
-              <a-input id="customerManagementEdit-customerAddr" :maxLength="60" v-model.trim="form.customerAddr" placeholder="请输入详细地址(最多60个字符)" allowClear />
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="15">
-          <a-col :span="8">
-            <a-form-model-item label="客户传真" prop="fax">
-              <a-input id="customerManagementEdit-fax" :maxLength="30" v-model.trim="form.fax" placeholder="请输入客户传真(最多30个字符)" allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="配送方式" prop="dispatchType">
-              <v-select
-                code="DISPATCH_TYPE"
-                id="customerManagementEdit-dispatchType"
-                v-model="form.dispatchType"
-                allowClear
-                placeholder="请选择配送方式"
-              ></v-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="是否卫星仓客户" prop="satelliteFlag">
-              <span style="padding-left: 11px;">{{ form.satelliteFlag == 1 ? '是' : '否' }}</span>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="15">
-          <a-col :span="8">
-            <a-form-model-item label="价格类型" ref="priceType" prop="priceType">
-              <v-select code="PRICE_TYPE" id="customerManagementEdit-priceType" v-model="form.priceType" allowClear placeholder="请选择价格类型" ></v-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="收款方式" prop="settleStyleSn">
-              <a-select id="customerManagementEdit-settleStyleSn" v-model="form.settleStyleSn" allowClear placeholder="请选择收款方式">
-                <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="客户类型" prop="customerTypeSn">
-              <a-select id="customerManagementEdit-customerTypeSn" v-model="form.customerTypeSn" allowClear placeholder="请选择客户类型">
-                <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-          <a-button type="primary" @click="handleSubmit" size="large" id="customerManagementEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
-        </a-form-model-item>
-      </a-form-model>
-    </a-card>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="customerManagementEdit-table-page-wrapper">
+        <a-form-model
+          id="customerManagementEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-row :gutter="15">
+            <a-col :span="8">
+              <a-form-model-item label="客户名称" prop="customerName">
+                <a-input
+                  id="customerManagementEdit-customerName"
+                  :maxLength="30"
+                  v-model.trim="form.customerName"
+                  @change="filterEmpty"
+                  placeholder="请输入客户名称(最多30个字符)"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="8">
+              <a-form-model-item label="联系电话" prop="contactTel">
+                <a-input id="customerManagementEdit-contactTel" :maxLength="11" v-model.trim="form.contactTel" placeholder="请输入联系电话(最多11个字符)" allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="8">
+              <a-form-model-item label="联系人" prop="contactName">
+                <a-input id="customerManagementEdit-contactName" :maxLength="30" v-model.trim="form.contactName" placeholder="请输入联系人(最多30个字符)" allowClear />
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="15">
+            <a-col :span="16">
+              <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
+                <a-row :gutter="15">
+                  <!-- 客户地址 -->
+                  <a-col span="8">
+                    <a-form-model-item prop="provinceSn">
+                      <a-select id="customerManagementEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
+                        <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="8">
+                    <a-form-model-item prop="citySn">
+                      <a-select id="customerManagementEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
+                        <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="8">
+                    <a-form-model-item prop="countySn">
+                      <a-select id="customerManagementEdit-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
+                        <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                </a-row>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="8">
+              <a-form-model-item label="" prop="customerAddr">
+                <a-input id="customerManagementEdit-customerAddr" :maxLength="60" v-model.trim="form.customerAddr" placeholder="请输入详细地址(最多60个字符)" allowClear />
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="15">
+            <a-col :span="8">
+              <a-form-model-item label="客户传真" prop="fax">
+                <a-input id="customerManagementEdit-fax" :maxLength="30" v-model.trim="form.fax" placeholder="请输入客户传真(最多30个字符)" allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="8">
+              <a-form-model-item label="配送方式" prop="dispatchType">
+                <v-select
+                  code="DISPATCH_TYPE"
+                  id="customerManagementEdit-dispatchType"
+                  v-model="form.dispatchType"
+                  allowClear
+                  placeholder="请选择配送方式"
+                ></v-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="8">
+              <a-form-model-item label="是否卫星仓客户" prop="satelliteFlag">
+                <span style="padding-left: 11px;">{{ form.satelliteFlag == 1 ? '是' : '否' }}</span>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="15">
+            <a-col :span="8">
+              <a-form-model-item label="价格类型" ref="priceType" prop="priceType">
+                <v-select code="PRICE_TYPE" id="customerManagementEdit-priceType" v-model="form.priceType" allowClear placeholder="请选择价格类型" ></v-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="8">
+              <a-form-model-item label="收款方式" prop="settleStyleSn">
+                <a-select id="customerManagementEdit-settleStyleSn" v-model="form.settleStyleSn" allowClear placeholder="请选择收款方式">
+                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="8">
+              <a-form-model-item label="客户类型" prop="customerTypeSn">
+                <a-select id="customerManagementEdit-customerTypeSn" v-model="form.customerTypeSn" allowClear placeholder="请选择客户类型">
+                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+            <a-button type="primary" @click="handleSubmit" size="large" id="customerManagementEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
+          </a-form-model-item>
+        </a-form-model>
+      </a-card>
+    </a-spin>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -141,6 +143,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 9 },
         labelCol: { span: 9 },
         wrapperCol: { span: 15 }
         wrapperCol: { span: 15 }
@@ -229,6 +232,7 @@ export default {
         if (valid) {
         if (valid) {
           const form = _this.form
           const form = _this.form
           form.id = this.$route.params.id && this.model == 'page' ? this.$route.params.id : null
           form.id = this.$route.params.id && this.model == 'page' ? this.$route.params.id : null
+          _this.spinning = true
           custSave(form).then(res => {
           custSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
@@ -239,6 +243,9 @@ export default {
               } else {
               } else {
                 _this.$emit('ok', res.data)
                 _this.$emit('ok', res.data)
               }
               }
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 3 - 3
src/views/customerManagement/customerInfo/list.vue

@@ -90,7 +90,7 @@
       :rowKey="(record) => record.id"
       :rowKey="(record) => record.id"
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
-      :scroll="{ x: 1190, y: tableHeight }"
+      :scroll="{ x: 1240, y: tableHeight }"
       bordered>
       bordered>
       <!-- 操作 -->
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
       <template slot="action" slot-scope="text, record">
@@ -160,8 +160,8 @@ export default {
         { title: '联系电话', dataIndex: 'contactTel', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '联系电话', dataIndex: 'contactTel', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '最后销售时间', dataIndex: 'lastSaleTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '最后销售时间', dataIndex: 'lastSaleTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '是否卫星仓', dataIndex: 'satelliteFlagDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '是否卫星仓', dataIndex: 'satelliteFlagDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '启用禁用', scopedSlots: { customRender: 'enableAction' }, width: 200, align: 'center', fixed: 'right' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
+        { title: '启用禁用', scopedSlots: { customRender: 'enableAction' }, width: 100, align: 'center', fixed: 'right' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 130, align: 'center', fixed: 'right' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {

+ 1 - 1
src/views/financialManagement/companyCollectionPayment/detail.vue

@@ -68,7 +68,7 @@ export default {
         { title: '单据号', dataIndex: 'bizNo', align: 'center', width: 220, customRender: function (text) { return text || '--' } },
         { title: '单据号', dataIndex: 'bizNo', align: 'center', width: 220, customRender: function (text) { return text || '--' } },
         { title: '类型', dataIndex: 'bizTypeDictValue', align: 'center', width: 140, customRender: function (text) { return text || '--' } },
         { title: '类型', dataIndex: 'bizTypeDictValue', align: 'center', width: 140, customRender: function (text) { return text || '--' } },
         { title: '金额', dataIndex: 'totalAmount', align: 'center', width: 100, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '金额', dataIndex: 'totalAmount', align: 'center', width: 100, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结算金额', dataIndex: 'unsettleAmount', align: 'center', width: 100, customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '结算金额', dataIndex: 'settleAmount', align: 'center', width: 100, customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {

+ 1 - 1
src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue

@@ -106,7 +106,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
-        return settleInfoAllList(Object.assign(this.queryParam, { settleClientSn: this.settleClientSn })).then(res => {
+        return settleInfoAllList(Object.assign(this.queryParam, { settleClientSn: this.settleClientSn, notEqZero: 1 })).then(res => {
           const data = res.data
           const data = res.data
           this.selectedRowKeys = []
           this.selectedRowKeys = []
           this.selectedRows = []
           this.selectedRows = []

+ 142 - 133
src/views/financialManagement/companyReceivablePayable/collectionPayment.vue

@@ -7,132 +7,134 @@
         <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
         <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
       </template>
       </template>
     </a-page-header>
     </a-page-header>
-    <!-- 已选单据 -->
-    <a-card size="small" :bordered="false" class="collectionPayment-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            已选单据
-            <a-button type="primary" size="small" class="button-error" id="collectionPayment-circle-btn" @click.stop="handleChoose">选择单据</a-button>
-          </template>
-          <!-- 总计 -->
-          <a-alert type="info" showIcon style="margin-bottom:15px">
-            <div slot="message">共 <strong>{{ chooseLoadData.length }}</strong>条明细 ,金额合计¥<strong>{{ totalAmount }}</strong> ,余额合计¥<strong>{{ totalBalance }}</strong> ,本次结算金额合计¥<strong>{{ currentTotalBalance }}</strong></div>
-          </a-alert>
-          <!-- 列表 -->
-          <a-table
-            class="sTable"
-            ref="chooseTable"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="chooseColumns"
-            :dataSource="chooseLoadData"
-            :scroll="{ x: 1040, y: 300 }"
-            :pagination="false"
-            bordered>
-            <!-- 序号 -->
-            <template slot="no" slot-scope="text, record, index">
-              {{ index+1 }}
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 已选单据 -->
+      <a-card size="small" :bordered="false" class="collectionPayment-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1">
+            <template slot="header">
+              已选单据
+              <a-button type="primary" size="small" class="button-error" id="collectionPayment-circle-btn" @click.stop="handleChoose">选择单据</a-button>
             </template>
             </template>
-            <!-- 本次结算金额 -->
-            <template slot="settleAmount" slot-scope="text, record">
-              <a-input-number
-                id="collectionPayment-settleAmount"
-                v-model="record.settleAmount"
-                :precision="2"
-                :min="record.unsettleAmount<0 ? record.unsettleAmount : 0.01"
-                :max="record.unsettleAmount<0 ? -0.01 : record.unsettleAmount"
-                placeholder="请输入"
-                style="width: 100%;" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="collectionPayment-del-btn">移除</a-button>
-            </template>
-          </a-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="collectionPayment-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="收付款信息">
-          <a-form-model
-            id="collectionPayment-form"
-            ref="ruleForm"
-            :model="form"
-            :rules="rules"
-            :label-col="formItemLayout.labelCol"
-            :wrapper-col="formItemLayout.wrapperCol">
-            <a-row :gutter="20">
-              <a-col span="12">
-                <a-form-model-item prop="amountSettled">
-                  <template slot="label">
-                    应结算金额(<span :class="isPositive ? 'green':'red'">{{ isPositive ? '收款' : '付款' }}</span>)
-                  </template>
-                  <a-input-number
-                    id="collectionPayment-amountSettled"
-                    v-model="amountSettled"
-                    disabled
-                    :precision="2"
-                    placeholder=""
-                    style="width: 100%;" />
-                </a-form-model-item>
-              </a-col>
-              <a-col span="12">
-                <a-form-model-item label="折让金额" prop="discountAmount">
-                  <a-input-number
-                    id="collectionPayment-discountAmount"
-                    v-model="form.discountAmount"
-                    :precision="2"
-                    :min="0"
-                    :max="amountSettled"
-                    placeholder="请输入"
-                    style="width: 100%;"
-                    allowClear />
-                </a-form-model-item>
-              </a-col>
-              <a-col span="12">
-                <a-form-model-item prop="actualSettlementAmount">
-                  <template slot="label">
-                    实结算金额(<span :class="isPositive ? 'green':'red'">{{ isPositive ? '收款' : '付款' }}</span>)
-                  </template>
-                  <a-input-number
-                    id="collectionPayment-actualSettlementAmount"
-                    v-model="actualSettlementAmount"
-                    disabled
-                    :precision="2"
-                    placeholder=""
-                    style="width: 100%;" />
-                </a-form-model-item>
-              </a-col>
-              <a-col span="12">
-                <a-form-model-item label="结算方式" prop="settleStyleSn">
-                  <a-select id="collectionPayment-settleStyleSn" v-model="form.settleStyleSn" placeholder="请选择结算方式" allowClear>
-                    <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col span="24">
-                <a-form-model-item label="备注" prop="remark" :label-col="{ span: 3 }" :wrapper-col="{ span: 20 }">
-                  <a-textarea id="collectionPayment-remark" :maxLength="100" v-model="form.remark" placeholder="请输入备注(最多100个字符)" allowClear />
-                </a-form-model-item>
-              </a-col>
-            </a-row>
-          </a-form-model>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="collectionPayment-submit"
-          size="large"
-          class="button-primary"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+            <!-- 总计 -->
+            <a-alert type="info" showIcon style="margin-bottom:15px">
+              <div slot="message">共 <strong>{{ chooseLoadData.length }}</strong>条明细 ,金额合计¥<strong>{{ totalAmount }}</strong> ,余额合计¥<strong>{{ totalBalance }}</strong> ,本次结算金额合计¥<strong>{{ currentTotalBalance }}</strong></div>
+            </a-alert>
+            <!-- 列表 -->
+            <a-table
+              class="sTable"
+              ref="chooseTable"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="chooseColumns"
+              :dataSource="chooseLoadData"
+              :scroll="{ x: 1040, y: 300 }"
+              :pagination="false"
+              bordered>
+              <!-- 序号 -->
+              <template slot="no" slot-scope="text, record, index">
+                {{ index+1 }}
+              </template>
+              <!-- 本次结算金额 -->
+              <template slot="settleAmount" slot-scope="text, record">
+                <a-input-number
+                  id="collectionPayment-settleAmount"
+                  v-model="record.settleAmount"
+                  :precision="2"
+                  :min="record.unsettleAmount<0 ? record.unsettleAmount : 0.01"
+                  :max="record.unsettleAmount<0 ? -0.01 : record.unsettleAmount"
+                  placeholder="请输入"
+                  style="width: 100%;" />
+              </template>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="collectionPayment-del-btn">移除</a-button>
+              </template>
+            </a-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="collectionPayment-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="收付款信息">
+            <a-form-model
+              id="collectionPayment-form"
+              ref="ruleForm"
+              :model="form"
+              :rules="rules"
+              :label-col="formItemLayout.labelCol"
+              :wrapper-col="formItemLayout.wrapperCol">
+              <a-row :gutter="20">
+                <a-col span="12">
+                  <a-form-model-item prop="amountSettled">
+                    <template slot="label">
+                      应结算金额(<span :class="isPositive ? 'green':'red'">{{ isPositive ? '收款' : '付款' }}</span>)
+                    </template>
+                    <a-input-number
+                      id="collectionPayment-amountSettled"
+                      v-model="amountSettled"
+                      disabled
+                      :precision="2"
+                      placeholder=""
+                      style="width: 100%;" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col span="12">
+                  <a-form-model-item label="折让金额" prop="discountAmount">
+                    <a-input-number
+                      id="collectionPayment-discountAmount"
+                      v-model="form.discountAmount"
+                      :precision="2"
+                      :min="0"
+                      :max="amountSettled"
+                      placeholder="请输入"
+                      style="width: 100%;"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+                <a-col span="12">
+                  <a-form-model-item prop="actualSettlementAmount">
+                    <template slot="label">
+                      实结算金额(<span :class="isPositive ? 'green':'red'">{{ isPositive ? '收款' : '付款' }}</span>)
+                    </template>
+                    <a-input-number
+                      id="collectionPayment-actualSettlementAmount"
+                      v-model="actualSettlementAmount"
+                      disabled
+                      :precision="2"
+                      placeholder=""
+                      style="width: 100%;" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col span="12">
+                  <a-form-model-item label="结算方式" prop="settleStyleSn">
+                    <a-select id="collectionPayment-settleStyleSn" v-model="form.settleStyleSn" placeholder="请选择结算方式" allowClear>
+                      <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col span="24">
+                  <a-form-model-item label="备注" prop="remark" :label-col="{ span: 3 }" :wrapper-col="{ span: 20 }">
+                    <a-textarea id="collectionPayment-remark" :maxLength="100" v-model="form.remark" placeholder="请输入备注(最多100个字符)" allowClear />
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-form-model>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            id="collectionPayment-submit"
+            size="large"
+            class="button-primary"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <choose-bill-modal :openModal="openModal" :nowChoose="chooseLoadData" :settleClientSn="$route.params.sn" @ok="handleOk" @close="handleClose" />
     <choose-bill-modal :openModal="openModal" :nowChoose="chooseLoadData" :settleClientSn="$route.params.sn" @ok="handleOk" @close="handleClose" />
   </div>
   </div>
 </template>
 </template>
@@ -146,6 +148,7 @@ export default {
   components: { STable, VSelect, chooseBillModal },
   components: { STable, VSelect, chooseBillModal },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       chooseQueryParam: {
       chooseQueryParam: {
         productCode: '',
         productCode: '',
         productName: ''
         productName: ''
@@ -187,32 +190,33 @@ export default {
     currentTotalBalance () {
     currentTotalBalance () {
       let val = 0
       let val = 0
       this.chooseLoadData.map(item => {
       this.chooseLoadData.map(item => {
-        val += Number(item.settleAmount)
+        val += (Number(item.settleAmount) * 1000)
       })
       })
-      return val
+      return val / 1000
     },
     },
     // 金额合计
     // 金额合计
     totalAmount () {
     totalAmount () {
       let val = 0
       let val = 0
       this.chooseLoadData.map(item => {
       this.chooseLoadData.map(item => {
-        val += Number(item.totalAmount)
+        val += (Number(item.totalAmount) * 1000)
       })
       })
-      return val
+      return val / 1000
     },
     },
     // 余额合计
     // 余额合计
     totalBalance () {
     totalBalance () {
       let val = 0
       let val = 0
       this.chooseLoadData.map(item => {
       this.chooseLoadData.map(item => {
-        val += Number(item.unsettleAmount)
+        val += (Number(item.unsettleAmount) * 1000)
       })
       })
-      return val
+      return val / 1000
     },
     },
     // 应结算金额
     // 应结算金额
     amountSettled () {
     amountSettled () {
       let val = 0
       let val = 0
       this.chooseLoadData.map(item => {
       this.chooseLoadData.map(item => {
-        val += Number(item.settleAmount)
+        val += (Number(item.settleAmount) * 1000)
       })
       })
+      val = val / 1000
       if (val < 0) {
       if (val < 0) {
         this.isPositive = false
         this.isPositive = false
       } else {
       } else {
@@ -222,7 +226,8 @@ export default {
     },
     },
     // 实结算金额
     // 实结算金额
     actualSettlementAmount () {
     actualSettlementAmount () {
-      return this.amountSettled - this.form.discountAmount
+      const val = (this.amountSettled * 1000 - this.form.discountAmount * 1000) / 1000
+      return val
     }
     }
   },
   },
   methods: {
   methods: {
@@ -258,10 +263,14 @@ export default {
               prFlag: item.prFlag
               prFlag: item.prFlag
             })
             })
           })
           })
+          _this.spinning = true
           settleUnitSave(form).then(res => {
           settleUnitSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.handleBack()
               _this.handleBack()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 1 - 1
src/views/financialManagement/companyReceivablePayable/list.vue

@@ -31,7 +31,7 @@
     </div>
     </div>
     <!-- alert -->
     <!-- alert -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
     <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>{{ total }}</strong> 条记录,应收金额合计 <strong>¥{{ (productTotal&&productTotal.receipt) || 0 }}</strong> ,应付金额合计 <strong>¥{{ (productTotal&&productTotal.pay) || 0 }}</strong> </div>
+      <div slot="message">共 <strong>{{ total }}</strong> 条记录,应收金额合计 <strong>¥{{ (productTotal&&productTotal.receipt) || 0 }}</strong> ,应付金额合计 <strong>¥{{ (productTotal&&productTotal.pay) ? Math.abs(productTotal.pay) : 0 }}</strong> </div>
     </a-alert>
     </a-alert>
     <!-- 列表 -->
     <!-- 列表 -->
     <s-table
     <s-table

+ 30 - 23
src/views/financialManagement/expenseManagement/edit.vue

@@ -9,8 +9,9 @@
         </a>
         </a>
       </template>
       </template>
     </a-page-header>
     </a-page-header>
-    <a-card size="small" :bordered="false" class="expenseManagementEdit-table-page-wrapper">
-      <a-form-model
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="expenseManagementEdit-table-page-wrapper">
+        <a-form-model
         id="expenseManagementEdit-form"
         id="expenseManagementEdit-form"
         ref="ruleForm"
         ref="ruleForm"
         :model="form"
         :model="form"
@@ -19,34 +20,34 @@
         :wrapper-col="formItemLayout.wrapperCol">
         :wrapper-col="formItemLayout.wrapperCol">
         <a-form-model-item label="费用类型" prop="costType">
         <a-form-model-item label="费用类型" prop="costType">
           <a-cascader
           <a-cascader
-            @change="changeCostType"
-            v-model="form.costType"
-            expand-trigger="hover"
-            :options="costTypeList"
-            :fieldNames="{ label: 'name', value: 'costTypeSn', children: 'children' }"
-            id="productInfoList-costType"
-            placeholder="请选择费用类型"
-            allowClear
+          @change="changeCostType"
+          v-model="form.costType"
+          expand-trigger="hover"
+          :options="costTypeList"
+          :fieldNames="{ label: 'name', value: 'costTypeSn', children: 'children' }"
+          id="productInfoList-costType"
+          placeholder="请选择费用类型"
+          allowClear
           />
           />
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="费用金额" prop="settleAmount">
         <a-form-model-item label="费用金额" prop="settleAmount">
           <a-input-number
           <a-input-number
-            id="expenseManagementEdit-name"
-            v-model="form.settleAmount"
-            :precision="2"
-            :min="0"
-            :max="999999"
-            placeholder="请输入费用金额(0~999999)"
-            allowClear
-            style="width: 90%;"
+          id="expenseManagementEdit-name"
+          v-model="form.settleAmount"
+          :precision="2"
+          :min="0"
+          :max="999999"
+          placeholder="请输入费用金额(0~999999)"
+          allowClear
+          style="width: 90%;"
           />
           />
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="结算方式" prop="settleStyleSn">
         <a-form-model-item label="结算方式" prop="settleStyleSn">
           <a-select placeholder="请选择结算方式" v-model="form.settleStyleSn" @change="settleStyleChange">
           <a-select placeholder="请选择结算方式" v-model="form.settleStyleSn" @change="settleStyleChange">
-            <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
-              {{ item.name }}
-            </a-select-option>
+          <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
+            {{ item.name }}
+          </a-select-option>
           </a-select>
           </a-select>
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="关联单号" prop="bizNo">
         <a-form-model-item label="关联单号" prop="bizNo">
@@ -58,8 +59,9 @@
         <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
         <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
           <a-button type="primary" size="large" @click="handleSubmit" id="expenseManagementEdit-btn-save" style="margin: 0 30px;">保存</a-button>
           <a-button type="primary" size="large" @click="handleSubmit" id="expenseManagementEdit-btn-save" style="margin: 0 30px;">保存</a-button>
         </a-form-model-item>
         </a-form-model-item>
-      </a-form-model>
-    </a-card>
+        </a-form-model>
+      </a-card>
+		</a-spin>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -73,6 +75,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 4 },
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
         wrapperCol: { span: 16 }
@@ -165,12 +168,16 @@ export default {
             form.id = this.$route.params.id
             form.id = this.$route.params.id
           }
           }
           delete form.costType
           delete form.costType
+          _this.spinning = true
           settleExpenseSave(form).then(res => {
           settleExpenseSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               setTimeout(() => {
               setTimeout(() => {
                 _this.handleBack()
                 _this.handleBack()
+                _this.spinning = false
               }, 1000)
               }, 1000)
+            }else{
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 27 - 7
src/views/financialManagement/financialCollection/list.vue

@@ -58,11 +58,11 @@
       <div slot="message">
       <div slot="message">
         <strong>{{ totalData.count }}</strong>
         <strong>{{ totalData.count }}</strong>
-        条记录,收金额合计
+        条记录,收金额合计
         <strong>¥{{ totalData.totalAmount }}</strong>
         <strong>¥{{ totalData.totalAmount }}</strong>
-        ,其中已收
+        ,其中已收金额
         <strong>¥{{ totalData.settledAmount }}</strong>
         <strong>¥{{ totalData.settledAmount }}</strong>
-        ,未收
+        ,待收金额
         <strong>¥{{ totalData.unsettleAmount }}</strong>
         <strong>¥{{ totalData.unsettleAmount }}</strong>
       </div>
       </div>
     </a-alert>
     </a-alert>
@@ -83,7 +83,7 @@
       :rowKey="record => record.id"
       :rowKey="record => record.id"
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
-      :scroll="{ x: 1460, y: tableHeight }"
+      :scroll="{ x: 1660, y: tableHeight }"
       bordered
       bordered
     >
     >
       <!-- 操作 -->
       <!-- 操作 -->
@@ -100,9 +100,11 @@
           type="link"
           type="link"
           :loading="loading"
           :loading="loading"
           class="button-warning"
           class="button-warning"
-          v-else
+          v-if="record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1"
           @click="handleCollectionSing(record)"
           @click="handleCollectionSing(record)"
           id="financialCollectionList-pay-btn">收款</a-button>
           id="financialCollectionList-pay-btn">收款</a-button>
+        <span v-if="!(record.settleState == 'SETTLED') && !(record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1)">--</span>
+        <!-- satelliteFlag为1,是卫星仓 -->
       </template>
       </template>
     </s-table>
     </s-table>
     <!-- 详情 -->
     <!-- 详情 -->
@@ -170,11 +172,29 @@ export default {
           }
           }
         },
         },
         {
         {
-          title: '收金额',
+          title: '收金额',
           width: 100,
           width: 100,
           align: 'center',
           align: 'center',
           customRender: function (text, record) {
           customRender: function (text, record) {
-            const val = record.settleState == 'SETTLED' ? record.settledAmount : record.unsettleAmount
+            const val = record.totalAmount
+            return val || val == 0 ? '¥' + val : '--'
+          }
+        },
+        {
+          title: '已收金额',
+          width: 100,
+          align: 'center',
+          customRender: function (text, record) {
+            const val = record.settledAmount
+            return val || val == 0 ? '¥' + val : '--'
+          }
+        },
+        {
+          title: '待收金额',
+          width: 100,
+          align: 'center',
+          customRender: function (text, record) {
+            const val = record.unsettleAmount
             return val || val == 0 ? '¥' + val : '--'
             return val || val == 0 ? '¥' + val : '--'
           }
           }
         },
         },

+ 24 - 6
src/views/financialManagement/financialPayment/list.vue

@@ -57,11 +57,11 @@
       <div slot="message">
       <div slot="message">
         <strong>{{ totalData.count }}</strong>
         <strong>{{ totalData.count }}</strong>
-        条记录,付金额合计
+        条记录,付金额合计
         <strong>¥{{ totalData.totalAmount }}</strong>
         <strong>¥{{ totalData.totalAmount }}</strong>
-        ,其中已付
+        ,其中已付金额
         <strong>¥{{ totalData.settledAmount }}</strong>
         <strong>¥{{ totalData.settledAmount }}</strong>
-        ,未付
+        ,待付金额
         <strong>¥{{ totalData.unsettleAmount }}</strong>
         <strong>¥{{ totalData.unsettleAmount }}</strong>
       </div>
       </div>
     </a-alert>
     </a-alert>
@@ -82,7 +82,7 @@
       :rowKey="record => record.id"
       :rowKey="record => record.id"
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
-      :scroll="{ x: 1460, y: tableHeight }"
+      :scroll="{ x: 1660, y: tableHeight }"
       bordered
       bordered
     >
     >
       <!-- 操作 -->
       <!-- 操作 -->
@@ -170,11 +170,29 @@ export default {
           }
           }
         },
         },
         {
         {
-          title: '付金额',
+          title: '付金额',
           width: 100,
           width: 100,
           align: 'center',
           align: 'center',
           customRender: function (text, record) {
           customRender: function (text, record) {
-            const val = record.settleState == 'SETTLED' ? record.settledAmount : record.unsettleAmount
+            const val = record.totalAmount
+            return val || val == 0 ? '¥' + val : '--'
+          }
+        },
+        {
+          title: '已付金额',
+          width: 100,
+          align: 'center',
+          customRender: function (text, record) {
+            const val = record.settledAmount
+            return val || val == 0 ? '¥' + val : '--'
+          }
+        },
+        {
+          title: '待付金额',
+          width: 100,
+          align: 'center',
+          customRender: function (text, record) {
+            const val = record.unsettleAmount
             return val || val == 0 ? '¥' + val : '--'
             return val || val == 0 ? '¥' + val : '--'
           }
           }
         },
         },

+ 59 - 54
src/views/financialManagement/warehousingAudit/detail.vue

@@ -1,59 +1,61 @@
 <template>
 <template>
   <div class="warehousingAuditDetail-wrap">
   <div class="warehousingAuditDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="warehousingAuditDetail-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="warehousingAuditDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.receivingBillNo) || '--' }}</p>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="warehousingAuditDetail-preview-btn" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="warehousingAuditDetail-print-btn" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="warehousingAuditDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3" v-if="basicInfoData">
-            <a-descriptions-item label="供应商">{{ basicInfoData&&basicInfoData.dealerName ? basicInfoData.dealerName : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="入库时间">{{ basicInfoData&&basicInfoData.stockPutTime ? basicInfoData.stockPutTime : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="采购单号">{{ basicInfoData&&basicInfoData.purchaseBillNo ? basicInfoData.purchaseBillNo : '--' }}</a-descriptions-item>
-          </a-descriptions>
-          <a-descriptions :column="3" bordered v-if="basicInfoData">
-            <a-descriptions-item label="采购总款数">{{ (basicInfoData.totalCategory&&basicInfoData.totalCategory!=0) ? basicInfoData.totalCategory : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="采购总数量">{{ (basicInfoData.totalQty&&basicInfoData.totalQty!=0) ? basicInfoData.totalQty : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="采购总成本">¥{{ (basicInfoData.totalAmount&&basicInfoData.totalAmount!=0) ? basicInfoData.totalAmount : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="入库总款数">{{ (basicInfoData.totalPutCategory&&basicInfoData.totalPutCategory!=0) ? basicInfoData.totalPutCategory : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="入库总数量">{{ (basicInfoData.totalPutQty&&basicInfoData.totalPutQty!=0) ? basicInfoData.totalPutQty : 0 }}</a-descriptions-item>
-            <a-descriptions-item label="入库总成本">¥{{ (basicInfoData.totalPutAmount&&basicInfoData.totalPutAmount!=0) ? basicInfoData.totalPutAmount : 0 }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 入库明细 -->
-    <a-card size="small" :bordered="false" class="warehousingAuditDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="入库明细">
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :scroll="{ x: 1520 }"
-            bordered>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="warehousingAuditDetail-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="warehousingAuditDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.receivingBillNo) || '--' }}</p>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="warehousingAuditDetail-preview-btn" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="warehousingAuditDetail-print-btn" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="warehousingAuditDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3" v-if="basicInfoData">
+              <a-descriptions-item label="供应商">{{ basicInfoData&&basicInfoData.purchaseTargetName ? basicInfoData.purchaseTargetName : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="入库时间">{{ basicInfoData&&basicInfoData.stockPutTime ? basicInfoData.stockPutTime : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="采购单号">{{ basicInfoData&&basicInfoData.purchaseBillNo ? basicInfoData.purchaseBillNo : '--' }}</a-descriptions-item>
+            </a-descriptions>
+            <a-descriptions :column="3" bordered v-if="basicInfoData">
+              <a-descriptions-item label="采购总款数">{{ (basicInfoData.totalCategory&&basicInfoData.totalCategory!=0) ? basicInfoData.totalCategory : 0 }}</a-descriptions-item>
+              <a-descriptions-item label="采购总数量">{{ (basicInfoData.totalQty&&basicInfoData.totalQty!=0) ? basicInfoData.totalQty : 0 }}</a-descriptions-item>
+              <a-descriptions-item label="采购总成本">¥{{ (basicInfoData.totalAmount&&basicInfoData.totalAmount!=0) ? basicInfoData.totalAmount : 0 }}</a-descriptions-item>
+              <a-descriptions-item label="入库总款数">{{ (basicInfoData.totalPutCategory&&basicInfoData.totalPutCategory!=0) ? basicInfoData.totalPutCategory : 0 }}</a-descriptions-item>
+              <a-descriptions-item label="入库总数量">{{ (basicInfoData.totalPutQty&&basicInfoData.totalPutQty!=0) ? basicInfoData.totalPutQty : 0 }}</a-descriptions-item>
+              <a-descriptions-item label="入库总成本">¥{{ (basicInfoData.totalPutAmount&&basicInfoData.totalPutAmount!=0) ? basicInfoData.totalPutAmount : 0 }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 入库明细 -->
+      <a-card size="small" :bordered="false" class="warehousingAuditDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="入库明细">
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="columns"
+              :data="loadData"
+              :scroll="{ x: 1520 }"
+              bordered>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -66,6 +68,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       // 表头
       // 表头
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
@@ -105,7 +108,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       receivingDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       receivingDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 3 - 3
src/views/financialManagement/withdrawalManagement/cashOutModal.vue

@@ -80,8 +80,8 @@ export default {
   },
   },
   computed: {
   computed: {
     maxAmount () {
     maxAmount () {
-      const balance = this.nowData.balance || 0
-      const serviceCharge = this.nowData.serviceCharge || 0
+      const balance = this.nowData && this.nowData.balance ? this.nowData.balance : 0
+      const serviceCharge = this.nowData && this.nowData.serviceCharge ? this.nowData.serviceCharge : 0
       if ((Number(balance) * 100 - Number(serviceCharge) * 100) <= 0) {
       if ((Number(balance) * 100 - Number(serviceCharge) * 100) <= 0) {
         return 0
         return 0
       } else {
       } else {
@@ -90,7 +90,7 @@ export default {
     },
     },
     deductionAmount () {
     deductionAmount () {
       const amount = this.form.amount || 0
       const amount = this.form.amount || 0
-      const serviceCharge = this.nowData.serviceCharge || 0
+      const serviceCharge = this.nowData && this.nowData.serviceCharge ? this.nowData.serviceCharge : 0
       if (amount == 0) {
       if (amount == 0) {
         return 0
         return 0
       } else {
       } else {

+ 14 - 1
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -241,11 +241,24 @@ export default {
     },
     },
     //  导出
     //  导出
     handleExport () {
     handleExport () {
+      const _this = this
       const params = this.queryParam
       const params = this.queryParam
       this.exportLoading = true
       this.exportLoading = true
       stockExport(params).then(res => {
       stockExport(params).then(res => {
         this.exportLoading = false
         this.exportLoading = false
-        this.download(res)
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
       })
       })
     },
     },
     download (data) {
     download (data) {

+ 74 - 47
src/views/inventoryManagement/satelliteWarehouseInventory/addModal.vue

@@ -8,54 +8,56 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="960">
     :width="960">
-    <!-- 补货清单 -->
-    <div>
-      <h4 style="font-weight: bold;font-size: 16px;">{{ (nowData&&nowData.customerName) || '--' }}</h4>
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1260 }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 补货数量 -->
-        <template slot="productQty" slot-scope="text, record">
-          <a-button
-            type="primary"
-            @click="handleNumSubtract(record)"
-            shape="circle"
-            icon="minus"
-            size="small"
-            id="satelliteWarehouseInventoryList-num-add-btn"></a-button>
-          <a-input-number
-            v-model="record.productQty"
-            :min="0"
-            :max="999999"
-            :precision="0"
-            :step="1"
-            @change="e => onChange(e, record)"
-            class="stepper" />
-          <a-button
-            type="primary"
-            @click="handleNumAdd(record)"
-            shape="circle"
-            icon="plus"
-            size="small"
-            id="satelliteWarehouseInventoryList-num-subtract-btn"></a-button>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button type="link" @click="handleRemove(record)" id="satelliteWarehouseInventoryList-remove-btn">移除</a-button>
-        </template>
-      </s-table>
-      <div class="btn-cont">
-        <a-button type="primary" id="satellite-warehouse-inventory-add-modal-add" @click="handleAdd">创建销售单</a-button>
-        <a-button id="satellite-warehouse-inventory-add-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 补货清单 -->
+      <div>
+        <h4 style="font-weight: bold;font-size: 16px;">{{ (nowData&&nowData.customerName) || '--' }}</h4>
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1260 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 补货数量 -->
+          <template slot="productQty" slot-scope="text, record">
+            <a-button
+              type="primary"
+              @click="handleNumSubtract(record)"
+              shape="circle"
+              icon="minus"
+              size="small"
+              id="satelliteWarehouseInventoryList-num-add-btn"></a-button>
+            <a-input-number
+              v-model="record.productQty"
+              :min="0"
+              :max="999999"
+              :precision="0"
+              :step="1"
+              @change="e => onChange(e, record)"
+              class="stepper" />
+            <a-button
+              type="primary"
+              @click="handleNumAdd(record)"
+              shape="circle"
+              icon="plus"
+              size="small"
+              id="satelliteWarehouseInventoryList-num-subtract-btn"></a-button>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button type="link" @click="handleConfirm(record)" id="satelliteWarehouseInventoryList-remove-btn">移除</a-button>
+          </template>
+        </s-table>
+        <div class="btn-cont">
+          <a-button type="primary" id="satellite-warehouse-inventory-add-modal-add" @click="handleAdd">创建销售单</a-button>
+          <a-button id="satellite-warehouse-inventory-add-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -77,6 +79,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -128,9 +131,13 @@ export default {
     },
     },
     // 创建销售单
     // 创建销售单
     createSalesFun () {
     createSalesFun () {
+      this.spinning = true
       satelliteWHSupplyAddSales({ sn: this.nowData.customerSn }).then(res => {
       satelliteWHSupplyAddSales({ sn: this.nowData.customerSn }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$router.push({ name: 'salesEdit', params: { id: res.data.id, sn: res.data.salesBillSn, priceType: res.data.priceType } })
           this.$router.push({ name: 'salesEdit', params: { id: res.data.id, sn: res.data.salesBillSn, priceType: res.data.priceType } })
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -144,9 +151,25 @@ export default {
     },
     },
     //  删除配件信息
     //  删除配件信息
     handleRemove (row) {
     handleRemove (row) {
+      this.spinning = true
       satelliteWHSupplyDel({ sn: row.satelliteWarehouseSupplySn }).then(res => {
       satelliteWHSupplyDel({ sn: row.satelliteWarehouseSupplySn }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$refs.table.refresh(true)
           this.$refs.table.refresh(true)
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
+    //  弹框确认
+    handleConfirm (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '移除后不可恢复,确定要进行移除吗?',
+        centered: true,
+        onOk () {
+          _this.handleRemove(row)
         }
         }
       })
       })
     },
     },
@@ -160,9 +183,13 @@ export default {
         productSn: row.productSn,
         productSn: row.productSn,
         productQty: val
         productQty: val
       }
       }
+      this.spinning = true
       satelliteWHSupplyUpdate(params).then(res => {
       satelliteWHSupplyUpdate(params).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$refs.table.refresh(true)
           this.$refs.table.refresh(true)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     }
     }

+ 40 - 35
src/views/inventoryManagement/warehouse/editModal.vue

@@ -8,41 +8,43 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="warehouseEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="仓库名称" prop="name">
-          <a-input
-            id="warehouseEdit-name"
-            :maxLength="30"
-            v-model.trim="form.name"
-            @change="filterEmpty"
-            placeholder="请输入仓库名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="排序" prop="sort">
-          <a-input-number
-            v-model="form.sort"
-            :min="0"
-            :max="999999"
-            :precision="0"
-            :step="1"
-            placeholder="请输入排序(0~999999)"
-            style="width: 100%;" />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="warehouse-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="warehouse-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="warehouseEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="仓库名称" prop="name">
+            <a-input
+              id="warehouseEdit-name"
+              :maxLength="30"
+              v-model.trim="form.name"
+              @change="filterEmpty"
+              placeholder="请输入仓库名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="排序" prop="sort">
+            <a-input-number
+              v-model="form.sort"
+              :min="0"
+              :max="999999"
+              :precision="0"
+              :step="1"
+              placeholder="请输入排序(0~999999)"
+              style="width: 100%;" />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="warehouse-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="warehouse-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -73,6 +75,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 6 },
         labelCol: { span: 6 },
@@ -114,6 +117,7 @@ export default {
             name: this.form.name, //  仓库名称
             name: this.form.name, //  仓库名称
             sort: this.form.sort //  排序
             sort: this.form.sort //  排序
           }
           }
+          _this.spinning = true
           warehouseSave(params).then(res => {
           warehouseSave(params).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
@@ -121,9 +125,10 @@ export default {
               setTimeout(function () {
               setTimeout(function () {
                 _this.isShow = false
                 _this.isShow = false
                 _this.$refs.ruleForm.resetFields()
                 _this.$refs.ruleForm.resetFields()
+                _this.spinning = false
               }, 300)
               }, 300)
             } else {
             } else {
-
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 44 - 39
src/views/inventoryManagement/warehouse/storingLocation/editModal.vue

@@ -8,45 +8,47 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="storingLocationEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="仓位名称" prop="name">
-          <a-input
-            id="storingLocationEdit-name"
-            :maxLength="30"
-            v-model="form.name"
-            placeholder="请输入仓位名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="所属仓库" prop="warehouseSn">
-          <a-select id="storingLocationEdit-warehouseSn" disabled placeholder="请选择所属仓库" allowClear v-model="form.warehouseSn">
-            <a-select-option v-for="item in warehouseList" :key="item.id" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-          </a-select>
-        </a-form-model-item>
-        <a-form-model-item label="排序" prop="sort">
-          <a-input-number
-            v-model="form.sort"
-            :min="0"
-            :max="999999"
-            :precision="0"
-            :step="1"
-            placeholder="请输入排序(0~999999)"
-            style="width: 100%;" />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="storingLocation-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="storingLocation-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="storingLocationEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="仓位名称" prop="name">
+            <a-input
+              id="storingLocationEdit-name"
+              :maxLength="30"
+              v-model="form.name"
+              placeholder="请输入仓位名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="所属仓库" prop="warehouseSn">
+            <a-select id="storingLocationEdit-warehouseSn" disabled placeholder="请选择所属仓库" allowClear v-model="form.warehouseSn">
+              <a-select-option v-for="item in warehouseList" :key="item.id" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+          <a-form-model-item label="排序" prop="sort">
+            <a-input-number
+              v-model="form.sort"
+              :min="0"
+              :max="999999"
+              :precision="0"
+              :step="1"
+              placeholder="请输入排序(0~999999)"
+              style="width: 100%;" />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="storingLocation-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="storingLocation-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -77,6 +79,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 6 },
         labelCol: { span: 6 },
@@ -128,6 +131,7 @@ export default {
             name: this.form.name, //  仓库名称
             name: this.form.name, //  仓库名称
             sort: this.form.sort //  排序
             sort: this.form.sort //  排序
           }
           }
+          _this.spinning = true
           warehouseLocSave(params).then(res => {
           warehouseLocSave(params).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
@@ -135,9 +139,10 @@ export default {
               setTimeout(function () {
               setTimeout(function () {
                 _this.isShow = false
                 _this.isShow = false
                 _this.$refs.ruleForm.resetFields()
                 _this.$refs.ruleForm.resetFields()
+                _this.spinning = false
               }, 300)
               }, 300)
             } else {
             } else {
-
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 6 - 2
src/views/notice/list.vue

@@ -94,7 +94,8 @@ export default {
       if (a !== b && a) {
       if (a !== b && a) {
         // 新未读消息
         // 新未读消息
         if (a.type == 'no_read_count') {
         if (a.type == 'no_read_count') {
-          this.resetSearchForm()
+          this.resetData()
+          this.handelSearch()
         }
         }
       }
       }
     }
     }
@@ -156,6 +157,10 @@ export default {
     },
     },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
+      this.resetData()
+      this.handelSearch(1)
+    },
+    resetData () {
       this.$refs.rangeDate.resetDate()
       this.$refs.rangeDate.resetDate()
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
@@ -164,7 +169,6 @@ export default {
       this.pageSize = 10
       this.pageSize = 10
       this.paginationProps.total = 0
       this.paginationProps.total = 0
       this.paginationProps.current = 1
       this.paginationProps.current = 1
-      this.handelSearch(1)
     },
     },
     //  详情
     //  详情
     handleDetail (row) {
     handleDetail (row) {

+ 31 - 24
src/views/productManagement/productBrand/editModal.vue

@@ -8,31 +8,33 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="productBrandEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="产品品牌名称" prop="brandName">
-          <a-input
-            id="productBrandEdit-brandName"
-            :maxLength="30"
-            v-model.trim="form.brandName"
-            @change="filterEmpty"
-            placeholder="请输入产品品牌名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="product-brand-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="productBrandEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="产品品牌名称" prop="brandName">
+            <a-input
+              id="productBrandEdit-brandName"
+              :maxLength="30"
+              v-model.trim="form.brandName"
+              @change="filterEmpty"
+              placeholder="请输入产品品牌名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="product-brand-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -63,6 +65,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 6 },
         labelCol: { span: 6 },
@@ -98,11 +101,15 @@ export default {
             this.$message.error('品牌名称只能以汉字或字母开头')
             this.$message.error('品牌名称只能以汉字或字母开头')
             return false
             return false
           }
           }
+          _this.spinning = true
           dealerProductBrandSave(formData).then(res => {
           dealerProductBrandSave(formData).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.$emit('ok')
               _this.isShow = false
               _this.isShow = false
+              _this.spinning = false
+            }else{
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 34 - 27
src/views/productManagement/productCategory/editModal.vue

@@ -8,34 +8,36 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="productCategoryEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="所属分类" v-if="parentType">
-          {{ parentType }}
-        </a-form-model-item>
-        <a-form-model-item label="产品分类名称" prop="productTypeName">
-          <a-input
-            v-model.trim="form.productTypeName"
-            @change="filterEmpty"
-            id="productCategoryEdit-name"
-            :maxLength="30"
-            allowClear
-            placeholder="请输入产品分类名称(最多30个字符)" />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="productCategoryEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="所属分类" v-if="parentType">
+            {{ parentType }}
+          </a-form-model-item>
+          <a-form-model-item label="产品分类名称" prop="productTypeName">
+            <a-input
+              v-model.trim="form.productTypeName"
+              @change="filterEmpty"
+              id="productCategoryEdit-name"
+              :maxLength="30"
+              allowClear
+              placeholder="请输入产品分类名称(最多30个字符)" />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -66,6 +68,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 6 },
         labelCol: { span: 6 },
@@ -98,11 +101,15 @@ export default {
           const formData = JSON.parse(JSON.stringify(_this.form))
           const formData = JSON.parse(JSON.stringify(_this.form))
           formData.id = _this.itemId ? _this.itemId : undefined
           formData.id = _this.itemId ? _this.itemId : undefined
           formData.psn = _this.nowData && _this.nowData.psn ? _this.nowData.psn : undefined
           formData.psn = _this.nowData && _this.nowData.psn ? _this.nowData.psn : undefined
+          _this.spinning = true
           dealerProductTypeSave(formData).then(res => {
           dealerProductTypeSave(formData).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.$emit('ok')
               _this.isShow = false
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 138 - 131
src/views/productManagement/productInfo/edit.vue

@@ -6,136 +6,138 @@
         <a id="productInfoEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         <a id="productInfoEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
       </template>
       </template>
     </a-page-header>
     </a-page-header>
-    <a-card size="small" :bordered="false" class="productInfoEdit-table-page-wrapper">
-      <a-form-model
-        id="productInfoEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="产品名称" prop="name">
-          <a-input
-            id="productInfoEdit-name"
-            :maxLength="100"
-            v-model.trim="form.name"
-            @change="filterEmpty"
-            placeholder="请输入产品名称(最多100个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="产品编码" prop="code">
-          <a-input
-            id="productInfoEdit-code"
-            :maxLength="100"
-            :disabled="!!$route.params.id"
-            v-model="form.code"
-            placeholder="请输入产品编码(最多100个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="原厂编码" prop="origCode">
-          <a-input
-            id="productInfoEdit-origCode"
-            :maxLength="200"
-            :disabled="!!$route.params.id"
-            v-model="form.origCode"
-            placeholder="请输入原厂编码(最多200个字符,多个编码用逗号隔开)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="基本单位" prop="unit">
-          <a-input-group compact>
-            <a-input style="width: 80%" v-model="form.unit" id="productInfoEdit-unit-input" placeholder="请输入基本单位" allowClear/>
-            <v-select style="width: 20%" code="UNIT" @change="unitChange" id="productInfoEdit-unit" placeholder="快速选择单位"></v-select>
-          </a-input-group>
-        </a-form-model-item>
-        <a-form-model-item label="产品品牌" prop="productBrandSn">
-          <!-- <a-select
-            id="productInfoEdit-productBrand"
-            placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
-            :disabled="!!$route.params.id"
-            allowClear
-            v-model="form.productBrandSn"
-            :showSearch="true"
-            option-filter-prop="children"
-            :filter-option="filterOption"
-            style="width: 90%;">
-            <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="productInfoEdit-table-page-wrapper">
+        <a-form-model
+          id="productInfoEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="产品名称" prop="name">
+            <a-input
+              id="productInfoEdit-name"
+              :maxLength="100"
+              v-model.trim="form.name"
+              @change="filterEmpty"
+              placeholder="请输入产品名称(最多100个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="产品编码" prop="code">
+            <a-input
+              id="productInfoEdit-code"
+              :maxLength="100"
+              :disabled="!!$route.params.id"
+              v-model="form.code"
+              placeholder="请输入产品编码(最多100个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="原厂编码" prop="origCode">
+            <a-input
+              id="productInfoEdit-origCode"
+              :maxLength="200"
+              :disabled="!!$route.params.id"
+              v-model="form.origCode"
+              placeholder="请输入原厂编码(最多200个字符,多个编码用逗号隔开)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="基本单位" prop="unit">
+            <a-input-group compact>
+              <a-input style="width: 80%" v-model="form.unit" id="productInfoEdit-unit-input" placeholder="请输入基本单位" allowClear/>
+              <v-select style="width: 20%" code="UNIT" @change="unitChange" id="productInfoEdit-unit" placeholder="快速选择单位"></v-select>
+            </a-input-group>
+          </a-form-model-item>
+          <a-form-model-item label="产品品牌" prop="productBrandSn">
+            <!-- <a-select
+          id="productInfoEdit-productBrand"
+          placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
+          :disabled="!!$route.params.id"
+          allowClear
+          v-model="form.productBrandSn"
+          :showSearch="true"
+          option-filter-prop="children"
+          :filter-option="filterOption"
+          style="width: 90%;">
+          <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
           </a-select> -->
           </a-select> -->
-          <a-select
-            show-search
-            id="productInfoEdit-productBrand"
-            v-model="form.productBrandSn"
-            placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
-            :disabled="!!$route.params.id"
-            :filter-option="false"
-            :not-found-content="fetching ? undefined : null"
-            @search="fetchUser"
-            @change="handleChange"
-            style="width: 90%;"
-          >
-            <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-            <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
-          </a-select>
-          <a-button
-            @click="openModal=true"
-            :disabled="!!$route.params.id"
-            icon="plus"
-            size="small"
-            id="productInfoEdit-add-btn"
-            style="margin-left: 5px;"></a-button>
-        </a-form-model-item>
-        <a-form-model-item label="产品分类" prop="productType">
-          <a-cascader
-            :disabled="!!$route.params.id"
-            @change="changeProductType"
-            expand-trigger="hover"
-            :options="productTypeList"
-            :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-            id="productInfoEdit-productType"
-            placeholder="请选择产品分类"
-            allowClear
-            v-model="form.productType" />
-        </a-form-model-item>
-        <a-form-model-item label="经销批发价" prop="specialPrice">
-          <a-input-number
-            id="productInfoEdit-specialPrice"
-            v-model="form.specialPrice"
-            :min="1"
-            :max="999999"
-            :precision="2"
-            style="width: 90%;margin-right: 5px;"
-            placeholder="请输入经销批发价(1~999999)"
-            allowClear /><span>元</span>
-        </a-form-model-item>
-        <a-form-model-item label="终端价" prop="terminalPrice">
-          <a-input-number
-            id="productInfoEdit-terminalPrice"
-            v-model="form.terminalPrice"
-            :min="1"
-            :max="999999"
-            :precision="2"
-            style="width: 90%;margin-right: 5px;"
-            placeholder="请输入终端价(1~999999)"
-            allowClear /><span>元</span>
-        </a-form-model-item>
-        <a-form-model-item label="车主价" prop="carOwnersPrice">
-          <a-input-number
-            id="productInfoEdit-carOwnersPrice"
-            v-model="form.carOwnersPrice"
-            :min="1"
-            :max="999999"
-            :precision="2"
-            style="width: 90%;margin-right: 5px;"
-            placeholder="请输入车主价(1~999999)"
-            allowClear /><span>元</span>
-        </a-form-model-item>
-        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-          <a-button type="primary" @click="handleSubmit" size="large" id="productInfoEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
-        </a-form-model-item>
-      </a-form-model>
-      <!-- 新增/编辑产品品牌 -->
-      <product-brand-edit-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
-    </a-card>
+            <a-select
+              show-search
+              id="productInfoEdit-productBrand"
+              v-model="form.productBrandSn"
+              placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
+              :disabled="!!$route.params.id"
+              :filter-option="false"
+              :not-found-content="fetching ? undefined : null"
+              @search="fetchUser"
+              @change="handleChange"
+              style="width: 90%;"
+            >
+              <a-spin v-if="fetching" slot="notFoundContent" size="small" />
+              <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
+            </a-select>
+            <a-button
+              @click="openModal=true"
+              :disabled="!!$route.params.id"
+              icon="plus"
+              size="small"
+              id="productInfoEdit-add-btn"
+              style="margin-left: 5px;"></a-button>
+          </a-form-model-item>
+          <a-form-model-item label="产品分类" prop="productType">
+            <a-cascader
+              :disabled="!!$route.params.id"
+              @change="changeProductType"
+              expand-trigger="hover"
+              :options="productTypeList"
+              :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+              id="productInfoEdit-productType"
+              placeholder="请选择产品分类"
+              allowClear
+              v-model="form.productType" />
+          </a-form-model-item>
+          <a-form-model-item label="经销批发价" prop="specialPrice">
+            <a-input-number
+              id="productInfoEdit-specialPrice"
+              v-model="form.specialPrice"
+              :min="1"
+              :max="999999"
+              :precision="2"
+              style="width: 90%;margin-right: 5px;"
+              placeholder="请输入经销批发价(1~999999)"
+              allowClear /><span>元</span>
+          </a-form-model-item>
+          <a-form-model-item label="终端价" prop="terminalPrice">
+            <a-input-number
+              id="productInfoEdit-terminalPrice"
+              v-model="form.terminalPrice"
+              :min="1"
+              :max="999999"
+              :precision="2"
+              style="width: 90%;margin-right: 5px;"
+              placeholder="请输入终端价(1~999999)"
+              allowClear /><span>元</span>
+          </a-form-model-item>
+          <a-form-model-item label="车主价" prop="carOwnersPrice">
+            <a-input-number
+              id="productInfoEdit-carOwnersPrice"
+              v-model="form.carOwnersPrice"
+              :min="1"
+              :max="999999"
+              :precision="2"
+              style="width: 90%;margin-right: 5px;"
+              placeholder="请输入车主价(1~999999)"
+              allowClear /><span>元</span>
+          </a-form-model-item>
+          <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+            <a-button type="primary" @click="handleSubmit" size="large" id="productInfoEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
+          </a-form-model-item>
+        </a-form-model>
+        <!-- 新增/编辑产品品牌 -->
+        <product-brand-edit-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+      </a-card>
+    </a-spin>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -150,6 +152,7 @@ export default {
   components: { STable, VSelect, productBrandEditModal },
   components: { STable, VSelect, productBrandEditModal },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 4 },
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
         wrapperCol: { span: 16 }
@@ -193,10 +196,10 @@ export default {
       this.fetching = true
       this.fetching = true
       dealerProductBrandQuery({ 'sysFlag': '0', 'queryWord': value }).then(res => {
       dealerProductBrandQuery({ 'sysFlag': '0', 'queryWord': value }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
-          this.productBrandList = res.data
+          this.productBrandList = res.data || []
           this.fetching = false
           this.fetching = false
         } else {
         } else {
-          this.dealerData = []
+          this.productBrandList = []
           this.fetching = false
           this.fetching = false
         }
         }
       })
       })
@@ -244,12 +247,16 @@ export default {
           const form = JSON.parse(JSON.stringify(_this.form))
           const form = JSON.parse(JSON.stringify(_this.form))
           form.id = _this.$route.params.id ? _this.$route.params.id : undefined
           form.id = _this.$route.params.id ? _this.$route.params.id : undefined
           delete form.productType
           delete form.productType
+          _this.spinning = true
           dealerProductSave(form).then(res => {
           dealerProductSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               setTimeout(() => {
               setTimeout(() => {
                 _this.$router.push({ path: '/productManagement/productInfo/list' })
                 _this.$router.push({ path: '/productManagement/productInfo/list' })
+                _this.spinning = false
               }, 1000)
               }, 1000)
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 56 - 52
src/views/purchasingManagement/purchaseOrder/basicInfoModal.vue

@@ -8,40 +8,41 @@
     v-model="isShow"
     v-model="isShow"
     @cancel="cancel"
     @cancel="cancel"
     :width="800">
     :width="800">
-    <a-form-model
-      id="purchaseOrder-basicInfo-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol" >
-      <a-form-model-item label="供应商" prop="purchaseTragetType">
-        <a-radio-group
-          name="radioGroup"
-          v-model="form.purchaseTragetType"
-          @change="tragetTypeChange"
-          id="purchaseOrder-basicInfo-purchaseTragetType" >
-          <a-radio value="HQ" class="radio-s">箭冠营销中心</a-radio>
-          <a-radio value="HU" class="radio-s" v-if="purchaseTragetType&&purchaseTragetType.dealerSn">{{ purchaseTragetType.dealerName }}</a-radio>
-        </a-radio-group>
-      </a-form-model-item>
-      <a-form-model-item label="支付方式" prop="settleStyleSn">
-        <a-select placeholder="请选择支付方式" v-model="form.settleStyleSn">
-          <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
-            {{ item.name }}
-          </a-select-option>
-        </a-select>
-      </a-form-model-item>
-      <a-form-model-item>
-        <span slot="label"><i style="color: red;">*</i> 收货地址</span>
-        {{ chooseAddr }}
-        <a-button type="link" id="purchaseOrder-basicInfo-chooseAddr" @click="handleChoose">{{ addressVal }} >></a-button>
-      </a-form-model-item>
-      <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-        <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
-        <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
-      </a-form-model-item>
-    </a-form-model>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="purchaseOrder-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol" >
+        <a-form-model-item label="供应商" prop="purchaseTargetSn">
+          <a-radio-group
+            name="radioGroup"
+            v-model="form.purchaseTargetSn"
+            @change="tragetTypeChange"
+            id="purchaseOrder-basicInfo-purchaseTargetSn" >
+            <a-radio v-for="item in purchaseTragetType" :key="item.purchaseTargetSn" :value="item.purchaseTargetSn" class="radio-s">{{ item.purchaseTargetName }}</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+        <a-form-model-item label="支付方式" prop="settleStyleSn">
+          <a-select placeholder="请选择支付方式" v-model="form.settleStyleSn">
+            <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
+              {{ item.name }}
+            </a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item>
+          <span slot="label"><i style="color: red;">*</i> 收货地址</span>
+          {{ chooseAddr }}
+          <a-button type="link" id="purchaseOrder-basicInfo-chooseAddr" @click="handleChoose">{{ addressVal }} >></a-button>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+          <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
     <!-- 选择地址 -->
     <!-- 选择地址 -->
     <choose-address-modal :openModal="openAddrModal" @ok="handleOk" @close="openAddrModal=false" />
     <choose-address-modal :openModal="openAddrModal" @ok="handleOk" @close="openAddrModal=false" />
   </a-modal>
   </a-modal>
@@ -52,7 +53,7 @@ import { VSelect } from '@/components'
 import chooseAddressModal from './receivingAddress/chooseAddressModal.vue'
 import chooseAddressModal from './receivingAddress/chooseAddressModal.vue'
 import { settleStyleQueryAll } from '@/api/settleStyle'
 import { settleStyleQueryAll } from '@/api/settleStyle'
 import { shippingAddressQuery } from '@/api/shippingAddress'
 import { shippingAddressQuery } from '@/api/shippingAddress'
-import { purchaseSave, getParentDealer } from '@/api/purchase'
+import { purchaseSave, purchaseTargetList } from '@/api/purchase'
 export default {
 export default {
   name: 'BasicInfoModal',
   name: 'BasicInfoModal',
   components: { VSelect, chooseAddressModal },
   components: { VSelect, chooseAddressModal },
@@ -64,6 +65,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       confirmLoading: false,
       confirmLoading: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       settleStyleList: [], // 支付方式
       settleStyleList: [], // 支付方式
@@ -72,7 +74,7 @@ export default {
         wrapperCol: { span: 18 }
         wrapperCol: { span: 18 }
       },
       },
       form: {
       form: {
-        purchaseTragetType: '', // 供应商
+        purchaseTargetType: '', // 供应商
         shippingAddressProvinceName: '', // 省
         shippingAddressProvinceName: '', // 省
         shippingAddressCityName: '', // 市
         shippingAddressCityName: '', // 市
         shippingAddressCountyName: '', // 区
         shippingAddressCountyName: '', // 区
@@ -80,20 +82,18 @@ export default {
         consigneeTel: '', // 联系电话
         consigneeTel: '', // 联系电话
         consigneeName: '', // 联系人名称
         consigneeName: '', // 联系人名称
         settleStyleSn: undefined, //  支付方式
         settleStyleSn: undefined, //  支付方式
-        dealerSn: '',
-        dealerName: ''
+        purchaseTargetSn: undefined,
+        purchaseTargetName: ''
       },
       },
       rules: {
       rules: {
-        purchaseTragetType: [
+        purchaseTargetSn: [
           { required: true, message: '请选择供应商', trigger: 'change' }
           { required: true, message: '请选择供应商', trigger: 'change' }
         ],
         ],
         settleStyleSn: [
         settleStyleSn: [
           { required: true, message: '请选择支付方式', trigger: 'change' }
           { required: true, message: '请选择支付方式', trigger: 'change' }
         ]
         ]
       },
       },
-      purchaseTragetType: {
-        dealerName: ''
-      },
+      purchaseTragetType: [],
       addressVal: '选择地址', //  选择地址/更换地址
       addressVal: '选择地址', //  选择地址/更换地址
       chooseAddr: '', //  当前已选地址信息
       chooseAddr: '', //  当前已选地址信息
       openAddrModal: false // 选择地址弹框是否显示
       openAddrModal: false // 选择地址弹框是否显示
@@ -110,17 +110,17 @@ export default {
       this.form.shippingAddress = ''// 详细地址
       this.form.shippingAddress = ''// 详细地址
       this.form.consigneeTel = '' // 联系电话
       this.form.consigneeTel = '' // 联系电话
       this.form.consigneeName = ''
       this.form.consigneeName = ''
-      this.form.dealerSn = ''
-      this.form.dealerName = ''
+      this.form.purchaseTargetType = ''
+      this.form.purchaseTargetSn = undefined
+      this.form.purchaseTargetName = ''
     },
     },
     // 供应商change
     // 供应商change
     tragetTypeChange (e) {
     tragetTypeChange (e) {
-      if (e.target.value == 'HQ') { //  总部
-        this.form.dealerSn = ''
-        this.form.dealerName = '箭冠营销中心'
-      } else if (e.target.value == 'HU') { //  上级
-        this.form.dealerSn = this.purchaseTragetType.dealerSn
-        this.form.dealerName = this.purchaseTragetType.dealerName
+      const val = e.target.value
+      const ind = this.purchaseTragetType.findIndex(item => item.purchaseTargetSn == val)
+      if (ind != -1) {
+        this.form.purchaseTargetType = this.purchaseTragetType[ind].purchaseTargetType
+        this.form.purchaseTargetName = this.purchaseTragetType[ind].purchaseTargetName
       }
       }
     },
     },
     //  保存
     //  保存
@@ -133,10 +133,14 @@ export default {
             _this.$message.info('请选择收货地址')
             _this.$message.info('请选择收货地址')
             return false
             return false
           }
           }
+          _this.spinning = true
           purchaseSave(_this.form).then(res => {
           purchaseSave(_this.form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.isShow = false
               _this.isShow = false
               _this.$emit('ok', res.data)
               _this.$emit('ok', res.data)
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
             }
             _this.$message.info(res.message)
             _this.$message.info(res.message)
           })
           })
@@ -180,11 +184,11 @@ export default {
       })
       })
     },
     },
     getParentDealer () {
     getParentDealer () {
-      getParentDealer({}).then(res => {
+      purchaseTargetList({}).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.purchaseTragetType = res.data
           this.purchaseTragetType = res.data
         } else {
         } else {
-          this.purchaseTragetType = { dealerName: '' }
+          this.purchaseTragetType = []
         }
         }
       })
       })
     },
     },

+ 133 - 128
src/views/purchasingManagement/purchaseOrder/detail.vue

@@ -1,133 +1,135 @@
 <template>
 <template>
   <div class="purchaseOrderDetail-wrap">
   <div class="purchaseOrderDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="purchaseOrderDetail-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="purchaseOrderDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span class="billno">单号:{{ detail&&detail.purchaseBillNo }}</span>
-        <a-tag color="blue">{{ detail&&detail.billStatusDictValue }}</a-tag>
-        <a-tag color="orange">{{ detail&&detail.financialStatusDictValue }}</a-tag>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="purchaseOrderDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="purchaseOrderDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="purchaseOrderDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="供应商">{{ (detail&&detail.dealerName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="支付方式">{{ detail&&detail.settleStyleEntity.name }}</a-descriptions-item>
-            <a-descriptions-item label="采购员工">{{ detail&&detail.operatorName }}</a-descriptions-item>
-            <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName }}<span v-if="detail&&detail.consigneeTel">({{ detail&&detail.consigneeTel }})</span></a-descriptions-item>
-            <a-descriptions-item label="收货地址">
-              {{ detail&&detail.shippingAddressProvinceName }}
-              {{ detail&&detail.shippingAddressCityName }}
-              {{ detail&&detail.shippingAddressCountyName }}
-              {{ detail&&detail.shippingAddress }}
-            </a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 产品详情 -->
-    <a-card size="small" :bordered="false" class="purchaseOrderDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="产品详情">
-          <!-- 总计 -->
-          <a-alert type="info" showIcon style="margin-bottom:15px">
-            <div slot="message">
-              产品款数:<strong>{{ detail ? ((detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--') : '--' }}</strong>,
-              采购数量合计:<strong>{{ detail ? ((detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--') : '--' }}</strong>,
-              已收货数量:<strong>{{ detail ? ((detail.totalPutQty || detail.totalPutQty==0) ? detail.totalPutQty : '--') : '--' }}</strong>,
-              待收货数量:<strong>{{ detail ? ((detail.totalWaitPutQty || detail.totalWaitPutQty==0) ? detail.totalWaitPutQty : '--') : '--' }}</strong>,
-              取消数量:<strong>{{ detail ? ((detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--') : '--' }}</strong>,
-              采购金额合计:¥<strong>{{ detail ? ((detail.discountedAmount || detail.discountedAmount==0) ? detail.discountedAmount : '--') : '--' }}</strong>,
-              已收货金额:¥<strong>{{ detail ? ((detail.totalPutAmount || detail.totalPutAmount==0) ? detail.totalPutAmount : '--') : '--' }}</strong>,
-              待收货金额:¥<strong>{{ detail ? ((detail.totalWaitPutAmount || detail.totalWaitPutAmount==0) ? detail.totalWaitPutAmount : '--') : '--' }}</strong>,
-              取消金额:¥<strong>{{ detail ? ((detail.totalCancelAmount || detail.totalCancelAmount==0) ? detail.totalCancelAmount : '--') : '--' }}</strong>
-            </div>
-          </a-alert>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :scroll="{ x: 1480 }"
-            bordered>
-            <!-- 采购数量 -->
-            <template slot="origqty" slot-scope="text, record">
-              <div>{{ text }}</div>
-              <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
-            </template>
-            <!-- 缺货数量 -->
-            <template slot="outOfStockNum" slot-scope="text, record">
-              <span>{{ record.outOfStockNum }}</span>
-            </template>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 促销品详情 -->
-    <a-card size="small" v-if="false" :bordered="false" class="purchaseOrderDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="促销品详情">
-          <!-- 总计 -->
-          <a-alert type="info" showIcon style="margin-bottom:15px">
-            <div slot="message">产品款数 <strong>{{ detail&&detail.totalCategory }}</strong> ,
-              采购数量合计 <strong>{{ detail&&detail.totalQty }}</strong> ,
-              采购金额合计¥<strong>{{ detail&&detail.totalAmount }}</strong></div>
-          </a-alert>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table-1"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :scroll="{ x: 1060 }"
-            bordered>
-            <!-- 采购数量 -->
-            <template slot="origqty" slot-scope="text, record">
-              <div>{{ text }}</div>
-              <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
-            </template>
-            <!-- 缺货数量 -->
-            <template slot="outOfStockNum" slot-scope="text, record">
-              <span>{{ record.outOfStockNum }}</span>
-            </template>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 单据记录 -->
-    <a-card size="small" v-show="false" :bordered="false" class="purchaseOrderDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="单据记录">
-          <a-timeline class="timeline-box">
-            <a-timeline-item>2021-02-01 15:22:38   王凯   审核通过</a-timeline-item>
-            <a-timeline-item>
-              <p>2021-02-01 15:22:38   王凯   审核通过</p>
-              <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
-              <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
-            </a-timeline-item>
-            <a-timeline-item>Technical testing 2015-09-01</a-timeline-item>
-            <a-timeline-item>Network problems being solved 2015-09-01</a-timeline-item>
-          </a-timeline>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="purchaseOrderDetail-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseOrderDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span class="billno">单号:{{ detail&&detail.purchaseBillNo }}</span>
+          <a-tag color="blue">{{ detail&&detail.billStatusDictValue }}</a-tag>
+          <a-tag color="orange">{{ detail&&detail.financialStatusDictValue }}</a-tag>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="purchaseOrderDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="purchaseOrderDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="purchaseOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="供应商">{{ (detail&&detail.purchaseTargetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="支付方式">{{ detail&&detail.settleStyleEntity.name }}</a-descriptions-item>
+              <a-descriptions-item label="采购员工">{{ detail&&detail.operatorName }}</a-descriptions-item>
+              <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName }}<span v-if="detail&&detail.consigneeTel">({{ detail&&detail.consigneeTel }})</span></a-descriptions-item>
+              <a-descriptions-item label="收货地址">
+                {{ detail&&detail.shippingAddressProvinceName }}
+                {{ detail&&detail.shippingAddressCityName }}
+                {{ detail&&detail.shippingAddressCountyName }}
+                {{ detail&&detail.shippingAddress }}
+              </a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 产品详情 -->
+      <a-card size="small" :bordered="false" class="purchaseOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="产品详情">
+            <!-- 总计 -->
+            <a-alert type="info" showIcon style="margin-bottom:15px">
+              <div slot="message">
+                产品款数:<strong>{{ detail ? ((detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--') : '--' }}</strong>,
+                采购数量合计:<strong>{{ detail ? ((detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--') : '--' }}</strong>,
+                已收货数量:<strong>{{ detail ? ((detail.totalPutQty || detail.totalPutQty==0) ? detail.totalPutQty : '--') : '--' }}</strong>,
+                待收货数量:<strong>{{ detail ? ((detail.totalWaitPutQty || detail.totalWaitPutQty==0) ? detail.totalWaitPutQty : '--') : '--' }}</strong>,
+                取消数量:<strong>{{ detail ? ((detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--') : '--' }}</strong>,
+                采购金额合计:¥<strong>{{ detail ? ((detail.discountedAmount || detail.discountedAmount==0) ? detail.discountedAmount : '--') : '--' }}</strong>,
+                已收货金额:¥<strong>{{ detail ? ((detail.totalPutAmount || detail.totalPutAmount==0) ? detail.totalPutAmount : '--') : '--' }}</strong>,
+                待收货金额:¥<strong>{{ detail ? ((detail.totalWaitPutAmount || detail.totalWaitPutAmount==0) ? detail.totalWaitPutAmount : '--') : '--' }}</strong>,
+                取消金额:¥<strong>{{ detail ? ((detail.totalCancelAmount || detail.totalCancelAmount==0) ? detail.totalCancelAmount : '--') : '--' }}</strong>
+              </div>
+            </a-alert>
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="columns"
+              :data="loadData"
+              :scroll="{ x: 1480 }"
+              bordered>
+              <!-- 采购数量 -->
+              <template slot="origqty" slot-scope="text, record">
+                <div>{{ text }}</div>
+                <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
+              </template>
+              <!-- 缺货数量 -->
+              <template slot="outOfStockNum" slot-scope="text, record">
+                <span>{{ record.outOfStockNum }}</span>
+              </template>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 促销品详情 -->
+      <a-card size="small" v-if="false" :bordered="false" class="purchaseOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="促销品详情">
+            <!-- 总计 -->
+            <a-alert type="info" showIcon style="margin-bottom:15px">
+              <div slot="message">产品款数 <strong>{{ detail&&detail.totalCategory }}</strong> ,
+                采购数量合计 <strong>{{ detail&&detail.totalQty }}</strong> ,
+                采购金额合计¥<strong>{{ detail&&detail.totalAmount }}</strong></div>
+            </a-alert>
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table-1"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="columns"
+              :data="loadData"
+              :scroll="{ x: 1060 }"
+              bordered>
+              <!-- 采购数量 -->
+              <template slot="origqty" slot-scope="text, record">
+                <div>{{ text }}</div>
+                <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
+              </template>
+              <!-- 缺货数量 -->
+              <template slot="outOfStockNum" slot-scope="text, record">
+                <span>{{ record.outOfStockNum }}</span>
+              </template>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 单据记录 -->
+      <a-card size="small" v-show="false" :bordered="false" class="purchaseOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="单据记录">
+            <a-timeline class="timeline-box">
+              <a-timeline-item>2021-02-01 15:22:38   王凯   审核通过</a-timeline-item>
+              <a-timeline-item>
+                <p>2021-02-01 15:22:38   王凯   审核通过</p>
+                <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
+                <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
+              </a-timeline-item>
+              <a-timeline-item>Technical testing 2015-09-01</a-timeline-item>
+              <a-timeline-item>Network problems being solved 2015-09-01</a-timeline-item>
+            </a-timeline>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -141,6 +143,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       // 表头
       // 表头
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
@@ -192,7 +195,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       purchaseDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       purchaseDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 209 - 199
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -1,203 +1,205 @@
 <template>
 <template>
   <div class="purchaseOrderEdit-wrap">
   <div class="purchaseOrderEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="purchaseOrderEdit-cont">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <p class="billno">单号:{{ detail&&detail.purchaseBillNo }}</p>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="purchaseOrderEdit-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="purchaseOrderEdit-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            基础信息
-            <a-button
-              type="primary"
-              shape="circle"
-              size="small"
-              icon="edit"
-              class="edit-circle-btn"
-              id="purchaseOrderEdit-edit-circle-btn"
-              @click.stop="handleEditInfo" />
-          </template>
-          <a-descriptions :column="2">
-            <a-descriptions-item label="供应商">{{ detail&&detail.dealerName }}</a-descriptions-item>
-            <a-descriptions-item label="支付方式">{{ detail&&detail.settleStyleEntity.name }}</a-descriptions-item>
-            <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName }}({{ detail&&detail.consigneeTel }})</a-descriptions-item>
-            <a-descriptions-item label="收货地址">
-              {{ detail&&detail.shippingAddressProvinceName }} -
-              {{ detail&&detail.shippingAddressCityName }} -
-              {{ detail&&detail.shippingAddressCountyName }} -
-              {{ detail&&detail.shippingAddress }}
-            </a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 选择产品 -->
-    <a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            选择产品<span class="sub-title">①输入查询条件--->②查找到需要采购的产品--->③录入采购数量--->④点击“添加”</span>
-            <p class="tag-txt">注意:仅限采购【箭冠】产品。自建产品的采购入库请使用“散件入库”功能</p>
-          </template>
-          <!-- 选择产品 -->
-          <div>
-            <!-- 搜索条件 -->
-            <div class="table-page-search-wrapper">
-              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                <a-row :gutter="15">
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="关键词">
-                      <a-input id="purchaseOrderEdit-bundleName" v-model.trim="queryParam.queryWord" allowClear placeholder="产品名称/产品编码/原厂编码/适用车型"/>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品品牌">
-                      <ProductBrand id="purchaseOrderEdit-productBrand" v-model="queryParam.productBrandSn"></ProductBrand>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品类别">
-                      <ProductType id="purchaseOrderEdit-productType" @change="changeProductType" v-model="productType"></ProductType>
-                    </a-form-item>
-                  </a-col>
-                  <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="purchaseOrderEdit-cont">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <p class="billno">单号:{{ detail&&detail.purchaseBillNo }}</p>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="purchaseOrderEdit-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="purchaseOrderEdit-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1">
+            <template slot="header">
+              基础信息
+              <a-button
+                type="primary"
+                shape="circle"
+                size="small"
+                icon="edit"
+                class="edit-circle-btn"
+                id="purchaseOrderEdit-edit-circle-btn"
+                @click.stop="handleEditInfo" />
+            </template>
+            <a-descriptions :column="2">
+              <a-descriptions-item label="供应商">{{ detail&&detail.purchaseTargetName }}</a-descriptions-item>
+              <a-descriptions-item label="支付方式">{{ detail&&detail.settleStyleEntity.name }}</a-descriptions-item>
+              <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName }}({{ detail&&detail.consigneeTel }})</a-descriptions-item>
+              <a-descriptions-item label="收货地址">
+                {{ detail&&detail.shippingAddressProvinceName }} -
+                {{ detail&&detail.shippingAddressCityName }} -
+                {{ detail&&detail.shippingAddressCountyName }} -
+                {{ detail&&detail.shippingAddress }}
+              </a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 选择产品 -->
+      <a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1">
+            <template slot="header">
+              选择产品<span class="sub-title">①输入查询条件--->②查找到需要采购的产品--->③录入采购数量--->④点击“添加”</span>
+              <p class="tag-txt">注意:仅限采购【箭冠】产品。自建产品的采购入库请使用“散件入库”功能</p>
+            </template>
+            <!-- 选择产品 -->
+            <div>
+              <!-- 搜索条件 -->
+              <div class="table-page-search-wrapper">
+                <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+                  <a-row :gutter="15">
                     <a-col :md="6" :sm="24">
                     <a-col :md="6" :sm="24">
-                      <a-form-item label="适用车型">
-                        <a-cascader
-                          :options="typeData"
-                          expand-trigger="hover"
-                          id="purchaseOrderEdit-state"
-                          placeholder="请选择适用车型"
-                          allowClear
-                          v-model="queryParam.brand" />
+                      <a-form-item label="关键词">
+                        <a-input id="purchaseOrderEdit-bundleName" v-model.trim="queryParam.queryWord" allowClear placeholder="产品名称/产品编码/原厂编码/适用车型"/>
                       </a-form-item>
                       </a-form-item>
                     </a-col>
                     </a-col>
-                  </template>
-                  <a-col :md="6" :sm="24">
-                    <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
-                    <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 8px">
-                      {{ advanced ? '收起' : '展开' }}
-                      <a-icon :type="advanced ? 'up' : 'down'"/>
-                    </a>
-                  </a-col>
-                </a-row>
-              </a-form>
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="产品品牌">
+                        <ProductBrand id="purchaseOrderEdit-productBrand" v-model="queryParam.productBrandSn"></ProductBrand>
+                      </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="产品分类">
+                        <ProductType id="purchaseOrderEdit-productType" @change="changeProductType" v-model="productType"></ProductType>
+                      </a-form-item>
+                    </a-col>
+                    <!-- <template v-if="advanced">
+                      <a-col :md="6" :sm="24">
+                        <a-form-item label="适用车型">
+                          <a-cascader
+                            :options="typeData"
+                            expand-trigger="hover"
+                            id="purchaseOrderEdit-state"
+                            placeholder="请选择适用车型"
+                            allowClear
+                            v-model="queryParam.brand" />
+                        </a-form-item>
+                      </a-col>
+                    </template> -->
+                    <a-col :md="6" :sm="24">
+                      <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
+                      <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
+                      <!-- <a @click="advanced=!advanced" style="margin-left: 8px">
+                        {{ advanced ? '收起' : '展开' }}
+                        <a-icon :type="advanced ? 'up' : 'down'"/>
+                      </a> -->
+                    </a-col>
+                  </a-row>
+                </a-form>
+              </div>
+              <!-- 列表 -->
+              <s-table
+                class="sTable"
+                ref="table"
+                size="small"
+                :rowKey="(record) => record.id"
+                :columns="columns"
+                :data="loadData"
+                :scroll="{ x: 1190, y:300 }"
+                :defaultLoadData="false"
+                bordered>
+                <!-- 采购数量 -->
+                <template slot="storageQuantity" slot-scope="text, record">
+                  <a-input-number
+                    v-model="record.qty"
+                    :precision="0"
+                    :min="0"
+                    :max="999999"
+                    placeholder="请输入数量" />
+                </template>
+                <!-- 操作 -->
+                <template slot="action" slot-scope="text, record">
+                  <a-button
+                    size="small"
+                    type="primary"
+                    class="button-info"
+                    :loading="addLoading"
+                    @click="handleAdd(record,0)"
+                    :disabled="record.purchasePrice<=0"
+                    id="purchaseOrderEdit-add-btn">添加</a-button>
+                </template>
+              </s-table>
+            </div>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 已选产品 -->
+      <a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1">
+            <template slot="header">
+              已选产品
+              <!-- <a-button size="small" class="import-btn" id="purchaseOrderEdit-import-btn" @click.stop="handleImport">导入明细</a-button> -->
+            </template>
+            <!-- 已选产品 -->
+            <div>
+              <!-- 总计 -->
+              <a-alert type="info" showIcon style="margin-bottom:15px">
+                <div slot="message">产品款数 <strong>{{ detail ? ((detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--') : '--' }}</strong> ,
+                  采购数量合计 <strong>{{ detail ? ((detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--') : '--' }}</strong> ,
+                  采购金额合计¥<strong>{{ detail ? ((detail.discountedAmount || detail.discountedAmount==0) ? detail.discountedAmount : '--') : '--' }}</strong></div>
+              </a-alert>
+              <!-- 列表 -->
+              <s-table
+                class="sTable"
+                ref="purchaseTable"
+                size="small"
+                :rowKey="(record) => record.id"
+                :columns="chooseColumns"
+                :data="chooseLoadData"
+                :scroll="{ x: 1070, y: 300 }"
+                bordered>
+                <!-- 采购数量 -->
+                <template slot="storageQuantity" slot-scope="text, record">
+                  <a-input-number
+                    id="purchaseOrderEdit-qty"
+                    v-model="record.qty"
+                    :precision="0"
+                    :min="1"
+                    :max="999999"
+                    @blur="e => qtyBlur(e.target.value, record)"
+                    placeholder="请输入" />
+                </template>
+                <!-- 操作 -->
+                <template slot="action" slot-scope="text, record">
+                  <a-button
+                    size="small"
+                    type="primary"
+                    class="button-error"
+                    :loading="delLoading"
+                    @click="handleDel(record)"
+                    id="purchaseOrderEdit-del-btn">删除</a-button>
+                </template>
+              </s-table>
             </div>
             </div>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="table"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="columns"
-              :data="loadData"
-              :scroll="{ x: 1190, y:300 }"
-              :defaultLoadData="false"
-              bordered>
-              <!-- 采购数量 -->
-              <template slot="storageQuantity" slot-scope="text, record">
-                <a-input-number
-                  v-model="record.qty"
-                  :precision="0"
-                  :min="0"
-                  :max="999999"
-                  placeholder="请输入数量" />
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button
-                  size="small"
-                  type="primary"
-                  class="button-info"
-                  :loading="addLoading"
-                  @click="handleAdd(record,0)"
-                  :disabled="record.purchasePrice<=0"
-                  id="purchaseOrderEdit-add-btn">添加</a-button>
-              </template>
-            </s-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            已选产品
-            <!-- <a-button size="small" class="import-btn" id="purchaseOrderEdit-import-btn" @click.stop="handleImport">导入明细</a-button> -->
-          </template>
-          <!-- 已选产品 -->
-          <div>
-            <!-- 总计 -->
-            <a-alert type="info" showIcon style="margin-bottom:15px">
-              <div slot="message">产品款数 <strong>{{ detail ? ((detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--') : '--' }}</strong> ,
-                采购数量合计 <strong>{{ detail ? ((detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--') : '--' }}</strong> ,
-                采购金额合计¥<strong>{{ detail ? ((detail.discountedAmount || detail.discountedAmount==0) ? detail.discountedAmount : '--') : '--' }}</strong></div>
-            </a-alert>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="purchaseTable"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="chooseColumns"
-              :data="chooseLoadData"
-              :scroll="{ x: 1070, y: 300 }"
-              bordered>
-              <!-- 采购数量 -->
-              <template slot="storageQuantity" slot-scope="text, record">
-                <a-input-number
-                  id="purchaseOrderEdit-qty"
-                  v-model="record.qty"
-                  :precision="0"
-                  :min="1"
-                  :max="999999"
-                  @blur="e => qtyBlur(e.target.value, record)"
-                  placeholder="请输入" />
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button
-                  size="small"
-                  type="primary"
-                  class="button-error"
-                  :loading="delLoading"
-                  @click="handleDel(record)"
-                  id="purchaseOrderEdit-del-btn">删除</a-button>
-              </template>
-            </s-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0" v-if="detail">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="purchaseOrderEdit-submit-btn"
-          size="large"
-          class="button-primary"
-          :loading="subLoading"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-affix :offset-bottom="0" v-if="detail">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            id="purchaseOrderEdit-submit-btn"
+            size="large"
+            class="button-primary"
+            :loading="subLoading"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <!-- 选择基本信息弹框 -->
     <!-- 选择基本信息弹框 -->
     <basic-info-modal ref="baseInfo" :openModal="openModal" @ok="handleOk" @cancel="openModal=false" />
     <basic-info-modal ref="baseInfo" :openModal="openModal" @ok="handleOk" @cancel="openModal=false" />
     <!-- 打印 -->
     <!-- 打印 -->
@@ -217,6 +219,7 @@ export default {
   components: { STable, VSelect, basicInfoModal, ProductType, ProductBrand },
   components: { STable, VSelect, basicInfoModal, ProductType, ProductBrand },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       openModal: false, // 选择基本信息弹框是否显示
       openModal: false, // 选择基本信息弹框是否显示
       detail: null, // 详细信息
       detail: null, // 详细信息
       subLoading: false,
       subLoading: false,
@@ -226,13 +229,11 @@ export default {
       queryParam: {
       queryParam: {
         productBrandSn: undefined,
         productBrandSn: undefined,
         queryWord: '',
         queryWord: '',
-        brand: '',
         productTypeSn1: '', //  产品一级分类
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '' //  产品三级分类
         productTypeSn3: '' //  产品三级分类
       },
       },
-      brandData: [], //  产品品牌  下拉数据
-      typeData: [], //  产品类别  下拉数据
+      typeData: [], //    下拉数据
       advanced: false, //  高级搜索 展开/关闭
       advanced: false, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       // 表头
       // 表头
@@ -374,8 +375,7 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
         productTypeSn3: '', //  产品三级分类
-        queryWord: '',
-        brand: ''
+        queryWord: ''
       }
       }
       this.productType = []
       this.productType = []
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
@@ -394,10 +394,14 @@ export default {
         params = row
         params = row
       }
       }
       this.addLoading = true
       this.addLoading = true
+      this.spinning = true
       purchaseDetailSave(params).then(res => {
       purchaseDetailSave(params).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.resetPurchaseDetail()
           this.resetPurchaseDetail()
           this.$message.success(res.message)
           this.$message.success(res.message)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
         this.addLoading = false
         this.addLoading = false
       })
       })
@@ -407,12 +411,16 @@ export default {
     handleSubmit () {
     handleSubmit () {
       const _this = this
       const _this = this
       this.subLoading = true
       this.subLoading = true
+      this.spinning = true
       purchaseWriteSubmit({ id: this.detail.id }).then(res => {
       purchaseWriteSubmit({ id: this.detail.id }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           setTimeout(() => {
           setTimeout(() => {
             _this.handleBack()
             _this.handleBack()
+            _this.spinning = false
           }, 1000)
           }, 1000)
+        } else {
+          _this.spinning = false
         }
         }
         _this.subLoading = false
         _this.subLoading = false
       })
       })
@@ -420,7 +428,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       purchaseDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       purchaseDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 22 - 14
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -17,14 +17,15 @@
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
             <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-select
               <a-select
-                id="purchaseOrderList-dealerSn"
+                id="purchaseOrderList-purchaseTargetSn"
                 placeholder="请选择供应商"
                 placeholder="请选择供应商"
                 allowClear
                 allowClear
-                v-model="queryParam.dealerSn"
+                v-model="queryParam.purchaseTargetSn"
                 :showSearch="true"
                 :showSearch="true"
                 option-filter-prop="children"
                 option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in supplierList" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                :filter-option="filterOption"
+                @change="tragetTypeChange">
+                <a-select-option v-for="item in supplierList" :key="item.purchaseTargetSn" :value="item.purchaseTargetSn">{{ item.purchaseTargetName }}</a-select-option>
               </a-select>
               </a-select>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
@@ -128,7 +129,7 @@
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
-import { purchaseList, purchaseDel, purchaseCount, getParentDealer } from '@/api/purchase'
+import { purchaseList, purchaseDel, purchaseCount, purchaseTargetList } from '@/api/purchase'
 export default {
 export default {
   components: { STable, VSelect, basicInfoModal, rangeDate },
   components: { STable, VSelect, basicInfoModal, rangeDate },
   data () {
   data () {
@@ -141,7 +142,8 @@ export default {
       // 查询参数
       // 查询参数
       queryParam: {
       queryParam: {
         purchaseBillNo: '',
         purchaseBillNo: '',
-        dealerSn: undefined,
+        purchaseTargetSn: undefined,
+        purchaseTargetType: undefined,
         billStatus: undefined,
         billStatus: undefined,
         financialStatus: undefined,
         financialStatus: undefined,
         beginDate: '',
         beginDate: '',
@@ -158,7 +160,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, width: 220, align: 'center' },
         { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, width: 220, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'dealerName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'purchaseTargetName', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购金额(¥)', dataIndex: 'discountedAmount', width: 115, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '采购金额(¥)', dataIndex: 'discountedAmount', width: 115, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
@@ -192,6 +194,13 @@ export default {
         this.totalData = res.data || null
         this.totalData = res.data || null
       })
       })
     },
     },
+    // 供应商change
+    tragetTypeChange (val) {
+      const ind = this.supplierList.findIndex(item => item.purchaseTargetSn == val)
+      if (ind != -1) {
+        this.queryParam.purchaseTargetType = this.supplierList[ind].purchaseTargetType
+      }
+    },
     //  时间  change
     //  时间  change
     dateChange (date) {
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.beginDate = date[0]
@@ -243,7 +252,8 @@ export default {
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
       this.queryParam.orderBundleNo = ''
       this.queryParam.orderBundleNo = ''
       this.queryParam.purchaseBillNo = ''
       this.queryParam.purchaseBillNo = ''
-      this.queryParam.dealerSn = ''
+      this.queryParam.purchaseTargetSn = undefined
+      this.queryParam.purchaseTargetType = undefined
       this.queryParam.billStatus = undefined
       this.queryParam.billStatus = undefined
       this.queryParam.financialStatus = undefined
       this.queryParam.financialStatus = undefined
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
@@ -255,13 +265,11 @@ export default {
     },
     },
     // 获取供应商数据
     // 获取供应商数据
     getSupperList () {
     getSupperList () {
-      this.supplierList = [{ dealerSn: '1', dealerName: '箭冠营销中心' }]
-      getParentDealer({}).then(res => {
+      purchaseTargetList({}).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
-          this.purchaseTragetType = res.data
-          if (res.data) {
-            this.supplierList.push({ dealerSn: res.data.dealerSn, dealerName: res.data.dealerName })
-          }
+          this.supplierList = res.data
+        } else {
+          this.supplierList = []
         }
         }
       })
       })
     }
     }

+ 40 - 35
src/views/purchasingManagement/purchaseOrder/receivingAddress/editAddressModal.vue

@@ -8,69 +8,71 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <a-form-model
-      id="editAddress-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
-      <a-form-model-item label="收货人" prop="consigneeName">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="editAddress-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="收货人" prop="consigneeName">
         <a-input
         <a-input
           id="editAddress-name"
           id="editAddress-name"
           :maxLength="30"
           :maxLength="30"
           v-model="form.consigneeName"
           v-model="form.consigneeName"
           placeholder="请输入收货人(最多30个字符)"
           placeholder="请输入收货人(最多30个字符)"
           allowClear />
           allowClear />
-      </a-form-model-item>
-      <a-form-model-item label="手机号码" prop="consigneeTel">
+        </a-form-model-item>
+        <a-form-model-item label="手机号码" prop="consigneeTel">
         <a-input
         <a-input
           id="editAddress-phone"
           id="editAddress-phone"
           :maxLength="11"
           :maxLength="11"
           v-model="form.consigneeTel"
           v-model="form.consigneeTel"
           placeholder="请输入手机号码(最多11个字符)"
           placeholder="请输入手机号码(最多11个字符)"
           allowClear />
           allowClear />
-      </a-form-model-item>
-      <a-form-model-item label="所在地区" required style="margin: 0;">
+        </a-form-model-item>
+        <a-form-model-item label="所在地区" required style="margin: 0;">
         <a-row :gutter="20">
         <a-row :gutter="20">
           <!-- 所在地区 -->
           <!-- 所在地区 -->
           <a-col span="8">
           <a-col span="8">
-            <a-form-model-item prop="provinceSn">
-              <a-select id="editAddress-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
-                <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
+          <a-form-model-item prop="provinceSn">
+            <a-select id="editAddress-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
+            <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
           </a-col>
           </a-col>
           <a-col span="8">
           <a-col span="8">
-            <a-form-model-item prop="citySn">
-              <a-select id="editAddress-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
-                <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
+          <a-form-model-item prop="citySn">
+            <a-select id="editAddress-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
+            <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
           </a-col>
           </a-col>
           <a-col span="8">
           <a-col span="8">
-            <a-form-model-item prop="countySn">
-              <a-select id="editAddress-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
-                <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
+          <a-form-model-item prop="countySn">
+            <a-select id="editAddress-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
+            <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
           </a-col>
           </a-col>
         </a-row>
         </a-row>
-      </a-form-model-item>
-      <a-form-model-item label="详细地址" prop="addr">
+        </a-form-model-item>
+        <a-form-model-item label="详细地址" prop="addr">
         <a-input
         <a-input
           id="editAddress-address"
           id="editAddress-address"
           :maxLength="60"
           :maxLength="60"
           v-model="form.addr"
           v-model="form.addr"
           placeholder="请输入详细地址(最多60个字符)"
           placeholder="请输入详细地址(最多60个字符)"
           allowClear />
           allowClear />
-      </a-form-model-item>
-      <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
         <a-button type="primary" @click="handleSubmit" id="editAddress-btn-submit">保存</a-button>
         <a-button type="primary" @click="handleSubmit" id="editAddress-btn-submit">保存</a-button>
         <a-button @click="isShow=false" style="margin-left: 15px" id="editAddress-btn-back">返回</a-button>
         <a-button @click="isShow=false" style="margin-left: 15px" id="editAddress-btn-back">返回</a-button>
-      </a-form-model-item>
-    </a-form-model>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -87,6 +89,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       isEdit: false,
       isEdit: false,
       formItemLayout: {
       formItemLayout: {
@@ -135,13 +138,15 @@ export default {
     handleSubmit () {
     handleSubmit () {
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
+          this.spinning = true
           shippingAddressSave(this.form).then(res => {
           shippingAddressSave(this.form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               this.isShow = false
               this.isShow = false
               this.$emit('ok')
               this.$emit('ok')
               this.$message.success(res.message)
               this.$message.success(res.message)
+              this.spinning = false
             } else {
             } else {
-              this.$message.error(res.message)
+              this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 68 - 57
src/views/purchasingManagement/purchaseOrder/warehousing.vue

@@ -1,62 +1,64 @@
 <template>
 <template>
   <div class="purchaseOrderWarehousing-wrap">
   <div class="purchaseOrderWarehousing-wrap">
-    <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="purchaseOrderWarehousing-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span class="billno">单号:{{ detail&&detail[0].purchaseBillNo }}</span>
-      </template>
-    </a-page-header>
-    <!-- 内容 -->
-    <a-card size="small" v-for="(item,bindex) in detail" :key="item.id" :bordered="false" class="purchaseOrderWarehousing-cont">
-      <!-- 总计 -->
-      <a-alert type="info" showIcon style="margin-bottom:15px">
-        <div slot="message" >
-          <div>产品款数 <strong>{{ item.totalPutCategory }}</strong> ,采购数量合计 <strong>{{ item.totalPutQty }}</strong> ,采购金额合计¥<strong>{{ item.totalPutAmount }}</strong></div>
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        :ref="'table-'+bindex"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :tableId="item.receivingBillSn"
-        :index="bindex"
-        :scroll="{ x: 1630 }"
-        bordered>
-        <!-- 采购数量 -->
-        <template slot="origqty" slot-scope="text, record, index">
-          <div>{{ text }}</div>
-          <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
-        </template>
-        <!-- 仓库仓位 -->
-        <template slot="warehousePosition" slot-scope="text, record, index">
-          <a-cascader
-            @change="e => changeWarehouseCascade(e, record, index, bindex)"
-            v-model="record.warehouseCascade"
-            :disabled="!(item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT')"
-            expand-trigger="hover"
-            :options="warehouseCascadeData"
-            :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-            id="purchaseOrderWarehousing-warehouseCascade"
-            placeholder="请选择仓库仓位"
-            :allowClear="false"
-            style="width: 100%;" />
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseOrderWarehousing-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span class="billno">单号:{{ detail&&detail[0].purchaseBillNo }}</span>
         </template>
         </template>
-      </s-table>
-      <div style="text-align: center;">
-        <a-button
-          type="primary"
-          class="button-warning"
-          :id="'purchaseOrderWarehousing-warehousing-'+bindex"
-          @click="handleWarehousing(item,bindex)"
-          v-if="item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT'"
-        >确认入库</a-button>
-      </div>
-    </a-card>
+      </a-page-header>
+      <!-- 内容 -->
+      <a-card size="small" v-for="(item,bindex) in detail" :key="item.id" :bordered="false" class="purchaseOrderWarehousing-cont">
+        <!-- 总计 -->
+        <a-alert type="info" showIcon style="margin-bottom:15px">
+          <div slot="message" >
+            <div>产品款数 <strong>{{ item.totalPutCategory }}</strong> ,本次发货数量合计 <strong>{{ item.totalPutQty }}</strong> ,本次发货金额合计¥<strong>{{ item.totalPutAmount }}</strong></div>
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          :ref="'table-'+bindex"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :tableId="item.receivingBillSn"
+          :index="bindex"
+          :scroll="{ x: 1630 }"
+          bordered>
+          <!-- 采购数量 -->
+          <template slot="origqty" slot-scope="text, record, index">
+            <div>{{ text }}</div>
+            <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
+          </template>
+          <!-- 仓库仓位 -->
+          <template slot="warehousePosition" slot-scope="text, record, index">
+            <a-cascader
+              @change="e => changeWarehouseCascade(e, record, index, bindex)"
+              v-model="record.warehouseCascade"
+              :disabled="!(item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT')"
+              expand-trigger="hover"
+              :options="warehouseCascadeData"
+              :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+              id="purchaseOrderWarehousing-warehouseCascade"
+              placeholder="请选择仓库仓位"
+              :allowClear="false"
+              style="width: 100%;" />
+          </template>
+        </s-table>
+        <div style="text-align: center;">
+          <a-button
+            type="primary"
+            class="button-warning"
+            :id="'purchaseOrderWarehousing-warehousing-'+bindex"
+            @click="handleWarehousing(item,bindex)"
+            v-if="item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT'"
+          >确认入库</a-button>
+        </div>
+      </a-card>
+    </a-spin>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -71,6 +73,7 @@ export default {
   components: { STable, VSelect, ProductType, ProductBrand },
   components: { STable, VSelect, ProductType, ProductBrand },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       detail: null, //  详情数据
       detail: null, //  详情数据
       productType: [],
       productType: [],
       queryParam: {
       queryParam: {
@@ -93,7 +96,7 @@ export default {
         { title: '采购数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'origqty' } },
         { title: '采购数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'origqty' } },
         { title: '本次发货数量', dataIndex: 'shippedQty', width: 120, align: 'center', customRender: function (text) { return text || 0 } },
         { title: '本次发货数量', dataIndex: 'shippedQty', width: 120, align: 'center', customRender: function (text) { return text || 0 } },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) }, fixed: 'right' },
+        { title: '本次发货金额', dataIndex: 'totalAmount', width: 120, align: 'center', customRender: function (text) { return '¥' + (text || 0) }, fixed: 'right' },
         { title: '本次入库数量', dataIndex: 'putQty', width: 120, align: 'center', fixed: 'right' },
         { title: '本次入库数量', dataIndex: 'putQty', width: 120, align: 'center', fixed: 'right' },
         { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: 250, align: 'center', fixed: 'right' }
         { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: 250, align: 'center', fixed: 'right' }
       ],
       ],
@@ -156,10 +159,14 @@ export default {
         this.$message.warning('请选择仓库仓位!')
         this.$message.warning('请选择仓库仓位!')
         return
         return
       }
       }
+      this.spinning = true
       purchaseWriteStockIn({ id: row.id }).then(res => {
       purchaseWriteStockIn({ id: row.id }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           this.getDetail()
           this.getDetail()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -226,6 +233,7 @@ export default {
     },
     },
     // 修改仓库
     // 修改仓库
     updateWarehouse (row, bindex) {
     updateWarehouse (row, bindex) {
+      this.spinning = true
       purchaseUpdateWarehouse({
       purchaseUpdateWarehouse({
         id: row.id,
         id: row.id,
         warehouseSn: row.warehouseSn,
         warehouseSn: row.warehouseSn,
@@ -235,6 +243,9 @@ export default {
           this.$message.success(res.message)
           this.$message.success(res.message)
           console.log(bindex, this.$refs)
           console.log(bindex, this.$refs)
           this.$refs['table-' + bindex][0].refresh()
           this.$refs['table-' + bindex][0].refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     }
     }

+ 2 - 2
src/views/purchasingManagement/purchaseReturn/detail.vue

@@ -23,7 +23,7 @@
       <a-collapse :activeKey="['1']">
       <a-collapse :activeKey="['1']">
         <a-collapse-panel key="1" header="基础信息">
         <a-collapse-panel key="1" header="基础信息">
           <a-descriptions :column="3" v-if="basicInfoData">
           <a-descriptions :column="3" v-if="basicInfoData">
-            <a-descriptions-item label="客户名称">{{ basicInfoData.supplierName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="客户名称">{{ basicInfoData.returnTargetName || '--' }}</a-descriptions-item>
             <a-descriptions-item label="采退单号">{{ basicInfoData.purchaseReturnNo || '--' }}</a-descriptions-item>
             <a-descriptions-item label="采退单号">{{ basicInfoData.purchaseReturnNo || '--' }}</a-descriptions-item>
             <a-descriptions-item label="创建时间">{{ basicInfoData.createDate || '--' }}</a-descriptions-item>
             <a-descriptions-item label="创建时间">{{ basicInfoData.createDate || '--' }}</a-descriptions-item>
             <a-descriptions-item label="退货数量">{{ basicInfoData.totalQty || basicInfoData.totalQty==0 ? basicInfoData.totalQty : '--' }}</a-descriptions-item>
             <a-descriptions-item label="退货数量">{{ basicInfoData.totalQty || basicInfoData.totalQty==0 ? basicInfoData.totalQty : '--' }}</a-descriptions-item>
@@ -117,7 +117,7 @@ export default {
     },
     },
     //  编辑
     //  编辑
     handleEdit () {
     handleEdit () {
-      this.$router.push({ path: `/purchasingManagement/purchaseReturn/edit/${this.basicInfoData.id}/${this.basicInfoData.purchaseReturnSn}` })
+      this.$router.push({ path: `/purchasingManagement/purchaseReturn/edit/${this.basicInfoData.id}/${this.basicInfoData.purchaseReturnSn}/${this.basicInfoData.returnTargetName}` })
     }
     }
   },
   },
   beforeRouteEnter (to, from, next) {
   beforeRouteEnter (to, from, next) {

+ 143 - 132
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -1,139 +1,141 @@
 <template>
 <template>
   <div class="purchaseReturnEdit-wrap">
   <div class="purchaseReturnEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="purchaseReturnEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="purchaseReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">供应商名称:箭冠营销总部</span>
-      </template>
-    </a-page-header>
-    <!-- 选择产品 -->
-    <a-card size="small" :bordered="false" class="purchaseReturnEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="选择产品">
-          <!-- 筛选条件 -->
-          <div class="table-page-search-wrapper">
-            <a-form layout="inline" @keyup.enter.native="getPurchaseBillDetailList(1)">
-              <a-row :gutter="15">
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="采购单号" prop="purchaseBillNo">
-                    <a-input id="purchaseReturnEdit-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" placeholder="请输入采购单号" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品编码" prop="productCode">
-                    <a-input id="purchaseReturnEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品名称" prop="productName">
-                    <a-input id="purchaseReturnEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-                  <a-button type="primary" @click="getPurchaseBillDetailList(1)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
-                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnList-reset">重置</a-button>
-                </a-col>
-              </a-row>
-            </a-form>
-          </div>
-          <!-- 列表 -->
-          <a-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :dataSource="loadData"
-            :scroll="{ x: 1320, y: 300 }"
-            :pagination="paginationProps"
-            bordered>
-            <!-- 数量 -->
-            <template slot="returnQty" slot-scope="text, record">
-              <a-input-number
-                id="purchaseReturnEdit-returnQty"
-                v-model="record.returnQty"
-                :precision="0"
-                :min="1"
-                :max="record.refundableQty"
-                placeholder="请输入"
-                style="width: 100%;" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="purchaseReturnEdit-add-btn">添加</a-button>
-            </template>
-          </a-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="purchaseReturnEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            已选产品
-            <a-button size="small" class="import-btn" id="purchaseReturnEdit-import-btn" @click.stop="handleImport">导入明细</a-button>
-            <a-button
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="purchaseReturnEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">供应商名称:{{ $route.params.name }}</span>
+        </template>
+      </a-page-header>
+      <!-- 选择产品 -->
+      <a-card size="small" :bordered="false" class="purchaseReturnEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="选择产品">
+            <!-- 筛选条件 -->
+            <div class="table-page-search-wrapper">
+              <a-form layout="inline" @keyup.enter.native="getPurchaseBillDetailList(1)">
+                <a-row :gutter="15">
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="采购单号" prop="purchaseBillNo">
+                      <a-input id="purchaseReturnEdit-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" placeholder="请输入采购单号" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品编码" prop="productCode">
+                      <a-input id="purchaseReturnEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品名称" prop="productName">
+                      <a-input id="purchaseReturnEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                    <a-button type="primary" @click="getPurchaseBillDetailList(1)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnList-reset">重置</a-button>
+                  </a-col>
+                </a-row>
+              </a-form>
+            </div>
+            <!-- 列表 -->
+            <a-table
+              class="sTable"
+              ref="table"
               size="small"
               size="small"
-              type="primary"
-              class="import-btn"
-              id="purchaseReturnEdit-delAll-btn"
-              @click.stop="handleDel('', 'all')"
-              style="margin-left: 10px;">整单删除</a-button>
-          </template>
-          <!-- 列表 -->
-          <a-table
-            class="sTable"
-            ref="chooseTable"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="chooseColumns"
-            :dataSource="chooseLoadData"
-            :scroll="{ x: 1420, y: 300 }"
-            :pagination="choosePaginationProps"
-            bordered>
-            <!-- 退货数量 -->
-            <template slot="qty" slot-scope="text, record">
-              <a-input-number
-                id="purchaseReturnEdit-qty"
-                v-model="record.qty"
-                :precision="0"
-                :min="1"
-                :max="record.refundableQty"
-                placeholder="请输入"
-                @blur="e => qtyBlur(e.target.value, record)"
-                style="width: 100%;" />
-            </template>
-            <!-- 退货原因 -->
-            <template slot="remarks" slot-scope="text, record">
-              <a-input
-                id="purchaseReturnEdit-remarks"
-                v-model="record.remarks"
-                :maxLength="30"
-                placeholder="退货原因(最多30个字符)"
-                @blur="e => remarksBlur(e.target.value, record)"
-                style="width: 100%;" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="purchaseReturnEdit-del-btn">删除</a-button>
+              :rowKey="(record) => record.id"
+              :columns="columns"
+              :dataSource="loadData"
+              :scroll="{ x: 1320, y: 300 }"
+              :pagination="paginationProps"
+              bordered>
+              <!-- 数量 -->
+              <template slot="returnQty" slot-scope="text, record">
+                <a-input-number
+                  id="purchaseReturnEdit-returnQty"
+                  v-model="record.returnQty"
+                  :precision="0"
+                  :min="1"
+                  :max="record.refundableQty"
+                  placeholder="请输入"
+                  style="width: 100%;" />
+              </template>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="purchaseReturnEdit-add-btn">添加</a-button>
+              </template>
+            </a-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 已选产品 -->
+      <a-card size="small" :bordered="false" class="purchaseReturnEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1">
+            <template slot="header">
+              已选产品
+              <a-button size="small" class="import-btn" id="purchaseReturnEdit-import-btn" @click.stop="handleImport">导入明细</a-button>
+              <a-button
+                size="small"
+                type="primary"
+                class="import-btn"
+                id="purchaseReturnEdit-delAll-btn"
+                @click.stop="handleDel('', 'all')"
+                style="margin-left: 10px;">整单删除</a-button>
             </template>
             </template>
-          </a-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="purchaseReturnEdit-submit"
-          size="large"
-          class="button-primary"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
+            <!-- 列表 -->
+            <a-table
+              class="sTable"
+              ref="chooseTable"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="chooseColumns"
+              :dataSource="chooseLoadData"
+              :scroll="{ x: 1420, y: 300 }"
+              :pagination="choosePaginationProps"
+              bordered>
+              <!-- 退货数量 -->
+              <template slot="qty" slot-scope="text, record">
+                <a-input-number
+                  id="purchaseReturnEdit-qty"
+                  v-model="record.qty"
+                  :precision="0"
+                  :min="1"
+                  :max="record.refundableQty"
+                  placeholder="请输入"
+                  @blur="e => qtyBlur(e.target.value, record)"
+                  style="width: 100%;" />
+              </template>
+              <!-- 退货原因 -->
+              <template slot="remarks" slot-scope="text, record">
+                <a-input
+                  id="purchaseReturnEdit-remarks"
+                  v-model="record.remarks"
+                  :maxLength="30"
+                  placeholder="退货原因(最多30个字符)"
+                  @blur="e => remarksBlur(e.target.value, record)"
+                  style="width: 100%;" />
+              </template>
+              <!-- 操作 -->
+              <template slot="action" slot-scope="text, record">
+                <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="purchaseReturnEdit-del-btn">删除</a-button>
+              </template>
+            </a-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            id="purchaseReturnEdit-submit"
+            size="large"
+            class="button-primary"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -144,6 +146,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       queryParam: {
       queryParam: {
         purchaseBillNo: '',
         purchaseBillNo: '',
         productCode: '',
         productCode: '',
@@ -238,11 +241,15 @@ export default {
           return
           return
         }
         }
       }
       }
+      this.spinning = true
       purchaseReturnDetailSave(params).then(res => {
       purchaseReturnDetailSave(params).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           this.getPurchaseBillDetailList()
           this.getPurchaseBillDetailList()
           this.getChooseProductList()
           this.getChooseProductList()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -290,12 +297,16 @@ export default {
     //  提交
     //  提交
     handleSubmit () {
     handleSubmit () {
       const _this = this
       const _this = this
+      _this.spinning = true
       purchaseReturnSubmit({ id: this.$route.params.id }).then(res => {
       purchaseReturnSubmit({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$message.success(res.message)
           setTimeout(() => {
           setTimeout(() => {
             _this.handleBack()
             _this.handleBack()
+            _this.spinning = false
           }, 1000)
           }, 1000)
+        } else {
+          _this.spinning = false
         }
         }
       })
       })
     },
     },

+ 32 - 5
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -97,6 +97,7 @@
 <script>
 <script>
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
+import { purchaseTargetList } from '@/api/purchase'
 import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel } from '@/api/purchaseReturn'
 import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel } from '@/api/purchaseReturn'
 export default {
 export default {
   components: { STable, VSelect, rangeDate },
   components: { STable, VSelect, rangeDate },
@@ -137,7 +138,8 @@ export default {
           this.disabled = false
           this.disabled = false
           return data
           return data
         })
         })
-      }
+      },
+      purchaseTragetType: []
     }
     }
   },
   },
   methods: {
   methods: {
@@ -180,23 +182,48 @@ export default {
     handleEdit (row) {
     handleEdit (row) {
       const _this = this
       const _this = this
       if (row) { //  编辑
       if (row) { //  编辑
-        _this.$router.push({ path: `/purchasingManagement/purchaseReturn/edit/${row.id}/${row.purchaseReturnSn}` })
+        _this.$router.push({ path: `/purchasingManagement/purchaseReturn/edit/${row.id}/${row.purchaseReturnSn}/${row.returnTargetName}` })
       } else { //  新增
       } else { //  新增
+        let content
+        if (this.purchaseTragetType.length > 0) {
+          content = '退货供应商:' + this.purchaseTragetType[0].purchaseTargetName
+        } else {
+          content = '退货供应商:--'
+        }
         this.$confirm({
         this.$confirm({
           title: '提示',
           title: '提示',
-          content: '退货供应商:箭冠营销总部',
+          content: content,
           centered: true,
           centered: true,
           onOk () {
           onOk () {
-            purchaseReturnSave({}).then(res => {
+            const params = {
+              returnTargetSn: _this.purchaseTragetType[0].purchaseTargetSn,
+              returnTargetName: _this.purchaseTragetType[0].purchaseTargetName,
+              returnTargetType: _this.purchaseTragetType[0].purchaseTargetType
+            }
+            purchaseReturnSave(params).then(res => {
               if (res.status == 200) {
               if (res.status == 200) {
                 const data = res.data
                 const data = res.data
-                _this.$router.push({ path: `/purchasingManagement/purchaseReturn/add/${data.id}/${data.purchaseReturnSn}` })
+                _this.$router.push({ path: `/purchasingManagement/purchaseReturn/add/${data.id}/${data.purchaseReturnSn}/${data.returnTargetName}` })
               }
               }
             })
             })
           }
           }
         })
         })
       }
       }
+    },
+    getParentDealer () {
+      purchaseTargetList({ purchaseTargetType: 'SUPPLIER_SYS' }).then(res => {
+        if (res.status == 200) {
+          this.purchaseTragetType = res.data
+        } else {
+          this.purchaseTragetType = []
+        }
+      })
     }
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getParentDealer()
+    })
   }
   }
 }
 }
 </script>
 </script>

+ 446 - 3
src/views/reportData/chainReceivedSendStorageReport/list.vue

@@ -1,8 +1,451 @@
 <template>
 <template>
+  <a-card size="small" :bordered="false" class="sendStorageReportList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="sendStorageReportList-form"
+        ref="ruleForm"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="连锁店" prop="targetName">
+              <a-select
+                placeholder="请选择连锁店"
+                id="sendStorageReportList-targetName"
+                allowClear
+                v-model="queryParam.targetName"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in allocateTypeList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="日期">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="产品编码">
+              <a-input id="sendStorageReportList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="sendStorageReportList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品品牌">
+                <a-select
+                  placeholder="请选择产品品牌"
+                  id="sendStorageReportList-productBrandSn"
+                  allowClear
+                  v-model="queryParam.productBrandSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <a-cascader
+                  @change="changeProductType"
+                  change-on-select
+                  v-model="productType"
+                  expand-trigger="hover"
+                  :options="productTypeList"
+                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                  id="sendStorageReportList-productType"
+                  placeholder="请选择产品分类"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="sendStorageReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="sendStorageReportList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 2390 }"
+      bordered>
+    </s-table>
+  </a-card>
 </template>
 </template>
 
 
 <script>
 <script>
+import { STable, VSelect } from '@/components'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeList } from '@/api/dealerProductType'
+import rangeDate from '@/views/common/rangeDate.vue'
+// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
+// import { allocateTypeAllList } from '@/api/allocateType'
+export default {
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        targetName: undefined,
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      rules: {
+        'targetName': [{ required: true, message: '请选择连锁店', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号',
+          dataIndex: 'no',
+          width: 80,
+          align: 'center',
+          customRender: function (value, row, index) {
+            const obj = { children: value, attrs: {} }
+            if (value == '合计') {
+              console.log(111)
+              obj.attrs.colSpan = 7
+            }
+            return obj
+          }
+          // fixed: 'left'
+        },
+        { title: '产品编码',
+          dataIndex: 'code',
+          width: 220,
+          align: 'center',
+          customRender: function (value, row, index) {
+            value = value || '--'
+            const obj = { children: value, attrs: {} }
+            if (value == '合计') { obj.attrs.colSpan = 0 }
+            return obj
+          }
+        },
+        { title: '产品名称',
+          dataIndex: 'name',
+          align: 'center',
+          customRender: function (value, row, index) {
+            value = value || '--'
+            const obj = { children: value, attrs: {} }
+            if (value == '合计') { obj.attrs.colSpan = 0 }
+            return obj
+          },
+          ellipsis: true
+        },
+        { title: '品牌',
+          dataIndex: 'brand',
+          align: 'center',
+          width: 200,
+          customRender: function (value, row, index) {
+            value = value || '--'
+            const obj = { children: value, attrs: {} }
+            if (value == '合计') { obj.attrs.colSpan = 0 }
+            return obj
+          }
+        },
+        { title: '三级分类',
+          dataIndex: 'productLeve',
+          width: 150,
+          align: 'center',
+          customRender: function (value, row, index) {
+            value = value || '--'
+            const obj = { children: value, attrs: {} }
+            if (value == '合计') { obj.attrs.colSpan = 0 }
+            return obj
+          }
+        },
+        { title: '原厂编码',
+          dataIndex: 'origCode',
+          width: 220,
+          align: 'center',
+          customRender: function (value, row, index) {
+            value = value || '--'
+            const obj = { children: value, attrs: {} }
+            if (value == '合计') { obj.attrs.colSpan = 0 }
+            return obj
+          }
+        },
+        { title: '单位',
+          dataIndex: 'unit',
+          width: 100,
+          align: 'center',
+          customRender: function (value, row, index) {
+            value = value || '--'
+            const obj = { children: value, attrs: {} }
+            if (value == '合计') { obj.attrs.colSpan = 0 }
+            return obj
+          }
+        },
+        { title: '期初数量', dataIndex: 'sqty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '期初单价(¥)', dataIndex: 'sprice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '期初金额(¥)', dataIndex: 'samount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收入数量', dataIndex: 'srqty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收入单价(¥)', dataIndex: 'srprice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收入金额(¥)', dataIndex: 'sramount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发出数量', dataIndex: 'fcqty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发出单价(¥)', dataIndex: 'fcprice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发出金额(¥)', dataIndex: 'fcamount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '结存数量', dataIndex: 'dcqty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '结存单价(¥)', dataIndex: 'dcprice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '结存金额(¥)', dataIndex: 'dcamount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
+        //   const data = res.data
+        //   const no = (data.pageNo - 1) * data.pageSize
+        //   for (var i = 0; i < data.list.length; i++) {
+        //     data.list[i].no = no + i + 1
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1',
+                code: '0000 1110 V003 / 000 1110 V004',
+                name: '广州非品牌 空调滤清器',
+                brand: '非品牌',
+                productLeve: '空调滤清器',
+                origCode: '',
+                unit: '个',
+                sqty: '18',
+                sprice: '4.72',
+                samount: '85.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: '18',
+                dcprice: '4.72',
+                dcamount: '85.00'
+              },
+              { id: '2',
+                code: '0000015',
+                name: '辅助单位测试',
+                brand: '雪企',
+                productLeve: '雪种油',
+                origCode: '',
+                unit: '升',
+                sqty: '24',
+                sprice: '32.71',
+                samount: '785.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 24,
+                dcprice: '32.71',
+                dcamount: '785.00'
+              },
+              { id: '3',
+                code: '0000015',
+                name: '辅助单位',
+                brand: '阿尔派',
+                productLeve: '电喇叭',
+                origCode: '',
+                unit: '个',
+                sqty: '16',
+                sprice: '120.00',
+                samount: '1920.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 16,
+                dcprice: '120.00',
+                dcamount: '1920.00'
+              },
+              { id: '4',
+                code: '0000015',
+                name: '辅助单位',
+                brand: '阿尔派',
+                productLeve: '电喇叭',
+                origCode: '',
+                unit: '个',
+                sqty: '11',
+                sprice: '120.00',
+                samount: '1320.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 11,
+                dcprice: '120.00',
+                dcamount: '1320.00'
+              },
+              { id: '5',
+                code: '00089',
+                name: 'SOFT99车蜡 氟素镀膜 白色车身用 防水保护效果持久',
+                brand: 'SOFT99',
+                productLeve: '车蜡',
+                origCode: '',
+                unit: '瓶',
+                sqty: '32',
+                sprice: '34.38',
+                samount: '1100.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 32,
+                dcprice: '34.38',
+                dcamount: '1100.00'
+              },
+              { id: '6',
+                code: '合计',
+                name: '合计',
+                brand: '合计',
+                productLeve: '合计',
+                origCode: '合计',
+                unit: '合计',
+                sqty: '2208',
+                sprice: '',
+                samount: '48254.44',
+                srqty: 18,
+                srprice: '',
+                sramount: '135.00',
+                fcqty: '0',
+                fcprice: '0.00',
+                fcamount: '0.00',
+                dcqty: 2226,
+                dcprice: '',
+                dcamount: '48389.00'
+              }
+            ],
+            count: 10
+          }
+          for (var i = 0; i < data.list.length; i++) {
+            if (i < data.list.length - 1) {
+              data.list[i].no = i + 1
+            } else {
+              data.list[i].no = '合计'
+            }
+          }
+          _this.disabled = false
+          resolve(data)
+        })
+      },
+      productType: [],
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [], //  分类下拉数据
+      allocateTypeList: [] //  调拨类型
+    }
+  },
+  methods: {
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.targetName = undefined
+      this.queryParam.code = ''
+      this.queryParam.name = ''
+      this.queryParam.origCode = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.productType = []
+      this.$refs.table.refresh(true)
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    //  产品品牌  列表
+    getProductBrand () {
+      dealerProductBrandQuery({ 'sysFlag': '0' }).then(res => {
+        if (res.status == 200) {
+          this.productBrandList = res.data
+        } else {
+          this.productBrandList = []
+        }
+      })
+    },
+    //  产品分类  列表
+    getProductType () {
+      dealerProductTypeList({ 'sysFlag': '0' }).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getProductBrand()
+      vm.getProductType()
+    })
+  }
+}
 </script>
 </script>
-
-<style>
-</style>

+ 159 - 100
src/views/reportData/chainSalesDetailReport/list.vue

@@ -27,140 +27,120 @@
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="审核时间">
+            <a-form-model-item label="审核时间">
               <rangeDate ref="rangeDate" @change="dateChange" />
               <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称">
+            <a-form-model-item label="客户名称">
               <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入客户名称"/>
               <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入客户名称"/>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           </a-col>
           <template v-if="advanced">
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户类型">
-                <a-select id="chainStockReportList-targetName" v-model="queryParam.allocateTypeSn" placeholder="请选择客户类型" allowClear >
-                  <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              <a-form-model-item label="客户类型">
+                <a-select id="chainStockReportList-customerType" v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型">
+                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
                 </a-select>
                 </a-select>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="12" :sm="24">
             <a-col :md="12" :sm="24">
               <a-row>
               <a-row>
-                <a-form-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
+                <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
                   <a-col span="7">
                   <a-col span="7">
-                    <a-form-item prop="dealerProvinceSn" style="margin: 0;">
+                    <a-form-model-item prop="dealerProvinceSn" style="margin: 0;">
                       <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择省">
                       <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择省">
                         <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
                         <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
-                    </a-form-item>
+                    </a-form-model-item>
                   </a-col>
                   </a-col>
                   <a-col span="7" offset="1">
                   <a-col span="7" offset="1">
-                    <a-form-item prop="dealerCitySn" style="margin: 0;">
+                    <a-form-model-item prop="dealerCitySn" style="margin: 0;">
                       <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择市">
                       <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择市">
                         <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
                         <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
-                    </a-form-item>
+                    </a-form-model-item>
                   </a-col>
                   </a-col>
                   <a-col span="7" offset="1">
                   <a-col span="7" offset="1">
-                    <a-form-item prop="dealerCountySn" style="margin: 0;">
+                    <a-form-model-item prop="dealerCountySn" style="margin: 0;">
                       <a-select v-model="queryParam.dealerCountySn" placeholder="请选择区/县">
                       <a-select v-model="queryParam.dealerCountySn" placeholder="请选择区/县">
                         <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
                         <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
-                    </a-form-item>
+                    </a-form-model-item>
                   </a-col>
                   </a-col>
-                </a-form-item>
+                </a-form-model-item>
               </a-row>
               </a-row>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="支付方式">
-                <a-select id="chainStockReportList-targetName" v-model="queryParam.allocateTypeSn" placeholder="请选择收款方式" allowClear >
-                  <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              <a-form-model-item label="收款方式">
+                <a-select id="chainStockReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
+                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
                 </a-select>
                 </a-select>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="收款方式">
-                <a-select id="chainStockReportList-targetName" v-model="queryParam.allocateTypeSn" placeholder="请选择收款方式" allowClear >
-                  <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              <a-form-item label="产品品牌">
+                <a-select
+                  placeholder="请选择产品品牌"
+                  id="chainStockReportList-productBrandSn"
+                  allowClear
+                  v-model="queryParam.productBrandSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
                 </a-select>
                 </a-select>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
-            <a-col :md="12" :sm="24">
-              <a-row>
-                <a-form-item label="产品类别" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
-                  <a-col span="7">
-                    <a-form-item prop="dealerProvinceSn" style="margin: 0;">
-                      <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择">
-                        <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col span="7" offset="1">
-                    <a-form-item prop="dealerCitySn" style="margin: 0;">
-                      <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择">
-                        <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col span="7" offset="1">
-                    <a-form-item prop="dealerCountySn" style="margin: 0;">
-                      <a-select v-model="queryParam.dealerCountySn" placeholder="请选择">
-                        <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                </a-form-item>
-              </a-row>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <a-cascader
+                  @change="changeProductType"
+                  change-on-select
+                  v-model="productType"
+                  expand-trigger="hover"
+                  :options="productTypeList"
+                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                  id="productInfoList-productType"
+                  placeholder="请选择产品分类"
+                  allowClear />
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品编码">
+              <a-form-model-item label="产品编码">
                 <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入单号"/>
                 <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入单号"/>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品名称">
+              <a-form-model-item label="产品名称">
                 <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入业务员"/>
                 <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入业务员"/>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
-            <a-col :md="12" :sm="24">
-              <a-row>
-                <a-form-item label="仓库仓位" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
-                  <a-col span="7">
-                    <a-form-item prop="dealerProvinceSn" style="margin: 0;">
-                      <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择">
-                        <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col span="7" offset="1">
-                    <a-form-item prop="dealerCitySn" style="margin: 0;">
-                      <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择">
-                        <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                </a-form-item>
-              </a-row>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="仓库仓位">
+                <a-cascader
+                  v-model="queryParam.warehouseCascade"
+                  expand-trigger="hover"
+                  :allowClear="false"
+                  :options="warehouseCascadeData"
+                  :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+                  id="chainStockReportList-warehouseCascade"
+                  placeholder="请选择仓库仓位"
+                  style="width: 100%;" />
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="单号">
+              <a-form-model-item label="单号">
                 <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入单号"/>
                 <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入单号"/>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="业务员">
+              <a-form-model-item label="业务员">
                 <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入业务员"/>
                 <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入业务员"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="订单类型">
-                <a-select id="chainStockReportList-targetName" v-model="queryParam.allocateTypeSn" placeholder="请选择收款方式" allowClear >
-                  <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
           </template>
           </template>
-          <a-col :md="6" :sm="24">
+          <a-col :md="6" :sm="24" style="margin-top: 3px;">
             <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
             <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
             <a @click="advanced=!advanced" style="margin-left: 8px">
             <a @click="advanced=!advanced" style="margin-left: 8px">
@@ -174,6 +154,7 @@
     <!-- 合计 -->
     <!-- 合计 -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
     <a-alert type="info" showIcon style="margin-bottom:15px">
       <div class="ftext" slot="message">
       <div class="ftext" slot="message">
+        产品总数量:<strong>45</strong>;
         总成本:<strong>¥33.00</strong>;
         总成本:<strong>¥33.00</strong>;
         总售价:<strong>¥48.00</strong>;
         总售价:<strong>¥48.00</strong>;
         总毛利:<strong>¥15.00</strong>。
         总毛利:<strong>¥15.00</strong>。
@@ -187,7 +168,7 @@
       :rowKey="(record) => record.id"
       :rowKey="(record) => record.id"
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
-      :scroll="{ x: 1170 }"
+      :scroll="{ x: 1720 }"
       bordered>
       bordered>
     </s-table>
     </s-table>
   </a-card>
   </a-card>
@@ -197,8 +178,11 @@
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { getArea } from '@/api/data'
 import { getArea } from '@/api/data'
-// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
-// import { allocateTypeAllList } from '@/api/allocateType'
+import { custTypeFindAllList } from '@/api/custType'
+import { settleStyleFindAllList } from '@/api/customer'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeList } from '@/api/dealerProductType'
+import { warehouseCascadeList } from '@/api/warehouse'
 export default {
 export default {
   components: { STable, VSelect, rangeDate },
   components: { STable, VSelect, rangeDate },
   data () {
   data () {
@@ -228,17 +212,15 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '销售单号', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '订单类型', dataIndex: 'orderType', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '支付方式', dataIndex: 'payType', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收款方式', dataIndex: 'currentStockCost', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'proCode', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'proName', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'unit', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'totalQty', width: 165, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本', dataIndex: 'totalCost', width: 165, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '售价', dataIndex: 'totalAmount', width: 165, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '毛利', dataIndex: 'totalMl', width: 165, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '审核时间', dataIndex: 'auditDate', width: 165, align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '收款方式', dataIndex: 'currentStockCost', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'proCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'proName', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本', dataIndex: 'totalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '毛利', dataIndex: 'totalMl', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '审核时间', dataIndex: 'auditDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
@@ -272,11 +254,17 @@ export default {
       addrProvinceList: [], //  省下拉
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
       addrDistrictList: [], //  区下拉
-      allocateTypeList: [] //  调拨类型
+      allocateTypeList: [], //  调拨类型
+      custTypeList: [], //  客户类型 下拉数据
+      settleStyleList: [], //  收款方式  下拉数据
+      productBrandList: [], //  品牌下拉数据
+      productType: [],
+      productTypeList: [], //  分类下拉数据
+      warehouseCascadeData: [] //  仓库仓位
     }
     }
   },
   },
   methods: {
   methods: {
-    //  创建时间  change
+    //  时间  change
     dateChange (date) {
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
       this.queryParam.endDate = date[1]
@@ -310,6 +298,72 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
       )
     },
     },
+    //  获取客户类型列表
+    getCustTypeList () {
+      const _this = this
+      custTypeFindAllList().then(res => {
+        if (res.status == 200) {
+          _this.custTypeList = res.data || []
+        } else {
+          _this.custTypeList = []
+        }
+      })
+    },
+    // 收款方式
+    getSettleStyleList () {
+      settleStyleFindAllList().then(res => {
+        if (res.status == 200) {
+          this.settleStyleList = res.data
+        } else {
+          this.settleStyleList = []
+        }
+      })
+    },
+    //  产品品牌  列表
+    getProductBrand () {
+      dealerProductBrandQuery({ 'sysFlag': '0' }).then(res => {
+        if (res.status == 200) {
+          this.productBrandList = res.data
+        } else {
+          this.productBrandList = []
+        }
+      })
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    //  产品分类  列表
+    getProductType () {
+      dealerProductTypeList({ 'sysFlag': '0' }).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
+    },
+    //  仓库仓位  级联  列表
+    getWarehouseCascade () {
+      const _this = this
+      warehouseCascadeList({}).then(res => {
+        if (res.status == 200) {
+          res.data.map(item => {
+            item.sn = item.warehouseSn
+            if (item.warehouseLocationList) {
+              item.warehouseLocationList.map(subItem => {
+                subItem.sn = subItem.warehouseLocationSn
+              })
+            }
+          })
+          this.warehouseCascadeData = res.data
+        } else {
+          this.warehouseCascadeData = []
+        }
+      })
+    },
     // 获取城市列表
     // 获取城市列表
     getCityList (val) {
     getCityList (val) {
       this.addrCityList = []
       this.addrCityList = []
@@ -356,6 +410,11 @@ export default {
   beforeRouteEnter (to, from, next) {
   beforeRouteEnter (to, from, next) {
     next(vm => {
     next(vm => {
       vm.getArea('province')
       vm.getArea('province')
+      vm.getCustTypeList()
+      vm.getSettleStyleList()
+      vm.getProductBrand()
+      vm.getProductType()
+      vm.getWarehouseCascade()
     })
     })
   }
   }
 }
 }

+ 61 - 36
src/views/reportData/chainSalesReport/list.vue

@@ -1,10 +1,10 @@
 <template>
 <template>
-  <a-card size="small" :bordered="false" class="chainStockReportList-wrap">
+  <a-card size="small" :bordered="false" class="chainSalesReportList-wrap">
     <a-alert :show-icon="false" type="error" message="注:连锁销售单报表包含急件销售数量、售价,连锁销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
     <a-alert :show-icon="false" type="error" message="注:连锁销售单报表包含急件销售数量、售价,连锁销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
     <!-- 搜索条件 -->
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
     <div class="table-page-search-wrapper">
       <a-form-model
       <a-form-model
-        id="chainStockReportList-form"
+        id="chainSalesReportList-form"
         ref="ruleForm"
         ref="ruleForm"
         :model="queryParam"
         :model="queryParam"
         :rules="rules"
         :rules="rules"
@@ -16,7 +16,7 @@
             <a-form-model-item label="连锁店" prop="targetName">
             <a-form-model-item label="连锁店" prop="targetName">
               <a-select
               <a-select
                 placeholder="请选择连锁店"
                 placeholder="请选择连锁店"
-                id="chainStockReportList-targetName"
+                id="chainSalesReportList-targetName"
                 allowClear
                 allowClear
                 v-model="queryParam.targetName"
                 v-model="queryParam.targetName"
                 :showSearch="true"
                 :showSearch="true"
@@ -27,71 +27,71 @@
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="审核时间">
+            <a-form-model-item label="审核时间">
               <rangeDate ref="rangeDate" @change="dateChange" />
               <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称">
-              <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入客户名称"/>
-            </a-form-item>
+            <a-form-model-item label="客户名称">
+              <a-input id="chainSalesReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入客户名称"/>
+            </a-form-model-item>
           </a-col>
           </a-col>
           <template v-if="advanced">
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户类型">
-                <a-select id="chainStockReportList-targetName" v-model="queryParam.allocateTypeSn" placeholder="请选择客户类型" allowClear >
-                  <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              <a-form-model-item label="客户类型">
+                <a-select id="chainSalesReportList-customerType" v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型">
+                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
                 </a-select>
                 </a-select>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="12" :sm="24">
             <a-col :md="12" :sm="24">
               <a-row>
               <a-row>
-                <a-form-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
+                <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
                   <a-col span="7">
                   <a-col span="7">
-                    <a-form-item prop="dealerProvinceSn" style="margin: 0;">
+                    <a-form-model-item prop="dealerProvinceSn" style="margin: 0;">
                       <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择省">
                       <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择省">
                         <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
                         <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
-                    </a-form-item>
+                    </a-form-model-item>
                   </a-col>
                   </a-col>
                   <a-col span="7" offset="1">
                   <a-col span="7" offset="1">
-                    <a-form-item prop="dealerCitySn" style="margin: 0;">
+                    <a-form-model-item prop="dealerCitySn" style="margin: 0;">
                       <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择市">
                       <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择市">
                         <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
                         <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
-                    </a-form-item>
+                    </a-form-model-item>
                   </a-col>
                   </a-col>
                   <a-col span="7" offset="1">
                   <a-col span="7" offset="1">
-                    <a-form-item prop="dealerCountySn" style="margin: 0;">
+                    <a-form-model-item prop="dealerCountySn" style="margin: 0;">
                       <a-select v-model="queryParam.dealerCountySn" placeholder="请选择区/县">
                       <a-select v-model="queryParam.dealerCountySn" placeholder="请选择区/县">
                         <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
                         <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
-                    </a-form-item>
+                    </a-form-model-item>
                   </a-col>
                   </a-col>
-                </a-form-item>
+                </a-form-model-item>
               </a-row>
               </a-row>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="收款方式">
-                <a-select id="chainStockReportList-targetName" v-model="queryParam.allocateTypeSn" placeholder="请选择收款方式" allowClear >
-                  <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+              <a-form-model-item label="收款方式">
+                <a-select id="chainSalesReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
+                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
                 </a-select>
                 </a-select>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="单号">
-                <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入单号"/>
-              </a-form-item>
+              <a-form-model-item label="单号">
+                <a-input id="chainSalesReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入单号"/>
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="业务员">
-                <a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入业务员"/>
-              </a-form-item>
+              <a-form-model-item label="业务员">
+                <a-input id="chainSalesReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入业务员"/>
+              </a-form-model-item>
             </a-col>
             </a-col>
           </template>
           </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
+          <a-col :md="6" :sm="24" style="margin-top: 3px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainSalesReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainSalesReportList-reset">重置</a-button>
             <a @click="advanced=!advanced" style="margin-left: 8px">
             <a @click="advanced=!advanced" style="margin-left: 8px">
               {{ advanced ? '收起' : '展开' }}
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
               <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -128,8 +128,8 @@
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { getArea } from '@/api/data'
 import { getArea } from '@/api/data'
-// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
-// import { allocateTypeAllList } from '@/api/allocateType'
+import { custTypeFindAllList } from '@/api/custType'
+import { settleStyleFindAllList } from '@/api/customer'
 export default {
 export default {
   components: { STable, VSelect, rangeDate },
   components: { STable, VSelect, rangeDate },
   data () {
   data () {
@@ -200,7 +200,9 @@ export default {
       addrProvinceList: [], //  省下拉
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
       addrDistrictList: [], //  区下拉
-      allocateTypeList: [] //  调拨类型
+      allocateTypeList: [], //  调拨类型
+      custTypeList: [], //  客户类型 下拉数据
+      settleStyleList: [] //  收款方式  下拉数据
     }
     }
   },
   },
   methods: {
   methods: {
@@ -238,6 +240,27 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
       )
     },
     },
+    //  获取客户类型列表
+    getCustTypeList () {
+      const _this = this
+      custTypeFindAllList().then(res => {
+        if (res.status == 200) {
+          _this.custTypeList = res.data || []
+        } else {
+          _this.custTypeList = []
+        }
+      })
+    },
+    // 收款方式
+    getSettleStyleList () {
+      settleStyleFindAllList().then(res => {
+        if (res.status == 200) {
+          this.settleStyleList = res.data
+        } else {
+          this.settleStyleList = []
+        }
+      })
+    },
     // 获取城市列表
     // 获取城市列表
     getCityList (val) {
     getCityList (val) {
       this.addrCityList = []
       this.addrCityList = []
@@ -284,6 +307,8 @@ export default {
   beforeRouteEnter (to, from, next) {
   beforeRouteEnter (to, from, next) {
     next(vm => {
     next(vm => {
       vm.getArea('province')
       vm.getArea('province')
+      vm.getCustTypeList()
+      vm.getSettleStyleList()
     })
     })
   }
   }
 }
 }

+ 11 - 11
src/views/reportData/chainStockReport/list.vue

@@ -26,23 +26,23 @@
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
+            <a-form-model-item label="产品编码">
               <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
               <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
+            <a-form-model-item label="产品名称">
               <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           </a-col>
           <template v-if="advanced">
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="原厂编码">
+              <a-form-model-item label="原厂编码">
                 <a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
                 <a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品品牌">
+              <a-form-model-item label="产品品牌">
                 <a-select
                 <a-select
                   placeholder="请选择产品品牌"
                   placeholder="请选择产品品牌"
                   id="productInfoList-productBrandSn"
                   id="productInfoList-productBrandSn"
@@ -53,10 +53,10 @@
                   :filter-option="filterOption">
                   :filter-option="filterOption">
                   <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
                   <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
                 </a-select>
                 </a-select>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
+              <a-form-model-item label="产品分类">
                 <a-cascader
                 <a-cascader
                   @change="changeProductType"
                   @change="changeProductType"
                   change-on-select
                   change-on-select
@@ -67,10 +67,10 @@
                   id="productInfoList-productType"
                   id="productInfoList-productType"
                   placeholder="请选择产品分类"
                   placeholder="请选择产品分类"
                   allowClear />
                   allowClear />
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             </a-col>
           </template>
           </template>
-          <a-col :md="6" :sm="24">
+          <a-col :md="6" :sm="24" style="margin-top: 3px;">
             <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
             <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
             <a @click="advanced=!advanced" style="margin-left: 8px">
             <a @click="advanced=!advanced" style="margin-left: 8px">

+ 429 - 3
src/views/reportData/receivedSendStorageReport/list.vue

@@ -1,8 +1,434 @@
 <template>
 <template>
+  <a-card size="small" :bordered="false" class="chainStockReportList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="chainStockReportList-form"
+        ref="ruleForm"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="日期">
+              <rangeDate ref="rangeDate" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品编码">
+              <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品名称">
+              <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <a-select
+                  placeholder="请选择产品品牌"
+                  id="productInfoList-productBrandSn"
+                  allowClear
+                  v-model="queryParam.productBrandSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品分类">
+                <a-cascader
+                  @change="changeProductType"
+                  change-on-select
+                  v-model="productType"
+                  expand-trigger="hover"
+                  :options="productTypeList"
+                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                  id="productInfoList-productType"
+                  placeholder="请选择产品分类"
+                  allowClear />
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1170 }"
+      bordered>
+    </s-table>
+  </a-card>
 </template>
 </template>
 
 
 <script>
 <script>
+import { STable, VSelect } from '@/components'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeList } from '@/api/dealerProductType'
+import rangeDate from '@/views/common/rangeDate.vue'
+// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
+// import { allocateTypeAllList } from '@/api/allocateType'
+export default {
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        targetName: undefined,
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      rules: {},
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码',
+          dataIndex: 'code',
+          width: 250,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 6
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '产品名称',
+          dataIndex: 'name',
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          },
+          ellipsis: true },
+        { title: '品牌',
+          dataIndex: 'brand',
+          align: 'center',
+          width: 200,
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '三级类别',
+          dataIndex: 'productLeve',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '原厂编码',
+          dataIndex: 'origCode',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '单位',
+          dataIndex: 'unit',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '期初数量', dataIndex: 'sqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '期初单价(¥)', dataIndex: 'sprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '期初金额(¥)', dataIndex: 'samount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '收入数量', dataIndex: 'srqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '收入单价(¥)', dataIndex: 'srprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '收入金额(¥)', dataIndex: 'sramount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '发出数量', dataIndex: 'fcqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '发出单价(¥)', dataIndex: 'fcprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '发出金额(¥)', dataIndex: 'fcamount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '结存数量', dataIndex: 'dcqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '结存单价(¥)', dataIndex: 'dcprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '结存金额(¥)', dataIndex: 'dcamount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
+        //   const data = res.data
+        //   const no = (data.pageNo - 1) * data.pageSize
+        //   for (var i = 0; i < data.list.length; i++) {
+        //     data.list[i].no = no + i + 1
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1',
+                code: '0000 1110 V003 / 000 1110 V004',
+                name: '广州非品牌 空调滤清器',
+                brand: '非品牌',
+                productLeve: '空调滤清器',
+                origCode: '',
+                unit: '个',
+                sqty: '8',
+                sprice: '9.00',
+                samount: '72.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '1',
+                fcprice: '9.00',
+                fcamount: '9.00',
+                dcqty: '7',
+                dcprice: '9.00',
+                dcamount: '63.00'
+              },
+              { id: '2',
+                code: '0000015',
+                name: '辅助单位测试',
+                brand: '雪企',
+                productLeve: '雪种油',
+                origCode: '',
+                unit: '升',
+                sqty: '24',
+                sprice: '32.71',
+                samount: '785.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 24,
+                dcprice: '32.71',
+                dcamount: '785.00'
+              },
+              { id: '3',
+                code: 'GA-11073N',
+                name: '冠牌空气滤清器 丰田威驰 吉利金刚 夏利2000',
+                brand: '冠牌',
+                productLeve: '空气滤清器',
+                origCode: '17801-14010',
+                unit: '个',
+                sqty: '106',
+                sprice: '6.48',
+                samount: '687.00',
+                srqty: '21',
+                srprice: '6.62',
+                sramount: '139.00',
+                fcqty: '74',
+                fcprice: '6.52',
+                fcamount: '482.50',
+                dcqty: 53,
+                dcprice: '6.48',
+                dcamount: '343.50'
+              },
+              { id: '4',
+                code: 'GA-11078N',
+                name: '冠牌空气滤清器 丰田新款佳美2.4',
+                brand: '冠牌',
+                productLeve: '空气滤清器',
+                origCode: '17801-20040',
+                unit: '个',
+                sqty: '200',
+                sprice: '7.50',
+                samount: '1500.00',
+                srqty: '7',
+                srprice: '7.21',
+                sramount: '50.50',
+                fcqty: '0',
+                fcprice: '0.00',
+                fcamount: '0.00',
+                dcqty: 207,
+                dcprice: '7.49',
+                dcamount: '1550.50'
+              },
+              { id: '5',
+                code: '00089',
+                name: 'SOFT99车蜡 氟素镀膜 白色车身用 防水保护效果持久',
+                brand: 'SOFT99',
+                productLeve: '车蜡',
+                origCode: '',
+                unit: '瓶',
+                sqty: '32',
+                sprice: '34.38',
+                samount: '1100.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 32,
+                dcprice: '34.38',
+                dcamount: '1100.00'
+              },
+              { id: '6',
+                code: '合计',
+                name: '合计',
+                brand: '合计',
+                productLeve: '合计',
+                origCode: '合计',
+                unit: '合计',
+                sqty: '1870',
+                sprice: '',
+                samount: '18767.94',
+                srqty: 28,
+                srprice: '',
+                sramount: '189.50',
+                fcqty: '77',
+                fcprice: '0.00',
+                fcamount: '515.50',
+                dcqty: 1821,
+                dcprice: '',
+                dcamount: '18441.94'
+              }
+            ],
+            count: 10
+          }
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = i + 1
+          }
+          _this.disabled = false
+          resolve(data)
+        })
+      },
+      productType: [],
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [] //  分类下拉数据
+    }
+  },
+  methods: {
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.targetName = undefined
+      this.queryParam.code = ''
+      this.queryParam.name = ''
+      this.queryParam.origCode = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.productType = []
+      this.$refs.table.refresh(true)
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    //  产品品牌  列表
+    getProductBrand () {
+      dealerProductBrandQuery({ 'sysFlag': '0' }).then(res => {
+        if (res.status == 200) {
+          this.productBrandList = res.data
+        } else {
+          this.productBrandList = []
+        }
+      })
+    },
+    //  产品分类  列表
+    getProductType () {
+      dealerProductTypeList({ 'sysFlag': '0' }).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getProductBrand()
+      vm.getProductType()
+    })
+  }
+}
 </script>
 </script>
-
-<style>
-</style>

+ 5 - 29
src/views/salesManagement/outboundOrder/list.vue

@@ -10,17 +10,8 @@
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称">
-              <a-select
-                id="outboundOrderList-demanderName"
-                placeholder="请选择"
-                allowClear
-                v-model="queryParam.demanderName"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerName">{{ item.customerName }}</a-select-option>
-              </a-select>
+            <a-form-item label="单位名称">
+              <a-input id="outboundOrderList-demanderName" v-model="queryParam.demanderName" placeholder="请输入单位名称" allowClear />
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
@@ -109,7 +100,6 @@
 <script>
 <script>
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { custAllList } from '@/api/customer'
 import { stockOutList, stockOutOut } from '@/api/stockOut'
 import { stockOutList, stockOutOut } from '@/api/stockOut'
 export default {
 export default {
   components: { STable, VSelect, rangeDate },
   components: { STable, VSelect, rangeDate },
@@ -120,18 +110,17 @@ export default {
       queryParam: { //  查询条件
       queryParam: { //  查询条件
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        demanderName: undefined, //  客户名称
+        demanderName: undefined, //  单位名称
         outBizType: undefined, //  出库类型
         outBizType: undefined, //  出库类型
         state: undefined //  状态
         state: undefined //  状态
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
-      custAllList: [], //  客户下拉数据
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
         { title: '关联单号', dataIndex: 'outBizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '关联单号', dataIndex: 'outBizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'demanderName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '单位名称', dataIndex: 'demanderName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'productTotalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'productTotalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -258,23 +247,10 @@ export default {
     onSelectChange (selectedRowKeys) {
     onSelectChange (selectedRowKeys) {
       console.log('selectedRowKeys changed: ', selectedRowKeys)
       console.log('selectedRowKeys changed: ', selectedRowKeys)
       this.selectedRowKeys = selectedRowKeys
       this.selectedRowKeys = selectedRowKeys
-    },
-    // 客户无分页列表数据
-    getCustAllList () {
-      const _this = this
-      custAllList().then(res => {
-        if (res.status == 200) {
-          _this.custAllList = res.data || []
-        } else {
-          _this.custAllList = []
-        }
-      })
     }
     }
   },
   },
   beforeRouteEnter (to, from, next) {
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getCustAllList()
-    })
+    next(vm => {})
   }
   }
 }
 }
 </script>
 </script>

+ 34 - 31
src/views/salesManagement/quotation/basicInfoModal.vue

@@ -8,37 +8,39 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     width="80%">
     width="80%">
-    <a-form-model
-      id="quotation-basicInfo-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol" >
-      <a-form-model-item label="客户名称" prop="name" extra="(未搜索到客户时可直接录入,但客户信息不保存于客户资料)">
-        <a-auto-complete id="quotation-basicInfo-bundleName" allowClear v-model="form.name" placeholder="请输入客户名称">
-          <template slot="dataSource">
-            <a-select-option v-for="item in optData" :key="item">{{ item }}</a-select-option>
-          </template>
-        </a-auto-complete>
-      </a-form-model-item>
-      <a-form-model-item label="价格类型" prop="priceType">
-        <v-select code="PRICE_TYPE" id="quotation-basicInfo-priceType" v-model="form.priceType" allowClear placeholder="请选择价格类型" ></v-select>
-      </a-form-model-item>
-      <a-form-model-item label="电话" prop="phone">
-        <a-input id="quotation-basicInfo-bundleName" v-model="form.bundleName" allowClear :maxLength="30" placeholder="请输入电话(最多30个字符)"/>
-      </a-form-model-item>
-      <a-form-model-item label="联系人" prop="phone">
-        <a-input id="quotation-basicInfo-bundleName" v-model="form.bundleName" allowClear :maxLength="30" placeholder="请输入联系人(最多30个字符)"/>
-      </a-form-model-item>
-      <a-form-model-item label="备注" prop="phone">
-        <a-textarea id="quotation-basicInfo-bundleName" v-model="form.bundleName" allowClear :maxLength="120" placeholder="请输入备注(最多120个字符)"/>
-      </a-form-model-item>
-    </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="quotation-basicInfo-modal-submit" @click="handleSubmit">提交</a-button>
-      <a-button id="quotation-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="quotation-basicInfo-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol" >
+        <a-form-model-item label="客户名称" prop="name" extra="(未搜索到客户时可直接录入,但客户信息不保存于客户资料)">
+          <a-auto-complete id="quotation-basicInfo-bundleName" allowClear v-model="form.name" placeholder="请输入客户名称">
+            <template slot="dataSource">
+              <a-select-option v-for="item in optData" :key="item">{{ item }}</a-select-option>
+            </template>
+          </a-auto-complete>
+        </a-form-model-item>
+        <a-form-model-item label="价格类型" prop="priceType">
+          <v-select code="PRICE_TYPE" id="quotation-basicInfo-priceType" v-model="form.priceType" allowClear placeholder="请选择价格类型" ></v-select>
+        </a-form-model-item>
+        <a-form-model-item label="电话" prop="phone">
+          <a-input id="quotation-basicInfo-bundleName" v-model="form.bundleName" allowClear :maxLength="30" placeholder="请输入电话(最多30个字符)"/>
+        </a-form-model-item>
+        <a-form-model-item label="联系人" prop="phone">
+          <a-input id="quotation-basicInfo-bundleName" v-model="form.bundleName" allowClear :maxLength="30" placeholder="请输入联系人(最多30个字符)"/>
+        </a-form-model-item>
+        <a-form-model-item label="备注" prop="phone">
+          <a-textarea id="quotation-basicInfo-bundleName" v-model="form.bundleName" allowClear :maxLength="120" placeholder="请输入备注(最多120个字符)"/>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="quotation-basicInfo-modal-submit" @click="handleSubmit">提交</a-button>
+        <a-button id="quotation-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -55,6 +57,7 @@
     },
     },
     data(){
     data(){
       return{
       return{
+        spinning: false,
         isShow: this.openModal, //  是否打开弹框
         isShow: this.openModal, //  是否打开弹框
         formItemLayout: {
         formItemLayout: {
           labelCol: { span: 6 },
           labelCol: { span: 6 },

+ 188 - 181
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -9,186 +9,188 @@
     :footer="null"
     :footer="null"
     @cancel="cancel"
     @cancel="cancel"
   >
   >
-    <a-form-model
-      id="chooseCustom-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="客户名称" prop="buyerSn">
-            <a-select
-              id="chooseCustom-buyerSn"
-              show-search
-              placeholder="请选择客户"
-              v-model="form.buyerSn"
-              :filter-option="filterOption"
-              @change="custChange">
-              <a-select-option v-for="item in custAllList" :key="item.id" :value="item.customerSn">{{ item.customerName }}</a-select-option>
-            </a-select>
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="16">
-          <a-form-model-item>
-            <a-button type="primary" class="button-primary" @click="openNewCust" icon="plus">新增</a-button>
-            (点击新增按钮新增客户)
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="16">
-          <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
-            <a-row :gutter="15">
-              <!-- 客户地址 -->
-              <a-col span="8">
-                <a-form-model-item prop="shippingAddressProvinceSn">
-                  <a-select id="chooseCustom-provinceSn" @change="getCityList" v-model="form.shippingAddressProvinceSn" placeholder="请选择省">
-                    <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col span="8">
-                <a-form-model-item prop="shippingAddressCitySn">
-                  <a-select id="chooseCustom-citySn" @change="getAreaList" v-model="form.shippingAddressCitySn" placeholder="请选择市">
-                    <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col span="8">
-                <a-form-model-item prop="shippingAddressCountySn">
-                  <a-select id="chooseCustom-countySn" @change="areaCharged" v-model="form.shippingAddressCountySn" placeholder="请选择区/县">
-                    <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-            </a-row>
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-model-item label="" prop="shippingAddress">
-            <a-input
-              id="chooseCustom-shippingAddress"
-              :maxLength="60"
-              v-model="form.shippingAddress"
-              placeholder="请输入详细地址(最多60个字符)"
-              allowClear />
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="联系人" prop="consigneeName">
-            <a-input
-              id="chooseCustom-consigneeName"
-              :maxLength="30"
-              v-model="form.consigneeName"
-              placeholder="请输入联系人(最多30个字符)"
-              allowClear />
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-model-item label="联系电话" prop="consigneeTel">
-            <a-input
-              id="chooseCustom-consigneeTel"
-              :maxLength="11"
-              v-model="form.consigneeTel"
-              placeholder="请输入联系电话(最多11个字符)"
-              allowClear />
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="价格类型" prop="priceType">
-            <a-row :gutter="15">
-              <a-col :span="20">
-                <v-select
-                  code="PRICE_TYPE"
-                  :disabled="priceTypeDisabled"
-                  id="chooseCustom-priceType"
-                  v-model="form.priceType"
-                  allowClear
-                  placeholder="请选择价格类型" ></v-select>
-              </a-col>
-              <a-col :span="4">
-                <a-popover>
-                  <template slot="content">(选择后在当前工单不可修改)</template>
-                  <a-icon type="question-circle" />
-                </a-popover>
-              </a-col>
-            </a-row>
-          </a-form-model-item>
-        </a-col>
-        <!-- <a-col :span="8">
-          <a-form-model-item label="支付方式" prop="payType">
-            <v-select code="PAY_TYPE" id="chooseCustom-payType" v-model="form.payType" allowClear placeholder="请选择支付方式" />
-          </a-form-model-item>
-        </a-col> -->
-        <a-col :span="8">
-          <a-form-model-item label="收款方式" prop="settleStyleSn">
-            <a-select placeholder="请选择收款方式" v-model="form.settleStyleSn">
-              <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
-                {{ item.name }}
-              </a-select-option>
-            </a-select>
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-model-item label="配送方式" prop="dispatchType">
-            <v-select code="DISPATCH_TYPE" id="chooseCustom-dispatchType" v-model="form.dispatchType" allowClear placeholder="请选择配送方式"></v-select>
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="业务员" prop="salesManSn">
-            <a-select id="chooseCustom-salesManSn" @change="salesManChange" v-model="form.salesManSn" placeholder="请选择业务员">
-              <a-select-option v-for="item in userList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-model-item label="铺货出库" prop="distributionFlag">
-            <v-select code="FLAG" id="chooseCustom-distributionFlag" v-model="form.distributionFlag" allowClear placeholder="请选择"></v-select>
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="备注" prop="remarks">
-            <a-input
-              id="chooseCustom-remarks"
-              type="textarea"
-              :maxLength="100"
-              v-model="form.remarks"
-              placeholder="请输入联系电话(最多100个字符)"
-              allowClear />
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-model-item label="开单人">{{ $store.state.user.info.userNameCN }}</a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-        <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
-        <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
-      </a-form-model-item>
-    </a-form-model>
-    <!-- 新增客户 -->
-    <a-modal
-      v-model="isNewCust"
-      title="新增客户"
-      centered
-      :width="960"
-      :maskClosable="false"
-      @cancel="cancelNewCust"
-      :footer="null"
-    >
-      <CustomerManagementEdit ref="newCust" model="modal" @ok="newCustFun"></CustomerManagementEdit>
-    </a-modal>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="客户名称" prop="buyerSn">
+              <a-select
+                id="chooseCustom-buyerSn"
+                show-search
+                placeholder="请选择客户"
+                v-model="form.buyerSn"
+                :filter-option="filterOption"
+                @change="custChange">
+                <a-select-option v-for="item in custAllList" :key="item.id" :value="item.customerSn">{{ item.customerName }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="16">
+            <a-form-model-item>
+              <a-button type="primary" class="button-primary" @click="openNewCust" icon="plus">新增</a-button>
+              (点击新增按钮新增客户)
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="16">
+            <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
+              <a-row :gutter="15">
+                <!-- 客户地址 -->
+                <a-col span="8">
+                  <a-form-model-item prop="shippingAddressProvinceSn">
+                    <a-select id="chooseCustom-provinceSn" @change="getCityList" v-model="form.shippingAddressProvinceSn" placeholder="请选择省">
+                      <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col span="8">
+                  <a-form-model-item prop="shippingAddressCitySn">
+                    <a-select id="chooseCustom-citySn" @change="getAreaList" v-model="form.shippingAddressCitySn" placeholder="请选择市">
+                      <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col span="8">
+                  <a-form-model-item prop="shippingAddressCountySn">
+                    <a-select id="chooseCustom-countySn" @change="areaCharged" v-model="form.shippingAddressCountySn" placeholder="请选择区/县">
+                      <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="" prop="shippingAddress">
+              <a-input
+                id="chooseCustom-shippingAddress"
+                :maxLength="60"
+                v-model="form.shippingAddress"
+                placeholder="请输入详细地址(最多60个字符)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="联系人" prop="consigneeName">
+              <a-input
+                id="chooseCustom-consigneeName"
+                :maxLength="30"
+                v-model="form.consigneeName"
+                placeholder="请输入联系人(最多30个字符)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="联系电话" prop="consigneeTel">
+              <a-input
+                id="chooseCustom-consigneeTel"
+                :maxLength="11"
+                v-model="form.consigneeTel"
+                placeholder="请输入联系电话(最多11个字符)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="价格类型" prop="priceType">
+              <a-row :gutter="15">
+                <a-col :span="20">
+                  <v-select
+                    code="PRICE_TYPE"
+                    :disabled="priceTypeDisabled"
+                    id="chooseCustom-priceType"
+                    v-model="form.priceType"
+                    allowClear
+                    placeholder="请选择价格类型" ></v-select>
+                </a-col>
+                <a-col :span="4">
+                  <a-popover>
+                    <template slot="content">(选择后在当前工单不可修改)</template>
+                    <a-icon type="question-circle" />
+                  </a-popover>
+                </a-col>
+              </a-row>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="8">
+            <a-form-model-item label="支付方式" prop="payType">
+              <v-select code="PAY_TYPE" id="chooseCustom-payType" v-model="form.payType" allowClear placeholder="请选择支付方式" />
+            </a-form-model-item>
+          </a-col> -->
+          <a-col :span="8">
+            <a-form-model-item label="收款方式" prop="settleStyleSn">
+              <a-select placeholder="请选择收款方式" v-model="form.settleStyleSn">
+                <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="配送方式" prop="dispatchType">
+              <v-select code="DISPATCH_TYPE" id="chooseCustom-dispatchType" v-model="form.dispatchType" allowClear placeholder="请选择配送方式"></v-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="业务员" prop="salesManSn">
+              <a-select id="chooseCustom-salesManSn" @change="salesManChange" v-model="form.salesManSn" placeholder="请选择业务员">
+                <a-select-option v-for="item in userList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="铺货出库" prop="distributionFlag">
+              <v-select code="FLAG" id="chooseCustom-distributionFlag" v-model="form.distributionFlag" allowClear placeholder="请选择"></v-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="备注" prop="remarks">
+              <a-input
+                id="chooseCustom-remarks"
+                type="textarea"
+                :maxLength="100"
+                v-model="form.remarks"
+                placeholder="请输入联系电话(最多100个字符)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="开单人">{{ $store.state.user.info.userNameCN }}</a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+          <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+      <!-- 新增客户 -->
+      <a-modal
+        v-model="isNewCust"
+        title="新增客户"
+        centered
+        :width="960"
+        :maskClosable="false"
+        @cancel="cancelNewCust"
+        :footer="null"
+      >
+        <CustomerManagementEdit ref="newCust" model="modal" @ok="newCustFun"></CustomerManagementEdit>
+      </a-modal>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -208,6 +210,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       opened: this.show,
       opened: this.show,
       title: '选择客户',
       title: '选择客户',
       confirmLoading: false,
       confirmLoading: false,
@@ -443,6 +446,7 @@ export default {
       const _this = this
       const _this = this
       const form = this.form
       const form = this.form
       console.log(form, 'save data')
       console.log(form, 'save data')
+      _this.spinning = true
       salesSave(form).then(res => {
       salesSave(form).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$message.success(res.message)
@@ -451,6 +455,9 @@ export default {
             _this.$emit('updateData', form.priceType)
             _this.$emit('updateData', form.priceType)
           }
           }
           _this.cancel()
           _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -493,7 +500,7 @@ export default {
       this.form.shippingAddressCountySn = undefined
       this.form.shippingAddressCountySn = undefined
       this.form.shippingAddressCountyName = ''
       this.form.shippingAddressCountyName = ''
       this.form.shippingAddress = ''
       this.form.shippingAddress = ''
-      this.form.shippingAddressCountyName = this.addrProvinceList.find(item => item.id == val).name
+      this.form.shippingAddressProvinceName = this.addrProvinceList.find(item => item.id == val).name
       this.getArea('city', val)
       this.getArea('city', val)
     },
     },
     // 获取区县列表
     // 获取区县列表

+ 72 - 68
src/views/salesManagement/salesQuery/detail.vue

@@ -1,73 +1,75 @@
 <template>
 <template>
   <div class="salesDetail-wrap">
   <div class="salesDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont">
-      <template slot="subTitle">
-        <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
-        <a-button
-          v-if="detailData&&detailData.billStatus !== 'CANCEL' && detailData.billStatus !== 'FINISH' && detailData.billStatus != 'WAIT_OUT_WAREHOUSE'"
-          type="primary"
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont">
+        <template slot="subTitle">
+          <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
+          <a-button
+            v-if="detailData&&detailData.billStatus !== 'CANCEL' && detailData.billStatus !== 'FINISH' && detailData.billStatus != 'WAIT_OUT_WAREHOUSE'"
+            type="primary"
+            size="small"
+            style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+            id="salesDetail-edit-btn"
+            @click.stop="handleEdit">编辑</a-button>
+        </template>
+        <template slot="extra">
+          <!-- <span>打印字段:</span>
+          <a-select key="1" style="width:150px" id="salesDetail-pritKey" placeholder="请选择打印字段" allowClear>
+            <a-select-option v-for="item in pritKey" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+          </a-select>
+          <span><i style="color: red;">*</i>打印模板:</span>
+          <a-select key="2" style="width:150px" id="salesDetail-pritKey" placeholder="请选择打印模板" allowClear>
+            <a-select-option v-for="item in pritModal" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+          </a-select> -->
+          <!-- <a-button key="5" id="salesDetail-export-btn">导出</a-button> -->
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="salesDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="salesDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="salesDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions size="small" :column="3" v-if="detailData">
+              <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="客户地址">{{ detailData.shippingAddressProvinceName || '--' }}{{ detailData.shippingAddressCityName || '--' }}{{ detailData.shippingAddressCountyName || '--' }}{{ detailData.shippingAddress || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收款方式">{{ detailData.settleStyleEntity.name || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系电话">{{ detailData.consigneeTel || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ detailData.remarks || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="销售单号">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="制单人">{{ detailData.operatorName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务员">{{ detailData.salesManName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="财务状态">{{ detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- alert -->
+        <a-alert type="info" style="margin-bottom: 15px;" v-if="detailData">
+          <div slot="message">
+            总款数:<strong>{{ detailData.totalCategory || 0 }}</strong>;总数量:<strong>{{ detailData.totalQty || 0 }}</strong>;总赠品数量:<strong>{{ detailData.giftQty || 0 }}</strong>;急件总款数:<strong>{{ detailData.oosCategory || 0 }}</strong>;急件总数量:<strong>{{ detailData.oosQty || 0 }}</strong>;<br/>
+            总售价:<strong>{{ detailData.totalAmount || 0 }}</strong>;总成本:<strong>{{ detailData.totalCost || 0 }}</strong>;总毛利:<strong>{{ detailData.grossProfit || 0 }}</strong>;折后总售价:<strong>{{ detailData.discountedAmount || 0 }}</strong>;折扣:<strong>{{ detailData.discountRate || 0 }}%</strong>;折扣金额:<strong>{{ detailData.discountAmount || 0 }}</strong>;
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
           size="small"
           size="small"
-          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
-          id="salesDetail-edit-btn"
-          @click.stop="handleEdit">编辑</a-button>
-      </template>
-      <template slot="extra">
-        <!-- <span>打印字段:</span>
-        <a-select key="1" style="width:150px" id="salesDetail-pritKey" placeholder="请选择打印字段" allowClear>
-          <a-select-option v-for="item in pritKey" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-        </a-select>
-        <span><i style="color: red;">*</i>打印模板:</span>
-        <a-select key="2" style="width:150px" id="salesDetail-pritKey" placeholder="请选择打印模板" allowClear>
-          <a-select-option v-for="item in pritModal" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-        </a-select> -->
-        <!-- <a-button key="5" id="salesDetail-export-btn">导出</a-button> -->
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="salesDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="salesDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="salesDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions size="small" :column="3" v-if="detailData">
-            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="客户地址">{{ detailData.shippingAddressProvinceName || '--' }}{{ detailData.shippingAddressCityName || '--' }}{{ detailData.shippingAddressCountyName || '--' }}{{ detailData.shippingAddress || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收款方式">{{ detailData.settleStyleEntity.name || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系电话">{{ detailData.consigneeTel || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ detailData.remarks || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="销售单号">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="制单人">{{ detailData.operatorName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务员">{{ detailData.salesManName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务状态">{{ detailData.billStatusDictValue || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="财务状态">{{ detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- alert -->
-      <a-alert type="info" style="margin-bottom: 15px;" v-if="detailData">
-        <div slot="message">
-          总款数:<strong>{{ detailData.totalCategory || 0 }}</strong>;总数量:<strong>{{ detailData.totalQty || 0 }}</strong>;总赠品数量:<strong>{{ detailData.giftQty || 0 }}</strong>;急件总款数:<strong>{{ detailData.oosCategory || 0 }}</strong>;急件总数量:<strong>{{ detailData.oosQty || 0 }}</strong>;<br/>
-          总售价:<strong>{{ detailData.totalAmount || 0 }}</strong>;总成本:<strong>{{ detailData.totalCost || 0 }}</strong>;总毛利:<strong>{{ detailData.grossProfit || 0 }}</strong>;折后总售价:<strong>{{ detailData.discountedAmount || 0 }}</strong>;折扣:<strong>{{ detailData.discountRate || 0 }}%</strong>;折扣金额:<strong>{{ detailData.discountAmount || 0 }}</strong>;
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1660 }"
-        bordered>
-      </s-table>
-    </a-card>
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1660 }"
+          bordered>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -83,6 +85,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       disabled: false,
       disabled: false,
       pritKey: [
       pritKey: [
         { id: 0, name: '打印促销' },
         { id: 0, name: '打印促销' },
@@ -147,7 +150,6 @@ export default {
     //  返回
     //  返回
     handleBack () {
     handleBack () {
       this.$router.push({ name: 'salesQueryList' })
       this.$router.push({ name: 'salesQueryList' })
-      // this.$router.back()
     },
     },
     // 编辑
     // 编辑
     handleEdit () {
     handleEdit () {
@@ -167,7 +169,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       salesDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       salesDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 141 - 126
src/views/salesManagement/salesQuery/edit.vue

@@ -1,142 +1,144 @@
 <template>
 <template>
   <div class="salesEdit-wrap">
   <div class="salesEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">客户名称:{{ detailData&&detailData.buyerName }}</span>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="salesEdit-preview-btn" :disabled="dataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="salesEdit-print-btn" :disabled="dataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="salesEdit-cont">
-      <!-- 查询配件列表 -->
-      <queryPart ref="partQuery" :buyerSn="detailData&&detailData.buyerSn" :priceType="$route.params.priceType" :newLoading="isInster" @add="insterProduct"></queryPart>
-    </a-card>
-    <a-card size="small" :bordered="false" class="salesEdit-cont">
-      <!-- 总计 -->
-      <a-alert style="margin-bottom: 15px;" type="info">
-        <div slot="message" class="total-bar">
-          <div>
-            总售价:<strong>¥{{ detailData&&detailData.totalAmount || 0 }}</strong>;
-            总款数:<strong>{{ detailData&&detailData.totalCategory || 0 }}</strong>;
-            总数量:<strong>{{ detailData&&detailData.totalQty || 0 }}</strong>;
-            赠品总数量:<strong>{{ detailData&&detailData.giftQty || 0 }}</strong>;
-          </div>
-          <div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ detailData&&detailData.buyerName }}</span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="salesEdit-preview-btn" :disabled="dataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="salesEdit-print-btn" :disabled="dataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="salesEdit-cont">
+        <!-- 查询配件列表 -->
+        <queryPart ref="partQuery" :buyerSn="detailData&&detailData.buyerSn" :priceType="$route.params.priceType" :newLoading="isInster" @add="insterProduct"></queryPart>
+      </a-card>
+      <a-card size="small" :bordered="false" class="salesEdit-cont">
+        <!-- 总计 -->
+        <a-alert style="margin-bottom: 15px;" type="info">
+          <div slot="message" class="total-bar">
             <div>
             <div>
-              折扣金额:
-              <a-input-number id="discount" v-model="detailData.discountAmount" :min="0" :precision="2" :max="999999"/>
-              <a-button type="primary" @click="salesDiscount" class="button-info">打折</a-button>
+              总售价:<strong>¥{{ detailData&&detailData.totalAmount || 0 }}</strong>;
+              总款数:<strong>{{ detailData&&detailData.totalCategory || 0 }}</strong>;
+              总数量:<strong>{{ detailData&&detailData.totalQty || 0 }}</strong>;
+              赠品总数量:<strong>{{ detailData&&detailData.giftQty || 0 }}</strong>;
             </div>
             </div>
             <div>
             <div>
-              折扣:<strong>{{ detailData&&detailData.discountRate || 0 }}%</strong>;
-              折后总售价:<strong>¥{{ detailData&&detailData.discountedAmount || 0 }}</strong>;
+              <div>
+                折扣金额:
+                <a-input-number id="discount" v-model="detailData.discountAmount" :min="0" :precision="2" :max="999999"/>
+                <a-button type="primary" @click="salesDiscount" class="button-info">打折</a-button>
+              </div>
+              <div>
+                折扣:<strong>{{ detailData&&detailData.discountRate || 0 }}%</strong>;
+                折后总售价:<strong>¥{{ detailData&&detailData.discountedAmount || 0 }}</strong>;
+              </div>
             </div>
             </div>
           </div>
           </div>
-        </div>
-      </a-alert>
-      <!-- 查询条件 -->
-      <a-row :gutter="15">
-        <a-col :span="18">
-          <a-form-model layout="inline" :model="productForm">
-            <a-form-model-item label="产品编码">
-              <a-input v-model="productForm.productCode" allowClear placeholder="输入产品编码" />
-            </a-form-model-item>
-            <a-form-model-item label="产品名称">
-              <a-input v-model="productForm.productName" allowClear placeholder="输入产品名称" />
-            </a-form-model-item>
-            <a-form-model-item>
-              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
-              <a-button style="margin: 0 0 18px 8px" @click="resetForm" id="salesEdit-reset">重置</a-button>
-            </a-form-model-item>
-          </a-form-model>
-        </a-col>
-        <a-col :span="6">
-          <div style="float:right;overflow: hidden;">
-            <!-- <a-button size="small" id="salesEdit-dru">导入明细</a-button> -->
+        </a-alert>
+        <!-- 查询条件 -->
+        <a-row :gutter="15">
+          <a-col :span="18">
+            <a-form-model layout="inline" :model="productForm">
+              <a-form-model-item label="产品编码">
+                <a-input v-model="productForm.productCode" allowClear placeholder="输入产品编码" />
+              </a-form-model-item>
+              <a-form-model-item label="产品名称">
+                <a-input v-model="productForm.productName" allowClear placeholder="输入产品名称" />
+              </a-form-model-item>
+              <a-form-model-item>
+                <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+                <a-button style="margin: 0 0 18px 8px" @click="resetForm" id="salesEdit-reset">重置</a-button>
+              </a-form-model-item>
+            </a-form-model>
+          </a-col>
+          <a-col :span="6">
+            <div style="float:right;overflow: hidden;">
+              <!-- <a-button size="small" id="salesEdit-dru">导入明细</a-button> -->
+              <a-button
+                size="small"
+                type="primary"
+                @click="delSalerDetailAll"
+                :loading="delLoading"
+                style="margin-left: 10px"
+                id="salesEdit-del-all">整单删除</a-button>
+            </div>
+          </a-col>
+        </a-row>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1940, y: 300 }"
+          :rowClassName="(record, index) => record.cost > record.price ? 'redBg-row':''"
+          bordered>
+          <!-- 产品编码 -->
+          <template slot="productCode" slot-scope="text, record">
+            <a-badge count="急" v-if="record.oosFlag == 1">
+              <div style="padding-right: 15px;">{{ text }}</div>
+            </a-badge>
+            <span v-else>{{ text }}</span>
+          </template>
+          <!-- 售价 -->
+          <template slot="price" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="text"
+              id="salesEdit-price"
+              :max="999999"
+              :min="0"
+              :precision="2"
+              punit="¥"
+              @change="onCellChange(record.id, 'price', $event)" />
+          </template>
+          <!-- 销售数量 -->
+          <template slot="salesNums" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.qty"
+              id="salesEdit-salesNums"
+              :max="999999"
+              :min="1"
+              :precision="0"
+              @change="onCellChange(record.id, 'qty', $event)" />
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
             <a-button
             <a-button
               size="small"
               size="small"
               type="primary"
               type="primary"
-              @click="delSalerDetailAll"
               :loading="delLoading"
               :loading="delLoading"
-              style="margin-left: 10px"
-              id="salesEdit-del-all">整单删除</a-button>
-          </div>
-        </a-col>
-      </a-row>
-      <!-- 已选配件列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1940, y: 300 }"
-        :rowClassName="(record, index) => record.cost > record.price ? 'redBg-row':''"
-        bordered>
-        <!-- 产品编码 -->
-        <template slot="productCode" slot-scope="text, record">
-          <a-badge count="急" v-if="record.oosFlag == 1">
-            <div style="padding-right: 15px;">{{ text }}</div>
-          </a-badge>
-          <span v-else>{{ text }}</span>
-        </template>
-        <!-- 售价 -->
-        <template slot="price" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="text"
-            id="salesEdit-price"
-            :max="999999"
-            :min="0"
-            :precision="2"
-            punit="¥"
-            @change="onCellChange(record.id, 'price', $event)" />
-        </template>
-        <!-- 销售数量 -->
-        <template slot="salesNums" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.qty"
-            id="salesEdit-salesNums"
-            :max="999999"
-            :min="1"
-            :precision="0"
-            @change="onCellChange(record.id, 'qty', $event)" />
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
+              class="button-error"
+              @click="handleDel(record)"
+              id="productInfoList-Del">删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div
+          style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
           <a-button
           <a-button
-            size="small"
+            size="large"
+            style="width: 150px;"
             type="primary"
             type="primary"
-            :loading="delLoading"
-            class="button-error"
-            @click="handleDel(record)"
-            id="productInfoList-Del">删除</a-button>
-        </template>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div
-        style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          size="large"
-          style="width: 150px;"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit()"
-          id="productInfoList-handleSubmit">提交</a-button>
-      </div>
-    </a-affix>
+            class="button-primary"
+            @click="handleSubmit()"
+            id="productInfoList-handleSubmit">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <!-- 选择客户弹框 -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal ref="custModal" :show="openModal" @updateData="updateData" @cancel="openModal=false" />
     <choose-custom-modal ref="custModal" :show="openModal" @updateData="updateData" @cancel="openModal=false" />
     <!-- 打印 -->
     <!-- 打印 -->
@@ -156,6 +158,7 @@ export default {
   components: { STable, VSelect, queryPart, chooseCustomModal, EditableCell },
   components: { STable, VSelect, queryPart, chooseCustomModal, EditableCell },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       orderId: null, // 销售单id
       orderId: null, // 销售单id
       salesBillSn: null, // 销售单sn
       salesBillSn: null, // 销售单sn
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
@@ -238,7 +241,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       salesDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       salesDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {
@@ -306,6 +311,7 @@ export default {
         return
         return
       }
       }
       console.log(this.detailData)
       console.log(this.detailData)
+      this.spinning = true
       salesWriteDiscount({
       salesWriteDiscount({
         discountAmount: this.detailData.discountAmount,
         discountAmount: this.detailData.discountAmount,
         salesBillSn: this.detailData.salesBillSn,
         salesBillSn: this.detailData.salesBillSn,
@@ -313,6 +319,9 @@ export default {
       }).then(res => {
       }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.resetSearchForm()
           this.resetSearchForm()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -399,6 +408,7 @@ export default {
     saveNewProduct (row) {
     saveNewProduct (row) {
       this.$message.loading('正在添加产品...', 1)
       this.$message.loading('正在添加产品...', 1)
       this.isInster = true
       this.isInster = true
+      this.spinning = true
       salesDetailInsert({
       salesDetailInsert({
         buyerSn: this.detailData.buyerSn,
         buyerSn: this.detailData.buyerSn,
         productSn: row.productSn,
         productSn: row.productSn,
@@ -419,6 +429,7 @@ export default {
           this.$message.success('产品添加成功', 2.5)
           this.$message.success('产品添加成功', 2.5)
         }
         }
         this.isInster = false
         this.isInster = false
+        this.spinning = false
       })
       })
     },
     },
     //  销售单详情
     //  销售单详情
@@ -433,10 +444,14 @@ export default {
     },
     },
     // 提交销售单
     // 提交销售单
     handleSubmit () {
     handleSubmit () {
+      this.spinning = true
       salesWriteSubmit({ id: this.orderId }).then(res => {
       salesWriteSubmit({ id: this.orderId }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.handleBack()
           this.handleBack()
           this.$message.success(res.message)
           this.$message.success(res.message)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     }
     }

+ 35 - 25
src/views/salesManagement/salesQuery/list.vue

@@ -134,7 +134,7 @@
           size="small"
           size="small"
           type="link"
           type="link"
           class="button-info"
           class="button-info"
-          v-if="record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')"
+          v-if="(record.salesBillSource == 'SATELLITE' || record.salesBillSource == 'SALES') && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')"
           @click="handleEdit(record)"
           @click="handleEdit(record)"
         >
         >
           编辑
           编辑
@@ -143,7 +143,7 @@
           size="small"
           size="small"
           type="link"
           type="link"
           class="button-error"
           class="button-error"
-          v-if="record.salesBillSource == 'SALES' && record.billStatus != 'FINISH'"
+          v-if="(record.salesBillSource == 'SATELLITE' || record.salesBillSource == 'SALES') && record.billStatus != 'FINISH'"
           @click="handleDel(record)"
           @click="handleDel(record)"
         >
         >
           删除
           删除
@@ -171,19 +171,22 @@
     </s-table>
     </s-table>
     <!-- 选择客户弹框 -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
+    <!-- 审核 -->
+    <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_OUT_WAREHOUSE')" @fail="auditOrder('AUDIT_REJECT')" />
   </a-card>
   </a-card>
 </template>
 </template>
 
 
 <script>
 <script>
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import chooseCustomModal from './chooseCustomModal.vue'
 import chooseCustomModal from './chooseCustomModal.vue'
+import auditModal from '@/views/common/auditModal.vue'
 import { custAllList } from '@/api/customer'
 import { custAllList } from '@/api/customer'
 import { salesList, salesDel, salesWriteAudit, salesWriteStockOut, salesCount } from '@/api/sales'
 import { salesList, salesDel, salesWriteAudit, salesWriteStockOut, salesCount } from '@/api/sales'
 import { settleStyleQueryAll } from '@/api/settleStyle'
 import { settleStyleQueryAll } from '@/api/settleStyle'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 export default {
 export default {
   name: 'TableList',
   name: 'TableList',
-  components: { STable, VSelect, chooseCustomModal, rangeDate },
+  components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal },
   data () {
   data () {
     return {
     return {
       tableHeight: 0,
       tableHeight: 0,
@@ -247,7 +250,9 @@ export default {
           this.disabled = false
           this.disabled = false
           return data
           return data
         })
         })
-      }
+      },
+      visibleAudit: false,
+      auditInfo: null
     }
     }
   },
   },
   methods: {
   methods: {
@@ -266,33 +271,38 @@ export default {
     },
     },
     //  审核
     //  审核
     handleEexamine (row) {
     handleEexamine (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '请点击下方按钮确认操作?',
-        centered: true,
-        closable: true,
-        okText: '审核通过',
-        cancelText: '审核不通过',
-        onOk () {
-          _this.auditOrder(row.id, 'WAIT_OUT_WAREHOUSE')
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder(row.id, 'AUDIT_REJECT')
-          }
-          _this.$destroyAll()
-        }
-      })
+      // const _this = this
+      // this.$confirm({
+      //   title: '提示',
+      //   content: '请点击下方按钮确认操作?',
+      //   centered: true,
+      //   closable: true,
+      //   okText: '审核通过',
+      //   cancelText: '审核不通过',
+      //   onOk () {
+      //     _this.auditOrder(row.id, 'WAIT_OUT_WAREHOUSE')
+      //   },
+      //   onCancel (e) {
+      //     if (!e.triggerCancel) {
+      //       _this.auditOrder(row.id, 'AUDIT_REJECT')
+      //     }
+      //     _this.$destroyAll()
+      //   }
+      // })
+      this.auditInfo = row
+      this.visibleAudit = true
     },
     },
-    auditOrder (id, billStatus) {
+    auditOrder (billStatus) {
       salesWriteAudit({
       salesWriteAudit({
-        id,
-        billStatus
+        id: this.auditInfo.id,
+        billStatus: billStatus
       }).then(res => {
       }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
+          this.visibleAudit = false
           this.$message.success(res.message)
           this.$message.success(res.message)
           this.$refs.table.refresh()
           this.$refs.table.refresh()
+        } else {
+          this.visibleAudit = false
         }
         }
       })
       })
     },
     },

+ 2 - 0
src/views/salesManagement/salesQuery/queryPart.vue

@@ -210,6 +210,7 @@ export default {
       ],
       ],
       productType: [],
       productType: [],
       queryParam: { //  查询条件
       queryParam: { //  查询条件
+        customerSn: '',
         salePriceType: '',
         salePriceType: '',
         productCode: '', //  产品编码
         productCode: '', //  产品编码
         productName: '', //  产品名称
         productName: '', //  产品名称
@@ -250,6 +251,7 @@ export default {
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
         this.queryParam.salePriceType = this.priceType
         this.queryParam.salePriceType = this.priceType
+        this.queryParam.customerSn = this.buyerSn
         // 排序
         // 排序
         if (parameter.sortField == 'productCode') {
         if (parameter.sortField == 'productCode') {
           parameter.sortField = 'code'
           parameter.sortField = 'code'

+ 125 - 118
src/views/salesManagement/salesReturn/chooseCustomModal.vue

@@ -9,124 +9,126 @@
     :footer="null"
     :footer="null"
     @cancel="cancel"
     @cancel="cancel"
   >
   >
-    <a-form-model
-      id="chooseCustom-form"
-      ref="ruleForm"
-      :model="form"
-      :rules="rules"
-      :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="客户名称" prop="buyerSn">
-            <a-select
-              id="chooseCustom-buyerSn"
-              show-search
-              placeholder="请选择客户"
-              v-model="form.buyerSn"
-              :filter-option="filterOption"
-              @change="custChange">
-              <a-select-option v-for="item in custAllList" :key="item.id" :value="item.customerSn">{{ item.customerName }}</a-select-option>
-            </a-select>
-          </a-form-model-item>
-        </a-col>
-        <!-- <a-col :span="16">
-          <a-form-model-item>
-            <a-button type="primary" class="button-primary" @click="openNewCust" icon="plus">新增</a-button>
-            (点击新增按钮新增客户)
-          </a-form-model-item>
-        </a-col> -->
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="16">
-          <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
-            <a-row :gutter="15">
-              <!-- 客户地址 -->
-              <a-col span="8">
-                <a-form-model-item prop="provinceSn">
-                  <a-select id="chooseCustom-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
-                    <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col span="8">
-                <a-form-model-item prop="citySn">
-                  <a-select id="chooseCustom-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
-                    <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col span="8">
-                <a-form-model-item prop="countySn">
-                  <a-select id="chooseCustom-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
-                    <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-            </a-row>
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-model-item label="" prop="customerAddr">
-            <a-input
-              id="chooseCustom-customerAddr"
-              :maxLength="60"
-              v-model="form.customerAddr"
-              placeholder="请输入详细地址(最多60个字符)"
-              allowClear />
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="联系人" prop="consigneeName">
-            <a-input
-              id="chooseCustom-consigneeName"
-              :maxLength="30"
-              v-model="form.consigneeName"
-              placeholder="请输入联系人(最多30个字符)"
-              allowClear />
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-model-item label="联系电话" prop="consigneeTel">
-            <a-input
-              id="chooseCustom-consigneeTel"
-              :maxLength="30"
-              v-model="form.consigneeTel"
-              placeholder="请输入联系电话(最多30个字符)"
-              allowClear />
-          </a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="15">
-        <a-col :span="8">
-          <a-form-model-item label="是否抓单" prop="grabFlag">
-            <v-select code="FLAG" id="chooseCustom-grabFlag" v-model="form.grabFlag" allowClear placeholder="请选择"></v-select>
-          </a-form-model-item>
-        </a-col>
-        <a-col :span="8">
-          <a-form-model-item label="开单人">{{ $store.state.user.info.userNameCN }}</a-form-model-item>
-        </a-col>
-      </a-row>
-      <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-        <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
-        <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
-      </a-form-model-item>
-    </a-form-model>
-    <!-- 新增客户 -->
-    <a-modal
-      v-model="isNewCust"
-      title="新增客户"
-      centered
-      width="60%"
-      :maskClosable="false"
-      @cancel="cancelNewCust"
-      :footer="null"
-    >
-      <CustomerManagementEdit ref="newCust" model="modal" @ok="newCustFun"></CustomerManagementEdit>
-    </a-modal>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="客户名称" prop="buyerSn">
+              <a-select
+                id="chooseCustom-buyerSn"
+                show-search
+                placeholder="请选择客户"
+                v-model="form.buyerSn"
+                :filter-option="filterOption"
+                @change="custChange">
+                <a-select-option v-for="item in custAllList" :key="item.id" :value="item.customerSn">{{ item.customerName }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="16">
+            <a-form-model-item>
+              <a-button type="primary" class="button-primary" @click="openNewCust" icon="plus">新增</a-button>
+              (点击新增按钮新增客户)
+            </a-form-model-item>
+          </a-col> -->
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="16">
+            <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
+              <a-row :gutter="15">
+                <!-- 客户地址 -->
+                <a-col span="8">
+                  <a-form-model-item prop="provinceSn">
+                    <a-select id="chooseCustom-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
+                      <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col span="8">
+                  <a-form-model-item prop="citySn">
+                    <a-select id="chooseCustom-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
+                      <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col span="8">
+                  <a-form-model-item prop="countySn">
+                    <a-select id="chooseCustom-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
+                      <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="" prop="customerAddr">
+              <a-input
+                id="chooseCustom-customerAddr"
+                :maxLength="60"
+                v-model="form.customerAddr"
+                placeholder="请输入详细地址(最多60个字符)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="联系人" prop="consigneeName">
+              <a-input
+                id="chooseCustom-consigneeName"
+                :maxLength="30"
+                v-model="form.consigneeName"
+                placeholder="请输入联系人(最多30个字符)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="联系电话" prop="consigneeTel">
+              <a-input
+                id="chooseCustom-consigneeTel"
+                :maxLength="30"
+                v-model="form.consigneeTel"
+                placeholder="请输入联系电话(最多30个字符)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="8">
+            <a-form-model-item label="是否抓单" prop="grabFlag">
+              <v-select code="FLAG" id="chooseCustom-grabFlag" v-model="form.grabFlag" allowClear placeholder="请选择"></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="开单人">{{ $store.state.user.info.userNameCN }}</a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+          <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+      <!-- 新增客户 -->
+      <a-modal
+        v-model="isNewCust"
+        title="新增客户"
+        centered
+        width="60%"
+        :maskClosable="false"
+        @cancel="cancelNewCust"
+        :footer="null"
+      >
+        <CustomerManagementEdit ref="newCust" model="modal" @ok="newCustFun"></CustomerManagementEdit>
+      </a-modal>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -144,6 +146,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       opened: this.show,
       opened: this.show,
       title: '选择客户',
       title: '选择客户',
       confirmLoading: false,
       confirmLoading: false,
@@ -332,11 +335,15 @@ export default {
       const _this = this
       const _this = this
       const form = this.form
       const form = this.form
       console.log(form, 'save data')
       console.log(form, 'save data')
+      _this.spinning = true
       salesReturnSave(form).then(res => {
       salesReturnSave(form).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$message.success(res.message)
           _this.$emit('ok', res.data)
           _this.$emit('ok', res.data)
           _this.cancel()
           _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
         }
       })
       })
     },
     },

+ 53 - 48
src/views/salesManagement/salesReturn/detail.vue

@@ -1,53 +1,55 @@
 <template>
 <template>
   <div class="salesReturnDetail-wrap">
   <div class="salesReturnDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="salesReturnDetail-cont">
-      <template slot="subTitle">
-        <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
-      </template>
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="salesReturnDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="salesReturnDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="salesReturnDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions size="small" :column="3" v-if="detailData">
-            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="客户地址">{{ detailData.provinceName || '--' }}{{ detailData.cityName || '--' }}{{ detailData.countyName || '--' }}{{ detailData.customerAddr || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系电话">{{ detailData.contactTel || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ detailData.remarks || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="退货单号">{{ detailData.salesReturnNo || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务状态">{{ detailData.stateDictValue || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- alert -->
-      <a-alert type="info" style="margin-bottom: 15px;" v-if="detailData">
-        <div slot="message">
-          总款数:<strong>{{ countData.totalCategory || 0 }}</strong>;总数量:<strong>{{ countData.totalQty || 0 }}</strong>;废品数量:<strong>{{ countData.totalCelQty || 0 }}</strong>;<br/>
-          退货总金额:<strong>{{ countData.totalAmount || 0 }}</strong>;折扣金额:<strong>{{ countData.discountAmount || 0 }}</strong>;折扣:<strong>{{ countData.discountRate || 0 }}%</strong>;折后金额:<strong>{{ countData.discountedAmount || 0 }}</strong>;
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="default"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1430 }"
-        bordered>
-      </s-table>
-    </a-card>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnDetail-cont">
+        <template slot="subTitle">
+          <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
+        </template>
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="salesReturnDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="salesReturnDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="salesReturnDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions size="small" :column="3" v-if="detailData">
+              <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="客户地址">{{ detailData.provinceName || '--' }}{{ detailData.cityName || '--' }}{{ detailData.countyName || '--' }}{{ detailData.customerAddr || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系电话">{{ detailData.contactTel || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ detailData.remarks || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货单号">{{ detailData.salesReturnNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ detailData.stateDictValue || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- alert -->
+        <a-alert type="info" style="margin-bottom: 15px;" v-if="detailData">
+          <div slot="message">
+            总款数:<strong>{{ countData.totalCategory || 0 }}</strong>;总数量:<strong>{{ countData.totalQty || 0 }}</strong>;废品数量:<strong>{{ countData.totalCelQty || 0 }}</strong>;<br/>
+            退货总金额:<strong>{{ countData.totalAmount || 0 }}</strong>;折扣金额:<strong>{{ countData.discountAmount || 0 }}</strong>;折扣:<strong>{{ countData.discountRate || 0 }}%</strong>;折后金额:<strong>{{ countData.discountedAmount || 0 }}</strong>;
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="default"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1430 }"
+          bordered>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 打印 -->
     <!-- 打印 -->
     <div id="print"></div>
     <div id="print"></div>
   </div>
   </div>
@@ -62,6 +64,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       disabled: false,
       disabled: false,
       countData: null,
       countData: null,
       // 表头
       // 表头
@@ -134,7 +137,9 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       salesReturnDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       salesReturnDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 9 - 1
src/views/salesManagement/salesReturn/queryPart.vue

@@ -69,6 +69,7 @@
           type="primary"
           type="primary"
           class="button-info"
           class="button-info"
           :loading="newLoading"
           :loading="newLoading"
+          :disabled="(grabFlag==1)&&(record.qty==record.hasReturnQty)"
           @click="handleAdd(record)"
           @click="handleAdd(record)"
         >添加</a-button>
         >添加</a-button>
       </template>
       </template>
@@ -122,10 +123,12 @@ export default {
           for (var i = 0; i < data.list.length; i++) {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
             data.list[i].no = no + i + 1
           }
           }
+          this.listData = data.list || []
           this.disabled = false
           this.disabled = false
           return data
           return data
         })
         })
-      }
+      },
+      listData: []
     }
     }
   },
   },
   mounted () {
   mounted () {
@@ -182,6 +185,11 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.productCode = ''
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
+    refreshData () {
+      if (this.listData.length > 0) {
+        this.$refs.table.refresh(true)
+      }
+    },
     // 选择配件
     // 选择配件
     handleAdd (row) {
     handleAdd (row) {
       this.$emit('add', row, 'new')
       this.$emit('add', row, 'new')

+ 153 - 142
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -1,158 +1,160 @@
 <template>
 <template>
   <div>
   <div>
-    <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">客户名称:{{ (ordeDetail&&ordeDetail.buyerName) || '--' }}</span>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="salesReturnEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="salesReturnEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- 查询配件列表 -->
-      <queryPart :buyerSn="$route.params.buyerSn" :priceType="ordeDetail.priceType" grabFlag="0" :newLoading="isInster" @add="saveProduct"></queryPart>
-    </a-card>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- alert -->
-      <a-alert style="margin-bottom: 15px;" type="info">
-        <div slot="message" class="total-bar">
-          <div>
-            <span>退货总金额:{{ countData&&countData.totalAmount }}元;</span>
-            <span>总款数:{{ countData&&countData.totalCategory }};</span>
-            <span>总数量:{{ countData&&countData.totalQty }};</span>
-            <span>废品总数量:{{ countData&&countData.totalCelQty }};</span>
-          </div>
-          <div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ (ordeDetail&&ordeDetail.buyerName) || '--' }}</span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="salesReturnEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="salesReturnEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- 查询配件列表 -->
+        <queryPart :buyerSn="$route.params.buyerSn" :priceType="ordeDetail.priceType" grabFlag="0" :newLoading="isInster" @add="saveProduct"></queryPart>
+      </a-card>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- alert -->
+        <a-alert style="margin-bottom: 15px;" type="info">
+          <div slot="message" class="total-bar">
             <div>
             <div>
-              折扣金额:
-              <a-input-number id="discount" v-model="ordeDetail.discountAmount" :min="0" :precision="2" :max="999999"/>
-              <a-button type="primary" @click="salesReturnDiscount" class="button-info">打折</a-button>
+              <span>退货总金额:{{ countData&&countData.totalAmount }}元;</span>
+              <span>总款数:{{ countData&&countData.totalCategory }};</span>
+              <span>总数量:{{ countData&&countData.totalQty }};</span>
+              <span>废品总数量:{{ countData&&countData.totalCelQty }};</span>
             </div>
             </div>
             <div>
             <div>
-              折扣:<strong>{{ ordeDetail&&ordeDetail.discountRate || 0 }}%</strong>;
-              折后总售价:<strong>¥{{ ordeDetail&&ordeDetail.discountedAmount || 0 }}</strong>;
+              <div>
+                折扣金额:
+                <a-input-number id="discount" v-model="ordeDetail.discountAmount" :min="0" :precision="2" :max="999999"/>
+                <a-button type="primary" @click="salesReturnDiscount" class="button-info">打折</a-button>
+              </div>
+              <div>
+                折扣:<strong>{{ ordeDetail&&ordeDetail.discountRate || 0 }}%</strong>;
+                折后总售价:<strong>¥{{ ordeDetail&&ordeDetail.discountedAmount || 0 }}</strong>;
+              </div>
             </div>
             </div>
           </div>
           </div>
-        </div>
-      </a-alert>
-      <!-- 查询条件 -->
-      <a-row :gutter="15">
-        <a-col :span="18">
-          <a-form-model layout="inline" :model="productForm" @keyup.enter.native="$refs.table.refresh(true)">
-            <a-form-model-item label="产品编码">
-              <a-input v-model="productForm.productCode" placeholder="输入产品编码" />
-            </a-form-model-item>
-            <a-form-model-item label="产品名称">
-              <a-input v-model="productForm.productName" placeholder="输入产品名称" />
-            </a-form-model-item>
-            <a-form-model-item>
-              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturn-refresh">查询</a-button>
-              <a-button style="margin: 0 0 18px 8px" @click="resetForm" id="salesReturn-reset">重置</a-button>
-            </a-form-model-item>
-          </a-form-model>
-        </a-col>
-        <a-col :span="6">
-          <div style="float:right;overflow: hidden;">
-            <!-- <a-button id="salesReturn-dru">导入明细</a-button> -->
+        </a-alert>
+        <!-- 查询条件 -->
+        <a-row :gutter="15">
+          <a-col :span="18">
+            <a-form-model layout="inline" :model="productForm" @keyup.enter.native="$refs.table.refresh(true)">
+              <a-form-model-item label="产品编码">
+                <a-input v-model="productForm.productCode" placeholder="输入产品编码" />
+              </a-form-model-item>
+              <a-form-model-item label="产品名称">
+                <a-input v-model="productForm.productName" placeholder="输入产品名称" />
+              </a-form-model-item>
+              <a-form-model-item>
+                <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturn-refresh">查询</a-button>
+                <a-button style="margin: 0 0 18px 8px" @click="resetForm" id="salesReturn-reset">重置</a-button>
+              </a-form-model-item>
+            </a-form-model>
+          </a-col>
+          <a-col :span="6">
+            <div style="float:right;overflow: hidden;">
+              <!-- <a-button id="salesReturn-dru">导入明细</a-button> -->
+              <a-button
+                size="small"
+                type="primary"
+                @click="salesReturnDelAll"
+                :loading="delLoading"
+                style="margin-left: 10px"
+                id="salesReturn-del-all">整单删除</a-button>
+            </div>
+          </a-col>
+        </a-row>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1830, y: 300 }"
+          bordered>
+          <!-- 本次退货数量 -->
+          <template slot="qty" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.qty"
+              :max="999999"
+              :min="0"
+              :precision="0"
+              @change="onCellChange(record.id, 'qty', $event)" />
+          </template>
+          <!-- 废品数量 -->
+          <template slot="celQty" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.celQty"
+              :max="999999"
+              :min="0"
+              :precision="0"
+              @change="onCellChange(record.id, 'celQty', $event)" />
+          </template>
+          <!-- 价格 -->
+          <template slot="price" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="text"
+              :max="999999"
+              :min="0"
+              :precision="2"
+              punit="¥"
+              @change="onCellChange(record.id, 'price', $event)" />
+          </template>
+          <!-- 退货金额小计 -->
+          <template slot="returnAmount" slot-scope="text, record">
+            ¥{{ (record.price * record.qty).toFixed(2) }}
+          </template>
+          <!-- 仓库仓位 -->
+          <template slot="warehouse" slot-scope="text, record, index">
+            <a-cascader
+              @change="e => changeWarehouseCascade(e, record, index)"
+              v-model="record.warehouseCascade"
+              expand-trigger="hover"
+              :options="warehouseCascadeData"
+              :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+              id="bulkWarehousingOrderEdit-warehouseCascade"
+              placeholder="请选择仓库仓位"
+              style="width: 100%;" />
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
             <a-button
             <a-button
               size="small"
               size="small"
               type="primary"
               type="primary"
-              @click="salesReturnDelAll"
               :loading="delLoading"
               :loading="delLoading"
-              style="margin-left: 10px"
-              id="salesReturn-del-all">整单删除</a-button>
-          </div>
-        </a-col>
-      </a-row>
-      <!-- 已选配件列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1830, y: 300 }"
-        bordered>
-        <!-- 本次退货数量 -->
-        <template slot="qty" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.qty"
-            :max="999999"
-            :min="0"
-            :precision="0"
-            @change="onCellChange(record.id, 'qty', $event)" />
-        </template>
-        <!-- 废品数量 -->
-        <template slot="celQty" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.celQty"
-            :max="999999"
-            :min="0"
-            :precision="0"
-            @change="onCellChange(record.id, 'celQty', $event)" />
-        </template>
-        <!-- 价格 -->
-        <template slot="price" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="text"
-            :max="999999"
-            :min="0"
-            :precision="2"
-            punit="¥"
-            @change="onCellChange(record.id, 'price', $event)" />
-        </template>
-        <!-- 退货金额小计 -->
-        <template slot="returnAmount" slot-scope="text, record">
-          ¥{{ (record.price * record.qty).toFixed(2) }}
-        </template>
-        <!-- 仓库仓位 -->
-        <template slot="warehouse" slot-scope="text, record, index">
-          <a-cascader
-            @change="e => changeWarehouseCascade(e, record, index)"
-            v-model="record.warehouseCascade"
-            expand-trigger="hover"
-            :options="warehouseCascadeData"
-            :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-            id="bulkWarehousingOrderEdit-warehouseCascade"
-            placeholder="请选择仓库仓位"
-            style="width: 100%;" />
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
+              class="button-error"
+              @click="handleDel(record)"
+              id="salesReturn-Del">删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div
+          style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
           <a-button
           <a-button
-            size="small"
+            size="large"
+            style="width: 150px;"
             type="primary"
             type="primary"
-            :loading="delLoading"
-            class="button-error"
-            @click="handleDel(record)"
-            id="salesReturn-Del">删除</a-button>
-        </template>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div
-        style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          size="large"
-          style="width: 150px;"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit()"
-          id="salesReturn-handleSubmit">提交</a-button>
-      </div>
-    </a-affix>
+            class="button-primary"
+            @click="handleSubmit()"
+            id="salesReturn-handleSubmit">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <!-- 选择客户弹框 -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <!-- 打印 -->
     <!-- 打印 -->
@@ -178,6 +180,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       orderId: null,
       orderId: null,
       orderSn: null,
       orderSn: null,
       buyerSn: null,
       buyerSn: null,
@@ -415,24 +418,32 @@ export default {
       } else {
       } else {
         params.salesQty = row.qty
         params.salesQty = row.qty
       }
       }
+      this.spinning = true
       salesReturnSaveProduct(params).then(res => {
       salesReturnSaveProduct(params).then(res => {
         this.resetSearchForm(true)
         this.resetSearchForm(true)
         this.isInster = false
         this.isInster = false
+        this.spinning = false
       })
       })
     },
     },
     // 提交销售单
     // 提交销售单
     handleSubmit () {
     handleSubmit () {
+      this.spinning = true
       salesReturnSubmit({ sn: this.orderSn }).then(res => {
       salesReturnSubmit({ sn: this.orderSn }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.handleBack()
           this.handleBack()
           this.$message.success(res.message)
           this.$message.success(res.message)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       salesReturnDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       salesReturnDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 144 - 132
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -1,148 +1,150 @@
 <template>
 <template>
   <div>
   <div>
-    <a-page-header :ghost="false" :backIcon="false" class="salesReturnGrabEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="salesReturnGrabEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">客户名称:{{ (ordeDetail&&ordeDetail.buyerName) || '--' }}</span>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="salesReturnEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="salesReturnEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- 查询配件列表 -->
-      <queryPart :buyerSn="$route.params.buyerSn" grabFlag="1" :newLoading="isInster" @add="saveProduct"></queryPart>
-    </a-card>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- alert -->
-      <a-alert style="margin-bottom: 15px;" type="info">
-        <div slot="message" class="total-bar">
-          <div>
-            <span>退货总金额:{{ countData&&countData.totalAmount }}元;</span>
-            <span>总款数:{{ countData&&countData.totalCategory }};</span>
-            <span>总数量:{{ countData&&countData.totalQty }};</span>
-            <span>废品总数量:{{ countData&&countData.totalCelQty }};</span>
-          </div>
-          <div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnGrabEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesReturnGrabEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ (ordeDetail&&ordeDetail.buyerName) || '--' }}</span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="salesReturnEdit-preview-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="salesReturnEdit-print-btn" :disabled="chooseLoadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- 查询配件列表 -->
+        <queryPart ref="queryPart" :buyerSn="$route.params.buyerSn" grabFlag="1" :newLoading="isInster" @add="saveProduct"></queryPart>
+      </a-card>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- alert -->
+        <a-alert style="margin-bottom: 15px;" type="info">
+          <div slot="message" class="total-bar">
             <div>
             <div>
-              折扣金额:
-              <a-input-number id="discount" v-model="ordeDetail.discountAmount" :min="0" :precision="2" :max="999999"/>
-              <a-button type="primary" @click="salesReturnDiscount" class="button-info">打折</a-button>
+              <span>退货总金额:{{ countData&&countData.totalAmount }}元;</span>
+              <span>总款数:{{ countData&&countData.totalCategory }};</span>
+              <span>总数量:{{ countData&&countData.totalQty }};</span>
+              <span>废品总数量:{{ countData&&countData.totalCelQty }};</span>
             </div>
             </div>
             <div>
             <div>
-              折扣:<strong>{{ ordeDetail&&ordeDetail.discountRate || 0 }}%</strong>;
-              折后总售价:<strong>¥{{ ordeDetail&&ordeDetail.discountedAmount || 0 }}</strong>;
+              <div>
+                折扣金额:
+                <a-input-number id="discount" v-model="ordeDetail.discountAmount" :min="0" :precision="2" :max="999999"/>
+                <a-button type="primary" @click="salesReturnDiscount" class="button-info">打折</a-button>
+              </div>
+              <div>
+                折扣:<strong>{{ ordeDetail&&ordeDetail.discountRate || 0 }}%</strong>;
+                折后总售价:<strong>¥{{ ordeDetail&&ordeDetail.discountedAmount || 0 }}</strong>;
+              </div>
             </div>
             </div>
           </div>
           </div>
-        </div>
-      </a-alert>
-      <!-- 查询条件 -->
-      <a-row :gutter="15">
-        <a-col :span="18">
-          <a-form-model layout="inline" :model="productForm" @keyup.enter.native="$refs.table.refresh(true)">
-            <a-form-model-item label="产品编码">
-              <a-input v-model="productForm.productCode" placeholder="输入产品编码" />
-            </a-form-model-item>
-            <a-form-model-item label="产品名称">
-              <a-input v-model="productForm.productName" placeholder="输入产品名称" />
-            </a-form-model-item>
-            <a-form-model-item>
-              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturn-refresh">查询</a-button>
-              <a-button style="margin: 0 0 18px 8px" @click="resetForm" id="salesReturn-reset">重置</a-button>
-            </a-form-model-item>
-          </a-form-model>
-        </a-col>
-        <a-col :span="6">
-          <div style="float:right;overflow: hidden;">
-            <!-- <a-button id="salesReturn-dru">导入明细</a-button> -->
+        </a-alert>
+        <!-- 查询条件 -->
+        <a-row :gutter="15">
+          <a-col :span="18">
+            <a-form-model layout="inline" :model="productForm" @keyup.enter.native="$refs.table.refresh(true)">
+              <a-form-model-item label="产品编码">
+                <a-input v-model="productForm.productCode" placeholder="输入产品编码" />
+              </a-form-model-item>
+              <a-form-model-item label="产品名称">
+                <a-input v-model="productForm.productName" placeholder="输入产品名称" />
+              </a-form-model-item>
+              <a-form-model-item>
+                <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturn-refresh">查询</a-button>
+                <a-button style="margin: 0 0 18px 8px" @click="resetForm" id="salesReturn-reset">重置</a-button>
+              </a-form-model-item>
+            </a-form-model>
+          </a-col>
+          <a-col :span="6">
+            <div style="float:right;overflow: hidden;">
+              <!-- <a-button id="salesReturn-dru">导入明细</a-button> -->
+              <a-button
+                size="small"
+                type="primary"
+                @click="salesReturnDelAll"
+                :loading="delLoading"
+                style="margin-left: 10px"
+                id="salesReturn-del-all">整单删除</a-button>
+            </div>
+          </a-col>
+        </a-row>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 2070, y: 300 }"
+          bordered>
+          <!-- 本次退货数量 -->
+          <template slot="qty" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.qty"
+              :max="999999"
+              :min="0"
+              :precision="0"
+              @change="onCellChange(record.id, 'qty', $event)" />
+          </template>
+          <!-- 废品数量 -->
+          <template slot="celQty" slot-scope="text, record">
+            <editable-cell
+              size="small"
+              :text="record.celQty"
+              :max="999999"
+              :min="0"
+              :precision="0"
+              @change="onCellChange(record.id, 'celQty', $event)" />
+          </template>
+          <!-- 退货金额小计 -->
+          <template slot="returnAmount" slot-scope="text, record">
+            ¥{{ (record.price * record.qty).toFixed(2) }}
+          </template>
+          <!-- 仓库仓位 -->
+          <template slot="warehouse" slot-scope="text, record, index">
+            <a-cascader
+              @change="e => changeWarehouseCascade(e, record, index)"
+              v-model="record.warehouseCascade"
+              expand-trigger="hover"
+              :options="warehouseCascadeData"
+              :allowClear="false"
+              :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+              id="bulkWarehousingOrderEdit-warehouseCascade"
+              placeholder="请选择仓库仓位"
+              style="width: 100%;" />
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
             <a-button
             <a-button
               size="small"
               size="small"
               type="primary"
               type="primary"
-              @click="salesReturnDelAll"
               :loading="delLoading"
               :loading="delLoading"
-              style="margin-left: 10px"
-              id="salesReturn-del-all">整单删除</a-button>
-          </div>
-        </a-col>
-      </a-row>
-      <!-- 已选配件列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2070, y: 300 }"
-        bordered>
-        <!-- 本次退货数量 -->
-        <template slot="qty" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.qty"
-            :max="999999"
-            :min="0"
-            :precision="0"
-            @change="onCellChange(record.id, 'qty', $event)" />
-        </template>
-        <!-- 废品数量 -->
-        <template slot="celQty" slot-scope="text, record">
-          <editable-cell
-            size="small"
-            :text="record.celQty"
-            :max="999999"
-            :min="0"
-            :precision="0"
-            @change="onCellChange(record.id, 'celQty', $event)" />
-        </template>
-        <!-- 退货金额小计 -->
-        <template slot="returnAmount" slot-scope="text, record">
-          ¥{{ (record.price * record.qty).toFixed(2) }}
-        </template>
-        <!-- 仓库仓位 -->
-        <template slot="warehouse" slot-scope="text, record, index">
-          <a-cascader
-            @change="e => changeWarehouseCascade(e, record, index)"
-            v-model="record.warehouseCascade"
-            expand-trigger="hover"
-            :options="warehouseCascadeData"
-            :allowClear="false"
-            :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-            id="bulkWarehousingOrderEdit-warehouseCascade"
-            placeholder="请选择仓库仓位"
-            style="width: 100%;" />
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
+              class="button-error"
+              @click="handleDel(record)"
+              id="salesReturn-Del">删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div
+          style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
           <a-button
           <a-button
-            size="small"
+            size="large"
+            style="width: 150px;"
             type="primary"
             type="primary"
-            :loading="delLoading"
-            class="button-error"
-            @click="handleDel(record)"
-            id="salesReturn-Del">删除</a-button>
-        </template>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div
-        style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          size="large"
-          style="width: 150px;"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit()"
-          id="salesReturn-handleSubmit">提交</a-button>
-      </div>
-    </a-affix>
+            class="button-primary"
+            @click="handleSubmit()"
+            id="salesReturn-handleSubmit">提交</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <!-- 选择客户弹框 -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <!-- 打印 -->
     <!-- 打印 -->
@@ -168,6 +170,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       orderId: null,
       orderId: null,
       orderSn: null,
       orderSn: null,
       buyerSn: null,
       buyerSn: null,
@@ -409,24 +412,33 @@ export default {
       } else {
       } else {
         params.salesQty = row.qty
         params.salesQty = row.qty
       }
       }
+      this.spinning = true
       salesReturnSaveProduct(params).then(res => {
       salesReturnSaveProduct(params).then(res => {
         this.resetSearchForm(true)
         this.resetSearchForm(true)
+        this.$refs.queryPart.refreshData()
         this.isInster = false
         this.isInster = false
+        this.spinning = false
       })
       })
     },
     },
     // 提交销售单
     // 提交销售单
     handleSubmit () {
     handleSubmit () {
+      this.spinning = true
       salesReturnSubmit({ sn: this.orderSn }).then(res => {
       salesReturnSubmit({ sn: this.orderSn }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.handleBack()
           this.handleBack()
           this.$message.success(res.message)
           this.$message.success(res.message)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
         }
       })
       })
     },
     },
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type) {
     handlePrint (type) {
       const _this = this
       const _this = this
+      _this.spinning = true
       salesReturnDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
       salesReturnDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
         if (res.type == 'application/json') {
           var reader = new FileReader()
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {
           reader.addEventListener('loadend', function () {

+ 53 - 50
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -1,56 +1,58 @@
 <template>
 <template>
   <div class="urgentItemsOffsetDetail-page-wrapper">
   <div class="urgentItemsOffsetDetail-page-wrapper">
-    <!-- 操作 -->
-    <a-page-header :ghost="false" :backIcon="false" class="urgentItemsOffsetDetail-operation-wrapper" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="urgentItemsOffsetDetail-btn-back" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-button key="3" type="danger" v-if="!isWriteDown" @click="handleSubmit" id="urgentItemsOffsetDetail-btn-submit">冲减</a-button>
-        <!-- <a-button key="2" @click="handlePreview" id="urgentItemsOffsetDetail-btn-preview">打印预览</a-button>
-        <a-button key="1" type="primary" @click="handlePrint" id="urgentItemsOffsetDetail-btn-print">快速打印</a-button> -->
-      </template>
-    </a-page-header>
-    <!-- 急件单信息 -->
-    <a-card size="small" :bordered="false" class="urgentItemsOffsetDetail-info-wrapper">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3" v-if="detailData">
-            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="客户地址">{{ detailData.shippingAddressProvinceName || '--' }}{{ detailData.shippingAddressCityName || '--' }}{{ detailData.shippingAddressCountyName || '--' }}{{ detailData.shippingAddress || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="支付方式">{{ detailData.buyerName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系电话">{{ detailData.consigneeTel || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收款方式">{{ detailData.buyerName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="急件单号">{{ detailData.urgentBillNo || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="状态">{{ detailData.statusDictValue || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 表格 -->
-    <a-card size="small" :bordered="false" class="urgentItemsOffsetDetail-table-wrapper">
-      <!-- 合计 -->
-      <a-alert type="info" showIcon style="margin-bottom:15px" v-if="detailData">
-        <div class="ftext" slot="message">总款数:<strong>{{ detailData.totalCategory || 0 }}</strong>;总数量:<strong>{{ detailData.totalQty || 0 }}</strong>。</div>
-      </a-alert>
-      <s-table
-        class="sTable"
-        ref="table"
-        size="default"
-        :rowKey="(record) => record.id"
-        :columns="isWriteDown ? columns : unColumns"
-        :data="loadData"
-        :scroll="{ x: isWriteDown ? 1570 : '100%' }"
-        bordered>
-        <!-- 库存数量 -->
-        <template slot="inventoryQuantity" slot-scope="text, record">
-          <span v-if="record.stockEntity&&(record.stockEntity.currentStockQty||record.stockEntity.currentStockQty==0)" :class="[record.stockEntity.currentStockQty < record.qty ? 'red' : '']" :style="{fontWeight: record.stockEntity.currentStockQty < record.qty?'bold':''}">{{ record.stockEntity.currentStockQty }}</span>
-          <span v-else>--</span>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作 -->
+      <a-page-header :ghost="false" :backIcon="false" class="urgentItemsOffsetDetail-operation-wrapper" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="urgentItemsOffsetDetail-btn-back" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
         </template>
-      </s-table>
-    </a-card>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-button key="3" type="danger" v-if="!isWriteDown" @click="handleSubmit" id="urgentItemsOffsetDetail-btn-submit">冲减</a-button>
+          <!-- <a-button key="2" @click="handlePreview" id="urgentItemsOffsetDetail-btn-preview">打印预览</a-button>
+          <a-button key="1" type="primary" @click="handlePrint" id="urgentItemsOffsetDetail-btn-print">快速打印</a-button> -->
+        </template>
+      </a-page-header>
+      <!-- 急件单信息 -->
+      <a-card size="small" :bordered="false" class="urgentItemsOffsetDetail-info-wrapper">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3" v-if="detailData">
+              <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="客户地址">{{ detailData.shippingAddressProvinceName || '--' }}{{ detailData.shippingAddressCityName || '--' }}{{ detailData.shippingAddressCountyName || '--' }}{{ detailData.shippingAddress || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="支付方式">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系电话">{{ detailData.consigneeTel || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收款方式">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="急件单号">{{ detailData.urgentBillNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="状态">{{ detailData.statusDictValue || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 表格 -->
+      <a-card size="small" :bordered="false" class="urgentItemsOffsetDetail-table-wrapper">
+        <!-- 合计 -->
+        <a-alert type="info" showIcon style="margin-bottom:15px" v-if="detailData">
+          <div class="ftext" slot="message">总款数:<strong>{{ detailData.totalCategory || 0 }}</strong>;总数量:<strong>{{ detailData.totalQty || 0 }}</strong>。</div>
+        </a-alert>
+        <s-table
+          class="sTable"
+          ref="table"
+          size="default"
+          :rowKey="(record) => record.id"
+          :columns="isWriteDown ? columns : unColumns"
+          :data="loadData"
+          :scroll="{ x: isWriteDown ? 1570 : '100%' }"
+          bordered>
+          <!-- 库存数量 -->
+          <template slot="inventoryQuantity" slot-scope="text, record">
+            <span v-if="record.stockEntity&&(record.stockEntity.currentStockQty||record.stockEntity.currentStockQty==0)" :class="[record.stockEntity.currentStockQty < record.qty ? 'red' : '']" :style="{fontWeight: record.stockEntity.currentStockQty < record.qty?'bold':''}">{{ record.stockEntity.currentStockQty }}</span>
+            <span v-else>--</span>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
   </div>
   </div>
 
 
 </template>
 </template>
@@ -62,6 +64,7 @@ export default {
   components: { STable, VSelect },
   components: { STable, VSelect },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       unColumns: [
       unColumns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 220, align: 'center' },
         { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 220, align: 'center' },

+ 28 - 21
src/views/storeManagement/bind/editModal.vue

@@ -8,28 +8,30 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="bindEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="选择中心店" prop="orgSn">
-          <orgList ref="orgList" :disabled="itemSn?itemSn:''" @change="orgChange" />
-        </a-form-model-item>
-        <a-form-model-item label="选择配送店" prop="childSnList">
-          <orgMultipleList ref="orgMultipleList" :disabled="itemSn?itemSn:form.orgSn" :params="{ sn: form.orgSn }" @change="orgMultipleChange" />
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="bindEdit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="bindEdit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="bindEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="选择中心店" prop="orgSn">
+            <orgList ref="orgList" :disabled="itemSn?itemSn:''" @change="orgChange" />
+          </a-form-model-item>
+          <a-form-model-item label="选择配送店" prop="childSnList">
+            <orgMultipleList ref="orgMultipleList" :disabled="itemSn?itemSn:form.orgSn" :params="{ sn: form.orgSn }" @change="orgMultipleChange" />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="bindEdit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="bindEdit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -57,6 +59,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 6 },
         labelCol: { span: 6 },
@@ -98,13 +101,17 @@ export default {
       const _this = this
       const _this = this
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
+          _this.spinning = true
           jxsorgRelationSave(_this.form).then(res => {
           jxsorgRelationSave(_this.form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.$emit('ok')
               setTimeout(function () {
               setTimeout(function () {
                 _this.isShow = false
                 _this.isShow = false
+                _this.spinning = false
               }, 300)
               }, 300)
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 1 - 1
src/views/storeManagement/bind/orgList.vue

@@ -48,7 +48,7 @@ export default {
         if (fetchId !== this.lastFetchId) {
         if (fetchId !== this.lastFetchId) {
           return
           return
         }
         }
-        this.data = res.data.list || []
+        this.data = res.data && res.data.list ? res.data.list : []
         this.fetching = false
         this.fetching = false
       })
       })
     },
     },

+ 2 - 2
src/views/storeManagement/bind/orgMultipleList.vue

@@ -30,7 +30,7 @@ export default {
     },
     },
     params: {
     params: {
       type: Object,
       type: Object,
-      default: ()=>{
+      default: () => {
         return {}
         return {}
       }
       }
     }
     }
@@ -56,7 +56,7 @@ export default {
         if (fetchId !== this.lastFetchId) {
         if (fetchId !== this.lastFetchId) {
           return
           return
         }
         }
-        this.data = res.data.list || []
+        this.data = res.data && res.data.list ? res.data.list : []
         this.fetching = false
         this.fetching = false
       })
       })
     },
     },

+ 61 - 56
src/views/storeManagement/userAuthorization/editModal.vue

@@ -8,62 +8,64 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="bindEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="选择中心店" prop="ownerOrgSn">
-          <a-select
-            placeholder="请选择中心店"
-            id="productInfoList-ownerOrgSn"
-            allowClear
-            v-model="form.ownerOrgSn"
-            :disabled="itemSn?true:false"
-            :showSearch="true"
-            option-filter-prop="children"
-            :filter-option="filterOption"
-            @change="orgChange">
-            <a-select-option v-for="item in orgList" :key="item.orgSn" :value="item.orgSn">{{ item.orgName }}</a-select-option>
-          </a-select>
-        </a-form-model-item>
-        <a-form-model-item label="选择授权账号" prop="userSn">
-          <a-select
-            placeholder="请选择授权账号"
-            id="productInfoList-userSn"
-            allowClear
-            v-model="form.userSn"
-            :disabled="itemSn?true:false"
-            :showSearch="true"
-            option-filter-prop="children"
-            :filter-option="filterOption">
-            <a-select-option v-for="item in userList" :key="item.sn" :value="item.sn" :disabled="item.status=='0'">{{ item.name }} - {{ item.loginName }}</a-select-option>
-          </a-select>
-        </a-form-model-item>
-        <a-form-model-item label="选择配送店" prop="orgSnList">
-          <a-select
-            placeholder="请选择配送店"
-            id="productInfoList-orgSnList"
-            allowClear
-            v-model="form.orgSnList"
-            mode="multiple"
-            :showSearch="true"
-            option-filter-prop="children"
-            :filter-option="filterOption">
-            <a-select-option v-for="item in childList" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
-          </a-select>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="bindEdit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="bindEdit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="bindEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="选择中心店" prop="ownerOrgSn">
+            <a-select
+              placeholder="请选择中心店"
+              id="productInfoList-ownerOrgSn"
+              allowClear
+              v-model="form.ownerOrgSn"
+              :disabled="itemSn?true:false"
+              :showSearch="true"
+              option-filter-prop="children"
+              :filter-option="filterOption"
+              @change="orgChange">
+              <a-select-option v-for="item in orgList" :key="item.orgSn" :value="item.orgSn">{{ item.orgName }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+          <a-form-model-item label="选择授权账号" prop="userSn">
+            <a-select
+              placeholder="请选择授权账号"
+              id="productInfoList-userSn"
+              allowClear
+              v-model="form.userSn"
+              :disabled="itemSn?true:false"
+              :showSearch="true"
+              option-filter-prop="children"
+              :filter-option="filterOption">
+              <a-select-option v-for="item in userList" :key="item.sn" :value="item.sn" :disabled="item.status=='0'">{{ item.name }} - {{ item.loginName }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+          <a-form-model-item label="选择配送店" prop="orgSnList">
+            <a-select
+              placeholder="请选择配送店"
+              id="productInfoList-orgSnList"
+              allowClear
+              v-model="form.orgSnList"
+              mode="multiple"
+              :showSearch="true"
+              option-filter-prop="children"
+              :filter-option="filterOption">
+              <a-select-option v-for="item in childList" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="bindEdit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="bindEdit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -84,6 +86,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 6 },
         labelCol: { span: 6 },
@@ -138,15 +141,17 @@ export default {
       const _this = this
       const _this = this
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
+          _this.spinning = true
           userOrgSave(_this.form).then(res => {
           userOrgSave(_this.form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.$emit('ok')
               setTimeout(function () {
               setTimeout(function () {
                 _this.isShow = false
                 _this.isShow = false
+                _this.spinning = false
               }, 300)
               }, 300)
             } else {
             } else {
-
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {

+ 98 - 91
src/views/supplierManagement/supplierInfo/editModal.vue

@@ -8,98 +8,100 @@
     v-model="isShow"
     v-model="isShow"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="800">
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="supplierInfoEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="供应商名称" prop="supplierName">
-          <a-input
-            id="supplierInfoEdit-supplierName"
-            :maxLength="30"
-            v-model.trim="form.supplierName"
-            @change="filterEmpty"
-            placeholder="请输入供应商名称(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="所在地区" required style="margin: 0;">
-          <a-row :gutter="20">
-            <!-- 所在地区 -->
-            <a-col span="8">
-              <a-form-model-item prop="provinceSn">
-                <a-select id="supplierInfoEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
-                  <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-model-item>
-            </a-col>
-            <a-col span="8">
-              <a-form-model-item prop="citySn">
-                <a-select id="supplierInfoEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
-                  <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-model-item>
-            </a-col>
-            <a-col span="8">
-              <a-form-model-item prop="countySn">
-                <a-select id="supplierInfoEdit-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
-                  <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-model-item>
-            </a-col>
-          </a-row>
-        </a-form-model-item>
-        <a-form-model-item label="详细地址" prop="supplierAddress">
-          <a-input
-            id="supplierInfoEdit-supplierAddress"
-            :maxLength="60"
-            v-model="form.supplierAddress"
-            placeholder="请输入详细地址(最多60个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="联系人" prop="contactPerson">
-          <a-input
-            id="supplierInfoEdit-contactPerson"
-            :maxLength="30"
-            v-model="form.contactPerson"
-            placeholder="请输入联系人(最多30个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="联系电话" prop="contactTel">
-          <a-input
-            id="supplierInfoEdit-contactTel"
-            :maxLength="20"
-            v-model="form.contactTel"
-            placeholder="请输入联系电话(最多20个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="主营内容" prop="businessScope">
-          <a-textarea
-            id="supplierInfoEdit-businessScope"
-            :maxLength="200"
-            v-model="form.businessScope"
-            placeholder="请输入主营内容(最多200个字符)"
-            allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="状态" prop="enabledFlag" v-if="isState">
-          <a-radio-group
-            name="radioGroup"
-            v-model="form.enabledFlag"
-            id="supplierInfoEdit-enabledFlag" >
-            <a-radio :value="1">启用</a-radio>
-            <a-radio :value="0">禁用</a-radio>
-          </a-radio-group>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="supplierInfoEdit-btn-submit" @click="handleSubmit">保存</a-button>
-        <a-button id="supplierInfoEdit-btn-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="supplierInfoEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="供应商名称" prop="supplierName">
+            <a-input
+              id="supplierInfoEdit-supplierName"
+              :maxLength="30"
+              v-model.trim="form.supplierName"
+              @change="filterEmpty"
+              placeholder="请输入供应商名称(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="所在地区" required style="margin: 0;">
+            <a-row :gutter="20">
+              <!-- 所在地区 -->
+              <a-col span="8">
+                <a-form-model-item prop="provinceSn">
+                  <a-select id="supplierInfoEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
+                    <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="8">
+                <a-form-model-item prop="citySn">
+                  <a-select id="supplierInfoEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
+                    <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="8">
+                <a-form-model-item prop="countySn">
+                  <a-select id="supplierInfoEdit-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
+                    <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+            </a-row>
+          </a-form-model-item>
+          <a-form-model-item label="详细地址" prop="supplierAddress">
+            <a-input
+              id="supplierInfoEdit-supplierAddress"
+              :maxLength="60"
+              v-model="form.supplierAddress"
+              placeholder="请输入详细地址(最多60个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="联系人" prop="contactPerson">
+            <a-input
+              id="supplierInfoEdit-contactPerson"
+              :maxLength="30"
+              v-model="form.contactPerson"
+              placeholder="请输入联系人(最多30个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="联系电话" prop="contactTel">
+            <a-input
+              id="supplierInfoEdit-contactTel"
+              :maxLength="20"
+              v-model="form.contactTel"
+              placeholder="请输入联系电话(最多20个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="主营内容" prop="businessScope">
+            <a-textarea
+              id="supplierInfoEdit-businessScope"
+              :maxLength="200"
+              v-model="form.businessScope"
+              placeholder="请输入主营内容(最多200个字符)"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="状态" prop="enabledFlag" v-if="isState">
+            <a-radio-group
+              name="radioGroup"
+              v-model="form.enabledFlag"
+              id="supplierInfoEdit-enabledFlag" >
+              <a-radio :value="1">启用</a-radio>
+              <a-radio :value="0">禁用</a-radio>
+            </a-radio-group>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="supplierInfoEdit-btn-submit" @click="handleSubmit">保存</a-button>
+          <a-button id="supplierInfoEdit-btn-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+        </div>
       </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
@@ -129,6 +131,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
       formItemLayout: {
         labelCol: { span: 6 },
         labelCol: { span: 6 },
@@ -207,11 +210,15 @@ export default {
         if (valid) {
         if (valid) {
           const form = _this.form
           const form = _this.form
           form.id = this.itemId ? this.itemId : null
           form.id = this.itemId ? this.itemId : null
+          _this.spinning = true
           supplierSave(form).then(res => {
           supplierSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.$emit('ok')
               _this.$emit('ok')
               _this.isShow = false
               _this.isShow = false
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
             }
           })
           })
         } else {
         } else {