@@ -107,6 +107,11 @@ Page({ | |||||
console.log(that.data.capitalExpenditureTypeOptions); | console.log(that.data.capitalExpenditureTypeOptions); | ||||
if(res.data.approvalItemTemplate == null){return;} | if(res.data.approvalItemTemplate == null){return;} | ||||
res.data.approvalItemTemplate.totalAmount = parseFloat(res.data.approvalItemTemplate.totalAmount).toFixed(2) | res.data.approvalItemTemplate.totalAmount = parseFloat(res.data.approvalItemTemplate.totalAmount).toFixed(2) | ||||
res.data.transfers = res.data.transfers.filter(function (e) { return e.id == options.ids; }); | |||||
console.log(options.ids); | |||||
console.log(res.data.transfers.filter(function (e) { return e.id == options.ids; })); | |||||
res.data.transfers.forEach( (item,index) => { | res.data.transfers.forEach( (item,index) => { | ||||
res.data.transfers[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | res.data.transfers[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | ||||
res.data.transfers[index].transferTypeText = UTIL.getTransform(item.transferType,that.data.transferTypeOptions); | res.data.transfers[index].transferTypeText = UTIL.getTransform(item.transferType,that.data.transferTypeOptions); | ||||
@@ -245,29 +250,29 @@ Page({ | |||||
}) | }) | ||||
// 查询审批事项流转进度 | // 查询审批事项流转进度 | ||||
UTIL.httpRequest(API.URL_GET_GETPROCESS+options.id , {method:'GET'}, { | |||||
success: (res) => { | |||||
console.log(res); | |||||
if(res.data.processSchedule != null){ | |||||
that.setData({spsxOptions:res.data.processSchedule.spsx}) | |||||
} | |||||
that.setData({instanceId:res.data.instanceId}) | |||||
// UTIL.httpRequest(API.URL_GET_GETPROCESS+options.id , {method:'GET'}, { | |||||
// success: (res) => { | |||||
// console.log(res); | |||||
// if(res.data.processSchedule != null){ | |||||
// that.setData({spsxOptions:res.data.processSchedule.spsx}) | |||||
// } | |||||
// that.setData({instanceId:res.data.instanceId}) | |||||
if(options.business == 'xj'){ | |||||
console.log(that.data.instanceId) | |||||
// 查询现金审批事项流转进度 | |||||
UTIL.httpRequest(API.URL_GET_REVIEWPROCESS+that.data.instanceId , {method:'GET'}, { | |||||
success: (res) => { | |||||
console.log(res); | |||||
if(res.data.processSchedule.spsx){ | |||||
that.setData({spsxOptions:res.data.processSchedule.spsx}) | |||||
} | |||||
that.setData({instanceId:res.data.instanceId}) | |||||
} | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
// if(options.business == 'xj'){ | |||||
// console.log(that.data.instanceId) | |||||
// // 查询现金审批事项流转进度 | |||||
// UTIL.httpRequest(API.URL_GET_REVIEWPROCESS+that.data.instanceId , {method:'GET'}, { | |||||
// success: (res) => { | |||||
// console.log(res); | |||||
// if(res.data.processSchedule.spsx){ | |||||
// that.setData({spsxOptions:res.data.processSchedule.spsx}) | |||||
// } | |||||
// that.setData({instanceId:res.data.instanceId}) | |||||
// } | |||||
// }) | |||||
// } | |||||
// } | |||||
// }) | |||||
},1000) | },1000) | ||||
@@ -276,6 +281,11 @@ Page({ | |||||
}, | |||||
goPayee(event){ | |||||
wx.navigateTo({ | |||||
url: 'payee/payee?options='+JSON.stringify(event.currentTarget.dataset.option) | |||||
}) | |||||
}, | }, | ||||
goDis(){ | goDis(){ | ||||
var that = this ; | var that = this ; | ||||
@@ -16,34 +16,9 @@ | |||||
<text>联系电话:{{form.approvalItemTemplate.telephone}}</text> | <text>联系电话:{{form.approvalItemTemplate.telephone}}</text> | ||||
</view> | </view> | ||||
<van-collapse accordion value="{{ activeNames }}" bind:change="onChangeBox" bind:open="onOpen" bind:close="onCloseSecond"> | |||||
<van-collapse-item name="{{index}}" disabled="{{item.collapseDis}}" is-link="{{false}}" wx:for="{{form.transfers}}" wx:key="index"> | |||||
<view slot="title" wx:if="{{item.showTitle}}" class="main-title">事项{{form.transfers[index].num}} | |||||
<image src="/image/apply/icon_close.png" style="width: 24px;height: 24px;position: absolute;right: 4% ;top: 10px;transform: rotateX(180deg);" data-index="{{index}}" ></image> | |||||
</view> | |||||
<view slot="title" class="tit_box" wx:if="{{!item.showTitle}}"> | |||||
<text class="title" style="text-align: center;">事项{{item.num}}</text> | |||||
<view class="top-box"> | |||||
<text>支出金额</text> | |||||
<view class="money_box">¥<input class="input_money" disabled placeholder="金额" placeholder-style="color:#E90000;" value="{{item.expenditureAmount}}"/></view> | |||||
<van-cell-group border="{{ false }}"> | |||||
<van-cell title="{{item.remark}}" border="{{ false }}" > | |||||
<view slot="icon" style="width: 15%;">事由:</view> | |||||
</van-cell> | |||||
<van-cell title="{{item.payer}}" border="{{ false }}" center > | |||||
<view slot="icon" style="width: 15%;"><image src="/image/apply/icon_fu.png" style="width: 20px;height: 20px;"></image></view> | |||||
</van-cell> | |||||
<van-cell title="{{item.payeeList[0].payee}}" center border="{{ false }}" > | |||||
<view slot="icon" style="width: 15%;"><image src="/image/apply/icon_shou.png" style="width: 20px;height: 20px;"></image></view> | |||||
</van-cell> | |||||
<view class="btnBox"> | |||||
<image src="/image/apply/down.png" data-index="{{index}}" class="down"></image> | |||||
<!-- <image src="/image/apply/icon_update.png" class="update" bindtap="goUpdate"></image> --> | |||||
</view> | |||||
</van-cell-group> | |||||
</view> | |||||
</view> | |||||
<van-collapse accordion value="0" bind:change="onChangeBox" bind:open="onOpen" bind:close="onCloseSecond"> | |||||
<van-collapse-item name="0" disabled="{{item.collapseDis}}" is-link="{{false}}" wx:for="{{form.transfers}}" wx:key="index"> | |||||
<view slot="title" class="main-title">事项{{form.transfers[index].num}}</view> | |||||
<view class="center"> | <view class="center"> | ||||
<text class="title">基础信息</text> | <text class="title">基础信息</text> | ||||
<view class="main-box table-box"> | <view class="main-box table-box"> | ||||
@@ -161,7 +136,7 @@ | |||||
</view> | </view> | ||||
</block> | </block> | ||||
<block wx:else> | <block wx:else> | ||||
<view class="main-box table-box" wx:for="{{form.transfers[index].payeeList}}" wx:for-index="childrenIndex" wx:key="payeeId"> | |||||
<view class="main-box table-box" wx:for="{{form.transfers[index].payeeList}}" wx:for-index="childrenIndex" wx:key="payeeId" wx:if="{{form.transfers[index].payeeList.length < 2}}"> | |||||
<van-field required readonly value="{{ form.transfers[index].payeeList[childrenIndex].payee }}" placeholder="请选择收款方" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="goPayeeList" data-payer="{{form.transfers[index].payer}}" data-index="{{index}}" data-isPeers="{{ form.transfers[index].isPeers }}" data-bankType="{{ form.transfers[index].bankType }}" data-accountType="{{ form.transfers[index].bankAccountType }}" data-transferType="{{ form.transfers[index].transferType }}"> | <van-field required readonly value="{{ form.transfers[index].payeeList[childrenIndex].payee }}" placeholder="请选择收款方" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="goPayeeList" data-payer="{{form.transfers[index].payer}}" data-index="{{index}}" data-isPeers="{{ form.transfers[index].isPeers }}" data-bankType="{{ form.transfers[index].bankType }}" data-accountType="{{ form.transfers[index].bankAccountType }}" data-transferType="{{ form.transfers[index].transferType }}"> | ||||
<view slot="label"> | <view slot="label"> | ||||
收款方<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">选择</van-tag> | 收款方<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">选择</van-tag> | ||||
@@ -170,6 +145,31 @@ | |||||
<van-field required readonly label="收款账号" value="{{ form.transfers[index].payeeList[childrenIndex].payeeAccount }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/> | <van-field required readonly label="收款账号" value="{{ form.transfers[index].payeeList[childrenIndex].payeeAccount }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/> | ||||
<van-field required readonly label="开户银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankDeposit }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | <van-field required readonly label="开户银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankDeposit }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | ||||
</view> | </view> | ||||
<view class="main-box table-box payeeList" wx:if="{{form.transfers[index].payeeList.length > 1}}"> | |||||
<van-collapse accordion value="{{ form.transfers[index].activeName }}" data-index="{{index}}" bind:change="onChangePayee"> | |||||
<van-collapse-item title="{{ form.transfers[index].payeeList[childrenIndex].payee }}" value="¥{{ form.transfers[index].payeeList[childrenIndex].incomeAmount }}" name="{{childrenIndex}}" wx:for="{{form.transfers[index].payeeList}}" wx:if="{{childrenIndex<10}}" wx:for-index="childrenIndex" wx:key="payeeId"> | |||||
<van-field required readonly border="{{ false }}" input-align="right" is-link arrow-direction ="down" > | |||||
<view slot="label" style="color: var(--field-label-color,#646566);"> | |||||
{{ form.transfers[index].payeeList[childrenIndex].payee }}<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">收款人</van-tag> | |||||
</view> | |||||
</van-field> | |||||
<van-field required readonly label="收款账号" value="{{ form.transfers[index].payeeList[childrenIndex].payeeAccount }}" border="{{ false }}" input-align="right"/> | |||||
<van-field required readonly label="开户银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankDeposit }}" border="{{ false }}" input-align="right"/> | |||||
<van-field required readonly label="收入金额" value="{{ form.transfers[index].payeeList[childrenIndex].incomeAmount }}" border="{{ false }}" input-align="right"/> | |||||
<van-field required readonly label="所属银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankTypeText }}" border="{{ false }}" input-align="right"/> | |||||
<!-- <van-field required readonly label="转账状态" value="{{ form.transfers[index].payeeList[childrenIndex].transferStatusText }}" border="{{ false }}" input-align="right"/> | |||||
<van-field required readonly label="交易结果描述" value="{{ form.transfers[index].payeeList[childrenIndex].causeFailure }}" border="{{ false }}" input-align="right"/> --> | |||||
</van-collapse-item> | |||||
</van-collapse> | |||||
<text wx:if="{{form.transfers[index].payeeList.length>10}}" style="text-align: center;color: #2C8E68;padding-top: 10px;" data-option="{{form.transfers[index].payeeList}}" bindtap="goPayee">查看更多</text> | |||||
<!-- | |||||
<van-field required readonly label="{{ form.transfers[index].payeeList[childrenIndex].payee }}" value="¥{{ form.transfers[index].payeeList[childrenIndex].incomeAmount }}" wx:for="{{form.transfers[index].payeeList}}" wx:for-index="childrenIndex" wx:key="payeeId" is-link placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" input-class="aaa" /> --> | |||||
</view> | |||||
</block> | </block> | ||||
</view> | </view> | ||||
@@ -293,8 +293,7 @@ text{display: block;} | |||||
.bottom{ | .bottom{ | ||||
text-align: center; | text-align: center; | ||||
width: 100%; | width: 100%; | ||||
position:fixed; | |||||
bottom:30px; | |||||
margin-top: 50px; | |||||
} | } | ||||
.bottom button { | .bottom button { | ||||
@@ -573,4 +572,26 @@ text{display: block;} | |||||
-webkit-line-clamp: 1; | -webkit-line-clamp: 1; | ||||
word-break: break-all; | word-break: break-all; | ||||
overflow: hidden; | overflow: hidden; | ||||
} | |||||
} | |||||
.payeeList { | |||||
padding: 10px 20px!important; | |||||
} | |||||
.payeeList .van-collapse-item { | |||||
margin-top: 0; | |||||
} | |||||
.payeeList .van-collapse .van-cell { | |||||
padding: 10px 0!important; | |||||
} | |||||
.payeeList van-field van-cell .van-cell{ | |||||
margin-bottom: 0; | |||||
} | |||||
.payeeList .van-cell__value { | |||||
color: #E90000; | |||||
} | |||||
.payeeList .van-cell__title{ | |||||
flex-shrink: 0; | |||||
max-width: inherit; | |||||
} |
@@ -1,6 +1,6 @@ | |||||
// pages/pay/payee/payee.js | // pages/pay/payee/payee.js | ||||
import * as UTIL from '../../../utils/util.js'; | |||||
import * as API from '../../../utils/API.js'; | |||||
import * as UTIL from '../../../../../utils/util.js'; | |||||
import * as API from '../../../../../utils/API.js'; | |||||
const app = getApp(); | const app = getApp(); | ||||
Page({ | Page({ | ||||
@@ -10,7 +10,8 @@ Page({ | |||||
data: { | data: { | ||||
isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
activeName:'', | activeName:'', | ||||
value:'123' | |||||
value:'123', | |||||
list:{} | |||||
}, | }, | ||||
onChange(event) { | onChange(event) { | ||||
this.setData({ | this.setData({ | ||||
@@ -21,9 +22,18 @@ Page({ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad(options) { | onLoad(options) { | ||||
console.log(JSON.parse(options.options)); | |||||
this.setData({ | |||||
list: JSON.parse(options.options), | |||||
}); | |||||
}, | }, | ||||
back:function(){ | |||||
wx.navigateBack({ | |||||
delta: 1 | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
*/ | */ | ||||
@@ -20,42 +20,22 @@ | |||||
</view> | </view> | ||||
<view class="main"> | <view class="main"> | ||||
<van-collapse accordion value="{{ activeName }}" bind:change="onChange" custom-class="list"> | <van-collapse accordion value="{{ activeName }}" bind:change="onChange" custom-class="list"> | ||||
<van-collapse-item title="张曼玉" name="1"> | |||||
<van-collapse-item title="{{ item.payee }}" name="{{index}}" wx:for="{{list}}" wx:key="index"> | |||||
<view slot="value"> | <view slot="value"> | ||||
<text class="money">¥15300.00</text> | |||||
<text class="money">¥{{ item.incomeAmount }}</text> | |||||
</view> | </view> | ||||
<view class="detailBox"> | <view class="detailBox"> | ||||
<van-cell border="{{ false }}" > | <van-cell border="{{ false }}" > | ||||
<view slot="title"> | <view slot="title"> | ||||
张三<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">收款方</van-tag> | |||||
{{ item.payee }}<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">收款方</van-tag> | |||||
</view> | </view> | ||||
</van-cell> | </van-cell> | ||||
<van-cell title="收款账户" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="开户银行" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="收入金额" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="所属银行" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="转账状态" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="交易结果" value="6217002190007972186" border="{{ false }}" /> | |||||
</view> | |||||
</van-collapse-item> | |||||
</van-collapse> | |||||
<van-collapse accordion value="{{ activeName }}" bind:change="onChange" custom-class="list"> | |||||
<van-collapse-item title="张曼玉" name="2"> | |||||
<view slot="value"> | |||||
<text class="money">¥15300.00</text> | |||||
</view> | |||||
<view class="detailBox"> | |||||
<van-cell border="{{ false }}" > | |||||
<view slot="title"> | |||||
张三<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">收款方</van-tag> | |||||
</view> | |||||
</van-cell> | |||||
<van-cell title="收款账户" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="开户银行" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="收入金额" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="所属银行" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="转账状态" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="交易结果" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="收款账户" value="{{ item.payeeAccount }}" border="{{ false }}" /> | |||||
<van-cell title="开户银行" value="{{ item.bankDeposit }}" border="{{ false }}" /> | |||||
<van-cell title="收入金额" value="{{ item.incomeAmount }}" border="{{ false }}" /> | |||||
<van-cell title="所属银行" value="{{ item.bankTypeText }}" border="{{ false }}" /> | |||||
<!-- <van-cell title="转账状态" value="6217002190007972186" border="{{ false }}" /> | |||||
<van-cell title="交易结果" value="6217002190007972186" border="{{ false }}" /> --> | |||||
</view> | </view> | ||||
</van-collapse-item> | </van-collapse-item> | ||||
</van-collapse> | </van-collapse> |
@@ -181,7 +181,7 @@ Page({ | |||||
}, | }, | ||||
toPay(e){ | toPay(e){ | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/paymentManager/toPay/toPay?id='+e.currentTarget.dataset.id, | |||||
url: '/pages/pay/detail?id='+e.currentTarget.dataset.id+'&&ids='+e.currentTarget.dataset.ids, | |||||
}) | }) | ||||
}, | }, | ||||
scrap(e){ | scrap(e){ | ||||
@@ -39,7 +39,7 @@ | |||||
<text style="font-size: 10px;display: inline;">¥</text>{{item.expenditureAmount}} | <text style="font-size: 10px;display: inline;">¥</text>{{item.expenditureAmount}} | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view style="text-align: right;" bindtap="toPay" data-id="{{item.id}}"> | |||||
<view style="text-align: right;" bindtap="toPay" data-id="{{item.approvalItemTemplateId}}" data-ids="{{item.id}}"> | |||||
<button wx-if="{{item.paymentState==1}}" type="primary" size="mini" style="border-radius: 15px;" >待支付</button> | <button wx-if="{{item.paymentState==1}}" type="primary" size="mini" style="border-radius: 15px;" >待支付</button> | ||||
<button wx-if="{{item.paymentState==3}}" type="primary" size="mini" style="border-radius: 15px;background-color: #B3DB62;">银行受理</button> | <button wx-if="{{item.paymentState==3}}" type="primary" size="mini" style="border-radius: 15px;background-color: #B3DB62;">银行受理</button> | ||||
<button wx-if="{{item.paymentState==4}}" type="warn" size="mini" style="border-radius: 15px;">支付失败</button> | <button wx-if="{{item.paymentState==4}}" type="warn" size="mini" style="border-radius: 15px;">支付失败</button> | ||||