物料入库修改

This commit is contained in:
2024-09-03 14:55:40 +08:00
parent ab6d9beb67
commit 63fda35be4
5 changed files with 47 additions and 98 deletions

View File

@@ -57,7 +57,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val2 || !val3}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button>
</view>
</view>
</template>
@@ -97,12 +97,18 @@
},
async _handheldBlanking () {
this.disabled = true
if (!this.val1 || !this.val2 || !this.val3) {
if (!this.val1 || !this.val2) {
this.disabled = false
return
}
let arr = []
this.dataList.map(el => {
if (el.order_code !== '' && el.material_qty !== '') {
arr.push(el)
}
})
try {
let res = await handheldBlanking(this.val1, this.val3, this.val2, this.dataList)
let res = await handheldBlanking(this.val1, this.val3, this.val2, arr)
this.clearUp()
} catch (e) {
this.disabled = false