diff --git a/api/task.js b/api/task.js index fcb7f3b..0857f58 100644 --- a/api/task.js +++ b/api/task.js @@ -92,4 +92,9 @@ export const commit_village_task_5API = (data) => oahttp.post('/task/commit_vill * 入股甲方公司 */ export const commit_town_service_manager_task_6API = (data) => oahttp.post('/task/commit_town_service_manager_task_6', + data) +/** + * 促成村联络人员入股 + */ +export const commit_town_master_task_6API = (data) => oahttp.post('/task/commit_town_master_task_6', data) \ No newline at end of file diff --git a/components/task/taskItem.vue b/components/task/taskItem.vue index 39209b7..7dfcf7e 100644 --- a/components/task/taskItem.vue +++ b/components/task/taskItem.vue @@ -117,12 +117,6 @@ default: function() { return {} } - }, - taskValueList: { - type: Array, - default: function() { - return [] - } } }, data() { @@ -150,7 +144,10 @@ navToVillageList: ["village_task_type_1", "village_task_type_2", "village_task_type_3", "village_task_type_7", ], // 村管理跳转/subpkg/townTask/townTask的任务 1 - navToVillageListA: ["town_task_type_master_2", "town_task_type_master_4", "town_task_type_master_5", + navToVillageListA: [ + "town_task_type_master_2", + "town_task_type_master_4", + "town_task_type_master_5", "town_task_type_master_6", "town_task_type_master_7", "town_task_type_master_8" @@ -184,41 +181,35 @@ } else Toast('暂未开放') }, clickTask() { - this.$props.taskValueList.forEach(item => { - // console.log(item) - if (this.$props.datas.type == item.id) { - this.$props.datas.type_value = item.value - } - }) - console.log(this.$props.datas.type_value) + // console.log(this.navToVillageList.includes(this.$props.datas.type_value)) // return if (this.isTimeInRange()) return Toast('任务正在结算中'); // if ((this.$props.datas.type != 31) && this.$props.datas.status !== 2 && this.$props.datas.status !== 1) { // return this.$props.datas.status == 3 ? Toast('任务已完成!') : Toast('任务已结束!'); // } - if (this.navToTownServiceList.includes(this.$props.datas.type_value)) + if (this.navToTownServiceList.includes(this.$props.datas.task_type_value)) return this.navTo( `/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[0]}` ); - if (this.navToTownMarketList.includes(this.$props.datas.type_value)) + if (this.navToTownMarketList.includes(this.$props.datas.task_type_value)) return this.navTo( `/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}` ); - if (this.navToVillageList.includes(this.$props.datas.type_value)) + if (this.navToVillageList.includes(this.$props.datas.task_type_value)) return this.navTo( `/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}` ); - if (this.navToVillageListA.includes(this.$props.datas.type_value)) + if (this.navToVillageListA.includes(this.$props.datas.task_type_value)) return this.navTo( `/subpkg/townTask/villageTask4?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[2]}` ); - if (this.navToList.includes(this.$props.datas.type_value)) + if (this.navToList.includes(this.$props.datas.task_type_value)) return this.navTo( `/subpkg/townTask/villageTask4?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[2]}` ); - switch (this.$props.datas.type_value) { + switch (this.$props.datas.task_type_value) { case "1": if (this.$store.state.app.userInfo.admin_id) this.navTo( `/subpkg/captain/captain?task_id=${this.$props.datas?.id}`); diff --git a/pages/oaTask/oaTask.vue b/pages/oaTask/oaTask.vue index de31aff..0e62a13 100644 --- a/pages/oaTask/oaTask.vue +++ b/pages/oaTask/oaTask.vue @@ -70,24 +70,7 @@ }, list: [], taskValueList: [], - roleList: [{ - id: 17, - type_vale: "village_task_type" - }, { - id: 16, - type_vale: "town_task_type_marketing_director" - }, { - id: 15, - type_vale: "town_task_type_master" - }, { - id: 14, - type_vale: "town_task_type" - }, { - id: 5, - type_vale: "task_type" - } - ] } }, onLoad() { @@ -96,20 +79,20 @@ }, onShow() { this.loadList(); - this.getTaskValue() + // this.getTaskValue() }, onReady() { uni.$on('initOaTask', this.loadList); }, methods: { - async getTaskValue() { - const desiredElement = this.roleList.find(element => element.id == this.$store.state.app.userInfo - .group_id); - let res = await dictDataListsTypeValue({ - type_value: desiredElement.type_vale - }) - this.taskValueList = res.data - }, + // async getTaskValue() { + // const desiredElement = this.roleList.find(element => element.id == this.$store.state.app.userInfo + // .group_id); + // let res = await dictDataListsTypeValue({ + // type_value: desiredElement.type_vale + // }) + // this.taskValueList = res.data + // }, changeTypeCurrent(e) { this.baseList = [] this.status = e.id diff --git a/subpkg/townTask/villageTask4.vue b/subpkg/townTask/villageTask4.vue index cd8d4c4..1ba9c42 100644 --- a/subpkg/townTask/villageTask4.vue +++ b/subpkg/townTask/villageTask4.vue @@ -104,7 +104,8 @@ taskShareholder, commit_village_task_4API, commit_village_task_5API, - commit_town_service_manager_task_6API + commit_town_service_manager_task_6API, + commit_town_master_task_6API } from "@/api/task.js" import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue' import { @@ -185,7 +186,12 @@ ...data }) } - + if (this.task.type == 79) { + let res = await commit_town_master_task_6API({ + ...data + }) + } + return Toast("操作成功!") setTimeout(() => { uni.navigateBack()