Commit 6eed4852 by 姜雷

修改派车车辆可以为多选

parent 0ab12f2d
...@@ -100,6 +100,9 @@ input[type='number'] { ...@@ -100,6 +100,9 @@ input[type='number'] {
.col-line-3 { .col-line-3 {
width: 32%; width: 32%;
} }
.col-line-3-1 {
width: 68%;
}
</style> </style>
<script> <script>
export default { export default {
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<el-button type="primary" icon="el-icon-search" @click="searchList">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="searchList">搜索</el-button>
<el-button type="primary" icon="el-icon-download" @click="exportList">导出</el-button> <el-button type="primary" icon="el-icon-download" @click="exportList">导出</el-button>
</el-form> </el-form>
<div class="tabel-wrap"> <div class="tabel-wrap">
<el-table border v-loading="loading" :data="list" style="width: 100%"> <el-table border v-loading="loading" :data="list" style="width: 100%">
<el-table-column type="index" label="序号" width="50"> <el-table-column type="index" label="序号" width="50">
...@@ -58,6 +59,7 @@ ...@@ -58,6 +59,7 @@
<el-pagination layout="prev, pager, next" :current-page="pagination.pageNum" :page-size="pagination.pageSize" :total="pagination.total" @current-change="changePage"> <el-pagination layout="prev, pager, next" :current-page="pagination.pageNum" :page-size="pagination.pageSize" :total="pagination.total" @current-change="changePage">
</el-pagination> </el-pagination>
</div> </div>
<drag-dialog :title="editType ? '处理' : '详情'" :visible.sync="dialogEditVisible" :before-close="resetEditDialog" width="70%" top="5vh"> <drag-dialog :title="editType ? '处理' : '详情'" :visible.sync="dialogEditVisible" :before-close="resetEditDialog" width="70%" top="5vh">
<el-form class="editForm" :disabled="loading"> <el-form class="editForm" :disabled="loading">
<div class="line-wrap"> <div class="line-wrap">
...@@ -89,8 +91,8 @@ ...@@ -89,8 +91,8 @@
<el-form-item class="col-line-3" label="派车人" label-width="100px"> <el-form-item class="col-line-3" label="派车人" label-width="100px">
<span>{{selected.dealName}}</span> <span>{{selected.dealName}}</span>
</el-form-item> </el-form-item>
<el-form-item class="col-line-3" label="派车车牌" label-width="100px"> <el-form-item class="col-line-3-1" label="派车车牌" label-width="100px">
<el-select v-if="editType" v-model="selected.carPlate" filterable clearable placeholder="派车车牌"> <el-select class="w100" v-if="editType" v-model="selected.carPlateList" filterable clearable multiple placeholder="派车车牌">
<el-option v-for="item in carPlateOptions" :key="item.id" :label="item.name" :value="item.name"> <el-option v-for="item in carPlateOptions" :key="item.id" :label="item.name" :value="item.name">
</el-option> </el-option>
</el-select> </el-select>
...@@ -221,6 +223,7 @@ export default { ...@@ -221,6 +223,7 @@ export default {
birthday: '', birthday: '',
jobNumber: '', jobNumber: '',
cellphone: '', cellphone: '',
carPlateList: [],
}; };
}, },
getCategoryValue(c, r, val) { getCategoryValue(c, r, val) {
...@@ -260,6 +263,7 @@ export default { ...@@ -260,6 +263,7 @@ export default {
lineDescription: data.row.lineDescription, lineDescription: data.row.lineDescription,
dealName: data.row.dealName || this.userInfo.name, dealName: data.row.dealName || this.userInfo.name,
carPlate: data.row.carPlate, carPlate: data.row.carPlate,
carPlateList: data.row.carPlate ? data.row.carPlate.split(',') : [],
startKilometers: data.row.startKilometers, startKilometers: data.row.startKilometers,
stopKilometers: data.row.stopKilometers, stopKilometers: data.row.stopKilometers,
trueKilometers: data.row.trueKilometers, trueKilometers: data.row.trueKilometers,
...@@ -271,13 +275,19 @@ export default { ...@@ -271,13 +275,19 @@ export default {
}; };
this.dialogEditVisible = true; this.dialogEditVisible = true;
}, },
resetEditDialog(done) {
this.initSelected();
done && typeof done == 'function'
? done()
: (this.dialogEditVisible = false);
},
toogleDealResult(val) { toogleDealResult(val) {
if (val === 2) { if (val === 2) {
this.selected.dealOpinion = ''; this.selected.dealOpinion = '';
} }
}, },
validateSelect() { validateSelect() {
if (this.selected.dealResult == 2 && !this.selected.carPlate) { if (this.selected.dealResult == 2 && !this.selected.carPlateList.length) {
this.$message.error('请选择派车车牌!'); this.$message.error('请选择派车车牌!');
return; return;
} }
...@@ -306,7 +316,7 @@ export default { ...@@ -306,7 +316,7 @@ export default {
const entity = { const entity = {
userId: this.userInfo.id, userId: this.userInfo.id,
id: this.selected.id, id: this.selected.id,
carPlate: this.selected.carPlate, carPlate: this.selected.carPlateList.join(','),
startKilometers: this.selected.startKilometers, startKilometers: this.selected.startKilometers,
stopKilometers: this.selected.stopKilometers, stopKilometers: this.selected.stopKilometers,
trueKilometers: this.selected.trueKilometers, trueKilometers: this.selected.trueKilometers,
...@@ -422,6 +432,9 @@ export default { ...@@ -422,6 +432,9 @@ export default {
margin-left: 30px; margin-left: 30px;
} }
} }
.w100 {
width: 100%;
}
.printIframe { .printIframe {
width: 100%; width: 100%;
height: 500px; height: 500px;
......
...@@ -32,19 +32,17 @@ ...@@ -32,19 +32,17 @@
</div> </div>
<div class="tableRow"> <div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">部门负责人<br>签字(盖章)</div> <div :span="4" class="tableCell tabelCol-4">部门负责人<br>签字(盖章)</div>
<div :span="4" class="tableCell tabelCol-10"></div> <div :span="20" class="tableCell tabelCol-20"></div>
<div :span="4" class="tableCell tabelCol-4 directCol"> </div>
<div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">
<div>派车人</div> <div>派车人</div>
<div>派车车牌</div>
</div> </div>
<div :span="4" class="tableCell tabelCol-6 directCol"> <div :span="6" class="tableCell tabelCol-6">{{selected.dealName}}</div>
<span> <div :span="4" class="tableCell tabelCol-4">
{{selected.dealName}} <div>派车车牌</div>
</span>
<span>
{{selected.carPlate}}
</span>
</div> </div>
<div :span="10" class="tableCell tabelCol-10">{{selected.carPlate}}</div>
</div> </div>
<div class="tableRow"> <div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">出车公里数</div> <div :span="4" class="tableCell tabelCol-4">出车公里数</div>
......
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