Commit 0b3c2936 by 杨北旺

v1.1.1版本

1 parent 4375ba95
...@@ -107,7 +107,8 @@ const getCarTypeListApi = params => { ...@@ -107,7 +107,8 @@ const getCarTypeListApi = params => {
} }
const getHotlineApi = params => { const getHotlineApi = params => {
params.method = `${defaultPath}merchant.hotline.get` // params.method = `${defaultPath}merchant.hotline.get`
params.method = `scrm.api.equity.service.package.merchant.config.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
...@@ -348,6 +349,26 @@ const dateBycarNo = params => { ...@@ -348,6 +349,26 @@ const dateBycarNo = params => {
sign: true, sign: true,
}) })
} }
// 获取活码列表-
const activeCodeList = params => {
params.method = 'entmicro.api.code.getFreeChannelCode'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true,
})
}
// 更新活码
const updateActiveCode = params => {
params.method = 'scrm.api.equity.service.merchant.qrcode.update'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
})
}
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo }
\ No newline at end of file \ No newline at end of file
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo,activeCodeList,updateActiveCode }
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div v-if="show" class="left_code flex_ccc"> <div v-if="show" class="left_code flex_ccc">
<img :src="codeUrl" /> <img :src="codeUrl" />
<div style="height: 16px"></div> <div style="height: 16px"></div>
<span class="h18_title">服务热线</span> <span class="h18_title">{{phoneTitle}}</span>
<span class="h18_title">{{ phone }}</span> <span class="h18_title">{{ phone }}</span>
</div> </div>
</div> </div>
...@@ -28,6 +28,10 @@ export default { ...@@ -28,6 +28,10 @@ export default {
phone: { phone: {
type: String, type: String,
default: '189 0000 1234' default: '189 0000 1234'
},
phoneTitle:{
type:String,
default:'服务热线'
} }
}, },
data() { data() {
......
...@@ -22,8 +22,9 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -22,8 +22,9 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$defaultStartDate = '2021-07-01' Vue.prototype.$defaultStartDate = '2021-07-01'
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: '33c60c02-fbb9-480a-8b54-24b30fe30983' } }) // Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'dj-wechat-47893a3d-f991-4de8-9761-748aed926815-rop' } })
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'dj-wechat-47893a3d-f991-4de8-9761-748aed926815-rop' } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
......
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
</div> </div>
<!-- 二维码 --> <!-- 二维码 -->
<qrCode :bottom="320" phone="400 6123 886" :codeUrl="qrcodUrl"></qrCode> <qrCode :bottom="320" phone="400 6123 886" phoneTitle="提单及服务咨询" :codeUrl="qrcodUrl"></qrCode>
</div> </div>
</template> </template>
...@@ -666,7 +666,7 @@ export default { ...@@ -666,7 +666,7 @@ export default {
agreeList: [] agreeList: []
}, },
allCarChildList: [], allCarChildList: [],
qrcodUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/beforesale_equity_code.png', qrcodUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/preSale_qrCode.png'+'?time='+new Date(),
// 权益类型 // 权益类型
equityRadio: 1, equityRadio: 1,
// 自选权益产品属性传参数组 // 自选权益产品属性传参数组
......
...@@ -17,6 +17,46 @@ ...@@ -17,6 +17,46 @@
</el-select> </el-select>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
<!-- v1.1.0新增活码 -->
<div class="new_container">
<p class="title">针对包含“车主生活权益服务”的服务套餐,提供两种领取该服务的方式供门店选择。</p>
<div class="point_title">
<span class="point_icon"></span>
<span class="point_text">方式1:小程序领取。(车主直接登录小程序领取)</span>
</div>
<div style="height: 8px"></div>
<div class="point_title">
<span class="point_icon"></span>
<span class="point_text">方式2:加企微领取。(创建自动回复配有领取链接的活码,客户扫码加企微,自动回复小程序领取)</span>
</div>
<div class="radio_wrap">
<div class="box">
<div class="radio_title">
<el-radio v-model="wayRadio" :label="1">小程序领取</el-radio>
</div>
<div class="radio_panel">
<img :class="wayRadio == 2 ? 'opcaSty' : ''" :src="settingData.qrcodeUrl" alt="" />
</div>
</div>
<div v-if="!settingData.liveCodeUrl" class="box">
<div class="radio_title">
<el-radio v-model="wayRadio" :label="2">加企微领取</el-radio>
</div>
<el-button size="small" @click="openActiveModal" class="custom_blue">选择活码</el-button>
</div>
<div v-if="settingData.liveCodeUrl" class="box">
<div class="radio_title">
<el-radio v-model="wayRadio" :label="2">加企微领取</el-radio>
</div>
<div class="radio_panel">
<img :class="wayRadio == 1 ? 'opcaSty' : ''" :src="settingData.liveCodeUrl" alt="" />
</div>
<div class="radio_tip">{{ settingData.liveCodeName }}</div>
<div class="radio_edit" @click="toEditActived">修改</div>
</div>
</div>
</div>
</div> </div>
<div <div
class="fixed_bottom" class="fixed_bottom"
...@@ -28,15 +68,70 @@ ...@@ -28,15 +68,70 @@
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button> <el-button size="small" type="primary" @click="handleConfirm">确定</el-button>
</div> </div>
</template> </template>
<template v-if="showPage==2"> <template v-if="showPage == 2">
<div class="nodata_widget"> <div class="nodata_widget">
<div :style="[{ height: nodataHeight + 'px' }]" class="wrapper"> <div :style="[{ height: nodataHeight + 'px' }]" class="wrapper">
<img src="../../assets/nodata_icon.png" /> <img src="../../assets/nodata_icon.png" />
<span class="nodata_tip_1">您暂未开通售前权益服务</span> <span class="nodata_tip_1">您暂未开通售前权益服务</span>
<span class="nodata_tip_2">合作开通后,您方可在此页设置店面的服务热线和默认提单车辆品牌等。</span> <span class="nodata_tip_2">合作开通后,您方可在此页设置店面的服务热线和默认提单车辆品牌等。</span>
</div>
</div> </div>
</div>
</template> </template>
<el-dialog width="60%" height="50%" :visible.sync="dialogTableVisible">
<div slot="title" class="customTitle">
<div class="title1">选择渠道活码</div>
<span class="h9_title">仅查询自动回复中活动类型为“无忧服务”的活码</span>
</div>
<GLTable ref="table1" max-height="500" :tableTotal="tableTotal" layout="prev, pager, next" :hasNum="false" :tableData="tableData" :tableParams="tableParams">
<div slot="qrCode" slot-scope="scope">
<el-radio v-model="activeId" :label="scope.scope.qrCode" @change="selectActived($event, scope.scope)">&nbsp;</el-radio>
</div>
<div slot="staffInfo" slot-scope="scope">
<el-popover trigger="hover" placement="top" v-if="scope.scope.staffInfo.length > 3">
<div class="accountType-row" v-for="(item, index) in scope.scope.staffInfo" :key="index">
<i class="el-icon-user-solid"></i>
{{ item.staffName }}
</div>
<div slot="reference" class="name-wrapper">
<div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-show="index < 4">
<div class="accountType-row">
<i class="el-icon-user-solid"></i>
{{ index == 3 && scope.scope.staffInfo.length > 3 ? '...(' + scope.scope.staffInfo.length + ')' : item.staffName }}
</div>
</div>
</div>
</el-popover>
<div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-else>
<div class="accountType-row">
<i class="el-icon-user-solid"></i>
{{ item.staffName }}
</div>
</div>
</div>
<div slot="tagging" slot-scope="scope" class="tag-panel">
<el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3">
<div :title="item.name" class="accountType-row accountType-row-tag" v-for="(item, index) in scope.scope.taggingList" :key="index">
{{ item ? item.name : '' }}
</div>
<div slot="reference" class="name-wrapper">
<div v-for="(item, index) in scope.scope.taggingList" :key="index" v-show="index < 4">
<div :title="item.name" class="accountType-row accountType-row-tag">{{ index == 3 && scope.scope.taggingList.length > 3 ? '...(' + scope.scope.taggingList.length + ')' : item ? item.name : '' }}</div>
</div>
</div>
</el-popover>
<template v-if="scope.scope.taggingList && scope.scope.taggingList.length <= 3 && scope.scope.taggingList.length > 0">
<div v-for="(item, index) in scope.scope.taggingList" :key="index">
<div :title="item.name" class="accountType-row accountType-row-tag">{{ item ? item.name : '' }}</div>
</div>
</template>
<div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">--</div>
</div>
</GLTable>
<span slot="footer" class="dialog-footer flex_cc">
<el-button size="mini" @click="dialogTableVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="dialogTableVisible = false">确定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -88,17 +183,70 @@ export default { ...@@ -88,17 +183,70 @@ export default {
carChildOptions: [] carChildOptions: []
}, },
showPage: 0, showPage: 0,
nodataHeight:0 nodataHeight: 0,
wayRadio: 1,
dialogTableVisible: false,
tabletotal: 0,
tableData: [],
tableParams: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '',
prop: 'qrCode',
width: '40px',
addHtml: 'qrCode'
},
{
label: '渠道名称',
prop: 'codeName'
},
{
label: '使用专员',
prop: 'staffInfo',
width: '130px',
addHtml: 'staffInfo',
align: 'left'
},
{
label: '标签',
prop: 'tagging',
addHtml: 'tagging',
width: '150px'
},
{
label: '回复活动',
prop: 'marketingName'
}
]
},
activeId: -1,
settingData: {}
} }
}, },
components: { components: {
glsxCombiForm glsxCombiForm
}, },
watch: {
wayRadio(newValue, oldValue) {
if (newValue == 2) {
this.tableData.forEach(item => {
if (item.id == this.settingData.liveCodeId) {
this.activeId = item.liveCodeUrl
this.activeInfo = {
codeName: item.codeName,
id: item.id
}
}
})
}
}
},
created() { created() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.nodataHeight = clientHeight *0.8 this.nodataHeight = clientHeight * 0.8
const openStatus = localStorage.getItem('preSetStatus') const openStatus = localStorage.getItem('preSetStatus')
if (openStatus == 2) { if (openStatus == 2) {
this.showPage = 2 this.showPage = 2
...@@ -111,7 +259,7 @@ export default { ...@@ -111,7 +259,7 @@ export default {
mounted() { mounted() {
this.getHotline() this.getHotline()
// this.getDefaultCarbrand() this.getActiveCode()
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}, },
...@@ -119,7 +267,9 @@ export default { ...@@ -119,7 +267,9 @@ export default {
methods: { methods: {
getHotline() { getHotline() {
this.$apis.beforeSale.getHotlineApi({}).then(res => { this.$apis.beforeSale.getHotlineApi({}).then(res => {
this.editForm.hotline = res this.editForm.hotline = res.serviceHotline
this.wayRadio = res.codeType
this.settingData = res
}) })
}, },
getDefaultCarbrand() { getDefaultCarbrand() {
...@@ -156,6 +306,7 @@ export default { ...@@ -156,6 +306,7 @@ export default {
}) })
}, },
handleConfirm() { handleConfirm() {
this.comfimSelect()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
var params = this.$common.utils.deepClone(this.editForm) var params = this.$common.utils.deepClone(this.editForm)
...@@ -169,6 +320,99 @@ export default { ...@@ -169,6 +320,99 @@ export default {
}) })
} }
}) })
},
// 获取活码
getActiveCode() {
let para = {
pageNum: this.dialogTableVisible ? this.$refs.table1.page.pageNum : 1,
pageSize: this.dialogTableVisible ? this.$refs.table1.page.pageSize : 10
}
this.$apis.beforeSale.activeCodeList(para).then(res => {
this.tableData = res
// 测试数据
// for (let i = 1; i < 8; i++) {
// let temp = {
// id: i,
// codeName: '渠道名称',
// codeState: '渠道state',
// qrCode: 'https://wework.qpic.cn/wwpic/125650_7Bc5IIpgSBWX9AD_1638865496/0' + '?' + i,
// createdTime: new Date(),
// codeRemark: '备注备注',
// configId: '企微configId',
// staffName: '员工名称',
// marketingName: '德德德德德德德',
// tagging: '[{"groupId":"136","tagIds":"450","name":"白富美","labelType":"企业标签组测试"},{"groupId":"49","tagIds":"147,144","name":"测试一下,商名网标签采购交易市场企业排行榜为您提供最新的标签企业排行","labelType":"HGM测试自店标签组名称"},{"groupId":"46","tagIds":"145,122,121","name":"测试一下,中层,高层","labelType":"用户类型"}]',
// staffInfo: [
// {
// id: '员工主键',
// codeId: '渠道活码ID',
// staffId: '员工ID',
// staffName: '员工姓名',
// delFlag: '是否删除(0=正常,-1=删除)',
// relationId: '员工部门关联表主键'
// }
// ]
// }
// this.tableData.push(temp)
// }
this.tableData.forEach(item => {
this.$set(item, 'taggingList', [])
const tagging = eval(item.tagging)
tagging.forEach(itm => {
let name = itm.name.split(',')
name.forEach((tag, index) => {
item.taggingList.push({ name: tag })
})
})
})
})
},
openActiveModal() {
if (this.wayRadio == 1) {
return
}
this.dialogTableVisible = true
},
comfimSelect() {
if (this.activeId == -1 && this.wayRadio == 2) {
return
}
const { session } = this.$globalState
let para = {}
if (this.wayRadio == 1) {
para = {
merchantId: session.merchantId,
codeType: this.wayRadio
}
} else {
para = {
merchantId: session.merchantId,
liveCodeUrl: this.activeId,
codeType: this.wayRadio,
liveCodeName: this.activeInfo.codeName,
liveCodeId: this.activeInfo.id
}
}
this.$apis.beforeSale.updateActiveCode(para).then(res => {
// this.dialogTableVisible = false
})
},
// 修改活码
toEditActived() {
this.tableData.forEach(item => {
if (item.id == this.settingData.liveCodeId) {
this.activeId = item.liveCodeUrl
this.activeInfo = {
codeName: item.codeName,
id: item.id
}
}
})
this.dialogTableVisible = true
},
// 选择活码
selectActived(e, item) {
this.activeInfo = item
} }
} }
} }
...@@ -178,6 +422,7 @@ export default { ...@@ -178,6 +422,7 @@ export default {
margin-top: 17px; margin-top: 17px;
width: 100%; width: 100%;
height: calc(100% - 108px); height: calc(100% - 108px);
min-height: 600px;
} }
.edit-container { .edit-container {
width: 100%; width: 100%;
...@@ -255,6 +500,77 @@ export default { ...@@ -255,6 +500,77 @@ export default {
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} */ } */
.new_container {
box-sizing: border-box;
padding-left: 76px;
margin-top: 36px;
.title {
// width: 594px;
height: 22px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
margin-bottom: 16px;
}
.point_title {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
.point_icon {
width: 5px;
height: 5px;
background: #5850ff;
border-radius: 50%;
margin-right: 4px;
}
}
.radio_wrap {
margin-top: 28px;
display: flex;
.box {
margin-right: 122px;
.radio_panel {
margin-top: 10px;
width: 88px;
height: 88px;
border-radius: 2px;
border: 1px solid #dbdbdb;
> img {
width: 88px;
height: 88px;
}
.opcaSty {
opacity: 0.2;
}
}
.radio_tip {
font-size: 12px;
font-weight: 400;
color: #333333;
line-height: 17px;
margin: 4px 0;
}
.radio_edit {
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
cursor: pointer;
}
.custom_blue {
margin-top: 10px;
width: 96px;
background: #ffffff;
color: #5850ff;
border: 1px solid #5850ff;
}
}
}
}
.fixed_bottom { .fixed_bottom {
position: fixed; position: fixed;
width: 100%; width: 100%;
...@@ -292,4 +608,57 @@ export default { ...@@ -292,4 +608,57 @@ export default {
} }
} }
} }
.customTitle {
display: flex;
align-items: center;
.title1 {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 28px;
margin-right: 8px;
}
}
.accountType-row {
text-align: left;
position: relative;
font-size: 14px;
line-height: 14px;
padding-left: 15px;
border-radius: 4px;
border: 1px solid #e8e8ea;
padding: 6px;
display: inline-block;
margin-bottom: 5px;
margin-right: 5px;
&-tag {
display: inline-block;
border: 1px solid #e8e8ea;
background: #fafbfe;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #666;
max-width: 150px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
i {
color: #75acff;
}
// &::before {
// content: '';
// position: absolute;
// width: 6px;
// height: 6px;
// background: #5850ff;
// border-radius: 8px;
// left: 0px;
// top: 7px;
// }
}
.edit-equity /deep/ .el-dialog__body {
height: 520px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!