From 1b8daa902b075c7cedee7bbcc13b914b7a5b4ad4 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 03 十一月 2025 11:48:49 +0800
Subject: [PATCH] 优化盘点逻辑
---
新建文件夹/WMS/src/views/stock/Dt_Inventory_Batch.vue | 149 ++++++++++++++++++-------------------------------
1 files changed, 56 insertions(+), 93 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue"
index a7c5809..ed656f8 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WMS/src/views/stock/Dt_Inventory_Batch.vue"
@@ -1,7 +1,15 @@
<template>
- <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
- :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
- :table="table" :extend="extend">
+ <view-grid
+ ref="grid"
+ :columns="columns"
+ :detail="detail"
+ :editFormFields="editFormFields"
+ :editFormOptions="editFormOptions"
+ :searchFormFields="searchFormFields"
+ :searchFormOptions="searchFormOptions"
+ :table="table"
+ :extend="extend"
+ >
</view-grid>
</template>
<script>
@@ -30,7 +38,7 @@
productionDate: "",
validityPeriod: "",
remark: "",
- AvailableQuantity: "",
+ availableQuantity: "",
});
const editFormOptions = ref([
[
@@ -40,18 +48,14 @@
field: "materielCode",
type: "string",
},
+ ],
+ [
{
title: "鐗╂枡鍚嶇О",
required: true,
field: "materielName",
type: "string",
},
- {
- title: "鐗╂枡瑙勬牸",
- required: true,
- field: "materielSpec",
- type: "string",
- }
],
[
{
@@ -60,67 +64,15 @@
field: "batchNo",
type: "string",
},
+ ],
+ [
{
- title: "搴撳瓨鏁�",
+ title: "璋冩嫧鏁伴噺",
required: true,
field: "stockQuantity",
type: "number",
},
- {
- title: "寰呭嚭搴撴暟閲�",
- required: true,
- field: "outboundQuantity",
- type: "number",
- },
- {
- title: "鍙敤搴撳瓨鏁�",
- required: true,
- field: "availableQuantity",
- type: "number",
- }
],
- [
- {
- title: "鐩樼偣鏁�",
- required: true,
- field: "supplyQuantity",
- type: "number",
- },
- {
- title: "ERP瀹為檯搴撳瓨鏁�",
- required: true,
- field: "erpStockQuantity",
- type: "number",
- },
- {
- title: "搴撳瓨宸紓",
- field: "status",
- type: "select",
- bind: { key: "stockDifference", data: [] }
- }
- ],
- [
- {
- title: "鐢熶骇鏃ユ湡",
- field: "productionDate",
- type: "date",
- span: 12
- },
- {
- title: "鏈夋晥鏈熻嚦",
- field: "validityPeriod",
- type: "date",
- span: 12
- }
- ],
- [
- {
- title: "澶囨敞",
- field: "remark",
- type: "string",
- span: 24
- }
- ]
]);
const searchFormFields = ref({
materielCode: "",
@@ -129,9 +81,9 @@
});
const searchFormOptions = ref([
[
- { title: "鐗╂枡缂栧彿", field: "materielCode" },
- { title: "鐗╂枡鍚嶇О", field: "materielName" },
- { title: "鎵规鍙�", field: "batchNo" },
+ { title: "鐗╂枡缂栧彿", field: "materielCode", type: "like" },
+ { title: "鐗╂枡鍚嶇О", field: "materielName", type: "like" },
+ { title: "鎵规鍙�", field: "batchNo", type: "like" },
],
]);
const columns = ref([
@@ -189,17 +141,28 @@
},
{
field: "supplyQuantity",
- title: "鐩樼偣鏁�",
+ title: "鐩樼偣宸紓鏁�",
type: "number",
width: 100,
align: "left",
- },
- {
- title: "鍙敤搴撳瓨鏁�",
- required: true,
- field: "availableQuantity",
- type: "number",
+ cellStyle: (row) => {
+ const value = row.supplyQuantity;
+ if (value > 0) {
+ return { color: "#00ff00" }; // 缁胯壊
+ } else if (value < 0) {
+ return { color: "#ff0000" }; // 绾㈣壊
+ }
+ // else {
+ // return { color: '#000000' }; // 榛戣壊
+ // }
},
+ },
+ {
+ title: "鍙敤搴撳瓨鏁�",
+ required: true,
+ field: "availableQuantity",
+ type: "number",
+ },
{
field: "erpStockQuantity",
title: "ERP瀹為檯搴撳瓨鏁�",
@@ -207,21 +170,21 @@
width: 120,
align: "left",
},
- {
- field: "status",
- title: "搴撳瓨宸紓",
- type: "select",
- width: 100,
- align: "left",
- bind: { key: "stockDifference", data: [] },
- },
- {
- field: "productionDate",
- title: "鐢熶骇鏃ユ湡",
- type: "date",
- width: 120,
- align: "left",
- },
+ // {
+ // field: "status",
+ // title: "搴撳瓨宸紓",
+ // type: "select",
+ // width: 100,
+ // align: "left",
+ // bind: { key: "stockDifference", data: [] },
+ // },
+ // {
+ // field: "productionDate",
+ // title: "鐢熶骇鏃ユ湡",
+ // type: "date",
+ // width: 120,
+ // align: "left",
+ // },
{
field: "validityPeriod",
title: "鏈夋晥鏈熻嚦",
@@ -249,7 +212,7 @@
type: "string",
width: 100,
align: "left",
- hidden: true
+ hidden: true,
},
{
field: "modifyDate",
@@ -257,7 +220,7 @@
type: "datetime",
width: 160,
align: "left",
- hidden: true
+ hidden: true,
},
{
field: "remark",
@@ -265,7 +228,7 @@
type: "string",
width: 100,
align: "left",
- hidden: true
+ hidden: true,
},
]);
const detail = ref({
--
Gitblit v1.9.3