From c899675f6cd2303dc802ee7d04d4bf5dc903ac02 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 18 三月 2026 11:37:31 +0800
Subject: [PATCH] 进销存升级app 1.工作台图标替换
---
src/pages/productionManagement/productionReport/index.vue | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/src/pages/productionManagement/productionReport/index.vue b/src/pages/productionManagement/productionReport/index.vue
index c528611..dcd0fd7 100644
--- a/src/pages/productionManagement/productionReport/index.vue
+++ b/src/pages/productionManagement/productionReport/index.vue
@@ -24,11 +24,12 @@
<u-input v-model="form.quantity"
placeholder="璇疯緭鍏�"
type="number" />
- <!-- <u-number-box v-model="form.quantity"
- step="0.1"
- bgColor="#fff"
- decimal-length="1"
- :min="0"></u-number-box> -->
+ </u-form-item>
+ <u-form-item label="鎶ュ簾鏁伴噺"
+ prop="scrapQty">
+ <u-input v-model="form.scrapQty"
+ placeholder="璇疯緭鍏�"
+ type="number" />
</u-form-item>
<u-form-item label="鐝粍淇℃伅"
prop="schedulingUserId"
@@ -78,6 +79,7 @@
let form = ref({
planQuantity: "",
quantity: "",
+ scrapQty: "",
userName: "",
workOrderId: "",
productProcessRouteItemId: "",
@@ -140,8 +142,15 @@
return;
}
// 杞崲涓烘暟瀛楄繘琛屾瘮杈�
- const quantity = Number(form.value.quantity);
+ const quantity = Number(form.value.quantity) || 0;
+ const scrapQty = Number(form.value.scrapQty) || 0;
const planQuantity = Number(form.value.planQuantity);
+ // 楠岃瘉鐢熶骇鏁伴噺鍜屾姤搴熸暟閲忕殑鍜屼笉鑳借秴杩囧緟鐢熶骇鏁伴噺
+ if (quantity + scrapQty > planQuantity) {
+ submitting.value = false;
+ showToast("鐢熶骇鏁伴噺鍜屾姤搴熸暟閲忕殑鍜屼笉鑳借秴杩囧緟鐢熶骇鏁伴噺");
+ return;
+ }
if (quantity > planQuantity) {
submitting.value = false;
showToast("鏈鐢熶骇鏁伴噺涓嶈兘澶т簬寰呯敓浜ф暟閲�");
@@ -151,6 +160,7 @@
const submitData = {
...form.value,
quantity: Number(form.value.quantity),
+ scrapQty: Number(form.value.scrapQty) || 0,
planQuantity: Number(form.value.planQuantity) || 0,
};
console.log(submitData, "submitData");
@@ -172,6 +182,17 @@
// 椤甸潰鍔犺浇鏃跺垵濮嬪寲鏁版嵁
onLoad(options => {
console.log(options, "options");
+ // 濡傛灉娌℃湁 orderRow 鍙傛暟锛岃鏄庢槸浠庨椤电洿鎺ヨ烦杞紝闇�瑕佺敤鎴锋墜鍔ㄩ�夋嫨璁㈠崟
+ if (!options.orderRow) {
+ console.log("浠庨椤佃烦杞紝鏃犺鍗曟暟鎹�");
+ getInfo().then(res => {
+ // 榛樿浣跨敤褰撳墠鐧诲綍鐢ㄦ埛
+ form.value.userId = res.user.userId;
+ form.value.userName = res.user.userName;
+ form.value.schedulingUserId = res.user.userId;
+ });
+ return;
+ }
try {
const orderRow = JSON.parse(options.orderRow);
console.log("鏋勯�犵殑orderRow:", orderRow);
--
Gitblit v1.9.3