组袋修改
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<span class="filter_label">桶号</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<search-box v-model="val1"/>
|
||||
<search-box v-model="val1" @handleChange="handleChange"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -74,8 +74,8 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="toZtPrint">组桶并打印</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_confirmBucketAssembly">确认组桶</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="toZtPrint">组桶并打印</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_confirmBucketAssembly">确认组桶</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled1" @tap="labelPrint">标签打印</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -87,7 +87,7 @@
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import {getDate} from '@/utils/utils.js'
|
||||
import {queryRecordNoBucked, confirmBucketAssembly, printBucked} from '@/utils/getData3.js'
|
||||
import {queryBuckInfo, queryRecordNoBucked, confirmBucketAssembly, printBucked} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -105,7 +105,8 @@
|
||||
unit: 'KG',
|
||||
disabled: false,
|
||||
disabled1: false,
|
||||
pcsn: ''
|
||||
pcsn: '',
|
||||
flag: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -119,6 +120,30 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._queryBuckInfo(e)
|
||||
}
|
||||
},
|
||||
async _queryBuckInfo (e) {
|
||||
try {
|
||||
let res = await queryBuckInfo(e)
|
||||
if (res) {
|
||||
this.materialData = res.data
|
||||
this.pcsn = this.materialData.pcsn
|
||||
this.weight = this.materialData.bucket_weight
|
||||
this.num = this.materialData.qty
|
||||
// 调用此接口后并成功返回结构后,页面所有操作禁用,【标签打印】按钮可以正常使用。
|
||||
this.flag = true
|
||||
} else {
|
||||
this.materialData = {}
|
||||
this.flag = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.materialData = {}
|
||||
this.flag = false
|
||||
}
|
||||
},
|
||||
async _queryRecordNoBucked () {
|
||||
try {
|
||||
let res = await queryRecordNoBucked()
|
||||
@@ -144,12 +169,15 @@
|
||||
this.disabled1 = false
|
||||
},
|
||||
toZtPrint () {
|
||||
if (this.flag) {
|
||||
return
|
||||
}
|
||||
this._confirmBucketAssembly()
|
||||
this.labelPrint()
|
||||
},
|
||||
async _confirmBucketAssembly () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.weight || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
||||
if (this.flag || !this.val1 || !this.weight || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
@@ -178,6 +206,7 @@
|
||||
// },
|
||||
async labelPrint () {
|
||||
this.disabled1 = true
|
||||
this.flag = false
|
||||
if (!this.val1 || JSON.stringify(this.materialData) === '{}' || JSON.stringify(this.suppData) === '{}') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user