调整
This commit is contained in:
parent
cf1f8cca15
commit
2dd95f43f9
@ -42,13 +42,6 @@ export function getCustomerMain(id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取经办人信息
|
||||
export function getCustomerMainAttn(deptCode) {
|
||||
return request({
|
||||
url: '/base/custom/getAttn?deptCode=' + deptCode,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getCustomerMainPage(params) {
|
||||
return request({
|
||||
|
@ -140,7 +140,7 @@ export default {
|
||||
const res = await CarMainApi.getCarMainPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
this.multipleSelection = multipleSelection
|
||||
this.multipleSelection = JSON.parse(JSON.stringify(multipleSelection))
|
||||
this.defaultChecked(multipleSelection)
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
@ -148,18 +148,19 @@ export default {
|
||||
},
|
||||
/**标签删除事件*/
|
||||
tagClose(row){
|
||||
console.log(row)
|
||||
const that = this;
|
||||
let id1 = this.multipleSelection.findIndex(item => {
|
||||
if (item.id == row.id) {
|
||||
this.$nextTick(() => {
|
||||
that.$refs.multipleTable.toggleRowSelection(
|
||||
this.list.find( // 这是弹框表格的数据
|
||||
carItem => item.id === carItem.id
|
||||
), false);
|
||||
});
|
||||
return true
|
||||
}
|
||||
})
|
||||
this.multipleSelection.splice(id1, 1)
|
||||
const that = this;
|
||||
this.$nextTick(() => {
|
||||
that.$refs.multipleTable.toggleRowSelection(row, false);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
/**选中*/
|
||||
|
@ -63,6 +63,7 @@
|
||||
<el-descriptions>
|
||||
<template slot="title">
|
||||
{{item.carBrand}}({{item.carModel}})
|
||||
<el-button @click="deleteCar(item)" style="text-align: right" size="mini" type="danger" icon="el-icon-delete" circle></el-button>
|
||||
</template>
|
||||
<el-descriptions-item label="车主"> <el-checkbox true-label="1" false-label="0" v-model="item.isOwner" /></el-descriptions-item>
|
||||
<el-descriptions-item label="车牌号">{{item.licenseNumber}}</el-descriptions-item>
|
||||
@ -121,6 +122,15 @@ export default {
|
||||
this.formLoading = false;
|
||||
}
|
||||
},
|
||||
/**删除卡片*/
|
||||
deleteCar(row){
|
||||
this.formData.carList.forEach((item,index) => {
|
||||
if (item.id == row.id){
|
||||
this.formData.carList.splice(index,1)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**重置*/
|
||||
reset(){
|
||||
this.formData={
|
||||
|
@ -33,13 +33,14 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table @expand-change="expandChange" v-loading="loading" :data="list" :stripe="true"
|
||||
<el-table row-key="id" v-loading="loading" :data="list" :stripe="true"
|
||||
:show-overflow-tooltip="true">
|
||||
<!--表格展开行-->
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-table
|
||||
:data="attnList"
|
||||
row-key="id"
|
||||
:data="scope.row.attnList"
|
||||
border
|
||||
size="mini"
|
||||
style="width: 100%">
|
||||
@ -77,8 +78,8 @@
|
||||
|
||||
<el-table-column width="200" label="客户名称" align="center" prop="cusName"/>
|
||||
<el-table-column width="110" label="联系方式" align="center" prop="phoneNumber"/>
|
||||
<el-table-column width="280" label="服务内容" align="left" prop="serContents"/>
|
||||
<el-table-column width="280" label="地址" align="left" prop="address"/>
|
||||
<el-table-column width="230" label="服务内容" align="left" prop="serContents"/>
|
||||
<el-table-column width="300" label="地址" align="left" prop="address"/>
|
||||
<el-table-column label="最近业务办理时间" align="center" prop="nearDoTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.nearDoTime) }}</span>
|
||||
@ -95,20 +96,25 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column fixed="right" width="300" label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-truck" @click="bindCar(scope.row)"
|
||||
v-hasPermi="['base:customer-main:car']">绑定车辆
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-s-custom" @click="openFormAttn(scope.row)"
|
||||
v-hasPermi="['base:customer-main:attn']">经办人管理
|
||||
</el-button>
|
||||
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:customer-main:update']">修改
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:customer-main:delete']">删除
|
||||
</el-button>
|
||||
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)" v-hasPermi="['base:customer-main:update', 'base:customer-main:delete']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="bindCar" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:customer-main:car']">绑定车辆</el-dropdown-item>
|
||||
<el-dropdown-item command="openFormAttn" size="mini" type="text" icon="el-icon-s-custom"
|
||||
v-hasPermi="['base:customer-main:attn']">经办人</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -148,8 +154,6 @@ export default {
|
||||
total: 0,
|
||||
// 客户管理列表
|
||||
list: [],
|
||||
//经办人列表
|
||||
attnList: [],
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
@ -185,6 +189,22 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/**更多操作*/
|
||||
handleCommand(command, index, row) {
|
||||
switch (command) {
|
||||
case 'bindCar':
|
||||
//绑定车辆信息
|
||||
this.bindCar(row);
|
||||
break;
|
||||
case 'openFormAttn':
|
||||
//经办人管理
|
||||
this.openFormAttn(row);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 绑定车辆
|
||||
*/
|
||||
@ -204,11 +224,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
/**展开行*/
|
||||
async expandChange(row, expandedRows) {
|
||||
const res = await CustomerMainApi.getCustomerMainAttn(row.deptCode);
|
||||
this.attnList = res.data
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
|
@ -76,19 +76,24 @@
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="180"
|
||||
width="150"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-truck" @click="bindCar(scope.row)"
|
||||
v-hasPermi="['base:customer-main:car']">绑定车辆
|
||||
</el-button>
|
||||
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:customer-main:update']">修改
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:customer-main:delete']">删除
|
||||
</el-button>
|
||||
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)" v-hasPermi="['base:customer-main:update', 'base:customer-main:delete']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="bindCar" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:customer-main:car']">绑定车辆</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -164,6 +169,17 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/**更多操作*/
|
||||
handleCommand(command, index, row) {
|
||||
switch (command) {
|
||||
case 'bindCar':
|
||||
//绑定车辆信息
|
||||
this.bindCar(row);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
try {
|
||||
|
@ -71,19 +71,24 @@
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="180"
|
||||
width="150"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-truck" @click="bindCar(scope.row)"
|
||||
v-hasPermi="['base:customer-main:car']">绑定车辆
|
||||
</el-button>
|
||||
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:customer-main:update']">修改
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:customer-main:delete']">删除
|
||||
</el-button>
|
||||
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)" v-hasPermi="['base:customer-main:update', 'base:customer-main:delete']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="bindCar" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:customer-main:car']">绑定车辆</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -158,6 +163,17 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/**更多操作*/
|
||||
handleCommand(command, index, row) {
|
||||
switch (command) {
|
||||
case 'bindCar':
|
||||
//绑定车辆信息
|
||||
this.bindCar(row);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 绑定车辆
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user