|
@@ -732,7 +732,13 @@
|
|
|
}
|
|
}
|
|
|
tempTip.confirm("是否要生成“"+this.checkData+"”的退货单?",()=> {
|
|
tempTip.confirm("是否要生成“"+this.checkData+"”的退货单?",()=> {
|
|
|
let _this = this;
|
|
let _this = this;
|
|
|
- axios.post('{{url('order/isRejectedBillExist')}}',{data:this.checkData})
|
|
|
|
|
|
|
+ let arr = [];
|
|
|
|
|
+ window.tempTip.setDuration(9999);
|
|
|
|
|
+ window.tempTip.waitingTip("生成中,请稍等......")
|
|
|
|
|
+ this.orders.forEach(order=> {
|
|
|
|
|
+ if (this.checkData.includes(order.orderno))arr.push(order.soreference1);
|
|
|
|
|
+ });
|
|
|
|
|
+ axios.post('{{url('order/isRejectedBillExist')}}',{data:arr})
|
|
|
.then(function (response) {
|
|
.then(function (response) {
|
|
|
if (!response.data.success){
|
|
if (!response.data.success){
|
|
|
tempTip.confirm(response.data.data+',已存在,是否仍要生成退货单?',function () {
|
|
tempTip.confirm(response.data.data+',已存在,是否仍要生成退货单?',function () {
|
|
@@ -743,6 +749,7 @@
|
|
|
_this.createRejectedBill();
|
|
_this.createRejectedBill();
|
|
|
}).catch(function (error) {
|
|
}).catch(function (error) {
|
|
|
tempTip.setDuration(3000);
|
|
tempTip.setDuration(3000);
|
|
|
|
|
+ tempTip.cancelWaitingTip();
|
|
|
tempTip.show('网络错误:'+error);
|
|
tempTip.show('网络错误:'+error);
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
@@ -752,14 +759,17 @@
|
|
|
axios.post(url,{data:this.checkData})
|
|
axios.post(url,{data:this.checkData})
|
|
|
.then(res=>{
|
|
.then(res=>{
|
|
|
if (res.data.success){
|
|
if (res.data.success){
|
|
|
|
|
+ tempTip.cancelWaitingTip();
|
|
|
tempTip.setDuration(2000);
|
|
tempTip.setDuration(2000);
|
|
|
tempTip.showSuccess("生成退货单成功!");
|
|
tempTip.showSuccess("生成退货单成功!");
|
|
|
}else{
|
|
}else{
|
|
|
|
|
+ tempTip.cancelWaitingTip();
|
|
|
tempTip.setDuration(3000);
|
|
tempTip.setDuration(3000);
|
|
|
tempTip.show(res.data.data);
|
|
tempTip.show(res.data.data);
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(err=>{
|
|
.catch(err=>{
|
|
|
|
|
+ tempTip.cancelWaitingTip();
|
|
|
tempTip.setDuration(3000);
|
|
tempTip.setDuration(3000);
|
|
|
tempTip.show('网络错误:'+err);
|
|
tempTip.show('网络错误:'+err);
|
|
|
});
|
|
});
|