|
@@ -25,7 +25,6 @@ import dataTable from '@/components/frame/filter-page-table.vue';
|
|
|
import dataForm from '@/components/frame/form.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: car } = createNamespacedHelpers('car');
|
|
|
-
|
|
|
import bus from '@/components/common/bus';
|
|
|
export default {
|
|
|
metaInfo() {
|
|
@@ -40,81 +39,24 @@ export default {
|
|
|
},
|
|
|
data: function() {
|
|
|
return {
|
|
|
- breadcrumbTitle: '',
|
|
|
- newdata: [
|
|
|
- // {
|
|
|
- // name: '11',
|
|
|
- // license: '22',
|
|
|
- // mobile: '33',
|
|
|
- // model: '44',
|
|
|
- // carcolor: '55',
|
|
|
- // mileage: '66',
|
|
|
- // vin: '77',
|
|
|
- // insurance: '88',
|
|
|
- // drive: '99',
|
|
|
- // travel: '00',
|
|
|
- // },
|
|
|
- ],
|
|
|
newfields: [
|
|
|
- {
|
|
|
- label: '顾客姓名',
|
|
|
- prop: 'name',
|
|
|
- filter: 'input',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '车牌号',
|
|
|
- prop: 'license',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '电话',
|
|
|
- prop: 'mobile',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '车型',
|
|
|
- prop: 'model',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '车辆颜色',
|
|
|
- prop: 'carcolor',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '行驶里程',
|
|
|
- prop: 'mileage',
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'VIN号',
|
|
|
- prop: 'vin',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '保险日期',
|
|
|
- prop: 'insurance',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '驾驶证日期',
|
|
|
- prop: 'drive',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '行驶证日期',
|
|
|
- prop: 'travel',
|
|
|
- },
|
|
|
+ { label: '顾客姓名', prop: 'name', filter: 'input' },
|
|
|
+ { label: '车牌号', prop: 'license' },
|
|
|
+ { label: '电话', prop: 'mobile' },
|
|
|
+ { label: '车型', prop: 'model' },
|
|
|
+ { label: '车辆颜色', prop: 'carcolor' },
|
|
|
+ { label: '行驶里程', prop: 'mileage' },
|
|
|
+ { label: 'VIN号', prop: 'vin' },
|
|
|
+ { label: '保险日期', prop: 'insurance' },
|
|
|
+ { label: '驾驶证日期', prop: 'drive' },
|
|
|
+ { label: '行驶证日期', prop: 'travel' },
|
|
|
],
|
|
|
newopera: [
|
|
|
- {
|
|
|
- label: '修改',
|
|
|
- // icon: 'el-icon-edit',
|
|
|
- method: 'edit',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '删除',
|
|
|
- // icon: 'el-icon-delete',
|
|
|
- method: 'delete',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '添加维修',
|
|
|
- // icon: 'el-icon-delete',
|
|
|
- method: 'repair',
|
|
|
- },
|
|
|
+ { label: '修改', method: 'edit' },
|
|
|
+ { label: '删除', method: 'delete' },
|
|
|
+ { label: '添加维修', method: 'repair' },
|
|
|
],
|
|
|
+ newdata: [],
|
|
|
total: 0,
|
|
|
coldialog: false,
|
|
|
form1: {},
|
|
@@ -130,7 +72,6 @@ export default {
|
|
|
{
|
|
|
label: '电话',
|
|
|
model: 'mobile',
|
|
|
- type: 'number',
|
|
|
options: { maxLength: 11, minLength: 11 },
|
|
|
},
|
|
|
{
|
|
@@ -185,9 +126,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- // searchUser() {
|
|
|
- // console.log('我被触发');
|
|
|
- // },
|
|
|
//关闭
|
|
|
coltoClose() {
|
|
|
this.form1 = {};
|
|
@@ -196,13 +134,11 @@ export default {
|
|
|
},
|
|
|
//修改
|
|
|
edit({ data }) {
|
|
|
- console.log(data);
|
|
|
this.coldialog = true;
|
|
|
this.$set(this, `form1`, data);
|
|
|
},
|
|
|
//添加
|
|
|
async save({ data }) {
|
|
|
- console.log(data);
|
|
|
if (data.id) {
|
|
|
const res = await this.newupdate(data);
|
|
|
if (this.$checkRes(res)) {
|