调整基础数据、车船务、项目、合同
This commit is contained in:
@@ -132,7 +132,7 @@ import { getToken } from '@/utils/auth';
|
||||
import { normalizeSearchRangeParams } from '@/utils/search-range';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/accident-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/accident-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -475,6 +475,7 @@ export default {
|
||||
return {
|
||||
...this.buildQuery(),
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
@@ -483,7 +484,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/accident-record/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
'/blade-transport/accident-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '事故记录模板.xlsx');
|
||||
|
||||
@@ -118,7 +118,7 @@ import { openImportDialog } from '@/utils/import-excel';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/annual-inspection-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/annual-inspection-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -445,14 +445,14 @@ export default {
|
||||
return {
|
||||
...this.query,
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/annual-inspection-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/annual-inspection-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '年检记录模板.xlsx');
|
||||
|
||||
@@ -127,7 +127,7 @@ import { openImportDialog } from '@/utils/import-excel';
|
||||
import { downloadXls } from '@/utils/util';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/equipment-ledger';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/equipment-ledger';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -356,7 +356,12 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/equipment-ledger/export-equipment-ledger',
|
||||
{ ...this.query, ids: this.ids, [this.website.tokenHeader]: getToken() },
|
||||
{
|
||||
...this.query,
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
},
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res =>
|
||||
@@ -367,9 +372,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/equipment-ledger/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/equipment-ledger/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => downloadXls(res.data, '设备台账模板.xlsx'));
|
||||
},
|
||||
|
||||
@@ -113,7 +113,7 @@ import { openImportDialog } from '@/utils/import-excel';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/etc-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/etc-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -416,12 +416,14 @@ export default {
|
||||
return {
|
||||
...this.query,
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/etc-record/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
'/blade-transport/etc-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, 'ETC记录模板.xlsx');
|
||||
|
||||
@@ -193,7 +193,7 @@ import { getUploadHeaders } from '@/utils/upload';
|
||||
import { normalizeSearchRangeParams } from '@/utils/search-range';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { ElLoading } from 'element-plus';
|
||||
import { excelOption, option } from '@/option/vehicle/insurance-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/insurance-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -506,14 +506,14 @@ export default {
|
||||
return {
|
||||
...this.buildQuery(),
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/insurance-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/insurance-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '保险记录模板.xlsx');
|
||||
|
||||
@@ -177,6 +177,22 @@ const createTimeRangeMap = {
|
||||
createTimeRange: ['createTimeStart', 'createTimeEnd'],
|
||||
};
|
||||
|
||||
const exportColumns = [
|
||||
{ prop: 'vehicleType', label: '车船类型' },
|
||||
{ prop: 'vehicleNo', label: '车牌号/船号' },
|
||||
{ prop: 'maintainer', label: '保养人' },
|
||||
{ prop: 'maintenanceTime', label: '保养时间' },
|
||||
{ prop: 'mileage', label: '里程/航程数' },
|
||||
{ prop: 'maintenanceItem', label: '保养项目' },
|
||||
{ prop: 'cost', label: '费用' },
|
||||
{ prop: 'storeName', label: '店名' },
|
||||
{ prop: 'contactPhone', label: '联系电话' },
|
||||
{ prop: 'address', label: '地址' },
|
||||
{ prop: 'nextMaintenanceTime', label: '下次保养时间' },
|
||||
{ prop: 'nextMaintenanceMileage', label: '下次保养里程/航程' },
|
||||
{ prop: 'remark', label: '备注' },
|
||||
];
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AddressMapPicker,
|
||||
@@ -715,6 +731,12 @@ export default {
|
||||
detail.attachments = this.parseAttachments(detail.attachments);
|
||||
detail.vehicleType = detail.vehicleType || '车辆';
|
||||
detail.mileageUnit = detail.vehicleType === '船舶' ? '海里' : '公里';
|
||||
if (type === 'edit') {
|
||||
if (Number(detail.mileage) === -1) detail.mileage = '';
|
||||
if (Number(detail.nextMaintenanceMileage) === -1) {
|
||||
detail.nextMaintenanceMileage = '';
|
||||
}
|
||||
}
|
||||
this.form = detail;
|
||||
this.updateVehicleType(detail.vehicleType);
|
||||
});
|
||||
@@ -787,6 +809,7 @@ export default {
|
||||
return {
|
||||
...this.buildQuery(),
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
@@ -795,9 +818,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/maintenance-plan/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/maintenance-plan/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '保养记录模板.xlsx');
|
||||
|
||||
@@ -150,6 +150,22 @@ const createTimeRangeMap = {
|
||||
createTimeRange: ['createTimeStart', 'createTimeEnd'],
|
||||
};
|
||||
|
||||
const exportColumns = [
|
||||
{ prop: 'vehicleType', label: '车船类型' },
|
||||
{ prop: 'vehicleNo', label: '车牌号/船号' },
|
||||
{ prop: 'maintainer', label: '维修人' },
|
||||
{ prop: 'maintenanceTime', label: '维修时间' },
|
||||
{ prop: 'location', label: '维修位置' },
|
||||
{ prop: 'replacedPart', label: '更换零件' },
|
||||
{ prop: 'cost', label: '费用' },
|
||||
{ prop: 'company', label: '维修单位' },
|
||||
{ prop: 'contact', label: '联系方式' },
|
||||
{ prop: 'address', label: '地址' },
|
||||
{ prop: 'factoryTime', label: '出厂时间' },
|
||||
{ prop: 'mileage', label: '里程/航程数' },
|
||||
{ prop: 'remark', label: '备注' },
|
||||
];
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AddressMapPicker,
|
||||
@@ -321,6 +337,7 @@ export default {
|
||||
{
|
||||
label: '里程/航程数(公里)',
|
||||
prop: 'mileage',
|
||||
renderHeader: () => '里程/航程数',
|
||||
type: 'input',
|
||||
minWidth: 130,
|
||||
slot: true,
|
||||
@@ -749,6 +766,7 @@ export default {
|
||||
return {
|
||||
...this.buildQuery(),
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
@@ -757,9 +775,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/maintenance-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/maintenance-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '维修记录模板.xlsx');
|
||||
|
||||
@@ -184,7 +184,7 @@ import { getToken } from '@/utils/auth';
|
||||
import { normalizeSearchRangeParams } from '@/utils/search-range';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/mileage-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/mileage-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -531,6 +531,7 @@ export default {
|
||||
return {
|
||||
...this.buildQuery(),
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
@@ -542,7 +543,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/mileage-record/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
'/blade-transport/mileage-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '里程记录模板.xlsx');
|
||||
|
||||
@@ -145,7 +145,7 @@ import { openImportDialog } from '@/utils/import-excel';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/oil-electric-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/oil-electric-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -500,14 +500,14 @@ export default {
|
||||
return {
|
||||
...this.query,
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/oil-electric-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/oil-electric-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '油电记录模板.xlsx');
|
||||
|
||||
@@ -114,7 +114,7 @@ import { openImportDialog } from '@/utils/import-excel';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/other-expense-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/other-expense-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -465,14 +465,14 @@ export default {
|
||||
return {
|
||||
...this.buildQuery(),
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/other-expense-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/other-expense-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '其他费用记录模板.xlsx');
|
||||
|
||||
@@ -129,7 +129,7 @@ import { getToken } from '@/utils/auth';
|
||||
import { normalizeSearchRangeParams } from '@/utils/search-range';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/tire-replacement-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/tire-replacement-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -416,6 +416,7 @@ export default {
|
||||
return {
|
||||
...this.buildQuery(),
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
@@ -424,9 +425,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/tire-replacement-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/tire-replacement-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '换胎记录模板.xlsx');
|
||||
|
||||
@@ -104,7 +104,7 @@ import { getToken } from '@/utils/auth';
|
||||
import { normalizeSearchRangeParams } from '@/utils/search-range';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/transport-change-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/transport-change-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -416,6 +416,7 @@ export default {
|
||||
return {
|
||||
...this.buildQuery(),
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
@@ -424,9 +425,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/transport-change-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/transport-change-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '变更记录模板.xlsx');
|
||||
|
||||
@@ -172,7 +172,7 @@ import { normalizeSearchRangeParams } from '@/utils/search-range';
|
||||
import AddressMapPicker from '@/components/address-map-picker/main.vue';
|
||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { excelOption, option } from '@/option/vehicle/violation-record';
|
||||
import { excelOption, exportColumns, option } from '@/option/vehicle/violation-record';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -508,11 +508,11 @@ export default {
|
||||
if (type === 'add') {
|
||||
this.form = {
|
||||
vehicleType: '车辆',
|
||||
processStatus: '未处理',
|
||||
processStatus: '已处理',
|
||||
attachments: [],
|
||||
};
|
||||
this.updateVehicleTypeDisplays('车辆');
|
||||
this.updateProcessResultDisplay('未处理');
|
||||
this.updateProcessResultDisplay('已处理');
|
||||
}
|
||||
if (['edit', 'view'].includes(type)) {
|
||||
this.isDetailLoading = true;
|
||||
@@ -598,6 +598,7 @@ export default {
|
||||
return {
|
||||
...this.buildQuery(),
|
||||
ids: this.ids,
|
||||
exportColumns: JSON.stringify(exportColumns),
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
};
|
||||
},
|
||||
@@ -606,9 +607,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/violation-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`,
|
||||
'/blade-transport/violation-record/export-template',
|
||||
{ exportColumns: JSON.stringify(exportColumns), [this.website.tokenHeader]: getToken() },
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '违章记录模板.xlsx');
|
||||
|
||||
Reference in New Issue
Block a user