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 @@
placeholder="所属业务场景"
>
<el-option label="全部" value=""></el-option>
<el-option label="1.0 新车权益升级" value="0"></el-option>
<el-option label="1.1 新车精品升级" value="1"></el-option>
<el-option label="1.2 新车膨胀金活动" value="2"></el-option>
<el-option label="1.3 售后直播众筹活动" value="3"></el-option>
<el-option label="1.0车损升级" value="0"></el-option>
<el-option label="1.1精品升级" value="1"></el-option>
<el-option label="1.2膨胀金活动" value="2"></el-option>
<el-option label="1.3众筹活动" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="所属商户:">
......@@ -135,8 +135,8 @@ export default {
profitSearchForm: {
businessScene: '',
channel: '',
isWithdrawal:'',
exchangeStatus:''
isWithdrawal: '',
exchangeStatus: '',
},
}
},
......@@ -152,7 +152,7 @@ export default {
this.defalutStartTime,
this.defalutEndTime,
])
this.$emit('sendResetTable','reset')
this.$emit('sendResetTable', 'reset')
this.$nextTick(() => {
this.handleSearch()
})
......
......@@ -77,37 +77,47 @@ export default {
pageSize: 12,
total: 0,
},
merchantId: '',
businessScene: '',
}
},
methods: {
init(merchantId, isClone, taskDateNum) {
init(merchantId, isClone, taskDateNum, businessScene) {
this.activityDiaVisible = true
this.isClone = isClone
this.taskDateNum = taskDateNum
this.getActivityData(merchantId)
this.merchantId = merchantId
this.businessScene = businessScene
this.getActivityData()
},
getActivityData(merchantId) {
let params = {
currentPage: 1,
pageSize: 12,
merchantId: merchantId,
activityStatuList: [1, 2],
}
taskApi.getActivityBypage(params).then((res) => {
this.activityData = res.data.data.list
this.pageParam.total = res.data.data.total
// 活动时间戳转化
this.activityData.map((item) => {
item.startTime = dayjs(item.startTime).format('YYYY-MM-DD')
item.endTime = dayjs(item.endTime).format('YYYY-MM-DD')
// if (this.isClone) {
// let activityDays = this.getDateByDays(item.startTime, item.endTime)
// if (activityDays != this.taskDateNum) {
// item.taskStatus = 1
// }
// }
getActivityData() {
console.log(this.businessScene)
let params = JSON.parse(JSON.stringify(this.pageParam))
;(params.merchantId = this.merchantId),
(params.activityStatuList = [1, 2]),
(params.businessScene = this.businessScene),
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.pageParam.total = res.data.data.total
// 活动时间戳转化
this.activityData.map((item) => {
item.startTime = dayjs(item.startTime).format('YYYY-MM-DD')
item.endTime = dayjs(item.endTime).format('YYYY-MM-DD')
// if (this.isClone) {
// let activityDays = this.getDateByDays(item.startTime, item.endTime)
// if (activityDays != this.taskDateNum) {
// item.taskStatus = 1
// }
// }
})
})
})
},
// 根据日期获取天数
// getDateByDays(startDate, endDdate) {
......
......@@ -13,12 +13,14 @@
>
<el-form-item label="业务场景:" prop="businessScene">
<el-select
@change="changeScene"
v-model="basicForm.businessScene"
placeholder="请选择业务场景"
size="small"
: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-form-item>
<el-form-item label="商户:" prop="merchantId">
......@@ -60,10 +62,10 @@
placeholder="请选择任务指定人群"
size="small"
>
<el-option label="1.0 新车权益升级" value="0"></el-option>
<el-option label="1.1 新车精品升级" value="1"></el-option>
<el-option label="1.2 次新车膨胀金活动" value="2"></el-option>
<el-option label="1.3 售后直播众筹活动" value="3"></el-option>
<el-option label="1.0车损升级" value="0"></el-option>
<el-option label="1.1精品升级" value="1"></el-option>
<el-option label="1.2膨胀金活动" value="2"></el-option>
<el-option label="1.3众筹活动" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="发放渠道:" prop="channel">
......@@ -807,7 +809,8 @@ export default {
this.$refs.activityDia.init(
this.basicForm.merchantId,
this.isClone,
this.taskDateNum
this.taskDateNum,
this.basicForm.businessScene
)
},
// 选择商户
......@@ -838,6 +841,13 @@ export default {
}
)
},
// 改变业务场景
changeScene() {
this.basicForm.merchantId = ''
this.basicForm.merchantName = ''
this.basicForm.activityId = ''
this.basicForm.activityName = ''
},
// 商户改变获取商户名
changeMerchant(val) {
this.basicForm.merchantName =
......@@ -1422,7 +1432,6 @@ export default {
},
// 奖励模式切换
rewardTypeChange(itm) {
console.log(itm)
if (itm.rewardType == 2) {
this.$nextTick(() => {
this.$set(itm, 'triggerValue', '')
......@@ -1445,7 +1454,6 @@ export default {
this.$set(itm, 'repeatCount', '')
this.$set(itm, 'repeatFlag', false)
}
console.log(itm, '---')
},
// 奖励次数切换
rewardCountChange(itm) {
......@@ -1557,13 +1565,31 @@ export default {
if (itm.missionMaterialList && itm.missionMaterialList.length) {
itm.missionMaterialList.map((content) => {
if (content.materialType == 1) {
let reg = /<\/?.+?\/?>/g
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))
......@@ -1579,6 +1605,7 @@ export default {
}
params.missionDateList = this.taskList
params.id = this.taskId
console.log(params, '===')
// 创建
if (!this.isEditor) {
taskApi.creatMission(params).then(
......
......@@ -77,14 +77,10 @@
:pageConf="pageConf"
>
<div slot="businessScene" slot-scope="scope">
<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 == 2"
>1.2 次新车膨胀金活动</span
>
<span v-if="scope.scope.businessScene == 3"
>1.3 售后直播众筹活动</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 == 2">1.2膨胀金活动</span>
<span v-if="scope.scope.businessScene == 3">1.3众筹活动</span>
</div>
<div slot="activityStatus" slot-scope="scope">
<span v-if="scope.scope.activityStatus == statusNum.UNPUBLISH"
......@@ -150,19 +146,19 @@ const sceneOption = [
value: '',
},
{
label: '1.0 新车权益升级',
label: '1.0车损升级',
value: '0',
},
{
label: '1.1 新车精品升级',
label: '1.1精品升级',
value: '1',
},
{
label: '1.2 次新车膨胀金活动',
label: '1.2膨胀金活动',
value: '2',
},
{
label: '1.3 售后直播众筹活动',
label: '1.3众筹活动',
value: '3',
},
]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!