2024-04-25 14:29:54 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="zd_container">
|
2024-07-16 15:29:59 +08:00
|
|
|
<!-- <nav-bar title="贴标捆扎"></nav-bar> -->
|
|
|
|
|
<nav-bar :title="title"></nav-bar>
|
2024-04-25 14:29:54 +08:00
|
|
|
<view class="zd_content">
|
|
|
|
|
<view class="zd_wrapper">
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label_wraper">
|
|
|
|
|
<span class="filter_label">木箱</span>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<search-box
|
|
|
|
|
v-model="val1"
|
|
|
|
|
/>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label_wraper">
|
|
|
|
|
<span class="filter_label">点位</span>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<search-box
|
|
|
|
|
v-model="val2"
|
|
|
|
|
/>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label">重量</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
2025-06-13 17:58:39 +08:00
|
|
|
<!-- <input type="number" class="filter_input" v-model="val3"> -->
|
|
|
|
|
<NumberInput
|
|
|
|
|
v-model="val3"
|
|
|
|
|
input-class="filter_input"
|
|
|
|
|
mode="decimal"
|
|
|
|
|
:decimalLength="3"
|
|
|
|
|
/>
|
2024-04-25 14:29:54 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zd-row submitbar">
|
|
|
|
|
<button class="zd-col-11 btn-submit btn-success letter-30" :class="{'btn-info': !val1 || !val3 }" :disabled="disabled1" @tap="_mendCode">贴标</button>
|
|
|
|
|
<button class="zd-col-11 btn-submit btn-success letter-30" :class="{'btn-info': !val1 || !val2}" :disabled="disabled2" @tap="_stBale">捆扎</button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import NavBar from '@/components/NavBar.vue'
|
|
|
|
|
import SearchBox from '@/components/SearchBox.vue'
|
2025-06-13 17:58:39 +08:00
|
|
|
import NumberInput from '@/components/NumberInput.vue'
|
2024-04-25 14:29:54 +08:00
|
|
|
import {mendCode, stBale} from '@/utils/getData2.js'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
NavBar,
|
2025-06-13 17:58:39 +08:00
|
|
|
SearchBox,
|
|
|
|
|
NumberInput
|
2024-04-25 14:29:54 +08:00
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-07-16 15:29:59 +08:00
|
|
|
title: '',
|
2024-04-25 14:29:54 +08:00
|
|
|
val1: '',
|
|
|
|
|
val2: '',
|
|
|
|
|
val3: '',
|
|
|
|
|
disabled1: false,
|
|
|
|
|
disabled2: false
|
|
|
|
|
};
|
|
|
|
|
},
|
2024-07-16 15:29:59 +08:00
|
|
|
onLoad (options) {
|
|
|
|
|
this.title = options.title
|
|
|
|
|
},
|
2024-04-25 14:29:54 +08:00
|
|
|
methods: {
|
|
|
|
|
async _mendCode () {
|
|
|
|
|
this.disabled1 = true
|
|
|
|
|
if (!this.val1 || !this.val3) {
|
|
|
|
|
this.disabled1 = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async _stBale () {
|
|
|
|
|
this.disabled2 = true
|
|
|
|
|
if (!this.val1 || !this.val2) {
|
|
|
|
|
this.disabled2 = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
let res = await stBale(this.val1, this.val2)
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.message,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
this.val1 = ''
|
|
|
|
|
this.val2 = ''
|
|
|
|
|
this.disabled2 = false
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.disabled2 = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|