Commit edf69054 by LJM

三方送检

parent 26d0aa0e
......@@ -231,14 +231,14 @@
}
}
.btn2 {
width: 300rpx;
width: 248rpx;
height: 75rpx;
background: #02a7f0;
background: #ffffff;
font-size: 23rpx;
color: #ffffff;
color: #ff3700;
}
.btn3 {
width: calc(100% - 428rpx);
width: calc(100% - 248rpx);
height: 75rpx;
background: #1969f9;
font-size: 23rpx;
......
.preCheckList {
padding: 15rpx 22rpx;
.search-box {
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
padding: 0 18rpx 0 0;
.sn {
width: 164rpx;
height: 35rpx;
border-right: 1px solid #f0f0f2;
.uni-input {
font-size: 18rpx;
color: #292b33;
font-weight: bold;
}
.uni-arrow {
width: 14rpx;
height: 9rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png') no-repeat center;
background-size: contain;
margin-left: 12rpx;
}
}
.search-bar {
width: calc(100% - 164rpx);
.icon-juxing1 {
font-size: 30rpx;
color: #919399;
margin-left: 17rpx;
margin-right: 13rpx;
}
.uni-input {
font-size: 18rpx;
color: #484b59;
}
.icon-a-juxing11 {
font-size: 30rpx;
color: #c6c7cc;
}
}
}
.search-params {
margin-top: 15rpx;
.sn {
width: 47%;
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
.uni-input {
font-size: 18rpx;
color: #292b33;
font-weight: bold;
}
.uni-arrow {
width: 14rpx;
height: 9rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png') no-repeat center;
background-size: contain;
margin-left: 12rpx;
}
}
}
.list {
margin-top: 15rpx;
padding-bottom: 100rpx;
.box {
position: relative;
padding: 15px 17rpx 18rpx 17rpx;
background: #ffffff;
box-shadow: 0px 3rpx 3rpx 0px rgba(198, 199, 204, 0.3);
border-radius: 10rpx;
margin-bottom: 15rpx;
flex-wrap: wrap;
border: 1px solid transparent;
.check-box-icon {
position: absolute;
right: 18rpx;
top: 17rpx;
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 {
border: 1px solid #1969f9;
.check-box-icon {
background: url('https://img.ichunt.com/images/ichunt/202304/11/71a74e52e94bcf2e89f8df9817d494c6.png') no-repeat center;
background-size: contain;
}
}
.input-box {
margin-bottom: 11rpx;
flex: 0 0 50%;
.bor {
height: 1px;
background-color: #f0f0f2;
color: #f0f0f2;
margin-bottom: 10rpx;
}
.label {
width: 114rpx;
font-size: 17rpx;
color: #919399;
white-space: nowrap;
}
.text {
font-size: 17rpx;
color: #484b59;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.desc {
font-size: 17rpx;
color: #484b59;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.tt {
font-size: 17rpx;
color: #1969f9;
}
.pick_img_list {
flex-wrap: wrap;
.default {
width: 120rpx;
height: 120rpx;
background: #f5f5f7;
border-radius: 10rpx;
margin-right: 15rpx;
.iconfont {
font-size: 60rpx;
color: #c6c7cc;
}
}
.img_list {
position: relative;
width: 120rpx;
height: 120rpx;
background: #f5f5f7;
border-radius: 10rpx;
margin-right: 15rpx;
margin-bottom: 15rpx;
image {
width: 120rpx;
height: 120rpx;
}
.iconfont {
position: absolute;
right: 0;
top: 0;
font-size: 30rpx;
color: #ff3700;
z-index: 9;
}
}
}
}
.btn-box {
position: absolute;
right: 17rpx;
bottom: 13rpx;
.btn1 {
width: 75rpx;
height: 30rpx;
background: #fff;
border-radius: 8rpx;
font-size: 15rpx;
color: #f00;
border: 1px solid #f00;
margin-right: 10rpx;
}
.btn2 {
width: 68rpx;
height: 30rpx;
background: #1969f9;
border-radius: 8rpx;
font-size: 15rpx;
color: #ffffff;
}
}
.status-box {
position: absolute;
right: 50rpx;
top: 5rpx;
.staus_type_val {
font-size: 17rpx;
color: #1969f9;
border: 1px solid #f0f0f2;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 10rpx;
}
}
}
}
.fix-btn {
position: fixed;
bottom: 0;
width: 100%;
left: 0;
z-index: 999;
.btn1 {
width: 128rpx;
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;
background: #1969f9;
font-size: 23rpx;
color: #ffffff;
}
}
}
::v-deep .uni-drawer__content {
width: 85% !important;
}
.uni-drawer-layer {
width: 100%;
background-color: #ffffff;
padding: 22rpx 22rpx 0 22rpx;
.tip {
color: red;
font-size: 17rpx;
margin-top: 28rpx;
}
.title {
position: relative;
.iconfont {
position: absolute;
left: 0;
top: 0;
font-size: 30rpx;
color: #292b33;
}
.text {
font-size: 23rpx;
color: #292b33;
font-weight: bold;
}
}
.p-text {
margin-top: 38rpx;
margin-bottom: 25rpx;
.tt {
font-size: 20rpx;
color: #484b59;
}
.ed {
font-weight: bold;
font-size: 20rpx;
color: #1969f9;
}
}
.pp {
font-size: 20rpx;
color: #292b33;
font-weight: bold;
margin-bottom: 17rpx;
margin-top: 35rpx;
transition: all 0.2s ease;
&.pt {
margin-bottom: 35rpx;
}
text:first-child {
margin-right: 32rpx;
}
.curr {
position: relative;
color: #1969f9;
font-weight: bold;
&::after {
content: '';
background-color: #1969f9;
width: 51%;
height: 2px;
position: absolute;
bottom: -10rpx;
left: 0;
right: 0;
margin: 0 auto;
}
}
}
.field-item {
flex-wrap: wrap;
margin-top: 16rpx;
.item {
flex: 0 0 50%;
margin-bottom: 8rpx;
.label {
font-size: 16rpx;
color: #919399;
white-space: nowrap;
}
.text {
font-size: 16rpx;
color: #1969f9;
margin-left: 6rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
max-width: 176rpx;
}
.tt {
font-size: 17rpx;
color: #484b59;
margin-left: 6rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
max-width: 176rpx;
}
}
}
.btn {
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 100%;
.btn1 {
height: 75rpx;
background: #1969f9;
font-size: 23rpx;
color: #ffffff;
}
.btn2 {
height: 75rpx;
background: #ffe0d7;
font-size: 23rpx;
color: #ff3700;
font-weight: bold;
}
}
.input-wrap {
margin-bottom: 25rpx;
.label-title {
font-size: 17rpx;
color: #484b59;
font-weight: bold;
margin-bottom: 10rpx;
}
.input-box {
.uni-arrow {
width: 14rpx;
height: 9rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png') no-repeat center;
background-size: contain;
margin-left: 12rpx;
}
.uni-input {
height: 55rpx;
background: #ffffff;
border-radius: 10rpx;
border: 1px solid #1969f9;
font-size: 17rpx;
padding-left: 18rpx;
}
.uni-textarea {
width: 100%;
height: 110rpx;
background: #ffffff;
border-radius: 10px;
border: 1px solid #1969f9;
font-size: 17rpx;
padding: 18rpx;
}
}
.select-box {
background: #ffffff;
border-radius: 10rpx;
border: 1px solid #1969f9;
.wrap {
padding-left: 15rpx;
padding-right: 25rpx;
height: 40rpx;
}
.uni-input {
font-size: 17rpx;
color: #484b59;
}
.uni-arrow {
width: 14rpx;
height: 9rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png') no-repeat center;
background-size: contain;
margin-left: 12rpx;
}
}
}
.pack {
.h2 {
font-size: 17rpx;
color: #484b59;
font-weight: bold;
margin-bottom: 10rpx;
.tt {
font-size: 17rpx;
color: #919399;
font-weight: normal;
}
.num {
.t1 {
font-size: 13rpx;
color: #1969f9;
}
.t2 {
font-size: 13rpx;
color: #919399;
}
}
}
.icon-box {
width: 75rpx;
height: 55rpx;
border-radius: 10rpx;
border: 1px solid #c6c7cc;
.iconfont {
font-size: 30rpx;
color: #56585e;
}
}
.pic-list {
flex-wrap: wrap;
margin-bottom: 18rpx;
.default {
width: 120rpx;
height: 120rpx;
background: #f5f5f7;
border-radius: 10rpx;
margin-right: 15rpx;
.iconfont {
font-size: 60rpx;
color: #c6c7cc;
}
}
.box {
position: relative;
width: 120rpx;
height: 120rpx;
background: #f5f5f7;
border-radius: 10rpx;
margin-right: 15rpx;
margin-bottom: 15rpx;
image {
width: 120rpx;
height: 120rpx;
}
.iconfont {
position: absolute;
right: 0;
top: 0;
font-size: 30rpx;
color: #ff3700;
z-index: 9;
}
}
}
.textarea-box {
width: 100%;
textarea {
width: 100%;
height: 85rpx;
padding: 10rpx 15rpx;
background: #f5f5f7;
border-radius: 10rpx;
font-size: 16rpx;
box-sizing: border-box;
}
}
.print {
margin-bottom: 27rpx;
.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;
}
}
.tt {
font-size: 17rpx;
color: #484b59;
margin-left: 10rpx;
}
}
}
.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;
}
}
}
......@@ -450,6 +450,11 @@
"style": {
"navigationBarTitleText": "出库发货"
}
}, {
"path": "pages/preCheck/thirdPartyInspectionStatus",
"style": {
"navigationBarTitleText": "三方送检"
}
}],
"globalStyle": {
"navigationBarTextStyle": "black",
......
......@@ -104,6 +104,12 @@
</view>
<text class="text">预检单</text>
</navigator>
<navigator class="box-li column rowCenter verCenter" url="/pages/preCheck/thirdPartyInspectionStatus" hover-class="none">
<view class="box row rowCenter verCenter">
<image src="/static/home/@2x(5).png"></image>
</view>
<text class="text">三方送检</text>
</navigator>
</view>
</view>
</template>
......
<template>
<view class="preCheckList">
<!-- 搜索参数 -->
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange($event,1)" :value="index" :range="array">
<view class="row verCenter">
<view class="uni-input">{{ array[index] }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
<view class="search-bar row bothSide verCenter">
<view class="row verCenter" style="width: 100%;">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入型号/入仓号/来货物流单号查询" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.batch_search_value" @input="handleInput" style="width: 100%;" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<view class="search-params row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange($event,1)" :value="status_index" :range="status" :range-key="'name'">
<view class="row verCenter">
<view class="uni-input">{{ status_index === -1 ? '三方送检状态' : status[status_index].name }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
</view>
<!-- 列表区 -->
<view class="list" v-if="list.length > 0">
<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="status-box row">
<view class="staus_type_val row rowCenter verCenter" v-if="item.is_look_str == '是'"></view>
<view class="staus_type_val row rowCenter verCenter" v-if="item.is_qc"></view>
</view>
<view class="input-box row verCenter curr" style="flex: 0 0 100%;">
<text class="label">送检单号:</text>
<text class="tt">{{ item.inspection_order_sn }}</text>
</view>
<view class="input-box row verCenter curr" style="flex: 0 0 100%;">
<text class="label">检后寄回物流:</text>
<view class="tt">
{{ item.back_shipping_name }}
<text v-if="item.back_shipping_name"></text>
{{item.back_shipment_number}}
</view>
</view>
<view class="input-box row verCenter curr" style="flex: 0 0 100%;">
<text class="label">仓库寄出物流:</text>
<view class="tt">
{{ item.inspection_shipping_name }}
<text v-if="item.inspection_shipping_name"></text>
{{item.inspection_shipment_number}}
</view>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">入 仓 号:</text>
<text class="text">{{ item.inhouse }}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">备注:</text>
<text class="text" style="color: red;">{{ item.remark }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货品名称:</text>
<text class="text">{{ item.goods_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">标准品牌:</text>
<text class="text">{{ item.brand_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">采 购 员:</text>
<text class="text">{{ item.purchase_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">总数量:</text>
<text class="text">{{ item.total_qty }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">送检数量:</text>
<text class="text">{{ item.inspection_qty }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货物状态:</text>
<text class="text">{{ item.goods_status_cn }}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">收货备注:</text>
<text class="text" style="color: red;">{{ item.qc_delivery_remark }}</text>
</view>
<view class="btn-box row">
<view class="btn2 row rowCenter verCenter" @click="showDrawer(index,1)" v-if="item.status == 2">检后收货</view>
</view>
</view>
</view>
<!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text>
</view>
<!-- 底部操作按钮 -->
<view class="fix-btn row verCenter">
<view class="btn1 row rowCenter verCenter" @click="allChnage()">
<text class="check-box-icon" :class="{ curr: filter_list.length > 0 && filter_list.length == filter_id.length }"></text>
<text class="text">{{ filter_id.length == 0 ? '全选' : filter_id.length }}</text>
</view>
<view class="btn2 row rowCenter verCenter" @click="canelShipping">取消收货</view>
<view class="btn3 row rowCenter verCenter" @click="batchTally">检后收货</view>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
img_upload_url: uni.getStorageSync('img_upload_url') || 'http://image.liexindev.net', //oss系统
is_focus: true, //获取焦点动态化
index: 0,
detail: {}, //详情
array: ['全量搜索'],
noexebshowFalg: true, //控制是否会触发生命周期
input_flag: false,
all_flag: false, //全选标记
page: 1,
limit: 30,
hasMoreData: true, //是否分页加载
list: [],
filter_list: [], //筛选已选中的列表
filter_id: [], //过滤id
status: [
{ name: '全部', value: '' },
{ name: '待送检', value: 1 },
{ name: '已送检', value: 2 },
{ name: '已完成', value: 5 },
{ name: '已取消', value: -1 }
],
status_index: -1,
searchParams: {
batch_search_value: '',
status: ''
}
};
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onLoad(options) {
},
onShow() {
if (this.noexebshowFalg) {
this.resetChange();
this.getData();
}
},
methods: {
bindPickerChange: function(e, type) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.resetChange();
if (type == 1) {
this.status_index = e.detail.value;
this.searchParams.status = this.status[e.detail.value].value;
}
this.getData();
},
/**
* 全选
*/
allChnage() {
this.all_flag = !this.all_flag;
this.filter_list = createArray(this.list.length, this.all_flag);
if (this.all_flag) {
this.filter_id = this.list.map(function(item) {
return item.inspection_order_id;
});
} else {
this.filter_id = [];
}
},
/**
* 找出false对应的下标
* @param {Object} arr
* @param {Object} target
*/
findIndex(arr, target) {
const result = [];
arr.map((item, index) => {
if (item === target) {
result.push(index);
}
});
return result;
},
/**
* 筛选过滤出选中的元素
*/
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].inspection_order_id);
},
/**
* 清空数据
*/
clearInput() {
this.resetChange();
this.searchParams.batch_search_value = '';
this.input_flag = false;
this.clearInputAndFocus();
this.getData();
},
/**
* 全量搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
var val = event.target.value;
this.resetChange();
if (val) {
this.input_flag = true;
} else {
this.input_flag = false;
}
this.getData();
}, 500),
/**
* 获取列表数据
*/
getData() {
this.request(API.inspectionOrderList, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, true).then(res => {
if (res.code === 0) {
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
this.filter_list = createArray(this.list.length, false);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 取消收货
*/
canelShipping() {
if (this.filter_id.length == 0) {
uni.showToast({
title: '请勾选货物',
icon: 'error'
});
return false;
}
//针对需求状态为:“已完成”状态可操作5
uni.showModal({
title: '取消理货',
content: `已选中${this.filter_id.length}条三方送检单,是否确认取消收货?`,
showCancel: true,
success: res => {
if (res.confirm) {
this.request(API.canelShipping, 'POST', { inspection_order_ids: this.filter_id.join(',') }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '取消收货成功',
icon: 'success'
});
setTimeout(() => {
this.resetChange();
this.getData();
}, 2000)
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
},
/**
* @param {Object} index
* @param {Object} type 1 单个理货 2补打标签
*/
showDrawer(index, type) {
},
closeDrawer() {
this.$refs.showRight.close();
this.$refs.showRightTallys.close();
this.$refs.showRightDeliver.close();
this.$refs.showRightLabels.close();
}
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/preCheck/list.scss';
</style>
\ No newline at end of file
......@@ -368,6 +368,14 @@ const API = {
* */
getStockPreCheckList: API_BASE + '/api/stockIn/stockPreCheck/getStockPreCheckList',
/**
* 三方质检列表
* */
inspectionOrderList: API_BASE + '/api/inspectionOrder/inspectionOrderList',
/**
* 取消收货
* */
canelShipping: API_BASE + '/api/inspectionOrder/canelShipping',
/**
* 获取分货登记列表
* */
separateStockInRegisterList: API_BASE + '/api/stockIn/stockInRegister/separateStockInRegisterList',
......
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