Commit 8664e992 by liangjianmin

feat(tallyReceive): 添加拆货功能及用途选择

- 新增拆货标识和用途选择功能,提升用户操作的灵活性
- 更新样式以适应拆货功能的视觉展示
- 增加用途必填逻辑,确保用户在拆货时选择用途,提升数据完整性
parent 45a9a325
...@@ -134,8 +134,8 @@ ...@@ -134,8 +134,8 @@
.is-watch { .is-watch {
position: absolute; position: absolute;
right: 26rpx; right: 0;
top: 127rpx; top: 109rpx;
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
font-size: 12rpx; font-size: 12rpx;
...@@ -182,6 +182,7 @@ ...@@ -182,6 +182,7 @@
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-left: 6rpx; margin-left: 6rpx;
} }
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<view class="section"> <view class="section">
<view class="field-item row" v-if="detail"> <view class="field-item row" v-if="detail">
<view class="is-watch row rowCenter verCenter" v-if="is_watch">看货</view> <view class="is-watch row rowCenter verCenter" v-if="is_watch">看货</view>
<view class="is-watch row rowCenter verCenter" v-if="is_apart" :style="{ top: is_watch ? '152rpx' : '109rpx' }">拆货</view>
<view class="item row verCenter"> <view class="item row verCenter">
<text class="label">入库单号:</text> <text class="label">入库单号:</text>
<text class="text">{{ detail.stock_in_sn }}</text> <text class="text">{{ detail.stock_in_sn }}</text>
...@@ -188,8 +189,18 @@ ...@@ -188,8 +189,18 @@
<view class="input-box"><input type="number" class="uni-input" placeholder-style="color:#919399" placeholder="请输入理货数量" v-model="formParams.tally_qty" @input="handleInputNumber($event, detail.wait_tally_qty)" /></view> <view class="input-box"><input type="number" class="uni-input" placeholder-style="color:#919399" placeholder="请输入理货数量" v-model="formParams.tally_qty" @input="handleInputNumber($event, detail.wait_tally_qty)" /></view>
</view> </view>
<view> <view>
<view class="input-title"><text class="input-title-t2">其它批次属性:</text></view> <view class="input-title">
<view class="input-box"><input type="text" class="uni-input" placeholder-style="color:#919399" placeholder="请输入" v-model="formParams.other_batch_attr" /></view> <text class="input-title-t1" v-if="is_apart">*</text>
<text class="input-title-t2">用途:</text>
</view>
<view class="pick-box">
<picker @change="bindPickerChange($event, 4)" :value="purposeOptionIndex" :range="purposeOption" :range-key="'name'">
<view class="row verCenter">
<view class="uni-input">{{ purposeOptionIndex == -1 ? '请选择' : purposeOption[purposeOptionIndex].name }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
</view> </view>
</view> </view>
<view class="row bothSide verCenter input-box-wrap"> <view class="row bothSide verCenter input-box-wrap">
...@@ -402,6 +413,7 @@ ...@@ -402,6 +413,7 @@
img_upload_url: uni.getStorageSync('img_upload_url') || 'http://image.liexindev.net', //oss系统 img_upload_url: uni.getStorageSync('img_upload_url') || 'http://image.liexindev.net', //oss系统
is_focus: true, //获取焦点动态化 is_focus: true, //获取焦点动态化
is_watch: false, //是否看货 is_watch: false, //是否看货
is_apart: false, //是否拆货
is_print: false, //查询该销售单是否需要打印客户标签 is_print: false, //查询该销售单是否需要打印客户标签
coo: '', //产地 coo: '', //产地
cod: '', //COD cod: '', //COD
...@@ -433,6 +445,11 @@ ...@@ -433,6 +445,11 @@
useOption: [], //产地 useOption: [], //产地
codOptionIndex: -1, codOptionIndex: -1,
codOption: [], //COD codOption: [], //COD
purposeOption: [
{ name: '销售用', value: 1 },
{ name: '仓库留存', value: 2 }
], //用途选择项
purposeOptionIndex: -1, //用途选中第几项
warehouse_id: '', //区分仓库 warehouse_id: '', //区分仓库
is_tips: false, //是否展示提示 is_tips: false, //是否展示提示
fastParams: { fastParams: {
...@@ -460,7 +477,8 @@ ...@@ -460,7 +477,8 @@
is_print: 1, //打印入库标签 is_print: 1, //打印入库标签
is_mobile_default_img: 0, //整单照片 is_mobile_default_img: 0, //整单照片
is_batch: 0, //是否分批理货1是0否 is_batch: 0, //是否分批理货1是0否
mpq: '' //标准包装量 mpq: '', //标准包装量
purpose_type: 0 //用途:0默认1销售用2库内留存
} }
}; };
}, },
...@@ -515,6 +533,9 @@ ...@@ -515,6 +533,9 @@
} else if (type == 3) { } else if (type == 3) {
this.codOptionIndex = e.detail.value; this.codOptionIndex = e.detail.value;
this.formParams.cod = this.codOption[e.detail.value].value; this.formParams.cod = this.codOption[e.detail.value].value;
} else if (type == 4) {
this.purposeOptionIndex = e.detail.value;
this.formParams.purpose_type = this.purposeOption[e.detail.value].value;
} else { } else {
this.index = e.detail.value; this.index = e.detail.value;
} }
...@@ -715,6 +736,7 @@ ...@@ -715,6 +736,7 @@
this.formParams.tally_qty = res.data.list[0].wait_tally_qty; this.formParams.tally_qty = res.data.list[0].wait_tally_qty;
this.formParams.date_code = res.data.list[0].expect_date_code; this.formParams.date_code = res.data.list[0].expect_date_code;
this.is_watch = res.data.list[0].is_watch == 1 ? true : false; //是否看货 this.is_watch = res.data.list[0].is_watch == 1 ? true : false; //是否看货
this.is_apart = res.data.list[0].is_apart == 1 ? true : false; //是否拆货
if (res.data.list[0].mobile_default_img) { if (res.data.list[0].mobile_default_img) {
this.image_list = res.data.list[0].mobile_default_img.split(','); this.image_list = res.data.list[0].mobile_default_img.split(',');
} else { } else {
...@@ -930,6 +952,17 @@ ...@@ -930,6 +952,17 @@
return false; return false;
} }
} }
//拆货任务必填用途
if (this.is_apart && this.formParams.purpose_type == 0) {
uni.showModal({
title: '提示',
content: '拆货任务必须选择用途',
showCancel: false
});
return false;
}
//【理货】、【一键理货】操作时,D/C 必填并且必须为四位数字 //【理货】、【一键理货】操作时,D/C 必填并且必须为四位数字
if (this.warehouse_id == 9) { if (this.warehouse_id == 9) {
const dcRegex = /^\d{4}$/; // 匹配四位数字 const dcRegex = /^\d{4}$/; // 匹配四位数字
...@@ -972,7 +1005,8 @@ ...@@ -972,7 +1005,8 @@
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,
is_batch: this.formParams.is_batch, //新增是否分批理货 is_batch: this.formParams.is_batch, //新增是否分批理货
mpq: this.formParams.mpq //新增标准包装量 mpq: this.formParams.mpq, //新增标准包装量
purpose_type: this.formParams.purpose_type //用途:0默认1销售用2库内留存
}; };
this.request(API.createTallyReceive, 'POST', params, true).then(res => { this.request(API.createTallyReceive, 'POST', params, true).then(res => {
......
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