Commit 19b3d91f by xuyl

Merge branch 'v2.12.0' of http://192.168.3.233:8090/glsx-web/glsx-oss-task into xuyl_dev_v2.12.0

2 parents 829a9ddd 831564f1
...@@ -16,13 +16,8 @@ const taskApi = { ...@@ -16,13 +16,8 @@ const taskApi = {
}, },
// 通过业务场景获取商户 // 通过业务场景获取商户
findMerchantByScene(data) { findMerchantByScene(data) {
data.method = 'scrm.api.busassistant.merchant.byscene' data.method = 'merchants.api.open.findMerchantNoListByMerAccTypeId'
return request( return request(data, 'post')
data,
'scrm.api.busassistant.merchant.byscene',
[],
Vue.prototype.businessURL
)
}, },
// 获取所有未结束活动 // 获取所有未结束活动
getActivityBypage(data) { getActivityBypage(data) {
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
<el-select <el-select
v-model="basicForm.merchantId" v-model="basicForm.merchantId"
filterable filterable
remote :filter-method="filterMethod"
:remote-method="remoteMethod" no-data-text="暂无数据"
placeholder="请选择商户" placeholder="请选择商户"
size="small" size="small"
@change="changeMerchant" @change="changeMerchant"
...@@ -212,16 +212,19 @@ ...@@ -212,16 +212,19 @@
:rules="taskFormRules.repeatCount" :rules="taskFormRules.repeatCount"
> >
<el-input <el-input
v-model="itm.repeatCount" :disabled="itm.repeatFlag"
v-model.trim="itm.repeatCount"
@blur="handleBlur(itm)"
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
size="small" size="small"
:disabled="repeatChecked"
></el-input> ></el-input>
<el-checkbox <el-checkbox
:disabled="
itm.repeatCount != '' && itm.repeatCount != -1
"
style="margin-left: 8px" style="margin-left: 8px"
v-model="repeatChecked" v-model="itm.repeatFlag"
:disabled="itm.repeatCount.length" @change="repeatChange(itm, itm.repeatFlag)"
@change="repeatChange(item, index, itm, index1)"
>不限制</el-checkbox >不限制</el-checkbox
> >
</el-form-item> </el-form-item>
...@@ -307,7 +310,7 @@ export default { ...@@ -307,7 +310,7 @@ export default {
merchantName: '', merchantName: '',
activityId: '', activityId: '',
activityName: '', activityName: '',
crowd: ['4'], crowd: ['3'],
channel: 1, channel: 1,
remark: '', remark: '',
}, },
...@@ -457,7 +460,7 @@ export default { ...@@ -457,7 +460,7 @@ export default {
}, },
mounted() { mounted() {
this.$root.eventBus.$on('params', (params) => { this.$root.eventBus.$on('params', (params) => {
console.log(params) console.log(params, '000')
// 判断是否是编辑 // 判断是否是编辑
if (params && params.type) { if (params && params.type) {
this.isEditor = true this.isEditor = true
...@@ -469,9 +472,10 @@ export default { ...@@ -469,9 +472,10 @@ export default {
this.isClone = true this.isClone = true
this.findMissionDeail(params.id) this.findMissionDeail(params.id)
} }
this.selectMerchant() if (this.isClone || this.isEditor) this.selectMerchant()
}) })
}, },
computed: {},
methods: { methods: {
// 点击选择活动/任务 // 点击选择活动/任务
openActivityDia() { openActivityDia() {
...@@ -507,10 +511,11 @@ export default { ...@@ -507,10 +511,11 @@ export default {
return return
} }
let params = {} let params = {}
params.sceneCode = 'SC003' params.merchantAccountType = 4
params.merchantName = query params.merchantName = query
taskApi.findMerchantByScene(params).then((res) => { taskApi.findMerchantByScene(params).then((res) => {
this.merchantList = res.data.data console.log(res)
this.merchantList = res.data
}) })
}, },
// 商户改变获取商户名 // 商户改变获取商户名
...@@ -520,7 +525,7 @@ export default { ...@@ -520,7 +525,7 @@ export default {
this.merchantList.find((item) => item.merchantId == val).merchantName this.merchantList.find((item) => item.merchantId == val).merchantName
}, },
// 根据商户名搜索商户 // 根据商户名搜索商户
remoteMethod(query) { filterMethod(query) {
if (query !== '') { if (query !== '') {
this.selectMerchant(query) this.selectMerchant(query)
} }
...@@ -697,15 +702,59 @@ export default { ...@@ -697,15 +702,59 @@ export default {
// taskIndex -- 具体任务索引 // taskIndex -- 具体任务索引
this.taskList[dateTaskIndex].missionList.splice(taskIndex, 1) this.taskList[dateTaskIndex].missionList.splice(taskIndex, 1)
}, },
handleBlur(dateTask) {
console.log(dateTask.repeatCount)
if (dateTask.repeatCount) {
dateTask.repeatFlag = false
}
},
// 重复次数选择框改变 // 重复次数选择框改变
repeatChange(dateTask, dateTaskIndex, task, taskIndex) { repeatChange(dateTask, type) {
// dateTask -- 具体哪一天的任务对象 console.log(dateTask, type)
// dateTaskIndex -- 具体哪一天的任务对象索引 // dateTask.repeatFlag = !dateTask.repeatFlag
// task -- 具体哪个任务 // this.$nextTick(() => {
// taskIndex -- 具体任务索引 if (type) {
if (this.repeatChange) { dateTask.repeatCount = -1
this.taskList[dateTaskIndex].missionList[taskIndex].repeatCount = -1 } else {
// this.$nextTick(() => {
// dateTask.repeatCount = ''
// dateTask.repeatFlag = false
// })
console.log(111)
this.$nextTick(() => {
dateTask.repeatCount = ''
this.$set(dateTask, 'repeatFlag', false)
})
} }
console.log(dateTask)
// })
// console.log(task, task.repeatCount)
// console.log(task.repeatCount == '-1')
// // dateTask -- 具体哪一天的任务对象
// // dateTaskIndex -- 具体哪一天的任务对象索引
// // task -- 具体哪个任务
// // taskIndex -- 具体任务索引
// if (task.repeatCount) {
// // this.taskList[dateTaskIndex].missionList[taskIndex].repeatCount = ''
// console.log(111)
// this.$set(
// this.taskList[dateTaskIndex].missionList[taskIndex],
// 'repeatCount',
// ''
// )
// } else {
// // this.taskList[dateTaskIndex].missionList[taskIndex].repeatCount = -1
// this.$set(
// this.taskList[dateTaskIndex].missionList[taskIndex],
// 'repeatCount',
// -1
// )
// }
// console.log(
// this.taskList[dateTaskIndex].missionList[taskIndex].repeatCount
// )
}, },
// 获取任务信息详情 // 获取任务信息详情
findMissionDeail(taskId) { findMissionDeail(taskId) {
...@@ -741,6 +790,10 @@ export default { ...@@ -741,6 +790,10 @@ export default {
if (!itm.missionMaterialList) { if (!itm.missionMaterialList) {
delete itm.missionMaterialList delete itm.missionMaterialList
} }
if (itm.repeatCount && itm.repeatCount == -1) {
this.$set(itm, 'repeatFlag', true)
itm.repeatCount = ''
}
}) })
}) })
// this.taskList = res.data.missionDateList // this.taskList = res.data.missionDateList
...@@ -859,7 +912,7 @@ export default { ...@@ -859,7 +912,7 @@ export default {
.task-box { .task-box {
padding: 0 20px; padding: 0 20px;
.task-content { .task-content {
margin-bottom: 60px; margin-bottom: 120px;
} }
} }
.task-title { .task-title {
......
...@@ -258,18 +258,6 @@ export default { ...@@ -258,18 +258,6 @@ export default {
this.$refs.taskTable.refreshTable() this.$refs.taskTable.refreshTable()
}) })
}, },
handleObserve() {
this.$root.to(
['任务中心', '任务平台', '任务管理', '任务模板管理', '*查看任务'],
{ taskId: scope.id }
)
},
handleAnalyse() {
this.$root.to(
['任务中心', '任务平台', '任务管理', '任务模板管理', '*任务分析'],
{ taskId: scope.id }
)
},
// 编辑 // 编辑
handleEdit(item, type) { handleEdit(item, type) {
this.status = true this.status = true
...@@ -317,7 +305,7 @@ export default { ...@@ -317,7 +305,7 @@ export default {
['任务中心', '任务平台', '任务管理', '任务模板管理', '*添加任务模板'], ['任务中心', '任务平台', '任务管理', '任务模板管理', '*添加任务模板'],
scope scope
) )
this.$root.close('任务模板管理列表') this.$root.close('任务管理列表')
}, },
// 跳转查看详情 // 跳转查看详情
handleViewDetail(scope) { handleViewDetail(scope) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!