Commit 0e8508e8 by liangjianmin

js

parent 2b2914ab
.tallyExectionDetail { .tallyExectionDetail {
padding: 24rpx; padding: 24rpx;
.base-information { .base-information {
padding: 24rpx 24rpx 0 24rpx; padding: 24rpx;
background: #ffffff; background: #ffffff;
border-radius: 4rpx; border-radius: 4rpx;
margin-bottom: 16rpx; margin-bottom: 16rpx;
...@@ -23,7 +23,10 @@ ...@@ -23,7 +23,10 @@
} }
} }
.pp { .pp {
margin-bottom: 20rpx; margin-bottom: 20rpx;
&:last-child{
margin-bottom: 0;
}
&.mb24 { &.mb24 {
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
...@@ -100,6 +103,23 @@ ...@@ -100,6 +103,23 @@
} }
} }
} }
.status-box {
height: 80rpx;
border-top: 1px solid #e6edf0;
.bb {
flex: 0 0 50%;
.t1 {
font-size: 24rpx;
color: #6e767a;
}
.t2 {
margin-left: 16rpx;
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
}
}
.uni-table { .uni-table {
.uni-th { .uni-th {
height: 62rpx; height: 62rpx;
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<template v-else-if="currentIndex === 1"> <template v-else-if="currentIndex === 1">
<view class="list" v-if="unusualCheckInList.length > 0 || !is_complete"> <view class="list" v-if="unusualCheckInList.length > 0 || !is_complete">
<navigator class="box row bothSide verCenter" :url="'/pages/goods/tallyExectionDetail?number=' + item.erp_order_sn" hover-class="none" v-for="(item, index) in unusualCheckInList" :key="index"> <navigator class="box row bothSide verCenter" :url="'/pages/goods/tallyExectionDetail?number=' + item.erp_order_sn" hover-class="none" v-for="(item, index) in unusualCheckInList" :key="index">
<view class="bill-number row rowCenter verCenter" :class="numberType[index] ? 'color1' : 'color2'">{{ item.erp_order_sn }}</view> <view class="bill-number row rowCenter verCenter" :class="numberTypeUnusua[index] ? 'color1' : 'color2'">{{ item.erp_order_sn }}</view>
<view> <view>
<text class="t1">客户:{{ item.supplier_name }}</text> <text class="t1">客户:{{ item.supplier_name }}</text>
<view class="text"> <view class="text">
...@@ -98,7 +98,8 @@ export default { ...@@ -98,7 +98,8 @@ export default {
page: 1, page: 1,
goodsArrangeData: [], goodsArrangeData: [],
unusualCheckInList: [], unusualCheckInList: [],
numberType: [] numberType: [],
numberTypeUnusua:[]
}; };
}, },
onShow() { onShow() {
...@@ -130,6 +131,18 @@ export default { ...@@ -130,6 +131,18 @@ export default {
this.is_complete = true; this.is_complete = true;
this.goodsArrangeData = res.data; this.goodsArrangeData = res.data;
this.total = res.data.length; this.total = res.data.length;
//判断A单 B单
if (res.data.length > 0) {
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].number.indexOf('B')) {
this.numberType.push(true);
} else {
this.numberType.push(false);
}
}
}
} else { } else {
uni.showToast({ uni.showToast({
title: res.err_msg, title: res.err_msg,
...@@ -148,10 +161,10 @@ export default { ...@@ -148,10 +161,10 @@ export default {
//判断A单 B单 //判断A单 B单
if (res.data.length > 0) { if (res.data.length > 0) {
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
if (res.data[i].number.indexOf('B')) { if (res.data[i].erp_order_sn.indexOf('B')) {
this.numberType.push(true); this.numberTypeUnusua.push(true);
} else { } else {
this.numberType.push(false); this.numberTypeUnusua.push(false);
} }
} }
} }
......
...@@ -9,159 +9,75 @@ ...@@ -9,159 +9,75 @@
</view> </view>
<view class="pp row verCenter"> <view class="pp row verCenter">
<text class="t1">入仓号:</text> <text class="t1">入仓号:</text>
<text class="t2" style="width: auto;">A123456</text> <text class="t2" style="width: auto;">{{ customerDetail.base.erp_order_sn }}</text>
<text class="type row rowCenter verCenter">商检</text> <text class="type row rowCenter verCenter">商检</text>
</view> </view>
<view class="pp row verCenter"> <view class="pp row verCenter">
<text class="t1">订单时间:</text> <text class="t1">订单时间:</text>
<text class="t2">2021-11-02 15:17</text> <text class="t2">{{ customerDetail.base.order_time_cn }}</text>
</view> </view>
<view class="pp row verCenter"> <view class="pp row verCenter">
<text class="t1">订单客户:</text> <text class="t1">订单客户:</text>
<text class="t2">富开香港有限公司</text> <text class="t2">{{ customerDetail.base.company_name }}</text>
</view> </view>
<view class="pp row verCenter mb24"> <view class="pp row verCenter">
<text class="t1">问客时间:</text> <text class="t1">问客时间:</text>
<text class="t2">2022-02-21 16:47</text> <text class="t2">{{ customerDetail.base.ask_time_cn }}</text>
</view>
<view class="status-box row verCenter bothSide">
<view class="bb row verCenter">
<text class="t1">客户状态:</text>
<text class="t2">已确认</text>
</view>
<view class="bb row verCenter">
<text class="t1">商务状态:</text>
<text class="t2">已确认</text>
</view>
</view> </view>
</view> </view>
<view class="question-box"> <view class="question-box" v-for="(item, index) in customerDetail.detail">
<view class="top row bothSide verCenter"> <view class="top row bothSide verCenter">
<view class="title row verCenter"> <view class="title row verCenter">
<text class="arrow row rowCenter verCenter"></text> <text class="arrow row rowCenter verCenter"></text>
<text class="tt">问题类型</text> <text class="tt">问题类型{{ index + 1 }}</text>
</view> </view>
<view class="exception-ico row verCenter"> <view class="exception-ico row verCenter">
<text class="iconfont icon-jinggao1"></text> <text class="iconfont icon-jinggao1"></text>
<text class="tt">数量异常</text> <text class="tt">{{ item.ask_customer_exception_id_cn }}</text>
</view>
</view>
<view class="uni-table">
<view class="uni-th row">
<text class="row verCenter tc">序号</text>
<text class="row verCenter">规格型号</text>
<text class="row verCenter">订单数量</text>
<text class="row verCenter">实到数量</text>
</view>
<view class="uni-tr row verCenter">
<text class="txt w row verCenter tc">01</text>
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<text class="txt w row verCenter">50,000</text>
</view>
<view class="uni-tr row verCenter">
<text class="txt w row verCenter tc">01</text>
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<text class="txt w row verCenter">50,000</text>
</view>
<view class="uni-tr row verCenter">
<text class="txt w row verCenter tc">01</text>
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<text class="txt w row verCenter">50,000</text>
</view>
<view class="uni-tr row verCenter">
<text class="txt w row verCenter tc">01</text>
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<text class="txt w row verCenter">50,000</text>
</view>
</view>
<view class="show-pic">
<view class="pic-title">问题图片</view>
<view class="list row verCenter">
<view class="box"><image src="http://img.ichunt.com/images/ichunt/202203/11/cf3116f61c7d6d85f0a4a5ed90529385.png" mode="aspectFill"></image></view>
<view class="box"><image src="http://img.ichunt.com/images/ichunt/202203/11/cf3116f61c7d6d85f0a4a5ed90529385.png" mode="aspectFill"></image></view>
<view class="box"><image src="http://img.ichunt.com/images/ichunt/202203/11/cf3116f61c7d6d85f0a4a5ed90529385.png" mode="aspectFill"></image></view>
<view class="box"><image src="http://img.ichunt.com/images/ichunt/202203/11/cf3116f61c7d6d85f0a4a5ed90529385.png" mode="aspectFill"></image></view>
</view> </view>
</view> </view>
<view class="text-box"> <view class="status-box row verCenter bothSide">
<view class="tt-box row"> <view class="bb row verCenter">
<text class="label">采购备注:</text> <text class="t1">客户状态:</text>
<text class="t1">INV-9500148113这张里有个是光辉的,理货的人员记得看备注,多大200字符长度</text> <text class="t2">{{item.ask_customer_status_cn}}</text>
</view>
<view class="tt-box row">
<text class="label">商务回复:</text>
<text class="t2">按实物报关</text>
</view>
</view>
</view>
<view class="question-box">
<view class="top row bothSide verCenter">
<view class="title row verCenter">
<text class="arrow row rowCenter verCenter"></text>
<text class="tt">问题类型①</text>
</view> </view>
<view class="exception-ico row verCenter"> <view class="bb row verCenter">
<text class="iconfont icon-jinggao1"></text> <text class="t1">商务状态:</text>
<text class="tt">数量异常</text> <text class="t2">{{item.ask_customer_sw_status_cn}}</text>
</view> </view>
</view> </view>
<view class="uni-table"> <view class="uni-table">
<view class="uni-th row"> <view class="uni-th row">
<text class="row verCenter tc">序号</text> <text class="row verCenter tc">序号</text>
<text class="row verCenter">规格型号</text> <text class="row verCenter">规格型号</text>
<text class="row verCenter">订单数量</text> <text class="row verCenter">订单{{item.ask_customer_exception_id_cn.substr(0, 2)}}</text>
<text class="row verCenter">实到数量</text> <text class="row verCenter">实到{{item.ask_customer_exception_id_cn.substr(0, 2)}}</text>
</view>
<view class="uni-tr row verCenter">
<text class="txt w row verCenter tc">01</text>
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<text class="txt w row verCenter">50,000</text>
</view>
<view class="uni-tr row verCenter">
<text class="txt w row verCenter tc">01</text>
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<text class="txt w row verCenter">50,000</text>
</view> </view>
<view class="uni-tr row verCenter"> <view class="uni-tr row verCenter" v-for="(v, i) in item.goods_info">
<text class="txt w row verCenter tc">01</text> <text class="txt w row verCenter tc">{{ i + 1 }}</text>
<text class="txt w row verCenter">962886-1</text> <text class="txt w row verCenter">{{ v.goods_type }}</text>
<text class="txt w row verCenter">50,000</text> <text class="txt w row verCenter">{{ v.order_result }}</text>
<text class="txt w row verCenter">50,000</text> <text class="txt w row verCenter">{{ v.store_result }}</text>
</view>
<view class="uni-tr row verCenter">
<text class="txt w row verCenter tc">01</text>
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<text class="txt w row verCenter">50,000</text>
</view> </view>
</view> </view>
<view class="show-pic"> <view class="show-pic">
<view class="pic-title">问题图片</view> <view class="pic-title">问题图片</view>
<view class="list row verCenter"> <view class="list row verCenter">
<view class="box"><image src="http://img.ichunt.com/images/ichunt/202203/11/cf3116f61c7d6d85f0a4a5ed90529385.png" mode="aspectFill"></image></view> <view class="box" @click="previewChange(item.upload_img.split(','), i)" v-for="(v, i) in item.upload_img.split(',')" :key="index"><image :src="v" mode="aspectFill"></image></view>
<view class="box"><image src="http://img.ichunt.com/images/ichunt/202203/11/cf3116f61c7d6d85f0a4a5ed90529385.png" mode="aspectFill"></image></view>
<view class="box"><image src="http://img.ichunt.com/images/ichunt/202203/11/cf3116f61c7d6d85f0a4a5ed90529385.png" mode="aspectFill"></image></view>
<view class="box"><image src="http://img.ichunt.com/images/ichunt/202203/11/cf3116f61c7d6d85f0a4a5ed90529385.png" mode="aspectFill"></image></view>
</view> </view>
</view> </view>
<view class="text-box"> <view class="text-box">
<view class="tt-box row"> <view class="tt-box row">
<text class="label">采购备注:</text> <text class="label">采购备注:</text>
<text class="t1">INV-9500148113这张里有个是光辉的,理货的人员记得看备注,多大200字符长度</text> <text class="t1">{{ v.ask_customer_remark || '--' }}</text>
</view> </view>
<view class="tt-box row"> <view class="tt-box row">
<text class="label">商务回复:</text> <text class="label">商务回复:</text>
<text class="t2">按实物报关</text> <text class="t2">{{ v.ask_customer_sw_confirm_remark || '--' }}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="btn row rowCenter verCenter">重新发起理货</view> <navigator class="btn row rowCenter verCenter" :url="'/pages/goods/tallyQuestion?number=' + customerDetail.base.erp_order_sn">重新发起理货</navigator>
</view> </view>
</template> </template>
...@@ -171,7 +87,8 @@ import { API } from '@/util/api.js'; ...@@ -171,7 +87,8 @@ import { API } from '@/util/api.js';
export default { export default {
data() { data() {
return { return {
number: '', noexebshowFalg: true, //控制是否会触发生命周期
number: '', //入仓号
customerDetail: {} customerDetail: {}
}; };
}, },
...@@ -179,12 +96,22 @@ export default { ...@@ -179,12 +96,22 @@ export default {
this.number = options.number; this.number = options.number;
}, },
onShow() { onShow() {
this.getData(); if (this.noexebshowFalg) {
this.getData();
}
}, },
methods: { methods: {
previewChange(img, index) {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
uni.previewImage({
current: index,
urls: img
});
},
getData() { getData() {
this.request(API.getAskCustomerDetail, 'GET', { erp_order_sn: this.number }).then(res => { this.request(API.getAskCustomerDetail, 'GET', { erp_order_sn: this.number }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.customerDetail = res.data;
} else { } else {
uni.showToast({ uni.showToast({
title: res.err_msg, title: res.err_msg,
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<view class="uni-tr row verCenter" v-for="(item, index) in form[d].exceptionlist" :key="index"> <view class="uni-tr row verCenter" v-for="(item, index) in form[d].exceptionlist" :key="index">
<text class="txt w row verCenter">{{ item.model }}</text> <text class="txt w row verCenter">{{ item.model }}</text>
<text class="txt w row verCenter">{{ item.order_data }}</text> <text class="txt w row verCenter">{{ item.order_data }}</text>
<input class="w uni-input" type="text" @input="onInput($event, d, index)" :disabled="!form[d].exception[index].is" :class="{ bg: !form[d].exception[index].is }" /> <input class="w uni-input" type="text" @input="onInput($event, d, index)" :value="form[d].exception[index].val" :disabled="!form[d].exception[index].is" :class="{ bg: !form[d].exception[index].is }" />
<view class="w" style="padding-left: 0;text-align: center;flex: 0 0 20%;"><switch :checked="form.exception[index].is" @change="switchChange($event, d, index)" style="transform: scale(0.5);" color="#197ADB" /></view> <view class="w" style="padding-left: 0;text-align: center;flex: 0 0 20%;"><switch :checked="form.exception[index].is" @change="switchChange($event, d, index)" style="transform: scale(0.5);" color="#197ADB" /></view>
</view> </view>
</view> </view>
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
goodsArrangeData: {}, //理货列表数据 goodsArrangeData: {}, //理货列表数据
noexebshowFalg: true, //控制是否会触发生命周期 noexebshowFalg: true, //控制是否会触发生命周期
limitword: 0, //备注文字限制, limitword: 0, //备注文字限制,
text:[''],//记录数组文字 text: [''], //记录数组文字
typeList: [], //问题类型列表 typeList: [], //问题类型列表
questionTypeIndex: [0], //问题类型索引 questionTypeIndex: [0], //问题类型索引
erp_order_sn: '', //form入仓号 erp_order_sn: '', //form入仓号
...@@ -193,8 +193,10 @@ export default { ...@@ -193,8 +193,10 @@ export default {
this.form[d].exception[index].val = e.detail.value; this.form[d].exception[index].val = e.detail.value;
}, },
switchChange(e, d, index) { switchChange(e, d, index) {
console.log(e.target.value);
this.$set(this.form[d].exception[index], 'is', e.target.value); this.$set(this.form[d].exception[index], 'is', e.target.value);
if (!e.target.value) {
this.$set(this.form[d].exception[index], 'val', '');
}
}, },
toggle() { toggle() {
this.flag = !this.flag; this.flag = !this.flag;
...@@ -294,6 +296,27 @@ export default { ...@@ -294,6 +296,27 @@ export default {
submit() { submit() {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期 this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
//判断如有异常,是否填写实际
var tempArr = [];
for (let i = 0; i < this.form.length; i++) {
if (this.form[i].exception.findIndex(target => target.is === true) == -1) {
uni.showModal({
title: '提示',
content: '异常的产品请至少填写一个',
showCancel: false,
success: res => {
if (res.confirm) {
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
return false;
} else {
console.log('验证不通过');
}
}
//判断来货图片 //判断来货图片
if (this.form.length > 0) { if (this.form.length > 0) {
for (let i = 0; i < this.form.length; i++) { for (let i = 0; i < this.form.length; i++) {
...@@ -318,7 +341,6 @@ export default { ...@@ -318,7 +341,6 @@ export default {
this.request(API.addAskCustomer, 'POST', params, true).then(res => { this.request(API.addAskCustomer, 'POST', params, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
} else { } else {
uni.showToast({ uni.showToast({
title: res.err_msg, title: res.err_msg,
......
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