Commit 258ad078 by 姜雷

Merge branch 'develop' into 'test'

Develop See merge request !12
parents c3abe53e 23faf18a
......@@ -100,6 +100,9 @@ input[type='number'] {
.col-line-3 {
width: 32%;
}
.col-line-3-1 {
width: 68%;
}
</style>
<script>
export default {
......
......@@ -45,7 +45,7 @@ service.interceptors.response.use(response => {
if (res.code !== 1000) {
if (
response.headers &&
response.headers['content-type'] === 'application/octet-stream'
/application\/octet-stream/.test(response.headers['content-type'])
) {
return response;
}
......
import fetch from '@/api/fetch';
import downloadUrl from '@/utils/download';
export const fetchApplyList = entity =>
fetch({
......@@ -13,3 +14,15 @@ export const dealApply = entity =>
method: 'post',
data: entity,
});
export const exportApplyList = entity =>
fetch({
url: '/publicCar/export/manager/teacherAppoCar',
method: 'post',
data: entity,
responseType: 'blob',
timeout: 120000,
}).then(res => {
let blob = new Blob([res.data], { type: res.headers });
let fileName = res.headers['content-disposition'].split('=')[1];
downloadUrl(blob, fileName);
});
import fetch from '@/api/fetch';
import downloadUrl from '@/utils/download';
export const fetchApplyList = entity =>
fetch({
......@@ -13,3 +14,16 @@ export const dealApply = entity =>
method: 'post',
data: entity,
});
export const exportApplyList = entity =>
fetch({
url: '/repair/export/manager/userRepair',
method: 'post',
data: entity,
responseType: 'blob',
timeout: 120000,
}).then(res => {
let blob = new Blob([res.data], { type: res.headers });
let fileName = res.headers['content-disposition'].split('=')[1];
downloadUrl(blob, fileName);
});
......@@ -16,7 +16,7 @@
</div>
</div>
<div class="copyright">
Copyright@成都多彩任意门科技有限公司2015-2017 蜀ICP备14012163号-1
Copyright©成都多彩任意门科技有限公司2015-2017 蜀ICP备14012163号-1
</div>
</div>
</template>
......
......@@ -118,8 +118,8 @@ $light_gray: #eee;
background-image: url('../../assets/images/login/login_bg@3x.png');
background-size: cover;
input:-webkit-autofill {
box-shadow: 0 0 0px 1000px #293444 inset !important;
-webkit-text-fill-color: #fff !important;
box-shadow: 0 0 0px 1000px #fff inset !important;
-webkit-text-fill-color: #666 !important;
}
input {
background: transparent;
......
......@@ -22,7 +22,9 @@
</el-date-picker>
</div>
<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-form>
<div class="tabel-wrap">
<el-table border v-loading="loading" :data="list" style="width: 100%">
<el-table-column type="index" label="序号" width="50">
......@@ -57,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>
</div>
<drag-dialog :title="editType ? '处理' : '详情'" :visible.sync="dialogEditVisible" :before-close="resetEditDialog" width="70%" top="5vh">
<el-form class="editForm" :disabled="loading">
<div class="line-wrap">
......@@ -88,9 +91,9 @@
<el-form-item class="col-line-3" label="派车人" label-width="100px">
<span>{{selected.dealName}}</span>
</el-form-item>
<el-form-item class="col-line-3" label="派车车牌" label-width="100px">
<el-select v-if="editType" v-model="selected.carPlate" filterable clearable placeholder="派车车牌">
<el-option v-for="item in carPlateOptions" :key="item.id" :label="item.name" :value="item.name">
<el-form-item class="col-line-3-1" label="派车车牌" label-width="100px">
<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.id">
</el-option>
</el-select>
<span v-else>{{selected.carPlate}}</span>
......@@ -161,7 +164,7 @@
import listMixin from '@/mixin/listPage.js';
import { mapGetters, mapActions } from 'vuex';
import store from './store.js';
import { dealApply } from '@/api/management/publicCar.js';
import { dealApply, exportApplyList } from '@/api/management/publicCar.js';
// import printJS from 'print-js';
export default {
......@@ -220,6 +223,7 @@ export default {
birthday: '',
jobNumber: '',
cellphone: '',
carPlateList: [],
};
},
getCategoryValue(c, r, val) {
......@@ -227,6 +231,10 @@ export default {
let item = list.find(item => item.checked);
return item ? item.name : '';
},
exportList() {
const filters = this.getFilters();
exportApplyList(filters);
},
showEditDialog(type, data) {
this.editType = type;
if (this.carPlateOptions.length == 0) {
......@@ -255,6 +263,7 @@ export default {
lineDescription: data.row.lineDescription,
dealName: data.row.dealName || this.userInfo.name,
carPlate: data.row.carPlate,
carPlateList: data.row.carPlate ? data.row.carPlate.split(',') : [],
startKilometers: data.row.startKilometers,
stopKilometers: data.row.stopKilometers,
trueKilometers: data.row.trueKilometers,
......@@ -266,13 +275,19 @@ export default {
};
this.dialogEditVisible = true;
},
resetEditDialog(done) {
this.initSelected();
done && typeof done == 'function'
? done()
: (this.dialogEditVisible = false);
},
toogleDealResult(val) {
if (val === 2) {
this.selected.dealOpinion = '';
}
},
validateSelect() {
if (this.selected.dealResult == 2 && !this.selected.carPlate) {
if (this.selected.dealResult == 2 && !this.selected.carPlateList.length) {
this.$message.error('请选择派车车牌!');
return;
}
......@@ -298,10 +313,13 @@ export default {
? `不同意 - ${this.selected.dealOpinion}`
: `不同意 - 无车可派送`;
}
let carPlate = this.selected.carPlateList.map(
id => this.carPlateOptions.find(i => i.id === id).name
);
const entity = {
userId: this.userInfo.id,
id: this.selected.id,
carPlate: this.selected.carPlate,
carPlate: carPlate.join(','),
startKilometers: this.selected.startKilometers,
stopKilometers: this.selected.stopKilometers,
trueKilometers: this.selected.trueKilometers,
......@@ -417,6 +435,9 @@ export default {
margin-left: 30px;
}
}
.w100 {
width: 100%;
}
.printIframe {
width: 100%;
height: 500px;
......
......@@ -31,6 +31,7 @@
</el-date-picker>
</div>
<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-form>
<div class="tabel-wrap">
<el-table border v-loading="loading" :data="list" style="width: 100%">
......@@ -106,7 +107,7 @@
import listMixin from '@/mixin/listPage.js';
import { mapGetters, mapActions } from 'vuex';
import store from './store.js';
import { dealApply } from '@/api/management/repair.js';
import { dealApply, exportApplyList } from '@/api/management/repair.js';
export default {
beforeRouteEnter(to, from, next) {
......@@ -171,6 +172,10 @@ export default {
let item = this.dealStateOptions.find(item => item.value == val);
return item ? item.label : val;
},
exportList() {
const filters = this.getFilters();
exportApplyList(filters);
},
showEditDialog(type, data) {
this.editType = type;
this.selected = {
......
......@@ -32,19 +32,17 @@
</div>
<div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">部门负责人<br>签字(盖章)</div>
<div :span="4" class="tableCell tabelCol-10"></div>
<div :span="4" class="tableCell tabelCol-4 directCol">
<div :span="20" class="tableCell tabelCol-20"></div>
</div>
<div class="tableRow">
<div :span="4" class="tableCell tabelCol-4">
<div>派车人</div>
<div>派车车牌</div>
</div>
<div :span="4" class="tableCell tabelCol-6 directCol">
<span>
{{selected.dealName}}
</span>
<span>
{{selected.carPlate}}
</span>
<div :span="6" class="tableCell tabelCol-6">{{selected.dealName}}</div>
<div :span="4" class="tableCell tabelCol-4">
<div>派车车牌</div>
</div>
<div :span="10" class="tableCell tabelCol-10">{{selected.carPlate}}</div>
</div>
<div class="tableRow">
<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