From c52a0824baaa86a719da04fba3ff65fc48a70422 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 19 三月 2026 17:37:05 +0800
Subject: [PATCH] fix: 入库数量必填

---
 src/pages/inventoryManagement/stockManagement/subtract.vue |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/pages/inventoryManagement/stockManagement/subtract.vue b/src/pages/inventoryManagement/stockManagement/subtract.vue
index 4970275..d052011 100644
--- a/src/pages/inventoryManagement/stockManagement/subtract.vue
+++ b/src/pages/inventoryManagement/stockManagement/subtract.vue
@@ -28,7 +28,7 @@
           <text class="form-label">姣涢噸(鍚�)</text>
           <up-input
             v-model="form.grossWeight"
-            type="number"
+            type="digit"
             placeholder="璇疯緭鍏ユ瘺閲�"
           />
         </view>
@@ -36,7 +36,7 @@
           <text class="form-label">鐨噸(鍚�)</text>
           <up-input
             v-model="form.tareWeight"
-            type="number"
+            type="digit"
             placeholder="璇疯緭鍏ョ毊閲�"
           />
         </view>
@@ -44,7 +44,7 @@
           <text class="form-label">鍑�閲�(鍚�)</text>
           <up-input
             v-model="form.netWeight"
-            type="number"
+            type="digit"
             disabled
             placeholder="鑷姩璁$畻"
           />
@@ -87,12 +87,11 @@
 </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'
 import { subtractStockInventory } from '@/api/inventoryManagement/stockInventory.js'
-import { subtractStockUnInventory } from '@/api/inventoryManagement/stockUninventory.js'
 
 const form = reactive({
   id: undefined,
@@ -124,14 +123,12 @@
   remark: ''
 })
 
-const type = ref('0') // 0 鍚堟牸搴撳瓨锛�1 涓嶅悎鏍煎簱瀛�
+const type = ref('0') // 鍥哄畾鍚堟牸搴撳瓨
 const showWeighingDatePicker = ref(false)
 const weighingDateValue = ref(Date.now())
 
 onLoad((options) => {
-  if (options && options.type != null) {
-    type.value = options.type
-  }
+  type.value = '0'
   const cached = uni.getStorageSync('stockSubtractRecord')
   if (cached) {
     try {
@@ -184,8 +181,7 @@
     return
   }
   const payload = { ...form }
-  const api = type.value === '0' ? subtractStockInventory : subtractStockUnInventory
-  api(payload)
+  subtractStockInventory(payload)
     .then(() => {
       uni.showToast({ title: '鍑哄簱鎴愬姛', icon: 'success' })
       setTimeout(() => {

--
Gitblit v1.9.3