Commit 841e9502 authored by 黄奎's avatar 黄奎

页面修改

parent cb0abf51
<style lang="scss">
.customform .q-table__bottom {
.b2bcustomlist .q-table__bottom {
min-height: 0;
}
</style>
<template>
<div class="customform">
<div class="b2bcustomlist">
<q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table " separator="none" :data="dataList" :columns="columns"
row-key="name">
......@@ -36,34 +36,34 @@
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props" style="width:200px;">
<q-btn flat size="xs" icon="edit" v-if="authObj.isShowEdit" color="accent" style="font-weight:400" label="编辑"
@click="EditCustom(props.row)" />
<q-btn flat v-if="(props.row.ApproveState==0||props.row.ApproveState==2)&&!authObj.isShowEdit" size="xs"
<q-btn flat size="xs" icon="edit" v-if="AuthorityObj.isShowEdit" color="accent" style="font-weight:400"
label="编辑" @click="EditCustom(props.row)" />
<q-btn flat v-if="(props.row.ApproveState==0||props.row.ApproveState==2)&&authObj.isShowAudit" size="xs"
icon="edit" color="accent" style="font-weight:400" label="客户审批" @click="AuditCustomer(props.row,1)" />
<q-btn flat v-if="props.row.ApproveState==1" size="xs" icon="iconfont icon-View" color="accent"
style="font-weight:400" label="查看" @click="AuditCustomer(props.row,2)" />
<q-btn flat v-if="props.row.ApproveState==0" size="xs" icon="delete" color="negative" style="font-weight:400"
label="删除" @click="RemoveCustomer(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400"
label="幸福存折" @click="gohappyPassbook()" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400"
label="返佣管理" @click="gohappyCommisson()" />
<q-btn flat size="xs" icon="iconfont icon-View" color="accent" style="font-weight:400" label="查看"
@click="AuditCustomer(props.row,2)" />
<q-btn flat v-if="props.row.ApproveState==0 && AuthorityObj.isShowEdit" size="xs" icon="delete"
color="negative" style="font-weight:400" label="删除" @click="RemoveCustomer(props.row)" />
<q-btn flat v-if="AuthorityObj.isShowBankBook" size="xs" icon="edit" color="accent" style="font-weight:400"
label="幸福存折" @click="gohappyPassbook(props.row)" />
<q-btn flat v-if="AuthorityObj.isShowRebate" size="xs" icon="edit" color="accent" style="font-weight:400"
label="返佣管理" @click="gohappyCommisson(props.row)" />
</q-td>
</template>
<template v-slot:bottom>
<div></div>
</template>
</q-table>
<perCustomer-form v-if="isShowCustomForm" :customerObj="customerObj" @close="closeCustomForm"
<customerEdit-form v-if="isShowCustomForm" :customerObj="customerObj" @close="closeCustomForm"
@success="refreshQuestion">
</perCustomer-form>
<customRight-form v-if="isShowRightForm" :customerObj="customerObj" @close="closeCustomForm"
@success="refreshQuestion"></customRight-form>
</customerEdit-form>
<customerReview-form v-if="isShowRightForm" :customerObj="customerObj" @close="closeCustomForm"
@success="refreshQuestion"></customerReview-form>
</div>
</template>
<script>
import perCustomerForm from '../sale/perCustomer-form';
import customRightForm from '../sale/customRight-form';
import customerEditForm from '../sale/customerEdit-form';
import customerReviewForm from '../sale/customerReview-form';
export default {
props: {
dataList: {
......@@ -76,8 +76,8 @@
}
},
components: {
perCustomerForm,
customRightForm
customerEditForm,
customerReviewForm
},
data() {
return {
......@@ -136,13 +136,37 @@
isShowCustomForm: false,
isShowRightForm: false,
customerObj: null, //传入参数
//权限设置
AuthorityObj: {
isShowEdit: false, //是否显示新增修改按钮
isShowAudit: false, //是否显示审批
isShowBankBook: false, //是否显示幸福存折
isShowRebate: false, //是否显示返佣
}
}
},
created() {
this.initAuth();
},
mounted() {},
methods: {
//初始化权限
initAuth() {
if (this.authObj) {
if (this.authObj.isShowEdit != null && this.authObj.isShowEdit) {
this.AuthorityObj.isShowEdit = this.authObj.isShowEdit;
}
if (this.authObj.isShowAudit != null && this.authObj.isShowAudit) {
this.AuthorityObj.isShowAudit = this.authObj.isShowAudit;
}
if (this.authObj.isShowBankBook != null && this.authObj.isShowBankBook) {
this.AuthorityObj.isShowBankBook = this.authObj.isShowBankBook;
}
if (this.authObj.isShowRebate != null && this.authObj.isShowRebate) {
this.AuthorityObj.isShowRebate = this.authObj.isShowRebate;
}
}
},
//新增或者修改客户
EditCustom(obj) {
if (obj) {
......@@ -206,16 +230,16 @@
this.$emit('success');
},
//跳转到幸福存折
gohappyPassbook(){
this.$router.push({
path: '/sale/happyPassbook'
})
gohappyPassbook(item) {
this.OpenNewUrl('/sale/happyPassbook', {
CustomerId: item.CustomerId,
});
},
//跳转到返佣管理
gohappyCommisson(){
this.$router.push({
path: '/sale/commsionManagement'
})
gohappyCommisson(item) {
this.OpenNewUrl('/sale/commsionManagement', {
CustomerId: item.CustomerId,
});
},
}
}
......
......@@ -135,7 +135,7 @@
</div>
</div>
<div style="margin:30px 10px 0 0;text-align:right;">
<q-btn flat color="grey-10" class="q-mr-md" label="取消" @click="closeperForm()" />
<q-btn class="q-mr-md" label="关闭" @click="closeperForm()" />
<q-btn color="accent" v-if="customerObj.Type==1" class="q-mr-md" label="保存" @click="saveConfig()" />
</div>
</q-card>
......
......@@ -17,12 +17,10 @@
<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" />
<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.ContactNumber"
label="联系电话" maxlength="20" />
<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"
......@@ -32,14 +30,15 @@
</div>
<div class="page-content">
<div>
<q-tabs style="margin-bottom:20px;" v-model="tabCheck" @input="resetSearch()" narrow-indicator dense align="left" class="text-primary">
<q-tabs style="margin-bottom:20px;" v-model="tabCheck" @input="resetSearch()" narrow-indicator dense
align="left" class="text-primary">
<q-tab :ripple="false" :name="1" label="正式客户" />
<q-tab :ripple="false" :name="2" label="非正式客户" />
<q-tab :ripple="false" :name="3" label="未通过客户" />
<q-tab :ripple="false" :name="4" label="黑名单客户" />
</q-tabs>
</div>
<custom-form :dataList="dataList" :authObj="authObj" :loading="loading" @success="getList"></custom-form>
<b2bcustomlist :dataList="dataList" :authObj="authObj" :loading="loading" @success="getList"></b2bcustomlist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</div>
......@@ -50,13 +49,13 @@
GetCustomerPage,
RemoveCustomer
} from '../../api/sale/peemanagement';
import customForm from '../../components/sale/custom-form';
import b2bcustomlist from '../../components/sale/b2bcustomlist';
export default {
meta: {
title: "同行管理"
},
components: {
customForm
b2bcustomlist
},
data() {
return {
......@@ -82,11 +81,13 @@
value: "2",
},
],
dataList: [],
//判断显示
authObj:{
isShowEdit:true
authObj: {
isShowEdit: true, //显示新增、修改、删除
isShowBankBook: true, //显示幸福存折
isShowRebate: true, //是否显示返佣
}
}
},
......@@ -107,7 +108,7 @@
},
//获取分页数据
getList() {
this.msg.QCustomerState=this.tabCheck;
this.msg.QCustomerState = this.tabCheck;
GetCustomerPage(this.msg).then(res => {
this.dataList = res.Data.PageData;
this.loading = false;
......
......@@ -29,7 +29,7 @@
</div>
</div>
<div class="page-content">
<custom-form :dataList="dataList" :authObj="authObj" :loading="loading" @success="getList"></custom-form>
<b2bcustomlist :dataList="dataList" :authObj="authObj" :loading="loading" @success="getList"></b2bcustomlist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</div>
......@@ -40,13 +40,13 @@
GetCustomerPage,
RemoveCustomer
} from '../../api/sale/peemanagement';
import customForm from '../../components/sale/custom-form';
import b2bcustomlist from '../../components/sale/b2bcustomlist';
export default {
meta: {
title: "同行审批"
},
components: {
customForm
b2bcustomlist
},
data() {
return {
......@@ -74,7 +74,7 @@
dataList: [],
//判断显示
authObj: {
isShowEdit: false
isShowAudit: true,
}
}
},
......
......@@ -859,14 +859,14 @@ const routes = [{
import("pages/sale/visitorRegistrat.vue")
},
{
path: "/sale/peerManagement", //销售 同行管理、
path: "/sale/b2bcustomer", //销售 同行管理
component: () =>
import("pages/sale/peerManagement.vue")
import("pages/sale/b2bcustomer.vue")
},
{
path: "/sale/peerApproval", //销售 同行审批
path: "/sale/b2bcustomerapprove", //销售 同行审批
component: () =>
import("pages/sale/peerApproval.vue")
import("pages/sale/b2bcustomerapprove.vue")
},
{
path: "/sale/saleTask", //销售 营销任务
......
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