|
|
@@ -115,6 +115,7 @@
|
|
|
<input type="text" class="form-control form-control-sm col-12" placeholder=""
|
|
|
name="appointment_number" id="appointment_number"
|
|
|
:class="{'is-invalid':errors.appointment_number}"
|
|
|
+ @keydown.enter="getAnsNo"
|
|
|
@change="clearError('appointment_number')"
|
|
|
v-model="receiving_task.appointment_number">
|
|
|
<div id="validation-delivery-appointment-number" class="invalid-feedback"
|
|
|
@@ -462,7 +463,8 @@
|
|
|
printerList: [],
|
|
|
print_setting: {
|
|
|
printer_index: 0,
|
|
|
- }
|
|
|
+ },
|
|
|
+ appointment_number_asn_nos:[], // 预约号对应的ans号
|
|
|
},
|
|
|
mounted() {
|
|
|
$("#list").removeClass('d-none');
|
|
|
@@ -567,6 +569,22 @@
|
|
|
this.errorTempTip(err);
|
|
|
});
|
|
|
},
|
|
|
+ getAnsNo(){
|
|
|
+ let url = "{{route('store.receivingMask.getAsnNumberApi')}}";
|
|
|
+ this.appointment_number_asn_nos = [];
|
|
|
+ let data = {
|
|
|
+ 'appointment_number':this.receiving_task.appointment_number,
|
|
|
+ };
|
|
|
+ window.axios.post(url,data).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.appointment_number_asn_nos = res.data.data;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '校验预约号出现异常');
|
|
|
+ }).catch(err => {
|
|
|
+ this.errorTempTip(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
formatAsnHeaderDetails(asnHeaderDetails) {
|
|
|
return asnHeaderDetails.map(e => this.formatAsnHeaderDetail(e));
|
|
|
},
|
|
|
@@ -636,6 +654,8 @@
|
|
|
result = {success: false, message: "司机电话不能为空", field: 'driver_phone'};
|
|
|
} else if (!appointment_number) {
|
|
|
result = {success: false, message: "预约单号不能为空", field: 'appointment_number'};
|
|
|
+ } else if (this.appointment_number_asn_nos.length === 0){
|
|
|
+ result = {success: false, message: "预约单号对应的asn单号为空", field: 'appointment_number'};
|
|
|
}
|
|
|
if (!result.success) return result;
|
|
|
if (!logistics_single_number) {
|