|
|
@@ -143,7 +143,7 @@
|
|
|
<td>
|
|
|
<div class="form-group mb-0">
|
|
|
<label for="logistic_number" class="col-form-label text-right">原单号</label>
|
|
|
- <button class="btn btn-outline-primary btn-sm" @click="seek_order();billInputting.logistic_number='原单退回'" style="transform: scale(0.9)">原单退回</button>
|
|
|
+ <button class="btn btn-outline-primary btn-sm" @click="seek_order()" style="transform: scale(0.9)">原单退回</button>
|
|
|
<input type="text" class="form-control" :class="[errors.logistic_number?'is-invalid':'']"
|
|
|
data-focusOrder="7"
|
|
|
name="logistic_number" id="logistic_number" autocomplete="off"
|
|
|
@@ -973,32 +973,32 @@
|
|
|
//根据退回单寻找WMS订单填充已有字段
|
|
|
seek_order(){
|
|
|
let _this=this;
|
|
|
- let soreference5=this.billInputting.logistic_number_return;
|
|
|
- if (!soreference5) return;
|
|
|
- axios.post('{{url('apiLocal/rejectedBill/seekOrder')}}',{soreference5:soreference5})
|
|
|
+ let logistic_number_return=this.billInputting.logistic_number_return;
|
|
|
+ if (!logistic_number_return) return;
|
|
|
+ axios.post('{{url('apiLocal/rejectedBill/seekOrder')}}',{logistic_number_return:logistic_number_return})
|
|
|
.then(function (response) {
|
|
|
if (response.data.success){
|
|
|
- let id_owner='';
|
|
|
- let id_logistic_return='';
|
|
|
- _this.owners.every(function (owner) {
|
|
|
- if (owner.code===response.data.data.customerid){
|
|
|
- id_owner=owner.id;return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- });
|
|
|
- _this.logistics.every(function (logistic) {
|
|
|
- if (logistic.code===response.data.data.carrierid){
|
|
|
- id_logistic_return=logistic.id;return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- });
|
|
|
- if (id_owner) _this.billInputting.id_owner=id_owner;
|
|
|
- _this.billInputting.sender=response.data.data.c_contact;
|
|
|
- if (id_logistic_return) _this.billInputting.id_logistic_return=id_logistic_return;
|
|
|
- _this.billInputting.order_number=response.data.data.soreference1;
|
|
|
- _this.billInputting.mobile_sender=response.data.data.c_tel2;
|
|
|
+ if(response.data.data.owner_id)_this.billInputting.id_owner=response.data.data.owner_id;
|
|
|
+ if(response.data.data.logistic_id)_this.billInputting.id_logistic_return = response.data.data.logistic_id;
|
|
|
+ if(response.data.data.consignee_name)_this.billInputting.sender = response.data.data.consignee_name;
|
|
|
+ if(response.data.data.consignee_phone)_this.billInputting.mobile_sender = response.data.data.consignee_phone;
|
|
|
+ if(response.data.data.client_code)_this.billInputting.order_number = response.data.data.client_code;
|
|
|
+ _this.billInputting.logistic_number='原单退回';
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.showSuccess('原单信息已填充');
|
|
|
+ return;
|
|
|
}
|
|
|
- })
|
|
|
+ if(!response.data.data)_this.canelOrderInfo();
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.show('请校验退回单号是否复合,复合正确才可提交');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ canelOrderInfo(){
|
|
|
+ this.billInputting.id_owner = null;
|
|
|
+ this.billInputting.id_logistic_return = null;
|
|
|
+ this.billInputting.sender = null;
|
|
|
+ this.billInputting.mobile_sender = null;
|
|
|
+ this.billInputting.order_number = null;
|
|
|
}
|
|
|
},
|
|
|
filters:{
|