|
@@ -7,44 +7,47 @@
|
|
<el-col :span="24" class="back">
|
|
<el-col :span="24" class="back">
|
|
<el-button type="primary" size="mini" @click="$router.push({ path: '/test' })">返回</el-button>
|
|
<el-button type="primary" size="mini" @click="$router.push({ path: '/test' })">返回</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="24">
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="24" class="carinfo">
|
|
|
|
+ <el-col :span="24" class="top">
|
|
|
|
+ 客户信息
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>顾客姓名</span>
|
|
<span>顾客姓名</span>
|
|
<span>{{ carinfo.name }}</span>
|
|
<span>{{ carinfo.name }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>顾客电话</span>
|
|
<span>顾客电话</span>
|
|
<span>{{ carinfo.mobile }}</span>
|
|
<span>{{ carinfo.mobile }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>车牌号</span>
|
|
<span>车牌号</span>
|
|
<span>{{ carinfo.license }}</span>
|
|
<span>{{ carinfo.license }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>车型</span>
|
|
<span>车型</span>
|
|
<span>{{ carinfo.model }}</span>
|
|
<span>{{ carinfo.model }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>车辆颜色</span>
|
|
<span>车辆颜色</span>
|
|
<span>{{ carinfo.carcolor }}</span>
|
|
<span>{{ carinfo.carcolor }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>行驶里程</span>
|
|
<span>行驶里程</span>
|
|
<span>{{ carinfo.mileage }}</span>
|
|
<span>{{ carinfo.mileage }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>VIN号</span>
|
|
<span>VIN号</span>
|
|
<span>{{ carinfo.vin }}</span>
|
|
<span>{{ carinfo.vin }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>保险日期</span>
|
|
<span>保险日期</span>
|
|
<span>{{ carinfo.insurance }}</span>
|
|
<span>{{ carinfo.insurance }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>驾驶证日期</span>
|
|
<span>驾驶证日期</span>
|
|
<span>{{ carinfo.drive }}</span>
|
|
<span>{{ carinfo.drive }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="6">
|
|
|
|
|
|
+ <el-col :span="6" class="txt textOver">
|
|
<span>行驶证日期</span>
|
|
<span>行驶证日期</span>
|
|
<span>{{ carinfo.travel }}</span>
|
|
<span>{{ carinfo.travel }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -54,6 +57,9 @@
|
|
<el-button type="primary" size="mini" @click="add">添加维修单</el-button>
|
|
<el-button type="primary" size="mini" @click="add">添加维修单</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
|
+ <el-col :span="24" class="top">
|
|
|
|
+ 维修项目
|
|
|
|
+ </el-col>
|
|
<el-table :data="list" style="width: 100%" border>
|
|
<el-table :data="list" style="width: 100%" border>
|
|
<el-table-column prop="name" label="维修项目名" align="center">
|
|
<el-table-column prop="name" label="维修项目名" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -87,6 +93,16 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+ <el-col :span="24" class="page">
|
|
|
|
+ <el-pagination
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ :current-page="currentPage"
|
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page-size="pageSize"
|
|
|
|
+ >
|
|
|
|
+ </el-pagination>
|
|
|
|
+ </el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -111,6 +127,9 @@ export default {
|
|
// 维修单
|
|
// 维修单
|
|
list: [],
|
|
list: [],
|
|
total: 0,
|
|
total: 0,
|
|
|
|
+ currentPage: 0,
|
|
|
|
+ pageSize: 7,
|
|
|
|
+ skip: '',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
@@ -121,7 +140,8 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
...car(['fetch']),
|
|
...car(['fetch']),
|
|
...repair({ repairquery: 'query', repairdelete: 'delete', repairupdate: 'update', repaircreate: 'create' }),
|
|
...repair({ repairquery: 'query', repairdelete: 'delete', repairupdate: 'update', repaircreate: 'create' }),
|
|
- async search({ skip = 0, limit = 5, ...info } = {}) {
|
|
|
|
|
|
+ async search({ skip = 0, limit = 7, ...info } = {}) {
|
|
|
|
+ skip = this.skip;
|
|
let res = await this.fetch(this.id);
|
|
let res = await this.fetch(this.id);
|
|
let arr = await this.repairquery({ uid: this.id, skip, limit });
|
|
let arr = await this.repairquery({ uid: this.id, skip, limit });
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
@@ -189,6 +209,10 @@ export default {
|
|
this.list.splice(index, 1);
|
|
this.list.splice(index, 1);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ handleCurrentChange(currentPage) {
|
|
|
|
+ this.$set(this, `skip`, (currentPage - 1) * this.pageSize);
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
@@ -203,8 +227,45 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
|
+.textOver {
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+}
|
|
.back {
|
|
.back {
|
|
text-align: right;
|
|
text-align: right;
|
|
padding: 10px 0;
|
|
padding: 10px 0;
|
|
}
|
|
}
|
|
|
|
+.page {
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding: 15px 0;
|
|
|
|
+}
|
|
|
|
+.carinfo {
|
|
|
|
+ .txt {
|
|
|
|
+ height: 40px;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
+ span:nth-child(1) {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 30%;
|
|
|
|
+ color: #fff;
|
|
|
|
+ text-align: center;
|
|
|
|
+ background-color: #409eff;
|
|
|
|
+ }
|
|
|
|
+ span:nth-child(2) {
|
|
|
|
+ padding: 0 10px;
|
|
|
|
+ height: 40px;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.top {
|
|
|
|
+ height: 40px;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ background-color: #409eff;
|
|
|
|
+ color: #fff;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|