lilei 1 year ago
parent
commit
abd6a815b2
26 changed files with 346 additions and 307 deletions
  1. 1 1
      public/version.json
  2. 14 10
      src/views/inventoryManagement/inventoryChecking/basicInfoModal.vue
  3. 33 26
      src/views/inventoryManagement/inventoryChecking/detailModal.vue
  4. 6 6
      src/views/inventoryManagement/inventoryChecking/exportModal.vue
  5. 34 33
      src/views/inventoryManagement/inventoryChecking/list.vue
  6. 37 33
      src/views/inventoryManagement/inventoryChecking/makeInventory.vue
  7. 4 4
      src/views/inventoryManagement/inventoryChecking/overall.vue
  8. 19 18
      src/views/inventoryManagement/inventoryChecking/printModal.vue
  9. 16 20
      src/views/inventoryManagement/inventoryChecking/selfDisk.vue
  10. 5 2
      src/views/inventoryManagement/inventoryImport/chooseImportModal.vue
  11. 16 12
      src/views/inventoryManagement/inventoryImport/detailList.vue
  12. 2 2
      src/views/inventoryManagement/inventoryImport/importGuideModal.vue
  13. 14 12
      src/views/inventoryManagement/inventoryImport/list.vue
  14. 4 2
      src/views/inventoryManagement/inventoryQuery/detailModal.vue
  15. 29 40
      src/views/inventoryManagement/inventoryQuery/list.vue
  16. 6 6
      src/views/inventoryManagement/inventoryQuery/setPurchaseQty.vue
  17. 27 25
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  18. 2 0
      src/views/inventoryManagement/inventoryWarning/chooseImportModal.vue
  19. 3 3
      src/views/inventoryManagement/inventoryWarning/importGuideModal.vue
  20. 21 13
      src/views/inventoryManagement/inventoryWarning/list.vue
  21. 12 7
      src/views/inventoryManagement/satelliteWarehouseInventory/addModal.vue
  22. 18 15
      src/views/inventoryManagement/satelliteWarehouseInventory/list.vue
  23. 4 3
      src/views/inventoryManagement/warehouse/editModal.vue
  24. 6 4
      src/views/inventoryManagement/warehouse/list.vue
  25. 8 7
      src/views/inventoryManagement/warehouse/storingLocation/editModal.vue
  26. 5 3
      src/views/inventoryManagement/warehouse/storingLocation/list.vue

+ 1 - 1
public/version.json

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

+ 14 - 10
src/views/inventoryManagement/inventoryChecking/basicInfoModal.vue

@@ -18,18 +18,18 @@
         :wrapper-col="formItemLayout.wrapperCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
       >
         <a-form-model-item label="盘点类型" prop="checkType">
         <a-form-model-item label="盘点类型" prop="checkType">
-          <a-radio-group v-model="form.checkType" @change="checkTypeChange">
-            <a-radio v-for="(item,index) in checkTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
+          <a-radio-group v-model="form.checkType" @change="checkTypeChange" id="chainTransferOut-basicInfo-checktype">
+            <a-radio v-for="(item,index) in checkTypeList" :id="'basicInfo-checktype-'+item.code" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
           </a-radio-group>
           </a-radio-group>
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="是否区分仓库" prop="warehouseFlag" v-if="form.checkType=='SELECT'">
         <a-form-model-item label="是否区分仓库" prop="warehouseFlag" v-if="form.checkType=='SELECT'">
-          <a-radio-group v-model="form.warehouseFlag" @change="warehouseFlagChange">
-            <a-radio v-for="(item,index) in warehouseFlagList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
+          <a-radio-group v-model="form.warehouseFlag" @change="warehouseFlagChange" id="chainTransferOut-basicInfo-warehouseFlag">
+            <a-radio v-for="(item,index) in warehouseFlagList" :id="'basicInfo-warehouseFlag-'+item.code" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
           </a-radio-group>
           </a-radio-group>
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="盘点仓库" prop="warehouseSnList" v-if="form.checkType=='SELECT' && form.warehouseFlag=='1'">
         <a-form-model-item label="盘点仓库" prop="warehouseSnList" v-if="form.checkType=='SELECT' && form.warehouseFlag=='1'">
-          <a-checkbox-group v-model="form.warehouseSnList">
-            <a-checkbox v-for="(item,index) in warehouseList" :key="index" :value="item.warehouseSn">{{ item.name }}</a-checkbox>
+          <a-checkbox-group v-model="form.warehouseSnList" id="chainTransferOut-basicInfo-warehouseSn">
+            <a-checkbox v-for="(item,index) in warehouseList" :id="'basicInfo-warehouseSn-'+item.warehouseSn" :key="index" :value="item.warehouseSn">{{ item.name }}</a-checkbox>
           </a-checkbox-group>
           </a-checkbox-group>
         </a-form-model-item>
         </a-form-model-item>
       </a-form-model>
       </a-form-model>
@@ -65,23 +65,26 @@ export default {
         wrapperCol: { span: 20 }
         wrapperCol: { span: 20 }
       },
       },
       form: {
       form: {
-        checkType: 'ALL',
-        warehouseFlag: '0',
-        warehouseSnList: undefined
+        checkType: 'ALL', // 盘点类型
+        warehouseFlag: '0', // 是否区分仓库
+        warehouseSnList: undefined // 盘点仓库
       },
       },
       rules: {
       rules: {
         checkType: [{ required: true, message: '请选择盘点类型', trigger: 'change' }],
         checkType: [{ required: true, message: '请选择盘点类型', trigger: 'change' }],
         warehouseFlag: [{ required: true, message: '请选择是否区分仓库', trigger: 'change' }],
         warehouseFlag: [{ required: true, message: '请选择是否区分仓库', trigger: 'change' }],
         warehouseSnList: [{ required: true, message: '请选择盘点仓库', trigger: 'change' }]
         warehouseSnList: [{ required: true, message: '请选择盘点仓库', trigger: 'change' }]
       },
       },
+      // 盘点类型选项
       checkTypeList: [
       checkTypeList: [
         { dispName: '全盘', code: 'ALL' },
         { dispName: '全盘', code: 'ALL' },
         { dispName: '自选盘点', code: 'SELECT' }
         { dispName: '自选盘点', code: 'SELECT' }
       ],
       ],
+      // 否区分仓库选项
       warehouseFlagList: [
       warehouseFlagList: [
         { dispName: '不区分仓库', code: '0' },
         { dispName: '不区分仓库', code: '0' },
         { dispName: '区分仓库', code: '1' }
         { dispName: '区分仓库', code: '1' }
       ],
       ],
+      // 仓库列表
       warehouseList: []
       warehouseList: []
     }
     }
   },
   },
@@ -112,15 +115,16 @@ export default {
             }
             }
           })
           })
         } else {
         } else {
-          console.log('error submit!!')
           return false
           return false
         }
         }
       })
       })
     },
     },
+    // 盘点类型选择
     checkTypeChange (e) {
     checkTypeChange (e) {
       this.form.warehouseFlag = '0'
       this.form.warehouseFlag = '0'
       this.form.warehouseSnList = undefined
       this.form.warehouseSnList = undefined
     },
     },
+    // 是否区分仓库选择
     warehouseFlagChange (e) {
     warehouseFlagChange (e) {
       this.form.warehouseSnList = undefined
       this.form.warehouseSnList = undefined
     },
     },

+ 33 - 26
src/views/inventoryManagement/inventoryChecking/detailModal.vue

@@ -11,9 +11,9 @@
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-card size="small" :bordered="false" class="inventoryCheckingDetail-cont">
       <a-card size="small" :bordered="false" class="inventoryCheckingDetail-cont">
         <div class="print-cont" v-if="$hasPermissions('B_inventoryCheckingPrint')">
         <div class="print-cont" v-if="$hasPermissions('B_inventoryCheckingPrint')">
-          <a-radio-group v-model="printerType">
-            <a-radio value="NEEDLE">针式</a-radio>
-            <a-radio value="INK">喷墨</a-radio>
+          <a-radio-group v-model="printerType" id="inventoryCheckingDetail-pd-print-opts">
+            <a-radio value="NEEDLE" id="inventoryCheckingDetail-pd-print-needle">针式</a-radio>
+            <a-radio value="INK" id="inventoryCheckingDetail-pd-print-ink">喷墨</a-radio>
           </a-radio-group>
           </a-radio-group>
           <a-button
           <a-button
             type="primary"
             type="primary"
@@ -85,39 +85,41 @@
               <a-row :gutter="15">
               <a-row :gutter="15">
                 <a-col :md="6" :sm="24">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="产品编码" prop="productCode">
                   <a-form-item label="产品编码" prop="productCode">
-                    <a-input id="inventoryCheckMakeInventoryList-productCode" v-model.trim="queryParam.productCode" placeholder="请输入" allowClear />
+                    <a-input id="inventoryCheckingDetail-productCode" v-model.trim="queryParam.productCode" placeholder="请输入" allowClear />
                   </a-form-item>
                   </a-form-item>
                 </a-col>
                 </a-col>
                 <a-col :md="6" :sm="24">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="产品名称" prop="productName">
                   <a-form-item label="产品名称" prop="productName">
-                    <a-input id="inventoryCheckMakeInventoryList-productName" v-model.trim="queryParam.productName" placeholder="请输入" allowClear />
+                    <a-input id="inventoryCheckingDetail-productName" v-model.trim="queryParam.productName" placeholder="请输入" allowClear />
                   </a-form-item>
                   </a-form-item>
                 </a-col>
                 </a-col>
                 <a-col :md="6" :sm="24">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="产品分类">
                   <a-form-item label="产品分类">
-                    <ProductType id="inventoryCheckMakeInventoryList-productType" @change="changeProductType" v-model="productType"></ProductType>
+                    <ProductType id="inventoryCheckingDetail-productType" @change="changeProductType" v-model="productType"></ProductType>
                   </a-form-item>
                   </a-form-item>
                 </a-col>
                 </a-col>
                 <template v-if="advanced && (basicInfoData&&basicInfoData.warehouseFlag=='1')">
                 <template v-if="advanced && (basicInfoData&&basicInfoData.warehouseFlag=='1')">
                   <a-col :md="6" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
                   <a-col :md="6" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
                     <a-form-item label="仓库">
                     <a-form-item label="仓库">
-                      <a-select id="inventoryCheckMakeInventoryList-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 id="inventoryCheckingDetail-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
+                        <a-select-option v-for="item in warehouseList" :id="'inventoryCheckingDetail-warehouseSn-'+item.warehouseSn" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                 </template>
                 </template>
                 <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                 <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckMakeInventoryList-refresh">查询</a-button>
-                  <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckMakeInventoryList-reset">重置</a-button>
-                  <a @click="advanced=!advanced" style="margin-left: 5px" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
+                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckingDetail-refresh">查询</a-button>
+                  <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckingDetail-reset">重置</a-button>
+                  <a @click="advanced=!advanced" style="margin-left: 5px" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" id="inventoryCheckingDetail-advanced">
                     {{ advanced ? '收起' : '展开' }}
                     {{ advanced ? '收起' : '展开' }}
                     <a-icon :type="advanced ? 'up' : 'down'"/>
                     <a-icon :type="advanced ? 'up' : 'down'"/>
                   </a>
                   </a>
                 </a-col>
                 </a-col>
               </a-row>
               </a-row>
             </a-form>
             </a-form>
-            <div style="flex-shrink: 0;margin-left: 5px;"><a-checkbox v-model="isPrice"><span style="display: inline-block;margin-top: 1px;">仅显示盈亏</span></a-checkbox></div>
+            <div style="flex-shrink: 0;margin-left: 5px;">
+              <a-checkbox id="inventoryCheckingDetail-checkbox" v-model="isPrice"><span style="display: inline-block;margin-top: 1px;">仅显示盈亏</span></a-checkbox>
+            </div>
           </div>
           </div>
         </div>
         </div>
         <!-- 列表 -->
         <!-- 列表 -->
@@ -174,7 +176,7 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    itemSn: {
+    itemSn: { // 单据sn
       type: String || Number,
       type: String || Number,
       default: ''
       default: ''
     }
     }
@@ -184,15 +186,15 @@ export default {
       spinning: false,
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       disabled: false,
       disabled: false,
-      advanced: false,
-      exportShow: false,
+      advanced: false, // 展开收起
+      exportShow: false, // 打开导出选项弹框
       queryParam: {
       queryParam: {
-        productName: '',
-        productCode: '',
-        productTypeSn1: undefined,
-        productTypeSn2: undefined,
-        productTypeSn3: undefined,
-        warehouseSn: undefined
+        productName: '', // 产品名称
+        productCode: '', // 产品编码
+        productTypeSn1: undefined, // 产品分类1
+        productTypeSn2: undefined, // 产品分类2
+        productTypeSn3: undefined, // 产品分类3
+        warehouseSn: undefined// 仓库sn
       },
       },
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
@@ -219,13 +221,13 @@ export default {
         })
         })
       },
       },
       basicInfoData: null, //  基本信息
       basicInfoData: null, //  基本信息
-      productTotal: null,
-      productType: [],
+      productTotal: null, // 合计数据
+      productType: [], // 产品分类默认值
       warehouseList: [], //  仓库  下拉数据
       warehouseList: [], //  仓库  下拉数据
-      localDataSource: [],
+      localDataSource: [], // 列表原始数据
       isPrice: false, //  仅显示盈亏
       isPrice: false, //  仅显示盈亏
-      openPrintModal: false,
-      nowType: null,
+      openPrintModal: false, // 打印弹框
+      nowType: null, // 打印or导出
       printerType: 'NEEDLE' //  打印机类型
       printerType: 'NEEDLE' //  打印机类型
     }
     }
   },
   },
@@ -242,10 +244,12 @@ export default {
         { title: '盈亏数量', scopedSlots: { customRender: 'checkProfitLossQty' }, width: '6%', align: 'center' }
         { title: '盈亏数量', scopedSlots: { customRender: 'checkProfitLossQty' }, width: '6%', align: 'center' }
         // { title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' }
         // { title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' }
       ]
       ]
+      // 是否显示仓库
       if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
       if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
         arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
         arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
         arr.splice(5, 0, { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
         arr.splice(5, 0, { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
       }
       }
+      // 成本只有单据完成时显示
       if (this.basicInfoData && this.basicInfoData.state == 'FINISH') {
       if (this.basicInfoData && this.basicInfoData.state == 'FINISH') {
         arr.push({ title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' })
         arr.push({ title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' })
       }
       }
@@ -303,6 +307,7 @@ export default {
         }
         }
       })
       })
     },
     },
+    // 导出弹框
     handleExport () {
     handleExport () {
       this.exportShow = true
       this.exportShow = true
     },
     },
@@ -317,6 +322,7 @@ export default {
         this.openPrintModal = true
         this.openPrintModal = true
       }
       }
     },
     },
+    // 开始打印or导出
     handleOk (objs) {
     handleOk (objs) {
       const _this = this
       const _this = this
       let params, type
       let params, type
@@ -364,6 +370,7 @@ export default {
         this.getWarehouseList()
         this.getWarehouseList()
       }
       }
     },
     },
+    // 仅显示盈亏勾选
     isPrice (newValue, oldValue) {
     isPrice (newValue, oldValue) {
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     }
     }

+ 6 - 6
src/views/inventoryManagement/inventoryChecking/exportModal.vue

@@ -14,11 +14,11 @@
         <span v-if="itemData&&itemData.checkType=='SELECT'">({{ (itemData&&itemData.warehouseFlagDictValue) || '--' }})</span>
         <span v-if="itemData&&itemData.checkType=='SELECT'">({{ (itemData&&itemData.warehouseFlagDictValue) || '--' }})</span>
       </div>
       </div>
       <div>产品范围:
       <div>产品范围:
-        <a-radio-group v-model="productScopeFlag">
-          <a-radio :value="true">
+        <a-radio-group v-model="productScopeFlag" id="inventoryChecking-print-scope">
+          <a-radio :value="true" id="inventoryChecking-print-scope-1">
             所有盘点产品
             所有盘点产品
           </a-radio>
           </a-radio>
-          <a-radio :value="false">
+          <a-radio :value="false" id="inventoryChecking-print-scope-2">
             有盈亏的产品
             有盈亏的产品
           </a-radio>
           </a-radio>
         </a-radio-group>
         </a-radio-group>
@@ -40,13 +40,13 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    itemData: {
+    itemData: { // 详情信息
       type: Object,
       type: Object,
       default: () => {
       default: () => {
         return null
         return null
       }
       }
     },
     },
-    nowType: {
+    nowType: { // 打印 or 导出
       type: String,
       type: String,
       default: ''
       default: ''
     }
     }
@@ -54,7 +54,7 @@ export default {
   data () {
   data () {
     return {
     return {
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
-      productScopeFlag: true
+      productScopeFlag: true // 产品范围
     }
     }
   },
   },
   methods: {
   methods: {

+ 34 - 33
src/views/inventoryManagement/inventoryChecking/list.vue

@@ -27,14 +27,14 @@
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="[queryParam.beginDate, queryParam.endDate]" @change="dateChange" />
+                <rangeDate id="inventoryCheckingList-time" ref="rangeDate" :value="[queryParam.beginDate, queryParam.endDate]" @change="dateChange" />
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
           </template>
           </template>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckingList-refresh">查询</a-button>
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckingList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckingList-reset">重置</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckingList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
+            <a @click="advanced=!advanced" style="margin-left: 5px" id="inventoryCheckingList-advanced">
               {{ advanced ? '收起' : '展开' }}
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
             </a>
@@ -60,7 +60,7 @@
       bordered>
       bordered>
       <!-- 单号 -->
       <!-- 单号 -->
       <template slot="checkWarehouseNo" slot-scope="text, record">
       <template slot="checkWarehouseNo" slot-scope="text, record">
-        <span class="table-td-link" v-if="$hasPermissions('B_inventoryCheckingDetail')" @click="handleDetail(record)">{{ record.checkWarehouseNo }}</span>
+        <span class="table-td-link" :id="'inventoryCheckingList-detail-'+record.id" v-if="$hasPermissions('B_inventoryCheckingDetail')" @click="handleDetail(record)">{{ record.checkWarehouseNo }}</span>
         <span v-else>{{ record.checkWarehouseNo }}</span>
         <span v-else>{{ record.checkWarehouseNo }}</span>
       </template>
       </template>
       <!-- 监盘人审核 -->
       <!-- 监盘人审核 -->
@@ -76,6 +76,7 @@
       <template slot="action" slot-scope="text, record">
       <template slot="action" slot-scope="text, record">
         <a-button
         <a-button
           size="small"
           size="small"
+          :id="'inventoryCheckingList-edit-'+record.id"
           type="link"
           type="link"
           v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'AUDIT_REJECT') && $hasPermissions('B_inventoryCheckingEdit')"
           v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'AUDIT_REJECT') && $hasPermissions('B_inventoryCheckingEdit')"
           class="button-primary"
           class="button-primary"
@@ -83,6 +84,7 @@
         >编辑</a-button>
         >编辑</a-button>
         <a-button
         <a-button
           size="small"
           size="small"
+          :id="'inventoryCheckingList-audit-'+record.id"
           type="link"
           type="link"
           v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_inventoryCheckingAudit')"
           v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_inventoryCheckingAudit')"
           class="button-primary"
           class="button-primary"
@@ -90,6 +92,7 @@
         >审核</a-button>
         >审核</a-button>
         <a-button
         <a-button
           size="small"
           size="small"
+          :id="'inventoryCheckingList-checking-'+record.id"
           type="link"
           type="link"
           v-if="record.state == 'WAIT_CHECK_WAREHOUSE' && $hasPermissions('B_inventoryCheckingInventory')"
           v-if="record.state == 'WAIT_CHECK_WAREHOUSE' && $hasPermissions('B_inventoryCheckingInventory')"
           class="button-primary"
           class="button-primary"
@@ -97,6 +100,7 @@
         >盘点</a-button>
         >盘点</a-button>
         <a-button
         <a-button
           size="small"
           size="small"
+          :id="'inventoryCheckingList-checkAgain-'+record.id"
           type="link"
           type="link"
           v-if="record.state == 'WAIT_CHECK_WAREHOUSE' && $hasPermissions('B_inventoryCheckingAgain')"
           v-if="record.state == 'WAIT_CHECK_WAREHOUSE' && $hasPermissions('B_inventoryCheckingAgain')"
           class="button-primary"
           class="button-primary"
@@ -104,6 +108,7 @@
         >重盘</a-button>
         >重盘</a-button>
         <a-button
         <a-button
           size="small"
           size="small"
+          :id="'inventoryCheckingList-del-'+record.id"
           type="link"
           type="link"
           v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'AUDIT_REJECT') && $hasPermissions('B_inventoryCheckingDel')"
           v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'AUDIT_REJECT') && $hasPermissions('B_inventoryCheckingDel')"
           class="button-error"
           class="button-error"
@@ -132,7 +137,7 @@ import auditModal from '@/views/common/auditModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import inventoryCheckingDetailModal from './detailModal.vue'
 import inventoryCheckingDetailModal from './detailModal.vue'
 import stateIcon from '@/views/common/stateIcon'
 import stateIcon from '@/views/common/stateIcon'
-import { checkWarehouseList, checkWarehouseDel, checkWarehouseAudit, checkWarehouseValidate, checkWarehouseReInventory } from '@/api/checkWarehouse'
+import { checkWarehouseList, checkWarehouseDel, checkWarehouseAudit, checkWarehouseReInventory } from '@/api/checkWarehouse'
 export default {
 export default {
   name: 'InventoryCheckingList',
   name: 'InventoryCheckingList',
   components: { STable, VSelect, rangeDate, auditModal, basicInfoModal, inventoryCheckingDetailModal, stateIcon },
   components: { STable, VSelect, rangeDate, auditModal, basicInfoModal, inventoryCheckingDetailModal, stateIcon },
@@ -140,15 +145,15 @@ export default {
   data () {
   data () {
     return {
     return {
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        checkWarehouseNo: '',
-        checkType: undefined,
-        warehouseFlag: undefined,
-        state: undefined,
+        checkWarehouseNo: '', // 盘点单号
+        checkType: undefined, // 盘点类型
+        warehouseFlag: undefined, // 是否区分仓库
+        state: undefined, // 盘点状态
         beginDate: '', //  创建时间  开始时间
         beginDate: '', //  创建时间  开始时间
         endDate: '' //  创建时间  结束时间
         endDate: '' //  创建时间  结束时间
       },
       },
-      tableHeight: 0,
-      advanced: true,
+      tableHeight: 0, // 表格高度
+      advanced: true, // 展开收起
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
@@ -171,11 +176,11 @@ export default {
       openModal: false, //  新增编辑  弹框
       openModal: false, //  新增编辑  弹框
       itemId: '', //  当前id
       itemId: '', //  当前id
       nowData: null, //  当前记录数据
       nowData: null, //  当前记录数据
-      visibleAudit: false,
-      auditInfo: null,
-      spinningAudit: false,
-      openDetailModal: false,
-      itemSn: null
+      visibleAudit: false, // 审核弹框
+      auditInfo: null, // 审核详情信息
+      spinningAudit: false, // 审核loading
+      openDetailModal: false, // 详情弹框
+      itemSn: null // 单据sn
     }
     }
   },
   },
   computed: {
   computed: {
@@ -227,34 +232,31 @@ export default {
         content: '如果开始盘点,不能再进行其他与产品出入库相关的操作。确认开始盘点吗?',
         content: '如果开始盘点,不能再进行其他与产品出入库相关的操作。确认开始盘点吗?',
         centered: true,
         centered: true,
         onOk () {
         onOk () {
-          // checkWarehouseValidate({}).then(res => {
-          //   if (res.status == 200) {
-          //     if (res.data) {
           _this.openModal = true
           _this.openModal = true
-          //     } else {
-          //       _this.$message.info('存在未完结的盘点单,不能新增,请先完成盘点后再新增')
-          //     }
-          //   }
-          // })
         }
         }
       })
       })
     },
     },
     //  编辑
     //  编辑
     handleEdit (row) {
     handleEdit (row) {
       if (row.checkType == 'ALL') { // 全盘
       if (row.checkType == 'ALL') { // 全盘
-        this.$router.push({ path: `/inventoryManagement/inventoryChecking/overall/${row.id}/${row.checkWarehouseSn}` })
+        this.$router.push({ name: 'inventoryCheckingOverall', params: { id: row.id, sn: row.checkWarehouseSn } })
       } else if (row.checkType == 'SELECT') { // 自选盘点
       } else if (row.checkType == 'SELECT') { // 自选盘点
-        this.$router.push({ path: `/inventoryManagement/inventoryChecking/selfDisk/${row.id}/${row.checkWarehouseSn}` })
+        this.$router.push({ name: 'inventoryCheckingSelfDisk', params: { id: row.id, sn: row.checkWarehouseSn } })
       }
       }
     },
     },
+    // 盘点
+    handleWarehouse (row) {
+      this.$router.push({ name: 'inventoryCheckingMakeInventory', params: { id: row.id, sn: row.checkWarehouseSn } })
+    },
     //  详情
     //  详情
     handleDetail (row) {
     handleDetail (row) {
       this.itemSn = row.checkWarehouseSn
       this.itemSn = row.checkWarehouseSn
       this.openDetailModal = true
       this.openDetailModal = true
     },
     },
-    // 盘点
-    handleWarehouse (row) {
-      this.$router.push({ path: `/inventoryManagement/inventoryChecking/makeInventory/${row.id}/${row.checkWarehouseSn}` })
+    // 详情弹框关闭
+    handleDetailClose () {
+      this.itemSn = null
+      this.openDetailModal = false
     },
     },
     // 重盘
     // 重盘
     handleAgain (row) {
     handleAgain (row) {
@@ -294,11 +296,12 @@ export default {
         }
         }
       })
       })
     },
     },
-    //  审核
+    //  打开审核弹框
     handleEexamine (row) {
     handleEexamine (row) {
       this.auditInfo = row
       this.auditInfo = row
       this.visibleAudit = true
       this.visibleAudit = true
     },
     },
+    // 提交审核
     auditOrder (billStatus) {
     auditOrder (billStatus) {
       this.spinningAudit = true
       this.spinningAudit = true
       checkWarehouseAudit({
       checkWarehouseAudit({
@@ -316,16 +319,14 @@ export default {
         }
         }
       })
       })
     },
     },
-    handleDetailClose () {
-      this.itemSn = null
-      this.openDetailModal = false
-    },
+    // 初始化页面
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
         _this.setTableH()
       })
       })
     },
     },
+    // 表格高度计算
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235
       this.tableHeight = window.innerHeight - tableSearchH - 235

+ 37 - 33
src/views/inventoryManagement/inventoryChecking/makeInventory.vue

@@ -9,9 +9,9 @@
           <a-tag color="blue">{{ basicInfoData&&basicInfoData.stateDictValue }}</a-tag>
           <a-tag color="blue">{{ basicInfoData&&basicInfoData.stateDictValue }}</a-tag>
         </template>
         </template>
         <template slot="extra" v-if="$hasPermissions('B_inventoryCheckingPrint')">
         <template slot="extra" v-if="$hasPermissions('B_inventoryCheckingPrint')">
-          <a-radio-group v-model="printerType">
-            <a-radio value="NEEDLE">针式</a-radio>
-            <a-radio value="INK">喷墨</a-radio>
+          <a-radio-group v-model="printerType" id="inventoryCheckingDetail-print-opts">
+            <a-radio value="NEEDLE" id="inventoryCheckingDetail-needle">针式</a-radio>
+            <a-radio value="INK" id="inventoryCheckingDetail-ink">喷墨</a-radio>
           </a-radio-group>
           </a-radio-group>
           <a-button
           <a-button
             type="primary"
             type="primary"
@@ -102,7 +102,7 @@
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                     <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckMakeInventoryList-refresh">查询</a-button>
                     <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckMakeInventoryList-refresh">查询</a-button>
                     <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckMakeInventoryList-reset">重置</a-button>
                     <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckMakeInventoryList-reset">重置</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 5px" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
+                    <a @click="advanced=!advanced" style="margin-left: 5px" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" id="inventoryCheckingDetail-advanced">
                       {{ advanced ? '收起' : '展开' }}
                       {{ advanced ? '收起' : '展开' }}
                       <a-icon :type="advanced ? 'up' : 'down'"/>
                       <a-icon :type="advanced ? 'up' : 'down'"/>
                     </a>
                     </a>
@@ -136,7 +136,7 @@
           <template slot="checkQty" slot-scope="text, record">
           <template slot="checkQty" slot-scope="text, record">
             <a-input-number
             <a-input-number
               size="small"
               size="small"
-              id="inventoryCheckMakeInventoryList-choose-checkQty"
+              :id="'makeInventoryList-checkQty-'+record.id"
               v-model="record.checkQty"
               v-model="record.checkQty"
               :precision="0"
               :precision="0"
               :min="0"
               :min="0"
@@ -151,18 +151,19 @@
           </template>
           </template>
           <!-- 盈亏成本单价 -->
           <!-- 盈亏成本单价 -->
           <template slot="checkProfitLossCost" slot-scope="text, record">
           <template slot="checkProfitLossCost" slot-scope="text, record">
-              <span v-if="record.checkProfitLossQty<=0||record.stockQty==record.checkQty" :style="{ color: record.checkProfitLossQty<0?'green':'', fontWeight: record.checkProfitLossQty!=0?'bold':'' }">{{ record.cost }}</span>
-              <div v-else>
-                <a-input-number
-                  size="small"
-                  v-model="record.cost"
-                  :precision="2"
-                  :min="0"
-                  :max="999999"
-                  placeholder="请输入"
-                  @blur="e => checkCostBlur(e.target.value, record)"
-                  style="width:100%;color: red;fontWeight:bold'"/>
-              </div>
+            <span v-if="record.checkProfitLossQty<=0||record.stockQty==record.checkQty" :style="{ color: record.checkProfitLossQty<0?'green':'', fontWeight: record.checkProfitLossQty!=0?'bold':'' }">{{ record.cost }}</span>
+            <div v-else>
+              <a-input-number
+                size="small"
+                :id="'makeInventoryList-cost-'+record.id"
+                v-model="record.cost"
+                :precision="2"
+                :min="0"
+                :max="999999"
+                placeholder="请输入"
+                @blur="e => checkCostBlur(e.target.value, record)"
+                style="width:100%;color: red;fontWeight:bold'"/>
+            </div>
           </template>
           </template>
         </s-table>
         </s-table>
       </a-card>
       </a-card>
@@ -203,18 +204,18 @@ export default {
     return {
     return {
       spinning: false,
       spinning: false,
       disabled: false,
       disabled: false,
-      advanced: false,
-      exportShow: false,
+      advanced: false, // 展开收起
+      exportShow: false, // 导出选择弹框
       queryParam: {
       queryParam: {
-        productName: '',
-        productCode: '',
-        productTypeSn1: undefined,
-        productTypeSn2: undefined,
-        productTypeSn3: undefined,
-        warehouseSn: undefined
+        productName: '', // 产品名称
+        productCode: '', // 产品编码
+        productTypeSn1: undefined, // 产品分类1
+        productTypeSn2: undefined, // 产品分类2
+        productTypeSn3: undefined, // 产品分类3
+        warehouseSn: undefined // 仓库sn
       },
       },
       basicInfoData: null, // 基础信息
       basicInfoData: null, // 基础信息
-      productTotal: null,
+      productTotal: null, // 合计数据
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
@@ -236,11 +237,11 @@ export default {
           return data
           return data
         })
         })
       },
       },
-      productType: [],
+      productType: [], // 产品分类默认值
       warehouseList: [], //  仓库  下拉数据
       warehouseList: [], //  仓库  下拉数据
-      localDataSource: [],
-      openPrintModal: false,
-      nowType: null,
+      localDataSource: [], // 列表原始数据
+      openPrintModal: false, // 打印弹框
+      nowType: null, // 打印 or 导出
       printerType: 'NEEDLE' //  打印机类型
       printerType: 'NEEDLE' //  打印机类型
     }
     }
   },
   },
@@ -257,6 +258,7 @@ export default {
         { title: '盈亏数量', scopedSlots: { customRender: 'checkProfitLossQty' }, width: '8%', align: 'center' },
         { title: '盈亏数量', scopedSlots: { customRender: 'checkProfitLossQty' }, width: '8%', align: 'center' },
         { title: '盈亏成本单价', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '8%', align: 'center' }
         { title: '盈亏成本单价', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '8%', align: 'center' }
       ]
       ]
+      // 是否显示仓库列
       if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
       if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
         arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
         arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       }
@@ -291,13 +293,13 @@ export default {
         }
         }
       })
       })
     },
     },
-    // 数量  blur
+    // 数量修改  blur
     checkQtyBlur (val, record) {
     checkQtyBlur (val, record) {
       if ((val != record.checkQtyBackups) || (!val && record.checkQtyBackups == 0)) {
       if ((val != record.checkQtyBackups) || (!val && record.checkQtyBackups == 0)) {
         this.handleAdd(record, 'edit')
         this.handleAdd(record, 'edit')
       }
       }
     },
     },
-    // 成本
+    // 成本修改
     checkCostBlur (val, row) {
     checkCostBlur (val, row) {
       if (!val) {
       if (!val) {
         this.$message.warning('请输入盈亏成本单价!')
         this.$message.warning('请输入盈亏成本单价!')
@@ -385,7 +387,7 @@ export default {
     },
     },
     //  返回列表
     //  返回列表
     handleBack () {
     handleBack () {
-      this.$router.push({ path: '/inventoryManagement/inventoryChecking/list' })
+      this.$router.push({ name: 'inventoryCheckingList' })
     },
     },
     // 查询基础信息
     // 查询基础信息
     getDetail () {
     getDetail () {
@@ -415,6 +417,7 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
     },
+    // 导出选项弹框
     handleExport () {
     handleExport () {
       this.exportShow = true
       this.exportShow = true
     },
     },
@@ -429,6 +432,7 @@ export default {
         this.openPrintModal = true
         this.openPrintModal = true
       }
       }
     },
     },
+    // 开始打印or导出
     handleOk (objs) {
     handleOk (objs) {
       const _this = this
       const _this = this
       let params, type
       let params, type

+ 4 - 4
src/views/inventoryManagement/inventoryChecking/overall.vue

@@ -94,11 +94,11 @@ export default {
       spinning: false,
       spinning: false,
       disabled: false,
       disabled: false,
       queryParam: {
       queryParam: {
-        productCode: '',
-        productName: ''
+        productCode: '', // 产品编码
+        productName: ''// 产品名称
       },
       },
       basicInfoData: null, // 基础信息
       basicInfoData: null, // 基础信息
-      productTotal: null,
+      productTotal: null, // 合计数据
       // 表头
       // 表头
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -154,7 +154,7 @@ export default {
     },
     },
     //  返回列表
     //  返回列表
     handleBack () {
     handleBack () {
-      this.$router.push({ path: '/inventoryManagement/inventoryChecking/list' })
+      this.$router.push({ name: 'inventoryCheckingList' })
     },
     },
     // 查询基础信息
     // 查询基础信息
     getDetail () {
     getDetail () {

+ 19 - 18
src/views/inventoryManagement/inventoryChecking/printModal.vue

@@ -23,20 +23,20 @@
           <span v-if="itemData&&itemData.checkType=='SELECT'">({{ itemData.warehouseFlag=='1' ? '区分仓库':'不区分仓库' }})</span>
           <span v-if="itemData&&itemData.checkType=='SELECT'">({{ itemData.warehouseFlag=='1' ? '区分仓库':'不区分仓库' }})</span>
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="仓库范围" prop="warehouseSn" v-if="itemData&&itemData.checkType=='SELECT'&&itemData.warehouseFlag=='1'">
         <a-form-model-item label="仓库范围" prop="warehouseSn" v-if="itemData&&itemData.checkType=='SELECT'&&itemData.warehouseFlag=='1'">
-          <a-select id="inventoryChecking-print-form" v-model="form.warehouseSn" placeholder="请选择仓库范围">
-            <a-select-option v-for="(item,index) in warehouseList" :value="item.warehouseSn" :key="index">{{ item.name }}</a-select-option>
+          <a-select id="inventoryChecking-print-warehouse" v-model="form.warehouseSn" placeholder="请选择仓库范围">
+            <a-select-option v-for="(item,index) in warehouseList" :id="'inventoryChecking-print-warehouse-'+item.warehouseSn" :value="item.warehouseSn" :key="index">{{ item.name }}</a-select-option>
           </a-select>
           </a-select>
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="库存数量" prop="stockQtyFlag" v-if="nowType == 'pddy'">
         <a-form-model-item label="库存数量" prop="stockQtyFlag" v-if="nowType == 'pddy'">
-          <a-radio-group v-model="form.stockQtyFlag">
-            <a-radio :value="true">打印</a-radio>
-            <a-radio :value="false">不打印</a-radio>
+          <a-radio-group v-model="form.stockQtyFlag" id="inventoryChecking-print-stockQtyFlag" >
+            <a-radio :value="true" id="inventoryChecking-print-stockQtyFlag-1">打印</a-radio>
+            <a-radio :value="false" id="inventoryChecking-print-stockQtyFlag-0">不打印</a-radio>
           </a-radio-group>
           </a-radio-group>
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="产品范围" prop="productScopeFlag" v-if="nowType == 'shdy'">
         <a-form-model-item label="产品范围" prop="productScopeFlag" v-if="nowType == 'shdy'">
-          <a-radio-group v-model="form.productScopeFlag">
-            <a-radio :value="true">所有盘点产品</a-radio>
-            <a-radio :value="false">有盈亏的产品</a-radio>
+          <a-radio-group v-model="form.productScopeFlag" id="inventoryChecking-print-productScopeFlag">
+            <a-radio :value="true" id="inventoryChecking-print-productScopeFlag-1">所有盘点产品</a-radio>
+            <a-radio :value="false" id="inventoryChecking-print-productScopeFlag-0">有盈亏的产品</a-radio>
           </a-radio-group>
           </a-radio-group>
         </a-form-model-item>
         </a-form-model-item>
       </a-form-model>
       </a-form-model>
@@ -59,24 +59,25 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    itemData: {
+    itemData: {// 详情数据
       type: Object,
       type: Object,
       default: () => {
       default: () => {
         return null
         return null
       }
       }
     },
     },
-    nowType: {
+    nowType: {// 盘点打印or审核打印
       type: String,
       type: String,
       default: ''
       default: ''
     }
     }
   },
   },
   data () {
   data () {
     return {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       form: {
       form: {
-        stockQtyFlag: true,
-        productScopeFlag: true,
-        warehouseSn: 'all'
+        stockQtyFlag: true, // 库存数量
+        productScopeFlag: true, // 仓库范围
+        warehouseSn: 'all' // 仓库sn
       },
       },
       rules: {
       rules: {
         stockQtyFlag: [{ required: true, message: '请选择库存数量', trigger: 'change' }],
         stockQtyFlag: [{ required: true, message: '请选择库存数量', trigger: 'change' }],
@@ -87,11 +88,11 @@ export default {
         labelCol: { span: 6 },
         labelCol: { span: 6 },
         wrapperCol: { span: 18 }
         wrapperCol: { span: 18 }
       },
       },
-      spinning: false,
-      warehouseList: []
+      warehouseList: [] // 仓库列表
     }
     }
   },
   },
   computed: {
   computed: {
+    // 弹框标题
     modalTit () {
     modalTit () {
       let title = ''
       let title = ''
       if (this.nowType == 'pddy') {
       if (this.nowType == 'pddy') {
@@ -103,7 +104,7 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
-    // 确认
+    // 确认打印
     handleSave (isPrint) {
     handleSave (isPrint) {
       const _this = this
       const _this = this
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
@@ -115,13 +116,13 @@ export default {
             checkPrintFlag: _this.nowType == 'pddy',
             checkPrintFlag: _this.nowType == 'pddy',
             type: isPrint || 'preview'
             type: isPrint || 'preview'
           }
           }
-          if (_this.itemData && _this.itemData.checkType == 'SELECT' && _this.itemData.warehouseFlag == '1') { //  自选盘点且区分仓库
+          //  自选盘点且区分仓库
+          if (_this.itemData && _this.itemData.checkType == 'SELECT' && _this.itemData.warehouseFlag == '1') {
             obj.warehouseSn = _this.form.warehouseSn
             obj.warehouseSn = _this.form.warehouseSn
           }
           }
           _this.$emit('ok', obj)
           _this.$emit('ok', obj)
           _this.isShow = false
           _this.isShow = false
         } else {
         } else {
-          console.log('error submit!!')
           return false
           return false
         }
         }
       })
       })

+ 16 - 20
src/views/inventoryManagement/inventoryChecking/selfDisk.vue

@@ -54,7 +54,7 @@
                   <a-col :md="4" :sm="16" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
                   <a-col :md="4" :sm="16" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
                     <a-form-item label="仓库">
                     <a-form-item label="仓库">
                       <a-select id="inventoryCheckSelfDiskList-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
                       <a-select id="inventoryCheckSelfDiskList-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="'inventoryCheckSelfDiskList-warehouseSn-'+item.warehouseSn" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
@@ -67,14 +67,14 @@
               </a-form>
               </a-form>
             </a-col>
             </a-col>
             <a-col :md="24" :sm="20" style="margin-bottom: 10px;text-align: left;">
             <a-col :md="24" :sm="20" style="margin-bottom: 10px;text-align: left;">
-              <a-button size="small" type="primary" class="button-info" @click.stop="handleBatchAdd('batch')" id="chainTransferOutEdit-del-all-btn">批量添加</a-button>
+              <a-button size="small" type="primary" class="button-info" @click.stop="handleBatchAdd('batch')" id="chainTransferOutEdit-add-btn">批量添加</a-button>
               <a-button
               <a-button
                 size="small"
                 size="small"
                 type="primary"
                 type="primary"
                 class="button-info"
                 class="button-info"
                 style="margin: 0px"
                 style="margin: 0px"
                 @click.stop="handleBatchAdd('all')"
                 @click.stop="handleBatchAdd('all')"
-                id="chainTransferOutEdit-del-all-btn">全部添加</a-button>
+                id="chainTransferOutEdit-add-all-btn">全部添加</a-button>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
         </div>
         </div>
@@ -106,7 +106,7 @@
               class="button-primary"
               class="button-primary"
               :disabled="spinning"
               :disabled="spinning"
               @click="handleAdd(record)"
               @click="handleAdd(record)"
-              id="inventoryCheckSelfDiskList-add-btn">添加</a-button>
+              :id="'chainTransferOutEdit-add-'+record.productSn">添加</a-button>
           </template>
           </template>
         </s-table>
         </s-table>
       </a-card>
       </a-card>
@@ -119,38 +119,34 @@
                 <a-row :gutter="15">
                 <a-row :gutter="15">
                   <a-col :md="4" :sm="20">
                   <a-col :md="4" :sm="20">
                     <a-form-item label="产品编码" prop="productCode">
                     <a-form-item label="产品编码" prop="productCode">
-                      <a-input id="inventoryCheckSelfDiskList-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入" allowClear />
+                      <a-input id="checkSelfDiskList-choose-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入" allowClear />
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="4" :sm="20">
                   <a-col :md="4" :sm="20">
                     <a-form-item label="产品名称" prop="productName">
                     <a-form-item label="产品名称" prop="productName">
-                      <a-input id="inventoryCheckSelfDiskList-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入" allowClear />
+                      <a-input id="checkSelfDiskList-choose-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入" allowClear />
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="4" :sm="20">
                   <a-col :md="4" :sm="20">
                     <a-form-item label="产品品牌">
                     <a-form-item label="产品品牌">
-                      <ProductBrand id="inventoryCheckSelfDiskList-productBrand" sysFlag="" v-model="chooseQueryParam.brandSn"></ProductBrand>
+                      <ProductBrand id="checkSelfDiskList-choose-productBrand" sysFlag="" v-model="chooseQueryParam.brandSn"></ProductBrand>
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="4" :sm="20">
                   <a-col :md="4" :sm="20">
                     <a-form-item label="产品分类">
                     <a-form-item label="产品分类">
-                      <ProductType id="inventoryCheckSelfDiskList-productType" @change="changeChooseProductType" v-model="chooseProductType"></ProductType>
+                      <ProductType id="checkSelfDiskList-choose-productType" @change="changeChooseProductType" v-model="chooseProductType"></ProductType>
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="4" :sm="20" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
                   <a-col :md="4" :sm="20" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
                     <a-form-item label="仓库">
                     <a-form-item label="仓库">
-                      <a-select id="inventoryCheckSelfDiskList-warehouseSn" allowClear placeholder="请选择仓库" v-model="chooseQueryParam.warehouseSn" >
-                        <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                      <a-select id="checkSelfDiskList-choose-warehouseSn" allowClear placeholder="请选择仓库" v-model="chooseQueryParam.warehouseSn" >
+                        <a-select-option v-for="item in warehouseList" :id="'checkSelfDiskList-choose-'+item.warehouseSn" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
                       </a-select>
                       </a-select>
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
                   <a-col :md="4" :sm="16" style="margin-bottom: 10px;">
                   <a-col :md="4" :sm="16" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="inventoryCheckSelfDiskList-refresh">查询</a-button>
-                    <a-button style="margin-left: 5px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="inventoryCheckSelfDiskList-reset">重置</a-button>
-                    <!-- <a @click="chooseAdvanced=!chooseAdvanced" style="margin-left: 5px">
-                      {{ chooseAdvanced ? '收起' : '展开' }}
-                      <a-icon :type="chooseAdvanced ? 'up' : 'down'"/>
-                    </a> -->
+                    <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="checkSelfDiskList-choose-refresh">查询</a-button>
+                    <a-button style="margin-left: 5px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="checkSelfDiskList-choose-reset">重置</a-button>
                   </a-col>
                   </a-col>
                 </a-row>
                 </a-row>
               </a-form>
               </a-form>
@@ -159,7 +155,7 @@
         </div>
         </div>
         <a-row>
         <a-row>
           <a-col :md="20" :sm="16">
           <a-col :md="20" :sm="16">
-            <a-button size="small" type="primary" class="button-error" @click.stop="handleDel('', 'batch')" id="chainTransferOutEdit-del-all-btn">批量删除</a-button>
+            <a-button size="small" type="primary" class="button-error" @click.stop="handleDel('', 'batch')" id="checkSelfDiskList-choose-del-all-btn">批量删除</a-button>
             <!-- 总计 -->
             <!-- 总计 -->
             <a-alert type="info" style="margin-bottom:10px;display: inline-block;">
             <a-alert type="info" style="margin-bottom:10px;display: inline-block;">
               <div slot="message">
               <div slot="message">
@@ -178,7 +174,7 @@
               class="button-error"
               class="button-error"
               style="margin-left: 5px"
               style="margin-left: 5px"
               @click.stop="handleDel('', 'all')"
               @click.stop="handleDel('', 'all')"
-              id="chainTransferOutEdit-del-all-btn">清空列表</a-button>
+              id="checkSelfDiskList-choose-clearAll-btn">清空列表</a-button>
           </a-col>
           </a-col>
         </a-row>
         </a-row>
         <!-- 列表 -->
         <!-- 列表 -->
@@ -201,7 +197,7 @@
           </template>
           </template>
           <!-- 操作 -->
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="inventoryCheckSelfDiskList-del-btn">删除</a-button>
+            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" :id="'checkSelfDiskList-choose-del-'+record.id">删除</a-button>
           </template>
           </template>
         </s-table>
         </s-table>
       </a-card>
       </a-card>
@@ -209,7 +205,7 @@
     <div class="affix-cont">
     <div class="affix-cont">
       <a-button
       <a-button
         type="primary"
         type="primary"
-        id="inventoryCheckSelfDiskList-submit"
+        id="checkSelfDiskList-choose-submit"
         size="large"
         size="large"
         :disabled="spinning"
         :disabled="spinning"
         class="button-primary"
         class="button-primary"

+ 5 - 2
src/views/inventoryManagement/inventoryImport/chooseImportModal.vue

@@ -101,6 +101,7 @@ export default {
               data.list[i].no = no + i + 1
               data.list[i].no = no + i + 1
             }
             }
             const ret = data.list.filter(item => item.isError == 1)
             const ret = data.list.filter(item => item.isError == 1)
+            // 是否全部错误
             this.isAllError = ret.length == data.count
             this.isAllError = ret.length == data.count
             this.listData = data.list
             this.listData = data.list
             if (this.uploadData && data.list.length == 0) {
             if (this.uploadData && data.list.length == 0) {
@@ -113,7 +114,7 @@ export default {
         })
         })
       },
       },
       isAllError: false, // 是否全部错误
       isAllError: false, // 是否全部错误
-      listData: []
+      listData: [] // 列表数据
     }
     }
   },
   },
   computed: {
   computed: {
@@ -134,6 +135,7 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    // 重置列表
     resetSearchForm () {
     resetSearchForm () {
       this.$refs.table.clearTable() //  清空列表数据
       this.$refs.table.clearTable() //  清空列表数据
       this.uploadData = null //  清空上传数据
       this.uploadData = null //  清空上传数据
@@ -156,6 +158,7 @@ export default {
         }
         }
       })
       })
     },
     },
+    // 打开导入成功弹框
     showSuccessModal (data) {
     showSuccessModal (data) {
       if (data) {
       if (data) {
         this.openTipsModal = true
         this.openTipsModal = true
@@ -163,7 +166,7 @@ export default {
         this.modalHtml = `<div><div>库存导入成功</div><div>入库类型:库存导入</div><div>库存批次:${data.stockBatchNo}</div><div>总导入款数:${data.productTotalCategory}</div><div>总入库数量:${data.productTotalQty}</div><div>总入库成本:${data.productTotalCost}</div></div>`
         this.modalHtml = `<div><div>库存导入成功</div><div>入库类型:库存导入</div><div>库存批次:${data.stockBatchNo}</div><div>总导入款数:${data.productTotalCategory}</div><div>总入库数量:${data.productTotalQty}</div><div>总入库成本:${data.productTotalCost}</div></div>`
       }
       }
     },
     },
-    // 操作完成
+    // 导入操作完成
     operationEnd () {
     operationEnd () {
       this.$emit('ok')
       this.$emit('ok')
       this.openTipsModal = false
       this.openTipsModal = false

+ 16 - 12
src/views/inventoryManagement/inventoryImport/detailList.vue

@@ -3,7 +3,7 @@
     <!-- 搜索条件 -->
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
     <div class="table-page-search-wrapper">
       <a-form-model
       <a-form-model
-        id="salesDetailReportList-form"
+        id="inventoryImport-detail-form"
         ref="ruleForm"
         ref="ruleForm"
         class="form-model-con"
         class="form-model-con"
         layout="inline"
         layout="inline"
@@ -14,17 +14,18 @@
         <a-row :gutter="15">
         <a-row :gutter="15">
           <a-col :md="typeInfo != 'STOCK_IMPORT'?5:6" :sm="24">
           <a-col :md="typeInfo != 'STOCK_IMPORT'?5:6" :sm="24">
             <a-form-model-item label="产品编码">
             <a-form-model-item label="产品编码">
-              <a-input v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              <a-input id="inventoryImport-detail-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :md="typeInfo != 'STOCK_IMPORT'?5:6" :sm="24">
           <a-col :md="typeInfo != 'STOCK_IMPORT'?5:6" :sm="24">
             <a-form-model-item label="产品名称">
             <a-form-model-item label="产品名称">
-              <a-input v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              <a-input id="inventoryImport-detail-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :md="typeInfo != 'STOCK_IMPORT'?5:6" :sm="24" v-if="typeInfo != 'STOCK_IMPORT'">
           <a-col :md="typeInfo != 'STOCK_IMPORT'?5:6" :sm="24" v-if="typeInfo != 'STOCK_IMPORT'">
             <a-form-model-item label="供应商">
             <a-form-model-item label="供应商">
               <supplier
               <supplier
+                id="inventoryImport-detail-supplierSn"
                 v-model="supplierSn"
                 v-model="supplierSn"
                 placeholder="请选择供应商"
                 placeholder="请选择供应商"
                 @change="supplierChange"
                 @change="supplierChange"
@@ -33,12 +34,12 @@
           </a-col>
           </a-col>
           <a-col :md="typeInfo != 'STOCK_IMPORT'?5:6" :sm="24">
           <a-col :md="typeInfo != 'STOCK_IMPORT'?5:6" :sm="24">
             <a-form-item label="仓库名称">
             <a-form-item label="仓库名称">
-              <a-input id="warehouseList-name" v-model.trim="queryParam.warehouseName" allowClear placeholder="请输入仓库名称"/>
+              <a-input id="warehouseList-detail-warehouseName" v-model.trim="queryParam.warehouseName" allowClear placeholder="请输入仓库名称"/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="typeInfo != 'STOCK_IMPORT'?4:6" :sm="24" style="margin-bottom: 10px;">
           <a-col :md="typeInfo != 'STOCK_IMPORT'?4:6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesDetailReportList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesDetailReportList-reset">重置</a-button>
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="inventoryImport-detail-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryImport-detail-reset">重置</a-button>
           </a-col>
           </a-col>
         </a-row>
         </a-row>
       </a-form-model>
       </a-form-model>
@@ -81,11 +82,11 @@ export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
   mixins: [commonMixin],
   mixins: [commonMixin],
   props: {
   props: {
-    detailSn: {
+    detailSn: { // 详情sn
       type: String,
       type: String,
       default: null
       default: null
     },
     },
-    typeInfo: {
+    typeInfo: { // 导入类型
       type: String,
       type: String,
       default: null
       default: null
     }
     }
@@ -99,13 +100,13 @@ export default {
       tableHeight: 0,
       tableHeight: 0,
       supplierSn: undefined,
       supplierSn: undefined,
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        importType: undefined,
+        importType: undefined, // 导入类型
         productEntity: {
         productEntity: {
           code: '', //  产品编码
           code: '', //  产品编码
           name: '' //  产品名称
           name: '' //  产品名称
         },
         },
-        stockImportNo: '',
-        supplierName: '',
+        stockImportNo: '', // 导入单号
+        supplierName: '', // 供应商名称
         warehouseName: ''// 仓库名称
         warehouseName: ''// 仓库名称
       },
       },
       countInfo: 0,
       countInfo: 0,
@@ -129,7 +130,8 @@ export default {
             const no = (data.pageNo - 1) * data.pageSize
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
               data.list[i].no = no + i + 1
-              data.list[i].totalCost = data.list[i].putQty * data.list[i].cost
+              // 总成本
+              data.list[i].totalCost = Number(data.list[i].putQty * data.list[i].cost).toFixed(2)
             }
             }
             this.disabled = false
             this.disabled = false
           }
           }
@@ -167,6 +169,7 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    // 选择经销商
     supplierChange (val, row) {
     supplierChange (val, row) {
       this.queryParam.supplierName = row ? row.supplierName : ''
       this.queryParam.supplierName = row ? row.supplierName : ''
     },
     },
@@ -195,6 +198,7 @@ export default {
       this.queryParam.supplierName = ''
       this.queryParam.supplierName = ''
       this.handleSearch()
       this.handleSearch()
     },
     },
+    // 页面初始化
     pageInit () {
     pageInit () {
       this.disabled = false
       this.disabled = false
       this.spinning = false
       this.spinning = false

+ 2 - 2
src/views/inventoryManagement/inventoryImport/importGuideModal.vue

@@ -21,7 +21,7 @@
             <li>4) 成本价为必填项,必须填写大于等于零的数字。</li>
             <li>4) 成本价为必填项,必须填写大于等于零的数字。</li>
             <li>5) 支持上传文件格式:.xls、.xlsx。</li>
             <li>5) 支持上传文件格式:.xls、.xlsx。</li>
             <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-icon type="download" style="padding-right: 5px;" />下载导入模板
               </a>
               </a>
             </li>
             </li>
@@ -94,7 +94,7 @@ export default {
       uploadParams: {
       uploadParams: {
         savePathType: 'local'
         savePathType: 'local'
       },
       },
-      filePath: location.protocol + '//' + location.host + '/templ/库存导入模板.xlsx'
+      filePath: location.protocol + '//' + location.host + '/templ/库存导入模板.xlsx' // 模板地址
     }
     }
   },
   },
   methods: {
   methods: {

+ 14 - 12
src/views/inventoryManagement/inventoryImport/list.vue

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

+ 4 - 2
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -54,7 +54,7 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    nowData: {
+    nowData: {//  当前选中产品信息
       type: Object,
       type: Object,
       default: () => {
       default: () => {
         return {}
         return {}
@@ -62,9 +62,11 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+    // 弹框标题
     modalTit () {
     modalTit () {
       return '库存详情'
       return '库存详情'
     },
     },
+    // 列
     columns () {
     columns () {
       const _this = this
       const _this = this
       const arr = [
       const arr = [
@@ -110,7 +112,7 @@ export default {
           return data
           return data
         })
         })
       },
       },
-      currentStock: null
+      currentStock: null // 合计数据
     }
     }
   },
   },
   methods: {
   methods: {

+ 29 - 40
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -71,11 +71,12 @@
                     allowClear
                     allowClear
                     placeholder="请选择产品来源"
                     placeholder="请选择产品来源"
                     v-model="queryParam.productSysFlag"
                     v-model="queryParam.productSysFlag"
+                    id="shelfMonitoringList-productSysFlag"
                   >
                   >
-                    <a-select-option value="1">
+                    <a-select-option value="1" id="shelfMonitoringList-productSysFlag-1">
                       箭冠
                       箭冠
                     </a-select-option>
                     </a-select-option>
-                    <a-select-option value="0">
+                    <a-select-option value="0" id="shelfMonitoringList-productSysFlag-0">
                       自建
                       自建
                     </a-select-option>
                     </a-select-option>
                   </a-select>
                   </a-select>
@@ -96,7 +97,7 @@
                   :disabled="disabled"
                   :disabled="disabled"
                   :loading="exportLoading"
                   :loading="exportLoading"
                   id="inventoryQueryList-export">导出</a-button>
                   id="inventoryQueryList-export">导出</a-button>
-                <a @click="advanced=!advanced" style="margin-left: 5px">
+                <a @click="advanced=!advanced" style="margin-left: 5px" id="shelfMonitoringList-advanced">
                   {{ advanced ? '收起' : '展开' }}
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'"/>
                   <a-icon :type="advanced ? 'up' : 'down'"/>
                 </a>
                 </a>
@@ -145,15 +146,19 @@
             v-if="$hasPermissions('B_inventoryInventoryQueryDetail')"
             v-if="$hasPermissions('B_inventoryInventoryQueryDetail')"
             class="button-success"
             class="button-success"
             @click="goDetail(record)"
             @click="goDetail(record)"
-            id="inventoryQueryList-detail-btn">库存详情</a-button>
+            :id="'inventoryQueryList-detail-'+record.id">库存详情</a-button>
           <a-button
           <a-button
             size="small"
             size="small"
             type="link"
             type="link"
             v-if="$hasPermissions('B_inventoryInventoryQueryStock')"
             v-if="$hasPermissions('B_inventoryInventoryQueryStock')"
             class="button-primary"
             class="button-primary"
             @click="goWarehouseDetail(record)"
             @click="goWarehouseDetail(record)"
-            id="inventoryQueryList-warehouseDetail-btn">出入库明细</a-button>
-          <a-button v-if="record.dealerProduct.sysFlag==1&&record.dealerProduct.onlineFalg==1&&$hasPermissions('M_shoppingCart')" type="link" @click="addShopCar(record)">加入购物车</a-button>
+            :id="'inventoryQueryList-outdetail-'+record.id">出入库明细</a-button>
+          <a-button
+            v-if="record.dealerProduct.sysFlag==1&&record.dealerProduct.onlineFalg==1&&$hasPermissions('M_shoppingCart')"
+            type="link"
+            :id="'inventoryQueryList-shopCar-'+record.id"
+            @click="addShopCar(record)">加入购物车</a-button>
           <span v-if="!$hasPermissions('B_inventoryInventoryQueryDetail') && !$hasPermissions('B_inventoryInventoryQueryStock')">--</span>
           <span v-if="!$hasPermissions('B_inventoryInventoryQueryDetail') && !$hasPermissions('B_inventoryInventoryQueryStock')">--</span>
         </template>
         </template>
       </s-table>
       </s-table>
@@ -167,15 +172,15 @@
 
 
 <script>
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
-import { stockList, stockCount, stockExport } from '@/api/stock'
-import { purchaseCartExistProduct } from '@/api/purchaseCart'
+import { STable, VSelect } from '@/components'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import ProductBrand from '../../common/productBrand.js'
 import Warehouse from '@/views/common/warehouse.js'
 import Warehouse from '@/views/common/warehouse.js'
-import { STable, VSelect } from '@/components'
 import inventoryQueryDetailModal from './detailModal.vue'
 import inventoryQueryDetailModal from './detailModal.vue'
 import setPurchaseQty from './setPurchaseQty.vue'
 import setPurchaseQty from './setPurchaseQty.vue'
-import { downloadExcel } from '@/libs/JGPrint.js'
+import { stockList, stockCount, stockExport } from '@/api/stock'
+import { purchaseCartExistProduct } from '@/api/purchaseCart'
 export default {
 export default {
   name: 'InventoryQueryList',
   name: 'InventoryQueryList',
   components: { STable, VSelect, inventoryQueryDetailModal, ProductType, ProductBrand, Warehouse, setPurchaseQty },
   components: { STable, VSelect, inventoryQueryDetailModal, ProductType, ProductBrand, Warehouse, setPurchaseQty },
@@ -193,26 +198,25 @@ export default {
         productTypeSn1: '', //  产品分类1
         productTypeSn1: '', //  产品分类1
         productTypeSn2: '', //  产品分类2
         productTypeSn2: '', //  产品分类2
         productTypeSn3: '', //  产品分类3
         productTypeSn3: '', //  产品分类3
-        warehouse: [],
-        warehouseSn: '',
-        warehouseLocationSn: '',
+        warehouse: [], // 仓库默认值
+        warehouseSn: '', // 仓库sn
+        warehouseLocationSn: '', // 仓位sn
         zeroQtyFlag: false, //  库存情况
         zeroQtyFlag: false, //  库存情况
         enableFlag: true, // 显示禁用产品
         enableFlag: true, // 显示禁用产品
         minUnsalableDays: undefined, // 滞销天数最小值
         minUnsalableDays: undefined, // 滞销天数最小值
         maxUnsalableDays: undefined, // 滞销天数最大值
         maxUnsalableDays: undefined, // 滞销天数最大值
-        productSysFlag: undefined
+        productSysFlag: undefined // 产品来源,箭冠or自建
       },
       },
-      productTypeSn: [],
+      productTypeSn: [], // 产品类型sn
       exportLoading: false, // 导出loading
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       zeroQtyData: [ //  库存情况
       zeroQtyData: [ //  库存情况
         { name: '库存数量为0', id: '1' },
         { name: '库存数量为0', id: '1' },
         { name: '库存数量不为0', id: '0' }
         { name: '库存数量不为0', id: '0' }
       ],
       ],
-      openPurchaseModal: false,
+      openPurchaseModal: false, // 设置采购数量弹框
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
-        console.log(parameter)
         // 查询条件有直销天数先校验滞销天数
         // 查询条件有直销天数先校验滞销天数
         if (this.checkValueRange()) {
         if (this.checkValueRange()) {
           this.disabled = true
           this.disabled = true
@@ -231,16 +235,15 @@ export default {
             parameter.sortAlias = ''
             parameter.sortAlias = ''
           }
           }
           const params = Object.assign(parameter, this.queryParam)
           const params = Object.assign(parameter, this.queryParam)
+          // 格式化数据
           params.zeroQtyFlag = params.zeroQtyFlag ? '0' : ''
           params.zeroQtyFlag = params.zeroQtyFlag ? '0' : ''
           params.enableFlag = params.enableFlag ? '' : '1'
           params.enableFlag = params.enableFlag ? '' : '1'
           params.product = {
           params.product = {
             sysFlag: params.productSysFlag || undefined
             sysFlag: params.productSysFlag || undefined
           }
           }
-
           // 仓库仓位
           // 仓库仓位
           params.warehouseSn = params.warehouse[0]
           params.warehouseSn = params.warehouse[0]
           params.warehouseLocationSn = params.warehouse[1]
           params.warehouseLocationSn = params.warehouse[1]
-
           return stockList(params).then(res => {
           return stockList(params).then(res => {
             let data
             let data
             if (res.status == 200) {
             if (res.status == 200) {
@@ -269,8 +272,8 @@ export default {
         }
         }
       },
       },
       openModal: false, //  查看库存详情  弹框
       openModal: false, //  查看库存详情  弹框
-      nowData: null,
-      currentStock: null
+      nowData: null, // 当前操作数据
+      currentStock: null // 可用库存合计
     }
     }
   },
   },
   computed: {
   computed: {
@@ -288,6 +291,7 @@ export default {
         { title: <div><a-tooltip placement='top' title='1:产品距离最近一次销售的时间,30天算一个月 2:采购退货,调拨等不算销售,不用来计算滞销天数'><a-icon type="question-circle" /></a-tooltip>&nbsp;滞销天数</div>, width: '10%', align: 'center', dataIndex: 'unsalableDays', scopedSlots: { customRender: 'unsalableDays' }, sorter: true },
         { title: <div><a-tooltip placement='top' title='1:产品距离最近一次销售的时间,30天算一个月 2:采购退货,调拨等不算销售,不用来计算滞销天数'><a-icon type="question-circle" /></a-tooltip>&nbsp;滞销天数</div>, width: '10%', align: 'center', dataIndex: 'unsalableDays', scopedSlots: { customRender: 'unsalableDays' }, sorter: true },
         { title: <div><a-tooltip placement='top' title='注意:购物车仅限添加箭冠已上线产品。'><a-icon type="question-circle" /></a-tooltip>&nbsp;操作</div>, scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
         { title: <div><a-tooltip placement='top' title='注意:购物车仅限添加箭冠已上线产品。'><a-icon type="question-circle" /></a-tooltip>&nbsp;操作</div>, scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
       ]
       ]
+      // 成本权限
       if (this.$hasPermissions('M_ShowAllCost')) {
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(7, 0, { title: '可用库存成本(¥)', dataIndex: 'currentStockCost', width: '8%', align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
         arr.splice(7, 0, { title: '可用库存成本(¥)', dataIndex: 'currentStockCost', width: '8%', align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       }
@@ -403,7 +407,7 @@ export default {
     },
     },
     //  出入库明细
     //  出入库明细
     goWarehouseDetail (row) {
     goWarehouseDetail (row) {
-      this.$router.push({ path: `/inventoryManagement/inventoryQuery/warehouseDetail/${row.productSn}` })
+      this.$router.push({ name: 'inventoryQueryWarehouseDetail', params: { sn: row.productSn } })
     },
     },
     //  导出
     //  导出
     handleExport () {
     handleExport () {
@@ -436,19 +440,7 @@ export default {
         }
         }
       })
       })
     },
     },
-    //  递归函数
-    recursionFun (data) {
-      if (data) {
-        data.map((item, index) => {
-          if (item.children && item.children.length == 0) {
-            delete item.children
-          } else {
-            this.recursionFun(item.children)
-          }
-        })
-      }
-    },
-    // 分类  changeType
+    // 产品分类  changeType
     changeType (val, selectedOptions) {
     changeType (val, selectedOptions) {
       for (let i = 0; i < val.length; i++) {
       for (let i = 0; i < val.length; i++) {
         this.queryParam['productTypeSn' + (i + 1)] = val[i]
         this.queryParam['productTypeSn' + (i + 1)] = val[i]
@@ -459,11 +451,7 @@ export default {
         this.queryParam.productTypeSn3 = ''
         this.queryParam.productTypeSn3 = ''
       }
       }
     },
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
+    // 页面初始化
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -472,6 +460,7 @@ export default {
       // 是否默认包括禁用产品
       // 是否默认包括禁用产品
       this.queryParam.enableFlag = localStorage.getItem('productEnabledFlag-' + this.$store.state.user.info.orgId) != 'false'
       this.queryParam.enableFlag = localStorage.getItem('productEnabledFlag-' + this.$store.state.user.info.orgId) != 'false'
     },
     },
+    // 表格高度
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 216
       this.tableHeight = window.innerHeight - tableSearchH - 216

+ 6 - 6
src/views/inventoryManagement/inventoryQuery/setPurchaseQty.vue

@@ -25,7 +25,7 @@
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="采购数量" prop="qty">
         <a-form-model-item label="采购数量" prop="qty">
           <a-input-number
           <a-input-number
-            id="shelfMonitoringList-maxUnsalableDays"
+            id="setPurchaseQty-qty"
             style="width:60%"
             style="width:60%"
             v-model="form.qty"
             v-model="form.qty"
             :precision="0"
             :precision="0"
@@ -65,15 +65,15 @@ export default {
         wrapperCol: { span: 20 }
         wrapperCol: { span: 20 }
       },
       },
       form: {
       form: {
-        qty: 1,
-        productSn: '',
-        productCode: '',
-        sysFlag: ''
+        qty: 1, // 采购数量
+        productSn: '', // 产品sn
+        productCode: '', // 产品编码
+        sysFlag: ''// 是否自建
       },
       },
       rules: {
       rules: {
         qty: [{ required: true, message: '请输入采购数量', trigger: 'change' }]
         qty: [{ required: true, message: '请输入采购数量', trigger: 'change' }]
       },
       },
-      dateilData: null
+      dateilData: null // 详情信息
     }
     }
   },
   },
   methods: {
   methods: {

+ 27 - 25
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -17,7 +17,7 @@
                   <v-select
                   <v-select
                     v-model="queryParam.flowType"
                     v-model="queryParam.flowType"
                     ref="flowType"
                     ref="flowType"
-                    id="warehousingAuditList-flowType"
+                    id="iQWarehouseDetail-flowType"
                     code="STOCK_FLOW_TYPE"
                     code="STOCK_FLOW_TYPE"
                     placeholder="请选择变动类型"
                     placeholder="请选择变动类型"
                     allowClear></v-select>
                     allowClear></v-select>
@@ -28,7 +28,7 @@
                   <v-select
                   <v-select
                     v-model="queryParam.bizType"
                     v-model="queryParam.bizType"
                     ref="bizType"
                     ref="bizType"
-                    id="inventoryQueryWarehouseDetail-bizType"
+                    id="iQWarehouseDetail-bizType"
                     code="STOCK_FLOW_BIZ_TYPE"
                     code="STOCK_FLOW_BIZ_TYPE"
                     placeholder="请选择单据类型"
                     placeholder="请选择单据类型"
                     allowClear></v-select>
                     allowClear></v-select>
@@ -36,25 +36,25 @@
               </a-col>
               </a-col>
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
                 <a-form-item label="关联单据号">
                 <a-form-item label="关联单据号">
-                  <a-input id="inventoryQueryWarehouseDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单据号"/>
+                  <a-input id="iQWarehouseDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单据号"/>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
               <template v-if="advanced">
               <template v-if="advanced">
                 <a-col :md="6" :sm="24">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="仓库">
                   <a-form-item label="仓库">
-                    <a-select id="inventoryQueryWarehouseDetail-warehouseSn" placeholder="请选择仓库" allowClear v-model="queryParam.warehouseSn" >
+                    <a-select id="iQWarehouseDetail-warehouseSn" placeholder="请选择仓库" allowClear 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" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
                     </a-select>
                     </a-select>
                   </a-form-item>
                   </a-form-item>
                 </a-col>
                 </a-col>
                 <a-col :md="6" :sm="24">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="单据审核时间">
                   <a-form-item label="单据审核时间">
-                    <rangeDate ref="rangeDate" @change="dateChange" />
+                    <rangeDate id="iQWarehouseDetail-time" ref="rangeDate" @change="dateChange" />
                   </a-form-item>
                   </a-form-item>
                 </a-col>
                 </a-col>
                 <a-col :md="6" :sm="24">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="单位名称">
                   <a-form-item label="单位名称">
-                    <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitNameCurrent" allowClear placeholder="请输入单位名称"/>
+                    <a-input id="iQWarehouseDetail-unitName" v-model.trim="queryParam.unitNameCurrent" allowClear placeholder="请输入单位名称"/>
                   </a-form-item>
                   </a-form-item>
                 </a-col>
                 </a-col>
                 <a-col :md="6" :sm="24">
                 <a-col :md="6" :sm="24">
@@ -62,7 +62,7 @@
                     <v-select
                     <v-select
                       v-model="queryParam.state"
                       v-model="queryParam.state"
                       ref="state"
                       ref="state"
-                      id="warehousingAuditList-state"
+                      id="iQWarehouseDetail-state"
                       code="STOCK_FLOW_STATE"
                       code="STOCK_FLOW_STATE"
                       placeholder="请选择出入库状态"
                       placeholder="请选择出入库状态"
                       allowClear></v-select>
                       allowClear></v-select>
@@ -70,9 +70,9 @@
                 </a-col>
                 </a-col>
               </template>
               </template>
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-reset">重置</a-button>
-                <a @click="advanced=!advanced" style="margin-left: 8px">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="iQWarehouseDetail-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="iQWarehouseDetail-reset">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 8px" id="iQWarehouseDetail-advanced">
                   {{ advanced ? '收起' : '展开' }}
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'"/>
                   <a-icon :type="advanced ? 'up' : 'down'"/>
                 </a>
                 </a>
@@ -108,12 +108,12 @@
           <!-- 单位名称 -->
           <!-- 单位名称 -->
           <template slot="newUnitName" slot-scope="text, record">
           <template slot="newUnitName" slot-scope="text, record">
             <a-tooltip placement="bottom">
             <a-tooltip placement="bottom">
-                    <template slot="title">
-                     <span v-if="record.unitType&&record.unitType=='CUSTOMER'">{{ record.unitNameCurrent||'--' }}</span>
-                     <span v-else>{{ record.unitName||'--' }}</span>
-                    </template>
-                  <span v-if="record.unitType&&record.unitType=='CUSTOMER'">{{ record.unitNameCurrent||'--' }}</span>
-                  <span v-else>{{ record.unitName||'--' }}</span>
+              <template slot="title">
+                <span v-if="record.unitType&&record.unitType=='CUSTOMER'">{{ record.unitNameCurrent||'--' }}</span>
+                <span v-else>{{ record.unitName||'--' }}</span>
+              </template>
+              <span v-if="record.unitType&&record.unitType=='CUSTOMER'">{{ record.unitNameCurrent||'--' }}</span>
+              <span v-else>{{ record.unitName||'--' }}</span>
             </a-tooltip>
             </a-tooltip>
           </template>
           </template>
           <!-- 数量 -->
           <!-- 数量 -->
@@ -146,14 +146,14 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       tableHeight: 0,
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
-        bizType: undefined,
-        bizNo: '',
-        flowType: undefined,
-        unitNameCurrent: '',
-        warehouseSn: undefined,
-        state: undefined
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        bizType: undefined, // 单据类型
+        bizNo: '', // 单据号
+        flowType: undefined, // 入库or出库
+        unitNameCurrent: '', // 单位名称
+        warehouseSn: undefined, // 仓库sn
+        state: undefined// 单据状态
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
@@ -244,7 +244,7 @@ export default {
     },
     },
     //  返回列表
     //  返回列表
     handleBack () {
     handleBack () {
-      this.$router.push({ path: '/inventoryManagement/inventoryQuery/list' })
+      this.$router.push({ name: 'inventoryQueryList' })
     },
     },
     // 仓库下拉数据
     // 仓库下拉数据
     getWarehouseList (type) {
     getWarehouseList (type) {
@@ -256,6 +256,7 @@ export default {
         }
         }
       })
       })
     },
     },
+    // 页面初始化
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -264,6 +265,7 @@ export default {
       this.getWarehouseList()
       this.getWarehouseList()
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
+    // 表格计算高度
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 298
       this.tableHeight = window.innerHeight - tableSearchH - 298

+ 2 - 0
src/views/inventoryManagement/inventoryWarning/chooseImportModal.vue

@@ -124,11 +124,13 @@ export default {
       stockWarnProductImport(this.paramsData).then(res => {
       stockWarnProductImport(this.paramsData).then(res => {
         this.loading = false
         this.loading = false
         if (res.status == 200) {
         if (res.status == 200) {
+          // 可导入数据
           if (res.data.rightList && res.data.rightList.length > 0) {
           if (res.data.rightList && res.data.rightList.length > 0) {
             res.data.rightList.map((item, index) => {
             res.data.rightList.map((item, index) => {
               item.no = index + 1
               item.no = index + 1
             })
             })
           }
           }
+          // 不可导入数据
           if (res.data.errorList && res.data.errorList.length > 0) {
           if (res.data.errorList && res.data.errorList.length > 0) {
             res.data.errorList.map((item, index) => {
             res.data.errorList.map((item, index) => {
               item.no = index + 1
               item.no = index + 1

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

@@ -16,7 +16,7 @@
           </div>
           </div>
           <ul>
           <ul>
             <li>1)导入的Excel文件中必须包含名称为“产品编码”、“最大库存数(个)”、“最小库存数(个)”的列,且名称必须相同,其他列可自定义,不影响数据导入</li>
             <li>1)导入的Excel文件中必须包含名称为“产品编码”、“最大库存数(个)”、“最小库存数(个)”的列,且名称必须相同,其他列可自定义,不影响数据导入</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>
           </ul>
         </div>
         </div>
         <div class="explain-item">
         <div class="explain-item">
@@ -71,7 +71,7 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    params: {
+    params: { // 参数
       type: Object,
       type: Object,
       default: null
       default: null
     }
     }
@@ -85,7 +85,7 @@ export default {
       uploadParams: {
       uploadParams: {
         savePathType: 'local'
         savePathType: 'local'
       },
       },
-      templUrl: location.protocol + '//' + location.host + '/templ/库存预警产品导入模板.xlsx'
+      templUrl: location.protocol + '//' + location.host + '/templ/库存预警产品导入模板.xlsx' // 模板地址
     }
     }
   },
   },
   methods: {
   methods: {

+ 21 - 13
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -55,7 +55,7 @@
                 :loading="exportLoading"
                 :loading="exportLoading"
                 class="button-warning"
                 class="button-warning"
                 id="inventoryWarningList-export-btn">导出</a-button>
                 id="inventoryWarningList-export-btn">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="inventoryWarningList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
               </a>
@@ -190,25 +190,25 @@ export default {
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
-      openGuideModal: false,
-      openPurchaseModal: false,
+      openGuideModal: false, // 导入产品弹框
+      openPurchaseModal: false, // 设置采购数量弹框
       advanced: true, // 高级搜索 展开/关闭
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        productCode: '',
-        productName: '',
+        productCode: '', // 产品编码
+        productName: '', // 产品名称
         productOrigCode: '', // 原厂编码
         productOrigCode: '', // 原厂编码
-        productBrandSn: undefined,
-        productTypeSn1: undefined,
-        productTypeSn2: undefined,
-        productTypeSn3: undefined,
-        stockState: undefined
+        productBrandSn: undefined, // 产品品牌sn
+        productTypeSn1: undefined, // 产品分类1
+        productTypeSn2: undefined, // 产品分类2
+        productTypeSn3: undefined, // 产品分类3
+        stockState: undefined// 预警提示
       },
       },
       exportLoading: false, // 导出loading
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       productBrandList: [], //  产品品牌下拉数据
       productBrandList: [], //  产品品牌下拉数据
       productTypeList: [], //  产品类别下拉数据
       productTypeList: [], //  产品类别下拉数据
-      productType: [],
+      productType: [], // 产品类型默认值
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 50, align: 'center', fixed: 'left' },
         { title: '序号', dataIndex: 'no', width: 50, align: 'center', fixed: 'left' },
         { title: '产品编码', dataIndex: 'productCode', width: 120, align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
         { title: '产品编码', dataIndex: 'productCode', width: 120, align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
@@ -238,8 +238,11 @@ export default {
               if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys) { //  处理切换页码后 上页已选已输数据保留
               if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys) { //  处理切换页码后 上页已选已输数据保留
                 const ind = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.indexOf(data.list[i].id)
                 const ind = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.indexOf(data.list[i].id)
                 if (ind >= 0) {
                 if (ind >= 0) {
+                  // 在途数
                   data.list[i].inTransit = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows[ind].inTransit
                   data.list[i].inTransit = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows[ind].inTransit
+                  // 最大库存数
                   data.list[i].upperLimit = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows[ind].upperLimit
                   data.list[i].upperLimit = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows[ind].upperLimit
+                  // 最小库存数
                   data.list[i].lowerLimit = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows[ind].lowerLimit
                   data.list[i].lowerLimit = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows[ind].lowerLimit
                 }
                 }
               }
               }
@@ -251,7 +254,7 @@ export default {
         })
         })
       },
       },
       loading: false,
       loading: false,
-      rowSelectionInfo: null
+      rowSelectionInfo: null // 已选数据
     }
     }
   },
   },
   methods: {
   methods: {
@@ -276,6 +279,7 @@ export default {
     rowSelectionFun (obj) {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
       this.rowSelectionInfo = obj || null
     },
     },
+    // 在途、最大库存、最新库存数量修改
     numChange (row) {
     numChange (row) {
       if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys) { //  处理切换页码后 上页已选已输数据保留
       if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys) { //  处理切换页码后 上页已选已输数据保留
         const ind = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.indexOf(row.id)
         const ind = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.indexOf(row.id)
@@ -300,6 +304,7 @@ export default {
       const params = []
       const params = []
       if (isBatch) { //  批量更新
       if (isBatch) { //  批量更新
         const dataInd = []
         const dataInd = []
+        // 格式化数据
         this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.map((item, index) => {
         this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.map((item, index) => {
           if ((!item.inTransit && item.inTransit != 0) || (!item.upperLimit && item.upperLimit != 0) || (!item.lowerLimit && item.lowerLimit != 0)) {
           if ((!item.inTransit && item.inTransit != 0) || (!item.upperLimit && item.upperLimit != 0) || (!item.lowerLimit && item.lowerLimit != 0)) {
             dataInd.push(item.no)
             dataInd.push(item.no)
@@ -311,6 +316,7 @@ export default {
             lowerLimit: item.lowerLimit
             lowerLimit: item.lowerLimit
           })
           })
         })
         })
+        // 没用可提交数据
         if (dataInd.length > 0) {
         if (dataInd.length > 0) {
           let str = ''
           let str = ''
           dataInd.map(item => {
           dataInd.map(item => {
@@ -387,12 +393,14 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
     },
+    // 页面初始化
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
         _this.setTableH()
       })
       })
     },
     },
+    // 表格高度计算
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 180
       this.tableHeight = window.innerHeight - tableSearchH - 180

+ 12 - 7
src/views/inventoryManagement/satelliteWarehouseInventory/addModal.vue

@@ -30,7 +30,7 @@
               shape="circle"
               shape="circle"
               icon="minus"
               icon="minus"
               size="small"
               size="small"
-              id="satelliteWarehouseInventoryList-num-add-btn"></a-button>
+              :id="'satelliteWarehouseInventoryList-subtract-'+record.id"></a-button>
             <a-input-number
             <a-input-number
               size="small"
               size="small"
               v-model="record.productQty"
               v-model="record.productQty"
@@ -39,6 +39,7 @@
               :precision="0"
               :precision="0"
               :step="1"
               :step="1"
               @change="e => onChange(e, record)"
               @change="e => onChange(e, record)"
+              :id="'satelliteWarehouseInventoryList-productQty-'+record.id"
               class="stepper" />
               class="stepper" />
             <a-button
             <a-button
               type="primary"
               type="primary"
@@ -46,16 +47,17 @@
               shape="circle"
               shape="circle"
               icon="plus"
               icon="plus"
               size="small"
               size="small"
-              id="satelliteWarehouseInventoryList-num-subtract-btn"></a-button>
+              :id="'satelliteWarehouseInventoryList-add-'+record.id"
+            ></a-button>
           </template>
           </template>
           <!-- 操作 -->
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
           <template slot="action" slot-scope="text, record">
-            <a-button type="link" @click="handleConfirm(record)" id="satelliteWarehouseInventoryList-remove-btn">移除</a-button>
+            <a-button type="link" @click="handleConfirm(record)" :id="'satelliteWarehouseInventoryList-remove-'+record.id">移除</a-button>
           </template>
           </template>
         </s-table>
         </s-table>
         <div class="btn-cont">
         <div class="btn-cont">
-          <a-button type="primary" id="satellite-warehouse-inventory-add-modal-add" @click="handleAdd">创建销售单</a-button>
-          <a-button id="satellite-warehouse-inventory-add-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+          <a-button type="primary" id="satellite-warehouse-inventory-creat" @click="handleAdd">创建销售单</a-button>
+          <a-button id="satellite-warehouse-inventory-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
         </div>
         </div>
       </div>
       </div>
     </a-spin>
     </a-spin>
@@ -75,7 +77,7 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    nowData: {
+    nowData: { // 单据详情数据
       type: Object,
       type: Object,
       default: null
       default: null
     }
     }
@@ -151,7 +153,9 @@ export default {
     },
     },
     //  补货数量  加
     //  补货数量  加
     handleNumAdd (row) {
     handleNumAdd (row) {
-      row.productQty < 999999 ? this.handleQty(++row.productQty, row) : row.productQty
+      if (row.productQty < 999999) {
+        this.handleQty(++row.productQty, row)
+      }
     },
     },
     //  补货数量  减
     //  补货数量  减
     handleNumSubtract (row) {
     handleNumSubtract (row) {
@@ -185,6 +189,7 @@ export default {
     onChange (val, row) {
     onChange (val, row) {
       val > 0 ? this.handleQty(val, row) : this.handleRemove(row)
       val > 0 ? this.handleQty(val, row) : this.handleRemove(row)
     },
     },
+    // 修改数量
     handleQty (val, row) {
     handleQty (val, row) {
       const params = {
       const params = {
         satelliteWarehouseSupplySn: row.satelliteWarehouseSupplySn,
         satelliteWarehouseSupplySn: row.satelliteWarehouseSupplySn,

+ 18 - 15
src/views/inventoryManagement/satelliteWarehouseInventory/list.vue

@@ -1,10 +1,10 @@
 <template>
 <template>
-  <a-card size="small" :bordered="false" class="satelliteWarehouseInventoryList-wrap">
+  <a-card size="small" :bordered="false" class="satelliteWarehouseInventory-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form-model
         <a-form-model
-          id="satelliteWarehouseInventoryList-form"
+          id="satelliteWarehouseInventory-form"
           ref="ruleForm"
           ref="ruleForm"
           class="form-model-con"
           class="form-model-con"
           layout="inline"
           layout="inline"
@@ -16,29 +16,29 @@
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称" prop="customer.customerSn">
               <a-form-model-item label="客户名称" prop="customer.customerSn">
-                <custSatelliteList ref="custSatelliteList" :verify="true" @change="custSatelliteChange"></custSatelliteList>
+                <custSatelliteList id="satelliteWarehouseInventory-custname" ref="custSatelliteList" :verify="true" @change="custSatelliteChange"></custSatelliteList>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="配件名称">
               <a-form-model-item label="配件名称">
-                <a-input id="satelliteWarehouseInventoryList-name" v-model.trim="queryParam.dealerProduct.name" allowClear placeholder="请输入配件名称" />
+                <a-input id="satelliteWarehouseInventory-name" v-model.trim="queryParam.dealerProduct.name" allowClear placeholder="请输入配件名称" />
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="配件编码">
               <a-form-model-item label="配件编码">
-                <a-input id="satelliteWarehouseInventoryList-queryWord" v-model.trim="queryParam.dealerProduct.queryWord" allowClear placeholder="请输入产品编码或产品原厂编码" />
+                <a-input id="satelliteWarehouseInventory-queryWord" v-model.trim="queryParam.dealerProduct.queryWord" allowClear placeholder="请输入产品编码或产品原厂编码" />
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="satelliteWarehouseInventoryList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="satelliteWarehouseInventoryList-reset">重置</a-button>
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="satelliteWarehouseInventory-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="satelliteWarehouseInventory-reset">重置</a-button>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
         </a-form-model>
         </a-form-model>
       </div>
       </div>
       <!-- 操作按钮 -->
       <!-- 操作按钮 -->
       <div class="table-operator">
       <div class="table-operator">
-        <a-button v-if="$hasPermissions('B_satelliteWarehouseInventoryDetail')" id="satelliteWarehouseInventoryList-replenishment" type="primary" class="button-error" @click="handleReplenishment">补货清单</a-button>
+        <a-button v-if="$hasPermissions('B_satelliteWarehouseInventoryDetail')" id="satelliteWarehouseInventory-replenishment" type="primary" class="button-error" @click="handleReplenishment">补货清单</a-button>
       </div>
       </div>
       <!-- 列表 -->
       <!-- 列表 -->
       <s-table
       <s-table
@@ -54,7 +54,7 @@
         bordered>
         bordered>
         <!-- 操作 -->
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" v-if="$hasPermissions('B_satelliteWarehouseInventoryAdd')" type="link" @click="handleAdd(record)" id="satelliteWarehouseInventoryList-add-btn">加入补货单</a-button>
+          <a-button size="small" v-if="$hasPermissions('B_satelliteWarehouseInventoryAdd')" type="link" @click="handleAdd(record)" :id="'satelliteWarehouseInventory-add-'+record.id">加入补货单</a-button>
           <span v-if="!$hasPermissions('B_satelliteWarehouseInventoryAdd')">--</span>
           <span v-if="!$hasPermissions('B_satelliteWarehouseInventoryAdd')">--</span>
         </template>
         </template>
       </s-table>
       </s-table>
@@ -82,11 +82,11 @@ export default {
       tableHeight: 0,
       tableHeight: 0,
       queryParam: {
       queryParam: {
         customer: {
         customer: {
-          customerSn: undefined
+          customerSn: undefined // 客户
         },
         },
-        dealerProduct: {
-          name: '',
-          queryWord: ''
+        dealerProduct: { // 产品信息
+          name: '', // 产品名称
+          queryWord: '' // 产品编码或原厂编码
         }
         }
       },
       },
       rules: {
       rules: {
@@ -121,11 +121,12 @@ export default {
           return data
           return data
         })
         })
       },
       },
-      openModal: false,
-      nowData: null
+      openModal: false, // 打开补货单弹框
+      nowData: null // 当前操作数据
     }
     }
   },
   },
   methods: {
   methods: {
+    // 选择客户名称
     custSatelliteChange (val) {
     custSatelliteChange (val) {
       this.queryParam.customer.customerSn = val.key
       this.queryParam.customer.customerSn = val.key
       this.nowData = {
       this.nowData = {
@@ -191,12 +192,14 @@ export default {
     closeModal () {
     closeModal () {
       this.openModal = false
       this.openModal = false
     },
     },
+    // 页面初始化
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
         _this.setTableH()
       })
       })
     },
     },
+    // 表格高度
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235
       this.tableHeight = window.innerHeight - tableSearchH - 235

+ 4 - 3
src/views/inventoryManagement/warehouse/editModal.vue

@@ -30,6 +30,7 @@
           </a-form-model-item>
           </a-form-model-item>
           <a-form-model-item label="排序" prop="sort">
           <a-form-model-item label="排序" prop="sort">
             <a-input-number
             <a-input-number
+              id="warehouseEdit-sort"
               v-model="form.sort"
               v-model="form.sort"
               :min="0"
               :min="0"
               :max="999999"
               :max="999999"
@@ -61,11 +62,11 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    itemId: {
+    itemId: { // 仓库id
       type: [Number, String],
       type: [Number, String],
       default: ''
       default: ''
     },
     },
-    nowData: {
+    nowData: { // 当前仓库数据
       type: Object,
       type: Object,
       default: null
       default: null
     }
     }
@@ -95,6 +96,7 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    // 过滤空格
     filterEmpty () {
     filterEmpty () {
       let str = this.form.name
       let str = this.form.name
       str = str.replace(/\ +/g, '')
       str = str.replace(/\ +/g, '')
@@ -134,7 +136,6 @@ export default {
             }
             }
           })
           })
         } else {
         } else {
-          console.log('error submit!!')
           return false
           return false
         }
         }
       })
       })

+ 6 - 4
src/views/inventoryManagement/warehouse/list.vue

@@ -42,21 +42,21 @@
             type="link"
             type="link"
             class="button-primary"
             class="button-primary"
             @click="goStoringLocation(record)"
             @click="goStoringLocation(record)"
-            id="warehouseList-storingLocation-btn">仓位管理</a-button>
+            :id="'warehouseList-storingLocation-'+record.id">仓位管理</a-button>
           <a-button
           <a-button
             size="small"
             size="small"
             v-if="$hasPermissions('B_inventory_warehouse_edit') && record.sysFlag==0"
             v-if="$hasPermissions('B_inventory_warehouse_edit') && record.sysFlag==0"
             type="link"
             type="link"
             class="button-primary"
             class="button-primary"
             @click="handleEdit(record)"
             @click="handleEdit(record)"
-            id="warehouseList-edit-btn">编辑</a-button>
+            :id="'warehouseList-edit-'+record.id">编辑</a-button>
           <a-button
           <a-button
             size="small"
             size="small"
             v-if="$hasPermissions('B_inventory_warehouse_del') && record.sysFlag==0"
             v-if="$hasPermissions('B_inventory_warehouse_del') && record.sysFlag==0"
             type="link"
             type="link"
             class="button-error"
             class="button-error"
             @click="handleDel(record)"
             @click="handleDel(record)"
-            id="warehouseList-del-btn">删除</a-button>
+            :id="'warehouseList-del-'+record.id">删除</a-button>
           <span v-if="!$hasPermissions('M_inventoryWarehouseStoringLocationList') && !$hasPermissions('B_inventory_warehouse_edit') && !$hasPermissions('B_inventory_warehouse_del')">--</span>
           <span v-if="!$hasPermissions('M_inventoryWarehouseStoringLocationList') && !$hasPermissions('B_inventory_warehouse_edit') && !$hasPermissions('B_inventory_warehouse_del')">--</span>
         </template>
         </template>
       </s-table>
       </s-table>
@@ -81,7 +81,7 @@ export default {
       queryParam: { //  查询条件
       queryParam: { //  查询条件
         name: '' //  仓库名称
         name: '' //  仓库名称
       },
       },
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: '14%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '14%', align: 'center' },
@@ -160,12 +160,14 @@ export default {
     goStoringLocation (row) {
     goStoringLocation (row) {
       this.$router.push({ path: `/inventoryManagement/storingLocation/${row.warehouseSn}`, query: { name: row.name } })
       this.$router.push({ path: `/inventoryManagement/storingLocation/${row.warehouseSn}`, query: { name: row.name } })
     },
     },
+    // 页面初始化
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
         _this.setTableH()
       })
       })
     },
     },
+    // 设置表格高度
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235
       this.tableHeight = window.innerHeight - tableSearchH - 235

+ 8 - 7
src/views/inventoryManagement/warehouse/storingLocation/editModal.vue

@@ -29,11 +29,12 @@
           </a-form-model-item>
           </a-form-model-item>
           <a-form-model-item label="所属仓库" prop="warehouseSn">
           <a-form-model-item label="所属仓库" prop="warehouseSn">
             <a-select id="storingLocationEdit-warehouseSn" disabled placeholder="请选择所属仓库" allowClear v-model="form.warehouseSn">
             <a-select id="storingLocationEdit-warehouseSn" disabled placeholder="请选择所属仓库" allowClear v-model="form.warehouseSn">
-              <a-select-option v-for="item in warehouseList" :key="item.id" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+              <a-select-option v-for="item in warehouseList" :id="'storingLocationEdit-warehouseSn-'+item.warehouseSn" :key="item.id" :value="item.warehouseSn">{{ item.name }}</a-select-option>
             </a-select>
             </a-select>
           </a-form-model-item>
           </a-form-model-item>
           <a-form-model-item label="排序" prop="sort">
           <a-form-model-item label="排序" prop="sort">
             <a-input-number
             <a-input-number
+              id="storingLocationEdit-sort"
               v-model="form.sort"
               v-model="form.sort"
               :min="0"
               :min="0"
               :max="999999"
               :max="999999"
@@ -44,8 +45,8 @@
           </a-form-model-item>
           </a-form-model-item>
         </a-form-model>
         </a-form-model>
         <div class="btn-cont">
         <div class="btn-cont">
-          <a-button type="primary" id="storingLocation-edit-modal-save" @click="handleSave">保存</a-button>
-          <a-button id="storingLocation-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+          <a-button type="primary" id="storingLocation-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="storingLocation-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
         </div>
         </div>
       </div>
       </div>
     </a-spin>
     </a-spin>
@@ -65,11 +66,11 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    itemId: {
+    itemId: { // id
       type: [Number, String],
       type: [Number, String],
       default: ''
       default: ''
     },
     },
-    nowData: {
+    nowData: { // 详情
       type: Object,
       type: Object,
       default: null
       default: null
     }
     }
@@ -148,7 +149,6 @@ export default {
             }
             }
           })
           })
         } else {
         } else {
-          console.log('error submit!!')
           return false
           return false
         }
         }
       })
       })
@@ -162,6 +162,7 @@ export default {
     //  重定义的弹框状态
     //  重定义的弹框状态
     isShow (newValue, oldValue) {
     isShow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
+        // 重置表单
         this.$refs.ruleForm.resetFields()
         this.$refs.ruleForm.resetFields()
         this.form = {
         this.form = {
           name: '',
           name: '',
@@ -173,7 +174,7 @@ export default {
         this.getWarehouseList()
         this.getWarehouseList()
         this.form = {
         this.form = {
           name: '',
           name: '',
-          warehouseSn: this.nowData && this.nowData.warehouseSn ? this.nowData.warehouseSn : '',
+          warehouseSn: this.nowData && this.nowData.warehouseSn ? this.nowData.warehouseSn : '', // 仓库默认值
           sort: ''
           sort: ''
         }
         }
       }
       }

+ 5 - 3
src/views/inventoryManagement/warehouse/storingLocation/list.vue

@@ -50,14 +50,14 @@
               type="link"
               type="link"
               class="button-primary"
               class="button-primary"
               @click="handleEdit(record)"
               @click="handleEdit(record)"
-              id="storingLocationList-edit-btn">编辑</a-button>
+              :id="'storingLocationList-edit-'+record.id">编辑</a-button>
             <a-button
             <a-button
               size="small"
               size="small"
               v-if="$hasPermissions('B_inventory_warehouse_storingLocation_del') && record.sysFlag==0"
               v-if="$hasPermissions('B_inventory_warehouse_storingLocation_del') && record.sysFlag==0"
               type="link"
               type="link"
               class="button-error"
               class="button-error"
               @click="handleDel(record)"
               @click="handleDel(record)"
-              id="storingLocationList-del-btn">删除</a-button>
+              :id="'storingLocationList-id-'+record.id">删除</a-button>
             <span v-if="!$hasPermissions('B_inventory_warehouse_storingLocation_edit') && !$hasPermissions('B_inventory_warehouse_storingLocation_del')">--</span>
             <span v-if="!$hasPermissions('B_inventory_warehouse_storingLocation_edit') && !$hasPermissions('B_inventory_warehouse_storingLocation_del')">--</span>
           </template>
           </template>
         </s-table>
         </s-table>
@@ -80,7 +80,7 @@ export default {
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       queryParam: { //  查询条件
       queryParam: { //  查询条件
         warehouseSn: this.$route.params.sn, //  仓库sn
         warehouseSn: this.$route.params.sn, //  仓库sn
         name: '' //  仓位名称
         name: '' //  仓位名称
@@ -171,12 +171,14 @@ export default {
     handleBack () {
     handleBack () {
       this.$router.push({ path: '/inventoryManagement/warehouse/list' })
       this.$router.push({ path: '/inventoryManagement/warehouse/list' })
     },
     },
+    // 页面初始化
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
         _this.setTableH()
       })
       })
     },
     },
+    // 设置表格高度
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 290
       this.tableHeight = window.innerHeight - tableSearchH - 290