Commit f186ab76 by liangjianmin

理货

parent 8c5824b7
......@@ -66,10 +66,11 @@
}
}
.tally-base-information {
padding: 24rpx 24rpx 0 24rpx;
padding: 24rpx 0 0 0;
background: #ffffff;
border-radius: 4rpx;
.top {
padding: 0 24rpx;
.title {
.arrow {
width: 12rpx;
......@@ -86,10 +87,14 @@
}
}
.list {
padding: 0 24rpx;
.box {
position: relative;
padding: 24rpx 0;
border-bottom: 1px solid #e6edf0;
&:last-child {
border-bottom: none;
}
.pp {
.w {
flex: 0 0 50%;
......@@ -127,6 +132,9 @@
border-radius: 4rpx;
font-size: 22rpx;
color: #ffffff;
&.curr {
background: #9ca8ad;
}
}
.pic {
position: absolute;
......@@ -139,7 +147,8 @@
}
.btn-submit {
height: 77rpx;
border-bottom: 1px solid #e6edf0;
border-bottom: 16rpx solid #e6edf0;
border-top: 1px solid #e6edf0;
.t1 {
font-size: 22rpx;
color: #404547;
......@@ -149,6 +158,35 @@
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 {
padding: 0 24rpx 0 24rpx;
background: #ffffff;
......@@ -241,7 +279,7 @@
border-bottom: 1px solid #e6edf0;
position: relative;
padding-top: 23rpx;
height: 137rpx;
height: 137rpx;
textarea {
height: 100%;
font-size: 24rpx;
......@@ -250,12 +288,12 @@
.text {
position: absolute;
right: 0;
bottom: 24rpx ;
bottom: 24rpx;
font-size: 24rpx;
color: #9ca8ad;
}
}
}
}
}
.btn {
position: relative;
......
......@@ -70,7 +70,17 @@
background: #ffffff;
border-radius: 4rpx;
.top {
position: relative;
height: 87rpx;
border-bottom: 1px solid #e6edf0;
margin-bottom: 23rpx;
.iconfont {
position: absolute;
right: 14rpx;
top: 40rpx;
font-size: 15rpx;
color: #9ca8ad;
}
.t1 {
width: 156rpx;
font-size: 24rpx;
......@@ -105,27 +115,27 @@
.uni-tr {
height: 62rpx;
border-bottom: 1px solid #cad9e0;
.icon-a-Fill3{
.icon-a-Fill3 {
font-size: 24rpx;
color: #6E767A;
color: #6e767a;
}
.txt{
.txt {
font-size: 22rpx;
color: #404547;
}
.uni-input{
.uni-input {
font-size: 22rpx;
color: #404547;
}
.default{
.default {
width: 24rpx;
height: 24rpx;
border: 1px solid #D2DFE5;
border-radius: 50%;
border: 1px solid #d2dfe5;
border-radius: 50%;
}
.iconfont{
.iconfont {
font-size: 24rpx;
color: #197ADB;
color: #197adb;
}
.w {
height: 100%;
......
......@@ -52,7 +52,7 @@
<view class="box row verCenter">
<text class="label">登记数量</text>
<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-panel row rowCenter verCenter" @click="changeTab(index, 2)" :class="{ curr: unitIndex == index }" v-for="(item, index) in unitArr" :key="index">{{ item }}</view>
</view>
......@@ -199,7 +199,7 @@ export default {
for (let i = 0; i < tempFilePaths.length; i++) {
console.log(tempFilePaths[i]);
uni.uploadFile({
url: 'http://api.liexin.com/oss/upload',
url: API.upload,
filePath: tempFilePaths[i],
name: 'upload',
formData: {
......
......@@ -40,40 +40,25 @@
<view class="question-box">
<view class="top row verCenter">
<text class="t1">问题类型</text>
<text class="iconfont icon-sanjiaoxing1"></text>
<view class="el-select-box">
<picker @change="bindPickerChange" :value="index" :range="array">
<view class="uni-input">{{ array[index] || '请选择' }}</view>
<picker @change="bindPickerChange" :value="index" :range="typeList" range-key="content">
<view class="uni-input">{{ typeList[index].content || '请选择' }}</view>
</picker>
</view>
</view>
<view class="uni-table">
<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 class="row verCenter">订单{{ text }}</text>
<text class="row verCenter">实到{{ text }}</text>
<text class="row verCenter">是否异常</text>
</view>
<view class="uni-tr row verCenter">
<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 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 class="uni-tr row verCenter" v-for="(item, index) in exceptionlist" :key="index">
<text class="txt w row verCenter">{{ item.model }}</text>
<text class="txt w row verCenter">{{ item.order_data }}</text>
<input class="w uni-input" type="text" />
<view class="w" style="padding-left: 0;"><switch checked style="transform: scale(0.5);" color="#197ADB" /></view>
</view>
</view>
<view class="upload-box">
......@@ -92,7 +77,7 @@
</view>
</view>
<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>
</view>
</view>
......@@ -108,24 +93,67 @@ import w_md5 from '../../js_sdk/zww-md5/w_md5.js';
export default {
data() {
return {
d: '12',
flag: false,
limitword: 0,
index: -1,
flag: false, //toggle
limitword: 0, //备注文字限制
index: 0,
attachAddress: [],
array: ['日本', '美国'],
goodsArrangeData: {}, //理货列表数据
noexebshowFalg: true, //控制是否会触发生命周期
limitword: 0, //备注文字限制,
ask_customer_exception_id: '',
typeList: [],
exceptionlist: [],
text: '',
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() {
this.getData();
if (this.noexebshowFalg) {
this.getData();
}
},
methods: {
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) {
this.exceptionlist = res.data;
} else {
uni.showToast({
title: res.err_msg,
......@@ -134,20 +162,33 @@ export default {
}
});
},
toggle() {
this.flag = !this.flag;
},
previewChange(img, index) {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
uni.previewImage({
current: index,
urls: img
});
},
inputChange() {
if (this.form.ask_customer_remark.length <= 200) {
this.limitword = this.form.ask_customer_remark.length;
}
},
deletePic(index) {
this.attachAddress.splice(index, 1);
},
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', 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() {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
var self = this;
var time = parseInt(new Date().getTime() / 1000);
uni.chooseImage({
......@@ -169,7 +210,7 @@ export default {
for (let i = 0; i < tempFilePaths.length; i++) {
console.log(tempFilePaths[i]);
uni.uploadFile({
url: 'http://api.liexin.com/oss/upload',
url: API.upload,
filePath: tempFilePaths[i],
name: 'upload',
formData: {
......@@ -199,12 +240,18 @@ export default {
}
});
},
inputChange() {
if (this.form.check_in_remark.length <= 200) {
this.limitword = this.form.check_in_remark.length;
}
},
submit() {}
submit() {
this.form.sort_goods_img = this.attachAddress;
this.request(API.addAskCustomer, 'POST', this.form, true).then(res => {
if (res.err_code === 0) {
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
}
}
};
</script>
......
......@@ -117,7 +117,7 @@ export default {
const time = parseInt(new Date().getTime() / 1000);
console.log(tempFilePaths);
uni.uploadFile({
url: 'http://api.liexin.com/oss/upload',
url: API.upload,
filePath: tempFilePaths[0],
name: 'upload',
formData: {
......@@ -126,6 +126,8 @@ export default {
k2: w_md5.hex_md5_32(w_md5.hex_md5_32(String(time)) + 'fh6y5t4rr351d2c3bryi')
},
success: uploadFileRes => {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
uni.hideLoading();
var data = JSON.parse(uploadFileRes.data);
if (data.code === 200) {
......
......@@ -77,7 +77,7 @@ export default {
for (let i = 0; i < tempFilePaths.length; i++) {
console.log(tempFilePaths[i]);
uni.uploadFile({
url: 'https://api.ichunt.com/oss/upload',
url: API.upload,
filePath: tempFilePaths[i],
name: 'upload',
formData: {
......
......@@ -52,6 +52,16 @@ export default {
};
},
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({
success: e => {
......
......@@ -90,7 +90,7 @@ export default {
this.device_name = '';
}
},
created() {
onLoad() {
this.getTraySelectOption();
},
methods: {
......
......@@ -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) => {
let [error, res] = response;
resolve(res.data);
}).catch(error => {
if (Loading) {
uni.hideLoading();
}
uni.showToast({
title: '网络出现问题',
icon: 'error'
});
let [err, res] = error;
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