Commit 4b2d41b6 by LJM

理货提示

parent b8aa2387
...@@ -166,8 +166,8 @@ ...@@ -166,8 +166,8 @@
margin-right: 10rpx; margin-right: 10rpx;
} }
.btn2 { .btn2 {
width: 80rpx; width: 100rpx;
height: 40rpx; height: 60rpx;
background: #1969f9; background: #1969f9;
border-radius: 8rpx; border-radius: 8rpx;
font-size: 25rpx; font-size: 25rpx;
...@@ -179,11 +179,11 @@ ...@@ -179,11 +179,11 @@
right: 10rpx; right: 10rpx;
top: 5rpx; top: 5rpx;
.staus_type_val { .staus_type_val {
font-size: 17rpx; font-size: 28rpx;
color: #1969f9; color: #1969f9;
border: 1px solid #f0f0f2; border: 1px solid #f0f0f2;
width: 45rpx; width: 80rpx;
height: 45rpx; height: 80rpx;
border-radius: 50%; border-radius: 50%;
margin-right: 10rpx; margin-right: 10rpx;
} }
......
...@@ -355,3 +355,59 @@ ...@@ -355,3 +355,59 @@
} }
} }
} }
.popup-content-tally-num {
background-color: #f1f4f6;
padding: 50rpx 24rpx 50rpx 24rpx;
border-radius: 10rpx;
width: 550rpx;
.input-box {
margin-bottom: 30rpx;
.label {
width: 190rpx;
font-size: 26rpx;
color: #6e767a;
white-space: nowrap;
}
.tt {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
.uni-input {
width: 210rpx;
height: 55rpx;
background: #e6edf0;
border-radius: 4rpx;
padding-left: 20rpx;
font-size: 26rpx;
color: #404547;
font-weight: bold;
}
}
.tip {
font-size: 26rpx;
color: #f39d18;
margin-bottom: 40rpx;
}
.btn {
padding: 0 70rpx;
.ok {
width: 140rpx;
height: 60rpx;
background: #197adb;
border-radius: 10rpx;
font-size: 26rpx;
color: #ffffff;
}
.canel {
width: 140rpx;
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
border: 1px solid #197adb;
font-size: 24rpx;
color: #197adb;
}
}
}
...@@ -438,12 +438,6 @@ ...@@ -438,12 +438,6 @@
this.form.erp_order_sn = titleCase(this.form.erp_order_sn); //自动转成大写 this.form.erp_order_sn = titleCase(this.form.erp_order_sn); //自动转成大写
//如果选择的fedex就截取后12位
if (this.index == 0) {
let str = this.form.logistics_number;
this.form.logistics_number = str.substring(str.length - 12);
}
this.request(API.addCheckIn, 'POST', this.form, true).then(res => { this.request(API.addCheckIn, 'POST', this.form, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
uni.showModal({ uni.showModal({
......
...@@ -56,9 +56,11 @@ ...@@ -56,9 +56,11 @@
if (res.err_code === 0) { if (res.err_code === 0) {
uni.setStorageSync('token', res.data.token); uni.setStorageSync('token', res.data.token);
uni.setStorageSync('email', res.data.email); uni.setStorageSync('email', res.data.email);
uni.navigateBack({
delta: 3 uni.switchTab({
}); url: '/pages/home/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: res.err_msg, title: res.err_msg,
......
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
<view class="staus_type_val row rowCenter verCenter" v-if="item.is_goods_check">商检</view> <view class="staus_type_val row rowCenter verCenter" v-if="item.is_goods_check">商检</view>
</view> </view>
<view class="input-box row verCenter" style="flex: 00 100%;"> <view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">入仓号:</text>
<text class="text">{{item.erp_order_sn}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">异常批次号:</text> <text class="label">异常批次号:</text>
<text class="text">{{item.abnormal_batch}}</text> <text class="text">{{item.abnormal_batch}}</text>
</view> </view>
......
...@@ -262,6 +262,29 @@ ...@@ -262,6 +262,29 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 理货提示 -->
<uni-popup ref="popupTallyNum" background-color="#F1F4F6">
<view class="popup-content-tally-num">
<view class="input-box row verCenter">
<text class="label">订单待收数量:</text>
<text class="tt">{{tally_info.wait_tally_num}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">本次理货数量:</text>
<text class="tt">{{tally_info.tally_num}}</text>
</view>
<view class="tip">若需再次提交,请确认数量</view>
<view class="input-box row verCenter" style="margin-bottom: 40rpx;">
<text style="color: red;">*</text>
<text class="label">理货数量:</text>
<input class="uni-input" type="number" inputmode="numeric" placeholder="请输入数量" placeholder-style="color:#000;font-weight: bold;" v-model="tally_info.tally_num_temp" />
</view>
<view class="btn row bothSide">
<view class="ok row rowCenter verCenter" @click="submitTallyDetailConfirm()">确认提交</view>
<view class="canel row rowCenter verCenter" @click="tallyDetailConfirmClose()">返回</view>
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
...@@ -299,6 +322,9 @@ ...@@ -299,6 +322,9 @@
isRequestSent: false, isRequestSent: false,
isStopRequest: false, isStopRequest: false,
gross_weight: '', gross_weight: '',
tally_info: {
tally_num_temp: ''
},
net_weight_total: 0 //净重合计 net_weight_total: 0 //净重合计
}; };
}, },
...@@ -790,6 +816,7 @@ ...@@ -790,6 +816,7 @@
// 使用 map 方法生成表单数组 // 使用 map 方法生成表单数组
this.form = res.data.detail.map((item) => ({ this.form = res.data.detail.map((item) => ({
wait_tally_num: item.wait_tally_num, //待理货数量
tally_status: item.tally_status, //理货状态 tally_status: item.tally_status, //理货状态
tally_num: item.tally_num === 0 ? '' : item.tally_num, // 入库数量,0 时显示为空 tally_num: item.tally_num === 0 ? '' : item.tally_num, // 入库数量,0 时显示为空
origin: item.origin, // 原产地 origin: item.origin, // 原产地
...@@ -825,6 +852,53 @@ ...@@ -825,6 +852,53 @@
} }
}); });
}, },
tallyDetailConfirmClose() {
this.$refs.popupTallyNum.close();
},
/**
* 理货明细提交提醒确认
*/
submitTallyDetailConfirm() {
if (!this.tally_info.tally_num) {
uni.showToast({
title: '请填写理货数量',
icon: 'none'
});
return false;
}
this.tally_info.tally_num = this.tally_info.tally_num_temp; //更新理货数量
this.request(API.submitTallyDetail, 'POST', this.tally_info, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '提交成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.$refs.popupTallyNum.close();
//理货提交成功后自动清空型号查询框
this.clearInput(3);
}, 2000);
} else if (res.err_code === 10000) {
uni.showModal({
title: '',
content: res.err_msg,
showCancel: false,
success: (res) => {
if (res.confirm) {
// 用户点击确定按钮后的操作
this.getTallyData();
}
}
});
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/** /**
* 理货明细提交 * 理货明细提交
*/ */
...@@ -870,6 +944,14 @@ ...@@ -870,6 +944,14 @@
return false; return false;
} }
} }
if (this.form[index].wait_tally_num != this.form[index].tally_num) {
//当本次理货数量≠待收数量时,则弹出警示弹窗,需用户再次输入理货数量并再次点击【确认提交】时,才执行理货提交
this.tally_info = this.form[index]
this.$refs.popupTallyNum.open('center');
return false;
}
this.request(API.submitTallyDetail, 'POST', this.form[index], true).then(res => { this.request(API.submitTallyDetail, 'POST', this.form[index], true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
uni.showToast({ uni.showToast({
......
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