Commit a7844bf8 authored by lixy's avatar lixy

收车

parent d96b416c
......@@ -672,9 +672,16 @@
<el-input v-model="arrivalForm.mileage" placeholder="请输入收车时公里数"></el-input>
</el-form-item>
<el-form-item label="还车分公司" prop="arrivalBranchCompanyId">
<el-select class="filter-item" v-model="arrivalForm.arrivalBranchCompanyId" placeholder="请选择分公司">
<el-option v-for="item in allCompanies" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-autocomplete
class="inline-input"
v-model="arrivalForm.arrivalBranchCompanyName"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelectArrivalCompanyName"
></el-autocomplete>
<!--<el-select class="filter-item" v-model="arrivalForm.arrivalBranchCompanyId" placeholder="请选择分公司">-->
<!--<el-option v-for="item in allCompanies" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
<!--</el-select>-->
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -1079,7 +1086,8 @@
recycleMan: null,
recycleManTel: null,
mileage: null,
arrivalBranchCompanyId: null
arrivalBranchCompanyId: null,
arrivalBranchCompanyName: ''
},
upkeepDialogVisible: false,
upkeepForm: {
......@@ -1271,6 +1279,17 @@
return (restaurant.name.indexOf(queryString.toLowerCase()) != -1);
};
},
/**
* 还车分公司
*/
handleSelectArrivalCompanyName(item){
if(item.value == "全部"){
this.arrivalForm.arrivalBranchCompanyId = undefined;
} else {
this.arrivalForm.arrivalBranchCompanyId = item.id;
}
console.log(item);
},
handleSelectDepartureForm(item){
if(item.value == "全部"){
this.departureForm.departureBranchCompanyId = undefined;
......@@ -1380,6 +1399,18 @@
this.arrivalDialogVisible = true;
this.clearArrivalForm();
this.arrivalForm.vehicleId = row.id;
this.arrivalForm.arrivalBranchCompanyId = row.subordinateBranch;
let that = this;
let selectArry = [];
this.allCompaniesArr.map(function(item){
item.value = item.name;
selectArry.push(item);
});
selectArry.map(function (iitem) {
if( row.subordinateBranch == iitem.id){
that.arrivalForm.arrivalBranchCompanyName = iitem.name;
}
});
this.arrivalForm.numberPlate = row.numberPlate;
this.arrivalForm.vehicleDate = Date();
},
......@@ -1387,7 +1418,13 @@
this.arrivalDialogVisible = false;
this.clearArrivalForm();
},
/**
* 收车-确定
*/
arrivalVehicleHandler() {
if(this.arrivalForm.arrivalBranchCompanyName == "" || this.arrivalForm.arrivalBranchCompanyName == "全部"){
this.arrivalForm.arrivalBranchCompanyId = undefined;
}
arrivalVehicle(this.arrivalForm).then(response => {
if (response.code === rsCode.RS_CODE_SUC) {
this.arrivalDialogVisible = false;
......@@ -1415,7 +1452,8 @@
recycleMan: null,
recycleManTel: null,
mileage: null,
arrivalBranchCompanyId: null
arrivalBranchCompanyId: null,
arrivalBranchCompanyName: ''
};
},
departureHandler(row) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment