Commit 241b960f authored by 黄奎's avatar 黄奎
parents 516d0b07 5846b8e1
<template>
<q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeAuditCustomerForm">
<div class="info-content-component">
<div class="info-head flex items-center">
<div class="flex items-center">
<q-img :src="detailData.WeChatPhoto" :ratio="1" width="60px" class="q-mr-md"/>
{{detailData.WeChatName}}
</div>
<q-space />
<q-btn color="accent" size="sm" class="q-mr-md" icon="swap_horiz" label="转移" />
</div>
<div class="info-content">
<div class="detail-info">
<baseInfo :Data="detailData"></baseInfo>
</div>
<div class="detail-log">
<right :Id="rowId"></right>
</div>
</div>
</div>
<div class="dialog-out-close" @click="closeAuditCustomerForm"
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
<q-icon name="iconfont icon-jujue1" size="26px" />
</div>
</q-dialog>
</template>
<script>
import {
GetCustomer
} from "../../../api/sale/peemanagement";
import baseInfo from './baseInfo.vue'
import right from './conRight.vue'
export default {
components: {
baseInfo,
right
},
props: {
rowId: {
type: Number,
default: 0
},
auth: {
type: Object,
default: null
}
},
data() {
return {
persistent: true,
detailData: {
CustomerId: 0,
CustomerName: "",
ContactNumber: "",
Sex: 1,
Fax: "",
QQ: "",
Email: "",
Address: "",
Account: "",
Remark: "",
OpenId: "",
UnionId: "",
WeChatName: "",
WeChatPhoto: "",
CustomerType: 1,
EnterpriseName: "",
},
}
},
mounted() {
this.initObj()
},
methods: {
//关闭弹窗
closeAuditCustomerForm() {
this.$emit('close');
this.persistent = false;
},
//初始化表单
initObj() {
if (this.rowId > 0) {
let msg = {
CustomerId: this.rowId
}
GetCustomer(msg).then(res => {
if (res.Code == 1) {
let tempData = res.Data;
this.detailData.CustomerId = tempData.CustomerId;
this.detailData.CustomerName = tempData.CustomerName;
this.detailData.ContactNumber = tempData.ContactNumber;
this.detailData.Sex = tempData.Sex;
this.detailData.Fax = tempData.Fax;
this.detailData.QQ = tempData.QQ;
this.detailData.Email = tempData.Email;
this.detailData.Address = tempData.Address;
this.detailData.Account = tempData.Account;
this.detailData.Remark = tempData.Remark;
this.detailData.OpenId = tempData.OpenId;
this.detailData.UnionId = tempData.UnionId;
this.detailData.WeChatName = tempData.WeChatName;
this.detailData.WeChatPhoto = tempData.WeChatPhoto;
this.detailData.CustomerType = tempData.CustomerType;
this.detailData.EnterpriseName = tempData.EnterpriseName;
}
})
} else {
this.detailData.CustomerId = 0;
this.detailData.CustomerName = '';
this.detailData.ContactNumber = '';
this.detailData.Sex = 1;
this.detailData.Fax = '';
this.detailData.QQ = '';
this.detailData.Email = '';
this.detailData.Address = '';
this.detailData.Account = '';
this.detailData.Remark = '';
this.detailData.OpenId = '';
this.detailData.UnionId = '';
this.detailData.WeChatName = '';
this.detailData.WeChatPhoto = '';
this.detailData.CustomerType = 1;
this.detailData.EnterpriseName = '';
}
},
},
}
</script>
<style lang="scss" scoped>
.info-content-component {
display: flex;
flex-direction: column;
width: 1010px;
height: 100%;
padding: 15px 17px 0 17px;
background-color: #f4f4f6;
overflow: hidden;
box-sizing: border-box;
.info-head {
background-color: #fff;
border-radius: 8px;
padding: 22px;
}
.info-content {
flex: 1;
display: flex;
margin-top: 17px;
overflow: hidden;
.detail-info {
flex-shrink: 0;
box-sizing: border-box;
display: flex;
flex-direction: column;
width: 350px;
height: 100%;
margin-right: 13px;
background: #fff;
border-radius: 8px 8px 0 0;
}
.detail-log {
width: 100%;
flex-grow: 1;
display: flex;
flex-direction: column;
padding-top: 28px;
background: #fff;
border-radius: 8px 8px 0 0;
overflow: hidden;
}
}
}
</style>
<template>
<div class="q-pa-md">
<div class="text-h6">基础资料</div>
<div class="flex justify-between items-center q-my-lg">
<span>同业名称</span>
<span>{{Data.CustomerName}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span>电话</span>
<span>{{Data.ContactNumber}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span>类型</span>
<span v-if="Data.CustomerType==1">企业</span>
<span v-if="Data.CustomerType==2">学校</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span>企业/学校名称</span>
<span>{{Data.EnterpriseName}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span>客人数量</span>
<span>{{Data.StuNum}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span>订单数量</span>
<span>{{Data.OrderNum}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span>销售额</span>
<span>{{Data.OrderSales}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span> 审批状态</span>
<span>{{Data.ApproveStateStr}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span> 市场人员</span>
<span>{{Data.CreateByName}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span> 加入时间</span>
<span>{{Data.CreateTimeStr}}</span>
</div>
</div>
</template>
<script>
export default {
components: {},
props: {
Data: {
type: Object,
default: null
}
},
data() {
return {
detailData:{}
}
},
watch:{
Data:{
handler(val){
console.log(60,val)
},
deep:true
}
},
created() {},
mounted() {
console.log(67,this.Data)
},
methods: {
},
}
</script>
<template>
<div class="q-pa-md">
<q-tabs
v-model="tabs"
active-color="primary"
>
<q-tab :name="1" label="操作日志" />
<q-tab :name="2" label="客户" />
<q-tab :name="3" label="订单" />
<q-tab :name="4" label="返佣" />
</q-tabs>
<div class="q-my-md">
<log :Id="Id" v-if="tabs===1"></log>
</div>
</div>
</template>
<script>
import log from './log.vue'
export default {
components: {log},
props: {
Id: {
type: Number,
default: 0
}
},
data() {
return {
tabs:1,
}
},
created() {},
mounted() {
},
methods: {
},
}
</script>
<template>
<div>
<q-timeline color="secondary" v-if="logList.length>=0">
<q-timeline-entry v-for="(item,index) in logList" :key="index" :title="item.CreateByName">
<template #subtitle>
<div>
<span>{{item.DayStr}}</span><span class="q-ml-md">{{item.TimeStr}}</span><span class="q-ml-md" v-if="item.WeekDay">{{item.WeekDay}}</span>
</div>
</template>
<div>
{{item.LogContent}}
</div>
</q-timeline-entry>
</q-timeline>
<div class="flex justify-end q-mt-md">
<q-pagination v-model="logMsg.pageIndex" :max="pageCount" input color="primary" @input="changePage" v-if="logList.length>=0"/>
</div>
</div>
</template>
<script>
import {
getLogList
} from '../../../api/sale/peemanagement'
export default {
components: {
},
props: {
Id: {
type: Number,
default: 0
}
},
data() {
return {
logMsg: {
pageIndex: 1,
pageSize: 10,
Type: 4,
SourceId: 0
},
logList: [],
pageCount:1,
}
},
methods: {
getLog() {
this.logMsg.SourceId = this.Id
getLogList(this.logMsg).then(res => {
this.logList = res.Data.PageData
this.pageCount=res.Data.PageCount
})
},
changePage(val){
this.logMsg.pageIndex=val
this.getLog()
},
updatePage(){
this.logMsg.pageIndex=1
this.getLog()
}
},
mounted() {
this.getLog()
},
}
</script>
......@@ -2,46 +2,42 @@
.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
class="sticky-column-table sticky-right-column-table " separator="none" :data="dataList" :columns="columns"
row-key="name">
<q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat selection ="multiple" :selected.sync="selection"
class="sticky-column-table sticky-right-column-table " separator="none" :data="dataList" :columns="columns"
row-key="CustomerId">
<template v-slot:top="props">
<q-space />
<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="swap_horiz" :disable ="selection.length==0" label="转移" />
</div>
</template>
<template v-slot:body-cell-CustomerState="props">
<template v-slot:body-cell-CustomerName="props">
<q-td>
<q-chip color="teal" text-color="white" size="sm" v-if="props.row.CustomerState==1">
{{props.row.CustomerStateStr}}
</q-chip>
<q-chip color="red" text-color="white" size="sm" v-else>
{{props.row.CustomerStateStr}}
</q-chip>
<div class="CustomerName" @click="showDetail(props.row)">
{{props.row.CustomerName}}
</div>
</q-td>
</template>
<template v-slot:body-cell-ApproveState="props">
<template v-slot:body-cell-CustomerType="props">
<q-td>
<q-chip color="teal" text-color="white" size="sm" v-if="props.row.ApproveState==1">
{{props.row.ApproveStateStr}}
</q-chip>
<q-chip color="red" text-color="white" size="sm" v-else>
{{props.row.ApproveStateStr}}
</q-chip>
<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" style="width:200px;">
<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 size="xs" icon="iconfont icon-View" color="accent" style="font-weight:400" label="查看"
@click="AuditCustomer(props.row,2)" />
<q-btn flat size="xs"
icon="edit" color="accent" style="font-weight:400" label="编辑" @click="EditCustom(props.row)" />
<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"
......@@ -59,11 +55,14 @@
</customerEdit-form>
<customerReview-form v-if="isShowRightForm" :customerObj="customerObj" @close="closeCustomForm"
@success="refreshQuestion"></customerReview-form>
<customerInfo v-if="isShowDetailForm" :rowId="curRowId" @close="closeCustomForm" @edit="editCusInfo" :auth="AuthorityObj"
@success="refreshQuestion"></customerInfo>
</div>
</template>
<script>
import customerEditForm from '../sale/customerEdit-form';
import customerReviewForm from '../sale/customerReview-form';
import customerInfo from './b2bcustomerinfo/b2bCustomerInfo.vue';
export default {
props: {
dataList: {
......@@ -77,56 +76,64 @@
},
components: {
customerEditForm,
customerReviewForm
customerReviewForm,
customerInfo
},
data() {
return {
columns: [
{
name: 'CustomerId',
label: '客户编号',
field: 'CustomerId',
name: 'CustomerName',
label: '同业名称',
field: 'CustomerName',
align: 'left'
},
{
name: 'CustomerName',
label: '姓名',
field: 'CustomerName',
name: 'CustomerType',
label: '类型',
field: 'CustomerType',
align: 'left'
},
{
name: 'EnterpriseName',
label: '企业/学校名称',
field: 'EnterpriseName',
align: 'left'
},
{
name: 'ContactNumber',
label: '联系电话',
label: '电话',
field: 'ContactNumber',
align: 'left',
},
{
name: 'Account',
label: '账号',
field: 'Account',
name: 'StuNum',
label: '客户数量',
field: 'StuNum',
align: 'left'
},
// {
// name: 'CustomerState',
// label: '账号状态',
// field: 'CustomerState',
// align: 'left'
// },
{
name: 'ApproveState',
label: '审核状态',
field: 'ApproveState',
name: 'OrderNum',
label: '订单数量',
field: 'OrderNum',
align: 'left'
},
{
name: 'OrderSales',
label: '交易额',
field: 'OrderSales',
align: 'left'
},
{
name: 'CreateByName',
label: '创建人',
field: 'CreateByName',
name: 'ApproveStateStr',
label: '审核状态',
field: 'ApproveStateStr',
align: 'left'
},
{
name: 'CreateTimeStr',
label: '创建时间',
label: '加入时间',
field: 'CreateTimeStr',
align: 'left'
},
......@@ -143,13 +150,16 @@
isShowCustomForm: false,
isShowRightForm: false,
customerObj: null, //传入参数
isShowDetailForm:false,
curRowId:0,
//权限设置
AuthorityObj: {
isShowEdit: false, //是否显示新增修改按钮
isShowAudit: false, //是否显示审批
isShowBankBook: false, //是否显示幸福存折
isShowRebate: false, //是否显示返佣
}
},
selection:[]
}
},
created() {
......@@ -183,6 +193,7 @@
}
this.isShowCustomForm = true
},
//客户审核
AuditCustomer(obj, Type) {
if (obj) {
......@@ -193,6 +204,11 @@
}
this.isShowRightForm = true
},
//客户详情
showDetail(row) {
this.curRowId=row.CustomerId
this.isShowDetailForm = true
},
//删除客户
RemoveCustomer(obj) {
let that = this;
......@@ -232,6 +248,7 @@
closeCustomForm() {
this.isShowCustomForm = false;
this.isShowRightForm = false;
this.isShowDetailForm = false;
},
refreshQuestion() {
this.$emit('success');
......
<style>
<style scoped>
.CLM-Form .el-input__inner {
background: transparent;
border: 0;
......@@ -72,14 +72,22 @@
display: table-row;
height: 20px;
}
.customerPhoto{
width:55px;
height:55px;
.customerPhoto {
width: 55px;
height: 55px;
}
.customerPhoto img{
width:100%;
height:100%;
.customerPhoto img {
width: 100%;
height: 100%;
}
/deep/ .q-field__before,
/deep/ .q-field__prepend {
padding-right: 0px !important;
}
</style>
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale">
......@@ -108,11 +116,18 @@
ref="ContactNumber" class="col-6 q-pr-lg q-pb-lg" label="联系电话" :rules="[val => !!val || '请输入联系电话']" />
</div>
<div class="col-6">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Fax" ref="Fax"
class="col-6 q-pb-lg" label="传真" />
<q-input filled stack-label maxlength="40" v-model="objOption.EnterpriseName" :label="EnterpriseLabelName">
<template v-slot:before>
<q-select stack-label color="primary" filled label="类型" option-value="Id" option-label="TypeName"
:options="typeOptions" v-model="objOption.CustomerType" emit-value map-options
style="border-right:1px solid #999;min-width:90px;" @input='CustomerTypeChange' />
</template>
</q-input>
<!-- <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Fax" ref="Fax"
class="col-6 q-pb-lg" label="传真" /> -->
</div>
</div>
<div class="row wrap">
<!-- <div class="row wrap">
<div class="col-6">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.QQ" ref="QQ"
class="col-6 q-pr-lg q-pb-lg" label="QQ" />
......@@ -121,7 +136,7 @@
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Email" ref="Email"
class="col-6 q-pb-lg" label="Email" />
</div>
</div>
</div> -->
<div class="row wrap">
<div class="col-6">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Account" ref="Account"
......@@ -129,7 +144,7 @@
</div>
<div class="col-6">
<q-input filled stack-label :dense="false" v-model="objOption.Address" ref="Address" class="col-6 q-pb-lg"
label="详细地址" />
label="详细地址" />
</div>
</div>
<div class="row wrap">
......@@ -138,14 +153,14 @@
class="col-6 q-pr-lg q-pb-lg" label="OpenId" />
</div>
<div class="col-6">
<q-input filled stack-label :dense="false" disable v-model="objOption.UnionId" ref="UnionId" class="col-6 q-pb-lg"
label="UnionId"/>
<q-input filled stack-label :dense="false" disable v-model="objOption.UnionId" ref="UnionId"
class="col-6 q-pb-lg" label="UnionId" />
</div>
</div>
<div class="row wrap">
<div class="col-6">
<q-input filled stack-label maxlength="20" disable :dense="false" v-model="objOption.WeChatName" ref="WeChatName"
class="col-6 q-pr-lg q-pb-lg" label="微信名" />
<q-input filled stack-label maxlength="20" disable :dense="false" v-model="objOption.WeChatName"
ref="WeChatName" class="col-6 q-pr-lg q-pb-lg" label="微信名" />
</div>
<div class="col-6">
<div class="customerPhoto">
......@@ -208,19 +223,30 @@
OpenId: '',
UnionId: '',
WeChatName: '',
WeChatPhoto: ''
WeChatPhoto: '',
CustomerType: 1, //同业类型 1企业 2学校
EnterpriseName: "", //企业名称
},
EnterpriseLabelName: "企业名称",
saveCustomLoading: false,
provinceList: [], //省
cityList: [], //市
regionList: [], //区
CustomerBrandList: [], //所属品牌下拉
optionTitle:''
optionTitle: '',
typeOptions: [{
Id: 1,
TypeName: "企业",
}, {
Id: 2,
TypeName: "学校",
}]
}
},
created() {},
mounted() {
this.initObj()
console.log("sss",this.customerObj)
},
methods: {
//初始化表单
......@@ -246,6 +272,8 @@
this.objOption.UnionId = tempData.UnionId;
this.objOption.WeChatName = tempData.WeChatName;
this.objOption.WeChatPhoto = tempData.WeChatPhoto;
this.objOption.CustomerType = tempData.CustomerType;
this.objOption.EnterpriseName = tempData.EnterpriseName;
}
})
this.optionTitle = "修改客户信息"
......@@ -264,7 +292,9 @@
this.objOption.UnionId = '';
this.objOption.WeChatName = '';
this.objOption.WeChatPhoto = '';
this.optionTitle = "新增客户信息"
this.optionTitle = "新增客户信息";
this.objOption.CustomerType = 1;
this.objOption.EnterpriseName = '';
}
},
//保存
......@@ -295,6 +325,13 @@
this.$emit('close');
this.persistent = false;
},
CustomerTypeChange(val) {
if (val === 1) {
this.EnterpriseLabelName = "企业名称"
} else {
this.EnterpriseLabelName = '学校名称'
}
}
},
}
......
......@@ -62,7 +62,7 @@
<span class="backOtherInfo">{{ objOption.ContactNumber }}</span>
</div>
</div>
<div class="row info_Item">
<!-- <div class="row info_Item">
<div class="col-6">
<span class="backInfo_Title">传真:</span>
<span class="backOtherInfo" v-if="objOption.Fax">
......@@ -73,14 +73,14 @@
<span class="backInfo_Title">QQ:</span>
<span class="backOtherInfo">{{ objOption.QQ }}</span>
</div>
</div>
</div> -->
<div class="row info_Item">
<div class="col-6">
<!-- <div class="col-6">
<span class="backInfo_Title">Email:</span>
<span class="backOtherInfo" v-if="objOption.Email">
{{ objOption.Email }}
</span>
</div>
</div> -->
<div class="col-6">
<span class="backInfo_Title">地址:</span>
<span class="backOtherInfo">{{ objOption.Address }}</span>
......
......@@ -31,7 +31,7 @@
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.BaseHoursEnabled"
ref="BaseHoursEnabled" :options="BaseHoursList" label="是否启用基础课时" :dense="false" class="col-6 q-pb-lg"
emit-value map-options />
<q-input v-if='objOption.BaseHoursEnabled==1' filled v-model="objOption.EnableTime" mask="####-##"
<q-input v-if='objOption.BaseHoursEnabled==1' filled v-model="objOption.EnableTime" mask="####-##"
label="启用时间" ref="EnableTime" :rules="[val => !!val || '请选择启用时间']">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
......@@ -160,7 +160,7 @@
BaseStuNum: 0, //带班基础人数
BaseHourFee: 0, //基础课时费
Specialty: "", //老师擅长
BaseHoursEnabled: 1, //是否启用基础课时 1是
BaseHoursEnabled: 0, //是否启用基础课时 1是
EnableTime: '', //启用时间 (存到月)
},
BaseHoursList: [{
......@@ -352,7 +352,7 @@
}
},
saveTeacher() {
this.saveLoading = true;
if (this.chooseSpecialty && this.chooseSpecialty.length > 0) {
this.objOption.Specialty = this.chooseSpecialty.toString();
} else {
......@@ -375,7 +375,10 @@
// }
if (this.objOption.BaseHoursEnabled == 1 && this.objOption.EnableTime == '') {
err_msg = "请选择日期"
this.$refs.EnableTime.validate()
return
}
this.saveLoading = true;
if (err_msg == "") {
this.objOption.TeachTag = JSON.stringify(this.tags)
saveTeacher(this.objOption).then(res => {
......
......@@ -11,16 +11,20 @@
width: 400px;
}
</style>
<template>
<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" />
<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" />
<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"
......@@ -81,7 +85,6 @@
value: "2",
},
],
dataList: [],
//判断显示
authObj: {
......@@ -119,7 +122,9 @@
}
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
</style>
......@@ -26,7 +26,7 @@
<template v-slot:body-cell-Image="props">
<q-td>
<div class="ItemImgDiv ">
<q-img :src="props.row.Image" spinner-color="white" style="height: 100%;height:100%" />
<q-img :src="props.row.Image" contain spinner-color="white" style="height: 100%;height:100%" />
</div>
</q-td>
</template>
......
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