'产说会需求'

This commit is contained in:
proudlx
2021-04-19 09:55:29 +08:00
parent 499b820e46
commit c85c0d0ac6
7 changed files with 581 additions and 104 deletions

View File

@@ -10,28 +10,52 @@ export function getProdectSaidList(data) {
})
}
// 查询分享轨迹(转发记录)
export function getShareList(data) {
// 查询机构列表
export function getBranchComList(data) {
return request({
url: getUrl('/customer/shop/getShareList', 1),
url: getUrl('/data/performance/getBranchComList', 1),
method: 'post',
data
})
}
// 分享轨迹保存
export function saveShareTrack(data) {
// 查询产说会详情
export function getProdectSaidById(data) {
return request({
url: getUrl('/customer/shop/saveShareTrack', 1),
url: getUrl('/agent/prodectsaid/getProdectSaidById', 1),
method: 'post',
data
})
}
// 获取账号密码以用于回显
export function getPassword(data) {
// 创建或编辑产说会
export function addOrUpdate(data) {
return request({
url: getUrl('/customer/shop/getPassword', 1),
url: getUrl('/agent/prodectsaid/addOrUpdate', 1),
method: 'post',
data
})
}
// 查询主讲产品列表和所属机构
export function getList(data) {
return request({
url: getUrl('/agent/ebizprodectsaid/getList', 1),
method: 'post',
data
})
}
// 查询统计列表
export function selectAllStatistical(data) {
return request({
url: getUrl('/agent/prodectsaid/selectAllStatistical', 1),
method: 'post',
data
})
}
// 查询统计详情
export function selectStatisticalByCon(data) {
return request({
url: getUrl('/agent/prodectsaid/selectStatisticalByCon', 1),
method: 'post',
data
})

View File

@@ -0,0 +1,101 @@
<template>
<div class="statisticsTable">
<table cellspacing="0" summary cellpadding="1">
<thead>
<tr>
<th :class="{'th-fixed':index<1}" v-for="(item,index) in theads" :key="index">{{item}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in tableData" :key="index">
<td :class="isLink?'td-fixed':'th-fixed'" @click="goLink(item)">{{item.convokeOrgCn}}</td>
<td>{{item.splan}}</td>
<td>{{item.estimatePeople}}</td>
<td>{{item.estimatePremium}}</td>
<td>{{item.rplan}}</td>
<td>{{item.realityPeople}}</td>
<td>{{item.estimateGetPremium}}</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
export default {
name: 'statisticsTable',
props:{
theads:{
type:Array,
default:[]
},
isLink:{
type:Boolean,
default:false,
},
tableData:{
type:Array,
default:[]
}
},
data() {
return {
}
},
created(){
},
methods: {
goLink(item){
if(this.isLink){
this.$emit('goLink',item)
}
},
},
}
</script>
<style lang="scss" scoped>
.statisticsTable th {
width: 100px;
}
table {
width: 160vw;
}
.statisticsTable {
width: 100%;
table {
border-collapse: collapse;
}
table,
th,
td {
border: 1px solid #999;
text-align: center;
font-size: 14px;
line-height: 30px;
background:#fff;
}
thead {
th {
height: 40px;
line-height: 40px;
background: #e9332e;
color: #fff;
}
}
}
.th-fixed {
position: sticky;
left: 0;
width:200px;
padding: 0 5px;
}
.td-fixed {
position: sticky;
width:200px;
padding: 0 5px;
left: 0;
text-decoration: underline;
}
</style>

View File

@@ -1,6 +1,8 @@
//产说会列表 定义相关组件
const List = () => import('@/views/ebiz/productionSay/List')
const createChangeItem = () => import('@/views/ebiz/productionSay/createChangeItem')
const statistics = () => import('@/views/ebiz/productionSay/statistics')
const statisticsItem = () => import('@/views/ebiz/productionSay/statisticsItem')
export default [
{
@@ -19,5 +21,21 @@ export default [
title: '创建产说会',
index: 2
}
},{
path: '/productionSay/statistics',
name: 'statistics',
component: statistics,
meta: {
title: '产说会统计表',
index: 3
}
},{
path: '/productionSay/statisticsItem',
name: 'statisticsItem',
component: statisticsItem,
meta: {
title: '查询产说会',
index: 4
}
},
]

View File

@@ -17,7 +17,7 @@
</van-sticky>
<van-list
v-model="loading"
:immediate-check="true"
:immediate-check="false"
:finished="finished"
:finished-text="finishedText"
error-text="请求失败点击重新加载"
@@ -26,8 +26,8 @@
class="pb45"
>
<div class="list">
<div class="item mt15" v-for="(item, index) in saleList" :key="index">
<div class="title">{{ item.riskName }}</div>
<div class="item mt15" v-for="(item, index) in orderList" :key="index">
<div class="title">{{ item.mainSaidProduct }}</div>
<div class="cell">召开机构{{ item.convokeOrgCn }}</div>
<div class="cell">召开时间{{ item.convokeStartTime }} {{ item.convokeEndTime }}</div>
<div class="cell">预估人数{{ item.estimatePeople }} </div>
@@ -60,7 +60,7 @@
<van-field v-model="filterName.fourth" readonly @click="toSelect('fourth')" placeholder="请选择" right-icon="arrow" />
<van-field v-model="filterName.fifth" readonly @click="toSelect('fifth')" placeholder="请选择" right-icon="arrow" />
</van-cell-group>
<van-checkbox v-model="isCreate">我的产说会</van-checkbox>
<van-checkbox class="mt20" v-model="isCreate">我的产说会</van-checkbox>
</div>
</div>
<div class="bottom-area bottom-btn">
@@ -70,11 +70,11 @@
</van-popup>
<!-- 筛选时间选择 -->
<van-popup v-model="showDataPicker" position="bottom">
<van-datetime-picker type="datetime" v-model="filterDate" @confirm="onDateConfirm" :min-date="minDate" />
<van-datetime-picker type="datetime" v-model="filterDate" @confirm="onDateConfirm" @cancel="showDataPicker = false" :min-date="minDate" />
</van-popup>
<!-- 字段选择 -->
<van-popup v-model="popupShow" position="bottom">
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="onCancel" />
</van-popup>
</div>
</template>
@@ -83,7 +83,7 @@
import { Search, List, Icon, Sticky, Tabs, Tab, DatetimePicker, Checkbox } from 'vant'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import utils from '@/assets/js/business-common'
import { getProdectSaidList } from '@/api/ebiz/productionSay/productionSay.js'
import { getProdectSaidList, getBranchComList } from '@/api/ebiz/productionSay/productionSay.js'
export default {
name: 'List',
data() {
@@ -108,7 +108,7 @@ export default {
minDate: new Date(1900, 0, 1),
showDataPicker: false,
dateType: '',
filterIndex: '',
filterIndex: 'firstCode',
filterName: {
//筛选机构名称
first: '全部',
@@ -124,10 +124,18 @@ export default {
},
}
},
created(){
localStorage.orderNo = '';
computed: {
orderList() {
return this.saleList.filter((item) => {
return item.mainSaidProduct.search(this.searchName) != -1
})
},
},
created() {
localStorage.orderNo = ''
},
mounted() {
this.loadMore()
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
@@ -154,9 +162,58 @@ export default {
}
},
// 统计图
statistics() {},
statistics() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/productionSay/statistics',
},
routerInfo: {
path: '/productionSay/statistics',
},
})
},
// 取消选择
onCancel() {
let str = ''
for (let key in this.filterName) {
if (key.indexOf('Code') == -1) {
if (this.filterName[key] == '全部') {
break
}
str = key
}
}
this.filterIndex = str
this.popupShow = false
},
// 确认选择
onConfirm(val) {},
onConfirm(val) {
console.log(val)
switch (this.filterIndex) {
case 'first':
this.filterName['second'] = '全部'
this.filterName['third'] = '全部'
this.filterName['fourth'] = '全部'
this.filterName['fifth'] = '全部'
break
case 'second':
this.filterName['third'] = '全部'
this.filterName['fourth'] = '全部'
this.filterName['fifth'] = '全部'
break
case 'third':
this.filterName['fourth'] = '全部'
this.filterName['fifth'] = '全部'
break
case 'fourth':
this.filterName['fifth'] = '全部'
break
}
this.popupShow = false
this.filterName[this.filterIndex] = val.text
this.filterName[this.filterIndex + 'Code'] = val.id
},
filterDateClick(type) {
if (type == 'start') {
this.showDataPicker = true
@@ -180,30 +237,91 @@ export default {
}
},
toSelect(type) {
this.popupShow = true
this.filterIndex = type + 'Code'
this.filterIndex = type
switch (type) {
case 'first':
this.columns = []
// this.getBranchComList('86', '01')
this.popupShow = true
this.columns = [
{ id: '', text: '全部' },
{ id: '86', text: '全国' },
]
break
case 'second':
if (this.filterName['first'] == '全部') return this.$toast('请先选择上一级机构')
this.getBranchComList(this.filterName['firstCode'], '01')
break
case 'third':
if (this.filterName['second'] == '全部') return this.$toast('请先选择上一级机构')
this.getBranchComList(this.filterName['secondCode'], '02')
break
case 'fourth':
if (this.filterName['third'] == '全部') return this.$toast('请先选择上一级机构')
this.getBranchComList(this.filterName['thirdCode'], '03')
break
case 'fifth':
if (this.filterName['fourth'] == '全部') return this.$toast('请先选择上一级机构')
this.getBranchComList(this.filterName['fourthCode'], '04')
break
}
},
getBranchComList(manageCode, manageLv) {
let data = {
bussinessType: 'normal',
manageCode,
manageLv,
}
getBranchComList(data).then((res) => {
res.content.forEach((item) => {
item.id = item.code
item.text = item.name
})
res.content.unshift({ id: '', text: '全部' })
this.popupShow = true
this.columns = res.content
})
},
// 筛选弹窗显示
filterCilck() {
this.showSideBar = true
},
// 筛选确认按钮
submit() {
this.saleList = []
this.currentPage = 1
this.loadMore()
this.showSideBar = false
},
// 筛选重置按钮
reset() {
this.filterCreateDate = '' //筛选起始时间
this.filterEndDate = '' //筛选结束时间
this.isCreate = '' //是否创建人
this.filterIndex = 'firstCode'
this.filterName['first'] = '全部'
this.filterName['second'] = '全部'
this.filterName['third'] = '全部'
this.filterName['fourth'] = '全部'
this.filterName['fifth'] = '全部'
this.filterName['firstCode'] = ''
this.filterName['secondCode'] = ''
this.filterName['thirdCode'] = ''
this.filterName['fourthCode'] = ''
this.filterName['fifthCode'] = ''
this.showSideBar = false
this.saleList = []
this.currentPage = 1
this.loadMore()
this.showSideBar = false
},
// 搜索列表
searchList() {},
// 切换tab
tabChange() {},
tabChange() {
this.saleList = []
this.currentPage = 1
this.loadMore()
},
// 查看详情
goDetail(item) {
localStorage.orderNo = item.id
@@ -226,7 +344,7 @@ export default {
status: this.active, //状态
startTime: this.filterCreateDate, //开始时间
endTime: this.filterEndDate, //结束时间
convokeOrganization: this.filterName[this.filterIndex], //召开机构
convokeOrganization: this.filterName[this.filterIndex + 'Code'], //召开机构
isCreate: this.isCreate ? '0' : '1', //是否创建人
}
this.getOrderList(pageInfo)
@@ -245,9 +363,10 @@ export default {
console.log(res)
if (res.result == 0) {
this.currentPage++
this.saleList = res.content.list
this.saleList = this.saleList.concat(res.content.list)
this.loading = false
if ((res.content.nextPage = 0)) {
this.finished = false
if (res.content.nextPage == 0) {
this.finished = true
this.finishedText = '已经全部加载'
}

View File

@@ -2,16 +2,7 @@
<div style="overflow: hidden">
<van-cell-group class="mt10">
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">产说会计划</p>
<van-field
required
readonly
v-model="info.convokeOrganizationCn"
clearable
label="召开机构"
name="召开机构"
placeholder="请输入"
v-validate="'required'"
/>
<van-field required readonly v-model="info.convokeOrgCn" clearable label="召开机构" name="召开机构" placeholder="请输入" v-validate="'required'" />
<FieldDatePicter
v-validate="'required'"
required
@@ -30,39 +21,20 @@
name="结束时间"
:value.sync="info.convokeEndTime"
type="datetime"
:minDate="convokeMinDate"
@confirm="onDateConfirm($event, '2')"
ref="convokeEndTime"
:flag="true"
></FieldDatePicter>
<van-field required readonly v-model="info.mainSaidProduct" clearable label="主讲产品" name="主讲产品" placeholder="请选择" v-validate="'required'" />
<van-field required readonly v-model="info.estimatePeople" clearable label="预估人数" name="预估人数" placeholder="请输入" v-validate="'required'" />
<van-field
required
readonly
v-model="info.estimatePremium"
clearable
label="预估保费(元)"
name="预估保费(元)"
placeholder="请输入"
v-validate="'required'"
/>
<van-field required readonly v-model="info.estimateUnits" clearable label="预估件数" name="预估件数" placeholder="请输入" v-validate="'required'" />
<van-field required readonly @click="toSelect('1')" right-icon="arrow" v-model="info.mainSaidProduct" clearable label="主讲产品" name="主讲产品" placeholder="请选择" v-validate="'required'" />
<van-field required v-model="info.estimatePeople" clearable label="预估人数" name="预估人数" placeholder="请输入" v-validate="'required'" />
<van-field required v-model="info.estimatePremium" clearable label="预估保费(元)" name="预估保费(元)" placeholder="请输入" v-validate="'required'" />
<van-field required v-model="info.estimateUnits" clearable label="预估件数" name="预估件数" placeholder="请输入" v-validate="'required'" />
</van-cell-group>
<van-cell-group class="mt10 mb60">
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">实际召开情况</p>
<van-field
required
readonly
v-model="info.realityConvokeOrganizationCn"
clearable
label="召开机构"
name="召开机构"
placeholder="请输入"
v-validate="'required'"
/>
<van-field readonly v-model="info.realityConvokeOrgCn" clearable label="召开机构" name="召开机构" placeholder="请输入" />
<FieldDatePicter
v-validate="'required'"
required
label="召开时间"
name="召开时间"
:value.sync="info.realityConvokeStartTime"
@@ -72,56 +44,34 @@
:flag="true"
></FieldDatePicter>
<FieldDatePicter
v-validate="'required'"
required
label="结束时间"
name="结束时间"
:minDate="realityMinDate"
:value.sync="info.realityConvokeEndTime"
type="datetime"
@confirm="onDateConfirm($event, '4')"
ref="realityConvokeEndTime"
:flag="true"
></FieldDatePicter>
<van-field
required
readonly
v-model="info.realityMainSaidProduct"
clearable
label="主讲产品"
name="主讲产品"
placeholder="请选择"
v-validate="'required'"
/>
<van-field required readonly v-model="info.realityPeople" clearable label="实际人数" name="实际人数" placeholder="请输入" v-validate="'required'" />
<van-field
required
readonly
v-model="info.estimateGetPremium"
clearable
label="预签保费(元)"
name="预签保费(元)"
placeholder="请输入"
v-validate="'required'"
/>
<van-field required readonly v-model="info.estimateGetUnits" clearable label="预签件数" name="预签件数" placeholder="请输入" v-validate="'required'" />
<van-field
required
readonly
v-model="info.retiredPremium"
clearable
label="已收回保费(元)"
name="已收回保费(元)"
placeholder="请输入"
v-validate="'required'"
/>
<van-field required readonly v-model="info.retiredUnits" clearable label="已收回件数" name="已收回件数" placeholder="请输入" v-validate="'required'" />
<van-field v-model="info.realityMainSaidProduct" right-icon="arrow" readonly @click="toSelect('2')" clearable label="主讲产品" name="主讲产品" placeholder="请选择" />
<van-field v-model="info.realityPeople" clearable label="实际人数" name="实际人数" placeholder="请输入" />
<van-field v-model="info.estimateGetPremium" clearable label="预签保费(元)" name="预签保费(元)" placeholder="请输入" />
<van-field v-model="info.estimateGetUnits" clearable label="预签件数" name="预签件数" placeholder="请输入" />
<van-field v-model="info.retiredPremium" clearable label="已收回保费(元)" name="已收回保费(元)" placeholder="请输入" />
<van-field v-model="info.retiredUnits" clearable label="已收回件数" name="已收回件数" placeholder="请输入" />
</van-cell-group>
<van-button type="danger" class="bottom-btn" @click="nextStep" v-no-more-click="1000">{{ isEdit == 1 ? '保存' : '创建完成' }}</van-button>
<!-- 字段选择 -->
<van-popup v-model="popupShow" position="bottom">
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false;" />
</van-popup>
</div>
</template>
<script>
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import { getProdectSaidById, addOrUpdate, getList } from '@/api/ebiz/productionSay/productionSay.js'
export default {
name: 'createChangeItem',
components: {
@@ -129,10 +79,14 @@ export default {
},
data() {
return {
popupShow:false,
columns:[],
convokeMinDate:new Date(1900, 0, 1),
realityMinDate:new Date(1900, 0, 1),
info: {
id: '',
convokeOrganization: '', //召开机构编号
convokeOrganizationCn: '', //召开机构
convokeOrgCn: '', //召开机构
convokeStartTime: '', //召开开始时间
convokeEndTime: '', //召开结束时间
mainSaidProduct: '', //主讲产品
@@ -140,7 +94,7 @@ export default {
estimatePremium: '', //预估保费
estimateUnits: '', //预估件数
realityConvokeOrganization: '', //实际召开机构编号
realityConvokeOrganizationCn: '', //实际召开机构
realityConvokeOrgCn: '', //实际召开机构
realityConvokeStartTime: '', // 实际召开开始时间
realityConvokeEndTime: '', //实际召开结束时间
realityMainSaidProduct: '', //实际主讲产品
@@ -159,21 +113,83 @@ export default {
this.$jump({
flag: 'navigation',
extra: {
title: '修改产说会',
title: '编辑产说会',
hiddenRight: '1',
},
})
}
getList({}).then(res=>{
console.log(res)
this.info.convokeOrgCn = res.content.org.manageComName;
this.info.convokeOrganization = res.content.org.manageComCode;
this.info.realityConvokeOrgCn = res.content.org.manageComName;
this.info.realityConvokeOrganization = res.content.org.manageComCode;
res.content.proList.forEach((item)=>{
item.text = item.productName
})
this.columns = res.content.proList
})
},
methods: {
toSelect(type){
this.type = type;
this.popupShow = true;
},
onConfirm(val){
if(this.type == '1'){
this.info.mainSaidProduct = val.text;
}else if(this.type == '2'){
this.info.realityMainSaidProduct = val.text;
}
this.popupShow = false;
},
onDateConfirm(event, type) {
console.log(event)
console.log(type)
if(type == 1){
this.convokeMinDate = new Date(event)
}else if(type == 3){
this.realityMinDate = new Date(event)
}
},
getDetail() {
// 获取详情
getProdectSaidById({
id: localStorage.orderNo,
}).then((res) => {
if (res.result == '0') {
this.info = res.content
} else {
this.$toast(res.resultMessage)
}
})
},
async nextStep() {
let valid = await this.$validator.validate()
if (valid) {
addOrUpdate(this.info).then((res) => {
if (res.result == 0) {
if (this.isEdit == 1) {
this.$toast('产说会已保存,请在产说会列表中查看详情。')
} else {
this.$toast('产说会已创建完成,请在产说会列表-未开始中查看详情。')
}
this.$jump({
flag: 'goBack',
extra: {
refresh: '1',
index: '-1',
},
routerInfo: {
type: 2,
index: -1,
path: '/productionSay/List',
},
})
}
})
} else {
return this.$toast(this.$validator.errors.all()[0])
}
},
nextStep() {},
},
}
</script>

View File

@@ -0,0 +1,117 @@
<template>
<div class="table">
<statisticalTable @goLink="goLink" :theads="theads" :tableData="tableData" :isLink="true"></statisticalTable>
<!-- <table cellspacing="0" summary cellpadding="1">
<thead>
<tr>
<th class="th-fixed">机构</th>
<th>计划场次</th>
<th>预估人数</th>
<th>预估保费</th>
<th>实际场次</th>
<th>实际人数</th>
<th>预签保费</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in tableData" :key="index">
<td class="td-fixed">{{ item.convokeOrgCn }}</td>
<td>{{ item.splan }}</td>
<td>{{ item.estimatePeople }}</td>
<td>{{ item.estimatePremium }}</td>
<td>{{ item.rplan }}</td>
<td>{{ item.realityPeople }}</td>
<td>{{ item.estimateGetPremium }}</td>
</tr>
</tbody>
</table> -->
</div>
</template>
<script>
import { selectAllStatistical } from '@/api/ebiz/productionSay/productionSay.js'
import statisticalTable from '@/components/ebiz/productionSay/statisticsTable'
export default {
name: 'statistics',
components:{
statisticalTable,
},
data() {
return {
tableData: [],
theads: ['机构', '计划场次', '预估人数', '预估保费', '实际场次', '实际人数', '预签保费'],
}
},
created() {
selectAllStatistical({}).then((res) => {
this.tableData = res.content.list
})
},
methods: {
goLink(item){
console.log(item)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/productionSay/statisticsItem?convokeOrganization='+item.convokeOrganization,
},
routerInfo: {
path: '/productionSay/statisticsItem?convokeOrganization='+item.convokeOrganization,
},
})
},
},
}
</script>
<style lang="scss" scoped>
.table {
overflow-x: auto;
margin:5px;
box-sizing: border-box;
background:#fff;
}
.table th {
width: 100px;
}
table {
width: 160vw;
}
.table {
margin-top: 10px;
table {
border-collapse: collapse;
}
table,
th,
td {
border: 1px solid #999;
text-align: center;
font-size: 14px;
line-height: 30px;
background: #fff;
}
thead {
th {
height: 40px;
line-height: 40px;
background: #e9332e;
color: #fff;
}
}
}
.th-fixed {
position: sticky;
left: 0;
width: 200px;
padding: 0 5px;
}
.td-fixed {
position: sticky;
width: 200px;
padding: 0 5px;
left: 0;
text-decoration: underline;
}
</style>

View File

@@ -0,0 +1,82 @@
<template>
<div class="table">
<statisticalTable :theads="theads" :tableData="tableData" :isLink="false"></statisticalTable>
</div>
</template>
<script>
import { selectStatisticalByCon } from '@/api/ebiz/productionSay/productionSay.js'
import statisticalTable from '@/components/ebiz/productionSay/statisticsTable'
export default {
name: 'statistics',
components: {
statisticalTable,
},
data() {
return {
tableData: [],
theads: ['机构', '计划场次', '预估人数', '预估保费', '实际场次', '实际人数', '预签保费'],
}
},
created() {
if (this.$route.query.convokeOrganization) {
selectStatisticalByCon({convokeOrganization:this.$route.query.convokeOrganization}).then((res) => {
this.tableData = res.content.list
})
}
},
methods: {},
}
</script>
<style lang="scss" scoped>
.table {
overflow-x: auto;
margin: 5px;
box-sizing: border-box;
background: #fff;
}
.table th {
width: 100px;
}
table {
width: 160vw;
}
.table {
margin-top: 10px;
table {
border-collapse: collapse;
}
table,
th,
td {
border: 1px solid #999;
text-align: center;
font-size: 14px;
line-height: 30px;
background: #fff;
}
thead {
th {
height: 40px;
line-height: 40px;
background: #e9332e;
color: #fff;
}
}
}
.th-fixed {
position: sticky;
left: 0;
width: 200px;
padding: 0 5px;
}
.td-fixed {
position: sticky;
width: 200px;
padding: 0 5px;
left: 0;
text-decoration: underline;
}
</style>