@@ -14,40 +14,8 @@ Page({ | |||||
*/ | */ | ||||
data: { | data: { | ||||
isIPX: app.globalData.isIPX, | 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) { | onLoad: function (options) { | ||||
var that = this; | var that = this; | ||||
console.log(options); | console.log(options); | ||||
that.setData({ | |||||
taskId:options.taskId | |||||
}) | |||||
UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
@@ -264,10 +235,52 @@ Page({ | |||||
UTIL.httpRequest(API.URL_GET_GETPROCESS+options.id , {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETPROCESS+options.id , {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
console.log(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 | |||||
// }) | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
*/ | */ | ||||
@@ -164,7 +164,7 @@ | |||||
<view class="main-box steps-box"> | <view class="main-box steps-box"> | ||||
<view class="steps-tit">审批流程</view> | <view class="steps-tit">审批流程</view> | ||||
<van-row wx:for="{{steps}}" wx:key="index"> | |||||
<van-row wx:for="{{spsxOptions}}" wx:key="index"> | |||||
<van-col span="3"> | <van-col span="3"> | ||||
<view class="index">{{index+1}}</view> | <view class="index">{{index+1}}</view> | ||||
<!-- :class="{'indexCenter':index==0 ? false : true}" --> | <!-- :class="{'indexCenter':index==0 ? false : true}" --> | ||||
@@ -172,29 +172,29 @@ | |||||
<view class="indexBorder"> | <view class="indexBorder"> | ||||
<view class="ssT" wx:if="{{index>0}}"></view> | <view class="ssT" wx:if="{{index>0}}"></view> | ||||
<view class="yq"></view> | <view class="yq"></view> | ||||
<view class="ss" wx:if="{{steps.length != index+1}}"></view> | |||||
<view class="ss" wx:if="{{spsxOptions.length != index+1}}"></view> | |||||
</view> | </view> | ||||
</block> | </block> | ||||
<block wx:else> | <block wx:else> | ||||
<view class="indexBorder indexCenter"> | <view class="indexBorder indexCenter"> | ||||
<view class="ssT" wx:if="{{index>0}}"></view> | <view class="ssT" wx:if="{{index>0}}"></view> | ||||
<view class="yq"></view> | <view class="yq"></view> | ||||
<view class="ss" wx:if="{{steps.length != index+1}}"></view> | |||||
<view class="ss" wx:if="{{spsxOptions.length != index+1}}"></view> | |||||
</view> | </view> | ||||
</block> | </block> | ||||
</van-col> | </van-col> | ||||
<van-col span="21"> | <van-col span="21"> | ||||
<van-cell title="{{item.activityName}}" center="{{true}}" border="{{false}}"> | |||||
<view class="agree" wx:if="{{item.type=='1'}}">{{ item.assigneeName }}</view> | |||||
<view class="in" wx:if="{{item.type=='2'}}">{{ item.assigneeName }}</view> | |||||
<view class="disagree" wx:if="{{item.type=='3'}}">{{ item.assigneeName }}</view> | |||||
<van-cell title="{{item.assigneeName}}{{item.deptLabel}}" center="{{true}}" border="{{false}}"> | |||||
<view class="agree" wx:if="{{item.type=='1'}}">{{ item.comment }}</view> | |||||
<view class="in" wx:if="{{item.type=='2'}}">{{ item.comment }}</view> | |||||
<view class="disagree" wx:if="{{item.type=='3'}}">{{ item.comment }}</view> | |||||
</van-cell> | </van-cell> | ||||
<van-cell center border="{{false}}"> | <van-cell center border="{{false}}"> | ||||
<view slot="title"> | <view slot="title"> | ||||
<view style="color: #999999;">{{ item.durationInMillis }}</view> | <view style="color: #999999;">{{ item.durationInMillis }}</view> | ||||
</view> | </view> | ||||
<view style="color: #999999;font-size: 12px;">{{ item.endTime }}</view> | |||||
<view style="color: #999999;font-size: 12px;">{{ item.time.substr(0,10) }}</view> | |||||
</van-cell> | </van-cell> | ||||
</van-col> | </van-col> | ||||
</van-row> | </van-row> | ||||
@@ -202,6 +202,6 @@ | |||||
</view> | </view> | ||||
</block> | </block> | ||||
<view class="bottom"> | <view class="bottom"> | ||||
<button type="warn" plain class="btnDis">驳回</button> | |||||
<button type="primary" class="btnAgree">同意</button> | |||||
<button type="warn" plain class="btnDis" bindtap="goDis">驳回</button> | |||||
<button type="primary" class="btnAgree" bindtap="goAgree">同意</button> | |||||
</view> | </view> |
@@ -473,7 +473,7 @@ Page({ | |||||
}, | }, | ||||
gosee:function(e){ | gosee:function(e){ | ||||
wx.navigateTo({ | 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, | |||||
}) | }) | ||||
}, | }, | ||||
}) | }) |
@@ -100,7 +100,7 @@ | |||||
</view> | </view> | ||||
<scroll-view scroll-y="true" style="height: {{wrokScrollHeight}}px;" > | <scroll-view scroll-y="true" style="height: {{wrokScrollHeight}}px;" > | ||||
<view class="workflow" wx:if="{{active=='1'}}" wx:for-item="item" wx:for="{{todoList}}" wx:key="id" data-id="{{item.formData.id}}" bindtap="gosee"> | |||||
<view class="workflow" wx:if="{{active=='1'}}" wx:for-item="item" wx:for="{{todoList}}" wx:key="id" data-id="{{item.formData.id}}" data-taskId="{{item.taskId}}" bindtap="gosee"> | |||||
<!--1--> | <!--1--> | ||||
<view class="workflow_list"> | <view class="workflow_list"> | ||||
<view class="process_intro"> | <view class="process_intro"> | ||||
@@ -111,7 +111,7 @@ | |||||
<view class="process_pay"> | <view class="process_pay"> | ||||
<view class="describe"> | <view class="describe"> | ||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | <image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | ||||
<text class="textLimit">{{item.formData.remark}}</text> | |||||
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text> | |||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>{{item.formData.totalAmount}}</view> | <view class="amount"><text class="unit">¥</text>{{item.formData.totalAmount}}</view> | ||||
</view> | </view> | ||||
@@ -121,16 +121,16 @@ | |||||
<!--1--> | <!--1--> | ||||
<view class="workflow_list"> | <view class="workflow_list"> | ||||
<view class="process_intro"> | <view class="process_intro"> | ||||
<view class="name">{{item.formData.payer}}</view> | |||||
<view class="name">{{item.formData.approvalItems}}</view> | |||||
<!-- <view class="state">已审</view> --> | <!-- <view class="state">已审</view> --> | ||||
<view class="time">{{item.formData.applyDate}}</view> | |||||
<view class="time">{{item.formData.applyTime}}</view> | |||||
</view> | </view> | ||||
<view class="process_pay"> | <view class="process_pay"> | ||||
<view class="describe"> | <view class="describe"> | ||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | <image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | ||||
<text class="textLimit">{{item.formData.remark}}</text> | |||||
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text> | |||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>{{item.formData.expenditureAmount}}</view> | |||||
<view class="amount"><text class="unit">¥</text>{{item.formData.totalAmount}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -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_GETPROCESS = `${URL_PREFIX}/yinnong/approvalItems/getProcessSchedule/`; | ||||
//审批流办理 | |||||
const URL_GET_PROCESSCOMPLETE = `${URL_PREFIX}/activiti/process/mobileComplete`; | |||||
/****************接口地址end****************/ | /****************接口地址end****************/ | ||||
export { | export { | ||||
@@ -183,5 +186,6 @@ export { | |||||
URL_GET_FINDLIST, | URL_GET_FINDLIST, | ||||
URL_GET_APPROVALITEMS, | URL_GET_APPROVALITEMS, | ||||
URL_GET_REMOVEAPPROVAL, | URL_GET_REMOVEAPPROVAL, | ||||
URL_GET_GETPROCESS | |||||
URL_GET_GETPROCESS, | |||||
URL_GET_PROCESSCOMPLETE | |||||
} | } |
@@ -118,7 +118,7 @@ function httpRequest(url, data, { | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
data: finalData, | data: finalData, | ||||
method:data.method, | |||||
method:data.method?data.method:'POST', | |||||
timeout: 60000, | timeout: 60000, | ||||
header: { | header: { | ||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | 'Authorization':'Bearer '+getApp().globalData.userInfo.token | ||||