Commit 523c7dc5 by 前端

商户调整

1 parent 33fb1f12
......@@ -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) {
......
......@@ -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>
......@@ -472,6 +475,7 @@ export default {
if (this.isClone || this.isEditor) this.selectMerchant()
})
},
computed: {},
methods: {
// 点击选择活动/任务
openActivityDia() {
......@@ -507,10 +511,11 @@ export default {
return
}
let params = {}
params.sceneCode = 'SC004'
params.merchantAccountType = 4
params.merchantName = query
taskApi.findMerchantByScene(params).then((res) => {
this.merchantList = res.data.data
console.log(res)
this.merchantList = res.data
})
},
// 商户改变获取商户名
......@@ -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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!