瀏覽代碼

Merge branch 'develop_yh46' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh48-2

# Conflicts:
#	public/version.json
#	src/views/common/custList.vue
#	src/views/customerManagement/customerInfo/edit.vue
#	src/views/numsGoodsShelves/approveStore/authPass.vue
#	src/views/numsGoodsShelves/settlementManagement/list.vue
#	src/views/salesManagement/salesQuery/list.vue
#	src/views/salesManagement/salesQuery/productSalesRecordModal.vue
#	src/views/salesManagement/salesQueryNew/chooseProductModal.vue
#	src/views/salesManagement/salesQueryNew/list.vue
#	src/views/salesManagement/salesReturn/list.vue
#	vue.config.js
lilei 8 月之前
父節點
當前提交
b233cb8395
共有 100 個文件被更改,包括 1075 次插入906 次删除
  1. 1 1
      public/version.json
  2. 1 1
      src/api/sales.js
  3. 1 1
      src/components/Select/index.js
  4. 25 0
      src/config/router.config.js
  5. 4 3
      src/views/allocationManagement/chainTransferIn/detail.vue
  6. 15 6
      src/views/allocationManagement/chainTransferIn/edit.vue
  7. 24 21
      src/views/allocationManagement/chainTransferIn/list.vue
  8. 3 4
      src/views/allocationManagement/chainTransferOut/basicInfoModal.vue
  9. 5 4
      src/views/allocationManagement/chainTransferOut/chooseImportModal.vue
  10. 5 3
      src/views/allocationManagement/chainTransferOut/detail.vue
  11. 38 36
      src/views/allocationManagement/chainTransferOut/edit.vue
  12. 3 3
      src/views/allocationManagement/chainTransferOut/importGuideModal.vue
  13. 37 34
      src/views/allocationManagement/chainTransferOut/list.vue
  14. 11 12
      src/views/allocationManagement/storeTransferOut/basicInfoModal.vue
  15. 5 3
      src/views/allocationManagement/storeTransferOut/chooseImportModal.vue
  16. 4 2
      src/views/allocationManagement/storeTransferOut/detail.vue
  17. 34 29
      src/views/allocationManagement/storeTransferOut/edit.vue
  18. 39 34
      src/views/allocationManagement/storeTransferOut/list.vue
  19. 2 6
      src/views/allocationManagement/warehouseAllocation/basicInfoModal.vue
  20. 5 4
      src/views/allocationManagement/warehouseAllocation/chooseImportModal.vue
  21. 4 6
      src/views/allocationManagement/warehouseAllocation/detail.vue
  22. 19 19
      src/views/allocationManagement/warehouseAllocation/edit.vue
  23. 5 5
      src/views/allocationManagement/warehouseAllocation/importGuideModal.vue
  24. 22 17
      src/views/allocationManagement/warehouseAllocation/list.vue
  25. 2 2
      src/views/basicData/bulkPartsTypeManagement/list.vue
  26. 1 0
      src/views/basicData/customerTypeManagement/editModal.vue
  27. 2 2
      src/views/basicData/customerTypeManagement/list.vue
  28. 3 2
      src/views/basicData/expenseType/editModal.vue
  29. 3 3
      src/views/basicData/expenseType/list.vue
  30. 8 7
      src/views/basicData/notificationManage/list.vue
  31. 1 0
      src/views/basicData/storeTransferOutTypeManagement/editModal.vue
  32. 2 2
      src/views/basicData/storeTransferOutTypeManagement/list.vue
  33. 12 12
      src/views/basicData/systemSettings/index.vue
  34. 5 3
      src/views/bulkManagement/bulkImport/chooseImportModal.vue
  35. 3 3
      src/views/bulkManagement/bulkImport/importGuideModal.vue
  36. 13 11
      src/views/bulkManagement/bulkImport/list.vue
  37. 15 8
      src/views/bulkManagement/bulkReturnGoods/basicInfoModal.vue
  38. 1 1
      src/views/bulkManagement/bulkReturnGoods/chooseImportModal.vue
  39. 5 5
      src/views/bulkManagement/bulkReturnGoods/detailModal.vue
  40. 28 25
      src/views/bulkManagement/bulkReturnGoods/edit.vue
  41. 24 31
      src/views/bulkManagement/bulkReturnGoods/grabEdit.vue
  42. 43 37
      src/views/bulkManagement/bulkReturnGoods/list.vue
  43. 10 3
      src/views/bulkManagement/bulkWarehousingOrder/basicInfoModal.vue
  44. 8 5
      src/views/bulkManagement/bulkWarehousingOrder/chooseImportModal.vue
  45. 4 20
      src/views/bulkManagement/bulkWarehousingOrder/detail.vue
  46. 33 29
      src/views/bulkManagement/bulkWarehousingOrder/edit.vue
  47. 5 5
      src/views/bulkManagement/bulkWarehousingOrder/importGuideModal.vue
  48. 22 25
      src/views/bulkManagement/bulkWarehousingOrder/list.vue
  49. 8 7
      src/views/chainReportData/chainCallReport/detailList.vue
  50. 3 3
      src/views/chainReportData/chainCallReport/index.vue
  51. 9 8
      src/views/chainReportData/chainCallReport/list.vue
  52. 14 12
      src/views/chainReportData/chainCustomerReport/list.vue
  53. 2 2
      src/views/chainReportData/chainPurchaseReceiptReport/list.vue
  54. 13 12
      src/views/chainReportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue
  55. 5 4
      src/views/chainReportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue
  56. 13 6
      src/views/chainReportData/chainReceivedSendStorageReport/list.vue
  57. 24 21
      src/views/chainReportData/chainSalesDetailReport/list.vue
  58. 11 9
      src/views/chainReportData/chainSalesDetailsCountReport/list.vue
  59. 16 13
      src/views/chainReportData/chainSalesReport/list.vue
  60. 5 4
      src/views/chainReportData/chainSalesReturnDetailReport/list.vue
  61. 9 6
      src/views/chainReportData/chainStockExpenditureReport/list.vue
  62. 9 7
      src/views/chainReportData/chainStockIncomeReport/list.vue
  63. 2 2
      src/views/chainReportData/chainStockReport/detailModal.vue
  64. 15 9
      src/views/chainReportData/chainStockReport/list.vue
  65. 11 12
      src/views/chainReportData/chainTransferReport/detailList.vue
  66. 3 3
      src/views/chainReportData/chainTransferReport/index.vue
  67. 12 12
      src/views/chainReportData/chainTransferReport/list.vue
  68. 2 2
      src/views/common/auditModal.vue
  69. 8 2
      src/views/common/commonModal.vue
  70. 6 1
      src/views/common/custList.vue
  71. 6 1
      src/views/common/custSatelliteList.vue
  72. 6 0
      src/views/common/editInput.js
  73. 3 3
      src/views/common/outInDetialModal.vue
  74. 14 8
      src/views/common/pdfViewModal.vue
  75. 2 2
      src/views/common/print.vue
  76. 3 3
      src/views/common/printPanel.vue
  77. 1 1
      src/views/common/productBrand.js
  78. 6 1
      src/views/common/productJqList.vue
  79. 25 2
      src/views/common/productType.js
  80. 6 0
      src/views/common/rangeDate.vue
  81. 5 0
      src/views/common/rangeDateOld.vue
  82. 4 4
      src/views/common/receivingAddress/chooseAddressModal.vue
  83. 9 11
      src/views/common/receivingAddress/editAddressModal.vue
  84. 6 1
      src/views/common/selectCust.vue
  85. 4 4
      src/views/common/selectPrint.vue
  86. 1 1
      src/views/customerManagement/customerInfo/detailModal.vue
  87. 20 9
      src/views/customerManagement/customerInfo/edit.vue
  88. 18 15
      src/views/customerManagement/customerInfo/list.vue
  89. 4 2
      src/views/customerManagement/customerInfo/mergeCustomerModal.vue
  90. 5 5
      src/views/customerManagement/customerMerge/index.vue
  91. 2 1
      src/views/financialManagement/companyCollectionPayment/detail.vue
  92. 13 11
      src/views/financialManagement/companyCollectionPayment/list.vue
  93. 16 14
      src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue
  94. 25 23
      src/views/financialManagement/companyReceivablePayable/collectionPayment.vue
  95. 5 22
      src/views/financialManagement/companyReceivablePayable/detail.vue
  96. 8 6
      src/views/financialManagement/companyReceivablePayable/list.vue
  97. 29 22
      src/views/financialManagement/companyReceivablePayableNew/chooseBillModal.vue
  98. 37 34
      src/views/financialManagement/companyReceivablePayableNew/collectionPayment.vue
  99. 6 23
      src/views/financialManagement/companyReceivablePayableNew/detail.vue
  100. 21 25
      src/views/financialManagement/companyReceivablePayableNew/list.vue

+ 1 - 1
public/version.json

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

+ 1 - 1
src/api/sales.js

@@ -179,7 +179,7 @@ export const supperCodeByVin = (params) => {
 // 销售 详情  打印
 export const salesDetailPrint = params => {
   const data = {
-    url: `/sales/print/${params.sn}/${params.type}/${params.printOrgCode}/${params.printAllName}/${params.remarksShowFlag}/${params.priceFlag}`,
+    url: `/sales/print/${params.sn}/${params.type}/${params.printOrgCode}/${params.printAllName}/${params.remarksShowFlag}/${params.priceFlag}/${params.printNo}`,
     method: 'get',
     headers:{
       'module': encodeURIComponent(params.type=='INK' ? '喷墨打印':'针式打印')

+ 1 - 1
src/components/Select/index.js

@@ -108,7 +108,7 @@ export default {
       <Select vModel={props.value} {...{ props, on: on }}>
         {
           this.dataList.map(item => {
-            return (<a-select-option value={item.code} key={item.code}>{item['dispName']}</a-select-option>)
+            return (<a-select-option value={item.code} id={item.code} key={item.code}>{item['dispName']}</a-select-option>)
           })
         }
       </Select>

+ 25 - 0
src/config/router.config.js

@@ -2471,6 +2471,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/reportData/frozenProductReport',
+            redirect: '/reportData/frozenProductReport/list',
+            name: 'frozenProductReport',
+            component: BlankLayout,
+            meta: {
+              title: '冻结产品报表',
+              icon: 'profile',
+              // permission: 'M_frozenProductReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'frozenProductReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/frozenProductReport/list.vue'),
+                meta: {
+                  title: '冻结产品报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  // permission: 'M_frozenProductReportList'
+                }
+              }
+            ]
+          },
           {
             path: '/reportData/storeReceivedSendStorageReport',
             redirect: '/reportData/storeReceivedSendStorageReport/list',

+ 4 - 3
src/views/allocationManagement/chainTransferIn/detail.vue

@@ -102,10 +102,11 @@ export default {
       },
       basicInfoData: null, //  基本信息
       productTotal: null, //  合计
-      localDataSource: []
+      localDataSource: [] // 列表原始数据
     }
   },
   computed: {
+    // 是否可编辑
     isEdit () {
       return (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT' && this.$hasPermissions('B_allocLinkagePutEdit'))
     },
@@ -133,7 +134,7 @@ export default {
   methods: {
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/allocationManagement/chainTransferIn/list' })
+      this.$router.push({ name: 'chainTransferInList' })
     },
     // 基本信息
     getDetail () {
@@ -157,7 +158,7 @@ export default {
     },
     //  编辑
     handleEdit () {
-      this.$router.push({ path: `/allocationManagement/chainTransferIn/edit/${this.basicInfoData.id}/${this.basicInfoData.allocationLinkagePutSn}` })
+      this.$router.push({ name: 'chainTransferInEdit', params: { id: this.basicInfoData.id, sn: this.basicInfoData.allocationLinkagePutSn } })
     },
     // 打印预览/快捷打印
     handlePrint (type, printerType) {

+ 15 - 6
src/views/allocationManagement/chainTransferIn/edit.vue

@@ -91,7 +91,7 @@
               :allowClear="false"
               :options="warehouseCascadeData"
               :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-              id="chainTransferInEdit-warehouseCascade"
+              :id="'chainTransferInEdit-warehouseCascade-'+record.id"
               placeholder="请选择仓库仓位"
               style="width: 100%;" />
           </template>
@@ -113,13 +113,14 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import Print from '@/views/common/print.vue'
+import { hdPrint } from '@/libs/JGPrint'
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { warehouseCascadeList } from '@/api/warehouse'
 import { allocLinkagePutDetailSn, allocLinkagePutDetailList, allocLinkagePutDetailCount, allocLinkagePutDetailUpdate, allocLinkagePutSubmit, allocLinkagePutDetailPrint } from '@/api/allocLinkagePut'
-import Print from '@/views/common/print.vue'
-import { hdPrint } from '@/libs/JGPrint'
+
 export default {
   name: 'AllocLinkagePutEdit',
   components: { STable, VSelect, Print },
@@ -136,7 +137,7 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       productTypeList: [], //  产品分类  下拉数据
-      productType: [],
+      productType: [], // 产品分类默认值
       warehouseCascadeData: [], //  仓库仓位
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -147,10 +148,12 @@ export default {
           let data
           if (res.status == 200) {
             data = res.data
+            // 统计数据
             this.getDetailCount(params)
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
+              // 默认仓库仓位获取
               const warehouseSn = data.list[i].warehouseSn || undefined
               const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
               data.list[i].warehouseSnBackups = warehouseSn
@@ -170,7 +173,7 @@ export default {
           return data
         })
       },
-      localDataSource: [],
+      localDataSource: [], // 列表原始数据
       basicInfoData: null, //  基本信息
       productTotal: null, //  合计
       printerType: 'NEEDLE' //  打印机类型
@@ -190,6 +193,7 @@ export default {
         // { title: '成本小计', dataIndex: 'costSubtotal', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: '16%', align: 'center' }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(4, 0, { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
         arr.splice(7, 0, { title: '成本小计', dataIndex: 'costSubtotal', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
@@ -244,7 +248,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/allocationManagement/chainTransferIn/list' })
+      this.$router.push({ name: 'chainTransferInList' })
     },
     //  产品分类  change
     changeProductType (val, opt) {
@@ -252,7 +256,9 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 选择仓库仓位
     changeWarehouseCascade (val, opt, ind) {
+      // 仓库无仓位
       if (val.length < 2) {
         this.$message.warning('当前仓库无仓位,请选择其他仓库')
         const warehouseSnBackups = this.localDataSource[ind].warehouseSnBackups || undefined
@@ -277,6 +283,7 @@ export default {
         row.warehouseSn = row.warehouseSnBackups
         return
       }
+      // 没用选仓库
       if (!row.warehouseLocationSn) {
         row.warehouseLocationSn = row.warehouseLocationSnBackups
         return
@@ -307,6 +314,7 @@ export default {
         }
       })
     },
+    // 获取仓库仓位数据
     getWarehouseCascade () {
       warehouseCascadeList({}).then(res => {
         if (res.status == 200) {
@@ -335,6 +343,7 @@ export default {
         _this.spinning = false
       })
     },
+    // 初始化
     pageInit () {
       this.getDetail()
       this.getWarehouseCascade()

+ 24 - 21
src/views/allocationManagement/chainTransferIn/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="入库时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="chainTransferInList-date" ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -67,7 +67,7 @@
                 class="button-warning"
                 v-if="$hasPermissions('B_allocLinkagePutExport')"
                 id="chainTransferInList-export-btn">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="chainTransferInList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -99,7 +99,7 @@
         bordered>
         <!-- 连锁调入单号 -->
         <template slot="allocationLinkagePutNo" slot-scope="text, record">
-          <span class="table-td-link" v-if="$hasPermissions('B_allocLinkagePutDetail')" @click="handleDetail(record)">{{ record.allocationLinkagePutNo }}</span>
+          <span class="table-td-link" :id="'chainTransferInList-detail-'+record.id" v-if="$hasPermissions('B_allocLinkagePutDetail')" @click="handleDetail(record)">{{ record.allocationLinkagePutNo }}</span>
           <span v-else>{{ record.allocationLinkagePutNo }}</span>
         </template>
         <!-- 审核 -->
@@ -122,21 +122,21 @@
             v-if="record.state == 'WAIT_SUBMIT'&&$hasPermissions('B_allocLinkagePutEdit')"
             class="button-primary"
             @click="handleEdit(record)"
-            id="chainTransferInList-warehousing-btn">入库</a-button>
+            :id="'chainTransferInList-in-'+record.id" >入库</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkagePutAudit')"
             class="button-primary"
             @click="handleExamine(record)"
-            id="chainTransferInList-examine-btn">审核</a-button>
+            :id="'chainTransferInList-audit-'+record.id" >审核</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkagePutEdit')"
             class="button-primary"
             @click="handleEdit(record)"
-            id="chainTransferInList-edit-btn">编辑</a-button>
+            :id="'chainTransferInList-edit-'+record.id" >编辑</a-button>
           <span v-if="((record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT')) || (!(record.state == 'WAIT_SUBMIT'&&$hasPermissions('B_allocLinkagePutEdit'))&&!(record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkagePutAudit'))&&!(record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkagePutEdit')))">--</span>
         </template>
       </s-table>
@@ -149,10 +149,10 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { formatDecimal } from '@/libs/tools'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { allocLinkagePutList, allocLinkagePutAudit, allocLinkagePutQueryCount, allocLinkagePutExport } from '@/api/allocLinkagePut'
 import getTenantList from '@/views/common/getTenantList.js'
 import stateIcon from '@/views/common/stateIcon'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import { allocLinkagePutList, allocLinkagePutAudit, allocLinkagePutQueryCount, allocLinkagePutExport } from '@/api/allocLinkagePut'
 export default {
   name: 'AllocLinkagePutList',
   components: { STable, VSelect, rangeDate, stateIcon, getTenantList },
@@ -161,15 +161,15 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
         allocationLinkagePutNo: undefined, // 连锁调入单号
         outTenantSn: undefined, //  调入对象
         allocationType: undefined, //  调拨产品类型
         state: undefined, //  业务状态
-        settleState: undefined
+        settleState: undefined // 财务状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出
@@ -188,7 +188,7 @@ export default {
 
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
-
+              // 总成本
               data.list[i].productTotalCost = formatDecimal(data.list[i].productTotalCost, 2)
             }
             this.disabled = false
@@ -219,6 +219,7 @@ export default {
         { title: '付款', scopedSlots: { customRender: 'financial' }, width: '3%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(6, 0, { title: '总成本', dataIndex: 'productTotalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
@@ -226,6 +227,14 @@ export default {
     }
   },
   methods: {
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ name: 'chainTransferInDetail', params: { sn: row.allocationLinkagePutSn } })
+    },
+    //  入库/编辑
+    handleEdit (row) {
+      this.$router.push({ name: 'chainTransferInEdit', params: { id: row.id, sn: row.allocationLinkagePutSn } })
+    },
     // 统计
     getCount (params) {
       allocLinkagePutQueryCount(params).then(res => {
@@ -236,7 +245,7 @@ export default {
         }
       })
     },
-    //  时间  change
+    //  选择时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
@@ -253,14 +262,6 @@ export default {
       this.queryParam.settleState = undefined
       this.$refs.table.refresh(true)
     },
-    //  详情
-    handleDetail (row) {
-      this.$router.push({ path: `/allocationManagement/chainTransferIn/detail/${row.allocationLinkagePutSn}` })
-    },
-    //  入库/编辑
-    handleEdit (row) {
-      this.$router.push({ path: `/allocationManagement/chainTransferIn/edit/${row.id}/${row.allocationLinkagePutSn}` })
-    },
     //  审核
     handleExamine (row) {
       const _this = this
@@ -295,12 +296,14 @@ export default {
         _this.spinning = false
       })
     },
+    // 初始化页面
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 表格高度计算
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 232

+ 3 - 4
src/views/allocationManagement/chainTransferOut/basicInfoModal.vue

@@ -69,12 +69,12 @@ export default {
       form: {
         allocationType: '', // 调出产品类型
         putTenantSn: undefined, //  调往对象
-        remark: ''
+        remark: ''// 备注
       },
       rules: {
         allocationType: [{ required: true, message: '请选择调出产品类型', trigger: 'change' }],
         putTenantSn: [{ required: true, message: '请选择调往对象', trigger: 'change' }]
-      },
+      }
     }
   },
   methods: {
@@ -98,11 +98,10 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
-    },
+    }
   },
   watch: {
     //  父页面传过来的弹框状态

+ 5 - 4
src/views/allocationManagement/chainTransferOut/chooseImportModal.vue

@@ -85,7 +85,7 @@ export default {
       type: Boolean,
       default: false
     },
-    paramsData: {
+    paramsData: {// 参数
       type: Object,
       default: () => {
         return {}
@@ -93,7 +93,6 @@ export default {
     }
   },
   data () {
-    const _this = this
     return {
       isShow: this.openModal, //  是否打开弹框
       nowColumns: [ //  可导入
@@ -113,8 +112,8 @@ export default {
         { title: '调出数量', dataIndex: 'outQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
       ],
-      loadData: [],
-      unLoadData: [],
+      loadData: [], // 可导入数据
+      unLoadData: [], // 错误数据
       loading: false
     }
   },
@@ -125,11 +124,13 @@ export default {
       importProduct(this.paramsData).then(res => {
         this.loading = false
         if (res.status == 200) {
+          // 可导入数据
           if (res.data.rightList && res.data.rightList.length > 0) {
             res.data.rightList.map((item, index) => {
               item.no = index + 1
             })
           }
+          // 错误数据
           if (res.data.errorList && res.data.errorList.length > 0) {
             res.data.errorList.map((item, index) => {
               item.no = index + 1

+ 5 - 3
src/views/allocationManagement/chainTransferOut/detail.vue

@@ -69,9 +69,9 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
-import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailCount, allocLinkageOutDetailPrint } from '@/api/allocLinkageOut'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
+import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailCount, allocLinkageOutDetailPrint } from '@/api/allocLinkageOut'
 export default {
   name: 'AllocLinkageOutDetail',
   components: { STable, VSelect, Print },
@@ -108,13 +108,15 @@ export default {
       },
       basicInfoData: null, //  基本信息
       productTotal: null, //  合计
-      localDataSource: []
+      localDataSource: [] // 原始列表数据
     }
   },
   computed: {
+    // 是否可编辑
     isEdit () {
       return ((this.basicInfoData && this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT')) && this.$hasPermissions('B_allocLinkageOutEdit')
     },
+    // 列定义
     columns () {
       const _this = this
       const arr = [
@@ -161,7 +163,7 @@ export default {
     },
     //  编辑
     handleEdit () {
-      this.$router.push({ path: `/allocationManagement/chainTransferOut/edit/${this.basicInfoData.id}/${this.basicInfoData.allocationLinkageOutSn}` })
+      this.$router.push({ name: 'chainTransferOutEdit', params: { id: this.basicInfoData.id, sn: this.basicInfoData.allocationLinkageOutSn } })
     },
     // 打印预览/快捷打印
     handlePrint (type, printerType) {

+ 38 - 36
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -50,7 +50,7 @@
                     <a-col :md="6" :sm="24">
                       <a-form-item label="仓库">
                         <a-select id="chainTransferOutEdit-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
-                          <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                          <a-select-option v-for="item in warehouseList" :id="'warehouseSn-'+item.warehouseSn" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
                         </a-select>
                       </a-form-item>
                     </a-col>
@@ -58,7 +58,7 @@
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                     <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chainTransferOutEdit-refresh">查询</a-button>
                     <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutEdit-reset">重置</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 8px">
+                    <a @click="advanced=!advanced" style="margin-left: 8px" id="chainTransferOutEdit-advanced">
                       {{ advanced ? '收起' : '展开' }}
                       <a-icon :type="advanced ? 'up' : 'down'"/>
                     </a>
@@ -84,7 +84,7 @@
                 <div @dblclick.stop>
                   <a-input-number
                     size="small"
-                    id="chainTransferOutEdit-outQty"
+                    :id="'chainTransferOutEdit-outQty-'+record.stockDetailSn"
                     v-model="record.outQty"
                     :precision="0"
                     :min="1"
@@ -95,7 +95,7 @@
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
+                <a-button :id="'chainTransferOutEdit-add-'+record.stockDetailSn" size="small" type="link" class="button-primary" @click="handleAdd(record)">添加</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -123,17 +123,17 @@
                     <a-row :gutter="15">
                       <a-col :md="9" :sm="24">
                         <a-form-item label="产品编码" prop="productCode">
-                          <a-input id="chainTransferOutEdit-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                          <a-input id="coe-choosed-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
                         </a-form-item>
                       </a-col>
                       <a-col :md="9" :sm="24">
                         <a-form-item label="产品名称" prop="productName">
-                          <a-input id="chainTransferOutEdit-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                          <a-input id="coe-choosed-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
                         </a-form-item>
                       </a-col>
                       <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="chainTransferOutList-refresh">查询</a-button>
-                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="chainTransferOutList-reset">重置</a-button>
+                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="coe-choosed-refresh">查询</a-button>
+                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="coe-choosed-reset">重置</a-button>
                       </a-col>
                     </a-row>
                   </a-form>
@@ -146,7 +146,7 @@
                   size="small"
                   @click="openGuideModal=true"
                   style="margin-right: 5px"
-                  id="chainTransferOutEdit-import-btn">导入产品</a-button>
+                  id="coe-choosed-import-btn">导入产品</a-button>
                 <a-button
                   size="small"
                   type="primary"
@@ -154,7 +154,7 @@
                   style="margin-left: 8px"
                   :disabled="localDataSource.length==0"
                   @click.stop="handleDel('', 'all')"
-                  id="chainTransferOutEdit-del-all-btn">清空列表</a-button>
+                  id="coe-choosed-del-all-btn">清空列表</a-button>
               </a-col>
             </a-row>
             <!-- 列表 -->
@@ -170,7 +170,7 @@
               bordered>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="chainTransferOutEdit-del-btn">删除</a-button>
+                <a-button size="small" type="link" class="button-error" @click="handleDel(record)" :id="'coe-choosed-del-btn-'+record.id">删除</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -196,14 +196,17 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
-import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailSave, allocLinkageOutDetailDel, allocLinkageOutDetailCount, allocLinkageOutSubmit, allocLinkageOutDetailDelAll, allocLinkageOutDetailPrint, importProductInsertBatch } from '@/api/allocLinkageOut'
-import { productQuery } from '@/api/allocWarehouse'
+import { hdPrint } from '@/libs/JGPrint'
+// 组件
+import Print from '@/views/common/print.vue'
+import importGuideModal from './importGuideModal.vue'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
+// 接口
 import { warehouseAllList } from '@/api/warehouse'
-import Print from '@/views/common/print.vue'
-import { hdPrint } from '@/libs/JGPrint'
-import importGuideModal from './importGuideModal.vue'
+import { productQuery } from '@/api/allocWarehouse'
+import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailSave, allocLinkageOutDetailDel, allocLinkageOutDetailCount, allocLinkageOutSubmit, allocLinkageOutDetailDelAll, allocLinkageOutDetailPrint, importProductInsertBatch } from '@/api/allocLinkageOut'
+
 export default {
   name: 'AllocLinkageOutEdit',
   components: { STable, VSelect, Print, ProductType, ProductBrand, importGuideModal },
@@ -212,20 +215,20 @@ export default {
     return {
       spinning: false,
       queryParam: {
-        productCode: '',
-        productName: '',
-        productOrigCode: '',
-        warehouseSn: undefined,
-        brandSn: undefined,
-        productTypeSn1: undefined,
-        productTypeSn2: undefined,
-        productTypeSn3: undefined
+        productCode: '', // 产品编码
+        productName: '', // 产品名称
+        productOrigCode: '', //  原厂编码
+        warehouseSn: undefined, // 仓库sn
+        brandSn: undefined, // 品牌sn
+        productTypeSn1: undefined, // 产品类型1
+        productTypeSn2: undefined, // 产品类型2
+        productTypeSn3: undefined// 产品类型3
       },
-      productType: [],
+      productType: [], // 产品分类默认值
       warehouseList: [], //  仓库  下拉数据
       disabled: false, //  查询、重置按钮是否可操作
-      chooseDisabled: false,
-      openGuideModal: false,
+      chooseDisabled: false, // 按钮禁用
+      openGuideModal: false, // 打开导入产品弹框
       advanced: false, // 高级搜索 展开/关闭
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -244,8 +247,8 @@ export default {
         })
       },
       chooseQueryParam: {
-        productCode: '',
-        productName: ''
+        productCode: '', // 产品编码
+        productName: ''// 产品名称
       },
       // 加载数据方法 必须为 Promise 对象
       chooseLoadData: parameter => {
@@ -267,7 +270,7 @@ export default {
       },
       basicInfoData: null, //  基本信息
       productTotal: null, //  合计
-      localDataSource: []
+      localDataSource: [] // 原始数据
     }
   },
   computed: {
@@ -292,6 +295,7 @@ export default {
       }
       return arr
     },
+    // 已选列
     chooseColumns () {
       const _this = this
       const arr = [
@@ -308,6 +312,7 @@ export default {
         // { title: '成本小计', dataIndex: 'costSubtotal', width: '6%', 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(8, 0, { title: '成本价', dataIndex: 'outCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
         arr.splice(10, 0, { title: '成本小计', dataIndex: 'costSubtotal', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
@@ -321,6 +326,7 @@ export default {
       this.resetData()
       this.$refs.table.refresh(true)
     },
+    // 重置数据
     resetData () {
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
@@ -439,12 +445,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/allocationManagement/chainTransferOut/list' })
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
+      this.$router.push({ name: 'chainTransferOutList' })
     },
     // 合计
     getDetailCount (params) {
@@ -483,6 +484,7 @@ export default {
         _this.spinning = false
       })
     },
+    // 页面初始化
     pageInit () {
       this.resetData()
       this.chooseResetSearchForm()

+ 3 - 3
src/views/allocationManagement/chainTransferOut/importGuideModal.vue

@@ -17,7 +17,7 @@
           <ul>
             <li>1)导入的Excel文件中必须包含名为“产品编码”、“仓库”、“仓位”、“调出数量”的列,且名称必须相同,其他列可自定义,不影响数据导入</li>
             <li>2)如果导入的产品已经存在,则不会导入该行</li>
-            <li><a :href="templUrl"><a-icon type="download" />下载导入模板</a></li>
+            <li><a :href="templUrl" id="importGuide-tpl-link"><a-icon type="download" />下载导入模板</a></li>
           </ul>
         </div>
         <div class="explain-item">
@@ -72,7 +72,7 @@ export default {
       type: Boolean,
       default: false
     },
-    params: {
+    params: { // 参数
       type: Object,
       default: null
     }
@@ -86,7 +86,7 @@ export default {
       uploadParams: {
         savePathType: 'local'
       },
-      templUrl: location.protocol + '//' + location.host + '/templ/连锁调出产品导入模板.xlsx'
+      templUrl: location.protocol + '//' + location.host + '/templ/连锁调出产品导入模板.xlsx' // 模板地址
     }
   },
   methods: {

+ 37 - 34
src/views/allocationManagement/chainTransferOut/list.vue

@@ -486,17 +486,17 @@ list.vue 20 KB
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="chainTransferOutList-time" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="审核时间">
-                <rangeDate ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
+                <rangeDate id="chainTransferOutList-auditTime" ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="出库时间">
-                <rangeDate ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
+                <rangeDate id="chainTransferOutList-outWareTime" ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -528,6 +528,7 @@ list.vue 20 KB
                     ref="state"
                     id="chainTransferOutList-state"
                     code="ALLOCATION_LINKAGE_OUT_STATUS"
+                    @change="setIsHomeNav($route.name, null)"
                     placeholder="请选择业务状态"
                     allowClear></v-select>
                 </a-form-item>
@@ -555,7 +556,7 @@ list.vue 20 KB
                 :disabled="disabled"
                 :loading="exportLoading"
                 id="chainTransferOutList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
+              <a @click="advanced=!advanced" style="margin-left: 8px" id="chainTransferOutList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -614,28 +615,28 @@ list.vue 20 KB
             v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkageOutAudit')"
             class="button-primary"
             @click="handleExamine(record)"
-            id="chainTransferOutList-examine-btn">审核</a-button>
+            :id="'chainTransferOutList-examine-'+record.id">审核</a-button>
           <a-button
             size="small"
             type="link"
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT') &&$hasPermissions('B_allocLinkageOutEdit')"
             class="button-primary"
             @click="handleEdit(record)"
-            id="chainTransferOutList-edit-btn">编辑</a-button>
+            :id="'chainTransferOutList-edit-'+record.id">编辑</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_OUT_WAREHOUSE'&&$hasPermissions('B_allocLinkageOutStock')"
             class="button-primary"
             @click="handleOut(record)"
-            id="chainTransferOutList-out-btn">出库</a-button>
+            :id="'chainTransferOutList-out-'+record.id">出库</a-button>
           <a-button
             size="small"
             type="link"
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT' || record.state == 'WAIT_OUT_WAREHOUSE') &&$hasPermissions('B_allocLinkageOutDel')"
             class="button-error"
             @click="handleDel(record)"
-            id="chainTransferOutList-del-btn">删除</a-button>
+            :id="'chainTransferOutList-del-'+record.id">删除</a-button>
           <span v-if="(record.state != 'WAIT_SUBMIT' && record.state != 'WAIT_AUDIT' && record.state != 'WAIT_OUT_WAREHOUSE')|| (!(record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkageOutAudit')) && !((record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT') &&$hasPermissions('B_allocLinkageOutEdit')) && !(record.state == 'WAIT_OUT_WAREHOUSE'&&$hasPermissions('B_allocLinkageOutStock')))">--</span>
         </template>
       </s-table>
@@ -663,26 +664,26 @@ export default {
     return {
       spinning: false,
       exportLoading: false,
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       advanced: true, // 高级搜索 展开/关闭
-      time: [
+      time: [ // 时间默认值
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
-      auditTime: [],
-      outWareTime: [],
+      auditTime: [], // 审核时间
+      outWareTime: [], // 出库时间
       queryParam: { //  查询条件
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        auditBeginDate: '',
-        auditEndDate: '',
-        outWarehouseBeginDate: '',
-        outWarehouseEndDate: '',
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
+        auditBeginDate: '', // 审核开始时间
+        auditEndDate: '', // 审核结束时间
+        outWarehouseBeginDate: '', // 出库开始时间
+        outWarehouseEndDate: '', // 出库结束时间
         allocationLinkageOutNo: undefined, //  连锁调出单号
         putTenantSn: undefined, //  调往对象
         allocationType: undefined, //  调出产品类型
         state: undefined, //  业务状态
-        settleState: undefined
+        settleState: undefined // 财务状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
@@ -730,6 +731,7 @@ export default {
         { title: '收款', scopedSlots: { customRender: 'financial' }, width: '3%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(6, 0, { title: '总成本', dataIndex: 'productTotalCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
@@ -737,6 +739,14 @@ export default {
     }
   },
   methods: {
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ name: 'chainTransferOutDetail', params: { sn: row.allocationLinkageOutSn } })
+    },
+    //  新增/编辑
+    handleEdit (row) {
+      this.$router.push({ name: 'chainTransferOutEdit', params: { id: row.id, sn: row.allocationLinkageOutSn } })
+    },
     // 统计
     getCount (params) {
       allocLinkageOutQueryCount(params).then(res => {
@@ -747,20 +757,22 @@ export default {
         }
       })
     },
-    //  时间  change
+    //  选择时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
+    // 审核时间
     auditDateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
+    // 出库时间
     outWareDateChange (date) {
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]
     },
-    //  导出
+    // 导出
     handleExport () {
       const _this = this
       const params = this.queryParam
@@ -801,20 +813,19 @@ export default {
       this.$refs.outWareRangeDate.resetDate('')
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
-
       this.queryParam.allocationLinkageOutNo = undefined
       this.queryParam.putTenantSn = undefined
       this.queryParam.allocationType = undefined
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
 	    if (!flag) {
-	      this.setIsHomeNav(this.$route.name, null)
+        this.setIsHomeNav(this.$route.name, null)
 	    }
     },
     //  基本信息  保存
     handleOk (data) {
       this.resetData()
-      this.$router.push({ path: `/allocationManagement/chainTransferOut/add/${data.id}/${data.allocationLinkageOutSn}` })
+      this.$router.push({ name: 'chainTransferOutAdd', params: { id: data.id, sn: data.allocationLinkageOutSn } })
     },
     //  删除
     handleDel (row) {
@@ -879,14 +890,7 @@ export default {
         }
       })
     },
-    //  详情
-    handleDetail (row) {
-      this.$router.push({ path: `/allocationManagement/chainTransferOut/detail/${row.allocationLinkageOutSn}` })
-    },
-    //  新增/编辑
-    handleEdit (row) {
-      this.$router.push({ path: `/allocationManagement/chainTransferOut/edit/${row.id}/${row.allocationLinkageOutSn}` })
-    },
+    // 初始化页面
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -900,7 +904,6 @@ export default {
       const b = this.$store.state.app.updateList
       // 是否从首页点击进入
       const isHomeNav = this.getIsHomeNav()[this.$route.name]
-      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
 
       // 从首页进入,判断式新建还式待办查询
       if (isHomeNav) {
@@ -927,6 +930,7 @@ export default {
         }
       }
     },
+    // 表格高度计算
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 273
@@ -943,7 +947,6 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {},
   activated () {
     this.pageInit()
   },

+ 11 - 12
src/views/allocationManagement/storeTransferOut/basicInfoModal.vue

@@ -18,17 +18,17 @@
         :wrapper-col="formItemLayout.wrapperCol"
       >
         <a-form-model-item label="调往对象" prop="putPersonType">
-          <a-radio-group v-model="form.putPersonType" @change="putPersonTypeChange">
-            <a-radio v-for="(item,index) in putPersonTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
+          <a-radio-group id="storeTransferOut-basicInfo-putPersonType" v-model="form.putPersonType" @change="putPersonTypeChange">
+            <a-radio v-for="(item,index) in putPersonTypeList" :id="'putPersonType-'+item.code" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
           </a-radio-group>
         </a-form-model-item>
         <a-form-model-item label="调往对象名称" :prop="isCustomer ? 'putPersonSn' : 'putPersonName'">
-          <selectCust ref="custList" :isValidateEnabled="true" v-if="isCustomer" @change="custChange"></selectCust>
+          <selectCust id="storeTransferOut-basicInfo-putPersonSn" ref="custList" :isValidateEnabled="true" v-if="isCustomer" @change="custChange"></selectCust>
           <a-input v-if="!isCustomer" v-model.trim="form.putPersonName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
         </a-form-model-item>
         <a-form-model-item label="调拨类型" prop="callOutType">
-          <a-select v-model="form.callOutType" placeholder="请选择调拨类型" allowClear >
-            <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
+          <a-select id="storeTransferOut-basicInfo-callOutType" v-model="form.callOutType" placeholder="请选择调拨类型" allowClear >
+            <a-select-option v-for="item in storeCallOutTypeList" :id="'callOutType-'+item.storeCallOutTypeSn" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
           </a-select>
         </a-form-model-item>
         <a-form-model-item label="备注" prop="remark">
@@ -46,9 +46,9 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
+import selectCust from '@/views/common/selectCust.vue'
 import { storeCallOutSave } from '@/api/storeCallOut'
 import { getLookUpData } from '@/api/data'
-import selectCust from '@/views/common/selectCust.vue'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 export default {
   name: 'StoreTransferOutBasicInfoModal',
@@ -70,11 +70,11 @@ export default {
         wrapperCol: { span: 18 }
       },
       form: {
-        putPersonType: 'CUSTOMER',
-        putPersonSn: undefined,
-        putPersonName: '',
-        callOutType: undefined,
-        remark: ''
+        putPersonType: 'CUSTOMER', // 调往对象类型
+        putPersonSn: undefined, // 调往对象sn
+        putPersonName: '', // 调往对象名称
+        callOutType: undefined, // 调拨类型
+        remark: ''// 备注
       },
       rules: {
         putPersonType: [{ required: true, message: '请选择调往对象', trigger: 'change' }],
@@ -113,7 +113,6 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })

+ 5 - 3
src/views/allocationManagement/storeTransferOut/chooseImportModal.vue

@@ -87,7 +87,7 @@ export default {
       type: Boolean,
       default: false
     },
-    paramsData: {
+    paramsData: {// 参数
       type: Object,
       default: () => {
         return {}
@@ -95,9 +95,9 @@ export default {
     }
   },
   data () {
-    const _this = this
     return {
       isShow: this.openModal, //  是否打开弹框
+      // 可导入列
       nowColumns: [
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -108,6 +108,7 @@ export default {
         { title: '调出数量', dataIndex: 'qtyStr', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       loadData: [],
+      // 错误数据列
       nowUnColumns: [
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -125,10 +126,12 @@ export default {
       const paramsData = JSON.parse(JSON.stringify(this.paramsData))
       this.loadData = paramsData.rightList || []
       this.unLoadData = paramsData.errorList || []
+      // 可导入列
       this.loadData.map((item, index) => {
         item.no = index + 1
         item.storeCallOutSn = paramsData.storeCallOutSn
       })
+      // 错误数据列
       this.unLoadData.map((item, index) => {
         item.no = index + 1
         item.storeCallOutSn = paramsData.storeCallOutSn
@@ -141,7 +144,6 @@ export default {
         this.$message.warning('无可导入的产品!')
       } else {
         const data = this.paramsData.rightList
-        
         this.$emit('ok', data)
         this.isShow = false
       }

+ 4 - 2
src/views/allocationManagement/storeTransferOut/detail.vue

@@ -142,12 +142,14 @@ export default {
     }
   },
   computed: {
+    // 是否可编辑
     isEdit () {
       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 = [
@@ -228,7 +230,7 @@ export default {
   methods: {
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/allocationManagement/storeTransferOut/list' })
+      this.$router.push({ name: 'storeTransferOutList' })
     },
     // 打印预览/快捷打印
     handlePrint (type, printerType) {
@@ -276,7 +278,7 @@ export default {
     },
     //  编辑
     handleEdit () {
-      this.$router.push({ path: `/allocationManagement/storeTransferOut/edit/${this.basicInfoData.id}/${this.basicInfoData.storeCallOutSn}` })
+      this.$router.push({ name: 'storeTransferOutEdit', params: { id: this.basicInfoData.id, sn: this.basicInfoData.storeCallOutSn } })
     }
   },
   mounted () {

+ 34 - 29
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -64,14 +64,14 @@
                     </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-checkbox style="margin-left:10px;" v-model="enableFlag" :checked="enableFlag" id="storeTransferOutEdit-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>
-                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 5px">
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutEdit-refresh">查询</a-button>
+                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutEdit-reset">重置</a-button>
+                    <a @click="advanced=!advanced" style="margin-left: 5px" id="storeTransferOutEdit-advanced">
                       {{ advanced ? '收起' : '展开' }}
                       <a-icon :type="advanced ? 'up' : 'down'"/>
                     </a>
@@ -105,6 +105,7 @@
                 <div @dblclick.stop>
                   <a-input-number
                     size="small"
+                    :id="`storeTransferOutEdit-outQty-${record.stockDetailSn}`"
                     v-if="record.currentQty"
                     v-model="record.outQty"
                     :precision="0"
@@ -123,7 +124,7 @@
                   type="link"
                   class="button-primary"
                   @click="handleAdd(record)"
-                  id="storeTransferOutEdit-add-btn">添加</a-button>
+                  :id="`storeTransferOutEdit-add-${record.stockDetailSn}`">添加</a-button>
                 <span v-else>--</span>
               </template>
             </s-table>
@@ -152,17 +153,17 @@
                     <a-row :gutter="15">
                       <a-col :md="8" :sm="24">
                         <a-form-item label="产品编码" prop="productCode">
-                          <a-input id="storeTransferOutEdit-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                          <a-input id="stoChoose-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
                         </a-form-item>
                       </a-col>
                       <a-col :md="8" :sm="24">
                         <a-form-item label="产品名称" prop="productName">
-                          <a-input id="storeTransferOutEdit-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                          <a-input id="stoChoose-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
                         </a-form-item>
                       </a-col>
                       <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
-                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
-                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
+                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="stoChoose-refresh">查询</a-button>
+                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="stoChoose-reset">重置</a-button>
                       </a-col>
                     </a-row>
                   </a-form>
@@ -173,7 +174,7 @@
                   type="default"
                   @click="openGuideModal=true"
                   style="margin-right:5px;"
-                  id="salesEdit-import">导入产品</a-button>
+                  id="stoChoose-import-product">导入产品</a-button>
               </a-col>
             </a-row>
             <!-- 列表 -->
@@ -199,7 +200,7 @@
               <template slot="outQty" slot-scope="text, record">
                 <a-input-number
                   size="small"
-                  id="storeTransferOutEdit-outQty"
+                  :id="'stoChoose-outQty-'+record.id"
                   v-model="record.outQty"
                   :precision="0"
                   :min="1"
@@ -210,8 +211,8 @@
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" class="button-primary" @click="handleViewDetail(record)">出库明细</a-button>
-                <a-button size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
+                <a-button :id="'stoChoose-detail-'+record.id" size="small" type="link" class="button-primary" @click="handleViewDetail(record)">出库明细</a-button>
+                <a-button :id="'stoChoose-del-'+record.id" size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -255,23 +256,23 @@ export default {
   data () {
     return {
       spinning: false,
-      showOutInModal: false,
-      openGuideModal: false,
+      showOutInModal: false, // 出入库明细
+      openGuideModal: false, // 打开导入产品弹框
       queryParam: {
-        productCode: '',
-        productName: '',
-        warehouseSn: undefined,
-        brandSn: undefined,
-        productTypeSn1: undefined,
-        productTypeSn2: undefined,
-        productTypeSn3: undefined,
-        existStockFlag: undefined,
+        productCode: '', // 产品编码
+        productName: '', // 产品名称
+        warehouseSn: undefined, // 仓库sn
+        brandSn: undefined, // 品牌sn
+        productTypeSn1: undefined, // 分类1
+        productTypeSn2: undefined, // 分类2
+        productTypeSn3: undefined, // 分类3
+        existStockFlag: undefined, // 是否有库存
         enableFlag: undefined // 是否包含禁用产品
       },
-      enableFlag: true,
+      enableFlag: true, // 启用禁用
       chooseQueryParam: {
-        productCode: '',
-        productName: ''
+        productCode: '', // 产品编码
+        productName: ''// 产品名称
       },
       disabled: false, //  查询、重置按钮是否可操作
       loading: false, //  表格加载中
@@ -279,7 +280,7 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       productBrandList: [], //  产品品牌  下拉数据
       productTypeList: [], //  产品分类  下拉数据
-      productType: [],
+      productType: [], // 产品分类
       warehouseList: [], //  仓库  下拉数据
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -310,12 +311,13 @@ export default {
             // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
             data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
           }
+          // 保存原始数据
           this.chooseLoadDataSource = data.list || []
           this.chooseDisabled = false
           return data
         })
       },
-      chooseLoadDataSource: [],
+      chooseLoadDataSource: [], // 已选产品列表
       basicInfoData: null, //  基本信息
       productTotal: null, //  合计
       printCostChecked: true //  打印成本
@@ -341,6 +343,7 @@ export default {
       }
       return arr
     },
+    // 已选表格列
     chooseColumns () {
       const _this = this
       const arr = [
@@ -355,6 +358,7 @@ export default {
         // { 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(7, 0, { slots: { title: 'costTitle' }, dataIndex: 'totalOutCost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
@@ -509,7 +513,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/allocationManagement/storeTransferOut/list' })
+      this.$router.push({ name: 'storeTransferOutList' })
     },
     // 已选产品 调出数量  blur
     outQtyBlur (val, record) {
@@ -534,6 +538,7 @@ export default {
         }
       })
     },
+    // 页面初始化和
     pageInit () {
       this.printCostChecked = true
       this.getDetail()

+ 39 - 34
src/views/allocationManagement/storeTransferOut/list.vue

@@ -7,17 +7,17 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="storeTransferOutList-time" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="审核时间">
-                <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
+                <rangeDate id="storeTransferOutList-auditTime" ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="出库时间">
-                <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
+                <rangeDate id="storeTransferOutList-outWareTime" ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -44,6 +44,7 @@
                     v-model="queryParam.state"
                     ref="state"
                     id="storeTransferOutList-state"
+                    @change="setIsHomeNav($route.name, null)"
                     code="STORE_CALL_OUT_STATE"
                     placeholder="请选择业务状态"
                     allowClear
@@ -66,7 +67,7 @@
             <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align: center;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
+              <a @click="advanced=!advanced" style="margin-left: 8px" id="storeTransferOutList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -102,18 +103,18 @@
         bordered>
         <!-- 店内调出单号 -->
         <template slot="storeCallOutNo" slot-scope="text, record">
-          <span class="table-td-link" v-if="$hasPermissions('B_storeCallOutDetail')" @click="handleDetail(record)">{{ record.storeCallOutNo }}</span>
+          <span :id="'storeTransferOutList-detail-'+record.id" class="table-td-link" v-if="$hasPermissions('B_storeCallOutDetail')" @click="handleDetail(record)">{{ record.storeCallOutNo }}</span>
           <span v-else>{{ record.storeCallOutNo }}</span>
         </template>
-        <!-- 审核 -->
+        <!-- 审核icon -->
         <template slot="audit" slot-scope="text, record">
           <stateIcon :title="record.stateDictValue" :state="record.state == 'FINISH'||record.state == 'WAIT_OUT_WAREHOUSE'?'1':'2'"></stateIcon>
         </template>
-        <!-- 结算 -->
+        <!-- 结算icon -->
         <template slot="financial" slot-scope="text, record">
           <stateIcon :title="record.settleStateDictValue" :state="record.settleState == 'FINISH'?'1':'2'"></stateIcon>
         </template>
-        <!-- 出库 -->
+        <!-- 出库icon -->
         <template slot="waitOut" slot-scope="text, record">
           <stateIcon :state="record.state == 'FINISH'?'1':'2'"></stateIcon>
         </template>
@@ -125,28 +126,29 @@
             v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_storeCallOutAudit')"
             class="button-primary"
             @click="handleExamine(record)"
-            id="storeTransferOutList-examine-btn">审核</a-button>
+            :id="'storeTransferOutList-audit-'+record.id"
+          >审核</a-button>
           <a-button
             size="small"
             type="link"
             v-if="((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')) &&$hasPermissions('B_storeCallOutEdit')"
             class="button-primary"
             @click="handleEdit(record)"
-            id="storeTransferOutList-edit-btn">编辑</a-button>
+            :id="'storeTransferOutList-edit-'+record.id">编辑</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_OUT_WAREHOUSE'&&$hasPermissions('B_storeCallStockOut')"
             class="button-primary"
             @click="handleOut(record)"
-            id="storeTransferOutList-out-btn">出库</a-button>
+            :id="'storeTransferOutList-out-'+record.id">出库</a-button>
           <a-button
             size="small"
             type="link"
             v-if="((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'WAIT_OUT_WAREHOUSE'))&&$hasPermissions('B_storeCallOutDel')"
             class="button-error"
             @click="handleDel(record)"
-            id="storeTransferOutList-del-btn">删除</a-button>
+            :id="'storeTransferOutList-del-'+record.id">删除</a-button>
           <span v-if="!(record.state == 'WAIT_AUDIT'&&$hasPermissions('B_storeCallOutAudit')) && !(((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')) &&$hasPermissions('B_storeCallOutEdit')) && !(record.state == 'WAIT_OUT_WAREHOUSE'&&$hasPermissions('B_storeCallStockOut')) && !(((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'WAIT_OUT_WAREHOUSE'))&&$hasPermissions('B_storeCallOutDel'))">--</span>
         </template>
       </s-table>
@@ -174,22 +176,22 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      time: [
+      tableHeight: 0, // 表格高度
+      time: [// 时间默认值
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
-      auditTime: [],
-      outWareTime: [],
+      auditTime: [], // 审核时间默认值
+      outWareTime: [], // 出库时间默认值
       queryParam: { //  查询条件
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        auditBeginDate: '',
-        auditEndDate: '',
-        outWarehouseBeginDate: '',
-        outWarehouseEndDate: '',
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
+        auditBeginDate: '', // 审核开始时间
+        auditEndDate: '', // 审核结束时间
+        outWarehouseBeginDate: '', // 出库开始时间
+        outWarehouseEndDate: '', // 出库结束时间
         customerNameCurrent: undefined, //  调往对象
-        customerSnCurrent: undefined,
+        customerSnCurrent: undefined, // 调往对象sn
         storeCallOutNo: undefined, // 店内调出单号
         callOutType: undefined, //  调拨类型
         state: undefined, //  业务状态
@@ -250,8 +252,8 @@ export default {
     }
   },
   methods: {
+    // 选择调往对象
     custChange (v, row) {
-      console.log(v, row)
       if (row && row.customerSn) {
         this.queryParam.customerSnCurrent = row.customerSn
         this.queryParam.customerNameCurrent = undefined
@@ -275,10 +277,12 @@ export default {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
+    // 审核时间选择
     auditDateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
+    // 出库时间选择
     outWareDateChange (date) {
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]
@@ -316,7 +320,15 @@ export default {
     //  基本信息  保存
     handleOk (data) {
       this.resetData()
-      this.$router.push({ path: `/allocationManagement/storeTransferOut/add/${data.id}/${data.storeCallOutSn}` })
+      this.$router.push({ name: 'storeTransferOutAdd', params: { id: data.id, sn: data.storeCallOutSn } })
+    },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ name: 'storeTransferOutDetail', params: { sn: row.storeCallOutSn } })
+    },
+    //  新增/编辑
+    handleEdit (row) {
+      this.$router.push({ name: 'storeTransferOutEdit', params: { id: row.id, sn: row.storeCallOutSn } })
     },
     //  删除
     handleDel (row) {
@@ -381,14 +393,6 @@ export default {
         }
       })
     },
-    //  详情
-    handleDetail (row) {
-      this.$router.push({ path: `/allocationManagement/storeTransferOut/detail/${row.storeCallOutSn}` })
-    },
-    //  新增/编辑
-    handleEdit (row) {
-      this.$router.push({ path: `/allocationManagement/storeTransferOut/edit/${row.id}/${row.storeCallOutSn}` })
-    },
     //  调拨类型
     getStoreCallOutTypeAllList () {
       storeCallOutTypeAllList().then(res => {
@@ -399,6 +403,7 @@ export default {
         }
       })
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -413,7 +418,6 @@ export default {
       const b = this.$store.state.app.updateList
       // 是否从首页点击进入
       const isHomeNav = this.getIsHomeNav()[this.$route.name]
-      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name, '店内调出')
 
       // 从首页进入,判断式新建还式待办查询
       if (isHomeNav) {
@@ -440,6 +444,7 @@ export default {
         }
       }
     },
+    // 表格设置高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 273

+ 2 - 6
src/views/allocationManagement/warehouseAllocation/basicInfoModal.vue

@@ -18,14 +18,14 @@
         :wrapper-col="formItemLayout.wrapperCol" >
         <a-form-model-item required label="调出仓库" prop="outWarehouseSn">
           <a-select id="warehouseAllocation-basicInfo-outWarehouseSn" allowClear placeholder="请选择调出仓库" v-model="form.outWarehouseSn" >
-            <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">
+            <a-select-option v-for="(item, index) in warehouseList" :id="'basicInfo-outWarehouseSn-'+item.warehouseSn" :key="index" :value="item.warehouseSn">
               {{ item.name }}
             </a-select-option>
           </a-select>
         </a-form-model-item>
         <a-form-model-item required label="调入仓库" prop="putWarehouseSn">
           <a-select id="warehouseAllocation-basicInfo-putWarehouseSn" allowClear placeholder="请选择调入仓库" v-model="form.putWarehouseSn" >
-            <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">
+            <a-select-option v-for="(item, index) in warehouseList" :id="'basicInfo-putWarehouseSn-'+item.warehouseSn" :key="index" :value="item.warehouseSn">
               {{ item.name }}
             </a-select-option>
           </a-select>
@@ -124,13 +124,9 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
-    },
-    filterOption (input, option) {
-      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
     }
   }
 

+ 5 - 4
src/views/allocationManagement/warehouseAllocation/chooseImportModal.vue

@@ -85,7 +85,7 @@ export default {
       type: Boolean,
       default: false
     },
-    paramsData: {
+    paramsData: { // 参数
       type: Object,
       default: () => {
         return {}
@@ -93,7 +93,6 @@ export default {
     }
   },
   data () {
-    const _this = this
     return {
       isShow: this.openModal, //  是否打开弹框
       nowColumns: [ //  可导入
@@ -113,8 +112,8 @@ export default {
         { title: '调出数量', dataIndex: 'allocationQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '错误原因', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
       ],
-      loadData: [],
-      unLoadData: [],
+      loadData: [], // 正确数据列表
+      unLoadData: [], // 错误数据列表
       loading: false
     }
   },
@@ -125,11 +124,13 @@ export default {
       importProduct(this.paramsData).then(res => {
         this.loading = false
         if (res.status == 200) {
+          // 正确数据
           if (res.data.rightList && res.data.rightList.length > 0) {
             res.data.rightList.map((item, index) => {
               item.no = index + 1
             })
           }
+          // 错误数据
           if (res.data.errorList && res.data.errorList.length > 0) {
             res.data.errorList.map((item, index) => {
               item.no = index + 1

+ 4 - 6
src/views/allocationManagement/warehouseAllocation/detail.vue

@@ -86,7 +86,7 @@ export default {
       spinning: false,
       exportLoading: false, // 导出loading
       warehouse: null, // 基础信息
-      productTotal: null,
+      productTotal: null, // 统计信息
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -123,6 +123,7 @@ export default {
         { 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(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) : '--') } })
@@ -133,18 +134,17 @@ export default {
   methods: {
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/allocationManagement/warehouseAllocation/list' })
+      this.$router.push({ name: 'warehouseAllocationList' })
     },
     //  新增/编辑
     handleEdit () {
-      this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${this.warehouse.id}/${this.warehouse.allocationWarehouseSn}` })
+      this.$router.push({ name: `warehouseAllocationEdit`, params: { id: this.warehouse.id, sn: this.warehouse.allocationWarehouseSn } })
     },
     // 查询基础信息
     getHouse () {
       allocWarehouseDetailSn({ sn: this.outBizSn || this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.warehouse = res.data
-          // this.queryParam.outWarehouseSn = res.data.outWarehouseSn
         } else {
           this.warehouse = null
         }
@@ -163,14 +163,12 @@ export default {
   },
   mounted () {
     if (!this.$store.state.app.isNewTab || this.outBizSn) { // 页签刷新 或 为弹框时调用
-      // this.$refs.table.refresh(true)
       this.getHouse()
     }
   },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
-      // this.$refs.table.refresh(true)
       this.getHouse()
     }
   },

+ 19 - 19
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -47,15 +47,15 @@
                     <a-col :md="6" :sm="24">
                       <a-form-item label="调出仓位" prop="warehouseLocationSn">
                         <a-select id="warehouseAllocationEdit-warehouseLocationSn" placeholder="请选择" allowClear v-model="queryParam.warehouseLocationSn" style="width: 100%;">
-                          <a-select-option v-for="item in warehouseOutLocData" :key="item.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                          <a-select-option v-for="item in warehouseOutLocData" :key="item.warehouseLocationSn" :id="'warehouseLocationSn-'+item.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
                         </a-select>
                       </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="warehouseAllocationList-refresh">查询</a-button>
-                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationList-reset">重置</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 5px">
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehouseAllocationEdit-refresh">查询</a-button>
+                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationEdit-reset">重置</a-button>
+                    <a @click="advanced=!advanced" style="margin-left: 5px" id="warehouseAllocationEdit-advanced">
                       {{ advanced ? '收起' : '展开' }}
                       <a-icon :type="advanced ? 'up' : 'down'"/>
                     </a>
@@ -84,8 +84,8 @@
               <!-- 调入仓位 -->
               <template slot="putWarehouseLocationSn" slot-scope="text, record">
                 <div @dblclick.stop>
-                  <a-select size="small" id="warehouseAllocationEdit-putWarehouseLocationSn" placeholder="请选择" v-model="record.putWarehouseLocationSn" style="width: 100%;">
-                    <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                  <a-select size="small" :id="'edit-putWarehouseLocationSn-'+record.stockDetailSn" placeholder="请选择" v-model="record.putWarehouseLocationSn" style="width: 100%;">
+                    <a-select-option v-for="item in warehousePutLocData" :id="'editsn-'+item.warehouseLocationSn+'-'+record.stockDetailSn" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
                   </a-select>
                 </div>
               </template>
@@ -94,7 +94,7 @@
                 <div @dblclick.stop>
                   <a-input-number
                     size="small"
-                    id="warehouseAllocationEdit-outQty"
+                    :id="'edit-outQty-'+record.stockDetailSn"
                     v-model="record.outQty"
                     :precision="0"
                     :min="1"
@@ -105,7 +105,7 @@
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="warehouseAllocationEdit-add-btn">添加</a-button>
+                <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" :id="'add-'+record.stockDetailSn">添加</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -131,17 +131,17 @@
                     <a-row :gutter="15">
                       <a-col :md="9" :sm="24">
                         <a-form-item label="产品编码" prop="productCode">
-                          <a-input id="warehouseAllocationEdit-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                          <a-input id="choosePc-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
                         </a-form-item>
                       </a-col>
                       <a-col :md="9" :sm="24">
                         <a-form-item label="产品名称" prop="productName">
-                          <a-input id="warehouseAllocationEdit-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                          <a-input id="choosePc-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
                         </a-form-item>
                       </a-col>
                       <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="warehouseAllocationList-refresh">查询</a-button>
-                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="warehouseAllocationList-reset">重置</a-button>
+                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="choosePc-refresh">查询</a-button>
+                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="choosePc-reset">重置</a-button>
                       </a-col>
                     </a-row>
                   </a-form>
@@ -155,14 +155,14 @@
                     size="small"
                     @click="openGuideModal=true"
                     style="margin-right: 5px"
-                    id="chainTransferOutEdit-import-btn">导入产品</a-button>
+                    id="choosePc-import-btn">导入产品</a-button>
                   <a-button
                     size="small"
                     type="danger"
                     style="margin-left: 8px"
                     @click.stop="handleDel('', 'all')"
                     :disabled="chooseLoadDataSource.length==0"
-                    id="warehouseAllocationEdit-del-all-btn">清空列表</a-button>
+                    id="choosePc-del-all-btn">清空列表</a-button>
                 </div>
               </a-col>
             </a-row>
@@ -186,19 +186,19 @@
               <template slot="putWarehouseLocationSn" slot-scope="text, record">
                 <a-select
                   size="small"
-                  id="warehouseAllocationEdit-putWarehouseLocationSn"
+                  :id="'choosePc-putWarehouseLocationSn-'+record.id"
                   @change="chooseWarehouseLocChange(record)"
                   placeholder="请选择"
                   v-model="record.putWarehouseLocationSn"
                   style="width: 100%;">
-                  <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.outWarehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                  <a-select-option v-for="item in warehousePutLocData" :id="'choosePc-putWarehouseLocationSn-'+record.id+'-'+item.warehouseLocationSn" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.outWarehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
                 </a-select>
               </template>
               <!-- 调出数量 -->
               <template slot="outQty" slot-scope="text, record">
                 <a-input-number
                   size="small"
-                  id="warehouseAllocationEdit-outQty"
+                  :id="'choosePc-outQty-'+record.id"
                   v-model="record.outQty"
                   :precision="0"
                   :min="1"
@@ -209,7 +209,7 @@
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="warehouseAllocationEdit-del-btn">删除</a-button>
+                <a-button size="small" type="link" class="button-error" @click="handleDel(record)" :id="'choosePc-del-'+record.id">删除</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -512,7 +512,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/allocationManagement/warehouseAllocation/list' })
+      this.$router.push({ name: 'warehouseAllocationList' })
     },
     // 已选产品 调出数量  blur
     outQtyBlur (val, record) {

+ 5 - 5
src/views/allocationManagement/warehouseAllocation/importGuideModal.vue

@@ -17,7 +17,7 @@
           <ul>
             <li>1)导入的Excel文件中必须包含名为“产品编码”、“调出仓位”、“调入仓位”、“调出数量”的列,且名称必须相同,其他列可自定义,不影响数据导入</li>
             <li>2)如果导入的产品已经存在,则不会导入该行</li>
-            <li><a :href="templUrl"><a-icon type="download" />下载导入模板</a></li>
+            <li><a :href="templUrl" id="importGuide-tpl-link"><a-icon type="download" />下载导入模板</a></li>
           </ul>
         </div>
         <div class="explain-item">
@@ -72,7 +72,7 @@ export default {
       type: Boolean,
       default: false
     },
-    params: {
+    params: { // 参数
       type: Object,
       default: null
     }
@@ -81,12 +81,12 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       openImportModal: false, //  导入
-      attachAction: process.env.VUE_APP_API_BASE_URL + '/upload',
-      paramsData: null,
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/upload', // 接口
+      paramsData: null, // 参数
       uploadParams: {
         savePathType: 'local'
       },
-      templUrl: location.protocol + '//' + location.host + '/templ/仓库调拨产品导入模板.xlsx'
+      templUrl: location.protocol + '//' + location.host + '/templ/仓库调拨产品导入模板.xlsx' // 模板地址
     }
   },
   methods: {

+ 22 - 17
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="warehousingAuditList-time" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -18,7 +18,7 @@
             <a-col :md="6" :sm="24">
               <a-form-item label="调出仓库">
                 <a-select id="warehouseAllocation-basicInfo-outWarehouseSn" allowClear placeholder="请选择调出仓库" v-model="queryParam.outWarehouseSn">
-                  <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                  <a-select-option v-for="(item, index) in warehouseList" :id="'warehouseAllocation-outWarehouseSn-'+item.warehouseSn" :key="index" :value="item.warehouseSn">{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
@@ -26,7 +26,7 @@
               <a-col :md="6" :sm="24">
                 <a-form-item label="调入仓库">
                   <a-select id="warehouseAllocation-basicInfo-putWarehouseSn" allowClear placeholder="请选择调入仓库" v-model="queryParam.putWarehouseSn">
-                    <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                    <a-select-option v-for="(item, index) in warehouseList" :id="'warehouseAllocation-putWarehouseSn-'+item.warehouseSn" :key="index" :value="item.warehouseSn">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-item>
               </a-col>
@@ -35,6 +35,7 @@
                   <v-select
                     v-model="queryParam.state"
                     ref="state"
+                    @change="setIsHomeNav($route.name, null)"
                     id="warehouseAllocationList-state"
                     code="ALLOCATION_WAREHOUSE_STATE"
                     placeholder="请选择业务状态"
@@ -55,7 +56,7 @@
                 class="button-warning"
                 v-if="$hasPermissions('B_allocWarehouseExport')"
                 id="warehouseAllocation-export-btn">导出</a-button>
-              <a @click="advanced = !advanced" style="margin-left: 8px">
+              <a @click="advanced = !advanced" style="margin-left: 8px" id="warehouseAllocation-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'" />
               </a>
@@ -89,7 +90,7 @@
         bordered>
         <!-- 单号 -->
         <template slot="allocationWarehouseNo" slot-scope="text, record">
-          <span class="table-td-link" v-if="$hasPermissions('B_warehouseAllocationDetail')" @click="handleDetail(record)">{{ record.allocationWarehouseNo }}</span>
+          <span class="table-td-link" v-if="$hasPermissions('B_warehouseAllocationDetail')" :id="'warehouseAllocationList-detail-'+record.id" @click="handleDetail(record)">{{ record.allocationWarehouseNo }}</span>
           <span v-else>{{ record.allocationWarehouseNo }}</span>
         </template>
         <!-- 审核 -->
@@ -104,7 +105,8 @@
             type="link"
             class="button-primary"
             @click="handleExamine(record)"
-            id="warehouseAllocationList-examine-btn">
+            :id="'warehouseAllocationList-audit-'+record.id"
+          >
             审核
           </a-button>
           <a-button
@@ -113,7 +115,7 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record,1)"
-            id="warehouseAllocationList-edit-btn">
+            :id="'warehouseAllocationList-edit-'+record.id">
             编辑
           </a-button>
           <a-button
@@ -122,7 +124,7 @@
             type="link"
             class="button-error"
             @click="handleDel(record)"
-            id="warehouseAllocationList-del-btn">
+            :id="'warehouseAllocationList-del-'+record.id">
             删除
           </a-button>
           <span v-if="((record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT')) || (!(record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocWarehouseAudit')) && !(((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')) && $hasPermissions('B_warehouseAllocationEdit')) &&!(((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')) && $hasPermissions('B_warehouseAllocationDel'))) ">--</span>
@@ -152,15 +154,15 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       warehouseList: [], // 仓库列表
-      time: [
+      time: [ // 时间默认值
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
       queryParam: { //  查询条件
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
         outWarehouseSn: undefined, //  调出仓库
         putWarehouseSn: undefined, //  调入仓库
         state: undefined, //  审核状态
@@ -209,6 +211,7 @@ export default {
         { title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(7, 0, { title: '总成本', dataIndex: 'productTotalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
@@ -226,7 +229,7 @@ export default {
         }
       })
     },
-    //  时间  change
+    //  选择时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
@@ -303,19 +306,20 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.allocationWarehouseSn}` })
+      this.$router.push({ name: `warehouseAllocationDetail`, params: { sn: row.allocationWarehouseSn } })
     },
     //  新增/编辑
     handleEdit (row, flag) {
       if (!flag) {
         this.resetData()
       }
-      this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${row.id}/${row.allocationWarehouseSn}` })
+      this.$router.push({ name: `warehouseAllocationEdit`, params: { id: row.id, sn: row.allocationWarehouseSn } })
     },
-    // 导出
+    // 导出仓库调拨列表
     handleExport () {
       const _this = this
       const params = _this.queryParam
+      // 是否导出成本
       params.showCost = _this.$hasPermissions('M_ShowAllCost') ? 1 : 0
       _this.exportLoading = true
       _this.spinning = true
@@ -325,6 +329,7 @@ export default {
         _this.spinning = false
       })
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -338,7 +343,6 @@ export default {
       const b = this.$store.state.app.updateList
       // 是否从首页点击进入
       const isHomeNav = this.getIsHomeNav()[this.$route.name]
-      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
 
       // 从首页进入,判断式新建还式待办查询
       if (isHomeNav) {
@@ -365,6 +369,7 @@ export default {
         }
       }
     },
+    // 表格高度计算
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 273

+ 2 - 2
src/views/basicData/bulkPartsTypeManagement/list.vue

@@ -26,14 +26,14 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record)"
-            id="bulkPartsTypeList-edit-btn">编辑</a-button>
+            :id="'bulkPartsTypeList-edit-'+record.id">编辑</a-button>
           <a-button
             v-if="$hasPermissions('B_basicData_bulkPartsType_del') && record.sysFlag==0"
             size="small"
             type="link"
             class="button-error"
             @click="handleDel(record)"
-            id="bulkPartsTypeList-del-btn"
+            :id="'bulkPartsTypeList-del-'+record.id"
             style="margin: 0 0 0 8px;">删除</a-button>
           <span v-if="!($hasPermissions('B_basicData_bulkPartsType_edit') && record.sysFlag==0) && !($hasPermissions('B_basicData_bulkPartsType_del') && record.sysFlag==0)">--</span>
         </template>

+ 1 - 0
src/views/basicData/customerTypeManagement/editModal.vue

@@ -85,6 +85,7 @@ export default {
     }
   },
   methods: {
+    // 过滤空格
     filterEmpty () {
       let str = this.form.name
       str = str.replace(/\ +/g, '')

+ 2 - 2
src/views/basicData/customerTypeManagement/list.vue

@@ -42,14 +42,14 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record)"
-            id="customerTypeList-edit-btn">编辑</a-button>
+            :id="'customerTypeList-edit-'+record.id">编辑</a-button>
           <a-button
             size="small"
             v-if="$hasPermissions('B_basicData_customerType_del') && record.sysFlag==0"
             type="link"
             class="button-error"
             @click="handleDel(record)"
-            id="customerTypeList-del-btn">删除</a-button>
+            :id="'customerTypeList-del-'+record.id">删除</a-button>
           <span v-if="!($hasPermissions('B_basicData_customerType_edit') && record.sysFlag==0) && !($hasPermissions('B_basicData_customerType_del') && record.sysFlag==0)">--</span>
         </template>
       </s-table>

+ 3 - 2
src/views/basicData/expenseType/editModal.vue

@@ -33,8 +33,8 @@
           </a-form-model-item>
         </a-form-model>
         <div class="btn-cont">
-          <a-button type="primary" id="product-category-edit-modal-save" @click="handleSave">保存</a-button>
-          <a-button id="product-category-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+          <a-button type="primary" id="expenseTypeEdit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="expenseTypeEdit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
         </div>
       </div>
     </a-spin>
@@ -88,6 +88,7 @@ export default {
     }
   },
   methods: {
+    // 过滤空格
     filterEmpty () {
       let str = this.form.name
       str = str.replace(/\ +/g, '')

+ 3 - 3
src/views/basicData/expenseType/list.vue

@@ -28,7 +28,7 @@
             class="button-primary"
             size="small"
             icon="plus"
-            id="expenseType-addSubItem"
+            :id="'expenseType-addSubItem-'+record.id"
             @click="handleAdd(record)">新增子级</a-button>
           <a-button
             v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_edit') && record.sysFlag==0"
@@ -36,7 +36,7 @@
             class="button-primary"
             size="small"
             icon="edit"
-            id="expenseType-edit"
+            :id="'expenseType-edit-'+record.id"
             @click="handleEdit(record)">编辑</a-button>
           <a-button
             v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_del') && record.sysFlag==0"
@@ -44,7 +44,7 @@
             class="button-error"
             size="small"
             icon="delete"
-            id="expenseType-del"
+            :id="'expenseType-del-'+record.id"
             @click="handleDel(record)">删除</a-button>
           <span v-if="!(record.typeLevel<3 && $hasPermissions('B_basicData_expenseType_add')) && !(record.pid != 0 && $hasPermissions('B_basicData_expenseType_edit') && record.sysFlag==0) && !(record.pid != 0 && $hasPermissions('B_basicData_expenseType_del') && record.sysFlag==0)">--</span>
         </template>

+ 8 - 7
src/views/basicData/notificationManage/list.vue

@@ -16,19 +16,19 @@
         bordered>
         <!-- 操作 -->
         <template slot="action1" slot-scope="text, record, index">
-          <a-checkbox :checked="text==1" @change="onChange(0,record)"></a-checkbox>
+          <a-checkbox :id="'ac1-'+record.id" :checked="text==1" @change="onChange(0,record)"></a-checkbox>
         </template>
         <template slot="action2" slot-scope="text, record, index">
-          <a-checkbox :checked="text==1" @change="onChange(1,record)"></a-checkbox>
+          <a-checkbox :id="'ac2-'+record.id" :checked="text==1" @change="onChange(1,record)"></a-checkbox>
         </template>
         <template slot="action3" slot-scope="text, record, index">
-          <a-checkbox :checked="text==1" @change="onChange(2,record)"></a-checkbox>
+          <a-checkbox :id="'ac3-'+record.id" :checked="text==1" @change="onChange(2,record)"></a-checkbox>
         </template>
         <template slot="action4" slot-scope="text, record, index">
-          <a-checkbox :checked="text==1" @change="onChange(3,record)"></a-checkbox>
+          <a-checkbox :id="'ac4-'+record.id" :checked="text==1" @change="onChange(3,record)"></a-checkbox>
         </template>
         <template slot="action5" slot-scope="text, record, index">
-          <a-checkbox :checked="text==1" @change="onChange(4,record)"></a-checkbox>
+          <a-checkbox :id="'ac5-'+record.id" :checked="text==1" @change="onChange(4,record)"></a-checkbox>
         </template>
       </a-table>
     </a-spin>
@@ -57,15 +57,15 @@ export default {
         { title: '货架异常提醒', dataIndex: 'shelfWarnFlag', scopedSlots: { customRender: 'action4' }, width: '10%', align: 'center' },
         { title: '全选', dataIndex: 'allFlag', scopedSlots: { customRender: 'action5' }, width: '10%', align: 'center' }
       ],
-      loadData: [],
+      loadData: [], // 列表数据
       openModal: false, //  新增编辑客户类型  弹框
       itemId: '', //  当前id
       nowData: null //  当前记录数据
     }
   },
   methods: {
+    // 选择
     onChange (index, record) {
-      console.log(index, record)
       const key = ['tempOrderFlag', 'shelfReplenishFlag', 'shelfOrderFlag', 'shelfWarnFlag', 'allFlag']
       record[key[index]] = record[key[index]] ? 0 : 1
       // 全选
@@ -103,6 +103,7 @@ export default {
         this.getData()
       })
     },
+    // 获取列表数据
     getData () {
       this.spinning = true
       noticeUserBizQuery().then(res => {

+ 1 - 0
src/views/basicData/storeTransferOutTypeManagement/editModal.vue

@@ -85,6 +85,7 @@ export default {
     }
   },
   methods: {
+    // 过滤空格
     filterEmpty () {
       let str = this.form.name
       str = str.replace(/\ +/g, '')

+ 2 - 2
src/views/basicData/storeTransferOutTypeManagement/list.vue

@@ -31,14 +31,14 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record)"
-            id="storeTransferOutTypeList-edit-btn">编辑</a-button>
+            :id="'storeTransferOutTypeList-edit-'+record.id">编辑</a-button>
           <a-button
             v-if="$hasPermissions('B_basicData_storeTransferOutType_del') && record.sysFlag==0 "
             size="small"
             type="link"
             class="button-error"
             @click="handleDel(record)"
-            id="storeTransferOutTypeList-del-btn">删除</a-button>
+            :id="'storeTransferOutTypeList-del-'+record.id">删除</a-button>
           <span v-if="!($hasPermissions('B_basicData_storeTransferOutType_edit') && record.sysFlag==0) && !($hasPermissions('B_basicData_storeTransferOutType_del') && record.sysFlag==0)">--</span>
         </template>
       </s-table>

+ 12 - 12
src/views/basicData/systemSettings/index.vue

@@ -7,11 +7,11 @@
             产品报价,箭冠产品优先获取自定义车主价和终端价
           </a-col>
           <a-col class="gutter-row" :span="12">
-            <a-radio-group v-model="priceValue" @change="handleQty">
-              <a-radio :value="1">
+            <a-radio-group v-model="priceValue" @change="handleQty" id="productPrice-enable">
+              <a-radio :value="1" id="productPrice-enable1">
                 启用
               </a-radio>
-              <a-radio :value="2">
+              <a-radio :value="2" id="productPrice-enable2">
                 禁用
               </a-radio>
             </a-radio-group>
@@ -25,11 +25,11 @@
             销售下单时,是否显示产品库存为0的产品信息
           </a-col>
           <a-col class="gutter-row" :span="12">
-            <a-radio-group v-model="qtyValue" @change="handleQty">
-              <a-radio :value="1">
+            <a-radio-group v-model="qtyValue" @change="handleQty" id="productPrice-qty-show">
+              <a-radio :value="1" id="productPrice-show-1">
                 显示
               </a-radio>
-              <a-radio :value="2">
+              <a-radio :value="2" id="productPrice-show-2">
                 隐藏
               </a-radio>
             </a-radio-group>
@@ -41,11 +41,11 @@
             销售下单时,是否显示废品仓的产品信息
           </a-col>
           <a-col class="gutter-row" :span="12">
-            <a-radio-group v-model="wasteInfoValue" @change="handleWasteInfo">
-              <a-radio :value="1">
+            <a-radio-group v-model="wasteInfoValue" @change="handleWasteInfo" id="productPrice-show-war">
+              <a-radio :value="1" id="productPrice-show-war1">
                 显示
               </a-radio>
-              <a-radio :value="2">
+              <a-radio :value="2" id="productPrice-show-war2">
                 隐藏
               </a-radio>
             </a-radio-group>
@@ -57,11 +57,11 @@
             库存预警,是否包含废品库数量
           </a-col>
           <a-col class="gutter-row" :span="12">
-            <a-radio-group v-model="wasteNumValue" @change="handleWasteNum">
-              <a-radio :value="1">
+            <a-radio-group v-model="wasteNumValue" @change="handleWasteNum" id="productPrice-show-warqty">
+              <a-radio :value="1" id="productPrice-show-warqty1">
                 包含
               </a-radio>
-              <a-radio :value="2">
+              <a-radio :value="2" id="productPrice-show-warqty2">
                 不包含
               </a-radio>
             </a-radio-group>

+ 5 - 3
src/views/bulkManagement/bulkImport/chooseImportModal.vue

@@ -86,8 +86,8 @@ export default {
     const _this = this
     return {
       isShow: this.openModal, //  是否打开弹框
-      openTipsModal: false,
-      modalHtml: '',
+      openTipsModal: false, // 提示弹框
+      modalHtml: '', // 提示弹框标题
       spinning: false,
       exportLoading: false, // 导出loading
       // 加载数据方法 必须为 Promise 对象
@@ -112,7 +112,7 @@ export default {
         })
       },
       isAllError: false, // 是否全部错误
-      listData: [],
+      listData: [], // 列表数据
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 30, align: 'center' },
@@ -134,6 +134,7 @@ export default {
     }
   },
   methods: {
+    // 重置
     resetSearchForm () {
       this.$refs.table.clearTable() //  清空列表数据
       this.uploadData = null //  清空上传数据
@@ -156,6 +157,7 @@ export default {
         }
       })
     },
+    // 显示导入成功弹框
     showSuccessModal (data) {
       if (data) {
         this.openTipsModal = true

+ 3 - 3
src/views/bulkManagement/bulkImport/importGuideModal.vue

@@ -20,7 +20,7 @@
             <li>3) 供应商/产品品牌为必填项且不能包含箭冠、箭牌、冠牌等文字,产品名称为必填项。</li>
             <li>4) 支持上传文件格式:.xls、.xlsx。</li>
             <li>
-              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+              <a :href="filePath" id="importGuide-tpl-link" style="margin: 5px 0 0;display: block;">
                 <a-icon type="download" style="padding-right: 5px;" />下载导入模板
               </a>
             </li>
@@ -90,10 +90,10 @@ export default {
       openImportModal: false, //  导入
       attachAction: process.env.VUE_APP_API_BASE_URL + '/stockImport/importForSpareParts',
       paramsData: null,
-      uploadParams: {
+      uploadParams: { // 参数
         savePathType: 'local'
       },
-      filePath: location.protocol + '//' + location.host + '/templ/散件产品导入模板.xlsx'
+      filePath: location.protocol + '//' + location.host + '/templ/散件产品导入模板.xlsx' // 模板文件地址
     }
   },
   methods: {

+ 13 - 11
src/views/bulkManagement/bulkImport/list.vue

@@ -16,7 +16,7 @@
           <a-row :gutter="15">
             <a-col :md="8" :sm="24">
               <a-form-model-item label="导入时间" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="inventoryImport-time" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -59,7 +59,7 @@
         bordered>
         <!-- 导入单号 -->
         <template slot="stockImportNo" slot-scope="text, record">
-          <span v-if="$hasPermissions('B_bulkImportDeail')" class="table-td-link" @click="handleDetail(record)">{{ record.stockImportNo }}</span>
+          <span :id="'inventoryImport-detail-'+record.stockImportSn" v-if="$hasPermissions('B_bulkImportDeail')" class="table-td-link" @click="handleDetail(record)">{{ record.stockImportNo }}</span>
           <span v-else>{{ record.stockImportNo||'--' }}</span>
         </template>
       </s-table>
@@ -96,25 +96,25 @@ export default {
       spinning: false,
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       queryParam: { //  查询条件
-        time: [
+        time: [ // 时间默认值
           getDate.getThreeMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: '',
-        endDate: '',
-        stockImportNo: undefined,
-        importType: 'SPARE_PARTS_IMPORT'
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        stockImportNo: undefined, // 导入单号
+        importType: 'SPARE_PARTS_IMPORT'// 导入类型
       },
-      openGuideModal: false,
-      detailSn: undefined,
+      openGuideModal: false, // 打开导入弹框
+      detailSn: undefined, // 详情sn
       rules: {
         'time': [{ required: true, message: '请选择导入时间', trigger: 'change' }]
       },
       openBulkImportDetail: false, // 明细弹窗
       disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
+      exportLoading: false, // 导入按钮loading
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -212,10 +212,12 @@ export default {
       this.$refs.table.clearTable()
       this.handleSearch()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 276
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 15 - 8
src/views/bulkManagement/bulkReturnGoods/basicInfoModal.vue

@@ -21,18 +21,25 @@
             placeholder="请输入名称查询,如果没有请点击 '+' 新增"
             allowClear
             v-model="form.supplierSn"
+            id="bulkReturnGoods-supplierSn"
             :showSearch="true"
             option-filter-prop="children"
             :filter-option="filterOption"
             style="width: 80%;">
-            <a-select-option v-for="item in supplierList" :key="item.supplierSn" :pyCode="item.pyCode" :value="item.supplierSn" :disabled="item.enabledFlag==0">{{ item.supplierName }}</a-select-option>
+            <a-select-option
+              v-for="item in supplierList"
+              :id="'supplierSn-'+item.supplierSn"
+              :key="item.supplierSn"
+              :pyCode="item.pyCode"
+              :value="item.supplierSn"
+              :disabled="item.enabledFlag==0">{{ item.supplierName }}</a-select-option>
           </a-select>
           <a-button icon="plus" size="small" @click="openSupplierModal=true" id="bulkWarehousingOrder-basicInfo-add-btn" style="margin-left: 10px;"></a-button>
         </a-form-model-item>
         <a-form-model-item label="是否抓单" prop="isGrab">
-          <a-radio-group v-model="form.isGrab">
-            <a-radio value="1">是</a-radio>
-            <a-radio value="0">否</a-radio>
+          <a-radio-group v-model="form.isGrab" id="bulkReturnGoods-isGrab">
+            <a-radio value="1" id="isGrab-1">是</a-radio>
+            <a-radio value="0" id="isGrab-0">否</a-radio>
           </a-radio-group>
         </a-form-model-item>
         <a-form-model-item label="备注" prop="remark">
@@ -75,9 +82,9 @@ export default {
         wrapperCol: { span: 18 }
       },
       form: {
-        supplierSn: undefined,
-        isGrab: '1',
-        remark: ''
+        supplierSn: undefined, // 供应商sn
+        isGrab: '1', // 是否抓单,默认抓单
+        remark: '' // 备注
       },
       rules: {
         supplierSn: [ { required: true, message: '请选择供应商', trigger: 'change' } ],
@@ -108,11 +115,11 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
     },
+    // 供应商名称筛选
     filterOption (input, option) {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
       option.data.attrs.pyCode.toLowerCase().indexOf(input.toLowerCase()) >= 0

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

@@ -148,7 +148,7 @@ export default {
         this.isShow = false
       }
     },
-    // 导出
+    // 导出错误项
     handleError () {
       const _this = this
       if (_this.paramsData.errorList.length < 1) {

+ 5 - 5
src/views/bulkManagement/bulkReturnGoods/detailModal.vue

@@ -61,15 +61,15 @@ export default {
   components: { STable, Print },
   mixins: [commonMixin],
   props: {
-    openModal: { //  弹框显示状态
+    openModal: { // 弹框显示状态
       type: Boolean,
       default: false
     },
-    itemSn: {
+    itemSn: { // 当前数据sn
       type: String || Number,
       default: ''
     },
-    isGrab: {
+    isGrab: { // 是否抓单
       type: String || Number,
       default: ''
     }
@@ -78,7 +78,7 @@ export default {
     return {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
-      dataSource: [],
+      dataSource: [], // 列表数据
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -101,7 +101,7 @@ export default {
         })
       },
       basicInfoData: null, //  基本信息
-      productTotal: null
+      productTotal: null // 合计数据
     }
   },
   computed: {

+ 28 - 25
src/views/bulkManagement/bulkReturnGoods/edit.vue

@@ -67,7 +67,7 @@
             <div @dblclick.stop>
               <a-input-number
                 size="small"
-                id="bulkReturnGoodsEdit-purchaseCost"
+                :id="'bulkReturnGoodsEdit-purchaseCost-'+record.stockDetailSn"
                 v-model="record.purchaseCost"
                 :precision="2"
                 :min="0"
@@ -81,7 +81,7 @@
             <div @dblclick.stop>
               <a-input-number
                 size="small"
-                id="bulkReturnGoodsEdit-purchaseQty"
+                :id="'bulkReturnGoodsEdit-purchaseQty-'+record.stockDetailSn"
                 v-model="record.purchaseQty"
                 :precision="0"
                 :min="1"
@@ -98,7 +98,7 @@
               type="link"
               class="button-primary"
               @click="handleAdd(record)"
-              id="bulkReturnGoodsEdit-add-btn">添加</a-button>
+              :id="'bulkReturnGoodsEdit-add-'+record.stockDetailSn">添加</a-button>
             <span v-else>--</span>
           </template>
         </s-table>
@@ -121,17 +121,17 @@
                 <a-row :gutter="15">
                   <a-col :md="9" :sm="24">
                     <a-form-item label="产品编码" prop="productCode">
-                      <a-input id="bulkReturnGoodsEdit-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                      <a-input id="chooseTable-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="9" :sm="24">
                     <a-form-item label="产品名称" prop="productName">
-                      <a-input id="bulkReturnGoodsEdit-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                      <a-input id="chooseTable-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="bulkReturnGoodsEdit-refresh">查询</a-button>
-                    <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="bulkReturnGoodsEdit-reset">重置</a-button>
+                    <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="chooseTable-refresh">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="chooseTable-reset">重置</a-button>
                   </a-col>
                 </a-row>
               </a-form>
@@ -142,12 +142,12 @@
               type="default"
               @click="openGuideModal=true"
               style="margin-right:5px;"
-              id="bulkReturnGoodsEdit-import">导入产品</a-button>
+              id="chooseTable-import">导入产品</a-button>
             <a-button
               class="button-error"
               type="primary"
               @click="bulkReturnGoodsDelAll"
-              id="bulkReturnGoodsEdit-clear"
+              id="chooseTable-clearall"
               :loading="delLoading"
               ghost>清空列表 </a-button>
           </a-col>
@@ -167,7 +167,7 @@
           <template slot="purchaseCost" slot-scope="text, record">
             <a-input-number
               size="small"
-              id="bulkReturnGoodsEdit-purchaseCost"
+              :id="'chooseTable-purchaseCost-'+record.id"
               v-model="record.purchaseCost"
               :precision="2"
               :min="0"
@@ -180,7 +180,7 @@
           <template slot="purchaseQty" slot-scope="text, record">
             <a-input-number
               size="small"
-              id="bulkReturnGoodsEdit-purchaseQty"
+              :id="'chooseTable-purchaseQty-'+record.id"
               v-model="record.purchaseQty"
               :precision="0"
               :min="1"
@@ -191,7 +191,7 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="bulkReturnGoodsEdit-del-btn">删除</a-button>
+            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" :id="'chooseTable-del-'+record.id">删除</a-button>
           </template>
         </s-table>
       </a-card>
@@ -237,14 +237,15 @@ export default {
     const _this = this
     return {
       spinning: false,
-      openGuideModal: false,
+      openGuideModal: false, // 导入产品弹窗
+      // 查询参数
       queryParam: {
-        productCode: '',
-        productName: '',
-        warehouseSn: undefined
+        productCode: '', // 产品编码
+        productName: '', // 产品名称
+        warehouseSn: undefined // 仓库sn
       },
       disabled: false, //  查询、重置按钮是否可操作
-      dataSource: [],
+      dataSource: [], // 表格数据
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -273,10 +274,10 @@ export default {
           return data
         })
       },
-      chooseDisabled: false,
+      chooseDisabled: false, // 禁用按钮
       chooseQueryParam: {
-        productCode: '',
-        productName: ''
+        productCode: '', // 产品编码
+        productName: ''// 产品名称
       },
       // 表头
       chooseColumns: [
@@ -309,10 +310,10 @@ export default {
           return data
         })
       },
-      localDataSource: [],
+      localDataSource: [], // 已选产品数据
       productTotal: null, //  合计
       warehouseList: [], // 仓库列表
-      delLoading: false
+      delLoading: false // 按钮laoding
     }
   },
   methods: {
@@ -478,14 +479,14 @@ export default {
         }
       })
     },
-    // 已选产品 单价  blur
+    // 已选产品 单价修改  blur
     purchaseCostBlur (val, record) {
       //  光标移出,值发生改变再调用编辑接口
       if (val != record.purchaseCostBackups) {
         this.handleAdd(record, 'edit')
       }
     },
-    // 已选产品 数量  blur
+    // 已选产品 数量修改  blur
     purchaseQtyBlur (val, record) {
       if (val != record.purchaseQtyBackups) {
         this.handleAdd(record, 'edit')
@@ -493,7 +494,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/bulkManagement/bulkReturnGoods/list' })
+      this.$router.push({ name: 'bulkReturnGoodsList' })
     },
     // 双击快速添加
     handleClickRow (record) {
@@ -509,11 +510,13 @@ export default {
         }
       })
     },
+    // 仓库筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    // 页面初始化
     initPage () {
       this.getWarehouse()
       this.resetSearchForm()

+ 24 - 31
src/views/bulkManagement/bulkReturnGoods/grabEdit.vue

@@ -57,7 +57,7 @@
             <div @dblclick.stop>
               <a-input-number
                 size="small"
-                id="bulkReturnGoodsEdit-purchaseCost"
+                :id="'bulkReturnGoodsEdit-purchaseCost-'+record.id"
                 v-model="record.purchaseCost"
                 :precision="2"
                 :min="0"
@@ -71,7 +71,7 @@
             <div @dblclick.stop>
               <a-input-number
                 size="small"
-                id="bulkReturnGoodsEdit-purchaseQty"
+                :id="'bulkReturnGoodsEdit-qty-'+record.id"
                 v-model="record.purchaseQty"
                 :precision="0"
                 :min="1"
@@ -104,17 +104,17 @@
                 <a-row :gutter="15">
                   <a-col :md="9" :sm="24">
                     <a-form-item label="产品编码" prop="productCode">
-                      <a-input id="bulkReturnGoodsEdit-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                      <a-input id="chooseTable-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="9" :sm="24">
                     <a-form-item label="产品名称" prop="productName">
-                      <a-input id="bulkReturnGoodsEdit-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                      <a-input id="chooseTable-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="bulkReturnGoodsEdit-refresh">查询</a-button>
-                    <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="bulkReturnGoodsEdit-reset">重置</a-button>
+                    <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="chooseTable-refresh">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="chooseTable-reset">重置</a-button>
                   </a-col>
                 </a-row>
               </a-form>
@@ -125,6 +125,7 @@
               class="button-error"
               type="primary"
               @click="bulkReturnGoodsDelAll"
+              id="chooseTable-clearAll"
               :loading="delLoading"
               ghost>清空列表 </a-button>
           </a-col>
@@ -144,7 +145,7 @@
           <template slot="purchaseCost" slot-scope="text, record">
             <a-input-number
               size="small"
-              id="bulkReturnGoodsEdit-purchaseCost"
+              :id="'chooseTable-purchaseCost-'+record.id"
               v-model="record.purchaseCost"
               :precision="2"
               :min="0"
@@ -157,7 +158,7 @@
           <template slot="purchaseQty" slot-scope="text, record">
             <a-input-number
               size="small"
-              id="bulkReturnGoodsEdit-purchaseQty"
+              :id="'chooseTable-purchaseQty-'+record.id"
               v-model="record.purchaseQty"
               :precision="0"
               :min="1"
@@ -168,7 +169,7 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="bulkReturnGoodsEdit-del-btn">删除</a-button>
+            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" :id="'chooseTable-del-'+record.id">删除</a-button>
           </template>
         </s-table>
       </a-card>
@@ -211,12 +212,12 @@ export default {
     return {
       spinning: false,
       queryParam: {
-        productCode: '',
-        productName: '',
-        sparePartsPurchaseNo: ''
+        productCode: '', // 产品编码
+        productName: '', // 产品名称
+        sparePartsPurchaseNo: ''// 散件入库单号
       },
       disabled: false, //  查询、重置按钮是否可操作
-      dataSource: [],
+      dataSource: [], // 产品列表数据
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -249,10 +250,10 @@ export default {
           return data
         })
       },
-      chooseDisabled: false,
+      chooseDisabled: false, // 已选产品按钮禁用
       chooseQueryParam: {
-        productCode: '',
-        productName: ''
+        productCode: '', // 产品编码
+        productName: ''// 产品名称
       },
       // 表头
       chooseColumns: [
@@ -283,14 +284,14 @@ export default {
           return data
         })
       },
-      localDataSource: [],
+      localDataSource: [], // 已选列表数据
       productTotal: null, //  合计
       warehouseList: [], // 仓库列表
-      delLoading: false
+      delLoading: false // 删除按钮loading
     }
   },
   methods: {
-    // 打印预览/快捷打印
+    // 打印预览/快捷打印、导出
     handlePrint (type, printerType) {
       const _this = this
       _this.spinning = true
@@ -442,14 +443,14 @@ export default {
         }
       })
     },
-    // 已选产品 单价  blur
+    // 已选产品 单价修改  blur
     purchaseCostBlur (val, record) {
       //  光标移出,值发生改变再调用编辑接口
       if (val != record.purchaseCostBackups) {
         this.handleAdd(record, 'edit')
       }
     },
-    // 已选产品 数量  blur
+    // 已选产品 数量修改  blur
     purchaseQtyBlur (val, record) {
       if (val != record.purchaseQtyBackups) {
         this.handleAdd(record, 'edit')
@@ -457,11 +458,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/bulkManagement/bulkReturnGoods/list' })
-    },
-    //  导入明细
-    handleImport () {
-      console.log(333)
+      this.$router.push({ name: 'bulkReturnGoodsList' })
     },
     // 双击快速添加
     handleClickRow (record) {
@@ -477,11 +474,7 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
+    // 初始化页面
     initPage () {
       this.getWarehouse()
       this.resetSearchForm()

+ 43 - 37
src/views/bulkManagement/bulkReturnGoods/list.vue

@@ -7,17 +7,17 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="bulkReturnGoodsList-time" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="审核时间">
-                <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
+                <rangeDate id="bulkReturnGoodsList-auditTime" ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="出库时间">
-                <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
+                <rangeDate id="bulkReturnGoodsList-outWareTime" ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -42,7 +42,13 @@
               </a-col>
               <a-col :md="3" :sm="24">
                 <a-form-item label="业务状态">
-                  <v-select code="SPARE_PARTS_RETURN" id="bulkReturnGoodsList-state" v-model="queryParam.state" allowClear placeholder="请选择"></v-select>
+                  <v-select
+                    code="SPARE_PARTS_RETURN"
+                    id="bulkReturnGoodsList-state"
+                    @change="setIsHomeNav($route.name, null)"
+                    v-model="queryParam.state"
+                    allowClear
+                    placeholder="请选择"></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="3" :sm="24">
@@ -54,7 +60,7 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkReturnGoodsList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="bulkReturnGoodsList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
+              <a @click="advanced=!advanced" style="margin-left: 8px" id="bulkReturnGoodsList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -80,7 +86,7 @@
         bordered>
         <!-- 散件退货单号 -->
         <template slot="sparePartsReturnNo" slot-scope="text, record">
-          <span class="table-td-link" v-if="$hasPermissions('B_bulkReturnGoodsDetail')" @click="handleDetail(record)">{{ record.sparePartsReturnNo }}</span>
+          <span class="table-td-link" :id="'bulkReturnGoodsList-detail-'+record.id" v-if="$hasPermissions('B_bulkReturnGoodsDetail')" @click="handleDetail(record)">{{ record.sparePartsReturnNo }}</span>
           <span v-else>{{ record.sparePartsReturnNo }}</span>
         </template>
         <!-- 审核 -->
@@ -104,28 +110,28 @@
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_bulkReturnGoodsEdit')"
             @click="handleEdit(record)"
             class="button-primary"
-            id="bulkReturnGoodsList-edit-btn">编辑</a-button>
+            :id="'bulkReturnGoodsList-edit-'+record.id">编辑</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_OUT_WAREHOUSE' && $hasPermissions('B_bulkReturnGoodsOutStock')"
             @click="handleWarehouse(record)"
             class="button-primary"
-            id="bulkReturnGoodsList-warehouse-btn">出库</a-button>
+            :id="'bulkReturnGoodsList-out-'+record.id">出库</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_bulkReturnGoodsAudit')"
             @click="handleEexamine(record)"
             class="button-primary"
-            id="bulkReturnGoodsList-warehouse-btn">审核</a-button>
+            :id="'bulkReturnGoodsList-audit-'+record.id">审核</a-button>
           <a-button
             size="small"
             type="link"
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_bulkReturnGoodsDel')"
             @click="handleDel(record)"
             class="button-error"
-            id="bulkReturnGoodsList-del-btn">删除</a-button>
+            :id="'bulkReturnGoodsList-del-'+record.id">删除</a-button>
           <span v-if="!((record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && ($hasPermissions('B_bulkReturnGoodsEdit') || $hasPermissions('B_bulkReturnGoodsDel'))) && !(record.state == 'WAIT_OUT_WAREHOUSE' && $hasPermissions('B_bulkReturnGoodsOutStock')) && !(record.state == 'WAIT_AUDIT' && $hasPermissions('B_bulkReturnGoodsAudit'))">--</span>
         </template>
       </s-table>
@@ -160,24 +166,24 @@ export default {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
-      time: [
+      time: [ // 创建时间默认值
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
-      auditTime: [],
-      outWareTime: [],
+      auditTime: [], // 审核时间
+      outWareTime: [], // 出库时间
       queryParam: { //  查询条件
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        auditBeginDate: '',
-        auditEndDate: '',
-        outWarehouseBeginDate: '',
-        outWarehouseEndDate: '',
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
+        auditBeginDate: '', // 审核开始时间
+        auditEndDate: '', // 审核结束时间
+        outWarehouseBeginDate: '', // 出库开始时间
+        outWarehouseEndDate: '', // 出库结束时间
         sparePartsReturnNo: '', //  散件退货单号
         supplierSn: undefined, //  供应商
-        isGrab: undefined,
-        settleState: undefined,
-        state: undefined
+        isGrab: undefined, // 是否抓单
+        settleState: undefined, // 财务状态
+        state: undefined// 业务状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
@@ -216,35 +222,31 @@ export default {
         })
       },
       openModal: false, // 基本信息弹框是否显示
-      openDetailModal: false,
-      itemSn: null,
-      isGrab: null,
-      visibleAudit: false,
-      auditInfo: null,
-      spinningAudit: false
+      openDetailModal: false, // 详情弹框
+      itemSn: null, // 当前操作sn
+      isGrab: null, // 是否抓单
+      visibleAudit: false, // 审核弹框
+      auditInfo: null, // 审核信息
+      spinningAudit: false // 审核loading
     }
   },
   methods: {
-    //  时间  change
+    //  创建时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
+    // 审核时间
     auditDateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
+    // 出库时间
     outWareDateChange (date) {
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
-        option.data.attrs.pyCode.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
-    //  重置
+    // 重置表单
     resetSearchForm () {
       this.resetData()
       this.$refs.table.refresh(true)
@@ -332,11 +334,12 @@ export default {
         }
       })
     },
-    //  审核
+    //  打开审核弹框
     handleEexamine (row) {
       this.auditInfo = row
       this.visibleAudit = true
     },
+    // 提交审核
     auditOrder (billStatus) {
       this.spinningAudit = true
       sparePartsRetAudit({
@@ -354,11 +357,13 @@ export default {
         }
       })
     },
+    // 详情弹框关闭
     handleDetailClose () {
       this.itemSn = null
       this.isGrab = null
       this.openDetailModal = false
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -398,6 +403,7 @@ export default {
         }
       }
     },
+    // 表格高度设置
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235

+ 10 - 3
src/views/bulkManagement/bulkWarehousingOrder/basicInfoModal.vue

@@ -24,14 +24,21 @@
             :showSearch="true"
             option-filter-prop="children"
             :filter-option="filterOption"
+            id="bulkWarehousingOrder-supplierSn"
             style="width: 80%;">
-            <a-select-option v-for="item in supplierList" :key="item.supplierSn" :pyCode="item.pyCode" :value="item.supplierSn" :disabled="item.enabledFlag==0">{{ item.supplierName }}</a-select-option>
+            <a-select-option
+              v-for="item in supplierList"
+              :id="'supplierSn-'+item.supplierSn"
+              :key="item.supplierSn"
+              :pyCode="item.pyCode"
+              :value="item.supplierSn"
+              :disabled="item.enabledFlag==0">{{ item.supplierName }}</a-select-option>
           </a-select>
           <a-button icon="plus" size="small" @click="openSupplierModal=true" id="bulkWarehousingOrder-basicInfo-add-btn" style="margin-left: 10px;"></a-button>
         </a-form-model-item>
         <a-form-model-item label="散件入库类型" prop="sparePartsType">
           <a-select id="bulkWarehousingOrder-basicInfo-sparePartsType" placeholder="请选择散件入库类型" allowClear v-model="form.sparePartsType">
-            <a-select-option v-for="item in sparePartsPutTypeList" :key="item.sparePartsPutTypeSn" :value="item.sparePartsPutTypeSn">{{ item.name }}</a-select-option>
+            <a-select-option v-for="item in sparePartsPutTypeList" :id="'sn-'+item.sparePartsPutTypeSn" :key="item.sparePartsPutTypeSn" :value="item.sparePartsPutTypeSn">{{ item.name }}</a-select-option>
           </a-select>
         </a-form-model-item>
         <a-form-model-item label="备注" prop="remarks">
@@ -117,7 +124,6 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -127,6 +133,7 @@ export default {
       //  获取供应商数据列表,并赋值
       this.getSupplierList('val')
     },
+    // 供应商名称筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||

+ 8 - 5
src/views/bulkManagement/bulkWarehousingOrder/chooseImportModal.vue

@@ -15,18 +15,18 @@
           可导入数据{{ loadData.length }}条
           <div v-if="disableProduct.length">
             ,其中<span style="color: red;">{{ disableProduct.length }}个禁用产品</span>,请确认已禁用的产品是否导入?
-            <a-radio-group v-model="importDisabled">
-              <a-radio :value="1">
+            <a-radio-group v-model="importDisabled" id="importDisabled">
+              <a-radio :value="1" id="importDisabled-1">
                 导入
               </a-radio>
-              <a-radio :value="0">
+              <a-radio :value="0" id="importDisabled-0">
                 不导入
               </a-radio>
             </a-radio-group>
           </div>
         </div>
         <div v-if="disableProduct.length">
-          <a-checkbox v-model="showDisable">
+          <a-checkbox v-model="showDisable" id="showDisable">
             仅显示已禁用产品
           </a-checkbox>
         </div>
@@ -154,6 +154,7 @@ export default {
     disableProduct () {
       return this.rightData.filter(item => item.productEnableFlag == 0)
     },
+    // 过滤列表数据
     loadData () {
       return this.showDisable ? this.rightData.filter(item => item.productEnableFlag == 0) : this.rightData
     }
@@ -162,10 +163,12 @@ export default {
     getData () {
       const paramsData = JSON.parse(JSON.stringify(this.paramsData))
       this.rightData = paramsData.okList || []
+      // 正确数据
       this.rightData.map((item, index) => {
         item.no = index + 1
         item.sparePartsPurchaseSn = paramsData.sparePartsPurchaseSn
       })
+      // 不可导入数据
       this.unLoadData = paramsData.errorList || []
       this.unLoadData.map((item, index) => {
         item.no = index + 1
@@ -191,7 +194,7 @@ export default {
         }
       }
     },
-    // 导出
+    // 导出错误项
     handleError () {
       const _this = this
       if (_this.paramsData.errorList.length < 1) {

+ 4 - 20
src/views/bulkManagement/bulkWarehousingOrder/detail.vue

@@ -74,23 +74,6 @@
           </a-collapse-panel>
         </a-collapse>
       </a-card>
-      <!-- 单据记录  二期 -->
-      <!-- <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="单据记录">
-            <a-timeline class="timeline-box">
-              <a-timeline-item>2021-02-01 15:22:38   王凯   审核通过</a-timeline-item>
-              <a-timeline-item>
-                <p>2021-02-01 15:22:38   王凯   审核通过</p>
-                <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
-                <p class="auxiliary-txt">产品编号JA-11076P的采购数量,由【10】修改为【5】</p>
-              </a-timeline-item>
-              <a-timeline-item>Technical testing 2015-09-01</a-timeline-item>
-              <a-timeline-item>Network problems being solved 2015-09-01</a-timeline-item>
-            </a-timeline>
-          </a-collapse-panel>
-        </a-collapse>
-      </a-card> -->
     </a-spin>
   </div>
 </template>
@@ -149,12 +132,13 @@ export default {
           return data
         })
       },
-      localDataSource: [],
+      localDataSource: [], // 列表原始数据
       basicInfoData: null, //  基本信息
       productTotal: null //  合计
     }
   },
   computed: {
+    // 是否可编辑
     isEdit () {
       return this.basicInfoData && this.basicInfoData.state != 'FINISH' && this.$hasPermissions('B_bulkWarehousingOrder_edit')
     }
@@ -162,7 +146,7 @@ export default {
   methods: {
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/bulkManagement/bulkWarehousingOrder/list' })
+      this.$router.push({ name: 'bulkWarehousingOrderList' })
     },
     // 打印预览/快捷打印
     handlePrint (type, printerType) {
@@ -197,7 +181,7 @@ export default {
     },
     //  编辑
     handleEdit () {
-      this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/edit/${this.basicInfoData.id}/${this.basicInfoData.sparePartsPurchaseSn}/${this.basicInfoData.supplierSn}` })
+      this.$router.push({ name: 'bulkWarehousingOrderEdit', params: { id: this.basicInfoData.id, sn: this.basicInfoData.sparePartsPurchaseSn, supplierSn: this.basicInfoData.supplierSn } })
     }
   },
   mounted () {

+ 33 - 29
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -66,7 +66,7 @@
                     <template v-if="advanced">
                       <a-col :md="6" :sm="24">
                         <a-form-item label="产品分类">
-                          <ProductType id="productInfoList-productType" @change="changeProductType" v-model="productType"></ProductType>
+                          <ProductType id="bulkWarehousingOrderEdit-productType" @change="changeProductType" v-model="productType"></ProductType>
                         </a-form-item>
                       </a-col>
                       <a-col :md="6" :sm="24">
@@ -78,7 +78,7 @@
                     <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                       <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
                       <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
-                      <a @click="advanced=!advanced" style="margin:0 30px 0 10px">
+                      <a @click="advanced=!advanced" style="margin:0 30px 0 10px" id="bulkWarehousingOrderEdit-advanced">
                         {{ advanced ? '收起' : '展开' }}
                         <a-icon :type="advanced ? 'up' : 'down'"/>
                       </a>
@@ -103,7 +103,7 @@
                   <div @dblclick.stop>
                     <a-input-number
                       size="small"
-                      id="bulkWarehousingOrderEdit-putCost"
+                      :id="'bulkWarehousingOrderEdit-putCost-'+record.id"
                       v-model="record.putCost"
                       :precision="2"
                       :min="0"
@@ -119,7 +119,7 @@
                     <a-input-number
                       size="small"
                       @dblclick.stop
-                      id="bulkWarehousingOrderEdit-putQty"
+                      :id="'bulkWarehousingOrderEdit-putQty-'+record.id"
                       v-model="record.putQty"
                       :precision="0"
                       :min="1"
@@ -139,7 +139,7 @@
                       :allowClear="false"
                       :options="warehouseCascadeData"
                       :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-                      id="bulkWarehousingOrderEdit-warehouseCascade"
+                      :id="'bulkWarehousingOrderEdit-warehouseCascade-'+record.id"
                       placeholder="请选择仓库仓位"
                       style="width: 100%;" />
                   </div>
@@ -175,17 +175,17 @@
                   <a-row :gutter="15">
                     <a-col :md="5" :sm="24">
                       <a-form-model-item label="产品编码">
-                        <a-input id="bulkWarehousingOrderEdit-code" v-model.trim="queryChooseParam.productCode" allowClear placeholder="请输入产品编码"/>
+                        <a-input id="chooseTable-code" v-model.trim="queryChooseParam.productCode" allowClear placeholder="请输入产品编码"/>
                       </a-form-model-item>
                     </a-col>
                     <a-col :md="5" :sm="24">
                       <a-form-model-item label="产品名称">
-                        <a-input id="bulkWarehousingOrderEdit-name" v-model.trim="queryChooseParam.productName" allowClear placeholder="请输入产品名称"/>
+                        <a-input id="chooseTable-name" v-model.trim="queryChooseParam.productName" allowClear placeholder="请输入产品名称"/>
                       </a-form-model-item>
                     </a-col>
                     <a-col :md="5" :sm="24" style="margin-bottom: 10px;">
-                      <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-choose-refresh">查询</a-button>
-                      <a-button style="margin-left: 8px" @click="resetChooseSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-choose-reset">重置</a-button>
+                      <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="disabled" id="chooseTable-refresh">查询</a-button>
+                      <a-button style="margin-left: 8px" @click="resetChooseSearchForm" :disabled="disabled" id="chooseTable-reset">重置</a-button>
                     </a-col>
                     <a-col :md="3" :sm="24">
                     </a-col>
@@ -194,7 +194,7 @@
                         type="default"
                         @click="openGuideModal=true"
                         :loading="delLoading"
-                        id="bulkWarehousingOrderEdit-del-all">导入产品</a-button>
+                        id="chooseTable-import">导入产品</a-button>
                       <a-button
                         type="primary"
                         ghost
@@ -202,7 +202,7 @@
                         style="margin-left: 10px"
                         @click="delBulkOrder"
                         :loading="delLoading"
-                        id="bulkWarehousingOrderEdit-del-all">清空列表</a-button>
+                        id="chooseTable-del-all">清空列表</a-button>
                     </a-col>
                   </a-row>
                 </a-form>
@@ -222,7 +222,7 @@
                 <template slot="putCost" slot-scope="text, record">
                   <a-input-number
                     size="small"
-                    id="bulkWarehousingOrderEdit-choose-putCost"
+                    :id="'chooseTable-putCost-'+record.id"
                     v-model="record.putCost"
                     :precision="2"
                     :min="0"
@@ -236,7 +236,7 @@
                 <template slot="putQty" slot-scope="text, record">
                   <a-input-number
                     size="small"
-                    id="bulkWarehousingOrderEdit-choose-putQty"
+                    :id="'chooseTable-putQty-'+record.id"
                     v-model="record.putQty"
                     :precision="0"
                     :min="1"
@@ -255,13 +255,13 @@
                     :allowClear="false"
                     :options="warehouseCascadeData"
                     :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-                    id="bulkWarehousingOrderEdit-choose-warehouseCascade"
+                    :id="'chooseTable-warehouseCascade-'+record.id"
                     placeholder="请选择仓库仓位"
                     style="width: 100%;" />
                 </template>
                 <!-- 操作 -->
                 <template slot="action" slot-scope="text, record">
-                  <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="bulkWarehousingOrderEdit-del-btn">删除</a-button>
+                  <a-button size="small" type="link" class="button-error" @click="handleDel(record)" :id="'chooseTable-del-'+record.id">删除</a-button>
                 </template>
               </s-table>
             </div>
@@ -335,28 +335,27 @@ export default {
   data () {
     const _this = this
     return {
-      isShowBisiceInfo: false,
-      advanced: false,
+      isShowBisiceInfo: false, // 是否显示基础信息
+      advanced: false, // 展开收起
       spinning: false,
       loading: false,
-      delLoading: false,
-      chooseLoading: false,
-      showNewProduct: false,
-      openGuideModal: false,
+      delLoading: false, // 删除按钮loading
+      showNewProduct: false, // 新增产品弹框
+      openGuideModal: false, // 导入产品弹框
       queryParam: {
         code: '', //  产品编码
         name: '', //  产品名称
         origCode: '', //  原厂编码
-        productBrandSn: undefined,
-        productTypeSn1: undefined,
-        productTypeSn2: undefined,
-        productTypeSn3: undefined
+        productBrandSn: undefined, // 产品品牌sn
+        productTypeSn1: undefined, // 产品分类1sn
+        productTypeSn2: undefined, // 产品分类2sn
+        productTypeSn3: undefined // 产品分类3sn
       },
       queryChooseParam: {
         productCode: '', //  产品编码
         productName: '' //  产品名称
       },
-      productType: [],
+      productType: [], // 产品分类默认值
       warehouseCascadeData: [], //  仓库仓位
       disabled: false, //  查询、重置按钮是否可操作
       paramsData: null, // 新增产品临时参数
@@ -385,6 +384,7 @@ export default {
             data.list[i].no = no + i + 1
             data.list[i].putCost = data.list[i].purchasePrice
             data.list[i].putQty = data.list[i].putQty || 1
+            // 默认仓库仓位
             if (this.defaultWarehouseCascade.length > 0) {
               data.list[i].warehouseCascade = this.defaultWarehouseCascade
               data.list[i].warehouseSn = this.defaultWarehouseCascade[0]
@@ -434,6 +434,7 @@ export default {
             data.list[i].no = no + i + 1
             data.list[i].putCostBackups = data.list[i].putCost
             data.list[i].putQtyBackups = data.list[i].putQty
+            // 默认仓库仓位
             const warehouseSn = data.list[i].warehouseSn || undefined
             const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
             if (warehouseSn || warehouseLocationSn) {
@@ -450,8 +451,8 @@ export default {
           return data
         })
       },
-      loadDataSource: [],
-      chooseLoadDataSource: [],
+      loadDataSource: [], // 产品列表原始数据
+      chooseLoadDataSource: [], // 已选产品列表原始数据
       warehouseList: [], //  仓库  下拉数据
       warehouseLocList: {}, //  仓位  下拉数据
       defaultWarehouseCascade: [], //  默认仓库仓位
@@ -680,7 +681,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/bulkManagement/bulkWarehousingOrder/list' })
+      this.$router.push({ name: 'bulkWarehousingOrderList' })
     },
     // 合计
     getDetailCount (params) {
@@ -692,6 +693,7 @@ export default {
         }
       })
     },
+    // 选择仓库仓位
     changeWarehouseCascade (val, opt, ind, type) {
       let loadData
       if (type == 'dealerProduct') { //  全部产品
@@ -699,6 +701,7 @@ export default {
       } else if (type == 'sparePartsPurDetail') { //  已选产品
         loadData = this.chooseLoadDataSource[ind]
       }
+      // 如果仓库无仓位
       if (val.length < 2) {
         this.$message.warning('当前仓库无仓位,请选择其他仓库')
         const warehouseSnBackups = loadData.warehouseSnBackups || undefined
@@ -781,6 +784,7 @@ export default {
         this.spinning = false
       })
     },
+    // 页面初始化
     initPage () {
       this.getWarehouseCascade()
       this.getDetail()

+ 5 - 5
src/views/bulkManagement/bulkWarehousingOrder/importGuideModal.vue

@@ -18,7 +18,7 @@
             <li>1) 导入的Excel文件中必须包含名为“产品编码”、“成本价”、“数量”、“仓库”、“仓位”的列,且名称必须相同,其它列可自定义,不影响数据导入</li>
             <li>2) 如果导入的产品已经存在,则不会导入该行</li>
             <li>
-              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+              <a :href="filePath" id="importGuide-tpl" style="margin: 5px 0 0;display: block;">
                 <a-icon type="download" style="padding-right: 5px;" />下载导入模板
               </a>
             </li>
@@ -77,7 +77,7 @@ export default {
       type: Boolean,
       default: false
     },
-    params: {
+    params: { // 参数
       type: Object,
       default: null
     }
@@ -88,11 +88,11 @@ export default {
       openImportModal: false, //  导入
       attachAction: process.env.VUE_APP_API_BASE_URL + '/sparePartsPur/detail/import',
       paramsData: null,
-      uploadParams: {
+      uploadParams: { // 上传参数
         savePathType: 'local',
         sparePartsPurchaseSn: this.params.sparePartsPurchaseSn
       },
-      filePath: location.protocol + '//' +location.host + '/templ/散件入库产品导入模板.xlsx'
+      filePath: location.protocol + '//' + location.host + '/templ/散件入库产品导入模板.xlsx' // 模板地址
     }
   },
   methods: {
@@ -129,7 +129,7 @@ export default {
     handleClose () {
       this.openImportModal = false
       this.isShow = false
-    },
+    }
   },
   watch: {
     //  父页面传过来的弹框状态

+ 22 - 25
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -7,12 +7,12 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="bulkWarehousingOrderList-rangeDate" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="入库时间">
-                <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
+                <rangeDate id="bulkWarehousingOrderList-auditRangeDate" ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -36,6 +36,7 @@
                     v-model="queryParam.state"
                     ref="state"
                     id="bulkWarehousingOrderList-state"
+                    @change="setIsHomeNav($route.name, null)"
                     code="SPARE_PARTS_PURCHASE"
                     placeholder="请选择业务状态"
                     allowClear
@@ -68,7 +69,7 @@
                   :loading="exportLoading"
                   v-if="$hasPermissions('B_bulkWarehousingOrder_export')"
                   id="bulkWarehousingOrderList-export">导出</a-button>
-                <a @click="advanced=!advanced" style="margin-left: 5px">
+                <a @click="advanced=!advanced" style="margin-left: 5px" id="bulkWarehousingOrderList-advanced">
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'"/>
                 </a>
@@ -103,7 +104,7 @@
         bordered>
         <!-- 散件单号 -->
         <template slot="sparePartsPurchaseNo" slot-scope="text, record">
-          <span v-if="$hasPermissions('B_bulkWarehousingOrder_detail')" class="table-td-link" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
+          <span :id="'bulkWarehousingOrderList-detail-'+record.id" v-if="$hasPermissions('B_bulkWarehousingOrder_detail')" class="table-td-link" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
           <span v-else>{{ record.sparePartsPurchaseNo }}</span>
         </template>
         <!-- 提交 -->
@@ -126,21 +127,21 @@
             v-if="record.state != 'FINISH' && $hasPermissions('B_bulkWarehousingOrder_edit')"
             @click="handleEdit(record)"
             class="button-primary"
-            id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
+            :id="'bulkWarehousingOrderList-edit-'+record.id">编辑</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_PUT_WAREHOUSE' && $hasPermissions('B_bulkWarehousingOrder_put')"
             @click="handleWarehouse(record)"
             class="button-primary"
-            id="bulkWarehousingOrderList-warehouse-btn">入库</a-button>
+            :id="'bulkWarehousingOrderList-in-'+record.id">入库</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state != 'FINISH' && $hasPermissions('B_bulkWarehousingOrder_del')"
             @click="handleDel(record)"
             class="button-error"
-            id="bulkWarehousingOrderList-del-btn">删除</a-button>
+            :id="'bulkWarehousingOrderList-del-'+record.id">删除</a-button>
           <span v-if="(record.state == 'FINISH' || !$hasPermissions('B_bulkWarehousingOrder_edit')) &&(record.state == 'FINISH' || !$hasPermissions('B_bulkWarehousingOrder_del')) &&(record.state != 'WAIT_PUT_WAREHOUSE' || !$hasPermissions('B_bulkWarehousingOrder_put'))">--</span>
         </template>
       </s-table>
@@ -173,17 +174,17 @@ export default {
       exportLoading: false, // 导出loading
       openModal: false, // 基本信息弹框是否显示
       tableHeight: 0,
-      time: [
+      time: [ // 默认时间
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
-      auditTime: [],
+      auditTime: [], // 审核时间默认值
       // 查询参数
       queryParam: {
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        auditBeginDate: '',
-        auditEndDate: '',
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
+        auditBeginDate: '', // 审核开始时间
+        auditEndDate: '', // 审核结束时间
         sparePartsPurchaseNo: '', //  散件单号
         supplierSn: undefined, //  供应商
         state: undefined, //  单据状态
@@ -225,7 +226,7 @@ export default {
           return data
         })
       },
-      productTotal: null,
+      productTotal: null, // 统计数据
       dataTotalCount: 0 //  列表数据总条数
     }
   },
@@ -235,6 +236,7 @@ export default {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
+    // 审核时间
     auditDateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
@@ -249,22 +251,22 @@ export default {
         }
       })
     },
-    //  新增
+    //  新增弹框
     handleAdd () {
       this.openModal = true
     },
     //  基本信息  保存
     handleOk (row) {
       this.resetData()
-      this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/add/${row.id}/${row.sparePartsPurchaseSn}/${row.supplierSn}` })
+      this.$router.push({ name: 'bulkWarehousingOrderAdd', params: { id: row.id, sn: row.sparePartsPurchaseSn, supplierSn: row.supplierSn } })
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/edit/${row.id}/${row.sparePartsPurchaseSn}/${row.supplierSn}` })
+      this.$router.push({ name: 'bulkWarehousingOrderEdit', params: { id: row.id, sn: row.sparePartsPurchaseSn, supplierSn: row.supplierSn } })
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/detail/${row.id}/${row.sparePartsPurchaseSn}` })
+      this.$router.push({ name: 'bulkWarehousingOrderDetail', params: { id: row.id, sn: row.sparePartsPurchaseSn } })
     },
     //  入库
     handleWarehouse (row) {
@@ -329,12 +331,6 @@ export default {
         this.setIsHomeNav(this.$route.name, null)
       }
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
-        option.data.attrs.pyCode.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  导出
     handleExport () {
       const _this = this
@@ -359,6 +355,7 @@ export default {
         }
       })
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -372,7 +369,6 @@ export default {
       const b = this.$store.state.app.updateList
       // 是否从首页点击进入
       const isHomeNav = this.getIsHomeNav()[this.$route.name]
-      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
 
       // 从首页进入,判断式新建还式待办查询
       if (isHomeNav) {
@@ -399,6 +395,7 @@ export default {
         }
       }
     },
+    // 表格高度计算
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 270

+ 8 - 7
src/views/chainReportData/chainCallReport/detailList.vue

@@ -15,12 +15,12 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate id="chainCallReportExport-time" ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
-              <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
+              <rangeDate id="chainCallReportExport-outTime" ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -78,7 +78,7 @@
               v-if="$hasPermissions('M_chainCallReportExport')"
               class="button-warning"
               id="chainCallReportExport-export-btn">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
+            <a @click="advanced=!advanced" style="margin-left: 5px" id="chainCallReportExport-advanced">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
@@ -144,10 +144,10 @@ export default {
           code: '', //  产品编码
           name: '' //  产品名称
         },
-        productType: undefined,
-        putTenantSn: undefined,
-        allocationType: undefined,
-        allocationLinkageOutNo: ''
+        productType: undefined, // 产品分类
+        putTenantSn: undefined, // 调往对象
+        allocationType: undefined, // 调拨产品类型
+        allocationLinkageOutNo: '' // 调出单号
       },
       rules: {
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
@@ -217,6 +217,7 @@ export default {
       this.queryParam.auditBeginDate = date[0] || ''
       this.queryParam.auditEndDate = date[1] || ''
     },
+    // 出库时间
     outWareDateChange (date) {
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]

+ 3 - 3
src/views/chainReportData/chainCallReport/index.vue

@@ -2,8 +2,8 @@
   <div class="tabsReportList-wrap">
     <div style="background-color: #fff;margin-bottom: 5px;">
       <a-tabs default-active-key="1" v-model="curTab">
-        <a-tab-pane key="1" tab="连锁调出报表"></a-tab-pane>
-        <a-tab-pane key="2" tab="连锁调出明细报表" force-render></a-tab-pane>
+        <a-tab-pane key="1" id="tab1" tab="连锁调出报表"></a-tab-pane>
+        <a-tab-pane key="2" id="tab2" tab="连锁调出明细报表" force-render></a-tab-pane>
       </a-tabs>
     </div>
     <a-card size="small" :bordered="false">
@@ -17,7 +17,7 @@
 import report from './list.vue'
 import detailReport from './detailList.vue'
 export default {
-  name: 'chainTransferReportIndex',
+  name: 'ChainTransferReportIndex',
   components: {
     report,
     detailReport

+ 9 - 8
src/views/chainReportData/chainCallReport/list.vue

@@ -15,12 +15,12 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate id="chainCallReportExport-time" ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
-              <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
+              <rangeDate id="chainCallReportExport-outWareTime" ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -58,7 +58,7 @@
               v-if="$hasPermissions('M_chainCallReportExport')"
               class="button-warning"
               id="chainCallReportExport-export-btn">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
+            <a @click="advanced=!advanced" style="margin-left: 5px" id="chainCallReportExport-advanced">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
@@ -110,13 +110,13 @@ export default {
       outWareTime: [],
       queryParam: { //  查询条件
         time: [],
-        auditBeginDate: '',
+        auditBeginDate: '', // 审核时间
         auditEndDate: '',
-        outWarehouseBeginDate: '',
+        outWarehouseBeginDate: '', // 出库时间
         outWarehouseEndDate: '',
-        putTenantSn: undefined,
-        allocationType: undefined,
-        allocationLinkageOutNo: ''
+        putTenantSn: undefined, // 调往对象
+        allocationType: undefined, // 调拨产品类型
+        allocationLinkageOutNo: '' // 连锁调出单号
       },
       rules: {
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
@@ -184,6 +184,7 @@ export default {
       this.queryParam.auditBeginDate = date[0] || ''
       this.queryParam.auditEndDate = date[1] || ''
     },
+    // 出库时间
     outWareDateChange (date) {
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]

+ 14 - 12
src/views/chainReportData/chainCustomerReport/list.vue

@@ -24,36 +24,36 @@
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
-                  <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                  <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="添加时间" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="customerReportList-time" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="产品分类">
-                <ProductType placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
+                <ProductType id="customerReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="客户所在区">
-                  <AreaList changeOnSelect ref="areaList" @change="areaChange"></AreaList>
+                  <AreaList id="customerReportList-area" changeOnSelect ref="areaList" @change="areaChange"></AreaList>
                 </a-form-item>
               </a-col>
               <a-col :md="4" :sm="24">
                 <a-form-item label="客户类型">
-                  <custType v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;"></custType>
+                  <custType id="customerReportList-custType" v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;"></custType>
                 </a-form-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="customerReportList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="customerReportList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="customerReportList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -106,10 +106,10 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        tenantId: undefined,
-        time: [],
-        beginDate: '',
-        endDate: '',
+        tenantId: undefined, // 连锁店id
+        time: [], // 时间
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
@@ -169,7 +169,7 @@ export default {
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
       productTypeList: [], //  分类下拉数据
-      linkageGroupData: []
+      linkageGroupData: [] // 连锁店列表
     }
   },
   computed: {
@@ -190,6 +190,7 @@ export default {
     }
   },
   methods: {
+    // 地区
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : undefined
       this.queryParam.citySn = val[1] ? val[1] : undefined
@@ -237,13 +238,14 @@ export default {
       this.queryParam.countySn = undefined
       this.queryParam.customerTypeSn = undefined
       this.productType = []
-      if(this.advanced){
+      if (this.advanced) {
         this.$refs.areaList.clearData()
       }
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 2 - 2
src/views/chainReportData/chainPurchaseReceiptReport/list.vue

@@ -4,7 +4,7 @@
       <!-- 标签页 -->
       <a-tabs type="card" :default-active-key="nowKey" @change="handleTabChange" class="chainPurchaseReceiptReportList-tabs ">
         <a-tab-pane v-for="item in tabPaneData" :key="item.val">
-          <span slot="tab">{{ item.name }}</span>
+          <span slot="tab" :id="item.val">{{ item.name }}</span>
         </a-tab-pane>
       </a-tabs>
       <purchaseReceiptOrder v-show="nowKey=='1'" @spinning="spinningFun" />
@@ -27,7 +27,7 @@ export default {
         { name: '采购入库单报表', val: '1' },
         { name: '采购入库明细报表', val: '2' }
       ],
-      nowKey: '1'
+      nowKey: '1' // 当前tab
     }
   },
   methods: {

+ 13 - 12
src/views/chainReportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue

@@ -29,7 +29,7 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="财务审核时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate id="chainPurchaseReceiptDetailList-time" ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -66,7 +66,7 @@
               :loading="exportLoading"
               v-if="$hasPermissions('B_chainPurchaseReceiptReportExport')"
               id="chainPurchaseReceiptDetailList-export">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
+            <a @click="advanced=!advanced" style="margin-left: 5px" id="chainPurchaseReceiptDetailList-advanced">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
@@ -114,17 +114,17 @@ export default {
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
       queryParam: { //  查询条件
-        tenantId: undefined,
-        time: [],
-        beginDate: '',
-        endDate: '',
+        tenantId: undefined, // 连锁店id
+        time: [], // 时间
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
         productEntity: {
-          productBrandSn: undefined,
-          productTypeSn1: undefined,
-          productTypeSn2: undefined,
-          productTypeSn3: undefined,
-          code: '',
-          name: ''
+          productBrandSn: undefined, // 品牌
+          productTypeSn1: undefined, //  产品一级分类
+          productTypeSn2: undefined, //  产品二级分类
+          productTypeSn3: undefined, //  产品三级分类
+          code: '', // 编码
+          name: ''// 名称
         }
       },
       productType: [],
@@ -236,6 +236,7 @@ export default {
       this.totalData = null
       this.$refs.table.clearTable()
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 5 - 4
src/views/chainReportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue

@@ -23,13 +23,13 @@
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
-                <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
               </a-select>
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="财务审核时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate id="chainPurchaseReceiptOrderList-time" ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -87,7 +87,7 @@ export default {
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
       queryParam: { //  查询条件
-        tenantId: undefined,
+        tenantId: undefined, // 连锁店id
         time: [],
         beginDate: '',
         endDate: ''
@@ -149,7 +149,7 @@ export default {
         }
       },
       totalData: null, //  合计
-      linkageGroupData: []
+      linkageGroupData: [] // 连锁店列表
     }
   },
   methods: {
@@ -191,6 +191,7 @@ export default {
       this.totalData = null
       this.$refs.table.clearTable()
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 13 - 6
src/views/chainReportData/chainReceivedSendStorageReport/list.vue

@@ -30,7 +30,13 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="日期" prop="auditDate">
-                <a-month-picker v-model="queryParam.auditDate" :allowClear="false" @change="onChange" :defaultValue="moment()" style="width: 100%;" />
+                <a-month-picker
+                  id="sendStorageReportList-auditDate"
+                  v-model="queryParam.auditDate"
+                  :allowClear="false"
+                  @change="onChange"
+                  :defaultValue="moment()"
+                  style="width: 100%;" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -67,7 +73,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 id="sendStorageReportList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="sendStorageReportList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -122,8 +128,8 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        auditDate: moment().format('YYYY-MM'),
-        tenantId: undefined,
+        auditDate: moment().format('YYYY-MM'), // 审核时间,默认当前日期
+        tenantId: undefined, // 连锁店id
         productEntity: {
           code: '', //  产品编码
           name: '', //  产品名称
@@ -200,8 +206,8 @@ export default {
           })
         }
       },
-      productType: [],
-      linkageGroupData: [],
+      productType: [], // 产品分类
+      linkageGroupData: [], // 连锁店列表
       totalData: null // 合计
     }
   },
@@ -271,6 +277,7 @@ export default {
       this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 24 - 21
src/views/chainReportData/chainSalesDetailReport/list.vue

@@ -24,13 +24,13 @@
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
-                <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
               </a-select>
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate id="chainSalesDetailReportList-time" ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -41,7 +41,7 @@
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-item label="客户类型">
-                <custType v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型"></custType>
+                <custType id="chainSalesDetailReportList-custType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型"></custType>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -101,14 +101,14 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="客户所在区">
-                <AreaList changeOnSelect ref="areaList" @change="areaChange"></AreaList>
+                <AreaList id="chainSalesDetailReportList-area" changeOnSelect ref="areaList" @change="areaChange"></AreaList>
               </a-form-item>
             </a-col>
           </template>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainSalesDetailReportList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainSalesDetailReportList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
+            <a @click="advanced=!advanced" style="margin-left: 5px" id="chainSalesDetailReportList-advanced">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
@@ -167,17 +167,17 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        tenantId: undefined,
-        time: [],
-        beginDate: '',
-        endDate: '',
-        buyerNameCurrent: undefined,
-        buyerSnCurrent: undefined,
-        salesTargetType: undefined,
+        tenantId: undefined, // 连锁店id
+        time: [], // 时间
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
+        salesTargetType: undefined, // 客户类型
         provinceSn: undefined, //  省
         citySn: undefined, //  市
         countySn: undefined, //  区
-        settleStyleSn: undefined,
+        settleStyleSn: undefined, // 收款方式
         productEntity: {
           productBrandSn: undefined, //  产品品牌
           productTypeSn1: '', //  产品一级分类
@@ -186,11 +186,11 @@ export default {
           code: '', //  产品编码
           name: '' //  产品名称
         },
-        warehouseCascade: [],
-        warehouseSn: undefined,
-        warehouseLocationSn: undefined,
-        salesBillNo: '',
-        salesManName: ''
+        warehouseCascade: [], // 仓库数据
+        warehouseSn: undefined, // 选择的仓库
+        warehouseLocationSn: undefined, // 仓位
+        salesBillNo: '', // 销售单号
+        salesManName: ''// 业务员
       },
       rules: {
         'tenantId': [{ required: true, message: '请选择连锁店', trigger: 'change' }],
@@ -225,11 +225,11 @@ export default {
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
-      linkageGroupData: [],
+      linkageGroupData: [], // 连锁店下拉
       allocateTypeList: [], //  调拨类型
       custTypeList: [], //  客户类型 下拉数据
       productBrandList: [], //  品牌下拉数据
-      productType: [],
+      productType: [], // 产品分类值
       productTypeList: [], //  分类下拉数据
       warehouseCascadeData: [] //  仓库仓位
     }
@@ -272,6 +272,7 @@ export default {
         }
       })
     },
+    // 地区
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : undefined
       this.queryParam.citySn = val[1] ? val[1] : undefined
@@ -294,6 +295,7 @@ export default {
         }
       })
     },
+    // 客户
     custSatelliteChange (v, row) {
       if (row && row.customerSn) {
         this.queryParam.buyerSnCurrent = row.customerSn
@@ -330,13 +332,14 @@ export default {
       this.queryParam.salesManName = ''
       this.productType = []
       this.$refs.custSatelliteList.resetForm()
-      if(this.advanced){
+      if (this.advanced) {
         this.$refs.areaList.clearData()
       }
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 11 - 9
src/views/chainReportData/chainSalesDetailsCountReport/list.vue

@@ -16,7 +16,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="审核日期" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="chainSalesDetailsCountReportList-time" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -29,12 +29,12 @@
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
-                  <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                  <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="2" :sm="8" style="margin-top: 6px;">
-              <a-checkbox @change="onChange" :default-checked="queryParam.oosFlag">
+              <a-checkbox @change="onChange" :default-checked="queryParam.oosFlag" id="chainSalesDetailsCountReportList-oosFlag">
                 包含急件
               </a-checkbox>
             </a-col>
@@ -89,11 +89,11 @@ export default {
       wrapperCol: { span: 16 },
       tableHeight: 0,
       queryParam: { //  查询条件
-        tenantId: undefined,
+        tenantId: undefined, // 连锁店id
         time: [],
-        beginDate: '',
-        endDate: '',
-        oosFlag: true
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        oosFlag: true // 包含急件
       },
       rules: {
         'time': [{ required: true, message: '请选择审核日期', trigger: 'change' }]
@@ -171,11 +171,12 @@ export default {
           return data
         })
       },
-      linkageGroupData: [],
-      totalData: null
+      linkageGroupData: [], // 连锁店列表
+      totalData: null // 统计数据
     }
   },
   methods: {
+    // 是否包含急件
     onChange (e) {
       this.queryParam.oosFlag = e.target.checked
     },
@@ -240,6 +241,7 @@ export default {
         }
       })
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 16 - 13
src/views/chainReportData/chainSalesReport/list.vue

@@ -24,13 +24,13 @@
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
-                <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
               </a-select>
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate id="chainSalesReportList-time" ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -41,7 +41,7 @@
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-item label="客户类型">
-                <custType v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型"></custType>
+                <custType id="chainSalesReportList-custType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型"></custType>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -67,14 +67,14 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="客户所在区">
-                <AreaList changeOnSelect ref="areaList" @change="areaChange"></AreaList>
+                <AreaList id="chainSalesReportList-area" changeOnSelect ref="areaList" @change="areaChange"></AreaList>
               </a-form-item>
             </a-col>
           </template>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainSalesReportList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainSalesReportList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 8px">
+            <a @click="advanced=!advanced" style="margin-left: 8px" id="chainSalesReportList-advanced">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
@@ -131,18 +131,18 @@ export default {
       tableHeight: 0,
       queryParam: { //  查询条件
         tenantId: undefined,
-        time: [],
+        time: [], // 时间
         beginDate: '',
         endDate: '',
-        buyerNameCurrent: undefined,
+        buyerNameCurrent: undefined, // 客户
         buyerSnCurrent: undefined,
-        salesTargetType: undefined,
+        salesTargetType: undefined, // 客户类型
         provinceSn: undefined, //  省
         citySn: undefined, //  市
         countySn: undefined, //  区
-        settleStyleSn: undefined,
-        salesBillNo: '',
-        salesManName: ''
+        settleStyleSn: undefined, // 收款方式
+        salesBillNo: '', // 销售单号
+        salesManName: '' // 销售人员
       },
       rules: {
         'tenantId': [{ required: true, message: '请选择连锁店', trigger: 'change' }],
@@ -173,7 +173,7 @@ export default {
         })
       },
       totalData: null, //  合计
-      linkageGroupData: [],
+      linkageGroupData: [], // 连锁店下拉
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
@@ -207,6 +207,7 @@ export default {
     }
   },
   methods: {
+    // 地区
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : undefined
       this.queryParam.citySn = val[1] ? val[1] : undefined
@@ -239,6 +240,7 @@ export default {
         }
       })
     },
+    // 客户
     custSatelliteChange (v, row) {
       if (row && row.customerSn) {
         this.queryParam.buyerSnCurrent = row.customerSn
@@ -265,13 +267,14 @@ export default {
       this.queryParam.salesBillNo = ''
       this.queryParam.salesManName = ''
       this.$refs.custSatelliteList.resetForm()
-      if(this.advanced){
+      if (this.advanced) {
         this.$refs.areaList.clearData()
       }
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 5 - 4
src/views/chainReportData/chainSalesReturnDetailReport/list.vue

@@ -16,7 +16,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="审核日期" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="reportSalesReturnBillDetail-time" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -29,7 +29,7 @@
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
-                  <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                  <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
@@ -95,7 +95,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       columns: [
-        { title: '序号', dataIndex: 'no', width: 50, align: 'center',fixed: 'left' },
+        { title: '序号', dataIndex: 'no', width: 50, align: 'center', fixed: 'left' },
         { title: '门店', dataIndex: 'salesTargetName', width: 150, align: 'left', customRender: function (text) { return text || '--' }, fixed: 'left' },
         {
           title: '所有品牌',
@@ -143,7 +143,7 @@ export default {
         { title: '皮带', dataIndex: 'pdAmount', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '轮子', dataIndex: 'lzAmount', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '其他', dataIndex: 'otherAmount', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '合计', dataIndex: 'totalAmount', width: 100, align: 'right',fixed: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '合计', dataIndex: 'totalAmount', width: 100, align: 'right', fixed: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -231,6 +231,7 @@ export default {
         }
       })
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 9 - 6
src/views/chainReportData/chainStockExpenditureReport/list.vue

@@ -24,13 +24,13 @@
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
-                  <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                  <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="出库完成时间" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="chainStockExpenditureReportList-time" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -109,9 +109,9 @@ export default {
       tableData: [], //  含总计数据
       loadData: [], //  不含总计数据
       listLoading: false,
-      chart1: null,
-      totalData: null,
-      linkageGroupData: []
+      chart1: null, // 图表
+      totalData: null, // 统计数据
+      linkageGroupData: [] // 连锁下拉
     }
   },
 
@@ -207,12 +207,12 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 查询
     handelSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           this.getList()
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -258,6 +258,7 @@ export default {
         this.spinning = false
       })
     },
+    // 图表初始化
     chartInit () {
       this.pieData = []
       if (this.loadData.length < 1) {
@@ -291,6 +292,7 @@ export default {
       this.totalData = null
       this.chartInit()
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -311,6 +313,7 @@ export default {
         }
       })
     },
+    // 图表重置
     chartResize () {
       this.chart1.resize()
     },

+ 9 - 7
src/views/chainReportData/chainStockIncomeReport/list.vue

@@ -24,13 +24,13 @@
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
-                  <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                  <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="入库完成时间" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+                <rangeDate id="chainStockIncomeReportList-time" ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -108,10 +108,10 @@ export default {
       pieColor: ['#00aaff', '#ffaa00', '#00aa00', '#ff55ff', '#1dc5d4', '#8465c7', '#00ffff'],
       tableData: [], //  含总计数据
       loadData: [], //  不含总计数据
-      listLoading: false,
-      chart1: null,
-      totalData: null,
-      linkageGroupData: []
+      listLoading: false, // loading
+      chart1: null, // 图表对象
+      totalData: null, // 统计
+      linkageGroupData: [] // 连锁店下拉
     }
   },
 
@@ -207,12 +207,12 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 查询
     handelSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           this.getList()
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -258,6 +258,7 @@ export default {
         this.spinning = false
       })
     },
+    // 图表初始化
     chartInit () {
       this.pieData = []
       if (this.loadData.length < 1) {
@@ -291,6 +292,7 @@ export default {
       this.totalData = null
       this.chartInit()
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 2 - 2
src/views/chainReportData/chainStockReport/detailModal.vue

@@ -47,11 +47,11 @@ export default {
       type: Boolean,
       default: false
     },
-    productSn: {
+    productSn: { // 产品sn
       type: [Number, String],
       default: ''
     },
-    stockSn: {
+    stockSn: { // 库存sn
       type: [Number, String],
       default: ''
     }

+ 15 - 9
src/views/chainReportData/chainStockReport/list.vue

@@ -24,7 +24,7 @@
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
-                  <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                  <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
@@ -94,7 +94,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 id="inventoryQueryList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
+              <a @click="advanced=!advanced" style="margin-left: 8px" id="chainStockReportList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -128,7 +128,13 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-success" @click="goDetail(record)" id="chainStockReportList-detail-btn">详情</a-button>
+          <a-button
+            :id="'chainStockReportList-detail-'+record.productSn+'-'+record.stockSn"
+            size="small"
+            type="link"
+            class="button-success"
+            @click="goDetail(record)"
+            id="chainStockReportList-detail-btn">详情</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -157,7 +163,7 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        tenantId: undefined,
+        tenantId: undefined, // 连锁店id
         productCode: '', //  产品编码
         productName: '', //  产品名称
         productOrigCode: '', //  原厂编码
@@ -208,7 +214,6 @@ export default {
               return data
             })
           } else {
-            console.log('=======未登录')
             const _this = this
             return new Promise(function (resolve, reject) {
               const data = {
@@ -238,14 +243,14 @@ export default {
           })
         }
       },
-      productType: [],
-      linkageGroupData: [],
+      productType: [], // 产品分类
+      linkageGroupData: [], // 连锁店下拉
       productBrandList: [], //  品牌下拉数据
       productTypeList: [], //  分类下拉数据
       allocateTypeList: [], //  调拨类型
       totalData: null, //  合计
-      productSn: '',
-      stockSn: '',
+      productSn: '', // 产品sn
+      stockSn: '', // 入库sn
       openModal: false //  弹框
     }
   },
@@ -385,6 +390,7 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 连锁店筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 11 - 12
src/views/chainReportData/chainTransferReport/detailList.vue

@@ -15,7 +15,7 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="入库时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate id="chainTransferInReport-time" ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -39,7 +39,7 @@
                 allowClear></v-select>
             </a-form-item>
           </a-col>
-          <template v-if="advanced"> 
+          <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="产品编码">
                 <a-input id="chainTransferInReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
@@ -73,7 +73,7 @@
               v-if="$hasPermissions('M_chainTransferInReportExport')"
               class="button-warning"
               id="chainTransferInReport-export-btn">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
+            <a @click="advanced=!advanced" style="margin-left: 5px" id="chainTransferInReport-advanced">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
@@ -124,11 +124,10 @@ export default {
       wrapperCol: { span: 16 },
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
-      outWareTime: [],
       queryParam: { //  查询条件
-        time:[],
-        beginDate: '',
-        endDate: '',
+        time: [], // 时间
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
         productEntity: {
           productBrandSn: undefined, //  产品品牌
           productTypeSn1: '', //  产品一级分类
@@ -137,10 +136,10 @@ export default {
           code: '', //  产品编码
           name: '' //  产品名称
         },
-        productType: undefined,
-        outTenantSn:undefined,
-        allocationType: undefined,
-        allocationLinkagePutNo: ''
+        productType: undefined, // 产品分类值
+        outTenantSn: undefined, // 调出对象
+        allocationType: undefined, // 调拨产品类型
+        allocationLinkagePutNo: '' // 连锁调入单号
       },
       rules: {
         'time': [{ required: true, message: '请选择入库时间', trigger: 'change' }]
@@ -169,7 +168,7 @@ export default {
           return data
         })
       },
-      totalData: null, //  合计
+      totalData: null //  合计
     }
   },
   computed: {

+ 3 - 3
src/views/chainReportData/chainTransferReport/index.vue

@@ -2,8 +2,8 @@
   <div class="tabsReportList-wrap">
     <div style="background-color: #fff;margin-bottom: 5px;">
       <a-tabs default-active-key="1" v-model="curTab">
-        <a-tab-pane key="1" tab="连锁调入报表"></a-tab-pane>
-        <a-tab-pane key="2" tab="连锁调入明细报表" force-render></a-tab-pane>
+        <a-tab-pane key="1" id="tab1" tab="连锁调入报表"></a-tab-pane>
+        <a-tab-pane key="2" id="tab2" tab="连锁调入明细报表" force-render></a-tab-pane>
       </a-tabs>
     </div>
     <a-card size="small" :bordered="false">
@@ -17,7 +17,7 @@
 import report from './list.vue'
 import detailReport from './detailList.vue'
 export default {
-  name: 'chainTransferReportIndex',
+  name: 'ChainTransferReportIndex',
   components: {
     report,
     detailReport

+ 12 - 12
src/views/chainReportData/chainTransferReport/list.vue

@@ -15,7 +15,7 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="入库时间" prop="time">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate id="chainTransferInReport-time" ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -95,14 +95,14 @@ export default {
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       queryParam: { //  查询条件
-        time:[],
-        beginDate: '',
-        endDate: '',
-        outTenantSn:undefined,
-        allocationType: undefined,
-        allocationLinkagePutNo: ''
+        time: [], // 时间
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        outTenantSn: undefined, // 调出对象
+        allocationType: undefined, // 调拨产品类型
+        allocationLinkagePutNo: '' // 连锁调入单号
       },
       rules: {
         'time': [{ required: true, message: '请选择入库时间', trigger: 'change' }]
@@ -131,8 +131,8 @@ export default {
           return data
         })
       },
-      totalData: null, //  合计
-      storeCallOutTypeList: [] //  调拨类型
+      totalData: null, // 合计
+      storeCallOutTypeList: [] // 调拨类型
     }
   },
   computed: {
@@ -148,7 +148,7 @@ export default {
         { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(5, 0, { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ?  _this.toThousands(text) : '--') } })
+        arr.splice(5, 0, { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }
@@ -211,7 +211,7 @@ export default {
           return false
         }
       })
-    },
+    }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用

+ 2 - 2
src/views/common/auditModal.vue

@@ -16,8 +16,8 @@
         </div>
       </div>
       <div class="btn-box">
-        <a-button type="primary" class="button-error" @click="handleAuditFail">审核不通过</a-button>
-        <a-button type="primary" class="button-info" @click="handleAuditOk">审核通过</a-button>
+        <a-button id="audit-modal-nopass" type="primary" class="button-error" @click="handleAuditFail">审核不通过</a-button>
+        <a-button id="audit-modal-ok" type="primary" class="button-info" @click="handleAuditOk">审核通过</a-button>
       </div>
     </a-spin>
   </a-modal>

+ 8 - 2
src/views/common/commonModal.vue

@@ -13,8 +13,14 @@
       <div class="common-main" v-html="modalHtml"></div>
       <slot></slot>
       <div class="btn-box">
-        <a-button type="default" size="large" class="button-warning" @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
-        <a-button type="primary" size="large" class="button-error" @click="handleCommonOk">{{ okText }}</a-button>
+        <a-button
+          id="common-modal-cancel"
+          type="default"
+          size="large"
+          class="button-warning"
+          @click="handleCommonCancel"
+          v-if="isCancel">{{ cancelText }}</a-button>
+        <a-button id="common-modal-ok" type="primary" size="large" class="button-error" @click="handleCommonOk">{{ okText }}</a-button>
       </div>
     </a-spin>
   </a-modal>

+ 6 - 1
src/views/common/custList.vue

@@ -2,6 +2,7 @@
   <a-select
     show-search
     label-in-value
+    :id="id"
     :size="size"
     :value="dealerName"
     mode="combobox"
@@ -16,7 +17,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="pageType&&pageType==='1'?false:((isValidateEnabled ? item.enabledFlag=='0' : false) || (dealerDisabled ? item.dealerFlag==1:false))">
+    <a-select-option v-for="item in data" :id="id+'-'+item.customerSn" :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>
@@ -31,6 +32,10 @@ export default {
       type: Boolean,
       default: false
     },
+    id: {
+      type: String,
+      default: ''
+    },
     size: {
       type: String,
       default: 'default'

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

@@ -4,6 +4,7 @@
     show-search
     label-in-value
     :value="dealerName"
+    :id="id"
     placeholder="请输入名称搜索"
     style="width: 100%"
     :filter-option="false"
@@ -14,7 +15,7 @@
     allowClear
   >
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerSn">{{ item.customerName }}</a-select-option>
+    <a-select-option v-for="item in data" :id="id+'-'+item.customerSn" :key="item.customerSn" :value="item.customerSn">{{ item.customerName }}</a-select-option>
   </a-select>
 </template>
 <script>
@@ -22,6 +23,10 @@ import debounce from 'lodash/debounce'
 import { custList } from '@/api/customer'
 export default {
   props: {
+    id: {
+      type: String,
+      default: ''
+    },
     verify: { //  当前输入客户名称是否是卫星仓客户 提示信息
       type: Boolean,
       default: false

+ 6 - 0
src/views/common/editInput.js

@@ -6,6 +6,7 @@ const EditableCell = {
         </span>
         <div class="editable-cell-input-wrapper">
           <a-input-number 
+          :id="id+'-number-input'"
           :size="size"
           :min="min" 
           :max="max" 
@@ -16,6 +17,7 @@ const EditableCell = {
           @pressEnter="check"/>
         </div>
         <a-icon
+          :id="id+'-number-input-check'"
           type="check"
           slot="suffix"
           :title="editable?'保存':''"
@@ -25,6 +27,10 @@ const EditableCell = {
       </div>
     `,
   props: {
+    id: {
+          type: String,
+          default: ''
+        },
     text: Number,
     precision: {
       type: [Number],

+ 3 - 3
src/views/common/outInDetialModal.vue

@@ -54,7 +54,7 @@ export default {
       type: Boolean,
       default: false
     },
-    outBizType: {
+    outBizType: { // outBizType = SHOP_CALL_OUT(店内调出)   /  SALES (销售)
       type: String,
       default: ''
     }
@@ -114,8 +114,8 @@ export default {
         // { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(5, 0, { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ?  _this.toThousands(text) : '--') } })
-        arr.splice(7, 0, { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ?  _this.toThousands(text) : '--') } })
+        arr.splice(5, 0, { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(7, 0, { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }

+ 14 - 8
src/views/common/pdfViewModal.vue

@@ -18,20 +18,26 @@
           <div>
             调整比例:{{ Math.round(scalVal*100) }}%
             <div>
-              <a-button :disabled="scalLoading" style="margin-right: 10px;" size="small" @click="setScalVal(0)"><a-icon type="minus" /> 缩小</a-button>
-              <a-button :disabled="scalLoading" size="small" @click="setScalVal(1)"><a-icon type="plus" /> 放大</a-button>
+              <a-button id="xs-btn" :disabled="scalLoading" style="margin-right: 10px;" size="small" @click="setScalVal(0)"><a-icon type="minus" /> 缩小</a-button>
+              <a-button id="fd-btn" :disabled="scalLoading" size="small" @click="setScalVal(1)"><a-icon type="plus" /> 放大</a-button>
             </div>
           </div>
           <div>
             <div v-if="hasClipboard">
-              <a-button :disabled="scalLoading" size="small" @click="handleCapture('export')"><a-icon type="export" /> 导出图片</a-button>
+              <a-button id="export-btn" :disabled="scalLoading" size="small" @click="handleCapture('export')"><a-icon type="export" /> 导出图片</a-button>
             </div>
           </div>
           <div>
             选择打印机:
             <div>
-              <a-select size="small" style="width:200px;" v-model="printIndex" @change="changePrint" placeholder="选择打印机">
-                <a-select-option v-for="item in printList" :key="'print-'+item.value" :value="item.name">
+              <a-select
+                size="small"
+                id="print-opts"
+                style="width:200px;"
+                v-model="printIndex"
+                @change="changePrint"
+                placeholder="选择打印机">
+                <a-select-option v-for="item in printList" :id="'print-'+item.value" :key="'print-'+item.value" :value="item.name">
                   {{ item.name }}
                 </a-select-option>
               </a-select>
@@ -53,11 +59,11 @@
         </vue-scroll>
       </div>
       <div class="btn-box">
-        <a-button size="large" style="margin-right: 25px;" @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
-        <a-button size="large" style="margin-right: 25px;" type="default" @click="handleCapture(hasClipboard?'copy':'export')">
+        <a-button id="print-view-cancel" size="large" style="margin-right: 25px;" @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
+        <a-button id="print-view-copy" size="large" style="margin-right: 25px;" type="default" @click="handleCapture(hasClipboard?'copy':'export')">
           {{ hasClipboard?'复制截图':'导出图片' }}
         </a-button>
-        <a-button size="large" type="primary" :loading="$store.state.app.printLoading" @click="handleCommonOk">
+        <a-button id="print-view-ok" size="large" type="primary" :loading="$store.state.app.printLoading" @click="handleCommonOk">
           {{ $store.state.app.printLoading?'打印中...':okText }}
         </a-button>
       </div>

+ 2 - 2
src/views/common/print.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="print-page-header">
     <a-radio-group key="4" id="print-printerType" v-model="printerType">
-      <a-radio value="NEEDLE">针式</a-radio>
-      <a-radio value="INK">喷墨</a-radio>
+      <a-radio value="NEEDLE" id="print-printerType1">针式</a-radio>
+      <a-radio value="INK" id="print-printerType0">喷墨</a-radio>
     </a-radio-group>
     <slot name="extendCons"></slot>
     <a-button key="3" id="print-preview-btn" :loading="$store.state.app.printLoading" :disabled="disabled" @click="handlePrint('preview')">打印预览</a-button>

+ 3 - 3
src/views/common/printPanel.vue

@@ -5,8 +5,8 @@
         <div style="padding:10px;">
           <span>打印方式:</span>
           <a-radio-group key="4" id="print-printerType" v-model="printerType">
-            <a-radio value="NEEDLE">针式</a-radio>
-            <a-radio value="INK">喷墨</a-radio>
+            <a-radio value="NEEDLE" id="print-printerType1">针式</a-radio>
+            <a-radio value="INK" id="print-printerType2">喷墨</a-radio>
           </a-radio-group>
         </div>
         <slot name="extendCons"></slot>
@@ -46,7 +46,7 @@
           <slot name="extendButtons"></slot>
         </div>
       </template>
-      <a-button type="link" class="button-default"><a-icon type="printer" /> 打印导出 </a-button>
+      <a-button type="link" class="button-default" id="print-export-btn"><a-icon type="printer" /> 打印导出 </a-button>
     </a-popover>
 
     <!-- 打印 -->

+ 1 - 1
src/views/common/productBrand.js

@@ -11,7 +11,7 @@ const ProductBrand = {
         option-filter-prop="children"
         :dropdownMatchSelectWidth="false"
         :filter-option="filterOption">
-        <a-select-option v-for="item in productBrandList" :pinyin="item.pinyin" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+        <a-select-option v-for="item in productBrandList" :id="item.brandSn+'-'+id" :pinyin="item.pinyin" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
       </a-select>
     `,
   props: {

+ 6 - 1
src/views/common/productJqList.vue

@@ -1,6 +1,7 @@
 <template>
   <!-- 箭冠产品 -->
   <a-select
+    :id="id"
     show-search
     label-in-value
     :value="productCode"
@@ -14,7 +15,7 @@
     @change="handleChange"
     allowClear>
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-    <a-select-option v-for="item in data" :key="item.productSn" :value="item.productSn">{{ item.code }}</a-select-option>
+    <a-select-option v-for="item in data" :id="item.productSn+'-'+id" :key="item.productSn" :value="item.productSn">{{ item.code }}</a-select-option>
   </a-select>
 </template>
 <script>
@@ -23,6 +24,10 @@ import { shelfDealerProductList } from '@/api/shelf'
 import { productList } from '@/api/product'
 export default {
   props: {
+    id: {
+      type: String,
+      default: ''
+    },
     itemSn: {
       type: String || Number,
       default: undefined

+ 25 - 2
src/views/common/productType.js

@@ -31,6 +31,10 @@ const ProductType = {
     tenantId: {
       type: String,
       default: ''
+    },
+    level:{
+      type: Number,
+      default: 3
     }
   },
   data () {
@@ -55,6 +59,24 @@ const ProductType = {
       this.defaultVal = value
       this.$emit('change', this.defaultVal)
     },
+    // 格式化数据
+    formatData(data){
+      if(this.level == 1){
+         data.forEach(item => {
+           if(item.children) item.children = []
+         })
+      }
+      if(this.level == 2){
+         data.forEach(item => {
+           if(item.children) {
+             item.children.forEach(child => {
+                if(child.children) child.children = []
+             })
+           }
+         })
+      }
+      return data
+    },
     //  产品分类列表 sysFlag: 1 箭冠 0 自建
     getProductType () {
       const params = {}
@@ -67,7 +89,8 @@ const ProductType = {
       if(this.isDealer){
         dealerProductTypeList(params).then(res => {
           if (res.status == 200) {
-            this.productTypeList = res.data
+            this.productTypeList = this.formatData(res.data)
+            console.log(this.formatData(res.data))
           } else {
             this.productTypeList = []
           }
@@ -75,7 +98,7 @@ const ProductType = {
       }else{
         productTypeQuery(params).then(res => {
           if (res.status == 200) {
-            this.productTypeList = res.data
+            this.productTypeList = this.formatData(res.data)
           } else {
             this.productTypeList = []
           }

+ 6 - 0
src/views/common/rangeDate.vue

@@ -3,6 +3,7 @@
     <div style="flex:1">
       <a-date-picker
         :size="size"
+        :id="id+'-startDate'"
         :locale="locale"
         v-model="startValue"
         :allowClear="allowClear"
@@ -31,6 +32,7 @@
     <div style="flex:1">
       <a-date-picker
         :size="size"
+        :id="id+'-endDate'"
         :locale="locale"
         v-model="endValue"
         :allowClear="allowClear"
@@ -62,6 +64,10 @@ import locale from 'ant-design-vue/es/date-picker/locale/zh_CN'
 import moment from 'moment'// 引入moment
 export default {
   props: {
+    id: {
+      type: String,
+      default: ''
+    },
     value: {
       type: Array,
       default: () => {

+ 5 - 0
src/views/common/rangeDateOld.vue

@@ -1,6 +1,7 @@
 <template>
   <a-range-picker
     style="width:100%"
+    :id="id"
     :ranges="ranges"
     :value="date"
     :size="size"
@@ -21,6 +22,10 @@ export default {
         return []
       }
     },
+    id: {
+      type: String,
+      default: ''
+    },
     size: {
       type: String,
       default: 'default'

+ 4 - 4
src/views/common/receivingAddress/chooseAddressModal.vue

@@ -46,14 +46,14 @@
               class="button-primary"
               v-if="record.defaultFlag!=1"
               @click="handleDefault(record)"
-              id="chooseAddressList-default-btn">设为默认</a-button>
+              :id="'chooseAddressList-default-'+record.id">设为默认</a-button>
             <a-button
               size="small"
               type="link"
               class="button-primary"
               v-if="record.readOnlyFlag!=1"
               @click="handleEdit(record)"
-              id="chooseAddressList-edit-btn"
+              :id="'chooseAddressList-edit-'+record.id"
             >编辑</a-button>
             <a-button
               size="small"
@@ -61,7 +61,7 @@
               class="button-error"
               v-if="record.readOnlyFlag!=1"
               @click="handleDel(record)"
-              id="chooseAddressList-del-btn"
+              :id="'chooseAddressList-del-'+record.id"
             >删除</a-button>
           </div>
         </template>
@@ -72,7 +72,7 @@
             type="link"
             class="button-primary"
             @click="handleChoose(record)"
-            id="chooseAddressList-choose-btn">选择</a-button>
+            :id="'chooseAddressList-sel-'+record.id">选择</a-button>
         </template>
       </s-table>
     </a-spin>

+ 9 - 11
src/views/common/receivingAddress/editAddressModal.vue

@@ -39,21 +39,21 @@
             <a-col span="8">
               <a-form-model-item prop="provinceSn">
                 <a-select id="editAddress-provinceSn" allowClear @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
-                  <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                  <a-select-option v-for="item in addrProvinceList" :id="item.areaSn" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
             <a-col span="8">
               <a-form-model-item prop="citySn">
                 <a-select id="editAddress-citySn" allowClear @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
-                  <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                  <a-select-option v-for="item in addrCityList" :id="item.areaSn" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
             <a-col span="8">
               <a-form-model-item prop="countySn">
                 <a-select id="editAddress-countySn" allowClear @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
-                  <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                  <a-select-option v-for="item in addrDistrictList" :id="item.areaSn" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
@@ -99,15 +99,15 @@ export default {
         wrapperCol: { span: 18 }
       },
       form: {
-        consigneeName: '',
-        consigneeTel: '',
-        provinceSn: undefined,
+        consigneeName: '', // 收货人
+        consigneeTel: '', // 联系电话
+        provinceSn: undefined, // 省
         provinceName: '',
-        citySn: undefined,
+        citySn: undefined, // 市
         cityName: '',
-        countySn: undefined,
+        countySn: undefined, // 区
         countyName: '',
-        addr: ''
+        addr: ''// 详细地址
       },
       rules: {
         consigneeName: [
@@ -151,7 +151,6 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -220,7 +219,6 @@ export default {
     setData (data) {
       this.isEdit = true
       Promise.all([getArea({ type: '2' }), getArea({ parentId: data.provinceSn, type: '3' }), getArea({ parentId: data.citySn, type: '4' })]).then(res => {
-        console.log(res)
         this.addrProvinceList = res[0].data
         const provinceName = this.addrProvinceList.find(item => item.id == data.provinceSn)
         if (provinceName && provinceName.name) {

+ 6 - 1
src/views/common/selectCust.vue

@@ -3,6 +3,7 @@
     show-search
     label-in-value
     :size="size"
+    :id="id"
     :value="dealerName"
     placeholder="请输入客户名称搜索"
     style="width: 100%"
@@ -15,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.customerSn" :disabled="isValidateEnabled ? item.enabledFlag=='0' : false">
+    <a-select-option v-for="item in data" :id="item.customerSn+'-'+id" :key="item.customerSn" :value="item.customerSn" :disabled="isValidateEnabled ? item.enabledFlag=='0' : false">
       {{ item.customerName }}
       <span v-if="isValidateEnabled && item.enabledFlag=='0'">(已禁用)</span>
     </a-select-option>
@@ -30,6 +31,10 @@ export default {
       type: Boolean,
       default: false
     },
+    id: {
+      type: String,
+      default: ''
+    },
     size: {
       type: String,
       default: 'default'

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

@@ -13,8 +13,8 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main" v-if="printList&&printList.length">
         <p style="color: #666;">选择打印机后,针式打印以后就会按这里设置的打印机去打印。<br>所以请正确选择打印机,如果选择错误,可以在顶部栏“设置”里面修改打印机。</p>
-        <a-select v-model="printIndex" @change="changePrint" style="width: 100%" placeholder="选择打印机">
-          <a-select-option v-for="item in printList" :key="'print-'+item.value" :value="item.name">
+        <a-select v-model="printIndex" @change="changePrint" style="width: 100%" id="print-options" placeholder="选择打印机">
+          <a-select-option v-for="item in printList" :id="'print-'+item.value" :key="'print-'+item.value" :value="item.name">
             {{ item.name }}
           </a-select-option>
         </a-select>
@@ -23,8 +23,8 @@
         <p>暂未发现打印机,请检查您的打印机是否连接正常</p>
       </div>
       <div class="btn-box">
-        <a-button type="default" style="margin-right:20px;" @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
-        <a-button type="primary" v-if="printList&&printList.length" class="button-error" @click="handleCommonOk">{{ okText }}</a-button>
+        <a-button type="default" id="print-cancel" style="margin-right:20px;" @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
+        <a-button type="primary" id="print-ok" v-if="printList&&printList.length" class="button-error" @click="handleCommonOk">{{ okText }}</a-button>
       </div>
     </a-spin>
   </a-modal>

+ 1 - 1
src/views/customerManagement/customerInfo/detailModal.vue

@@ -56,7 +56,7 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemId: { // 客户id
       type: [Number, String],
       default: ''
     }

+ 20 - 9
src/views/customerManagement/customerInfo/edit.vue

@@ -57,7 +57,7 @@
           <a-row :gutter="15">
             <a-col :span="24">
               <a-form-model-item label="客户地址" prop="countySn" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
-                <AreaList changeOnSelect ref="areaList" v-model="areaVal" @change="areaChange"></AreaList>
+                <AreaList id="customerManagementEdit-area" changeOnSelect ref="areaList" v-model="areaVal" @change="areaChange"></AreaList>
               </a-form-model-item>
             </a-col>
             <a-col :span="24">
@@ -98,7 +98,7 @@
             <a-col :span="8">
               <a-form-model-item label="收款方式" prop="settleStyleSn">
                 <a-select id="customerManagementEdit-settleStyleSn" v-model="form.settleStyleSn" allowClear placeholder="请选择收款方式">
-                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
+                  <a-select-option v-for="item in settleStyleList" :id="item.settleStyleSn" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
@@ -108,6 +108,13 @@
               </a-form-model-item>
             </a-col>
           </a-row>
+          <a-row :gutter="15">
+            <a-col :span="8" v-if="form.relationType=='child'">
+              <a-form-model-item label="采购范围" prop="scope">
+                <a-checkbox v-model="form.scope" :checked="form.scope" id="customerManagementEdit-scope">自建产品</a-checkbox>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
           <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 30px;">
             <a-button type="primary" @click="handleSubmit" size="large" id="customerManagementEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
           </a-form-model-item>
@@ -129,7 +136,7 @@ export default {
   components: { STable, VSelect, custType, AreaList, dealerList },
   mixins: [commonMixin],
   props: {
-    model: {
+    model: { // 组件形式
       type: String,
       default: 'page'
     }
@@ -161,16 +168,18 @@ export default {
         customerTypeSn: undefined, //  客户类型
         priceType: '', //  价格类型
         settleStyleSn: undefined, //  收款方式
-        dealerSn: undefined // 关联经销商
+        dealerSn: undefined, // 关联经销商
+        scope: true // 采购范围
       },
       dealerName: undefined, // 关联经销商名称
-      areaVal: [],
+      areaVal: [], // 地区值
       rules: {
         customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
         contactMobile: [{ required: false, pattern: /^\d{11}$/, message: '请输入正确的手机号', trigger: 'blur' }],
         countySn: [{ required: true, message: '请选择客户地址', trigger: 'change' }],
         priceType: [{ required: true, message: '请选择价格类型', trigger: 'change' }],
-        settleStyleSn: [{ required: true, message: '请选择收款方式', trigger: 'change' }]
+        settleStyleSn: [{ required: true, message: '请选择收款方式', trigger: 'change' }],
+        scope: [{ required: true, message: '请选择采购范围', trigger: 'change' }]
       },
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
@@ -188,6 +197,7 @@ export default {
         this.form.dealerSn = undefined
       }
     },
+    // 过滤空格
     filterEmpty () {
       let str = this.form.customerName
       str = str.replace(/\ +/g, '')
@@ -195,8 +205,8 @@ export default {
       str = str.replace(/[\r\n]/g, '')
       this.form.customerName = str
     },
+    // 选择地区
     areaChange (val, opts) {
-      console.log(opts)
       this.form.provinceSn = val[0] ? val[0] : undefined
       this.form.provinceName = opts[0] ? opts[0].name : ''
       this.form.citySn = val[1] ? val[1] : undefined
@@ -204,7 +214,7 @@ export default {
       this.form.countySn = val[2] ? val[2] : undefined
       this.form.countyName = opts[2] ? opts[2].name : ''
     },
-    //  获取客户信息
+    // 获取客户信息
     getDetail () {
       const _this = this
       custFindById({ id: this.$route.params.id }).then(res => {
@@ -243,6 +253,7 @@ export default {
           const form = JSON.stringify(_this.form)
           const formInfo = JSON.parse(form)
           delete formInfo.satelliteFlag
+          formInfo.scope = formInfo.scope ? 1 : 0 // 采购范围
           formInfo.id = this.$route.params.id && this.model == 'page' ? this.$route.params.id : null
           _this.spinning = true
           custSave(formInfo).then(res => {
@@ -261,7 +272,6 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -275,6 +285,7 @@ export default {
       this.getSettleStyleList() // 收款方式
       this.$refs.ruleForm.resetFields()
     },
+    // 初始化页面
     initPage () {
       this.getBaseData()
       if (this.$route.params.id) {

+ 18 - 15
src/views/customerManagement/customerInfo/list.vue

@@ -17,7 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="最后销售时间">
-                <rangeDate ref="rangeSaleDate" @change="dateSaleChange" />
+                <rangeDate id="customerManagementList-date" ref="rangeSaleDate" @change="dateSaleChange" />
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -39,24 +39,24 @@
               </a-col> -->
               <a-col :md="6" :sm="24">
                 <a-form-item label="客户地址">
-                  <AreaList changeOnSelect ref="areaList" @change="areaChange"></AreaList>
+                  <AreaList id="customerManagementList-area" changeOnSelect ref="areaList" @change="areaChange"></AreaList>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="客户类型">
-                  <custType v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型"></custType>
+                  <custType id="customerManagementList-custType" v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型"></custType>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="启用状态">
-                  <v-select code="ENABLE_FLAG" v-model="queryParam.enabledFlag" allowClear placeholder="请选择启用状态"></v-select>
+                  <v-select id="customerManagementList-flag" code="ENABLE_FLAG" v-model="queryParam.enabledFlag" allowClear placeholder="请选择启用状态"></v-select>
                 </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="customerManagementList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="customerManagementList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="customerManagementList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -88,25 +88,31 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record)"
-            id="customerManagementList-edit-btn">编辑</a-button>
+            :id="'customerManagementList-edit-'+record.id">编辑</a-button>
           <a-button
             size="small"
             v-if="$hasPermissions('B_customer_customerInfo_detail')"
             type="link"
             class="button-success"
             @click="handleDetail(record)"
-            id="customerManagementList-detail-btn">详情</a-button>
+            :id="'customerManagementList-detail-'+record.id">详情</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>
+            :id="'customerManagementList-merge-'+record.id">合并</a-button>
           <span v-if="!$hasPermissions('B_customer_customerInfo_edit') && !$hasPermissions('B_customer_customerInfo_detail')">--</span>
         </template>
         <template slot="enableAction" slot-scope="text, record">
-          <a-switch v-if="$hasPermissions('B_customer_customerInfo_enable')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
+          <a-switch
+            :id="'customerManagementList-switch-'+record.id"
+            v-if="$hasPermissions('B_customer_customerInfo_enable')"
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            v-model="record.enabledFlag"
+            @change="changeFlagHandle(text, record)"/>
           <span v-else :style="{color:(record.enabledFlag==1?'#00aa00':'#999')}"> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span>
         </template>
       </s-table>
@@ -147,7 +153,7 @@ export default {
         dealerFlag: undefined, //  是否卫星仓客户
         customerTypeSn: undefined, //  客户类型
         enabledFlag: '1', //  启用状态
-        relationType: undefined
+        relationType: undefined // 客户关系
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
@@ -198,6 +204,7 @@ export default {
       this.queryParam.saleBeginDate = date[0] ? date[0] : ''
       this.queryParam.saleEndDate = date[1] ? date[1] : ''
     },
+    // 地区
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : undefined
       this.queryParam.citySn = val[1] ? val[1] : undefined
@@ -281,6 +288,7 @@ export default {
       this.customerTemp = row
       this.openMergeModal = true
     },
+    // 关闭合并客户弹框
     closeMergeModal (flag) {
       this.customerTemp = ''
       this.openMergeModal = false
@@ -293,11 +301,6 @@ export default {
       this.itemId = ''
       this.openModal = false
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 4 - 2
src/views/customerManagement/customerInfo/mergeCustomerModal.vue

@@ -24,6 +24,7 @@
         <a-form-model-item label="被合并的客户名称:" prop="customerSnSource">
           <custList
             ref="custList"
+            id="merge-form-cust"
             :notSn="form.customerSnTarget"
             dealerFlag="all"
             dealerDisabled
@@ -53,7 +54,7 @@ export default {
       type: Boolean,
       default: false
     },
-    params: {
+    params: { // 参数
       type: Object,
       default () {
         return {}
@@ -88,17 +89,18 @@ export default {
         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({

+ 5 - 5
src/views/customerManagement/customerMerge/index.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="合并时间">
-                <rangeDate ref="customerMergeDate" @change="dateSaleChange" />
+                <rangeDate id="customerManagementList-mergeDate" ref="customerMergeDate" @change="dateSaleChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -58,10 +58,10 @@ export default {
       spinning: false,
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: undefined,
-        endDate: undefined,
-        customerNameSource: '',
-        customerNameMain: ''
+        beginDate: undefined, // 开始时间
+        endDate: undefined, // 结束时间
+        customerNameSource: '', // 合并前客户名称
+        customerNameMain: '' // 合并后客户名称
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [

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

@@ -100,6 +100,7 @@ export default {
     }
   },
   computed: {
+    // 折让金额
     discountAmount () {
       let val = 0
       if (this.basicInfoData && this.basicInfoData.discountAmount) {
@@ -111,7 +112,7 @@ export default {
   methods: {
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/financialManagement/companyCollectionPayment/list' })
+      this.$router.push({ name: 'companyCollectionPaymentList' })
     },
     // 详情
     getDetail () {

+ 13 - 11
src/views/financialManagement/companyCollectionPayment/list.vue

@@ -40,7 +40,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="结算时间">
-                  <rangeDate ref="rangeDate" @change="dateChange" />
+                  <rangeDate id="companyCollectionPaymentList-rangeDate" ref="rangeDate" @change="dateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -59,7 +59,7 @@
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyCollectionPaymentList-refresh">查询</a-button>
                 <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyCollectionPaymentList-reset">重置</a-button>
-                <a @click="advanced=!advanced" style="margin-left: 8px">
+                <a @click="advanced=!advanced" style="margin-left: 8px" id="companyCollectionPaymentList-advanced">
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'"/>
                 </a>
@@ -97,7 +97,7 @@
         </template>
         <!-- 结算单号 -->
         <template slot="unitSettleNo" slot-scope="text, record">
-          <span :class="$hasPermissions('M_companyCollectionPayment_detail')?'table-td-link':'common'" @click="handleDetail(record)">{{ record.unitSettleNo }}</span>
+          <span :id="'companyCollectionPaymentList-detail-'+record.id" :class="$hasPermissions('M_companyCollectionPayment_detail')?'table-td-link':'common'" @click="handleDetail(record)">{{ record.unitSettleNo }}</span>
         </template>
       </s-table>
     </a-spin>
@@ -122,13 +122,13 @@ export default {
       tableHeight: 0,
       // 查询参数
       queryParam: {
-        beginDate: '',
-        endDate: '',
-        settleClientNameCurrent: '',
-        settleClientType: undefined,
-        settleType: undefined,
-        unitSettleNo: '',
-        settleStyleSn: undefined
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        settleClientNameCurrent: '', // 客户名称
+        settleClientType: undefined, // 单位类型
+        settleType: undefined, // 结算类型
+        unitSettleNo: '', // 结算单号
+        settleStyleSn: undefined // 结算方式
       },
       // 表头
       columns: [
@@ -163,7 +163,7 @@ export default {
         })
       },
       total: 0, //  总条数
-      productTotal: null
+      productTotal: null // 合计
     }
   },
   methods: {
@@ -202,12 +202,14 @@ export default {
       this.queryParam.settleStyleSn = undefined
       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 - 230

+ 16 - 14
src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue

@@ -31,12 +31,12 @@
             </a-col>
             <a-col :md="10" :sm="24">
               <a-form-item label="关联单据创建时间">
-                <rangeDate ref="createDate" @change="createDateChange" />
+                <rangeDate id="chooseBillModal-createDate" ref="createDate" @change="createDateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="7" :sm="24">
               <a-form-item label="审核时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="chooseBillModal-auditTime" ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="5" :sm="24">
@@ -83,17 +83,17 @@ export default {
       type: Boolean,
       default: false
     },
-    nowChoose: {
+    nowChoose: { // 已选数据
       type: Array,
       default: () => {
         return []
       }
     },
-    settleClientSn: {
+    settleClientSn: { // 结算客户sn
       type: String,
       default: ''
     },
-    settleClientType: {
+    settleClientType: { // 结算客户类型
       type: String,
       default: ''
     }
@@ -105,12 +105,12 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       disabled: false,
       queryParam: {
-        auditBeginDate: '',
-        auditEndDate: '',
-        bizNo: '',
-        bizType: undefined,
-        bizCreateBeginDate: undefined,
-        bizCreateEndDate: undefined
+        auditBeginDate: '', // 审核时间开始
+        auditEndDate: '', // 审核时间结束
+        bizNo: '', // 单据号
+        bizType: undefined, // 单据类型
+        bizCreateBeginDate: undefined, // 创建时间开始
+        bizCreateEndDate: undefined // 创建时间结束
       },
       allData: [],
       // 表头
@@ -136,20 +136,22 @@ export default {
             for (var i = 0; i < data.length; i++) {
               data[i].no = i + 1
               data[i].settleAmount = data[i].unsettleAmount
+              // 格式化已选数据
               const ind = this.nowChoose.findIndex(item => item.id == data[i].id)
               if (ind != -1) {
                 selectedRowKeys.push(data[i].id)
                 selectedRows.push(data[i])
               }
             }
-            this.$refs.table.setTableSelected(selectedRowKeys, selectedRows) // 设置表格选中项
+            // 设置表格已选中项
+            this.$refs.table.setTableSelected(selectedRowKeys, selectedRows)
             this.disabled = false
           }
           this.spinning = false
           return data
         })
       },
-      rowSelectionInfo: null
+      rowSelectionInfo: null // 选择的数据
     }
   },
   methods: {
@@ -162,7 +164,7 @@ export default {
       this.queryParam.bizCreateBeginDate = date[0]
       this.queryParam.bizCreateEndDate = date[1]
     },
-    //  时间  change
+    //  审核时间  change
     dateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]

+ 25 - 23
src/views/financialManagement/companyReceivablePayable/collectionPayment.vue

@@ -167,6 +167,7 @@
         @click="handleSubmit"
         style="padding: 0 60px;">提交</a-button>
     </div>
+    <!-- 选择单据 -->
     <choose-bill-modal
       ref="chooseBillModal"
       :openModal="openModal"
@@ -203,8 +204,8 @@ export default {
       loading: false, //  表格加载中
       remarksFlag: false, // 打印备注
       chooseQueryParam: {
-        productCode: '',
-        productName: ''
+        productCode: '', // 产品编码
+        productName: '' // 产品名称
       },
       // 表头
       chooseColumns: [
@@ -218,19 +219,19 @@ export default {
         { title: '本次结算金额', scopedSlots: { customRender: 'settleAmount' }, width: '15%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
-      chooseLoadData: [],
+      chooseLoadData: [], // 已选数据
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
       },
       form: {
-        amountSettled: 0,
+        amountSettled: 0, // 本次结算金额
         discountAmount: 0, //  折让金额
-        settleStyleSn: undefined,
-        settleClientName: '',
-        settleAccountSn: undefined,
-        settleAccountName: undefined,
-        remark: ''
+        settleStyleSn: undefined, // 结算方式
+        settleClientName: '', // 客户名称
+        settleAccountSn: undefined, // 结算账户
+        settleAccountName: undefined, // 结算账户名称
+        remark: '' // 备注
       },
       rules: {
         amountSettled: [{ required: true, message: '请输入本次结算金额,系统将自动分配到已选单据上', trigger: 'change' }],
@@ -240,9 +241,9 @@ export default {
       },
       openModal: false, //  弹框
       isPositive: true, // 是否是正值
-      isChangeAs: false,
-      maxAmountSettled: 0,
-      enableFundAccount: false
+      isChangeAs: false, // 防止重复计算
+      maxAmountSettled: 0, // 本次结算金额最大值
+      enableFundAccount: false // 结算账户状态是否启用
     }
   },
   computed: {
@@ -301,12 +302,12 @@ export default {
         this.form.settleAccountSn = undefined
       }
     },
+    // 选择结算账户
     settleAccountChange (v, name) {
       this.form.settleAccountName = name
     },
     // 应结算金额
     amountSettledChange () {
-      console.log(this.isChangeAs)
       if (!this.isChangeAs) {
         let val = 0
         this.chooseLoadData.map(item => {
@@ -320,7 +321,6 @@ export default {
     },
     // 修改本次结算金额,自动分配
     amountSettledTotalChange (v) {
-      console.log(this.isChangeAs, v, this.totalBalance, this.isPositive)
       if (v <= Math.abs(this.totalBalance)) {
         this.isChangeAs = true
         const sa = v
@@ -340,7 +340,6 @@ export default {
             break
           }
         }
-        console.log(ti, temp, sa)
         list[ti].settleAmount = (list[ti].settleAmount - (temp - sa) * (this.isPositive ? 1 : -1)).toFixed(2)
         // ti 之后的都改成0
         for (let i = ti + 1; i < list.length; i++) {
@@ -360,6 +359,7 @@ export default {
       this.chooseLoadData.splice(ind, 1)
       this.amountSettledChange()
     },
+    // 获取已选数字,并格式化
     getParams () {
       const _this = this
       const form = _this.form
@@ -400,25 +400,25 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
     },
+    // 返回列表
+    handleBack () {
+      this.$router.push({ name: `companyReceivablePayableList` })
+    },
+    // 选择单据成功
     handleOk (selectedRows) {
       this.chooseLoadData = selectedRows.sort((a, b) => {
         const at = new Date(a.auditTime).getTime()
         const bt = new Date(b.auditTime).getTime()
         return at - bt
       })
-      // this.chooseLoadData = selectedRows.reverse()
+      // 重新应结算金额计算
       this.amountSettledChange()
     },
-    // 返回列表
-    handleBack () {
-      this.$router.push({ path: `/financialManagement/companyReceivablePayable/list` })
-    },
-    // 关闭
+    // 关闭选择单据弹框
     handleClose () {
       this.openModal = false
     },
@@ -433,9 +433,11 @@ export default {
         this.chooseLoadData = res.data || []
         this.loading = false
         this.disabled = false
+        // 应结算金额计算
         this.amountSettledChange()
       })
     },
+    // 初始化页面
     pageInit () {
       this.chooseLoadData = []
       this.getsettleInfoAllList()
@@ -455,7 +457,7 @@ export default {
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
       this.pageInit()
     }
-    // 结算账户状态查询
+    // 结算账户启用状态查询
     if (this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')) {
       this.GetSettleAccountState().then(res => {
         if (res.status == 200) {

+ 5 - 22
src/views/financialManagement/companyReceivablePayable/detail.vue

@@ -20,20 +20,13 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
-                  <rangeDate ref="rangeDate" @change="dateChange" />
+                  <rangeDate id="companyReceivablePayableDetail-auditTime" ref="rangeDate" @change="dateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <span class="table-page-search-submitButtons">
                   <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableDetail-refresh">查询</a-button>
                   <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="companyReceivablePayableDetail-reset">重置</a-button>
-                  <!-- <a-button
-                    type="danger"
-                    style="margin-left: 8px"
-                    @click="handleExport"
-                    :disabled="disabled"
-                    :loading="exportLoading"
-                    id="companyReceivablePayableDetail-export-btn">导出</a-button> -->
                 </span>
               </a-col>
             </a-row>
@@ -73,7 +66,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-// import { downloadExcel } from '@/libs/JGPrint.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { settleInfoList, settleInfoQueryReceiptOrPaySum } from '@/api/settle'
@@ -88,9 +80,9 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       // 查询参数
       queryParam: {
-        auditBeginDate: '',
-        auditEndDate: '',
-        bizNo: ''
+        auditBeginDate: '', // 开始审核时间
+        auditEndDate: '', // 结束审核时间
+        bizNo: '' // 单据号
       },
       exportLoading: false, // 导出loading
       // 表头
@@ -136,7 +128,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/financialManagement/companyReceivablePayable/list' })
+      this.$router.push({ name: 'companyReceivablePayableList' })
     },
     // 合计
     getTotal (param) {
@@ -155,15 +147,6 @@ export default {
       this.queryParam.auditEndDate = ''
       this.queryParam.bizNo = ''
       this.$refs.table.refresh(true)
-    },
-    //  导出
-    handleExport () {
-      // const params = this.queryParam
-      // this.exportLoading = true
-      // customerBundleExportDelay(params).then(res => {
-      //   this.exportLoading = false
-	  // downloadExcel(res, '单位应收应付')
-      // })
     }
   },
   mounted () {

+ 8 - 6
src/views/financialManagement/companyReceivablePayable/list.vue

@@ -64,14 +64,14 @@
             type="link"
             class="button-primary"
             @click="handleCollectionPayment(record)"
-            id="companyReceivablePayableList-collectionPayment-btn">收付款</a-button>
+            :id="'companyReceivablePayableList-collectionPayment-'+record.id">收付款</a-button>
           <a-button
             v-if="$hasPermissions('M_companyReceivablePayable_detail')"
             size="small"
             type="link"
             class="button-success"
             @click="handleDetail(record)"
-            id="companyReceivablePayableList-detail-btn">详情</a-button>
+            :id="'companyReceivablePayableList-detail-'+record.id">详情</a-button>
           <span v-if="!$hasPermissions('M_collectionPayment') && !$hasPermissions('M_companyReceivablePayable_detail')">--</span>
         </template>
       </s-table>
@@ -95,8 +95,8 @@ export default {
       tableHeight: 0,
       // 查询参数
       queryParam: {
-        settleClientNameCurrent: '',
-        settleClientType: undefined
+        settleClientNameCurrent: '', // 客户名称
+        settleClientType: undefined // 单位类型
       },
       // 表头
       columns: [
@@ -130,7 +130,7 @@ export default {
         })
       },
       total: 0, //  总条数
-      productTotal: null
+      productTotal: null // 金额合计数据
     }
   },
   methods: {
@@ -166,15 +166,17 @@ export default {
       this.queryParam.settleClientType = undefined
       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 - 230
+      this.tableHeight = window.innerHeight - tableSearchH - 236
     }
   },
   watch: {

+ 29 - 22
src/views/financialManagement/companyReceivablePayableNew/chooseBillModal.vue

@@ -31,12 +31,12 @@
             </a-col>
             <a-col :md="10" :sm="24">
               <a-form-item label="关联单据创建时间">
-                <rangeDate ref="createDate" @change="createDateChange" />
+                <rangeDate id="chooseBillModal-createDate" ref="createDate" @change="createDateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="7" :sm="24">
               <a-form-item label="审核时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="chooseBillModal-auditDate" ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="8" :sm="24">
@@ -48,7 +48,13 @@
       </div>
       <div class="btn-cont">
         <a-button type="primary" id="chooseBillModal-modal-save" @click="handleSave">批量添加</a-button>
-        <a-button v-if="nowChoose.length" type="primary" ghost style="margin-left: 15px;" id="chooseBillModal-modal-reSel" @click="handleReSel">重新选择</a-button>
+        <a-button
+          v-if="nowChoose.length"
+          type="primary"
+          ghost
+          style="margin-left: 15px;"
+          id="chooseBillModal-modal-reSel"
+          @click="handleReSel">重新选择</a-button>
         <span v-if="totalNums" style="margin-left: 15px;">已选{{ totalNums }}项</span>
       </div>
       <!-- 列表 -->
@@ -85,23 +91,24 @@ export default {
       type: Boolean,
       default: false
     },
-    nowChoose: {
+    nowChoose: { // 已选数据
       type: Array,
       default: () => {
         return []
       }
     },
-    settleClientSn: {
+    settleClientSn: { // 结算账户sn
       type: String,
       default: ''
     },
-    settleClientType: {
+    settleClientType: { // 结算账户类型
       type: String,
       default: ''
     }
   },
-  computed:{
-    totalNums(){
+  computed: {
+    // 已选总记录数
+    totalNums () {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRows && this.rowSelectionInfo.selectedRows.length
     }
   },
@@ -112,14 +119,14 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       disabled: false,
       queryParam: {
-        auditBeginDate: '',
-        auditEndDate: '',
-        bizNo: '',
-        bizType: undefined,
-        bizCreateBeginDate: undefined,
-        bizCreateEndDate: undefined
+        auditBeginDate: '', // 审核开始时间
+        auditEndDate: '', // 审核结束时间
+        bizNo: '', // 单据号
+        bizType: undefined, // 单据类型
+        bizCreateBeginDate: undefined, // 创建开始时间
+        bizCreateEndDate: undefined // 创建结束时间
       },
-      allData: [],
+      allData: [], // 全部单据数据
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
@@ -154,17 +161,16 @@ export default {
           return data
         })
       },
-      rowSelectionInfo: null
+      rowSelectionInfo: null // 已选数据
     }
   },
   methods: {
     // 表格选中项
     rowSelectionFun (obj) {
-      console.log(obj)
       this.rowSelectionInfo = obj || null
     },
     // 重新选择
-    handleReSel(){
+    handleReSel () {
       this.$emit('ok', [])
       this.resetSearchForm()
     },
@@ -173,18 +179,18 @@ export default {
       this.queryParam.bizCreateBeginDate = date[0]
       this.queryParam.bizCreateEndDate = date[1]
     },
-    //  时间  change
+    //  审核时间  change
     dateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
     // 确定
     handleSave () {
-      if(this.totalNums){
+      if (this.totalNums) {
         this.$emit('ok', this.rowSelectionInfo && this.rowSelectionInfo.selectedRows)
         this.resetSearchForm()
-      }else{
-        this.$message.info("请选择单据")
+      } else {
+        this.$message.info('请选择单据')
       }
     },
     // 重置
@@ -211,6 +217,7 @@ export default {
       const _this = this
       if (!newValue) {
         _this.$emit('close')
+        // 重置
         _this.$refs.table.clearSelected() // 清空表格选中项
         _this.selectedRowKeys = []
         _this.selectedRows = []

+ 37 - 34
src/views/financialManagement/companyReceivablePayableNew/collectionPayment.vue

@@ -1,11 +1,11 @@
 <template>
-  <div class="jg-page-wrap collectionPayment-wrap">
+  <div class="jg-page-wrap collectionPaymentNew-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="collectionPayment-back" >
+      <a-page-header :ghost="false" :backIcon="false" class="collectionPaymentNew-back" >
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <span style="margin-right:30px;color: #000;font-size: 14px;font-weight: 600;">客户:{{ $route.params.name!='undefined'?$route.params.name: '--' }}</span>
-          <a-button id="purchaseNewOrderEdit-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
+          <a-button id="collectionPayEdit-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
         </template>
         <template slot="extra" v-if="$hasPermissions('B_cPayment_printAndExport')">
           <div style="margin-top: 5px;">
@@ -17,14 +17,14 @@
               </div>
             </PrintPanel>
             <a-divider type="vertical" />
-            <a-button id="salesNewOrderEdit-del-btn" class="button-default" type="link" @click="handleOk([])"><a-icon type="close" />清空单据</a-button>
+            <a-button id="scollectionPayEdit-del-btn" class="button-default" type="link" @click="handleOk([])"><a-icon type="close" />清空单据</a-button>
             <a-divider type="vertical" />
-            <a-button id="salesNewOrderEdit-add-btn" type="link" @click="openModal=true"><a-icon type="plus" />选择单据</a-button>
+            <a-button id="scollectionPayEdit-add-btn" type="link" @click="openModal=true"><a-icon type="plus" />选择单据</a-button>
           </div>
         </template>
       </a-page-header>
       <!-- 已选单据 -->
-      <a-card size="small" :bordered="false" class="collectionPayment-cont">
+      <a-card size="small" :bordered="false" class="collectionPaymentNew-cont">
         <div class="table-operator">
           <div class="alert-message">
             共 <strong>{{ chooseLoadData.length }}</strong>条明细 ,
@@ -53,7 +53,7 @@
           <!-- 本次结算金额 -->
           <template slot="settleAmount" slot-scope="text, record">
             <a-input-number
-              id="collectionPayment-settleAmount"
+              :id="'collectionPaymentNew-settleAmount-'+record.id"
               v-model="record.settleAmount"
               :precision="2"
               :min="record.unsettleAmount<0 ? record.unsettleAmount : 0"
@@ -65,15 +65,15 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="collectionPayment-del-btn">移除</a-button>
+            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" :id="'collectionPaymentNew-del-'+record.id">移除</a-button>
           </template>
         </a-table>
       </a-card>
-      <a-card size="small" :bordered="false" class="collectionPayment-cont">
+      <a-card size="small" :bordered="false" class="collectionPaymentNew-cont">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="收付款信息">
             <a-form-model
-              id="collectionPayment-form"
+              id="collectionPaymentNew-form"
               ref="ruleForm"
               :model="form"
               :rules="rules"
@@ -86,7 +86,7 @@
                       本次结算金额(<span :class="isPositive ? 'green':'red'">{{ isPositive ? '收款' : '付款' }}</span>)
                     </template>
                     <a-input-number
-                      id="collectionPayment-amountSettled"
+                      id="collectionPaymentNew-amountSettled"
                       v-model="form.amountSettled"
                       @change="amountSettledTotalChange"
                       :precision="2"
@@ -98,7 +98,7 @@
                 <a-col span="12">
                   <a-form-model-item label="折让金额" prop="discountAmount">
                     <a-input-number
-                      id="collectionPayment-discountAmount"
+                      id="collectionPaymentNew-discountAmount"
                       v-model="form.discountAmount"
                       :precision="2"
                       :min="0"
@@ -114,7 +114,7 @@
                       本次实际结算金额(<span :class="isPositive ? 'green':'red'">{{ isPositive ? '收款' : '付款' }}</span>)
                     </template>
                     <a-input-number
-                      id="collectionPayment-actualSettlementAmount"
+                      id="collectionPaymentNew-actualSettlementAmount"
                       v-model="actualSettlementAmount"
                       disabled
                       :precision="2"
@@ -126,7 +126,7 @@
                   <a-form-model-item label="结算方式" prop="settleStyleSn">
                     <v-select
                       code="SETTLE_STYLE"
-                      id="collectionPayment-settleStyleSn"
+                      id="collectionPaymentNew-settleStyleSn"
                       v-model="form.settleStyleSn"
                       @change="settleStyleChange"
                       allowClear
@@ -137,7 +137,7 @@
                 <a-col span="12">
                   <a-form-model-item v-if="enableFundAccount" label="结算账户" prop="settleAccountSn">
                     <settleAccount
-                      id="collectionPayment-settleAccountSn"
+                      id="collectionPaymentNew-settleAccountSn"
                       v-model="form.settleAccountSn"
                       :settleStyleSn="form.settleStyleSn"
                       @change="settleAccountChange"
@@ -147,7 +147,7 @@
                 </a-col>
                 <a-col span="24">
                   <a-form-model-item label="备注" prop="remark" :label-col="{ span: 3 }" :wrapper-col="{ span: 20 }">
-                    <a-textarea id="collectionPayment-remark" :maxLength="100" v-model="form.remark" placeholder="请输入备注(最多100个字符)" allowClear />
+                    <a-textarea id="collectionPaymentNew-remark" :maxLength="100" v-model="form.remark" placeholder="请输入备注(最多100个字符)" allowClear />
                   </a-form-model-item>
                 </a-col>
               </a-row>
@@ -159,13 +159,14 @@
     <div class="affix-cont">
       <a-button
         type="primary"
-        id="collectionPayment-submit"
+        id="collectionPaymentNew-submit"
         size="large"
         :disabled="spinning"
         class="button-primary"
         @click="handleSubmit"
         style="padding: 0 60px;">提交</a-button>
     </div>
+    <!-- 单据选择 -->
     <choose-bill-modal
       ref="chooseBillModal"
       :openModal="openModal"
@@ -202,8 +203,8 @@ export default {
       spinning: false,
       loading: false, //  表格加载中
       chooseQueryParam: {
-        productCode: '',
-        productName: ''
+        productCode: '', // 产品编码
+        productName: '' // 产品名称
       },
       // 表头
       chooseColumns: [
@@ -225,13 +226,13 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        amountSettled: 0,
+        amountSettled: 0, // 本次结算金额
         discountAmount: 0, //  折让金额
-        settleStyleSn: undefined,
-        settleClientName: '',
-        settleAccountSn: undefined,
-        settleAccountName: undefined,
-        remark: ''
+        settleStyleSn: undefined, // 结算方式sn
+        settleClientName: '', // 客户名称
+        settleAccountSn: undefined, // 结算账户sn
+        settleAccountName: undefined, // 结算账户名称
+        remark: '' // 备注
       },
       rules: {
         amountSettled: [{ required: true, message: '请输入本次结算金额,系统将自动分配到已选单据上', trigger: 'change' }],
@@ -241,9 +242,9 @@ export default {
       },
       openModal: false, //  弹框
       isPositive: true, // 是否是正值
-      isChangeAs: false,
-      maxAmountSettled: 0,
-      enableFundAccount: false,
+      isChangeAs: false, // 防止重复计算
+      maxAmountSettled: 0, // 结算金额最大值
+      enableFundAccount: false, // 结算账户是否开启
       printTotalKs: false, // 打印原创编码
       printTotalNums: false, // 打印全部名称
       remarksFlag: false // 打印备注
@@ -310,6 +311,7 @@ export default {
         this.form.settleAccountSn = undefined
       }
     },
+    // 选择结算账户
     settleAccountChange (v, name) {
       this.form.settleAccountName = name
     },
@@ -329,7 +331,6 @@ export default {
     },
     // 修改本次结算金额,自动分配
     amountSettledTotalChange (v) {
-      console.log(this.isChangeAs, v, this.totalBalance, this.isPositive)
       if (v <= Math.abs(this.totalBalance)) {
         this.isChangeAs = true
         const sa = v
@@ -349,7 +350,6 @@ export default {
             break
           }
         }
-        console.log(ti, temp, sa)
         list[ti].settleAmount = (list[ti].settleAmount - (temp - sa) * (this.isPositive ? 1 : -1)).toFixed(2)
         // ti 之后的都改成0
         for (let i = ti + 1; i < list.length; i++) {
@@ -369,6 +369,7 @@ export default {
       this.chooseLoadData.splice(ind, 1)
       this.amountSettledChange()
     },
+    // 获取格式化后的提交参数
     getParams () {
       const _this = this
       const form = _this.form
@@ -414,6 +415,7 @@ export default {
         }
       })
     },
+    // 选择单据成功
     handleOk (selectedRows) {
       if (selectedRows.length) {
         this.chooseLoadData = this.chooseLoadData.concat(selectedRows).sort((a, b) => {
@@ -424,12 +426,12 @@ export default {
       } else {
         this.chooseLoadData = selectedRows
       }
-
+      // 计算结算金额
       this.amountSettledChange()
     },
     // 返回列表
     handleBack () {
-      this.$router.push({ path: `/financialManagement/companyReceivablePayableNew/list` })
+      this.$router.push({ name: `companyReceivablePayableNewList` })
     },
     // 关闭
     handleClose () {
@@ -449,6 +451,7 @@ export default {
         this.amountSettledChange()
       })
     },
+    // 初始化页面
     pageInit () {
       const vm = this
       vm.$nextTick(() => {
@@ -487,7 +490,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
-  .collectionPayment-wrap{
+  .collectionPaymentNew-wrap{
     position: relative;
     height: 100%;
     padding-bottom: 51px;
@@ -496,7 +499,7 @@ export default {
       overflow-y: auto;
       height: 100%;
     }
-    .collectionPayment-cont{
+    .collectionPaymentNew-cont{
       margin-top: 6px;
       .green{
         color: #19be6b;

+ 6 - 23
src/views/financialManagement/companyReceivablePayableNew/detail.vue

@@ -20,20 +20,13 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
-                  <rangeDate ref="rangeDate" @change="dateChange" />
+                  <rangeDate id="companyReceivablePayableDetail-auditTime" ref="rangeDate" @change="dateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <span class="table-page-search-submitButtons">
                   <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableDetail-refresh">查询</a-button>
                   <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="companyReceivablePayableDetail-reset">重置</a-button>
-                  <!-- <a-button
-                    type="danger"
-                    style="margin-left: 8px"
-                    @click="handleExport"
-                    :disabled="disabled"
-                    :loading="exportLoading"
-                    id="companyReceivablePayableDetail-export-btn">导出</a-button> -->
                 </span>
               </a-col>
             </a-row>
@@ -73,7 +66,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-// import { downloadExcel } from '@/libs/JGPrint.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { settleInfoList, settleInfoQueryReceiptOrPaySum } from '@/api/settle'
@@ -88,9 +80,9 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       // 查询参数
       queryParam: {
-        auditBeginDate: '',
-        auditEndDate: '',
-        bizNo: ''
+        auditBeginDate: '', // 开始审核时间
+        auditEndDate: '', // 结束审核时间
+        bizNo: '' // 单据号
       },
       exportLoading: false, // 导出loading
       // 表头
@@ -131,14 +123,14 @@ export default {
     }
   },
   methods: {
-    //  时间  change
+    //  审核时间  change
     dateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/financialManagement/companyReceivablePayableNew/list' })
+      this.$router.push({ name: 'companyReceivablePayableNewList' })
     },
     // 合计
     getTotal (param) {
@@ -157,15 +149,6 @@ export default {
       this.queryParam.auditEndDate = ''
       this.queryParam.bizNo = ''
       this.$refs.table.refresh(true)
-    },
-    //  导出
-    handleExport () {
-      // const params = this.queryParam
-      // this.exportLoading = true
-      // customerBundleExportDelay(params).then(res => {
-      //   this.exportLoading = false
-	  // downloadExcel(res, '单位应收应付')
-      // })
     }
   },
   mounted () {

+ 21 - 25
src/views/financialManagement/companyReceivablePayableNew/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="客户名称">
-                <a-input id="companyReceivablePayableNewList-settleClientName" v-model.trim="queryParam.settleClientNameCurrent" allowClear placeholder="请输入客户名称"/>
+                <a-input id="crpnList-settleClientName" v-model.trim="queryParam.settleClientNameCurrent" allowClear placeholder="请输入客户名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -15,7 +15,7 @@
                 <v-select
                   v-model="queryParam.settleClientType"
                   ref="settleClientType"
-                  id="companyReceivablePayableNewList-settleClientType"
+                  id="crpnList-settleClientType"
                   code="SETTLE_CLIENT_TYPE"
                   placeholder="请选择单位类型"
                   allowClear></v-select>
@@ -23,15 +23,15 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableNewList-refresh">查询</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyReceivablePayableNewList-reset">重置</a-button>
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="crpnList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="crpnList-reset">重置</a-button>
               </span>
             </a-col>
           </a-row>
         </a-form>
       </div>
     </a-card>
-    <a-card size="small" :bordered="false" class="companyReceivablePayableNewList-wrap">
+    <a-card size="small" :bordered="false" class="crpnList-wrap">
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 统计 -->
         <div class="table-operator">
@@ -67,13 +67,13 @@
               type="link"
               class="button-primary"
               @click="handleCollectionPayment(record)"
-              id="companyReceivablePayableNewList-collectionPayment-btn">收付款</a-button>
+              :id="'crpnList-collectionPayment-pay-'+record.id">收付款</a-button>
             <a-button
               size="small"
               type="link"
               class="button-success"
               @click="handleDetail(record)"
-              id="companyReceivablePayableNewList-detail-btn"
+              :id="'crpnList-collectionPayment-detail-'+record.id"
               v-if="$hasPermissions('M_companyReceivablePayable_detail')">详情</a-button>
             <span v-if="!$hasPermissions('M_collectionPayment') && !$hasPermissions('M_companyReceivablePayable_detail')">--</span>
           </template>
@@ -96,11 +96,11 @@ export default {
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       // 查询参数
       queryParam: {
-        settleClientNameCurrent: '',
-        settleClientType: undefined
+        settleClientNameCurrent: '', // 客户名称
+        settleClientType: undefined // 单位类型
       },
       // 表头
       columns: [
@@ -134,19 +134,16 @@ export default {
         })
       },
       total: 0, //  总条数
-      productTotal: null
+      productTotal: null // 金额统计
     }
   },
   methods: {
     //  详情
     handleDetail (row) {
-      if (row.settleClientType == 'CUSTOMER') {
-        this.$router.push({ path: `/financialManagement/companyReceivablePayableNew/detail/${row.settleClientSn}/${row.settleClientNameCurrent}/${row.settleClientType}` })
-      } else {
-        this.$router.push({ path: `/financialManagement/companyReceivablePayableNew/detail/${row.settleClientSn}/${row.settleClientName}/${row.settleClientType}` })
-      }
+      const clientName = row.settleClientType == 'CUSTOMER' ? row.settleClientNameCurrent : row.settleClientName
+      this.$router.push({ name: 'companyReceivablePayableNewDetail', params: { sn: row.settleClientSn, name: clientName, type: row.settleClientType } })
     },
-    // 合计
+    // 金额合计
     getTotal (param) {
       settleInfoQuerySum(param).then(res => {
         if (res.status == 200 && res.data) {
@@ -156,13 +153,10 @@ export default {
         }
       })
     },
-    //  收付款
+    //  收付款
     handleCollectionPayment (row) {
-      if (row.settleClientType == 'CUSTOMER') {
-        this.$router.push({ path: `/financialManagement/companyReceivablePayableNew/collectionPayment/${row.settleClientSn}/${row.settleClientNameCurrent}/${row.settleClientType}` })
-      } else {
-        this.$router.push({ path: `/financialManagement/companyReceivablePayableNew/collectionPayment/${row.settleClientSn}/${row.settleClientName}/${row.settleClientType}` })
-      }
+      const clientName = row.settleClientType == 'CUSTOMER' ? row.settleClientNameCurrent : row.settleClientName
+      this.$router.push({ name: 'companyReceivablePayableNewCollectionPayment', params: { sn: row.settleClientSn, name: clientName, type: row.settleClientType } })
     },
     //  重置
     resetSearchForm () {
@@ -170,15 +164,17 @@ export default {
       this.queryParam.settleClientType = undefined
       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 - 260
+      this.tableHeight = window.innerHeight - tableSearchH - 265
     }
   },
   watch: {
@@ -210,7 +206,7 @@ export default {
 }
 </script>
 <style lang="less">
-  .companyReceivablePayableNewList-wrap{
+  .crpnList-wrap{
     .sTable{
       margin-top: 10px;
     }

部分文件因文件數量過多而無法顯示