This commit is contained in:
zmj 2023-11-17 19:08:23 +08:00
parent 9946239502
commit fe1e183499
4 changed files with 33 additions and 48 deletions

View File

@ -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)

View File

@ -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}`);

View File

@ -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

View File

@ -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()