ソースを参照

Merge branch 'develop_fencang' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into pre-release

lilei 2 年 前
コミット
a36e75f92a
100 ファイル変更1857 行追加795 行削除
  1. 1 1
      public/version.json
  2. 14 3
      src/api/checkWarehouse.js
  3. 3 2
      src/api/dealerRelation.js
  4. 12 1
      src/api/pickUp.js
  5. 9 1
      src/api/sales.js
  6. 32 2
      src/api/salesReturn.js
  7. 17 0
      src/api/warehouse.js
  8. 59 47
      src/config/router.config.js
  9. 3 1
      src/store/getters.js
  10. 12 10
      src/store/modules/app.js
  11. 8 0
      src/utils/mixin.js
  12. 25 8
      src/views/allocationManagement/matchSendOutOrder/list.vue
  13. 18 2
      src/views/allocationManagement/transferOut/basicInfoModal.vue
  14. 3 2
      src/views/allocationManagement/transferOut/detail.vue
  15. 8 6
      src/views/allocationManagement/transferOut/edit.vue
  16. 24 12
      src/views/allocationManagement/transferOut/list.vue
  17. 17 6
      src/views/allocationManagement/transferReturn/basicInfoModal.vue
  18. 1 0
      src/views/allocationManagement/transferReturn/detail.vue
  19. 27 7
      src/views/allocationManagement/transferReturn/edit.vue
  20. 38 18
      src/views/allocationManagement/transferReturn/editGrp.vue
  21. 23 19
      src/views/allocationManagement/transferReturn/list.vue
  22. 35 17
      src/views/allocationManagement/transfersPrint/list.vue
  23. 3 0
      src/views/allocationManagement/transfersPrint/recordModal.vue
  24. 99 10
      src/views/basicData/warehouse/editModal.vue
  25. 3 2
      src/views/basicData/warehouse/list.vue
  26. 105 0
      src/views/common/chooseWarehouse.js
  27. 50 34
      src/views/dataExport/exportCheck/list.vue
  28. 46 5
      src/views/dealerManagement/businessOwnerSettings/addModal.vue
  29. 31 1
      src/views/dealerManagement/businessOwnerSettings/list.vue
  30. 0 3
      src/views/dealerManagement/businessOwnerSettings/settingsIndex.vue
  31. 3 0
      src/views/dealerManagement/merchantInfoManagement/detailModal.vue
  32. 12 2
      src/views/dealerManagement/merchantInfoManagement/edit.vue
  33. 8 6
      src/views/dealerManagement/rebateSettings/associateModal.vue
  34. 32 6
      src/views/dealerManagement/rebateSettings/list.vue
  35. 22 2
      src/views/dealerManagement/rebateSettings/queryChild.vue
  36. 11 2
      src/views/financialManagement/allocateReturnConfirmation/list.vue
  37. 61 51
      src/views/financialManagement/collectionDetailStatic/list.vue
  38. 14 4
      src/views/financialManagement/inventoryConfirmation/list.vue
  39. 11 2
      src/views/financialManagement/returnConfirmation/list.vue
  40. 23 11
      src/views/financialManagement/warehousingConfirmation/list.vue
  41. 24 1
      src/views/inventoryManagement/inventoryCheck/addModal.vue
  42. 7 8
      src/views/inventoryManagement/inventoryCheck/detail.vue
  43. 32 20
      src/views/inventoryManagement/inventoryCheck/list.vue
  44. 8 7
      src/views/inventoryManagement/inventoryQuery/detailModal.vue
  45. 20 7
      src/views/inventoryManagement/inventoryQuery/list.vue
  46. 12 32
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  47. 40 19
      src/views/inventoryManagement/inventoryWarning/list.vue
  48. 2 3
      src/views/inventoryManagement/makeInventory/check.vue
  49. 35 12
      src/views/inventoryManagement/makeInventory/list.vue
  50. 2 3
      src/views/inventoryManagement/supervisionDisk/check.vue
  51. 38 15
      src/views/inventoryManagement/supervisionDisk/list.vue
  52. 34 12
      src/views/productManagement/shelfNoManage/list.vue
  53. 15 2
      src/views/purchasingManagement/bulkWarehousingOrder/basicInfoModal.vue
  54. 1 0
      src/views/purchasingManagement/bulkWarehousingOrder/detailModal.vue
  55. 2 1
      src/views/purchasingManagement/bulkWarehousingOrder/edit.vue
  56. 26 8
      src/views/purchasingManagement/bulkWarehousingOrder/list.vue
  57. 36 63
      src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue
  58. 18 2
      src/views/purchasingManagement/purchaseReturn/addModal.vue
  59. 1 0
      src/views/purchasingManagement/purchaseReturn/detailModal.vue
  60. 24 8
      src/views/purchasingManagement/purchaseReturn/list.vue
  61. 5 4
      src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue
  62. 4 1
      src/views/purchasingManagement/purchaseReturn/queryPart.vue
  63. 4 3
      src/views/reportData/actualSalesReport/list.vue
  64. 17 10
      src/views/reportData/allocationDetails/list.vue
  65. 1 1
      src/views/reportData/billingBackReport/list.vue
  66. 1 1
      src/views/reportData/billingOrderReport/list.vue
  67. 4 3
      src/views/reportData/billingReturnReport/list.vue
  68. 1 1
      src/views/reportData/regionTypeSalesReport/list.vue
  69. 4 3
      src/views/reportData/returnGoodsPresentation/list.vue
  70. 4 3
      src/views/reportData/returnSlipReport/list.vue
  71. 3 3
      src/views/reportData/salesAmountReport/list.vue
  72. 19 10
      src/views/reportData/salesDetails/list.vue
  73. 4 3
      src/views/reportData/salesPresentation/list.vue
  74. 10 1
      src/views/reportData/salesReturnDetailReport/list.vue
  75. 4 3
      src/views/reportData/salesReturnReport/list.vue
  76. 2 2
      src/views/reportData/salesReturnsReport/list.vue
  77. 4 3
      src/views/reportData/salesSlipReport/list.vue
  78. 12 3
      src/views/reportData/urchaseDetailReturn/detailList.vue
  79. 20 9
      src/views/reportData/warehousingOrder/list.vue
  80. 27 18
      src/views/reportData/warehousingOrderDetail/list.vue
  81. 12 3
      src/views/salesManagement/backorder/list.vue
  82. 25 11
      src/views/salesManagement/examineVerify/list.vue
  83. 35 20
      src/views/salesManagement/matchSendOutOrder/list.vue
  84. 22 7
      src/views/salesManagement/outboundOrder/list.vue
  85. 42 21
      src/views/salesManagement/outboundOrder/selectGlOrderModal.vue
  86. 19 9
      src/views/salesManagement/pushOrderManagement/list.vue
  87. 40 25
      src/views/salesManagement/receiptPrint/list.vue
  88. 14 3
      src/views/salesManagement/salesQuery/chooseCustomModal.vue
  89. 9 8
      src/views/salesManagement/salesQuery/detail.vue
  90. 36 13
      src/views/salesManagement/salesQuery/edit.vue
  91. 18 9
      src/views/salesManagement/salesQuery/list.vue
  92. 11 5
      src/views/salesManagement/salesQuery/queryPart.vue
  93. 22 7
      src/views/salesManagement/sendOutOrder/list.vue
  94. 15 6
      src/views/salesManagement/shortageStatisticsC/list.vue
  95. 15 6
      src/views/salesManagement/shortageStatisticsP/list.vue
  96. 29 14
      src/views/salesManagement/stockPrint/list.vue
  97. 25 7
      src/views/salesReturnManagement/billOfLading/add.vue
  98. 5 0
      src/views/salesReturnManagement/billOfLading/detail.vue
  99. 7 7
      src/views/salesReturnManagement/billOfLading/list.vue
  100. 6 0
      src/views/salesReturnManagement/billOfLading/selectXtModal.vue

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.15",
+    "version": "2.2.19",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 14 - 3
src/api/checkWarehouse.js

@@ -11,6 +11,17 @@ export const checkWarehouseList = (params) => {
     method: 'post'
   })
 }
+//  盘点确认  列表  分页
+export const verifyQueryPage = (params) => {
+  const url = `/checkWarehouse/verifyQueryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
 //  库存盘点  保存
 export const checkWarehouseSave = (params) => {
   return axios({
@@ -136,13 +147,13 @@ export const checkWarehouseDetailFinanceList = (params) => {
 export const checkWarehouseExcelList = (params) => {
   return axios({
     url: `/checkWarehouse/excelList`,
-    method: 'get'
+    data: params,
+    method: 'post'
   })
 }
 // 数据导出  导出盘点   盘点列表  导出
 export const checkWarehouseExport = params => {
-  const url = `/checkWarehouse/excel/${params.checkWarehouseSn}`
-  delete params.checkWarehouseSn
+  const url = `/checkWarehouse/excel`
   return axios.request({
     url: url,
     data: params,

+ 3 - 2
src/api/dealerRelation.js

@@ -51,8 +51,9 @@ export const unbindRelation = (params) => {
 // 更新经销商返利信息
 export const updateRebate = (params) => {
   return axios({
-    url: `/dealerRelation/updateRebate/${params.dealerSn}/${params.rebateDealerSn}`,
-    method: 'get'
+    url: `/dealerRelation/updateRebate`,
+    data: params,
+    method: 'post'
   })
 }
 

+ 12 - 1
src/api/pickUp.js

@@ -11,6 +11,17 @@ export const pickUpQueryPage = (params) => {
     method: 'post'
   })
 }
+//  仓库提货列表  分页
+export const warehouseQueryPage = (params) => {
+  const url = `/pickUp/warehouseQueryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
 // 提货
 export const pickUpFinish = (params) => {
   return axios({
@@ -102,4 +113,4 @@ export const pickUpDetailPrint = params => {
     method: 'post',
     responseType: 'blob'
   })
-}
+}

+ 9 - 1
src/api/sales.js

@@ -40,7 +40,7 @@ export const salesDetailByNo = (params) => {
     method: 'get'
   })
 }
-//  销售 新增或编辑
+//  销售 新增
 export const salesSave = (params) => {
   return axios({
     url: '/sales/insert',
@@ -48,6 +48,14 @@ export const salesSave = (params) => {
     method: 'post'
   })
 }
+// 销售 编辑
+export const salesModify = (params) => {
+  return axios({
+    url: '/sales/modifyWarehouse',
+    data: params,
+    method: 'post'
+  })
+}
 
 //  销售 打印
 export const salesPrint = (params) => {

+ 32 - 2
src/api/salesReturn.js

@@ -49,7 +49,14 @@ export const salesReturnInsert = (params) => {
     method: 'post'
   })
 }
-
+// 修改销售退货单基本信息
+export const salesReturnModify = (params) => {
+  return axios({
+    url: '/salesReturn/modify',
+    data: params,
+    method: 'post'
+  })
+}
 // 销售退货单付款
 export const salesReturnPay = (params) => {
   return axios({
@@ -89,6 +96,17 @@ export const salesReturnList = (params) => {
     method: 'post'
   })
 }
+//  收货品检 分页查询产品
+export const takeQueryPage = (params) => {
+  const url = `/salesReturn/takeQueryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
 // 销售退货 统计
 export const salesReturnQueryCount = (params) => {
   const url = `/salesReturn/queryCount`
@@ -134,6 +152,18 @@ export const salesQueryByReturn = (params) => {
   })
 }
 
+// 可选产品列表
+export const queryDealerProductPage = (params) => {
+  const url = `/product/queryDealerPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
 // 退货确认  列表  分页
 export const salesReturnFinancialList = (params) => {
   const url = `/salesReturn/queryPageByFinancial/${params.pageNo}/${params.pageSize}`
@@ -157,7 +187,7 @@ export const salesReturnFinancialDetailList = (params) => {
   })
 }
 
-//销售退货 客服确认
+// 销售退货 客服确认
 export const customerServiceConfirm = (params) => {
   return axios({
     url: `/salesReturn/customerServiceConfirm/${params.salesReturnBillSn}`,

+ 17 - 0
src/api/warehouse.js

@@ -11,6 +11,23 @@ export const warehouseList = (params) => {
     method: 'post'
   })
 }
+
+// 获取默认仓库
+export const getDefaultWarehouse = (params) => {
+  return axios({
+    url: '/warehouse/getDefaultWithExt',
+    data: params,
+    method: 'get'
+  })
+}
+//  仓库列表  无分页 有权限
+export const queryAuthWarehouse = (params) => {
+  return axios({
+    url: '/bizuser/queryAuthWarehouse',
+    data: params,
+    method: 'get'
+  })
+}
 //  仓库列表  无分页
 export const warehouseAllList = (params) => {
   const url = '/warehouse/queryList'

+ 59 - 47
src/config/router.config.js

@@ -165,7 +165,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'add/:sn',
+                path: 'add/:sn/:wSn',
                 name: 'salesAdd',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/edit.vue'),
                 meta: {
@@ -176,7 +176,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:sn',
+                path: 'edit/:sn/:wSn',
                 name: 'salesEdit',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/edit.vue'),
                 meta: {
@@ -1152,7 +1152,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'warehouseDetail/:sn',
+                path: 'warehouseDetail/:sn/:warehouseSn',
                 name: 'inventoryQueryWarehouseDetail',
                 component: () => import(/* webpackChunkName: "inventoryManagement" */ '@/views/inventoryManagement/inventoryQuery/warehouseDetail.vue'),
                 meta: {
@@ -2288,6 +2288,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/productRebateReport/index',
+            redirect: '/productRebateReport/index/list',
+            name: 'productRebateReportList',
+            component: BlankLayout,
+            meta: {
+              title: '产品返利明细表',
+              icon: 'profile',
+              permission: 'M_productRebateReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'productRebateReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/productRebateReport/index.vue'),
+                meta: {
+                  title: '产品返利明细表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_productRebateReportList'
+                }
+              }
+            ]
           }
           // {
           //   path: '/reportData/allCountryCostReport',
@@ -2316,44 +2341,6 @@ export const asyncRouterMap = [
           // }
         ]
       },
-      // 产品返利明细表
-      {
-        path: '/productRebateReport',
-        redirect: '/productRebateReport/index',
-        component: PageView,
-        meta: {
-          title: '产品返利表',
-          icon: 'profile',
-          permission: 'M_productRebateReport'
-        },
-        children: [
-          {
-            path: '/productRebateReport/index',
-            redirect: '/productRebateReport/index/list',
-            name: 'productRebateReportList',
-            component: BlankLayout,
-            meta: {
-              title: '产品返利明细表',
-              icon: 'profile',
-              permission: 'M_productRebateReportList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'productRebateReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/productRebateReport/index.vue'),
-                meta: {
-                  title: '产品返利明细表',
-                  icon: 'profile',
-                  hidden: true,
-                  permission: 'M_productRebateReportList'
-                }
-              }
-            ]
-          }
-        ]
-      },
       // 数据导出
       {
         path: '/dataExport',
@@ -2878,7 +2865,7 @@ export const asyncRouterMap = [
             name: 'businessOwnerSettings',
             component: BlankLayout,
             meta: {
-              title: '业务负责人配置',
+              title: '数据权限配置',
               icon: 'stock',
               permission: 'M_businessOwnerSettings'
             },
@@ -2889,7 +2876,7 @@ export const asyncRouterMap = [
                 name: 'businessOwnerSettingsList',
                 component: () => import(/* webpackChunkName: "dealerManagement" */ '@/views/dealerManagement/businessOwnerSettings/list.vue'),
                 meta: {
-                  title: '业务负责人配置列表',
+                  title: '数据权限配置列表',
                   icon: 'stock',
                   hidden: true,
                   permission: 'M_businessOwnerSettingsList'
@@ -3470,8 +3457,8 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: 'ERP数据同步记录',
-              icon: 'sketch'
-              // permission: 'M_erpMessageList'
+              icon: 'sketch',
+              permission: 'M_erpMessageList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -3482,8 +3469,33 @@ export const asyncRouterMap = [
                 meta: {
                   title: 'ERP数据同步列表',
                   icon: 'sketch',
-                  hidden: true
-                  // permission: 'M_erpMessageList'
+                  hidden: true,
+                  permission: 'M_erpMessageList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/setting/checkDingTask',
+            redirect: '/setting/checkDingTask/list',
+            name: 'checkDingTask',
+            component: BlankLayout,
+            meta: {
+              title: '钉钉审批',
+              icon: 'sketch',
+              permission: 'M_dingAuditUpdate'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'M_dingAuditUpdate',
+                component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/checkDingTask/list.vue'),
+                meta: {
+                  title: '钉钉审批',
+                  icon: 'sketch',
+                  hidden: true,
+                  permission: 'M_dingAuditUpdate'
                 }
               }
             ]

+ 3 - 1
src/store/getters.js

@@ -22,7 +22,9 @@ const getters = {
   echartsAutoTime: state => state.setting.echartsAutoTime,
   authMenusList: state => state.app.authMenusList,
   priceAuthOptions: state => state.app.priceAuthOptions,
-  curActionPermission: state => state.app.curActionPermission
+  curActionPermission: state => state.app.curActionPermission,
+  isWarehouse: state => state.app.isWarehouse,
+  defWarehouse: state => state.app.defWarehouse
 }
 
 export default getters

+ 12 - 10
src/store/modules/app.js

@@ -30,17 +30,19 @@ const app = {
     isNewTab: false,
     isNewSubTab: false,
     updateList: false,
-    winHeight: 0 ,//  窗口高度
+    winHeight: 0, //  窗口高度
     loadingStatus: false,
     closeTabPages: [], // 已关闭的页面
     employeeList: [], // 申请人列表
     returnReason: [], // 申请退货原因列表
     tempBillOfData: null, // 临时存储收货单数据
     authMenusList: [], // 权限菜单数据
-    priceAuthOptions:[], // 价格权限选项
+    priceAuthOptions: [], // 价格权限选项
     curActionPermission: '', // 当前激活状态的权限码
     showPdfPrintView: false, // pdf 打印预览
-    pdfUrl: ''
+    pdfUrl: '',
+    defWarehouse: null, // 默认仓库
+    isWarehouse: false// 仓库管理权限
   },
   mutations: {
     SET_SIDEBAR_TYPE: (state, type) => {
@@ -97,10 +99,10 @@ const app = {
     SET_loadingStatus: (state, val) => {
       state.loadingStatus = val
     },
-    SET_employeeList:(state, val) => {
+    SET_employeeList: (state, val) => {
       state.employeeList = val
     },
-    SET_returnReason:(state, val) => {
+    SET_returnReason: (state, val) => {
       state.returnReason = val
     },
     SET_showPdfPrint: (state, val) => {
@@ -108,7 +110,7 @@ const app = {
     },
     SET_PdfUrl: (state, val) => {
       state.pdfUrl = val
-    },
+    }
   },
   actions: {
     setSidebar ({ commit }, type) {
@@ -153,7 +155,7 @@ const app = {
     SetWinHeight ({ commit }, val) {
       commit('SET_WIN_HEIGHT', val)
     },
-    GetEmployeeList({ commit }, val) {
+    GetEmployeeList ({ commit }, val) {
       employeeQueryList({}).then(res => {
         if (res.status == 200) {
           commit('SET_employeeList', res.data)
@@ -162,7 +164,7 @@ const app = {
         }
       })
     },
-    getReturnReasonData({ commit }, code) {
+    getReturnReasonData ({ commit }, code) {
       getLookUpData({
         pageNo: 1,
         pageSize: 1000,
@@ -171,11 +173,11 @@ const app = {
       }).then(res => {
         if (res.status == 200) {
           commit('SET_returnReason', res.data.list)
-        }else{
+        } else {
           commit('SET_returnReason', [])
         }
       })
-    },
+    }
   }
 }
 

+ 8 - 0
src/utils/mixin.js

@@ -83,6 +83,14 @@ const commonMixin = {
       toThousands
     }
   },
+  computed:{
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
+    defWarehouse () {
+      return this.$store.state.app.defWarehouse
+    }
+  },
   watch: {
     '$store.state.app.loadingStatus': function (a, b) {
       if (!a) {

+ 25 - 8
src/views/allocationManagement/matchSendOutOrder/list.vue

@@ -21,6 +21,16 @@
               </a-form-item>
             </a-col>
             <template v-if="advanced">
+              <a-col :md="4" :sm="24" v-show="isShowWarehouse">
+                <a-form-item label="调出仓库">
+                  <warehouse
+                    v-model="queryParam.warehouseSn"
+                    isPermission
+                    id="allocateBillList-warehouseSn"
+                    placeholder="请选择调出仓库"
+                  />
+                </a-form-item>
+              </a-col>
               <a-col :md="4" :sm="24">
                 <a-form-item label="业务状态">
                   <v-select
@@ -33,7 +43,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-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
                 </a-form-item>
@@ -114,11 +124,12 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import dealerSearchList from '@/views/common/dealerSearchList.vue'
 import allocationDetailModal from '@/views/allocationManagement/transferOut/detail.vue'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { allocateBillList, allocateBillCheck } from '@/api/allocateBill'
 export default {
   name: 'MatchSendOutOrderAllocationList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, dealerSearchList, commonModal, allocationDetailModal },
+  components: { STable, VSelect, rangeDate, dealerSearchList, commonModal, allocationDetailModal, warehouse },
   data () {
     return {
       spinning: false,
@@ -134,6 +145,7 @@ export default {
         targetName: '', //  调往对象
         state: undefined, //  业务状态
         allocateNo: '', //  调拨单号
+        warehouseSn: undefined,
         receiverSn: undefined,
         checkStatus: undefined,
         printState: undefined
@@ -169,20 +181,24 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
+        { 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: '10%' },
-        { title: '调往对象', dataIndex: 'targetName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '9%' },
+        { title: '调往对象', dataIndex: 'targetName', width: '9%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '发货说明', dataIndex: 'explainInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { 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 },
         { title: '总数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '对单人员', dataIndex: 'checkPersonName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '对单时间', dataIndex: 'checkDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
+      if(this.isShowWarehouse){
+        arr.splice(4,0,{ title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },)
+      }
       return arr
     }
   },
@@ -211,6 +227,7 @@ export default {
       this.queryParam.allocateNo = ''
       this.queryParam.receiverSn = ''
       this.queryParam.receiverName = ''
+      this.queryParam.warehouseSn = undefined
       this.queryParam.checkStatus = undefined
       this.$refs.table.refresh(true)
       this.$refs.receiverSn.resetForm()

+ 18 - 2
src/views/allocationManagement/transferOut/basicInfoModal.vue

@@ -45,6 +45,15 @@
               <a-input v-else v-model="form.targetName" placeholder="请输入调往对象名称(最多30个字符)" :maxLength="30"></a-input>
             </a-form-model-item>
           </a-col>
+          <a-col :md="12" :sm="24" v-if="!isEdit">
+            <a-form-model-item label="调出仓库" prop="warehouseSn">
+              <warehouse
+                v-model="form.warehouseSn"
+                id="allocateBill-basicInfo-warehouseSn"
+                placeholder="请选择调出仓库"
+              />
+            </a-form-model-item>
+          </a-col>
           <a-col :md="12" :sm="24">
             <a-form-model-item label="费用/调拨类型" prop="costTypeSn">
               <AllocateType id="allocateBill-basicInfo-allocateTypeSn" v-model="allocateTypeVal" placeholder="请选择费用/调拨类型" @change="allocateTypeChange"></AllocateType>
@@ -111,11 +120,12 @@ import { getLookUpData } from '@/api/data'
 import ProductBrand from '@/views/common/productBrand.js'
 import productTypeAll from '@/views/common/productTypeAll.js'
 import AllocateType from '@/views/common/allocateType.js'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import department from '@/views/expenseManagement/expenseReimbursement/department.js'
 export default {
   name: 'TransferOutBasicInfoModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, ProductBrand, productTypeAll, AllocateType, department },
+  components: { VSelect, Upload, ProductBrand, productTypeAll, AllocateType, department, warehouse },
   props: {
     openModal: {
       //  弹框显示状态
@@ -143,6 +153,7 @@ export default {
         costTypeSn: '',
         allocateTypeSn: '',
         allocateSortSn: '',
+        warehouseSn: undefined, // 仓库
         productBrandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
@@ -157,6 +168,7 @@ export default {
         targetType: [{ required: true, message: '请选择调往对象', trigger: 'change' }],
         targetSn: [{ required: true, message: '请选择调往对象名称', trigger: 'change' }],
         costTypeSn: [{ required: true, message: '请选择费用/调拨类型', trigger: 'change' }],
+        warehouseSn: [{ required: true, message: '请选择调出仓库', trigger: 'change' }],
         targetName: [{ required: true, message: '请输入调往对象名称', trigger: 'blur' }]
       },
       fetching: false,
@@ -237,10 +249,12 @@ export default {
         }
       })
     },
-    // 调往对象名称  change
+    // 调往对象名称经销商  change
     handleChange (value) {
       const ind = this.dealerData.findIndex(item => item.dealerSn == value)
+      console.log(this.dealerData[ind])
       this.form.targetName = this.dealerData[ind].dealerName
+      this.form.warehouseSn = this.dealerData[ind].defaultWarehouseSn
     },
     //  保存
     handleSave () {
@@ -272,6 +286,7 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.form.targetSn = undefined
       this.form.targetName = ''
+      this.form.warehouseSn = undefined
       this.form.targetType = e.target.value
     },
     // 调往对象类型
@@ -312,6 +327,7 @@ export default {
           costTypeSn: '',
           allocateTypeSn: '',
           allocateSortSn: '',
+          warehouseSn: undefined,
           productBrandSn: undefined, //  产品品牌
           productTypeSn1: '', //  产品一级分类
           productTypeSn2: '', //  产品二级分类

+ 3 - 2
src/views/allocationManagement/transferOut/detail.vue

@@ -53,8 +53,9 @@
       <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
-            <a-descriptions :column="3">
+            <a-descriptions :column="4">
               <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调出仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="发货编号">{{ (basicInfoData&&basicInfoData.sendNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="收货客户名称">{{ (basicInfoData&&basicInfoData.receiverName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
@@ -85,7 +86,7 @@
                 <span v-else>--</span>
               </a-descriptions-item>
               <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="附件" :span="4">
+              <a-descriptions-item label="附件" :span="3">
                 <div v-if="basicInfoData&&basicInfoData.attachmentList&&basicInfoData.attachmentList.length">
                   <a
                     target="_blank"

+ 8 - 6
src/views/allocationManagement/transferOut/edit.vue

@@ -46,8 +46,9 @@
       <a-card size="small" :bordered="false" v-if="basicInfoData" class="allocateBillEdit-cont">
         <a-collapse :activeKey="['0']">
           <a-collapse-panel key="0" header="基础信息">
-            <a-descriptions :column="3">
+            <a-descriptions :column="4">
               <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调出仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="发货编号">{{ (basicInfoData&&basicInfoData.sendNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="收货客户名称">{{ (basicInfoData&&basicInfoData.receiverName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
@@ -55,7 +56,7 @@
               <a-descriptions-item label="打印状态">{{ (basicInfoData&&basicInfoData.printStateDictValue) || '--' }}</a-descriptions-item>
             </a-descriptions>
             <a-divider>以下信息可修改,请点击<span style="color: dodgerblue;font-size: 14px;cursor: pointer;" @click="editRemark = true" ><a-icon type="form" title="编辑基础信息" />编辑</span></a-divider>
-            <a-descriptions :column="3">
+            <a-descriptions :column="4">
               <a-descriptions-item label="费用类型">
                 {{ (basicInfoData&&basicInfoData.costTypeName) || '--' }}
               </a-descriptions-item>
@@ -80,7 +81,7 @@
                 <span v-if="basicInfoData&&(basicInfoData.promoStartDate || basicInfoData.promoEndDate)">{{ (basicInfoData&&basicInfoData.promoStartDate) || '--' }} ~ {{ (basicInfoData&&basicInfoData.promoEndDate) || '--' }}</span>
                 <span v-else>--</span>
               </a-descriptions-item>
-              <a-descriptions-item label="备注">
+              <a-descriptions-item label="备注" :span="3">
                 {{ (basicInfoData&&basicInfoData.remark||'--') }}
               </a-descriptions-item>
               <a-descriptions-item label="附件" :span="4">
@@ -141,6 +142,7 @@
               :columns="columns"
               :customRow="handleClickRow"
               :data="loadData"
+              :defaultLoadData="false"
               :scroll="{ y: 300 }"
               bordered>
               <!-- 调出数量 -->
@@ -382,7 +384,8 @@ export default {
       loadData: parameter => {
         this.disabled = true
         const dealerLevel = this.$route.params.dealerLevel == 'OTHER' ? undefined : this.$route.params.dealerLevel
-        return queryStockProductPage(Object.assign(parameter, this.queryParam, { zeroQtyFlag: '0', dealerLevel: dealerLevel })).then(res => {
+        const warehouseSn = this.basicInfoData.warehouseSn
+        return queryStockProductPage(Object.assign(parameter, this.queryParam, { zeroQtyFlag: '0', dealerLevel: dealerLevel, warehouseSn: warehouseSn })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -675,6 +678,7 @@ export default {
       allocateBillDetail({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
+          this.resetSearchForm(0)
         } else {
           this.basicInfoData = null
         }
@@ -782,8 +786,6 @@ export default {
     pageInit () {
       this.getDepartmentList()
       this.getDetail()
-      // this.resetSearchForm(1)
-      // this.chooseResetSearchForm(1)
     }
   },
   mounted () {

+ 24 - 12
src/views/allocationManagement/transferOut/list.vue

@@ -26,7 +26,7 @@
                   <dealerSearchList ref="receiverSn" @change="custChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="业务状态">
                   <v-select
                     v-model="queryParam.state"
@@ -38,12 +38,21 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="调拨单号">
                   <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="调出仓库">
+                  <warehouse
+                    v-model="queryParam.warehouseSn"
+                    id="allocateBillList-warehouseSn"
+                    placeholder="请选择调出仓库"
+                  />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
                 <a-form-item label="打印状态">
                   <v-select
                     v-model="queryParam.printState"
@@ -55,7 +64,7 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="对单状态">
                   <v-select
                     v-model="queryParam.checkStatus"
@@ -187,6 +196,7 @@ import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import auditModal from '@/views/common/auditModal.vue'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import dealerSearchList from '@/views/common/dealerSearchList.vue'
 import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport, allocateBillAblePrint } from '@/api/allocateBill'
 import AllocateType from '@/views/common/allocateType.js'
@@ -195,7 +205,7 @@ import printModal from './printStatusModal.vue'
 export default {
   name: 'TransferOutList',
   mixins: [commonMixin],
-  components: { STable, VSelect, basicInfoModal, printModal, rangeDate, auditModal, AllocateType, dealerSearchList },
+  components: { STable, VSelect, basicInfoModal, printModal, rangeDate, auditModal, AllocateType, dealerSearchList, warehouse },
   data () {
     return {
       spinning: false,
@@ -217,7 +227,8 @@ export default {
         allocateNo: '', //  调拨单号
         receiverSn: undefined,
         checkStatus: undefined,
-        printState: undefined
+        printState: undefined,
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -226,7 +237,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
+        return allocateBillList(Object.assign(parameter, this.queryParam, {authWarehouseFlag: 0})).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -256,21 +267,21 @@ 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: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象', dataIndex: 'targetName', width: '9%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { 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: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { 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 },
         { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '总售价', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: '6%', align: 'center', 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: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印状态', scopedSlots: { customRender: 'printStateWord' }, width: '6%', align: 'center' },
         { title: '打印次数', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('M_transferOutList_costPrice')) { //  成本价权限
         arr.splice(9, 0, { title: '总成本', dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
@@ -323,6 +334,7 @@ export default {
       this.queryParam.allocateNo = ''
       this.queryParam.receiverName = ''
       this.queryParam.receiverSn = undefined
+      this.queryParam.warehouseSn = undefined
       this.allocateTypeVal = []
       this.$refs.receiverSn.resetForm()
       this.$refs.table.refresh(true)

+ 17 - 6
src/views/allocationManagement/transferReturn/basicInfoModal.vue

@@ -58,6 +58,13 @@
             allowClear
             placeholder="请选择"></v-select>
         </a-form-model-item>
+        <a-form-model-item label="调入仓库" prop="warehouseSn">
+          <warehouse
+            v-model="form.warehouseSn"
+            id="allocateBill-basicInfo-warehouseSn"
+            placeholder="请选择调入仓库"
+          />
+        </a-form-model-item>
         <a-form-model-item label="备注" prop="remark">
           <a-textarea id="allocateBill-basicInfo-remark" :maxLength="120" v-model="form.remarks" placeholder="请输入备注(最多120个字符)" allowClear />
         </a-form-model-item>
@@ -76,11 +83,12 @@ import debounce from 'lodash/debounce'
 import { VSelect } from '@/components'
 import { allocateReturnSave, allocateReturnQueryBySn } from '@/api/allocateReturn'
 import department from '@/views/expenseManagement/expenseReimbursement/department.js'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { dealerSubareaScopeList } from '@/api/dealer'
 import AllocateType from '@/views/common/allocateType.js'
 export default {
   name: 'TransferOutBasicInfoModal',
-  components: { VSelect, AllocateType, department },
+  components: { VSelect, AllocateType, department, warehouse },
   mixins: [commonMixin],
   props: {
     openModal: {
@@ -106,6 +114,7 @@ export default {
         costTypeSn: undefined,
         allocateSortSn: undefined,
         allocateReturnTypeSn: undefined,
+        warehouseSn: undefined,
         grabFlag: '1',
         remarks: ''
       },
@@ -114,7 +123,8 @@ export default {
         targetSn: [{ required: true, message: '请选择调往对象名称', trigger: 'change' }],
         targetName: [{ required: true, message: '请输入调往对象名称', trigger: 'blur' }],
         costTypeSn: [{ required: true, message: '请选择费用/调拨退货类型', trigger: 'change' }],
-        grabFlag: [{ required: true, message: '请选择是否抓单', trigger: 'change' }]
+        grabFlag: [{ required: true, message: '请选择是否抓单', trigger: 'change' }],
+        warehouseSn: [{ required: true, message: '请选择调入仓库', trigger: 'change' }]
       },
       fetching: false,
       dealerData: [] //  经销商  下拉数据
@@ -148,6 +158,7 @@ export default {
     handleChange (value) {
       const ind = this.dealerData.findIndex(item => item.dealerSn == value)
       this.form.targetName = this.dealerData[ind].dealerName
+      this.form.warehouseSn = this.dealerData[ind].defaultWarehouseSn
     },
     departementChange (v, row) {
        console.log(v,row)
@@ -203,13 +214,12 @@ export default {
     // 调往对象  change
     targetTypeChange (val) {
       console.log(val)
-      this.$refs.ruleForm.resetFields()
+      // this.$refs.ruleForm.resetFields()
       this.form.targetSn = undefined
       this.form.targetName = ''
+      this.form.warehouse = undefined
       this.form.targetType = val
-      if (val !== 'DEALER') {
-        this.form.grabFlag = '0'
-      }
+      this.form.grabFlag = val != 'DEALER' ? '0' : '1'
     },
     resetForm () {
       this.$refs.ruleForm.resetFields()
@@ -220,6 +230,7 @@ export default {
         costTypeSn: undefined,
         allocateTypeSn: undefined,
         allocateReturnTypeSn: undefined,
+        warehouse: undefined,
         grabFlag: '1',
         remarks: ''
       }

+ 1 - 0
src/views/allocationManagement/transferReturn/detail.vue

@@ -25,6 +25,7 @@
               <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调入仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="费用类型">
                 {{ (basicInfoData&&basicInfoData.costTypeName) || '--' }}
               </a-descriptions-item>

+ 27 - 7
src/views/allocationManagement/transferReturn/edit.vue

@@ -19,6 +19,17 @@
               <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调入仓库">
+                <!-- <warehouse
+                style="width:200px;"
+                :allowClear="false"
+                  v-model="basicInfoData.warehouseSn"
+                  @change="updateWarehouse"
+                  id="basicInfo-warehouseSn"
+                  placeholder="请选择调入仓库"
+                /> -->
+                {{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}
+              </a-descriptions-item>
               <a-descriptions-item label="费用/调拨退货类型">
                 <AllocateType
                   id="allocateEdit-allocateReturnTypeSn"
@@ -247,6 +258,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 // import ImportGuideModal from './importGuideModal.vue'
 import print from './print.vue'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { queryStockProductPage } from '@/api/stock'
 import AllocateType from '@/views/common/allocateType.js'
 import {
@@ -263,7 +275,7 @@ import {
 export default {
   name: 'TransferReturnEdit',
   mixins: [commonMixin],
-  components: { STable, VSelect, print, AllocateType },
+  components: { STable, VSelect, print, AllocateType, warehouse },
   data () {
     const _this = this
     return {
@@ -286,7 +298,8 @@ export default {
       loadData: parameter => {
         this.disabled = true
         const dealerLevel = this.$route.params.dealerLevel == 'OTHER' ? undefined : this.$route.params.dealerLevel
-        return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel })).then(res => {
+        const warehouseSn = this.basicInfoData.warehouseSn
+        return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn})).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -356,19 +369,24 @@ export default {
   },
   methods: {
     // 修改备注
-    handleEditRemark () {
+    handleEditRemark (flag) {
       const _this = this
       const params = _this.basicInfoData
       allocateReturnSave(params).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
-          _this.getDetail(true)
+          _this.getDetail(flag)
         } else {
           _this.spinning = false
         }
       })
       _this.editRemark = false
     },
+    // 修改仓库
+    updateWarehouse(warehouseSn){
+      this.basicInfoData.warehouseSn = warehouseSn
+      this.handleEditRemark(true)
+    },
     // 修改调拨类型
     changeAllocateType (val, opt) {
       console.log(val, opt, '------------')
@@ -390,7 +408,7 @@ export default {
           _this.handleEditRemark()
         },
         onCancel () {
-          _this.getDetail(true)
+          _this.getDetail(false)
         }
       })
     },
@@ -451,7 +469,7 @@ export default {
       this.spinning = true
       fun(params).then(res => {
         if (res.status == 200) {
-          this.getDetail(true)
+          this.getDetail(false)
           this.$message.success(res.message)
           if (isRefresh != 'noRefresh') {
             this.$refs.table.refresh()
@@ -524,6 +542,9 @@ export default {
           if (this.basicInfoData.costTypeSn) {
             this.allocateTypeVal = [this.basicInfoData.costTypeSn, this.basicInfoData.allocateSortSn, this.basicInfoData.allocateReturnTypeSn]
           }
+          if(flag){
+            this.$refs.table.refresh()
+          }
         } else {
           this.basicInfoData = null
         }
@@ -551,7 +572,6 @@ export default {
     // 刷新当前页面
     refashPage () {
       this.getDetail(true)
-      this.$refs.table.refresh()
       this.$refs.chooseTable.refresh()
     },
     pageInit () {

+ 38 - 18
src/views/allocationManagement/transferReturn/editGrp.vue

@@ -19,6 +19,17 @@
               <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调入仓库">
+                <!-- <warehouse
+                style="width:200px;"
+                :allowClear="false"
+                  v-model="basicInfoData.warehouseSn"
+                  @change="updateWarehouse"
+                  id="basicInfo-warehouseSn"
+                  placeholder="请选择调入仓库"
+                /> -->
+                {{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}
+              </a-descriptions-item>
               <a-descriptions-item label="费用/调拨退货类型">
                 <AllocateType
                   id="allocateEdit-allocateReturnTypeSn"
@@ -42,20 +53,28 @@
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" :forceRender="true" header="选择产品">
             <!-- 筛选条件 -->
-            <div class="table-page-search-wrapper">
+            <div class="table-page-search-wrapper" style="display:flex;align-items: center;">
+              <div style="margin-bottom: 10px;padding-right: 20px;">
+                <a-button
+                  type="primary"
+                  class="button-info"
+                  id="salesEdit-plDel-btn"
+                  @click="handleBatchAdd">批量添加</a-button>
+                  <span>已选{{ selectTotal }}项</span>
+              </div>
               <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
                 <a-row :gutter="15">
-                  <a-col :md="5" :sm="24">
+                  <a-col :md="6" :sm="24">
                     <a-form-item label="调拨单号" prop="allocateNo">
                       <a-input id="editGrap-allocateNo" v-model.trim="queryParam.allocateNo" placeholder="请输入调拨单号" allowClear />
                     </a-form-item>
                   </a-col>
-                  <a-col :md="5" :sm="24">
+                  <a-col :md="6" :sm="24">
                     <a-form-item label="产品编码" prop="productCode">
                       <a-input id="editGrap-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
                     </a-form-item>
                   </a-col>
-                  <a-col :md="5" :sm="24">
+                  <a-col :md="6" :sm="24">
                     <a-form-item label="产品名称" prop="productName">
                       <a-input id="editGrap-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
                     </a-form-item>
@@ -64,16 +83,6 @@
                     <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
                     <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
                   </a-col>
-                  <a-col :md="5" :sm="24" style="margin-bottom: 10px;text-align: right;">
-                    <span>已选{{ selectTotal }}项</span>
-                    <a-button
-                      style="margin:0 15px;"
-                      size="small"
-                      type="primary"
-                      class="button-info"
-                      id="salesEdit-plDel-btn"
-                      @click="handleBatchAdd">批量添加</a-button>
-                  </a-col>
                 </a-row>
               </a-form>
             </div>
@@ -168,7 +177,8 @@
               size="small"
               index="1"
               tableId="table2"
-              :rowKey="(record) => record.id"
+              :rowKey="(record) => record.no"
+              rowKeyName="no"
               :columns="chooseColumns"
               :data="chooseLoadData"
               :scroll="{ y: 300 }"
@@ -194,7 +204,7 @@
           </a-collapse-panel>
         </a-collapse>
       </a-card>
-    <!-- </a-spin> -->
+    <!--</a-spin>-->
     </div>
     <div class="affix-cont">
       <a-button
@@ -238,6 +248,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 // import ImportGuideModal from './importGuideModal.vue'
 import print from './print.vue'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { allocDetailQueryPageForReturn } from '@/api/allocateBill'
 import AllocateType from '@/views/common/allocateType.js'
 import {
@@ -254,7 +265,7 @@ import {
 export default {
   name: 'TransferReturnGrpEdit',
   mixins: [commonMixin],
-  components: { STable, VSelect, AllocateType, print },
+  components: { STable, VSelect, AllocateType, print, warehouse },
   data () {
     return {
       spinning: false,
@@ -275,7 +286,11 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        const otherParams = { allocateBill: { targetType: this.$route.params.targetType, targetSn: this.basicInfoData.targetSn, allocateNo: this.queryParam.allocateNo } }
+        const warehouseSn = this.basicInfoData.warehouseSn
+        const targetSn =  this.basicInfoData.targetSn
+        const targetType = this.$route.params.targetType
+        const allocateNo = this.queryParam.allocateNo
+        const otherParams = { allocateBill: { targetType: targetType , targetSn:targetSn, allocateNo: allocateNo } }
         return allocDetailQueryPageForReturn(Object.assign(parameter, this.queryParam, otherParams)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -422,6 +437,11 @@ export default {
       })
       _this.editRemark = false
     },
+    // 修改仓库
+    updateWarehouse(warehouseSn){
+      this.basicInfoData.warehouseSn = warehouseSn
+      this.handleEditRemark()
+    },
     // 修改调拨类型
     changeAllocateType (val, opt) {
       console.log(val, opt, '------------')

+ 23 - 19
src/views/allocationManagement/transferReturn/list.vue

@@ -20,12 +20,21 @@
                 <a-input id="transferReturn-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调拨退货对象名称"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="费用/调拨退货类型">
-                <AllocateType id="transferReturn-allocateReturnTypeSn" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨退货类型" @change="changeAllocatype"></AllocateType>
-              </a-form-item>
-            </a-col>
             <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="费用/调拨退货类型">
+                  <AllocateType id="transferReturn-allocateReturnTypeSn" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨退货类型" @change="changeAllocatype"></AllocateType>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="调入仓库">
+                  <warehouse
+                    v-model="queryParam.warehouseSn"
+                    id="transferReturn-warehouseSn"
+                    placeholder="请选择调入仓库"
+                  />
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="业务状态">
                   <v-select
@@ -137,8 +146,6 @@
 </template>
 
 <script>
-// import moment from 'moment'
-// import getDate from '@/libs/getDate.js'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
@@ -146,24 +153,20 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import auditModal from '@/views/common/auditModal.vue'
 import { allocateReturnQueryPage, allocateReturnAudit, allocateReturnDelete, allocateReturnExport } from '@/api/allocateReturn'
 import AllocateType from '@/views/common/allocateType.js'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 export default {
   name: 'TransferReturnList',
   mixins: [commonMixin],
-  components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType },
+  components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType, warehouse },
   data () {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
-      time: [
-        // moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
-        // moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
-      ],
+      time: [],
       allocateTypeVal: [],
       queryParam: { //  查询条件
-        // beginDate: getDate.getThreeMonthDays().starttime,
-        // endDate: getDate.getCurrMonthDays().endtime,
         beginDate: '',
         endDate: '',
         targetName: '', //  调往对象
@@ -171,6 +174,7 @@ export default {
         allocateSortSn: undefined, //  调拨类别
         allocateReturnTypeSn: undefined, // 调拨退货类型2
         state: undefined, //  业务状态
+        warehouseSn: undefined, 
         allocateReturnNo: '' //  调拨单号
       },
       disabled: false, //  查询、重置按钮是否可操作
@@ -179,7 +183,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return allocateReturnQueryPage(Object.assign(parameter, this.queryParam)).then(res => {
+        return allocateReturnQueryPage(Object.assign(parameter, this.queryParam,{authWarehouseFlag: 0})).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -207,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: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨退货对象名称', dataIndex: 'targetName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { 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 || '--' } },
@@ -215,8 +219,9 @@ export default {
         { title: '坏件数量', dataIndex: 'totalBadQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '返库数量', dataIndex: 'totalBackStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调入仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
       if(this.$hasPermissions('M_transferReturnList_salesPrice')){
         arr.splice(11,0,{ title: '退货总金额', dataIndex: 'totalPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
@@ -239,8 +244,6 @@ export default {
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate('')
-      // this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
-      // this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.targetName = ''
@@ -249,6 +252,7 @@ export default {
       this.queryParam.costTypeSn = undefined
       this.queryParam.allocateSortSn = undefined
       this.queryParam.allocateReturnTypeSn = undefined
+      this.queryParam.warehouseSn = undefined
       this.allocateTypeVal = []
       this.$refs.table.refresh(true)
     },

+ 35 - 17
src/views/allocationManagement/transfersPrint/list.vue

@@ -24,13 +24,13 @@
                   <a-input id="allocateBillList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调往对象"/>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="收货客户名称">
+                  <dealerSearchList ref="receiverSn" @change="custChange"/>
+                </a-form-item>
+              </a-col>
               <template v-if="advanced">
                 <a-col :md="6" :sm="24">
-                  <a-form-item label="收货客户名称">
-                    <dealerSearchList ref="receiverSn" @change="custChange"/>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="4" :sm="24">
                   <a-form-item label="业务状态">
                     <v-select
                       v-model="queryParam.state"
@@ -42,12 +42,12 @@
                     ></v-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-item label="调拨单号">
                     <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24" v-if="currentTab == 1">
+                <a-col :md="6" :sm="24" v-if="currentTab == 1">
                   <a-form-item label="打印状态">
                     <v-select
                       v-model="queryParam.printState"
@@ -59,12 +59,22 @@
                     ></v-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24">
+                <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+                <a-form-item label="调出仓库">
+                  <warehouse
+                    v-model="queryParam.warehouseSn"
+                    isPermission
+                    id="allocateBillList-warehouseSn"
+                    placeholder="请选择调出仓库"
+                  />
+                </a-form-item>
+              </a-col>
+                <a-col :md="6" :sm="24">
                   <a-form-item label="所在区域">
                     <subarea id="allocateBillList-subarea" ref="subarea" @change="subareaChange"></subarea>
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-item label="地区">
                     <Area id="allocateBillList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
                   </a-form-item>
@@ -176,6 +186,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import dealerSearchList from '@/views/common/dealerSearchList.vue'
 import printModal from '@/views/allocationManagement/transferOut/printModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import allocationDetailModal from '@/views/allocationManagement/transferOut/detail.vue'
 import recordModal from './recordModal.vue'
 import { allocateBillList, allocateBillDetailPrint, updatePrintState } from '@/api/allocateBill'
@@ -183,7 +194,7 @@ import { printFun } from '@/libs/JGPrint.js'
 export default {
   name: 'TransfersPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, dealerSearchList, printModal, commonModal, recordModal, subarea, Area, commonModal, allocationDetailModal },
+  components: { STable, VSelect, rangeDate, dealerSearchList, printModal, commonModal, recordModal, subarea, Area, commonModal, allocationDetailModal, warehouse },
   data () {
     return {
       spinning: false,
@@ -206,6 +217,7 @@ export default {
         allocateNo: '', //  调拨单号
         receiverSn: undefined,
         checkStatus: undefined,
+        warehouseSn: undefined,
         printState: 'NO_PRINT',
         subareaArea:{
           subareaSn: undefined,
@@ -246,10 +258,10 @@ 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: '10%' },
-        { title: '调往对象', dataIndex: 'targetName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象', dataIndex: 'targetName', width: '9%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '发货编号', dataIndex: 'sendNo', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '发货说明', dataIndex: 'explainInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { 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 },
         { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '90px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -261,12 +273,17 @@ export default {
         { title: '打印次数', dataIndex: 'printCount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      if(this.isShowWarehouse){
+        arr.splice(4,0,{ title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+
       if (this.$hasPermissions('M_transfersPrintList_salesPrice')) { //  售价权限
-        arr.splice(7, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '90px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(9, 0, { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '70px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(10, 0, { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '70px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(9, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '90px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(10, 0, { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(11, 0, { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '70px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(12, 0, { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '70px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
+      
       return arr
     }
   },
@@ -305,6 +322,7 @@ export default {
       this.queryParam.allocateNo = ''
       this.queryParam.receiverName = ''
       this.queryParam.receiverSn = undefined
+      this.queryParam.warehouseSn = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.shippingAddrProvinceSn = undefined

+ 3 - 0
src/views/allocationManagement/transfersPrint/recordModal.vue

@@ -21,6 +21,9 @@
           <a-descriptions-item label="调往对象">
             {{ tipData&&tipData.targetName }}
           </a-descriptions-item>
+          <a-descriptions-item label="调出仓库">
+            {{ tipData&&tipData.warehouseName }}
+          </a-descriptions-item>
           <a-descriptions-item label="收货客户名称">
             {{ tipData&&tipData.receiverName }}
           </a-descriptions-item>

+ 99 - 10
src/views/basicData/warehouse/editModal.vue

@@ -28,6 +28,39 @@
               placeholder="请输入仓库名称(最多30个字符)"
               allowClear />
           </a-form-model-item>
+          <a-form-model-item label="地址" prop="addressInfo">
+            <AreaList
+              id="warehouseEdit-areaList"
+              :value="form.addressInfo"
+              changeOnSelect
+              ref="areaList"
+              @change="areaChange"
+              defValKey="id"></AreaList>
+          </a-form-model-item>
+          <a-form-model-item prop="address" :wrapper-col="{ span: 16, offset: 6 }">
+            <a-input
+              id="warehouseEdit-desc"
+              v-model.trim="form.address"
+              placeholder="请输入详细地址"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="仓库类型" prop="warehouseType">
+            <v-select
+              v-model="form.warehouseType"
+              ref="state"
+              id="allocateBillList-state"
+              code="WAREHOUSE_TYPE"
+              placeholder="请选择仓库类型"
+              allowClear
+            ></v-select>
+          </a-form-model-item>
+          <a-form-model-item label="ERP仓库编码" prop="erpWarehouseCode">
+            <a-input
+              id="warehouseEdit-code"
+              v-model.trim="form.erpWarehouseCode"
+              placeholder="请输入ERP仓库编码"
+              allowClear />
+          </a-form-model-item>
         </a-form-model>
         <div class="btn-cont">
           <a-button type="primary" id="warehouse-edit-modal-save" @click="handleSave">保存</a-button>
@@ -40,12 +73,13 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { STable } from '@/components'
+import { STable, VSelect } from '@/components'
 import { warehouseSave } from '@/api/warehouse'
+import AreaList from '@/views/common/areaList.js'
 export default {
   name: 'WarehouseEditModal',
   mixins: [commonMixin],
-  components: { STable },
+  components: { STable, AreaList, VSelect },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -74,11 +108,33 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        name: '' // 仓库名称
+        name: '', // 仓库名称
+        address: '',
+        addressInfo: undefined,
+        provinceSn: undefined,
+        provinceName: undefined,
+        citySn: undefined,
+        cityName: undefined,
+        districtSn: undefined,
+        districtName: undefined,
+        erpWarehouseCode: undefined, // ERP仓库编码
+        warehouseType: undefined
       },
       rules: {
         name: [
           { required: true, message: '请输入仓库名称', trigger: 'blur' }
+        ],
+        addressInfo: [
+          { required: true, message: '请选择省市区', trigger: 'change' }
+        ],
+        address: [
+          { required: true, message: '请输入详细地址', trigger: 'blur' }
+        ],
+        erpWarehouseCode: [
+          { required: true, message: '请输入ERP仓库编码', trigger: 'blur' }
+        ],
+        warehouseType: [
+          { required: true, message: '请选择仓库类型', trigger: 'change' }
         ]
       }
     }
@@ -91,10 +147,32 @@ export default {
       str = str.replace(/[\r\n]/g, '')
       this.form.name = str
     },
+    areaChange (val, row) {
+      this.form.addressInfo = val
+      this.form.provinceSn = val[0] ? val[0] : ''
+      this.form.provinceName = row[0] ? row[0].name ? row[0].name : '' : ''
+      this.form.citySn = val[1] ? val[1] : ''
+      this.form.cityName = row[1] ? row[1].name ? row[1].name : '' : ''
+      this.form.districtSn = val[2] ? val[2] : ''
+      this.form.districtName = row[2] ? row[2].name ? row[2].name : '' : ''
+    },
     //  详情
     getDetail () {
-      this.form = {
-        name: this.nowData && this.nowData.name ? this.nowData.name : ''
+      if (this.nowData) {
+        const addressVal = [this.nowData.provinceSn ? this.nowData.provinceSn : '', this.nowData.citySn ? this.nowData.citySn : '', this.nowData.districtSn ? this.nowData.districtSn : '']
+        this.form = {
+          name: this.nowData.name ? this.nowData.name : '',
+          address: this.nowData.address ? this.nowData.address : '',
+          provinceSn: this.nowData.provinceSn ? this.nowData.provinceSn : '',
+          provinceName: this.nowData.provinceName ? this.nowData.provinceName : '',
+          citySn: this.nowData.citySn ? this.nowData.citySn : '',
+          cityName: this.nowData.cityName ? this.nowData.cityName : '',
+          districtSn: this.nowData.districtSn ? this.nowData.districtSn : '',
+          districtName: this.nowData.districtName ? this.nowData.districtName : '',
+          erpWarehouseCode: this.nowData.erpWarehouseCode ? this.nowData.erpWarehouseCode : '', // ERP仓库编码
+          warehouseType:this.nowData.warehouseType ? this.nowData.warehouseType : '',
+          addressInfo: addressVal
+        }
       }
     },
     //  保存
@@ -103,11 +181,12 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = {
-            warehouseSn: this.itemSn ? this.itemSn : undefined,
-            name: this.form.name //  仓库名称
+            warehouseSn: this.itemSn ? this.itemSn : undefined
           }
+          const newParams = Object.assign(this.form, params)
+          delete newParams.addressInfo
           _this.spinning = true
-          warehouseSave(params).then(res => {
+          warehouseSave(newParams).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok')
@@ -138,7 +217,17 @@ export default {
         this.$emit('close')
       } else {
         this.form = {
-          name: ''
+          name: '',
+          address: '',
+          addressInfo: undefined,
+          provinceSn: undefined,
+          provinceName: undefined,
+          citySn: undefined,
+          cityName: undefined,
+          districtSn: undefined,
+          districtName: undefined,
+          erpWarehouseCode: undefined, // ERP仓库编码
+          warehouseType: undefined
         }
       }
     },
@@ -151,7 +240,7 @@ export default {
 }
 </script>
 
-<style lang="less">
+<style lang="less" scoped>
   .warehouseEdit-modal{
     .ant-modal-body {
     	padding: 40px 40px 24px;

+ 3 - 2
src/views/basicData/warehouse/list.vue

@@ -49,13 +49,13 @@
             v-if="record.defaultFlag!='1' &&$hasPermissions('B_warehouse_edit') "
             @click="handleEdit(record)"
             id="warehouseList-edit-btn">编辑</a-button>
-          <a-button
+          <!-- <a-button
             size="small"
             type="link"
             class="button-error"
             v-if="record.defaultFlag!='1' &&$hasPermissions('B_warehouse_del')"
             @click="handleDel(record)"
-            id="warehouseList-del-btn">删除</a-button>
+            id="warehouseList-del-btn">删除</a-button> -->
           <span v-if="record.defaultFlag=='0' && !$hasPermissions('B_warehouse_edit') && !$hasPermissions('B_warehouse_del')">--</span>
         </template>
       </s-table>
@@ -132,6 +132,7 @@ export default {
       this.openModal = false
     },
     //  删除
+    // 有客户已绑定该仓库出库,确认要删除吗?如果删除,默认仓库变更为【仓库一】!
     handleDel (row) {
       const _this = this
       this.$confirm({

+ 105 - 0
src/views/common/chooseWarehouse.js

@@ -0,0 +1,105 @@
+import { queryAuthWarehouse, warehouseAllList } from '@/api/warehouse'
+const warehouse = {
+  template: `
+      <a-select
+        :placeholder="placeholder"
+        :id="id"
+        :allowClear="allowClear"
+        :value="defaultVal"
+        :showSearch="true"
+        :disabled="disabled"
+        :mode="modeType"
+        @change="handleChange"
+        :filter-option="filterOption">
+        <a-select-option v-for="item in warehouseData" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+      </a-select>
+    `,
+  props: {
+    value: {
+      type: [String, Array],
+      defatut: ''
+    },
+    isPermission: {// false无权限 true有权限
+      type: Boolean,
+      default: false
+    },
+    allowClear:{
+      type: Boolean,
+      default: true
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请选择仓库'
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    },
+    modeType: {
+      type: String,
+      default: 'default'
+    }
+  },
+  data () {
+    return {
+      defaultVal: this.value,
+      warehouseData: [],
+      pageNo: 1,
+      pageSize: 1000
+    }
+  },
+  mounted () {
+    if(this.isPermission){
+      this.$store.state.app.defWarehouse = null
+      this.$store.state.app.isWarehouse = false
+    }
+    this.getWarehouse()
+  },
+  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
+      this.$emit('input', value)
+      this.$emit('change', value)
+    },
+    //  获取仓库列表
+    getWarehouse () {
+      const ajaxName = this.isPermission ? queryAuthWarehouse : warehouseAllList
+      ajaxName({}).then(res => {
+        if (res.status == 200) {
+          // 有权限控制的
+          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 || []
+        } else {
+          if(this.isPermission){
+            this.$store.state.app.isWarehouse = false
+            this.$store.state.app.defWarehouse = null
+          }
+          this.warehouseData = []
+        }
+        this.$emit('load')
+      })
+    },
+    clearData () {
+      this.handleChange([])
+    }
+  }
+}
+
+export default warehouse

+ 50 - 34
src/views/dataExport/exportCheck/list.vue

@@ -2,19 +2,32 @@
   <a-card size="small" :bordered="false" class="exportCheckList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div ref="tableSearch" class="table-page-search-wrapper">
+      <div ref="tableSearch">
         <a-form-model
           id="exportCheckList-form"
           ref="ruleForm"
           class="form-model-con"
-          layout="inline"
           :model="queryParam"
           :rules="rules"
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          @keyup.enter.native="handleSearch" >
+          @keyup.enter.native="handleExport" >
+          <a-row :gutter="15" v-show="isShowWarehouse">
+            <a-col :md="12" :sm="24">
+              <a-form-model-item label="选择仓库" prop="warehouseSn">
+                <warehouse
+                  v-model="queryParam.warehouseSn"
+                  isPermission
+                  @load="loadWareHouse"
+                  id="exportCheckList-warehouseSn"
+                  placeholder="请选择仓库"
+                  @change="getList"
+                />
+              </a-form-model-item>
+            </a-col>
+          </a-row>
           <a-row :gutter="15">
-            <a-col :md="10" :sm="24">
+            <a-col :md="12" :sm="24">
               <a-form-model-item label="选择盘点单" prop="checkWarehouseSn">
                 <a-select id="exportCheckList-print" v-model="queryParam.checkWarehouseSn" placeholder="请选择盘点单" allowClear>
                   <a-select-option v-for="item in checkList" :value="item.checkWarehouseSn" :key="item.checkWarehouseSn">
@@ -23,16 +36,17 @@
                 </a-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-button
+          </a-row>
+          <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }">
+            <a-button
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
                 id="exportCheckList-export">导出</a-button>
-            </a-col>
-          </a-row>
+            <a-button @click="pageInit" style="margin-left: 15px" id="chooseCustom-btn-back">重置</a-button>
+          </a-form-model-item>
         </a-form-model>
       </div>
     </a-spin>
@@ -43,11 +57,12 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { checkWarehouseExcelList, checkWarehouseExport } from '@/api/checkWarehouse'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 export default {
   name: 'ExportCheckList',
   mixins: [commonMixin],
-  components: { STable, VSelect },
+  components: { STable, VSelect, warehouse },
   data () {
     return {
       spinning: false,
@@ -55,10 +70,12 @@ export default {
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
       queryParam: { //  查询条件
-        checkWarehouseSn: undefined
+        checkWarehouseSn: undefined,
+        warehouseSn: undefined
       },
       rules: {
-        'checkWarehouseSn': [{ required: true, message: '请选择盘点单', trigger: 'change' }]
+        checkWarehouseSn: [{ required: true, message: '请选择盘点单', trigger: 'change' }],
+        warehouseSn: [{ required: true, message: '请选择仓库', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -66,14 +83,19 @@ export default {
     }
   },
   methods: {
-    getList () {
-      checkWarehouseExcelList().then(res => {
-        if (res.status == 200) {
-          this.checkList = res.data || []
-        } else {
-          this.checkList = []
-        }
-      })
+    getList (v) {
+      if(v){
+        checkWarehouseExcelList({warehouseSn: this.queryParam.warehouseSn}).then(res => {
+          if (res.status == 200) {
+            this.checkList = res.data || []
+          } else {
+            this.checkList = []
+          }
+        })
+      }else{
+        this.queryParam.checkWarehouseSn = undefined
+        this.checkList = []
+      }
     },
     //  导出
     handleExport () {
@@ -93,23 +115,17 @@ export default {
         }
       })
     },
-    pageInit () {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
+    loadWareHouse(){
+      const defWareHouse = this.$store.state.app.defWarehouse
       this.queryParam.checkWarehouseSn = undefined
-      this.$refs.ruleForm.resetFields()
-      this.getList()
+      this.queryParam.warehouseSn = this.isShowWarehouse ? undefined : (defWareHouse?defWareHouse.warehouseSn:undefined)
+
+      if(!this.isShowWarehouse){
+        this.getList(true)
+      }
     },
-    setTableH () {
-      const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 238
-    }
-  },
-  watch: {
-    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
-      this.setTableH()
+    pageInit () {
+      this.$refs.ruleForm.resetFields()
     }
   },
   mounted () {

+ 46 - 5
src/views/dealerManagement/businessOwnerSettings/addModal.vue

@@ -48,6 +48,10 @@
             </a-radio>
           </a-radio-group>
         </a-form-model-item>
+        <!-- 人员类型为仓库管理员时 显示管辖仓库 -->
+        <a-form-model-item label="管辖仓库" prop="bizUserScopeList" v-if="form.bizUserType == 'cg'">
+          <chooseWarehouse ref="warehouse" modeType="multiple" :value="warehouseList" @change="handleWarehouse"></chooseWarehouse>
+        </a-form-model-item>
         <div style="display: flex;justify-content: center;padding: 30px 0;">
           <a-button type="primary" @click="handleSave">{{ itemId?'保存':'确定' }}</a-button>
           <a-button style="margin-left: 15px;" @click="isShow=false">取消</a-button>
@@ -60,11 +64,12 @@
 <script>
 
 import userName from '@/views/common/userName'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { VSelect } from '@/components'
 import { bizuserSave } from '@/api/bizuser.js'
 export default {
   name: 'ProductInfoDetailModal',
-  components: { VSelect, userName },
+  components: { VSelect, userName, chooseWarehouse },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -83,8 +88,10 @@ export default {
         userSn: '',
         bizUserType: undefined, // 人员类型
         allDealerFlag: undefined,
-        allProductFlag: undefined
+        allProductFlag: undefined,
+        bizUserScopeList: []
       },
+      warehouseList: [],
       user_name: '',
       labelCol: { span: 5 },
       wrapperCol: { span: 16 },
@@ -92,7 +99,8 @@ export default {
         userSn: [{ required: true, message: '请输入人员名称', trigger: 'change' }],
         bizUserType: [{ required: true, message: '请选择人员类型', trigger: 'change' }],
         allDealerFlag: [{ required: true, message: '请选择管辖经销商', trigger: 'change' }],
-        allProductFlag: [{ required: true, message: '请选择管辖产品', trigger: 'change' }]
+        allProductFlag: [{ required: true, message: '请选择管辖产品', trigger: 'change' }],
+        bizUserScopeList: [{ required: true, message: '请选择管辖仓库', trigger: 'change' }]
       }
     }
   },
@@ -103,6 +111,10 @@ export default {
         if (valid) {
           _this.spinning = true
           _this.form.id = _this.itemId ? _this.itemId : ''
+          if (_this.form.bizUserType != 'cg') {
+            this.warehouseList = []
+            _this.form.bizUserScopeList = []
+          }
           bizuserSave(_this.form).then(res => {
             _this.spinning = false
             if (res.status == 200) {
@@ -118,9 +130,25 @@ export default {
         }
       })
     },
+    handleWarehouse (val) {
+      this.warehouseList = val
+      const arr = []
+      val.forEach(item => {
+        const obj = {
+          bizSn: item
+        }
+        arr.push(obj)
+      })
+      this.form.bizUserScopeList = arr
+    },
     resetSearchForm () {
-      this.$refs.userName.resetForm()
       this.user_name = ''
+      if (this.form.bizUserType && this.form.bizUserType == 'cg') {
+        this.$refs.warehouse.clearData()
+
+        this.form.bizUserScopeList = []
+      }
+      this.$refs.userName.resetForm()
       this.$refs.ruleForm.resetFields()
     },
     userChange (val) {
@@ -128,11 +156,24 @@ export default {
     },
     getEditInfo (obj) {
       this.$refs.userName.setDufaultVal(obj.userName)
+      const arr = []
+      const newarr = []
+      if (obj.warehouseList && obj.warehouseList.length > 0) {
+        obj.warehouseList.forEach(item => {
+          arr.push(item.warehouseSn)
+          const newObj = {
+            bizSn: item.warehouseSn
+          }
+          newarr.push(newObj)
+        })
+        this.warehouseList = arr
+      }
       this.form = {
         userSn: obj.userSn,
         bizUserType: obj.bizUserType, // 人员类型
         allDealerFlag: obj.allDealerFlag,
-        allProductFlag: obj.allProductFlag
+        allProductFlag: obj.allProductFlag,
+        bizUserScopeList: newarr
       }
     }
   },

+ 31 - 1
src/views/dealerManagement/businessOwnerSettings/list.vue

@@ -21,7 +21,7 @@
                 <a-input id="businessOwnerSettings-name" v-model.trim="queryParam.userName" allowClear placeholder="请输入人员姓名"/>
               </a-form-item>
             </a-col>
-            <a-col :md="24" :sm="24" style="margin-top: 10px;text-align:center;">
+            <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="businessOwnerSettings-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="businessOwnerSettings-reset">重置</a-button>
             </a-col>
@@ -46,6 +46,21 @@
           :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
           bordered>
+          <template slot="showWarehouse" slot-scope="text, record">
+            <div v-if="record.warehouseList&&record.warehouseList.length>0 ">
+              <a-tooltip placement="bottom" class="warehouseBox">
+                <template slot="title">
+                  <span v-for="con in record.warehouseList" :key="con.id">
+                    {{ con.name }}
+                  </span>
+                </template>
+                <span v-for="con in record.warehouseList" :key="con.id">
+                  {{ con.name }}
+                </span>
+              </a-tooltip>
+            </div>
+            <div v-else>--</div>
+          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button size="small" type="link" class="button-warning" v-if="record.allDealerFlag!=1 || record.allProductFlag!=1" @click="handleSetCategory(record)">设置管辖范围</a-button>
@@ -84,6 +99,7 @@ export default {
         { title: '人员类型', dataIndex: 'bizUserTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '管辖经销商', dataIndex: 'allDealerFlagDictValue', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '管辖品类', dataIndex: 'allProductFlagDictValue', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '管辖仓库', scopedSlots: { customRender: 'showWarehouse' }, width: '22%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -207,5 +223,19 @@ export default {
     .table-operator{
       text-align:right;
     }
+    .warehouseBox{
+  wwidth: 100%;
+      display: -webkit-box;
+      -webkit-box-orient: vertical;
+      -webkit-line-clamp: 2;
+      overflow: hidden;
+      text-overflow: ellipsis;
+    }
+    .warehouseBox span::after{
+      content:','
+    }
+    .warehouseBox span:last-child::after{
+      content:''
+    }
   }
 </style>

+ 0 - 3
src/views/dealerManagement/businessOwnerSettings/settingsIndex.vue

@@ -343,9 +343,6 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    this.pageInit()
-  },
   activated () {
     this.pageInit()
   },

+ 3 - 0
src/views/dealerManagement/merchantInfoManagement/detailModal.vue

@@ -28,6 +28,9 @@
               </span>
               <span v-else>--</span>
             </a-descriptions-item>
+            <a-descriptions-item v-if="!isAudit&&form&&form.auditState != 'WAIT'" label="授权类型">{{ form&&form.menuMouldIdDictValue ? form.menuMouldIdDictValue : '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务编码">{{ form&&form.kdMidCustomerFnumber ? form.kdMidCustomerFnumber : '--' }}</a-descriptions-item>
+            <a-descriptions-item label="默认仓库">{{ form&&form.defaultWarehouseName ? form.defaultWarehouseName : '--' }}</a-descriptions-item>
           </a-descriptions>
         </a-card>
         <a-card title="公司信息" size="small" style="margin-bottom: 15px;">

+ 12 - 2
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -117,6 +117,11 @@
                       placeholder="请输入财务编码(最多30个字符)" />
                   </a-form-model-item>
                 </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="默认仓库" prop="defaultWarehouseSn" >
+                    <chooseWarehouse ref="warehouse" v-model="form.defaultWarehouseSn"></chooseWarehouse>
+                  </a-form-model-item>
+                </a-col>
               </a-row>
             </a-collapse-panel>
           </a-collapse>
@@ -409,11 +414,12 @@ import { commonMixin } from '@/utils/mixin'
 import { getArea } from '@/api/data'
 import { VSelect } from '@/components'
 import { dealerSave, dealerFindUpdateInfoBySn } from '@/api/dealer'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import moment from 'moment'
 export default {
   name: 'MerchantInfoManagementEdit',
   mixins: [commonMixin],
-  components: { VSelect },
+  components: { VSelect, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -465,7 +471,8 @@ export default {
         jgDoorHeaderChangeTime: '',
         isShowSpecialPrice: 0,
         remark: '',
-        kdMidCustomerFnumber: ''
+        kdMidCustomerFnumber: '',
+        defaultWarehouseSn: undefined
       },
       rules: {
         dealerName: [
@@ -499,6 +506,9 @@ export default {
         menuMouldId: [
           { required: true, message: '请选择授权类型', trigger: 'change' }
         ],
+        defaultWarehouseSn: [
+          { required: true, message: '请选择默认仓库', trigger: 'change' }
+        ],
         dealerTelephone: [
           { pattern: /^[0-9-]{11,13}$/, message: '请输入正确的电话号码!' }
         ],

+ 8 - 6
src/views/dealerManagement/rebateSettings/associateModal.vue

@@ -70,17 +70,13 @@ export default {
   methods: {
     handleDisassociate (val) {
       console.log('选中', val)
-      this.rebateDealerSn = val.key
+      this.rebateDealerSn = val ? val.key : ''
     },
     //  保存
     handleSave () {
       const _this = this
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          if (_this.rebateDealerSn == '') {
-            this.$message.info('请选择下级')
-            return
-          }
           const formData = {
             rebateDealerSn: _this.rebateDealerSn,
             dealerSn: _this.nowData && _this.nowData.subDealer.dealerSn ? _this.nowData.subDealer.dealerSn : undefined
@@ -118,7 +114,13 @@ export default {
         this.$emit('close')
         this.$refs.ruleForm.resetFields()
         this.$refs.queryChid.resetForm()
-        this.rebateDealerSn = []
+        this.rebateDealerSn = ''
+      }else{
+        this.$nextTick(()=>{
+          this.rebateDealerSn = this.nowData && this.nowData.rebateDealer && this.nowData.rebateDealer.dealerSn ? this.nowData.rebateDealer.dealerSn : ''
+          const dealerName = this.nowData && this.nowData.rebateDealer && this.nowData.rebateDealer.dealerName ? this.nowData.rebateDealer.dealerName : ''
+          this.$refs.queryChid.setVal(this.rebateDealerSn, dealerName)
+        })
       }
     }
   }

+ 32 - 6
src/views/dealerManagement/rebateSettings/list.vue

@@ -10,6 +10,16 @@
                 <a-input id="rebateSettingsList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="归属经销商名称">
+                <a-input id="rebateSettingsList-dealerName1" v-model.trim="queryParam.rebateDealerName" allowClear placeholder="请输入归属经销商名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="上级经销商名称">
+                <a-input id="rebateSettingsList-dealerName2" v-model.trim="queryParam.supDealerName" allowClear placeholder="请输入上级经销商名称"/>
+              </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="rebateSettingsList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateSettingsList-reset">重置</a-button>
@@ -53,11 +63,21 @@
         </template>
         <!-- 差价归属 -->
         <template slot="cjgs" slot-scope="text, record">
-          <span v-if="record.supDealer">{{ record.supDealer.dealerName }}</span>
+          <span v-if="record.rebateDealer">{{ record.rebateDealer.dealerName }}</span>
           <span v-else>--</span>
         </template>
         <!-- 归属经销商级别 -->
         <template slot="gsjxsjb" slot-scope="text, record">
+          <span v-if="record.rebateDealer">{{ record.rebateDealer.provinceName }} > {{ record.rebateDealer.dealerLevelDictValue }}</span>
+          <span v-else>--</span>
+        </template>
+         <!-- 上级差价归属 -->
+         <template slot="sjcjgs" slot-scope="text, record">
+          <span v-if="record.supDealer">{{ record.supDealer.dealerName }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 上级归属经销商级别 -->
+        <template slot="sjgsjxsjb" slot-scope="text, record">
           <span v-if="record.supDealer">{{ record.supDealer.provinceName }} > {{ record.supDealer.dealerLevelDictValue }}</span>
           <span v-else>--</span>
         </template>
@@ -86,14 +106,18 @@ export default {
         wrapperCol: { span: 16 }
       },
       queryParam: {
-        dealerName: ''
+        dealerName: '',
+        supDealerName:'',
+        rebateDealerName:''
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '经销商名称', width: '22.5%', scopedSlots: { customRender: 'jxs' }, align: 'center', ellipsis: true },
-        { title: '经销商级别', scopedSlots: { customRender: 'dealerLevel' }, align: 'center', width: '22.5%' },
-        { title: '差价归属', scopedSlots: { customRender: 'cjgs' }, align: 'center', width: '22.5%' },
-        { title: '归属经销商级别', scopedSlots: { customRender: 'gsjxsjb' }, align: 'center', width: '22.5%' },
+        { title: '经销商名称', width: '15%', scopedSlots: { customRender: 'jxs' }, align: 'center', ellipsis: true },
+        { title: '经销商级别', scopedSlots: { customRender: 'dealerLevel' }, align: 'center', width: '15%' },
+        { title: '指定差价归属经销商', scopedSlots: { customRender: 'cjgs' }, align: 'center', width: '15%' },
+        { title: '指定归属经销商级别', scopedSlots: { customRender: 'gsjxsjb' }, align: 'center', width: '15%' },
+        { title: '上级经销商', scopedSlots: { customRender: 'sjcjgs' }, align: 'center', width: '15%' },
+        { title: '上级经销商级别', scopedSlots: { customRender: 'sjgsjxsjb' }, align: 'center', width: '15%' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -123,6 +147,8 @@ export default {
     //  重置
     resetSearchForm () {
       this.queryParam.dealerName = ''
+      this.queryParam.supDealerName = ''
+      this.queryParam.rebateDealerName = ''
       this.$refs.table.refresh(true)
     },
     // 编辑

+ 22 - 2
src/views/dealerManagement/rebateSettings/queryChild.vue

@@ -9,6 +9,7 @@
     :not-found-content="fetching ? undefined : null"
     @search="fetchUser"
     @change="handleChange"
+    allowClear
   >
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
     <a-select-option v-for="item in data" :key="item.dealerSn" :value="item.dealerSn">
@@ -34,7 +35,8 @@ export default {
     return {
       data: [],
       dealerName: [],
-      fetching: false
+      fetching: false,
+      itemSn: null
     }
   },
   methods: {
@@ -45,7 +47,13 @@ export default {
       const fetchId = this.lastFetchId
       this.data = []
       this.fetching = true
-      dealerRelationList({ 'dealerName': dealerName, 'dealerLevelList': this.dealerLevelList, pageNo: 1, pageSize: 20 }).then(res => {
+      const params = {'dealerLevelList': this.dealerLevelList, pageNo: 1, pageSize: 20 }
+      if(this.itemSn && !dealerName){
+        params.dealerSn = this.itemSn
+      }else{
+        params.dealerName = dealerName
+      }
+      dealerRelationList(params).then(res => {
         if (fetchId !== this.lastFetchId) {
           return
         }
@@ -54,14 +62,26 @@ export default {
       })
     },
     handleChange (value) {
+      console.log(value)
       Object.assign(this, {
         dealerName: value,
         data: [],
         fetching: false
       })
+      if(!value){
+        this.itemSn = null
+      }
       this.$emit('change', value)
     },
+    setVal(value, label){
+      if(value){
+        this.itemSn = value
+        this.fetchUser()
+        this.handleChange({key: this.itemSn, label: label})
+      }
+    },
     resetForm () {
+      this.itemSn = null
       this.dealerName = []
     }
   }

+ 11 - 2
src/views/financialManagement/allocateReturnConfirmation/list.vue

@@ -43,6 +43,11 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
+              <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>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="transferReturnConfirmation-refresh">查询</a-button>
@@ -95,11 +100,12 @@ import { commonMixin } from '@/utils/mixin'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
 import AllocateReturnDetailModal from './detailModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { allocateReturnQueryConfirmPage, allocateReturnFinanceAudit } from '@/api/allocateReturn'
 export default {
   name: 'AllocateReturnConfirmationList',
   mixins: [commonMixin],
-  components: { STable, VSelect, AllocateReturnDetailModal, rangeDate },
+  components: { STable, VSelect, AllocateReturnDetailModal, rangeDate, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -110,7 +116,8 @@ export default {
         allocateReturnNo: '', //  单号
         targetName: '',
         grabFlag: undefined,
-        state: undefined //  状态
+        state: undefined, //  状态
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       advanced: true,
@@ -144,6 +151,7 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货单号', scopedSlots: { customRender: 'allocateReturnNo' }, width: '16%', align: 'center' },
         { title: '调拨退货客户', dataIndex: 'targetName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '是否抓单', dataIndex: 'grabFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货总数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '坏件数量', dataIndex: 'totalBadQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -177,6 +185,7 @@ export default {
       this.queryParam.targetName = ''
       this.queryParam.grabFlag = undefined
       this.queryParam.state = undefined
+      this.queryParam.warehouseSn = undefined
       this.$refs.table.refresh(true)
     },
     // 详情

+ 61 - 51
src/views/financialManagement/collectionDetailStatic/list.vue

@@ -18,23 +18,23 @@
             <a-col :md="6" :sm="24">
               <a-form-item label="收款打印状态">
                 <v-select
-                    v-model="queryParam.printStatus"
-                    code="PRINT_STATUS"
-                    placeholder="请选择收款打印状态"
-                    allowClear
-                  ></v-select>
+                  v-model="queryParam.printStatus"
+                  code="PRINT_STATUS"
+                  placeholder="请选择收款打印状态"
+                  allowClear
+                ></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-                <a-form-item label="开票状态">
-                  <v-select
-                    v-model="queryParam.invoiceStatus"
-                    code="FINANCE_BOOK_INVOICE_STATUS"
-                    placeholder="请选择开票状态"
-                    allowClear
-                  ></v-select>
-                </a-form-item>
-              </a-col>
+              <a-form-item label="开票状态">
+                <v-select
+                  v-model="queryParam.invoiceStatus"
+                  code="FINANCE_BOOK_INVOICE_STATUS"
+                  placeholder="请选择开票状态"
+                  allowClear
+                ></v-select>
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="申请人">
                 <employee style="width: 100%;" id="collectionDetail-Employee" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
@@ -46,19 +46,19 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-                <a-form-item label="付款方类型">
-                  <v-select
-                    v-model="queryParam.payerType"
-                    code="PAYER_TYPE"
-                    placeholder="请选择付款方类型"
-                  ></v-select>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="付款方">
-                  <a-input id="financialCollectionList-payerName" v-model.trim="queryParam.payerName" allowClear placeholder="请输入付款方"/>
-                </a-form-item>
-              </a-col>
+              <a-form-item label="付款方类型">
+                <v-select
+                  v-model="queryParam.payerType"
+                  code="PAYER_TYPE"
+                  placeholder="请选择付款方类型"
+                ></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="付款方">
+                <a-input id="financialCollectionList-payerName" v-model.trim="queryParam.payerName" allowClear placeholder="请输入付款方"/>
+              </a-form-item>
+            </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="财务编码">
@@ -70,7 +70,7 @@
                   <a-input id="collectionDetail-payerAccountInfo" placeholder="请输入付款账户" v-model="queryParam.payerAccountInfo"></a-input>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="足额打款">
                   <v-select
                     v-model="queryParam.fullPaymentFlag"
@@ -81,16 +81,17 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="户名/汇入银行">
+              <a-col :md="4" :sm="24">
+                <a-form-item label="户名">
                   <a-select placeholder="请选择户名" allowClear v-model="queryParam.bankAccount" style="width: 100%" @change="handleChange">
                     <a-select-option v-for="item in bankList" :value="item.bankAccount">
                       {{ item.bankAccount }}
                     </a-select-option>
                   </a-select>
-                </a-form-item></a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="汇入银行">
                   <a-select placeholder="请选择汇入银行" allowClear v-model="queryParam.bankName" style="width: 100%">
                     <a-select-option v-for="item in bankNameList" :value="item">
                       {{ item }}
@@ -113,6 +114,11 @@
                   <Area id="collectionDetail-provinceSn" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
                 </a-form-item>
               </a-col>
+              <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>
             </template>
             <a-col :md="24" :sm="24" style="text-align:center;">
               <a-button type="primary" @click="searchForm" :disabled="disabled" id="collectionDetail-refresh">查询</a-button>
@@ -214,11 +220,12 @@ import invoiceModal from './invoiceModal.vue'
 import plInvoiceModal from './plInvoiceModal.vue'
 import noteModal from './noteModal.vue'
 import printModal from './printModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { financeBookDetailQueryPage, financeBookDetailExport, financeBookReportDetailCount, financeBookDetailUpdateBatch } from '@/api/financeBook.js'
 export default {
   name: 'CollectionDetailStaticList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, employee, dealerSubareaScopeList, subarea, Area, invoiceModal, plInvoiceModal, noteModal, printModal },
+  components: { STable, VSelect, rangeDate, employee, dealerSubareaScopeList, subarea, Area, invoiceModal, plInvoiceModal, noteModal, printModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -238,7 +245,7 @@ export default {
         fullPaymentFlag: undefined,
         bankAccount: undefined,
         bankName: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
@@ -248,7 +255,8 @@ export default {
         invoiceDateType: undefined,
         invoiceBeginDate: '',
         invoiceEndDate: '',
-        payerType: undefined
+        payerType: undefined,
+        warehouseSn: undefined // 仓库
       },
       invoiceIsShow: false,
       noteIsShow: false,
@@ -321,6 +329,7 @@ export default {
         { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款单号', dataIndex: 'bookNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请人', dataIndex: 'applyPersonName', align: 'center', width: '5%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收款事由', dataIndex: 'bookReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款日期', dataIndex: 'receiptDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '付款方类型', dataIndex: 'payerTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
@@ -352,7 +361,7 @@ export default {
       this.noteIsShow = false
       this.printIsShow = false
       this.plinvoiceIsShow = false
-      if(flag === 1){
+      if (flag === 1) {
         this.searchForm()
       }
     },
@@ -371,9 +380,9 @@ export default {
         return false
       }
 
-      if(e.key == 1){ // 批量允许打印
-        const dataList = rows.filter(item => !(item.printStatus=='NO_PRINT' || item.printStatus=='PRINT'))
-        if(dataList.length){
+      if (e.key == 1) { // 批量允许打印
+        const dataList = rows.filter(item => !(item.printStatus == 'NO_PRINT' || item.printStatus == 'PRINT'))
+        if (dataList.length) {
           this.$confirm({
             title: '批量允许打印',
             content: `已选有效数据 ${dataList.length} 条,确认将收款打印状态变更为允许打印吗?`,
@@ -384,37 +393,37 @@ export default {
               // 批量允许打印接口
               const data = []
               dataList.map(item => {
-                  data.push({id: item.id, printStatus: 'NO_PRINT' })
+                data.push({ id: item.id, printStatus: 'NO_PRINT' })
               })
               _this.plUpdateStatus(data)
             }
           })
-        }else{
+        } else {
           _this.$message.warning('没有可操作的有效数据!')
         }
       }
 
-      if(e.key == 2){ // 批量开票
+      if (e.key == 2) { // 批量开票
         const data = []
         rows.map(item => {
-          data.push({id: item.id, invoiceDate: '', remarks: '' })
+          data.push({ id: item.id, invoiceDate: '', remarks: '' })
         })
         _this.plinvoiceInfo = data
         _this.plinvoiceIsShow = true
       }
     },
     // 批量操作
-    plUpdateStatus(data){
+    plUpdateStatus (data) {
       this.spinning = true
       financeBookDetailUpdateBatch(data).then(res => {
-        if(res.status == 200){
+        if (res.status == 200) {
           this.searchForm()
         }
         this.spinning = false
       })
     },
     // 确定批量开票
-    plinvoiceOk(data){
+    plinvoiceOk (data) {
       this.plinvoiceInfo.map(item => {
         item.invoiceDate = data.invoiceDate
         item.remarks = data.remarks
@@ -450,11 +459,11 @@ export default {
       this.queryParam.auditBeginDate = date[0] ? date[0] : ''
       this.queryParam.auditEndDate = date[1] ? date[1] : ''
     },
-    searchForm(){
+    searchForm () {
       this.$refs.table.refresh(true)
       this.$refs.table.clearSelected()
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -499,7 +508,8 @@ export default {
       this.queryParam.printStatus = undefined
       this.queryParam.invoiceStatus = undefined
       this.queryParam.payerType = undefined
-      if(this.advanced){
+      this.queryParam.warehouseSn = undefined
+      if (this.advanced) {
         this.$refs.subarea.clearData()
       }
       this.searchForm()
@@ -533,7 +543,7 @@ export default {
         payerName: con.payerName,
         bookDetailSn: con.bookDetailSn,
         invoiceDate: con.invoiceDate,
-        remarks: con.remarks ? con.remarks : '',
+        remarks: con.remarks ? con.remarks : ''
       }
       this.invoiceInfo = obj
       this.$nextTick(() => {

+ 14 - 4
src/views/financialManagement/inventoryConfirmation/list.vue

@@ -16,6 +16,11 @@
                 <a-input id="inventoryConfirmationList-checkWarehouseNo" v-model.trim="queryParam.checkWarehouseNo" allowClear placeholder="请输入盘点单号"/>
               </a-form-item>
             </a-col>
+            <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 :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryConfirmationList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryConfirmationList-reset">重置</a-button>
@@ -66,11 +71,12 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { checkWarehouseList, checkWarehouseReCheck, checkWarehouseFinanceAudit } from '@/api/checkWarehouse'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
+import { verifyQueryPage, checkWarehouseReCheck, checkWarehouseFinanceAudit } from '@/api/checkWarehouse'
 export default {
   name: 'InventoryConfirmationList',
   mixins: [commonMixin],
-  components: { STable, VSelect },
+  components: { STable, VSelect, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -78,7 +84,8 @@ export default {
       queryParam: { //  查询条件
         deleteFlag: '0',
         state: 'WAIT_FINANCE_AUDIT',
-        checkWarehouseNo: ''
+        checkWarehouseNo: '',
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       tabPaneData: [
@@ -89,7 +96,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return checkWarehouseList(Object.assign(parameter, this.queryParam)).then(res => {
+        return verifyQueryPage(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -115,6 +122,7 @@ export default {
           { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
+          { title: '仓库', dataIndex: 'warehouseName', align: 'center', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
           { title: '盘点时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '监盘人', dataIndex: 'checkSupervisePersonName', align: 'center', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
           { title: '监盘时间', dataIndex: 'checkSuperviseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -127,6 +135,7 @@ export default {
           { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '16%', customRender: function (text) { return text || '--' }, ellipsis: true },
+          { title: '仓库', dataIndex: 'warehouseName', align: 'center', width: '16%', customRender: function (text) { return text || '--' }, ellipsis: true },
           { title: '盘点时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '监盘人', dataIndex: 'checkSupervisePersonName', align: 'center', width: '16%', customRender: function (text) { return text || '--' }, ellipsis: true },
           { title: '监盘时间', dataIndex: 'checkSuperviseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -194,6 +203,7 @@ export default {
     },
     resetSearchForm () {
       this.queryParam.checkWarehouseNo = ''
+      this.queryParam.warehouseSn = undefined
       this.$refs.table.refresh(true)
     },
     pageInit () {

+ 11 - 2
src/views/financialManagement/returnConfirmation/list.vue

@@ -43,6 +43,11 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
+              <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>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="returnConfirmationList-refresh">查询</a-button>
@@ -96,11 +101,12 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import confirmationDetailModal from './detailModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { salesReturnFinancialList, salesReturnFinancial } from '@/api/salesReturn'
 export default {
   name: 'ReturnConfirmationList',
   mixins: [commonMixin],
-  components: { STable, VSelect, confirmationDetailModal, dealerSubareaScopeList, rangeDate },
+  components: { STable, VSelect, confirmationDetailModal, dealerSubareaScopeList, rangeDate, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -111,7 +117,8 @@ export default {
         salesReturnBillNo: '', //  单号
         buyerSn: undefined,
         salesReturnBillSource: undefined,
-        billStatus: undefined //  状态
+        billStatus: undefined, //  状态
+        warehouseSn: undefined //  仓库
       },
       disabled: false, //  查询、重置按钮是否可操作
       advanced: true,
@@ -146,6 +153,7 @@ export default {
         { title: '单据来源', dataIndex: 'salesReturnBillSourceDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '15%', align: 'center' },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '申请退货数量', dataIndex: 'totalInitialQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '仓库实收数量', dataIndex: 'totalReceiveQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '退货金额', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -177,6 +185,7 @@ export default {
       this.queryParam.buyerSn = undefined
       this.queryParam.salesReturnBillSource = undefined
       this.queryParam.billStatus = undefined
+      this.queryParam.warehouseSn = undefined
       this.$refs.dealerSubareaScopeList.resetForm()
       this.$refs.table.refresh(true)
     },

+ 23 - 11
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -21,6 +21,11 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+              <a-form-model-item label="仓库">
+                <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
+              </a-form-model-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="warehousingConfirmationList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="warehousingConfirmationList-reset">重置</a-button>
@@ -98,17 +103,19 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import confirmationDetailModal from './detailModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { stockPutList, stockPutConfirm } from '@/api/stockPut'
 export default {
   name: 'WarehousingConfirmationList',
   mixins: [commonMixin],
-  components: { STable, VSelect, confirmationDetailModal },
+  components: { STable, VSelect, confirmationDetailModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
       queryParam: { //  查询条件
         stockPutNo: '', //  入库单号
-        auditState: undefined //  状态
+        auditState: undefined, //  状态
+        warehouseSn: undefined // 仓库
       },
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
@@ -140,20 +147,24 @@ export default {
     // 列表表头
     columns () {
       const arr = [
-        { title: '入库时间', dataIndex: 'putTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库单号', scopedSlots: { customRender: 'stockPutNo' }, width: '16%', align: 'center' },
-        { title: '商户名称', dataIndex: 'providerName', align: 'left', width: '22%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '入库数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'putTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库单号', scopedSlots: { customRender: 'stockPutNo' }, width: '12%', align: 'center' },
+        { title: '商户名称', dataIndex: 'providerName', align: 'left', width: '18%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '入库数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'auditStateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据状态', dataIndex: 'auditStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务审核时间', dataIndex: 'auditTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'remark', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      if (this.isShowWarehouse) {
+        arr.splice(3, 0, { title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       if (this.$hasPermissions('M_warehousingConfirmationList_costPrice')) { // 成本价权限
-        arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '7%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
+
       return arr
     }
   },
@@ -166,6 +177,7 @@ export default {
     resetSearchForm () {
       this.queryParam.stockPutNo = ''
       this.queryParam.auditState = undefined
+      this.queryParam.warehouseSn = undefined
       this.$refs.table.refresh(true)
     },
     // 详情

+ 24 - 1
src/views/inventoryManagement/inventoryCheck/addModal.vue

@@ -15,6 +15,15 @@
           <h3>全盘盘点</h3>
           <p>全盘是指所有有过入库记录的产品都参与盘点</p>
           <p>确定创建新的盘点单吗?</p>
+          <p v-show="isShowWarehouse">
+            仓库:<warehouse
+                    style="width:200px;"
+                    v-model="form.warehouseSn"
+                    isPermission
+                    id="inventoryCheckAddModal-warehouseSn"
+                    placeholder="请选择仓库"
+                  />
+          </p>
         </div>
         <div class="btn-cont">
           <a-button type="primary" id="inventoryCheckAddModal-save" @click="handleSave">确定</a-button>
@@ -26,9 +35,13 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import { checkWarehouseSave } from '@/api/checkWarehouse'
+import warehouse from '@/views/common/chooseWarehouse.js'
 export default {
   name: 'ProductInfoDetailModal',
+  mixins: [commonMixin],
+  components:{warehouse},
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -38,14 +51,19 @@ export default {
   data () {
     return {
       spinning: false,
+      form:{warehouseSn:undefined},
       isShow: this.openModal //  是否打开弹框
     }
   },
   methods: {
     // 确定
     handleSave () {
+      if(this.isShowWarehouse && !this.form.warehouseSn){
+        this.$message.error('请选择仓库')
+        return
+      }
       this.spinning = true
-      checkWarehouseSave({}).then(res => {
+      checkWarehouseSave(this.form).then(res => {
         this.spinning = false
         if (res.status == 200) {
           this.$message.success('盘点单新增成功')
@@ -63,7 +81,12 @@ export default {
     //  重定义的弹框状态
     isShow (newValue, oldValue) {
       if (!newValue) {
+        this.form.warehouseSn = undefined
         this.$emit('close')
+      }else{
+        // 默认仓库
+        const defWareHouse = this.$store.state.app.defWarehouse
+        this.form.warehouseSn = this.isShowWarehouse ? undefined : (defWareHouse?defWareHouse.warehouseSn:undefined)
       }
     }
   }

+ 7 - 8
src/views/inventoryManagement/inventoryCheck/detail.vue

@@ -13,10 +13,11 @@
       <a-card size="small" :bordered="false" class="inventoryCheckDetail-cont">
         <a-collapse>
           <a-collapse-panel key="1" header="基础信息">
-            <a-descriptions :column="3">
+            <a-descriptions :column="4">
               <a-descriptions-item label="创建人">{{ (detail&&detail.creatorName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="创建时间">{{ (detail&&detail.createDate) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点类型">{{ (detail&&detail.checkTypeDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="仓库">{{ (detail&&detail.warehouseName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点状态">{{ (detail&&detail.checkStateDictValue) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点人">{{ (detail&&detail.checkPersonName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点时间">{{ (detail&&detail.checkTime) || '--' }}</a-descriptions-item>
@@ -51,10 +52,8 @@
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="8" :sm="24">
-                    <a-form-model-item style="margin-bottom: 10px;">
-                      <a-button type="primary" @click="getList(1)" :disabled="disabled" id="inventoryCheckDetail-refresh">查询</a-button>
-                      <a-button style="margin-left: 5px" @click="resetSearchForm" id="inventoryCheckDetail-reset">重置</a-button>
-                    </a-form-model-item>
+                    <a-button type="primary" @click="getList(1)" :disabled="disabled" id="inventoryCheckDetail-refresh">查询</a-button>
+                    <a-button style="margin-left: 5px" @click="resetSearchForm" id="inventoryCheckDetail-reset">重置</a-button>
                   </a-col>
                 </a-row>
               </a-form-model>
@@ -188,7 +187,8 @@ export default {
         pageNo: this.paginationProps.current,
         pageSize: this.paginationProps.pageSize,
         checkWarehouseSn: this.$route.params.sn,
-        productCode: this.queryParam.productCode
+        productCode: this.queryParam.productCode,
+        // checkWarehouseSn: this.detail.warehouseSn
       }
       this.loading = true
       checkWarehouseDetailList(params).then(res => {
@@ -241,6 +241,7 @@ export default {
       checkWarehouseDetail({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detail = res.data
+          this.resetSearchForm()
         } else {
           this.detail = null
         }
@@ -273,14 +274,12 @@ export default {
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.resetSearchForm()
       this.getDetail()
     }
   },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
-      this.resetSearchForm()
       this.getDetail()
     }
   },

+ 32 - 20
src/views/inventoryManagement/inventoryCheck/list.vue

@@ -16,7 +16,17 @@
                 <a-input id="inventoryCheckList-checkWarehouseNo" v-model.trim="queryParam.checkWarehouseNo" allowClear placeholder="请输入盘点单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24" v-show="isShowWarehouse">
+              <a-form-item label="仓库">
+                <warehouse
+                  v-model="queryParam.warehouseSn"
+                  isPermission
+                  id="inventoryCheckList-warehouseSn"
+                  placeholder="请选择仓库"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
               <a-form-item label="盘点状态">
                 <v-select
                   v-model="queryParam.checkState"
@@ -28,7 +38,7 @@
                 ></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="监盘状态">
                 <v-select
                   v-model="queryParam.checkSuperviseState"
@@ -94,11 +104,12 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import inventoryCheckAddModal from './addModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { checkWarehouseList, checkWarehouseStartCheck } from '@/api/checkWarehouse'
 export default {
   name: 'InventoryCheckList',
   mixins: [commonMixin],
-  components: { STable, VSelect, inventoryCheckAddModal, commonModal },
+  components: { STable, VSelect, inventoryCheckAddModal, commonModal, warehouse },
   data () {
     return {
       spinning: false,
@@ -107,6 +118,7 @@ export default {
         deleteFlag: this.$route.params.type,
         checkWarehouseNo: '',
         checkState: undefined,
+        warehouseSn: undefined,
         checkSuperviseState: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
@@ -141,35 +153,34 @@ export default {
   },
   computed: {
     columns () {
-      let arr = []
-      if (this.queryParam.deleteFlag == '0') { // 正常
-        arr = [
+      let arr = [
           { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-          { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '14%', align: 'center' },
+          { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '10%', align: 'center' },
+          // { title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '12%', customRender: function (text) { return text || '--' }, ellipsis: true },
+          { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
           { title: '盘点提交时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '监盘人', dataIndex: 'checkSupervisePersonName', align: 'center', width: '12%', customRender: function (text) { return text || '--' }, ellipsis: true },
+          { title: '监盘人', dataIndex: 'checkSupervisePersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
           { title: '监盘提交时间', dataIndex: 'checkSuperviseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        ]
+
+      if (this.queryParam.deleteFlag == '0') { // 正常
+        arr = arr.concat([
           { title: '财务确认时间', dataIndex: 'financeAuditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '盘点单创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-        ]
+        ])
       } else if (this.queryParam.deleteFlag == '1') { // 已作废
-        arr = [
-          { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-          { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '14%', align: 'center' },
-          { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '12%', customRender: function (text) { return text || '--' }, ellipsis: true },
-          { title: '盘点提交时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '监盘人', dataIndex: 'checkSupervisePersonName', align: 'center', width: '12%', customRender: function (text) { return text || '--' }, ellipsis: true },
-          { title: '监盘提交时间', dataIndex: 'checkSuperviseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        arr = arr.concat([
           { title: '盘点单创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '盘点单作废时间', dataIndex: 'deleteTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
           { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-        ]
+        ])
+      }
+
+      if(this.isShowWarehouse){
+        arr.splice(2,0,{ title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       return arr
     }
@@ -219,6 +230,7 @@ export default {
       this.queryParam.checkWarehouseNo = ''
       this.queryParam.checkState = undefined
       this.queryParam.checkSuperviseState = undefined
+      this.queryParam.warehouseSn = undefined
       this.$refs.table.refresh(true)
     },
     closeModal () {

+ 8 - 7
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -7,7 +7,7 @@
     title="库存详情"
     v-model="isShow"
     @cancel="isShow=false"
-    :width="960">
+    width="80%">
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
@@ -64,6 +64,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].productOrigCode = data.list[i].productOrigCode.trim()
             }
             this.disabled = false
             // 总计
@@ -94,12 +95,12 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', width: '31%', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库时间', dataIndex: 'putTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: '6%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', width: '22%', ellipsis: true, customRender: function (text) { return text || '--' }, ellipsis: true},
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text ? text : '--' } },
+        { title: '入库时间', dataIndex: 'putTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '库存数量', dataIndex: 'currentQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_inventoryQuery_detail_costPrice')) { // 成本价权限

+ 20 - 7
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -32,6 +32,15 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
+                <a-form-item label="仓库">
+                  <warehouse
+                    v-model="queryParam.warehouseSn"
+                    id="inventoryQueryList-warehouseSn"
+                    placeholder="请选择仓库"
+                  />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
                 <a-form-item label="库存情况">
                   <a-checkbox v-model="queryParam.zeroQtyFlag" id="inventoryQueryList-zeroQtyFlag">只查看有库存</a-checkbox>
                 </a-form-item>
@@ -111,11 +120,12 @@ import exportExcelModal from './exportExcelModal.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { stockList, stockCount, stockExport } from '@/api/stock'
 export default {
   name: 'InventoryQueryList',
   mixins: [commonMixin],
-  components: { STable, VSelect, inventoryQueryDetailModal, exportExcelModal, ProductType, ProductBrand },
+  components: { STable, VSelect, inventoryQueryDetailModal, exportExcelModal, ProductType, ProductBrand, warehouse },
   data () {
     return {
       spinning: false,
@@ -126,6 +136,7 @@ export default {
         productName: '', //  产品名称
         productOrigCode: '', //  原厂编码
         productBrandSn: undefined, //  产品品牌
+        warehouseSn: undefined, // 仓库
         productTypeSn1: '', //  产品分类1
         productTypeSn2: '', //  产品分类2
         productTypeSn3: '', //  产品分类3
@@ -187,14 +198,15 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '货位编号', dataIndex: 'stackPlaceEntity.stackPlaceCode', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '20%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '最后入库时间', dataIndex: 'lastStockTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '最后入库时间', dataIndex: 'lastStockTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '可用库存数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+        { title: '产品品牌', dataIndex: 'productBrandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '可用库存数量', dataIndex: 'currentStockQty', width: '8%', align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       if (this.$hasPermissions('M_inventoryQueryList_costPrice')) { // 成本价权限
-        arr.splice(7, 0, { title: '可用库存成本', dataIndex: 'currentStockCost', width: '10%', align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8, 0, { title: '可用库存成本', dataIndex: 'currentStockCost', width: '8%', align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }
@@ -209,6 +221,7 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.productOrigCode = ''
       this.queryParam.productName = ''
+      this.queryParam.warehouseSn = undefined
       this.queryParam.zeroQtyFlag = false
       this.productType = []
       this.$refs.table.refresh(true)
@@ -236,7 +249,7 @@ export default {
     },
     //  出入库明细
     goWarehouseDetail (row) {
-      this.$router.push({ path: `/inventoryManagement/inventoryQuery/warehouseDetail/${row.productSn}` })
+      this.$router.push({ path: `/inventoryManagement/inventoryQuery/warehouseDetail/${row.productSn}/${row.warehouseSn}` })
     },
     // 导出Excel
     handleExcelOk (exportType) {

+ 12 - 32
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -34,13 +34,6 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
-                <a-form-item label="仓库">
-                  <a-select id="inventoryQueryWarehouseDetail-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
-                    <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-item>
-              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="单据审核时间">
                   <rangeDate ref="rangeDate" @change="dateChange" />
@@ -139,7 +132,6 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { stockFlowCount, stockFlowList, stockFlowExport } from '@/api/stock'
-import { warehouseAllList } from '@/api/warehouse'
 export default {
   name: 'InventoryQueryWarehouseDetail',
   mixins: [commonMixin],
@@ -165,7 +157,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const params = Object.assign(parameter, this.queryParam, { productSn: this.$route.params.sn })
+        const params = Object.assign(parameter, this.queryParam, { productSn: this.$route.params.sn, warehouseSn: this.$route.params.warehouseSn })
         return stockFlowList(params).then(res => {
           let data
           if (res.status == 200) {
@@ -187,7 +179,6 @@ export default {
         })
       },
       exportLoading: false,
-      warehouseList: [], //  仓库  下拉数据
       productTotal: null //  合计
     }
   },
@@ -197,26 +188,26 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '14%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '批次号', dataIndex: 'stockBatchNo', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '关联单号', dataIndex: 'bizNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '下推单号', dataIndex: 'bizSubNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下推单号', dataIndex: 'bizSubNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据审核时间', dataIndex: 'auditTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位名称', dataIndex: 'unitName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouseName', width: '4%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: '4%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '数量', scopedSlots: { customRender: 'qty' }, width: '4%', align: 'center' },
-        { title: '出入库状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '数量', scopedSlots: { customRender: 'qty' }, width: '5%', align: 'center' },
+        { title: '出入库状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
         // { title: '总成本', dataIndex: 'totalCost', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '总售价', dataIndex: 'totalPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_inventoryQuery_rkDetail_costPrice')) { // 成本价权限
-        arr.splice(13, 0, { title: '总成本', dataIndex: 'totalCost', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(13, 0, { title: '总成本', dataIndex: 'totalCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       if (this.$hasPermissions('B_inventoryQuery_rkDetail_salesPrice')) { // 售价权限
-        arr.splice(arr.length, 0, { title: '总售价', width: '4%', align: 'right', scopedSlots: { customRender: 'totalAmount' } })
+        arr.splice(arr.length, 0, { title: '总售价', width: '5%', align: 'right', scopedSlots: { customRender: 'totalAmount' } })
       }
       return arr
     }
@@ -255,7 +246,7 @@ export default {
     handleExcel () {
       const _this = this
       this.$store.state.app.curActionPermission = 'B_inventoryQuery_rkDetail_export'
-      const params = Object.assign(this.queryParam, { productSn: this.$route.params.sn })
+      const params = Object.assign(this.queryParam, { productSn: this.$route.params.sn, warehouseSn: this.$route.params.warehouseSn })
       this.exportLoading = true
       this.spinning = true
       hdExportExcel(stockFlowExport, params, '出入库明细', function () {
@@ -268,22 +259,11 @@ export default {
     handleBack () {
       this.$router.push({ path: '/inventoryManagement/inventoryQuery/list', query: { closeLastOldTab: true } })
     },
-    // 仓库下拉数据
-    getWarehouseList (type) {
-      warehouseAllList({}).then(res => {
-        if (res.status == 200) {
-          this.warehouseList = res.data
-        } else {
-          this.warehouseList = []
-        }
-      })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      this.getWarehouseList()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 40 - 19
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -31,6 +31,16 @@
                   <ProductType id="inventoryWarningList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+                <a-form-item label="仓库">
+                  <warehouse
+                    v-model="queryParam.warehouseSn"
+                    isPermission
+                    id="inventoryWarningList-warehouseSn"
+                    placeholder="请选择仓库"
+                  />
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="预警提示">
                   <v-select
@@ -68,7 +78,7 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :row-selection="$hasPermissions('B_inventoryWarning_refresh')?{ columnWidth: 40 }:null"
+        :row-selection="$hasPermissions('B_inventoryWarning_refresh')?{ columnWidth: '4%' }:null"
         :rowKey="(record) => record.id"
         @rowSelection="rowSelectionFun"
         :columns="columns"
@@ -158,10 +168,11 @@ import { STable, VSelect } from '@/components'
 import { stockWarnList, stockWarnSaveBatch } from '@/api/stock'
 import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
+import warehouse from '@/views/common/chooseWarehouse.js'
 export default {
   name: 'InventoryWarningList',
   mixins: [commonMixin],
-  components: { STable, VSelect, ProductBrand, ProductType },
+  components: { STable, VSelect, ProductBrand, ProductType, warehouse },
   data () {
     return {
       spinning: false,
@@ -175,27 +186,12 @@ export default {
         productTypeSn1: undefined,
         productTypeSn2: undefined,
         productTypeSn3: undefined,
-        stockState: undefined
+        stockState: undefined,
+        warehouseSn: undefined
       },
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
       productType: [],
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '12.5%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '7%', 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' },
-        // { title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 110, align: 'center' },
-        { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: '9.5%', align: 'center' },
-        { title: '总库存数(个)', dataIndex: 'currentStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: '9.5%', align: 'center' },
-        { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: '9.5%', align: 'center' },
-        { title: '差异数量', dataIndex: 'differenceNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '预警提示', scopedSlots: { customRender: 'stockState' }, width: '6%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -226,6 +222,30 @@ export default {
       rowSelectionInfo: null
     }
   },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '12%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '7%', 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' },
+        { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: '6%', align: 'center' },
+        { title: '总库存数(个)', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: '6%', align: 'center' },
+        { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: '6%', align: 'center' },
+        { title: '差异数量', dataIndex: 'differenceNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '预警提示', scopedSlots: { customRender: 'stockState' }, width: '6%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+      ]
+      if(this.isShowWarehouse){
+        arr.splice(6, 0, { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 表格选中项
     rowSelectionFun (obj) {
@@ -308,6 +328,7 @@ export default {
       this.queryParam.productTypeSn2 = undefined
       this.queryParam.productTypeSn3 = undefined
       this.queryParam.stockState = undefined
+      this.queryParam.warehouseSn = undefined
       this.productType = []
       this.$refs.table.refresh(true)
     },

+ 2 - 3
src/views/inventoryManagement/makeInventory/check.vue

@@ -28,6 +28,7 @@
               <a-descriptions-item label="创建时间">{{ (detail&&detail.createDate) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点类型">{{ (detail&&detail.checkTypeDictValue) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点状态">{{ (detail&&detail.checkStateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="仓库">{{ (detail&&detail.warehouseName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点人">{{ (detail&&detail.checkPersonName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点时间">{{ (detail&&detail.checkTime) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="监盘状态">{{ (detail&&detail.checkSuperviseStateDictValue) || '--' }}</a-descriptions-item>
@@ -67,10 +68,8 @@
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="8" :sm="24">
-                    <a-form-model-item style="margin-bottom: 10px;">
-                      <a-button type="primary" @click="getList(1)" :disabled="disabled" id="makeInventoryCheck-refresh">查询</a-button>
+                    <a-button type="primary" @click="getList(1)" :disabled="disabled" id="makeInventoryCheck-refresh">查询</a-button>
                       <a-button style="margin-left: 5px" @click="resetSearchForm" id="makeInventoryCheck-reset">重置</a-button>
-                    </a-form-model-item>
                   </a-col>
                 </a-row>
               </a-form-model>

+ 35 - 12
src/views/inventoryManagement/makeInventory/list.vue

@@ -10,6 +10,16 @@
                 <a-input id="makeInventoryList-checkWarehouseNo" v-model.trim="queryParam.checkWarehouseNo" allowClear placeholder="请输入盘点单号"/>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+              <a-form-item label="仓库">
+                <warehouse
+                  v-model="queryParam.warehouseSn"
+                  id="inventoryCheckList-warehouseSn"
+                  isPermission
+                  placeholder="请选择仓库"
+                />
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="makeInventoryList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="makeInventoryList-reset">重置</a-button>
@@ -48,11 +58,12 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { checkWarehouseList } from '@/api/checkWarehouse'
 export default {
   name: 'MakeInventoryList',
   mixins: [commonMixin],
-  components: { STable, VSelect },
+  components: { STable, VSelect, warehouse },
   data () {
     return {
       spinning: false,
@@ -60,19 +71,9 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       queryParam: { //  查询条件
         deleteFlag: '0',
+        warehouseSn: undefined,
         checkWarehouseNo: ''
       },
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '18%', align: 'center' },
-        { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品款数', dataIndex: 'productTotalCategory', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存数量', dataIndex: 'totalStockQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点数量', dataIndex: 'checkTotalQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点盈亏数量', dataIndex: 'totalProfitLossQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点单创建时间', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -93,12 +94,34 @@ export default {
       }
     }
   },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '12%', align: 'center' },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品款数', dataIndex: 'productTotalCategory', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存数量', dataIndex: 'totalStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点数量', dataIndex: 'checkTotalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点盈亏数量', dataIndex: 'totalProfitLossQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点单创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      if(this.isShowWarehouse){
+        arr.splice(2, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 盘点
     handleCheck (row) {
       this.$router.push({ path: `/inventoryManagement/makeInventory/check/${row.checkWarehouseSn}` })
     },
     resetSearchForm () {
+      this.queryParam.warehouseSn = undefined
       this.queryParam.checkWarehouseNo = ''
       this.$refs.table.refresh(true)
     },

+ 2 - 3
src/views/inventoryManagement/supervisionDisk/check.vue

@@ -28,6 +28,7 @@
               <a-descriptions-item label="创建时间">{{ (detail&&detail.createDate) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点类型">{{ (detail&&detail.checkTypeDictValue) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点状态">{{ (detail&&detail.checkStateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="仓库">{{ (detail&&detail.warehouseName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点人">{{ (detail&&detail.checkPersonName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="盘点时间">{{ (detail&&detail.checkTime) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="监盘状态">{{ (detail&&detail.checkSuperviseStateDictValue) || '--' }}</a-descriptions-item>
@@ -68,10 +69,8 @@
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="8" :sm="24">
-                    <a-form-model-item style="margin-bottom: 10px;">
-                      <a-button type="primary" @click="getList(1)" :disabled="disabled" id="supervisionDiskCheck-refresh">查询</a-button>
+                    <a-button type="primary" @click="getList(1)" :disabled="disabled" id="supervisionDiskCheck-refresh">查询</a-button>
                       <a-button style="margin-left: 5px" @click="resetSearchForm" id="supervisionDiskCheck-reset">重置</a-button>
-                    </a-form-model-item>
                   </a-col>
                 </a-row>
               </a-form-model>

+ 38 - 15
src/views/inventoryManagement/supervisionDisk/list.vue

@@ -10,6 +10,16 @@
                 <a-input id="supervisionDiskList-checkWarehouseNo" v-model.trim="queryParam.checkWarehouseNo" allowClear placeholder="请输入盘点单号"/>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+              <a-form-item label="仓库">
+                <warehouse
+                  v-model="queryParam.warehouseSn"
+                  id="supervisionDiskList-warehouseSn"
+                  isPermission
+                  placeholder="请选择仓库"
+                />
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="supervisionDiskList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="supervisionDiskList-reset">重置</a-button>
@@ -48,11 +58,12 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { checkWarehouseList } from '@/api/checkWarehouse'
 export default {
   name: 'SupervisionDiskList',
   mixins: [commonMixin],
-  components: { STable, VSelect },
+  components: { STable, VSelect, warehouse },
   data () {
     return {
       spinning: false,
@@ -60,22 +71,9 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       queryParam: { //  查询条件
         deleteFlag: '0',
+        warehouseSn: undefined,
         checkWarehouseNo: ''
       },
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '15%', align: 'center' },
-        { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '12%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '盘点时间', dataIndex: 'checkTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品款数', dataIndex: 'productTotalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存数量', dataIndex: 'totalStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点数量', dataIndex: 'checkTotalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '监盘数量', dataIndex: 'checkSuperviseTotalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '监盘盈亏数量', dataIndex: 'totalProfitLossQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -96,12 +94,37 @@ export default {
       }
     }
   },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '10%', align: 'center' },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '盘点状态', dataIndex: 'checkStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '盘点人', dataIndex: 'checkPersonName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '盘点时间', dataIndex: 'checkTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '监盘状态', dataIndex: 'checkSuperviseStateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存数量', dataIndex: 'totalStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点数量', dataIndex: 'checkTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '监盘数量', dataIndex: 'checkSuperviseTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '监盘盈亏数量', dataIndex: 'totalProfitLossQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
+      ]
+      if(this.isShowWarehouse){
+        arr.splice(2, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 监盘
     handleCheck (row) {
       this.$router.push({ path: `/inventoryManagement/supervisionDisk/check/${row.checkWarehouseSn}` })
     },
     resetSearchForm () {
+      this.queryParam.warehouseSn = undefined
       this.queryParam.checkWarehouseNo = ''
       this.$refs.table.refresh(true)
     },

+ 34 - 12
src/views/productManagement/shelfNoManage/list.vue

@@ -31,6 +31,16 @@
                   <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="shelfNoMan-productType"></productTypeAll>
                 </a-form-item>
               </a-col>
+              <!-- <a-col :md="4" :sm="24" v-show="isShowWarehouse">
+                <a-form-item label="仓库">
+                  <warehouse
+                    v-model="queryParam.product.warehouseSn"
+                    isPermission
+                    id="shelfNoMan-warehouseSn"
+                    placeholder="请选择仓库"
+                  />
+                </a-form-item>
+              </a-col> -->
               <a-col :md="4" :sm="24">
                 <a-form-item label="产品状态">
                   <v-select code="PRODUCT_STATUS" id="shelfNoMan-state" v-model="queryParam.product.state" allowClear placeholder="请选择产品状态"></v-select>
@@ -138,11 +148,12 @@ import productTypeAll from '@/views/common/productTypeAll.js'
 import { exportExcel } from '@/libs/JGPrint.js'
 import ImportGuideModal from './importGuideModal.vue'
 import changeRecordModal from './changeRecordModal.vue'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { queryStackPlaceQueryPage, stackPlaceExport, stackPlaceInsertImport } from '@/api/product'
 export default {
   name: 'ProductInfoList',
   mixins: [commonMixin],
-  components: { STable, VSelect, editHwModal, ProductBrand, productTypeAll, ImportGuideModal, changeRecordModal },
+  components: { STable, VSelect, editHwModal, ProductBrand, productTypeAll, ImportGuideModal, changeRecordModal, warehouse },
   data () {
     return {
       spinning: false,
@@ -160,23 +171,13 @@ export default {
           productTypeSn1: '', //  产品一级分类
           productTypeSn2: '', //  产品二级分类
           productTypeSn3: '', //  产品三级分类
+          warehouseSn: undefined, // 仓库
           state: undefined //  产品状态
         }
       },
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productVO.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productVO.name', align: 'center', width: '30%', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productVO.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productVO.productBrandName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
-        { title: '产品状态', dataIndex: 'productVO.stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '货位编号', dataIndex: 'stackPlaceCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
-      ],
       loadingAudit: false,
       loadingLaunch: false,
       loadingDownline: false,
@@ -204,6 +205,26 @@ export default {
       pageFromInfo: null
     }
   },
+  computed: {
+	  columns () {
+	    const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productVO.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productVO.name', align: 'center', width: '20%', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productVO.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productVO.productBrandName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品状态', dataIndex: 'productVO.stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '货位编号', dataIndex: 'stackPlaceCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
+      ]
+      if (this.isShowWarehouse) {
+        // arr.splice(6, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+	    return arr
+	  }
+  },
   methods: {
     // 导入产品
     hanldeOk (obj) {
@@ -226,6 +247,7 @@ export default {
           productTypeSn1: '', //  产品一级分类
           productTypeSn2: '', //  产品二级分类
           productTypeSn3: '', //  产品三级分类
+          warehouseSn: undefined, // 仓库
           state: undefined //  产品状态
         }
       }

+ 15 - 2
src/views/purchasingManagement/bulkWarehousingOrder/basicInfoModal.vue

@@ -28,6 +28,14 @@
             placeholder="请选择入库类型"
             allowClear></v-select>
         </a-form-model-item>
+        <a-form-model-item label="入库仓库" prop="warehouseSn" v-show="isShowWarehouse">
+          <warehouse
+            v-model="form.warehouseSn"
+            isPermission
+            id="bulkWarehousingOrder-basicInfo-warehouseSn"
+            placeholder="请选择入库仓库"
+          />
+        </a-form-model-item>
         <a-form-model-item label="关联单号" prop="relationNo">
           <a-input
             id="bulkWarehousingOrder-relationNo"
@@ -57,11 +65,12 @@
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
 import { sparePartsSave } from '@/api/spareParts'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import supplier from '@/views/common/supplier.js'
 export default {
   name: 'BulkWarehousingOrderBasicInfoModal',
   mixins: [commonMixin],
-  components: { VSelect, supplier },
+  components: { VSelect, supplier, warehouse },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -79,6 +88,7 @@ export default {
       form: {
         supplierSn: undefined, // 供应商
         sparePartsType: undefined, //  散件类型
+        warehouseSn: undefined, // 仓库
         relationNo: '', //  关联单号
         remark: '' // 备注
       },
@@ -88,7 +98,8 @@ export default {
         ],
         sparePartsType: [
           { required: true, message: '请选择入库类型', trigger: 'change' }
-        ]
+        ],
+        warehouseSn: [{ required: true, message: '请选择入库仓库', trigger: 'change' }],
       },
       supplierList: [] //  供应商  下拉数据
     }
@@ -130,6 +141,8 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.ruleForm.resetFields()
+      }else{
+        this.form.warehouseSn = this.isShowWarehouse ? undefined : this.defWarehouse.warehouseSn
       }
     }
   }

+ 1 - 0
src/views/purchasingManagement/bulkWarehousingOrder/detailModal.vue

@@ -22,6 +22,7 @@
           <a-descriptions :column="3">
             <a-descriptions-item label="供应商">{{ (productTotal&&productTotal.supplierName) || '--' }}</a-descriptions-item>
             <a-descriptions-item label="入库类型">{{ (productTotal&&productTotal.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="入库仓库">{{ (productTotal&&productTotal.warehouseName) || '--' }}</a-descriptions-item>
             <a-descriptions-item label="入库单号">{{ (productTotal&&productTotal.sparePartsNo) || '--' }}</a-descriptions-item>
           </a-descriptions>
         </a-collapse-panel>

+ 2 - 1
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -18,6 +18,7 @@
             <a-descriptions :column="3">
               <a-descriptions-item label="供应商">{{ (productTotal&&productTotal.supplierName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="入库类型">{{ (productTotal&&productTotal.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="入库仓库">{{ (productTotal&&productTotal.warehouseName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="入库单号">{{ (productTotal&&productTotal.sparePartsNo) || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
@@ -116,7 +117,7 @@ import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import sparePartsProductModal from './productModal.vue'
 import ImportGuideModal from './importGuideModal.vue'
-import { sparePartsDetailList, sparePartsPageCount, sparePartsDeleteDetail, sparePartsDetailBatchInsert } from '@/api/spareParts'
+import { sparePartsDetailList, sparePartsPageCount, sparePartsDeleteDetail, sparePartsDetailBatchInsert, sparePartsSave } from '@/api/spareParts'
 export default {
   name: 'BulkWarehousingOrderEdit',
   mixins: [commonMixin],

+ 26 - 8
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -41,6 +41,16 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
+            <a-col :md="4" :sm="24" v-show="isShowWarehouse">
+                <a-form-item label="入库仓库">
+                  <warehouse
+                    v-model="queryParam.warehouseSn"
+                    isPermission
+                    id="salesReturn-warehouseSn"
+                    placeholder="请选择入库仓库"
+                  />
+                </a-form-item>
+              </a-col>
             <a-col :md="4" :sm="24">
               <a-form-item label="状态">
                 <v-select
@@ -94,7 +104,7 @@
         size="small"
         :rowKey="(record) => record.sparePartsSn"
         rowKeyName="sparePartsSn"
-        :row-selection="$hasPermissions('B_sparePartsBatchAudit')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state != 'WAIT_AUDIT' } }) }:null"
+        :row-selection="$hasPermissions('B_sparePartsBatchAudit')?{ columnWidth: '4%', getCheckboxProps: record => ({ props: { disabled: record.state != 'WAIT_AUDIT' } }) }:null"
         @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
@@ -148,6 +158,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import sparePartsDetailModal from './detailModal.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import auditNoPassModal from './auditNoPassModal.vue'
@@ -157,7 +168,7 @@ import { sparePartsList, sparePartsDelete, sparePartsAudit, sparePartsAuditVerif
 export default {
   name: 'BulkWarehousingOrderList',
   mixins: [commonMixin],
-  components: { STable, VSelect, basicInfoModal, sparePartsDetailModal, reportModal, auditNoPassModal, batchAuditNoModal },
+  components: { STable, VSelect, basicInfoModal, sparePartsDetailModal, reportModal, auditNoPassModal, batchAuditNoModal, warehouse },
   data () {
     return {
       spinning: false,
@@ -174,6 +185,7 @@ export default {
         relationNo: '',
         state: undefined,
         sparePartsType: undefined,
+        warehouseSn: undefined,
         sparePartsNo: '',
         supplierName: '',
         kingdeeNo: ''
@@ -206,20 +218,25 @@ export default {
 	  columns () {
 	    const arr = [
 	      { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-	      { title: '入库单号', scopedSlots: { customRender: 'sparePartsNo' }, width: '15%', align: 'center' },
-	      { title: '商户名称', dataIndex: 'supplierName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
+	      { title: '入库单号', scopedSlots: { customRender: 'sparePartsNo' }, width: '10%', align: 'center' },
+	      { title: '商户名称', dataIndex: 'supplierName', align: 'center', width: '12%', customRender: function (text) { return text || '--' }, ellipsis: true },
 	      { title: '入库数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
 	      // { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
 	      { title: '入库类型', dataIndex: 'sparePartsTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-	      { title: '关联单号', dataIndex: 'relationNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-	      { title: '金蝶单号', dataIndex: 'kingdeeNo', width: '12.5%', align: 'center', customRender: function (text) { return text || '--' } },
-	      { title: '状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-	      { title: '备注', dataIndex: 'remark', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+	      // { title: '入库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'relationNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+	      { title: '金蝶单号', dataIndex: 'kingdeeNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+	      { title: '状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+	      { title: '备注', dataIndex: 'remark', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
 	      { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
 	    ]
+      
 	    if (this.$hasPermissions('M_bulkWarehousingOrderList_costPrice')) { //  成本价权限
 	      arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
 	    }
+      if (this.isShowWarehouse) {
+        arr.splice(this.$hasPermissions('M_bulkWarehousingOrderList_costPrice')?6:5, 0, { title: '入库仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
 	    return arr
 	  }
   },
@@ -292,6 +309,7 @@ export default {
         relationNo: '',
         state: undefined,
         sparePartsType: undefined,
+        warehouseSn: undefined, // 仓库
         sparePartsNo: '',
         supplierName: '',
         kingdeeNo: ''

+ 36 - 63
src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue

@@ -39,17 +39,19 @@
         </a-form-model-item>
         <a-form-model-item label="产品名称" prop="productName">{{ form.productName || '--' }}</a-form-model-item>
         <a-form-model-item label="原厂编码" prop="productOrigCode">{{ form.productOrigCode || '--' }}</a-form-model-item>
-        <a-form-model-item label="仓库仓位" prop="warehouse">
-          <a-cascader
-            @change="changeWarehouseCascade"
-            v-model="form.warehouse"
-            expand-trigger="hover"
-            :allowClear="false"
-            :options="warehouseCascadeData"
-            :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+        <a-form-model-item label="仓库仓位" prop="warehouseLocationSn">
+          {{ (nowData&&nowData.warehouseName) || '--' }} > 
+            <a-select 
             id="bulkWarehousingOrder-product-warehouse"
-            placeholder="请选择仓库仓位"
-            style="width: 100%;" />
+             @change="changeWarehouseCascade" 
+             placeholder="请选择仓位" 
+             :allowClear="false" 
+             style="width: 50%;" 
+             v-model="form.warehouseLocationSn">
+              <a-select-option v-for="item in warehouseCascadeData" :value="item.sn">
+                {{ item.name }}
+              </a-select-option>
+            </a-select> 
         </a-form-model-item>
         <a-form-model-item label="成本价">
           <span style="margin-right:20px;">{{ form.productCost ? toThousands(form.productCost) : '--' }}</span>
@@ -117,9 +119,8 @@ export default {
         productName: '',
         productCode: '',
         productOrigCode: '',
-        warehouse: [],
         warehouseSn: '',
-        warehouseLocationSn: '',
+        warehouseLocationSn: undefined,
         productCost: '',
         productQty: ''
       },
@@ -128,8 +129,8 @@ export default {
         productSn: [
           { required: true, message: '请选择产品编码', trigger: 'change' }
         ],
-        warehouse: [
-          { required: true, message: '请选择仓库仓位', trigger: 'change' }
+        warehouseLocationSn: [
+          { required: true, message: '请选择仓位', trigger: 'change' }
         ],
         productCost: [
           { required: true, message: '该产品没有设置成本价', trigger: 'blur' }
@@ -143,7 +144,6 @@ export default {
       warehouseCascadeData: [], //  仓库仓位  下拉数据
       warehouseSnBackups: '', //  仓库备份数据
       warehouseLocationSnBackups: '', //  仓位备份数据
-      defaultWarehouseCascade: [], //  默认仓库仓位
       isGift: false
     }
   },
@@ -191,7 +191,6 @@ export default {
           const data = res.data
           this.form = Object.assign(this.form, data)
           // this.fetchUser(this.form.productCode)
-          this.form.warehouse = [this.form.warehouseSn, this.form.warehouseLocationSn]
           this.warehouseSnBackups = this.form.warehouseSn || undefined
           this.warehouseLocationSnBackups = this.form.warehouseLocationSn || undefined
           this.isGift = this.form.giftFlag == 1
@@ -243,54 +242,32 @@ export default {
       })
     },
     changeWarehouseCascade (val) {
-      if (val.length < 2) {
-        this.$message.warning('当前仓库无仓位,请选择其他仓库')
-        this.form.warehouseSn = this.warehouseSnBackups
-        this.form.warehouseLocationSn = this.warehouseLocationSnBackups
-        if (this.warehouseSnBackups || this.warehouseLocationSnBackups) {
-          this.form.warehouse = [this.warehouseSnBackups, this.warehouseLocationSnBackups]
-        } else {
-          this.form.warehouse = []
-        }
-      } else {
-        this.form.warehouseSn = val[0] ? val[0] : ''
-        this.form.warehouseLocationSn = val[1] ? val[1] : ''
-        this.warehouseSnBackups = this.form.warehouseSn
-        this.warehouseLocationSnBackups = this.form.warehouseLocationSn
-      }
       this.$refs.productQty.focus()
+      this.$refs.ruleForm.validate()
     },
     //  仓库仓位  级联  列表
     getWarehouseCascade () {
       const _this = this
       warehouseCascadeList({}).then(res => {
         if (res.status == 200) {
-          res.data.filter(item => {
-            // 过滤默认仓库
-            if (item.defaultFlag == 1) { //  defaultFlag为1是默认仓库
-              _this.defaultWarehouseCascade[0] = item.warehouseSn
-              // 过滤默认仓位
-              item.warehouseLocationList.filter(subItem => {
-                if (subItem.defaultFlag == 1) {
-                  _this.defaultWarehouseCascade[1] = subItem.warehouseLocationSn
-                  _this.form.warehouse = _this.defaultWarehouseCascade
-                  _this.form.warehouseSn = _this.defaultWarehouseCascade[0] || undefined
-                  _this.form.warehouseLocationSn = _this.defaultWarehouseCascade[1] || undefined
-                  _this.warehouseSnBackups = _this.defaultWarehouseCascade[0] || undefined
-                  _this.warehouseLocationSnBackups = _this.defaultWarehouseCascade[1] || undefined
-                }
-              })
-            }
-          })
-          res.data.map(item => {
-            item.sn = item.warehouseSn
-            if (item.warehouseLocationList) {
-              item.warehouseLocationList.map(subItem => {
-                subItem.sn = subItem.warehouseLocationSn
-              })
-            }
-          })
-          this.warehouseCascadeData = res.data
+          // 默认仓库
+          const defSn = this.isShowWarehouse ? this.nowData.warehouseSn : this.defWarehouse&&this.defWarehouse.warehouseSn
+          _this.form.warehouseSn = defSn
+          _this.warehouseSnBackups = defSn
+          const data = res.data.find(item => item.warehouseSn == defSn)
+          console.log(data.warehouseLocationList)
+          if(data&&data.warehouseLocationList){
+            data.warehouseLocationList.map(subItem => {
+              subItem.sn = subItem.warehouseLocationSn
+              if(subItem.defaultFlag == 1){
+                _this.form.warehouseLocationSn = subItem.warehouseLocationSn
+                _this.warehouseLocationSnBackups = subItem.warehouseLocationSn
+              }
+            })
+            this.warehouseCascadeData = data.warehouseLocationList
+          }else{
+            this.warehouseCascadeData = []
+          }
         } else {
           this.warehouseCascadeData = []
         }
@@ -304,9 +281,8 @@ export default {
         productName: '',
         productCode: '',
         productOrigCode: '',
-        warehouse: [],
-        warehouseSn: '',
-        warehouseLocationSn: '',
+        warehouseSn: this.warehouseSnBackups,
+        warehouseLocationSn: this.warehouseLocationSnBackups,
         productCost: '',
         productQty: ''
       }
@@ -327,9 +303,6 @@ export default {
         this.warehouseSnBackups = ''
         this.warehouseLocationSnBackups = ''
       } else {
-        this.$nextTick(() => {
-          this.resetData()
-        })
         this.getWarehouseCascade()
       }
     },

+ 18 - 2
src/views/purchasingManagement/purchaseReturn/addModal.vue

@@ -28,6 +28,15 @@
             placeholder="请选择退货原因"
             allowClear></v-select>
         </a-form-model-item>
+        <a-form-model-item label="退货仓库" prop="warehouseSn" v-show="isShowWarehouse">
+          <warehouse
+            v-model="form.warehouseSn"
+            id="purchaseReturn-basicInfo-warehouseSn"
+            :disabled="itemSn?true:false"
+            isPermission
+            placeholder="请选择退货仓库"
+          />
+        </a-form-model-item>
         <a-form-model-item label="补充说明" prop="explainInfo">
           <a-textarea
             id="purchaseReturn"
@@ -63,11 +72,12 @@
 import { commonMixin } from '@/utils/mixin'
 import { VSelect, Upload } from '@/components'
 import supplier from '@/views/common/supplier.js'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { sparePartsReturnSave, sparePartsReturnInfo } from '@/api/sparePartsReturn'
 export default {
   name: 'PurchaseReturnBasicInfoModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, supplier },
+  components: { VSelect, Upload, supplier, warehouse },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -90,6 +100,7 @@ export default {
         supplierSn: undefined, // 供应商
         returnReason: '', // 退货原因
         explainInfo: '', // 补充说明
+        warehouseSn: undefined,
         attachmentList: ''
       },
       attachList: [], // 附件
@@ -99,7 +110,8 @@ export default {
         ],
         returnReason: [
           { required: true, message: '请选择退货原因', trigger: 'change' }
-        ]
+        ],
+        warehouseSn: [{ required: true, message: '请选择退货仓库', trigger: 'change' }],
       },
       attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo'
     }
@@ -147,6 +159,7 @@ export default {
             supplierSn: resultObj.supplierSn,
             returnReason: resultObj.returnReason, // 退货原因
             explainInfo: resultObj.explainInfo, // 补充说明
+            warehouseSn: resultObj.warehouseSn,
             sparePartsReturnSn: this.itemSn
           }
           this.$nextTick(() => {
@@ -177,6 +190,9 @@ export default {
       } else {
         if (this.itemSn) {
           this.getDetail()
+        }else{
+          // 默认仓库
+          this.form.warehouseSn = this.isShowWarehouse ? undefined : this.defWarehouse&&this.defWarehouse.warehouseSn
         }
       }
     }

+ 1 - 0
src/views/purchasingManagement/purchaseReturn/detailModal.vue

@@ -13,6 +13,7 @@
         <a-descriptions-item label="采购退货单号">{{ detailsData&&detailsData.sparePartsReturnNo || '--' }}</a-descriptions-item>
         <a-descriptions-item label="供应商名称">{{ detailsData&&detailsData.supplier&&detailsData.supplier.supplierName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="退货原因">{{ detailsData&&detailsData.returnReasonDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="退货仓库">{{ detailsData&&detailsData.warehouseName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="创建时间">{{ detailsData&&detailsData.createDate || '--' }}</a-descriptions-item>
         <a-descriptions-item label="出库时间" v-if="detailsData&&detailsData.state!='AUDIT_REJECT'">{{ detailsData&&detailsData.auditDate || '--' }}</a-descriptions-item>
         <a-descriptions-item label="出库时间" v-else>--</a-descriptions-item>

+ 24 - 8
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -31,6 +31,16 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+                <a-form-item label="退货仓库">
+                  <warehouse
+                    v-model="queryParam.warehouseSn"
+                    isPermission
+                    id="purchaseReturn-warehouseSn"
+                    placeholder="请选择退货仓库"
+                  />
+                </a-form-item>
+              </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="业务状态">
                 <v-select
@@ -152,11 +162,12 @@ import reviewProgressModal from './reviewProgressModal.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import supplier from '@/views/common/supplier.js'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import { sparePartsReturnList, sparePartsReturnDelete, sparePartsReturnExportDetail, againSubmit } from '@/api/sparePartsReturn'
 export default {
   name: 'PurchaseReturnList',
   mixins: [commonMixin],
-  components: { STable, supplier, VSelect, reportModal, detailModal, addModal, chooseDepartUserModal, rangeDate, reviewProgressModal },
+  components: { STable, supplier, VSelect, reportModal, detailModal, addModal, chooseDepartUserModal, rangeDate, reviewProgressModal, warehouse },
   data () {
     return {
       spinning: false,
@@ -174,6 +185,7 @@ export default {
         sparePartsReturnNo: undefined,
         supplierSn: undefined,
         returnReason: undefined,
+        warehouseSn: undefined, // 仓库
         state: undefined
       },
       // 加载数据方法 必须为 Promise 对象
@@ -204,17 +216,20 @@ export default {
       let _this=this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购退货单号', scopedSlots: { customRender: 'sparePartsReturnNo' }, width: '15%', align: 'center' },
-        { title: '供应商名称', dataIndex: 'supplier.supplierName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '退货原因', dataIndex: 'returnReasonDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购退货单号', scopedSlots: { customRender: 'sparePartsReturnNo' }, width: '9%', align: 'center' },
+        { title: '供应商名称', dataIndex: 'supplier.supplierName', align: 'center', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '退货原因', dataIndex: 'returnReasonDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '申请退货数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
+      if(this.isShowWarehouse){
+        arr.splice(5,0,{ title: '退货仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },)
+      }
       if (this.$hasPermissions('M_purchaseReturnList_costPrice')) { //  售价权限
-        arr.splice(6, 0, { title: '退货金额', dataIndex: 'totalCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(7, 0, { title: '退货金额', dataIndex: 'totalCost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr
     }
@@ -322,6 +337,7 @@ export default {
         sparePartsReturnNo: undefined,
         supplierSn: undefined,
         returnReason: undefined,
+        warehouseSn: undefined, // 仓库
         state: undefined
       }
       this.$refs.rangeDate.resetDate()

+ 5 - 4
src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue

@@ -17,11 +17,12 @@
               <a-icon type="edit" />
               编辑基础信息
             </div>
-            <a-descriptions size="small" :column="3" style="margin-bottom: 10px;">
+            <a-descriptions size="small" :column="4" style="margin-bottom: 10px;">
               <a-descriptions-item label="采购退货单号">{{ (detailsData && detailsData.sparePartsReturnNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="供应商名称">{{ (detailsData && detailsData.supplier && detailsData.supplier.supplierName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="退货原因">{{ (detailsData && detailsData.returnReasonDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="补充说明" :span="3">{{ (detailsData && detailsData.explainInfo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货仓库">{{ detailsData&&detailsData.warehouseName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="补充说明">{{ (detailsData && detailsData.explainInfo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="附件" :span="3">
                 <span v-if="detailsData && detailsData.attachmentList && detailsData.attachmentList.length > 0">
                   <a
@@ -458,10 +459,9 @@ export default {
       this.getStatisticsData()
       this.getBasicsData()
       this.resetSearchForm(true)
-      this.getChooseList()
     },
     getChooseList () {
-      this.$refs.partQuery.pageInit(this.supplierSn, this.sparePartsReturnSn)
+      this.$refs.partQuery.pageInit(this.supplierSn, this.sparePartsReturnSn, this.detailsData?this.detailsData.warehouseSn:undefined)
     },
     // 获取页面统计数据
     getStatisticsData () {
@@ -486,6 +486,7 @@ export default {
         } else {
           this.detailsData = null
         }
+        this.getChooseList()
       })
     }
   },

+ 4 - 1
src/views/purchasingManagement/purchaseReturn/queryPart.vue

@@ -125,10 +125,12 @@ export default {
       rowSelectionInfo: null,
       isChecked: false,
       repeatList: null,
+      warehouseSn: null,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.queryParam.supplierSn = this.buyerSn
         this.queryParam.createDate = '2023-01-01 00:00:00'
+        this.queryParam.warehouseSn = this.warehouseSn
         return queryDetailStockPage(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
@@ -189,8 +191,9 @@ export default {
       this.queryParam.beginDate = date[0] ? date[0] : ''
       this.queryParam.endDate = date[1] ? date[1] : ''
     },
-    pageInit (buyerSn, returnSn) {
+    pageInit (buyerSn, returnSn, warehouseSn) {
       this.buyerSn = buyerSn
+      this.warehouseSn = warehouseSn
       this.getRepeatResult(returnSn)
       this.$refs.chooseTable.refresh()
       // this.$refs.chooseTable.clearSelected()

+ 4 - 3
src/views/reportData/actualSalesReport/list.vue

@@ -33,19 +33,20 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
               <a-form-model-item label="所在区域">
                 <subarea id="actualSalesReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="actualSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="margin-bottom:10px;text-align:center;">
+            <a-col :md="6" :sm="24" style="margin-bottom:10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="actualSalesReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="actualSalesReportList-reset">重置</a-button>
               <a-button

+ 17 - 10
src/views/reportData/allocationDetails/list.vue

@@ -24,7 +24,7 @@
                 <a-input id="allocationDetailsList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="品牌分类">
                 <v-select code="BRAND_TYPE" id="allocationDetailsList-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
               </a-form-model-item>
@@ -62,6 +62,11 @@
                   <ProductType id="allocationDetailsList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
+              <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 :md="6" :sm="24">
                 <a-form-model-item label="客户名称">
                   <a-input id="allocationDetailsList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客户名称"/>
@@ -83,14 +88,14 @@
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
-              <a-button
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <!-- <a-button
                 style="margin-left: 0px"
                 type="primary"
                 class="button-info"
                 size="small"
                 @click="handleStock"
-                id="allocationDetailsList-stockDate">盘点区间日期</a-button>
+                id="allocationDetailsList-stockDate">盘点区间日期</a-button> -->
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="allocationDetailsList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocationDetailsList-reset">重置</a-button>
               <a-button
@@ -149,12 +154,13 @@ import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { userQueryList } from '@/api/power-user'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import AllocateType from '@/views/common/allocateType.js'
 import { allocateReportDetailList, allocateReportDetailCount, allocateReportDetailExport } from '@/api/allocateReport'
 export default {
   name: 'AllocationDetailsList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, Area, ProductBrand, reportModal, AllocateType, ProductType },
+  components: { STable, VSelect, rangeDate, subarea, Area, ProductBrand, reportModal, AllocateType, ProductType, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -188,7 +194,8 @@ export default {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
-        dealerProvinceSn: undefined
+        dealerProvinceSn: undefined,
+        warehouseSn: undefined
       },
       productType: [],
       labelCol: { span: 8 },
@@ -243,10 +250,11 @@ export default {
   computed: {
     columns () {
       const _this = this
-      const arr = [
+      let 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: 'allocateNo', width: 160, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '调拨开单日期', dataIndex: 'allocateDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'dealerProvinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'targetName', width: 120, align: 'center', sorter: true, customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -274,9 +282,7 @@ export default {
          arr.push({ title: '毛利', dataIndex: 'grossProfit', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
         }
       }
-      arr.concat([
-        { title: '仓库', dataIndex: 'warehouseName', width: 90, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 90, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+      arr = arr.concat([
         { title: '操作员', dataIndex: 'creatorName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '费用类型', dataIndex: 'costTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型(一级)', dataIndex: 'allocateSortName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
@@ -362,6 +368,7 @@ export default {
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.dealerProvinceSn = undefined
+      this.queryParam.warehouseSn = undefined
       this.productType = []
       this.allocateTypeVal = []
       if(this.advanced){

+ 1 - 1
src/views/reportData/billingBackReport/list.vue

@@ -26,7 +26,7 @@
                 <AreaList id="billingBackReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
               </a-form-model-item>
             </a-col>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;display:flex;align-item:center;justify-content: center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="billingBackReportList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="billingBackReportList-reset">重置</a-button>
               <a-button

+ 1 - 1
src/views/reportData/billingOrderReport/list.vue

@@ -31,7 +31,7 @@
                 <AreaList id="returnSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
               </a-form-model-item>
             </a-col>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;display:flex;align-item:center;justify-content: center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="billingOrderReport-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="billingOrderReport-reset">重置</a-button>
               <a-button

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

@@ -33,19 +33,20 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+           
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
               <a-form-model-item label="所在区域">
                 <subarea id="billingReturnReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="billingReturnReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="billingReturnReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="billingReturnReportList-reset">重置</a-button>
               <a-button

+ 1 - 1
src/views/reportData/regionTypeSalesReport/list.vue

@@ -39,7 +39,7 @@
                 </a-form-model-item>
               </a-col>
             </template> -->
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnGoodsPresentationList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnGoodsPresentationList-reset">重置</a-button>
               <a-button

+ 4 - 3
src/views/reportData/returnGoodsPresentation/list.vue

@@ -34,12 +34,13 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
               <a-form-model-item label="退货单号">
                 <a-input id="returnGoodsPresentationList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="returnGoodsPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
@@ -51,7 +52,7 @@
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnGoodsPresentationList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnGoodsPresentationList-reset">重置</a-button>
               <a-button

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

@@ -33,12 +33,13 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
               <a-form-item label="退货单号">
                 <a-input id="returnSlipReportList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
               </a-form-item>
             </a-col>
-            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="returnSlipReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
@@ -50,7 +51,7 @@
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnSlipReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="returnSlipReportList-reset">重置</a-button>
               <a-button

+ 3 - 3
src/views/reportData/salesAmountReport/list.vue

@@ -33,19 +33,19 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
               <a-form-model-item label="所在区域">
                 <subarea id="salesAmountReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="salesAmountReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesAmountReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesAmountReportList-reset">重置</a-button>
               <a-button

+ 19 - 10
src/views/reportData/salesDetails/list.vue

@@ -17,18 +17,17 @@
                 <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </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="salesDetailsList-salesBillNo" v-model.trim="queryParam.salesBillNo" 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="salesDetailsList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+            <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品名称">
                   <a-input id="salesDetailsList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
                 </a-form-model-item>
@@ -49,6 +48,7 @@
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
+            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="品牌分类">
                   <v-select code="BRAND_TYPE" id="salesDetailsList-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
@@ -64,6 +64,11 @@
                   <ProductType id="salesDetailsList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
+              <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 :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="salesDetailsList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
@@ -141,12 +146,13 @@ import reportModal from '@/views/common/reportModal.vue'
 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 { 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 },
+  components: { STable, VSelect, rangeDate, custList, subarea, ProductBrand, ProductType, reportModal, AreaList, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -176,7 +182,8 @@ export default {
         },
         dealerProvinceSn: undefined,
         dealerCitySn: undefined,
-        dealerCountySn: undefined
+        dealerCountySn: undefined,
+        warehouseSn: undefined
       },
       productType: [],
       rules: {
@@ -211,9 +218,10 @@ 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: 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: '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: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -237,7 +245,7 @@ export default {
         // { title: '折扣金额', dataIndex: 'discountAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
       ]
       if (this.$hasPermissions('M_salesDetailsList_costPrice')) { //  成本价权限
-        arr.splice(15, 0, { title: '成本价', dataIndex: 'totalRealCost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(16, 0, { title: '成本价', dataIndex: 'totalRealCost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       if (this.$hasPermissions('M_salesDetailsList_salesPrice')) { //  售价权限
         arr.push({ title: '实售价', dataIndex: 'totalRealSaleAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
@@ -252,7 +260,7 @@ export default {
         arr.push({ title: '折后单价', dataIndex: 'discountedPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
         arr.push({ title: '折扣金额', dataIndex: 'discountAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
-      arr.push({ title: '操作员', dataIndex: 'operatorName', width: 150, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true })
+      arr.push({ title: '操作员', dataIndex: 'operatorName', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
       return arr
     }
   },
@@ -323,6 +331,7 @@ export default {
       this.queryParam.dealerProvinceSn = undefined
       this.queryParam.dealerCitySn = undefined
       this.queryParam.dealerCountySn = undefined
+      this.queryParam.warehouseSn = undefined
       if(this.advanced){
         this.$refs.subarea.clearData()
         this.$refs.areaList.clearData()

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

@@ -33,12 +33,13 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
               <a-form-model-item label="销售单号">
                 <a-input id="salesPresentationList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="salesPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
@@ -50,7 +51,7 @@
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesPresentationList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesPresentationList-reset">重置</a-button>
               <a-button

+ 10 - 1
src/views/reportData/salesReturnDetailReport/list.vue

@@ -64,6 +64,11 @@
                   <ProductType id="salesReturnDetailList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
+              <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 :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="salesReturnDetailList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
@@ -142,6 +147,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 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 { hdExportExcel } from '@/libs/exportExcel'
@@ -149,7 +155,7 @@ import { reportSalesReturnDetailList, reportSalesReturnDetailCount, reportSalesR
 export default {
   name: 'SalesReturnDetailReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, ProductBrand, ProductType, reportModal, AreaList },
+  components: { STable, VSelect, rangeDate, subarea, ProductBrand, ProductType, reportModal, AreaList, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -173,6 +179,7 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
+        warehouseSn: undefined,
         subareaArea:{
           subareaSn: undefined,
           subareaAreaSn: undefined
@@ -218,6 +225,7 @@ export default {
         { 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: '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 },
         { 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 },
@@ -366,6 +374,7 @@ export default {
       this.queryParam.dealerProvinceSn = undefined
       this.queryParam.dealerCitySn = undefined
       this.queryParam.dealerCountySn = undefined
+      this.queryParam.warehouseSn = undefined
       this.productType = []
       if (this.advanced) {
         this.$refs.subarea.clearData()

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

@@ -33,19 +33,20 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+           
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
               <a-form-model-item label="所在区域">
                 <subarea id="salesReturnReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
                   <AreaList id="salesReturnDetailList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnReportList-reset">重置</a-button>
               <a-button

+ 2 - 2
src/views/reportData/salesReturnsReport/list.vue

@@ -176,7 +176,7 @@ export default {
   computed: {
     columns () {
       const _this = this
-      const arr = [
+      let arr = [
         { title: '退货单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货完成日期', dataIndex: 'salesReturnDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'dealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -209,7 +209,7 @@ export default {
         arr.push({ title: '直接差价', dataIndex: 'totalDirectRebate', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
         arr.push({ title: '间接差价', dataIndex: 'totalIndirectRebate', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
-      arr.concat([
+      arr = arr.concat([
         { title: '坏件数量', dataIndex: 'totalBadQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作员', dataIndex: 'operatorName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ])

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

@@ -33,12 +33,13 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
               <a-form-model-item label="销售单号">
                 <a-input id="salesSlipReportList-allocateTypeSn" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="salesSlipReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
@@ -50,7 +51,7 @@
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesSlipReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesSlipReportList-reset">重置</a-button>
               <a-button

+ 12 - 3
src/views/reportData/urchaseDetailReturn/detailList.vue

@@ -58,6 +58,11 @@
                   <v-select code="BRAND_TYPE" id="urchaseDetailReturn-productBrandTypeSn" v-model="queryParam.product.brandType" allowClear placeholder="请选择品牌分类"></v-select>
                 </a-form-model-item>
               </a-col>
+              <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 :md="6" :sm="24">
                 <a-form-model-item label="地区">
                     <AreaList id="salesSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -133,12 +138,13 @@ import supplier from '@/views/common/supplier.js'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
 import ProductBrand from '@/views/common/productBrand.js'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { sparePartsReturnDetailReportList, sparePartsReturnDetailReportStat, sparePartsReturnReportExportDetail } from '@/api/reportData'
 export default {
   name: 'UrchaseDetailReturnList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, supplier, ProductBrand, reportModal, AreaList },
+  components: { STable, VSelect, rangeDate, supplier, ProductBrand, reportModal, AreaList, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -154,6 +160,7 @@ export default {
         endDate: getDate.getCurrMonthDays().endtime,
         sparePartsReturnNo: '', // 采购退货单号
         returnReason: '',
+        warehouseSn: undefined,
         product: {
           name: '',
           code: '',
@@ -198,6 +205,7 @@ export default {
       const _this = this
       const arr = [
         { title: '采购退货单号', dataIndex: 'sparePartsReturnNo', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '省份', dataIndex: 'supplier.provinceName', width: 80, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '供应商名称', dataIndex: 'supplier.supplierName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退货原因', dataIndex: 'returnReasonDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
@@ -219,8 +227,8 @@ export default {
       ]
 
       if (_this.$hasPermissions('M_urchaseDetailReturnList_costPrice')) {
-        arr.splice(15, 0, { title: '入库单价', dataIndex: 'cost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
-        arr.splice(19, 0, { title: '退货金额', dataIndex: 'totalCost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(16, 0, { title: '入库单价', dataIndex: 'cost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(20, 0, { title: '退货金额', dataIndex: 'totalCost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr
     }
@@ -284,6 +292,7 @@ export default {
       this.queryParam.supplier.provinceSn = undefined
       this.queryParam.supplier.citySn = undefined
       this.queryParam.supplier.districtSn = undefined
+      this.queryParam.warehouseSn = undefined
       this.totalData = null
       if(this.advanced){
         this.$refs.areaList.clearData()

+ 20 - 9
src/views/reportData/warehousingOrder/list.vue

@@ -50,6 +50,11 @@
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
+              <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>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button
@@ -90,6 +95,8 @@
         bordered>
         <template slot="footer">
           <a-row :gutter="15">
+            <a-col :md="2" :sm="24">
+            </a-col>
             <a-col :md="4" :sm="24">
               总数量:{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}
             </a-col>
@@ -111,11 +118,12 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { reportStockPutList, reportStockPutCount, reportStockPutExport } from '@/api/reportData'
 export default {
   name: 'WarehousingOrderList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, reportModal },
+  components: { STable, VSelect, rangeDate, reportModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -129,7 +137,8 @@ export default {
         stockPutNo: '',
         supplierName: '',
         putBizType: undefined,
-        sparePartsType: undefined
+        sparePartsType: undefined,
+        warehouseSn: undefined
       },
       rules: {
         'time': [{ required: true, message: '请选择完成日期', trigger: 'change' }]
@@ -164,16 +173,17 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        { title: '入库单号', dataIndex: 'stockPutNo', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库开单日期', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'supplierName', width: '22%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '入库数量', dataIndex: 'productTotalQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库单号', dataIndex: 'stockPutNo', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库仓库', dataIndex: 'warehouseName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '入库开单日期', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位名称', dataIndex: 'supplierName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '入库数量', dataIndex: 'productTotalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '入库金额', dataIndex: 'productTotalCost', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_warehousingOrderList_costPrice')) { //  成本价权限
-        arr.splice(4, 0, { title: '入库金额', dataIndex: 'productTotalCost', width: '11%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(5, 0, { title: '入库金额', dataIndex: 'productTotalCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }
@@ -224,6 +234,7 @@ export default {
       this.queryParam.supplierName = ''
       this.queryParam.putBizType = undefined
       this.queryParam.sparePartsType = undefined
+      this.queryParam.warehouseSn = undefined
       this.totalData = null
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()

+ 27 - 18
src/views/reportData/warehousingOrderDetail/list.vue

@@ -17,12 +17,12 @@
                 <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </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="warehousingOrderDetailList-stockPutNo" v-model.trim="queryParam.stockPutNo" 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="入库类型">
                 <v-select
                   v-model="queryParam.putBizType"
@@ -33,8 +33,7 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="7" :sm="24">
+            <a-col :md="6" :sm="24">
                 <a-form-model-item label="散件入库子类型">
                   <v-select
                     v-model="queryParam.sparePartsType"
@@ -45,12 +44,18 @@
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="5" :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>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="单位名称">
                   <a-input id="warehousingOrderDetailList-supplierName" v-model.trim="queryParam.supplierName" 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="warehousingOrderDetailList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
                 </a-form-model-item>
@@ -121,11 +126,12 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { reportStockPutDetailList, reportStockPutDetailCount, reportStockPutDetailExport } from '@/api/reportData'
 export default {
   name: 'WarehousingOrderDetailList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, reportModal },
+  components: { STable, VSelect, rangeDate, reportModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -140,7 +146,8 @@ export default {
         putBizType: undefined,
         supplierName: '',
         productName: '',
-        productCode: ''
+        productCode: '',
+        warehouseSn: undefined
       },
       rules: {
         'time': [{ required: true, message: '请选择完成日期', trigger: 'change' }]
@@ -175,22 +182,23 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        { title: '入库单号', dataIndex: 'stockPutNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库开单日期', dataIndex: 'openBillTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'supplierName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'productCode', width: '9%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '入库单号', dataIndex: 'stockPutNo', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '入库开单日期', dataIndex: 'openBillTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位名称', dataIndex: 'supplierName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productCode', width: '8%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库数量', dataIndex: 'putQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '进价', dataIndex: 'putCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '入库金额', dataIndex: 'putAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '完成日期', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '完成日期', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_warehousingOrderDetailList_costPrice')) { //  成本价权限
-        arr.splice(7, 0, { title: '进价', dataIndex: 'putCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '入库金额', dataIndex: 'putAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8, 0, { title: '进价', dataIndex: 'putCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(9, 0, { title: '入库金额', dataIndex: 'putAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }
@@ -242,6 +250,7 @@ export default {
       this.queryParam.supplierName = ''
       this.queryParam.productName = ''
       this.queryParam.productCode = ''
+      this.queryParam.warehouseSn = undefined
       this.totalData = null
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()

+ 12 - 3
src/views/salesManagement/backorder/list.vue

@@ -15,6 +15,11 @@
                 <dealerSubareaScopeList ref="custList" id="backorderList-buyerSn" @change="custChange"></dealerSubareaScopeList>
               </a-form-item>
             </a-col>
+            <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 :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>
@@ -58,11 +63,12 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { STable, VSelect } from '@/components'
 import backorderDetailModal from './detailModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { oosList } from '@/api/oos'
 export default {
   name: 'BackorderList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, backorderDetailModal, rangeDate },
+  components: { STable, VSelect, dealerSubareaScopeList, backorderDetailModal, rangeDate, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -70,7 +76,8 @@ export default {
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
-        buyerSn: undefined
+        buyerSn: undefined,
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
@@ -102,13 +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: '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(6, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '11%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(7, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '11%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
     }
@@ -128,6 +136,7 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.buyerSn = undefined
+      this.queryParam.warehouseSn = undefined
       this.$refs.custList.resetForm()
       this.$refs.table.refresh(true)
     },

+ 25 - 11
src/views/salesManagement/examineVerify/list.vue

@@ -60,8 +60,13 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
-                    <Area id="examineVerifyList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
-                  </a-form-model-item>
+                  <Area id="examineVerifyList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+                <a-form-model-item label="仓库">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
+                </a-form-model-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -96,7 +101,7 @@
         :scroll="{ y:tableHeight }"
         :defaultLoadData="false"
         bordered>
-       
+
         <!-- 销售单号 -->
         <template slot="salesBillNo" slot-scope="text, record">
           <span class="link-bule" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
@@ -163,11 +168,12 @@ import auditModal from '@/views/common/auditModal.vue'
 import { STable, VSelect } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import auditRejectModal from './auditRejectModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { dispatchlBhshList, dispatchQueryBhshCount, dispatchStockUpAduit } from '@/api/dispatch'
 export default {
   name: 'ExamineVerifyList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, commonModal, salesDetail, dispatchDetail, auditModal, subarea, auditRejectModal, Area },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, commonModal, salesDetail, dispatchDetail, auditModal, subarea, auditRejectModal, Area, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -189,11 +195,12 @@ export default {
         stockOutNo: '', // 出库单号
         printStatus: undefined, //  打印状态
         billStatus: undefined, //  业务状态
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
-        shippingAddrProvinceSn: undefined
+        shippingAddrProvinceSn: undefined,
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       selectedRowKeys: [], // Check here to configure the default column
@@ -233,6 +240,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -250,7 +260,11 @@ export default {
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('M_examineVerifyList_salesPrice')) { //  售价权限
-        arr.splice(8, 0, { title: '售价', dataIndex: 'totalAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(this.isShowWarehouse ? 9 : 8, 0, { title: '售价', dataIndex: 'totalAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+      }
+      // 仓库管理权限设置是否显示 (当客户有且只有一条仓库管理权限时,不显示仓库信息)
+      if (this.isShowWarehouse) {
+        arr.splice(7, 0, { title: '仓库', dataIndex: 'warehouseName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
       }
       return arr
     }
@@ -264,7 +278,7 @@ export default {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -276,14 +290,14 @@ export default {
       this.queryParam.buyerSn = undefined
       this.$refs.dealerSubareaScopeList.resetForm()
       this.queryParam.salesBillNo = ''
-      this.queryParam.dispatchBillNo = '' // 备货单号
+      this.queryParam.dispatchBillNo = '' //备货单号
       this.queryParam.stockOutNo = '' // 出库单号
       this.queryParam.billStatus = undefined
       this.queryParam.printStatus = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
-      this.queryParam.shippingAddrProvinceSn = undefined
-      if(this.advanced){
+      this.queryParam.warehouseSn = undefined
+      if (this.advanced) {
         this.$refs.subarea.clearData()
       }
       this.$refs.table.refresh(true)

+ 35 - 20
src/views/salesManagement/matchSendOutOrder/list.vue

@@ -21,18 +21,18 @@
                   <a-input id="matchSoo-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="备货单号">
+                  <a-input id="matchSoo-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+                </a-form-item>
+              </a-col>
               <template v-if="advanced">
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="备货单号">
-                    <a-input id="matchSoo-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
-                  </a-form-item>
-                </a-col>
                 <a-col :md="6" :sm="24">
                   <a-form-item label="收货客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
                     <dealerSubareaScopeList ref="shbuyerName" id="matchSoo-shbuyerName" @change="shcustChange" />
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-item label="业务状态">
                     <v-select
                       v-model="queryParam.billStatus"
@@ -43,7 +43,7 @@
                       allowClear></v-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-item label="单据状态">
                     <v-select
                       v-model="queryParam.voidFlag"
@@ -54,7 +54,7 @@
                       allowClear></v-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-item label="对单状态">
                     <v-select
                       v-model="queryParam.checkStatus"
@@ -70,26 +70,31 @@
                     <rangeDate ref="checkDate" :value="checktime" @change="checkDateChange" />
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-model-item label="所在区域">
                     <subarea id="matchSoo-subarea" ref="subarea" @change="subareaChange"></subarea>
                   </a-form-model-item>
                 </a-col>
-                <a-col :md="4" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
                     <Area id="matchSoo-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
                   </a-form-model-item>
                 </a-col>
+                <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+                  <a-form-model-item label="仓库">
+                    <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
+                  </a-form-model-item>
+                </a-col>
               </template>
-              <a-col :md="6" :sm="24">
-                <span class="table-page-search-submitButtons">
+              <a-col :md="24" :sm="24">
+                <div class="table-page-search-submitButtons" style="text-align:center;">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
                   <a @click="advanced=!advanced" style="margin-left: 8px">
                     {{ advanced ? '收起' : '展开' }}
                     <a-icon :type="advanced ? 'up' : 'down'"/>
                   </a>
-                </span>
+                </div>
               </a-col>
             </a-row>
           </a-form>
@@ -154,11 +159,12 @@ import Area from '@/views/common/area.js'
 import { dispatchlList, dispatchCheck } from '@/api/dispatch'
 import commonModal from '@/views/common/commonModal.vue'
 import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
 export default {
   name: 'MatchSendOutOrderList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, Area, commonModal, salesDetail, dispatchDetail },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, Area, commonModal, salesDetail, dispatchDetail, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -181,13 +187,14 @@ export default {
         salesBillNo: '', //  销售单号
         dispatchBillNo: '', //  备货单号
         billStatus: undefined, //  业务状态
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
         voidFlag: undefined,
         shippingAddrProvinceSn: undefined,
-        checkStatus: undefined
+        checkStatus: undefined,
+        warehouseSn: undefined
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -210,6 +217,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -218,6 +228,7 @@ export default {
         { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' },
         { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center' },
         { title: '客户名称', dataIndex: 'buyerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -232,6 +243,9 @@ export default {
       if (this.$hasPermissions('M_matchSendOutOrderList_salesPrice')) { //  售价权限
         arr.splice(9, 0, { title: '总售价', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
+      if (this.isShowWarehouse) {
+        arr.splice(7, 0, { title: '仓库', dataIndex: 'warehouseName', width: '14%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       return arr
     }
   },
@@ -283,7 +297,7 @@ export default {
         }
       })
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -305,15 +319,16 @@ export default {
         salesBillNo: '', //  销售单号
         dispatchBillNo: '', //  备货单号
         billStatus: undefined, //  业务状态
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
         voidFlag: undefined,
         shippingAddrProvinceSn: undefined,
-        checkStatus: undefined
+        checkStatus: undefined,
+        warehouseSn: undefined
       }
-      if(this.advanced){
+      if (this.advanced) {
         this.$refs.subarea.clearData()
       }
       this.$refs.table.refresh(true)

+ 22 - 7
src/views/salesManagement/outboundOrder/list.vue

@@ -66,8 +66,13 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
-                    <Area id="outboundOrderList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
-                  </a-form-model-item>
+                  <Area id="outboundOrderList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+                <a-form-model-item label="仓库">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
+                </a-form-model-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -180,12 +185,13 @@ import pushOrderDetailModal from '@/views/salesManagement/pushOrderManagement/de
 import allocationDetailModal from '@/views/allocationManagement/transferOut/detail.vue'
 import sendGoodModal from './sendGoodModal.vue'
 import { STable, VSelect } from '@/components'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { stockOutList, stockOutOut } from '@/api/stockOut'
 import { getCustomerInfo, validateStockOut } from '@/api/sendBill'
 export default {
   name: 'OutboundOrderList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, pushOrderDetailModal, allocationDetailModal, subarea, Area, sendGoodModal },
+  components: { STable, VSelect, rangeDate, pushOrderDetailModal, allocationDetailModal, subarea, Area, sendGoodModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -203,12 +209,13 @@ export default {
         stockOutNo: '',
         outBizNo: '',
         state: undefined, //  状态
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
         shippingAddrProvinceSn: undefined,
-        sendFlag: undefined
+        sendFlag: undefined,
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       loading: false,
@@ -238,6 +245,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -246,6 +256,7 @@ export default {
         { title: '业务单号', dataIndex: 'outBizNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'demanderName', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '售价', dataIndex: 'productTotalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '出库时间', dataIndex: 'outTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -256,6 +267,9 @@ export default {
       if (this.$hasPermissions('M_outboundOrderList_salesPrice')) { //  售价权限
         arr.splice(7, 0, { title: '售价', dataIndex: 'productTotalPrice', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
+      if (this.isShowWarehouse) {
+        arr.splice(6, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       return arr
     }
   },
@@ -283,7 +297,7 @@ export default {
       this.$refs.table.clearSelected() // 清空表格选中项
       this.$refs.table.refresh(true)
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -301,7 +315,8 @@ export default {
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.shippingAddrProvinceSn = undefined
       this.queryParam.sendFlag = undefined
-      if(this.advanced){
+      this.queryParam.warehouseSn = undefined
+      if (this.advanced) {
         this.$refs.subarea.clearData()
       }
       this.$refs.table.refresh(true)

+ 42 - 21
src/views/salesManagement/outboundOrder/selectGlOrderModal.vue

@@ -14,23 +14,32 @@
         <!-- 搜索条件 -->
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline">
-            <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
+            <a-row type="flex" :gutter="15">
+              <a-col flex="300px">
                 <a-form-item label="业务单号">
                   <a-input v-model.trim="queryParam.outBizSubNo" allowClear placeholder="请输入业务单号"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col flex="300px">
                 <a-form-item label="客户名称">
                   <a-input v-model.trim="queryParam.demanderName" allowClear placeholder="请输入客户名称"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col flex="300px">
                 <a-form-item label="收货客户名称">
                   <dealerSubareaScopeList ref="dealerSubareaScopeList" defValKey="buyerSn" @change="custChange" v-model="queryParam.receiverSn" />
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col flex="300px" v-show="isShowWarehouse">
+                <a-form-item label="仓库">
+                  <warehouse
+                    v-model="queryParam.warehouseSn"
+                    isPermission
+                    placeholder="请选择仓库"
+                  />
+                </a-form-item>
+              </a-col>
+              <a-col flex="auto">
                 <span class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
@@ -73,12 +82,15 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { stockOutList } from '@/api/stockOut'
+import warehouse from '@/views/common/chooseWarehouse.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 export default {
   name: 'SelectGlOrderModal',
-  components: { STable, VSelect, dealerSubareaScopeList },
+  mixins: [commonMixin],
+  components: { STable, VSelect, dealerSubareaScopeList, warehouse },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -105,23 +117,9 @@ export default {
         outBizSubNo: '',
         demanderName: '',
         receiverSn: undefined,
+        warehouseSn: undefined,
         outBizTypeList: ['SALES', 'ALLOCATE']
       },
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库单号', dataIndex: 'stockOutNo', width: '10%', align: 'center' },
-        { title: '业务单号', dataIndex: 'outBizSubNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'demanderName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品款数', dataIndex: 'productTotalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单据审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收款状态', dataIndex: 'financialStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '发货状态', dataIndex: 'sendFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-      ],
       orginData: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -148,6 +146,28 @@ export default {
     }
   },
   computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库单号', dataIndex: 'stockOutNo', width: '8%', align: 'center' },
+        { title: '业务单号', dataIndex: 'outBizSubNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'demanderName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品款数', dataIndex: 'productTotalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单据审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款状态', dataIndex: 'financialStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货状态', dataIndex: 'sendFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+      ]
+      if(this.isShowWarehouse){
+        arr.splice(7,0,{ title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    },
     totalAmount () {
       let ret = 0
       this.handlePlData.map(item => {
@@ -185,6 +205,7 @@ export default {
         outBizSubNo: '',
         demanderName: '',
         receiverSn: undefined,
+        warehouseSn: undefined,
         outBizTypeList: ['SALES', 'ALLOCATE']
       }
       this.orginData = []

+ 19 - 9
src/views/salesManagement/pushOrderManagement/list.vue

@@ -85,16 +85,21 @@
                   <Area id="pushOrder-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
                 </a-form-model-item>
               </a-col>
+              <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>
             </template>
-            <a-col :md="6" :sm="24">
-              <span class="table-page-search-submitButtons">
+            <a-col :md="24" :sm="24">
+              <div class="table-page-search-submitButtons" style="text-align:center;">
                 <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                 <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
                 <a @click="advanced=!advanced" style="margin-left: 8px">
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'"/>
                 </a>
-              </span>
+              </div>
             </a-col>
           </a-row>
         </a-form>
@@ -191,6 +196,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
@@ -199,7 +205,7 @@ import { dispatchlList, dispatchQueryCount, dispatchPrintStatus } from '@/api/di
 export default {
   name: 'PushOrderManagementList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, Area, salesDetail, explainInfoModal },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, Area, salesDetail, explainInfoModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -222,14 +228,15 @@ export default {
         salesBillNo: '', //  销售单号
         dispatchBillNo: '', //  备货单号
         billStatus: undefined, //  业务状态
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
         voidFlag: undefined,
         shippingAddrProvinceSn: undefined,
         printStatus: undefined,
-        checkStatus: undefined
+        checkStatus: undefined,
+        warehouseSn: undefined
       },
       totalData: {
         totalAmount: 0,
@@ -273,6 +280,7 @@ export default {
         { title: '发货说明', scopedSlots: { customRender: 'explainInfo' }, width: '150px', align: 'center', ellipsis: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'totalCategory', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品数量', dataIndex: 'totalQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '总售价', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -314,7 +322,7 @@ export default {
         this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
       }
     },
-    closeDetailModal(){
+    closeDetailModal () {
       this.showDetailModal = false
       this.$store.state.app.curActionPermission = ''
     },
@@ -343,7 +351,7 @@ export default {
         }
       })
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -365,7 +373,9 @@ export default {
       this.queryParam.shippingAddrProvinceSn = undefined
       this.queryParam.printStatus = undefined
       this.queryParam.checkStatus = undefined
-      if(this.advanced){
+      this.queryParam.warehouseSn = undefined
+
+      if (this.advanced) {
         this.$refs.subarea.clearData()
       }
       this.$refs.table.refresh(true)

+ 40 - 25
src/views/salesManagement/receiptPrint/list.vue

@@ -19,17 +19,22 @@
                   <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="收款单号">
                   <a-input id="salesCollectionList-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入备货单号"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="客户名称">
                   <dealerSearchList ref="payerName" id="alesCollectionList-payerName" @change="custChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24" v-if="currentTab == 1">
+              <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+                <a-form-model-item label="仓库">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24" v-if="currentTab == 1">
                 <a-form-item label="收款打印状态">
                   <v-select
                     v-model="queryParam.printStatus"
@@ -41,7 +46,7 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="足额打款">
                   <v-select
                     v-model="queryParam.fullPaymentFlag"
@@ -52,8 +57,8 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="currentTab==2?4:24" :sm="24">
-                <span style="float:right;" class="table-page-search-submitButtons">
+              <a-col :md="6" :sm="24">
+                <span class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
                 </span>
@@ -110,7 +115,7 @@
 
         <!-- 收款打印 -->
         <commonModal modalTit="收款打印预览" width="700pt" :showFooter="false" :openModal="showTipModal" @cancel="closeTipModal">
-           <printModel ref="printModel" @cancel="closeTipModal" @printOk="printOk"></printModel>
+          <printModel ref="printModel" @cancel="closeTipModal" @printOk="printOk"></printModel>
         </commonModal>
         <!-- 打印记录 -->
         <recordModal v-drag ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
@@ -137,11 +142,12 @@ import dealerSearchList from '@/views/common/dealerSearchList.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import recordModal from './recordModal.vue'
 import printModel from './printModel.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { financeBookDetailList, updateFinanceBookDetail, getBatchLastProcessInstance, checkPrintStatus } from '@/api/financeBook'
 export default {
   name: 'ReceiptPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSearchList, rangeDate, commonModal, recordModal, printModel },
+  components: { STable, VSelect, dealerSearchList, rangeDate, commonModal, recordModal, printModel, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -156,11 +162,12 @@ export default {
         endDate: '',
         bookNo: '',
         payerName: '',
-        dealerSn:undefined,
+        dealerSn: undefined,
         subareaSn: undefined,
         billStatus: undefined,
         dealerProvinceSn: undefined,
         fullPaymentFlag: undefined,
+        warehouseSn: undefined,
         printStatus: 'NO_PRINT'
       },
       totalData: {
@@ -199,6 +206,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -206,6 +216,7 @@ export default {
         { title: '收款单号', dataIndex: 'bookNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款日期', dataIndex: 'receiptDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'payerName', align: 'left', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouseName', align: 'left', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '财务编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单金额', dataIndex: 'orderAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '收款金额', dataIndex: 'receiptAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
@@ -219,6 +230,9 @@ export default {
         { title: '打印次数', dataIndex: 'printNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
+      if (this.isShowWarehouse) {
+        arr.splice(5, 0, { title: '仓库', dataIndex: 'warehouseName', align: 'center', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       return arr
     }
   },
@@ -252,9 +266,9 @@ export default {
       })
 
       // 检查是否有已打印数据
-      if(this.currentTab == 2){
+      if (this.currentTab == 2) {
         const hasPrintData = await checkPrintStatus(bookDetailSn).then(res => res.data)
-        if(!hasPrintData){
+        if (!hasPrintData) {
           _this.$info({
             title: '操作提示',
             centered: true,
@@ -263,12 +277,12 @@ export default {
               _this.resetSearchForm()
             }
           })
-          return 
+          return
         }
       }
-      
+
       const retArr = []
-      const auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': bookSns }).then(res => res.data)
+      const auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': bookSns }).then(res => res.data)
       console.log(auditInfo)
       bookSns.map(item => {
         // 授信明细
@@ -305,9 +319,9 @@ export default {
       let auditInfo = null
       if (type == 0) {
         // 是否已打印
-        if(this.currentTab == 2){
-          let hasPrintData = await checkPrintStatus([list.bookDetailSn]).then(res => res.data)
-          if(!hasPrintData){
+        if (this.currentTab == 2) {
+          const hasPrintData = await checkPrintStatus([list.bookDetailSn]).then(res => res.data)
+          if (!hasPrintData) {
             _this.$info({
               title: '操作提示',
               centered: true,
@@ -316,17 +330,17 @@ export default {
                 _this.resetSearchForm()
               }
             })
-            return 
+            return
           }
         }
-        
-        auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': [list.bookSn] }).then(res => res.data)
+
+        auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': [list.bookSn] }).then(res => res.data)
       }
       console.log(auditInfo)
       this.spinning = true
       this.showTipModal = true
       let detailItemUseStr = ''
-      
+
       this.$nextTick(() => {
         if (type == 0 && row.detailItemUseList) {
           row.detailItemUseList.map(k => {
@@ -339,7 +353,7 @@ export default {
       })
     },
     printOk (res) {
-      if(res){
+      if (res) {
         this.spinning = false
         this.$refs.table.refresh()
         this.$refs.table.clearSelected()
@@ -352,10 +366,10 @@ export default {
     },
     custChange (val) {
       console.log(val)
-      if(val.row){
+      if (val.row) {
         this.queryParam.dealerSn = val.row.dealerSn
         this.queryParam.payerName = undefined
-      }else{
+      } else {
         this.queryParam.dealerSn = undefined
         this.queryParam.payerName = val.key
       }
@@ -402,11 +416,12 @@ export default {
         endDate: '',
         bookNo: '',
         payerName: '',
-        dealerSn:undefined,
+        dealerSn: undefined,
         subareaSn: undefined,
         billStatus: undefined,
         dealerProvinceSn: undefined,
         fullPaymentFlag: undefined,
+        warehouseSn: undefined,
         printStatus: this.currentTab == 2 ? 'NO_PRINT' : undefined
       }
       this.$refs.table.refresh(true)

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

@@ -33,6 +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">
+          <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;">
           <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>
@@ -50,11 +53,12 @@ import { VSelect } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import chooseAddressModal from './receivingAddress/chooseAddressModal.vue'
 import { dealerRecevieAddrQuery } from '@/api/dealerRecevieAddr'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { salesSave } from '@/api/sales'
 export default {
   name: 'SalesChooseCustomModal',
   mixins: [commonMixin],
-  components: { VSelect, dealerSubareaScopeList, chooseAddressModal },
+  components: { VSelect, dealerSubareaScopeList, chooseAddressModal, chooseWarehouse },
   props: {
     show: [Boolean]
   },
@@ -80,12 +84,14 @@ export default {
         shippingAddrCountyName: '', // 区
         shippingAddr: '', // 详细地址
         consigneeTel: '', // 联系电话
-        consigneeName: '' // 联系人名称
+        consigneeName: '', // 联系人名称
+        warehouseSn: undefined
       },
       rules: {
         buyerSn: [ { required: true, message: '请选择客户', trigger: ['change', 'blur'] } ],
         settleStyleSn: [ { required: true, message: '请选择支付方式', trigger: ['change', 'blur'] } ],
-        consigneeTel: [ { required: true, message: '请选择收货地址', trigger: ['change', 'blur'] } ]
+        consigneeTel: [ { required: true, message: '请选择收货地址', trigger: ['change', 'blur'] } ],
+        warehouseSn: [ { required: true, message: '请选择出库仓库', trigger: ['change', 'blur'] } ]
       },
       addressVal: '选择地址', //  选择地址/更换地址
       chooseAddr: '', //  当前已选地址信息
@@ -93,6 +99,7 @@ export default {
     }
   },
   methods: {
+
     // 客户 change
     custChange (val) {
       if (val && val.key) {
@@ -100,9 +107,13 @@ export default {
         this.form.buyerName = val.name || ''
         this.$refs.ruleForm.clearValidate()
         this.getDefaultAddress()
+        if(val.row){
+          this.form.warehouseSn = val.row.defaultWarehouseSn
+        }
       } else {
         this.form.buyerName = ''
         this.form.buyerSn = undefined
+        this.form.warehouseSn = undefined
         this.verifyFun(this.addressId)
       }
     },

+ 9 - 8
src/views/salesManagement/salesQuery/detail.vue

@@ -55,6 +55,7 @@
               <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>
@@ -309,7 +310,7 @@ export default {
       }
 
       const ind = this.$hasPermissions(this.authCode + '_costPrice') ? 5 : 4
-      if(this.$hasPermissions(this.authCode + '_provincePrice')){
+      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) : '--') } })
       }
       // 是否勾选市级价格
@@ -338,7 +339,7 @@ export default {
     // 编辑
     handleEdit () {
       const row = this.detailData
-      this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn } })
+      this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn, wSn: row.warehouseSn } })
     },
     // 打开缺货明细
     openStockOut () {
@@ -416,7 +417,7 @@ export default {
       })
     },
     // 打印导出
-    handlePrint (type,authCode) {
+    handlePrint (type, authCode) {
       const _this = this
       _this.$store.state.app.curActionPermission = authCode
       // 销售分类导出
@@ -425,8 +426,8 @@ export default {
           salesBillSn: this.bizSn || this.$route.params.sn
         }
         _this.spinning = true
-        exportExcel(salesDetailTypeExcel, params, '销售分类' + moment().format('YYYYMMDDHHmmss'), () => { 
-          _this.spinning = false 
+        exportExcel(salesDetailTypeExcel, params, '销售分类' + moment().format('YYYYMMDDHHmmss'), () => {
+          _this.spinning = false
           _this.$store.state.app.curActionPermission = ''
         })
       } else {
@@ -435,7 +436,7 @@ export default {
         this.openModal = true
       }
     },
-    closePrint(){
+    closePrint () {
       console.log(9)
       this.$store.state.app.curActionPermission = ''
       this.openModal = false
@@ -448,13 +449,13 @@ export default {
       delete params.type
       _this.spinning = true
       if (this.nowType == 'export') { //  导出
-        exportExcel(salesDetailExcel, params, '销售' + moment().format('YYYYMMDDHHmmss'), () => { 
+        exportExcel(salesDetailExcel, params, '销售' + moment().format('YYYYMMDDHHmmss'), () => {
           _this.spinning = false
           _this.$store.state.app.curActionPermission = ''
         })
       } else { //  打印
         const taskName = this.nowType == 'SALES_BILL' ? '销售单' : '销售分类'
-        printFun(salesDetailPrint, params, objs.type, taskName, () => { 
+        printFun(salesDetailPrint, params, objs.type, taskName, () => {
           _this.spinning = false
           _this.$store.state.app.curActionPermission = ''
         })

+ 36 - 13
src/views/salesManagement/salesQuery/edit.vue

@@ -6,6 +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;">
+            <span>出库仓库:</span>
+            <chooseWarehouse style="width:200px" :allowClear="false" ref="warehouse" v-model="warehouseSn" @change="handleWarehouse"></chooseWarehouse>
+          </div>
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" class="salesEdit-cont">
@@ -59,7 +63,7 @@
                     </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="salesEdit-refresh">查询</a-button>
+                    <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>
@@ -83,16 +87,13 @@
                     </a-menu-item>
                   </a-menu>
                   <a-button
-                    size="small"
                     style="margin:0 15px;"
-                    type="danger"
-                    class="button-info"
+                    type="primary"
+                    ghost
                     id="salesEdit-plDel-btn"> 批量删除 <a-icon type="down" /> </a-button>
                 </a-dropdown>
                 <a-button
-                  size="small"
-                  type="primary"
-                  class="button-info"
+                  type="default"
                   id="salesEdit-import-btn"
                   @click="openGuideModal=true">导入产品</a-button>
               </div>
@@ -114,10 +115,10 @@
           bordered>
           <!-- 产品编码 -->
           <template slot="productCode" slot-scope="text, record">
-            <a-badge count="缺" v-if="Number(record.stockQty) < Number(record.unpushedQty)">
+            <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)">
               <div style="padding-right: 15px;">{{ text }}</div>
             </a-badge>
-            <span v-if="!(Number(record.stockQty) < Number(record.unpushedQty))">{{ text }}</span>
+            <span v-if="!(Number(record.stockQty||0) < Number(record.unpushedQty||0))">{{ text }}</span>
           </template>
           <!-- 产品名称 -->
           <template slot="productName" slot-scope="text, record">
@@ -147,7 +148,7 @@
           <!-- 当前库存 -->
           <template slot="stockQty" slot-scope="text, record">
             <div v-if="record.stockQty || record.stockQty==0">
-              <p style="margin: 0;" v-if="Number(record.stockQty) < Number(record.unpushedQty)">{{ record.stockQty }}(<span class="redStyle">缺{{ Number(record.unpushedQty) - Number(record.stockQty) }}</span>)</p>
+              <p style="margin: 0;" v-if="Number(record.stockQty) < Number(record.unpushedQty)">{{ record.stockQty }}(<span class="redStyle">缺{{ Number(record.unpushedQty||0) - Number(record.stockQty||0) }}</span>)</p>
               <p style="margin: 0;" v-else>{{ record.stockQty }}</p>
             </div>
             <span v-else>--</span>
@@ -223,12 +224,13 @@ import queryPart from './queryPart.vue'
 import queryPromotable from './queryPromotable.vue'
 import ChooseActive from './chooseActive.vue'
 import ImportGuideModal from './importGuideModal.vue'
-import { salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll } from '@/api/sales'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
+import { salesModify, salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll } 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 },
+  components: { STable, VSelect, queryPart, queryPromotable, ChooseActive, ImportGuideModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -244,6 +246,7 @@ export default {
         salesBillSn: '',
         promotionFlag: 0
       },
+      warehouseSn: undefined,
       activeName: '', // 促销活动
       nowData: null,
       // 加载数据方法 必须为 Promise 对象
@@ -298,6 +301,25 @@ export default {
     }
   },
   methods: {
+    // 选择仓库
+    handleWarehouse (val) {
+      this.warehouseSn = val
+      const _this = this
+      _this.spinning = true
+      salesModify({
+        id: _this.detailData.id,
+        warehouseSn: val
+      }).then(res => {
+        if (res.status == 200) {
+          _this.$refs.partQuery.resetCurForm(val)
+          _this.$refs.table.refresh(true)
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+          _this.warehouseSn = _this.$route.params.wSn
+        }
+      })
+    },
     handleMenuClick (e) {
       if (e.key == 1) { // 删除已选项
         this.handleBatchDel()
@@ -497,7 +519,7 @@ export default {
         if (res.status == 200) {
           this.detailData = res.data
           if (flag) {
-            this.$refs.partQuery.pageInit(this.detailData && this.detailData.buyerSn || '')
+            this.$refs.partQuery.pageInit(this.detailData && this.detailData.buyerSn || '', this.warehouseSn)
           }
         }
       })
@@ -579,6 +601,7 @@ export default {
       this.getOrderDetail(true)
       this.$refs.table.refresh(true)
       this.salesBillSn = this.$route.params.sn
+      this.warehouseSn = this.$route.params.sn ? this.$route.params.wSn : ''
       // 获取促销活动
       this.getPromoacActiveList()
     }

+ 18 - 9
src/views/salesManagement/salesQuery/list.vue

@@ -80,6 +80,11 @@
                   <Area id="salesManagementList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
                 </a-form-model-item>
               </a-col>
+              <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>
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
@@ -123,10 +128,10 @@
               </div>
               <div v-if="$hasPermissions('M_salesQueryList_salesPrice')">
                 总售价:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount) : '--' }}</strong>;
-                已下推金额::<strong>{{ totalData&&(totalData.totalPushedAmount || totalData.totalPushedAmount==0) ? toThousands(totalData.totalPushedAmount) : '--' }}</strong>;
-                已取消金额::<strong>{{ totalData&&(totalData.totalCancelAmount || totalData.totalCancelAmount==0) ? toThousands(totalData.totalCancelAmount) : '--' }}</strong>;
-                待下推金额::<strong>{{ totalData&&(totalData.totalUnpushedAmount || totalData.totalUnpushedAmount==0) ? toThousands(totalData.totalUnpushedAmount) : '--' }}</strong>;
-                已发货金额::<strong>{{ totalData&&(totalData.totalDispatchAmount || totalData.totalDispatchAmount==0) ? toThousands(totalData.totalDispatchAmount) : '--' }}</strong>;
+                已下推金额:<strong>{{ totalData&&(totalData.totalPushedAmount || totalData.totalPushedAmount==0) ? toThousands(totalData.totalPushedAmount) : '--' }}</strong>;
+                已取消金额:<strong>{{ totalData&&(totalData.totalCancelAmount || totalData.totalCancelAmount==0) ? toThousands(totalData.totalCancelAmount) : '--' }}</strong>;
+                待下推金额:<strong>{{ totalData&&(totalData.totalUnpushedAmount || totalData.totalUnpushedAmount==0) ? toThousands(totalData.totalUnpushedAmount) : '--' }}</strong>;
+                已发货金额:<strong>{{ totalData&&(totalData.totalDispatchAmount || totalData.totalDispatchAmount==0) ? toThousands(totalData.totalDispatchAmount) : '--' }}</strong>;
               </div>
             </div>
             <a-checkbox v-model="showCancelNum"><span style="display: inline-block;margin-top: 1px;">显示取消数量</span></a-checkbox>
@@ -262,12 +267,13 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import { salesList, salesDel, salesCount } from '@/api/sales'
 import { hdExportExcel } from '@/libs/exportExcel'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { findBySalesBillSn, dispatchBatchPrintStatus, queryBySalesBillSn } from '@/api/dispatch'
 import { salesDetailExport } from '@/api/salesBillReport'
 export default {
   name: 'SalesQueryList',
   mixins: [commonMixin],
-  components: { STable, VSelect, chooseCustomModal, dealerSubareaScopeList, Area, rangeDate, subarea, commonModal, reportModal },
+  components: { STable, VSelect, chooseCustomModal, dealerSubareaScopeList, Area, rangeDate, subarea, commonModal, reportModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -293,11 +299,12 @@ export default {
         billStatus: undefined, //  业务状态
         financialStatus: undefined, //  财务状态
         salesBillSource: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
-        shippingAddrProvinceSn: undefined
+        shippingAddrProvinceSn: undefined,
+        warehouseSn: undefined
       },
       totalData: {
         totalAmount: 0,
@@ -366,6 +373,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: '总数量', 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 : '--') } },
@@ -423,7 +431,7 @@ export default {
     },
     // 选择客户成功
     chooseCustomOk (data) {
-      this.$router.push({ name: 'salesAdd', params: { sn: data.salesBillSn } })
+      this.$router.push({ name: 'salesAdd', params: { sn: data.salesBillSn, wSn: data.warehouseSn } })
     },
     // 下推
     handleDispatch (row) {
@@ -445,7 +453,7 @@ export default {
     },
     // 编辑
     handleEdit (row) {
-      this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn } })
+      this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn, wSn: row.warehouseSn } })
     },
     // 删除
     handleDel (row) {
@@ -534,6 +542,7 @@ export default {
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.shippingAddrProvinceSn = undefined
+      this.queryParam.warehouseSn = undefined
       if (this.advanced) {
         this.$refs.subarea.clearData()
       }

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

@@ -32,7 +32,7 @@
             </a-col>
           </template>
           <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 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 @click="advanced=!advanced" style="margin: 0 5px">
               {{ advanced ? '收起' : '展开' }}
@@ -124,7 +124,8 @@ export default {
         productBrandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
+        productTypeSn3: '', //  产品三级分类
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
@@ -202,13 +203,18 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
-    pageInit (buyerSn) {
+    pageInit (buyerSn, warehouseSn) {
       this.buyerSn = buyerSn
+      this.queryParam.warehouseSn = warehouseSn
       this.resetSearchForm()
     },
     // 刷新当前页面
-    resetCurForm () {
-      this.$refs.table.refresh()
+    resetCurForm (warehouseSn) {
+      this.queryParam.warehouseSn = warehouseSn
+      const _this = this
+      _this.$nextTick(() => {
+        _this.$refs.table.refresh()
+      })
     },
     // 选择配件
     handleAdd (row) {

+ 22 - 7
src/views/salesManagement/sendOutOrder/list.vue

@@ -63,6 +63,11 @@
                   <Area id="sendOut-provinceSn" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+                <a-form-model-item label="仓库">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
@@ -86,7 +91,7 @@
           </a-row>
         </a-form>
         <!-- 操作按钮 -->
-        <div>
+        <div v-if="!isShowWarehouse">
           <a-button type="primary" class="button-error" v-if="$hasPermissions('B_sendOutPlImport')" @click="openGuideModal=true">批量导入</a-button>
         </div>
       </div>
@@ -152,11 +157,12 @@ import sendGoodModal from '../outboundOrder/sendGoodModal.vue'
 import Area from '@/views/common/area.js'
 import subarea from '@/views/common/subarea.js'
 import ImportGuideModal from './importGuideModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { sendBillQueryPageList, sendBillExcel } from '@/api/sendBill'
 export default {
   name: 'SendOutOrderList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, detailModal, sendGoodModal, Area, subarea, ImportGuideModal },
+  components: { STable, VSelect, rangeDate, detailModal, sendGoodModal, Area, subarea, ImportGuideModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -178,11 +184,12 @@ export default {
         bizNos: '', //  业务单号
         transportState: undefined, //  物流状态
         receiveFlag: undefined, // 收货状态
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
-        provinceSn: undefined
+        provinceSn: undefined,
+        warehouseSn: undefined
       },
       totalData: {
         totalAmount: 0,
@@ -212,6 +219,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const _this = this
       const arr = [
@@ -221,7 +231,8 @@ export default {
         { 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: 'provinceName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'customeName', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'customeName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '托运日期', dataIndex: 'sendDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收货人', dataIndex: 'customerCacateName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '物流电话', dataIndex: 'transportTele', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -235,6 +246,9 @@ export default {
         { title: '备注', dataIndex: 'transportRemark', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      if (this.isShowWarehouse) {
+        arr.splice(7, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'left', customRender: function (text) { return text || '--' } })
+      }
       return arr
     }
   },
@@ -273,7 +287,7 @@ export default {
         _this.spinning = false
       })
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -295,7 +309,8 @@ export default {
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.provinceSn = undefined
-      if(this.advanced){
+      this.queryParam.warehouseSn = undefined
+      if (this.advanced) {
         this.$refs.subarea.clearData()
       }
       this.$refs.table.refresh(true)

+ 15 - 6
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -66,6 +66,11 @@
                   <v-select code="PRODUCT_STATUS" id="shortageStatisticsCList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
                 </a-form-item>
               </a-col>
+              <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>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 8px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shortageStatisticsCList-refresh">查询</a-button>
@@ -112,7 +117,7 @@
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
         :rowKey="(record) => record.no"
-        rowKeyName = "no"
+        rowKeyName="no"
         :columns="columns"
         :data="loadData"
         :defaultLoadData="false"
@@ -138,11 +143,12 @@ import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { oosBuyerList, oosBuyerDetailCount, oosBuyerDetailPageCount, oosDetailExport } from '@/api/oos'
 export default {
   name: 'ShortageStatisticsCList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, subarea, Area, rangeDate, ProductBrand, ProductType },
+  components: { STable, VSelect, dealerSubareaScopeList, subarea, Area, rangeDate, ProductBrand, ProductType, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -152,7 +158,7 @@ export default {
         beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
         buyerSn: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
@@ -166,7 +172,8 @@ export default {
         dealerType: undefined,
         brandType: undefined,
         productBrandSn: undefined,
-        state: undefined
+        state: undefined,
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
@@ -206,9 +213,10 @@ export default {
       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: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, align: 'center' },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 130, align: 'center' },
         { title: '省份', dataIndex: 'dealerEntity.provinceName', width: 80, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: 140, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户类型', dataIndex: 'dealerEntity.dealerTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
@@ -265,7 +273,7 @@ export default {
         }
       })
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -292,6 +300,7 @@ export default {
       this.queryParam.brandType = undefined
       this.queryParam.productBrandSn = undefined
       this.queryParam.state = undefined
+      this.queryParam.warehouseSn = undefined
       this.productType = []
       this.$refs.table.refresh(true)
     },

+ 15 - 6
src/views/salesManagement/shortageStatisticsP/list.vue

@@ -10,22 +10,27 @@
                 <rangeDate ref="rangeDate" :allowClear="false" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="产品编码">
                 <a-input id="shortageStatisticsPList-productCode" 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="产品名称">
                 <a-input id="shortageStatisticsPList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="原厂编码">
                   <a-input id="shortageStatisticsPList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
                 </a-form-item>
               </a-col>
+              <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>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shortageStatisticsPList-refresh">查询</a-button>
@@ -87,11 +92,12 @@ import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { oosProductList, oosProductDetailCount, oosProductDetailPageCount, oosDetailExportByProduct } from '@/api/oos'
 export default {
   name: 'ShortageStatisticsPList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -102,7 +108,8 @@ export default {
         endDate: getDate.getCurrMonthDays().endtime,
         productName: '',
         productCode: '',
-        origCode: ''
+        origCode: '',
+        warehouseSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
@@ -148,7 +155,8 @@ export default {
         { title: '单位', dataIndex: 'unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '缺货数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '缺货金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '客户名称', dataIndex: 'buyerName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '客户名称', dataIndex: 'buyerName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ]
       if (this.$hasPermissions('M_shortageStatisticsPList_salesPrice')) { //  售价权限
         arr.splice(6, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
@@ -228,6 +236,7 @@ export default {
       this.queryParam.productName = ''
       this.queryParam.productCode = ''
       this.queryParam.origCode = ''
+      this.queryParam.warehouseSn = undefined
       this.$refs.table.refresh(true)
     },
     pageInit () {

+ 29 - 14
src/views/salesManagement/stockPrint/list.vue

@@ -19,28 +19,28 @@
                   <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
                   <dealerSubareaScopeList ref="dealerSubareaScopeList" id="stockPrint-buyerName" @change="custChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="销售单号">
                   <a-input id="stockPrint-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="备货单号">
                   <a-input id="stockPrint-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
                 </a-form-item>
               </a-col>
               <template v-if="advanced">
-                <a-col :md="5" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-item label="收货客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
                     <dealerSubareaScopeList ref="shbuyerName" id="stockPrint-shbuyerName" @change="shcustChange" />
                   </a-form-item>
                 </a-col>
-                <a-col :md="3" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-item label="业务状态">
                     <v-select
                       v-model="queryParam.billStatus"
@@ -51,7 +51,7 @@
                       allowClear></v-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="3" :sm="24" v-if="currentTab == 1">
+                <a-col :md="6" :sm="24" v-if="currentTab == 1">
                   <a-form-item label="单据状态">
                     <v-select
                       v-model="queryParam.voidFlag"
@@ -62,7 +62,7 @@
                       allowClear></v-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24" v-if="currentTab == 1">
+                <a-col :md="6" :sm="24" v-if="currentTab == 1">
                   <a-form-item label="备货打印状态">
                     <v-select
                       v-model="queryParam.printStatus"
@@ -73,15 +73,20 @@
                       allowClear></v-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="3" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-model-item label="所在区域">
                     <subarea id="stockPrint-subarea" ref="subarea" @change="subareaChange"></subarea>
                   </a-form-model-item>
                 </a-col>
-                <a-col :md="3" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
-                      <Area id="stockPrint-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
-                    </a-form-model-item>
+                    <Area id="stockPrint-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+                  <a-form-model-item label="仓库">
+                    <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
+                  </a-form-model-item>
                 </a-col>
               </template>
               <a-col :md="5" :sm="24">
@@ -198,6 +203,7 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import sendTypeModal from './sendTypeModal.vue'
 import recordModal from './recordModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
 import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
 import explainInfoModal from '@/views/salesManagement/pushOrderManagement/explainInfoModal.vue'
@@ -206,7 +212,7 @@ import { printFun } from '@/libs/JGPrint.js'
 export default {
   name: 'StockPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, sendTypeModal, recordModal, Area, commonModal, salesDetail, dispatchDetail, explainInfoModal },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, sendTypeModal, recordModal, Area, commonModal, salesDetail, dispatchDetail, explainInfoModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -227,7 +233,8 @@ export default {
         salesBillNo: '', //  销售单号
         dispatchBillNo: '', //  备货单号
         billStatus: undefined, //  业务状态
-        subareaArea:{
+        warehouseSn: undefined,
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
@@ -261,6 +268,9 @@ export default {
     }
   },
   computed: {
+    isShowWarehouse () {
+      return this.$store.state.app.isWarehouse
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '60px', align: 'center' },
@@ -270,6 +280,7 @@ export default {
         { title: '发货编号', dataIndex: 'sendNo', width: '50px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发货说明', scopedSlots: { customRender: 'explainInfo' }, width: '80px', align: 'center', ellipsis: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '130px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '130px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '100px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'totalCategory', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品数量', dataIndex: 'totalQty', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -284,6 +295,9 @@ export default {
         { title: '打印次数', dataIndex: 'stockUpPrintTimes', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '100px', align: 'center', fixed: 'right' }
       ]
+      if (this.isShowWarehouse) {
+        arr.splice(7, 0, { title: '仓库', dataIndex: 'warehouseName', width: '130px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       if (this.$hasPermissions('M_stockPrintList_salesPrice')) { //  售价权限
         arr.splice(9, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
         arr.splice(10, 0, { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
@@ -387,7 +401,7 @@ export default {
       this.tipData = row
       this.showInfoModal = true
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -408,6 +422,7 @@ export default {
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.shippingAddrProvinceSn = undefined
       this.queryParam.voidFlag = this.currentTab == 1 ? '' : '0'
+      this.queryParam.warehouseSn = undefined
       this.queryParam.printStatus = this.currentTab == 1 ? '' : 'NO_PRINT'
       if (this.advanced) {
         this.$refs.subarea.clearData()

+ 25 - 7
src/views/salesReturnManagement/billOfLading/add.vue

@@ -109,6 +109,11 @@
                   placeholder="请输入备注(最多500个字符)" />
               </a-form-model-item>
             </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>
+              </a-form-model-item>
+            </a-col>
             <a-col :spna="24">
               <a-form-model-item label="附件" help="说明:支持图片、word、excel、PDF等格式,最多10个附件。" :label-col="{span:2}" :wrapper-col="{span:20}">
                 <Upload
@@ -125,7 +130,7 @@
                   upText="上传附件"></Upload>
               </a-form-model-item>
             </a-col>
-            <a-col :spna="24">
+            <a-col :spna="24" v-show="form.warehouseSn">
               <a-form-model-item label="关联销退单" :label-col="{span:2}" :wrapper-col="{span:20}">
                 <a-button type="primary" class="button-primary" @click="openSelModal">选择销退单</a-button>
                 <div style="margin-top:10px;">
@@ -181,6 +186,7 @@
       modalTit="选择销退单"
       :chooseData="chooseData"
       :openModal="showXtModal"
+      :warehouseSn="form.warehouseSn"
       @cancel="closeModal"></selectXtModal>
     <!-- 选择审核人员 -->
     <chooseDepartUserModal :showDefUser="false" :openModal="openDepartUserModal" @close="closeModal" @submit="handleSubmit"></chooseDepartUserModal>
@@ -196,11 +202,12 @@ import employee from '../../expenseManagement/expenseReimbursement/employee.js'
 import logisticsCompany from './logisticsCompany.js'
 import logisticsPoint from './logisticsPoint'
 import chooseDepartUserModal from '../../expenseManagement/expenseReimbursement/chooseDepartUserModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 export default {
   name: 'ProductInfoEdit',
   mixins: [commonMixin],
-  components: { VSelect, Upload, STable, employee, dealerSubareaScopeList, chooseDepartUserModal, selectXtModal, logisticsCompany, logisticsPoint },
+  components: { VSelect, Upload, STable, employee, dealerSubareaScopeList, chooseDepartUserModal, selectXtModal, logisticsCompany, logisticsPoint, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -225,7 +232,8 @@ export default {
         goodsNum: '', // 件数
         freight: '', // 运费
         remarks: '',
-        attachmentList: '' // 附件
+        attachmentList: '', // 附件
+        warehouseSn: undefined// 退货仓库
       },
       attachList: [],
       rules: {
@@ -234,6 +242,9 @@ export default {
         ],
         theme: [
           { required: true, message: '请输入主题', trigger: 'blur' }
+        ],
+        warehouseSn: [
+          { required: true, message: '请选择退货仓库', trigger: 'change' }
         ]
       },
       chooseData: [],
@@ -249,6 +260,13 @@ export default {
     }
   },
   methods: {
+    // 选择退货仓库
+    handleWarehouse (val) {
+      this.form.warehouseSn = val
+      if (val) {
+        this.getReturnOrderList(val)
+      }
+    },
     custChange (val) {
       this.form.senderSn = val.key
       this.form.senderName = val.name
@@ -262,13 +280,13 @@ export default {
     openSelModal () {
       this.showXtModal = true
     },
-    closeModal(){
-      this.openDepartUserModal=false
+    closeModal () {
+      this.openDepartUserModal = false
       this.showXtModal = false
       this.spinning = false
     },
     // 关联销售退货单
-    getReturnOrderList () {
+    getReturnOrderList (infoSn) {
       pickUpDetailQueryList({ pickUpSn: this.$route.params.sn }).then(res => {
         this.chooseData = []
         res.data.map(item => {
@@ -401,7 +419,7 @@ export default {
       if (this.$route.params.sn) {
         this.form.theme = ''
         this.getDetail()
-        this.getReturnOrderList()
+        this.getReturnOrderList(this.$route.params.wSn)
       } else {
         this.chooseData = []
         // 从销售退货列表过来的数据

+ 5 - 0
src/views/salesReturnManagement/billOfLading/detail.vue

@@ -112,6 +112,11 @@
                 <div style="word-break: break-all;line-height:normal;padding-top:10px;">{{ form.remarks||'--' }}</div>
               </a-form-model-item>
             </a-col>
+            <a-col :spna="24">
+              <a-form-model-item style="margin-bottom:0" label="退货仓库" prop="warehouseName" :label-col="{span:2}" :wrapper-col="{span:20}">
+                {{ form.warehouseName||'--' }}
+              </a-form-model-item>
+            </a-col>
             <a-col :spna="24">
               <a-form-model-item style="margin-bottom:10px" label="附件" :label-col="{span:2}" :wrapper-col="{span:20}">
                 <div style="line-height:26px;">

+ 7 - 7
src/views/salesReturnManagement/billOfLading/list.vue

@@ -20,18 +20,18 @@
                 <a-input id="billOfLading-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入总部销退单号"/>
               </a-form-item>
             </a-col>
-           
+
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-              <a-form-item label="申请人">
+                <a-form-item label="申请人">
                   <employee style="width: 100%;" id="billOfLading-Employee" v-model="queryParam.applyPersonSn"></employee>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                  <a-form-item label="物流点">
-                    <a-input id="billOfLading-logisticsPoint" v-model.trim="queryParam.logisticsPoint" allowClear placeholder="请输入物流点"/>
-                  </a-form-item>
-                </a-col>
+                <a-form-item label="物流点">
+                  <a-input id="billOfLading-logisticsPoint" v-model.trim="queryParam.logisticsPoint" allowClear placeholder="请输入物流点"/>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="发货方">
                   <custList placeholder="请输入客户名称搜索" ref="dealerSubareaScopeList" id="billOfLading-senderSn" @change="custChange" />
@@ -240,7 +240,7 @@ export default {
     },
     // 编辑
     handleEdit (row) {
-      this.$router.push({ name: 'billOfLadingEdit', params: { sn: row.pickUpSn } })
+      this.$router.push({ name: 'billOfLadingEdit', params: { sn: row.pickUpSn, wSn: row.warehouseSn } })
     },
     // 详情
     handleDetail (row) {

+ 6 - 0
src/views/salesReturnManagement/billOfLading/selectXtModal.vue

@@ -44,6 +44,7 @@
           :data="loadData"
           :scroll="{ y: 400 }"
           :pageSize="10"
+          :defaultLoadData="false"
           bordered>
           <!-- 收款单号 -->
           <template slot="salesReturnBillNo" slot-scope="text, record">
@@ -90,6 +91,10 @@ export default {
       default: function () {
         return []
       }
+    },
+    warehouseSn: {
+      type: String,
+      default: null
     }
   },
   data () {
@@ -116,6 +121,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        this.queryParam.warehouseSn = this.warehouseSn
         return salesReturnList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません