From 3ea1ff641e1c680a5a1727fb4034797bfe65d93e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 18 三月 2026 15:29:17 +0800
Subject: [PATCH] fix: 质量、耗材物流
---
src/pages/inventoryManagement/stockManagement/add.vue | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/src/pages/inventoryManagement/stockManagement/add.vue b/src/pages/inventoryManagement/stockManagement/add.vue
index 6c69d85..c27d958 100644
--- a/src/pages/inventoryManagement/stockManagement/add.vue
+++ b/src/pages/inventoryManagement/stockManagement/add.vue
@@ -23,8 +23,8 @@
</view>
</view>
- <!-- 鍚堟牸搴撳瓨鏃舵樉绀鸿繃纾呯浉鍏冲瓧娈� -->
- <view v-if="isQualified" class="form-section">
+ <!-- 杩囩鐩稿叧瀛楁 -->
+ <view class="form-section">
<view class="section-title">杩囩淇℃伅</view>
<view class="form-row">
<text class="form-label">杞︾墝鍙�</text>
@@ -145,7 +145,6 @@
import dayjs from 'dayjs'
import PageHeader from '@/components/PageHeader.vue'
import { createStockInventory } from '@/api/inventoryManagement/stockInventory.js'
-import { createStockUnInventory } from '@/api/inventoryManagement/stockUninventory.js'
import { productModelList } from '@/api/basicData/productModel.js'
const form = reactive({
@@ -165,8 +164,8 @@
remark: ''
})
-const type = ref('0') // 0 鍚堟牸搴撳瓨锛�1 涓嶅悎鏍煎簱瀛�
-const isQualified = computed(() => type.value === '0')
+const type = ref('0') // 鍥哄畾鍚堟牸搴撳瓨
+const isQualified = computed(() => true)
const showProductPopup = ref(false)
const productQuery = reactive({
@@ -180,9 +179,7 @@
const weighingDateValue = ref(Date.now())
onLoad((options) => {
- if (options && options.type != null) {
- type.value = options.type
- }
+ type.value = '0'
})
const openProductSelector = () => {
@@ -202,7 +199,12 @@
})
.then(res => {
const data = res?.records || res?.data?.records || []
- productList.value = Array.isArray(data) ? data : []
+ const list = Array.isArray(data) ? data : []
+ // 杩囨护鑰楁潗锛氳�楁潗涓嶅厑璁稿湪鈥滀骇鍝佸簱瀛樷�濆叆搴�
+ productList.value = list.filter(item => {
+ const parentName = item?.parentName || item?.parent?.name || ''
+ return parentName !== '鑰楁潗'
+ })
})
.finally(() => {
productLoading.value = false
@@ -210,6 +212,11 @@
}
const selectProduct = (item) => {
+ const parentName = item?.parentName || item?.parent?.name || ''
+ if (parentName === '鑰楁潗') {
+ uni.showToast({ title: '鑰楁潗璇峰埌鑰楁潗搴撳瓨鍏ュ簱', icon: 'none' })
+ return
+ }
form.productId = item.productId || item.id
form.productModelId = item.id
form.productName = item.productName
@@ -276,8 +283,7 @@
weighingOperator: form.weighingOperator,
remark: form.remark
}
- const api = isQualified.value ? createStockInventory : createStockUnInventory
- api(payload)
+ createStockInventory(payload)
.then(() => {
uni.showToast({ title: '鏂板鎴愬姛', icon: 'success' })
setTimeout(() => {
--
Gitblit v1.9.3