From 9279a9aa47b462510408a0648a6ccb8b79ec5cb6 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 17 三月 2026 15:18:52 +0800
Subject: [PATCH] fix: 仓储物流展示除耗材外的数据,耗材物料展示耗材的数据。两边菜单数据需要区分开来。
---
src/pages/inventoryManagement/stockManagement/subtract.vue | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/pages/inventoryManagement/stockManagement/subtract.vue b/src/pages/inventoryManagement/stockManagement/subtract.vue
index 4970275..1a7ebf7 100644
--- a/src/pages/inventoryManagement/stockManagement/subtract.vue
+++ b/src/pages/inventoryManagement/stockManagement/subtract.vue
@@ -87,7 +87,7 @@
</template>
<script setup>
-import { ref, reactive, watch } from 'vue'
+import { ref, reactive, watch, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import dayjs from 'dayjs'
import PageHeader from '@/components/PageHeader.vue'
@@ -127,6 +127,12 @@
const type = ref('0') // 0 鍚堟牸搴撳瓨锛�1 涓嶅悎鏍煎簱瀛�
const showWeighingDatePicker = ref(false)
const weighingDateValue = ref(Date.now())
+
+const maxAllowedNetWeight = computed(() => {
+ const v = form.unLockedQuantity ?? form.qualitity
+ const n = Number(v)
+ return !isNaN(n) ? n : 0
+})
onLoad((options) => {
if (options && options.type != null) {
@@ -183,6 +189,11 @@
uni.showToast({ title: '璁板綍淇℃伅缂哄け锛屾棤娉曞嚭搴�', icon: 'none' })
return
}
+ const net = Number(form.netWeight)
+ if (!isNaN(net) && net > 0 && maxAllowedNetWeight.value > 0 && net > maxAllowedNetWeight.value) {
+ uni.showToast({ title: `鍑�閲嶄笉鑳藉ぇ浜庡彲鐢ㄥ簱瀛� ${maxAllowedNetWeight.value}`, icon: 'none' })
+ return
+ }
const payload = { ...form }
const api = type.value === '0' ? subtractStockInventory : subtractStockUnInventory
api(payload)
--
Gitblit v1.9.3