Commit c0ddd4c3 by liangjianmin

fix(tallyReceive): 添加D/C必填逻辑及库存类型显示

- 新增库存类型字段显示,确保用户能看到相关信息
- 添加D/C必填检查逻辑,针对自营商品和拆货任务进行验证
- 优化输入框标题样式,提升用户体验
parent 33473eb3
Showing with 25 additions and 1 deletions
......@@ -135,6 +135,10 @@
<text class="label">是否质检:</text>
<text class="text" style="font-weight: bold;">{{ detail.is_qc_cn }}</text>
</view>
<view class="item row verCenter">
<text class="label">库存类型:</text>
<text class="tt">{{ detail.stock_type_cn }}</text>
</view>
<view class="item row verCenter" v-if="detail.sku_id > 0">
<text class="label">包装:</text>
<text class="tt">{{ detail.packing_cn }} - {{ detail.mpq }}</text>
......@@ -208,7 +212,10 @@
</view>
<view class="row bothSide verCenter input-box-wrap">
<view>
<view class="input-title"><text class="input-title-t2">D / C:</text></view>
<view class="input-title">
<text class="input-title-t1" v-if="isDcRequired">*</text>
<text class="input-title-t2">D / C:</text>
</view>
<template v-if="is_print">
<view class="input-box"><input type="text" class="uni-input" placeholder-style="color:#EC7935" placeholder="建议填写批次" v-model="formParams.date_code" /></view>
</template>
......@@ -501,6 +508,13 @@
this.getData();
}
},
computed: {
// D/C是否必填:库存类型为新自营(2)或老自营(3),或者是否拆货为"是"
isDcRequired() {
var stockType = this.detail.stock_type;
return stockType == 2 || stockType == 3 || this.is_apart;
}
},
watch: {
server_image_list(arr) {
if (arr.length > 0) {
......@@ -966,6 +980,16 @@
return false;
}
// 自营商品(新自营stock_type=2、老自营stock_type=3)或拆货任务,D/C必填
if (this.isDcRequired && !this.formParams.date_code) {
uni.showModal({
title: '提示',
content: '请填写D/C',
showCancel: false
});
return false;
}
//若选择的用途是"销售用",则理货数量需≤销售需拆货数量
if (this.formParams.purpose_type == 1) {
var apart_todo_qty = Number(this.detail.apart_todo_qty) || 0;
......
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