Commit 40bd88e8 by 前端

Merge branch 'v3.4.0-0117' into 'master'

V3.4.0 0117

See merge request !30
2 parents d1e88b9a 92732727
......@@ -1860,75 +1860,6 @@
"webpack-chain": "^6.4.0",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader-v16@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
"@vue/cli-shared-utils": {
......@@ -12703,6 +12634,75 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
......
......@@ -31,6 +31,16 @@ const getActivitylist = params => {
sign: true
})
}
//战报配置列表
const activityOpen = params => {
params.method = `scrm.api.shopmall.activity.action.report.open`
return http({
url,
method: 'post',
data: params,
sign: true
})
}
// 批量配置众筹活动战报专员
const insertStaff = params => {
......@@ -66,4 +76,4 @@ const getGroupList = params => {
})
}
export default { getStaffList, getMerchantList, getlistDepartmentTree, getActivitylist, insertStaff, getGroupList }
export default { getStaffList, getMerchantList, getlistDepartmentTree, getActivitylist, insertStaff, getGroupList, activityOpen }
......@@ -187,4 +187,16 @@ const batchRefundOrder = params => {
})
}
export default { getInstallInfo, orderVerfication, signerOrder, getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi, updateOrderType, batchRefundOrder }
/**导入众筹订单 */
const importCrowdFundingOrder = params => {
params.method = 'scrm.api.shopmall.weapp.crowdFunding.order.import'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default { getInstallInfo, orderVerfication, signerOrder, getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi, updateOrderType, batchRefundOrder, importCrowdFundingOrder }
import { http } from '@/main'
const url1 = '/rop-scrm-entmicro/router'
const url = '/rop-scrm-shopmall/router'
//门店号选择服务
const getMerchantList = params => {
params.method = 'entmicro.api.merchant.listDepartmentTree.select.merchant'
return http({
url: url1,
method: 'post',
data: params,
sign: true
})
}
const getlistDepartmentTree = params => {
params.method = `entmicro.api.department.listDepartmentTree`
return http({
url: url1,
method: 'GET',
data: params,
sign: true
})
}
// 园区店战报配置
const getYqReportlist = params => {
params.method = `scrm.api.boutiquecoupon.rop.router`
params.routerMethod = 'dj.api.smarcarlife.YqMerchantActionReportConfig.listWithPage'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'GET',
data: params,
sign: true
})
}
// 更新园区店战报配置
const updateYqConfig = params => {
params.method = `scrm.api.boutiquecoupon.rop.router`
params.routerMethod = 'dj.api.smarcarlife.YqMerchantActionReportConfig.updateConfig'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'GET',
data: params,
sign: true,
returnAll: true
})
}
// 批量配置众筹活动战报专员
const insertStaff = params => {
params.method = `scrm.api.shopmall.activity.action.report.staff.insert`
return http({
url,
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
// 根据众筹活动id获取众筹活动战报专员列表(运营版)
const getStaffList = params => {
params.method = `scrm.api.shopmall.activity.action.report.staff.list`
return http({
url,
method: 'post',
data: params,
sign: true
})
}
// 企微高级群聊列表
const getGroupList = params => {
params.method = `entmicro.api.wechatcloudcontrol.batchmessaging.group.list`
return http({
url: url1,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getStaffList, getMerchantList, getlistDepartmentTree, getYqReportlist, updateYqConfig, insertStaff, getGroupList }
......@@ -183,6 +183,17 @@ const getPayListApi = params => {
})
}
/**支付商户管理-下拉列表 */
const getPayMerchatListApi = params => {
params.method = 'entmicro.api.payment.pageListPayment'
return http({
url: 'rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
/**数据看板员工排名 */
const getRankListApi = params => {
params.method = 'scrm.api.shopmall.activity.ranking.page'
......@@ -281,4 +292,4 @@ const getCrowdfundingParams = params => {
sign: true
})
}
export default { getPayListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics, getCrowdfundingParams }
export default { getPayListApi, getPayMerchatListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics, getCrowdfundingParams }
......@@ -136,7 +136,7 @@ html {
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: #5850ff;
width: 215px;
// width: 215px;
}
.marketing .container {
......
......@@ -3,8 +3,8 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-07 14:38:52
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-10 10:29:41
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
......@@ -19,8 +19,8 @@ export const fetchConfig = function(isEnv = true) {
// return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json())
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config')
// return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config')
return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -87,6 +87,13 @@ const staticRoutes = Object.freeze([
path: '/payMerchantsManage/addPayMerchant',
component: resolve => require([`@/views/payMerchantsManage/addPayMerchant.vue`], resolve),
meta: {}
},
// 转化+订单推送
{
name: 'saasOrder',
path: '/saasOrder/index',
component: resolve => require([`@/views/saasOrder/index.vue`], resolve),
meta: {}
}
])
export default staticRoutes
......@@ -12,9 +12,10 @@ let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common, merchantId } = await fetchConfig()
const { response, request, sign, secret, sign_common, request_common, merchantId, saasOrder } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$merchantId = merchantId
Vue.prototype.$saasOrder = saasOrder
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$request = request
......
......@@ -82,7 +82,7 @@
</div>
</div>
</template>
<template v-if="recordForm.imageUrlArr && recordForm.imageUrlArr.length < 9">
<template v-if="recordForm.imageUrlArr.length < 9">
<div class="upload-img">
<i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传照片</div>
......@@ -143,6 +143,7 @@ export default {
getActivityRecordDetail(id) {
this.$apis.record.getActivityRecordDetail({ Id: id }).then(res => {
if (res) {
if (!res.imageUrlArr) res.imageUrlArr = []
this.recordForm = res
}
})
......@@ -328,6 +329,7 @@ export default {
default:
this.recordForm.videoUrl = ''
}
console.log(this.recordForm, '===')
},
handleCancel() {
this.$router.go(-1)
......@@ -344,6 +346,9 @@ export default {
return
}
let params = JSON.parse(JSON.stringify(this.recordForm))
if (!params.imageUrlArr.length) {
params.imageUrlArr = ''
}
// 创建
if (this.routeInfo.addOrEdit == 1) {
let detailData = await this.$apis.record.findActivity({ activityId: this.recordForm.crowdFundActivityId })
......@@ -376,6 +381,7 @@ export default {
} else {
// 编辑
params.id = this.routeInfo.id
console.log(params, '--')
this.$apis.record.updateActivityRecord(params).then(res => {
if (res) {
this.$message({
......
......@@ -69,6 +69,7 @@
</div>
</div>
</div>
<div v-else>无</div>
</div>
</div>
</div>
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-04 16:41:09
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-11 17:18:05
* @FilePath: \scrm-micro-battles\src\views\battle\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 专区管理 -->
<template>
<div class="activity">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<!-- 表格区域 开始 -->
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex-between title">
<div class="title-text">专员列表</div>
<template v-if="activeName == 'first'">
......@@ -13,12 +22,14 @@
<GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div slot="activityTime" slot-scope="scope">{{ dateFormatFun(scope.scope.startTime) }}-{{ dateFormatFun(scope.scope.endTime) }}</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleClose(scope.scope, 'close')" v-if="scope.scope.actionReportSendFlag == 1">关闭</el-button>
<el-button type="text" @click="handleClose(scope.scope, 'open')" v-else>打开</el-button>
<el-button type="text" v-if="scope.scope.reportStaffs.length == 0" @click="handlebattleOn(scope.scope)">配置</el-button>
<el-button type="text" v-else @click="handlebattleOn(scope.scope, 'edit')">编辑</el-button>
</div>
</GLTable>
</div>
<GLDialog :mode="mode" class="battle-dialog" title="配置专员" @onOk="handlebattleConfirm" @onCancel="handlebattleClose" :visible.sync="battleVisible" :beforeSearchFn="beforeSearchFn">
<GLDialog mode="big" class="battle-dialog" bigTitle="配置专员" @onOk="handlebattleConfirm" @onCancel="handlebattleClose" :visible.sync="battleVisible" :beforeSearchFn="beforeSearchFn">
<div class="gl-form-page gl-form-min">
<el-form ref="form" label-width="154px">
<el-form-item label="发送人员:">
......@@ -43,63 +54,70 @@
<GLFull :label="tag.staffName" :identi="`${tag.id}`" labelWidth="110" textType="user" :haveClose="true" v-for="(tag, idx) in userList" :key="idx" @handleRemove="removeStaff(idx)"></GLFull>
</div>
</el-form-item>
<!-- 战报自动发送 -->
<el-form-item class="select-wrap" label="战报自动发送:">
<div class="common el-form-item__content">
<div class="el-input" ref="automaticRef">
<div class="el-input__inner" @click="openAutomatic">
<span v-if="wechat.automaticName == ''" class="placeholder">选择成员</span>
{{ wechat.automaticName }}
</div>
<span class="el-input__suffix" @click="openAutomatic">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!isAutomatic">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input>
<el-form-item label="战报配置:">
<div class="config-pannel">
<div class="config-item">
<!-- 战报自动发送 -->
<el-form-item class="select-wrap" label="战报自动发送:">
<div class="common el-form-item__content">
<div class="el-input" ref="automaticRef">
<div class="el-input__inner" @click="openAutomatic">
<span v-if="wechat.automaticName == ''" class="placeholder">选择成员</span>
{{ wechat.automaticName }}
</div>
<span class="el-input__suffix" @click="openAutomatic">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!isAutomatic">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<template v-if="automaticData.length > 0">
<el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @node-click="handleNodeClick"></el-tree>
</template>
<div class="empty" v-else>暂无数据</div>
</div>
</gl-select-menu>
</transition>
</el-form-item>
<!-- 关联群 -->
<el-form-item class="select-wrap" label="关联群:">
<div class="common el-form-item__content">
<div class="el-input" ref="groupRef">
<div class="el-input__inner" @click="openGroup">
<span class="placeholder" v-if="wechat.roomName == ''">选择选择群</span>
{{ wechat.roomName }}
</div>
<span class="el-input__suffix" @click="openGroup">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isgroup ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!isgroup">
<gl-select-menu :domEl="domEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<ul class="el-scrollbar__view el-select-dropdown__list">
<template v-if="groupList.length > 0">
<li v-for="i in roomName == '' ? groupList : stageList" class="el-select-dropdown__item" :key="i" @click="selectGroup(i)">
<span>{{ i.roomName }}</span>
</li>
</template>
<div class="empty" v-else>暂无数据</div>
</ul>
</div>
</gl-select-menu>
</transition>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<template v-if="automaticData.length > 0">
<el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @node-click="handleNodeClick"></el-tree>
</template>
<div class="empty" v-else>暂无数据</div>
</div>
</gl-select-menu>
</transition>
</el-form-item>
<!-- 关联群 -->
<el-form-item class="select-wrap" label="关联群:">
<div class="common el-form-item__content">
<div class="el-input" ref="groupRef">
<div class="el-input__inner" @click="openGroup">
<span class="placeholder" v-if="wechat.roomName == ''">选择选择群</span>
{{ wechat.roomName }}
</div>
<span class="el-input__suffix" @click="openGroup">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isgroup ? 'is-reverse' : '']"></i></span>
</span>
</div>
<div class="clear-btn" @click="clearWechat">清空</div>
</div>
<transition name="el-zoom-in-top" v-if="!isgroup">
<gl-select-menu :domEl="domEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<ul class="el-scrollbar__view el-select-dropdown__list">
<template v-if="groupList.length > 0">
<li v-for="i in roomName == '' ? groupList : stageList" class="el-select-dropdown__item" :key="i" @click="selectGroup(i)">
<span>{{ i.roomName }}</span>
</li>
</template>
<div class="empty" v-else>暂无数据</div>
</ul>
</div>
</gl-select-menu>
</transition>
</el-form-item>
</el-form>
</div>
......@@ -146,7 +164,31 @@ export default {
name: 'second'
}
],
tableSearchForm: {},
searchFormData: [
{
label: '活动门店',
name: 'merchantName',
type: 'input'
},
{
label: '活动名称',
name: 'activityNames',
type: 'select',
width: '215px',
multiple: true,
attrs: {
multipleLimit: 10
},
noFilter: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confName'
}
],
tableSearchForm: {
merchantName: '',
activityName: ''
},
// 表格
userList: [],
selectArray: [],
......@@ -207,6 +249,7 @@ export default {
},
mounted() {
this.getCrowdfundingParams()
this.getMerchantList()
},
computed: {
......@@ -244,6 +287,22 @@ export default {
}
},
methods: {
async getCrowdfundingParams() {
/**参数类型 1:众筹活动名称(返回类型String),2:众筹活动门店 */
const activity = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 1
})
let activityNameList = []
if (activity?.parameters && activity.parameters.length) {
activity.parameters.map(e => {
activityNameList.push({
confId: e,
confName: e
})
})
}
this.$set(this.searchFormData[1], 'optionList', this.$common.utils.deepClone(activityNameList))
},
clearData() {
this.setectList = []
this.config.merchantId = this.merchantId
......@@ -315,6 +374,38 @@ export default {
this.userList = []
}
},
handleClose(scope, status) {
const info = status == 'close' ? '关闭' : '打开'
const infoN = status == 'close' ? '取消' : '恢复'
this.$confirm(`${info}则${infoN}战报发送功能,是否确认${info}?`, info, {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
})
.then(() => {
this.activityOpen(scope)
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
},
activityOpen(scope) {
const { activityId, actionReportSendFlag } = scope
this.$apis.battle
.activityOpen({
activityId,
actionReportSendFlag: actionReportSendFlag == 1 ? 2 : 1
})
.then(res => {
if (res) {
this.handleSearch()
this.$message.success('操作成功')
}
})
},
battleSetHandle() {
if (this.setectList.length == 0) {
this.$message({
......@@ -324,6 +415,7 @@ export default {
return
}
this.userList = []
// this.editStatus = false
this.battleVisible = true
},
dateFormatFun(date) {
......@@ -353,11 +445,12 @@ export default {
})
return
}
if (this.wechat.automaticName !== ''&&this.wechat.roomName == '') {
if (this.wechat.automaticName !== '' && this.wechat.roomName == '') {
this.$message({
message: '请选择关联群',
type: 'error'
})
return
}
let staffRequestList = []
let batchstaffRequestList = []
......@@ -371,13 +464,19 @@ export default {
})
})
this.setectList.forEach(item => {
let autoStaff = {}
if (Object.keys(this.wechat).length) {
autoStaff = {
autoStaffId: this.wechat.staffId,
autoStaffName: this.wechat.automaticName,
autoGroupId: this.wechat.groupId,
autoGroupName: this.wechat.roomName,
autoGroupMerchantId: this.$merchantId
}
}
batchstaffRequestList.push({
activityId: item.activityId,
autoStaffId: this.wechat.staffId,
autoStaffName: this.wechat.automaticName,
autoGroupId: this.wechat.groupId,
autoGroupName: this.wechat.roomName,
autoGroupMerchantId: this.$merchantId,
...autoStaff,
staffRequestList
})
})
......@@ -405,9 +504,14 @@ export default {
this.userList = []
this.setectList.push(data)
this.battleVisible = true
if (sign) this.getStaffList(data)
if (sign) {
this.getStaffList(data)
}
this.getDepartmentTree()
},
clearWechat() {
this.wechat = {}
},
//获取编辑
getStaffList(data) {
this.$apis.battle.getStaffList({ id: data.activityId }).then(res => {
......@@ -434,8 +538,14 @@ export default {
handleClick() {
this.handleSearch()
},
handleReset() {
this.tableSearchForm = {}
this.handleSearch()
},
getParams() {
let params = {}
let params = {
...this.tableSearchForm
}
this.activeName == 'first' ? (params.activityStatus = 2) : (params.activityStatus = 3)
return params
},
......@@ -512,6 +622,11 @@ export default {
<style scoped lang="scss">
.activity {
/deep/ {
.el-select .el-tag {
max-width: 60% !important;
}
}
.container {
margin-top: 16px;
.title {
......@@ -526,7 +641,26 @@ export default {
}
}
}
.config-pannel {
background: #f9f9f9;
width: 520px;
height: 168px;
display: flex;
.config-item {
padding: 26px 20px;
}
.clear-btn {
cursor: pointer;
background: #f1f1f1;
width: 40px;
height: 100%;
line-height: 20px;
font-size: 14px;
color: #666666;
padding: 60px 13px;
box-sizing: border-box;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
......
......@@ -27,12 +27,20 @@
</template>
</el-tabs>
</div>
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
<div class="btn-group">
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="visibleImportDialog(true)"
>导入</el-button>
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
</div>
</div>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
......@@ -461,6 +469,53 @@
</div>
</GLTable>
</GLDialog>
<!-- 导入 -->
<GLDialog
mode="mid"
class="import-dialog"
title="上传文件"
:visible.sync="importVisible"
@onCancel="importVisible = !importVisible"
@onOk="importFun"
>
<div class="gl-form-page gl-form-min">
<el-form
ref="form"
label-width="154px"
>
<el-form-item label="导入文件:">
<div class="flex">
<el-input
v-model="file.fileName"
readonly
></el-input>
<div class="import-button">
<el-button
class="default-btn"
:size="size"
type="default"
>
导入文件
<input
type="file"
class="upload-input"
accept=".xlsx, .xls"
@change="e => handleXlsxChange(e)"
ref="uploadInput"
/>
</el-button>
<el-button
class="download-btn"
type="text"
@click="downloadXlsx"
>模版下载</el-button>
</div>
</div>
</el-form-item>
</el-form>
</div>
</GLDialog>
</div>
</template>
......@@ -1213,6 +1268,11 @@ export default {
}
]
},
importVisible: false,
file: {
fileName: '',
fileType: ''
}
}
},
......@@ -1628,6 +1688,68 @@ export default {
})
this.searchForm.requestSource != 0 ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false)
}
},
handleXlsxChange (e) {
let [file] = e.srcElement.files,
reader = new FileReader()
if (!file) return
this.$notify({
title: '提示',
message: '文件上传中,请稍后'
})
// 默认1MB
this.file.fileName = file.name
reader.readAsDataURL(file)
reader.onload = el => {
const imgFile = el.target.result
const arrBase64 = imgFile.split(',')
const splitStr = file.name.split('.')
this.file.fileType = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
this.$notify({
title: '提示',
message: '文件上传成功',
type: 'success'
})
}
},
importFun () {
let { file: {
fileType,
fileName
} } = this
if (fileType) this.$apis.orderManage.importCrowdFundingOrder({ file: fileType }).then(res => {
console.log(res)
if (res) {
this.$notify({
title: '提示',
message: '订单导入成功',
type: 'success'
})
this.visibleImportDialog()
this.searchForm.requestSource != 0 ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false)
}
})
else this.$message.error(fileName ? '文件上传中,请稍后' : '请上传文件后,在点击确定')
},
downloadXlsx () {
var alink = document.createElement('a')
alink.href = '//img02.glsx.com.cn/weapp/resource/saas/scrm/xlsx/订单导入模板.xlsx'
alink.setAttribute('target', '_blank')
alink.download = '订单导入模板.xlsx'
alink.click()
alink.remove()
},
visibleImportDialog (val = false) {
if (this.$refs?.uploadInput) this.$refs.uploadInput.value = null
this.file = {
fileName: '',
fileType: ''
}
this.importVisible = val
}
}
}
......@@ -1757,4 +1879,36 @@ export default {
.el-select .el-tag {
max-width: 60% !important;
}
.import-dialog {
.el-dialog__body {
height: 70px !important;
min-height: 70px !important;
max-height: 70px !important;
}
.import-button {
position: relative;
margin-left: 10px;
cursor: pointer;
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 88px;
height: 100%;
opacity: 0;
z-index: 1;
cursor: pointer !important;
}
}
.download-btn {
position: absolute;
top: 110%;
right: 0;
}
}
.btn-group {
.el-button + .el-button {
margin-left: 8px;
}
}
</style>
<!-- 转化订单推送 -->
<template>
<div class="activity">
<!-- 表格区域 开始 -->
<div class="container">
<div class="flex-between title">
<div class="title-text">专员列表</div>
<el-button :size="size" type="primary" class="battle-set-btn" @click="battleSetHandle">批量配置专员</el-button>
</div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div slot="activityTime" slot-scope="scope">{{ dateFormatFun(scope.scope.startTime) }}-{{ dateFormatFun(scope.scope.endTime) }}</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" v-if="!scope.scope.staffId" @click="handlebattleOn(scope.scope)">配置</el-button>
<el-button type="text" v-else @click="handlebattleOn(scope.scope, 'edit')">编辑</el-button>
</div>
</GLTable>
</div>
<GLDialog :mode="mode" class="battle-dialog" title="配置专员" @onOk="handlebattleConfirm" @onCancel="handlebattleClose" :visible.sync="battleVisible">
<div class="gl-form-page gl-form-min">
<el-form :model="wechat" ref="form" label-width="154px" :rules="rules">
<el-form-item label="所属企业:">
<el-radio-group v-model="config.merchantId" @change="changeRadio">
<template v-for="(item, index) in merchantList">
<el-radio :key="index" :label="item.merchantId">{{ item.merchantName }}</el-radio>
</template>
</el-radio-group>
</el-form-item>
<!-- 战报自动发送 -->
<el-form-item class="select-wrap" label="战报自动发送:" prop="staffId">
<div class="common el-form-item__content">
<div class="el-input" ref="automaticRef">
<div class="el-input__inner" @click="openAutomatic">
<span v-if="wechat.automaticName == ''" class="placeholder">选择成员</span>
{{ wechat.automaticName }}
</div>
<span class="el-input__suffix" @click="openAutomatic">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!isAutomatic">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<template v-if="automaticData.length > 0">
<el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @node-click="handleNodeClick"></el-tree>
</template>
<div class="empty" v-else>暂无数据</div>
</div>
</gl-select-menu>
</transition>
</el-form-item>
<!-- 关联群 -->
<el-form-item class="select-wrap" label="关联群:" prop="groupId">
<div class="common el-form-item__content">
<div class="el-input" ref="groupRef">
<div class="el-input__inner" @click="openGroup">
<span class="placeholder" v-if="wechat.roomName == ''">选择选择群</span>
{{ wechat.roomName }}
</div>
<span class="el-input__suffix" @click="openGroup">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isgroup ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
<transition name="el-zoom-in-top" v-if="!isgroup">
<gl-select-menu :domEl="domEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<ul class="el-scrollbar__view el-select-dropdown__list">
<template v-if="groupList.length > 0">
<li v-for="i in roomName == '' ? groupList : stageList" class="el-select-dropdown__item" :key="i" @click="selectGroup(i)">
<span>{{ i.roomName }}</span>
</li>
</template>
<div class="empty" v-else>暂无数据</div>
</ul>
</div>
</gl-select-menu>
</transition>
</el-form-item>
</el-form>
</div>
</GLDialog>
</div>
</template>
<script>
import url from '@/assets/empty.png'
import { dateFormat } from '../../utils/index'
import GlSelectMenu from '../battle/components/select-dropdown.vue'
export default {
components: {
GlSelectMenu
},
data() {
return {
isgroup: true,
isAutomatic: true,
merchantId: '',
merchantName: '',
size: 'small',
mode: 'mid',
battleVisible: false,
battlestaffVisible: false,
url: url,
setectList: [],
merchantList: [],
groupList: [],
// 搜索
searchForm: {
yqMerchantId: '',
yqMerchantName: ''
},
searchFormData: [
{
label: '园区店',
name: 'yqMerchantName',
type: 'input',
maxlength: 128
},
{
label: '商户号',
name: 'yqMerchantId',
type: 'input',
maxlength: 11
}
],
// 表格
// userList: [],
selectArray: [],
getListApi: this.$apis.saasOrder.getYqReportlist,
tableParams: {
listName: 'list',
tableOption: true,
// // 行数据的key
mutiSelectUniqueKey: 'activityId',
// 多选ref的名称
mutiSelectName: 'activity',
tableColumns: [
{
label: '园区店',
prop: 'yqMerchantName'
},
{
label: '商户号',
prop: 'yqMerchantId'
},
{
label: '负责人',
prop: 'staffName',
line: 1,
width: 300
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
defaultProps: {
children: 'children',
label: 'name'
},
expandedKeys: [],
filterText: '',
automaticData: [],
stageList: [],
roomName: '',
config: {
merchantId: ''
},
rules: {
staffId: { required: true, message: '请选择战报自动发送', trigger: 'change' },
groupId: { required: true, message: '请选择关联群', trigger: 'change' }
},
wechat: {
staffId: '',
automaticName: '',
roomName: ''
},
baseData: {
merchantList: []
}
}
},
mounted() {
this.merchantList = this.$saasOrder?.merchantList || []
this.config.merchantId = this.merchantList[0]?.merchantId
this.config.merchantName = this.merchantList[0]?.merchantName
},
computed: {
domEl() {
return this.$refs.groupRef
},
automaticEl() {
return this.$refs.automaticRef
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
},
roomName(val) {
this.filterRoomName(val)
}
},
methods: {
handleReset() {
this.searchForm = {
yqMerchantId: '',
yqMerchantName: ''
}
this.handleSearch()
},
clearData() {
this.setectList = []
this.$refs.battleRef.clearMutiSelect()
this.config.merchantId = this.merchantList[0]?.merchantId
this.wechat = {
automaticName: '',
roomName: ''
}
this.hideSelect()
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
filterRoomName(value) {
this.stageList = this.groupList.filter(item => {
if (item.roomName.indexOf(value) !== -1) {
return item
}
})
},
handleNodeClick(data) {
this.hideSelect()
this.wechat.automaticName = data.name
this.wechat.staffId = data.staffId
this.wechat.roomName = ''
this.getGroupList(this.wechat.staffId)
},
hideSelect() {
this.isgroup = true
this.isAutomatic = true
},
selectGroup(data) {
this.hideSelect()
this.wechat.roomName = data.roomName
this.wechat.groupId = data.roomChatId
},
openGroup(e) {
this.isAutomatic = true
this.isgroup = !this.isgroup
},
openAutomatic() {
this.isgroup = true
this.isAutomatic = !this.isAutomatic
},
//所属企业
changeRadio(val) {
this.getDepartmentTree()
this.merchantList.forEach(item => {
item.merchantId == val ? (this.merchantName = item.merchantName) : ''
})
},
battleSetHandle() {
if (this.setectList.length == 0) {
this.$message({
message: '请选择园区店',
type: 'error'
})
return
}
this.getDepartmentTree()
this.battleVisible = true
},
dateFormatFun(date) {
return dateFormat(date)
},
selectionTable(val) {
this.setectList = val
},
handlestaffbattleConfirm() {
this.battlestaffVisible = false
},
handlestaffbattleClose() {
this.battlestaffVisible = false
},
handlebattleConfirm() {
if (!this.wechat.staffId) {
this.$message({
message: '请选择战报自动发送',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
if (this.wechat.automaticName !== '' && this.wechat.roomName == '') {
this.$message({
message: '请选择关联群',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
var params = {
enterpriseMerchantId: this.config.merchantId,
enterpriseMerchantName: this.config.merchantName,
staffId: this.wechat.staffId,
staffName: this.wechat.automaticName,
groupId: this.wechat.groupId,
groupName: this.wechat.roomName,
groupMerchantId: this.config.merchantId,
updatedBy: this.$globalState.session.accountName,
yqMerchantIdList: []
}
this.setectList.forEach(item => {
params.yqMerchantIdList.push(item.yqMerchantId)
})
// console.log(params, 'params---')
this.$apis.saasOrder.updateYqConfig(params).then(res => {
this.$message({
message: res.code == '0' ? '配置成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.data) {
this.battleVisible = false
this.handleSearch()
this.clearData()
}
})
},
handlebattleClose() {
this.battleVisible = false
this.clearData()
},
handleDetails() { },
handlebattleOn(data, sign) {
this.setectList = []
this.setectList.push(data)
this.battleVisible = true
// 编辑
if (sign) {
this.wechat.staffId = data.staffId
this.wechat.automaticName = data.staffName
this.wechat.groupId = data.groupId
this.wechat.roomName = data.groupName
this.getGroupList(this.wechat.staffId)
}
this.getDepartmentTree()
},
getGroupList(id) {
this.$apis.saasOrder.getGroupList({ msgStaffIdList: id }).then(res => {
if (res.code == 0) this.groupList = res.data
})
},
handleSetting() {
this.drawer = true
},
handleClick() {
this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.battleRef.data.length ? (this.$refs.battleRef.tableHeightValues = '') : this.$refs.battleRef.setTableHeightFun()
},
handleSearch() {
this.$refs.battleRef.refreshTable()
},
async getDepartmentTree() {
let params = { addChildrensFlag: true, queryMerchantId: this.config.merchantId, loginStatus: 1 }
// let params = { addChildrensFlag: true, queryMerchantId: 44209846, loginStatus: 1 }
let data = await this.$apis.saasOrder.getlistDepartmentTree(params)
this.ids = []
this.automaticData = data
await this.initData(this.automaticData)
this.expandedKeys = [this.automaticData[0].id]
},
initData(data) {
data.forEach((item, index) => {
this.$set(item, 'name', item.staffName ? item.staffName : item.departmentName)
let entmicroStaffResponses = this.$common.utils.deepClone(item.entmicroStaffResponses) || []
entmicroStaffResponses = entmicroStaffResponses.filter((staff, idx) => {
if (staff.staffName) {
this.$set(staff, 'name', staff.staffName)
} else {
this.$set(staff, 'name', staff.departmentName)
}
if (staff.staffId && !this.ids.includes(staff.staffId)) {
this.ids.push(staff.staffId)
return true
} else if (staff.staffId && this.ids.includes(staff.staffId)) {
return false
}
})
let child = this.$common.utils.deepClone(item.children) || []
child = child.filter((staff, idx) => {
if (staff.staffName) {
this.$set(staff, 'name', staff.staffName)
} else {
this.$set(staff, 'name', staff.departmentName)
}
if (staff.staffId && !this.ids.includes(staff.staffId)) {
this.ids.push(staff.staffId)
return true
} else if (staff.staffId && this.ids.includes(staff.staffId)) {
return false
} else if (staff.entmicroStaffResponses) {
staff.staffId = staff.id
return true
}
})
const children = [...child, ...entmicroStaffResponses]
item.children = children
//清除没有员工的部门
if (!item.staffName && item.entmicroStaffResponses === null) {
// data.splice(index, 1)
}
children.length && this.initData(children)
})
}
}
}
</script>
<style scoped lang="scss">
.message-Z-zinde {
z-index: 9999 !important;
}
.activity {
.container {
margin-top: 16px;
.title {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
.title-text {
font-weight: 600;
font-size: 16px;
color: #333333;
margin-left: 4px;
}
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
max-height: 68px;
overflow: auto;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 450px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ .el-tag {
background-color: #fff !important;
margin-bottom: 4px;
}
}
.select-wrap {
.common {
margin: 4px 0;
height: 40px !important;
overflow: hidden;
/deep/ .el-input {
height: 40px !important;
line-height: 40px !important;
}
/deep/ .el-input__suffix {
height: 40px !important;
margin-top: -4px;
.is-reverse {
transform: rotate(180deg);
}
}
}
}
}
.search-groomname {
width: 252px;
margin: 12px 16px 0;
/deep/.el-input {
width: 252px;
}
}
.filter-tree {
padding: 0 16px;
}
.empty {
padding: 10px 0;
margin: 0;
text-align: center;
color: #999;
font-size: 13px;
}
.placeholder {
font-size: 14px;
color: #c0c6ce;
line-height: 20px;
}
</style>
......@@ -218,6 +218,7 @@ export default {
},
resetTable() {
this.searchForm = {}
this.getTable()
// this.$refs.showSearch.refreshTable()
},
handleClose() {
......
......@@ -2,103 +2,36 @@
<template>
<div class="marketing">
<div class="m-b-20">
<GLButton
:size="size"
class="default-blue-btn el-icon-plus"
type="default"
@click="handleEdit('add')"
fn="新增众筹"
mode="el-button"
>新建众筹</GLButton>
<el-button
:size="size"
type="default"
class="default-blue-btn"
@click="handleJump"
>订单管理</el-button>
<GLButton :size="size" class="default-blue-btn el-icon-plus" type="default" @click="handleEdit('add')" fn="新增众筹" mode="el-button">新建众筹</GLButton>
<el-button :size="size" type="default" class="default-blue-btn" @click="handleJump">订单管理</el-button>
</div>
<div class="container">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button
:size="size"
class="default-blue-btn"
type="default"
@click="handleExport"
>导出</el-button>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<single-gltable
ref="activity"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div
slot="activityImg"
class="table-image"
slot-scope="scope"
>
<el-popover
placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block"
>
<img
class="table-popover-img"
:src="scope.scope.activityImg"
/>
<img
class="img-60 pointer"
slot="reference"
:src="scope.scope.activityImg"
/>
<single-gltable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="activityImg" class="table-image" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.activityImg" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" />
</el-popover>
</div>
<div
slot="linkText"
slot-scope="scope"
>
<p
class="cursor-pointer"
@click="handleDetail(scope)"
>{{ scope.scope[scope.prop] || 0 }}</p>
<div slot="linkText" slot-scope="scope">
<p class="cursor-pointer" @click="handleDetail(scope)">{{ scope.scope[scope.prop] || 0 }}</p>
</div>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</single-gltable>
<!-- 表格区域 end -->
</div>
<!-- 众筹分享 -->
<crowdFundingShare
:isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"
></crowdFundingShare>
<crowdFundingShare :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></crowdFundingShare>
</div>
</template>
......@@ -110,7 +43,7 @@ import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant'
export default {
name: 'crowdFundList',
data () {
data() {
return {
size: 'small',
url: url,
......@@ -137,12 +70,12 @@ export default {
width: '215px',
multiple: true,
attrs: {
multipleLimit: 10,
multipleLimit: 10
},
noFilter: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionLabel: 'confName'
},
{
label: '活动状态',
......@@ -161,12 +94,12 @@ export default {
width: '215px',
multiple: true,
attrs: {
multipleLimit: 10,
multipleLimit: 10
},
noFilter: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionLabel: 'confName'
}
],
// 表格按钮
......@@ -301,6 +234,26 @@ export default {
// width: 70
// },
{
label: '浏览量(次)',
prop: 'viewAmount',
addHtml: 'linkText',
width: 140
},
{
label: '访客',
prop: 'fansAmount',
addHtml: 'linkText'
},
{
label: '分享',
prop: 'shareAmount',
addHtml: 'linkText'
},
{
label: '销量',
prop: 'saleAmount'
},
{
label: '活动名称',
prop: 'activityName',
width: 220,
......@@ -333,12 +286,6 @@ export default {
}
},
{
label: '浏览量(次)',
prop: 'viewAmount',
addHtml: 'linkText',
width: 140
},
{
label: '进账',
prop: 'income',
formatter: cellValue => {
......@@ -360,20 +307,6 @@ export default {
}
},
{
label: '访客',
prop: 'fansAmount',
addHtml: 'linkText'
},
{
label: '分享',
prop: 'shareAmount',
addHtml: 'linkText'
},
{
label: '销量',
prop: 'saleAmount'
},
{
label: '退单数',
prop: 'chargebackNumber'
},
......@@ -445,12 +378,11 @@ export default {
singleGltable: GLTable
},
mounted () {
mounted() {
this.getCrowdfundingParams()
this.getOptionsList('searchFormData')
// const {
// $GLBUTTION_PERMISSIONS: { routes = [], routerBase }
// } = this
......@@ -462,17 +394,17 @@ export default {
},
methods: {
__getRoutes (ctx) {
__getRoutes(ctx) {
const {
$GLBUTTION_PERMISSIONS: { routes = [], routerBase }
} = ctx
return routes.find(route => location.pathname === `${routerBase}${route.path.split(':/')[0]}`)
},
getParams () {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
beforeSearchFn () {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
// delete this.tableSearchForm.createDate
......@@ -480,13 +412,13 @@ export default {
})
},
handleJump (path, row = {}) {
handleJump(path, row = {}) {
this.$router.push({
path: '/orderManage/index'
})
},
secondConfirm (title, txt, apiModule, apiName, apiParams, fn) {
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -512,16 +444,16 @@ export default {
},
//开始
start (item) {
start(item) {
this.startOrEndConfirm('开始', item)
},
//结束
end (item) {
end(item) {
this.startOrEndConfirm('结束', item)
},
startOrEndConfirm (txt, row) {
startOrEndConfirm(txt, row) {
var title = txt
var params = {}
params.id = row.id
......@@ -534,21 +466,21 @@ export default {
},
//置顶
topping (row) {
topping(row) {
var params = {}
params.id = row.id
this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params)
},
//删除
del (row) {
del(row) {
var params = {}
params.id = row.id
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params)
},
// 1-新增;2-编辑
handleEdit (addOrEdit, row) {
handleEdit(addOrEdit, row) {
var txtObj = {
add: '新建',
edit: '编辑',
......@@ -567,11 +499,11 @@ export default {
query: params
})
},
test (option) {
test(option) {
console.log(JSON.parse(JSON.stringify(option)))
},
// 明细
handleDetail ({ prop, scope }) {
handleDetail({ prop, scope }) {
let data = {
viewAmount: {
type: 1,
......@@ -597,25 +529,25 @@ export default {
})
},
handleExport () {
handleExport() {
var params = this.getParams()
this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => {
exportFn(res)
})
},
handleShare (row) {
handleShare(row) {
this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => {
this.shareForm = res
this.handleShareClose()
})
},
handleShareClose () {
handleShareClose() {
this.isShareVisible = !this.isShareVisible
},
getOptionsList (formName, hasAll = true, refreshSigle) {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
......@@ -641,25 +573,25 @@ export default {
}
},
handleSearch () {
handleSearch() {
this.$refs.activity.refreshTable()
},
handleReset () {
handleReset() {
this.searchForm = {
activityNames:[],
activityNames: [],
activityStatus: '',
merchantNames: []
}
this.handleSearch()
},
setTableFinishFun () {
setTableFinishFun() {
//接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
},
async getCrowdfundingParams () {
async getCrowdfundingParams() {
/**参数类型 1:众筹活动名称(返回类型String),2:众筹活动门店 */
const activity = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 1
......
......@@ -3,21 +3,34 @@
<div class="data-board-box">
<p class="edit-title">数据看板</p>
<div class="p-20">
<GLCombiForm ref="dataRef" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch"></GLCombiForm>
<GLCombiForm ref="dataRef"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"></GLCombiForm>
<div class="data-view">
<template v-for="(item, index) in dataList">
<div :key="index" class="item">
<div :key="index"
class="item">
<div class="name">
{{ item.name }}
<el-popover class="tips" placement="top" width="260" trigger="hover" :content="item.tips">
<img slot="reference" class="tips-icon" src="@/components/glsx-combi-form/images/icon-tip.png" />
<el-popover class="tips"
placement="top"
width="260"
trigger="hover"
:content="item.tips">
<img slot="reference"
class="tips-icon"
src="@/components/glsx-combi-form/images/icon-tip.png" />
</el-popover>
</div>
<div class="value">{{ dataBoard[item.key] || 0 }}</div>
<template v-if="item.half">
<div class="half">
日环比:
<div :class="['icon', { up: dataBoard[item.half] > 0 }, { down: dataBoard[item.half] < 0 }]"></div>
<div
:class="['icon', { up: dataBoard[item.half] > 0 }, { down: dataBoard[item.half] < 0 }]">
</div>
<span class="num">{{ Math.abs(dataBoard[item.half]).toFixed(2) || 0 }}%</span>
</div>
</template>
......@@ -37,14 +50,33 @@
@handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('rank')">导出</el-button>
<el-button :size="size"
class="default-blue-btn"
type="default"
@click="handleExport('rank')">导出</el-button>
</div>
<GLTable ref="dataTableRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" :hasNum="false">
<div slot="shareName" class="flex-align" slot-scope="scope">
<GLTable ref="dataTableRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
:hasNum="false">
<div slot="shareName"
class="flex-align"
slot-scope="scope">
<template v-if="scope.scope.shareAvatar">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.shareAvatar" />
<img class="img-36 pointer" slot="reference" :src="scope.scope.shareAvatar" />
<el-popover placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block">
<img class="table-popover-img"
:src="scope.scope.shareAvatar" />
<img class="img-36 pointer"
slot="reference"
:src="scope.scope.shareAvatar" />
</el-popover>
</template>
<span class="m-l-10">{{ scope.scope.shareName }}</span>
......@@ -58,20 +90,32 @@
<div class="p-20">
<div class="flex m-b-10 w-100-percent">
<span class="table-title">数据列表</span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('dailyOrders')">导出</el-button>
<el-button :size="size"
class="default-blue-btn"
type="default"
@click="handleExport('dailyOrders')">导出</el-button>
</div>
<el-table v-if="DailyOrderQuantityList.length" :data="DailyOrderQuantityListFormat" style="width: 100%">
<el-table-column :formatter="formatterHeader" label=""></el-table-column>
<el-table v-if="DailyOrderQuantityList.length"
:data="DailyOrderQuantityListFormat"
style="width: 100%">
<el-table-column :formatter="formatterHeader"
label=""></el-table-column>
<!-- width="140px" -->
<el-table-column v-for="(item, index) in DailyOrderQuantityList" :key="index" :prop="item" :label="item.day">
<el-table-column v-for="(item, index) in DailyOrderQuantityList"
:key="index"
:prop="item"
:label="item.day">
<template slot-scope="scope">
<span>{{ scope.$index ? item.currentOrderQuantity : item.specificDate }}</span>
</template>
</el-table-column>
<el-table-column :formatter="formatterEnd" fixed="right" label="总计"></el-table-column>
<el-table-column :formatter="formatterEnd"
fixed="right"
label="总计"></el-table-column>
</el-table>
<div v-else>
<img src="url" alt="" />
<img src="url"
alt="" />
</div>
</div>
</div>
......@@ -97,17 +141,32 @@
单
</span>
</span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('liveData')">导出</el-button>
<el-button :size="size"
class="default-blue-btn"
type="default"
@click="handleExport('liveData')">导出</el-button>
</div>
<!-- :searchForm="tableSearchForm" -->
<GLTable ref="dataTableRefDetailPage" :getListApi="getLiveDetailPage" :noDataImg="url" :tableParams="liveTableParams" :searchForm="LiveTableSearchForm" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="weChatName" class="flex-align" slot-scope="scope">
<img v-if="scope.scope.avatar" class="img-36 pointer img-circle" :src="scope.scope.avatar" />
<GLTable ref="dataTableRefDetailPage"
:getListApi="getLiveDetailPage"
:noDataImg="url"
:tableParams="liveTableParams"
:searchForm="LiveTableSearchForm"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn">
<div slot="weChatName"
class="flex-align"
slot-scope="scope">
<img v-if="scope.scope.avatar"
class="img-36 pointer img-circle"
:src="scope.scope.avatar" />
<span class="m-l-10">{{ scope.scope.nickname }}</span>
<span v-if="!scope.scope.avatar && !scope.scope.nickname">-</span>
</div>
<div slot="orderStatus" slot-scope="scope">
<span :class="['table-circle', 'm-r-8', scope.scope.orderStatus == '已下单' ? 'back-green' : 'back-grey']"></span>
<div slot="orderStatus"
slot-scope="scope">
<span
:class="['table-circle', 'm-r-8', scope.scope.orderStatus == '已下单' ? 'back-green' : 'back-grey']"></span>
<span>{{ scope.scope.orderStatus ? scope.scope.orderStatus : '-' }}</span>
</div>
</GLTable>
......@@ -122,13 +181,13 @@ import { downLoadFile, orderManageStatusList } from '@/common/constant'
import url from '@/assets/empty.png'
const dataList = [
{ name: '新增浏览量', key: 'browseCount', tips: '统计时间内,新增页面被浏览的次数(一人多次访问计为多次)', half: 'browseRingRatio' },
{ name: '新增访客数', key: 'fansCount', tips: '统计时间内访问页面的人数(一人多次访问计为一次)', half: 'fansRingRatio' },
{ name: '新增订单数', key: 'orderCount', tips: '统计时间内,新增订单数(只记录已付款的订单)', half: 'orderRingRatio' },
{ name: '累计浏览量', key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' },
{ name: '累计访客数', key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' },
{ name: '累计订单数', key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' }
],
{ name: '新增浏览量', key: 'browseCount', tips: '统计时间内,新增页面被浏览的次数(一人多次访问计为多次)', half: 'browseRingRatio' },
{ name: '新增访客数', key: 'fansCount', tips: '统计时间内访问页面的人数(一人多次访问计为一次)', half: 'fansRingRatio' },
{ name: '新增订单数', key: 'orderCount', tips: '统计时间内,新增订单数(只记录已付款的订单)', half: 'orderRingRatio' },
{ name: '累计浏览量', key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' },
{ name: '累计访客数', key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' },
{ name: '累计订单数', key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' }
],
optionList = [
{ confId: '1', confName: '转发次数' },
{ confId: '2', confName: '访客总数' },
......@@ -316,10 +375,12 @@ export default {
...result
}
})
.catch(err => {})
.catch(err => { })
},
handleReset() {
this.searchRankForm = this.$options.data.call(this).searchRankForm
console.log('handleReset')
this.handleSearchRank()
// this.$refs.rankRef.refreshTable()
// this.handleSearch()
},
......
......@@ -889,7 +889,9 @@ export default {
reservationInstallContactsName: '',
reservationInstallContactsPhone: '',
targetStock: '',
paymentAccountSource: '1',
paymentAccountId: '',
payMannerId: '',
paymentModel: 1,
// 战报内容配置
activityActionReport: {
......@@ -1553,6 +1555,28 @@ export default {
addHtml: 'live'
},
{
label: '账户类型',
name: 'paymentAccountSource',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: '1',
confName: '广联'
},
{
confId: '2',
confName: '服务商'
}
],
isDisabled: false,
handleRadioChange: (value, targetItem) => {
this.editForm.paymentAccountId = ''
this.configEditFormData.find(item => item.name == 'paymentAccountId').optionList = value == '1' ? this.baseData.payList : this.baseData.payMerchatList
}
},
{
label: '定金收款账户',
name: 'paymentAccountId',
type: 'select',
......@@ -1676,7 +1700,11 @@ export default {
COVER_LIVE: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_LIVE.gif',
COVER_REPLAY: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_REPLAY.gif'
}),
defaultFloatingMaskDiagram: 'https://wx.glsx.com.cn/upload/biz/ba63349f-8e9e-4e80-be3b-45cc38dcf13f.gif'
defaultFloatingMaskDiagram: 'https://wx.glsx.com.cn/upload/biz/ba63349f-8e9e-4e80-be3b-45cc38dcf13f.gif',
baseData: {
payList: [],
payMerchatList: []
}
}
},
filters: {
......@@ -1699,7 +1727,7 @@ export default {
this.editFormData.map(item => {
if (!['activityName', 'activityImg', 'promotion'].includes(item.name)) this.changeFormAttr('editFormData', 'isDisabled', [item.label], true)
})
this.changeFormAttr('configEditFormData', 'isDisabled', ['定金收款账户'], true)
this.changeFormAttr('configEditFormData', 'isDisabled', ['账户类型', '定金收款账户'], true)
}
}
},
......@@ -2269,6 +2297,8 @@ export default {
this.handleMusicChange(this.musicList.length - 1)
}
}
// 定金收款账户
this.editForm.paymentAccountSource = this.editForm.paymentAccountSource + ''
// 表单设置
this.editForm.formDescribeCheck = []
this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
......@@ -2423,6 +2453,9 @@ export default {
param[item] = ''
})
}
// 定金收款账户
param.payMannerId = param.paymentAccountSource == 1 ? '' : param.paymentAccountId
param.paymentAccountId = param.paymentAccountSource == 1 ? param.paymentAccountId : ''
// 标杆门店总产值/元(已结束战报)
if (param.activityActionReport.signMerchantProduceCount) {
param.activityActionReport.signMerchantProduceCount = (this.editForm.activityActionReport.signMerchantProduceCount * 10000).toFixed(0)
......@@ -2655,15 +2688,27 @@ export default {
this.liveEditFormData.find(item => item.name == 'liveBroadcastRoomId').optionList = staff
})
},
// 定金收款账户
getPayList() {
this.$apis.seckillActivity.getPayListApi({}).then(res => {
this.configEditFormData.find(item => item.name == 'paymentAccountId').optionList = res
this.editForm.paymentAccountId = this.editForm.paymentAccountId || res.find(item => item.isDefault == 'Y').id
getPayMerchatList() {
this.$apis.seckillActivity.getPayMerchatListApi({ pageNum: 1, pageSize: 9999 }).then(res => {
res.list.forEach(item => {
item.id = item.payMannerId
item.accountName = item.mchName
})
this.baseData.payMerchatList = res.list
this.configEditFormData.find(item => item.name == 'paymentAccountId').optionList = this.editForm.paymentAccountSource == 1 ? this.baseData.payList : this.baseData.payMerchatList
this.$nextTick(() => {
this.editStatus = false
})
})
},
// 定金收款账户
getPayList() {
this.$apis.seckillActivity.getPayListApi({}).then(res => {
this.baseData.payList = res
this.editForm.paymentAccountSource = this.editForm.paymentAccountSource || '1'
this.editForm.paymentAccountId = this.editForm.paymentAccountId || this.editForm.payMannerId || res.find(item => item.isDefault == 'Y')?.id
this.getPayMerchatList()
})
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!