Commit b8aa2387 by LJM

add

parent df237144
......@@ -49,7 +49,7 @@
<view class="box row verCenter" v-if="currentIndex == 0">
<text class="label">物流单号</text>
<view class="uni-input-box row verCenter bothSide">
<input type="text" class="uni-input" placeholder="请输入物流单号" placeholder-style="color:#404547;font-weight:bold;" v-model="form.logistics_number" @input="handleInput($event,1)" />
<input type="text" class="uni-input" placeholder="请输入物流单号" placeholder-style="color:#404547;font-weight:bold;" v-model="form.logistics_number" @input="handleInput($event,1)" style="width: 73%;" />
<view class="scan-view row verCenter" @click="scanChange()">
<text class="iconfont icon-juxing6"></text>
<text class="tt">扫描</text>
......@@ -317,6 +317,15 @@
handleInput: debounce(function(event, type) {
var value = event.target.value;
if (value) {
//物流单号
if (this.form.logistics_company == '联邦快递') {
if (value.length > 22) {
let last22 = value.slice(22); // 截取后22位
this.form.logistics_number = last22;
} else {
this.form.logistics_number = val;
}
}
uni.hideKeyboard();
this.erpOrderSn = [];
this.getErpOrderSn(value);
......@@ -378,6 +387,16 @@
console.log('picker发送选择改变,携带值为', e.target.value);
this.index = e.target.value;
this.form.logistics_company = this.array[e.target.value];
//物流单号
if (this.form.logistics_company == '联邦快递') {
var val = this.form.logistics_number;
if (val.length > 22) {
let last22 = val.slice(22); // 截取后22位
this.form.logistics_number = last22;
}
}
},
submit() {
if (!this.form.erp_order_sn) {
......
......@@ -371,7 +371,7 @@
} else if (type == 0) {
//取出逻辑
//明细为未推送、推送失败:该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中
if (item.tally_status == 2 && (item.sync_status == 1 || item.sync_status == 4)) {
if (item.box_tally_status == 2 && (item.sync_status == 1 || item.sync_status == 4)) {
uni.showModal({
content: '该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中',
confirmText: '确认取出',
......
......@@ -51,7 +51,7 @@
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">数量:</text>
<text class="text">{{item.order_numbers}}</text>
<text class="text">{{item.tally_num}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">原产地:</text>
......
......@@ -59,7 +59,7 @@
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">数量:</text>
<text class="text">{{item.order_numbers}}</text>
<text class="text">{{item.tally_num}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">原产地:</text>
......
......@@ -603,6 +603,7 @@
// 使用 map 方法生成表单数组
this.form = res.data.detail.map((item) => ({
box_tally_status: item.box_tally_status, //箱状态
tally_status: item.tally_status, //理货状态
tally_num: item.tally_num === 0 ? '' : item.tally_num, // 入库数量,0 时显示为空
origin: item.origin, // 原产地
......@@ -722,9 +723,8 @@
* 理货明细撤销
*/
cancelTallyDetail(index) {
//A、若该箱状态为“理货中”则,直接取消成功。
if (this.tallyData.tally_status == 1) {
if (this.form[index].box_tally_status == 1) {
//执行关单封箱弹窗毛重填写
this.$refs.canelInputDialog.open();
this.formIndex = index;
......@@ -732,7 +732,7 @@
}
//B、若该箱状态为“已封箱”则,则需校验该物料明细的推送状态
if (this.tallyData.tally_status == 2) {
if (this.form[index].box_tally_status == 2) {
//明细为推送成功、推送中:该物料已推送金蝶,请联系关务取消推送再进行取出
if (this.form[index].sync_status == 2 || this.form[index].sync_status == 3) {
uni.showModal({
......@@ -768,7 +768,7 @@
}
//C、若校验箱状态为“已装板”时,则提示:该箱已装板,请先取消装板
if (this.tallyData.tally_status == 3) {
if (this.form[index].box_tally_status == 3) {
uni.showModal({
content: '该箱已装板,请先取消装板',
success: (res) => {
......@@ -833,7 +833,8 @@
setTimeout(() => {
this.box_sn = '';
this.tallyData = [];
this.$refs.inputDialog.close()
this.$refs.inputDialog.close();
this.clearInput(1)
}, 2000);
} else {
uni.showToast({
......@@ -847,8 +848,47 @@
* 不需要换箱
*/
dialogInputClose() {
this.$refs.inputDialog.close();
this.tallyData = [];
var val = this.gross_weight * 1;
if (!val) {
uni.showToast({
title: '请输入毛重',
icon: 'error'
});
return false;
}
// 判断 val 是否为数字
if (isNaN(val)) {
uni.showToast({
title: '请输入合法数字',
icon: 'error'
});
return false;
}
if (Number(val) <= Number(this.net_weight_total)) {
uni.showToast({
title: '毛重不能小于总净重',
icon: 'none'
});
return false;
}
this.request(API.closeBox, 'POST', { box_sn: this.box_sn, gross_weight: val }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.is_unboxing = false; //表示开箱成功
this.$refs.inputDialog.close()
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 取消理货取消
......
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