Commit c9cacfdc by LJM

移动端--【封箱】需增加判断箱状态为“理货中”才可跳转进入封箱确认页

parent 16d4cb55
......@@ -488,11 +488,8 @@
return false;
}
uni.navigateTo({
url: '/pages/tally/closeBox?box_sn=' + this.box_sn + '&wsty_id=' + this.wsty_id
})
this.getBoxStatus();
// this.$refs.inputDialog.open();
},
/**
* 确认
......@@ -561,6 +558,37 @@
});
},
/**
* 获取箱状态
*/
getBoxStatus() {
this.request(API.getBoxStatus, 'POST', { box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
if (res.data == 1) {
uni.navigateTo({
url: '/pages/tally/closeBox?box_sn=' + this.box_sn + '&wsty_id=' + this.wsty_id
})
} else {
let text = res.data == 2 ? '已封箱' : '已装板';
uni.showModal({
title: '',
content: `该箱状态${text}, 不可操作封箱`,
showCancel: false,
success: (res) => {
if (res.confirm) {
}
}
});
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 更新统计打印标签次数
*/
updateTagPrintTimes(tag_no) {
......
......@@ -24,7 +24,7 @@
<text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="erp_order_sn"></text>
<template v-if="form.length > 0 && step == 1 && erp_order_sn != ''">
<view class="btn1 row rowCenter verCenter" style="margin-right: 8rpx;" @click="cancelRelease()">取消释放</view>
<navigator class="btn row rowCenter verCenter" :url="'/pages/tally/closeBox?box_sn='+box_sn+'&wsty_id='+wsty_id" hover-class="none">关单封箱</navigator>
<view class="btn row rowCenter verCenter" @click="getBoxStatus()">关单封箱</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="lockTally()">锁定理货</view>
......@@ -855,6 +855,37 @@
});
},
/**
* 获取箱状态
*/
getBoxStatus() {
this.request(API.getBoxStatus, 'POST', { box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
if (res.data == 1) {
uni.navigateTo({
url: '/pages/tally/closeBox?box_sn=' + this.box_sn + '&wsty_id=' + this.wsty_id
})
} else {
let text = res.data == 2 ? '已封箱' : '已装板';
uni.showModal({
title: '',
content: `该箱状态${text}, 不可操作封箱`,
showCancel: false,
success: (res) => {
if (res.confirm) {
}
}
});
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 选中入仓号
* @param {Object} index
*/
......
......@@ -5,7 +5,7 @@
<view class="action-bar row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(1)" v-if="box_sn"></text>
<template v-if="box_sn && is_unboxing && tallyData.detail && tallyData.detail.length > 0">
<navigator class="btn1 row rowCenter verCenter" :url="'/pages/tally/closeBox?box_sn='+box_sn+'&wsty_id='+wsty_id" hover-class="none" @click="closeBox()">重新封箱</navigator>
<view class="btn1 row rowCenter verCenter" @click="getBoxStatus()">重新封箱</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="unboxing()" v-if="box_sn && tallyData.detail && tallyData.detail.length > 0">开 箱</view>
......@@ -808,6 +808,37 @@
this.$refs.inputDialog.open();
},
/**
* 获取箱状态
*/
getBoxStatus() {
this.request(API.getBoxStatus, 'POST', { box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
if (res.data == 1) {
uni.navigateTo({
url: '/pages/tally/closeBox?box_sn=' + this.box_sn + '&wsty_id=' + this.wsty_id
})
} else {
let text = res.data == 2 ? '已封箱' : '已装板';
uni.showModal({
title: '',
content: `该箱状态${text}, 不可操作封箱`,
showCancel: false,
success: (res) => {
if (res.confirm) {
}
}
});
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 新箱子
*/
dialogInputConfirm(val) {
......
......@@ -393,7 +393,11 @@ const API = {
/**
* 验证入仓号
*/
checkScTallyGoods: API_BASE + '/supplywechatwms/checkScTallyGoods'
checkScTallyGoods: API_BASE + '/supplywechatwms/checkScTallyGoods',
/**
* 验证入仓号
*/
getBoxStatus: API_BASE + '/supplywechatwms/getBoxStatus'
}
......
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