Browse Source

修改bug

chenrui 2 years ago
parent
commit
2c0e97b30a

+ 4 - 6
src/views/numsGoodsShelves/recallManagement/addRecallBillModal.vue

@@ -73,7 +73,7 @@
           ref="recallBillTable"
           size="small"
           :rowKey="(record) => record.id"
-          :row-selection="{columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.confirmQty == 0 } })}"
+          :row-selection="{columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.confirmQty <= 0 } })}"
           @rowSelection="onSelectChange"
           :columns="columns"
           :data="loadData"
@@ -88,7 +88,7 @@
               v-model="record.confirmQty"
               :precision="0"
               :min="1"
-              :max="record.qty"
+              :max="record.recallBillQty?record.qty - record.recallBillQty :record.qty"
               placeholder="请输入"
               :style="{ width: '100%' }"
             ></a-input-number>
@@ -153,7 +153,7 @@ export default {
           title: '产品名称',
           dataIndex: 'productName',
           width: '30%',
-          align: 'left',
+          align: 'center',
           customRender: function (text) {
             return text || '--'
           },
@@ -237,7 +237,7 @@ export default {
               data[i].no = i + 1
               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].qty)
+              data[i].confirmQty = cur ? cur.confirmQty : (data[i].confirmQty || data[i].recallBillQty ? data[i].qty - data[i].recallBillQty : data[i].qty)
             }
           }
           this.spinning = false
@@ -302,8 +302,6 @@ export default {
         unsalableDaysEnd: undefined
       }
       this.queryParam = obj
-      this.showChecked = false
-      this.$refs.recallBillTable.clearSelected()
       this.$refs.recallBillTable.refresh(true)
     },
     // 校验滞销天数数值范围

+ 3 - 0
src/views/numsGoodsShelves/recallManagement/detailModal.vue

@@ -20,6 +20,9 @@
           <span v-if="salesReturnBillList && salesReturnBillList.length>0">
             <span v-for="con in salesReturnBillList" :key="con.id" class="recallBillNo" @click="jumpDetail(con)">{{ con.salesReturnNo }}</span>
           </span>
+          <span v-else>
+            --
+          </span>
           <a-button type="primary" ghost class="recallBillBtn" @click="seeRecallBill" v-if="itemData.billState != 'CANCEL'">生成销售退货单</a-button>
         </a-descriptions-item>
       </a-descriptions>

+ 7 - 6
src/views/numsGoodsShelves/shelfMonitoring/addModal.vue

@@ -35,9 +35,9 @@
             v-model="record.confirmQty"
             :precision="0"
             :min="0"
-            :max="record.qty"
+            :max="record.recallBillQty? record.qty - record.recallBillQty :record.qty"
             placeholder="请输入"
-            :style="{width: '100%', color: record.confirmQty==0 ? 'red': ''}" />
+            :style="{width: '100%', color: record.confirmQty<=0 ? 'red': ''}" />
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record, index">
@@ -87,8 +87,9 @@ export default {
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '当前库存', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '最大库容', dataIndex: 'maxQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调回在途', dataIndex: 'recallBillQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '当前库存', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '最大库容', dataIndex: 'maxQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '滞销天数', dataIndex: 'unsalableDays', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调货数量', scopedSlots: { customRender: 'confirmQty' }, width: '10%', align: 'center' },
         { title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -149,11 +150,11 @@ export default {
       this.nowData.list.map((item, index) => {
         params.push(item.shelfProductSn)
       })
-      shelfControlList({ shelfProductSnList: params }).then(res => {
+      shelfControlList({ shelfProductSnList: params, shelfSn: this.nowData.shelfInfo.shelfSn }).then(res => {
         if (res.status == 200 && res.data) {
           res.data.map((item, index) => {
             item.no = index + 1
-            item.confirmQty = item.qty
+            item.confirmQty = item.recallBillQty ? item.qty - item.recallBillQty : item.qty
           })
           this.listData = res.data
         }