From 2837bdd57f72e386bbf9a725e7b3a13e5eb9e930 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 21 八月 2023 09:19:57 +0800
Subject: [PATCH] 修复bug
---
h5_standard/src/views/needToBeDealtWith/addWarehousing.vue | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/h5_standard/src/views/needToBeDealtWith/addWarehousing.vue b/h5_standard/src/views/needToBeDealtWith/addWarehousing.vue
index 14bf623..3ab6379 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`)
}
}
@@ -320,9 +325,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 +342,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