|
|
@@ -230,18 +230,7 @@ Page({
|
|
|
if (!this.data.actLeader) {
|
|
|
getApp().globalData.Language.showToast('未选择负责人')
|
|
|
} else {
|
|
|
- /* this.data.billData.projectlearders = [this.data.actLeader.userid]
|
|
|
- const res = await api._post({
|
|
|
- "id": "20230208140003",
|
|
|
- "content": this.data.billData
|
|
|
- }) */
|
|
|
let teams = this.data.billData.team;
|
|
|
- console.log(this.data.billData.team.filter(v => v.isleader != 1))
|
|
|
- console.log(this.data.actLeader)
|
|
|
- if (!teams.some(v => v.userid == this.data.actLeader.userid)) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
const res = await api._post({
|
|
|
"id": "20220930103703",
|
|
|
"content": {
|
|
|
@@ -255,13 +244,12 @@ Page({
|
|
|
"content": {
|
|
|
ownertable: 'sa_workorder',
|
|
|
ownerid: this.data.billData.sa_workorderid,
|
|
|
- "userids": [this.data.actLeader.userid].concat(this.data.billData.team.filter(v => v.isleader != 1).map(v => v.userid)),
|
|
|
+ "userids": [this.data.actLeader.userid].concat(this.data.billData.team.map(v => v.userid)),
|
|
|
"justuserids": 1
|
|
|
}
|
|
|
}).then(res => {
|
|
|
console.log("添加成员", res)
|
|
|
})
|
|
|
-
|
|
|
this.setData({
|
|
|
workLeaderDialog: false
|
|
|
})
|
|
|
@@ -269,8 +257,26 @@ Page({
|
|
|
title: res.msg,
|
|
|
icon: "none"
|
|
|
});
|
|
|
- this.mainData()
|
|
|
- // this.confirmBillList()
|
|
|
+ api._post({
|
|
|
+ "id": 2025062416033402,
|
|
|
+ "content": {
|
|
|
+ "userid": wx.getStorageSync('userMsg').userid,
|
|
|
+ "sa_workorderid": this.data.billData.sa_workorderid,
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ console.log("查询权限", res)
|
|
|
+ if (res.code == 1) {
|
|
|
+ if (res.data.isteamleader || res.data.isworkleader) {
|
|
|
+ this.mainData()
|
|
|
+ } else {
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/Eservice/workOrderDetail/index?id=' + this.data.billData.sa_workorderid
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.mainData()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|