Browse Source

添加客户保率

test
caoyizhong 2 years ago
parent
commit
8661229590
  1. 2
      src/api/basicdata/basicHistoricalContract.js
  2. 50
      src/api/basicdata/basicdataSupportValue.js
  3. 2
      src/option/basicdata/basicHistoricalContract.js
  4. 23
      src/option/basicdata/basicStoreContact.js
  5. 169
      src/option/basicdata/basicdataSupportValue.js
  6. 9
      src/views/basicdata/brand/basicClient.vue
  7. 38
      src/views/basicdata/brand/basicHistoricalContract.vue
  8. 15
      src/views/basicdata/brand/basicShop.vue
  9. 64
      src/views/basicdata/brand/basicStoreContact.vue
  10. 426
      src/views/basicdata/brand/basicdataSupportValue.vue

2
src/api/basicdata/basicHistoricalContract.js

@ -2,7 +2,7 @@ import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/basicdataHistoricalContract/list',
url: '/api/logpm-basicdata/basicdataHistoricalContract/pageList',
method: 'get',
params: {
...params,

50
src/api/basicdata/basicdataSupportValue.js

@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/basicdataSupportValue/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/logpm-basicdata/basicdataSupportValue/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/logpm-basicdata/basicdataSupportValue/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/logpm-basicdata/basicdataSupportValue/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/logpm-basicdata/basicdataSupportValue/submit',
method: 'post',
data: row
})
}

2
src/option/basicdata/basicHistoricalContract.js

@ -90,7 +90,7 @@ export default {
},
{
label: "客户名称",
prop: "clientId",
prop: "clientName",
search: true,
},
{

23
src/option/basicdata/basicStoreContact.js

@ -16,12 +16,7 @@ export default {
display: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
display: false,
hide: true,
},
{
label: "更新人",
prop: "updateUser",
@ -88,11 +83,11 @@ export default {
display: false,
hide: true,
},
{
label: "门店ID",
prop: "shopId",
search: true,
},
// {
// label: "门店ID",
// prop: "shopId",
// search: true,
// },
{
label: "联系人",
prop: "linkman",
@ -103,5 +98,11 @@ export default {
prop: "phone",
search: true,
},
{
label: "创建时间",
prop: "createTime",
display: false,
hide: false,
},
]
}

169
src/option/basicdata/basicdataSupportValue.js

@ -0,0 +1,169 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: true,
selection: true,
dialogClickModal: false,
column: [
{
label: "主键",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "租户号",
prop: "tenantId",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "更新人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "更新时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "收货用户名称",
prop: "userName",
type: "input",
search: true,
},
{
label: "保费率",
prop: "premiumRate",
type: "input",
},
{
label: "收货用户地址",
prop: "userAdderss",
type: "input",
search: true,
},
{
label: "收货用户电话",
prop: "userPhone",
type: "input",
search: true,
},
{
label: "预留1",
prop: "reserve1",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留2",
prop: "reserve2",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留3",
prop: "reserve3",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留4",
prop: "reserve4",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留5",
prop: "reserve5",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "客户名称",
prop: "clientId",
type: "input",
search: true,
},
]
}

9
src/views/basicdata/brand/basicClient.vue

@ -368,16 +368,17 @@ export default {
}
},
created() {
},
mounted () {
this.init();
getLazyTreeAll().then(res => {
if(res.data.success){
this.optioner = res.data.data;
this.onLoad(this.page);
}
})
},
mounted () {
this.init();
this.onLoad(this.page);
},
computed: {
...mapGetters(["permission"]),
ids () {

38
src/views/basicdata/brand/basicHistoricalContract.vue

@ -7,7 +7,7 @@
<el-form-item label="客户名称:">
<el-input v-model="query.clientId" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item label="合同开始时间:">
<el-form-item label="合同时间:">
<!-- <el-input v-model="query.contractStartTime" placeholder="请输入合同开始时间"></el-input>-->
<div class="block">
<!-- <span class="demonstration">With quick options</span>-->
@ -36,15 +36,15 @@
<el-row>
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>
</div>
<!-- <div class="avue-crud__left">-->
<!-- <el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>-->
<!-- <el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>-->
<!-- </div>-->
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button>
<el-button icon="el-icon-search" @click="searchHide" circle></el-button>
</div>
<!-- <div class="avue-crud__right">-->
<!-- <el-button icon="el-icon-refresh" @click="searchChange" circle></el-button>-->
<!-- <el-button icon="el-icon-search" @click="searchHide" circle></el-button>-->
<!-- </div>-->
</div>
</el-row>
<el-row>
@ -55,7 +55,7 @@
:height="height"
style="width: 100%"
:border="option.border">
<el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>
<!-- <el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>-->
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
<el-table-column v-if="option.index" label="序号" type="index" width="60" align="center">
</el-table-column>
@ -72,8 +72,8 @@
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #="{row}">
<el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>
<el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>
<el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button>
<!-- <el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>-->
<!-- <el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button>-->
</template>
</el-table-column>
</el-table>
@ -96,17 +96,17 @@
<!-- 表单模块 -->
<el-dialog :title="title"
v-model="box"
width="50%"
width="40%"
:before-close="beforeClose"
append-to-body>
<el-form :disabled="view" ref="form" :model="form" label-width="80px">
<el-form :disabled="view" ref="form" :model="form" label-width="100px">
<!-- 表单字段 -->
<el-form-item label="客户名称" prop="clientId">
<el-input v-model="form.clientId" placeholder="请输入客户名称"/>
</el-form-item>
<el-form-item label="合同开始时间" prop="contractStartTime">
<!-- <el-input v-model="form.contractStartTime" placeholder="请输入合同开始时间"/>-->
<div class="demo-date-picker" style="width: 60%">
<div class="demo-date-picker" style="width: 100%">
<div class="block">
<!-- <span class="demonstration">Default</span>-->
<el-date-picker
@ -119,7 +119,7 @@
</el-form-item>
<el-form-item label="合同结束时间" prop="contractEntTime">
<!-- <el-input v-model="form.contractEntTime" placeholder="请输入合同结束时间"/>-->
<div class="demo-date-picker" style="width: 60%">
<div class="demo-date-picker" style="width: 100%">
<div class="block">
<!-- <span class="demonstration">Default</span>-->
<el-date-picker
@ -240,6 +240,7 @@ export default {
},
searchReset () {
this.query = {};
this.dataShi = '';
this.page.currentPage = 1;
this.onLoad(this.page);
},
@ -282,6 +283,7 @@ export default {
this.box = true;
getDetail(row.id).then(res => {
this.form = res.data.data;
this.form.clientId = row.clientName;
});
},
handleDelete () {
@ -345,6 +347,10 @@ export default {
},
onLoad (page, params = {}) {
this.loading = true;
if(!!this.dataShi){
this.query.contractStartTime = this.dataShi[0];
this.query.contractEntTime = this.dataShi[1];
}
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;

15
src/views/basicdata/brand/basicShop.vue

@ -102,7 +102,7 @@
<el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>
<el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>
<el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button>
<!-- <el-button type="primary" text icon="el-icon-setting" @click="handleDrawer(row)">子表配置</el-button>-->
<el-button type="primary" text icon="el-icon-setting" @click="handleDrawer(row)">联系人</el-button>
</template>
</el-table-column>
</el-table>
@ -220,13 +220,13 @@
</template>
</el-dialog>
<el-drawer
title="子表操作"
title="联系人操作"
append-to-body
size="60%"
size="40%"
v-model="drawer"
:direction="direction"
:before-close="handleDrawerClose">
<BasicStoreBrandSub :mainId="basicShopId"></BasicStoreBrandSub>
<BasicStoreContact :mainId="basicShopId"></BasicStoreContact>
</el-drawer>
</div>
</basic-container>
@ -236,7 +236,7 @@
import {getList, getDetail, add, update, remove} from "@/api/basicdata/basicShop";
import option from "@/option/basicdata/basicShop";
import {mapGetters} from "vuex";
import BasicStoreBrandSub from "@/views/basicdata/brand/basicStoreBrandSub.vue";
import BasicStoreContact from "@/views/basicdata/brand/BasicStoreContact.vue";
import { getLazyTreeAll } from '@/api/base/region';
import { selectName } from "@/api/basicdata/basicClient";
@ -244,7 +244,7 @@ import { selectName } from "@/api/basicdata/basicClient";
export default {
components:{
BasicStoreBrandSub
BasicStoreContact
},
data () {
return {
@ -320,12 +320,13 @@ export default {
getLazyTreeAll().then(res => {
if(res.data.success){
this.optioner = res.data.data;
this.onLoad(this.page);
}
})
},
mounted () {
this.init();
this.onLoad(this.page);
},
computed: {
...mapGetters(["permission"]),

64
src/views/basicdata/brand/basicStoreContact.vue

@ -1,25 +1,25 @@
<template>
<basic-container>
<div class="avue-crud">
<el-row :hidden="!search" style="padding:6px 18px">
<!-- 查询模块 -->
<el-form :inline="true" :model="query">
<el-form-item label="门店ID:">
<el-input v-model="query.shopId" placeholder="请输入门店ID"></el-input>
</el-form-item>
<el-form-item label="联系人:">
<el-input v-model="query.linkman" placeholder="请输入联系人"></el-input>
</el-form-item>
<el-form-item label="联系电话:">
<el-input v-model="query.phone" placeholder="请输入联系电话"></el-input>
</el-form-item>
<!-- 查询按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset()"> </el-button>
</el-form-item>
</el-form>
</el-row>
<!-- <el-row :hidden="!search" style="padding:6px 18px">-->
<!-- &lt;!&ndash; 查询模块 &ndash;&gt;-->
<!-- <el-form :inline="true" :model="query">-->
<!-- <el-form-item label="门店ID:">-->
<!-- <el-input v-model="query.shopId" placeholder="请输入门店ID"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="联系人:">-->
<!-- <el-input v-model="query.linkman" placeholder="请输入联系人"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="联系电话:">-->
<!-- <el-input v-model="query.phone" placeholder="请输入联系电话"></el-input>-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; 查询按钮 &ndash;&gt;-->
<!-- <el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>-->
<!-- <el-button icon="el-icon-delete" @click="searchReset()"> </el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </el-row>-->
<el-row>
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
@ -30,7 +30,7 @@
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button>
<el-button icon="el-icon-search" @click="searchHide" circle></el-button>
<!-- <el-button icon="el-icon-search" @click="searchHide" circle></el-button>-->
</div>
</div>
</el-row>
@ -44,7 +44,7 @@
:border="option.border">
<el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
<el-table-column v-if="option.index" label="#" type="index" width="50" align="center">
<el-table-column v-if="option.index" label="序号" type="index" width="80" align="center">
</el-table-column>
<template v-for="(item,index) in option.column">
<!-- table字段 -->
@ -88,9 +88,9 @@
append-to-body>
<el-form :disabled="view" ref="form" :model="form" label-width="80px">
<!-- 表单字段 -->
<el-form-item label="门店ID" prop="shopId">
<el-input v-model="form.shopId" placeholder="请输入门店ID"/>
</el-form-item>
<!-- <el-form-item label="门店ID" prop="shopId">-->
<!-- <el-input v-model="form.shopId" placeholder="请输入门店ID"/>-->
<!-- </el-form-item>-->
<el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人"/>
</el-form-item>
@ -116,6 +116,11 @@ import option from "@/option/basicdata/basicStoreContact";
import { mapGetters } from "vuex";
export default {
props: {
mainId: {
type: String
},
},
data () {
return {
height: 0,
@ -161,6 +166,15 @@ export default {
return ids.join(",");
}
},
watch:{
mainId: {
handler(newVal, oldVal) {
// console.log("");
this.onLoad(this.page);
}
}
},
methods: {
init () {
this.height = this.setPx(document.body.clientHeight - 340);
@ -178,6 +192,7 @@ export default {
},
handleSubmit () {
if (!this.form.id) {
this.form.shopId = this.mainId; //ID
add(this.form).then(() => {
this.box = false;
this.onLoad(this.page);
@ -278,6 +293,7 @@ export default {
},
onLoad (page, params = {}) {
this.loading = true;
this.query.shopId = this.mainId; //ID
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;

426
src/views/basicdata/brand/basicdataSupportValue.vue

@ -0,0 +1,426 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<el-button type="danger"
icon="el-icon-delete"
plain
v-if="permission.basicdataSupportValue_delete"
@click="handleDelete">
</el-button>
<!-- <el-button type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- @click="handleExport"> -->
<!-- </el-button>-->
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/basicdata/basicdataSupportValue";
// import option from "@/option/basicdata/basicdataSupportValue";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
indexLabel:'序号',
indexWidth: '80',
index: true,
viewBtn: true,
labelWidth: 130,
selection: true,
dialogClickModal: false,
column: [
{
label: "主键",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "租户号",
prop: "tenantId",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "更新人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "更新时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "收货用户名称",
prop: "userName",
type: "input",
search: true,
},
{
label: "保费率",
prop: "premiumRate",
type: "input",
},
{
label: "收货用户地址",
prop: "userAdderss",
type: "input",
search: true,
},
{
label: "收货用户电话",
prop: "userPhone",
type: "input",
search: true,
},
{
label: "预留1",
prop: "reserve1",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留2",
prop: "reserve2",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留3",
prop: "reserve3",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留4",
prop: "reserve4",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留5",
prop: "reserve5",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "客户名称",
prop: "clientId",
type: "select",
search: true,
remote: true,
props: {
label: 'clientName',
value: 'id'
},
dicUrl: `/api/logpm-basicdata/basicdataClient/listName?name={{key}}`,
rules: [
{
required: true,
message: '请选择客户',
trigger: 'blur'
}
]
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: false,
},
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.basicdataSupportValue_add, false),
viewBtn: this.validData(this.permission.basicdataSupportValue_view, false),
delBtn: this.validData(this.permission.basicdataSupportValue_delete, false),
editBtn: this.validData(this.permission.basicdataSupportValue_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/blade-basicdataSupportValue/basicdataSupportValue/export-basicdataSupportValue?${this.website.tokenHeader}=${getToken()}`;
const {
userName,
userAdderss,
userPhone,
clientId,
} = this.query;
let values = {
userName_like: userName,
userAdderss_like: userAdderss,
userPhone_like: userPhone,
clientId_like: clientId,
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `客户基础保价表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
userName,
userAdderss,
userPhone,
clientId,
} = this.query;
let values = {
userName_like: userName,
userAdderss_like: userAdderss,
userPhone_like: userPhone,
clientId_like: clientId,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>
Loading…
Cancel
Save