|
@@ -111,20 +111,20 @@
|
|
|
<div class="input-item-margin">
|
|
|
<div v-if="deptBudgetList.priceStatus=='审核中'&&pricetype==1">
|
|
|
<el-button type="primary" v-hasPermission="`tranManager.vehicleDispatching.reprice`" size="small"
|
|
|
- @click="examine()">审核中
|
|
|
+ @click="examine(1)">审核中
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <el-button v-if="deptBudgetList.priceStatus!='审核中'&&pricetype==1" type="primary" @click="priceSubmit()">提交</el-button>
|
|
|
+ <el-button v-if="deptBudgetList.priceStatus!='审核中'&&pricetype==1" type="primary" @click="priceSubmit(1)">提交</el-button>
|
|
|
<div v-if="deptBudgetList.priceStatusCar=='审核中'&&pricetype==2">
|
|
|
<el-button type="primary" v-hasPermission="`tranManager.vehicleDispatching.reprice`" size="small"
|
|
|
- @click="examine()">审核中
|
|
|
+ @click="examine(2)">审核中
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <el-button v-if="deptBudgetList.priceStatusCar!='审核中'&&pricetype==2" type="primary" @click="priceSubmit()">提交</el-button>
|
|
|
+ <el-button v-if="deptBudgetList.priceStatusCar!='审核中'&&pricetype==2" type="primary" @click="priceSubmit(2)">提交</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="content3" v-for="(item, index) in deptBudgetList.tranCarInfoList" :key="index">
|
|
|
- <div v-if='item.fleetFlag==0' class="content3-item1">
|
|
|
+ <div class="content3" v-for="(item, index) in driverlist" :key="index">
|
|
|
+ <div class="content3-item1">
|
|
|
|
|
|
<div class="">
|
|
|
<span style="margin-left: 30px;font-weight: 600;">司机-{{ index + 1 }}</span>
|
|
@@ -220,7 +220,7 @@
|
|
|
<el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-else label="运输单价(元/车):" span="1" prop="carModel" label-width="125px">
|
|
|
- <el-input :disabled="readonly" v-model="item.tranPriceCar" size="small" />
|
|
|
+ <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<span v-if="item.status == '未装车'||item.temporaryDriverFlag!=0" width="22" height="22" class="del"
|
|
@@ -243,7 +243,7 @@
|
|
|
<el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-else label="运输单价(元/车):" span="1" prop="carModel" label-width="125px">
|
|
|
- <el-input :disabled="readonly" v-model="item.tranPriceCar" size="small" />
|
|
|
+ <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<span v-if="!item.id" width="22" height="22" class="del"
|
|
@@ -366,9 +366,21 @@
|
|
|
return arr
|
|
|
}
|
|
|
},
|
|
|
+ driverlist: function() {
|
|
|
+ if (this.deptBudgetList.tranCarInfoList.length > 0) {
|
|
|
+ var arr = []
|
|
|
+ for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
|
|
|
+ if(this.deptBudgetList.tranCarInfoList[i].fleetFlag==0){
|
|
|
+ arr.push(this.deptBudgetList.tranCarInfoList[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return arr
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
pricetypechange(e){
|
|
|
+ console.log(e)
|
|
|
this.deptBudgetList.billingMethod=e
|
|
|
if (this.deptBudgetList.tranCarInfoList.length > 0) {
|
|
|
for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
|
|
@@ -377,7 +389,7 @@
|
|
|
if(e==1){
|
|
|
this.deptBudgetList.tranCarInfoList[i].tranPrice=this.deptBudgetList.tranPrice
|
|
|
}else{
|
|
|
- this.deptBudgetList.tranCarInfoList[i].tranPriceCar=this.deptBudgetList.tranPriceCar
|
|
|
+ this.deptBudgetList.tranCarInfoList[i].tranPrice=this.deptBudgetList.tranPriceCar
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -456,8 +468,7 @@
|
|
|
fleetFlag:1,
|
|
|
index:this.deptBudgetList.tranCarInfoList.length,
|
|
|
billingMethod:this.pricetype,
|
|
|
- tranPrice: this.deptBudgetList.tranPrice,
|
|
|
- tranPriceCar:this.deptBudgetList.tranPriceCar,
|
|
|
+ tranPrice:this.deptBudgetList.tranPriceCar,
|
|
|
tranType: '1',
|
|
|
})
|
|
|
|
|
@@ -539,11 +550,11 @@
|
|
|
}
|
|
|
},
|
|
|
//审核
|
|
|
- examine() {
|
|
|
+ examine(status) {
|
|
|
this.$prompt('运输单价审核', {
|
|
|
cancelButtonText: '取消',
|
|
|
confirmButtonText: '确定',
|
|
|
- inputValue: this.deptBudgetList.billingMethod==1?this.deptBudgetList.tranPriceIng:this.deptBudgetList.tranPriceIngCar
|
|
|
+ inputValue: status==1?this.deptBudgetList.tranPriceIng:this.deptBudgetList.tranPriceIngCar
|
|
|
}).then(({
|
|
|
value
|
|
|
}) => {
|
|
@@ -577,7 +588,7 @@
|
|
|
);
|
|
|
});
|
|
|
},
|
|
|
- priceSubmit() {
|
|
|
+ priceSubmit(status) {
|
|
|
this.$confirm(`运输单价将发送给决策人审核,确定提交?`, {
|
|
|
cancelButtonText: '取消',
|
|
|
confirmButtonText: '确定',
|
|
@@ -591,7 +602,7 @@
|
|
|
tranProcessInfo.tranPriceIng = this.deptBudgetList.tranPriceIng
|
|
|
tranProcessInfo.billingMethod= this.deptBudgetList.billingMethod
|
|
|
tranProcessInfo.tranPriceIngCar = this.deptBudgetList.tranPriceIngCar
|
|
|
- if(this.deptBudgetList.billingMethod==2){
|
|
|
+ if(status==2){
|
|
|
setUpTranPriceCar(tranProcessInfo)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
@@ -666,6 +677,7 @@
|
|
|
tranCarInfo.processNo = this.deptBudgetList.processNo
|
|
|
tranCarInfo.tranPrice = this.deptBudgetList.tranPrice
|
|
|
tranCarInfo.infoId = this.deptBudgetList.infoId
|
|
|
+ tranCarInfo.billingMethod=this.pricetype
|
|
|
tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
|
|
|
dispatchCat(tranCarInfo)
|
|
|
.toPromise()
|
|
@@ -703,9 +715,8 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ this.pricetype=response.billingMethod
|
|
|
this.deptBudgetList = response
|
|
|
- console.log(this.deptBudgetList)
|
|
|
this.fhaddress = response.sendPrivate + response.sendCity + response.sendArea + response
|
|
|
.sendDetailedAddress
|
|
|
this.shaddress = response.receivePrivate + response.receiveCity + response.receiveArea + response
|