客户标签打印
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.container_name === pkId}">
|
<tr v-for="(e, i) in dataList" :key="i">
|
||||||
<td>{{e.package_box_sn}}</td>
|
<td>{{e.package_box_sn}}</td>
|
||||||
<td>{{e.quanlity_in_box}}</td>
|
<td>{{e.quanlity_in_box}}</td>
|
||||||
<td>{{e.box_weight}}</td>
|
<td>{{e.box_weight}}</td>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar">
|
<view class="submit-bar">
|
||||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled2" @tap="_customerPrint">打印</button>
|
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled2" @tap="_customerPrint">打印</button>
|
||||||
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled1" @tap="_customerInfo">查询</button>
|
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled1" @tap="_customerInfo">查询</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -72,16 +72,10 @@
|
|||||||
val1: '',
|
val1: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
disabled1: false,
|
disabled1: false,
|
||||||
disabled2: false,
|
disabled2: false
|
||||||
pkId: '',
|
|
||||||
pkObj: {}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toCheck (e) {
|
|
||||||
this.pkId = this.pkId === e.container_name ? '' : e.container_name
|
|
||||||
this.pkObj = this.pkId === e.container_name ? e : {}
|
|
||||||
},
|
|
||||||
/** 查询 */
|
/** 查询 */
|
||||||
async _customerInfo () {
|
async _customerInfo () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
@@ -104,20 +98,18 @@
|
|||||||
/** 打印 */
|
/** 打印 */
|
||||||
async _customerPrint () {
|
async _customerPrint () {
|
||||||
this.disabled2 = true
|
this.disabled2 = true
|
||||||
if (!this.pkId) {
|
if (!this.val1) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择一行',
|
title: '请扫木箱码',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await customerPrint(this.pkObj.package_box_sn)
|
let res = await customerPrint(this.val1)
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
this.pkId = ''
|
this.val1 = ''
|
||||||
this.pkObj = {}
|
|
||||||
this._customerInfo()
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|||||||
Reference in New Issue
Block a user