fix:产品库存数据展示调整

dev_1.0.2
jiangpeng 2026-07-09 19:01:06 +08:00
parent 2913740e36
commit 6d4923ac8b
3 changed files with 4 additions and 43 deletions

View File

@ -214,12 +214,12 @@
<!-- 入库记录对话框 --> <!-- 入库记录对话框 -->
<el-dialog :close-on-click-modal="false" title="入库记录" :visible.sync="innerLogVisible" width="70%" append-to-body> <el-dialog :close-on-click-modal="false" title="入库记录" :visible.sync="innerLogVisible" width="70%" append-to-body>
<inner-log v-if="innerLogVisible" :product-code="currentLogProductCode" :warehouse-id="currentLogWarehouseId" /> <inner-log v-if="innerLogVisible" :product-code="currentLogProductCode" />
</el-dialog> </el-dialog>
<!-- 出库记录对话框 --> <!-- 出库记录对话框 -->
<el-dialog :close-on-click-modal="false" title="出库记录" :visible.sync="outerLogVisible" width="70%" append-to-body> <el-dialog :close-on-click-modal="false" title="出库记录" :visible.sync="outerLogVisible" width="70%" append-to-body>
<outer-log v-if="outerLogVisible" :product-code="currentLogProductCode" :warehouse-id="currentLogWarehouseId" /> <outer-log v-if="outerLogVisible" :product-code="currentLogProductCode" />
</el-dialog> </el-dialog>
<!-- 在库现存对话框 --> <!-- 在库现存对话框 -->
@ -432,7 +432,6 @@ export default {
currentBindOrderProductName: null, currentBindOrderProductName: null,
currentBindOrderTotal: 0, currentBindOrderTotal: 0,
currentLogProductCode: null, currentLogProductCode: null,
currentLogWarehouseId: null,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -616,22 +615,12 @@ export default {
}, },
/** 处理入库记录 */ /** 处理入库记录 */
handleInnerLog(row) { handleInnerLog(row) {
if (!row.warehouseId) {
this.$modal.msgError("仓库信息不存在,无法查看记录");
return;
}
this.currentLogProductCode = row.productCode; this.currentLogProductCode = row.productCode;
this.currentLogWarehouseId = row.warehouseId;
this.innerLogVisible = true; this.innerLogVisible = true;
}, },
/** 处理出库记录 */ /** 处理出库记录 */
handleOuterLog(row) { handleOuterLog(row) {
if (!row.warehouseId) {
this.$modal.msgError("仓库信息不存在,无法查看记录");
return;
}
this.currentLogProductCode = row.productCode; this.currentLogProductCode = row.productCode;
this.currentLogWarehouseId = row.warehouseId;
this.outerLogVisible = true; this.outerLogVisible = true;
}, },
inventoryInnerIndex(index) { inventoryInnerIndex(index) {

View File

@ -42,10 +42,6 @@ export default {
productCode: { productCode: {
type: String, type: String,
required: true required: true
},
warehouseId: {
type: [String, Number],
required: true
} }
}, },
data() { data() {
@ -61,7 +57,6 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
productCode: null, productCode: null,
warehouseId: null,
orderByColumn: 'createTime', orderByColumn: 'createTime',
isAsc: 'desc' isAsc: 'desc'
} }
@ -76,20 +71,11 @@ export default {
this.fetchLog(); this.fetchLog();
} }
} }
},
warehouseId: {
immediate: true,
handler(val) {
if (val) {
this.queryParams.warehouseId = val;
this.fetchLog();
}
}
} }
}, },
methods: { methods: {
fetchLog() { fetchLog() {
if (!this.queryParams.productCode || !this.queryParams.warehouseId) { if (!this.queryParams.productCode) {
return; return;
} }
this.loading = true; this.loading = true;

View File

@ -37,10 +37,6 @@ export default {
productCode: { productCode: {
type: String, type: String,
required: true required: true
},
warehouseId: {
type: [String, Number],
required: true
} }
}, },
data() { data() {
@ -63,7 +59,6 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
productCode: null, productCode: null,
warehouseId: null,
orderByColumn: 'createTime', orderByColumn: 'createTime',
isAsc: 'desc' isAsc: 'desc'
} }
@ -78,20 +73,11 @@ export default {
this.fetchLog(); this.fetchLog();
} }
} }
},
warehouseId: {
immediate: true,
handler(val) {
if (val) {
this.queryParams.warehouseId = val;
this.fetchLog();
}
}
} }
}, },
methods: { methods: {
fetchLog() { fetchLog() {
if (!this.queryParams.productCode || !this.queryParams.warehouseId) { if (!this.queryParams.productCode) {
return; return;
} }
this.loading = true; this.loading = true;