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