Commit 680c5a15 by LJM

bug

parent 4ea3a9bb
Showing with 59 additions and 34 deletions
......@@ -989,43 +989,68 @@ export default {
return false;
}
//先判断一下自营货品信息
this.request(API.getZyGoodsData, 'GET', { stock_in_sn: this.filter_id_stock_in_sn.join(','), is_first_check: 1 }, true).then(res => {
if (res.code === 0) {
if (res.data.length > 0) {
this.getOtherAttrList();
this.showDrawer(decodeURIComponent(this.filter_id_stock_in_sn.join(',')), 1);
//深圳自营仓
if (this.filter_id_warehouse_id[0] == 9) {
//先判断一下自营货品信息
this.request(API.getZyGoodsData, 'GET', { stock_in_sn: this.filter_id_stock_in_sn.join(','), is_first_check: 1 }, true).then(res => {
if (res.code === 0) {
if (res.data.length > 0) {
this.getOtherAttrList();
this.showDrawer(decodeURIComponent(this.filter_id_stock_in_sn.join(',')), 1);
} else {
this.request(API.addStockInRegister, 'POST', { stock_in_id: JSON.stringify(stock_in_id) }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '登记成功',
icon: 'success'
});
setTimeout(() => {
this.resetChange();
this.getData();
this.closeDrawer();
this.filter_id = [];
this.filter_id_warehouse_id = [];
}, 2000);
} else {
uni.showModal({
itle: '提示',
content: res.msg,
showCancel: false
});
}
});
}
} else {
this.request(API.addStockInRegister, 'POST', { stock_in_id: JSON.stringify(stock_in_id) }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '登记成功',
icon: 'success'
});
setTimeout(() => {
this.resetChange();
this.getData();
this.closeDrawer();
this.filter_id = [];
this.filter_id_warehouse_id = [];
}, 2000);
} else {
uni.showModal({
itle: '提示',
content: res.msg,
showCancel: false
});
}
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false
});
}
} else {
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false
});
}
});
});
} else {
this.request(API.addStockInRegister, 'POST', { stock_in_id: JSON.stringify(stock_in_id) }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '登记成功',
icon: 'success'
});
setTimeout(() => {
this.resetChange();
this.getData();
this.closeDrawer();
this.filter_id = [];
this.filter_id_warehouse_id = [];
}, 2000);
} else {
uni.showModal({
itle: '提示',
content: res.msg,
showCancel: false
});
}
});
}
},
/**
* @param {Object} stock_in_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