Commit ed979c3c by LJM

add

parent 89ade954
Showing with 16 additions and 22 deletions
......@@ -106,7 +106,7 @@
</view>
<!-- 关单封箱弹窗 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" :title="title" value="" confirmText="新箱子" cancelText="不需要换箱" placeholder="请输入毛重" @close="dialogInputClose" @confirm="dialogInputConfirm" :is-mask-click="true" :before-close="true"></uni-popup-dialog>
<uni-popup-dialog ref="inputClose" mode="input" title="该箱子是否确认封箱?" value="" placeholder="请输入毛重" @close="dialogInputClose" @confirm="dialogInputConfirm" :is-mask-click="true" :before-close="true"></uni-popup-dialog>
</uni-popup>
</view>
</template>
......@@ -118,13 +118,12 @@
export default {
data() {
return {
title: '',
curr: 0,
arr: ['全部未装箱', '美产', '商检', '已装箱'],
num: '', //异常数量总数
usa_num: '',
goods_check_num: '',
have_close_box_num: '',
usa_num: 0,
goods_check_num: 0,
have_close_box_num: 0,
abnormal_batch: '', //异常批次
list: [],
box_sn: '', //箱号信息
......@@ -241,11 +240,18 @@
* 关单封箱
*/
closeBox() {
this.title = `该箱子已经全部验货完毕是否更换新的箱子?`;
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
}
this.$refs.inputDialog.open();
},
/**
* 新箱子
* 确认
*/
dialogInputConfirm(val) {
if (!val) {
......@@ -259,8 +265,7 @@
if (res.err_code === 0) {
this.box_sn = '';
this.wsty_id = '';
this.tallyData = [];
this.erp_order_sn = '';
this.getData();
this.$refs.inputDialog.close()
} else {
uni.showToast({
......@@ -271,21 +276,10 @@
});
},
/**
* 不需要换箱
* 取消
*/
dialogInputClose() {
this.request(API.closeBox, 'POST', { wsty_id: this.wsty_id, gross_weight: '' }, true).then(res => {
if (res.err_code === 0) {
this.$refs.inputDialog.close();
this.tallyData = [];
this.erp_order_sn = '';
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
this.$refs.inputDialog.close();
},
/**
* 打印箱号
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment