重量限制

This commit is contained in:
2025-11-13 09:52:06 +08:00
parent 6c635dd712
commit e8a2cf10fa
6 changed files with 89 additions and 9 deletions

View File

@@ -86,7 +86,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || !val1 || !index}" :disabled="disabled" @tap="_zwgroupPlate">组盘确认</button>
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || !val1 || !index}" :disabled="disabled" @tap="toSure">组盘确认</button>
</view>
</view>
</template>
@@ -192,12 +192,28 @@
this.currentData = {}
this.disabled = false
},
async _zwgroupPlate () {
toSure () {
this.disabled = true
if (JSON.stringify(this.currentData) === '{}' || !this.val1 || !this.index) {
this.disabled = false
return
}
if (Number(this.currentData.qty) > 2000) {
uni.showModal({
title: '提示',
content: '输入的重量'+ Number(this.currentData.qty) +'过大,是否继续?',
confirmColor: '#ff6a00',
success: (res) => {
if (res.confirm) {
this._zwgroupPlate()
} else if (res.cancel) {
this.disabled = false
}
}
})
}
},
async _zwgroupPlate () {
try {
this.currentData.stor_code = this.index
let selobj = this.options2.find(item => item.value === this.currentData.supp_code)