瀏覽代碼

Merge branch 'develop_yh18' of jianguan-web/qpls-md-html into pre-release

李磊 2 年之前
父節點
當前提交
684fa82de5
共有 46 個文件被更改,包括 2171 次插入280 次删除
  1. 二進制
      public/templ/仓库调拨产品导入模板.xlsx
  2. 二進制
      public/templ/店内调出产品导入模板.xls
  3. 二進制
      public/templ/散件退货产品导入模板.xlsx
  4. 二進制
      public/templ/连锁调出产品导入模板.xlsx
  5. 二進制
      public/templ/采购单产品导入模板.xlsx
  6. 1 1
      public/version.json
  7. 29 0
      src/api/allocLinkageOut.js
  8. 28 0
      src/api/allocWarehouse.js
  9. 3 3
      src/api/data.js
  10. 1 1
      src/api/sales.js
  11. 8 0
      src/api/shelf.js
  12. 25 0
      src/api/sparePartsRet.js
  13. 1 1
      src/api/stockOut.js
  14. 25 0
      src/api/storeCallOut.js
  15. 37 37
      src/config/router.config.js
  16. 42 9
      src/utils/util.js
  17. 206 0
      src/views/allocationManagement/chainTransferOut/chooseImportModal.vue
  18. 13 3
      src/views/allocationManagement/chainTransferOut/edit.vue
  19. 186 0
      src/views/allocationManagement/chainTransferOut/importGuideModal.vue
  20. 196 0
      src/views/allocationManagement/storeTransferOut/chooseImportModal.vue
  21. 21 3
      src/views/allocationManagement/storeTransferOut/edit.vue
  22. 196 0
      src/views/allocationManagement/storeTransferOut/importGuideModal.vue
  23. 206 0
      src/views/allocationManagement/warehouseAllocation/chooseImportModal.vue
  24. 24 4
      src/views/allocationManagement/warehouseAllocation/edit.vue
  25. 186 0
      src/views/allocationManagement/warehouseAllocation/importGuideModal.vue
  26. 198 0
      src/views/bulkManagement/bulkReturnGoods/chooseImportModal.vue
  27. 24 2
      src/views/bulkManagement/bulkReturnGoods/edit.vue
  28. 4 3
      src/views/bulkManagement/bulkReturnGoods/grabEdit.vue
  29. 196 0
      src/views/bulkManagement/bulkReturnGoods/importGuideModal.vue
  30. 1 1
      src/views/bulkManagement/bulkWarehousingOrder/chooseImportModal.vue
  31. 3 1
      src/views/chainReportData/chainSalesDetailReport/list.vue
  32. 16 30
      src/views/chainReportData/chainSalesDetailsCountReport/list.vue
  33. 88 0
      src/views/common/areaList.js
  34. 4 4
      src/views/common/custList.vue
  35. 1 0
      src/views/numsGoodsShelves/replenishmentManagement/creatReplenishmentOrder.vue
  36. 48 3
      src/views/numsGoodsShelves/shelfSet/set.vue
  37. 1 1
      src/views/purchasingManagement/purchaseOrderNew/edit.vue
  38. 1 1
      src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue
  39. 96 136
      src/views/reportData/customerReport/list.vue
  40. 34 10
      src/views/reportData/customerSalesDetailsReport/list.vue
  41. 3 1
      src/views/reportData/salesDetailReport/list.vue
  42. 2 2
      src/views/salesManagement/salesQuery/detail.vue
  43. 2 20
      src/views/salesManagement/salesQuery/edit.vue
  44. 7 1
      src/views/salesManagement/salesQueryNew/detail.vue
  45. 7 1
      src/views/salesManagement/salesQueryNew/edit.vue
  46. 1 1
      vue.config.js

二進制
public/templ/仓库调拨产品导入模板.xlsx


二進制
public/templ/店内调出产品导入模板.xls


二進制
public/templ/散件退货产品导入模板.xlsx


二進制
public/templ/连锁调出产品导入模板.xlsx


二進制
public/templ/采购单产品导入模板.xlsx


+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1679974248358
+  "version": 1682473372126
 }

+ 29 - 0
src/api/allocLinkageOut.js

@@ -110,6 +110,35 @@ export const getTenantList = (params) => {
     method: 'get'
   })
 }
+
+// 导入产品
+export const importProduct = params => {
+  return axios({
+    url: '/allocLinkageOut/importProduct',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 导出错误项
+export const importProductExportError = (params) => {
+  return axios({
+    url: '/allocLinkageOut/importProduct/exportError',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 批量确认导入产品
+export const importProductInsertBatch = (params) => {
+  return axios({
+    url: '/allocLinkageOut/importProduct/insertBatch',
+    data: params,
+    method: 'post'
+  })
+}
+
 // 调往对象
 export const getReportOutTenantList = (params) => {
   return axios({

+ 28 - 0
src/api/allocWarehouse.js

@@ -121,3 +121,31 @@ export const allocWarehouseSubmit = params => {
     method: 'post'
   })
 }
+
+// 导入产品
+export const importProduct = params => {
+  return axios({
+    url: '/allocWarehouse/importProduct',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 导出错误项
+export const importProductExportError = (params) => {
+  return axios({
+    url: '/allocWarehouse/importProduct/exportError',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 批量确认导入产品
+export const importProductInsertBatch = (params) => {
+  return axios({
+    url: '/allocWarehouse/importProduct/insertBatch',
+    data: params,
+    method: 'post'
+  })
+}

+ 3 - 3
src/api/data.js

@@ -32,7 +32,7 @@ export const getAreaAll = () => {
   return axios({
     url: '/area/findAll',
     method: 'get'
-  }).then(res => res.data)
+  }).then(res => res)
 }
 
 /**
@@ -106,7 +106,7 @@ function randomStr (len) {
 
 // 查询省/市/区
 export const getArea = (params) => {
-  if(params.type == '2' || params.parentId){
+  if (params.type == '2' || params.parentId) {
     return axios({
       url: `/area/queryList`,
       data: params,
@@ -117,7 +117,7 @@ export const getArea = (params) => {
 
 // 获取省市区,兼容小程序数据
 export const getAreaCgj = (params) => {
-  if(params.type == '2' || params.parentId){
+  if (params.type == '2' || params.parentId) {
     return axios({
       url: `/areaCgj/queryList`,
       data: params,

+ 1 - 1
src/api/sales.js

@@ -134,7 +134,7 @@ export const supperCodeByVin = (params) => {
 // 销售 详情  打印
 export const salesDetailPrint = params => {
   const data = {
-    url: `/sales/print/${params.sn}/${params.type}/${params.printOrgCode}/${params.printAllName}`,
+    url: `/sales/print/${params.sn}/${params.type}/${params.printOrgCode}/${params.printAllName}/${params.remarksShowFlag}`,
     method: 'get'
   }
   // 喷墨打印

+ 8 - 0
src/api/shelf.js

@@ -75,6 +75,14 @@ export const shelfProductSave = (params) => {
     method: 'post'
   })
 }
+// 禁用货架产品 
+export const shelfProductEnable = (params) => {
+  return axios({
+    url: `/shelfProduct/updateEnableFlag`,
+    data: params,
+    method: 'post'
+  })
+}
 // 获取价格显示
 export const getShelfPriceShow = (params) => {
   return axios({

+ 25 - 0
src/api/sparePartsRet.js

@@ -146,3 +146,28 @@ export const sparePartsRetDetailClear = (params) => {
     method: 'post'
   })
 }
+// 产品导入数据
+export const sparePartsRetDetailImport = params => {
+  return axios({
+    url: '/sparePartsRet/detail/import',
+    data: params,
+    method: 'post'
+  })
+}
+// 产品信息批量导入
+export const sparePartsRetDetailBatchSave = (params) => {
+  return axios({
+    url: '/sparePartsRet/detail/saveImportDetail',
+    data: params,
+    method: 'post'
+  })
+}
+// 导出错误项
+export const sparePartsRetDetailImportError = (params) => {
+  return axios({
+    url: '/sparePartsRet/detail/exportErrorDetail',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 1 - 1
src/api/stockOut.js

@@ -34,4 +34,4 @@ export const stockOutDetailList = (params) => {
     data: params,
     method: 'post'
   })
-}
+}

+ 25 - 0
src/api/storeCallOut.js

@@ -119,3 +119,28 @@ export const storeCallOutDetailPrint = params => {
   }
   return axios.request(data)
 }
+// 产品导入数据
+export const storeCallOutDetailImport = params => {
+  return axios({
+    url: '/storeCallOut/detail/import',
+    data: params,
+    method: 'post'
+  })
+}
+// 产品信息批量导入
+export const storeCallOutDetailBatchSave = (params) => {
+  return axios({
+    url: '/storeCallOut/detail/saveBatch',
+    data: params,
+    method: 'post'
+  })
+}
+// 导出错误项
+export const storeCallOutDetailImportError = (params) => {
+  return axios({
+    url: '/storeCallOut/detail/exportImportError',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

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

@@ -662,43 +662,43 @@ export const asyncRouterMap = [
               }
             ]
           },
-          {
-            path: '/numsGoodsShelves/recallStockManagement',
-            redirect: '/numsGoodsShelves/recallStockManagement/list',
-            name: 'recallStockManagement',
-            component: BlankLayout,
-            meta: {
-              title: '调回入库',
-              icon: 'monitor',
-              permission: 'M_recallStockManagement'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'recallStockManagementList',
-                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/recallStockManagement/list.vue'),
-                meta: {
-                  title: '调回入库列表',
-                  icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_salesQueryList'
-                }
-              },
-              {
-                path: 'editStock/:stockPutSn',
-                name: 'editStock',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/numsGoodsShelves/recallStockManagement/editStock.vue'),
-                meta: {
-                  title: '编辑入库',
-                  icon: 'monitor',
-                  hidden: true,
-                  replaceTab: true
-                  // permission: 'M_salesQueryList'
-                }
-              }
-            ]
-          },
+          // {
+          //   path: '/numsGoodsShelves/recallStockManagement',
+          //   redirect: '/numsGoodsShelves/recallStockManagement/list',
+          //   name: 'recallStockManagement',
+          //   component: BlankLayout,
+          //   meta: {
+          //     title: '调回入库',
+          //     icon: 'monitor',
+          //     permission: 'M_recallStockManagement'
+          //   },
+          //   hideChildrenInMenu: true,
+          //   children: [
+          //     {
+          //       path: 'list',
+          //       name: 'recallStockManagementList',
+          //       component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/recallStockManagement/list.vue'),
+          //       meta: {
+          //         title: '调回入库列表',
+          //         icon: 'monitor',
+          //         hidden: true
+          //         // permission: 'M_salesQueryList'
+          //       }
+          //     },
+          //     {
+          //       path: 'editStock/:stockPutSn',
+          //       name: 'editStock',
+          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/numsGoodsShelves/recallStockManagement/editStock.vue'),
+          //       meta: {
+          //         title: '编辑入库',
+          //         icon: 'monitor',
+          //         hidden: true,
+          //         replaceTab: true
+          //         // permission: 'M_salesQueryList'
+          //       }
+          //     }
+          //   ]
+          // },
           {
             path: '/numsGoodsShelves/customerAnalysis',
             redirect: '/numsGoodsShelves/customerAnalysis/list',

+ 42 - 9
src/utils/util.js

@@ -3,7 +3,7 @@ export function timeFix () {
   const hour = time.getHours()
   return hour < 9 ? '早上好' : hour <= 11 ? '上午好' : hour <= 13 ? '中午好' : hour < 20 ? '下午好' : '晚上好'
 }
- 
+
 export function welcome () {
   const arr = ['休息一会儿吧', '准备吃什么呢?', '要不要打一把 DOTA', '我猜你可能累了']
   const index = Math.floor(Math.random() * arr.length)
@@ -45,6 +45,40 @@ export function handleScrollHeader (callback) {
   )
 }
 
+/**
+ * 数组转树形结构
+ * @param {array} list 被转换的数组
+ * @param {number|string} root 根节点(最外层节点)的 id
+ * @return array
+ */
+export function arrayToTree (list, root) {
+  const result = [] // 用于存放结果
+  const map = {} // 用于存放 list 下的节点
+
+  // 1. 遍历 list,将 list 下的所有节点以 id 作为索引存入 map
+  for (const item of list) {
+    map[item.id] = { ...item } // 浅拷贝
+  }
+
+  // 2. 再次遍历,将根节点放入最外层,子节点放入父节点
+  for (const item of list) {
+    // 3. 获取节点的 id 和 父 id
+    const { id, parentId } = item // ES6 解构赋值
+    // 4. 如果是根节点,存入 result
+    if (item.parentId == root) {
+      result.push(map[id])
+    } else {
+      // 5. 反之,存入到父节点
+      map[parentId].children
+        ? map[parentId].children.push(map[id])
+        : (map[parentId].children = [map[id]])
+    }
+  }
+
+  // 将结果返回
+  return result
+}
+
 /**
  * Remove loading animate
  * @param id parent element id or class
@@ -73,7 +107,7 @@ export function oneOf (value, validList) {
 }
 
 // 选择文本
-export function onTextSelected($copyText,$message){
+export function onTextSelected ($copyText, $message) {
   const textDiv = document.getElementsByClassName('copy-rect')
   const selection = window.getSelection()
   if (!selection) {
@@ -109,21 +143,21 @@ export function onTextSelected($copyText,$message){
   if (!str) {
     return
   }
-  
+
   let copyNode = textDiv[0]
-  if(!copyNode){
+  if (!copyNode) {
     if (str.length > 0) {
       copyNode = document.createElement('div')
       copyNode.innerHTML = '复制'
       copyNode.className = 'copy-rect'
       copyNode.style.position = 'fixed'
-      copyNode.style.top = rect.top - rect.height - 10  + 'px'
+      copyNode.style.top = rect.top - rect.height - 10 + 'px'
       copyNode.style.left = rect.left + rect.width - 20 + 'px'
       copyNode.style.height = 'auto'
       copyNode.style.width = 'auto'
       document.body.appendChild(copyNode)
 
-      copyNode.addEventListener('mousedown',(event) => {
+      copyNode.addEventListener('mousedown', (event) => {
         console.log(event)
         event.stopPropagation()
         console.log(str)
@@ -136,8 +170,7 @@ export function onTextSelected($copyText,$message){
           $message.error('复制失败')
           document.body.removeChild(copyNode)
         })
-      }) 
+      })
     }
   }
-  
-}
+}

+ 206 - 0
src/views/allocationManagement/chainTransferOut/chooseImportModal.vue

@@ -0,0 +1,206 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="确认导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="900">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <p class="">可导入数据{{ loadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.shelfSn"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="sTable unTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.errorDesc"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+        <template slot="errorMsg" slot-scope="text,record">
+          <a-popover placement="topRight">
+            <template slot="content">
+              <p v-for="d in record.importErrorMsgSet" v-if="d">{{ d }};</p>
+            </template>
+            <a-button type="link">
+              查看
+            </a-button>
+          </a-popover>
+        </template>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImport-submit"
+          size="large"
+          :class="loadData.length==0?'button-grey':'button-primary'"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImport-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { importProduct, importProductExportError, importProductInsertBatch } from '@/api/allocLinkageOut'
+import { hdExportExcel } from '@/libs/exportExcel'
+export default {
+  name: 'ChooseImportModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      nowColumns: [ //  可导入
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'unit', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出数量', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      nowUnColumns: [ //  不可导入
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调出数量', dataIndex: 'outQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
+      ],
+      loadData: [],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  methods: {
+    getData () {
+      const _this = this
+      this.loading = true
+      importProduct(this.paramsData).then(res => {
+        this.loading = false
+        if (res.status == 200) {
+          if (res.data.rightList && res.data.rightList.length > 0) {
+            res.data.rightList.map((item, index) => {
+              item.no = index + 1
+            })
+          }
+          if (res.data.errorList && res.data.errorList.length > 0) {
+            res.data.errorList.map((item, index) => {
+              item.no = index + 1
+              item.importErrorMsgSet = item.errorMsg ? item.errorMsg.split(';') : []
+            })
+          }
+          _this.loadData = res.data.rightList || []
+          _this.unLoadData = res.data.errorList || []
+        }
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.loadData.length == 0) {
+        this.$message.warning('暂无可导入产品!')
+      } else {
+        this.spinning = true
+        importProductInsertBatch(this.loadData).then(res => {
+          if (res.status == 200) {
+            this.$emit('ok', this.loadData)
+            this.isShow = false
+          }
+          this.spinning = false
+        })
+      }
+    },
+    // 导出错误项
+    handleError () {
+      const _this = this
+      if (_this.unLoadData.length < 1) {
+        _this.$message.info('暂无可导出错误项~')
+        return
+      }
+      _this.spinning = true
+      hdExportExcel(importProductExportError, _this.unLoadData, '连锁调出产品导入错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.loadData = []
+        this.unLoadData = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseImport-modal{
+    .chooseImport-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 13 - 3
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -139,7 +139,13 @@
                 </div>
               </a-col>
               <a-col :span="7" style="text-align: right;">
-                <!-- <a-button size="small" style="margin-left: 8px" id="chainTransferOutEdit-import-btn">导入明细</a-button> -->
+                <a-button
+                  type="danger"
+                  ghost
+                  size="small"
+                  @click="openGuideModal=true"
+                  style="margin-right: 5px"
+                  id="chainTransferOutEdit-import-btn">导入产品</a-button>
                 <a-button
                   size="small"
                   type="primary"
@@ -180,6 +186,8 @@
         @click="handleSubmit"
         style="padding: 0 60px;">提交</a-button>
     </div>
+    <!-- 导入产品 -->
+    <importGuideModal :openModal="openGuideModal" :params="{allocationLinkageOutSn: $route.params.sn}" @close="openGuideModal=false" @ok="pageInit" />
   </div>
 </template>
 
@@ -187,16 +195,17 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
-import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailSave, allocLinkageOutDetailDel, allocLinkageOutDetailCount, allocLinkageOutSubmit, allocLinkageOutDetailDelAll, allocLinkageOutDetailPrint } from '@/api/allocLinkageOut'
+import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailSave, allocLinkageOutDetailDel, allocLinkageOutDetailCount, allocLinkageOutSubmit, allocLinkageOutDetailDelAll, allocLinkageOutDetailPrint, importProductInsertBatch } from '@/api/allocLinkageOut'
 import { productQuery } from '@/api/allocWarehouse'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import { warehouseAllList } from '@/api/warehouse'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
+import importGuideModal from './importGuideModal.vue'
 export default {
   name: 'AllocLinkageOutEdit',
-  components: { STable, VSelect, Print, ProductType, ProductBrand },
+  components: { STable, VSelect, Print, ProductType, ProductBrand, importGuideModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -215,6 +224,7 @@ export default {
       warehouseList: [], //  仓库  下拉数据
       disabled: false, //  查询、重置按钮是否可操作
       chooseDisabled: false,
+      openGuideModal: false,
       advanced: false, // 高级搜索 展开/关闭
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 186 - 0
src/views/allocationManagement/chainTransferOut/importGuideModal.vue

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

+ 196 - 0
src/views/allocationManagement/storeTransferOut/chooseImportModal.vue

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

+ 21 - 3
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -168,7 +168,11 @@
                 </div>
               </a-col>
               <a-col :span="4" style="text-align: right;">
-                <!-- <a-button size="small" id="storeTransferOutEdit-import-btn">导入明细</a-button> -->
+                <a-button
+                  type="default"
+                  @click="openGuideModal=true"
+                  style="margin-right:5px;"
+                  id="salesEdit-import">导入产品</a-button>
               </a-col>
             </a-row>
             <!-- 列表 -->
@@ -213,6 +217,8 @@
         </a-collapse>
         <!-- 出入库明细 -->
         <outInDetialModal ref="outInDetialModal" outBizType="SHOP_CALL_OUT" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
+        <!-- 导入产品 -->
+        <importGuideModal :params="{storeCallOutSn: $route.params.sn}" :openModal="openGuideModal" @close="openGuideModal=false" @ok="importOk" />
       </div>
     </a-spin>
     <div class="affix-cont">
@@ -232,22 +238,24 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
-import { storeCallOutDetailList, storeCallOutDetailSn, storeCallOutDetailCount, storeCallOutDetailSave, storeCallOutDetailDel, storeCallOutSubmit, storeCallOutDetailPrint } from '@/api/storeCallOut'
+import { storeCallOutDetailList, storeCallOutDetailSn, storeCallOutDetailCount, storeCallOutDetailSave, storeCallOutDetailDel, storeCallOutSubmit, storeCallOutDetailPrint, storeCallOutDetailBatchSave } from '@/api/storeCallOut'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import { warehouseAllList } from '@/api/warehouse'
 import { productQuery } from '@/api/allocWarehouse'
 import Print from '@/views/common/print.vue'
+import importGuideModal from './importGuideModal.vue'
 import outInDetialModal from '@/views/common/outInDetialModal.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'StoreCallOutEdit',
-  components: { STable, VSelect, Print, ProductType, ProductBrand, outInDetialModal },
+  components: { STable, VSelect, Print, ProductType, ProductBrand, outInDetialModal, importGuideModal },
   mixins: [commonMixin],
   data () {
     return {
       spinning: false,
       showOutInModal: false,
+      openGuideModal: false,
       queryParam: {
         productCode: '',
         productName: '',
@@ -389,6 +397,16 @@ export default {
       this.chooseQueryParam.productName = ''
       this.$refs.chooseTable.refresh(true)
     },
+    // 确认导入明细
+    importOk(data){
+      this.spinning = true
+      storeCallOutDetailBatchSave(data).then(res => {
+        if(res.status == 200){
+          this.chooseResetSearchForm()
+        }
+        this.spinning = false
+      })
+    },
     // 基本信息
     getDetail () {
       storeCallOutDetailSn({ sn: this.$route.params.sn }).then(res => {

+ 196 - 0
src/views/allocationManagement/storeTransferOut/importGuideModal.vue

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

+ 206 - 0
src/views/allocationManagement/warehouseAllocation/chooseImportModal.vue

@@ -0,0 +1,206 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="确认导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="900">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <p class="">可导入数据{{ loadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.shelfSn"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="sTable unTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.errorDesc"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+        <template slot="errorMsg" slot-scope="text,record">
+          <a-popover placement="topRight">
+            <template slot="content">
+              <p v-for="d in record.importErrorMsgSet" v-if="d">{{ d }};</p>
+            </template>
+            <a-button type="link">
+              查看
+            </a-button>
+          </a-popover>
+        </template>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImport-submit"
+          size="large"
+          :class="loadData.length==0?'button-grey':'button-primary'"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImport-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { importProduct, importProductExportError, importProductInsertBatch } from '@/api/allocWarehouse'
+import { hdExportExcel } from '@/libs/exportExcel'
+export default {
+  name: 'ChooseImportModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      nowColumns: [ //  可导入
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调入仓位', dataIndex: 'putWarehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'unit', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出数量', dataIndex: 'allocationQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      nowUnColumns: [ //  不可导入
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调入仓位', dataIndex: 'putWarehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调出数量', dataIndex: 'allocationQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '错误原因', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
+      ],
+      loadData: [],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  methods: {
+    getData () {
+      const _this = this
+      this.loading = true
+      importProduct(this.paramsData).then(res => {
+        this.loading = false
+        if (res.status == 200) {
+          if (res.data.rightList && res.data.rightList.length > 0) {
+            res.data.rightList.map((item, index) => {
+              item.no = index + 1
+            })
+          }
+          if (res.data.errorList && res.data.errorList.length > 0) {
+            res.data.errorList.map((item, index) => {
+              item.no = index + 1
+              item.importErrorMsgSet = item.errorMsg ? item.errorMsg.split(';') : []
+            })
+          }
+          _this.loadData = res.data.rightList || []
+          _this.unLoadData = res.data.errorList || []
+        }
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.loadData.length == 0) {
+        this.$message.warning('暂无可导入产品!')
+      } else {
+        this.spinning = true
+        importProductInsertBatch(this.loadData).then(res => {
+          if (res.status == 200) {
+            this.$emit('ok', this.loadData)
+            this.isShow = false
+          }
+          this.spinning = false
+        })
+      }
+    },
+    // 导出错误项
+    handleError () {
+      const _this = this
+      if (_this.unLoadData.length < 1) {
+        _this.$message.info('暂无可导出错误项~')
+        return
+      }
+      _this.spinning = true
+      hdExportExcel(importProductExportError, _this.unLoadData, '仓库调拨产品导入错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.loadData = []
+        this.unLoadData = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseImport-modal{
+    .chooseImport-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 24 - 4
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -148,13 +148,18 @@
               </a-col>
               <a-col :span="6">
                 <div style="margin-top: 4px;text-align: right;">
-                  <!-- <a-button size="small" style="margin-left: 8px" id="chainTransferOutEdit-import-btn">导入明细</a-button> -->
+                  <a-button
+                    type="danger"
+                    ghost
+                    size="small"
+                    @click="openGuideModal=true"
+                    style="margin-right: 5px"
+                    id="chainTransferOutEdit-import-btn">导入产品</a-button>
                   <a-button
                     size="small"
                     type="danger"
                     style="margin-left: 8px"
                     @click.stop="handleDel('', 'all')"
-                    ghost
                     :disabled="chooseLoadDataSource.length==0"
                     id="warehouseAllocationEdit-del-all-btn">清空列表</a-button>
                 </div>
@@ -220,20 +225,24 @@
         @click="handleSubmit"
         style="padding: 0 60px;">提交</a-button>
     </div>
+    <!-- 导入产品 -->
+    <importGuideModal :openModal="openGuideModal" :params="{allocationWarehouseSn: $route.params.sn}" @close="openGuideModal=false" @ok="pageInit" />
   </div>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { allocWarehouseDetailList, allocWarehouseDetail, updatePutWhLocation, productQuery, allocWarehouseDetailCount, allocWarehouseDetailSave, allocWarehouseDetailDel, allocWarehouseSubmit } from '@/api/allocWarehouse'
+import { allocWarehouseDetailList, allocWarehouseDetail, updatePutWhLocation, productQuery, allocWarehouseDetailCount, allocWarehouseDetailSave, allocWarehouseDetailDel, allocWarehouseSubmit, importProductInsertBatch } from '@/api/allocWarehouse'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import { warehouseLocAllList } from '@/api/warehouse'
+import importGuideModal from './importGuideModal.vue'
 export default {
   name: 'AllocWarehouseEdit',
-  components: { STable, VSelect, ProductType, ProductBrand },
+  components: { STable, VSelect, ProductType, ProductBrand, importGuideModal },
   mixins: [commonMixin],
+
   data () {
     return {
       spinning: false,
@@ -252,6 +261,7 @@ export default {
         productCode: '',
         productName: ''
       },
+      openGuideModal: false, // 产品导入
       disabled: false, //  查询、重置按钮是否可操作
       chooseDisabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
@@ -479,6 +489,16 @@ export default {
         }
       })
     },
+    // 确认导入产品
+    hanldeImprotOk (obj) {
+      this.spinning = true
+      importProductInsertBatch(obj).then(res => {
+        if (res.status == 200) {
+          this.resetSearchForm()
+        }
+        this.spinning = false
+      })
+    },
     // 合计
     getDetailCount (params) {
       allocWarehouseDetailCount(params).then(res => {

+ 186 - 0
src/views/allocationManagement/warehouseAllocation/importGuideModal.vue

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

+ 198 - 0
src/views/bulkManagement/bulkReturnGoods/chooseImportModal.vue

@@ -0,0 +1,198 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="确认导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="80%">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <p class="">可导入数据{{ loadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="unTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+        <template slot="errorMsg" slot-scope="text,record">
+          <a-popover placement="topRight">
+            <template slot="content">
+              <p v-for="d in record.errorMsgList">{{ d }}</p>
+            </template>
+            <a-button type="link">
+              查看
+            </a-button>
+          </a-popover>
+        </template>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImport-submit"
+          size="large"
+          :class="loadData.length==0?'button-grey':'button-primary'"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImport-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { sparePartsRetDetailImportError } from '@/api/sparePartsRet'
+export default {
+  name: 'ChooseImportModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      nowColumns: [
+        { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productUnit', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
+        { title: '退货单价', dataIndex: 'returnPrice', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? Number(text).toFixed(2) : '--') } },
+        { title: '退货数量', dataIndex: 'returnQtyStr', width: '14%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      loadData: [],
+      nowUnColumns: [
+        { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货单价', dataIndex: 'returnPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货数量', dataIndex: 'returnQtyStr', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
+      ],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  methods: {
+    getData () {
+      const paramsData = JSON.parse(JSON.stringify(this.paramsData))
+      this.loadData = paramsData.rigthList || []
+      this.unLoadData = paramsData.errorList || []
+      this.loadData.map((item, index) => {
+        item.no = index + 1
+        item.sparePartsReturnSn = paramsData.sparePartsReturnSn
+      })
+      this.unLoadData.map((item, index) => {
+        item.no = index + 1
+        item.sparePartsReturnSn = paramsData.sparePartsReturnSn
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.paramsData.rigthList.length == 0) {
+        this.$message.warning('无可导入的产品!')
+      } else {
+        const data = this.paramsData.rigthList
+        this.$emit('ok', data)
+        this.isShow = false
+      }
+    },
+    // 导出
+    handleError () {
+      const _this = this
+      if (_this.paramsData.errorList.length < 1) {
+        _this.$message.info('暂无可导出错误项~')
+        return
+      }
+      _this.spinning = true
+      hdExportExcel(sparePartsRetDetailImportError, _this.paramsData.errorList, '散件入库(不抓单)产品导出错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.loadData = []
+        this.unLoadData = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseImport-modal{
+    .chooseImport-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 24 - 2
src/views/bulkManagement/bulkReturnGoods/edit.vue

@@ -137,10 +137,16 @@
             </div>
           </a-col>
           <a-col :span="7" style="text-align: right;">
+            <a-button
+              type="default"
+              @click="openGuideModal=true"
+              style="margin-right:5px;"
+              id="bulkReturnGoodsEdit-import">导入产品</a-button>
             <a-button
               class="button-error"
               type="primary"
               @click="bulkReturnGoodsDelAll"
+              id="bulkReturnGoodsEdit-clear"
               :loading="delLoading"
               ghost>清空列表 </a-button>
           </a-col>
@@ -188,6 +194,8 @@
           </template>
         </s-table>
       </a-card>
+      <!-- 导入产品 -->
+      <importGuideModal :openModal="openGuideModal" :params="{sparePartsReturnSn: $route.params.sn}" @close="openGuideModal=false" @ok="hanldeImprotOk" />
     </a-spin>
     <div class="affix-cont">
       <a-button
@@ -207,6 +215,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
+import importGuideModal from './importGuideModal.vue'
 import { warehouseAllList } from '@/api/warehouse'
 import {
   sparePartsRetDetailList,
@@ -217,15 +226,17 @@ import {
   sparePartsRetSubmit,
   sparePartsRetDetailPrint,
   sparePartsRetDetailExport,
-  sparePartsRetDetailClear } from '@/api/sparePartsRet'
+  sparePartsRetDetailClear,
+  sparePartsRetDetailBatchSave } from '@/api/sparePartsRet'
 export default {
   name: 'BulkReturnGoodsEdit',
-  components: { STable, VSelect, Print },
+  components: { STable, VSelect, Print, importGuideModal },
   mixins: [commonMixin],
   data () {
     const _this = this
     return {
       spinning: false,
+      openGuideModal: false,
       queryParam: {
         productCode: '',
         productName: '',
@@ -316,6 +327,17 @@ export default {
         _this.spinning = false
       })
     },
+    // 确认导入明细
+    hanldeImprotOk (obj) {
+      this.spinning = true
+      sparePartsRetDetailBatchSave(obj).then(res => {
+        if (res.status == 200) {
+          this.$refs.table.refresh()
+          this.chooseResetSearchForm()
+        }
+        this.spinning = false
+      })
+    },
     // 合计
     getDetailCount (params) {
       sparePartsRetDetailCount(params).then(res => {

+ 4 - 3
src/views/bulkManagement/bulkReturnGoods/grabEdit.vue

@@ -218,9 +218,10 @@ export default {
       dataSource: [],
       // 表头
       columns: [
-        { title: '散件入库单号', dataIndex: 'sparePartsPurchaseNo', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '散件入库单号', dataIndex: 'sparePartsPurchaseNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库时间', dataIndex: 'putStockTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库价格', dataIndex: 'putCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '入库数量', dataIndex: 'putQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已退数量', dataIndex: 'returnQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 196 - 0
src/views/bulkManagement/bulkReturnGoods/importGuideModal.vue

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

+ 1 - 1
src/views/bulkManagement/bulkWarehousingOrder/chooseImportModal.vue

@@ -130,7 +130,7 @@ export default {
       nowUnColumns: [
         { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '数量', dataIndex: 'putQty', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 3 - 1
src/views/chainReportData/chainSalesDetailReport/list.vue

@@ -159,7 +159,8 @@
       class="sTable"
       ref="table"
       size="small"
-      :rowKey="(record) => record.id"
+      :rowKey="(record) => record.no"
+      rowKeyName="no"
       :columns="columns"
       :data="loadData"
       :defaultLoadData="false"
@@ -267,6 +268,7 @@ export default {
         { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '13%', align: 'center', customRender: function (text) { return text && text.trim().length > 0 ? text : ' --' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量', dataIndex: 'productQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本', dataIndex: 'productCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 16 - 30
src/views/chainReportData/chainSalesDetailsCountReport/list.vue

@@ -59,7 +59,8 @@
         class="sTable"
         ref="table"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="(record) => record.targetSn"
+        rowKeyName="targetSn"
         :columns="columns"
         :data="loadData"
         :defaultLoadData="false"
@@ -100,48 +101,33 @@ export default {
       exportLoading: false,
       columns: [
         { title: '门店', dataIndex: 'salesTargetName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '箭牌、冠牌',
-          children: [
-            { title: '滤清器', dataIndex: 'lqqAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
-          ]
-        },
         {
           title: '所有品牌',
           children: [
-            { title: '雨刮片', dataIndex: 'ygpAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
-          ]
-        },
-        {
-          title: 'TBU、布雷博',
-          children: [
-            { title: '刹车制动系统', dataIndex: 'scpAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
-          ]
-        },
-        {
-          title: '汇箭、布瑞斯',
-          children: [
-            { title: '蓄电池', dataIndex: 'xdcAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
-          ]
-        },
-        {
-          title: '德路斯',
-          children: [
-            { title: '润滑油', dataIndex: 'rhyAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+            { title: '滤清器', dataIndex: 'lqqAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '雨刮片', dataIndex: 'ygpAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '刹车制动系统', dataIndex: 'scpAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '蓄电池', dataIndex: 'xdcAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '火花塞', dataIndex: 'hhsAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: 'LED灯', dataIndex: 'ledAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
           ]
         },
         {
-          title: '所有品牌',
+          title: '稳升',
           children: [
-            { title: '火花塞', dataIndex: 'hhsAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+            { title: '点火线圈', dataIndex: 'dhxqAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
           ]
         },
         {
-          title: '稳升',
+          title: '德路斯、TBU',
           children: [
-            { title: '点火线圈', dataIndex: 'dhxqAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-            { title: 'LED灯', dataIndex: 'ledAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+            { title: '润滑油', dataIndex: 'rhyAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '变速箱油', dataIndex: 'bsxyAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '刹车油', dataIndex: 'scyAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
           ]
         },
+        { title: '皮带', dataIndex: 'pdAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '轮子', dataIndex: 'lzAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '其他', dataIndex: 'otherAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '合计', dataIndex: 'totalAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ],

+ 88 - 0
src/views/common/areaList.js

@@ -0,0 +1,88 @@
+import { getAreaAll } from '@/api/data'
+import { arrayToTree } from '@/utils/util'
+const AreaList = {
+  template: `
+     <a-cascader
+          :size="size"
+          :changeOnSelect="changeOnSelect"
+          :show-search="{ filter }"
+          @change="handleChange"
+          :value="defaultVal"
+          expand-trigger="hover"
+          :allowClear="allowClear"
+          :options="list"
+          :field-names="{ label: 'name', value: defValKey, children: 'children' }" 
+          :id="id"
+          :placeholder="placeholder" 
+          style="width: 100%;" />
+    `,
+  props: {
+    value: {
+      type: Array,
+      defatut: function () {
+        return []
+      }
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    defValKey: {
+      type: String,
+      default: 'areaSn'
+    },
+    placeholder: {
+      type: String,
+      default: '请选择省/市/区'
+    },
+    allowClear: {
+      type: Boolean,
+      default: true
+    },
+    size: {
+      type: String,
+      default: 'default'
+    },
+    changeOnSelect: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      defaultVal: this.value,
+      list: []
+    }
+  },
+  watch: {
+    value (newValue, oldValue) {
+      this.defaultVal = newValue
+    }
+  },
+  mounted () {
+    this.getArea()
+  },
+  methods: {
+    filter (inputValue, path) {
+      return path.some(option => option.name.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
+    },
+    handleChange (value, selectedOptions) {
+      this.defaultVal = value
+      this.$emit('input', this.defaultVal)
+      this.$emit('change', this.defaultVal, selectedOptions)
+    },
+    //  省/市/区
+    getArea () {
+      getAreaAll().then(res => {
+        if (res.status == 200) {
+          this.list = arrayToTree(res.data, 0)
+        }
+      })
+    },
+    clearData () {
+      this.handleChange([], null)
+    }
+  }
+}
+
+export default AreaList

+ 4 - 4
src/views/common/custList.vue

@@ -39,7 +39,7 @@ export default {
       type: String || Number,
       default: undefined
     },
-    notSn:{
+    notSn: {
       type: String || Number,
       default: ''
     },
@@ -71,7 +71,6 @@ export default {
   },
   methods: {
     fetchUser (dealerName) {
-      console.log('fetching user', dealerName)
       if (dealerName == '') return
       this.lastFetchId += 1
       const fetchId = this.lastFetchId
@@ -84,7 +83,7 @@ export default {
       if (this.itemSn) {
         params.customerSn = this.itemSn
       } else {
-        params.queryWord = dealerName
+        params.queryWord = dealerName.replace(/\s+/g,'')
       }
       if (this.isEnabled) {
         params.enabledFlag = 1
@@ -99,11 +98,12 @@ export default {
       })
     },
     handleChange (value) {
-      console.log('handleChange', value)
       if (value && value.key) {
+        value.key = value.key.replace(/\s+/g,'')
         const ind = this.data.findIndex(item => item.customerName == value.key)
         value.row = ind != -1 ? this.data[ind] : undefined
       }
+      
       Object.assign(this, {
         dealerName: value,
         data: [],

+ 1 - 0
src/views/numsGoodsShelves/replenishmentManagement/creatReplenishmentOrder.vue

@@ -159,6 +159,7 @@ export default {
         this.spinning = true
         this.disabled = true
         this.queryParam.shelfSn = this.nowData.shelfSn
+        this.queryParam.enableFlag = 1
         return queryProductListForReplenish(this.queryParam).then(res => {
           let data
           if (res.status == 200) {

+ 48 - 3
src/views/numsGoodsShelves/shelfSet/set.vue

@@ -86,6 +86,7 @@
           class="sTable"
           ref="table"
           size="small"
+          :scroll="{ y: tableHeight }"
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
@@ -94,6 +95,13 @@
           bordered>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              :class="record.enableFlag==1?'button-error':'button-primary'"
+              v-if="record.shelfProductApiEntity&&(!record.shelfProductApiEntity.qty||(record.enableFlag==0&&record.shelfProductApiEntity.qty))&&record.shelfProductApiEntity.productSn"
+              @click="handleEnable(record)"
+            >{{record.enableFlag==1?'禁用':'启用'}}</a-button>
             <a-button
               size="small"
               type="link"
@@ -104,14 +112,16 @@
             <a-button
               size="small"
               type="link"
-              class="button-primary"
+              :class="record.enableFlag==1?'button-primary':''"
+              :disabled="record.enableFlag==0"
               v-else
               @click="handleReplace(record)"
             >更换产品</a-button>
             <a-button
               size="small"
               type="link"
-              class="button-primary"
+              :class="record.enableFlag==1?'button-primary':''"
+              :disabled="record.enableFlag==0"
               @click="editHW(record)"
             >编辑</a-button>
             <a-button
@@ -156,7 +166,7 @@ import ImportGuideModal from './importGuideModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import importHuoweiModal from './importHuoweiModal.vue'
 // , getShelfPriceShow
-import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn } from '@/api/shelf'
+import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn, shelfProductEnable } from '@/api/shelf'
 export default {
   name: 'ShelfMonitoringWarehousing',
   components: { STable, VSelect, commonModal, bindProductModal, addHwModal, ImportGuideModal, basicInfoModal, importHuoweiModal },
@@ -166,6 +176,7 @@ export default {
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 400,
       queryParam: {
         shelfProductApiEntity: {
           productCode: '',
@@ -193,6 +204,7 @@ export default {
             data = res.data
             for (var i = 0; i < data.length; i++) {
               data[i].no = i + 1
+              data[i].enableFlag = data[i].shelfProductApiEntity && data[i].shelfProductApiEntity.enableFlag
             }
             this.disabled = false
           }
@@ -234,6 +246,33 @@ export default {
         this.openHwModal = true
       }
     },
+    // 禁用启用
+    handleEnable(row){
+      const _this = this
+      if(row.enableFlag == 1){
+        this.$confirm({
+        title: '提示',
+        content: '禁用后不参于盘点和补货,但是可以退货、调回,确认禁用吗?',
+        centered: true,
+        onOk () {
+            _this.enableFun(row)
+          }
+        })
+      }else{
+        _this.enableFun(row)
+      }
+    },
+    enableFun(row){
+      const _this = this
+      _this.spinning = true
+      shelfProductEnable({ shelfSn: this.$route.params.sn, shelfProductSn: row.shelfProductApiEntity.shelfProductSn, enableFlag: row.enableFlag==1 ? 0 : 1 }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+        }
+        _this.spinning = false
+      })
+    },
     // 编辑货位
     editHW (row) {
       // 已绑定产品,不能编辑货位号,只能编辑已绑定产品的销售价、结算价、最大库容
@@ -317,6 +356,10 @@ export default {
       this.queryParam.shelfProductApiEntity.productName = ''
       this.$refs.table.refresh(true)
     },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 350
+    },
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/numsGoodsShelves/shelfSet/list' })
@@ -324,6 +367,7 @@ export default {
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.setTableH()
       this.getDetail()
       this.resetSearchForm()
     }
@@ -331,6 +375,7 @@ export default {
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.setTableH()
       this.getDetail()
       this.resetSearchForm()
     }

+ 1 - 1
src/views/purchasingManagement/purchaseOrderNew/edit.vue

@@ -28,7 +28,7 @@
                 <a-icon type="funnel-plot" />上次缺货
               </a-menu-item>
               <a-menu-item key="1">
-                <a-icon type="import" />产品导入
+                <a-icon type="import" />导入产品
               </a-menu-item>
             </a-menu>
             <a-button type="link" class="button-default"> <a-icon type="unordered-list" />  更多</a-button>

+ 1 - 1
src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue

@@ -134,7 +134,7 @@
                   id="purchaseReturnEdit-import-btn"
                   class="button-info"
                   @click="openGuideModal = true"
-                >产品导入</a-button>
+                >导入产品</a-button>
                 <a-button
                   type="primary"
                   ghost

+ 96 - 136
src/views/reportData/customerReport/list.vue

@@ -1,24 +1,39 @@
 <template>
-  <a-card size="small" :bordered="false" class="customerReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div class="jg-page-wrap customerReportList-wrap">
+    <a-card size="small" :bordered="false" class="table-page-search-wrapper">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form-model
-          id="customerReportList-form"
-          ref="ruleForm"
-          class="form-model-con"
-          layout="inline"
-          :model="queryParam"
-          :rules="rules"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          @keyup.enter.native="handleSearch" >
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="添加时间" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
-              </a-form-model-item>
-            </a-col>
+      <a-form-model
+        id="customerReportList-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="添加时间" prop="time">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="客户名称">
+              <custList id="chainSalesReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户类型">
+              <custType v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型"></custType>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户所在区">
+              <AreaList id="chainSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="产品分类">
                 <a-cascader
@@ -33,87 +48,60 @@
                   allowClear />
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="12" :sm="24">
-                <a-row>
-                  <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
-                    <a-col span="7">
-                      <a-form-model-item prop="provinceSn" style="margin: 0!important;">
-                        <a-select v-model="queryParam.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
-                          <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="citySn" style="margin: 0!important;">
-                        <a-select v-model="queryParam.citySn" allowClear @change="getAreaList" placeholder="请选择市">
-                          <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="countySn" style="margin: 0!important;">
-                        <a-select v-model="queryParam.countySn" allowClear placeholder="请选择区/县">
-                          <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-form-model-item>
-                </a-row>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="客户类型">
-                  <custType v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;"></custType>
-                </a-form-item>
-              </a-col>
-            </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="customerReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="customerReportList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </a-col>
-          </a-row>
-        </a-form-model>
-      </div>
-      <!-- 合计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div class="ftext" slot="message">
-          总交易金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? toThousands(totalData.discountedAmount) : '--' }}</strong>;
-          <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-            总毛利:<strong>{{ (totalData && totalData.totalGrossProfit) ? toThousands(totalData.totalGrossProfit) : '--' }}</strong>;
-            总毛利率:<strong>{{ (totalData && totalData.percentage) ? totalData.percentage+'%' : '--' }}</strong>;
+          </template>
+          <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="customerReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="customerReportList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 合计 -->
+        <div class="table-operator">
+          <div class="alert-message">
+            总交易金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? toThousands(totalData.discountedAmount) : '--' }}</strong>;
+            <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
+              总毛利:<strong>{{ (totalData && totalData.totalGrossProfit) ? toThousands(totalData.totalGrossProfit) : '--' }}</strong>;
+              总毛利率:<strong>{{ (totalData && totalData.percentage) ? totalData.percentage+'%' : '--' }}</strong>;
+            </div>
           </div>
         </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.salesTargetSn"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-      </s-table>
-    </a-spin>
-  </a-card>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
+import custList from '@/views/common/custList.vue'
+import AreaList from '@/views/common/areaList.js'
 import custType from '@/views/common/custType.js'
-import { getArea } from '@/api/data'
+// import { getArea } from '@/api/data'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { reportBigCustomerList, reportBigCustomerCount } from '@/api/reportData'
 export default {
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, custType },
+  components: { STable, VSelect, rangeDate, custType, custList, AreaList },
   data () {
     return {
       spinning: false,
@@ -131,7 +119,9 @@ export default {
         provinceSn: undefined, //  省
         citySn: undefined, //  市
         countySn: undefined, //  区
-        customerTypeSn: undefined // 客户类型
+        customerTypeSn: undefined, // 客户类型,
+        customerName: undefined,
+        customerSn: undefined
       },
       productType: [],
       rules: {
@@ -202,6 +192,11 @@ export default {
     }
   },
   methods: {
+    areaChange (val) {
+      this.queryParam.provinceSn = val[0] ? val[0] : ''
+      this.queryParam.citySn = val[1] ? val[1] : ''
+      this.queryParam.districtSn = val[2] ? val[2] : ''
+    },
     // 合计
     getCount (params) {
       reportBigCustomerCount(params).then(res => {
@@ -218,13 +213,22 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.customerSn = row.customerSn
+        this.queryParam.customerName = row.customerName
+      } else {
+        this.queryParam.customerName = v
+        this.queryParam.customerSn = undefined
+      }
+    },
     //  查询
     handleSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           this.$refs.table.refresh(true)
         } else {
-          console.log('error submit!!')
+          this.$message.error('添加时间不能为空!')
           return false
         }
       })
@@ -242,8 +246,11 @@ export default {
       this.queryParam.citySn = undefined
       this.queryParam.countySn = undefined
       this.queryParam.customerTypeSn = undefined
+      this.queryParam.customerSn = undefined
+      this.queryParam.customerName = undefined
       this.productType = []
       this.$refs.ruleForm.resetFields()
+      this.$refs.custSatelliteList.resetForm()
       this.totalData = null
       this.$refs.table.clearTable()
     },
@@ -268,54 +275,7 @@ export default {
         }
       })
     },
-    // 获取城市列表
-    getCityList (val) {
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.queryParam.citySn = undefined
-      this.queryParam.countySn = undefined
-      if (val) {
-        this.getArea('city', val)
-      }
-    },
-    // 获取区县列表
-    getAreaList (val) {
-      this.addrDistrictList = []
-      this.queryParam.countySn = undefined
-      if (val) {
-        this.getArea('district', val)
-      }
-    },
-    //  省/市/区
-    getArea (leve, sn) {
-      let params
-      if (leve == 'province') {
-        params = { type: '2' }
-      } else {
-        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
-      }
-      getArea(params).then(res => {
-        if (res.status == 200) {
-          if (leve == 'province') {
-            this.addrProvinceList = res.data || []
-          } else if (leve == 'city') {
-            this.addrCityList = res.data || []
-          } else if (leve == 'district') {
-            this.addrDistrictList = res.data || []
-          }
-        } else {
-          if (leve == 'province') {
-            this.addrProvinceList = []
-          } else if (leve == 'city') {
-            this.addrCityList = []
-          } else if (leve == 'district') {
-            this.addrDistrictList = []
-          }
-        }
-      })
-    },
     pageInit () {
-      this.getArea('province')
       this.getProductType()
     }
   },

+ 34 - 10
src/views/reportData/customerSalesDetailsReport/list.vue

@@ -46,6 +46,7 @@
         ref="table"
         size="small"
         :rowKey="(record) => record.targetSn"
+        rowKeyName="targetSn"
         :columns="columns"
         :data="loadData"
         :defaultLoadData="false"
@@ -59,10 +60,14 @@
                 <a-col span="4">雨刮片:{{ (totalData && (totalData.ygpAmount || totalData.ygpAmount==0)) ? toThousands(totalData.ygpAmount) : '--' }}</a-col>
                 <a-col span="4">刹车片:{{ (totalData && (totalData.scpAmount || totalData.scpAmount==0)) ? toThousands(totalData.scpAmount) : '--' }}</a-col>
                 <a-col span="4">蓄电池:{{ (totalData && (totalData.xdcAmount || totalData.xdcAmount==0)) ? toThousands(totalData.xdcAmount) : '--' }}</a-col>
-                <a-col span="4">润滑油:{{ (totalData && (totalData.rhyAmount || totalData.rhyAmount==0)) ? toThousands(totalData.rhyAmount) : '--' }}</a-col>
                 <a-col span="4">火花塞:{{ (totalData && (totalData.hhsAmount || totalData.hhsAmount==0)) ? toThousands(totalData.hhsAmount) : '--' }}</a-col>
-                <a-col span="4">点火线圈:{{ (totalData && (totalData.dhxqAmount || totalData.dhxqAmount==0)) ? toThousands(totalData.dhxqAmount) : '--' }}</a-col>
                 <a-col span="4">LED灯:{{ (totalData && (totalData.ledAmount || totalData.ledAmount==0)) ? toThousands(totalData.ledAmount) : '--' }}</a-col>
+                <a-col span="4">点火线圈:{{ (totalData && (totalData.dhxqAmount || totalData.dhxqAmount==0)) ? toThousands(totalData.dhxqAmount) : '--' }}</a-col>
+                <a-col span="4">润滑油:{{ (totalData && (totalData.rhyAmount || totalData.rhyAmount==0)) ? toThousands(totalData.rhyAmount) : '--' }}</a-col>
+                <a-col span="4">变速箱油:{{ (totalData && (totalData.bsxyAmount || totalData.bsxyAmount==0)) ? toThousands(totalData.bsxyAmount) : '--' }}</a-col>
+                <a-col span="4">刹车油:{{ (totalData && (totalData.scyAmount || totalData.scyAmount==0)) ? toThousands(totalData.scyAmount) : '--' }}</a-col>
+                <a-col span="4">皮带:{{ (totalData && (totalData.pdAmount || totalData.pdAmount==0)) ? toThousands(totalData.pdAmount) : '--' }}</a-col>
+                <a-col span="4">轮子:{{ (totalData && (totalData.lzAmount || totalData.lzAmount==0)) ? toThousands(totalData.lzAmount) : '--' }}</a-col>
                 <a-col span="4">其他:{{ (totalData && (totalData.otherAmount || totalData.otherAmount==0)) ? toThousands(totalData.otherAmount) : '--' }}</a-col>
                 <a-col span="4">合计:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
               </a-row>
@@ -105,14 +110,33 @@ export default {
       exportLoading: false,
       columns: [
         { title: '客户名称', dataIndex: 'salesTargetName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '滤清器', dataIndex: 'lqqAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '雨刮片', dataIndex: 'ygpAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '刹车片', dataIndex: 'scpAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '蓄电池', dataIndex: 'xdcAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '润滑油', dataIndex: 'rhyAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '火花塞', dataIndex: 'hhsAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '点火线圈', dataIndex: 'dhxqAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: 'LED灯', dataIndex: 'ledAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        {
+          title: '所有品牌',
+          children: [
+            { title: '滤清器', dataIndex: 'lqqAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '雨刮片', dataIndex: 'ygpAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '刹车制动系统', dataIndex: 'scpAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '蓄电池', dataIndex: 'xdcAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '火花塞', dataIndex: 'hhsAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: 'LED灯', dataIndex: 'ledAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+          ]
+        },
+        {
+          title: '稳升',
+          children: [
+            { title: '点火线圈', dataIndex: 'dhxqAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          ]
+        },
+        {
+          title: '德路斯、TBU',
+          children: [
+            { title: '润滑油', dataIndex: 'rhyAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '变速箱油', dataIndex: 'bsxyAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+            { title: '刹车油', dataIndex: 'scyAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          ]
+        },
+        { title: '皮带', dataIndex: 'pdAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '轮子', dataIndex: 'lzAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '其他', dataIndex: 'otherAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '合计', dataIndex: 'totalAmount', width: '8.4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ],

+ 3 - 1
src/views/reportData/salesDetailReport/list.vue

@@ -164,7 +164,8 @@
       class="sTable"
       ref="table"
       size="small"
-      :rowKey="(record) => record.id"
+      :rowKey="(record) => record.no"
+      rowKeyName="no"
       :columns="columns"
       :data="loadData"
       :defaultLoadData="false"
@@ -273,6 +274,7 @@ export default {
         { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量', dataIndex: 'productQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本', dataIndex: 'productCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 2 - 2
src/views/salesManagement/salesQuery/detail.vue

@@ -153,7 +153,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return salesDetailList(Object.assign(parameter, { salesBillSn: this.outBizSn || this.$route.params.sn })).then(res => {
+        return salesDetailList(Object.assign(parameter, { salesBillSn: this.outBizSn || this.$route.params.sn, orderBy: 'sales_bill_detail.CREATE_DATE desc' })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -233,7 +233,7 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
+      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: 0 }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }

+ 2 - 20
src/views/salesManagement/salesQuery/edit.vue

@@ -344,7 +344,7 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
+      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: 0 }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }
@@ -556,25 +556,7 @@ export default {
       // 防止多次添加产品
       if (this.isInster) { return }
       const _this = this
-      // 判断是否已添加此产品
-      // if (this.dataSource && this.dataSource.length > 0) {
-      //   const hasRow = this.dataSource.find(item => item.productSn == row.productSn)
-      //   if (hasRow) {
-      //     this.$message.info('该产品已在当前销售单中存在!')
-      //     this.productForm = {
-      //       productName: '',
-      //       productCode: hasRow.dealerProductEntity && hasRow.dealerProductEntity.code || '',
-      //       orderBy: 'sales_bill_detail.CREATE_DATE desc'
-      //     }
-      //     this.$refs.table.refresh(true)
-      //   } else {
-      //     this.productForm = {
-      //       productName: '',
-      //       productCode: '',
-      //       orderBy: 'sales_bill_detail.CREATE_DATE desc'
-      //     }
-      //   }
-      // }
+
       // 自建的单据显示库存不足时
       if (row.currentQty < row.salesNums && this.isOwerEdit) {
         _this.$confirm({

+ 7 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -20,6 +20,7 @@
               <div style="padding:10px;" slot="extendCons">
                 <a-checkbox v-model="printAllName" :checked="printAllName" id="salesQuery-printAllName">打印完整产品名称</a-checkbox>
                 <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
+                <a-checkbox v-model="printRemarks" :checked="printRemarks" id="salesQuery-printRemarks">打印备注</a-checkbox>
               </div>
             </PrintPanel>
           </div>
@@ -153,6 +154,7 @@ export default {
       showCost: false,
       printOrgCode: false, // 打印原创编码
       printAllName: false, // 打印全部名称
+      printRemarks: false,
       showOutInModal: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -238,7 +240,7 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
+      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: this.printRemarks ? 1 : 0 }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }
@@ -279,6 +281,7 @@ export default {
         // 是否默认打印原厂编码
         vm.printOrgCode = localStorage.getItem('printOrgCode-' + this.$store.state.user.info.orgId) == 'true'
         vm.printAllName = localStorage.getItem('printAllName-' + this.$store.state.user.info.orgId) == 'true'
+        vm.printRemarks = localStorage.getItem('printRemarks-' + this.$store.state.user.info.orgId) == 'true'
         vm.$refs.table.refresh(true)
         vm.getDetail()
       })
@@ -288,6 +291,9 @@ export default {
     printOrgCode (newValue, oldValue) {
       localStorage.setItem('printOrgCode-' + this.$store.state.user.info.orgId, newValue)
     },
+    printRemarks (newValue, oldValue) {
+      localStorage.setItem('printRemarks-' + this.$store.state.user.info.orgId, newValue)
+    },
     printAllName (newValue, oldValue) {
       localStorage.setItem('printAllName-' + this.$store.state.user.info.orgId, newValue)
     }

+ 7 - 1
src/views/salesManagement/salesQueryNew/edit.vue

@@ -24,6 +24,7 @@
             <div style="padding:10px;" slot="extendCons">
               <a-checkbox v-model="printAllName" :checked="printAllName" id="salesQuery-printAllName">打印完整产品名称</a-checkbox>
               <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
+              <a-checkbox v-model="printRemarks" :checked="printRemarks" id="salesQuery-printRemarks">打印备注</a-checkbox>
             </div>
           </PrintPanel>
           <a-divider type="vertical" v-if="detailData&&detailData.totalCategory" />
@@ -369,6 +370,7 @@ export default {
       tbForm: [], // 同步操作
       printOrgCode: false, // 打印原创编码
       printAllName: false, // 打印全部名称
+      printRemarks: false, // 打印备注
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -459,7 +461,7 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
+      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: this.printRemarks ? 1 : 0 }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }
@@ -893,6 +895,7 @@ export default {
         // 是否默认打印原厂编码
         vm.printOrgCode = localStorage.getItem('printOrgCode-' + this.$store.state.user.info.orgId) == 'true'
         vm.printAllName = localStorage.getItem('printAllName-' + this.$store.state.user.info.orgId) == 'true'
+        vm.printRemarks = localStorage.getItem('printRemarks-' + this.$store.state.user.info.orgId) == 'true'
         vm.getOrderDetail(true)
       })
     }
@@ -904,6 +907,9 @@ export default {
     printAllName (newValue, oldValue) {
       localStorage.setItem('printAllName-' + this.$store.state.user.info.orgId, newValue)
     },
+    printRemarks (newValue, oldValue) {
+      localStorage.setItem('printRemarks-' + this.$store.state.user.info.orgId, newValue)
+    },
     showSearch (newValue, oldValue) {
       this.setTableH()
     },

+ 1 - 1
vue.config.js

@@ -211,7 +211,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.0.103/qpls-md',
+        // target: 'http://192.168.2.111/qpls-md',
         target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,