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

页面修改

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