车辆页面绑定客户可用
This commit is contained in:
parent
e00cfc01dd
commit
8453a68898
@ -34,6 +34,14 @@ export function getCarMain(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export function bindCustomerCar(data) {
|
||||
return request({
|
||||
url: '/base/carMain/bindCustomerCar',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得车辆信息分页
|
||||
export function getCarMainPage(params) {
|
||||
return request({
|
||||
|
@ -57,7 +57,11 @@
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车标图片" align="center" prop="logoImg" />
|
||||
<el-table-column label="车标图片" align="center" prop="logoImg" >
|
||||
<template v-slot="scope">
|
||||
<el-image style="width: 7rem; height: 7rem" :preview-src-list="[scope.row.logoImg]" :src="scope.row.logoImg" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="品牌名称" align="center" prop="brandName">
|
||||
<template v-slot="scope">
|
||||
<router-link class="link-type" @click="routeToData" :to="'car-model' + '?brandId=' + scope.row.id">
|
||||
|
@ -71,6 +71,7 @@
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
<CarBrandSelector/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -78,11 +79,13 @@
|
||||
<script>
|
||||
import * as CarMainApi from '@/api/base/carmain';
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
import {getDictDatas, DICT_TYPE} from '@/utils/dict'
|
||||
import {getDictDatas, DICT_TYPE} from '@/utils/dict';
|
||||
import CarBrandSelector from '@/layout/components/CarBrandSelector';
|
||||
export default {
|
||||
name: "CarMainForm",
|
||||
components: {
|
||||
ImageUpload,
|
||||
CarBrandSelector,
|
||||
|
||||
},
|
||||
data() {
|
||||
|
267
src/views/base/carmain/components/ChooseCustomerDraw.vue
Normal file
267
src/views/base/carmain/components/ChooseCustomerDraw.vue
Normal file
@ -0,0 +1,267 @@
|
||||
<template>
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-drawer title="选择车辆" size="60%" :visible.sync="drawVisible" @close="cancelForm">
|
||||
<div style="padding: 0 10px;margin-bottom: 70px">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<el-form-item label="客户名称" prop="cusName" label-width="80">
|
||||
<el-input v-model="queryParams.cusName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="联系方式" prop="phoneNumber" label-width="90">
|
||||
<el-input v-model="queryParams.phoneNumber" placeholder="请输入联系方式" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idCard" label-width="90">
|
||||
<el-input v-model="queryParams.idCard" placeholder="请输入身份证号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="发动机号" prop="engineNumber" label-width="90">
|
||||
<el-input v-model="queryParams.engineNumber" placeholder="请输入发动机号" clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
|
||||
v-hasPermi="['base:car-main:create']">新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="3" v-for="cusItem in multipleSelection" :key="cusItem.id" class="el-col-item">
|
||||
<el-tag :key="cusItem.id" type="danger" @close="tagClose(cusItem)" closable>
|
||||
{{ cusItem.cusName }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table ref="multipleTable" height="460" v-loading="formLoading" :data="list" :stripe="true" @select="selectRow"
|
||||
@select-all="handleSelectAll" :show-overflow-tooltip="true">
|
||||
<el-table-column type="selection" width="55">
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" align="center" prop="cusName" />
|
||||
<el-table-column width="80" label="性别" align="center" prop="sex">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.DICT_SYS_USER_SEX" :value="scope.row.sex" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150" label="联系方式" align="center" prop="phoneNumber" />
|
||||
<el-table-column width="150" label="生日" align="center" prop="birthday">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150" label="最近办理业务" align="center" prop="nearDoContent">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.DICT_CUS_BUSI_TYPE" :value="scope.row.nearDoContent" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</div>
|
||||
<div
|
||||
style="position: absolute;bottom: 0;width: 100%;right: 0;padding: 5px 20px 0;z-index: 999;background: white;text-align: right">
|
||||
<div class="demo-drawer__footer">
|
||||
<el-button @click="cancelForm">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<CustomerMainForm ref="formRef" @success="getList"/>
|
||||
|
||||
</el-drawer>
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as CustomerMainApi from '@/api/base/customer';
|
||||
import * as CarMainApi from '@/api/base/carmain';
|
||||
import CustomerMainForm from '@/views/base/customer/CustomerMainForm.vue';
|
||||
export default {
|
||||
name: "ChooseCarDraw",
|
||||
components: { CustomerMainForm },
|
||||
data() {
|
||||
return {
|
||||
// 弹出层标题
|
||||
// 是否显示弹出层
|
||||
drawVisible: false,
|
||||
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
formLoading: false,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
//回参
|
||||
formData: {},
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 车辆信息列表
|
||||
list: [],
|
||||
multipleSelection: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
licenseNumber: null,
|
||||
carModel: null,
|
||||
carBrand: null,
|
||||
engineNumber: null,
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
/** 打开弹窗 */
|
||||
async open(multipleSelection) {
|
||||
this.drawVisible = true;
|
||||
this.formLoading = true;
|
||||
this.reset();
|
||||
try {
|
||||
const res = await CustomerMainApi.getCustomerMainPage(this.queryParams);;
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
this.multipleSelection = JSON.parse(JSON.stringify(multipleSelection))
|
||||
this.defaultChecked(multipleSelection)
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
},
|
||||
/**标签删除事件*/
|
||||
tagClose(row) {
|
||||
const that = this;
|
||||
let id1 = this.multipleSelection.findIndex(item => {
|
||||
if (item.id == row.id) {
|
||||
this.$nextTick(() => {
|
||||
that.$refs.multipleTable.toggleRowSelection(
|
||||
this.list.find( // 这是弹框表格的数据
|
||||
cusItem => item.id === cusItem.id
|
||||
), false);
|
||||
});
|
||||
return true
|
||||
}
|
||||
})
|
||||
this.multipleSelection.splice(id1, 1)
|
||||
},
|
||||
|
||||
/**选中*/
|
||||
selectRow(val, row) {
|
||||
//当前点击是否勾选
|
||||
let selectBool = val.length && val.indexOf(row) !== -1
|
||||
if (!selectBool) {
|
||||
//取消勾选
|
||||
this.multipleSelection.forEach((item, i) => {
|
||||
if (item.id == row.id) {
|
||||
this.multipleSelection.splice(i, 1)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
//选中
|
||||
this.multipleSelection.push(row)
|
||||
}
|
||||
},
|
||||
|
||||
/**全选*/
|
||||
handleSelectAll(val) {
|
||||
if (val.length == this.list.length) { //全选
|
||||
this.multipleSelection = this.multipleSelection.concat(val)
|
||||
//去重
|
||||
let obj = {}
|
||||
let result = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
if (!obj[item.id]) {
|
||||
result.push(item)
|
||||
obj[item.id] = true
|
||||
}
|
||||
})
|
||||
this.multipleSelection = result
|
||||
} else { //取消全选
|
||||
this.list.forEach(item => {
|
||||
this.multipleSelection.forEach((multItem, i) => {
|
||||
if (item.id == multItem.id) {
|
||||
this.multipleSelection.splice(i, 1)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**设置默认选中*/
|
||||
defaultChecked(multipleSelection) {
|
||||
const that = this;
|
||||
this.$nextTick(() => {
|
||||
that.list.forEach((v, i) => {
|
||||
multipleSelection.map(item => {
|
||||
if (item.id === v.id) {
|
||||
that.$refs.multipleTable.toggleRowSelection(v, true);
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
cancelForm() {
|
||||
this.drawVisible = false
|
||||
},
|
||||
|
||||
/** 添加/修改操作 */
|
||||
openForm(id) {
|
||||
this.$refs["formRef"].open(id);
|
||||
},
|
||||
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
try {
|
||||
this.formLoading = true
|
||||
const res = await CustomerMainApi.getCustomerMainPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
this.defaultChecked(this.multipleSelection)
|
||||
} finally {
|
||||
this.formLoading = false
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/**重置参数*/
|
||||
reset() {
|
||||
this.queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
licenseNumber: null,
|
||||
carModel: null,
|
||||
carBrand: null,
|
||||
engineNumber: null,
|
||||
}
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.drawVisible = false
|
||||
this.$emit('success', this.multipleSelection)
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-col-item{
|
||||
width: auto;
|
||||
}
|
||||
</style>
|
189
src/views/base/carmain/components/CustomerCarForm.vue
Normal file
189
src/views/base/carmain/components/CustomerCarForm.vue
Normal file
@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>车辆基本信息</span>
|
||||
</div>
|
||||
<el-descriptions class="margin-top" :column="3" border>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
车牌号
|
||||
</template>
|
||||
{{formData.licenseNumber}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
车辆品牌
|
||||
</template>
|
||||
<!-- <dict-tag :type="DICT_TYPE.DICT_SYS_USER_SEX" :value="formData.sex" /> -->
|
||||
{{formData.carBrand}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
车辆型号
|
||||
</template>
|
||||
<!-- <dict-tag :type="DICT_TYPE.DICT_SYS_USER_SEX" :value="formData.sex" /> -->
|
||||
{{formData.carModel }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
车架号
|
||||
</template>
|
||||
{{formData.vin}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
发动机号码
|
||||
</template>
|
||||
{{formData.engineNumber}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
车辆注册日期
|
||||
</template>
|
||||
{{ parseTime(formData.carRegisterDate,'{y}-{m}-{d}') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
车辆性质
|
||||
</template>
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_NATURE" :value="formData.carNature" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
车辆类别
|
||||
</template>
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_CATEGORY" :value="formData.carCategory" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
最近办理业务
|
||||
</template>
|
||||
<dict-tag :type="DICT_TYPE.DICT_CUS_BUSI_TYPE" :value="formData.recentlyHandledBusiness" />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>客户信息</span>
|
||||
<el-button @click="openChooseCustomer" style="float: right; padding: 3px 0" type="text">选择客户</el-button>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-empty v-if="formData.cusList.length == 0" description="暂无客户信息" :image-size="100"></el-empty>
|
||||
<el-col v-for="item in formData.cusList" :span="8">
|
||||
<el-card shadow="hover">
|
||||
<el-descriptions>
|
||||
<template slot="title">
|
||||
{{item.cusName}}({{ getDictDataLabel(DICT_TYPE.DICT_SYS_USER_SEX,item.sex) }})
|
||||
<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.phoneNumber}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<ChooseCustomerDraw @success="chooseCar" ref="CustomerDraw"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as CarMainApi from '@/api/base/carmain';
|
||||
import ChooseCustomerDraw from '@/views/base/carmain/components/ChooseCustomerDraw.vue';
|
||||
import { getDictDatas, DICT_TYPE, getDictData } from '@/utils/dict';
|
||||
|
||||
export default {
|
||||
name: "CustomerMainForm",
|
||||
components: {
|
||||
ChooseCustomerDraw
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 弹出层标题
|
||||
dialogTitle: "",
|
||||
// 是否显示弹出层
|
||||
dialogVisible: false,
|
||||
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
formLoading: false,
|
||||
//回参
|
||||
formData:{
|
||||
cusList:[],
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
getDictDataLabel(type,data){
|
||||
let resultObj = getDictData(type, data);
|
||||
|
||||
return resultObj.label;
|
||||
},
|
||||
/** 打开弹窗 */
|
||||
async open(id) {
|
||||
this.dialogVisible = true;
|
||||
this.formLoading = true;
|
||||
this.reset()
|
||||
try{
|
||||
const res = await CarMainApi.getCarMain(id);
|
||||
this.formData = res.data
|
||||
this.dialogTitle = "绑定客户";
|
||||
}finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
},
|
||||
/**删除卡片*/
|
||||
deleteCar(row){
|
||||
this.formData.cusList.forEach((item,index) => {
|
||||
if (item.id == row.id){
|
||||
this.formData.cusList.splice(index,1)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**重置*/
|
||||
reset(){
|
||||
this.formData={
|
||||
cusList:[],
|
||||
}
|
||||
},
|
||||
|
||||
openChooseCustomer(){
|
||||
this.$refs["CustomerDraw"].open(this.formData.cusList);
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择客户
|
||||
*/
|
||||
chooseCar(chooseCuses){
|
||||
this.formData.cusList = chooseCuses
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
async submitForm() {
|
||||
this.formLoading = true
|
||||
try{
|
||||
const data = this.formData;
|
||||
await CarMainApi.bindCustomerCar(data);
|
||||
this.$modal.msgSuccess("绑定成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
}finally {
|
||||
this.formLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
@ -171,17 +171,17 @@
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:car-main:delete']">删除</el-button>
|
||||
|
||||
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)"
|
||||
v-hasPermi="['base:car-main:update']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="bindCustomer" size="mini" type="text" icon="el-icon-truck"
|
||||
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)"
|
||||
v-hasPermi="['base:car-main:update']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="bindCustomer" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:customer-main:bindCustomer']">绑定客户</el-dropdown-item>
|
||||
<el-dropdown-item command="markSign" size="mini" type="text" icon="el-icon-truck"
|
||||
<el-dropdown-item command="markSign" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:customer-main:markSign']">打标签</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
|
||||
</el-dropdown>
|
||||
</el-dropdown-menu>
|
||||
|
||||
</el-dropdown>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -191,10 +191,12 @@
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<CarMainForm ref="formRef" @success="getList" />
|
||||
<CustomerCarForm ref="bindCustomerFormRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CustomerCarForm from '@/views/base/carmain/components/CustomerCarForm.vue';
|
||||
import * as CarMainApi from '@/api/base/carmain';
|
||||
import CarMainForm from './CarMainForm.vue';
|
||||
import { getDictDatas, DICT_TYPE, getDictData } from '@/utils/dict';
|
||||
@ -202,6 +204,7 @@ export default {
|
||||
name: "CarMain",
|
||||
components: {
|
||||
CarMainForm,
|
||||
CustomerCarForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -246,25 +249,27 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/**更多操作*/
|
||||
handleCommand(command, index, row) {
|
||||
/**更多操作*/
|
||||
handleCommand(command, index, row) {
|
||||
switch (command) {
|
||||
case 'markSign':
|
||||
this.openForm(row.id);
|
||||
break;
|
||||
case 'bindCustomer':
|
||||
//绑定车辆信息
|
||||
this.openForm(row.id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
//打标签
|
||||
case 'markSign': this.openForm(row.id); break;
|
||||
|
||||
//绑定客户信息
|
||||
case 'bindCustomer': this.openFormBindCustomer(row.id); break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
},
|
||||
openFormBindCustomer(id) {
|
||||
this.$refs["bindCustomerFormRef"].open(id);
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
debugger;
|
||||
|
||||
try {
|
||||
debugger;
|
||||
|
||||
this.loading = true;
|
||||
const res = await CarMainApi.getCarMainPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
@ -275,7 +280,7 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
debugger;
|
||||
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
@ -291,8 +296,6 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
debugger;
|
||||
|
||||
|
||||
let optionValue = 0;
|
||||
await this.$confirm('是否确认删除该条车辆信息?', '提示', {
|
||||
@ -300,7 +303,7 @@ debugger;
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
debugger;
|
||||
|
||||
optionValue = 1;
|
||||
}).catch(() => {
|
||||
// this.$message({
|
||||
@ -318,7 +321,7 @@ debugger;
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
debugger;
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
@ -331,7 +334,7 @@ debugger;
|
||||
})
|
||||
|
||||
} else {
|
||||
debugger;
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
|
Loading…
Reference in New Issue
Block a user