Commit 0d3f8d76 authored by 黄奎's avatar 黄奎

页面修改

parent 0ceef7e1
...@@ -296,9 +296,64 @@ export function MarketChannelStatic(data) { ...@@ -296,9 +296,64 @@ export function MarketChannelStatic(data) {
} }
/**
* 获取同行分页列表
* @param {查询参数} data
*/
export function queryCustomerCategoryPage(data) {
return request({
url: '/B2BCustomer/GetCustomerCategoryPage',
method: 'post',
data
})
}
/**
* 获取同行列表
* @param {查询参数} data
*/
export function queryCustomerCategoryList(data) {
return request({
url: '/B2BCustomer/GetCustomerCategoryList',
method: 'post',
data
})
}
/**
* 新增修改同行
* @param {查询参数} data
*/
export function saveCustomerCategory(data) {
return request({
url: '/B2BCustomer/SetCustomerCategory',
method: 'post',
data
})
}
/**
* 根据编号获取同行信息
* @param {查询参数} data
*/
export function queryCustomerCategory(data) {
return request({
url: '/B2BCustomer/GetCustomerCategory',
method: 'post',
data
})
}
/**
* 根据编号删除同行信息
* @param {查询参数} data
*/
export function deleteCustomerCategory(data) {
return request({
url: '/B2BCustomer/RemoveCustomerCategory',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<template v-slot:top> <template v-slot:top>
<q-space /> <q-space />
<div class="page-option" v-if="authObj.isShowEdit"> <div class="page-option" v-if="authObj.isShowEdit">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" @click="EditCustom(null)" label="新增客户" /> <q-btn color="accent" size="sm" class="q-mr-md" icon="add" @click="EditCustom(null)" label="新增联系人" />
<q-btn color="accent" size="sm" label="转交" :disable="selection.length == 0" icon="swap_horiz" <q-btn color="accent" size="sm" label="转交" :disable="selection.length == 0" icon="swap_horiz"
@click="isShowTrans = true"> @click="isShowTrans = true">
<q-popup-proxy :offset="[10, 10]"> <q-popup-proxy :offset="[10, 10]">
...@@ -180,7 +180,6 @@ ...@@ -180,7 +180,6 @@
field: "ApproveStateStr", field: "ApproveStateStr",
align: "left" align: "left"
}, },
{ {
name: "CreateTimeStr", name: "CreateTimeStr",
label: "加入时间", label: "加入时间",
......
<style lang="scss">
.b2bcustomlist .q-table__bottom {
min-height: 0;
}
.CustomerName {
cursor: pointer;
color: var(--q-color-primary);
}
</style>
<template>
<div class="b2bcustomlist">
<q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat selection="multiple" :class="sticky"
separator="none" :data="dataList" :columns="columns" row-key="CustomerId">
<template v-slot:top>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" @click="EditCustom(null)" label="新增客户" />
</div>
</template>
<template v-slot:body-cell-CustomerName="props">
<q-td>
<div class="CustomerName" @click="showDetail(props.row)">
{{ props.row.CustomerName }}
</div>
</q-td>
</template>
<template v-slot:body-cell-StuNum="props">
<q-td>
<div class="CustomerName" @click="showDetail(props.row, 2)">
{{ props.row.StuNum }}
</div>
</q-td>
</template>
<template v-slot:body-cell-OrderNum="props">
<q-td>
<div class="CustomerName" @click="showDetail(props.row, 3)">
{{ props.row.OrderNum }}
</div>
</q-td>
</template>
<template v-slot:body-cell-CustomerType="props">
<q-td>
<div v-if="props.row.CustomerType === 1">企业</div>
<div v-if="props.row.CustomerType === 2">学校</div>
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改" />
</q-td>
</template>
<template v-slot:bottom>
<div></div>
</template>
</q-table>
</div>
</template>
<script>
import {
queryEmployee
} from "../../api/users/user";
import {
setCustomerCareOf
} from "../../api/sale/peemanagement";
import customerEditForm from "../sale/customerEdit-form";
import customerReviewForm from "../sale/customerReview-form";
import customerInfo from "./b2bcustomerinfo/b2bCustomerInfo.vue";
export default {
props: {
dataList: {
type: Array,
default: null
},
empList: {
type: Array,
default: () => []
},
sticky: {
type: String,
default: ""
}
},
components: {
customerEditForm,
customerReviewForm,
customerInfo
},
data() {
return {
columns: [{
name: "CategoryName",
label: "同业名称",
field: "CategoryName",
align: "left"
},
{
name: "CatetoryTypeName",
label: "类型",
field: "CatetoryTypeName",
align: "left"
},
{
name: "LinkManCount",
label: "联系人数量",
field: "LinkManCount",
align: "left"
},
{
name: "StudentCount",
label: "客户数量",
field: "StudentCount",
align: "left"
},
{
name: "OrderCount",
label: "订单数量",
field: "OrderCount",
align: "left"
},
{
name: "CreateByName",
label: "创建人",
field: "CreateByName",
align: "left"
},
{
name: "CreateTime",
label: "创建时间",
field: "CreateTime",
align: "left"
},
{
name: "optioned",
label: "操作",
}
],
pageMsg: {
rowsPerPage: 12
},
loading: false,
isShowCustomForm: false,
isShowRightForm: false,
customerObj: null, //传入参数
isShowDetailForm: false,
curRowId: 0,
//权限设置
AuthorityObj: {
isShowEdit: false, //是否显示新增修改按钮
isShowAudit: false, //是否显示审批
isShowBankBook: false, //是否显示幸福存折
isShowRebate: false //是否显示返佣
},
tabId: 1,
TransferMsg: {
CustomerIds: "",
EmpId: ""
},
//员工列表
employeeList: [],
myEmployeeList: [],
isShowTrans: false
};
},
created() {
this.getEmployeeList();
},
mounted() {
console.log("this.dataList", this.dataList);
},
methods: {
//新增或者修改客户
EditCustom(obj) {
if (obj) {
this.customerObj = obj;
} else {
this.customerObj = null;
}
this.isShowCustomForm = true;
},
//客户审核
AuditCustomer(obj, Type) {
if (obj) {
this.customerObj = obj;
this.customerObj.Type = Type;
} else {
this.customerObj = null;
}
this.isShowRightForm = true;
},
//客户详情
showDetail(row, tabId = 1) {
this.curRowId = row.CustomerId;
this.tabId = tabId;
this.isShowDetailForm = true;
},
//删除客户
RemoveCustomer(obj) {
let that = this;
var message =
"您正在进行删除【" +
obj.CustomerName +
"】行为,一旦执行无法找回,是否确认执行?";
this.$q
.dialog({
title: "删除客户",
message: message,
isShowEditClassRoomForm: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
})
.onOk(() => {
var delMsg = {
CustomerId: obj.CustomerId
};
RemoveCustomer(delMsg).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "操作成功",
position: "top"
});
that.refreshQuestion();
}
});
});
},
//关闭弹窗
closeCustomForm() {
this.isShowCustomForm = false;
this.isShowRightForm = false;
this.isShowDetailForm = false;
},
refreshQuestion() {
this.$emit("success");
},
//跳转到幸福存折
gohappyPassbook(item) {
this.OpenNewUrl("/sale/happyPassbook", {
CustomerId: item.CustomerId
});
},
//跳转到返佣管理
gohappyCommisson(item) {
this.OpenNewUrl("/sale/commsionManagement", {
CustomerId: item.CustomerId
});
},
//同业转交
saveTransForm() {
this.$refs.transfer.validate();
if (this.$refs.transfer.hasError) return;
this.TransferMsg.CustomerIds = this.selection
.map(e => e.CustomerId)
.toString();
setCustomerCareOf(this.TransferMsg).then(res => {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "转交成功",
position: "top"
});
this.isShowTrans = false;
this.selection = [];
});
},
//获取员工列表
getEmployeeList() {
queryEmployee({
IsLeave: 1
}).then(res => {
this.employeeList = res.Data;
this.myEmployeeList = res.Data;
});
},
//筛选员工
filterEmployee(val, update, abort) {
update(() => {
this.myEmployeeList = this.employeeList.filter(
v => v.EmployeeName.indexOf(val) > -1
);
});
}
}
};
</script>
\ No newline at end of file
...@@ -13,37 +13,52 @@ ...@@ -13,37 +13,52 @@
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @input="resetSearch" filled clearable v-model="msg.CustomerName" label="同业名称" maxlength="20" />
</div>
<div class="col-3">
<q-input @input="resetSearch" filled clearable v-model="msg.CustomerId" label="同业ID" maxlength="20" />
</div>
<div class="col-3">
<q-input @input="resetSearch" filled clearable v-model="msg.ContactNumber" label="电话" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="resetSearch" clearable filled v-model="msg.ApproveState" :options="ApproveStateList"
emit-value map-options label="审核状态" />
</div>
</div>
</div>
<div class="page-content"> <div class="page-content">
<div> <div>
<q-tabs style="margin-bottom:20px;" v-model="tabCheck" @input="resetSearch()" narrow-indicator dense <q-tabs style="margin-bottom:20px;" v-model="tabCheck" @input="resetSearch()" narrow-indicator dense
align="left" class="text-primary"> align="left" class="text-primary">
<q-tab :ripple="false" :name="1" label="正式客户" /> <q-tab :ripple="false" :name="1" label="联系人" />
<q-tab :ripple="false" :name="2" label="非正式客户" /> <!-- <q-tab :ripple="false" :name="2" label="同行管理" /> -->
<q-tab :ripple="false" :name="3" label="未通过客户" />
<q-tab :ripple="false" :name="4" label="黑名单客户" />
</q-tabs> </q-tabs>
</div> </div>
<b2bcustomlist :dataList="dataList" :authObj="authObj" :loading="loading" @success="getList" <template v-if="tabCheck==1">
:visibleColumns="visibleColumns" sticky="sticky-tow-column-table sticky-right-column-table"></b2bcustomlist> <div class="page-search row items-center">
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <div class="col row wrap q-mr-lg q-col-gutter-md">
:input="true" @input="changePage" /> <div class="col-3">
<q-input @input="resetSearch" filled clearable v-model="msg.CustomerName" label="联系人" maxlength="20" />
</div>
<div class="col-3">
<q-input @input="resetSearch" filled clearable v-model="msg.CustomerId" label="同业ID" maxlength="20" />
</div>
<div class="col-3">
<q-input @input="resetSearch" filled clearable v-model="msg.ContactNumber" label="电话" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="resetSearch" clearable filled v-model="msg.ApproveState" :options="ApproveStateList"
emit-value map-options label="审核状态" />
</div>
</div>
</div>
<b2bcustomlist :dataList="dataList" :authObj="authObj" :loading="loading" @success="getList"
:visibleColumns="visibleColumns" sticky="sticky-tow-column-table sticky-right-column-table"></b2bcustomlist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-if="tabCheck==2">
<!-- <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @input="resetSearch" filled clearable v-model="msg.CategoryName" label="同业名称" maxlength="20" />
</div>
</div>
</div>
<customcategorylist :dataList="dataList" :loading="loading" @success="getList"
sticky="sticky-tow-column-table sticky-right-column-table">
</customcategorylist>
<q-pagination class="full-width justify-end" v-model="categoryMsg.pageIndex" color="primary"
:max="categoryMsg.pageCount" :input="true" @input="changeCategoryPage" /> -->
</template>
</div> </div>
</div> </div>
</template> </template>
...@@ -52,13 +67,18 @@ ...@@ -52,13 +67,18 @@
GetCustomerPage_v2, GetCustomerPage_v2,
RemoveCustomer RemoveCustomer
} from "../../api/sale/peemanagement"; } from "../../api/sale/peemanagement";
import {
queryCustomerCategoryPage
} from "../../api/users/user";
import b2bcustomlist from "../../components/sale/b2bcustomlist"; import b2bcustomlist from "../../components/sale/b2bcustomlist";
import customcategorylist from "../../components/sale/customcategorylist"
export default { export default {
meta: { meta: {
title: "同行管理" title: "同行管理"
}, },
components: { components: {
b2bcustomlist b2bcustomlist,
customcategorylist
}, },
data() { data() {
return { return {
...@@ -104,7 +124,15 @@ ...@@ -104,7 +124,15 @@
isShowEdit: true, //显示新增、修改、删除 isShowEdit: true, //显示新增、修改、删除
isShowBankBook: true, //显示幸福存折 isShowBankBook: true, //显示幸福存折
isShowRebate: true //是否显示返佣 isShowRebate: true //是否显示返佣
} },
categoryMsg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
CategoryName: "", //客户名称
CatetoryType: "", //类型
pageCount: 0,
},
}; };
}, },
created() {}, created() {},
...@@ -115,25 +143,42 @@ ...@@ -115,25 +143,42 @@
//重新查询 //重新查询
resetSearch() { resetSearch() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.categoryMsg.pageIndex = 1;
this.getList(); this.getList();
}, },
//翻页 //联系人翻页
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
//同行翻页
changeCategoryPage(val) {
this.categoryMsg.pageIndex = val;
this.getList();
},
//获取分页数据 //获取分页数据
getList() { getList() {
this.msg.QCustomerState = this.tabCheck; this.loading = true;
GetCustomerPage_v2(this.msg) this.dataList = [];
.then(res => { if (this.tabCheck == 1) {
GetCustomerPage_v2(this.msg)
.then(res => {
console.log("GetCustomerPage_v2", res);
this.dataList = res.Data.PageData;
this.loading = false;
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
} else if (this.tabCheck == 2) {
queryCustomerCategoryPage(this.categoryMsg).then(res => {
console.log("queryCustomerCategoryPage", res);
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
this.loading = false; this.loading = false;
this.pageCount = res.Data.PageCount; this.categoryMsg.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
}); });
}
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment