Kaynağa Gözat

完善id和注释

lilei 11 ay önce
ebeveyn
işleme
74d829a333

+ 1 - 1
public/version.json

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

+ 3 - 2
src/views/numsGoodsShelves/replenishmentManagement/confirmModal.vue

@@ -29,7 +29,7 @@
         <template slot="confirmQty" slot-scope="text, record">
           <a-input-number
             size="small"
-            id="replenishmentManagement-confirm-confirmQty"
+            :id="'rpm-confirm-confirmQty-'+record.id"
             v-model="record.confirmQty"
             :precision="0"
             :min="0"
@@ -59,7 +59,7 @@ export default {
       type: Boolean,
       default: false
     },
-    nowData: {
+    nowData: { // 当前数据
       type: Object,
       default: () => {
         return {}
@@ -101,6 +101,7 @@ export default {
     }
   },
   computed: {
+    // 标题
     modalTit () {
       const hjName = this.nowData && this.nowData.shelfInfo.shelfName ? this.nowData.shelfInfo.shelfName : ''
       return '补货单确认 —— ' + hjName

+ 19 - 10
src/views/numsGoodsShelves/replenishmentManagement/creatReplenishmentOrder.vue

@@ -20,19 +20,19 @@
           <a-row :gutter="5">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="产品编码">
-                <a-input id="chooseShelf-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+                <a-input id="crmo-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="产品名称">
-                <a-input id="chooseShelf-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+                <a-input id="crmo-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="12" :sm="24">
               <a-form-model-item label="门店库存情况">
                 <a-checkbox-group :options="options" v-model="queryParam.stockStateList" @change="onStockChange" />
-                <a-button style="margin-left: 15px" type="primary" @click="$refs.table.refresh(true)" id="chooseShelf-refresh">查询</a-button>
-                <a-button style="margin-left: 5px" @click="resetSearchForm" id="chooseShelf-reset">重置</a-button>
+                <a-button style="margin-left: 15px" type="primary" @click="$refs.table.refresh(true)" id="crmo-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" id="crmo-reset">重置</a-button>
               </a-form-model-item>
             </a-col>
           </a-row>
@@ -41,13 +41,13 @@
       <div>
         <div class="table-operator">
           <div>
-            <a-button type="primary" @click="handleSave">创建补货单</a-button>
+            <a-button id="crmo-creat-order" type="primary" @click="handleSave">创建补货单</a-button>
             <span style="margin-left:10px;" v-if="totalCategory||totalQty">
               已选 {{ totalCategory }} 款产品,共 {{ totalQty }} 件
             </span>
           </div>
           <div style="margin-left:20px;" v-if="totalCategory||totalQty">
-            <a-checkbox @change="changeShowChecked">
+            <a-checkbox id="crmo-check-show" @change="changeShowChecked">
               仅显示已选产品
             </a-checkbox>
           </div>
@@ -68,6 +68,7 @@
           bordered>
           <template slot="action" slot-scope="text, record">
             <a-input-number
+              :id="'crmo-replenishQty-'+record.id"
               size="small"
               :readonly="hasChecked(record.id)"
               v-model="record.replenishQty"
@@ -97,7 +98,7 @@ export default {
       type: Boolean,
       default: false
     },
-    nowData: {
+    nowData: { // 当前操作数据
       type: Object,
       default: () => {
         return {}
@@ -105,10 +106,12 @@ export default {
     }
   },
   computed: {
+    // 弹框标题
     modalTit () {
       const hjName = this.nowData ? this.nowData.shelfName : ''
       return '待补货产品 —— ' + hjName
     },
+    // 列
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -126,9 +129,11 @@ export default {
       ]
       return arr
     },
+    // 总款数
     totalCategory () {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.length
     },
+    // 总补货数量
     totalQty () {
       let ret = 0
       this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.map(item => {
@@ -141,7 +146,7 @@ export default {
     return {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
-      options: [
+      options: [ // 门店库存情况选项
         { label: '库存充足', value: 'stockEnough' },
         { label: '部分缺货', value: 'portionStockout' },
         { label: '全部缺货', value: 'allStockout' }
@@ -149,9 +154,9 @@ export default {
       queryParam: {
         productCode: '', //  产品编码
         productName: '', //  产品名称
-        stockStateList: []
+        stockStateList: [] // 门店库存情况
       },
-      allData: [],
+      allData: [], // 所有数据
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
@@ -184,6 +189,7 @@ export default {
     }
   },
   methods: {
+    // 选择门店库存情况
     onStockChange (val) {
       this.queryParam.stockStateList = val
     },
@@ -196,11 +202,13 @@ export default {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
+    // 是否已选
     hasChecked: function (value) {
       const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
       const cur = row.find(item => item.id == value)
       return !cur
     },
+    // 补货数量修改
     changeNums (data) {
       const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
       const cur = row.find(item => item.id == data.id)
@@ -262,6 +270,7 @@ export default {
         this.$emit('close')
       } else {
         this.$nextTick(() => {
+          // 重置
           this.resetSearchForm()
           this.$refs.table.clearSelected()
           this.showChecked = false

+ 11 - 8
src/views/numsGoodsShelves/replenishmentManagement/detailModal.vue

@@ -55,7 +55,7 @@
       </a-spin>
     </div>
     <div class="btn-cont">
-      <a-button @click="isShow = false">关闭</a-button>
+      <a-button id="rmp-close-btn" @click="isShow = false">关闭</a-button>
     </div>
     <!-- 生成销售单 -->
     <commonModal modalTit="" :openModal="showPlModal" @close="showPlModal=false" @ok="createSales">
@@ -117,7 +117,7 @@ export default {
       type: Boolean,
       default: false
     },
-    nowData: {
+    nowData: { // 当前操作数据
       type: Object,
       default: () => {
         return {}
@@ -129,10 +129,10 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       spinning: false,
       disabled: false,
-      showPlModal: false,
-      openDetailModal: false,
-      orderSn: null,
-      listData: [],
+      showPlModal: false, // 生成销售单弹框
+      openDetailModal: false, // 销售单详情弹框
+      orderSn: null, // 单据sn
+      listData: [], // 列表数据
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -160,16 +160,18 @@ export default {
           return data
         })
       },
-      localDataSource: [],
+      localDataSource: [], // 原始数据
       detailData: null, //  详情数据
-      salesOrderList: []
+      salesOrderList: [] // 销售单列表数据
     }
   },
   computed: {
+    // 弹框标题
     modalTit () {
       const hjName = this.nowData && this.nowData.shelfInfo.shelfName ? this.nowData.shelfInfo.shelfName : ''
       return '补货单详情 —— ' + hjName
     },
+    // 总数量
     totalNums () {
       let ret = 0
       const isFin = this.detailData && this.detailData.billState == 'FINISH'
@@ -223,6 +225,7 @@ export default {
         }
       })
     },
+    // 页面初始化
     pageInit () {
       const vm = this
       vm.$nextTick(() => {

+ 83 - 49
src/views/numsGoodsShelves/replenishmentManagement/list.vue

@@ -6,32 +6,34 @@
         <!-- 标签页 -->
         <a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="replenishmentManagementList-tabs">
           <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
-            <p slot="tab">{{ item.bizName }}<span v-if="item.countNum && item.bizName!='全部'&&item.bizName!='已完成'&&item.bizName!='已取消'" style="color: red;">({{ item.countNum }})</span></p>
+            <p slot="tab" :id="'tab-'+item.bizType">{{ item.bizName }}<span v-if="item.countNum && item.bizName!='全部'&&item.bizName!='已完成'&&item.bizName!='已取消'" style="color: red;">({{ item.countNum }})</span></p>
           </a-tab-pane>
         </a-tabs>
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24" v-if="queryParam.bizType=='WAIT_CHECK'">
               <a-form-item label="出库时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="replenishmentManagementList-otime" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24" v-else-if="queryParam.bizType=='FINISH'">
               <a-form-item label="签收时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="replenishmentManagementList-qstime" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24" v-else>
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="replenishmentManagementList-ctime" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="补货单号"><a-input id="replenishmentManagementList-replenishBillNo" v-model.trim="queryParam.replenishBillNo" allowClear placeholder="请输入补货单号" /></a-form-item>
+              <a-form-item label="补货单号">
+                <a-input id="replenishmentManagementList-replenishBillNo" v-model.trim="queryParam.replenishBillNo" allowClear placeholder="请输入补货单号" />
+              </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="货架名称">
-                <shelfSList :showAll="true" v-model="queryParam.shelfSn"></shelfSList>
+                <shelfSList id="replenishmentManagementList-shlefsn" :showAll="true" v-model="queryParam.shelfSn"></shelfSList>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -48,7 +50,7 @@
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" style="margin-left: 5px" @click="queryByTypeSum" :disabled="disabled" id="replenishmentManagementList-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="replenishmentManagementList-reset">重置</a-button>
-                <a @click="advanced = !advanced" style="margin-left: 5px">
+                <a @click="advanced = !advanced" style="margin-left: 5px" id="replenishmentManagementList-advanced">
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'" />
                 </a>
@@ -58,7 +60,7 @@
         </a-form>
         <!-- 操作按钮 -->
         <div class="table-operator">
-          <a-button type="primary" class="button-error" @click="openSlodOut=true">待补货产品</a-button>
+          <a-button id="replenishmentManagementList-bhcp" type="primary" class="button-error" @click="openSlodOut=true">待补货产品</a-button>
           <span style="margin-left:10px;color:#999;">请点击此按钮,选择需要补货的产品创建补货单</span>
         </div>
       </div>
@@ -90,16 +92,40 @@
         </a-table>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <!-- <a-button v-if="record.billState=='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handleConfirm(record)">确认</a-button> -->
-          <a-button v-if="record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleOutWarehousing(record)">出库</a-button>
-          <a-button v-if="record.billState=='WAIT_CHECK'" size="small" type="link" class="button-primary" @click.stop="handlePutWarehousing(record)">签收</a-button>
-          <a-button v-if="record.billState=='WAIT_CONFIRM' || record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleCancelOrder(record)">取消补货单</a-button>
-          <a-button v-if="record.billState=='CANCEL'" size="small" type="link" class="button-error" @click.stop="handleDelete(record)">删除</a-button>
+          <!-- <a-button :id="'rmpList-confirm-'+record.id" v-if="record.billState=='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handleConfirm(record)">确认</a-button> -->
+          <a-button
+            :id="'rmpList-outstock-'+record.id"
+            v-if="record.billState=='WAIT_OUT_STOCK'"
+            size="small"
+            type="link"
+            class="button-primary"
+            @click.stop="handleOutWarehousing(record)">出库</a-button>
+          <a-button
+            :id="'rmpList-sign-'+record.id"
+            v-if="record.billState=='WAIT_CHECK'"
+            size="small"
+            type="link"
+            class="button-primary"
+            @click.stop="handlePutWarehousing(record)">签收</a-button>
+          <a-button
+            :id="'rmpList-cancel-'+record.id"
+            v-if="record.billState=='WAIT_CONFIRM' || record.billState=='WAIT_OUT_STOCK'"
+            size="small"
+            type="link"
+            class="button-primary"
+            @click.stop="handleCancelOrder(record)">取消补货单</a-button>
+          <a-button
+            :id="'rmpList-del-'+record.id"
+            v-if="record.billState=='CANCEL'"
+            size="small"
+            type="link"
+            class="button-error"
+            @click.stop="handleDelete(record)">删除</a-button>
           <a-button v-if="record.billState!='CANCEL'&&record.billState!='WAIT_CONFIRM'" size="small" type="link" class="button-primary" @click.stop="handlePrintSticker(record)">打印贴签</a-button>
         </template>
         <!-- 货架名称 -->
         <template slot="shelfName" slot-scope="text, record">
-          {{text}}
+          {{ text }}
           <a-badge count="已注销" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='WRITE_OFF'"></a-badge>
           <a-badge count="已暂停" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='SUSPEND'"></a-badge>
           <a-badge count="已停用" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.shelfInfo.state=='DISABLED'"></a-badge>
@@ -155,24 +181,24 @@ export default {
       isNotProd: false,
       spinning: false,
       advanced: true, //  高级搜索 展开/关闭
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
-      curBizType: 'ALL',
-      time: [
+      curBizType: 'ALL', // 当前页签值
+      time: [ // 时间默认值
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
       // 查询参数
       queryParam: {
-        bDate: getDate.getCurrMonthDays().starttime,
-        eDate: getDate.getCurrMonthDays().endtime,
-        bizType: 'ALL',
-        replenishBillNo: '',
-        shelfSn: undefined,
-        productCode: '',
-        productName: ''
+        bDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        eDate: getDate.getCurrMonthDays().endtime, // 结束时间
+        bizType: 'ALL', // 全部
+        replenishBillNo: '', // 补货单号
+        shelfSn: undefined, // 货架sn
+        productCode: '', // 产品编码
+        productName: '' // 产品名称
       },
-      expandedRowKeys: [],
+      expandedRowKeys: [], // 展开的key
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -180,13 +206,13 @@ export default {
         this.expandedRowKeys = []
         parameter.billState = this.queryParam.bizType == 'ALL' ? '' : this.queryParam.bizType
         const params = Object.assign(parameter, this.queryParam)
-        if (params.billState == 'WAIT_CHECK') {
+        if (params.billState == 'WAIT_CHECK') { // 待签收
           params.outStockTimeBegin = this.queryParam.bDate
           params.outStockTimeEnd = this.queryParam.eDate
-        } else if (params.billState == 'FINISH') {
+        } else if (params.billState == 'FINISH') { // 已完结
           params.putStockTimeBegin = this.queryParam.bDate
           params.putStockTimeEnd = this.queryParam.eDate
-        } else {
+        } else { // 其它
           params.beginDate = this.queryParam.bDate
           params.endDate = this.queryParam.eDate
         }
@@ -209,6 +235,7 @@ export default {
           return data
         })
       },
+      // 子表格列
       subColumns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -218,8 +245,8 @@ export default {
         { title: '签收数量', dataIndex: 'putQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
-      listData: [],
-      tabPaneData: [
+      listData: [], // 表格数据
+      tabPaneData: [ // tab业务状态列表数据
         { bizName: '全部', bizType: 'ALL', countNum: 0 },
         // { bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
         { bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
@@ -227,17 +254,17 @@ export default {
         { bizName: '已完成', bizType: 'FINISH', countNum: 0 },
         { bizName: '已取消', bizType: 'CANCEL', countNum: 0 }
       ],
-      nowData: null,
-      openConfirmModal: false,
-      openStockModal: false,
-      openPrintStickerModal: false,
-      openOutWarehousingModal: false,
-      openPutWarehousingModal: false,
-      openDetailModal: false,
-      openSlodOut: false,
-      validateType: 'confirm',
-      stockList: [],
-      paramsData: null
+      nowData: null, // 当前操作数据
+      openConfirmModal: false, // 是否打开确认弹框
+      openStockModal: false, // 是否打开库存不足,确认弹框
+      openPrintStickerModal: false, // 是否打开打印页签弹框
+      openOutWarehousingModal: false, // 是否打开出库弹框
+      openPutWarehousingModal: false, // 是否打开签收弹框
+      openDetailModal: false, // 是否打开详情弹框
+      openSlodOut: false, // 是否打开待补货弹框
+      validateType: 'confirm', // 弹框类型
+      stockList: [], // 库存不足明细
+      paramsData: null // 参数
     }
   },
   computed: {
@@ -252,9 +279,9 @@ export default {
         { title: '签收总量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'left' }
       ]
-      if (this.queryParam.bizType == 'WAIT_CHECK') {
+      if (this.queryParam.bizType == 'WAIT_CHECK') { // 待签收
         ret.splice(1, 1, { title: '出库时间', dataIndex: 'outStockTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } })
-      } else if (this.queryParam.bizType == 'FINISH') {
+      } else if (this.queryParam.bizType == 'FINISH') { // 已完成
         ret.splice(1, 1, { title: '签收时间', dataIndex: 'putStockTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       return ret
@@ -304,7 +331,7 @@ export default {
       this.openOutWarehousingModal = false
       this.queryByTypeSum(true)
     },
-    // cancel
+    // 弹框关闭后
     handleCancel () {
       this.nowData = null
       this.openConfirmModal = false
@@ -314,6 +341,7 @@ export default {
       this.openPutWarehousingModal = false
       this.openDetailModal = false
     },
+    // 确认后
     handleValidate (type, params) {
       if (type == 'confirm') { // 确认
         this.confirmFun(params)
@@ -378,7 +406,7 @@ export default {
         }
       })
     },
-    // 删除
+    // 删除补货单
     handleDelete (row) {
       const _this = this
       this.$confirm({
@@ -399,6 +427,7 @@ export default {
         }
       })
     },
+    // 展开表格获取子表格数据
     expandFun (expanded, record) {
       if (expanded) {
         this.expandedRowKeys.push(record.id)
@@ -426,12 +455,12 @@ export default {
         this.spinning = false
       })
     },
-    // 重置
+    // 重置列表
     resetSearchForm () {
       this.resetData()
       this.queryByTypeSum()
     },
-    // 重置数据
+    // 重置筛选数据
     resetData () {
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.bDate = getDate.getCurrMonthDays().starttime
@@ -442,7 +471,7 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
     },
-    //  时间  change
+    //  选择时间  change
     dateChange (date) {
       this.queryParam.bDate = date[0] || null
       this.queryParam.eDate = date[1] || null
@@ -454,7 +483,7 @@ export default {
       this.curBizType = key
       this.resetSearchForm()
     },
-    // 客户 change
+    // 选择客户 change
     custChange (obj) {
       this.queryParam.customerSn = obj.key || undefined
     },
@@ -486,18 +515,23 @@ export default {
         this.spinning = false
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.isNotProd = !!process.env.VUE_APP_ENVTIPS
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+      // 默认tab
       this.curBizType = this.$route.query && this.$route.query.bizType || this.curBizType
+      // 获取类型列表
       this.queryByTypeSum()
+      // 是否自动打开补货弹框
       if (this.$route.query && this.$route.query.bizType == 'ALL') {
         this.openSlodOut = true
       }

+ 9 - 6
src/views/numsGoodsShelves/replenishmentManagement/outWarehousingModal.vue

@@ -79,7 +79,7 @@ export default {
       type: Boolean,
       default: false
     },
-    nowData: {
+    nowData: { // 当前操作数据
       type: Object,
       default: () => {
         return {}
@@ -116,21 +116,23 @@ export default {
         })
       },
       form: {
-        dispatchType: undefined,
-        remarks: ''
+        dispatchType: undefined, // 配送方式
+        remarks: '' // 备注
       },
       rules: {
         'dispatchType': [{ required: true, message: '请选择配送方式', trigger: ['blur', 'change'] }]
       },
+      // 配送方式列表
       dispatchTypeList: [
         { name: '送货到店', val: 1 },
         { name: '快递到店', val: 2 }
       ],
-      listData: [],
-      basicInfoData: null
+      listData: [], // 表格数据
+      basicInfoData: null // 单据详情信息
     }
   },
   computed: {
+    // 标题
     modalTit () {
       const hjName = this.nowData && this.nowData.shelfInfo.shelfName ? this.nowData.shelfInfo.shelfName : ''
       return '补货单出库——' + hjName
@@ -148,6 +150,7 @@ export default {
             centered: true,
             onOk () {
               const arr = []
+              // 格式化数据
               _this.listData.map((item, index) => {
                 arr.push({
                   productSn: item.productSn,
@@ -177,7 +180,6 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -212,6 +214,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        // 重置
         this.$refs.table.clearTable()
         this.form.remarks = ''
         this.$refs.ruleForm.resetFields()

+ 8 - 5
src/views/numsGoodsShelves/replenishmentManagement/printStickerModal.vue

@@ -79,7 +79,7 @@ export default {
     return {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
-      showView: false,
+      showView: false, // 打印预览弹框
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -100,16 +100,18 @@ export default {
           return data
         })
       },
-      rowSelectionInfo: null,
-      listData: [],
-      basicInfoData: null
+      rowSelectionInfo: null, // 已选数据
+      listData: [], // 列表数据
+      basicInfoData: null // 详情信息
     }
   },
   computed: {
+    // 弹框标题
     modalTit () {
       const hjName = this.nowData && this.nowData.shelfInfo.shelfName ? this.nowData.shelfInfo.shelfName : ''
       return '补货单打印贴签——' + hjName
     },
+    // 列
     columns () {
       const ret = [
         { title: '产品编码', dataIndex: 'product.code', width: '22%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -130,12 +132,12 @@ export default {
     //  开始打印
     handleSave () {
       const hasSel = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows
-      console.log(hasSel)
       if (!hasSel || hasSel && hasSel.length < 1) {
         this.$message.warning('请至少选择一个产品')
       } else {
         const nowData = this.nowData
         const list = this.rowSelectionInfo.selectedRows
+        // 打开预览弹框
         this.showView = true
         this.$refs.printView.setData(nowData, list)
       }
@@ -160,6 +162,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        // 重置
         this.rowSelectionInfo = null
         this.$refs.table.clearTable()
         this.$refs.table.clearSelected()

+ 3 - 3
src/views/numsGoodsShelves/replenishmentManagement/printView.vue

@@ -61,8 +61,8 @@ export default {
   data () {
     return {
       isShow: false,
-      nowData: null,
-      list: []
+      nowData: null, // 当前数据
+      list: [] // 打印明细列表
     }
   },
   methods: {
@@ -78,6 +78,7 @@ export default {
         JGPrintTag('60mm', '40mm', item)
       }
     },
+    // 设置值
     setData (nowData, list) {
       const dearInfo = this.$store.state.user.info
       this.nowData = nowData
@@ -85,7 +86,6 @@ export default {
       this.nowData.dealerName = dearInfo.orgName
       this.nowData.dealerSn = dearInfo.orgSn
       this.nowData.parintUser = dearInfo.userNameCN
-      console.log(this.list)
     }
   },
   watch: {

+ 4 - 3
src/views/numsGoodsShelves/replenishmentManagement/putWarehousingModal.vue

@@ -73,7 +73,7 @@ export default {
       type: Boolean,
       default: false
     },
-    nowData: {
+    nowData: { // 当前操作数据
       type: Object,
       default: () => {
         return {}
@@ -111,11 +111,12 @@ export default {
           return data
         })
       },
-      listData: [],
-      basicInfoData: null
+      listData: [], // 列表数据
+      basicInfoData: null // 基本信息
     }
   },
   computed: {
+    // 弹框标题
     modalTit () {
       const hjName = this.nowData && this.nowData.shelfInfo.shelfName ? this.nowData.shelfInfo.shelfName : ''
       return '补货单签收——' + hjName

+ 2 - 1
src/views/numsGoodsShelves/replenishmentManagement/replenishmentDetail.vue

@@ -93,7 +93,7 @@ export default {
           return data
         })
       },
-      localDataSource: [],
+      localDataSource: [], // 原始表格数据
       detailData: null //  详情数据
     }
   },
@@ -108,6 +108,7 @@ export default {
         }
       })
     },
+    // 页面初始化
     pageInit () {
       const vm = this
       vm.$nextTick(() => {

+ 11 - 8
src/views/numsGoodsShelves/replenishmentManagement/slodOutModal.vue

@@ -15,13 +15,13 @@
             <a-row :gutter="15">
               <a-col :md="8" :sm="24">
                 <a-form-item label="货架名称">
-                  <shelfSList v-model="queryParam.shelfSn"></shelfSList>
+                  <shelfSList id="slodOut-shelfList" v-model="queryParam.shelfSn"></shelfSList>
                 </a-form-item>
               </a-col>
               <a-col :md="8" :sm="24">
                 <span class="table-page-search-submitButtons">
-                  <a-button type="primary" style="margin-left: 5px" @click="$refs.table.refresh(true)" :disabled="disabled">查询</a-button>
-                  <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled">重置</a-button>
+                  <a-button id="slodOut-search" type="primary" style="margin-left: 5px" @click="$refs.table.refresh(true)" :disabled="disabled">查询</a-button>
+                  <a-button id="slodOut-reset" style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled">重置</a-button>
                 </span>
               </a-col>
             </a-row>
@@ -46,7 +46,7 @@
               <a-badge count="已停用" :number-style="{ zoom:'80%',marginLeft:'5px', color: '#fff',background:'#999' }" v-if="record.state=='DISABLED'"></a-badge>
             </template>
             <template slot="action" slot-scope="text, record">
-              <span class="table-td-link" @click.stop="handleDetail(record)">产品明细</span>
+              <span :id="'slodOut-detail-'+record.id" class="table-td-link" @click.stop="handleDetail(record)">产品明细</span>
             </template>
           </s-table>
         </div>
@@ -77,10 +77,10 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       spinning: false,
-      openCreatRoModal: false,
       disabled: false,
+      openCreatRoModal: false, // 打开生成补货单弹框
       queryParam: {
-        shelfSn: undefined
+        shelfSn: undefined // 货架sn
       },
       // 表头
       columns: [
@@ -95,6 +95,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        // 排序
         if (parameter.sortOrder) {
           this.queryParam.queryWord = parameter.sortField
           this.queryParam.orderBy = parameter.sortOrder == 'ascend' ? 'ASC' : 'DESC'
@@ -115,9 +116,9 @@ export default {
           return data
         })
       },
-      localDataSource: [],
+      localDataSource: [], // 原始数据
       detailData: null, //  详情数据
-      nowData: null
+      nowData: null // 当前操作数据
     }
   },
   methods: {
@@ -126,6 +127,7 @@ export default {
       this.queryParam.shelfSn = undefined
       this.$refs.table.refresh(true)
     },
+    // 补货详情弹框
     handleDetail (row) {
       if (row.productCategory && row.productQty) {
         this.nowData = row
@@ -134,6 +136,7 @@ export default {
         this.$message.info('此货架没有待补货产品')
       }
     },
+    // 初始化
     pageInit () {
       const vm = this
       vm.$nextTick(() => {

+ 1 - 1
src/views/numsGoodsShelves/replenishmentManagement/stockModal.vue

@@ -47,7 +47,7 @@ export default {
       type: Boolean,
       default: false
     },
-    params: {
+    params: { // 参数
       type: Object,
       default: () => {
         return {}

+ 11 - 9
src/views/numsGoodsShelves/shelfOrder/detail.vue

@@ -3,7 +3,7 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <a-page-header :ghost="false" :backIcon="false" class="shelfOrderDetail-cont" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }">
         <template slot="subTitle" v-if="!outBizSn">
-          <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
+          <a href="javascript:;" id="shelfOrder-detail-back" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
           <a style="margin: 0 10px 0 20px;color: #666;font-size: 14px;font-weight: 600;">订单号:{{ detailData&&detailData.orderBillNo || '--' }}</a>
         </template>
       </a-page-header>
@@ -66,25 +66,25 @@ export default {
   },
   data () {
     return {
-      showPage: false,
-      spinning: false,
+      showPage: false, // 是否显示页面
+      spinning: false, // 页面loading
       disabled: false,
-      detailList: [],
+      detailList: [], // 详细列表数据
       detailData: null, //  详情数据
-      countDetail: null
+      countDetail: null // 统计数据
     }
   },
   computed: {
     columns () {
-      let _this=this
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '15%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
         { title: '产品名称', dataIndex: 'productName', width: '40%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '结算价', dataIndex: 'settlePrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text,2) : '--') } },
+        { title: '结算价', dataIndex: 'settlePrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '下单数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结算金额小计', dataIndex: 'settleAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ?  _this.toThousands(text,2) : '--') } }
+        { title: '结算金额小计', dataIndex: 'settleAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } }
       ]
       return arr
     }
@@ -94,6 +94,7 @@ export default {
     handleBack () {
       this.$router.push({ name: 'shelfOrderList' })
     },
+    // 单据明细列表信息
     getDetail () {
       this.spinning = true
       orderBillQueryPage({ pageNo: 1, pageSize: 1, orderBillSn: this.outBizSn || this.$route.params.sn }).then(res => {
@@ -104,11 +105,12 @@ export default {
           item.no = index + 1
         })
       })
-
+      // 统计数据
       orderBillDetailCount({ orderBillSn: this.outBizSn || this.$route.params.sn }).then(res => {
         this.countDetail = res.data || null
       })
     },
+    // 初始化页面
     pageInit () {
       const vm = this
       vm.$nextTick(() => {

+ 15 - 12
src/views/numsGoodsShelves/shelfOrder/list.vue

@@ -12,12 +12,12 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="货架名称">
-                <shelfSList ref="shelfSList" :showAll="true" mode="multiple" v-model="queryParam.shelfSnList"></shelfSList>
+                <shelfSList id="shelfOrder-shelfname" ref="shelfSList" :showAll="true" mode="multiple" v-model="queryParam.shelfSnList"></shelfSList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="下单时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="shelfOrder-time" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -59,7 +59,7 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-primary" @click="handleSet(record)">设置</a-button>
+          <a-button :id="'shelfOrder-shelf-set-'+record.id" size="small" type="link" class="button-primary" @click="handleSet(record)">设置</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -83,11 +83,11 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       time: [],
       queryParam: {
-        orderStartDate: '',
-        orderEndDate: '',
-        shelfSnList: undefined,
-        orderBillNo: '',
-        billState: undefined
+        orderStartDate: '', // 开始时间
+        orderEndDate: '', // 结束时间
+        shelfSnList: undefined, // 货架sn
+        orderBillNo: '', // 订单编号
+        billState: undefined // 单据状态
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -118,19 +118,20 @@ export default {
           return data
         })
       },
-      openModal: false,
-      countData: null
+      countData: null // 统计数据
     }
   },
   methods: {
-    //  时间  change
+    //  选择时间  change
     dateChange (date) {
       this.queryParam.orderStartDate = date[0] || null
       this.queryParam.orderEndDate = date[1] || null
     },
+    // 查看详情
     handleDetail (data) {
       this.$router.push({ name: 'shelfOrderDetail', params: { sn: data.orderBillSn } })
     },
+    // 获取统计数据
     orderBillQueryCount (params) {
       orderBillQueryCount(params).then(res => {
         this.countData = res.data || null
@@ -144,7 +145,7 @@ export default {
       this.queryParam.orderEndDate = ''
       this.queryParam.orderBillNo = ''
       this.queryParam.billState = undefined
-      console.log(flag)
+      // 如果从货架监控打开的,设置默认值
       if (this.$route.query && this.$route.query.bizType == 'SHELF_WARN' && flag == 1) {
         this.queryParam.shelfSnList = [this.$route.query.shelfSn]
       } else {
@@ -152,10 +153,12 @@ export default {
       }
       this.$refs.table.refresh(true)
     },
+    // 表格高度计算
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235
     },
+    // 初始化页面
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调