Commit 49227723 by LJM

预检单--增加补打标签功能

parent 30844868
......@@ -525,4 +525,41 @@
}
}
}
.print-list {
.print-box {
.input-box {
margin-right: 20rpx;
.title {
position: relative;
font-size: 16rpx;
color: #919399;
white-space: nowrap;
&:before {
content: '*';
color: red;
}
}
.uni-input {
width: 178rpx;
height: 40rpx;
background: #ffffff;
border-radius: 10rpx;
border: 1px solid #1969f9;
font-size: 17rpx;
padding-left: 18rpx;
}
}
.reduce {
font-size: 50rpx;
color: #f00;
font-weight: bold;
margin-left: 30rpx;
}
}
.add {
font-size: 50rpx;
color: #1969f9;
font-weight: bold;
}
}
}
......@@ -121,11 +121,11 @@
</view>
<view class="text-item row verCenter" v-if="item.stock_in_items[0].second_unit">
<text class="label">第二单位:</text>
<text class="tt">{{ item.second_unit }}</text>
<text class="tt">{{ item.stock_in_items[0].second_unit }}</text>
</view>
<view class="text-item row verCenter" v-if="item.stock_in_items[0].second_unit_num">
<text class="label">单位数量:</text>
<text class="tt">{{ item.second_unit_num }}</text>
<text class="tt">{{ item.stock_in_items[0].second_unit_num }}</text>
</view>
<view class="text-item row verCenter">
<text class="label">销售员:</text>
......
......@@ -93,11 +93,11 @@
</view>
<view class="text-item row verCenter" v-if="item.stock_in_items[0].second_unit">
<text class="label">第二单位:</text>
<text class="tt">{{ item.second_unit }}</text>
<text class="tt">{{ item.stock_in_items[0].second_unit }}</text>
</view>
<view class="text-item row verCenter" v-if="item.stock_in_items[0].second_unit_num">
<text class="label">单位数量:</text>
<text class="tt">{{ item.second_unit_num }}</text>
<text class="tt">{{ item.stock_in_items[0].second_unit_num }}</text>
</view>
<view class="text-item row verCenter">
<text class="label">销售员:</text>
......
......@@ -70,6 +70,10 @@
<text class="label">入 仓 号:</text>
<text class="text">{{ item.inhouse }}</text>
</view>
<view class="input-box row verCenter" v-if="item.pack_requeire">
<text class="label">包装要求:</text>
<text class="text" style="color: red;">{{ item.pack_requeire }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货品名称:</text>
<text class="text">{{ item.goods_name }}</text>
......@@ -115,8 +119,9 @@
</template>
<template v-if="item.status == 1 || item.status == 2 || item.status == 4 || item.status == 10">
<!-- 针对需求状态为新创建 -->
<view class="btn2 row rowCenter verCenter" @click="showDrawer(index)">理货</view>
<view class="btn2 row rowCenter verCenter" @click="showDrawer(index,1)">理货</view>
</template>
<view class="btn2 row rowCenter verCenter" @click="showDrawer(index,2)" style="margin-left: 10rpx;" v-if="item.status != 1">补打标签</view>
</view>
</view>
</view>
......@@ -282,6 +287,50 @@
</view>
</view>
</uni-drawer>
<!-- 补打标签 -->
<uni-drawer ref="showRightLabels" mode="right">
<view class="uni-drawer-layer" v-if="detail">
<view class="title row rowCenter verCenter">
<text class="iconfont icon-juxing2" @click="closeDrawer()"></text>
<text class="text">补打标签</text>
</view>
<view class="field-item row">
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">入仓号:</text>
<text class="tt">{{ detail.inhouse }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">货品名称:</text>
<text class="tt">{{ detail.goods_name }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">标准品牌:</text>
<text class="tt">{{ detail.brand_name }}</text>
</view>
</view>
<view class="print-list">
<view class="print-box row verCenter bothSide" v-for="(item,index) in print_json" :key="index">
<view class="row verCente">
<view class="input-box row verCenter">
<text class="title">数量{{index+1}}:</text>
<input type="number" class="uni-input" placeholder-style="color:#919399" placeholder=" " v-model="item.qty" />
</view>
<view class="input-box row verCenter">
<text class="title">打印张数:</text>
<input type="number" class="uni-input" placeholder-style="color:#919399" placeholder=" " v-model="item.label_num" />
</view>
</view>
<view class="row verCente">
<text class="reduce" @click="reduce()" v-show="index > 0">-</text>
</view>
</view>
<view class="add" @click="add()">+</view>
</view>
<view class="btn row rowCenter verCenter">
<view class="row btn1 row rowCenter verCenter" style="width:100%" @click="stockPreCheckLatePrint(detail.precheck_id)">打印</view>
</view>
</view>
</uni-drawer>
</view>
</template>
......@@ -361,7 +410,8 @@
mobile_search: '',
status: '',
qc_status: ''
}
},
print_json: [{ qty: '', label_num: 1 }]
};
},
onReachBottom() {
......@@ -668,6 +718,42 @@
});
},
/**
* 预检单补打标签
*/
stockPreCheckLatePrint(precheck_id) {
if (!this.print_json || this.print_json.length === 0) {
uni.showToast({
title: '打印信息不能为空',
icon: 'none'
});
return;
}
for (let item of this.print_json) {
if (!item.qty || !item.label_num || isNaN(Number(item.qty)) || isNaN(Number(item.label_num)) || item.qty === '' || item.label_num === '') {
uni.showToast({
title: '数量和打印张数必须为数字且不能为空',
icon: 'none'
});
return;
}
}
this.request(API.stockPreCheckLatePrint, 'POST', { precheck_id: precheck_id, print_json: this.print_json }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '打印成功',
icon: 'success'
});
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
* 选择图片
*/
chooseImageChange() {
......@@ -785,15 +871,39 @@
this.is_focus = true;
}, 200);
},
showDrawer(index) {
this.image_list = [];
this.detail = this.list[index];
this.stockPreCheckTallyParams.tally_num = this.detail.tally_qty || '';
this.stockPreCheckTallyParams.tally_remark = this.detail.tally_remark || '';
this.stockPreCheckTallyParams.preckeck_imgs = this.detail.precheck_images;
this.stockPreCheckTallyParams.is_print_label = 1;
this.image_list = this.stockPreCheckTallyParams.preckeck_imgs ? this.stockPreCheckTallyParams.preckeck_imgs.split(',') : [];
this.$refs.showRight.open();
add() {
this.print_json.push({ qty: '', label_num: 1 });
},
reduce() {
if (this.print_json.length > 1) {
this.print_json.pop();
} else {
uni.showToast({
title: '至少保留一条',
icon: 'none'
});
}
},
/**
* @param {Object} index
* @param {Object} type 1 单个理货 2补打标签
*/
showDrawer(index, type) {
if (type == 1) {
this.image_list = [];
this.detail = this.list[index];
this.stockPreCheckTallyParams.tally_num = this.detail.tally_qty || '';
this.stockPreCheckTallyParams.tally_remark = this.detail.tally_remark || '';
this.stockPreCheckTallyParams.preckeck_imgs = this.detail.precheck_images;
this.stockPreCheckTallyParams.is_print_label = 1;
this.image_list = this.stockPreCheckTallyParams.preckeck_imgs ? this.stockPreCheckTallyParams.preckeck_imgs.split(',') : [];
this.$refs.showRight.open();
} else if (type == 2) {
this.image_list = [];
this.detail = this.list[index];
this.$refs.showRightLabels.open();
}
},
closeDrawer() {
this.$refs.showRight.close();
......
......@@ -377,7 +377,6 @@ const API = {
* */
delSeparateStockInRegister: API_BASE + '/api/stockIn/stockInRegister/delSeparateStockInRegister',
/**
/**
* 预检单-取消理货
* */
stockPreCheckCancelTally: API_BASE + '/api/stockIn/stockPreCheck/stockPreCheckCancelTally',
......@@ -400,7 +399,11 @@ const API = {
/**
* 查看库存
* */
getStockInfoByBatchSn: API_BASE + '/api/h5/stockIn/getStockInfoByBatchSn'
getStockInfoByBatchSn: API_BASE + '/api/h5/stockIn/getStockInfoByBatchSn',
/**
* 预检单补打标签
* */
stockPreCheckLatePrint: API_BASE + '/api/stockIn/stockPreCheck/stockPreCheckLatePrint'
}
......
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