贴标捆扎

This commit is contained in:
2023-02-15 08:53:46 +08:00
parent 85917fb0d3
commit 89cfe77308
2 changed files with 14 additions and 5 deletions

View File

@@ -23,10 +23,16 @@
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">重量</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val3">
</view>
</view>
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1 }" :disabled="disabled1" @tap="_mendCode">贴标</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val3 }" :disabled="disabled1" @tap="_mendCode">贴标</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled2" @tap="_stBale">捆扎</button>
</view>
</view>
@@ -45,6 +51,7 @@
return {
val1: '',
val2: '',
val3: '',
disabled1: false,
disabled2: false
};
@@ -52,17 +59,18 @@
methods: {
async _mendCode () {
this.disabled1 = true
if (!this.val1) {
if (!this.val1 || !this.val3) {
this.disabled1 = false
return
}
try {
let res = await mendCode(this.val1)
let res = await mendCode(this.val1, this.val3)
uni.showToast({
title: res.message,
icon: 'none'
})
this.val1 = ''
this.val3 = ''
this.disabled1 = false
} catch (e) {
this.disabled1 = false

View File

@@ -451,10 +451,11 @@ data: {
* 贴标捆扎
*/
// 1.1贴标
export const mendCode = (no) => request({
export const mendCode = (no, weight) => request({
url:'api/pda/st/mendCode',
data: {
box_no: no
box_no: no,
weight: weight
}
})
//1.2捆扎