Commit f9ebb43d by LJM

出入库

parent c80b85b9
...@@ -11,6 +11,22 @@ ...@@ -11,6 +11,22 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-wuliu:before {
content: "\e75f";
}
.icon-ruku:before {
content: "\e60f";
}
.icon-cangpeitubiao_chukuhuanhuochuku:before {
content: "\e607";
}
.icon-gongyingshang:before {
content: "\e785";
}
.icon-juxing9:before { .icon-juxing9:before {
content: "\e784"; content: "\e784";
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<view class="borline"></view> <view class="borline"></view>
</view> </view>
<template v-if="is_login"> <template v-if="is_login">
<view class="scan row rowCenter verCenter" @click="scanChange()"> <view class="scan row rowCenter verCenter" @click="scanChange(1)">
<text class="iconfont icon-juxing2"></text> <text class="iconfont icon-juxing2"></text>
<text class="tt">扫描</text> <text class="tt">扫描</text>
</view> </view>
...@@ -116,17 +116,17 @@ export default { ...@@ -116,17 +116,17 @@ export default {
}, },
{ {
name: '深圳扫码收货', name: '深圳扫码收货',
iconfont: 'icon-jinggao3', iconfont: 'icon-ruku',
tips: '' tips: ''
}, },
{ {
name: '深圳扫码出库', name: '深圳扫码出库',
iconfont: 'icon-jinggao3', iconfont: 'icon-cangpeitubiao_chukuhuanhuochuku',
tips: '' tips: ''
}, },
{ {
name: '进口物流清单', name: '进口物流清单',
iconfont: 'icon-jinggao3', iconfont: 'icon-wuliu',
tips: '' tips: ''
} }
] ]
...@@ -136,15 +136,27 @@ export default { ...@@ -136,15 +136,27 @@ export default {
this.getData(); this.getData();
}, },
methods: { methods: {
scanChange() { scanChange(type) {
uni.scanCode({ uni.scanCode({
success: res => { success: res => {
console.log(res); console.log(res);
if (res.errMsg == 'scanCode:ok') { if (res.errMsg == 'scanCode:ok') {
if (type == 1) {
uni.navigateTo({
url: '/pages/scan/confirm?number=' + res.result
});
}
if (type == 2) {
uni.navigateTo({
url: '/pages/pda/warehousing?number=' + res.result
});
}
if (type == 3) {
uni.navigateTo({ uni.navigateTo({
url: '../scan/confirm?number=' + res.result url: '/pages/pda/exWarehouse?number=' + res.result
}); });
} }
}
}, },
fail: res => { fail: res => {
console.log(res); console.log(res);
...@@ -206,13 +218,9 @@ export default { ...@@ -206,13 +218,9 @@ export default {
url: '/pages/goods/rePackageList' url: '/pages/goods/rePackageList'
}); });
} else if (item.name == '深圳扫码收货') { } else if (item.name == '深圳扫码收货') {
uni.navigateTo({ this.scanChange(2);
url: '/pages/pda/warehousing'
});
} else if (item.name == '深圳扫码出库') { } else if (item.name == '深圳扫码出库') {
uni.navigateTo({ this.scanChange(3);
url: '/pages/pda/exWarehouse'
});
} else if (item.name == '进口物流清单') { } else if (item.name == '进口物流清单') {
uni.navigateTo({ uni.navigateTo({
url: '/pages/pda/logisticsList' url: '/pages/pda/logisticsList'
......
...@@ -7,98 +7,23 @@ ...@@ -7,98 +7,23 @@
<uni-th align="center">车序</uni-th> <uni-th align="center">车序</uni-th>
<uni-th align="center">汇总件数</uni-th> <uni-th align="center">汇总件数</uni-th>
</uni-tr> </uni-tr>
<uni-tr> <uni-tr v-for="(item, index) in list" :key="index">
<uni-td align="center">B00001</uni-td> <uni-td align="center">{{ item.erp_order_sn }}</uni-td>
<uni-td align="center">普货1车</uni-td> <uni-td align="center">{{ item.car_sort }}</uni-td>
<uni-td align="center">1</uni-td> <uni-td align="center">{{ item.num }}</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00002</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00002</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00003</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">888</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00004</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00005</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00006</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00007</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">888</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00001</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00002</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00002</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00003</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">888</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00004</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00005</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00006</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00007</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">888</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
</view> </view>
<navigator class="scan row rowCenter verCenter" url="/pages/mine/login" hover-class="none"> <view class="scan row rowCenter verCenter" @click="scanChange()" hover-class="none">
<text class="iconfont icon-juxing2"></text> <text class="iconfont icon-juxing2"></text>
<text class="tt">继续扫描</text> <text class="tt">继续扫描</text>
</navigator> </view>
<view class="fix-info row bothSide verCenter"> <view class="fix-info row bothSide verCenter">
<view class="text row verCenter"> <view class="text row verCenter">
<text class="t1">入仓号数:</text> <text class="t1">入仓号数:</text>
<text class="t2">{{ selectedIndexs.length }}</text> <text class="t2">{{ selectedIndexs.length }}</text>
</view> </view>
<view class="btn row rowCenter verCenter">出库单号确认</view> <view class="btn row rowCenter verCenter" @click="szScanOutChange">出库单号确认</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -109,21 +34,84 @@ import { API } from '@/util/api.js'; ...@@ -109,21 +34,84 @@ import { API } from '@/util/api.js';
export default { export default {
data() { data() {
return { return {
selectedIndexs: [] selectedIndexs: [],
erp_order_sn: '',
list: [],
filterList: []
}; };
}, },
onShow() { onLoad(options) {
this.erp_order_sn = options.number;
this.getData(); this.getData();
}, },
onShow() {
this.selectedIndexs = [];
},
methods: { methods: {
selectionChange(e) { selectionChange(e) {
console.log(e);
this.selectedIndexs = e.detail.index; this.selectedIndexs = e.detail.index;
this.filterList = this.selectedIndexs.map(i => this.list[i]);
},
scanChange(type) {
uni.scanCode({
success: res => {
console.log(res);
if (res.errMsg == 'scanCode:ok') {
this.erp_order_sn = res.result;
this.getData();
}
},
fail: res => {
console.log(res);
uni.showToast({
title: '扫码失败',
icon: 'error'
});
}
});
}, },
getData() { getData() {
this.request(API.userInfo, 'POST', {}, false).then(res => { this.request(API.szScanOut, 'POST', { erp_order_sn: this.erp_order_sn, is_submit: 0 }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.list.push({
car_sort: res.data.car_sort,
erp_order_sn: res.data.erp_order_sn,
num: res.data.num
});
} else { } else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
szScanOutChange() {
if (this.filterList.length <= 0) {
uni.showModal({
title: '提示',
content: '请勾选入仓号',
showCancel: false
});
return false;
}
this.request(API.szScanIn, 'POST', { list: this.filterList, is_submit: 1 }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '提交成功',
duration: 2000
});
setTimeout(() => {
uni.navigateTo({
url: '/pages/pda/logisticsList'
});
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
} }
}); });
} }
......
...@@ -7,98 +7,23 @@ ...@@ -7,98 +7,23 @@
<uni-th align="center">车序</uni-th> <uni-th align="center">车序</uni-th>
<uni-th align="center">汇总件数</uni-th> <uni-th align="center">汇总件数</uni-th>
</uni-tr> </uni-tr>
<uni-tr> <uni-tr v-for="(item, index) in list" :key="index">
<uni-td align="center">B00001</uni-td> <uni-td align="center">{{ item.erp_order_sn }}</uni-td>
<uni-td align="center">普货1车</uni-td> <uni-td align="center">{{ item.car_sort }}</uni-td>
<uni-td align="center">1</uni-td> <uni-td align="center">{{ item.num }}</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00002</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00002</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00003</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">888</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00004</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00005</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00006</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00007</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">888</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00001</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00002</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00002</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00003</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">888</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00004</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00005</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00006</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">1</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">B00007</uni-td>
<uni-td align="center">普货1车</uni-td>
<uni-td align="center">888</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
</view> </view>
<navigator class="scan row rowCenter verCenter" url="/pages/mine/login" hover-class="none"> <view class="scan row rowCenter verCenter" @click="scanChange()">
<text class="iconfont icon-juxing2"></text> <text class="iconfont icon-juxing2"></text>
<text class="tt">继续扫描</text> <text class="tt">继续扫描</text>
</navigator> </view>
<view class="fix-info row bothSide verCenter"> <view class="fix-info row bothSide verCenter">
<view class="text row verCenter"> <view class="text row verCenter">
<text class="t1">入仓号数:</text> <text class="t1">入仓号数:</text>
<text class="t2">{{ selectedIndexs.length }}</text> <text class="t2">{{ selectedIndexs.length }}</text>
</view> </view>
<view class="btn row rowCenter verCenter">入库单号确认</view> <view class="btn row rowCenter verCenter" @click="szScanInChange">入库单号确认</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -109,21 +34,84 @@ import { API } from '@/util/api.js'; ...@@ -109,21 +34,84 @@ import { API } from '@/util/api.js';
export default { export default {
data() { data() {
return { return {
selectedIndexs: [] selectedIndexs: [],
erp_order_sn: '',
list: [],
filterList: []
}; };
}, },
onShow() { onLoad(options) {
this.erp_order_sn = options.number;
this.getData(); this.getData();
}, },
onShow() {
this.selectedIndexs = [];
},
methods: { methods: {
selectionChange(e) { selectionChange(e) {
console.log(e);
this.selectedIndexs = e.detail.index; this.selectedIndexs = e.detail.index;
this.filterList = this.selectedIndexs.map(i => this.list[i]);
},
scanChange() {
uni.scanCode({
success: res => {
console.log(res);
if (res.errMsg == 'scanCode:ok') {
this.erp_order_sn = res.result;
this.getData();
}
},
fail: res => {
console.log(res);
uni.showToast({
title: '扫码失败',
icon: 'error'
});
}
});
}, },
getData() { getData() {
this.request(API.userInfo, 'POST', {}, false).then(res => { this.request(API.szScanIn, 'POST', { erp_order_sn: this.erp_order_sn, is_submit: 0 }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.list.push({
car_sort: res.data.car_sort,
erp_order_sn: res.data.erp_order_sn,
num: res.data.num
});
} else { } else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
szScanInChange() {
if (this.filterList.length <= 0) {
uni.showModal({
title: '提示',
content: '请勾选入仓号',
showCancel: false
});
return false;
}
this.request(API.szScanIn, 'POST', { list: this.filterList, is_submit: 1 }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '提交成功',
duration: 2000
});
setTimeout(() => {
uni.navigateTo({
url: '/pages/pda/logisticsList'
});
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
} }
}); });
} }
......
No preview for this file type
...@@ -108,7 +108,15 @@ const API = { ...@@ -108,7 +108,15 @@ const API = {
/** /**
* 检测标签重复打印 * 检测标签重复打印
*/ */
checkRepeatPrintLabel: API_BASE + '/supplywechatwms/checkRepeatPrintLabel' checkRepeatPrintLabel: API_BASE + '/supplywechatwms/checkRepeatPrintLabel',
/**
* 扫描入库
*/
szScanIn: API_BASE + '/supplywechatwms/szScanIn',
/**
* 扫描出库
*/
szScanOut: API_BASE + '/supplywechatwms/szScanOut'
} }
......
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