|
|
@@ -36,26 +36,35 @@
|
|
|
<div style="transform:scale(0.9);color:#02346a" class="pl-0 form-inline">
|
|
|
<div class="mr-3 text-nowrap form-inline">
|
|
|
<label :for="'carrier_bill'+waybill.id">专线运单号:</label>
|
|
|
- <input :id="'carrier_bill'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_bill?'is-invalid tooltipTargetError':''"
|
|
|
- v-if="waybill.isBtn || updatePool[waybill.id]" type="text" :value="waybill.carrier_bill"
|
|
|
+ <input :id="'carrier_bill'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_bill?'is-invalid':''"
|
|
|
+ v-if="waybill.isBtn || updatePool[waybill.id]" type="text" v-model="waybill.carrier_bill"
|
|
|
class="form-control form-control-sm " @click="enlarge($event)" style="width: 50px">
|
|
|
<span v-else class="text-muted">@{{ waybill.carrier_bill }}</span>
|
|
|
</div>
|
|
|
<div class="mr-3 text-nowrap form-inline">
|
|
|
<label :for="'inquire_tel'+waybill.id">查 件 电 话:</label>
|
|
|
- <input :id="'inquire_tel'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].inquire_tel?'is-invalid tooltipTargetError':''"
|
|
|
- v-if="waybill.isBtn || updatePool[waybill.id]" :value="waybill.inquire_tel" @click="enlarge($event)"
|
|
|
+ <input :id="'inquire_tel'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].inquire_tel?'is-invalid':''"
|
|
|
+ v-if="waybill.isBtn || updatePool[waybill.id]" v-model="waybill.inquire_tel" @click="enlarge($event)"
|
|
|
class="form-control form-control-sm" type="text" style="width:50px">
|
|
|
<span v-else class="text-muted">@{{ waybill.inquire_tel }}</span>
|
|
|
</div>
|
|
|
<div class="mr-3 text-nowrap form-inline">
|
|
|
<label :for="'amount'+waybill.id">数量:</label>
|
|
|
<div class="input-group input-group-sm" v-if="waybill.isBtn || updatePool[waybill.id]">
|
|
|
- <input :id="'amount'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].amount?'is-invalid tooltipTargetError':''"
|
|
|
- :value="waybill.amount" @click="enlarge($event)"
|
|
|
+ <input :id="'amount'+waybill.id" :class="errors['_'+waybill.id]&&(errors['_'+waybill.id].amount || errors['_'+waybill.id].amount_unit_name)?'is-invalid':''"
|
|
|
+ v-model="waybill.amount" @click="enlarge($event)"
|
|
|
class="form-control" type="text" style="width:50px">
|
|
|
<span class="input-group-append">
|
|
|
- <span class="input-group-text">件</span>
|
|
|
+ <span class="input-group-text">
|
|
|
+ <span class="custom-control custom-radio">
|
|
|
+ <input :name="'radio-'+waybill.id" type="radio" class="custom-control-input" :id="'radio-one'+waybill.id" v-model="waybill.amount_unit_name" value="件"/>
|
|
|
+ <label class="custom-control-label" :for="'radio-one'+waybill.id">件</label>
|
|
|
+ </span>
|
|
|
+ <span class="custom-control custom-radio">
|
|
|
+ <input :name="'radio-'+waybill.id" type="radio" class="custom-control-input" :id="'radio-two'+waybill.id" v-model="waybill.amount_unit_name" value="托"/>
|
|
|
+ <label class="custom-control-label" :for="'radio-two'+waybill.id">托</label>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
</div>
|
|
|
<span v-else class="text-muted"><span v-if="waybill.amount">@{{ waybill.amount }} @{{ waybill.amount_unit_name }}</span></span>
|
|
|
@@ -63,9 +72,9 @@
|
|
|
<div class="mr-3 text-nowrap form-inline">
|
|
|
<label :for="'carrier_weight_other'+waybill.id">重量:</label>
|
|
|
<div class="input-group input-group-sm" v-if="waybill.isBtn || updatePool[waybill.id]">
|
|
|
- <input :id="'carrier_weight_other'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight_other?'is-invalid tooltipTargetError':''"
|
|
|
- :value="waybill.carrier_weight_other" @click="enlarge($event)"
|
|
|
- type="text" class="form-control" style="width:50px">
|
|
|
+ <input :id="'carrier_weight_other'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight_other?'is-invalid':''"
|
|
|
+ v-model="waybill.carrier_weight_other" @click="enlarge($event)"
|
|
|
+ type="number" step="0.01" min="0" class="form-control" style="width:50px">
|
|
|
<span class="input-group-append">
|
|
|
<span class="input-group-text">KG</span>
|
|
|
</span>
|
|
|
@@ -75,9 +84,9 @@
|
|
|
<div class="mr-3 text-nowrap form-inline">
|
|
|
<label :for="'carrier_weight'+waybill.id">体积:</label>
|
|
|
<div class="input-group input-group-sm" v-if="waybill.isBtn || updatePool[waybill.id]">
|
|
|
- <input :id="'carrier_weight'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight?'is-invalid tooltipTargetError':''"
|
|
|
- :value="waybill.carrier_weight" @click="enlarge($event)"
|
|
|
- type="text" class="form-control" style="width:50px">
|
|
|
+ <input :id="'carrier_weight'+waybill.id" :class="errors['_'+waybill.id]&&errors['_'+waybill.id].carrier_weight?'is-invalid':''"
|
|
|
+ v-model="waybill.carrier_weight" @click="enlarge($event)"
|
|
|
+ type="number" step="0.01" min="0" class="form-control" style="width:50px">
|
|
|
<span class="input-group-append">
|
|
|
<span class="input-group-text">M³</span>
|
|
|
</span>
|
|
|
@@ -89,13 +98,10 @@
|
|
|
<div class="input-group input-group-sm">
|
|
|
<input :id="'subjoin_fee'+waybill.id" :value="waybill.subjoin_fee"
|
|
|
class="form-control" style="width:150px">
|
|
|
-<!-- <span class="input-group-append">
|
|
|
- <span class="input-group-text">元</span>
|
|
|
- </span>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
<span class="mr-3 text-nowrap">
|
|
|
- <button class="btn btn-sm btn-outline-success" @click="submit(date,waybill.isBtn,waybill.id)">提交</button>
|
|
|
+ <button class="btn btn-sm btn-outline-success" type="button" @click="submit(date,waybill)">提交</button>
|
|
|
<button v-if="!waybill.isBtn && !updatePool[waybill.id]" class="btn btn-sm btn-outline-info" @click="$set(updatePool,waybill.id,true);">修改</button>
|
|
|
</span>
|
|
|
</div>
|
|
|
@@ -139,7 +145,6 @@
|
|
|
slideStatus:{},
|
|
|
dailyBilling:{screenDate:'', billing:''},
|
|
|
error:{screenDate:'', billing:''},
|
|
|
- // dailyReady:{},
|
|
|
},
|
|
|
mounted:function(){
|
|
|
$(".tooltipTarget").tooltip({'trigger':'hover'});
|
|
|
@@ -214,6 +219,7 @@
|
|
|
carrier_weight_other:waybill.carrier_weight_other,
|
|
|
status:waybill.status,
|
|
|
amount:waybill.amount,
|
|
|
+ amount_unit_name:waybill.amount_unit ? waybill.amount_unit.name : '',
|
|
|
inquire_tel:waybill.inquire_tel,
|
|
|
carrier_name:waybill.logistic ? waybill.logistic.name : '',
|
|
|
isBtn:!!!waybill.carrier_bill,
|
|
|
@@ -264,23 +270,18 @@
|
|
|
return !this.updatePool[waybillId] ? "附加费添加成功" : '';
|
|
|
});
|
|
|
},
|
|
|
- submit(date,isBtn,waybillId,id=null){
|
|
|
- if(!isBtn){this.appendSubjoinFee(date,waybillId);if (!this.updatePool[waybillId])return;}
|
|
|
+ submit(date,waybill){
|
|
|
+ if(!waybill.isBtn){this.appendSubjoinFee(date,waybill.id);if (!this.updatePool[waybill.id])return;}
|
|
|
window.tempTip.confirm("确定要提交调配信息吗?",()=>{
|
|
|
let data={
|
|
|
- id : id ? id : waybillId,
|
|
|
- carrier_bill : $("#carrier_bill"+waybillId).val(),
|
|
|
- inquire_tel : $("#inquire_tel"+waybillId).val(),
|
|
|
- amount : $("#amount"+waybillId).val(),
|
|
|
- carrier_weight : $("#carrier_weight"+waybillId).val(),
|
|
|
- carrier_weight_other : $("#carrier_weight_other"+waybillId).val(),
|
|
|
+ id : waybill.id,
|
|
|
+ carrier_bill : waybill.carrier_bill,
|
|
|
+ inquire_tel : waybill.inquire_tel,
|
|
|
+ amount : waybill.amount,
|
|
|
+ carrier_weight : waybill.carrier_weight,
|
|
|
+ carrier_weight_other : waybill.carrier_weight_other,
|
|
|
+ amount_unit_name : waybill.amount_unit_name
|
|
|
};
|
|
|
- if (!data["id"]){
|
|
|
- window.tempTip.setDuration(3000);
|
|
|
- window.tempTip.show("参数异常");
|
|
|
- return;
|
|
|
- }
|
|
|
- this.errors["_"+data['id']]={};
|
|
|
axios.post("{{url('transport/waybill/storeCarrierBill')}}",data)
|
|
|
.then(response=>{
|
|
|
if (response.data.error){
|
|
|
@@ -289,27 +290,16 @@
|
|
|
return;
|
|
|
}
|
|
|
if (response.data.errors){
|
|
|
- this.$set(this.errors,"_"+data['id'],response.data.errors);
|
|
|
- setTimeout(function(){
|
|
|
- $(".tooltipTargetError").tooltip('show');
|
|
|
- },1);
|
|
|
+ let key = "_"+data['id']
|
|
|
+ let errors = {};
|
|
|
+ errors[key] = response.data.errors;
|
|
|
+ this.errors = errors;
|
|
|
return;
|
|
|
}
|
|
|
- this.groups[date].waybills.some(function (waybill) {
|
|
|
- if (waybill.id===data['id']){
|
|
|
- waybill.carrier_bill=response.data.carrier_bill;
|
|
|
- waybill.inquire_tel=response.data.inquire_tel;
|
|
|
- waybill.amount=response.data.amount;
|
|
|
- waybill.amount_unit_name=response.data.amount_unit_name;
|
|
|
- waybill.carrier_weight=response.data.carrier_weight;
|
|
|
- waybill.carrier_weight_other=response.data.carrier_weight_other;
|
|
|
- if (waybill.carrier_bill)waybill.isBtn=false;
|
|
|
- return true;
|
|
|
- }
|
|
|
- });
|
|
|
+ waybill.isBtn=false;
|
|
|
tempTip.setDuration(2000);
|
|
|
- if (this.updatePool[waybillId]){
|
|
|
- tempTip.showSuccess('修改成功!');this.$set(this.updatePool,waybillId,false);
|
|
|
+ if (this.updatePool[waybill.id]){
|
|
|
+ tempTip.showSuccess('修改成功!');this.$set(this.updatePool,waybill.id,false);
|
|
|
}else tempTip.showSuccess('录入成功!');
|
|
|
}).catch(function (err) {
|
|
|
tempTip.setDuration(3000);
|