Commit d3738e98 authored by Damon's avatar Damon

fix: 修改配件最大默认数量

parent 7bd7f39e
......@@ -67,13 +67,12 @@
},
},
mounted() {
this.getWorkOrderParts()
console.log('-------getWorkOrderParts--------', this.disabled)
this.getWorkOrderParts()
},
methods: {
getWorkOrderParts() {
// this.lists = JSON.parse(this.dataValue) || []
this.lists = this.dataValue ? JSON.parse(this.dataValue) : []
// this.lists = JSON.parse(this.dataValue) || []
this.lists = this.dataValue ? JSON.parse(this.dataValue) : []
},
partsChange(val, index) {
this.$set(this.lists[index], 'quantity', val)
......
......@@ -5,7 +5,7 @@
{{info.name}}
</view>
<view class="num">
<u-number-box v-if="!disabled" v-model="info.quantity" :min="info.min || 0" :max="info.max || 999" @change="numChange"></u-number-box>
<u-number-box v-if="!disabled" v-model="info.quantity" :min="info.min || 0" :max="info.max || 9999" @change="numChange"></u-number-box>
<text class="nums" v-else>x{{ info.quantity || 1 }}</text>
</view>
</view>
......
......@@ -194,7 +194,7 @@ export default {
const lists = data.map(v => {
v.quantity = 0
v.disabled = true
v.max = 999
v.max = 9999
const images = v.images ? v.images.split(',') : []
v.images = images[0]
return v
......
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