Commit c63230d5 by liangjianmin

css

parent f55be31d
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
border-top: 1px solid #cad9e0; border-top: 1px solid #cad9e0;
border-bottom: 1px solid #cad9e0; border-bottom: 1px solid #cad9e0;
text { text {
flex: 0 0 25%; flex: 0 0 26%;
font-size: 22rpx; font-size: 22rpx;
color: #6e767a; color: #6e767a;
padding-left: 23rpx; padding-left: 23rpx;
...@@ -137,15 +137,20 @@ ...@@ -137,15 +137,20 @@
font-size: 24rpx; font-size: 24rpx;
color: #197adb; color: #197adb;
} }
.bg {
background: #f1f4f6;
}
.w { .w {
height: 100%; height: 100%;
flex: 0 0 25%; flex: 0 0 26%;
padding-left: 23rpx; padding-left: 23rpx;
border-right: 1px solid #cad9e0; border-right: 1px solid #cad9e0;
&:last-child { &:last-child {
border-right: none; border-right: none;
} }
} }
} }
} }
.upload-box { .upload-box {
......
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
<text class="row verCenter">规格型号</text> <text class="row verCenter">规格型号</text>
<text class="row verCenter">订单{{ text }}</text> <text class="row verCenter">订单{{ text }}</text>
<text class="row verCenter">实到{{ text }}</text> <text class="row verCenter">实到{{ text }}</text>
<text class="row verCenter">是否异常</text> <text class="row verCenter rowCenter" style="padding-left: 0;flex: 0 0 20%;">是否异常</text>
</view> </view>
<view class="uni-tr row verCenter" v-for="(item, index) in exceptionlist" :key="index"> <view class="uni-tr row verCenter" v-for="(item, index) in form.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, index)" /> <input class="w uni-input" type="text" @input="onInput($event, index)" :disabled="!form.exception[index].is" :class="{bg:!form.exception[index].is}"/>
<view class="w" style="padding-left: 0;"><switch @change="switchChange($event, index)" style="transform: scale(0.5);" color="#197ADB" /></view> <view class="w" style="padding-left: 0;text-align: center;flex: 0 0 20%;"><switch @change="switchChange($event, index)" style="transform: scale(0.5);" color="#197ADB" /></view>
</view> </view>
</view> </view>
<view class="upload-box"> <view class="upload-box">
...@@ -100,16 +100,17 @@ export default { ...@@ -100,16 +100,17 @@ export default {
goodsArrangeData: {}, //理货列表数据 goodsArrangeData: {}, //理货列表数据
noexebshowFalg: true, //控制是否会触发生命周期 noexebshowFalg: true, //控制是否会触发生命周期
limitword: 0, //备注文字限制, limitword: 0, //备注文字限制,
ask_customer_exception_id: '',
typeList: [], typeList: [],
exceptionlist: [],
text: '', text: '',
form: { form: {
exceptionlist: [],
ask_customer_exception_id: '', //异常id
erp_order_sn: 'B50413', //入仓号 erp_order_sn: 'B50413', //入仓号
sort_goods_img: '', //问题图片 sort_goods_img: '', //问题图片
ask_customer_remark: '', //仓库问客备注 ask_customer_remark: '', //仓库问客备注
entrys: {}, entrys: {},
exception: [] exception: [],
originalData: [] //原始数据
} }
}; };
}, },
...@@ -140,7 +141,7 @@ export default { ...@@ -140,7 +141,7 @@ export default {
this.request(API.getAllException, 'POST', {}, true).then(res => { this.request(API.getAllException, 'POST', {}, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.typeList = res.data; this.typeList = res.data;
this.ask_customer_exception_id = res.data[0].ask_customer_exception_id; //默认 this.form.ask_customer_exception_id = res.data[0].ask_customer_exception_id; //默认
this.text = res.data[0].content.substr(0, 2); //默认 this.text = res.data[0].content.substr(0, 2); //默认
this.getExceptionData(); this.getExceptionData();
} else { } else {
...@@ -152,9 +153,10 @@ export default { ...@@ -152,9 +153,10 @@ export default {
}); });
}, },
getExceptionData() { getExceptionData() {
this.request(API.getExceptionData, 'POST', { ask_customer_exception_id: this.ask_customer_exception_id, entrys: this.form.entrys }, true).then(res => { this.request(API.getExceptionData, 'POST', { ask_customer_exception_id: this.form.ask_customer_exception_id, entrys: this.form.entrys }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.exceptionlist = res.data; this.form.exception = []; //清空异常数据
this.form.exceptionlist = res.data;
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++) {
this.form.exception.push({ this.form.exception.push({
...@@ -199,7 +201,7 @@ export default { ...@@ -199,7 +201,7 @@ export default {
bindPickerChange: function(e) { bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value); console.log('picker发送选择改变,携带值为', e.target.value);
this.index = e.target.value; this.index = e.target.value;
this.ask_customer_exception_id = this.typeList[e.target.value].ask_customer_exception_id; this.form.ask_customer_exception_id = this.typeList[e.target.value].ask_customer_exception_id;
this.text = this.typeList[e.target.value].content.substr(0, 2); //文字 this.text = this.typeList[e.target.value].content.substr(0, 2); //文字
this.getExceptionData(); this.getExceptionData();
}, },
...@@ -257,7 +259,36 @@ export default { ...@@ -257,7 +259,36 @@ export default {
}); });
}, },
submit() { submit() {
this.form.sort_goods_img = this.attachAddress; this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
this.form.sort_goods_img = this.attachAddress; //复制图片
if (this.form.exception.length > 0) {
for (let i = 0; i < this.form.exception.length; i++) {
if (this.form.exception[i].is && this.form.exception[i].val == '') {
uni.showToast({
title: '请填写实到' + this.text,
icon: 'error'
});
return false;
}
}
}
if (this.attachAddress.length <= 0) {
uni.showModal({
title: '提示',
content: '请上传来货图片',
showCancel: false,
success: res => {
if (res.confirm) {
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
return false;
}
this.request(API.addAskCustomer, 'POST', this.form, true).then(res => { this.request(API.addAskCustomer, 'POST', this.form, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
} else { } else {
......
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