Commit f186ab76 by liangjianmin

理货

parent 8c5824b7
...@@ -66,10 +66,11 @@ ...@@ -66,10 +66,11 @@
} }
} }
.tally-base-information { .tally-base-information {
padding: 24rpx 24rpx 0 24rpx; padding: 24rpx 0 0 0;
background: #ffffff; background: #ffffff;
border-radius: 4rpx; border-radius: 4rpx;
.top { .top {
padding: 0 24rpx;
.title { .title {
.arrow { .arrow {
width: 12rpx; width: 12rpx;
...@@ -86,10 +87,14 @@ ...@@ -86,10 +87,14 @@
} }
} }
.list { .list {
padding: 0 24rpx;
.box { .box {
position: relative; position: relative;
padding: 24rpx 0; padding: 24rpx 0;
border-bottom: 1px solid #e6edf0; border-bottom: 1px solid #e6edf0;
&:last-child {
border-bottom: none;
}
.pp { .pp {
.w { .w {
flex: 0 0 50%; flex: 0 0 50%;
...@@ -127,6 +132,9 @@ ...@@ -127,6 +132,9 @@
border-radius: 4rpx; border-radius: 4rpx;
font-size: 22rpx; font-size: 22rpx;
color: #ffffff; color: #ffffff;
&.curr {
background: #9ca8ad;
}
} }
.pic { .pic {
position: absolute; position: absolute;
...@@ -139,7 +147,8 @@ ...@@ -139,7 +147,8 @@
} }
.btn-submit { .btn-submit {
height: 77rpx; height: 77rpx;
border-bottom: 1px solid #e6edf0; border-bottom: 16rpx solid #e6edf0;
border-top: 1px solid #e6edf0;
.t1 { .t1 {
font-size: 22rpx; font-size: 22rpx;
color: #404547; color: #404547;
...@@ -149,6 +158,35 @@ ...@@ -149,6 +158,35 @@
color: #197adb; color: #197adb;
} }
} }
.device-box {
height: 77rpx;
background: #ffffff;
border-radius: 4rpx;
padding: 0 24rpx;
border-bottom: 16rpx solid #e6edf0;
.t1 {
font-size: 28rpx;
color: #1e2021;
margin-left: 20rpx;
}
.t2 {
font-size: 22rpx;
color: #6e767a;
margin-right: 14rpx;
&.active {
color: #1e2021;
font-weight: bold;
}
}
.icon-juxing7 {
font-size: 36rpx;
color: #9ca8ad;
}
.icon-sanjiaoxing2 {
font-size: 20rpx;
color: #9ca8ad;
}
}
.receiving-information { .receiving-information {
padding: 0 24rpx 0 24rpx; padding: 0 24rpx 0 24rpx;
background: #ffffff; background: #ffffff;
...@@ -241,7 +279,7 @@ ...@@ -241,7 +279,7 @@
border-bottom: 1px solid #e6edf0; border-bottom: 1px solid #e6edf0;
position: relative; position: relative;
padding-top: 23rpx; padding-top: 23rpx;
height: 137rpx; height: 137rpx;
textarea { textarea {
height: 100%; height: 100%;
font-size: 24rpx; font-size: 24rpx;
...@@ -250,12 +288,12 @@ ...@@ -250,12 +288,12 @@
.text { .text {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 24rpx ; bottom: 24rpx;
font-size: 24rpx; font-size: 24rpx;
color: #9ca8ad; color: #9ca8ad;
} }
} }
} }
} }
.btn { .btn {
position: relative; position: relative;
......
...@@ -70,7 +70,17 @@ ...@@ -70,7 +70,17 @@
background: #ffffff; background: #ffffff;
border-radius: 4rpx; border-radius: 4rpx;
.top { .top {
position: relative;
height: 87rpx; height: 87rpx;
border-bottom: 1px solid #e6edf0;
margin-bottom: 23rpx;
.iconfont {
position: absolute;
right: 14rpx;
top: 40rpx;
font-size: 15rpx;
color: #9ca8ad;
}
.t1 { .t1 {
width: 156rpx; width: 156rpx;
font-size: 24rpx; font-size: 24rpx;
...@@ -105,27 +115,27 @@ ...@@ -105,27 +115,27 @@
.uni-tr { .uni-tr {
height: 62rpx; height: 62rpx;
border-bottom: 1px solid #cad9e0; border-bottom: 1px solid #cad9e0;
.icon-a-Fill3{ .icon-a-Fill3 {
font-size: 24rpx; font-size: 24rpx;
color: #6E767A; color: #6e767a;
} }
.txt{ .txt {
font-size: 22rpx; font-size: 22rpx;
color: #404547; color: #404547;
} }
.uni-input{ .uni-input {
font-size: 22rpx; font-size: 22rpx;
color: #404547; color: #404547;
} }
.default{ .default {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
border: 1px solid #D2DFE5; border: 1px solid #d2dfe5;
border-radius: 50%; border-radius: 50%;
} }
.iconfont{ .iconfont {
font-size: 24rpx; font-size: 24rpx;
color: #197ADB; color: #197adb;
} }
.w { .w {
height: 100%; height: 100%;
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<view class="box row verCenter"> <view class="box row verCenter">
<text class="label">登记数量</text> <text class="label">登记数量</text>
<view class="input-wrap row bothSide"> <view class="input-wrap row bothSide">
<input type="number" v-model="form.total_num" placeholder="请输入" class="uni-input" placeholder-style="color:#404547;font-weight:bold;"/> <input type="number" v-model="form.total_num" placeholder="请输入" class="uni-input" placeholder-style="color:#404547;font-weight:bold;" />
<view class="tab row verCenter"> <view class="tab row verCenter">
<view class="tab-panel row rowCenter verCenter" @click="changeTab(index, 2)" :class="{ curr: unitIndex == index }" v-for="(item, index) in unitArr" :key="index">{{ item }}</view> <view class="tab-panel row rowCenter verCenter" @click="changeTab(index, 2)" :class="{ curr: unitIndex == index }" v-for="(item, index) in unitArr" :key="index">{{ item }}</view>
</view> </view>
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
for (let i = 0; i < tempFilePaths.length; i++) { for (let i = 0; i < tempFilePaths.length; i++) {
console.log(tempFilePaths[i]); console.log(tempFilePaths[i]);
uni.uploadFile({ uni.uploadFile({
url: 'http://api.liexin.com/oss/upload', url: API.upload,
filePath: tempFilePaths[i], filePath: tempFilePaths[i],
name: 'upload', name: 'upload',
formData: { formData: {
......
...@@ -40,40 +40,25 @@ ...@@ -40,40 +40,25 @@
<view class="question-box"> <view class="question-box">
<view class="top row verCenter"> <view class="top row verCenter">
<text class="t1">问题类型</text> <text class="t1">问题类型</text>
<text class="iconfont icon-sanjiaoxing1"></text>
<view class="el-select-box"> <view class="el-select-box">
<picker @change="bindPickerChange" :value="index" :range="array"> <picker @change="bindPickerChange" :value="index" :range="typeList" range-key="content">
<view class="uni-input">{{ array[index] || '请选择' }}</view> <view class="uni-input">{{ typeList[index].content || '请选择' }}</view>
</picker> </picker>
</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">规格型号</text> <text class="row verCenter">规格型号</text>
<text class="row verCenter">订单数量</text> <text class="row verCenter">订单{{ text }}</text>
<text class="row verCenter">实到数量</text> <text class="row verCenter">实到{{ text }}</text>
<text class="row verCenter">是否</text> <text class="row verCenter">是否异常</text>
</view> </view>
<view class="uni-tr row verCenter"> <view class="uni-tr row verCenter" v-for="(item, index) in exceptionlist" :key="index">
<text class="txt w row verCenter">962886-1</text> <text class="txt w row verCenter">{{ item.model }}</text>
<text class="txt w row verCenter">50,000</text> <text class="txt w row verCenter">{{ item.order_data }}</text>
<input type="text" placeholder="" v-model="d" class="w uni-input" /> <input class="w uni-input" type="text" />
<view class="w row verCenter"> <view class="w" style="padding-left: 0;"><switch checked style="transform: scale(0.5);" color="#197ADB" /></view>
<text class="default"></text>
</view>
</view>
<view class="uni-tr row">
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<input type="text" placeholder="" v-model="d" class="w uni-input" />
<text class="iconfont icon-bianzu w row verCenter"></text>
</view>
<view class="uni-tr row">
<text class="txt w row verCenter">962886-1</text>
<text class="txt w row verCenter">50,000</text>
<input type="text" placeholder="" v-model="d" class="w uni-input" />
<view class="w row verCenter">
<text class="default"></text>
</view>
</view> </view>
</view> </view>
<view class="upload-box"> <view class="upload-box">
...@@ -92,7 +77,7 @@ ...@@ -92,7 +77,7 @@
</view> </view>
</view> </view>
<view class="textarea-box"> <view class="textarea-box">
<textarea @input="inputChange()" maxlength="200" placeholder="请输入异常备注" placeholder-style="color:#6E767A;" v-model="form.check_in_remark"></textarea> <textarea @input="inputChange()" maxlength="200" placeholder="请输入异常备注" placeholder-style="color:#6E767A;" v-model="form.ask_customer_remark"></textarea>
<text class="text">{{ limitword }}/200</text> <text class="text">{{ limitword }}/200</text>
</view> </view>
</view> </view>
...@@ -108,24 +93,67 @@ import w_md5 from '../../js_sdk/zww-md5/w_md5.js'; ...@@ -108,24 +93,67 @@ import w_md5 from '../../js_sdk/zww-md5/w_md5.js';
export default { export default {
data() { data() {
return { return {
d: '12', flag: false, //toggle
flag: false, limitword: 0, //备注文字限制
limitword: 0, index: 0,
index: -1,
attachAddress: [], attachAddress: [],
array: ['日本', '美国'], goodsArrangeData: {}, //理货列表数据
noexebshowFalg: true, //控制是否会触发生命周期
limitword: 0, //备注文字限制,
ask_customer_exception_id: '',
typeList: [],
exceptionlist: [],
text: '',
form: { form: {
check_in_remark: '' erp_order_sn: 'B50413', //入仓号
sort_goods_img: '', //问题图片
ask_customer_remark: '', //仓库问客备注
entrys: {}
} }
}; };
}, },
onLoad(options) {
this.form.erp_order_sn = options.number || 'B50413'; //获取参数入仓号
},
onShow() { onShow() {
this.getData(); if (this.noexebshowFalg) {
this.getData();
}
}, },
methods: { methods: {
getData() { getData() {
this.request(API.getCheckInList, 'POST', { number: this.id }, this.loading).then(res => { this.request(API.getGoodsArrangeData, 'POST', { page: this.page, number: '' }, true).then(res => {
if (res.err_code === 0) {
this.goodsArrangeData = res.data[0];
this.form.entrys = res.data[0];
this.getAllException();
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
},
getAllException() {
this.request(API.getAllException, 'POST', {}, true).then(res => {
if (res.err_code === 0) {
this.typeList = res.data;
this.ask_customer_exception_id = res.data[0].ask_customer_exception_id; //默认
this.text = res.data[0].content.substr(0, 2); //默认
this.getExceptionData();
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
},
getExceptionData() {
this.request(API.getExceptionData, 'POST', { ask_customer_exception_id: this.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;
} else { } else {
uni.showToast({ uni.showToast({
title: res.err_msg, title: res.err_msg,
...@@ -134,20 +162,33 @@ export default { ...@@ -134,20 +162,33 @@ export default {
} }
}); });
}, },
toggle() {
this.flag = !this.flag;
},
previewChange(img, index) { previewChange(img, index) {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
uni.previewImage({ uni.previewImage({
current: index, current: index,
urls: img urls: img
}); });
}, },
inputChange() {
if (this.form.ask_customer_remark.length <= 200) {
this.limitword = this.form.ask_customer_remark.length;
}
},
deletePic(index) { deletePic(index) {
this.attachAddress.splice(index, 1); this.attachAddress.splice(index, 1);
}, },
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.text = this.typeList[e.target.value].content.substr(0, 2); //文字
this.getExceptionData();
}, },
chooseImageChange() { chooseImageChange() {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
var self = this; var self = this;
var time = parseInt(new Date().getTime() / 1000); var time = parseInt(new Date().getTime() / 1000);
uni.chooseImage({ uni.chooseImage({
...@@ -169,7 +210,7 @@ export default { ...@@ -169,7 +210,7 @@ export default {
for (let i = 0; i < tempFilePaths.length; i++) { for (let i = 0; i < tempFilePaths.length; i++) {
console.log(tempFilePaths[i]); console.log(tempFilePaths[i]);
uni.uploadFile({ uni.uploadFile({
url: 'http://api.liexin.com/oss/upload', url: API.upload,
filePath: tempFilePaths[i], filePath: tempFilePaths[i],
name: 'upload', name: 'upload',
formData: { formData: {
...@@ -199,12 +240,18 @@ export default { ...@@ -199,12 +240,18 @@ export default {
} }
}); });
}, },
inputChange() { submit() {
if (this.form.check_in_remark.length <= 200) { this.form.sort_goods_img = this.attachAddress;
this.limitword = this.form.check_in_remark.length; this.request(API.addAskCustomer, 'POST', this.form, true).then(res => {
} if (res.err_code === 0) {
}, } else {
submit() {} uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
}
} }
}; };
</script> </script>
......
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
const time = parseInt(new Date().getTime() / 1000); const time = parseInt(new Date().getTime() / 1000);
console.log(tempFilePaths); console.log(tempFilePaths);
uni.uploadFile({ uni.uploadFile({
url: 'http://api.liexin.com/oss/upload', url: API.upload,
filePath: tempFilePaths[0], filePath: tempFilePaths[0],
name: 'upload', name: 'upload',
formData: { formData: {
...@@ -126,6 +126,8 @@ export default { ...@@ -126,6 +126,8 @@ export default {
k2: w_md5.hex_md5_32(w_md5.hex_md5_32(String(time)) + 'fh6y5t4rr351d2c3bryi') k2: w_md5.hex_md5_32(w_md5.hex_md5_32(String(time)) + 'fh6y5t4rr351d2c3bryi')
}, },
success: uploadFileRes => { success: uploadFileRes => {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
uni.hideLoading(); uni.hideLoading();
var data = JSON.parse(uploadFileRes.data); var data = JSON.parse(uploadFileRes.data);
if (data.code === 200) { if (data.code === 200) {
......
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
for (let i = 0; i < tempFilePaths.length; i++) { for (let i = 0; i < tempFilePaths.length; i++) {
console.log(tempFilePaths[i]); console.log(tempFilePaths[i]);
uni.uploadFile({ uni.uploadFile({
url: 'https://api.ichunt.com/oss/upload', url: API.upload,
filePath: tempFilePaths[i], filePath: tempFilePaths[i],
name: 'upload', name: 'upload',
formData: { formData: {
......
...@@ -52,6 +52,16 @@ export default { ...@@ -52,6 +52,16 @@ export default {
}; };
}, },
onLoad() { onLoad() {
const deviceData = uni.getStorageSync('device') || ''; //获取已连接蓝牙设备信息
if (deviceData) {
this.status=true;
this.deviceId = deviceData.deviceId;
this.deviceName = deviceData.name;
} else {
this.deviceId = '';
this.deviceName = '';
}
//在页面加载时候初始化蓝牙适配器 //在页面加载时候初始化蓝牙适配器
uni.openBluetoothAdapter({ uni.openBluetoothAdapter({
success: e => { success: e => {
......
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
this.device_name = ''; this.device_name = '';
} }
}, },
created() { onLoad() {
this.getTraySelectOption(); this.getTraySelectOption();
}, },
methods: { methods: {
......
...@@ -64,7 +64,23 @@ const API = { ...@@ -64,7 +64,23 @@ const API = {
/** /**
* 获取理货异常列表 * 获取理货异常列表
* */ * */
getUnusualCheckInList: API_BASE + '/supplywechatwms/getUnusualCheckInList' getUnusualCheckInList: API_BASE + '/supplywechatwms/getUnusualCheckInList',
/**
* 新增理货异常问客
*/
addAskCustomer: API_BASE + '/supplywechatwms/addAskCustomer',
/**
* 新增理货
*/
addSortGodds: API_BASE + '/supplywechatwms/addSortGodds',
/**
* 获取理货异常问题列表
*/
getAllException: API_BASE + '/supplywechatwms/getAllException',
/**
* 获取理货异常问题对应的数据数组
*/
getExceptionData: API_BASE + '/supplywechatwms/getExceptionData'
} }
......
...@@ -31,9 +31,10 @@ const request = (url = '', type = 'GET', param = {}, Loading) => { ...@@ -31,9 +31,10 @@ const request = (url = '', type = 'GET', param = {}, Loading) => {
let [error, res] = response; let [error, res] = response;
resolve(res.data); resolve(res.data);
}).catch(error => { }).catch(error => {
if (Loading) { uni.showToast({
uni.hideLoading(); title: '网络出现问题',
} icon: 'error'
});
let [err, res] = error; let [err, res] = error;
reject(err); reject(err);
}) })
......
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