Commit 7e2d402a by 前端

Merge branch 'chenwq_dev_v2.0.0' into 'v2.0.0'

Chenwq dev v2.0.0

See merge request !74
2 parents 1b15a417 9459d907
...@@ -183,7 +183,8 @@ const getGroupListApi = params => { ...@@ -183,7 +183,8 @@ const getGroupListApi = params => {
// 获取素材列表 // 获取素材列表
const getMaterialListApi = params => { const getMaterialListApi = params => {
params.method = 'marketing.api.material.page' // params.method = 'marketing.api.material.page'
params.method = 'marketing.api.material.sop.page'
return http({ return http({
url: 'rop-scrm-marketing/router', url: 'rop-scrm-marketing/router',
method: 'POST', method: 'POST',
......
...@@ -179,6 +179,10 @@ html { ...@@ -179,6 +179,10 @@ html {
height: 120px; height: 120px;
} }
.marketing .w-320 {
width: 320px;
}
.marketing .m-t-8 { .marketing .m-t-8 {
margin-top: 8px; margin-top: 8px;
} }
......
<!-- 编辑sop --> <!-- 编辑sop -->
<template> <template>
<div class="marketing p-t-20 edit-box"> <div class="marketing edit-box">
<div class="sop-base-info"> <div class="sop-base-info">
<div class="container m-b-20"> <div class="container m-b-20">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="startDate"> <div slot="startDate">
<div v-show="editForm.eventList.length"> <el-input class="w-320" :placeholder="!editForm.eventList.length ? '设置营销事件后自动补充' : editForm.startDate + (editForm.endDate ? ' - ' + editForm.endDate : '')" disabled></el-input>
{{ editForm.startDate }}
<span v-show="editForm.endDate">- {{ editForm.endDate }}</span>
</div>
</div> </div>
<div slot="customerInfoList" slot-scope="scope"> <div slot="customerInfoList" slot-scope="scope">
<div v-if="!scope.scope.isDisabled"> <div v-if="!scope.scope.isDisabled">
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
return { return {
searchForm: { searchForm: {
groupId: '', groupId: '',
businessType: '' materialType: ''
}, },
searchFormData: [ searchFormData: [
{ {
...@@ -79,12 +79,12 @@ export default { ...@@ -79,12 +79,12 @@ export default {
}, },
{ {
label: '素材类型', label: '素材类型',
name: 'businessType', name: 'materialType',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'businessTypeList' optionsName: 'materialTypeList'
} }
], ],
// selectedData: [], // selectedData: [],
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
tableTotal: 0, tableTotal: 0,
baseData: { baseData: {
groupList: [], groupList: [],
businessTypeList: [ materialTypeList: [
{ {
confId: 1, confId: 1,
confName: 'PDF' confName: 'PDF'
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
groupId: '', groupId: '',
businessType: '' materialType: ''
} }
this.handleSearch() this.handleSearch()
}, },
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable> <GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div> </div>
<div class="selected-list"> <div class="selected-list">
<p class="list-title p-16">已选({{ selectedSum }})</p> <p class="list-title p-16">已选({{ Array.isArray(selectedCustomerList) ? selectedCustomerList.length : 0 }})</p>
<div class="list-customers" :style="{ height: heightBox + 'px' }"> <div class="list-customers" :style="{ height: heightBox + 'px' }">
<el-tag class="customer-tag" v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false"> <el-tag class="customer-tag" v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
...@@ -37,7 +37,6 @@ export default { ...@@ -37,7 +37,6 @@ export default {
url: url, url: url,
searchForm: {}, searchForm: {},
customerList: [], customerList: [],
selectedSum: 0,
heightBox: 200, heightBox: 200,
// 表格 // 表格
getListApi: this.$apis.sop.getCustomerListApi, getListApi: this.$apis.sop.getCustomerListApi,
...@@ -54,7 +53,10 @@ export default { ...@@ -54,7 +53,10 @@ export default {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
line: 1, line: 1,
width: '110px' width: 160,
formatter: cellValue => {
return cellValue.customerName || '-'
}
}, },
{ {
label: '客户手机号', label: '客户手机号',
...@@ -69,14 +71,14 @@ export default { ...@@ -69,14 +71,14 @@ export default {
prop: 'customerSex', prop: 'customerSex',
width: '60px', width: '60px',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.sexList.find(item => item.confId == cellValue.customerSex).confName return this.baseData.sexList.map(item => item.confId).includes(cellValue.customerSex) ? this.baseData.sexList.find(item => item.confId == cellValue.customerSex).confName : '未知'
} }
}, },
{ {
label: '是否加企微', label: '是否加企微',
prop: 'isJoin', prop: 'isJoin',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.joinList.find(item => item.confId == cellValue.isJoin).confName return this.baseData.joinList.map(item => item.confId).includes(cellValue.isJoin) ? this.baseData.joinList.find(item => item.confId == cellValue.isJoin).confName : '-'
} }
}, },
{ {
...@@ -137,15 +139,6 @@ export default { ...@@ -137,15 +139,6 @@ export default {
} }
}, },
watch: {
selectedCustomerList: {
handler() {
this.selectedSum = this.selectedCustomerList.length
},
deep: true
}
},
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 350 this.heightBox = clientHeight - 0.15 * clientHeight - 350
...@@ -155,13 +148,12 @@ export default { ...@@ -155,13 +148,12 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.searchForm = { this.searchForm = {
// labelStandInfoList: []
tagLists: [] tagLists: []
} }
this.selectedLabelList.length && this.selectedLabelList.length &&
this.selectedLabelList.forEach(item => { this.selectedLabelList.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => { item.labelList.forEach(subItem => {
// this.searchForm.labelStandInfoList.push({
this.searchForm.tagLists.push({ this.searchForm.tagLists.push({
groupId: item.labelGroup.id, groupId: item.labelGroup.id,
groupName: item.labelGroup.name, groupName: item.labelGroup.name,
...@@ -224,7 +216,7 @@ export default { ...@@ -224,7 +216,7 @@ export default {
var selectIds = this.selectedCustomerList.map(item => item.id) var selectIds = this.selectedCustomerList.map(item => item.id)
currentList.forEach(item => { currentList.forEach(item => {
if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) { if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) {
this.selectedLabelList.push(item) this.selectedCustomerList.push(item)
} }
}) })
this.recoverySelected() this.recoverySelected()
......
<!-- 编辑sop - 添加事件 --> <!-- 编辑sop - 添加事件 -->
<template> <template>
<div class="edit-event marketing p-t-20 edit-box"> <div class="edit-event marketing edit-box">
<!-- 营销时间 --> <!-- 营销时间 -->
<div class="container m-b-20"> <div class="container m-b-20">
<p class="edit-title">营销时间</p> <p class="edit-title">营销时间</p>
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
</div> </div>
</div> </div>
</div> </div>
<div v-show="!sopList.length" class="txt-center"> <div v-show="!sopList.length" class="txt-center" style="height: 400px;">
<img src="@/assets/empty.png" /> <img style="margin-top: 140px;" src="@/assets/empty.png" />
<p class="m-t-10">暂无数据</p> <p class="m-t-10">暂无数据</p>
</div> </div>
</div> </div>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
完成率 完成率
</div> </div>
<p class="analysis-num">{{ sopInfo.completedPercent + '%' }}</p> <p class="analysis-num">{{ sopInfo.completedPercent }}</p>
<div id="completePie" class="chart-pie"></div> <div id="completePie" class="chart-pie"></div>
</div> </div>
</div> </div>
...@@ -51,6 +51,7 @@ export default { ...@@ -51,6 +51,7 @@ export default {
size: 'small', size: 'small',
url: url, url: url,
sopInfo: { sopInfo: {
completedPercent: '',
sopStatistics: {} sopStatistics: {}
}, },
searchForm: {}, searchForm: {},
...@@ -149,7 +150,7 @@ export default { ...@@ -149,7 +150,7 @@ export default {
getBaseInfo() { getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => { this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res this.sopInfo = res
this.sopInfo.completedPercent = Math.round((this.sopInfo.sopStatistics.finishEventCount / this.sopInfo.sopStatistics.eventCount) * 100).toFixed(0) this.sopInfo.completedPercent = Math.round((this.sopInfo.sopStatistics.finishEventCount / this.sopInfo.sopStatistics.eventCount) * 100).toFixed(0) + '%'
this.drawPie() this.drawPie()
}) })
}, },
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20">总任务完成率</div> <div class="analysis-title-block m-b-20">总任务完成率</div>
<p class="analysis-num">{{ sopInfo.taskPercent + '%' }}</p> <p class="analysis-num">{{ sopInfo.taskPercent }}</p>
<div id="completePie" class="chart-pie"></div> <div id="completePie" class="chart-pie"></div>
</div> </div>
</div> </div>
...@@ -49,10 +49,10 @@ export default { ...@@ -49,10 +49,10 @@ export default {
size: 'small', size: 'small',
url: url, url: url,
sopInfo: { sopInfo: {
taskPercent: '',
sopStatistics: {} sopStatistics: {}
}, },
loading: false, loading: false,
taskPercent: '',
searchForm: {}, searchForm: {},
// isCheckStatus: false, // isCheckStatus: false,
// 表格 // 表格
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
getBaseInfo() { getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => { this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res this.sopInfo = res
this.sopInfo.taskPercent = this.sopInfo.sopStatistics.issuedTaskCount ? Math.round((this.sopInfo.sopStatistics.finishTaskCount / this.sopInfo.sopStatistics.issuedTaskCount) * 100).toFixed(0) : 0 this.sopInfo.taskPercent = this.sopInfo.sopStatistics.issuedTaskCount ? Math.round((this.sopInfo.sopStatistics.finishTaskCount / this.sopInfo.sopStatistics.issuedTaskCount) * 100).toFixed(0) + '%' : '-'
this.drawPie() this.drawPie()
}) })
}, },
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<span>{{ sopInfo.sopName }}</span> <span>{{ sopInfo.sopName }}</span>
</div> </div>
<div v-loading="loading">
<div> <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<!-- <span slot="footer"> <!-- <span slot="footer">
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -59,6 +61,7 @@ export default { ...@@ -59,6 +61,7 @@ export default {
return { return {
size: 'small', size: 'small',
url: url, url: url,
loading: false,
searchForm: { searchForm: {
sopId: '', sopId: '',
eventId: '' eventId: ''
...@@ -135,6 +138,7 @@ export default { ...@@ -135,6 +138,7 @@ export default {
mounted() { mounted() {
this.getBaseData() this.getBaseData()
this.$refs.touchListRef.tableHeightValues = '400px'
}, },
methods: { methods: {
...@@ -147,6 +151,7 @@ export default { ...@@ -147,6 +151,7 @@ export default {
}, },
getBaseData() { getBaseData() {
this.loading = true
var params = { var params = {
sopId: this.sopId, sopId: this.sopId,
ifFilter: 'Y', ifFilter: 'Y',
...@@ -158,7 +163,9 @@ export default { ...@@ -158,7 +163,9 @@ export default {
2: '短信', 2: '短信',
3: '微信朋友圈' 3: '微信朋友圈'
} }
this.$apis.sop.getEventListApi(params).then(res => { this.$apis.sop
.getEventListApi(params)
.then(res => {
this.baseData.sopEventList = res.list this.baseData.sopEventList = res.list
console.log(res) console.log(res)
if (this.baseData.sopEventList.length) { if (this.baseData.sopEventList.length) {
...@@ -172,6 +179,9 @@ export default { ...@@ -172,6 +179,9 @@ export default {
this.getBaseInfo() this.getBaseInfo()
this.$refs.touchListRef.refreshTable() this.$refs.touchListRef.refreshTable()
}) })
.finally(() => {
this.loading = false
})
}, },
beforeSearchFn() { beforeSearchFn() {
......
<!-- sop管理 --> <!-- sop管理 -->
<template> <template>
<div class="marketing p-t-20 sop-list"> <div class="marketing sop-list">
<div class="m-b-20 p-relative"> <div class="m-b-20 p-relative">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')">新建SOP</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')">新建SOP</el-button>
<el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button> <el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>
...@@ -69,7 +69,9 @@ export default { ...@@ -69,7 +69,9 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: 'SOP名称', label: 'SOP名称',
prop: 'sopName' prop: 'sopName',
width: 260,
line: 1
}, },
{ {
label: '营销时间', label: '营销时间',
...@@ -83,7 +85,7 @@ export default { ...@@ -83,7 +85,7 @@ export default {
label: '营销状态', label: '营销状态',
prop: 'sopStatus', prop: 'sopStatus',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.sopStatusList.find(item => item.confId == cellValue.sopStatus).confName return this.baseData.sopStatusList.map(item => item.confId).includes(cellValue.sopStatus) ? this.baseData.sopStatusList.find(item => item.confId == cellValue.sopStatus).confName : '-'
} }
}, },
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!