Commit 556a5d4f by LJM

移动端--理货--增加按标准包装量理货

parent 8a99a660
Showing with 58 additions and 12 deletions
...@@ -294,8 +294,30 @@ ...@@ -294,8 +294,30 @@
</view> </view>
<!-- 底部操作栏 --> <!-- 底部操作栏 -->
<view class="fix-btn row verCenter"> <view class="fix-btn row verCenter">
<!--区分深圳自营和非深圳自营--> <!--深圳自营和-->
<template v-if="warehouse_id == 9"> <template v-if="warehouse_id == 9">
<!-- 有标准包装量 -->
<template v-if="detail.mpq">
<view class="btn1 row rowCenter verCenter" @click="toggle(1)" style="width: 25%;">
<text class="check-box-icon" :class="{ curr: print_flag }"></text>
<text class="text">打印入库标签</text>
</view>
<view class="print-type-box row rowCenter verCenter" style="width: 17%;">
<picker @change="bindPickerChange($event, 2)" :value="print_style_index" :range="print_style" class="row rowCenter verCenter">
<view class="row rowCenter verCenter">
<view class="uni-input">{{ print_style[print_style_index] }}</view>
<view class="iconfont icon-sanjiaoxing"></view>
</view>
</picker>
</view>
<view class="btn1 row rowCenter verCenter" @click="toggle(3)" style="width: 28%;">
<text class="check-box-icon" :class="{ curr: is_batch_flag }"></text>
<text class="text">按标准包装量分批</text>
</view>
<view class="btn2 row rowCenter verCenter" @click="createTallyReceive" :class="{ 'btn-disabled': !is_submit }" style="width: 30%;">理 货</view>
</template>
<!-- 无标准包装量 -->
<template v-else>
<view class="btn1 row rowCenter verCenter" @click="toggle(1)"> <view class="btn1 row rowCenter verCenter" @click="toggle(1)">
<text class="check-box-icon" :class="{ curr: print_flag }"></text> <text class="check-box-icon" :class="{ curr: print_flag }"></text>
<text class="text">打印入库标签</text> <text class="text">打印入库标签</text>
...@@ -310,6 +332,8 @@ ...@@ -310,6 +332,8 @@
</view> </view>
<view class="btn2 row rowCenter verCenter" @click="createTallyReceive" :class="{ 'btn-disabled': !is_submit }">理 货</view> <view class="btn2 row rowCenter verCenter" @click="createTallyReceive" :class="{ 'btn-disabled': !is_submit }">理 货</view>
</template> </template>
</template>
<!-- 非深圳自营- -->
<template v-else> <template v-else>
<view class="btn1 row rowCenter verCenter" @click="toggle(1)" style="width: 40%;"> <view class="btn1 row rowCenter verCenter" @click="toggle(1)" style="width: 40%;">
<text class="check-box-icon" :class="{ curr: print_flag }"></text> <text class="check-box-icon" :class="{ curr: print_flag }"></text>
...@@ -338,6 +362,7 @@ ...@@ -338,6 +362,7 @@
noexebshowFalg: true, //控制是否会触发生命周期 noexebshowFalg: true, //控制是否会触发生命周期
print_flag: true, //是否打印 print_flag: true, //是否打印
pic_flag: false, //是否整单照片 pic_flag: false, //是否整单照片
is_batch_flag: false, //是否分批理货
input_flag: false, input_flag: false,
input_contaion: false, input_contaion: false,
company_id: uni.getStorageSync('company_id') || 1, //公司组织 company_id: uni.getStorageSync('company_id') || 1, //公司组织
...@@ -372,7 +397,9 @@ ...@@ -372,7 +397,9 @@
image_ids: [], //图片 image_ids: [], //图片
tally_remark: '', //理货备注 tally_remark: '', //理货备注
is_print: 1, //打印入库标签 is_print: 1, //打印入库标签
is_mobile_default_img: 0 //整单照片 is_mobile_default_img: 0, //整单照片
is_batch: 0, //是否分批理货1是0否
mpq: '' //标准包装量
} }
}; };
}, },
...@@ -451,6 +478,7 @@ ...@@ -451,6 +478,7 @@
* class切换 * class切换
* 1 打印入库标签 * 1 打印入库标签
* 2 整单照片 * 2 整单照片
* 3 是否分批理货
*/ */
toggle(type) { toggle(type) {
if (type == 1) { if (type == 1) {
...@@ -459,6 +487,9 @@ ...@@ -459,6 +487,9 @@
} else if (type == 2) { } else if (type == 2) {
this.pic_flag = !this.pic_flag; this.pic_flag = !this.pic_flag;
this.formParams.is_mobile_default_img = this.pic_flag ? 1 : 0; this.formParams.is_mobile_default_img = this.pic_flag ? 1 : 0;
} else if (type == 3) {
this.is_batch_flag = !this.is_batch_flag;
this.formParams.is_batch = this.is_batch_flag ? 1 : 0;
} }
}, },
/** /**
...@@ -800,8 +831,21 @@ ...@@ -800,8 +831,21 @@
return false; return false;
} }
} }
var wait_tally_qty = Number(this.detail.wait_tally_qty); //待理货数量
var wait_tally_qty = Number(this.detail.wait_tally_qty); if (this.detail.sku_id > 0 && this.detail.mpq) {
//实际理货和标准包装量为非整数倍
if (Number(this.formParams.tally_qty) % Number(this.detail.mpq) !== 0) {
uni.showModal({
title: '提示',
content: '理货数量非整数倍于标准包装量,请修改理货数量或取消勾选【按标准包装量分批】',
showCancel: false
});
return false;
} else {
this.formParams.mpq = this.detail.mpq; //符合条件赋值标准包装量
}
}
var params = { var params = {
container_id: this.searchParams.container_id, container_id: this.searchParams.container_id,
...@@ -814,11 +858,13 @@ ...@@ -814,11 +858,13 @@
image_ids: this.formParams.image_ids, image_ids: this.formParams.image_ids,
coo: this.formParams.coo, coo: this.formParams.coo,
is_mobile_default_img: this.formParams.is_mobile_default_img, is_mobile_default_img: this.formParams.is_mobile_default_img,
is_print: this.formParams.is_print is_print: this.formParams.is_print,
mpq: this.formParams.mpq //新增标准包装量
}; };
this.request(API.createTallyReceive, 'POST', params, true).then(res => { this.request(API.createTallyReceive, 'POST', params, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
//待理货数量等于实际理货数量
if (wait_tally_qty == this.formParams.tally_qty) { if (wait_tally_qty == this.formParams.tally_qty) {
uni.showToast({ uni.showToast({
title: '全部理货成功', title: '全部理货成功',
......
// const API_BASE_USER = 'http://user.liexindev.net'; //用户系统 const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
// const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统 const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
// const API_BASE = 'http://wms.liexindev.net'; //WMS系统 const API_BASE = 'http://wms.liexindev.net'; //WMS系统
// const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统 const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统 // const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统 // const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const API_BASE = 'https://wms.ichunt.net'; //WMS系统 // const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统 // const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API = { const API = {
......
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