Browse Source

Merge commit '91b621a0b95f7de2370f44b0d5be3f2723485e1d' into HEAD

gitadmin 2 years ago
parent
commit
8a1cdd0e8b
67 changed files with 1673 additions and 438 deletions
  1. BIN
      public/templ/收货产品导入模板.xlsx
  2. BIN
      public/templ/销售导入产品模板.xlsx
  3. 9 0
      src/api/pickUp.js
  4. 12 3
      src/api/product.js
  5. 27 2
      src/api/sales.js
  6. 18 0
      src/api/salesReturn.js
  7. 101 91
      src/config/router.config.js
  8. 12 3
      src/libs/JGPrint.js
  9. 3 3
      src/views/Home.vue
  10. 0 0
      src/views/allocationManagement/allocateReturnConfirmation/detailModal.vue
  11. 0 0
      src/views/allocationManagement/allocateReturnConfirmation/list.vue
  12. 1 1
      src/views/allocationManagement/matchSendOutOrder/list.vue
  13. 11 10
      src/views/allocationManagement/transferOut/basicInfoModal.vue
  14. 1 1
      src/views/allocationManagement/transferOut/list.vue
  15. 1 1
      src/views/allocationManagement/transferReturn/list.vue
  16. 75 0
      src/views/common/bizUser.js
  17. 18 5
      src/views/common/chooseWarehouse.js
  18. 4 4
      src/views/dealerManagement/dealerZoneSearch/list.vue
  19. 25 14
      src/views/expenseManagement/expenseReimbursement/chooseDepartUserModal.vue
  20. 1 1
      src/views/expenseManagement/expenseReimbursement/previewModal.vue
  21. 8 8
      src/views/financialManagement/financialCollection/edit.vue
  22. 1 1
      src/views/inventoryManagement/inventoryConfirmation/detail.vue
  23. 1 1
      src/views/inventoryManagement/inventoryConfirmation/list.vue
  24. 1 1
      src/views/productManagement/newProduct/modal.vue
  25. 79 48
      src/views/productManagement/priceChangeRecord/list.vue
  26. 4 3
      src/views/productManagement/productInfo/list.vue
  27. 23 3
      src/views/productManagement/productPricing/list.vue
  28. 17 6
      src/views/reportData/actualSalesReport/list.vue
  29. 4 2
      src/views/reportData/billingBackReport/list.vue
  30. 4 2
      src/views/reportData/billingOrderReport/list.vue
  31. 14 4
      src/views/reportData/billingReturnReport/list.vue
  32. 13 4
      src/views/reportData/hPriceDifferenceDetailReport/list.vue
  33. 17 8
      src/views/reportData/receivedSendStorageReport/index.vue
  34. 19 7
      src/views/reportData/regionTypeSalesReport/list.vue
  35. 15 5
      src/views/reportData/returnGoodsPresentation/list.vue
  36. 13 3
      src/views/reportData/returnSlipReport/list.vue
  37. 14 4
      src/views/reportData/salesAmountReport/list.vue
  38. 17 8
      src/views/reportData/salesDetails/list.vue
  39. 13 3
      src/views/reportData/salesPresentation/list.vue
  40. 13 4
      src/views/reportData/salesReturnDetailReport/list.vue
  41. 14 4
      src/views/reportData/salesReturnReport/list.vue
  42. 14 4
      src/views/reportData/salesSlipReport/list.vue
  43. 6 5
      src/views/salesManagement/backorder/detailModal.vue
  44. 4 4
      src/views/salesManagement/backorder/list.vue
  45. 2 1
      src/views/salesManagement/pushOrderManagement/list.vue
  46. 1 1
      src/views/salesManagement/receiptPrint/printModel.vue
  47. 3 3
      src/views/salesManagement/salesQuery/chooseCustomModal.vue
  48. 2 0
      src/views/salesManagement/salesQuery/chooseImportModal.vue
  49. 42 14
      src/views/salesManagement/salesQuery/detail.vue
  50. 192 52
      src/views/salesManagement/salesQuery/edit.vue
  51. 23 17
      src/views/salesManagement/salesQuery/importGuideModal.vue
  52. 29 5
      src/views/salesManagement/salesQuery/list.vue
  53. 30 11
      src/views/salesManagement/salesQuery/queryPart.vue
  54. 87 0
      src/views/salesManagement/salesQuery/setPriceModal.vue
  55. 91 0
      src/views/salesManagement/salesQuery/setWarehouse.vue
  56. 38 12
      src/views/salesManagement/waitDispatch/dsModal.vue
  57. 22 9
      src/views/salesManagement/waitDispatch/edit.vue
  58. 16 7
      src/views/salesManagement/waitDispatch/queryPart.vue
  59. 16 8
      src/views/salesReturnManagement/billOfLading/add.vue
  60. 194 0
      src/views/salesReturnManagement/receiveCheck/chooseImportModal.vue
  61. 195 0
      src/views/salesReturnManagement/receiveCheck/importGuideModal.vue
  62. 27 4
      src/views/salesReturnManagement/receiveCheck/receiving.vue
  63. 0 0
      src/views/salesReturnManagement/returnConfirmation/detailModal.vue
  64. 0 0
      src/views/salesReturnManagement/returnConfirmation/list.vue
  65. 13 10
      src/views/salesReturnManagement/salesReturn/chooseCustomModal.vue
  66. 2 2
      src/views/salesReturnManagement/salesReturn/importGuideModal.vue
  67. 1 1
      vue.config.js

BIN
public/templ/收货产品导入模板.xlsx


BIN
public/templ/销售导入产品模板.xlsx


+ 9 - 0
src/api/pickUp.js

@@ -114,3 +114,12 @@ export const pickUpDetailPrint = params => {
     responseType: 'blob'
   })
 }
+
+// 提货单默认上次审核通过的审批人
+export const getFinishDingUser = (params) => {
+  return axios({
+    url: '/pickUp/queryLastFinishDingUser',
+    data: params,
+    method: 'post'
+  })
+}

+ 12 - 3
src/api/product.js

@@ -22,7 +22,7 @@ export const productPricedList = (params) => {
     method: 'post'
   })
 }
-// 定价批量审核 
+// 定价批量审核
 export const batchAuditPrice = (params) => {
   const url = `/product/pricing/batchAudit`
   return axios({
@@ -360,7 +360,7 @@ export const stackPlaceImport = (params) => {
   })
 }
 // 下载导入模板
-export const stackPlaceImportTemplate= (params) => {
+export const stackPlaceImportTemplate = (params) => {
   return axios({
     url: '/product/stackPlace/importTemplate',
     data: params,
@@ -429,4 +429,13 @@ export const saveBatchImportProduct = (params) => {
     data: params,
     method: 'post'
   })
-}
+}
+
+// 价格变更状态
+export const priceChangeEnabled = (params) => {
+  return axios({
+    url: '/product/priceChange/enabled',
+    data: params,
+    method: 'post'
+  })
+}

+ 27 - 2
src/api/sales.js

@@ -99,9 +99,9 @@ export const salesList = (params) => {
 //  销售 提交
 export const salesWriteSubmit = (params) => {
   return axios({
-    url: `/sales/submit/${params.salesBillSn}`,
+    url: '/sales/submit',
     data: params,
-    method: 'get'
+    method: 'post'
   })
 }
 //  财务收款 列表 分页
@@ -214,3 +214,28 @@ export const vinCodeParse = params => {
     responseType: 'blob'
   })
 }
+// 是否更新价格判断
+export const submitCheck = (params) => {
+  return axios({
+    url: '/sales/submitCheck',
+    method: 'post',
+    data: params
+  })
+}
+// 当前价格  提交
+export const updateBatch = (params) => {
+  return axios({
+    url: '/sales/detail/updateBatch',
+    method: 'post',
+    data: params
+  })
+}
+
+// 仓库设置
+export const updateWarehouse = (params) => {
+  return axios({
+    url: '/sales/detail/updateWarehouse',
+    method: 'post',
+    data: params
+  })
+}

+ 18 - 0
src/api/salesReturn.js

@@ -245,3 +245,21 @@ export const salesReturnFailExcel = (params) => {
     responseType: 'blob'
   })
 }
+
+// 收货产品信息批量导入
+export const salesReturnDetailBatchByReceive = (params) => {
+  return axios({
+    url: '/salesReturn/detail/insertBatchByReceive',
+    data: params,
+    method: 'post'
+  })
+}
+// 收货导出错误项
+export const salesReturnDetailImportError = (params) => {
+  return axios({
+    url: '/salesReturn/detail/exportImportError',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 101 - 91
src/config/router.config.js

@@ -91,6 +91,16 @@ export const asyncRouterMap = [
                 },
                 hidden: true
               },
+              {
+                path: '/newProduct/list/:onlineFalg',
+                name: 'oldProductList',
+                component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/list'),
+                meta: {
+                  title: '下线产品列表',
+                  icon: 'home'
+                },
+                hidden: true
+              },
               // 产品详情
               {
                 path: '/viewProduct/:sn',
@@ -165,7 +175,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'add/:sn/:wSn',
+                path: 'add/:sn',
                 name: 'salesAdd',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/edit.vue'),
                 meta: {
@@ -176,7 +186,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:sn/:wSn',
+                path: 'edit/:sn',
                 name: 'salesEdit',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/edit.vue'),
                 meta: {
@@ -187,7 +197,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'waitDispatch/:salesBillSn/:dispatchBillSn',
+                path: 'waitDispatch/:salesBillSn',
                 name: 'waitDispatch',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/waitDispatch/edit.vue'),
                 meta: {
@@ -630,7 +640,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:sn',
+                path: 'edit/:sn/:wSn',
                 name: 'billOfLadingEdit',
                 component: () => import(/* webpackChunkName: "salesReturnManagement" */ '@/views/salesReturnManagement/billOfLading/add.vue'),
                 meta: {
@@ -715,6 +725,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/salesReturnManagement/returnConfirmation',
+            redirect: '/salesReturnManagement/returnConfirmation/list',
+            name: 'returnConfirmation',
+            component: BlankLayout,
+            meta: {
+              title: '销售退货确认',
+              icon: 'vertical-align-top',
+              permission: 'M_returnConfirmationList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'returnConfirmationList',
+                component: () => import(/* webpackChunkName: "salesReturnManagement" */ '@/views/salesReturnManagement/returnConfirmation/list.vue'),
+                meta: {
+                  title: '销售退货确认列表',
+                  icon: 'vertical-align-top',
+                  hidden: true,
+                  permission: 'M_returnConfirmationList'
+                }
+              }
+            ]
           }
         ]
       },
@@ -828,7 +863,7 @@ export const asyncRouterMap = [
       // 财务管理
       {
         path: '/financialManagement',
-        redirect: '/financialManagement/returnConfirmation',
+        redirect: '/financialManagement/warehousingConfirmation',
         component: PageView,
         meta: {
           title: '财务管理',
@@ -861,92 +896,6 @@ export const asyncRouterMap = [
               }
             ]
           },
-          {
-            path: '/financialManagement/returnConfirmation',
-            redirect: '/financialManagement/returnConfirmation/list',
-            name: 'returnConfirmation',
-            component: BlankLayout,
-            meta: {
-              title: '销售退货确认',
-              icon: 'vertical-align-top',
-              permission: 'M_returnConfirmationList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'returnConfirmationList',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/returnConfirmation/list.vue'),
-                meta: {
-                  title: '销售退货确认列表',
-                  icon: 'vertical-align-top',
-                  hidden: true,
-                  permission: 'M_returnConfirmationList'
-                }
-              }
-            ]
-          },
-          {
-            path: '/financialManagement/allocateReturnConfirmation',
-            redirect: '/financialManagement/allocateReturnConfirmation/list',
-            name: 'allocateReturnConfirmation',
-            component: BlankLayout,
-            meta: {
-              title: '调拨退货确认',
-              icon: 'vertical-align-top',
-              permission: 'M_allocateReturnConfirmationList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'allocateReturnConfirmationList',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/allocateReturnConfirmation/list.vue'),
-                meta: {
-                  title: '调拨退货确认列表',
-                  icon: 'vertical-align-top',
-                  hidden: true,
-                  permission: 'M_allocateReturnConfirmationList'
-                }
-              }
-            ]
-          },
-          {
-            path: '/financialManagement/inventoryConfirmation',
-            redirect: '/financialManagement/inventoryConfirmation/list',
-            name: 'inventoryConfirmation',
-            component: BlankLayout,
-            meta: {
-              title: '盘点确认',
-              icon: 'monitor',
-              permission: 'M_inventoryConfirmationList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'inventoryConfirmationList',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/inventoryConfirmation/list.vue'),
-                meta: {
-                  title: '盘点确认列表',
-                  icon: 'monitor',
-                  hidden: true,
-                  permission: 'M_inventoryConfirmationList'
-                }
-              },
-              {
-                path: 'detail/:sn',
-                name: 'inventoryConfirmationDetail',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/inventoryConfirmation/detail.vue'),
-                meta: {
-                  title: '盘点确认详情',
-                  icon: 'monitor',
-                  hidden: true,
-                  permission: 'B_inventoryConfirmationDetail'
-                }
-              }
-            ]
-          },
           {
             path: '/financialManagement/financialCollection',
             redirect: '/financialManagement/financialCollection/list',
@@ -1276,6 +1225,42 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/inventoryManagement/inventoryConfirmation',
+            redirect: '/inventoryManagement/inventoryConfirmation/list',
+            name: 'inventoryConfirmation',
+            component: BlankLayout,
+            meta: {
+              title: '盘点确认',
+              icon: 'monitor',
+              permission: 'M_inventoryConfirmationList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'inventoryConfirmationList',
+                component: () => import(/* webpackChunkName: "inventoryManagement" */ '@/views/inventoryManagement/inventoryConfirmation/list.vue'),
+                meta: {
+                  title: '盘点确认列表',
+                  icon: 'monitor',
+                  hidden: true,
+                  permission: 'M_inventoryConfirmationList'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'inventoryConfirmationDetail',
+                component: () => import(/* webpackChunkName: "inventoryManagement" */ '@/views/inventoryManagement/inventoryConfirmation/detail.vue'),
+                meta: {
+                  title: '盘点确认详情',
+                  icon: 'monitor',
+                  hidden: true,
+                  permission: 'B_inventoryConfirmationDetail'
+                }
+              }
+            ]
+          },
           {
             path: '/inventoryManagement/inventoryWarning',
             redirect: '/inventoryManagement/inventoryWarning/list',
@@ -1562,6 +1547,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/allocationManagement/allocateReturnConfirmation',
+            redirect: '/allocationManagement/allocateReturnConfirmation/list',
+            name: 'allocateReturnConfirmation',
+            component: BlankLayout,
+            meta: {
+              title: '调拨退货确认',
+              icon: 'vertical-align-top',
+              permission: 'M_allocateReturnConfirmationList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'allocateReturnConfirmationList',
+                component: () => import(/* webpackChunkName: "allocationManagement" */ '@/views/allocationManagement/allocateReturnConfirmation/list.vue'),
+                meta: {
+                  title: '调拨退货确认列表',
+                  icon: 'vertical-align-top',
+                  hidden: true,
+                  permission: 'M_allocateReturnConfirmationList'
+                }
+              }
+            ]
           }
         ]
       },

+ 12 - 3
src/libs/JGPrint.js

@@ -143,20 +143,29 @@ export const jGPrint = function (data, type, callback, printLogParams, printPage
 }
 
 // 自动排版, 遍历数组,将数组中每一个数值加起来,如果和小于某个数,则将这些数值存放到一个新数组中。
-export const groupLessThan = function(html) {
-  const pageMidHeight = 535 // 半页高度
+export const groupLessThan = function(html,isNoMerge) {
+  const pageMidHeight = 530 // 半页高度
   const pageHeight = pageMidHeight*2 // 页高度
   const arr = []
   const result = []
   for (let i = 0; i < html.length; i++) {
     const h = html[i].clientHeight // 总高度
     const pz = h<=pageMidHeight ? '0.5' : (h/pageHeight).toFixed(2) // 页数
+    const t = '<div style="height:'+(pz<=0.5?pageMidHeight:'auto')+'px'+';border:1px solid #fff;">'+html[i].innerHTML+'</div>'
     arr.push({
       h: h,
       pz: pz,
-      t: '<div style="height:'+(pz<=0.5?pageMidHeight:'auto')+'px'+';border:1px solid #fff;">'+html[i].innerHTML+'</div>',
+      t: t,
       flag: 0
     })
+    // 不合并纸张打印
+    if(isNoMerge){
+      result.push(t)
+    }
+  }
+  // 不合并纸张打印
+  if(isNoMerge){
+    return result
   }
   console.log(arr)
    // 找出所有小于半张纸的

+ 3 - 3
src/views/Home.vue

@@ -15,10 +15,10 @@
       v-model="openResetPwd">
       <ResetPwd />
     </a-modal>
-    <!-- 产品上线提醒 -->
+    <!-- 产品上线提醒 -->
     <a-modal
       class="newProductTips"
-      :title="'产品'+(onlineFalg=='1'?'上':'下')+'线提醒'"
+      :title="'产品'+(onlineFalg=='1'?'上':'下')+'线提醒'"
       :width="800"
       centered
       :footer="null"
@@ -83,7 +83,7 @@ export default {
     // 查看更多产品
     seeMore () {
       this.openNewProduct = false
-      this.$router.push({ name: 'newProductList', params: { onlineFalg: this.onlineFalg } })
+      this.$router.push({ name: this.onlineFalg == 1 ? 'newProductList' : 'oldProductList', params: { onlineFalg: this.onlineFalg } })
     },
     // 关闭弹框
     cancelProductTips () {

+ 0 - 0
src/views/financialManagement/allocateReturnConfirmation/detailModal.vue → src/views/allocationManagement/allocateReturnConfirmation/detailModal.vue


+ 0 - 0
src/views/financialManagement/allocateReturnConfirmation/list.vue → src/views/allocationManagement/allocateReturnConfirmation/list.vue


+ 1 - 1
src/views/allocationManagement/matchSendOutOrder/list.vue

@@ -184,7 +184,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '9%' },
-        { title: '调往对象', dataIndex: 'targetName', width: '9%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象', dataIndex: 'targetName', width: '9%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '发货说明', dataIndex: 'explainInfo', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '9%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },

+ 11 - 10
src/views/allocationManagement/transferOut/basicInfoModal.vue

@@ -135,6 +135,7 @@ export default {
     detailData: Object
   },
   data () {
+    this.lastFetchId = 0
     this.fetchUser = debounce(this.fetchUser, 800)
     return {
       isShow: this.openModal, //  是否打开弹框
@@ -235,18 +236,18 @@ export default {
       console.log(val, opt, '------------')
       this.form.productBrandName = opt ? opt.brandName : ''
     },
-    // 搜索经销商
-    fetchUser (value) {
-      console.log('fetching user', value)
+    fetchUser (dealerName) {
+      if (dealerName == '') return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.dealerData = []
       this.fetching = true
-      dealerSubareaScopeList({ nameLike: value, pageNo: 1, pageSize: 20 }).then(res => {
-        if (res.status == 200) {
-          this.dealerData = res.data && res.data.list ? res.data.list : []
-          this.fetching = false
-        } else {
-          this.dealerData = []
-          this.fetching = false
+      dealerSubareaScopeList({ nameLike: dealerName.replace(/\s+/g, ''), pageNo: 1, pageSize: 20 }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
         }
+        this.dealerData = res.data && res.data.list ? res.data.list : []
+        this.fetching = false
       })
     },
     // 调往对象名称经销商  change

+ 1 - 1
src/views/allocationManagement/transferOut/list.vue

@@ -267,7 +267,7 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '10%' },
         { title: '起止时间', scopedSlots: { customRender: 'promoDate' }, align: 'center', width: '6%' },
-        { title: '调往对象', dataIndex: 'targetName', width: '9%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象', dataIndex: 'targetName', width: '9%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '客户类型', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发货说明', dataIndex: 'explainInfo', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },

+ 1 - 1
src/views/allocationManagement/transferReturn/list.vue

@@ -211,7 +211,7 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨退货单号', scopedSlots: { customRender: 'allocateReturnNo' }, align: 'center', width: '8%' },
         { title: '调拨退货对象类型', dataIndex: 'targetTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨退货对象名称', dataIndex: 'targetName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨退货对象名称', dataIndex: 'targetName', width: '8%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '费用类型', dataIndex: 'costTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨退货类型', scopedSlots: { customRender: 'allocateType' }, width: '6%', align: 'center' },
         { title: '是否抓单', dataIndex: 'grabFlagDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },

+ 75 - 0
src/views/common/bizUser.js

@@ -0,0 +1,75 @@
+import { queryPage } from '@/api/bizuser'
+const BizUser = {
+  template: `
+      <a-select
+        :placeholder="placeholder"
+        :id="id"
+        allowClear
+        :value="defaultVal"
+        :showSearch="true"
+        :disabled="disabledFlag"
+        @change="handleChange"
+        option-filter-prop="children"
+        :filter-option="filterOption">
+        <a-select-option v-for="item in list" :key="item.bizUserSn" :value="item.bizUserSn">
+        {{ item.userName }}
+        </a-select-option>
+      </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请选择负责人'
+    },
+    disabledFlag: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      defaultVal: this.value,
+      list: []
+    }
+  },
+  mounted () {
+    this.getList()
+  },
+  watch: {
+    value (newValue, oldValue) {
+      this.defaultVal = newValue
+    }
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    handleChange (value) {
+      this.defaultVal = value
+      const item = this.list.find(item => item.bizUserSn == value)
+      this.$emit('input', value)
+      this.$emit('change', value, item)
+    },
+    getList () {
+      queryPage({bizUserType:'qy',pageNo:1,pageSize:100}).then(res => {
+        if (res.status == 200) {
+          this.list = res.data.list
+        } else {
+          this.list = []
+        }
+      })
+    }
+  }
+}
+
+export default BizUser

+ 18 - 5
src/views/common/chooseWarehouse.js

@@ -23,7 +23,7 @@ const warehouse = {
       type: Boolean,
       default: false
     },
-    allowClear:{
+    allowClear: {
       type: Boolean,
       default: true
     },
@@ -42,6 +42,10 @@ const warehouse = {
     modeType: {
       type: String,
       default: 'default'
+    },
+    isDefault: { // 是否有默认值
+      type: Boolean,
+      default: undefined
     }
   },
   data () {
@@ -53,7 +57,7 @@ const warehouse = {
     }
   },
   mounted () {
-    if(this.isPermission){
+    if (this.isPermission) {
       this.$store.state.app.defWarehouse = null
       this.$store.state.app.isWarehouse = false
     }
@@ -81,19 +85,28 @@ const warehouse = {
       ajaxName({}).then(res => {
         if (res.status == 200) {
           // 有权限控制的
-          if(this.isPermission){
+          if (this.isPermission) {
             this.$store.state.app.isWarehouse = res.data && res.data.length > 1
             this.$store.state.app.defWarehouse = res.data && res.data[0]
           }
           this.warehouseData = res.data || []
+          let defaultWarehouseVal = {}
+          if (this.isDefault) {
+            defaultWarehouseVal = res.data.find(con => {
+              return con.defaultFlag == 1 ? con.warehouseSn : ''
+            })
+            this.defaultVal = defaultWarehouseVal.warehouseSn
+            this.$emit('load', defaultWarehouseVal.warehouseSn)
+          } else {
+            this.$emit('load')
+          }
         } else {
-          if(this.isPermission){
+          if (this.isPermission) {
             this.$store.state.app.isWarehouse = false
             this.$store.state.app.defWarehouse = null
           }
           this.warehouseData = []
         }
-        this.$emit('load')
       })
     },
     clearData () {

+ 4 - 4
src/views/dealerManagement/dealerZoneSearch/list.vue

@@ -110,12 +110,12 @@ export default {
       },
       exportLoading: false, // 导出loading
       columns: [
-        { title: '经销商名称', dataIndex: 'dealer.dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '经销商名称', dataIndex: 'dealer.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '所属区域', dataIndex: 'subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所属分区', dataIndex: 'subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客服', scopedSlots: { customRender: 'kf' }, dataIndex: 'userNameKfs', width: '18%', align: 'center' },
-        { title: '区域负责人', scopedSlots: { customRender: 'qyfzr' }, dataIndex: 'userNameQyfzrs', width: '18%', align: 'center' },
-        { title: '销售总监', scopedSlots: { customRender: 'xszj' }, dataIndex: 'userNameXszjs', width: '18%', align: 'center' }
+        { title: '客服', scopedSlots: { customRender: 'kf' }, dataIndex: 'userNameKfs', width: '40%', align: 'center' },
+        { title: '区域负责人', scopedSlots: { customRender: 'qyfzr' }, dataIndex: 'userNameQyfzrs', width: '10%', align: 'center' },
+        { title: '销售总监', scopedSlots: { customRender: 'xszj' }, dataIndex: 'userNameXszjs', width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 25 - 14
src/views/expenseManagement/expenseReimbursement/chooseDepartUserModal.vue

@@ -58,6 +58,7 @@
 import dingDepartUser from '@/views/common/dingDepartUser.js'
 import { getDefaultCofig } from '@/api/data.js'
 import { queryLastFinishDingUser } from '@/api/financeBook.js'
+import { getFinishDingUser } from '@/api/pickUp.js'
 export default {
   name: 'ChooseDepartUserModal',
   components: { dingDepartUser },
@@ -66,11 +67,11 @@ export default {
       type: Boolean,
       default: false
     },
-    useDingDefUser: { // 是否使用最新一次申请人员
-      type: Boolean,
-      default: false
+    type: {
+      type: String,
+      default: ''
     },
-    showDefUser:{
+    showDefUser: { // 是否显示默认值
       type: Boolean,
       default: true
     }
@@ -138,27 +139,37 @@ export default {
         }
       })
     },
-    getFormatUser(list){
+    getFormatUser (list) {
       const ret = []
       list.map(item => {
-        ret.push({label: item.userName, value: item.userId||item.userid})
+        ret.push({ label: item.userName, value: item.userId || item.userid })
       })
       return ret
     },
-    async getDefAudit(){
-      if(!this.useDingDefUser){
+    async getDefAudit () {
+      // 费用单''   提货单'billOfLading'   财务单'financeOrder'
+      if (!this.type) {
         // 默认写死的人员
-        const data = await getDefaultCofig({code:'EXPENSE_ACCOUNT_DING_USER'}).then(res => res.data)
+        const data = await getDefaultCofig({ code: 'EXPENSE_ACCOUNT_DING_USER' }).then(res => res.data)
         const ret = JSON.parse(data.value)
         console.log(ret)
         this.form.approvers = this.getFormatUser(ret.approvers)
         this.form.ccList = this.getFormatUser(ret.ccList)
-      }else{
+      } else if (this.type && this.type == 'financeOrder') {
+        // 取最新一次审核通过值
         const data = await queryLastFinishDingUser().then(res => res.data)
-        if(data.approversTaskList){
+        if (data.approversTaskList) {
+          this.form.approvers = this.getFormatUser(data.approversTaskList)
+        }
+        if (data.ccTaskList) {
+          this.form.ccList = this.getFormatUser(data.ccTaskList)
+        }
+      } else if (this.type && this.type == 'billOfLading') {
+        const data = await getFinishDingUser().then(res => res.data)
+        if (data.approversTaskList) {
           this.form.approvers = this.getFormatUser(data.approversTaskList)
         }
-        if(data.ccTaskList){
+        if (data.ccTaskList) {
           this.form.ccList = this.getFormatUser(data.ccTaskList)
         }
       }
@@ -183,8 +194,8 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.resetForm()
-      }else{
-        if(this.showDefUser){
+      } else {
+        if (this.showDefUser) {
           this.getDefAudit()
         }
       }

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/previewModal.vue

@@ -144,7 +144,7 @@ export default {
       const _this = this
       const html = document.getElementsByClassName('expense-detail-print')
       // 自动排版
-      const result = groupLessThan(html)
+      const result = groupLessThan(html,true)
       this.$store.state.app.curActionPermission = 'B_eRPrint'
       // html, type, callback, printLogParams
       jGPlPrint(result, 'print', function (res) {

+ 8 - 8
src/views/financialManagement/financialCollection/edit.vue

@@ -42,8 +42,8 @@
         <a-alert type="info" style="margin-bottom:10px" v-if="detailData">
           <div slot="message">
             共 {{ total }} 条,
-            订单金额合计 {{ toThousands(detailData.orderTotalAmount ||0)}},
-            收款金额合计 {{ toThousands(detailData.receiptTotalAmount ||0)}},
+            订单金额合计 {{ toThousands(detailData.orderTotalAmount ||0) }},
+            收款金额合计 {{ toThousands(detailData.receiptTotalAmount ||0) }},
             使用授信合计 {{ toThousands(detailData.useTotalAmount||0) }},
             授信还款合计 {{ toThousands(detailData.payTotalAmount||0) }},
             余款抵扣合计 {{ toThousands(detailData.balanceTotalAmount||0) }}
@@ -163,7 +163,7 @@
       :bookNo="detailData?detailData.bookNo:''"
       @cancel="openFcDetailModal=false"></fcDetailModal>
     <!-- 选择审核人员 -->
-    <chooseDepartUserModal useDingDefUser :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
+    <chooseDepartUserModal type="financeOrder" :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
     <!-- 关联单据 -->
     <selectGlSalesModal
       ref="selGlSalesModal"
@@ -278,7 +278,7 @@ export default {
             for (var i = 0; i < data.length; i++) {
               data[i].no = i + 1
               const cons = data[i].bizType == 'DISPATCH' ? {
-                createDate:data[i].dispatchBill.createDate,
+                createDate: data[i].dispatchBill.createDate,
                 buyerName: data[i].dispatchBill.buyerName,
                 receiverName: data[i].dispatchBill.receiverName,
                 sendNo: data[i].dispatchBill.sendNo,
@@ -290,7 +290,7 @@ export default {
                 dispatchBillSn: data[i].dispatchBill.dispatchBillSn,
                 salesBillSn: data[i].dispatchBill.salesBillSn
               } : {
-                createDate:data[i].allocateBill.createDate,
+                createDate: data[i].allocateBill.createDate,
                 buyerName: data[i].allocateBill.targetName,
                 receiverName: data[i].allocateBill.receiverName,
                 sendNo: data[i].allocateBill.sendNo,
@@ -309,11 +309,11 @@ export default {
           }
           return data
         })
-      },
+      }
     }
   },
-  computed:{
-    glcolumns(){
+  computed: {
+    glcolumns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
         { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },

+ 1 - 1
src/views/financialManagement/inventoryConfirmation/detail.vue → src/views/inventoryManagement/inventoryConfirmation/detail.vue

@@ -169,7 +169,7 @@ export default {
   methods: {
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/financialManagement/inventoryConfirmation/list', query: { closeLastOldTab: true } })
+      this.$router.push({ name: 'inventoryConfirmationList', query: { closeLastOldTab: true } })
     },
     // 重置
     resetSearchForm () {

+ 1 - 1
src/views/financialManagement/inventoryConfirmation/list.vue → src/views/inventoryManagement/inventoryConfirmation/list.vue

@@ -154,7 +154,7 @@ export default {
     // 详情
     handleDetail (row) {
       if (this.$hasPermissions('B_inventoryConfirmationDetail')) {
-        this.$router.push({ path: `/financialManagement/inventoryConfirmation/detail/${row.checkWarehouseSn}` })
+        this.$router.push({ name:"inventoryConfirmationDetail",params:{sn:row.checkWarehouseSn} })
       }
     },
     // 盘点确认

+ 1 - 1
src/views/productManagement/newProduct/modal.vue

@@ -15,7 +15,7 @@
         bordered>
       </s-table>
       <div style="padding-top: 15px;">
-        <a-button @click="viewMore" block type="primary" ghost>查看更多新品</a-button>
+        <a-button @click="viewMore" block type="primary" ghost>查看更多{{onlineFalg==1?'新品':'下线产品'}}</a-button>
       </div>
     </a-spin>
   </div>

+ 79 - 48
src/views/productManagement/priceChangeRecord/list.vue

@@ -31,6 +31,11 @@
                   <ProductType id="productChangeRecordList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="变更状态">
+                  <v-select code="ENABLE_FLAG" id="productChangeRecordList-productStatus" v-model="queryParam.enabledFlag" allowClear placeholder="请选择变更状态"></v-select>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productChangeRecordList-refresh">查询</a-button>
@@ -68,6 +73,10 @@
           <span v-if="record.productEntity.productTypeName2 || record.productEntity.productTypeName3">{{ record.productEntity.productTypeName2 }} {{ record.productEntity.productTypeName3 ? '>' : '' }} {{ record.productEntity.productTypeName3 }}</span>
           <span v-else>--</span>
         </template>
+        <!-- 变更状态 -->
+        <span slot="productStatus" slot-scope="text, record">
+          <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
+        </span>
         <!-- 省级价变更后 -->
         <template slot="afterProvincePrice" slot-scope="text, record">
           <span v-if="record.afterProvincePrice || record.afterProvincePrice==0" :class="record.beforeProvincePrice != record.afterProvincePrice ? 'red' : ''">{{ toThousands(record.afterProvincePrice) }}</span>
@@ -106,7 +115,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
-import { productPriceChangeList, productPriceChangeExport } from '@/api/product'
+import { productPriceChangeList, productPriceChangeExport, priceChangeEnabled } from '@/api/product'
 export default {
   name: 'PriceChangeRecordList',
   mixins: [commonMixin],
@@ -124,7 +133,8 @@ export default {
         productBrandSn: undefined, //  品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
+        productTypeSn3: '', //  产品三级分类
+        enabledFlag: undefined
       },
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
@@ -144,6 +154,7 @@ export default {
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
+              data.list[i].enabledFlag = data.list[i].enabledFlag + '' === '1'
             }
             this.total = data.count || 0
             this.disabled = false
@@ -166,53 +177,54 @@ export default {
         { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' },
         { title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '变更原因', dataIndex: 'changeReason', width: 70, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '变更原因', dataIndex: 'changeReason', width: 70, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '变更状态', scopedSlots: { customRender: 'productStatus' }, width: 70, align: 'center' }
       ]
-        arr.push({
-          title: '省级价',
-          dataIndex: 'sdtermindfaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeProvincePrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 70, align: 'center' }
-          ]
-        })
-        arr.push({
-          title: '市级价',
-          dataIndex: 'sdterminaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeCityPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 70, align: 'center' }
-          ]
-        })
-        arr.push({
-          title: '特约价',
-          dataIndex: 'gterminaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 70, align: 'center' }
-          ]
-        })
-        arr.push({
-          title: '终端价',
-          dataIndex: 'hterminaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 70, align: 'center' }
-          ]
-        })
-        arr.push({
-          title: '车主价',
-          dataIndex: 'sterminaldsdPrice',
-          align: 'center',
-          children: [
-            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 70, align: 'center' }
-          ]
-        })
+      arr.push({
+        title: '省级价',
+        dataIndex: 'sdtermindfaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeProvincePrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 70, align: 'center' }
+        ]
+      })
+      arr.push({
+        title: '市级价',
+        dataIndex: 'sdterminaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeCityPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 70, align: 'center' }
+        ]
+      })
+      arr.push({
+        title: '特约价',
+        dataIndex: 'gterminaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 70, align: 'center' }
+        ]
+      })
+      arr.push({
+        title: '终端价',
+        dataIndex: 'hterminaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 70, align: 'center' }
+        ]
+      })
+      arr.push({
+        title: '车主价',
+        dataIndex: 'sterminaldsdPrice',
+        align: 'center',
+        children: [
+          { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 70, align: 'center' }
+        ]
+      })
       return arr
     }
   },
@@ -233,6 +245,7 @@ export default {
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
+      this.queryParam.enabledFlag = undefined
       this.productType = []
       this.$refs.table.refresh(true)
     },
@@ -307,6 +320,24 @@ export default {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 233
+    },
+    // 修改状态
+    changeFlagHandle (text, record) {
+      const _data = {
+        id: record.id,
+        enabledFlag: record.enabledFlag ? '1' : '0'
+      }
+      this.spinning = true
+      priceChangeEnabled(_data).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.$refs.table.refresh()
+          this.spinning = false
+        }
+      })
     }
   },
   watch: {

+ 4 - 3
src/views/productManagement/productInfo/list.vue

@@ -247,17 +247,18 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'name', align: 'center', width: '17%', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'name', align: 'center', width: '15%', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'code', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'origCode', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
         { slots: { title: 'arrowFalgTitle' }, scopedSlots: { customRender: 'arrowFalg' }, width: '6%', align: 'center' },
         { title: '最近修改时间', dataIndex: 'updateDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '最新定价时间', dataIndex: 'pricingTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '定价状态', dataIndex: 'pricingStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '8%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
+        { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '7%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       loadingAudit: false,
       loadingLaunch: false,

+ 23 - 3
src/views/productManagement/productPricing/list.vue

@@ -26,6 +26,11 @@
                   <ProductType id="productPricingList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="定价时间">
+                  <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="定价状态">
                   <v-select code="PRICING_STATUS" id="productPricingList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
@@ -130,6 +135,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
 import { exportExcel } from '@/libs/JGPrint.js'
 import productPricingEditModal from './editModal.vue'
@@ -141,13 +147,14 @@ import ImportGuideModal from './importGuideModal.vue'
 export default {
   name: 'ProductPricingList',
   mixins: [commonMixin],
-  components: { STable, VSelect, productPricingEditModal, productPricingAuditModal, ProductBrand, ProductType, ImportGuideModal },
+  components: { STable, VSelect, rangeDate, productPricingEditModal, productPricingAuditModal, ProductBrand, ProductType, ImportGuideModal },
   data () {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       openGuideModal: false,
       tableHeight: 0,
+      time: [],
       queryParam: { //  查询条件
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
@@ -155,7 +162,9 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        pricingState: undefined //  定价状态
+        pricingState: undefined, //  定价状态
+        beginDate: undefined,
+        endDate: undefined
       },
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
@@ -190,7 +199,7 @@ export default {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys ? this.rowSelectionInfo.selectedRowKeys.length : 0
     },
     columns () {
-      let _this=this
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -201,6 +210,7 @@ export default {
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '7%', align: 'center' },
         { title: '产品状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '定价状态', dataIndex: 'pricingStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '定价时间', dataIndex: 'pricingTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '成本价', scopedSlots: { customRender: 'sterminaldsdPrice' }, width: '7%', align: 'center' },
         { title: '省级价', dataIndex: 'provincePrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -213,6 +223,11 @@ export default {
     }
   },
   methods: {
+    //  定价时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
     // 表格选中项
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
@@ -226,6 +241,11 @@ export default {
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
       this.queryParam.pricingState = undefined
+
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
+      this.time = []
+      this.$refs.rangeDate.resetDate(this.time)
       this.productType = []
       this.$refs.table.clearSelected() // 清空表格选中项
       this.$refs.table.refresh(true)

+ 17 - 6
src/views/reportData/actualSalesReport/list.vue

@@ -40,6 +40,11 @@
                 <subarea id="actualSalesReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="actualSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -71,7 +76,8 @@
         class="sTable"
         ref="table"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 2250 }"
@@ -113,13 +119,14 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { salesBillRealReportTitle, salesBillRealAmountQueryPageList, salesBillRealReportCount } from '@/api/salesBillReport'
 import { actualSalesExport } from '@/api/reportData'
 export default {
   name: 'ActualSalesReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, dealerSubareaScopeList, reportModal, AreaList },
+  components: { STable, VSelect, rangeDate, subarea, dealerSubareaScopeList, reportModal, AreaList, BizUser },
   data () {
     return {
       spinning: false,
@@ -135,7 +142,8 @@ export default {
         endDate: getDate.getCurrMonthDays().endtime,
         subareaArea:{
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         dealer: {
           dealerSn: undefined,
@@ -256,7 +264,8 @@ export default {
       }
       this.queryParam.subareaArea = {
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
       }
       this.totalData = null
       if (this.advanced) {
@@ -280,13 +289,15 @@ export default {
       this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
       this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 4 - 2
src/views/reportData/billingBackReport/list.vue

@@ -237,13 +237,15 @@ export default {
       this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
       this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 4 - 2
src/views/reportData/billingOrderReport/list.vue

@@ -243,13 +243,15 @@ export default {
       this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
       this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 14 - 4
src/views/reportData/billingReturnReport/list.vue

@@ -40,6 +40,11 @@
                 <subarea id="billingReturnReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="billingReturnReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -114,12 +119,13 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { salesReportReturnList, salesReportReturnCount, billingReturnExport, salesReturnReportTitle } from '@/api/reportData'
 export default {
   name: 'BillingReturnReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, subarea, rangeDate, reportModal, AreaList },
+  components: { STable, VSelect, dealerSubareaScopeList, subarea, rangeDate, reportModal, AreaList, BizUser },
   data () {
     return {
       spinning: false,
@@ -139,7 +145,8 @@ export default {
         districtSn: undefined,
         subareaArea:{
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         dealerLevel: undefined
       },
@@ -253,6 +260,7 @@ export default {
       this.queryParam.districtSn = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.totalData = null
       if (this.advanced) {
@@ -276,13 +284,15 @@ export default {
       this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
       this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 13 - 4
src/views/reportData/hPriceDifferenceDetailReport/list.vue

@@ -59,6 +59,11 @@
                   <subarea id="hPriceDifferenceDetailList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="省级区域">
                   <Area id="hPriceDifferenceDetailList-provinceSn" v-model="queryParam.dealer.provinceSn" placeholder="请选择省"></Area>
@@ -135,12 +140,13 @@ import reportModal from '@/views/common/reportModal.vue'
 import Area from '@/views/common/area.js'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { headRebateDetailReportList, headRebateDetailReportCount, headRebateDetailReportExport } from '@/api/reportData'
 export default {
   name: 'HPriceDifferenceDetailReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, subarea, Area, rangeDate, ProductBrand, ProductType, reportModal },
+  components: { STable, VSelect, dealerSubareaScopeList, subarea, Area, rangeDate, ProductBrand, ProductType, reportModal, BizUser },
   data () {
     return {
       spinning: false,
@@ -161,7 +167,8 @@ export default {
         },
         subareaArea:{
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         product: {
           brandType: undefined,
@@ -216,8 +223,9 @@ export default {
     columns () {
       let _this=this
       const arr = [
-        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域负责人', dataIndex: 'subareaArea.bizUserName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单号', dataIndex: 'bizNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '日期', dataIndex: 'bizCreateDate', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'dealer.provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
@@ -325,6 +333,7 @@ export default {
       this.queryParam.dealer.dealerLevel = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealer.provinceSn = undefined
       this.queryParam.product.brandType = ''
       this.queryParam.product.productBrandSn = ''

+ 17 - 8
src/views/reportData/receivedSendStorageReport/index.vue

@@ -7,7 +7,7 @@
         :rules="rules"
         :model="form">
         <a-row :gutter="15">
-          <a-col :md="5" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="选择周期" prop="time">
               <div class="monthBox" style="display:flex;align-item:center;">
                 <a-month-picker
@@ -31,26 +31,31 @@
               </div>
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="产品编码">
               <a-input id="receivedSendStorageReport-queryWord" v-model.trim="queryParam.product.code" allowClear placeholder="请输入产品编码"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="5" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="产品名称">
               <a-input id="receivedSendStorageReport-name" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="5" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="产品品牌">
               <ProductBrand id="receivedSendStorageReport-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
             </a-form-model-item>
           </a-col>
-          <a-col :md="5" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="产品分类">
               <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="receivedSendStorageReport-productType"></productTypeAll>
             </a-form-model-item>
           </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="仓库">
+              <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+            </a-form-item>
+          </a-col>
           <a-col :md="24" :sm="24" style="margin-bottom: 10px;display:flex;align-item:center;justify-content:center;">
             <a-button type="primary" @click="testForm('search')" :disabled="disabled" id="receivedSendStorageReport-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="receivedSendStorageReport-reset">重置</a-button>
@@ -121,11 +126,12 @@ import reportModal from '@/views/common/reportModal.vue'
 import { queryDetailReportPage, exportDetailReport, queryReportCount } from '@/api/reportData'
 import { hdExportExcel } from '@/libs/exportExcel'
 import gatherList from './list'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import moment from 'moment'
 export default {
   name: 'PriceDifferenceDetailReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, ProductBrand, gatherList, productTypeAll, reportModal },
+  components: { STable, VSelect, ProductBrand, gatherList, productTypeAll, reportModal, chooseWarehouse },
   data () {
     return {
       moment,
@@ -139,7 +145,8 @@ export default {
         productBrandSn: undefined,
         productTypeSn1: undefined,
         productTypeSn2: undefined,
-        productTypeSn3: undefined
+        productTypeSn3: undefined,
+        warehouseSn: undefined
       },
       form: {
         time: []
@@ -159,11 +166,12 @@ export default {
       columns: [
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '二级分类', dataIndex: 'productTypeName2', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '三级分类', dataIndex: 'productTypeName3', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productUnit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '期初结存数量', dataIndex: 'beginQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '期初结存单价', dataIndex: 'beginPrice', width: '12%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '期初结存金额', dataIndex: 'beginAmount', width: '12%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
@@ -305,6 +313,7 @@ export default {
       this.queryParam.productTypeSn1 = undefined
       this.queryParam.productTypeSn2 = undefined
       this.queryParam.productTypeSn3 = undefined
+      this.queryParam.warehouseSn = undefined
       this.$refs.table.clearTable()
       this.productType = []
       this.totalData = null

+ 19 - 7
src/views/reportData/regionTypeSalesReport/list.vue

@@ -22,9 +22,11 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="销售状态" prop="salesStatusType">
-                <a-select v-model="queryParam.salesStatusType" allowClear placeholder="请选择销售状态">
-                  <a-select-option v-for="item in salesStatusTypeList" :value="item.code" :key="item.code">{{ item.name }}</a-select-option>
-                </a-select>
+                <v-select
+                    v-model="queryParam.salesStatusType"
+                    code="SALES_STATUS"
+                    placeholder="请选择销售状态"
+                    allowClear></v-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24" v-if="activeKey==0">
@@ -32,6 +34,11 @@
                 <subarea id="returnGoodsPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
             <!--  <template v-if="advanced && activeKey==0">
               <a-col :md="6" :sm="24">
                 <a-form-model-item prop="dealerProvinceSn" style="margin: 0;" label="地区">
@@ -81,13 +88,14 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import Area from '@/views/common/area.js'
 import subarea from '@/views/common/subarea.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import { realReportSalesByProvince, realReportSalesByProvinceExport, subareaAreaReportTitle, subareaReportTitle, realReportSalesBySubArea, realReportSalesBySubAreaExport } from '@/api/reportData.js'
 export default {
   name: 'RegionTypeSalesReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, Area, reportModal },
+  components: { STable, VSelect, rangeDate, subarea, Area, reportModal, BizUser },
   data () {
     return {
       spinning: false,
@@ -105,7 +113,8 @@ export default {
         dealerProvinceSn: undefined,
         subareaArea: {
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         salesStatusType: 'REAL_SALES'
       },
@@ -181,6 +190,7 @@ export default {
       this.queryParam.dealerProvinceSn = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.salesStatusType = 'REAL_SALES'
       if (this.activeKey == 0) {
         this.$refs.subarea.clearData()
@@ -216,13 +226,15 @@ export default {
       const tableTitle = await titUrl().then(res => res.data)
       this.columns = tableTitle.list
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 15 - 5
src/views/reportData/returnGoodsPresentation/list.vue

@@ -46,6 +46,11 @@
                   <subarea id="returnGoodsPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="returnGoodsPresentationList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -118,13 +123,14 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
 import reportModal from '@/views/common/reportModal.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { returnDocReportTitle, reportSalesReturnThjdReportList, reportSalesReturnThjdReportCount, reportSalesReturnThjdReportExport } from '@/api/reportData'
 export default {
   name: 'ReturnGoodsPresentationList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, reportModal, dealerSubareaScopeList },
+  components: { STable, VSelect, rangeDate, subarea, AreaList, reportModal, dealerSubareaScopeList, BizUser },
   data () {
     return {
       spinning: false,
@@ -137,7 +143,8 @@ export default {
         salesReturnBillNo: '',
         subareaArea: {
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         dealer: {
           'dealerSn': '',
@@ -247,7 +254,8 @@ export default {
       this.queryParam.salesReturnBillNo = ''
       this.queryParam.subareaArea = {
         subareaSn: undefined,
-        subareaAreaSn: undefined
+        subareaAreaSn: undefined,
+        bizUserSn: undefined
       }
       this.queryParam.dealer = {
         'dealerName': '',
@@ -278,13 +286,15 @@ export default {
       this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
       this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 13 - 3
src/views/reportData/returnSlipReport/list.vue

@@ -45,6 +45,11 @@
                   <subarea id="returnSlipReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                     <AreaList id="returnSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -119,12 +124,13 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { salesReportReturnTitle, salesReportReturnBillList, salesReportReturnBillCount, returnSlipExport } from '@/api/reportData'
 export default {
   name: 'ReturnSlipReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, subarea, rangeDate, reportModal, AreaList },
+  components: { STable, VSelect, dealerSubareaScopeList, subarea, rangeDate, reportModal, AreaList, BizUser },
   data () {
     return {
       spinning: false,
@@ -144,7 +150,8 @@ export default {
         districtSn: undefined,
         subareaArea:{
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         dealerLevel: undefined,
         salesReturnBillNo: ''
@@ -263,6 +270,7 @@ export default {
       this.queryParam.districtSn = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.queryParam.salesReturnBillNo = ''
       this.$refs.custList.resetForm()
@@ -291,9 +299,11 @@ export default {
         if(item.customRender == 'amount'){
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w*2: (w>=360?200:w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 14 - 4
src/views/reportData/salesAmountReport/list.vue

@@ -39,6 +39,11 @@
                 <subarea id="salesAmountReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="salesAmountReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -113,13 +118,14 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { salesKdxxReportTitle, salesBillReportGroupByBuyerList, salesBillReportCountByBuyer } from '@/api/salesBillReport'
 import { salesAmountExport } from '@/api/reportData'
 export default {
   name: 'SalesAmountReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, dealerSubareaScopeList, reportModal, AreaList },
+  components: { STable, VSelect, rangeDate, subarea, dealerSubareaScopeList, reportModal, AreaList, BizUser },
   data () {
     return {
       spinning: false,
@@ -140,7 +146,8 @@ export default {
         dealerLevel: undefined,
         subareaArea:{
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
       },
       columns: [],
@@ -251,6 +258,7 @@ export default {
       this.queryParam.districtSn = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.totalData = null
       this.$refs.subarea.clearData()
@@ -274,13 +282,15 @@ export default {
       this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
       this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 17 - 8
src/views/reportData/salesDetails/list.vue

@@ -74,13 +74,18 @@
                   <subarea id="salesDetailsList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                     <AreaList id="salesDetailsList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="12" :sm="24" style="margin-bottom: 10px;">
               <a-button
                 type="primary"
                 class="button-info"
@@ -147,12 +152,13 @@ import AreaList from '@/views/common/areaList.js'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
 export default {
   name: 'SalesDetailsList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, custList, subarea, ProductBrand, ProductType, reportModal, AreaList, chooseWarehouse },
+  components: { STable, VSelect, rangeDate, custList, subarea, ProductBrand, ProductType, reportModal, AreaList, chooseWarehouse, BizUser },
   data () {
     return {
       spinning: false,
@@ -178,7 +184,8 @@ export default {
         productTypeSn3: '', //  产品三级分类
         subareaArea:{
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         dealerProvinceSn: undefined,
         dealerCitySn: undefined,
@@ -218,12 +225,13 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        { title: '区域', dataIndex: 'subareaArea.subareaName', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库仓库', dataIndex: 'warehouseName', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域负责人', dataIndex: 'subareaArea.bizUserName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '省份', dataIndex: 'dealerProvinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'dealerName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'dealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -328,6 +336,7 @@ export default {
       this.queryParam.productTypeSn3 = ''
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerProvinceSn = undefined
       this.queryParam.dealerCitySn = undefined
       this.queryParam.dealerCountySn = undefined

+ 13 - 3
src/views/reportData/salesPresentation/list.vue

@@ -45,6 +45,11 @@
                   <subarea id="salesPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="salesPresentationList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -118,12 +123,13 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { salesXsjdReportTitle, reportDispatchReportList, reportDispatchReportCount, reportDispatchReportExport } from '@/api/reportData'
 export default {
   name: 'SalesPresentationList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, dealerSubareaScopeList, reportModal },
+  components: { STable, VSelect, rangeDate, subarea, AreaList, dealerSubareaScopeList, reportModal, BizUser },
   data () {
     return {
       spinning: false,
@@ -137,6 +143,7 @@ export default {
         'subareaArea':{
             'subareaSn': undefined,
             'subareaAreaSn': undefined,
+            'bizUserSn': undefined
         },
         dealer: {
           'dealerSn': undefined,
@@ -247,6 +254,7 @@ export default {
       this.queryParam.subareaArea = {
           'subareaSn': undefined,
           'subareaAreaSn': undefined,
+          'bizUserSn': undefined
          }
       this.queryParam.dealer = {
         'dealerSn': undefined,
@@ -277,13 +285,15 @@ export default {
       this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
       this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 13 - 4
src/views/reportData/salesReturnDetailReport/list.vue

@@ -74,6 +74,11 @@
                   <subarea id="salesReturnDetailList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                     <AreaList id="salesReturnDetailList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -150,12 +155,13 @@ import AreaList from '@/views/common/areaList.js'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { reportSalesReturnDetailList, reportSalesReturnDetailCount, reportSalesReturnDetailExport } from '@/api/reportData'
 export default {
   name: 'SalesReturnDetailReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, ProductBrand, ProductType, reportModal, AreaList, chooseWarehouse },
+  components: { STable, VSelect, rangeDate, subarea, ProductBrand, ProductType, reportModal, AreaList, chooseWarehouse, BizUser },
   data () {
     return {
       spinning: false,
@@ -182,7 +188,8 @@ export default {
         warehouseSn: undefined,
         subareaArea:{
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         dealerProvinceSn: undefined,
         dealerCitySn: undefined,
@@ -222,8 +229,9 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        { title: '区域', dataIndex: 'subareaArea.subareaName', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域负责人', dataIndex: 'subareaArea.bizUserName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退货单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货仓库', dataIndex: 'warehouseName', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '省份', dataIndex: 'dealerProvinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -371,6 +379,7 @@ export default {
       this.queryParam.productTypeSn3 = ''
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerProvinceSn = undefined
       this.queryParam.dealerCitySn = undefined
       this.queryParam.dealerCountySn = undefined

+ 14 - 4
src/views/reportData/salesReturnReport/list.vue

@@ -40,6 +40,11 @@
                 <subarea id="salesReturnReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="salesReturnDetailList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -114,13 +119,14 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { salesReportReturnRebateTitle, salesReportReturnRebateList, salesReportReturnRebateCount, salesReturnExport } from '@/api/reportData'
 
 export default {
   name: 'SalesReturnReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, subarea, rangeDate, reportModal, AreaList },
+  components: { STable, VSelect, dealerSubareaScopeList, subarea, rangeDate, reportModal, AreaList, BizUser },
   data () {
     return {
       spinning: false,
@@ -140,7 +146,8 @@ export default {
         districtSn: undefined,
         subareaArea:{
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         dealerLevel: undefined
       },
@@ -257,6 +264,7 @@ export default {
       this.queryParam.districtSn = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.totalData = null
       this.$refs.subarea.clearData()
@@ -280,13 +288,15 @@ export default {
       this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
       this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 14 - 4
src/views/reportData/salesSlipReport/list.vue

@@ -45,6 +45,11 @@
                   <subarea id="salesSlipReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="区域负责人">
+                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="salesSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -119,13 +124,14 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
+import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { salesKdxxdReportTitle, salesBillReportList, salesBillReportCount } from '@/api/salesBillReport'
 import { salesSlipExport } from '@/api/reportData'
 export default {
   name: 'SalesSlipReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, dealerSubareaScopeList, reportModal, AreaList },
+  components: { STable, VSelect, rangeDate, subarea, dealerSubareaScopeList, reportModal, AreaList, BizUser },
   data () {
     return {
       spinning: false,
@@ -146,7 +152,8 @@ export default {
         districtSn: undefined,
         subareaArea:{
           subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
         },
         dealerLevel: undefined
       },
@@ -259,6 +266,7 @@ export default {
       this.queryParam.districtSn = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
       this.queryParam.dealerLevel = undefined
       this.totalData = null
       if (this.advanced) {
@@ -282,13 +290,15 @@ export default {
       this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
       this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
       this.columns.map(item => {
-        let mw = 40
+        let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
+        }else{
+          item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 && item.customRender != 'amount' ? w * 2 : (w >= 360 ? 200 : w)
+        const tw = w <= 80 ? mw*5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })

+ 6 - 5
src/views/salesManagement/backorder/detailModal.vue

@@ -98,9 +98,10 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '24%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '缺货数量', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
         // { title: '缺货金额', dataIndex: 'totalAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
@@ -128,8 +129,8 @@ export default {
       this.$store.state.app.curActionPermission = 'B_oosPrint'
       _this.spinning = true
       // 打印或预览
-      printFun(oosDetailPrint, { sn: this.itemSn }, type, '缺货单', () => { 
-        _this.spinning = false 
+      printFun(oosDetailPrint, { sn: this.itemSn }, type, '缺货单', () => {
+        _this.spinning = false
         _this.$store.state.app.curActionPermission = 'B_oosDetail'
       })
     }
@@ -146,7 +147,7 @@ export default {
         this.detailData = null
         this.$refs.table.clearTable()
         this.$store.state.app.curActionPermission = ''
-      }else{
+      } else {
         this.$store.state.app.curActionPermission = 'B_oosDetail'
       }
     },

+ 4 - 4
src/views/salesManagement/backorder/list.vue

@@ -15,11 +15,11 @@
                 <dealerSubareaScopeList ref="custList" id="backorderList-buyerSn" @change="custChange"></dealerSubareaScopeList>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <!-- <a-col :md="6" :sm="24">
               <a-form-model-item label="仓库">
                 <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
               </a-form-model-item>
-            </a-col>
+            </a-col> -->
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="backorderList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="backorderList-reset">重置</a-button>
@@ -109,14 +109,14 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', dataIndex: 'salesBillNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'dealerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouseName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '缺货款数', dataIndex: 'totalCategory', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '缺货数量', dataIndex: 'totalQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '缺货金额', dataIndex: 'totalAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '11%', align: 'center' }
       ]
       if (this.$hasPermissions('M_backorderList_salesPrice')) { //  售价权限
-        arr.splice(7, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '11%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(6, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '11%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
     }

+ 2 - 1
src/views/salesManagement/pushOrderManagement/list.vue

@@ -236,7 +236,8 @@ export default {
         shippingAddrProvinceSn: undefined,
         printStatus: undefined,
         checkStatus: undefined,
-        warehouseSn: undefined
+        warehouseSn: undefined,
+        authFlag: 0 // 下推必传参数
       },
       totalData: {
         totalAmount: 0,

+ 1 - 1
src/views/salesManagement/receiptPrint/printModel.vue

@@ -106,7 +106,7 @@ export default {
     handleCommonOk () {
       const _this = this
       const html = document.getElementsByClassName('sendGood-print-box')
-      const result = groupLessThan(html)
+      const result = groupLessThan(html, false)
       this.$store.state.app.curActionPermission = 'B_SkPrint'
       // html, type, callback, printLogParams
       this.spinning = true

+ 3 - 3
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -33,9 +33,9 @@
           {{ chooseAddr }}
           <a-button type="link" :disabled="!form.buyerSn" id="chooseCustom-chooseAddr" @click="handleChoose">{{ addressVal }} >></a-button>
         </a-form-model-item>
-        <a-form-model-item label="出库仓库" prop="warehouseSn">
+        <!--  <a-form-model-item label="出库仓库" prop="warehouseSn">
           <chooseWarehouse ref="warehouse" v-model="form.warehouseSn"></chooseWarehouse>
-        </a-form-model-item>
+        </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>
@@ -107,7 +107,7 @@ export default {
         this.form.buyerName = val.name || ''
         this.$refs.ruleForm.clearValidate()
         this.getDefaultAddress()
-        if(val.row){
+        if (val.row) {
           this.form.warehouseSn = val.row.defaultWarehouseSn
         }
       } else {

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

@@ -91,6 +91,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量', dataIndex: 'qtyText', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存', dataIndex: 'stockQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '14%', align: 'center', customRender: function (text) { return text || '--' } }
@@ -100,6 +101,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量', dataIndex: 'qtyText', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存', dataIndex: 'stockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },

+ 42 - 14
src/views/salesManagement/salesQuery/detail.vue

@@ -55,7 +55,6 @@
               <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="收货人">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
               <a-descriptions-item label="收货电话">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="出库仓库">{{ detailData&&detailData.warehouseName || '--' }}</a-descriptions-item>
               <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
@@ -93,6 +92,22 @@
             </div>
           </div>
         </a-alert>
+        <!-- 查询 -->
+        <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="出库仓库">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
         <!-- 列表 -->
         <s-table
           class="sTable"
@@ -202,12 +217,13 @@ import printModal from './printModal.vue'
 import auditModal from '@/views/common/auditModal.vue'
 import dsModal from '@/views/salesManagement/waitDispatch/dsModal.vue'
 import stockOutDetail from './stockOutDetailModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { salesDetailBySn, salesDetailPrint, salesDetailExcel, salesDetailTypeExcel, salesWriteAudit, salesWriteAuditPush } from '@/api/sales'
 import { salesDetailAllList, salesDetailAllStockList } from '@/api/salesDetail'
 export default {
   name: 'SalesDetail',
   mixins: [commonMixin],
-  components: { STable, VSelect, printModal, auditModal, dsModal, stockOutDetail },
+  components: { STable, VSelect, printModal, auditModal, dsModal, stockOutDetail, chooseWarehouse },
   props: {
     bizSn: { //  有值则为弹框,无值则为页面
       type: [Number, String],
@@ -221,10 +237,13 @@ export default {
       showDsModal: false,
       showStockOut: false,
       authCode: '',
+      queryParam: {
+        warehouseSn: undefined
+      },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        const params = Object.assign(parameter, { salesBillSn: this.bizSn || this.$route.params.sn })
+        const params = Object.assign(parameter, { salesBillSn: this.bizSn || this.$route.params.sn, warehouseSn: this.queryParam.warehouseSn })
         let url = salesDetailAllList
         if (this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE') && this.$hasPermissions('B_salesAudit')) { //  审核,需用到库存
           url = salesDetailAllStockList
@@ -293,7 +312,8 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '13%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
         { title: '产品名称', dataIndex: 'productName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         // { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -306,10 +326,10 @@ export default {
         { title: '已取消数', dataIndex: 'cancelQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions(this.authCode + '_costPrice')) { //  成本价权限
-        arr.splice(4, 0, { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(5, 0, { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
 
-      const ind = this.$hasPermissions(this.authCode + '_costPrice') ? 5 : 4
+      const ind = this.$hasPermissions(this.authCode + '_costPrice') ? 6 : 5
       if (this.$hasPermissions(this.authCode + '_provincePrice')) {
         arr.splice(ind, 0, { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
@@ -341,6 +361,11 @@ export default {
       const row = this.detailData
       this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn, wSn: row.warehouseSn } })
     },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.warehouseSn = undefined
+      this.$refs.table.refresh()
+    },
     // 打开缺货明细
     openStockOut () {
       if (this.outStockStr != '') {
@@ -386,11 +411,11 @@ export default {
       salesWriteAuditPush(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.spinningAudit = false
-          this.spinning = false
           //  关闭详情跳列表
           this.handleBack()
         }
+        this.spinningAudit = false
+        this.spinning = false
       })
     },
     // 审核
@@ -404,12 +429,15 @@ export default {
           this.visibleAudit = false
           this.$message.success(res.message)
           this.spinningAudit = false
-          if (billStatus == 'AUDIT_PASS' && !this.auditText) {
-            this.$router.push({ name: 'waitDispatch', params: { salesBillSn: this.bizSn || this.$route.params.sn, dispatchBillSn: res.data.dispatchBillSn } })
-          } else {
-            //  关闭详情跳列表
-            this.handleBack()
-          }
+          const _this = this
+          this.$nextTick(() => {
+            if (billStatus == 'AUDIT_PASS' && !_this.auditText) {
+              _this.$router.push({ name: 'waitDispatch', params: { salesBillSn: _this.bizSn || _this.$route.params.sn } })
+            } else {
+              //  关闭详情跳列表
+              _this.handleBack()
+            }
+          })
         } else {
           this.visibleAudit = false
           this.spinningAudit = false

+ 192 - 52
src/views/salesManagement/salesQuery/edit.vue

@@ -6,10 +6,10 @@
         <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>
-          <div style="margin: 0 15px;display:inline-block;color: #666;">
+          <!-- <div style="margin: 0 15px;display:inline-block;color: #666;">
             <span>出库仓库:</span>
             <chooseWarehouse style="width:200px" :allowClear="false" ref="warehouse" v-model="warehouseSn" @change="handleWarehouse"></chooseWarehouse>
-          </div>
+          </div> -->
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" class="salesEdit-cont">
@@ -47,38 +47,45 @@
           </div>
         </a-alert>
         <!-- 筛选条件 -->
-        <a-row :gutter="15">
-          <a-col :span="24">
-            <div class="table-page-search-wrapper" style="position: relative;width: 100%;">
-              <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="salesEdit-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="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
-                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
-                  </a-col>
-                </a-row>
-              </a-form>
-              <div style="position: absolute;right: 0;top: 3px;">
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">
+                <a-form-item label="出库仓库" prop="warehouseSn">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="产品编码" prop="productCode">
+                  <a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="产品名称" prop="productName">
+                  <a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="品牌">
+                  <ProductBrand id="salesEdit-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="产品分类">
+                  <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="salesEdit-productType"></productTypeAll>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
+              </a-col>
+              <a-col :md="24" :sm="24" style="text-align:right;">
                 <span>已选{{ selectTotal }}项</span>
-                <!-- <a-button
-                  style="margin:0 15px;"
-                  size="small"
-                  type="danger"
-                  class="button-info"
-                  id="salesEdit-plDel-btn"
-                  @click="handleBatchDel">批量删除</a-button> -->
                 <a-dropdown>
                   <a-menu slot="overlay" @click="handleMenuClick">
+                    <a-menu-item key="0">
+                      仓库设置
+                    </a-menu-item>
                     <a-menu-item key="1">
                       删除已选项
                     </a-menu-item>
@@ -89,17 +96,15 @@
                   <a-button
                     style="margin:0 15px;"
                     type="primary"
-                    ghost
-                    id="salesEdit-plDel-btn"> 批量删除 <a-icon type="down" /> </a-button>
+                    ghost> 批量操作 <a-icon type="down" /> </a-button>
                 </a-dropdown>
                 <a-button
                   type="default"
-                  id="salesEdit-import-btn"
                   @click="openGuideModal=true">导入产品</a-button>
-              </div>
-            </div>
-          </a-col>
-        </a-row>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
         <!-- 已选配件列表 -->
         <s-table
           class="sTable"
@@ -153,6 +158,10 @@
             </div>
             <span v-else>--</span>
           </template>
+          <!-- 出库仓库 -->
+          <template slot="warehouseBox" slot-scope="text, record">
+            <chooseWarehouse style="width:100%;" :allowClear="false" ref="warehouseBox" v-model="record.warehouseSn" @change="handleWarehouseBox(record)"></chooseWarehouse>
+          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button
@@ -214,6 +223,10 @@
       @close="closeActive"></ChooseActive>
     <!-- 导入产品 -->
     <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: $route.params.sn}" @close="closeGuideModel" @ok="hanldeOk" />
+    <!-- 仓库设置 -->
+    <setWarehouse :show="openWarehouseModal" @ok="chooseWarehouseOk" @cancel="openWarehouseModal=false"></setWarehouse>
+    <!-- 价格更新弹窗 -->
+    <setPriceModal :show="priceUpdateModal" :totalRealAmount="updataData.totalRealAmount" :totalAmount="updataData.totalAmount" @ok="updatePrice" @cancel="priceUpdateModal=false"></setPriceModal>
   </div>
 </template>
 
@@ -224,13 +237,27 @@ import queryPart from './queryPart.vue'
 import queryPromotable from './queryPromotable.vue'
 import ChooseActive from './chooseActive.vue'
 import ImportGuideModal from './importGuideModal.vue'
+import setWarehouse from './setWarehouse.vue'
+import setPriceModal from './setPriceModal.vue'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
-import { salesModify, salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll } from '@/api/sales'
+import ProductBrand from '@/views/common/productBrand.js'
+import productTypeAll from '@/views/common/productTypeAll.js'
+import { salesModify, salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll, submitCheck, updateBatch, updateWarehouse } from '@/api/sales'
 import { salesDetailStockList, salesDetailInsert, salesDetailUpdateQty, salesDetailDel, salesDetailBatchDel, salesDetailDelAll, addPromoGoods, salesBatchInsert } from '@/api/salesDetail'
 export default {
   name: 'SalesEdit',
   mixins: [commonMixin],
-  components: { STable, VSelect, queryPart, queryPromotable, ChooseActive, ImportGuideModal, chooseWarehouse },
+  components: { STable,
+    VSelect,
+    queryPart,
+    queryPromotable,
+    ChooseActive,
+    ImportGuideModal,
+    chooseWarehouse,
+    setWarehouse,
+    setPriceModal,
+    ProductBrand,
+    productTypeAll },
   data () {
     return {
       spinning: false,
@@ -246,6 +273,7 @@ export default {
         salesBillSn: '',
         promotionFlag: 0
       },
+      openWarehouseModal: false, // 打开仓库设置
       warehouseSn: undefined,
       activeName: '', // 促销活动
       nowData: null,
@@ -271,10 +299,21 @@ export default {
       },
       openGuideModal: false, //  导入产品引导
       queryParam: {
+        warehouseSn: undefined,
         productCode: '',
-        productName: ''
+        productName: '',
+        productBrandSn: undefined,
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
       },
-      rowSelectionInfo: null
+      productType: [],
+      rowSelectionInfo: null,
+      priceUpdateModal: false, // 价格更新弹窗
+      updataData: {
+        totalRealAmount: '',
+        totalAmount: ''
+      }
     }
   },
   computed: {
@@ -284,11 +323,12 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '20%', align: 'center', sorter: true },
-        { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: '25%', align: 'left' },
+        { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '13%', align: 'center', sorter: true },
+        { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: '20%', align: 'left' },
         // { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '8%', align: 'center' },
         { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '8%', align: 'center' },
+        { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '15%', align: 'center' },
         { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
@@ -301,6 +341,49 @@ export default {
     }
   },
   methods: {
+    // 设置单个出库仓库
+    handleWarehouseBox (row) {
+      const snArr = [row.salesBillDetailSn]
+      const ajax_data = {
+        warehouseSn: row.warehouseSn,
+        salesBillDetailSnList: snArr,
+        salesBillSn: this.$route.params.sn
+      }
+      this.setWarehouseInfo(ajax_data)
+    },
+    chooseWarehouseOk (sn) {
+      const _this = this
+      const snArr = []
+      _this.rowSelectionInfo.selectedRows.forEach(item => {
+        snArr.push(item.salesBillDetailSn)
+      })
+      const ajax_data = {
+        warehouseSn: sn,
+        salesBillDetailSnList: snArr,
+        salesBillSn: _this.$route.params.sn
+      }
+      _this.setWarehouseInfo(ajax_data)
+    },
+    setWarehouseInfo (data) {
+      const _this = this
+      _this.spinning = true
+      updateWarehouse(data).then(res => {
+        if (res.status == 200) {
+          _this.openWarehouseModal = false
+          _this.resetSearchForm(true)
+          _this.$refs.promotable.resetCurForm()
+          _this.$message.success(res.message)
+        }
+        _this.$refs.table.refresh(true)
+        _this.spinning = false
+      })
+    },
+    //  产品分类  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] : ''
+    },
     // 选择仓库
     handleWarehouse (val) {
       this.warehouseSn = val
@@ -311,7 +394,7 @@ export default {
         warehouseSn: val
       }).then(res => {
         if (res.status == 200) {
-          _this.$refs.partQuery.resetCurForm(val)
+          _this.$refs.partQuery.resetCurForm()
           _this.$refs.table.refresh(true)
           _this.spinning = false
         } else {
@@ -321,7 +404,14 @@ export default {
       })
     },
     handleMenuClick (e) {
-      if (e.key == 1) { // 删除已选项
+      const _this = this
+      if (e.key == 0) { // 仓库设置
+        if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+          _this.$message.warning('请先选择要设置的产品!')
+        } else {
+          _this.openWarehouseModal = true
+        }
+      } else if (e.key == 1) { // 删除已选项
         this.handleBatchDel()
       } else {
         this.handleBatchDelAll()
@@ -410,12 +500,19 @@ export default {
     chooseResetSearchForm () {
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
+      this.queryParam.warehouseSn = undefined
       this.$refs.table.refresh(true)
     },
     //  重置
     resetSearchForm (flag) {
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
+      this.queryParam.warehouseSn = undefined
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.productType = []
       this.$refs.table.refresh(!!flag)
       this.getPromoacActiveList()
       this.getOrderDetail(false)
@@ -499,7 +596,8 @@ export default {
         purchaseBillNo: this.detailData.purchaseBillNo,
         stockSn: row.stockSn,
         promotableFlag: row.isJoinActivityProduct || 0, // 可促销标记 有活动的传1,没活动的传0
-        promotionFlag: promotionFlag // 促销标记 正品传0,促销品传1
+        promotionFlag: promotionFlag, // 促销标记 正品传0,促销品传1
+        warehouseSn: row.warehouseSn
       }).then(res => {
         if (res.status == 200) {
           this.resetSearchForm()
@@ -519,15 +617,38 @@ export default {
         if (res.status == 200) {
           this.detailData = res.data
           if (flag) {
-            this.$refs.partQuery.pageInit(this.detailData && this.detailData.buyerSn || '', this.warehouseSn)
+            this.$refs.partQuery.pageInit(this.detailData && this.detailData.buyerSn || '')
           }
         }
       })
     },
     // 提交销售单
     handleSubmit () {
+      // 先不提交,先判断是否有价格更新  (下级创建时判断)
+      if (this.detailData && this.detailData.salesBillSource && this.detailData.salesBillSource == 'PURCHASE') {
+        submitCheck({ salesBillSn: this.salesBillSn }).then(res => {
+          if (res.status == 200) {
+            if (res.data.detailList.length > 0) {
+              this.updataData = res.data
+              const _this = this
+              this.$nextTick(() => {
+                _this.priceUpdateModal = true
+              })
+            } else {
+              const ajax_data = { salesBillSn: this.salesBillSn }
+              this.submitResult(ajax_data)
+            }
+          }
+        })
+      } else {
+        const ajax_data = { salesBillSn: this.salesBillSn }
+        this.submitResult(ajax_data)
+      }
+    },
+    // 提交
+    submitResult (data) {
       this.spinning = true
-      salesWriteSubmit({ salesBillSn: this.salesBillSn }).then(res => {
+      salesWriteSubmit(data).then(res => {
         if (res.status == 200) {
           this.handleBack()
           this.$message.success(res.message)
@@ -537,6 +658,27 @@ export default {
         }
       })
     },
+    // 选择价格类型  并更新
+    updatePrice (type) {
+      const _this = this
+      if (type == 0) {
+        const ajax_data = {
+          salesBillSn: _this.salesBillSn,
+          productPriceChangeFlag: type
+        }
+        _this.submitResult(ajax_data)
+      } else {
+        updateBatch(_this.updataData.detailList).then(res => {
+          if (res.status == 200) {
+            const ajax_data = {
+              salesBillSn: _this.salesBillSn,
+              productPriceChangeFlag: type
+            }
+            _this.submitResult(ajax_data)
+          }
+        })
+      }
+    },
     // 获取促销活动
     getPromoacActiveList () {
       const _this = this
@@ -550,6 +692,7 @@ export default {
         }
       })
     },
+
     // 选择促销品
     handleSelCx (row) {
       // this.nowData = row
@@ -679,9 +822,6 @@ export default {
         }
       }
     }
-    .redBg-row{
-      background-color: #f5cdc8;
-    }
   }
 
 </style>

+ 23 - 17
src/views/salesManagement/salesQuery/importGuideModal.vue

@@ -15,11 +15,16 @@
             <span>1</span>准备导入
           </div>
           <ul>
-            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“数量”的列,且名称必须相同</li>
-            <li>2) 除了“产品编码”、“数量”列,其他列可自定义,不影响数据导入</li>
+            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“数量”、“出库仓库”的列,且名称必须相同</li>
+            <li>2) 除了“产品编码”、“数量”、“出库仓库”三列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
+            <li>
+              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+                <a-icon type="download" style="padding-right: 5px;" />下载导入模板
+              </a>
+            </li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
+          <!-- <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button> -->
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -91,7 +96,8 @@ export default {
       uploadParams: {
         savePathType: 'local'
       },
-      exportLoading: false
+      exportLoading: false,
+      filePath: location.protocol + '//' + location.host + '/templ/销售导入产品模板.xlsx'
     }
   },
   methods: {
@@ -123,20 +129,20 @@ export default {
     handleClose () {
       this.openImportModal = false
       this.isShow = false
-    },
-    //  导出
-    handleExport () {
-      const _this = this
-      const params = { grabFlag: this.params.grabFlag }
-      this.exportLoading = true
-      this.spinning = true
-      setTimeout(() => {
-        _this.exportLoading = false
-      }, 1000)
-      hdExportExcel(salesDownload, params, '销售导入模板', function () {
-        _this.spinning = false
-      })
     }
+    //  导出
+    // handleExport () {
+    //   const _this = this
+    //   const params = { grabFlag: this.params.grabFlag }
+    //   this.exportLoading = true
+    //   this.spinning = true
+    //   setTimeout(() => {
+    //     _this.exportLoading = false
+    //   }, 1000)
+    //   hdExportExcel(salesDownload, params, '销售导入模板', function () {
+    //     _this.spinning = false
+    //   })
+    // }
   },
   watch: {
     //  父页面传过来的弹框状态

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

@@ -11,7 +11,7 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-form-item label="客户名称">
                 <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesManagementList-buyerName" @change="custChange" />
               </a-form-item>
             </a-col>
@@ -160,6 +160,18 @@
           </div>
           <div v-else>{{ record.salesBillNo }}</div>
         </template>
+        <!-- 出库仓库 -->
+        <template slot="warehouseBox" slot-scope="text, record">
+          <a-tooltip placement="right" v-if="record.warehouseNameSet && record.warehouseNameSet.length>0">
+            <template slot="title">
+              <span>{{ record.warehouseNameSet.toString() }}</span>
+            </template>
+            <div class="warehouse_box">
+              <span>{{ record.warehouseNameSet.toString() }}</span>
+            </div>
+          </a-tooltip>
+          <div v-else>--</div>
+        </template>
         <!-- 总数量 -->
         <template slot="totalQty" slot-scope="text, record">
           {{ record.totalQty }}
@@ -373,7 +385,7 @@ export default {
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '7%', align: 'center' },
         { title: '提交时间', dataIndex: 'submitDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '出库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '8%', align: 'center', ellipsis: true },
         { title: '总数量', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: '4%', align: 'center' },
         // { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已下推数量', dataIndex: 'totalPushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -431,7 +443,7 @@ export default {
     },
     // 选择客户成功
     chooseCustomOk (data) {
-      this.$router.push({ name: 'salesAdd', params: { sn: data.salesBillSn, wSn: data.warehouseSn } })
+      this.$router.push({ name: 'salesAdd', params: { sn: data.salesBillSn } })
     },
     // 下推
     handleDispatch (row) {
@@ -439,7 +451,7 @@ export default {
       findBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
         this.spinning = false
         if (res.status == 200) {
-          this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn, dispatchBillSn: res.data.dispatchBillSn } })
+          this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn } })
         }
       })
     },
@@ -453,7 +465,7 @@ export default {
     },
     // 编辑
     handleEdit (row) {
-      this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn, wSn: row.warehouseSn } })
+      this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn } })
     },
     // 删除
     handleDel (row) {
@@ -604,6 +616,18 @@ export default {
           font-size: 13px;
         }
       }
+      .warehouse_box{
+        width: 100%;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+      }
+      // .warehouse_box>span::after{
+      //   content:',';
+      // }
+      // .warehouse_box>span:last-child::after{
+      //   content:'';
+      // }
     }
   }
 </style>

+ 30 - 11
src/views/salesManagement/salesQuery/queryPart.vue

@@ -2,8 +2,13 @@
   <div class="productInfoList-wrap">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+      <a-form layout="inline" @keyup.enter.native="searchForm">
         <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="出库仓库" prop="warehouseSn" required>
+              <chooseWarehouse ref="warehouse" :allowClear="false" v-model="queryParam.warehouseSn" :isDefault="true" @load="loadWarehouse"></chooseWarehouse>
+            </a-form-item>
+          </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="产品编码">
               <a-input id="productInfoList-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
@@ -14,12 +19,12 @@
               <a-input id="productInfoList-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="原厂编码">
-              <a-input id="productInfoList-origCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
-            </a-form-item>
-          </a-col>
           <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="原厂编码">
+                <a-input id="productInfoList-origCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="产品品牌">
                 <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
@@ -32,7 +37,7 @@
             </a-col>
           </template>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
+            <a-button type="primary" @click="searchForm" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
             <a @click="advanced=!advanced" style="margin: 0 5px">
               {{ advanced ? '收起' : '展开' }}
@@ -103,11 +108,12 @@ import { commonMixin } from '@/utils/mixin'
 import { queryStockProductPage } from '@/api/stock'
 import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { STable, VSelect } from '@/components'
 export default {
   name: 'QueryPart',
   mixins: [commonMixin],
-  components: { STable, VSelect, ProductBrand, ProductType },
+  components: { STable, VSelect, ProductBrand, ProductType, chooseWarehouse },
   props: {
     newLoading: Boolean
   },
@@ -127,6 +133,7 @@ export default {
         productTypeSn3: '', //  产品三级分类
         warehouseSn: undefined
       },
+      defaultWarehouseSn: undefined, // 默认仓库sn
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -161,6 +168,7 @@ export default {
         { title: '产品名称', dataIndex: 'productName', scopedSlots: { customRender: 'productName' }, width: '18%', align: 'left' },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '品牌', dataIndex: 'productBrandName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '库存数量', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -175,6 +183,10 @@ export default {
     }
   },
   methods: {
+    loadWarehouse (sn) {
+      this.defaultWarehouseSn = sn
+      this.queryParam.warehouseSn = sn
+    },
     // 双击列表
     handleClickRow (record) {
       const _this = this
@@ -191,6 +203,14 @@ export default {
         }
       }
     },
+    // 查询
+    searchForm () {
+      if (this.queryParam.warehouseSn) {
+        this.$refs.table.refresh(true)
+      } else {
+        this.$message.info('请选择仓库')
+      }
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.productCode = ''
@@ -201,16 +221,15 @@ export default {
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
       this.productType = []
+      this.queryParam.warehouseSn = this.defaultWarehouseSn
       this.$refs.table.refresh(true)
     },
     pageInit (buyerSn, warehouseSn) {
       this.buyerSn = buyerSn
-      this.queryParam.warehouseSn = warehouseSn
       this.resetSearchForm()
     },
     // 刷新当前页面
-    resetCurForm (warehouseSn) {
-      this.queryParam.warehouseSn = warehouseSn
+    resetCurForm () {
       const _this = this
       _this.$nextTick(() => {
         _this.$refs.table.refresh()

+ 87 - 0
src/views/salesManagement/salesQuery/setPriceModal.vue

@@ -0,0 +1,87 @@
+<template>
+  <a-modal
+    v-model="opened"
+    title="提交"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    width="30%"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div style="display:flex;align-items:center;justify-content:center;">
+        <a-icon type="warning" theme="twoTone" two-tone-color="#D9001b" style="font-size:60px;margin-right:30px;"/>
+        <div>
+          <div style="margin-bottom:10px;font-weight:bold;">销售单部分产品价格发生变更,请确认</div>
+          <a-radio-group v-model="priceVal">
+            <a-radio value="0" :style="radioStyle">
+              以【当前】价格为准,总金额:{{ totalRealAmount }}元
+            </a-radio>
+            <a-radio value="1" :style="radioStyle">
+              以【最新】价格为准,总金额:{{ totalAmount }}元
+            </a-radio>
+          </a-radio-group>
+        </div>
+      </div>
+      <div style="margin-top:36px;text-align:center;">
+        <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+        <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+export default {
+  name: 'SetPriceModal',
+  mixins: [commonMixin],
+  props: {
+    show: [Boolean],
+    totalRealAmount: {
+      type: String,
+      default: ''
+    },
+    totalAmount: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      priceVal: undefined,
+      confirmLoading: false,
+      radioStyle: {
+        display: 'block',
+        height: '30px',
+        lineHeight: '30px'
+      }
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit () {
+      if (!this.priceVal) {
+        this.$message.warning('请选择价格变更类型!')
+        return
+      }
+      this.$emit('ok', this.priceVal)
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.priceVal = undefined
+      }
+    }
+  }
+}
+</script>

+ 91 - 0
src/views/salesManagement/salesQuery/setWarehouse.vue

@@ -0,0 +1,91 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    width="36%"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <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-form-model-item label="出库仓库" prop="warehouseSn">
+          <chooseWarehouse ref="warehouse" v-model="form.warehouseSn"></chooseWarehouse>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top:60px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
+export default {
+  name: 'SetWarehouse',
+  mixins: [commonMixin],
+  components: { VSelect, chooseWarehouse },
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '批量设置出库仓库',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        warehouseSn: undefined
+      },
+      rules: {
+        warehouseSn: [ { required: true, message: '请选择出库仓库', trigger: ['change', 'blur'] } ]
+      }
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$emit('ok', this.form.warehouseSn)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.form.warehouseSn = undefined
+        this.$refs.ruleForm.resetFields()
+      }
+    }
+  }
+}
+</script>

+ 38 - 12
src/views/salesManagement/waitDispatch/dsModal.vue

@@ -22,15 +22,28 @@
           <a-form-model-item label="客户名称">
             <span>{{ detailData ? detailData.buyerName : '--' }}</span>
           </a-form-model-item>
-          <a-form-model-item label="收货客户名称" extra="如果收货客户和下单客户相同,则不需要选择收货客户名称">
-            <dealerSubareaScopeList ref="dealerSubareaScopeList" defValKey="buyerSn" @change="custChange" v-model="form.receiverSn" />
-          </a-form-model-item>
-          <a-form-model-item label="收货地址" prop="dealerRecevieAddressSn" v-if="form.receiverSn">
-            <div style="display:flex;padding-top:6px;">
-              <div style="width:80%;flex-grow:1;line-height: 24px;">{{ chooseAddr }}</div>
-              <a-button size="small" type="link" @click="openAddrModal = true">{{ addressVal }} >></a-button>
-            </div>
-          </a-form-model-item>
+          <div v-if="!receiverDisabled">
+            <a-form-model-item label="收货客户名称" extra="如果收货客户和下单客户相同,则不需要选择收货客户名称">
+              <dealerSubareaScopeList ref="dealerSubareaScopeList" defValKey="buyerSn" @change="custChange" v-model="form.receiverSn" />
+            </a-form-model-item>
+            <a-form-model-item label="收货地址" prop="dealerRecevieAddressSn" v-if="form.receiverSn">
+              <div style="display:flex;padding-top:6px;">
+                <div style="width:80%;flex-grow:1;line-height: 24px;">{{ chooseAddr }}</div>
+                <a-button size="small" type="link" @click="openAddrModal = true">{{ addressVal }} >></a-button>
+              </div>
+            </a-form-model-item>
+          </div>
+          <div v-else>
+            <a-form-model-item label="收货客户名称" v-if="detailData&&detailData.receiverName">
+              {{ detailData.receiverName }}
+            </a-form-model-item>
+            <a-form-model-item label="收货客户名称" v-else>
+              --
+            </a-form-model-item>
+            <a-form-model-item label="收货地址">
+              {{ chooseAddr }}
+            </a-form-model-item>
+          </div>
           <a-form-model-item label="发货编号" prop="sendNo">
             <a-input
               id="dealerAccountEdit-phone"
@@ -121,7 +134,8 @@ export default {
       addressVal: '选择地址', //  选择地址/更换地址
       chooseAddr: '', //  当前已选地址信息
       openAddrModal: false, // 选择地址弹框是否显示
-      addressId: undefined
+      addressId: undefined,
+      receiverDisabled: false
     }
   },
   methods: {
@@ -168,6 +182,7 @@ export default {
       const _this = this
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          _this.form.buyerName = _this.detailData.buyerName
           const formData = JSON.parse(JSON.stringify(_this.form))
           _this.$emit('ok', formData)
           _this.isShow = false
@@ -190,6 +205,15 @@ export default {
     //  获取详情
     setDetail (data) {
       this.detailData = data
+      if (data && data.dispatchBillCount * 1 > 0) {
+        this.receiverDisabled = true
+        this.form.receiverSn = data.receiverSn
+        this.form.receiverName = data.receiverName
+        if (data.salesBillExtEntity) {
+          const address = (data.salesBillExtEntity.shippingAddrProvinceName ? (data.salesBillExtEntity.shippingAddrProvinceName + '-') : '') + (data.salesBillExtEntity.shippingAddrCityName ? (data.salesBillExtEntity.shippingAddrCityName + '-') : '') + (data.salesBillExtEntity.shippingAddrCountyName ? (data.salesBillExtEntity.shippingAddrCountyName + '-') : '') + data.salesBillExtEntity.shippingAddr
+          this.chooseAddr = (data.salesBillExtEntity.consigneeName || '') + '(' + (data.salesBillExtEntity.consigneeTel || '-') + ')' + ' ' + (address || '')
+        }
+      }
     },
     // 重置表单
     resetForm () {
@@ -204,8 +228,10 @@ export default {
         dealerRecevieAddressSn: '',
         explainInfo: ''
       }
-      this.$refs.dealerSubareaScopeList.resetForm()
-      this.verifyFun(this.addressId)
+      if (!this.receiverDisabled) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+        this.verifyFun(this.addressId)
+      }
     }
   },
   watch: {

+ 22 - 9
src/views/salesManagement/waitDispatch/edit.vue

@@ -113,6 +113,7 @@ import { salesDetailBySn } from '@/api/sales'
 import { salesDetailDispatchByOneKey, insertBatchOfWaitDispatch, salesDetailUpdateCancelQty } from '@/api/salesDetail'
 import { deleteBatch, pushDown, waitDispatchDetailAllList, updateQty } from '@/api/waitDispatchDetail'
 import { findBySalesBillSn } from '@/api/dispatch'
+import { keys } from 'core-js/fn/array'
 export default {
   name: 'WaitDispatch',
   mixins: [commonMixin],
@@ -136,6 +137,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '26%', align: 'center' },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '29%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'dispatchBill.warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '待下推数量', dataIndex: 'surplusQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '本次下推数', scopedSlots: { customRender: 'salesNums' }, width: '11%', align: 'center' },
         { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -144,9 +146,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        this.productForm.dispatchBillSn = this.$route.params.dispatchBillSn
         // 查询统计
-        this.getTotalData()
         return waitDispatchDetailAllList(Object.assign(parameter, this.productForm)).then(res => {
           let data
           if (res.status == 200) {
@@ -176,6 +176,16 @@ export default {
       findBySalesBillSn({ salesBillSn: this.$route.params.salesBillSn }).then(res => {
         if (res.status == 200) {
           this.totalData = res.data || null
+          if (res.data && Object.keys(res.data).length > 0) {
+            this.productForm.dispatchBillSn = res.data.dispatchBillSn
+            const _this = this
+            this.$nextTick(() => {
+              _this.$refs.table.refresh()
+            })
+          } else {
+            this.dataSource = []
+            this.$refs.table.clearTable()
+          }
         } else {
           this.totalData = null
         }
@@ -195,7 +205,7 @@ export default {
             _this.$refs.partQuery.resetCurForm()
             _this.$message.success(res.message)
             _this.spinning = false
-            _this.resetSearchForm(true)
+            _this.resetSearchForm()
           } else {
             _this.spinning = false
           }
@@ -205,8 +215,8 @@ export default {
       }
     },
     //  重置
-    resetSearchForm (flag) {
-      this.$refs.table.refresh(!!flag)
+    resetSearchForm () {
+      this.getTotalData()
       this.getOrderDetail()
     },
     //  返回
@@ -256,7 +266,7 @@ export default {
       _this.spinning = true
       deleteBatch(type == 0 ? [row.dispatchBillDetailSn] : row).then(res => {
         if (res.status == 200) {
-          _this.resetSearchForm(true)
+          _this.resetSearchForm()
           _this.$refs.partQuery.resetCurForm()
           if (type == 1) { //  批量操作
             _this.$refs.table.clearSelected() // 清空表格选中项
@@ -344,6 +354,9 @@ export default {
     handleDispatch () {
       if (this.dataSource.length) {
         this.showDsModal = true
+        this.detailData.dispatchBillCount = this.totalData.dispatchBillCount
+        this.detailData.receiverName = this.totalData.receiverName ? this.totalData.receiverName : ''
+        this.detailData.receiverSn = this.totalData.receiverSn ? this.totalData.receiverSn : ''
         this.$refs.dsModal.setDetail(this.detailData)
       } else {
         this.$message.warning('请选择待下推产品')
@@ -354,7 +367,7 @@ export default {
       this.isInster = true
       this.loading = true
       this.spinning = true
-      const params = Object.assign({ dispatchBillSn: this.$route.params.dispatchBillSn }, data)
+      const params = Object.assign({ dispatchBillSn: this.productForm.dispatchBillSn }, data)
       pushDown(params).then(res => {
         if (res.status == 200) {
           this.handleBack()
@@ -368,11 +381,11 @@ export default {
     },
     pageInit () {
       this.rowSelectionInfo = null
-      this.$refs.table.clearTable()
+      // this.$refs.table.clearTable()
       this.$refs.partQuery.clearTable()
       this.salesBillSn = this.$route.params.salesBillSn
       this.getOrderDetail()
-      this.$refs.table.refresh(true)
+      this.getTotalData()
     }
   },
   mounted () {

+ 16 - 7
src/views/salesManagement/waitDispatch/queryPart.vue

@@ -14,7 +14,7 @@
               <a-input id="productInfoList-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-item label="是否促销品">
               <v-select
                 code="FLAG"
@@ -25,7 +25,7 @@
               ></v-select>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-item label="类型">
               <a-select v-model.trim="queryParam.ptype" :dropdownMatchSelectWidth="false" >
                 <a-select-option value="0">
@@ -43,7 +43,12 @@
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="出库仓库">
+              <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
           </a-col>
@@ -54,7 +59,7 @@
     <div class="table-operator">
       <a-button type="primary" :disabled="newLoading" class="button-info" @click="handlePlAdd">批量添加</a-button>
       <a-button type="danger" :disabled="newLoading" class="button-error" @click="handlePlCancel">批量取消</a-button>
-      <a-button type="default" :disabled="newLoading" @click="handleOneDispatch">有货一键下推</a-button>
+      <!-- <a-button type="default" :disabled="newLoading" @click="handleOneDispatch">有货一键下推</a-button> -->
     </div>
     <!-- alert -->
     <a-alert type="info" style="margin-bottom: 10px;" v-if="detailData">
@@ -128,10 +133,11 @@
 import { commonMixin } from '@/utils/mixin'
 import { salesDetailAllStockList } from '@/api/salesDetail'
 import { STable, VSelect } from '@/components'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 export default {
   name: 'QueryPart',
   mixins: [commonMixin],
-  components: { STable, VSelect },
+  components: { STable, VSelect, chooseWarehouse },
   props: {
     newLoading: Boolean
   },
@@ -156,7 +162,8 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        salesBillSn: ''
+        salesBillSn: '',
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
@@ -207,6 +214,7 @@ export default {
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '销售价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '可用库存', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -243,6 +251,7 @@ export default {
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
+      this.queryParam.warehouseSn = undefined
       this.productType = []
       this.$refs.table.refresh(true)
     },
@@ -308,7 +317,7 @@ export default {
         obj.push({
           'cancelQty': item.cancelNums,
           'salesBillDetailSn': item.salesBillDetailSn,
-          "salesBillSn": this.salesBillSn
+          'salesBillSn': this.salesBillSn
         })
       })
 

+ 16 - 8
src/views/salesReturnManagement/billOfLading/add.vue

@@ -111,7 +111,7 @@
             </a-col>
             <a-col :spna="24">
               <a-form-model-item label="退货仓库" :label-col="{span:2}" :wrapper-col="{span:20}" prop="warehouseSn">
-                <chooseWarehouse ref="warehouse" :disabled="$route.params.sn" v-model="form.warehouseSn" @change="handleWarehouse"></chooseWarehouse>
+                <chooseWarehouse ref="warehouse" @load="loadWarehouseVal" :isDefault="!$route.params.sn" v-model="form.warehouseSn" @change="handleWarehouse"></chooseWarehouse>
               </a-form-model-item>
             </a-col>
             <a-col :spna="24">
@@ -195,7 +195,7 @@
       :warehouseSn="form.warehouseSn"
       @cancel="closeModal"></selectXtModal>
     <!-- 选择审核人员 -->
-    <chooseDepartUserModal :showDefUser="false" :openModal="openDepartUserModal" @close="closeModal" @submit="handleSubmit"></chooseDepartUserModal>
+    <chooseDepartUserModal type="billOfLading" :showDefUser="true" :openModal="openDepartUserModal" @close="closeModal" @submit="handleSubmit"></chooseDepartUserModal>
   </div>
 </template>
 
@@ -267,14 +267,19 @@ export default {
     }
   },
   methods: {
+    loadWarehouseVal (con) {
+      this.$set(this.form, 'warehouseSn', con || undefined)
+    },
     // 选择退货仓库
     handleWarehouse (val) {
       this.form.warehouseSn = val
-      if (val) {
-        this.chooseData = []
-        if (this.salerReturnWsn && this.salerReturnWsn == val) {
-          const cd = this.$store.state.app.tempBillOfData
+      this.chooseData = []
+      if (this.salerReturnWsn && this.salerReturnWsn == val) {
+        const cd = this.$store.state.app.tempBillOfData
+        if (cd && this.$route.query.path == 'salerReturn') {
           this.chooseData.push(cd)
+        } else {
+          this.getReturnOrderList(this.salerReturnWsn)
         }
       }
     },
@@ -298,7 +303,7 @@ export default {
     },
     // 关联销售退货单
     getReturnOrderList (infoSn) {
-      pickUpDetailQueryList({ pickUpSn: this.$route.params.sn }).then(res => {
+      pickUpDetailQueryList({ pickUpSn: this.$route.params.sn, warehouseSn: infoSn }).then(res => {
         this.chooseData = []
         res.data.map(item => {
           this.chooseData.push(item.salesReturnBillEntity)
@@ -355,6 +360,9 @@ export default {
           form.attachmentList = _this.attachList
           form.pickUpSalesReturnList = this.getRtSnList()
           _this.spinning = true
+          if (this.$route.params.sn) {
+            delete form.warehouseName
+          }
           pickUpSave(form).then(res => {
             if (res.status == 200) {
               // 保存
@@ -425,11 +433,11 @@ export default {
     },
     pageInit () {
       this.resetForm()
-      console.log('----')
       //  编辑页
       if (this.$route.params.sn) {
         this.form.theme = ''
         this.getDetail()
+        this.salerReturnWsn = this.$route.params.wSn
         this.getReturnOrderList(this.$route.params.wSn)
       } else {
         this.chooseData = []

+ 194 - 0
src/views/salesReturnManagement/receiveCheck/chooseImportModal.vue

@@ -0,0 +1,194 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="确认导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="80%">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <p class="">可导入数据{{ loadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.allocateSn"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="unTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.errorDesc"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+        <template slot="errorMsg" slot-scope="text,record">
+          <a-popover placement="topRight">
+            <template slot="content">
+              <p v-for="d in record.importErrorMsgSet">{{ d }}</p>
+            </template>
+            <a-button type="link">
+              查看
+            </a-button>
+          </a-popover>
+        </template>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImport-submit"
+          size="large"
+          :class="unLoadData.length?'button-grey':'button-primary'"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImport-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { salesReturnDetailImportError } from '@/api/salesReturn.js'
+export default {
+  name: 'ChooseImportModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      nowColumns: [
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '申请退货数量', dataIndex: 'initialQtyText', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库实收数量', dataIndex: 'receiveQtyText', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货原因', dataIndex: 'returnReason', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+      ],
+      loadData: [],
+      nowUnColumns: [
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '申请退货数量', dataIndex: 'initialQtyText', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库实收数量', dataIndex: 'receiveQtyText', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货原因', dataIndex: 'returnReason', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '20%', align: 'center' }
+      ],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  methods: {
+    getData () {
+      const paramsData = JSON.parse(JSON.stringify(this.paramsData))
+      this.loadData = paramsData.rightList || []
+      this.unLoadData = paramsData.errorList || []
+      this.loadData.map((item, index) => {
+        item.no = index + 1
+      })
+      this.unLoadData.map((item, index) => {
+        item.no = index + 1
+        item.importErrorMsgSet = item.remarks.split(',')
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.unLoadData.length) {
+        this.$message.warning('有错误数据不可导入,请修改正确后再试!')
+      } else {
+        const data = this.paramsData.rightList
+        this.$emit('ok', data)
+        this.isShow = false
+      }
+    },
+    // 导出
+    handleError () {
+      const _this = this
+      if (_this.paramsData.errorList.length < 1) {
+        _this.$message.info('暂无可导出错误项~')
+        return
+      }
+      const rightList = _this.paramsData.rightList || []
+      const errorList = _this.paramsData.errorList || []
+      const exportData = errorList.concat(rightList)
+      _this.spinning = true
+      hdExportExcel(salesReturnDetailImportError, exportData, '收货导入产品错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.loadData = []
+        this.unLoadData = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseImport-modal{
+    .chooseImport-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 195 - 0
src/views/salesReturnManagement/receiveCheck/importGuideModal.vue

@@ -0,0 +1,195 @@
+<template>
+  <a-modal
+    centered
+    class="importGuide-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="导入产品"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="800">
+    <div class="importGuide-con">
+      <div class="explain-con">
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>1</span>准备导入
+          </div>
+          <ul>
+            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“申请退货数量”、“仓库实收数量”、“退货原因”的列,“产品编码”必填,其它列可自定义,不影响数据导入</li>
+            <li>
+              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+                <a-icon type="download" style="padding-right: 5px;" />下载导入模板
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>2</span>上传数据文件
+          </div>
+          <p>目前支持的文件类型*.xls,*.xlsx.</p>
+          <div style="overflow: hidden;padding-left: 23px;">
+            <Upload
+              id="importGuide-attachList"
+              ref="importUpload"
+              :maxNums="1"
+              fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+              uploadType="attach"
+              :action="attachAction"
+              :uploadParams="uploadParams"
+              upText="选择导入文件"
+              @remove="resetSearchForm"
+              @change="changeImport"></Upload>
+          </div>
+        </div>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="importGuide-nextStep"
+          size="large"
+          class="button-primary"
+          @click="handlerNextStep"
+          style="padding: 0 60px;">下一步</a-button>
+        <a-button
+          id="importGuide-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
+      </div>
+    </div>
+    <!-- 导入 -->
+    <chooseImportModal :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
+  </a-modal>
+</template>
+
+<script>
+import ChooseImportModal from './chooseImportModal.vue'
+import { Upload } from '@/components'
+export default {
+  name: 'ImportGuideModal',
+  components: { ChooseImportModal, Upload },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    params: {
+      type: Object,
+      default: null
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      openImportModal: false, //  导入
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/salesReturn/detail/importDetail',
+      paramsData: null,
+      uploadParams: {
+        savePathType: 'local',
+        salesReturnBillSn: this.params.salesReturnBillSn
+      },
+      filePath: location.protocol + '//' +location.host + '/templ/收货产品导入模板.xlsx'
+    }
+  },
+  methods: {
+    // 清空数据
+    resetSearchForm () {
+      this.$refs.importUpload.setFileList() //  清空导入文件
+      this.paramsData = null //  清空上传数据
+    },
+    // 下一步
+    handlerNextStep () {
+      if (this.paramsData) {
+        this.openImportModal = true
+      } else {
+        this.$message.warning('添加文件后再进行下一步操作!')
+      }
+    },
+    // 上传文件  change
+    changeImport (file) {
+      // console.log(file, JSON.parse(file))
+      if (file && JSON.parse(file).length > 0) {
+        this.paramsData = Object.assign({}, JSON.parse(file)[0] || null, this.params)
+      } else {
+        this.paramsData = null
+      }
+    },
+    // 导入
+    hanldeOk (obj) {
+      if (obj && obj.length > 0) {
+        this.$emit('ok', obj)
+        this.isShow = false
+      }
+    },
+    // 关闭
+    handleClose () {
+      this.openImportModal = false
+      this.isShow = false
+    },
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetSearchForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .importGuide-modal{
+    .importGuide-con{
+      .explain-con{
+        .explain-item{
+          margin-bottom: 10px;
+          .explain-tit{
+            font-weight: bold;
+            span{
+              display: inline-block;
+              width: 18px;
+              height: 18px;
+              line-height: 16px;
+              text-align: center;
+              margin-right: 5px;
+              border-radius: 50%;
+              border: 1px solid rgba(0, 0, 0, 0.3);
+            }
+          }
+          p{
+            margin: 8px 0;
+            padding-left: 23px;
+          }
+          ul{
+            list-style: none;
+            padding: 0;
+            padding-left: 23px;
+            margin: 0;
+            li{
+              line-height: 26px;
+            }
+          }
+        }
+        #importGuide-attachList{
+          width: 100%;
+        }
+      }
+      .btn-con{
+        margin: 10px 0 20px;
+        text-align: center;
+        .button-cancel{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 27 - 4
src/views/salesReturnManagement/receiveCheck/receiving.vue

@@ -22,6 +22,13 @@
           </a-form-item>
         </a-form>
         <div style="border-top:1px solid #eee;padding-top:10px;">
+          <a-button
+            type="primary"
+            ghost
+            :loading="loading"
+            @click="openGuideModal=true"
+            style="margin-right:5px;"
+            >导入产品</a-button>
           <a-button type="primary" :loading="loading" class="button-info" @click="openModal = true">新增产品</a-button>
           <a-button type="primary" :loading="loading" class="button-error" @click="handlePlss">批量实收</a-button>
           <span v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys&&rowSelectionInfo.selectedRowKeys.length">已选{{ rowSelectionInfo.selectedRowKeys.length }}项</span>
@@ -109,6 +116,8 @@
       :buyerSn="$route.params.buyerSn"
       @close="openModal=false"
       @addProduct="addProduct"></chooseProductsModal>
+      <!-- 导入产品 -->
+      <importGuideModal :params="{salesReturnBillSn: $route.params.sn}" :openModal="openGuideModal" @close="openGuideModal=false" @ok="importOk" />
   </div>
 </template>
 
@@ -117,7 +126,8 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import chooseProductsModal from './chooseProductsModal.vue'
 import returnReason from '@/views/common/returnReason'
-import { salesReturnDetail, salesReturnReceive } from '@/api/salesReturn'
+import importGuideModal from './importGuideModal.vue'
+import { salesReturnDetail, salesReturnReceive, salesReturnDetailBatchByReceive } from '@/api/salesReturn'
 import {
   salesReturnDetailList, salesReturnDetailReceiveBatch, salesReturnDetailUpdateReceiveQty, salesReturnDetailUpdateReason, insertByReceive, deleteByReceiver
 } from '@/api/salesReturnDetail'
@@ -128,10 +138,12 @@ export default {
     STable,
     VSelect,
     chooseProductsModal,
-    returnReason
+    returnReason,
+    importGuideModal
   },
   data () {
     return {
+      openGuideModal: false,
       spinning: false,
       tableHeight: 0, // 表格高度
       orderSn: null,
@@ -179,12 +191,12 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '申请退货数量', dataIndex: 'initialQty', align: 'center', width: '10%', scopedSlots: { customRender: 'initialQty' } },
         { title: '仓库实收数量', dataIndex: 'receiveQty', align: 'center', width: '10%', scopedSlots: { customRender: 'receiveQty' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '退货单价', dataIndex: 'price', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货原因', dataIndex: 'returnReason', width: '20%', align: 'center', scopedSlots: { customRender: 'returnReason' } },
+        { title: '退货原因', dataIndex: 'returnReason', width: '25%', align: 'center', scopedSlots: { customRender: 'returnReason' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       return arr
@@ -199,6 +211,17 @@ export default {
     handleBack () {
       this.$router.push({ name: 'receiveCheckList' })
     },
+    // 确认导入明细
+    importOk(data){
+      this.spinning = true
+      salesReturnDetailBatchByReceive({detailList:data, salesReturnBillSn: this.orderSn}).then(res => {
+        if(res.status == 200){
+          this.resetSearchForm()
+          this.$message.info(res.message)
+        }
+        this.spinning = false
+      })
+    },
     // 添加产品
     addProduct (data) {
       const params = {

+ 0 - 0
src/views/financialManagement/returnConfirmation/detailModal.vue → src/views/salesReturnManagement/returnConfirmation/detailModal.vue


+ 0 - 0
src/views/financialManagement/returnConfirmation/list.vue → src/views/salesReturnManagement/returnConfirmation/list.vue


+ 13 - 10
src/views/salesReturnManagement/salesReturn/chooseCustomModal.vue

@@ -75,6 +75,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
+import debounce from 'lodash/debounce'
 import warehouse from '@/views/common/chooseWarehouse.js'
 import { dealerSubareaScopeList, dealerDetailBySn } from '@/api/dealer'
 import { getDefaultWarehouse } from '@/api/warehouse'
@@ -87,6 +88,8 @@ export default {
     show: [Boolean]
   },
   data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
     return {
       opened: this.show,
       spinning: false,
@@ -122,18 +125,18 @@ export default {
     }
   },
   methods: {
-    // 搜索经销商
-    fetchUser (value) {
-      console.log('fetching user', value)
+    fetchUser (dealerName) {
+      if (dealerName == '') return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.dealerData = []
       this.fetching = true
-      dealerSubareaScopeList({ nameLike: value.replace(/\s+/g, ''), pageNo: 1, pageSize: 20 }).then(res => {
-        if (res.status == 200) {
-          this.dealerData = res.data && res.data.list ? res.data.list : []
-          this.fetching = false
-        } else {
-          this.dealerData = []
-          this.fetching = false
+      dealerSubareaScopeList({ nameLike: dealerName.replace(/\s+/g, ''), pageNo: 1, pageSize: 20 }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
         }
+        this.dealerData = res.data && res.data.list ? res.data.list : []
+        this.fetching = false
       })
     },
     // 客户  change

+ 2 - 2
src/views/salesReturnManagement/salesReturn/importGuideModal.vue

@@ -15,8 +15,8 @@
             <span>1</span>准备导入
           </div>
           <ul>
-            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“数量”、“价格”、“退货原因”的列,且名称必须相同</li>
-            <li>2) 除了“产品编码”、“数量”、“价格”、“退货原因”四列,其他列可自定义,不影响数据导入</li>
+            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“数量”、“退货原因”的列,且名称必须相同</li>
+            <li>2) 除了“产品编码”、“数量”、“退货原因”四列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
           <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.111/ocs-admin',
+        // target: 'http://192.168.2.117/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,