Commit 76eb4646 authored by Damon's avatar Damon

fix: 【ID1001759】【扳手会小程序-订单-完工基本信息页面】:选择了不使用物料,提交时还校验了物料的必填项。

parent 8aac43e9
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
}, },
partsChange(val, index) { partsChange(val, index) {
this.$set(this.lists[index], 'quantity', val) this.$set(this.lists[index], 'quantity', val)
this.valueChange(JSON.stringify(this.lists)) this.valueChange(this.lists.length > 0 ? JSON.stringify(this.lists) : JSON.stringify([{}]))
}, },
minusValue(val, index) { minusValue(val, index) {
if (val === 0) { if (val === 0) {
......
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
:item="item" :item="item"
:value="form[item.fieldsName] || ''" :value="form[item.fieldsName] || ''"
:disabled="readOnly" :disabled="readOnly"
:maintainStep="maintainStep" :maintainStep="list[tabIndex].panelFieldsName"
@value-change="fieldValueChange" @value-change="fieldValueChange"
> >
</xh-parts> </xh-parts>
...@@ -1160,6 +1160,7 @@ export default { ...@@ -1160,6 +1160,7 @@ export default {
// 申请费用计算 // 申请费用计算
this.calcMoney() this.calcMoney()
} }
console.log("this.form", this.form)
}, },
// 申请费用计算 // 申请费用计算
calcMoney() { calcMoney() {
......
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
const data = res.data || [] const data = res.data || []
this.lists = data.map((v) => { const lists = data.map((v) => {
const max = v.stock + Number(v.useStock) const max = v.stock + Number(v.useStock)
v.min = 1 v.min = 1
v.checked = false v.checked = false
...@@ -123,6 +123,7 @@ export default { ...@@ -123,6 +123,7 @@ export default {
v.images = images[0] v.images = images[0]
return v return v
}) })
this.lists = lists.filter(v => v.max > 0)
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment