From 64b432916af9c9218ab3f3eca614e26c542142ae Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 07 十一月 2023 15:47:13 +0800
Subject: [PATCH] bug
---
h5_standard/src/views/needToBeDealtWith/addWarehousing.vue | 35 +++++++++++++++++++++++------------
1 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/h5_standard/src/views/needToBeDealtWith/addWarehousing.vue b/h5_standard/src/views/needToBeDealtWith/addWarehousing.vue
index 14bf623..1d9ab0b 100644
--- a/h5_standard/src/views/needToBeDealtWith/addWarehousing.vue
+++ b/h5_standard/src/views/needToBeDealtWith/addWarehousing.vue
@@ -43,13 +43,15 @@
<van-icon name="arrow" size="20" color="#999999" />
</div>
</div>
- <div class="rework_qd_item" v-if="form.type != 25" @click="openGX(index)">
- <span>鐢熶骇宸ュ簭</span>
- <div class="rework_qd_item_right">
- <span :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : '璇烽�夋嫨'}}</span>
- <van-icon name="arrow" size="20" color="#999999" />
+ <template v-if="form.type !== 25">
+ <div class="rework_qd_item" v-if="item.hasBom !== 0" @click="openGX(index)">
+ <span>鐢熶骇宸ュ簭</span>
+ <div class="rework_qd_item_right">
+ <span :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : '璇烽�夋嫨'}}</span>
+ <van-icon name="arrow" size="20" color="#999999" />
+ </div>
</div>
- </div>
+ </template>
<div class="rework_qd_item" @click="openQ(index)">
<span><b>*</b>璐ㄩ噺灞炴��</span>
<div class="rework_qd_item_right">
@@ -144,6 +146,7 @@
materialId: '',
materialName: '',
num: '',
+ hasBom: '',
procedureId: '',
procedureName: '',
qualityType: '',
@@ -174,6 +177,7 @@
}
// 鎵撳紑宸ュ簭
const openGX = (index: number) => {
+ if (!list.value[index].materialId) return Toast('璇峰厛閫夋嫨鍏ュ簱鐗╂枡')
i.value = index
productionShow.value = true
}
@@ -187,12 +191,13 @@
if (!form.warehouseId) return Toast('璇烽�夋嫨鍏ュ簱浠撳簱')
list.value.push({
batch: '',
- locationId: '',
- locationName: '',
+ locationId: list.value[list.value.length - 1].locationId,
+ locationName: list.value[list.value.length - 1].locationName,
locationIdLabel: list.value[list.value.length - 1].locationIdLabel,
materialId: '',
materialName: '',
num: '',
+ hasBom: '',
procedureId: '',
procedureName: '',
qualityType: list.value[list.value.length - 1].qualityType,
@@ -235,7 +240,7 @@
if (!list.value[i].locationId) return Toast(`绗�${i+1}椤瑰叆搴撹揣浣嶄笉鑳戒负绌篳)
if (!list.value[i].materialId) return Toast(`绗�${i+1}椤瑰叆搴撶墿鏂欎笉鑳戒负绌篳)
if (!list.value[i].qualityType) return Toast(`绗�${i+1}椤硅川閲忓睘鎬т笉鑳戒负绌篳)
- if (!list.value[i].num || list.value[i].num == '' || list.value[i].num == 0) {
+ if (list.value[i].num <= 0) {
return Toast(`绗�${i + 1}椤瑰叆搴撴暟閲忓繀椤诲ぇ浜�0`)
}
}
@@ -267,7 +272,8 @@
// 鍒犻櫎
const dele = (index: any) => {
if (list.value.length === 1) {
- Toast('鑷冲皯淇濈暀涓�鏉″伐瑁呬俊鎭�')
+ // Toast('鑷冲皯淇濈暀涓�鏉″伐瑁呬俊鎭�')
+ Toast('鑷冲皯淇濈暀涓�鏉$墿娴佹竻鍗曚俊鎭�')
return
}
list.value.splice(index, 1)
@@ -320,9 +326,13 @@
} else {
location.value = true
list.value.forEach(item => {
- item.locationId = ''
- item.locationName = ''
+ item.locationId = res.data[0].id
+ item.locationName = res.data[0].unionName
})
+ // list.value.forEach(item => {
+ // item.locationId = ''
+ // item.locationName = ''
+ // })
}
}
})
@@ -333,6 +343,7 @@
list.value[i.value].materialName = item.mmodelUnionName
list.value[i.value].materialId = item.id
list.value[i.value].unitId = item.unitId
+ list.value[i.value].hasBom = item.hasBom
list.value[i.value].unitName = item.umodelName
// 鑾峰彇鐗╂枡涓嬪伐搴�
getListByMaterialId({
--
Gitblit v1.9.3