Commit db439fa8 by 杨明

fixed

1 parent 309f977f
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 16:16:03
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-11 11:17:23
* @LastEditTime: 2023-07-11 20:11:32
* @FilePath: \scrm-micro-link\src\api\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -97,7 +97,7 @@ const findActivityInfo = params => {
//获取小管家二维码
const EntWechatQrCode = params => {
params.method = 'marketing.api.supermarket.EntWechatQrCode'
return http_no_session({
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
......@@ -114,6 +114,17 @@ const activityDetail = params => {
sign: 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
})
}
const registerSso = params => {
params.method = 'scrm.api.busassistant.merchantCustomer.inviteCode'
return http({
......@@ -136,5 +147,6 @@ export default {
activityDetail,
findActivityInfo,
registerSso,
EntWechatQrCode
EntWechatQrCode,
findMerchantDetailByMerchantNo
}
......@@ -31,4 +31,3 @@ export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
export const http_gpt = params => Vue.prototype.$http_gpt(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
export const http_no_session = params => Vue.prototype.$http_no_session(params)
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-11 10:09:55
* @LastEditTime: 2023-07-11 20:11:05
* @FilePath: \scrm-micro-link\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -28,7 +28,6 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_no_session = new common.Http({ response, request, sign, secret, alert: message.error, headers: { 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.$http_gpt = new common.Http({ response, request: request_gpt, sign, secret, alert: ElementUI.Message.error })
......
......@@ -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-07-11 16:15:16
* @LastEditTime: 2023-07-11 19:17:57
* @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,6 +20,7 @@ export default {
process: { 0: false, 1: false, 2: false },
activityInfo: null,
addOrEdit: null,
merchantInfo: {},
step: 1
},
mutations: {
......@@ -42,9 +43,13 @@ export default {
SET_SUBSCRIBE(state, data) {
state.subscribe = data
},
//设置门店信息
SET_MERCHANT_INFO(state, data) {
state.merchantInfo = Object.assign({}, data)
},
// 设置活动信息
SET_ACTIVITY_INFO(state, data) {
state.activityInfo = data
state.activityInfo = Object.assign({}, data)
},
SET_KET_WORDs(state, data) {
state.keywords = data
......@@ -81,7 +86,7 @@ export default {
},
getTemplateInfo({ state }, data) {
apis.marketing.calendarDetail({ id: data }).then(res => {
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, codeId, couponItemList = [], id } = res || {}
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, codeId, couponItemList = [] } = res || {}
if (couponItemList && couponItemList.length)
couponItemList.forEach(item => {
item.id = item.couponId
......@@ -112,6 +117,14 @@ export default {
setProcess({ commit }, data) {
commit('SET_PROCESS', data)
},
getMerchantInfo(conText, payload) {
apis.marketing.findMerchantDetailByMerchantNo(payload).then(res => {
console.log(res, 33333333333)
if (res.data) {
conText.commit('SET_MERCHANT_INFO', res.data)
}
})
},
setSubscribe({ commit, dispatch }, data) {
commit('SET_SUBSCRIBE', data.subscribe ? data.subscribe : data)
dispatch('setKeyWords', data.subscribe ? data.keywords : subscribeData[data])
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 21:24:27
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-11 17:08:16
* @LastEditTime: 2023-07-11 19:23:47
* @FilePath: \scrm-micro-link\src\views\activityLink\components\MarketingContent.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -207,7 +207,6 @@ export default {
deep: true
},
subscribe(val) {
console.log(val, 999)
if (val == 5) {
this.editRule.detailImage[0].required = false
this.editFormData[0].isHide = false
......@@ -216,6 +215,18 @@ export default {
this.editFormData[0].isHide = true
}
},
merchantInfo: {
handler(val) {
if (!this.editForm.merchantname) {
this.editForm.merchantname = val.merchantName
}
if (!this.editForm.merchantAddress) {
this.editForm.merchantAddress = val.merchantAddress
}
},
deep: true
},
activityInfo: {
handler(info) {
if (Object.keys(info).length == 0) {
......@@ -225,7 +236,9 @@ export default {
activityTime: [],
backgroundImage: '',
detailImage: '',
merchantLog: ''
merchantLog: '',
merchantname: this.merchantInfo.merchantName,
merchantAddress: this.merchantInfo.merchantAddress
})
}
if (info.subTitle) {
......@@ -257,7 +270,7 @@ export default {
}
},
computed: {
...mapState('marketing', ['GPTList', 'subscribe', 'activityInfo', 'isInit'])
...mapState('marketing', ['GPTList', 'subscribe', 'activityInfo', 'isInit', 'merchantInfo'])
},
methods: {
...mapActions('marketing', ['setProcess', 'getTemplateInfo']),
......
......@@ -137,7 +137,6 @@ export default {
immediate: true
},
goodsIndex() {
console.log(3333)
this.getList()
},
serviceIndex() {
......
......@@ -17,10 +17,13 @@
<template v-if="item.isFinish">
<div class="task-box-form">
<label>导入文档:</label>
成功导入客户数 {{ item.customerNumTotal }}
<span>
<i class="el-icon-folder-delete"></i>
成功导入客户数
</span>
</div>
<div class="task-box-desc">
<div class="task-box-num">导入客户</div>
<div class="task-box-num">成功导入客户数 {{ item.customerNumTotal }}</div>
<div class="task-num-item flex-column-center">
<label>分配方式:</label>
{{ item.assignType == 0 ? '平均分配' : '上次跟进人' }}
......@@ -41,16 +44,16 @@
<i class="el-icon-plus"></i>
选择文档
</el-button>
<input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile($event, item)" />
<input type="file" style="opacity: 0" :ref="'file' + item.batchNo" accept="*" @change="uploadFile($event, item)" />
</div>
<a :href="importUrl">下载数据模板</a>
</div>
<div class="task-box-form" v-else>
<label>导入文档:</label>
成功导入客户数
<span>成功导入客户数</span>
</div>
<div class="task-box-desc">
<div class="task-box-num">导入客户</div>
<div class="task-box-num">成功导入客户数</div>
<div class="task-num-item flex-column-center">
<label>分配方式:</label>
<el-radio-group v-model="item.assignType" @change="handleChange(item)">
......@@ -194,7 +197,7 @@ export default {
if (res) {
this.importCustomer(res, item)
}
this.$refs.file.value = ''
this.$refs['file' + item.batchNo][0].value = ''
})
}
},
......@@ -404,6 +407,14 @@ export default {
padding: 0px 20px;
&-form {
margin-top: 20px;
font-size: 28rpx;
color: #333333;
> span {
> i {
color: #2cca74;
font-size: 20px;
}
}
.upload-btn {
position: relative;
display: inline-block;
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-11 16:06:58
* @LastEditTime: 2023-07-11 20:35:40
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -47,7 +47,7 @@
</div>
</div>
<div class="main-body" style="background: #DEEAF2;">
<template v-if="modelNum == 1">
<template v-if="[1, 2, 3].includes(modelNum)">
<!-- 权益服务 -->
<equity-one :detail="detail"></equity-one>
<!-- 商品券 -->
......@@ -55,7 +55,7 @@
<!-- 服务券 -->
<coupon-one :detail="detail"></coupon-one>
</template>
<template v-if="modelNum == 2">
<template v-if="[4].includes(modelNum)">
<!-- 权益服务 -->
<equity-two :detail="detail"></equity-two>
<!-- 商品券 -->
......@@ -63,7 +63,7 @@
<!-- 服务券 -->
<coupon-two :detail="detail"></coupon-two>
</template>
<template v-if="modelNum == 3">
<template v-if="[5, 6, 7].includes(modelNum)">
<!-- 权益服务 -->
<equity-three :detail="detail"></equity-three>
<!-- 商品券 -->
......@@ -71,7 +71,7 @@
<!-- 服务券 -->
<coupon-three :detail="detail"></coupon-three>
</template>
<template v-if="modelNum == 4">
<template v-if="[8].includes(modelNum)">
<!-- 权益服务 -->
<equity-four :detail="detail"></equity-four>
<!-- 商品券 -->
......@@ -300,6 +300,7 @@ export default {
this.isRenewal = false
if (!this.detail) return
if (RENEWAL.includes(this.detail.codeId)) {
this.modelNum = this.detail.codeId
this.isRenewal = true
}
if (FESTIVAL.includes(this.detail.codeId)) {
......@@ -322,6 +323,7 @@ export default {
this.isRenewal = false
if (!this.detail) return
if (RENEWAL.includes(this.detail.codeId)) {
this.modelNum = this.detail.codeId
this.isRenewal = true
this.backgroundHeight = await this.getImgH(this.detail.backgroundImage)
try {
......
......@@ -8,7 +8,7 @@
</div>
<div class="case-result" @click="handleSave">执行营销方案</div>
</div>
<div class="case-container">
<div class="case-container" v-show="showPhone">
<div class="case-container-title">预览营销方案</div>
<phoneView ref="viewForm"></phoneView>
</div>
......@@ -26,6 +26,7 @@ export default {
},
data() {
return {
showPhone: false,
loading: false,
caseList: [
{ label: '请导入营销任务客群', isFinish: true },
......@@ -37,10 +38,13 @@ export default {
watch: {
process: {
handler(val) {
console.log(val)
this.showPhone = false
for (let k in val) {
this.caseList[k].isFinish = val[k] ? true : false
}
if (val[2].codeId) {
this.showPhone = true
}
},
deep: true,
immediate: true
......
......@@ -110,7 +110,7 @@ export default {
},
methods: {
...mapActions('marketing', ['setSubscribe', 'getActivityInfo', 'getTemplateInfo']),
...mapMutations('marketing', ['SET_INIT', 'SET_STEP']),
...mapMutations('marketing', ['SET_INIT', 'SET_STEP', 'SET_ACTIVITY_INFO']),
selectFes(item) {
this.selectItem = item
this.getTemplateInfo(item.id)
......@@ -129,6 +129,7 @@ export default {
this.currentIndex = index
if (index != 6) {
this.setSubscribe(index)
this.SET_ACTIVITY_INFO({})
}
},
EntWechatQrCode() {
......
......@@ -13,7 +13,7 @@
<div class="service-content">x{{ item.couponAmount }} 抵扣券</div>
</div>
<div class="service-price">
{{ item.couponAnticipatedCost }}
{{ item.price }}
<span>元</span>
</div>
</div>
......@@ -45,7 +45,7 @@ export default {
const serviceList = n.selectedGoodsList || []
serviceList.length > 0 &&
serviceList.forEach(item => {
item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '')
item.price = (item.couponAnticipatedCost / 100).toFixed(2).replace(/\.[0]+$/, '')
})
this.serviceList = serviceList
},
......
......@@ -9,7 +9,7 @@
<div class="service-content">x{{ item.couponAmount }} 抵扣券</div>
</div>
<div class="service-price">
{{ item.couponAnticipatedCost }}
{{ item.price }}
<span>元</span>
</div>
</div>
......@@ -41,7 +41,7 @@ export default {
const serviceList = n.selectedGoodsList || []
serviceList.length > 0 &&
serviceList.forEach(item => {
item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '')
item.price = (item.couponAnticipatedCost / 100).toFixed(2).replace(/\.[0]+$/, '')
})
this.serviceList = serviceList
},
......
......@@ -13,7 +13,7 @@
<div class="service-content">x{{ item.couponAmount }} 抵扣券</div>
</div>
<div class="service-price">
{{ item.couponAnticipatedCost }}
{{ item.price }}
<span>元</span>
</div>
</div>
......@@ -47,7 +47,7 @@ export default {
const serviceList = n.selectedGoodsList || []
serviceList.length > 0 &&
serviceList.forEach(item => {
item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '')
item.price = (item.couponAnticipatedCost / 100).toFixed(2).replace(/\.[0]+$/, '')
})
this.serviceList = serviceList
},
......
......@@ -9,7 +9,7 @@
<div class="service-content">x{{ item.couponAmount }} 抵扣券</div>
</div>
<div class="service-price">
{{ item.couponAnticipatedCost }}
{{ item.price }}
<span>元</span>
</div>
</div>
......@@ -41,7 +41,7 @@ export default {
const serviceList = n.selectedGoodsList || []
serviceList.length > 0 &&
serviceList.forEach(item => {
item.couponAnticipatedCost = (item.denomination / 100).toFixed(2).replace(/\.[0]+$/, '')
item.price = (item.couponAnticipatedCost / 100).toFixed(2).replace(/\.[0]+$/, '')
})
this.serviceList = serviceList
},
......
......@@ -16,7 +16,7 @@ import importCustom from './components/ImportCoustom'
import scene from './components/Scene'
import marketing from './components/Marketing'
import process from './components/Process'
import { mapMutations } from 'vuex'
import { mapActions, mapMutations } from 'vuex'
export default {
components: {
importCustom,
......@@ -25,9 +25,11 @@ export default {
process
},
methods: {
...mapMutations('marketing', ['SET_STATUS'])
...mapMutations('marketing', ['SET_STATUS']),
...mapActions('marketing', ['getMerchantInfo'])
},
mounted() {
this.getMerchantInfo({ merchantId: this.$globalState.session.merchantId })
this.SET_STATUS(this.$route.query.addOrEdit)
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!