Commit f0f765f4 by LJM

扫描盘点

parent e2e530aa
Showing with 18 additions and 1 deletions
......@@ -110,7 +110,7 @@ export default {
});
},
identifyQrCodeNumAndSn() {
this.request(API.identifyQrCodeNumAndSn, 'POST', { code_str: this.code_str, code_type: this.code_type }, false).then(res => {
this.request(API.identifyQrCodeNumAndSn, 'POST', { code_str: this.code_str, code_type: this.code_type }, true).then(res => {
if (res.err_code === 0) {
this.list.unshift({
goods_num: res.data.num || '',
......@@ -160,6 +160,7 @@ export default {
for (let i = 0; i < this.selectedIndexs.length; i++) {
this.list.splice(this.selectedIndexs[i], 1);
}
this.$forceUpdate();
},
exportChange() {
this.request(API.getBoxSnAndNum, 'POST', { box_sn: this.box_sn, export: 1 }, true).then(res => {
......@@ -205,6 +206,22 @@ export default {
submit() {
let params = {};
let arr = [];
if (this.list.length <= 0) {
uni.showModal({
title: '提示',
content: '请扫描或者添加行数据',
showCancel: false
});
return false;
}
if (!this.box_sn) {
uni.showModal({
title: '提示',
content: '请输入箱号',
showCancel: false
});
return false;
}
for (let i = 0; i < this.list.length; i++) {
arr.push({
goods_sn: this.list[i].goods_sn,
......
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