Commit 09d3748f by 前端

Merge branch 'v3.3.0' into 'master'

V3.3.0

See merge request !87
2 parents bb2e26a7 d6b8d760
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
placeholder="所属业务场景" placeholder="所属业务场景"
> >
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="1.0 新车权益升级" value="0"></el-option> <el-option label="1.0车损升级" value="0"></el-option>
<el-option label="1.1 新车精品升级" value="1"></el-option> <el-option label="1.1精品升级" value="1"></el-option>
<el-option label="1.2 新车膨胀金活动" value="2"></el-option> <el-option label="1.2膨胀金活动" value="2"></el-option>
<el-option label="1.3 售后直播众筹活动" value="3"></el-option> <el-option label="1.3众筹活动" value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属商户:"> <el-form-item label="所属商户:">
...@@ -135,8 +135,8 @@ export default { ...@@ -135,8 +135,8 @@ export default {
profitSearchForm: { profitSearchForm: {
businessScene: '', businessScene: '',
channel: '', channel: '',
isWithdrawal:'', isWithdrawal: '',
exchangeStatus:'' exchangeStatus: '',
}, },
} }
}, },
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
this.defalutStartTime, this.defalutStartTime,
this.defalutEndTime, this.defalutEndTime,
]) ])
this.$emit('sendResetTable','reset') this.$emit('sendResetTable', 'reset')
this.$nextTick(() => { this.$nextTick(() => {
this.handleSearch() this.handleSearch()
}) })
......
...@@ -77,23 +77,33 @@ export default { ...@@ -77,23 +77,33 @@ export default {
pageSize: 12, pageSize: 12,
total: 0, total: 0,
}, },
merchantId: '',
businessScene: '',
} }
}, },
methods: { methods: {
init(merchantId, isClone, taskDateNum) { init(merchantId, isClone, taskDateNum, businessScene) {
this.activityDiaVisible = true this.activityDiaVisible = true
this.isClone = isClone this.isClone = isClone
this.taskDateNum = taskDateNum this.taskDateNum = taskDateNum
this.getActivityData(merchantId) this.merchantId = merchantId
this.businessScene = businessScene
this.getActivityData()
}, },
getActivityData(merchantId) { getActivityData() {
let params = { console.log(this.businessScene)
currentPage: 1, let params = JSON.parse(JSON.stringify(this.pageParam))
pageSize: 12, ;(params.merchantId = this.merchantId),
merchantId: merchantId, (params.activityStatuList = [1, 2]),
activityStatuList: [1, 2], (params.businessScene = this.businessScene),
}
taskApi.getActivityBypage(params).then((res) => { taskApi.getActivityBypage(params).then((res) => {
if (res.data.code != 0) {
this.$message({
message: res.data.message,
type: 'error',
})
return
}
this.activityData = res.data.data.list this.activityData = res.data.data.list
this.pageParam.total = res.data.data.total this.pageParam.total = res.data.data.total
// 活动时间戳转化 // 活动时间戳转化
......
...@@ -13,12 +13,14 @@ ...@@ -13,12 +13,14 @@
> >
<el-form-item label="业务场景:" prop="businessScene"> <el-form-item label="业务场景:" prop="businessScene">
<el-select <el-select
@change="changeScene"
v-model="basicForm.businessScene" v-model="basicForm.businessScene"
placeholder="请选择业务场景" placeholder="请选择业务场景"
size="small" size="small"
:disabled="isEditor" :disabled="isEditor"
> >
<el-option label="1.3 售后直播众筹活动" :value="3"></el-option> <el-option label="1.2膨胀金活动" :value="2"></el-option>
<el-option label="1.3众筹活动" :value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商户:" prop="merchantId"> <el-form-item label="商户:" prop="merchantId">
...@@ -60,10 +62,10 @@ ...@@ -60,10 +62,10 @@
placeholder="请选择任务指定人群" placeholder="请选择任务指定人群"
size="small" size="small"
> >
<el-option label="1.0 新车权益升级" value="0"></el-option> <el-option label="1.0车损升级" value="0"></el-option>
<el-option label="1.1 新车精品升级" value="1"></el-option> <el-option label="1.1精品升级" value="1"></el-option>
<el-option label="1.2 次新车膨胀金活动" value="2"></el-option> <el-option label="1.2膨胀金活动" value="2"></el-option>
<el-option label="1.3 售后直播众筹活动" value="3"></el-option> <el-option label="1.3众筹活动" value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发放渠道:" prop="channel"> <el-form-item label="发放渠道:" prop="channel">
...@@ -807,7 +809,8 @@ export default { ...@@ -807,7 +809,8 @@ export default {
this.$refs.activityDia.init( this.$refs.activityDia.init(
this.basicForm.merchantId, this.basicForm.merchantId,
this.isClone, this.isClone,
this.taskDateNum this.taskDateNum,
this.basicForm.businessScene
) )
}, },
// 选择商户 // 选择商户
...@@ -838,6 +841,13 @@ export default { ...@@ -838,6 +841,13 @@ export default {
} }
) )
}, },
// 改变业务场景
changeScene() {
this.basicForm.merchantId = ''
this.basicForm.merchantName = ''
this.basicForm.activityId = ''
this.basicForm.activityName = ''
},
// 商户改变获取商户名 // 商户改变获取商户名
changeMerchant(val) { changeMerchant(val) {
this.basicForm.merchantName = this.basicForm.merchantName =
...@@ -1422,7 +1432,6 @@ export default { ...@@ -1422,7 +1432,6 @@ export default {
}, },
// 奖励模式切换 // 奖励模式切换
rewardTypeChange(itm) { rewardTypeChange(itm) {
console.log(itm)
if (itm.rewardType == 2) { if (itm.rewardType == 2) {
this.$nextTick(() => { this.$nextTick(() => {
this.$set(itm, 'triggerValue', '') this.$set(itm, 'triggerValue', '')
...@@ -1445,7 +1454,6 @@ export default { ...@@ -1445,7 +1454,6 @@ export default {
this.$set(itm, 'repeatCount', '') this.$set(itm, 'repeatCount', '')
this.$set(itm, 'repeatFlag', false) this.$set(itm, 'repeatFlag', false)
} }
console.log(itm, '---')
}, },
// 奖励次数切换 // 奖励次数切换
rewardCountChange(itm) { rewardCountChange(itm) {
...@@ -1557,13 +1565,31 @@ export default { ...@@ -1557,13 +1565,31 @@ export default {
if (itm.missionMaterialList && itm.missionMaterialList.length) { if (itm.missionMaterialList && itm.missionMaterialList.length) {
itm.missionMaterialList.map((content) => { itm.missionMaterialList.map((content) => {
if (content.materialType == 1) { if (content.materialType == 1) {
let reg = /<\/?.+?\/?>/g
content.materialContent = content.materialContent.replace( content.materialContent = content.materialContent.replace(
/]*?>[\s\S]*?<\/div>/gi, reg,
'' ''
) )
} }
}) })
} }
// 处理软文表情太大
if (itm.textContent) {
// let regErr = /<img\b/gi
// itm.textContent = itm.textContent.replace(
// regErr,
// `<img style="width: 18px;height 18px"`
// )
var regex0 = new RegExp('(i?)(\<img)([^\>]+\>)', 'gmi')
itm.textContent = itm.textContent
.replace(/style="[^"]+"/gi, '')
.replace(/style='[^']+'/gi, '')
itm.textContent = itm.textContent.replace(
regex0,
'$2 style="width: 18px;height: 18px" $3'
)
}
}) })
}) })
let params = JSON.parse(JSON.stringify(this.basicForm)) let params = JSON.parse(JSON.stringify(this.basicForm))
...@@ -1579,6 +1605,7 @@ export default { ...@@ -1579,6 +1605,7 @@ export default {
} }
params.missionDateList = this.taskList params.missionDateList = this.taskList
params.id = this.taskId params.id = this.taskId
console.log(params, '===')
// 创建 // 创建
if (!this.isEditor) { if (!this.isEditor) {
taskApi.creatMission(params).then( taskApi.creatMission(params).then(
......
...@@ -77,14 +77,10 @@ ...@@ -77,14 +77,10 @@
:pageConf="pageConf" :pageConf="pageConf"
> >
<div slot="businessScene" slot-scope="scope"> <div slot="businessScene" slot-scope="scope">
<span v-if="scope.scope.businessScene == 0">1.0 新车权益升级</span> <span v-if="scope.scope.businessScene == 0">1.0车损升级</span>
<span v-if="scope.scope.businessScene == 1">1.1 新车精品升级</span> <span v-if="scope.scope.businessScene == 1">1.1精品升级</span>
<span v-if="scope.scope.businessScene == 2" <span v-if="scope.scope.businessScene == 2">1.2膨胀金活动</span>
>1.2 次新车膨胀金活动</span <span v-if="scope.scope.businessScene == 3">1.3众筹活动</span>
>
<span v-if="scope.scope.businessScene == 3"
>1.3 售后直播众筹活动</span
>
</div> </div>
<div slot="activityStatus" slot-scope="scope"> <div slot="activityStatus" slot-scope="scope">
<span v-if="scope.scope.activityStatus == statusNum.UNPUBLISH" <span v-if="scope.scope.activityStatus == statusNum.UNPUBLISH"
...@@ -150,19 +146,19 @@ const sceneOption = [ ...@@ -150,19 +146,19 @@ const sceneOption = [
value: '', value: '',
}, },
{ {
label: '1.0 新车权益升级', label: '1.0车损升级',
value: '0', value: '0',
}, },
{ {
label: '1.1 新车精品升级', label: '1.1精品升级',
value: '1', value: '1',
}, },
{ {
label: '1.2 次新车膨胀金活动', label: '1.2膨胀金活动',
value: '2', value: '2',
}, },
{ {
label: '1.3 售后直播众筹活动', label: '1.3众筹活动',
value: '3', value: '3',
}, },
] ]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!