|
@@ -368,10 +368,8 @@
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.id = options.id
|
|
|
-
|
|
|
this.everyCheck = uni.getStorageSync("everyTask")
|
|
|
this.isSHowBtn = options.isShowbtn
|
|
|
-
|
|
|
},
|
|
|
onShow() {
|
|
|
this.getList()
|
|
@@ -428,141 +426,140 @@
|
|
|
that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
- // 查流程
|
|
|
- this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
|
|
|
- businessCode: 'SHOU-CONTRACT-APPROVE',
|
|
|
- tmpCompId: uni.getStorageSync('pcUserInfo').compId
|
|
|
- }).then(res1 => {
|
|
|
- this.$api.doRequest('get', '/commonUser/getHis', {
|
|
|
- workflowId: res1.data.data[0].id,
|
|
|
- businessKey: this.id
|
|
|
- }).then(response => {
|
|
|
- uni.hideLoading()
|
|
|
- for (let i = 0; i < response.data.data.length; i++) {
|
|
|
- this.$set(response.data.data[i], 'status', 'question')
|
|
|
- console.log(response.data.data[i].workflowHistoricTasks, i)
|
|
|
- if (response.data.data[i].commonStaffs) {
|
|
|
- response.data.data[i].showflow = false
|
|
|
- response.data.data[i].operatorTitle = response.data.data[i]
|
|
|
- .desc.substring(0, 2)
|
|
|
- response.data.data[i].operatorName = response.data.data[i]
|
|
|
- .desc
|
|
|
- response.data.data[i].staffscontent = '共' + response.data
|
|
|
- .data[i].commonStaffs.length + '人,当前审核' + response.data
|
|
|
- .data[i].workflowHistoricTasks.length + '人'
|
|
|
- if (response.data.data[i].workflowHistoricTasks && response
|
|
|
- .data.data[i].workflowHistoricTasks.length > 0) {
|
|
|
- if (response.data.data[i].workflowHistoricTasks
|
|
|
- .length != response.data.data[i].commonStaffs
|
|
|
- .length) {
|
|
|
- // response.data.data[i].status='question'
|
|
|
- this.$set(response.data.data[i], 'status',
|
|
|
- 'question')
|
|
|
- } else {
|
|
|
- this.$set(response.data.data[i], 'status',
|
|
|
- 'success')
|
|
|
- // response.data.data[i].status='success'
|
|
|
- }
|
|
|
- response.data.data[i].workflowlen = response.data.data[
|
|
|
- i].workflowHistoricTasks.length
|
|
|
- var workflowdata = response.data.data[i]
|
|
|
- .workflowHistoricTasks
|
|
|
- var staffsdata = response.data.data[i].commonStaffs
|
|
|
- for (let q = 0; q < staffsdata.length; q++) {
|
|
|
- staffsdata[q].status = false
|
|
|
- staffsdata[q].staffTitle = staffsdata[q].staffName
|
|
|
- for (let k = 0; k < workflowdata.length; k++) {
|
|
|
- if (staffsdata[q].staffId == workflowdata[k]
|
|
|
- .operatorId) {
|
|
|
- staffsdata[q].status = true
|
|
|
+ // 查流程
|
|
|
+ this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
|
|
|
+ businessCode: 'SHOU-CONTRACT-APPROVE',
|
|
|
+ tmpCompId: uni.getStorageSync('pcUserInfo').compId
|
|
|
+ }).then(res1 => {
|
|
|
+ this.$api.doRequest('get', '/commonUser/getHis', {
|
|
|
+ workflowId: res1.data.data[0].id,
|
|
|
+ businessKey: this.id
|
|
|
+ }).then(response => {
|
|
|
+ uni.hideLoading()
|
|
|
+ for (let i = 0; i < response.data.data.length; i++) {
|
|
|
+ this.$set(response.data.data[i], 'status', 'question')
|
|
|
+ console.log(response.data.data[i].workflowHistoricTasks, i)
|
|
|
+ if (response.data.data[i].commonStaffs) {
|
|
|
+ response.data.data[i].showflow = false
|
|
|
+ response.data.data[i].operatorTitle = response.data.data[i]
|
|
|
+ .desc.substring(0, 2)
|
|
|
+ response.data.data[i].operatorName = response.data.data[i]
|
|
|
+ .desc
|
|
|
+ response.data.data[i].staffscontent = '共' + response.data
|
|
|
+ .data[i].commonStaffs.length + '人,当前审核' + response.data
|
|
|
+ .data[i].workflowHistoricTasks.length + '人'
|
|
|
+ if (response.data.data[i].workflowHistoricTasks && response
|
|
|
+ .data.data[i].workflowHistoricTasks.length > 0) {
|
|
|
+ if (response.data.data[i].workflowHistoricTasks
|
|
|
+ .length != response.data.data[i].commonStaffs
|
|
|
+ .length) {
|
|
|
+ // response.data.data[i].status='question'
|
|
|
+ this.$set(response.data.data[i], 'status',
|
|
|
+ 'question')
|
|
|
+ } else {
|
|
|
+ this.$set(response.data.data[i], 'status',
|
|
|
+ 'success')
|
|
|
+ // response.data.data[i].status='success'
|
|
|
+ }
|
|
|
+ response.data.data[i].workflowlen = response.data.data[
|
|
|
+ i].workflowHistoricTasks.length
|
|
|
+ var workflowdata = response.data.data[i]
|
|
|
+ .workflowHistoricTasks
|
|
|
+ var staffsdata = response.data.data[i].commonStaffs
|
|
|
+ for (let q = 0; q < staffsdata.length; q++) {
|
|
|
+ staffsdata[q].status = false
|
|
|
+ staffsdata[q].staffTitle = staffsdata[q].staffName
|
|
|
+ for (let k = 0; k < workflowdata.length; k++) {
|
|
|
+ if (staffsdata[q].staffId == workflowdata[k]
|
|
|
+ .operatorId) {
|
|
|
+ staffsdata[q].status = true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- response.data.data[i].commonStaffs1 = response.data.data[i]
|
|
|
- .commonStaffs
|
|
|
- } else {
|
|
|
- if (response.data.data[i].workflowHistoricTasks && response
|
|
|
- .data.data[i].workflowHistoricTasks.length > 0) {
|
|
|
- var len = response.data.data[i].workflowHistoricTasks
|
|
|
- .length - 1
|
|
|
- if (response.data.data[i].workflowHistoricTasks[len]
|
|
|
- .approved) {
|
|
|
- this.$set(response.data.data[i], 'status',
|
|
|
- 'success')
|
|
|
- } else {
|
|
|
- this.$set(response.data.data[i], 'status', 'error')
|
|
|
- }
|
|
|
- response.data.data[i].operatorTitle = response.data
|
|
|
- .data[i].workflowHistoricTasks[len].operatorName
|
|
|
- .substring(response.data.data[i]
|
|
|
- .workflowHistoricTasks[0].operatorName.length -
|
|
|
- 2)
|
|
|
- response.data.data[i].operatorName = response.data
|
|
|
- .data[i].workflowHistoricTasks[len].operatorName
|
|
|
- var time = new Date(response.data.data[i]
|
|
|
- .workflowHistoricTasks[len].claimTime)
|
|
|
- .getTime()
|
|
|
- response.data.data[i].updateDate = this.$u.timeFormat(
|
|
|
- time, 'mm.dd hh:MM')
|
|
|
- response.data.data[i].auditMind = response.data.data[i]
|
|
|
- .workflowHistoricTasks[len].auditMind
|
|
|
+ response.data.data[i].commonStaffs1 = response.data.data[i]
|
|
|
+ .commonStaffs
|
|
|
} else {
|
|
|
- this.$set(response.data.data[i], 'status', 'question')
|
|
|
- // response.data.data[i].status='question'
|
|
|
- if (response.data.data[i].desc == '总经理助理审核') {
|
|
|
- response.data.data[i].operatorTitle = '总助'
|
|
|
- } else if (response.data.data[i].desc == '杜大光审核') {
|
|
|
- response.data.data[i].operatorTitle = '大光'
|
|
|
- } else {
|
|
|
+ if (response.data.data[i].workflowHistoricTasks && response
|
|
|
+ .data.data[i].workflowHistoricTasks.length > 0) {
|
|
|
+ var len = response.data.data[i].workflowHistoricTasks
|
|
|
+ .length - 1
|
|
|
+ if (response.data.data[i].workflowHistoricTasks[len]
|
|
|
+ .approved) {
|
|
|
+ this.$set(response.data.data[i], 'status',
|
|
|
+ 'success')
|
|
|
+ } else {
|
|
|
+ this.$set(response.data.data[i], 'status', 'error')
|
|
|
+ }
|
|
|
response.data.data[i].operatorTitle = response.data
|
|
|
- .data[i].desc.substring(0, 2)
|
|
|
- }
|
|
|
-
|
|
|
- response.data.data[i].operatorName = response.data
|
|
|
- .data[i].desc
|
|
|
- var time1 = new Date(response.data.data[i].updateDate)
|
|
|
+ .data[i].workflowHistoricTasks[len].operatorName
|
|
|
+ .substring(response.data.data[i]
|
|
|
+ .workflowHistoricTasks[0].operatorName.length -
|
|
|
+ 2)
|
|
|
+ response.data.data[i].operatorName = response.data
|
|
|
+ .data[i].workflowHistoricTasks[len].operatorName
|
|
|
+ var time = new Date(response.data.data[i]
|
|
|
+ .workflowHistoricTasks[len].claimTime)
|
|
|
.getTime()
|
|
|
- response.data.data[i].updateDate = this.$u.timeFormat(
|
|
|
- time1, 'mm.dd hh:MM')
|
|
|
- response.data.data[i].auditMind = ''
|
|
|
+ response.data.data[i].updateDate = this.$u.timeFormat(
|
|
|
+ time, 'mm.dd hh:MM')
|
|
|
+ response.data.data[i].auditMind = response.data.data[i]
|
|
|
+ .workflowHistoricTasks[len].auditMind
|
|
|
+ } else {
|
|
|
+ this.$set(response.data.data[i], 'status', 'question')
|
|
|
+ // response.data.data[i].status='question'
|
|
|
+ if (response.data.data[i].desc == '总经理助理审核') {
|
|
|
+ response.data.data[i].operatorTitle = '总助'
|
|
|
+ } else if (response.data.data[i].desc == '杜大光审核') {
|
|
|
+ response.data.data[i].operatorTitle = '大光'
|
|
|
+ } else {
|
|
|
+ response.data.data[i].operatorTitle = response.data
|
|
|
+ .data[i].desc.substring(0, 2)
|
|
|
+ }
|
|
|
+
|
|
|
+ response.data.data[i].operatorName = response.data
|
|
|
+ .data[i].desc
|
|
|
+ var time1 = new Date(response.data.data[i].updateDate)
|
|
|
+ .getTime()
|
|
|
+ response.data.data[i].updateDate = this.$u.timeFormat(
|
|
|
+ time1, 'mm.dd hh:MM')
|
|
|
+ response.data.data[i].auditMind = ''
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
- console.log(response.data.data)
|
|
|
- for(let i = 0 ;i<response.data.data.length;i++){
|
|
|
- if(response.data.data[i].status == "error"){
|
|
|
- this.auditCheck = "error"
|
|
|
- break;
|
|
|
- }else if(response.data.data[i].status == "question"){
|
|
|
- this.auditCheck = "question"
|
|
|
- break;
|
|
|
- }else{
|
|
|
- this.auditCheck = "success"
|
|
|
+ console.log(response.data.data)
|
|
|
+ for(let i = 0 ;i<response.data.data.length;i++){
|
|
|
+ if(response.data.data[i].status == "error"){
|
|
|
+ this.auditCheck = "error"
|
|
|
+ break;
|
|
|
+ }else if(response.data.data[i].status == "question"){
|
|
|
+ this.auditCheck = "question"
|
|
|
+ break;
|
|
|
+ }else{
|
|
|
+ this.auditCheck = "success"
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- this.auditList = response.data.data
|
|
|
- var time2 = new Date(this.list.createDate).getTime()
|
|
|
- var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
|
|
|
- this.auditList.unshift({
|
|
|
- operatorTitle: this.list.creater.substring(0, 2),
|
|
|
- operatorName: this.list.creater,
|
|
|
- updateDate: time3,
|
|
|
- auditMind: '',
|
|
|
- desc: '发起申请',
|
|
|
- showflow: false,
|
|
|
- commonStaffs1: null,
|
|
|
- commonStaffs: null,
|
|
|
- workflowHistoricTasks: [],
|
|
|
- status: 'success'
|
|
|
+ this.auditList = response.data.data
|
|
|
+ var time2 = new Date(this.list.createDate).getTime()
|
|
|
+ var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
|
|
|
+ this.auditList.unshift({
|
|
|
+ operatorTitle: this.list.creater.substring(0, 2),
|
|
|
+ operatorName: this.list.creater,
|
|
|
+ updateDate: time3,
|
|
|
+ auditMind: '',
|
|
|
+ desc: '发起申请',
|
|
|
+ showflow: false,
|
|
|
+ commonStaffs1: null,
|
|
|
+ commonStaffs: null,
|
|
|
+ workflowHistoricTasks: [],
|
|
|
+ status: 'success'
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
filterFileType(index, lists) {
|
|
|
if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
|