lilei 2 vuotta sitten
vanhempi
commit
67a4c77ff2

+ 1 - 1
public/version.json

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

+ 2 - 1
src/components/index.less

@@ -456,9 +456,10 @@
 .ant-alert-message, .ant-card-head{
   color: #000000!important;
 }
-.ant-input-number-disabled,.ant-input-disabled,.ant-select-disabled .ant-select-selection,.ant-input[disabled]{
+.ant-input-number-disabled,.ant-input-disabled,.ant-select-disabled .ant-select-selection,.ant-input[disabled],input[readonly]{
   background-color: #F8F8F8!important;
   color: #333!important;
+  cursor: not-allowed;
 }
 .ant-cascader-picker-disabled .ant-cascader-picker-label{
   color: #333!important;

+ 19 - 2
src/views/numsGoodsShelves/recallManagement/addRecallBillModal.vue

@@ -86,6 +86,8 @@
               v-else
               size="small"
               v-model="record.confirmQty"
+              :readonly="hasChecked(record.id)"
+              @change="changeNums(record)"
               :precision="0"
               :min="1"
               :max="record.recallBillQty?record.qty - record.recallBillQty :record.qty"
@@ -238,6 +240,7 @@ export default {
               const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
               const cur = row.find(item => item.id == data[i].id)
               data[i].confirmQty = cur ? cur.confirmQty : (data[i].confirmQty || data[i].recallBillQty ? data[i].qty - data[i].recallBillQty : data[i].qty)
+              data[i].checked = !cur
             }
           }
           this.spinning = false
@@ -251,6 +254,19 @@ export default {
       // 获取选中列表
       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)
+      if (cur) {
+        cur.confirmQty = data.confirmQty
+      }
+      row.splice()
+    },
     //  确定新增回调单
     handleSave () {
       const _this = this
@@ -344,8 +360,9 @@ export default {
         this.$refs.ruleForm.resetFields()
       } else {
         this.$nextTick(() => {
-          this.$refs.recallBillTable.clearSelected();
-          this.resetSearchForm();
+          this.$refs.recallBillTable.clearSelected()
+          this.showChecked = false
+          this.resetSearchForm()
         })
       }
     }

+ 20 - 2
src/views/numsGoodsShelves/replenishmentManagement/creatReplenishmentOrder.vue

@@ -71,7 +71,9 @@
           <template slot="action" slot-scope="text, record">
             <a-input-number
               size="small"
+              :readonly="hasChecked(record.id)"
               v-model="record.replenishQty"
+              @change="changeNums(record)"
               :precision="0"
               :min="1"
               placeholder="请输入"
@@ -151,6 +153,7 @@ export default {
         productName: '', //  产品名称
         stockStateList: []
       },
+      allData: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
@@ -168,10 +171,12 @@ export default {
               const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
               const cur = row.find(item => item.id == data[i].id)
               data[i].replenishQty = cur ? cur.replenishQty : (data[i].replenishBillWaitQty || 1)
+              data[i].checked = !cur
             }
             this.disabled = false
           }
           this.spinning = false
+          this.allData = data
           return data
         })
       },
@@ -192,6 +197,19 @@ 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)
+      if (cur) {
+        cur.replenishQty = data.replenishQty
+      }
+      row.splice()
+    },
     // 重置
     resetSearchForm () {
       this.queryParam = {
@@ -199,8 +217,6 @@ export default {
         productName: '', //  产品名称
         stockStateList: []
       }
-      this.showChecked = false
-      this.$refs.table.clearSelected()
       this.$refs.table.refresh(true)
     },
     //  确认补货
@@ -248,6 +264,8 @@ export default {
       } else {
         this.$nextTick(() => {
           this.resetSearchForm()
+          this.$refs.table.clearSelected()
+          this.showChecked = false
         })
       }
     }

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

@@ -20,7 +20,7 @@
         size="small"
         :rowKey="(record) => record.id"
         rowKeyName="id"
-        :row-selection="!(basicInfoData.billState == 'FINISH' && !basicInfoData.totalPutQty)?{columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: !record.printQty} })}:null"
+        :row-selection="!(basicInfoData&&basicInfoData.billState == 'FINISH' && !basicInfoData.totalPutQty)?{columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: !record.printQty} })}:null"
         @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"