From 7e9e520a5a324f60b27b948505b46dc030405823 Mon Sep 17 00:00:00 2001
From: pangdongxu <850374051@qq.com>
Date: Fri, 15 Apr 2022 13:37:55 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../expenditureAudit/expenditureAudit.js | 83 +++++++++++--------
.../expenditureAudit/expenditureAudit.wxml | 20 ++---
pages/index/index.js | 2 +-
pages/index/index.wxml | 12 +--
utils/API.js | 6 +-
utils/util.js | 2 +-
6 files changed, 71 insertions(+), 54 deletions(-)
diff --git a/pages/handle/expenditureAudit/expenditureAudit.js b/pages/handle/expenditureAudit/expenditureAudit.js
index 5afa726..83de29e 100644
--- a/pages/handle/expenditureAudit/expenditureAudit.js
+++ b/pages/handle/expenditureAudit/expenditureAudit.js
@@ -14,40 +14,8 @@ Page({
*/
data: {
isIPX: app.globalData.isIPX,
- steps: [
- {
- assigneeName: '同意',
- activityName: '测试测试',
- durationInMillis: '描述信息',
- endTime: '2022-01-02',
- comment: '同意',
- type: '1'
- },
- {
- assigneeName: '申请中',
- activityName: '测试测试',
- durationInMillis: '描述信息',
- endTime: '2022-01-02',
- comment: '同意',
- type: '2'
- },
- {
- assigneeName: '驳回',
- activityName: '测试测试',
- durationInMillis: '描述信息',
- endTime: '2022-01-02',
- comment: '同意',
- type: '3'
- },
- {
- assigneeName: '步骤四',
- activityName: '测试测试',
- durationInMillis: '描述信息',
- endTime: '2022-01-02',
- comment: '同意'
- },
- ],
- active:0
+ active:0,
+ spsxOptions:[]
},
/**
@@ -56,6 +24,9 @@ Page({
onLoad: function (options) {
var that = this;
console.log(options);
+ that.setData({
+ taskId:options.taskId
+ })
UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, {
success: (res) => {
if (res.code == API.SUCCESS_CODE) {
@@ -264,10 +235,52 @@ Page({
UTIL.httpRequest(API.URL_GET_GETPROCESS+options.id , {method:'GET'}, {
success: (res) => {
console.log(res);
+ that.setData({
+ spsxOptions:res.data.processSchedule.spsx,
+ instanceId:res.data.instanceId
+ })
+ }
+ })
+ },
+ goDis(){
+ var that = this ;
+ let data = {
+ taskId:that.data.taskId,
+ instanceId:that.data.instanceId,
+ variables:JSON.stringify({
+ comment:'驳回',
+ pass:false,
+ }),
+ method:'POST'
+ };
+ UTIL.httpRequest(API.URL_GET_PROCESSCOMPLETE , data, {
+ success: (res) => {
+ console.log(res);
+ // that.setData({
+ // spsxOptions:res.data.processSchedule.spsx
+ // })
+ }
+ })
+ },
+ goAgree(){
+ var that = this ;
+ let data = {
+ taskId:that.data.taskId,
+ instanceId:that.data.instanceId,
+ variables:JSON.stringify({
+ "comment":'同意',
+ "pass":true,
+ })
+ };
+ UTIL.httpRequest(API.URL_GET_PROCESSCOMPLETE ,data, {
+ success: (res) => {
+ console.log(res);
+ // that.setData({
+ // spsxOptions:res.data.processSchedule.spsx
+ // })
}
})
},
-
/**
* 生命周期函数--监听页面初次渲染完成
*/
diff --git a/pages/handle/expenditureAudit/expenditureAudit.wxml b/pages/handle/expenditureAudit/expenditureAudit.wxml
index f7af5a2..8261f29 100644
--- a/pages/handle/expenditureAudit/expenditureAudit.wxml
+++ b/pages/handle/expenditureAudit/expenditureAudit.wxml
@@ -164,7 +164,7 @@
审批流程
-
+
{{index+1}}
@@ -172,29 +172,29 @@
-
+
-
+
-
- {{ item.assigneeName }}
- {{ item.assigneeName }}
- {{ item.assigneeName }}
+
+ {{ item.comment }}
+ {{ item.comment }}
+ {{ item.comment }}
{{ item.durationInMillis }}
- {{ item.endTime }}
+ {{ item.time.substr(0,10) }}
@@ -202,6 +202,6 @@
-
-
+
+
diff --git a/pages/index/index.js b/pages/index/index.js
index 1035711..4d01682 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -473,7 +473,7 @@ Page({
},
gosee:function(e){
wx.navigateTo({
- url: '/pages/handle/expenditureAudit/expenditureAudit?id='+e.currentTarget.dataset.id,
+ url: '/pages/handle/expenditureAudit/expenditureAudit?id='+e.currentTarget.dataset.id+'&taskId='+e.currentTarget.dataset.taskid,
})
},
})
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 0df3dc6..d3fe2bf 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -100,7 +100,7 @@
-
+
@@ -111,7 +111,7 @@
- {{item.formData.remark}}
+ {{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}
¥{{item.formData.totalAmount}}
@@ -121,16 +121,16 @@
- {{item.formData.payer}}
+ {{item.formData.approvalItems}}
- {{item.formData.applyDate}}
+ {{item.formData.applyTime}}
- {{item.formData.remark}}
+ {{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}
- ¥{{item.formData.expenditureAmount}}
+ ¥{{item.formData.totalAmount}}
diff --git a/utils/API.js b/utils/API.js
index df798b7..34b7dc6 100644
--- a/utils/API.js
+++ b/utils/API.js
@@ -128,6 +128,9 @@ const URL_GET_REMOVEAPPROVAL = `${URL_PREFIX}/yinnong/approvalItems/remove/`;
//查询审批事项流转进度
const URL_GET_GETPROCESS = `${URL_PREFIX}/yinnong/approvalItems/getProcessSchedule/`;
+//审批流办理
+const URL_GET_PROCESSCOMPLETE = `${URL_PREFIX}/activiti/process/mobileComplete`;
+
/****************接口地址end****************/
export {
@@ -183,5 +186,6 @@ export {
URL_GET_FINDLIST,
URL_GET_APPROVALITEMS,
URL_GET_REMOVEAPPROVAL,
- URL_GET_GETPROCESS
+ URL_GET_GETPROCESS,
+ URL_GET_PROCESSCOMPLETE
}
\ No newline at end of file
diff --git a/utils/util.js b/utils/util.js
index 138e9f6..1ee5c99 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -118,7 +118,7 @@ function httpRequest(url, data, {
wx.request({
url,
data: finalData,
- method:data.method,
+ method:data.method?data.method:'POST',
timeout: 60000,
header: {
'Authorization':'Bearer '+getApp().globalData.userInfo.token