Commit e2d8a210 by LJM

异常管理--增加自行设置打印标签数量,以及展示等优化

parent 689dfe15
...@@ -84,10 +84,10 @@ ...@@ -84,10 +84,10 @@
border: 1px solid transparent; border: 1px solid transparent;
.check-box-icon { .check-box-icon {
position: absolute; position: absolute;
right: 18rpx; left: 15rpx;
top: 17rpx; top: 32rpx;
width: 20rpx; width: 40rpx;
height: 20rpx; height: 40rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/11/0bf30da3e8ce6c476c210173b5f13d51.png') no-repeat center; background: url('https://img.ichunt.com/images/ichunt/202304/11/0bf30da3e8ce6c476c210173b5f13d51.png') no-repeat center;
background-size: contain; background-size: contain;
display: block; display: block;
...@@ -250,38 +250,8 @@ ...@@ -250,38 +250,8 @@
width: 100%; width: 100%;
left: 0; left: 0;
z-index: 999; z-index: 999;
.btn1 { .btn {
width: 128rpx; width: 100%;
height: 75rpx;
background: #ffffff;
border-right: 1px solid #f0f0f2;
.check-box-icon {
width: 20rpx;
height: 20rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/11/0bf30da3e8ce6c476c210173b5f13d51.png') no-repeat center;
background-size: contain;
display: block;
&.curr {
background: url('https://img.ichunt.com/images/ichunt/202304/11/71a74e52e94bcf2e89f8df9817d494c6.png') no-repeat center;
background-size: contain;
}
}
.text {
margin-left: 10rpx;
font-size: 20rpx;
color: #484b59;
}
}
.btn2 {
width: 300rpx;
height: 75rpx;
background: #02a7f0;
font-size: 23rpx;
color: #ffffff;
}
.btn3 {
width: calc(100% - 428rpx);
height: 75rpx; height: 75rpx;
background: #1969f9; background: #1969f9;
font-size: 23rpx; font-size: 23rpx;
......
...@@ -55,11 +55,11 @@ ...@@ -55,11 +55,11 @@
<text class="text">{{item.abnormal_number}}</text> <text class="text">{{item.abnormal_number}}</text>
</view> </view>
<template v-if="item.abnormal_type == 1"> <template v-if="item.abnormal_type == 1">
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #c6d6e0;padding: 10rpx 0;"> <view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">订单型号:</text> <text class="label">订单型号:</text>
<text class="text">{{item.order_model}}</text> <text class="text">{{item.order_model}}</text>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #c6d6e0;padding: 10rpx 0;"> <view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">实物型号:</text> <text class="label">实物型号:</text>
<view class="text"> <view class="text">
<rich-text :nodes="highlightDifferences(item.order_model, item.actual_model)"></rich-text> <rich-text :nodes="highlightDifferences(item.order_model, item.actual_model)"></rich-text>
...@@ -83,11 +83,11 @@ ...@@ -83,11 +83,11 @@
<text class="label">订单型号:</text> <text class="label">订单型号:</text>
<text class="text">{{item.order_model}}</text> <text class="text">{{item.order_model}}</text>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #c6d6e0;padding: 10rpx 0;"> <view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">订单品牌:</text> <text class="label">订单品牌:</text>
<text class="text">{{item.order_brand}}</text> <text class="text">{{item.order_brand}}</text>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #c6d6e0;padding: 10rpx 0;"> <view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">实物品牌:</text> <text class="label">实物品牌:</text>
<view class="text"> <view class="text">
<rich-text :nodes="highlightDifferences(item.order_brand, item.actual_brand)"></rich-text> <rich-text :nodes="highlightDifferences(item.order_brand, item.actual_brand)"></rich-text>
...@@ -111,11 +111,11 @@ ...@@ -111,11 +111,11 @@
<text class="label">订单品牌:</text> <text class="label">订单品牌:</text>
<text class="text">{{item.order_brand}}</text> <text class="text">{{item.order_brand}}</text>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #c6d6e0;padding: 10rpx 0;"> <view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">订单产地:</text> <text class="label">订单产地:</text>
<text class="text">{{item.order_origin}}</text> <text class="text">{{item.order_origin}}</text>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #c6d6e0;padding: 10rpx 0;"> <view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">实物产地:</text> <text class="label">实物产地:</text>
<rich-text :nodes="highlightDifferences(item.order_origin, item.actual_origin)"></rich-text> <rich-text :nodes="highlightDifferences(item.order_origin, item.actual_origin)"></rich-text>
</view> </view>
...@@ -137,11 +137,11 @@ ...@@ -137,11 +137,11 @@
<text class="label">订单产地:</text> <text class="label">订单产地:</text>
<text class="text">{{item.order_origin}}</text> <text class="text">{{item.order_origin}}</text>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #c6d6e0;padding: 10rpx 0;"> <view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">订单数量:</text> <text class="label">订单数量:</text>
<text class="text">{{item.order_qty}}</text> <text class="text">{{item.order_qty}}</text>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #c6d6e0;padding: 10rpx 0;"> <view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">实物数量:</text> <text class="label">实物数量:</text>
<rich-text :nodes="highlightDifferences(item.order_qty, item.actual_qty)"></rich-text> <rich-text :nodes="highlightDifferences(item.order_qty, item.actual_qty)"></rich-text>
</view> </view>
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
<text class="text">查不到当前数据</text> <text class="text">查不到当前数据</text>
</view> </view>
<!-- 新增异常弹窗 --> <!-- 新增异常弹窗 -->
<uni-popup ref="popup" background-color="#c6d6e0"> <uni-popup ref="popup" background-color="#eee">
<view class="popup-content"> <view class="popup-content">
<view class="section"> <view class="section">
<view class="input-box row verCenter" style="margin-bottom: 40rpx;"> <view class="input-box row verCenter" style="margin-bottom: 40rpx;">
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
</view> </view>
</uni-popup> </uni-popup>
<!-- 多个入仓号 --> <!-- 多个入仓号 -->
<uni-popup ref="popupErpSn" background-color="#c6d6e0"> <uni-popup ref="popupErpSn" background-color="#eee">
<view class="popup-content"> <view class="popup-content">
<view class="section"> <view class="section">
<view style="margin-bottom: 20rpx;"> <view style="margin-bottom: 20rpx;">
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
orderDetailByIdList: {}, orderDetailByIdList: {},
quickExpressions: [], quickExpressions: [],
is_business_processing: ['否', '是'], is_business_processing: ['否', '是'],
is_business_processing_index: -1, is_business_processing_index: 1,
abnormal_pic_url: [], abnormal_pic_url: [],
order_id: '', order_id: '',
form: { form: {
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
actual_origin: '', actual_origin: '',
abnormal_explain: '', abnormal_explain: '',
abnormal_pic_url: '', abnormal_pic_url: '',
is_business_processing: '' is_business_processing: 1
} }
}; };
}, },
......
...@@ -824,14 +824,6 @@ ...@@ -824,14 +824,6 @@
* 锁定理货 * 锁定理货
*/ */
lockTally() { lockTally() {
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
}
if (!this.erp_order_sn) { if (!this.erp_order_sn) {
uni.showToast({ uni.showToast({
title: '请输入入仓号', title: '请输入入仓号',
...@@ -982,14 +974,6 @@ ...@@ -982,14 +974,6 @@
var tally_num = parseInt(this.form[index].tally_num); var tally_num = parseInt(this.form[index].tally_num);
var netWeight = parseFloat(this.form[index].net_weight); var netWeight = parseFloat(this.form[index].net_weight);
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
}
if (!tally_num) { if (!tally_num) {
uni.showToast({ uni.showToast({
title: '请填写入库数量', title: '请填写入库数量',
......
...@@ -42,9 +42,10 @@ ...@@ -42,9 +42,10 @@
<view class="total-text" v-if="list.length > 0"><text>{{total}}</text>条数据</view> <view class="total-text" v-if="list.length > 0"><text>{{total}}</text>条数据</view>
<!-- 列表区 --> <!-- 列表区 -->
<view class="list" v-if="list.length > 0"> <view class="list" v-if="list.length > 0">
<view class="box row" v-for="(item, index) in list" :key="index"> <view class="box row" v-for="(item, index) in list" :key="index" :class="{ curr: filter_list[index] }">
<view class="check-box-icon" @click="filterChange(index)"></view>
<view class="input-box row verCenter bothSide" style="flex: 0 0 100%;"> <view class="input-box row verCenter bothSide" style="flex: 0 0 100%;">
<view> <view style="padding-left: 62rpx;">
<text class="tt" style="color: #000;font-weight: bold;">{{ item.erp_order_sn }}</text> <text class="tt" style="color: #000;font-weight: bold;">{{ item.erp_order_sn }}</text>
</view> </view>
<view class="row verCenter"> <view class="row verCenter">
...@@ -88,7 +89,14 @@ ...@@ -88,7 +89,14 @@
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;"> <view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">净重:</text> <text class="label">净重:</text>
<text class="text">{{item.net_weight}}</text> <template v-if="filter_edit[index]">
<input type="number" class="uni-input" placeholder-style="color:#919399" style="border: 1px solid #484b59;width: 100rpx;margin-right: 5rpx;padding-left: 5rpx;" v-model="list[index].net_weight">kg
<text class="text" style="color: #1969f9;margin-left: 30rpx;" @click="updateTallyNetWeight(item.wstydl_id,list[index].net_weight,index)">保存</text>
</template>
<template v-else>
<text class="text">{{item.net_weight}}kg</text>
<text class="text" style="color: #1969f9;margin-left: 30rpx;" @click="filterEditChange(index)" v-if="item.tally_status == 1">修改</text>
</template>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;"> <view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">理货备注:</text> <text class="label">理货备注:</text>
...@@ -117,6 +125,9 @@ ...@@ -117,6 +125,9 @@
</view> </view>
</view> </view>
</view> </view>
<view class="fix-btn row verCenter" v-if="list.length > 0">
<view class="btn row rowCenter verCenter" @click="reTagPrint()">补打美产/商检标签</view>
</view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text> <text class="iconfont icon-a-juxing21"></text>
...@@ -128,6 +139,8 @@ ...@@ -128,6 +139,8 @@
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
import { createArray } from '@/util/util.js';
export default { export default {
data() { data() {
return { return {
...@@ -139,6 +152,9 @@ ...@@ -139,6 +152,9 @@
detail: {}, //详情 detail: {}, //详情
input_flag: false, input_flag: false,
total: 0, total: 0,
filter_edit: [],
filter_list: [], //筛选已选中的列表
filter_id: [], //入库单列表的入库登记
is_focus: true, //获取焦点动态化 is_focus: true, //获取焦点动态化
hasMoreData: true, //是否分页加载 hasMoreData: true, //是否分页加载
searchParams: { searchParams: {
...@@ -163,7 +179,32 @@ ...@@ -163,7 +179,32 @@
}, },
methods: { methods: {
/** /**
* 设置默认的时间区间为近一个月 * 找出false对应的下标
* @param {Object} arr
* @param {Object} target
*/
findIndex(arr, target) {
const result = [];
arr.map((item, index) => {
if (item === target) {
result.push(index);
}
});
return result;
},
filterEditChange(index) {
this.$set(this.filter_edit, index, (this.filter_edit[index] = !this.filter_edit[index]));
},
/**
* 筛选过滤出选中的元素
*/
filterChange(index) {
this.$set(this.filter_list, index, (this.filter_list[index] = !this.filter_list[index]));
let filter_arr = this.findIndex(this.filter_list, true);
this.filter_id = filter_arr.map(i => this.list[i].wstydl_id);
},
/**
* 设置默认的时间区间为近10天
*/ */
setDefaultTimeInterval() { setDefaultTimeInterval() {
const currentDate = new Date(); const currentDate = new Date();
...@@ -179,8 +220,8 @@ ...@@ -179,8 +220,8 @@
// 结束日期为当前日期 // 结束日期为当前日期
const create_time_end = formatDate(currentDate); const create_time_end = formatDate(currentDate);
// 起始日期为一个月前的日期 // 起始日期为10天前的日期
const create_time_begin = formatDate(new Date(currentDate.setMonth(currentDate.getMonth() - 1))); const create_time_begin = formatDate(new Date(currentDate.setDate(currentDate.getDate() - 10)));
// 设置到 searchParams // 设置到 searchParams
this.searchParams.create_time_begin = create_time_begin; this.searchParams.create_time_begin = create_time_begin;
...@@ -218,6 +259,8 @@ ...@@ -218,6 +259,8 @@
if (res.data.data.length > 0) { if (res.data.data.length > 0) {
this.hasMoreData = true; this.hasMoreData = true;
this.list = this.list.concat(res.data.data); this.list = this.list.concat(res.data.data);
this.filter_list = createArray(this.list.length, false);
this.filter_edit = createArray(this.list.length, false);
} else { } else {
this.hasMoreData = false; this.hasMoreData = false;
} }
...@@ -230,6 +273,60 @@ ...@@ -230,6 +273,60 @@
}); });
}, },
/** /**
* 修改理货净重
* @param {Object} wstydl_id
* @param {Object} net_weight
* @param {Object} index
*/
updateTallyNetWeight(wstydl_id, net_weight, index) {
this.request(API.updateTallyNetWeight, 'GET', { wstydl_id: wstydl_id, net_weight: net_weight }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '修改成功',
icon: 'success'
});
setTimeout(() => {
this.$set(this.filter_edit, index, false);
this.$forceUpdate();
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 补打标签
*/
reTagPrint() {
if (this.filter_id.length == 0) {
uni.showToast({
title: '请勾选货品',
icon: 'error'
});
return false;
}
this.request(API.reTagPrint, 'GET', { wstydl_id: this.filter_id.join(',') }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '打印成功',
icon: 'success'
});
setTimeout(() => {
this.filter_list = createArray(this.list.length, false);
this.filter_id = [];
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 预览图片 * 预览图片
* @param {Object} img * @param {Object} img
* @param {Object} index * @param {Object} index
......
// const API_BASE = 'https://api.ichunt.com'; // const API_BASE = 'https://api.ichunt.com';
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统 // const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
// const API_BASE_OSS_HK = 'http://hk.image.semour.com'; //oss系统 HK // const API_BASE_OSS_HK = 'http://hk.image.semour.com'; //oss系统 HK
// const API_BASE_WMS = 'https://wms.ichunt.net'; //WMS系统 // const API_BASE_WMS = 'https://wms.ichunt.net'; //WMS系统
const API_BASE = 'http://api.liexin.com'; const API_BASE = 'http://api.liexin.com';
const API_BASE_OSS = 'http://image.liexindev.net'; const API_BASE_OSS = 'http://image.liexindev.net';
...@@ -381,7 +381,15 @@ const API = { ...@@ -381,7 +381,15 @@ const API = {
/** /**
* 待处理数 * 待处理数
*/ */
getStayHandleCount: API_BASE + '/supplywechatwms/getStayHandleCount' getStayHandleCount: API_BASE + '/supplywechatwms/getStayHandleCount',
/**
* 修改理货净重
*/
updateTallyNetWeight: API_BASE + '/supplywechatwms/updateTallyNetWeight',
/**
* 补打标签
*/
reTagPrint: API_BASE + '/supplywechatwms/reTagPrint'
} }
......
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