|
|
@@ -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="billInputting.logistic_number='原单退回'" style="transform: scale(0.9)">原单退回</button>
|
|
|
+ <button class="btn btn-outline-primary btn-sm" @click="seek_order();billInputting.logistic_number='原单退回'" 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"
|
|
|
@@ -428,12 +428,12 @@
|
|
|
],
|
|
|
owners:[
|
|
|
@foreach($owners as $owner)
|
|
|
- {id:'{{$owner->id}}',name:'{{$owner->name}}'},
|
|
|
+ {id:'{{$owner->id}}',name:'{{$owner->name}}',code:'{{$owner->code}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
logistics:[
|
|
|
@foreach($logistics as $logistic)
|
|
|
- {id:'{{$logistic->id}}',name:'{{$logistic->name}}'},
|
|
|
+ {id:'{{$logistic->id}}',name:'{{$logistic->name}}',code:'{{$logistic->code}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
qualityLabels:[
|
|
|
@@ -974,6 +974,35 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //根据退回单寻找WMS订单填充已有字段
|
|
|
+ seek_order(){
|
|
|
+ let _this=this;
|
|
|
+ let soreference5=this.billInputting.logistic_number_return;
|
|
|
+ axios.post('{{url('apiLocal/rejectedBill/seekOrder')}}',{soreference5:soreference5})
|
|
|
+ .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.orderno;
|
|
|
+ _this.billInputting.mobile_sender=response.data.data.c_tel2;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
filters:{
|
|
|
isLoaded:function (value) {
|