Commit f3c3a4a8 by 杨明

fixed

1 parent 31ec12a9
......@@ -2,11 +2,11 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-17 10:56:24
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-18 16:52:06
* @LastEditTime: 2023-05-20 10:55:46
* @FilePath: \scrm-micro-home\src\api\modules\activity.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http } from '@/main'
import { http, http_merchant } from '@/main'
const url = 'rop-scrm-marketing/router'
const findActivityInfo = params => {
params.method = 'marketing.api.supermarket.findActivityInfo'
......@@ -79,7 +79,17 @@ const getCalendarDatail = params => {
returnAll: true
})
}
// 门店详情
const findMerchantDetailByMerchantNo = params => {
params.method = 'merchants.api.open.findMerchantDetailByMerchantNo'
return http_merchant({
url: 'rop-merchants/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default {
findActivityInfo,
createSuperMarketing,
......@@ -87,5 +97,6 @@ export default {
listByPage,
activityDetail,
getCalendarList,
getCalendarDatail
getCalendarDatail,
findMerchantDetailByMerchantNo
}
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-dialog title="选择跟进专员" :append-to-body="true" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-18 20:37:20
* @LastEditTime: 2023-05-20 10:49:23
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
......@@ -21,3 +21,5 @@ start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-07-22 18:15:13
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-19 16:24:47
* @LastEditTime: 2023-05-20 13:45:58
* @FilePath: \scrm-micro-home\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -28,12 +28,13 @@ let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, sign_common, scene } = await fetchConfig()
const { response, request, sign, secret, request_common, request_merchant, sign_common, scene } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$scene = scene
const routesData = common.utils.deepClone(globalState.routers)
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-19 16:14:49
* @LastEditTime: 2023-05-20 10:56:36
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -20,7 +20,8 @@ export default {
calendarData: [],
calendarDataAll: [],
schemeList: [],
keywords: ''
keywords: '',
merchantInfo: {}
},
mutations: {
// 设置客户信息
......@@ -55,6 +56,9 @@ export default {
},
['SET_SCHEME_DATA'](state, payload) {
state.schemeList = payload
},
['SET_MERCHANT_INFO'](state, payload) {
state.merchantInfo = payload
}
},
actions: {
......@@ -101,6 +105,13 @@ export default {
conText.commit('SET_CALENDAR_DATA_ALL', res.data)
}
})
},
getMerchantInfo(conText, payload) {
apis.activity.findMerchantDetailByMerchantNo(payload).then(res => {
if (res.data) {
conText.commit('SET_MERCHANT_INFO', res.data)
}
})
}
}
}
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 10:23:52
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-19 16:21:52
* @LastEditTime: 2023-05-20 13:43:03
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\GPTAnalysis.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -126,8 +126,9 @@
</div>
<GLFooter>
<el-button @click="handleCancel" size="medium">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="medium">提交</el-button>
<el-button type="primary" @click="handleConfirm" size="medium">保存方案</el-button>
</GLFooter>
<select-emp-dialog v-if="isSelectEmpVisible" :isSelectEmpVisible="isSelectEmpVisible" @handleEmpClose="handleEmpClose" @handleEmpConfirm="handleEmpConfirm"></select-emp-dialog>
<select-gift-dialog v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedMealList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog>
<select-goods-dialog v-if="isSelectGoodsVisible" :isSelectGoodsVisible="isSelectGoodsVisible" :selectedGoodsLists="selectedGoodsList" @handleGoodsConfirm="handleGoodsConfirm" @handleGoodsClose="handleGoodsClose"></select-goods-dialog>
<select-equity-dialog v-if="isSelectEquityVisible" :isSelectEquityVisible="isSelectEquityVisible" :selectedEquityLists="selectedEquityList" @handleEquityConfirm="handleEquityConfirm" @handleEquityClose="handleEquityClose"></select-equity-dialog>
......@@ -192,6 +193,7 @@ const orderShow = ['service', 'cash', 'discount', 'exchange']
import selectGiftDialog from './selectGiftDialog'
import selectGoodsDialog from './selectGoodsDialog'
import selectEquityDialog from './selectEquityDialog'
import selectEmpDialog from './selectEmpDialog'
import Drawing from '@/utils/drawing'
import { mapState, mapActions } from 'vuex'
import gpt from '@/mixins/gpt'
......@@ -216,6 +218,7 @@ export default {
isSelectGiftVisible: false,
isSelectGoodsVisible: false,
isSelectEquityVisible: false,
isSelectEmpVisible: false,
editForm: {
marketingTitle: '',
marketingSubtitle: '',
......@@ -402,7 +405,7 @@ export default {
},
componentsName: 'analysis',
computed: {
...mapState('marketing', ['activityInfo', 'keywords']),
...mapState('marketing', ['activityInfo', 'keywords', 'merchantInfo']),
mergeStr() {
const { backgroundImage, detailImage, merchantLog } = this.editForm
if (!backgroundImage || !detailImage || !merchantLog) return
......@@ -424,10 +427,11 @@ export default {
components: {
selectGiftDialog,
selectGoodsDialog,
selectEquityDialog
selectEquityDialog,
selectEmpDialog
},
methods: {
...mapActions('marketing', ['setActivityInfo','setSchemeListData']),
...mapActions('marketing', ['setActivityInfo', 'setSchemeListData']),
//获取优惠券模板
couponTemplate() {
this.$apis.giftBag.couponTemplate({ pageSize: 10000, pageNum: 1 }).then(res => {
......@@ -562,6 +566,14 @@ export default {
handleEquityClose() {
this.isSelectEquityVisible = !this.isSelectEquityVisible
},
handleEmpClose() {
this.isSelectEmpVisible = !this.isSelectEmpVisible
},
handleEmpConfirm(selectedData) {
this.editForm.followStaff = selectedData[0].staffId
this.handleEmpClose()
this.addOrUpdate()
},
handleEquityConfirm(selectedData) {
this.selectedEquityList = selectedData
this.handleEquityClose()
......@@ -675,7 +687,6 @@ export default {
param.equityServices = equityServices.join(',')
param.importCustomersUrl = this.exportUrl
param.bigImage = this.bigImage
param.merchantId = 44211227 //this.$globalState.session.merchantId
param.superMarketingCouponRelRequestList = couponLists.concat(selectedGoodsList) || []
delete param.createdTime
delete param.activityCouponBaseInfoDTOS
......@@ -692,7 +703,7 @@ export default {
}
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
this.addOrUpdate()
this.isSelectEmpVisible = true
}
})
},
......@@ -726,18 +737,11 @@ export default {
})
})
},
init() {
this.setSchemeListData({ merchantId: 44211227, pageSize: 5, currentPage: 1 })
this.editForm = { marketingTitle: '',
marketingSubtitle: '',
activityTime: [],
superMarketingCouponRelRequestList: [],
backgroundImage: '',
detailImage: '',
merchantLog: ''
}
this.selectedGoodsList= []
this.selectedEquityList = []
init(isGetList = true) {
isGetList && this.setSchemeListData({ merchantId: this.editForm.merchantId, pageSize: 5, currentPage: 1 })
this.editForm = { marketingTitle: '', marketingSubtitle: '', activityTime: [], superMarketingCouponRelRequestList: [], backgroundImage: '', detailImage: '', merchantLog: '', merchantname: this.merchantInfo.merchantName, merchantAddress: this.merchantInfo.merchantAddress, merchantId: this.merchantInfo.merchantNo }
this.selectedGoodsList = []
this.selectedEquityList = []
},
getInfo() {
this.loading = true
......@@ -746,7 +750,7 @@ export default {
activityId: id
},
activityAPi = 'findActivityInfo'
if (subscribe != 7) {
if (subscribe != 8) {
param = {
id
}
......@@ -809,6 +813,9 @@ export default {
type: 'warning'
})
.then(() => {
if (!val.id) {
return this.init(false)
}
val.type == 'programme' ? this.getInfo() : this.getTemplateInfo()
})
.catch(() => {
......@@ -818,6 +825,7 @@ export default {
},
mounted() {
this.couponTemplate()
this.init(false)
}
}
</script>
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:01
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-19 16:16:07
* @LastEditTime: 2023-05-20 13:44:41
* @FilePath: \scrm-micro-home\src\views\home\components\marketing\MarketingLeft.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -11,7 +11,7 @@
<div class="store-wrap">
<div class="mrglr text-16 scrm-c3 weight-6">{{ merchantInfo.merchantName }}</div>
<div class="merchantId scrm-c3 scrm-f14">商户号:{{ merchantInfo.merchantId }}</div>
<el-button class="mrglr" icon="el-icon-plus" size="small" type="primary">新建</el-button>
<el-button class="mrglr" icon="el-icon-plus" size="small" type="primary" @click="addSuper">新建</el-button>
</div>
<!-- 营销方案 -->
<div class="scheme-wrap">
......@@ -92,7 +92,7 @@ export default {
},
mounted() {
this.getSchemeList()
this.setSchemeListData({ merchantId: 44211227, pageSize: 5, currentPage: 1 })
this.setSchemeListData({ merchantId: this.$globalState.session.merchantId, pageSize: 5, currentPage: 1 }) //44211227
},
methods: {
...mapActions('marketing', ['setActivityInfo', 'setSchemeListData']),
......@@ -108,6 +108,9 @@ export default {
}
})
},
addSuper() {
this.setActivityInfo({})
},
//设置活动详情
setActivity(item) {
this.setActivityInfo(item)
......
......@@ -13,7 +13,6 @@
<img src="@/assets/img/phone.png" alt="" />
</div>
<div class="review-refresh" @click="renewImg">更新预览图</div>
<div class="review-save" @click="handleSave">保存方案</div>
</div>
</template>
<script>
......
<template>
<GLDialog mode="big" :appendToBody="true" bigTitle="选择营销跟进专员" :hasFooter="hasFooter" :before-close="handleEmpClose" @onOk="handleEmpConfirm" @onCancel="handleEmpClose" :visible.sync="isSelectEmpVisible">
<div class="config-item">
<div class="market-title">
<label>*</label>
跟进专员:
</div>
<div class="market-content">
<el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i>
选择专员
</el-button>
<div class="el-input-tag input-tag-wrapper" v-show="staffInfo.length">
<GLFull :label="tag.staffName" :identi="`${tag.staffId}`" labelWidth="110" textType="user" :haveClose="true" v-for="(tag, idx) in staffInfo" :key="idx" @handleRemove="removeStaff(idx)"></GLFull>
</div>
</div>
</div>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
</GLDialog>
</template>
<script>
import selectEmp from '@/components/selectEmp/emp'
export default {
data() {
return {
staffInfo: []
}
},
components: {
selectEmp
},
props: {
isSelectEmpVisible: {
type: Boolean,
default: true
}
},
methods: {
handleAddEmp() {
this.staffStatus = false
this.$refs.selectEmpForm.init(this.staffInfo)
},
selectTable(item) {
this.staffInfo = item.map(item => {
return {
staffId: item.id,
staffName: item.staffName
}
})
},
handleEmpConfirm() {
this.$emit('handleEmpConfirm', this.staffInfo)
},
handleEmpClose() {
this.$emit('handleEmpClose')
}
}
}
</script>
<style lang="scss" scoped>
.config-item {
display: flex;
margin: 15px;
.market-title {
width: 120px;
text-align: right;
font-size: 14px;
color: #333333;
text-align: right;
line-height: 20px;
font-weight: 400;
margin-right: 6px;
label {
color: #eb4e4e;
}
}
.market-content {
flex: 1;
.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;
}
}
}
}
</style>
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-11 18:32:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-19 10:45:51
* @LastEditTime: 2023-05-20 13:43:34
* @FilePath: \scrm-micro-home\src\views\home\marketing.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -24,12 +24,12 @@
</div>
<div class="market-bottom" v-show="!showCalendar">
<!-- <template > -->
<div class="market-middle">
<marketing-middle></marketing-middle>
</div>
<div class="market-right">
<marketing-right></marketing-right>
</div>
<div class="market-middle">
<marketing-middle></marketing-middle>
</div>
<div class="market-right">
<marketing-right></marketing-right>
</div>
<!-- </template> -->
</div>
<div v-if="showCalendar" class="calendar-panel">
......@@ -59,11 +59,13 @@ export default {
mounted() {
this.getCalendarListData({})
this.getCalendarListDataAll()
this.getMerchantInfo({ merchantId: this.$globalState.session.merchantId })
},
methods: {
...mapActions({
getCalendarListData: 'marketing/getCalendarListData',
getCalendarListDataAll: 'marketing/getCalendarListDataAll',
getMerchantInfo: 'marketing/getMerchantInfo'
}),
handleShowCalendar(value) {
this.showCalendar = Boolean(value)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!