Bladeren bron

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

李磊 2 jaren geleden
bovenliggende
commit
6ea6a21897
73 gewijzigde bestanden met toevoegingen van 1323 en 505 verwijderingen
  1. BIN
      public/favicon.ico
  2. 1 1
      public/index.html
  3. 1 1
      public/version.json
  4. 21 0
      src/api/customer.js
  5. 1 1
      src/components/newThem.less
  6. 73 48
      src/config/router.config.js
  7. 1 1
      src/views/allocationManagement/chainTransferIn/list.vue
  8. 1 1
      src/views/allocationManagement/chainTransferOut/list.vue
  9. 121 47
      src/views/allocationManagement/storeTransferOut/detail.vue
  10. 32 4
      src/views/allocationManagement/storeTransferOut/edit.vue
  11. 21 7
      src/views/allocationManagement/storeTransferOut/list.vue
  12. 12 15
      src/views/allocationManagement/warehouseAllocation/detail.vue
  13. 46 30
      src/views/allocationManagement/warehouseAllocation/edit.vue
  14. 1 1
      src/views/allocationManagement/warehouseAllocation/list.vue
  15. 1 0
      src/views/bulkManagement/bulkWarehousingOrder/edit.vue
  16. 17 4
      src/views/chainReportData/chainSalesDetailReport/list.vue
  17. 17 4
      src/views/chainReportData/chainSalesReport/list.vue
  18. 23 3
      src/views/common/custList.vue
  19. 43 3
      src/views/customerManagement/customerInfo/detailModal.vue
  20. 10 4
      src/views/customerManagement/customerInfo/edit.vue
  21. 34 13
      src/views/customerManagement/customerInfo/list.vue
  22. 149 0
      src/views/customerManagement/customerInfo/mergeCustomerModal.vue
  23. 148 0
      src/views/customerManagement/customerMerge/index.vue
  24. 33 40
      src/views/financialManagement/companyCollectionPayment/detail.vue
  25. 10 5
      src/views/financialManagement/companyCollectionPayment/list.vue
  26. 23 7
      src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue
  27. 14 3
      src/views/financialManagement/companyReceivablePayable/collectionPayment.vue
  28. 1 1
      src/views/financialManagement/companyReceivablePayable/detail.vue
  29. 20 7
      src/views/financialManagement/companyReceivablePayable/list.vue
  30. 10 9
      src/views/financialManagement/financialCollection/detailModal.vue
  31. 14 10
      src/views/financialManagement/financialCollection/list.vue
  32. 2 1
      src/views/financialManagement/financialPayment/detailModal.vue
  33. 12 7
      src/views/financialManagement/financialPayment/list.vue
  34. 4 4
      src/views/financialManagement/fundAccountManagement/detail.vue
  35. 15 7
      src/views/financialManagement/ledgerRecord/list.vue
  36. 10 10
      src/views/inventoryManagement/inventoryChecking/detailModal.vue
  37. 9 4
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  38. 3 3
      src/views/inventoryManagement/inventoryWarning/list.vue
  39. 7 6
      src/views/numsGoodsShelves/customerAnalysis/list.vue
  40. 7 7
      src/views/numsGoodsShelves/settlementManagement/list.vue
  41. 2 1
      src/views/numsGoodsShelves/vinAnalysis/spList.vue
  42. 3 2
      src/views/numsGoodsShelves/vinAnalysis/vinList.vue
  43. 10 5
      src/views/outboundOrderManagement/outboundOrder/list.vue
  44. 1 1
      src/views/power/role/roleList.vue
  45. 1 1
      src/views/productManagement/productInfo/edit.vue
  46. 1 4
      src/views/productManagement/productInfo/list.vue
  47. 3 1
      src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue
  48. 1 1
      src/views/purchasingManagement/purchaseOrderNew/edit.vue
  49. 17 4
      src/views/reportData/customerSalesDetailsReport/list.vue
  50. 38 20
      src/views/reportData/salesDetailReport/list.vue
  51. 41 20
      src/views/reportData/salesReport/list.vue
  52. 17 4
      src/views/reportData/salesReturnReport/detailList.vue
  53. 17 4
      src/views/reportData/salesReturnReport/list.vue
  54. 19 5
      src/views/reportData/storeTransferOutReport/detailList.vue
  55. 19 5
      src/views/reportData/storeTransferOutReport/list.vue
  56. 19 4
      src/views/reportData/urgentItemsOffsetReport/detailList.vue
  57. 20 7
      src/views/reportData/urgentItemsOffsetReport/list.vue
  58. 5 5
      src/views/salesManagement/giftRecord/list.vue
  59. 6 6
      src/views/salesManagement/productPricing/productSalesRecordModal.vue
  60. 2 1
      src/views/salesManagement/salesQuery/chooseCustomModal.vue
  61. 1 1
      src/views/salesManagement/salesQuery/detail.vue
  62. 28 20
      src/views/salesManagement/salesQuery/edit.vue
  63. 8 6
      src/views/salesManagement/salesQuery/list.vue
  64. 1 1
      src/views/salesManagement/salesQuery/productSalesRecordModal.vue
  65. 20 2
      src/views/salesManagement/salesQuery/queryPart.vue
  66. 1 1
      src/views/salesManagement/salesReturn/detail.vue
  67. 4 4
      src/views/salesManagement/salesReturn/list.vue
  68. 1 1
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  69. 3 3
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  70. 3 3
      src/views/salesManagement/salesman/editModal.vue
  71. 1 1
      src/views/salesManagement/urgentItemsOffset/detail.vue
  72. 5 5
      src/views/salesManagement/urgentItemsOffset/list.vue
  73. 37 37
      vue.config.js

BIN
public/favicon.ico


+ 1 - 1
public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
     <meta content="always" name="referrer">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <!-- <link rel="icon" href="<%= BASE_URL %>logo.png"> -->
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title><%= VUE_APP_PRO_NAME %></title>
     <style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style>
     <!-- require cdn assets css -->

+ 1 - 1
public/version.json

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

+ 21 - 0
src/api/customer.js

@@ -71,3 +71,24 @@ export const updateEnableStatus = params => {
     method: 'get'
   })
 }
+
+// 客户合并
+export const custMerge = params => {
+  return axios({
+    url: '/cust/merge',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 合并记录分页
+export const custMergeLogList = (params) => {
+  const url = `/cust/queryMergeLogPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 1 - 1
src/components/newThem.less

@@ -28,7 +28,7 @@
 @ve-table-column-fixed-border-color: #aaa;
 @ve-table-body-row-hover-background-color: color(~`colorPalette('@{primary-color}', 0.5) `);
 @ve-table-body-row-highlight-background-color: color(~`colorPalette('@{primary-color}', 1) `);
-
+ 
 .ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content{
     // border-bottom: 1px solid #ddd;
 }

+ 73 - 48
src/config/router.config.js

@@ -2408,6 +2408,54 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/chainReportData/chainTransferReport',
+            redirect: '/chainReportData/chainTransferReport/index',
+            name: 'chainTransferReport',
+            component: BlankLayout,
+            meta: {
+              title: '连锁调入报表',
+              icon: 'profile',
+              permission: 'M_chainTransferReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'chainTransferReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/chainReportData/chainTransferReport/index.vue'),
+                meta: {
+                  title: '连锁调入报表列表',
+                  icon: 'profile',
+                  hidden: true
+                }
+              }
+            ]
+          },
+          {
+            path: '/chainReportData/chainCallReport',
+            redirect: '/chainReportData/chainCallReport/index',
+            name: 'chainCallReport',
+            component: BlankLayout,
+            meta: {
+              title: '连锁调出报表',
+              icon: 'profile',
+              permission: 'M_chainCallReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'chainCallReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/chainReportData/chainCallReport/index.vue'),
+                meta: {
+                  title: '连锁调出报表列表',
+                  icon: 'profile',
+                  hidden: true
+                }
+              }
+            ]
           }
         ]
       },
@@ -2668,54 +2716,6 @@ export const asyncRouterMap = [
                 }
               }
             ]
-          },
-          {
-            path: '/chainReportData/chainTransferReport',
-            redirect: '/chainReportData/chainTransferReport/index',
-            name: 'chainTransferReport',
-            component: BlankLayout,
-            meta: {
-              title: '连锁调入报表',
-              icon: 'profile',
-              permission: 'M_chainTransferReportList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'index',
-                name: 'chainTransferReportIndex',
-                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainTransferReport/index.vue'),
-                meta: {
-                  title: '连锁调入报表列表',
-                  icon: 'profile',
-                  hidden: true
-                }
-              }
-            ]
-          },
-          {
-            path: '/chainReportData/chainCallReport',
-            redirect: '/chainReportData/chainCallReport/index',
-            name: 'chainCallReport',
-            component: BlankLayout,
-            meta: {
-              title: '连锁调出报表',
-              icon: 'profile',
-              permission: 'M_chainCallReportList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'index',
-                name: 'chainCallReportIndex',
-                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainCallReport/index.vue'),
-                meta: {
-                  title: '连锁调出报表列表',
-                  icon: 'profile',
-                  hidden: true
-                }
-              }
-            ]
           }
         ]
       },
@@ -2776,6 +2776,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/customerManagement/customerMerge',
+            redirect: '/customerManagement/customerMerge/index',
+            name: 'customerMerge',
+            component: BlankLayout,
+            meta: {
+              title: '客户合并记录',
+              icon: 'profile',
+              permission: 'M_customerMergeList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'customerMergeIndex',
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/customerManagement/customerMerge/index.vue'),
+                meta: {
+                  title: '客户合并记录',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_customerMergeList'
+                }
+              }
+            ]
           }
         ]
       },

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

@@ -272,7 +272,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 197
+      this.tableHeight = window.innerHeight - tableSearchH - 232
     }
   },
   watch: {

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

@@ -408,7 +408,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 273
     }
   },
   watch: {

+ 121 - 47
src/views/allocationManagement/storeTransferOut/detail.vue

@@ -1,34 +1,48 @@
 <template>
   <div class="storeTransferOutDetail-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutDetail-back" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }" >
+      <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutDetail-back" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }">
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle" v-if="!outBizSn">
-          <a id="storeTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a id="storeTransferOutDetail-back-btn" href="javascript:;" @click="handleBack">
+            <a-icon type="left" />
+            返回列表
+          </a>
           <a-button
-            v-if="isEdit&&$hasPermissions('B_storeCallOutEdit')"
+            v-if="isEdit && $hasPermissions('B_storeCallOutEdit')"
             type="primary"
             size="small"
             style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
             id="storeTransferOutDetail-edit-btn"
-            @click.stop="handleEdit">编辑</a-button>
+            @click.stop="handleEdit"
+          >
+            编辑
+          </a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="outBizSn ? $hasPermissions('B_outboundOrderDetail') : $hasPermissions('B_storeCallOutPrint')">
           <a-checkbox key="4" v-if="$hasPermissions('M_ShowAllCost')" v-model="printCostChecked">打印成本</a-checkbox>
-          <Print :disabled="localDataSource.length==0" :showExport="false" @handlePrint="handlePrint"></Print>
+          <Print :disabled="localDataSource.length == 0" :showExport="false" @handlePrint="handlePrint"></Print>
         </template>
       </a-page-header>
-      <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont">
+      <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont" v-if="basicInfoData">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="3">
-              <a-descriptions-item label="调往对象名称">{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="店内调出单号">{{ (basicInfoData&&basicInfoData.storeCallOutNo) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调拨类型">{{ (basicInfoData&&basicInfoData.callOutTypeName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调往对象名称">
+                {{
+                  (basicInfoData.putPersonType == 'EMPLOYEE'
+                    ? basicInfoData.putPersonName
+                    : basicInfoData.customerNameCurrent == basicInfoData.putPersonName
+                      ? basicInfoData.customerNameCurrent
+                      : basicInfoData.customerNameCurrent + '(' + basicInfoData.putPersonName + ')') || '--'
+                }}
+              </a-descriptions-item>
+              <a-descriptions-item label="店内调出单号">{{ basicInfoData.storeCallOutNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ basicInfoData.stateDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="财务状态">{{ basicInfoData.settleStateDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨类型">{{ basicInfoData.callOutTypeName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ basicInfoData.remark || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
@@ -37,10 +51,13 @@
         <!-- 总计 -->
         <a-alert type="info" style="margin-bottom:10px">
           <div slot="message">
-            总款数 <strong>{{ (productTotal&&(productTotal.productTotalCategory || productTotal.productTotalCategory==0)) ? productTotal.productTotalCategory : '--' }}</strong> ,
-            总数量 <strong>{{ (productTotal&&(productTotal.productTotalQty || productTotal.productTotalQty==0)) ? productTotal.productTotalQty : '--' }}</strong>
+            总款数
+            <strong>{{ productTotal && (productTotal.productTotalCategory || productTotal.productTotalCategory == 0) ? productTotal.productTotalCategory : '--' }}</strong>
+            , 总数量
+            <strong>{{ productTotal && (productTotal.productTotalQty || productTotal.productTotalQty == 0) ? productTotal.productTotalQty : '--' }}</strong>
             <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-              ,总成本 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? toThousands(productTotal.productTotalCost, 2) : '--' }}</strong>
+              ,总成本
+              <strong>{{ productTotal && (productTotal.productTotalCost || productTotal.productTotalCost == 0) ? toThousands(productTotal.productTotalCost, 2) : '--' }}</strong>
             </div>
           </div>
         </a-alert>
@@ -49,7 +66,7 @@
           class="sTable"
           ref="table"
           size="small"
-          :rowKey="(record) => record.id"
+          :rowKey="record => record.id"
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"
@@ -59,7 +76,8 @@
               <template slot="title">
                 系统中不同批次的产品,成本价可能不同,此值是按照实际出库批次的成本计算得到。
               </template>
-              <span style="margin-right: 5px;">实际总成本</span> <a-icon type="question-circle" />
+              <span style="margin-right: 5px;">实际总成本</span>
+              <a-icon type="question-circle" />
             </a-tooltip>
           </div>
           <!-- 操作 -->
@@ -68,7 +86,7 @@
           </template>
         </s-table>
         <!-- 出入库明细 -->
-        <outInDetialModal ref="outInDetialModal" outBizType="SHOP_CALL_OUT" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
+        <outInDetialModal ref="outInDetialModal" outBizType="SHOP_CALL_OUT" :openModal="showOutInModal" @close="showOutInModal = false"></outInDetialModal>
       </a-card>
     </a-spin>
   </div>
@@ -87,7 +105,8 @@ export default {
   components: { STable, VSelect, Print, outInDetialModal },
   mixins: [commonMixin],
   props: {
-    outBizSn: { //  有值则为弹框,无值则为页面
+    outBizSn: {
+      //  有值则为弹框,无值则为页面
       type: [Number, String],
       default: ''
     }
@@ -123,24 +142,84 @@ export default {
   },
   computed: {
     isEdit () {
-      return ((this.basicInfoData && this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT')) && this.$hasPermissions('B_storeCallOutEdit')
+      return (
+        ((this.basicInfoData && this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT')) &&
+        this.$hasPermissions('B_storeCallOutEdit')
+      )
     },
     columns () {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '22%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        {
+          title: '产品编码',
+          dataIndex: 'productCode',
+          width: '22%',
+          align: 'center',
+          customRender: function (text) {
+            return text || '--'
+          }
+        },
+        {
+          title: '产品名称',
+          dataIndex: 'productName',
+          width: '22%',
+          align: 'left',
+          customRender: function (text) {
+            return text || '--'
+          },
+          ellipsis: true
+        },
+        {
+          title: '单位',
+          dataIndex: 'productUnit',
+          width: '6%',
+          align: 'center',
+          customRender: function (text) {
+            return text || '--'
+          }
+        },
         // { title: '成本价(¥)', dataIndex: 'outCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调出仓库', dataIndex: 'warehouseName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调出仓位', dataIndex: 'warehouseLocationName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调出数量', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        {
+          title: '调出仓库',
+          dataIndex: 'warehouseName',
+          width: '12%',
+          align: 'center',
+          customRender: function (text) {
+            return text || '--'
+          }
+        },
+        {
+          title: '调出仓位',
+          dataIndex: 'warehouseLocationName',
+          width: '12%',
+          align: 'center',
+          customRender: function (text) {
+            return text || '--'
+          }
+        },
+        {
+          title: '调出数量',
+          dataIndex: 'outQty',
+          width: '10%',
+          align: 'center',
+          customRender: function (text) {
+            return text || text == 0 ? text : '--'
+          }
+        },
         // { slots: { title: 'costTitle' }, dataIndex: 'totalOutCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(6, 0, { slots: { title: 'costTitle' }, dataIndex: 'totalOutCost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(6, 0, {
+          slots: { title: 'costTitle' },
+          dataIndex: 'totalOutCost',
+          width: '8%',
+          align: 'right',
+          customRender: function (text) {
+            return text || text == 0 ? _this.toThousands(text, 2) : '--'
+          }
+        })
       }
       return arr
     }
@@ -175,6 +254,7 @@ export default {
       storeCallOutDetailSn({ sn: this.outBizSn || this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
+          this.getDetailCount()
         } else {
           this.basicInfoData = null
         }
@@ -185,6 +265,9 @@ export default {
       storeCallOutDetailCount({ storeCallOutSn: this.outBizSn || this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.productTotal = res.data
+          this.$nextTick(() => {
+            this.$refs.table.refresh(true)
+          })
         } else {
           this.productTotal = null
         }
@@ -196,21 +279,12 @@ export default {
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab || this.outBizSn) { // 页签刷新 或 为弹框时调用
-      this.printCostChecked = true
-      this.$refs.table.refresh(true)
-      this.getDetail()
-      this.getDetailCount()
-    }
+    this.printCostChecked = true
+    this.getDetail()
   },
   activated () {
-    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
-    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
-      this.printCostChecked = true
-      this.$refs.table.refresh(true)
-      this.getDetail()
-      this.getDetailCount()
-    }
+    this.printCostChecked = true
+    this.getDetail()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})
@@ -219,12 +293,12 @@ export default {
 </script>
 
 <style lang="less">
-  .storeTransferOutDetail-wrap{
-    .storeTransferOutDetail-back{
-      margin-bottom: 10px;
-    }
-    .storeTransferOutDetail-cont{
-      margin-bottom: 10px;
-    }
+.storeTransferOutDetail-wrap {
+  .storeTransferOutDetail-back {
+    margin-bottom: 10px;
+  }
+  .storeTransferOutDetail-cont {
+    margin-bottom: 10px;
   }
+}
 </style>

+ 32 - 4
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -5,7 +5,7 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="storeTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;">调往对象名称:{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</span>
+          <span style="margin: 0 15px;color: #666;" v-if="basicInfoData">调往对象名称:{{ (basicInfoData.putPersonType=='EMPLOYEE'?basicInfoData.putPersonName:(basicInfoData.customerNameCurrent==basicInfoData.putPersonName?basicInfoData.customerNameCurrent:basicInfoData.customerNameCurrent+'('+basicInfoData.putPersonName+')')) || '--' }}</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_storeCallOutPrint')">
@@ -49,6 +49,23 @@
                         <ProductType id="storeTransferOutEdit-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
                       </a-form-model-item>
                     </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="是否有库存">
+                        <a-select @change="handleHasQty" allowClear :value="queryParam.existStockFlag" placeholder="请选择查看是否有库存">
+                          <a-select-option value="1">
+                            是
+                          </a-select-option>
+                          <a-select-option value="0">
+                            否
+                          </a-select-option>
+                        </a-select>
+                      </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24">
+                      <a-form-item label="">
+                        <a-checkbox style="margin-left:10px;" v-model="enableFlag" :checked="enableFlag" id="sales-byCustQuery">包括禁用产品</a-checkbox>
+                      </a-form-item>
+                    </a-col>
                   </template>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                     <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
@@ -215,7 +232,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
-import { storeCallOutDetailList, storeCallOutDetail, storeCallOutDetailCount, storeCallOutDetailSave, storeCallOutDetailDel, storeCallOutSubmit, storeCallOutDetailPrint } from '@/api/storeCallOut'
+import { storeCallOutDetailList, storeCallOutDetailSn, storeCallOutDetailCount, storeCallOutDetailSave, storeCallOutDetailDel, storeCallOutSubmit, storeCallOutDetailPrint } from '@/api/storeCallOut'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import { warehouseAllList } from '@/api/warehouse'
@@ -238,8 +255,11 @@ export default {
         brandSn: undefined,
         productTypeSn1: undefined,
         productTypeSn2: undefined,
-        productTypeSn3: undefined
+        productTypeSn3: undefined,
+        existStockFlag: undefined,
+        enableFlag: undefined // 是否包含禁用产品
       },
+      enableFlag: true,
       chooseQueryParam: {
         productCode: '',
         productName: ''
@@ -255,6 +275,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.queryParam.enableFlag = this.enableFlag ? '' : 1
         return productQuery(Object.assign(parameter, this.queryParam, { 'currentQtyFlag': 0 })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -341,6 +362,9 @@ export default {
       this.queryParam.productTypeSn1 = undefined
       this.queryParam.productTypeSn2 = undefined
       this.queryParam.productTypeSn3 = undefined
+      this.queryParam.existStockFlag = undefined
+      this.queryParam.enableFlag = undefined
+      this.enableFlag = true
       this.productType = []
       this.$refs.table.refresh(true)
     },
@@ -367,7 +391,7 @@ export default {
     },
     // 基本信息
     getDetail () {
-      storeCallOutDetail({ id: this.$route.params.id }).then(res => {
+      storeCallOutDetailSn({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
         } else {
@@ -497,6 +521,10 @@ export default {
       this.getWarehouseList()
       this.resetSearchForm()
       this.chooseResetSearchForm()
+    },
+    // 查看是否有库存、
+    handleHasQty (val) {
+      this.queryParam.existStockFlag = val
     }
   },
   mounted () {

+ 21 - 7
src/views/allocationManagement/storeTransferOut/list.vue

@@ -22,7 +22,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="调往对象名称">
-                <a-input id="storeTransferOutList-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象名称"/>
+                <custList id="storeTransferOutList-putPersonName" ref="custList" @change="custChange"></custList>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -156,13 +156,14 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
+import custList from '@/views/common/custList.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import stateIcon from '@/views/common/stateIcon'
 import { storeCallOutList, storeCallOutAudit, storeCallOutDel, storeCallOutOut, storeCallOutQueryCount } from '@/api/storeCallOut'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 export default {
   name: 'StoreCallOutList',
-  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon },
+  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -182,7 +183,8 @@ export default {
         auditEndDate: '',
         outWarehouseBeginDate: '',
         outWarehouseEndDate: '',
-        putPersonName: undefined, //  调往对象
+        customerNameCurrent: undefined, //  调往对象
+        customerSnCurrent: undefined,
         callOutType: undefined, //  调拨类型
         state: undefined, //  业务状态
         settleState: undefined //  财务状态
@@ -221,7 +223,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '店内调出单号', scopedSlots: { customRender: 'storeCallOutNo' }, width: '14%', align: 'center' },
-        { title: '调往对象名称', dataIndex: 'putPersonName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象名称', width: '16%', align: 'center', customRender: function (text, record) { return (record.putPersonType == 'CUSTOMER' ? record.customerNameCurrent: record.putPersonName) || '--' }, ellipsis: true },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'productTotalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -241,6 +243,16 @@ export default {
     }
   },
   methods: {
+    custChange (v, row) {
+      console.log(v, row)
+      if (row && row.customerSn) {
+        this.queryParam.customerSnCurrent = row.customerSn
+        this.queryParam.customerNameCurrent = undefined
+      } else {
+        this.queryParam.customerNameCurrent = v
+        this.queryParam.customerSnCurrent = undefined
+      }
+    },
     // 统计
     getCount (params) {
       storeCallOutQueryCount(params).then(res => {
@@ -280,11 +292,13 @@ export default {
       this.$refs.outWareRangeDate.resetDate('')
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
-
-      this.queryParam.putPersonName = undefined
+      this.$refs.custList.resetForm()
+      this.queryParam.customerSnCurrent = undefined
+      this.queryParam.customerNameCurrent = undefined
       this.queryParam.callOutType = undefined
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
+      
       if (!flag) {
         this.setIsHomeNav(this.$route.name, null)
       }
@@ -418,7 +432,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 273
     }
   },
   watch: {

+ 12 - 15
src/views/allocationManagement/warehouseAllocation/detail.vue

@@ -53,12 +53,8 @@
           bordered>
           <!-- 产品类别 -->
           <template slot="productType" slot-scope="text, record">
-            <a-tooltip placement="top">
-              <template slot="title">
-                <span>{{ record.productTypeName }}</span>
-              </template>
-              {{ record.productTypeName3 }}
-            </a-tooltip>
+            <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+            <span v-else>--</span>
           </template>
           <!-- 成本小计 -->
           <template slot="totalCost" slot-scope="text, record">
@@ -102,6 +98,7 @@ export default {
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
+              data.list[i].allocationCost = data.list[i].totalAllocationCost / data.list[i].allocationQty
             }
             this.disabled = false
           }
@@ -116,18 +113,18 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '类别', scopedSlots: { customRender: 'productType' }, width: '14%', align: 'center' },
-        { title: '数量', dataIndex: 'allocationQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '成本小计(¥)', dataIndex: 'totalAllocationCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调入仓位', dataIndex: 'putWarehouseLocationName', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '数量', dataIndex: 'allocationQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调入仓位', dataIndex: 'putWarehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(7, 0, { title: '成本小计(¥)', dataIndex: 'totalAllocationCost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(5, 0, { title: '成本价', dataIndex: 'allocationCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(8, 0, { title: '成本小计', dataIndex: 'totalAllocationCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr
     }

+ 46 - 30
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -251,22 +251,6 @@ export default {
       productType: [],
       warehousePutLocData: [], //  调入仓位  下拉数据
       warehouseOutLocData: [], //  调出仓位  下拉数据
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'brandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分类', scopedSlots: { customRender: 'productType' }, width: '9%', align: 'center' },
-        { title: '调出仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: '8%', align: 'center' },
-        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: '7%', align: 'center' },
-        { title: '可用库存数', dataIndex: 'currentQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '冻结库存数', dataIndex: 'freezeQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -283,20 +267,6 @@ export default {
           return data
         })
       },
-      // 表头
-      chooseColumns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'brandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分类', scopedSlots: { customRender: 'productType' }, width: '9%', align: 'center' },
-        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: '8%', align: 'center' },
-        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: '8%', align: 'center' },
-        { title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       chooseLoadData: parameter => {
         this.chooseDisabled = true
@@ -309,6 +279,7 @@ export default {
             data.list[i].no = no + i + 1
             data.list[i].outQty = data.list[i].allocationQty
             data.list[i].outQtyBackups = data.list[i].allocationQty
+            data.list[i].allocationCost = data.list[i].totalAllocationCost / data.list[i].allocationQty
           }
           this.chooseDisabled = false
           return data
@@ -318,6 +289,51 @@ export default {
       productTotal: null //  合计
     }
   },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分类', scopedSlots: { customRender: 'productType' }, width: '9%', align: 'center' },
+        { title: '调出仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: '8%', align: 'center' },
+        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: '7%', align: 'center' },
+        { title: '可用库存数', dataIndex: 'currentQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '冻结库存数', dataIndex: 'freezeQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(6, 0, { title: '成本价', dataIndex: 'putCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+      }
+      return arr
+    },
+    chooseColumns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分类', scopedSlots: { customRender: 'productType' }, width: '9%', align: 'center' },
+        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调入仓位', scopedSlots: { customRender: 'putWarehouseLocationSn' }, width: '8%', align: 'center' },
+        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: '8%', align: 'center' },
+        { title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(6, 0, { title: '成本价', dataIndex: 'allocationCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(11, 0, { title: '成本小计', dataIndex: 'totalAllocationCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     //  重置
     resetSearchForm () {

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

@@ -336,7 +336,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 273
     }
   },
   watch: {

+ 1 - 0
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -499,6 +499,7 @@ export default {
       this.paramsData = data
       this.queryParam.code = data.code
       this.$refs.table.refresh(true)
+      this.spinning = false
     },
     //  重置产品列表
     resetSearchForm () {

+ 17 - 4
src/views/chainReportData/chainSalesDetailReport/list.vue

@@ -35,7 +35,7 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
-              <a-input id="chainSalesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              <custList id="chainSalesDetailReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
           </a-col>
           <template v-if="advanced">
@@ -176,9 +176,10 @@ import { custTypeFindAllList } from '@/api/custType'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import { warehouseCascadeList } from '@/api/warehouse'
+import custList from '@/views/common/custList.vue'
 import { reportChainSalesBillDetailList, reportChainSalesBillDetailCount, linkageGroupList } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -192,7 +193,8 @@ export default {
         time: [],
         beginDate: '',
         endDate: '',
-        salesTargetName: '',
+        buyerNameCurrent: undefined,
+        buyerSnCurrent: undefined,
         salesTargetType: undefined,
         provinceSn: undefined, //  省
         citySn: undefined, //  市
@@ -306,6 +308,15 @@ export default {
         }
       })
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.tenantId = undefined
@@ -313,7 +324,8 @@ export default {
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
@@ -331,6 +343,7 @@ export default {
       this.queryParam.salesBillNo = ''
       this.queryParam.salesManName = ''
       this.productType = []
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()

+ 17 - 4
src/views/chainReportData/chainSalesReport/list.vue

@@ -35,7 +35,7 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
-              <a-input id="chainSalesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              <custList id="chainSalesReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
           </a-col>
           <template v-if="advanced">
@@ -140,9 +140,10 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
+import custList from '@/views/common/custList.vue'
 import { reportChainSalesBillList, reportChainSalesBillCount, linkageGroupList } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -156,7 +157,8 @@ export default {
         time: [],
         beginDate: '',
         endDate: '',
-        salesTargetName: '',
+        buyerNameCurrent: undefined,
+        buyerSnCurrent: undefined,
         salesTargetType: undefined,
         provinceSn: undefined, //  省
         citySn: undefined, //  市
@@ -253,6 +255,15 @@ export default {
         }
       })
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.tenantId = undefined
@@ -260,7 +271,8 @@ export default {
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
@@ -268,6 +280,7 @@ export default {
       this.queryParam.settleStyleSn = undefined
       this.queryParam.salesBillNo = ''
       this.queryParam.salesManName = ''
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()

+ 23 - 3
src/views/common/custList.vue

@@ -16,7 +16,7 @@
     allowClear
   >
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerName" :disabled="isValidateEnabled ? item.enabledFlag=='0' : false">
+    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerName" :disabled="(isValidateEnabled ? item.enabledFlag=='0' : false) || (dealerDisabled?item.dealerFlag==1:false)">
       {{ item.customerName }}
       <span v-if="isValidateEnabled && item.enabledFlag=='0'">(已禁用)</span>
     </a-select-option>
@@ -39,9 +39,25 @@ export default {
       type: String || Number,
       default: undefined
     },
+    notSn:{
+      type: String || Number,
+      default: ''
+    },
     isEnabled: { // 是否只查启用状态
       type: Boolean,
       default: false
+    },
+    mainFlag: {
+      type: Boolean,
+      default: true
+    },
+    satelliteFlag: {
+      type: Boolean,
+      default: false
+    },
+    dealerDisabled: {
+      type: Boolean,
+      default: false
     }
   },
   data () {
@@ -61,7 +77,10 @@ export default {
       const fetchId = this.lastFetchId
       this.data = []
       this.fetching = true
-      const params = { pageNo: 1, pageSize: 20 }
+      const params = { pageNo: 1, pageSize: 20, mainFlag: this.mainFlag ? 1 : 0 }
+      if (this.satelliteFlag) {
+        params.satelliteFlag = 1
+      }
       if (this.itemSn) {
         params.customerSn = this.itemSn
       } else {
@@ -75,6 +94,7 @@ export default {
           return
         }
         this.data = res.data && res.data.list ? res.data.list : []
+        this.data = this.data.filter(item => item.customerSn != this.notSn)
         this.fetching = false
       })
     },
@@ -89,8 +109,8 @@ export default {
         data: [],
         fetching: false
       })
-      this.$emit('change', value && value.key || undefined, value && value.row || undefined)
       this.$emit('input', value && value.key || undefined)
+      this.$emit('change', value && value.key || undefined, value && value.row || undefined)
     },
     resetForm () {
       this.dealerName = undefined

+ 43 - 3
src/views/customerManagement/customerInfo/detailModal.vue

@@ -19,11 +19,26 @@
           <a-descriptions-item label="客户地址:" :span="3">{{ addressStr }}</a-descriptions-item>
           <a-descriptions-item label="客户传真:">{{ detailData&&detailData.fax || '--' }}</a-descriptions-item>
           <a-descriptions-item label="配送方式:">{{ detailData&&detailData.dispatchTypeDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="是否卫星仓客户:">{{ detailData&&detailData.satelliteFlagDictValue || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="是否为下级:">{{ detailData&&detailData.dealerFlagDictValue || '--' }}</a-descriptions-item>
           <a-descriptions-item label="价格类型:">{{ detailData&&detailData.priceTypeDictValue || '--' }}</a-descriptions-item>
           <a-descriptions-item label="收款方式:">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
           <a-descriptions-item label="客户类型:">{{ detailData&&detailData.customerTypeName || '--' }}</a-descriptions-item>
         </a-descriptions>
+        <div>
+          <div style="padding:10px 0;border-bottom: 1px solid #eee;margin: 10px 0;">被合并的客户记录</div>
+          <div>
+            <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :defaultLoadData="false"
+            bordered>
+            </s-table>
+          </div>
+        </div>
       </a-spin>
       <div class="btn-cont"><a-button id="customer-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
     </div>
@@ -32,7 +47,7 @@
 
 <script>
 import { STable } from '@/components'
-import { custFindById } from '@/api/customer'
+import { custFindById, custMergeLogList } from '@/api/customer'
 export default {
   name: 'CustomerManagementDetailModal',
   components: { STable },
@@ -60,7 +75,31 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      detailData: null //  网点数据
+      detailData: null, //  网点数据
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '合并时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '被合并客户名称', dataIndex: 'customerNameSource', width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '合并后客户名称', dataIndex: 'customerNameTarget', width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return custMergeLogList(Object.assign(parameter, {customerSnMain:this.detailData.customerSn})).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
     }
   },
   methods: {
@@ -69,6 +108,7 @@ export default {
       custFindById({ id: this.itemId }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
+          this.$refs.table.refresh()
         } else {
           this.detailData = null
         }

+ 10 - 4
src/views/customerManagement/customerInfo/edit.vue

@@ -97,7 +97,10 @@
               </a-form-model-item>
             </a-col>
             <a-col :span="8">
-              <a-form-model-item label="是否卫星仓客户" prop="satelliteFlag">
+              <!-- <a-form-model-item label="是否卫星仓客户" prop="satelliteFlag">
+                <span style="padding-left: 11px;">{{ form.satelliteFlag == 1 ? '是' : '否' }}</span>
+              </a-form-model-item> -->
+              <a-form-model-item label="是否为下级" prop="satelliteFlag">
                 <span style="padding-left: 11px;">{{ form.satelliteFlag == 1 ? '是' : '否' }}</span>
               </a-form-model-item>
             </a-col>
@@ -202,6 +205,7 @@ export default {
         if (res.status == 200) {
           if (res.data.provinceSn) { this.getArea('city', res.data.provinceSn) }
           if (res.data.citySn) { this.getArea('district', res.data.citySn) }
+          res.data.satelliteFlag = res.data.dealerFlag
           this.form = Object.assign(this.form, res.data)
         } else {
           this.$refs.ruleForm.resetFields()
@@ -224,10 +228,12 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          const form = _this.form
-          form.id = this.$route.params.id && this.model == 'page' ? this.$route.params.id : null
+          const form = JSON.stringify(_this.form)
+          const formInfo = JSON.parse(form)
+          delete formInfo.satelliteFlag
+          formInfo.id = this.$route.params.id && this.model == 'page' ? this.$route.params.id : null
           _this.spinning = true
-          custSave(form).then(res => {
+          custSave(formInfo).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               if (_this.model == 'page') {

+ 34 - 13
src/views/customerManagement/customerInfo/list.vue

@@ -22,8 +22,8 @@
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="是否卫星仓客户">
-                  <v-select code="FLAG" id="customerManagementList-satelliteFlag" v-model="queryParam.satelliteFlag" allowClear placeholder="请选择"></v-select>
+                <a-form-item label="是否为下级">
+                  <v-select code="FLAG" id="customerManagementList-dealerFlag" v-model="queryParam.dealerFlag" allowClear placeholder="请选择"></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="12" :sm="24">
@@ -74,13 +74,12 @@
       <!-- 操作按钮 -->
       <div class="table-operator">
         <a-button v-if="$hasPermissions('B_customer_customerInfo_add')" id="customerManagementList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-        <!-- <a-button id="customerManagementList-merge" @click="handleMerge" style="margin: 0 0 0 15px;">客户合并</a-button> -->
       </div>
       <!-- 列表 -->
       <s-table
         class="sTable fixPagination"
         ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
+        :style="{ height: tableHeight+68+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -104,6 +103,13 @@
             class="button-success"
             @click="handleDetail(record)"
             id="customerManagementList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            v-if="$hasPermissions('B_customer_customerInfo_edit')"
+            type="link"
+            class="button-primary"
+            @click="mergeCustomer(record)"
+            id="customerManagementList-edit-btn">合并</a-button>
           <span v-if="!$hasPermissions('B_customer_customerInfo_edit') && !$hasPermissions('B_customer_customerInfo_detail')">--</span>
         </template>
         <template slot="enableAction" slot-scope="text, record">
@@ -114,6 +120,8 @@
     </a-spin>
     <!-- 客户详情 -->
     <customer-management-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+    <!-- 合并用户 -->
+    <merge-customer-modal :openModal="openMergeModal" :params="customerTemp" @close="closeMergeModal" />
   </a-card>
 </template>
 
@@ -125,9 +133,10 @@ import custType from '@/views/common/custType.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import customerManagementDetailModal from './detailModal.vue'
+import mergeCustomerModal from './mergeCustomerModal.vue'
 export default {
   name: 'CustomerManagementList',
-  components: { STable, VSelect, customerManagementDetailModal, rangeDate, custType },
+  components: { STable, VSelect, customerManagementDetailModal, rangeDate, custType, mergeCustomerModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -142,7 +151,7 @@ export default {
         provinceSn: undefined, //  省
         citySn: undefined, //  市
         countySn: undefined, //  区
-        satelliteFlag: undefined, //  是否卫星仓客户
+        dealerFlag: undefined, //  是否卫星仓客户
         customerTypeSn: undefined //  客户类型
       },
       disabled: false, //  查询、重置按钮是否可操作
@@ -154,9 +163,9 @@ export default {
         { title: '联系手机', dataIndex: 'contactMobile', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '最后销售时间', dataIndex: 'lastSaleTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '是否卫星仓', dataIndex: 'satelliteFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '是否为下级', dataIndex: 'dealerFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '启用禁用', scopedSlots: { customRender: 'enableAction' }, width: '8%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+        { title: <div><a-tooltip placement='top' title='注意:客户合并功能中,将以当前客户为对象,合并被选客户。'><a-icon type="question-circle" /></a-tooltip>&nbsp;操作</div>, scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -181,7 +190,9 @@ export default {
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
       openModal: false, //  查看客户详情  弹框
-      itemId: '' //  当前客户id
+      itemId: '', //  当前客户id
+      openMergeModal: false, // 合并用户名称
+      customerTemp: {}// 临时客户数据
     }
   },
   methods: {
@@ -200,7 +211,7 @@ export default {
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.countySn = undefined
-      this.queryParam.satelliteFlag = undefined
+      this.queryParam.dealerFlag = undefined
       this.queryParam.customerTypeSn = undefined
       this.addrCityList = []
       this.addrDistrictList = []
@@ -253,13 +264,23 @@ export default {
         }
       })
     },
-    //  客户合并
-    handleMerge () {},
     //  客户信息详情
     handleDetail (row) {
       this.itemId = row.id
       this.openModal = true
     },
+    // 合并客户
+    mergeCustomer (row) {
+      this.customerTemp = row
+      this.openMergeModal = true
+    },
+    closeMergeModal (flag) {
+      this.customerTemp = ''
+      this.openMergeModal = false
+      if (flag) {
+        this.$refs.table.refresh()
+      }
+    },
     //  关闭弹框
     closeModal () {
       this.itemId = ''
@@ -325,7 +346,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 220
     }
   },
   watch: {

+ 149 - 0
src/views/customerManagement/customerInfo/mergeCustomerModal.vue

@@ -0,0 +1,149 @@
+<template>
+  <div v-if="isShow">
+    <a-modal
+      centered
+      class="merge-customer-modal"
+      :footer="null"
+      :maskClosable="false"
+      v-drag
+      title="合并"
+      v-model="isShow"
+      @cancle="isShow=false"
+      width="35%">
+      <a-form-model
+        id="bulkPartsTypeEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="合并后客户:">
+          <div>{{ mainCustomerName }}</div>
+        </a-form-model-item>
+        <a-form-model-item label="被合并的客户名称:" prop="customerSnSource">
+          <custList ref="custList" :notSn="form.customerSnTarget" dealerDisabled @change="custChange" placeholder="输入客户名称搜索"></custList>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button id="modal-back" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
+        <a-button type="primary" id="modal-save" @click="handleSave">确定</a-button>
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { custMerge } from '@/api/customer'
+import custList from '@/views/common/custList.vue'
+export default {
+  name: 'SalesRecordModal',
+  components: { custList },
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    params: {
+      type: Object,
+      default () {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        customerSnTarget: '', // 合并后客户sn
+        customerSnSource: '' // 被合并客户sn
+      },
+      mainCustomerName: '', // 合并后客户名称
+      rules: {
+        customerSnSource: [
+          { required: true, message: '输入客户名称搜索', trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  methods: {
+    // 客户 change
+    custChange (obj, row) {
+      if (row) {
+        this.form.customerSnSource = row && row.customerSn || undefined
+      } else {
+        this.form.customerSnSource = undefined
+      }
+    },
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.confirmedSubmit()
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    confirmedSubmit () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要合并吗?合并后数据不可恢复。',
+        okText: '确定',
+        okType: 'danger',
+        cancelText: '取消',
+        onOk () {
+          custMerge(_this.form).then(res => {
+            if (res.status == 200) {
+              _this.$message.info(res.message)
+              _this.$emit('close', true)
+            }
+          })
+        },
+        onCancel () {
+          console.log('Cancel')
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.form.customerSnSource = undefined
+        this.form.customerSnTarget = undefined
+        this.mainCustomerName = undefined
+        this.$refs.custList.setData(undefined)
+      } else {
+        this.mainCustomerName = this.params.customerName
+        this.form.customerSnTarget = this.params.customerSn
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .merge-customer-modal{
+    .ant-modal-body {
+      padding: 20px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 148 - 0
src/views/customerManagement/customerMerge/index.vue

@@ -0,0 +1,148 @@
+<template>
+  <a-card size="small" :bordered="false" class="customerManagementList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="合并时间">
+                <rangeDate ref="customerMergeDate" @change="dateSaleChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="合并前客户名称">
+                <a-input id="customerManagementList-customerName" v-model.trim="queryParam.customerNameSource" allowClear placeholder="请输入合并前客户名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="当前客户名称">
+                <a-input id="customerManagementList-customerName" v-model.trim="queryParam.customerNameMain" allowClear placeholder="请输入当前客户名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="customerManagementList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="customerManagementList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+68+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+      </s-table>
+    </a-spin>
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { custMergeLogList } from '@/api/customer'
+import { STable } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+export default {
+  name: 'CustomerManagementList',
+  components: { STable, rangeDate },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: undefined,
+        endDate: undefined,
+        customerNameSource: '',
+        customerNameMain: ''
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
+        { title: '合并时间', dataIndex: 'mergeTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '合并前客户名称', dataIndex: 'customerNameSource', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '合并后客户名称', dataIndex: 'customerNameTarget', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '当前客户名称', dataIndex: 'customerNameMain', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return custMergeLogList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].enabledFlag = data.list[i].enabledFlag + '' === '1'
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    //  时间  change
+    dateSaleChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.customerMergeDate.resetDate()
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.customerNameSource = ''
+      this.queryParam.customerNameMain = ''
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 220
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 33 - 40
src/views/financialManagement/companyCollectionPayment/detail.vue

@@ -9,49 +9,46 @@
         </template>
       </a-page-header>
       <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont">
+      <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont" v-if="basicInfoData">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="3">
-              <a-descriptions-item label="单位名称">{{ (basicInfoData&&basicInfoData.settleClientName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="单位类型">{{ (basicInfoData&&basicInfoData.settleClientTypeDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="结算类型">{{ (basicInfoData&&basicInfoData.settleTypeDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="应结算金额">{{ (basicInfoData&&(basicInfoData.settleAmount || basicInfoData.settleAmount==0)) ? toThousands(basicInfoData.settleAmount) : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="客户名称" v-if="basicInfoData.settleClientType&&basicInfoData.settleClientType=='CUSTOMER'">{{ basicInfoData.settleClientNameCurrent || '--' }}{{ basicInfoData.settleClientName?basicInfoData.settleClientName==basicInfoData.settleClientNameCurrent?'':'('+basicInfoData.settleClientName+')':'' }}</a-descriptions-item>
+              <a-descriptions-item label="客户名称" v-else>{{ basicInfoData.settleClientName ||'--' }}</a-descriptions-item>
+              <a-descriptions-item label="单位类型">{{ basicInfoData.settleClientTypeDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="结算类型">{{ basicInfoData.settleTypeDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="应结算金额">{{ (basicInfoData.settleAmount || basicInfoData.settleAmount==0) ? toThousands(basicInfoData.settleAmount) : '--' }}</a-descriptions-item>
               <a-descriptions-item label="折让金额">{{ (discountAmount || discountAmount==0) ? toThousands(discountAmount) : '--' }}</a-descriptions-item>
-              <a-descriptions-item label="实结算金额">{{ (basicInfoData&&(basicInfoData.realSettleAmount || basicInfoData.realSettleAmount==0)) ? toThousands(basicInfoData.realSettleAmount) : '--' }}</a-descriptions-item>
-              <a-descriptions-item label="结算时间">{{ (basicInfoData&&basicInfoData.createDate) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="操作人">{{ (basicInfoData&&basicInfoData.operateName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="结算方式">{{ (basicInfoData&&basicInfoData.settleStyleSnDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="实结算金额">{{ (basicInfoData.realSettleAmount || basicInfoData.realSettleAmount==0) ? toThousands(basicInfoData.realSettleAmount) : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="结算时间">{{ basicInfoData.createDate || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="操作人">{{ basicInfoData.operateName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="结算方式">{{ basicInfoData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ basicInfoData.remark || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
       </a-card>
       <!-- 收款明细 -->
       <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="收款明细">
-            <!-- alert -->
-            <a-alert type="info" style="margin-bottom:10px">
-              <div slot="message">
-                共 <strong>{{ total }}</strong> 条明细,
-                金额合计 <strong>{{ (basicInfoData&&(basicInfoData.totalSettleAmount || basicInfoData.totalSettleAmount==0)) ? toThousands(basicInfoData.totalSettleAmount) : '--' }}</strong> ,
-                结算金额合计 <strong>{{ (basicInfoData&&(basicInfoData.realSettleAmount || basicInfoData.realSettleAmount==0)) ? toThousands(basicInfoData.realSettleAmount) : '--' }}</strong>
-              </div>
-            </a-alert>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="table"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="columns"
-              :data="loadData"
-              :defaultLoadData="false"
-              bordered>
-            </s-table>
-          </a-collapse-panel>
-        </a-collapse>
+        <!-- alert -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message">
+            共 <strong>{{ total }}</strong> 条明细,
+            金额合计 <strong>{{ (basicInfoData&&(basicInfoData.totalSettleAmount || basicInfoData.totalSettleAmount==0)) ? toThousands(basicInfoData.totalSettleAmount) : '--' }}</strong> ,
+            结算金额合计 <strong>{{ (basicInfoData&&(basicInfoData.realSettleAmount || basicInfoData.realSettleAmount==0)) ? toThousands(basicInfoData.realSettleAmount) : '--' }}</strong>
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
       </a-card>
     </a-spin>
   </div>
@@ -119,22 +116,18 @@ export default {
       settleUnitDetail({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
+          this.$nextTick(() => {
+            this.$refs.table.refresh(true)
+          })
         } else {
           this.basicInfoData = null
         }
       })
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.$refs.table.refresh(true)
-      this.getDetail()
-    }
-  },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
-      this.$refs.table.refresh(true)
       this.getDetail()
     }
   },

+ 10 - 5
src/views/financialManagement/companyCollectionPayment/list.vue

@@ -6,8 +6,8 @@
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="单位名称">
-                <a-input id="companyCollectionPaymentList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入单位名称"/>
+              <a-form-item label="客户名称">
+                <a-input id="companyCollectionPaymentList-settleClientName" v-model.trim="queryParam.settleClientNameCurrent" allowClear placeholder="请输入客户名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -90,6 +90,11 @@
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
+        <!-- 客户名称 -->
+        <template slot="customerName" slot-scope="text, record">
+          <span v-if="record.settleClientType&&record.settleClientType=='CUSTOMER'">{{ record.settleClientNameCurrent||'--' }}</span>
+          <span v-else>{{ record.settleClientName||'--' }}</span>
+        </template>
         <!-- 结算单号 -->
         <template slot="unitSettleNo" slot-scope="text, record">
           <span :class="$hasPermissions('M_companyCollectionPayment_detail')?'table-td-link':'common'" @click="handleDetail(record)">{{ record.unitSettleNo }}</span>
@@ -119,7 +124,7 @@ export default {
       queryParam: {
         beginDate: '',
         endDate: '',
-        settleClientName: '',
+        settleClientNameCurrent: '',
         settleClientType: undefined,
         settleType: undefined,
         unitSettleNo: '',
@@ -128,7 +133,7 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '单位名称', dataIndex: 'settleClientName', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', width: '17%', align: 'center', scopedSlots: { customRender: 'customerName' }, ellipsis: true },
         { title: '单位类型', dataIndex: 'settleClientTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '结算类型', dataIndex: 'settleTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '结算单号', scopedSlots: { customRender: 'unitSettleNo' }, width: '17%', align: 'center' },
@@ -190,7 +195,7 @@ export default {
       }
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.settleClientName = ''
+      this.queryParam.settleClientNameCurrent = ''
       this.queryParam.settleClientType = undefined
       this.queryParam.settleType = undefined
       this.queryParam.unitSettleNo = ''

+ 23 - 7
src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue

@@ -13,12 +13,12 @@
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
+            <a-col :md="7" :sm="24">
               <a-form-item label="单据号">
                 <a-input id="chooseBillModal-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单据号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="7" :sm="24">
               <a-form-item label="单据类型">
                 <v-select
                   v-model="queryParam.bizType"
@@ -29,6 +29,11 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
+            <a-col :md="10" :sm="24">
+              <a-form-item label="关联单据创建时间">
+                <rangeDate ref="createDate" @change="createDateChange" />
+              </a-form-item>
+            </a-col>
             <a-col :md="7" :sm="24">
               <a-form-item label="审核时间">
                 <rangeDate ref="rangeDate" @change="dateChange" />
@@ -103,17 +108,20 @@ export default {
         auditBeginDate: '',
         auditEndDate: '',
         bizNo: '',
-        bizType: undefined
+        bizType: undefined,
+        bizCreateBeginDate: undefined,
+        bizCreateEndDate: undefined
       },
       allData: [],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '单据号', dataIndex: 'bizNo', width: '28%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据号', dataIndex: 'bizNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单据创建时间', dataIndex: 'bizCreateDate', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '金额', dataIndex: 'totalAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '余额', dataIndex: 'unsettleAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '金额', dataIndex: 'totalAmount', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '余额', dataIndex: 'unsettleAmount', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -149,6 +157,11 @@ export default {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
+    // 关联单据创建时间
+    createDateChange (date) {
+      this.queryParam.bizCreateBeginDate = date[0]
+      this.queryParam.bizCreateEndDate = date[1]
+    },
     //  时间  change
     dateChange (date) {
       this.queryParam.auditBeginDate = date[0]
@@ -162,8 +175,11 @@ export default {
     // 重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
+      this.$refs.createDate.resetDate()
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
+      this.queryParam.bizCreateBeginDate = ''
+      this.queryParam.bizCreateEndDate = ''
       this.queryParam.bizNo = ''
       this.queryParam.bizType = undefined
       this.$refs.table.refresh(true)

+ 14 - 3
src/views/financialManagement/companyReceivablePayable/collectionPayment.vue

@@ -5,7 +5,7 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="collectionPayment-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
+          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name!='undefined'?$route.params.name: '--' }}</p>
         </template>
         <template slot="extra" v-if="$hasPermissions('B_cPayment_printAndExport')">
           <Print :disabled="chooseLoadData.length==0||totalBalance==0" @handlePrint="handlePrint"></Print>
@@ -183,16 +183,18 @@ import chooseBillModal from './chooseBillModal.vue'
 import { settleUnitSave, settleUnitPrint, settleUnitExport, settleInfoAllList } from '@/api/settle'
 import Print from '@/views/common/print.vue'
 import settleAccount from '@/views/common/settleAccount'
+import rangeDate from '@/views/common/rangeDate.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'CollectionPaymentDetail',
-  components: { STable, VSelect, chooseBillModal, Print, settleAccount },
+  components: { STable, VSelect, chooseBillModal, Print, settleAccount, rangeDate },
   mixins: [commonMixin],
   data () {
     this.amountSettledChange = debounce(this.amountSettledChange, 800)
     this.amountSettledTotalChange = debounce(this.amountSettledTotalChange, 800)
     const _this = this
     return {
+      disabled: false,
       spinning: false,
       loading: false, //  表格加载中
       chooseQueryParam: {
@@ -203,7 +205,8 @@ export default {
       chooseColumns: [
         { title: '序号', scopedSlots: { customRender: 'no' }, width: '5%', align: 'center' },
         { title: '单据号', dataIndex: 'bizNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单据创建时间', dataIndex: 'bizCreateDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '金额', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '余额', dataIndex: 'unsettleAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -413,17 +416,25 @@ export default {
     },
     // 默认获取所有单据
     getsettleInfoAllList () {
+      this.loading = true
+      this.disabled = true
       settleInfoAllList({ settleClientSn: this.$route.params.sn, settleClientType: this.$route.params.type, notEqZero: 1 }).then(res => {
         res.data.map(item => {
           item.settleAmount = item.unsettleAmount
         })
         this.chooseLoadData = res.data || []
+        this.loading = false
+        this.disabled = false
         this.amountSettledChange()
       })
     },
     pageInit () {
       this.chooseLoadData = []
       this.getsettleInfoAllList()
+    },
+    // 重置
+    resetSearchForm () {
+      this.getsettleInfoAllList()
     }
   },
   mounted () {

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

@@ -5,7 +5,7 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
+          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name!='undefined'?$route.params.name: '--' }}</p>
         </template>
       </a-page-header>
       <a-card>

+ 20 - 7
src/views/financialManagement/companyReceivablePayable/list.vue

@@ -6,8 +6,8 @@
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="单位名称">
-                <a-input id="companyReceivablePayableList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入单位名称"/>
+              <a-form-item label="客户名称">
+                <a-input id="companyReceivablePayableList-settleClientName" v-model.trim="queryParam.settleClientNameCurrent" allowClear placeholder="请输入客户名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -51,6 +51,11 @@
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
+        <!-- 客户名称 -->
+        <template slot="customerName" slot-scope="text, record">
+          <span v-if="record.settleClientType&&record.settleClientType=='CUSTOMER'">{{ record.settleClientNameCurrent||'--' }}</span>
+          <span v-else>{{ record.settleClientName||'--' }}</span>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -90,13 +95,13 @@ export default {
       tableHeight: 0,
       // 查询参数
       queryParam: {
-        settleClientName: '',
+        settleClientNameCurrent: '',
         settleClientType: undefined
       },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '单位名称', dataIndex: 'settleClientName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', width: '20%', align: 'center', scopedSlots: { customRender: 'customerName' } },
         { title: '单位类型', dataIndex: 'settleClientTypeDictValue', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '应收金额', dataIndex: 'unSettleAmountReceipt', width: '20%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '应付金额', dataIndex: 'unSettleAmountPay', width: '20%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -131,7 +136,11 @@ export default {
   methods: {
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/financialManagement/companyReceivablePayable/detail/${row.settleClientSn}/${row.settleClientName}/${row.settleClientType}` })
+      if (row.settleClientType == 'CUSTOMER') {
+        this.$router.push({ path: `/financialManagement/companyReceivablePayable/detail/${row.settleClientSn}/${row.settleClientNameCurrent}/${row.settleClientType}` })
+      } else {
+        this.$router.push({ path: `/financialManagement/companyReceivablePayable/detail/${row.settleClientSn}/${row.settleClientName}/${row.settleClientType}` })
+      }
     },
     // 合计
     getTotal (param) {
@@ -145,11 +154,15 @@ export default {
     },
     //  收付款
     handleCollectionPayment (row) {
-      this.$router.push({ path: `/financialManagement/companyReceivablePayable/collectionPayment/${row.settleClientSn}/${row.settleClientName}/${row.settleClientType}` })
+      if (row.settleClientType == 'CUSTOMER') {
+        this.$router.push({ path: `/financialManagement/companyReceivablePayable/collectionPayment/${row.settleClientSn}/${row.settleClientNameCurrent}/${row.settleClientType}` })
+      } else {
+        this.$router.push({ path: `/financialManagement/companyReceivablePayable/collectionPayment/${row.settleClientSn}/${row.settleClientName}/${row.settleClientType}` })
+      }
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.settleClientName = ''
+      this.queryParam.settleClientNameCurrent = ''
       this.queryParam.settleClientType = undefined
       this.$refs.table.refresh(true)
     },

+ 10 - 9
src/views/financialManagement/financialCollection/detailModal.vue

@@ -9,16 +9,17 @@
     @cancel="isShow=false"
     :width="600">
     <!-- 详情 -->
-    <div>
+    <div v-if="detailsData">
       <a-descriptions :column="1" size="default">
-        <a-descriptions-item label="收款单号">{{ detailsData&&detailsData.settleNo || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="关联单号">{{ detailsData&&detailsData.bizNo || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="商户名称">{{ detailsData&&detailsData.settleClientName || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="收款金额">{{ detailsData&&(detailsData.settledAmount || detailsData.settledAmount==0) ? toThousands(detailsData.settledAmount) : '--' }}</a-descriptions-item>
-        <a-descriptions-item label="收款类型">{{ detailsData&&detailsData.bizTypeDictValue || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="收款方式">{{ detailsData&&detailsData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="收款时间">{{ detailsData&&detailsData.settleTime || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="审核时间">{{ detailsData&&detailsData.auditTime || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="收款单号">{{ detailsData.settleNo || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="关联单号">{{ detailsData.bizNo || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="商户名称" v-if="detailsData.settleClientType&&detailsData.settleClientType=='CUSTOMER'">{{ detailsData.settleClientNameCurrent || '--' }}{{ detailsData.settleClientName?detailsData.settleClientName==detailsData.settleClientNameCurrent?'':'('+detailsData.settleClientName+')':'' }}</a-descriptions-item>
+        <a-descriptions-item label="商户名称" v-else>{{ detailsData.settleClientName ||'--' }}</a-descriptions-item>
+        <a-descriptions-item label="收款金额">{{ detailsData.settledAmount || detailsData.settledAmount==0 ? toThousands(detailsData.settledAmount) : '--' }}</a-descriptions-item>
+        <a-descriptions-item label="收款类型">{{ detailsData.bizTypeDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="收款方式">{{ detailsData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="收款时间">{{ detailsData.settleTime || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="审核时间">{{ detailsData.auditTime || '--' }}</a-descriptions-item>
       </a-descriptions>
       <div class="btn-cont"><a-button id="financialPaymentDetail-modal-back" @click="isShow = false">关闭</a-button></div>
     </div>

+ 14 - 10
src/views/financialManagement/financialCollection/list.vue

@@ -19,7 +19,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="商户名称">
-                <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入商户名称" />
+                <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientNameCurrent" allowClear placeholder="请输入商户名称" />
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -103,6 +103,11 @@
         <template slot="bizNo" slot-scope="text, record">
           <span class="table-td-link" @click="handleDetail(record)">{{ record.bizNo }}</span>
         </template>
+        <!-- 客户名称 -->
+        <template slot="customerName" slot-scope="text, record">
+          <span v-if="record.settleClientType&&record.settleClientType=='CUSTOMER'">{{ record.settleClientNameCurrent||'--' }}</span>
+          <span v-else>{{ record.settleClientName||'--' }}</span>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -117,11 +122,10 @@
             type="link"
             :loading="loading"
             class="button-error"
-            v-if="(record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED')&&record.satelliteFlag!=1 && $hasPermissions('B_financialCollectionSing')"
+            v-if="(record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED') && $hasPermissions('B_financialCollectionSing')"
             @click="enableFundAccount ? handleSettleAcountPay(record,0) : handleCollectionSing(record)"
             id="financialCollectionList-pay-btn">收款</a-button>
-          <span v-if="!(record.settleState == 'SETTLED' && $hasPermissions('B_financialCollectionDetail')) && !((record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED')&&record.satelliteFlag!=1 && $hasPermissions('B_financialCollectionSing'))">--</span>
-          <!-- satelliteFlag为1,是卫星仓 -->
+          <span v-if="!(record.settleState == 'SETTLED' && $hasPermissions('B_financialCollectionDetail')) && !((record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED') && $hasPermissions('B_financialCollectionSing'))">--</span>
         </template>
       </s-table>
     </a-spin>
@@ -199,7 +203,7 @@ export default {
         bizType: 'ALL',
         settleNo: '',
         bizNo: '',
-        settleClientName: '',
+        settleClientNameCurrent: '',
         billState: '',
         auditBeginDate: '',
         auditEndDate: '',
@@ -218,13 +222,13 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '收款单号', dataIndex: 'settleNo', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '关联单号', dataIndex: 'bizNo', scopedSlots: { customRender: 'bizNo' }, width: '16%', align: 'center' },
-        { title: '商户名称', dataIndex: 'settleClientName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户名称', width: '15%', align: 'center', scopedSlots: { customRender: 'customerName' } },
         { title: '应收金额', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '已收金额', dataIndex: 'settledAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '待收金额', dataIndex: 'unsettleAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '收款类型', dataIndex: 'bizName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款时间', dataIndex: 'settleTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' }
@@ -334,7 +338,7 @@ export default {
       this.openSettleModal = true
       const data = {
         totalAmount: type ? this.selectTotalAmount : row && row.unsettleAmount || 0,
-        settleClientName: type ? '' : row && row.settleClientName || '',
+        settleClientNameCurrent: type ? '' : row && row.settleClientNameCurrent || '',
         title: '收款',
         type,
         row
@@ -374,7 +378,7 @@ export default {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: <div style="text-align:center"><p style="margin-top:20px;">{row.settleClientName}</p><p>收款单号:{row.settleNo},合计{ this.toThousands(row.unsettleAmount) }</p><p>确认收款吗?</p></div>,
+        content: <div style="text-align:center"><p style="margin-top:20px;">{row.settleClientNameCurrent}</p><p>收款单号:{row.settleNo},合计{ this.toThousands(row.unsettleAmount) }</p><p>确认收款吗?</p></div>,
         centered: true,
         closable: true,
         class: 'confirm-center',
@@ -429,7 +433,7 @@ export default {
         bizType: this.curBizType,
         settleNo: '',
         bizNo: '',
-        settleClientName: '',
+        settleClientNameCurrent: '',
         billState: '',
         beginDate: '',
         endDate: '',

+ 2 - 1
src/views/financialManagement/financialPayment/detailModal.vue

@@ -13,7 +13,8 @@
       <a-descriptions :column="1" size="default">
         <a-descriptions-item label="付款单号">{{ detailsData&&detailsData.settleNo || '--' }}</a-descriptions-item>
         <a-descriptions-item label="发货单号">{{ detailsData&&detailsData.bizNo || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="商户名称">{{ detailsData&&detailsData.settleClientName || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="商户名称" v-if="detailsData&&detailsData.settleClientType&&detailsData.settleClientType=='CUSTOMER'">{{ detailsData.settleClientNameCurrent || '--' }}{{ detailsData.settleClientName==detailsData.settleClientNameCurrent?'':'('+detailsData.settleClientName+')' }}</a-descriptions-item>
+        <a-descriptions-item label="商户名称" v-else>{{ detailsData.settleClientName ||'--' }}</a-descriptions-item>
         <a-descriptions-item label="付款金额">{{ detailsData&&(detailsData.settledAmount || detailsData.settledAmount==0) ? toThousands(detailsData.settledAmount) : '--' }}</a-descriptions-item>
         <a-descriptions-item label="单据类型">{{ detailsData&&detailsData.bizTypeDictValue || '--' }}</a-descriptions-item>
         <a-descriptions-item label="付款方式">{{ detailsData&&detailsData.settleStyleName || '--' }}</a-descriptions-item>

+ 12 - 7
src/views/financialManagement/financialPayment/list.vue

@@ -19,7 +19,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="商户名称">
-                <a-input id="finacialPay-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入商户名称" />
+                <a-input id="finacialPay-settleClientName" v-model.trim="queryParam.settleClientNameCurrent" allowClear placeholder="请输入商户名称" />
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -103,6 +103,11 @@
           <span v-if="$hasPermissions('B_purchaseDetail')||$hasPermissions('B_salesReturnDetail')||$hasPermissions('B_bulkWarehousingOrder_detail')||$hasPermissions('B_allocLinkagePutDetail')||$hasPermissions('B_expenseDetail')" class="table-td-link" @click="handleDetail(record)">{{ record.bizNo }}</span>
           <span v-else>{{ record.bizNo }}</span>
         </template>
+        <!-- 客户名称 -->
+        <template slot="customerName" slot-scope="text, record">
+          <span v-if="record.settleClientType&&record.settleClientType=='CUSTOMER'">{{ record.settleClientNameCurrent||'--' }}</span>
+          <span v-else>{{ record.settleClientName || '--' }}</span>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -195,7 +200,7 @@ export default {
         bizType: 'ALL',
         settleNo: '',
         bizNo: '',
-        settleClientName: '',
+        settleClientNameCurrent: '',
         billState: '',
         auditBeginDate: '',
         auditEndDate: '',
@@ -214,13 +219,13 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '付款单号', dataIndex: 'settleNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '关联单号', dataIndex: 'bizNo', scopedSlots: { customRender: 'bizNo' }, width: '14%', align: 'center' },
-        { title: '商户名称', dataIndex: 'settleClientName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户名称', width: '10%', align: 'center', scopedSlots: { customRender: 'customerName' } },
         { title: '应付金额', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '已付金额', dataIndex: 'settledAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '待付金额', dataIndex: 'unsettleAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '单据类型', dataIndex: 'bizName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '付款方式', dataIndex: 'settleStyleName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '付款时间', dataIndex: 'settleTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' }
@@ -336,7 +341,7 @@ export default {
       this.openSettleModal = true
       const data = {
         totalAmount: type ? this.selectTotalAmount : row && row.unsettleAmount || 0,
-        settleClientName: type ? '' : row && row.settleClientName || '',
+        settleClientNameCurrent: type ? '' : row && row.settleClientNameCurrent || '',
         title: '付款',
         type,
         row
@@ -377,7 +382,7 @@ export default {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: <div style="text-align:center"><p style="margin-top:20px;">{row.settleClientName}</p><p>付款单号:{row.settleNo},合计{ this.toThousands(row.unsettleAmount) }</p><p>确认付款吗?</p></div>,
+        content: <div style="text-align:center"><p style="margin-top:20px;">{row.settleClientNameCurrent}</p><p>付款单号:{row.settleNo},合计{ this.toThousands(row.unsettleAmount) }</p><p>确认付款吗?</p></div>,
         centered: true,
         closable: true,
         class: 'confirm-center',
@@ -432,7 +437,7 @@ export default {
         bizType: this.curBizType,
         settleNo: '',
         bizNo: '',
-        settleClientName: '',
+        settleClientNameCurrent: '',
         billState: '',
         beginDate: '',
         endDate: '',

+ 4 - 4
src/views/financialManagement/fundAccountManagement/detail.vue

@@ -38,7 +38,7 @@
               <template v-if="advanced">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="往来单位">
-                    <a-input id="fundAcountDetail-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入往来单位名称"/>
+                    <a-input id="fundAcountDetail-settleClientName" v-model.trim="queryParam.settleClientNameCurrent" allowClear placeholder="请输入往来单位名称"/>
                   </a-form-item>
                 </a-col>
               </template>
@@ -115,7 +115,7 @@ export default {
         endDate: '',
         bizType: '',
         bizNo: '',
-        settleClientName: ''
+        settleClientNameCurrent: ''
       },
       // 表头
       columns: [
@@ -124,7 +124,7 @@ export default {
         { title: '关联单据号', dataIndex: 'bizNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作时间', dataIndex: 'settleTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作人', dataIndex: 'operateName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '往来单位', dataIndex: 'settleClientName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '往来单位', dataIndex: 'settleClientNameCurrent', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '结算金额', dataIndex: 'settleAmount', scopedSlots: { customRender: 'settleAmount' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -167,7 +167,7 @@ export default {
         endDate: '',
         bizType: '',
         bizNo: '',
-        settleClientName: ''
+        settleClientNameCurrent: ''
       }
       this.$refs.table.refresh(true)
     },

+ 15 - 7
src/views/financialManagement/ledgerRecord/list.vue

@@ -11,7 +11,7 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="客户名称">
-              <custSatelliteList ref="custSatelliteList" @change="custSatelliteChange"></custSatelliteList>
+              <custList ref="custSatelliteList" :satelliteFlag="true" @change="custSatelliteChange"></custList>
             </a-form-item>
           </a-col>
           <a-col :md="4" :sm="24">
@@ -67,11 +67,11 @@ import { commonMixin } from '@/utils/mixin'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import custSatelliteList from '@/views/common/custSatelliteList.vue'
+import custList from '@/views/common/custList.vue'
 import { satelliteWHSeparateList, satelliteWHSeparateTotal } from '@/api/satelliteWH'
 export default {
   name: 'LedgerRecordList',
-  components: { STable, VSelect, rangeDate, custSatelliteList },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   data () {
     const _this = this
@@ -86,7 +86,8 @@ export default {
       // 查询参数
       queryParam: {
         customer: {
-          customerSn: undefined
+          customerSn: undefined,
+          customerNameCurrent: undefined
         },
         dealerProduct: {
           name: '',
@@ -99,7 +100,7 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '分账时间', dataIndex: 'separateTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'customer.customerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'customer.customerNameCurrent', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '关联工单号', dataIndex: 'separateBizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'dealerProduct.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品编码', dataIndex: 'dealerProduct.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
@@ -148,8 +149,14 @@ export default {
         }
       })
     },
-    custSatelliteChange (val) {
-      this.queryParam.customer.customerSn = val.key
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.customer.customerSn = row.customerSn
+        this.queryParam.customer.customerNameCurrent = undefined
+      } else {
+        this.queryParam.customer.customerNameCurrent = v
+        this.queryParam.customer.customerSn = undefined
+      }
     },
     //  重置
     resetSearchForm () {
@@ -157,6 +164,7 @@ export default {
       this.queryParam.beginDate = getDate.getRecentday().starttime
       this.queryParam.endDate = getDate.getRecentday().endtime
       this.queryParam.customer.customerSn = undefined
+      this.queryParam.customer.customerNameCurrent = undefined
       this.queryParam.dealerProduct.name = ''
       this.queryParam.dealerProduct.code = ''
       this.$refs.custSatelliteList.resetForm()

+ 10 - 10
src/views/inventoryManagement/inventoryChecking/detailModal.vue

@@ -54,21 +54,21 @@
         <a-alert type="info" style="margin-bottom:10px">
           <div slot="message">
             <div style="display: flex;justify-content: space-between;align-items: center;">
-              <div>
+              <div v-if="productTotal">
                 <div>
-                  总款数: <strong>{{ productTotal&&(productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong> ,
-                  总数量: <strong>{{ productTotal&&(productTotal.stockQty || productTotal.stockQty==0) ? productTotal.stockQty : '--' }}</strong> ,
+                  总款数: <strong>{{ (productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong> ,
+                  总数量: <strong>{{ (productTotal.stockQty || productTotal.stockQty==0) ? productTotal.stockQty : '--' }}</strong> ,
                   <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-                    总成本: <strong>{{ productTotal&&(productTotal.checkCost || productTotal.checkCost==0) ? toThousands(productTotal.checkCost) : '--' }}</strong>
+                    总成本: <strong>{{ (productTotal.checkCost || productTotal.checkCost==0) ? toThousands(productTotal.checkCost) : '--' }}</strong>
                   </div>
                 </div>
                 <div>
-                  盘盈总数量: <strong>{{ productTotal&&(productTotal.checkProfitQty || productTotal.checkProfitQty==0) ? productTotal.checkProfitQty : '--' }}</strong>,
-                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盘盈总成本: <strong>{{ productTotal&&(productTotal.checkProfitCost || productTotal.checkProfitCost==0) ? toThousands(productTotal.checkProfitCost) : '--' }}</strong>,</span>
-                  盘亏总数量: <strong>{{ productTotal&&(productTotal.checkLossQty || productTotal.checkLossQty==0) ? productTotal.checkLossQty : '--' }}</strong>,
-                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盘亏总成本: <strong>{{ productTotal&&(productTotal.checkLossCost || productTotal.checkLossCost==0) ? toThousands(productTotal.checkLossCost) : '--' }}</strong>,</span>
-                  盈亏总数量: <strong>{{ productTotal&&(productTotal.totalCheckProfitLossQty || productTotal.totalCheckProfitLossQty==0) ? productTotal.totalCheckProfitLossQty : '--' }}</strong>,
-                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盈亏总成本: <strong>{{ productTotal&&(productTotal.totalCheckProfitLossCost || productTotal.totalCheckProfitLossCost==0) ? toThousands(productTotal.totalCheckProfitLossCost) : '--' }}</strong>,</span>
+                  盘盈总数量: <strong>{{ (productTotal.checkProfitQty || productTotal.checkProfitQty==0) ? productTotal.checkProfitQty : '--' }}</strong>,
+                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盘盈总成本: <strong>{{ (productTotal.checkProfitCost || productTotal.checkProfitCost==0) ? toThousands(productTotal.checkProfitCost) : '--' }}</strong>,</span>
+                  盘亏总数量: <strong>{{ (productTotal.checkLossQty||productTotal.checkLossQty==0)?productTotal.checkLossQty>0?('-'+productTotal.checkLossQty):productTotal.checkLossQty: '--' }}</strong>,
+                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盘亏总成本: <strong>{{ (productTotal.checkLossCost || productTotal.checkLossCost==0) ? toThousands(productTotal.checkLossCost) : '--' }}</strong>,</span>
+                  盈亏总数量: <strong>{{ (productTotal.totalCheckProfitLossQty || productTotal.totalCheckProfitLossQty==0) ? productTotal.totalCheckProfitLossQty : '--' }}</strong>,
+                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盈亏总成本: <strong>{{ (productTotal.totalCheckProfitLossCost || productTotal.totalCheckProfitLossCost==0) ? toThousands(productTotal.totalCheckProfitLossCost) : '--' }}</strong>,</span>
                 </div>
               </div>
               <div>

+ 9 - 4
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -54,7 +54,7 @@
                 </a-col>
                 <a-col :md="6" :sm="24">
                   <a-form-item label="单位名称">
-                    <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitName" allowClear placeholder="请输入单位名称"/>
+                    <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitNameCurrent" allowClear placeholder="请输入单位名称"/>
                   </a-form-item>
                 </a-col>
                 <a-col :md="4" :sm="24">
@@ -105,6 +105,11 @@
           :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
           bordered>
+          <!-- 单位名称 -->
+          <template slot="newUnitName" slot-scope="text, record">
+            <span v-if="record.unitType&&record.unitType=='CUSTOMER'">{{ record.unitNameCurrent||'--' }}</span>
+            <span v-else>{{ record.unitName||'--' }}</span>
+          </template>
           <!-- 数量 -->
           <template slot="qty" slot-scope="text, record">
             <p :class="record.flowType=='PUT' ? 'green':'red'" style="margin: 0;">
@@ -140,7 +145,7 @@ export default {
         bizType: undefined,
         bizNo: '',
         flowType: undefined,
-        unitName: '',
+        unitNameCurrent: '',
         warehouseSn: undefined,
         state: undefined
       },
@@ -186,7 +191,7 @@ export default {
         { title: '关联单据号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'unitName', width: '9%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '单位名称', scopedSlots: { customRender: 'newUnitName' }, width: '9%', align: 'center', ellipsis: true },
         { title: '仓库', dataIndex: 'warehouseName', width: '9%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '仓位', dataIndex: 'warehouseLocationName', width: '9%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '数量', scopedSlots: { customRender: 'qty' }, width: '5%', align: 'center' },
@@ -226,7 +231,7 @@ export default {
       this.queryParam.bizType = undefined
       this.queryParam.bizNo = ''
       this.queryParam.flowType = undefined
-      this.queryParam.unitName = ''
+      this.queryParam.unitNameCurrent = ''
       this.queryParam.warehouseSn = undefined
       this.queryParam.state = undefined
       this.$refs.table.refresh(true)

+ 3 - 3
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -210,8 +210,8 @@ export default {
       productTypeList: [], //  产品类别下拉数据
       productType: [],
       columns: [
-        { title: '序号', dataIndex: 'no', width: 50, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: 50, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 120, align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
         { title: '产品名称', dataIndex: 'productName', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品品牌', dataIndex: 'brandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
@@ -395,7 +395,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 190
+      this.tableHeight = window.innerHeight - tableSearchH - 180
     }
   },
   watch: {

+ 7 - 6
src/views/numsGoodsShelves/customerAnalysis/list.vue

@@ -91,7 +91,7 @@
                 铺货数量合计:<strong>{{ statisticsObj.totalShelfMaxQty }}</strong>;
                 铺货金额合计:<strong>{{ statisticsObj&&(statisticsObj.totalShelfMaxCost||statisticsObj.totalShelfMaxCost==0)?toThousands(statisticsObj.totalShelfMaxCost,2):'--' }}</strong>;
                 货架取货数量合计:<strong>{{ statisticsObj.totalOrderQty }}</strong>;
-                货架取货金额合计:<strong>{{ statisticsObj&&(statisticsObj.totalOrderAmount||statisticsObj.totalOrderAmount==0)?toThousands(statisticsObj.totalOrderAmount,2):'--'  }}</strong>;
+                货架取货金额合计:<strong>{{ statisticsObj&&(statisticsObj.totalOrderAmount||statisticsObj.totalOrderAmount==0)?toThousands(statisticsObj.totalOrderAmount,2):'--' }}</strong>;
               </div>
               <div>
                 急送数量合计:<strong>{{ statisticsObj.tempOrderQty }}</strong>;
@@ -107,7 +107,8 @@
           ref="table"
           :style="{ height: tableHeight+84.5+'px', wordBreak: 'break-all' }"
           size="small"
-          rowKey="id"
+          :rowKey="(record)=>record.shelfSn"
+          rowKeyName="shelfSn"
           :columns="columns"
           :data="loadData"
           :scroll="{ y: tableHeight }"
@@ -169,28 +170,28 @@ export default {
           slots: { title: 'customTitle' },
           children: [
             { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text,2) : '--' } }
+            { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text, 2) : '--' } }
           ]
         },
         {
           title: '货架订单',
           children: [
             { title: '取货数量', dataIndex: 'totalOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '取货金额', dataIndex: 'totalOrderAmount', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text,2) : '--' } }
+            { title: '取货金额', dataIndex: 'totalOrderAmount', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text, 2) : '--' } }
           ]
         },
         {
           title: '急送订单',
           children: [
             { title: '急送数量', dataIndex: 'tempOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '急送金额', dataIndex: 'tempOrderAmount', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text,2) : '--' } }
+            { title: '急送金额', dataIndex: 'tempOrderAmount', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text, 2) : '--' } }
           ]
         },
         {
           title: '销售单',
           children: [
             { title: '销售数量', dataIndex: 'saleOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '销售金额', dataIndex: 'saleOrderAmount', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text,2) : '--' } }
+            { title: '销售金额', dataIndex: 'saleOrderAmount', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text, 2) : '--' } }
           ]
         }
       ],

+ 7 - 7
src/views/numsGoodsShelves/settlementManagement/list.vue

@@ -4,24 +4,24 @@
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24">
+          <a-row type="flex" :gutter="15">
+            <a-col flex="350px">
               <a-form-item label="货架名称">
-                <shelfList v-model="queryParam.shelfSn"></shelfList>
+                <shelfList style="max-width:300px;" v-model="queryParam.shelfSn"></shelfList>
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col flex="300px">
               <a-form-item label="关联客户">
                 <custList ref="custList" @change="custChange" v-model="queryParam.customerName"></custList>
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col flex="200px">
               <a-form-item label="结算方式">
                 <v-select code="SHELF_SETTLE_TYPE" v-model="queryParam.settleType" allowClear placeholder="请选择状态"></v-select>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+              <a-col flex="300px">
                 <a-form-item label="待结金额">
                   <a-input-group>
                     <a-row>
@@ -49,7 +49,7 @@
                 </a-form-item>
               </a-col>
             </template>
-            <a-col :md="6" :sm="24">
+            <a-col flex="200px">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">

+ 2 - 1
src/views/numsGoodsShelves/vinAnalysis/spList.vue

@@ -79,7 +79,8 @@
         class="sTable"
         ref="table"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="(record) => record.productSn"
+        rowKeyName="productSn"
         :columns="columns"
         :data="loadData"
         :defaultLoadData="false"

+ 3 - 2
src/views/numsGoodsShelves/vinAnalysis/vinList.vue

@@ -164,12 +164,12 @@ export default {
           this.engineOilFilterFlagData = dataObj.engineOilFilterFlagDesc.toString()
           delete dataObj.engineOilFilterFlagDesc
         }
-        this.disabled = true
+
         const params = Object.assign(dataObj, this.queryParam, { airConditionerFilterFlag: this.airConditionerFilterData,
           airFilterFlag: this.airFilterFlagData,
           engineOilFilterFlag: this.engineOilFilterFlagData })
         this.spinning = true
-
+        this.disabled = true
         return queryPage(params).then(res => {
           let data
           if (res.status == 200) {
@@ -181,6 +181,7 @@ export default {
           }
           this.getQueryCount(params)
           this.spinning = false
+          this.disabled = false
           return data
         })
       },

+ 10 - 5
src/views/outboundOrderManagement/outboundOrder/list.vue

@@ -11,8 +11,8 @@
               </a-form-item>
             </a-col>
             <a-col :xl="6" :lg="6" :md="12" :sm="24">
-              <a-form-item label="单位名称">
-                <a-input id="outboundOrderList-demanderName" v-model.trim="queryParam.demanderName" placeholder="请输入单位名称" allowClear />
+              <a-form-item label="客户名称">
+                <a-input id="outboundOrderList-demanderName" v-model.trim="queryParam.demanderNameCurrent" placeholder="请输入客户名称" allowClear />
               </a-form-item>
             </a-col>
             <a-col :xl="4" :lg="6" :md="6" :sm="8">
@@ -68,6 +68,11 @@
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
+        <!-- 客户名称 -->
+        <template slot="customerName" slot-scope="text, record">
+          <span v-if="record.demanderType&&record.demanderType=='CUSTOMER'">{{ record.demanderNameCurrent||'--' }}</span>
+          <span v-else>{{ record.demanderName||'--' }}</span>
+        </template>
         <!-- 状态 -->
         <template slot="state" slot-scope="text, record">
           <stateIcon :title="record.stateDictValue" :state="record.state == 'FINISH'?'1':'2'"></stateIcon>
@@ -150,7 +155,7 @@ export default {
       queryParam: { //  查询条件
         beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
-        demanderName: undefined, //  单位名称
+        demanderNameCurrent: undefined, //  单位名称
         outBizType: undefined, //  出库类型
         state: undefined //  状态
       },
@@ -159,7 +164,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '关联单号', dataIndex: 'outBizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'demanderName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', width: '20%', align: 'center', scopedSlots: { customRender: 'customerName' } },
         { title: '总款数', dataIndex: 'productTotalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'productTotalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -247,7 +252,7 @@ export default {
       this.$refs.rangeDate.resetDate(flag ? '' : this.time)
       this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
       this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
-      this.queryParam.demanderName = undefined
+      this.queryParam.demanderNameCurrent = undefined
       this.queryParam.outBizType = undefined
       this.queryParam.state = undefined
     },

+ 1 - 1
src/views/power/role/roleList.vue

@@ -229,7 +229,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 255
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   watch: {

+ 1 - 1
src/views/productManagement/productInfo/edit.vue

@@ -380,10 +380,10 @@ export default {
               _this.$message.success(res.message)
               if (_this.pageType == 'pages') {
                 _this.$router.push({ path: '/productManagement/productInfo/list' })
-                _this.spinning = false
               } else {
                 _this.$emit('saveOk', _this.form)
               }
+              _this.spinning = false
             } else {
               _this.spinning = false
             }

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

@@ -74,9 +74,6 @@
         </a-dropdown>
         <span v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys">已选 {{ rowSelectionInfo.selectedRowKeys.length }} 项</span>
       </div>
-      <a-alert type="info" style="margin-bottom:10px">
-        <div class="ftext" slot="message">注意:产品被禁用后,不能再销售。</div>
-      </a-alert>
       <!-- 列表 -->
       <s-table
         class="sTable fixPagination"
@@ -273,7 +270,7 @@ export default {
             return text || text == 0 ? text : '--'
           }
         },
-        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: '7%', align: 'center' },
+        { title: <div><a-tooltip placement='top' title='注意:产品被禁用后,不能再销售。'><a-icon type="question-circle" /></a-tooltip>&nbsp;状态</div>, scopedSlots: { customRender: 'enabledFlag' }, width: '7%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 3 - 1
src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue

@@ -265,7 +265,9 @@ export default {
     searchForm () {
       if (this.hasVaild) {
         this.showTable = true
-        this.$refs.table.refresh(true)
+        if (this.$refs.table) {
+          this.$refs.table.refresh(true)
+        }
       } else {
         this.$message.info('请输入查询条件')
       }

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

@@ -651,4 +651,4 @@ export default {
       }
     }
   }
-</style>
+</style>

+ 17 - 4
src/views/reportData/customerSalesDetailsReport/list.vue

@@ -21,7 +21,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称">
-                <a-input id="customerSalesDetailsReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+                <custList id="customerSalesDetailsReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -79,10 +79,11 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
 import { reportCustomerSalesBillDetailList, reportCustomerSalesBillDetailCount, reportCustomerSalesBillDetailExport } from '@/api/reportData'
 export default {
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   data () {
     const _this = this
     return {
@@ -91,7 +92,8 @@ export default {
       wrapperCol: { span: 16 },
       tableHeight: 0,
       queryParam: { //  查询条件
-        salesTargetName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         time: [],
         beginDate: '',
         endDate: ''
@@ -164,14 +166,25 @@ export default {
         }
       })
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     resetSearchForm () {
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.$refs.rangeDate.resetDate()
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.totalData = null
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },

+ 38 - 20
src/views/reportData/salesDetailReport/list.vue

@@ -32,7 +32,7 @@
           <template v-if="advanced">
             <a-col :md="4" :sm="24">
               <a-form-model-item label="客户名称">
-                <a-input id="salesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+                <custList id="salesDetailReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
               </a-form-model-item>
             </a-col>
             <a-col :md="4" :sm="24">
@@ -182,9 +182,10 @@ import { custTypeFindAllList } from '@/api/custType'
 import { warehouseCascadeList } from '@/api/warehouse'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
+import custList from '@/views/common/custList.vue'
 import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -201,7 +202,8 @@ export default {
         createEndDate: '',
         beginDate: '',
         endDate: '',
-        salesTargetName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         salesTargetType: undefined,
         provinceSn: undefined, //  省
         citySn: undefined, //  市
@@ -323,6 +325,15 @@ export default {
         this.$message.info('请至少输入一个查询条件')
       }
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
@@ -337,7 +348,8 @@ export default {
       this.creatTime = []
       this.queryParam.createBeginDate = ''
       this.queryParam.createEndDate = ''
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
@@ -351,6 +363,7 @@ export default {
       this.queryParam.productEntity.name = ''
       this.queryParam.warehouseSn = undefined
       this.queryParam.warehouseLocationSn = undefined
+      this.queryParam.showCost = undefined
       this.queryParam.warehouseCascade = []
       this.queryParam.salesBillNo = ''
       this.queryParam.salesManName = ''
@@ -358,26 +371,31 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()
+      if (this.advanced) {
+        this.$refs.custSatelliteList.resetForm()
+      }
     },
     // 导出
     handleExport () {
       const _this = this
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          const params = _this.queryParam
-          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
-          _this.exportLoading = true
-          _this.spinning = true
-          reportSalesBillDetailExport(params).then(res => {
-            downloadExcel(res, '销售明细报表')
-            _this.exportLoading = false
-            _this.spinning = false
-          })
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
+      const str = JSON.stringify(this.queryParam)
+      const ret = str.replace(/\[|\]/g, '"').replace(/"},"/g, '","').replace(/"}/g, '","').match(/"\:".*?","/g)
+      const ret1 = ret.filter(item => item != '":"","')
+      console.log(ret1)
+      if (ret1.length) {
+        const params = _this.queryParam
+        params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+        _this.exportLoading = true
+        _this.spinning = true
+        reportSalesBillDetailExport(params).then(res => {
+          downloadExcel(res, '销售明细报表')
+          _this.exportLoading = false
+          _this.spinning = false
+          _this.queryParam.showCost = undefined
+        })
+      } else {
+        this.$message.info('请至少输入一个查询条件')
+      }
     },
     filterOption (input, option) {
       return (

+ 41 - 20
src/views/reportData/salesReport/list.vue

@@ -32,7 +32,7 @@
           <template v-if="advanced">
             <a-col :md="4" :sm="24">
               <a-form-model-item label="客户名称">
-                <a-input id="salesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+                <custList id="salesReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
               </a-form-model-item>
             </a-col>
             <a-col :md="4" :sm="24">
@@ -146,9 +146,10 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
+import custList from '@/views/common/custList.vue'
 import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -164,8 +165,9 @@ export default {
         endDate: '',
         outWarehouseBeginDate: '',
         outWarehouseEndDate: '',
-        salesTargetName: '',
-        salesTargetType: undefined,
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
+        salesTargetType: undefined, // 客户类型
         provinceSn: undefined, //  省
         citySn: undefined, //  市
         countySn: undefined, //  区
@@ -277,6 +279,15 @@ export default {
         this.$message.info('请至少输入一个查询条件')
       }
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
@@ -292,37 +303,47 @@ export default {
       this.queryParam.createBeginDate = ''
       this.queryParam.createEndDate = ''
 
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.countySn = undefined
       this.queryParam.settleStyleSn = undefined
+      this.queryParam.showCost = undefined
       this.queryParam.salesBillNo = ''
       this.queryParam.salesManName = ''
       this.$refs.ruleForm.resetFields()
       this.totalData = null
+      if (this.advanced) {
+        this.$refs.custSatelliteList.resetForm()
+      }
       this.$refs.table.clearTable()
     },
     // 导出
     handleExport () {
       const _this = this
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          const params = _this.queryParam
-          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
-          _this.exportLoading = true
-          _this.spinning = true
-          reportSalesBillExport(params).then(res => {
-            downloadExcel(res, '销售报表')
-            _this.exportLoading = false
-            _this.spinning = false
-          })
-        } else {
-          console.log('error submit!!')
-          return false
+      let hasVal = false
+      for (const key in this.queryParam) {
+        if (this.queryParam[key]) {
+          hasVal = true
+          break
         }
-      })
+      }
+      if (hasVal) {
+        const params = _this.queryParam
+        params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+        _this.exportLoading = true
+        _this.spinning = true
+        reportSalesBillExport(params).then(res => {
+          downloadExcel(res, '销售报表')
+          _this.exportLoading = false
+          _this.spinning = false
+          _this.queryParam.showCost = undefined
+        })
+      } else {
+        this.$message.info('请至少输入一个查询条件')
+      }
     },
     filterOption (input, option) {
       return (

+ 17 - 4
src/views/reportData/salesReturnReport/detailList.vue

@@ -25,7 +25,7 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
-              <a-input id="salesDetailReportList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+              <custList id="salesDetailReportList-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
           </a-col>
           <template v-if="advanced">
@@ -105,9 +105,10 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
+import custList from '@/views/common/custList.vue'
 import { reportSalesReturnDetailPageList, reportSalesReturnDetailTotal, reportSalesReturnDetailExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -121,7 +122,8 @@ export default {
         beginDate: '',
         endDate: '',
         productType: undefined,
-        buyerName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         productEntity: {
           productBrandSn: undefined, //  产品品牌
           productTypeSn1: '', //  产品一级分类
@@ -216,6 +218,15 @@ export default {
         }
       })
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
@@ -223,7 +234,9 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.salesReturnNo = ''
-      this.queryParam.buyerName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
+      this.$refs.custSatelliteList.resetForm()
       this.queryParam.productEntity.productBrandSn = undefined
       this.queryParam.productEntity.productTypeSn1 = ''
       this.queryParam.productEntity.productTypeSn2 = ''

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

@@ -25,7 +25,7 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
-              <a-input id="salesReturnReportList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+              <custList id="salesReturnReportList-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -78,9 +78,10 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
 import { reportSalesReturnPageList, reportSalesReturnBillTotal, reportSalesReturnExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -93,7 +94,8 @@ export default {
         time: [],
         beginDate: '',
         endDate: '',
-        buyerName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         salesReturnNo: ''
       },
       rules: {
@@ -178,6 +180,15 @@ export default {
         }
       })
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
@@ -185,7 +196,9 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.salesReturnNo = ''
-      this.queryParam.buyerName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()

+ 19 - 5
src/views/reportData/storeTransferOutReport/detailList.vue

@@ -30,7 +30,7 @@
           </a-col>
           <a-col :md="4" :sm="24">
             <a-form-item label="调往对象">
-              <a-input id="sstoreTransOutReport-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象"/>
+              <custList id="storeTransOutReport-putPersonName" ref="custList" @change="custChange"></custList>
             </a-form-item>
           </a-col>
           <a-col :md="4" :sm="24">
@@ -114,9 +114,10 @@ import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import supplier from '@/views/common/supplier'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
+import custList from '@/views/common/custList.vue'
 import { reportStoreCallOutDetailList, reportStoreCallOutDetailTotal, reportStoreCallOutDetailExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -141,7 +142,8 @@ export default {
         callOutType: undefined,
         productType: undefined,
         storeCallOutNo: '',
-        putPersonName: ''
+        customerNameCurrent: undefined, //  调往对象
+        customerSnCurrent: undefined,
       },
       rules: {
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
@@ -180,7 +182,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象', width: '15%', align: 'center', customRender: function (text, record) { return record.putPersonName || '--' }, ellipsis: true },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', 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 },
@@ -196,6 +198,16 @@ export default {
     }
   },
   methods: {
+    custChange (v, row) {
+      console.log(v, row)
+      if (row && row.customerSn) {
+        this.queryParam.customerSnCurrent = row.customerSn
+        this.queryParam.customerNameCurrent = undefined
+      } else {
+        this.queryParam.customerNameCurrent = v
+        this.queryParam.customerSnCurrent = undefined
+      }
+    },
     // 合计
     getCount (params) {
       reportStoreCallOutDetailTotal(params).then(res => {
@@ -240,7 +252,9 @@ export default {
 
       this.queryParam.storeCallOutNo = ''
       this.queryParam.callOutType = undefined
-      this.queryParam.putPersonName = ''
+      this.$refs.custList.resetForm()
+      this.queryParam.customerSnCurrent = undefined
+      this.queryParam.customerNameCurrent = undefined
       this.queryParam.productEntity.productBrandSn = undefined
       this.queryParam.productEntity.productTypeSn1 = ''
       this.queryParam.productEntity.productTypeSn2 = ''

+ 19 - 5
src/views/reportData/storeTransferOutReport/list.vue

@@ -30,7 +30,7 @@
           </a-col>
           <a-col :md="4" :sm="24">
             <a-form-item label="调往对象">
-              <a-input id="sstoreTransOutReport-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象"/>
+              <custList id="storeTransOutReport-putPersonName" ref="custList" @change="custChange"></custList>
             </a-form-item>
           </a-col>
           <a-col :md="4" :sm="24">
@@ -85,10 +85,11 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 import { reportStoreCallOutPageList, reportStoreCallOutListTotal, reportStoreCallOutExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -102,7 +103,8 @@ export default {
         time: [],
         beginDate: '',
         endDate: '',
-        putPersonName: '',
+        customerNameCurrent: undefined, //  调往对象
+        customerSnCurrent: undefined,
         callOutType: undefined,
         storeCallOutNo: ''
       },
@@ -143,7 +145,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象', width: '15%', align: 'center', customRender: function (text, record) { return record.putPersonName || '--' }, ellipsis: true },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -157,6 +159,16 @@ export default {
     }
   },
   methods: {
+    custChange (v, row) {
+      console.log(v, row)
+      if (row && row.customerSn) {
+        this.queryParam.customerSnCurrent = row.customerSn
+        this.queryParam.customerNameCurrent = undefined
+      } else {
+        this.queryParam.customerNameCurrent = v
+        this.queryParam.customerSnCurrent = undefined
+      }
+    },
     // 合计
     getCount (params) {
       reportStoreCallOutListTotal(params).then(res => {
@@ -199,7 +211,9 @@ export default {
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
 
-      this.queryParam.putPersonName = ''
+      this.$refs.custList.resetForm()
+      this.queryParam.customerSnCurrent = undefined
+      this.queryParam.customerNameCurrent = undefined
       this.queryParam.storeCallOutNo = ''
       this.queryParam.callOutType = undefined
       this.$refs.ruleForm.resetFields()

+ 19 - 4
src/views/reportData/urgentItemsOffsetReport/detailList.vue

@@ -31,7 +31,7 @@
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称">
-                <a-input id="urgentItemsOffsetReport-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+                <custList id="urgentItemsOffsetReport-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
               </a-form-model-item>
             </a-col>
             <!-- <a-col :md="6" :sm="24">
@@ -116,9 +116,10 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
+import custList from '@/views/common/custList.vue'
 import { reportUrgentDetailQueryPage, reportUrgentDetailQueryCount, reportUrgentDetailExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -131,7 +132,8 @@ export default {
         time: [],
         beginDate: '',
         endDate: '',
-        buyerName: '',
+        buyerNameCurrent: undefined,
+        buyerSnCurrent: undefined,
         bizBillNo: '',
         urgentBillNo: '',
         sourceType: undefined,
@@ -223,6 +225,15 @@ export default {
         }
       })
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
@@ -230,7 +241,8 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.bizBillNo = ''
-      this.queryParam.buyerName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.urgentBillNo = ''
       this.queryParam.sourceType = undefined
       this.queryParam.productBrandSn = undefined
@@ -241,6 +253,9 @@ export default {
       this.queryParam.productName = ''
       this.queryParam.productType = []
       this.productType = []
+      if (this.advanced) {
+        this.$refs.custSatelliteList.resetForm()
+      }
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()

+ 20 - 7
src/views/reportData/urgentItemsOffsetReport/list.vue

@@ -30,7 +30,7 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
-              <a-input id="urgentItemsOffsetReport-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+              <custList id="urgentItemsOffsetReport-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
           </a-col>
           <!-- <a-col :md="6" :sm="24">
@@ -63,7 +63,7 @@
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
-        总单数:<strong>{{basiceNum?basiceNum:'--' }}</strong>;
+        总单数:<strong>{{ basiceNum?basiceNum:'--' }}</strong>;
         产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
         <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
           冲减总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</strong>。
@@ -89,9 +89,10 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
 import { reportUrgentPageList, reportUrgentQueryCount, reportUrgentExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -104,7 +105,8 @@ export default {
         time: [],
         beginDate: '',
         endDate: '',
-        buyerName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         bizBillNo: '',
         urgentBillNo: '',
         sourceType: undefined
@@ -113,7 +115,7 @@ export default {
         'time': [{ required: true, message: '请选择冲减时间', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
-      basiceNum:null,//列表数据
+      basiceNum: null, // 列表数据
       exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -134,7 +136,7 @@ export default {
             this.disabled = false
           }
           this.spinning = false
-          this.basiceNum=data.count
+          this.basiceNum = data.count
           return data
         })
       },
@@ -189,17 +191,28 @@ export default {
         }
       })
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     resetSearchForm () {
       this.queryParam = {
         time: [],
         beginDate: '',
         endDate: '',
-        buyerName: '',
+        buyerNameCurrent: undefined,
+        buyerSnCurrent: undefined,
         bizBillNo: '',
         urgentBillNo: '',
         sourceType: undefined
       }
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.rangeDate.resetDate()
       this.$refs.ruleForm.resetFields()
       this.totalData = null

+ 5 - 5
src/views/salesManagement/giftRecord/list.vue

@@ -84,7 +84,7 @@ export default {
         productOrigCode: '', //  原厂编码
         salesBillNo: '', //  关联销售单号
         customerSn: undefined, //  赠送客户
-        customerName: undefined
+        customerNameCurrent: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
@@ -118,7 +118,7 @@ export default {
         { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '赠送数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '关联销售单号', dataIndex: 'salesBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '赠送客户', dataIndex: 'customerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '赠送客户', dataIndex: 'customerNameCurrent', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
         // arr.splice(8, 0, { title: '成本价', dataIndex: 'cost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
@@ -137,9 +137,9 @@ export default {
     custChange (obj, row) {
       if (row) {
         this.queryParam.customerSn = row && row.customerSn || undefined
-        this.queryParam.customerName = undefined
+        this.queryParam.customerNameCurrent = undefined
       } else {
-        this.queryParam.customerName = obj || undefined
+        this.queryParam.customerNameCurrent = obj || undefined
         this.queryParam.customerSn = undefined
       }
     },
@@ -152,7 +152,7 @@ export default {
       this.queryParam.productOrigCode = ''
       this.queryParam.salesBillNo = ''
       this.queryParam.customerSn = undefined
-      this.queryParam.customerName = undefined
+      this.queryParam.customerNameCurrent = undefined
       if (this.advanced) {
         this.$refs.custList.resetForm()
       }

+ 6 - 6
src/views/salesManagement/productPricing/productSalesRecordModal.vue

@@ -80,14 +80,14 @@ export default {
       queryParam: {
         productSn: null,
         buyerSn: undefined,
-        buyerName: undefined
+        buyerNameCurrent: undefined
       },
       // 表头
       columns: [
         { title: '销售时间', dataIndex: 'salesBillEntity.createDate', width: 250, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售价', dataIndex: 'price', width: 150, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '销售数量', dataIndex: 'qty', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '客户名称', dataIndex: 'salesBillEntity.buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '客户名称', dataIndex: 'salesBillEntity.buyerNameCurrent', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
       list: [],
       loading: false,
@@ -102,7 +102,7 @@ export default {
   methods: {
     reset () {
       this.queryParam.buyerSn = undefined
-      this.queryParam.buyerName = undefined
+      this.queryParam.buyerNameCurrent = undefined
       this.$refs.custList.setData(undefined)
       this.getDetail(this.baseData)
     },
@@ -110,9 +110,9 @@ export default {
     custChange (obj, row) {
       if (row) {
         this.queryParam.buyerSn = row && row.customerSn || undefined
-        this.queryParam.buyerName = undefined
+        this.queryParam.buyerNameCurrent = undefined
       } else {
-        this.queryParam.buyerName = obj || undefined
+        this.queryParam.buyerNameCurrent = obj || undefined
         this.queryParam.buyerSn = undefined
       }
     },
@@ -173,7 +173,7 @@ export default {
         this.curTab = '1'
         this.list = []
         this.queryParam.buyerSn = undefined
-        this.queryParam.buyerName = undefined
+        this.queryParam.buyerNameCurrent = undefined
         this.$refs.custList.setData(undefined)
       }
     }

+ 2 - 1
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -355,10 +355,11 @@ export default {
       if (data.shippingAddressProvinceSn) { this.getArea('city', data.shippingAddressProvinceSn) }
       if (data.shippingAddressCitySn) { this.getArea('district', data.shippingAddressCitySn) }
       this.form = Object.assign(this.form, data)
+      this.form.buyerName = data.buyerNameCurrent || data.buyerName
       this.buyerSnBak = this.form.buyerSn
       this.priceTypeBak = this.form.priceType
       this.$nextTick(() => {
-        this.$refs.custList.setData({ key: data.buyerSn, label: data.buyerName, row: data })
+        this.$refs.custList.setData({ key: data.buyerSn, label: data.buyerNameCurrent || data.buyerName, row: data })
       })
     },
     //  获取详情

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

@@ -23,7 +23,7 @@
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions size="small" :column="3">
-              <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerNameCurrent?detailData.buyerName?detailData.buyerName==detailData.buyerNameCurrent?detailData.buyerNameCurrent:detailData.buyerNameCurrent+'('+detailData.buyerName+')':detailData.buyerNameCurrent:'--' }}</a-descriptions-item>
               <a-descriptions-item label="客户地址" :span="2">
                 <div v-if="detailData&&(detailData.shippingAddressProvinceName || detailData.shippingAddressCityName || detailData.shippingAddressCountyName || detailData.shippingAddress)">
                   {{ detailData&&detailData.shippingAddressProvinceName || '' }}

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

@@ -6,7 +6,7 @@
         <template slot="subTitle">
           <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <a style="margin: 0 15px;color: #666;font-size: 18px;font-weight: 600;">单号:{{ detailData&&detailData.salesBillNo || '--' }}</a>
-          <span style="margin: 0 10px;color: #666;">客户名称:{{ detailData&&detailData.buyerName || '--' }}</span>
+          <span style="margin: 0 10px;color: #666;">客户名称:{{ detailData&&detailData.buyerNameCurrent?detailData.buyerName?detailData.buyerNameCurrent==detailData.buyerName?detailData.buyerNameCurrent:detailData.buyerNameCurrent+'('+detailData.buyerName+')':detailData.buyerNameCurrent:'--' }}</span>
           <a-button
             id="salesEdit-edit-btn"
             v-if="detailData&&detailData.salesTragetType != 'DEALER'"
@@ -583,25 +583,24 @@ 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)
-          return
-        } else {
-          this.productForm = {
-            productName: '',
-            productCode: '',
-            orderBy: 'sales_bill_detail.CREATE_DATE desc'
-          }
-        }
-      }
+      // 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({
@@ -661,6 +660,15 @@ export default {
           if (this.showShelfModal) {
             this.$refs.chooseShelfProduct.reload()
           }
+        } else {
+          if (res.errCode == 'VALID_F_00001') {
+            this.productForm = {
+              productName: '',
+              productCode: row.productCode || '',
+              orderBy: 'sales_bill_detail.CREATE_DATE desc'
+            }
+            this.$refs.table.refresh(true)
+          }
         }
         this.isInster = false
         // this.spinning = false

+ 8 - 6
src/views/salesManagement/salesQuery/list.vue

@@ -85,6 +85,7 @@
                   <v-select code="FLAG" id="salesManagementList-distributionFlag" v-model="queryParam.distributionFlag" allowClear placeholder="请选择是否铺货出库"></v-select>
                 </a-form-model-item>
               </a-col>
+
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
@@ -118,6 +119,7 @@
           </template>
           <a-icon type="question-circle" />
         </a-popover>
+
       </div>
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
@@ -265,7 +267,7 @@ export default {
         auditEndDate: '',
         outWarehouseBeginDate: '',
         outWarehouseEndDate: '',
-        buyerName: undefined, //  客户名称
+        buyerNameCurrent: undefined, //  客户名称
         buyerSn: undefined,
         salesBillNo: '', //  销售单号
         purchaseBillNo: '', //  采购单号
@@ -288,7 +290,7 @@ export default {
         { title: '序号', dataIndex: 'no', align: 'center', width: '4%' },
         { title: '来源', dataIndex: 'sourceTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '9%', align: 'center' },
-        { title: '客户名称', dataIndex: 'buyerName', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerNameCurrent', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -354,9 +356,9 @@ export default {
       console.log(v, row)
       if (row && row.customerSn) {
         this.queryParam.buyerSn = row.customerSn
-        this.queryParam.buyerName = undefined
+        this.queryParam.buyerNameCurrent = undefined
       } else {
-        this.queryParam.buyerName = v
+        this.queryParam.buyerNameCurrent = v
         this.queryParam.buyerSn = undefined
       }
     },
@@ -432,7 +434,7 @@ export default {
       }
       this.$confirm({
         title: '提示',
-        content: <div><div style='font-size:16px;margin-bottom:10px;'>{content}</div><div>销售单号:{row.salesBillNo}</div><div>客户名称:{row.buyerName}</div></div>,
+        content: <div><div style='font-size:16px;margin-bottom:10px;'>{content}</div><div>销售单号:{row.salesBillNo}</div><div>客户名称:{row.buyerNameCurrent}</div></div>,
         centered: true,
         closable: true,
         onOk () {
@@ -489,7 +491,7 @@ export default {
         this.$refs.outWareRangeDate.resetDate('')
       }
 
-      this.queryParam.buyerName = undefined
+      this.queryParam.buyerNameCurrent = undefined
       this.queryParam.buyerSn = undefined
       this.queryParam.salesBillNo = ''
       this.queryParam.purchaseBillNo = ''

+ 1 - 1
src/views/salesManagement/salesQuery/productSalesRecordModal.vue

@@ -83,7 +83,7 @@ export default {
         { title: '销售时间', dataIndex: 'salesBillEntity.createDate', width: 250, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售价', dataIndex: 'price', width: 150, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '销售数量', dataIndex: 'qty', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '客户名称', dataIndex: 'salesBillEntity.buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '客户名称', dataIndex: 'salesBillEntity.buyerNameCurrent', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
       list: [],
       loading: false,

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

@@ -58,6 +58,18 @@
                 <input type="file" id="filed" accept="image/jpeg,image/png" hidden="" @change="filePreview">
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="是否有库存">
+                <a-select @change="handleHasQty" allowClear :value="queryParam.existStockFlag" placeholder="请选择查看是否有库存">
+                  <a-select-option value="1">
+                    是
+                  </a-select-option>
+                  <a-select-option value="0">
+                    否
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
           </template>
           <a-col flex="200px" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
@@ -67,7 +79,7 @@
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
           </a-col>
-          <a-col flex="240px" style="margin-bottom: 15px;display:flex;align-items:center;">
+          <a-col flex="auto" style="margin-bottom: 15px;display:flex;align-items:center;">
             <a-checkbox v-model="cost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
             <a-checkbox v-model="cityPrice" id="salesQuery-cityPrice">市级价</a-checkbox>
             <a-checkbox v-model="tyuePrice" v-if="$store.state.user.isShowSpecialPrice==1" id="salesQuery-tyuePrice">特约价</a-checkbox>
@@ -204,7 +216,8 @@ export default {
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
         warehouseSn: undefined, //  仓库、
-        enableFlag: '1'
+        enableFlag: '1',
+        existStockFlag: undefined
       },
       priceType: '',
       buyerSn: '',
@@ -370,6 +383,7 @@ export default {
       this.queryParam.productTypeSn3 = ''
       this.queryParam.warehouseSn = undefined
       this.queryParam.productCodeList = undefined
+      this.queryParam.existStockFlag = undefined
       this.queryParam.vinCode = ''
       this.productType = []
       this.$refs.ruleForm.resetFields()
@@ -478,6 +492,10 @@ export default {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    // 查看是否有库存、
+    handleHasQty (val) {
+      this.queryParam.existStockFlag = val
     }
   },
   watch: {

+ 1 - 1
src/views/salesManagement/salesReturn/detail.vue

@@ -14,7 +14,7 @@
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions size="small" :column="3">
-              <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerNameCurrent?detailData.buyerName?detailData.buyerName==detailData.buyerNameCurrent?detailData.buyerNameCurrent:detailData.buyerNameCurrent+'('+detailData.buyerName+')':detailData.buyerNameCurrent:'--' }}</a-descriptions-item>
               <a-descriptions-item label="客户地址">
                 <div v-if="detailData&&(detailData.provinceName || detailData.cityName || detailData.countyName || detailData.customerAddr)">
                   {{ detailData&&detailData.provinceName || '' }}

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

@@ -17,7 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                <custList ref="custList" v-model="queryParam.buyerName"></custList>
+                <custList ref="custList" v-model="queryParam.buyerNameCurrent"></custList>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -161,7 +161,7 @@ export default {
         endDate: getDate.getCurrMonthDays().endtime,
         auditBeginDate: '',
         auditEndDate: '',
-        buyerName: undefined,
+        buyerNameCurrent: undefined,
         salesReturnNo: undefined, //  销售退货单号
         state: undefined // 业务状态
       },
@@ -171,7 +171,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售退货单号', scopedSlots: { customRender: 'salesReturnNo' }, width: '15%', align: 'center' },
-        { title: '客户名称', dataIndex: 'buyerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'buyerNameCurrent', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退款总金额', dataIndex: 'totalAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '总款数', dataIndex: 'totalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -290,7 +290,7 @@ export default {
       this.$refs.rangeExamineDate.resetDate()
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
-      this.queryParam.buyerName = undefined
+      this.queryParam.buyerNameCurrent = undefined
       this.queryParam.salesReturnNo = ''
       this.queryParam.state = undefined
       this.$refs.custList.resetForm()

+ 1 - 1
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -5,7 +5,7 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;">客户名称:{{ (ordeDetail&&ordeDetail.buyerName) || '--' }}</span>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerNameCurrent?ordeDetail.buyerName?ordeDetail.buyerNameCurrent==ordeDetail.buyerName?ordeDetail.buyerNameCurrent:ordeDetail.buyerNameCurrent+'('+ordeDetail.buyerName+')':ordeDetail.buyerNameCurrent:'--' }}</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_salesReturnPrint')">

+ 3 - 3
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -5,7 +5,7 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="salesReturnGrabEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;">客户名称:{{ (ordeDetail&&ordeDetail.buyerName) || '--' }}</span>
+          <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerNameCurrent?ordeDetail.buyerName?ordeDetail.buyerNameCurrent==ordeDetail.buyerName?ordeDetail.buyerNameCurrent:ordeDetail.buyerNameCurrent+'('+ordeDetail.buyerName+')':ordeDetail.buyerNameCurrent:'--' }}</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_salesReturnPrint')">
@@ -211,14 +211,14 @@ export default {
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '销售单号', dataIndex: 'salesBillNo', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '售价', dataIndex: 'price', align: 'right', width: '4%', customRender: function (text) { return ((text || text == 0) ?  _this.toThousands(text) : '--') }},
+        { title: '售价', dataIndex: 'price', align: 'right', width: '4%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '单位', dataIndex: 'dealerProductEntity.unit', align: 'center', width: '4%', customRender: function (text) { return text || '--' } },
         { title: '销售数量', dataIndex: 'salesQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '本次退货数量', dataIndex: 'qty', align: 'center', width: '7%', scopedSlots: { customRender: 'qty' } },
         { title: '废品数量', dataIndex: 'celQty', align: 'center', width: '6%', scopedSlots: { customRender: 'celQty' } },
         { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: '10%', align: 'center' },
         { title: '退货金额小计', align: 'right', scopedSlots: { customRender: 'returnAmount' }, width: '7%' },
-        { title: '折后金额小计', dataIndex: 'discountedAmount', align: 'right', width: '7%', customRender: function (text) { return ((text || text == 0) ?  _this.toThousands(text) : '--') } },
+        { title: '折后金额小计', dataIndex: 'discountedAmount', align: 'right', width: '7%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' }
       ],
       chooseLoadData: [],

+ 3 - 3
src/views/salesManagement/salesman/editModal.vue

@@ -44,13 +44,13 @@
               placeholder="请输入手机号码(最多11个字符)"
               allowClear />
           </a-form-model-item>
-          <a-form-model-item label="入职时间" prop="entryDate">
+          <a-form-model-item label="入职日期" prop="entryDate">
             <a-date-picker
               v-model="form.entryDate"
               type="date"
               :disabled-date="disabledDate"
               :defaultValue="null"
-              placeholder="请选择入职时间"
+              placeholder="请选择入职日期"
               style="width: 100%;"
             />
           </a-form-model-item>
@@ -83,7 +83,7 @@
         <a-descriptions-item label="姓名">{{ this.form.name || '--' }}</a-descriptions-item>
         <a-descriptions-item label="身份证号">{{ this.form.idCard || '--' }}</a-descriptions-item>
         <a-descriptions-item label="联系电话">{{ this.form.mobile || '--' || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="入职时间">{{ this.form.entryDate || '--' || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="入职日期">{{ this.form.entryDate || '--' || '--' }}</a-descriptions-item>
         <a-descriptions-item label="性别">{{ this.form.sexDictValue || '--' || '--' }}</a-descriptions-item>
         <a-descriptions-item label="状态">{{ this.form.enableFlagDictValue || '--' || '--' }}</a-descriptions-item>
       </a-descriptions>

+ 1 - 1
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -13,7 +13,7 @@
         <a-collapse :activeKey="['1']" v-if="detailData&&detailData.bizType!='REPLENISH'">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="3">
-              <a-descriptions-item label="单位名称">{{ (detailData&&detailData.buyerName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="客户名称">{{ (detailData&&detailData.buyerNameCurrent) || '--' }}{{ detailData&&detailData.buyerName?detailData.buyerName==detailData.buyerNameCurrent?'':'('+detailData.buyerName+')':'' }}</a-descriptions-item>
               <a-descriptions-item label="单位地址">
                 <div v-if="detailData&&(detailData.shippingAddressProvinceName || detailData.shippingAddressCityName || detailData.shippingAddressCountyName || detailData.shippingAddress)">
                   {{ (detailData&&detailData.shippingAddressProvinceName) || '' }}

+ 5 - 5
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -11,8 +11,8 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="单位名称">
-                <custList ref="custList" v-model="queryParam.buyerName"></custList>
+              <a-form-item label="客户名称">
+                <custList ref="custList" v-model="queryParam.buyerNameCurrent"></custList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -121,7 +121,7 @@ export default {
       queryParam: { //  查询条件
         beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
-        buyerName: undefined, //  客户名称
+        buyerNameCurrent: undefined, //  客户名称
         bizBillNo: '', //  关联单号
         urgentBillNo: '', //  急件单号
         status: undefined, //  状态
@@ -133,7 +133,7 @@ export default {
         { title: '急件单号', scopedSlots: { customRender: 'urgentBillNo' }, width: '15%', align: 'center' },
         { title: '关联单号', dataIndex: 'bizBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '销售单来源', dataIndex: 'sourceTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'buyerName', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerNameCurrent', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '创建时间', dataIndex: 'createDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -193,7 +193,7 @@ export default {
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
-      this.queryParam.buyerName = undefined
+      this.queryParam.buyerNameCurrent = undefined
       this.queryParam.bizBillNo = ''
       this.queryParam.urgentBillNo = ''
       this.queryParam.status = undefined

+ 37 - 37
vue.config.js

@@ -2,11 +2,11 @@ const fs = require('fs');
 const path = require('path')
 const webpack = require('webpack')
 const createThemeColorReplacerPlugin = require('./config/plugin.config')
-// gzip 压缩
+// gzip 鍘嬬缉
 const compressionWebpackPlugin = require('compression-webpack-plugin');
-// js,css 压缩
+// js,css 鍘嬬缉
 const TerserPlugin = require('terser-webpack-plugin');
-// 版本自动生成
+// 鐗堟湰鑷�姩鐢熸垚
 const WebpackVersionPlugin = require('webpack-version-plugin');
 const versionConfig = require(resolve('public/version.json'));
 
@@ -22,13 +22,13 @@ function isProd () {
   return process.env.NODE_ENV === 'production'
 }
 
-// 项目部署基础
-// 默认情况下,我们假设你的应用将被部署在域的根目录下,
-// 例如:https://www.my-app.com/
-// 默认:'/'
-// 如果您的应用程序部署在子路径中,则需要在这指定子路径
-// 例如:https://www.foobar.com/my-app/
-// 需要将它改为'/my-app/'
+// 椤圭洰閮ㄧ讲鍩虹�
+// 榛樿�鎯呭喌涓嬶紝鎴戜滑鍋囪�浣犵殑搴旂敤灏嗚�閮ㄧ讲鍦ㄥ煙鐨勬牴鐩�綍涓�,
+// 渚嬪�锛歨ttps://www.my-app.com/
+// 榛樿�锛�'/'
+// 濡傛灉鎮ㄧ殑搴旂敤绋嬪簭閮ㄧ讲鍦ㄥ瓙璺�緞涓�紝鍒欓渶瑕佸湪杩欐寚瀹氬瓙璺�緞
+// 渚嬪�锛歨ttps://www.foobar.com/my-app/
+// 闇€瑕佸皢瀹冩敼涓�'/my-app/'
 const BASE_URL = isProd ? '/' : '/'
 
 const assetsCDN = {
@@ -61,21 +61,21 @@ const prodExternals = {
 
 // vue.config.js
 const vueConfig = {
-  runtimeCompiler: true, // 动态编译组件
+  runtimeCompiler: true, // 鍔ㄦ€佺紪璇戠粍浠�
   publicPath: BASE_URL,
   configureWebpack: {
     optimization: isProd() ? {
           minimize: true,
           minimizer: [new TerserPlugin({
-              test: /\.js(\?.*)?$/i,    //匹配参与压缩的文件
-              parallel: true,    //使用多进程并发运行
-              terserOptions: {    //Terser 压缩配置
+              test: /\.js(\?.*)?$/i,    //鍖归厤鍙備笌鍘嬬缉鐨勬枃浠�
+              parallel: true,    //浣跨敤澶氳繘绋嬪苟鍙戣繍琛�
+              terserOptions: {    //Terser 鍘嬬缉閰嶇疆
                   output:{comments: false},
-                  compress: {//console删除
+                  compress: {//console鍒犻櫎
                       pure_funcs: ["console.log"]
                   }
               },
-              extractComments: true,    //将注释剥离到单独的文件中
+              extractComments: true,    //灏嗘敞閲婂墺绂诲埌鍗曠嫭鐨勬枃浠朵腑
           })],
       }:{},
     // webpack plugins
@@ -83,15 +83,15 @@ const vueConfig = {
       // Ignore all locale files of moment.js
       new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
       new compressionWebpackPlugin({
-          //[file] 会被替换成原始资源。[path] 会被替换成原始资源的路径, [query] 会被替换成查询字符串。默认值是 "[path].gz[query]"。
-          filename: '[path].gz[query]', // 提示compression-webpack-plugin@3.0.0的话asset改为filename
-          //可以是 function(buf, callback) 或者字符串。对于字符串来说依照 zlib 的算法(或者 zopfli 的算法)。默认值是 "gzip"。
+          //[file] 浼氳�鏇挎崲鎴愬師濮嬭祫婧愩€俒path] 浼氳�鏇挎崲鎴愬師濮嬭祫婧愮殑璺�緞锛� [query] 浼氳�鏇挎崲鎴愭煡璇㈠瓧绗︿覆銆傞粯璁ゅ€兼槸 "[path].gz[query]"銆�
+          filename: '[path].gz[query]', // 鎻愮ずcompression-webpack-plugin@3.0.0鐨勮瘽asset鏀逛负filename
+          //鍙�互鏄� function(buf, callback) 鎴栬€呭瓧绗︿覆銆傚�浜庡瓧绗︿覆鏉ヨ�渚濈収 zlib 鐨勭畻娉�(鎴栬€� zopfli 鐨勭畻娉�)銆傞粯璁ゅ€兼槸 "gzip"銆�
           algorithm: 'gzip',
-          //所有匹配该正则的资源都会被处理。默认值是全部资源。
+          //鎵€鏈夊尮閰嶈�姝e垯鐨勮祫婧愰兘浼氳�澶勭悊銆傞粯璁ゅ€兼槸鍏ㄩ儴璧勬簮銆�
           test: new RegExp('\\.(' + ['js', 'css'].join('|') + ')$'),
-          //只有大小大于该值的资源会被处理。单位是 bytes。默认值是 0。
+          //鍙�湁澶у皬澶т簬璇ュ€肩殑璧勬簮浼氳�澶勭悊銆傚崟浣嶆槸 bytes銆傞粯璁ゅ€兼槸 0銆�
           threshold: 10240,
-          //只有压缩率小于这个值的资源才会被处理。默认值是 0.8。
+          //鍙�湁鍘嬬缉鐜囧皬浜庤繖涓�€肩殑璧勬簮鎵嶄細琚��鐞嗐€傞粯璁ゅ€兼槸 0.8銆�
           minRatio: 0.8
         }),
       new WebpackVersionPlugin({
@@ -137,17 +137,17 @@ const vueConfig = {
     }
     
     config.optimization && config.optimization.splitChunks({
-        // 拆包配置 
-        chunks: 'all', //三选一:"initial" 初始化,"all"(默认就是all),"async"(动态加载) 
-        minSize: 30000, // 形成一个新代码块最小的体积,只有 >= minSize 的bundle会被拆分出来 30000
-        maxSize: 0, //拆分之前最大的数值,默认为0,即不做限制
-        minChunks: 1, //引入次数,如果为2 那么一个资源最少被引用两次才可以被拆分出来
-        maxAsyncRequests: 5, // 按需加载的最大并行请求数
-        maxInitialRequests: 4, // 一个入口最大并行请求数
-        automaticNameDelimiter: '~', // 文件名的连接符
+        // 鎷嗗寘閰嶇疆 
+        chunks: 'all', //涓夐€変竴锛�"initial" 鍒濆�鍖栵紝"all"(榛樿�灏辨槸all)锛�"async"锛堝姩鎬佸姞杞斤級 
+        minSize: 30000, // 褰㈡垚涓€涓�柊浠g爜鍧楁渶灏忕殑浣撶Н,鍙�湁 >= minSize 鐨刡undle浼氳�鎷嗗垎鍑烘潵 30000
+        maxSize: 0, //鎷嗗垎涔嬪墠鏈€澶х殑鏁板€硷紝榛樿�涓�0锛屽嵆涓嶅仛闄愬埗
+        minChunks: 1, //寮曞叆娆℃暟锛屽�鏋滀负2 閭d箞涓€涓�祫婧愭渶灏戣�寮曠敤涓ゆ�鎵嶅彲浠ヨ�鎷嗗垎鍑烘潵
+        maxAsyncRequests: 5, // 鎸夐渶鍔犺浇鐨勬渶澶у苟琛岃�姹傛暟
+        maxInitialRequests: 4, // 涓€涓�叆鍙f渶澶у苟琛岃�姹傛暟
+        automaticNameDelimiter: '~', // 鏂囦欢鍚嶇殑杩炴帴绗�
         name: true,
         cacheGroups: {
-        // node_modules模块包
+        // node_modules妯″潡鍖�
         vendors: {
           test: /[\\/]node_modules[\\/]/,
           name: 'chunk-vendors',
@@ -158,7 +158,7 @@ const vueConfig = {
           chunks: 'all',
           priority: -10,
         },
-        // UI库单独拆包
+        // UI搴撳崟鐙�媶鍖�
         antDesign: {
           name: 'chunk-antDesign',
           priority: 19, //  the weight needs to be larger than libs and app or it will be packaged into libs or app
@@ -169,18 +169,18 @@ const vueConfig = {
           priority: 20, //  the weight needs to be larger than libs and app or it will be packaged into libs or app
           test: /[\\/]node_modules[\\/]_?ant-design-vue(.*)/
         },
-        // 共享模块
+        // 鍏变韩妯″潡
         common: {
           name: 'chunk-common',
           minChunks: 2,
-          maxSize: 1024, //拆分之前最大的数值,默认为0,即不做限制
+          maxSize: 1024, //鎷嗗垎涔嬪墠鏈€澶х殑鏁板€硷紝榛樿�涓�0锛屽嵆涓嶅仛闄愬埗
           priority: -20,
           reuseExistingChunk: true
         }
         }
     });
     
-    // 分析打包大小
+    // 鍒嗘瀽鎵撳寘澶у皬
     if (process.env.npm_config_report) {
       config.plugin('webpack-bundle-analyzer')
       .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
@@ -193,7 +193,7 @@ const vueConfig = {
     loaderOptions: {
       less: {
         modifyVars: {
-          // less vars锛宑ustomize ant design theme
+          // less vars閿涘畱ustomize ant design theme
           'primary-color': process.env.VUE_APP_THEME_COLOR,
           'link-color': process.env.VUE_APP_THEME_COLOR
           // 'border-radius-base': '4px'
@@ -241,4 +241,4 @@ if (process.env.VUE_APP_PREVIEW === 'true') {
   vueConfig.configureWebpack.plugins.push(createThemeColorReplacerPlugin())
 }
 
-module.exports = vueConfig
+module.exports = vueConfig