Commit dfdde186 authored by 罗超's avatar 罗超

1

parent 4c04faea
......@@ -206,4 +206,14 @@ export function getLogList(data) {
data
})
}
\ No newline at end of file
/**
* 获取同业客户阶段列表
*
*/
export function getCustomerStuStageStatistics(data) {
return request({
url: '/B2BCustomer/GetCustomerStuStageStatistics',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -4,21 +4,27 @@
<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>
<div class="text-weight-thin" style="font-size:10px">
微信名
</div>
<div class="text-h6">
{{detailData.WeChatName}}
</div>
</div>
</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>
<baseInfo :Data="detailData" @confirm="saveBaseInfo"></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;">
......@@ -28,7 +34,8 @@
</template>
<script>
import {
GetCustomer
GetCustomer,
SetCustomer
} from "../../../api/sale/peemanagement";
import baseInfo from './baseInfo.vue'
import right from './conRight.vue'
......@@ -125,6 +132,21 @@
this.detailData.EnterpriseName = '';
}
},
saveBaseInfo(obj){
this.detailData[obj.field]=obj.val
SetCustomer(this.detailData).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top",
});
this.$emit("success");
}
})
}
},
}
......@@ -135,10 +157,10 @@
display: flex;
flex-direction: column;
width: 1010px;
height: 100%;
height: calc(100vh - 520px);
padding: 15px 17px 0 17px;
background-color: #f4f4f6;
overflow: hidden;
overflow: auto;
box-sizing: border-box;
.info-head {
......@@ -161,7 +183,7 @@
width: 350px;
height: 100%;
margin-right: 13px;
background: #fff;
background-color: #fff;
border-radius: 8px 8px 0 0;
}
......@@ -170,8 +192,7 @@
flex-grow: 1;
display: flex;
flex-direction: column;
padding-top: 28px;
background: #fff;
background-color: #fff;
border-radius: 8px 8px 0 0;
overflow: hidden;
}
......
<template>
<div class="q-pa-md">
<div class="text-h6">基础资料</div>
<div class="flex justify-between items-center q-my-lg">
<!-- 同业名称 -->
<div class="q-my-sm" v-if="editField=='CustomerName'">
<div class="flex justify-between items-center q-mb-sm">
<span>同业名称</span>
<div>
<q-btn size="sm" text-color="primary" label="取消" @click="showEdit('')"></q-btn>
<q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('CustomerName',Data.CustomerName,true)"></q-btn>
</div>
</div>
<q-input outlined dense v-model="Data.CustomerName" ref="CustomerName" :rules="[val => !!val || '请输入同业名称']"></q-input>
</div>
<div class="flex justify-between items-center q-my-lg" v-else @click="showEdit('CustomerName')">
<span>同业名称</span>
<span>{{Data.CustomerName}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<!-- 性别 -->
<div class="q-my-sm" v-if="editField=='Sex'">
<div class="flex justify-between items-center q-mb-sm">
<span>性别</span>
<div>
<q-btn size="sm" text-color="primary" label="取消" @click="showEdit('')"></q-btn>
<q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('Sex',Data.Sex)"></q-btn>
</div>
</div>
<q-select outlined dense v-model="Data.Sex" map-options emit-value :options="sexOptions" />
</div>
<div class="flex justify-between items-center q-my-lg" v-else @click="showEdit('Sex')">
<span>性别</span>
<span v-if="Data.Sex==1"></span>
<span v-if="Data.Sex==2"></span>
</div>
<!-- 电话 -->
<div class="q-my-sm" v-if="editField=='ContactNumber'">
<div class="flex justify-between items-center q-mb-sm">
<span>电话</span>
<div>
<q-btn size="sm" text-color="primary" label="取消" @click="showEdit('')"></q-btn>
<q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('ContactNumber',Data.ContactNumber,true)"></q-btn>
</div>
</div>
<q-input outlined dense v-model="Data.ContactNumber" ref="ContactNumber" :rules="[val => !!val || '请输入电话']"></q-input>
</div>
<div class="flex justify-between items-center q-my-lg" v-else @click="showEdit('ContactNumber')">
<span>电话</span>
<span>{{Data.ContactNumber}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<!-- 类型 -->
<div class="q-my-sm" v-if="editField=='CustomerType'">
<div class="flex justify-between items-center q-mb-sm">
<span>类型</span>
<div>
<q-btn size="sm" text-color="primary" label="取消" @click="showEdit('')"></q-btn>
<q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('CustomerType',Data.CustomerType)"></q-btn>
</div>
</div>
<q-select outlined dense v-model="Data.CustomerType" map-options emit-value :options="options"
:rules="[val => !!val || '请选择类型']" />
</div>
<div class="flex justify-between items-center q-my-lg" v-else @click="showEdit('CustomerType')">
<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">
<!-- 企业/学校名称 -->
<div class="q-my-sm" v-if="editField=='EnterpriseName'">
<div class="flex justify-between items-center q-mb-sm">
<span>企业/学校名称</span>
<div>
<q-btn size="sm" text-color="primary" label="取消" @click="showEdit('')"></q-btn>
<q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('EnterpriseName',Data.EnterpriseName)"></q-btn>
</div>
</div>
<q-input outlined dense v-model="Data.EnterpriseName" :rules="[val => !!val || '请输入名称']"></q-input>
</div>
<div class="flex justify-between items-center q-my-lg" v-else @click="showEdit('EnterpriseName')">
<span>企业/学校名称</span>
<span>{{Data.EnterpriseName}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span>客人数量</span>
<span>{{Data.StuNum}}</span>
<!-- 账号 -->
<div class="q-my-sm" v-if="editField=='Account'">
<div class="flex justify-between items-center q-mb-sm">
<span>账号</span>
<div>
<q-btn size="sm" text-color="primary" label="取消" @click="showEdit('')"></q-btn>
<q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('Account',Data.Account)"></q-btn>
</div>
</div>
<q-input outlined dense v-model="Data.Account" :rules="[val => !!val || '请输入账号']"></q-input>
</div>
<div class="flex justify-between items-center q-my-lg">
<span>订单数量</span>
<span>{{Data.OrderNum}}</span>
<div class="flex justify-between items-center q-my-lg" v-else @click="showEdit('Account')">
<span>账号</span>
<span>{{Data.Account}}</span>
</div>
<div class="flex justify-between items-center q-my-lg">
<span>销售额</span>
<span>{{Data.OrderSales}}</span>
<!-- 详细地址 -->
<div class="q-my-sm" v-if="editField=='Address'">
<div class="flex justify-between items-center q-mb-sm">
<span>详细地址</span>
<div>
<q-btn size="sm" text-color="primary" label="取消" @click="showEdit('')"></q-btn>
<q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('Address',Data.Address)"></q-btn>
</div>
</div>
<q-input outlined dense v-model="Data.Address" ></q-input>
</div>
<div class="flex justify-between items-center q-my-lg">
<span> 审批状态</span>
<span>{{Data.ApproveStateStr}}</span>
<div class="flex no-wrap justify-between items-center q-my-lg" v-else @click="showEdit('Address')">
<span style="white-space:nowrap">详细地址</span>
<span style="max-width:60%" class="ellepsis">{{Data.Address}}</span>
</div>
<!-- OpenId -->
<div class="flex justify-between items-center q-my-lg">
<span> 市场人员</span>
<span>{{Data.CreateByName}}</span>
<span>OpenId</span>
<span class="text-grey-6">{{Data.OpenId}}</span>
</div>
<!-- UnionId -->
<div class="flex justify-between items-center q-my-lg">
<span> 加入时间</span>
<span>{{Data.CreateTimeStr}}</span>
<span> UnionId</span>
<span class="text-grey-6">{{Data.UnionId}}</span>
</div>
</div>
</template>
......@@ -55,24 +132,48 @@
},
data() {
return {
detailData:{}
}
},
watch:{
Data:{
handler(val){
console.log(60,val)
},
deep:true
editField: "",
options: [{
label: "企业",
value: 1,
}, {
label: "学校",
value: 2,
}],
sexOptions: [{
label: "男",
value: 1,
}, {
label: "女",
value: 2,
}]
}
},
created() {},
mounted() {
console.log(67,this.Data)
},
methods: {
showEdit(field) {
this.editField = field
},
save(field,val,Validate=false){
if(Validate){
this.$refs[field].validate();
if(this.$refs[field].hasError) return
}
const obj={
field,
val
}
this.$emit("confirm",obj)
this.editField =''
},
},
}
</script>
<style>
.ellepsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
......@@ -3,22 +3,27 @@
<q-tabs
v-model="tabs"
active-color="primary"
align="left"
style="width:350px;margin-bottom:20px;"
>
<q-tab :name="1" label="操作日志" />
<q-tab :name="2" label="客户" />
<q-tab :name="3" label="订单" />
<q-tab :name="4" label="返佣" />
<q-tab :name="4" label="幸福存折" />
</q-tabs>
<div class="q-my-md">
<div class="q-mb-lg">
<log :Id="Id" v-if="tabs===1"></log>
<customer :Id="Id" v-if="tabs===2"></customer>
<order :Id="Id" v-if="tabs===3"></order>
</div>
</div>
</template>
<script>
import log from './log.vue'
import customer from './customer'
import order from './order'
export default {
components: {log},
components: {log,customer,order},
props: {
Id: {
type: Number,
......
<template>
<div class="b2bcustomer">
<div class="full-width flex no-wrap items-center q-mb-sm">
<q-tabs
v-model="msg.StuStage"
active-color="primary"
dense
outside-arrows
align="left"
style="width:70%"
@input="getStudent"
>
<q-tab
v-for="(item, index) in stagelist"
:key="index"
:name="item.StuStage"
>
{{ item.StuStageName }}({{ item.StuNum }})
</q-tab>
</q-tabs>
<q-input
outlined
dense
v-model="msg.StuName"
label="昵称"
@input="getStudent"
/>
</div>
<q-table
:pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table"
separator="none"
:data="list"
:columns="columns"
row-key="Id"
>
<template v-slot:body-cell-StuIcon="props">
<q-td auto-width :props="props">
<q-avatar size="md" v-if="props.value">
<img :src="props.value" />
</q-avatar>
<q-avatar
size="md"
color="teal-10"
text-color="white"
v-if="!props.value"
>
{{ props.row.StuName.substring(0, 1) }}</q-avatar
>
</q-td>
</template>
<template v-slot:body-cell-StuName="props">
<q-td :props="props">
<div class="text-blue cursor-pointer" @click="getStuRight(props.row)">
{{ props.value }}
</div>
</q-td>
</template>
<template v-slot:body-cell-StuSex="props">
<q-td :props="props">
<q-badge
:color="props.value == 1 ? 'negative' : 'primary'"
:label="props.value == 1 ? '女' : '男'"
/>
</q-td>
</template>
<template v-slot:body-cell-Status="props">
<q-td :props="props">
<q-toggle
size="md"
color="primary"
:false-value="1"
:true-value="0"
v-model="props.row.Status"
title="注意:关闭后,学员将无法正常使用."
@input="deleteStudentInfo(props.row)"
/>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination
class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template>
</q-table>
<stuDetail
v-if="isShowStuRight"
:save-obj="stuOption"
@close="closeStuForm"
></stuDetail>
</div>
</template>
<script>
import { getStudentPage } from "../../../api/school";
import { getCustomerStuStageStatistics } from "../../../api/sale/peemanagement";
import stuDetail from "../../../components/school/student/studentRight-form";
export default {
components: {
stuDetail
},
props: {
Id: {
type: Number,
default: 0
}
},
data() {
return {
loading: false,
list: [],
pageCount: 0,
columns: [
{
name: "StuIcon",
label: "",
field: "StuIcon",
align: "left"
},
{
name: "StuName",
required: true,
label: "昵称",
align: "left",
field: row => row.StuName
},
{
name: "StuSex",
label: "性别",
field: "StuSex",
align: "left"
},
{
name: "StuBirthStr",
label: "出生日期",
field: "StuBirthStr",
align: "left"
},
{
name: "StuTel",
label: "手机号码",
field: "StuTel",
align: "left"
},
{
name: "CreateTypeStr",
label: "客户来源",
field: "CreateTypeStr",
align: "left"
},
{
name: "StuStageName",
label: "客户阶段",
field: "StuStageName",
align: "left"
},
{
name: "CreateTimeStr",
label: "创建时间",
field: "CreateTimeStr",
align: "left"
}
// {
// name: "CreateByName",
// label: "负责人",
// align: "left",
// field: "CreateByName"
// }
],
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
StuName: "",
StuTel: "",
Status: "-1",
School_Id: 0,
CustomerId: 0,
StuStage: 0
},
stagelist: [],
stuOption: {},
isShowStuRight: false
};
},
methods: {
getStudent() {
this.msg.CustomerId = this.Id;
this.loading = true;
getStudentPage(this.msg)
.then(res => {
this.loading = false;
this.list = res.Data.PageData;
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
},
getStage() {
getCustomerStuStageStatistics({ CustomerId: this.Id }).then(res => {
this.stagelist = res.Data;
const total = res.Data.reduce((pre, cur) => {
return cur.StuNum + pre;
}, 0);
const obj = {
StuStage: 0,
StuStageName: "全部",
StuNum: total
};
this.stagelist.unshift(obj);
console.log("tag", this.stagelist);
});
},
changePage(val) {
this.msg.pageIndex = val;
this.getStudent();
},
closeStuForm() {
this.isShowStuRight = false;
},
//点击学生姓名弹出
getStuRight(obj) {
if (obj) {
this.stuOption = obj;
} else {
this.stuOption = {};
}
this.isShowStuRight = true;
}
},
mounted() {
this.getStudent();
this.getStage();
}
};
</script>
<style lang="scss">
.b2bcustomer ::-webkit-scrollbar {
width: 5px;
height: 5px;
}
.b2bcustomer ::-webkit-scrollbar-track {
background: #fff;
border-radius: 2px;
}
.b2bcustomer ::-webkit-scrollbar-thumb {
background: #444;
border-radius: 10px;
}
.b2bcustomer ::-webkit-scrollbar-thumb:hover {
background: #999;
}
.b2bcustomer ::-webkit-scrollbar-corner {
background: #204754;
}
</style>
<template>
<div>
<q-timeline color="secondary" v-if="logList.length>=0">
<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>
<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>
......@@ -12,10 +12,12 @@
</div>
</q-timeline-entry>
</q-timeline>
<div class="flex justify-center q-mt-md text-gray-4" v-if="logList.length==0">
暂无操作记录
</div>
<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"/>
<q-pagination v-model="logMsg.pageIndex" :max="pageCount" input color="primary" @input="changePage" v-if="logList.length>0"/>
</div>
</div>
</template>
......
This diff is collapsed.
......@@ -55,7 +55,7 @@
</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"
<customerInfo v-if="isShowDetailForm" :rowId="curRowId" @close="closeCustomForm" :auth="AuthorityObj"
@success="refreshQuestion"></customerInfo>
</div>
</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