From 39589cc62bad944d1ed74e8f15279e0f5338a2fc Mon Sep 17 00:00:00 2001 From: pangdongxu <850374051@qq.com> Date: Fri, 10 Jun 2022 17:39:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/pay/detail.js | 54 +++++++++++++--------- pages/pay/detail.wxml | 58 ++++++++++++------------ pages/pay/detail.wxss | 27 +++++++++-- pages/pay/payee/payee.js | 18 ++++++-- pages/pay/payee/payee.wxml | 38 ++++------------ pages/paymentManager/paymentManager.js | 2 +- pages/paymentManager/paymentManager.wxml | 2 +- 7 files changed, 110 insertions(+), 89 deletions(-) diff --git a/pages/pay/detail.js b/pages/pay/detail.js index 0df5922..56cb248 100644 --- a/pages/pay/detail.js +++ b/pages/pay/detail.js @@ -107,6 +107,11 @@ Page({ console.log(that.data.capitalExpenditureTypeOptions); if(res.data.approvalItemTemplate == null){return;} 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[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); 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) @@ -276,6 +281,11 @@ Page({ + }, + goPayee(event){ + wx.navigateTo({ + url: 'payee/payee?options='+JSON.stringify(event.currentTarget.dataset.option) + }) }, goDis(){ var that = this ; diff --git a/pages/pay/detail.wxml b/pages/pay/detail.wxml index 8f2d71a..5da3b58 100644 --- a/pages/pay/detail.wxml +++ b/pages/pay/detail.wxml @@ -16,34 +16,9 @@ 联系电话:{{form.approvalItemTemplate.telephone}} - - - 事项{{form.transfers[index].num}} - - - - 事项{{item.num}} - - 支出金额 - - - - 事由: - - - - - - - - - - - - - - - + + + 事项{{form.transfers[index].num}} 基础信息 @@ -161,7 +136,7 @@ - + 收款方选择 @@ -170,6 +145,31 @@ + + + + + + + + + {{ form.transfers[index].payeeList[childrenIndex].payee }}收款人 + + + + + + + + + + + 查看更多 + + diff --git a/pages/pay/detail.wxss b/pages/pay/detail.wxss index 41b7a2e..31b826b 100644 --- a/pages/pay/detail.wxss +++ b/pages/pay/detail.wxss @@ -293,8 +293,7 @@ text{display: block;} .bottom{ text-align: center; width: 100%; - position:fixed; - bottom:30px; + margin-top: 50px; } .bottom button { @@ -573,4 +572,26 @@ text{display: block;} -webkit-line-clamp: 1; word-break: break-all; overflow: hidden; - } \ No newline at end of file + } + + + .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; +} \ No newline at end of file diff --git a/pages/pay/payee/payee.js b/pages/pay/payee/payee.js index e19d264..24e7e5e 100644 --- a/pages/pay/payee/payee.js +++ b/pages/pay/payee/payee.js @@ -1,6 +1,6 @@ // 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(); Page({ @@ -10,7 +10,8 @@ Page({ data: { isIPX: app.globalData.isIPX, activeName:'', - value:'123' + value:'123', + list:{} }, onChange(event) { this.setData({ @@ -21,9 +22,18 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - + console.log(JSON.parse(options.options)); + + this.setData({ + list: JSON.parse(options.options), + }); }, + back:function(){ + wx.navigateBack({ + delta: 1 + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/pay/payee/payee.wxml b/pages/pay/payee/payee.wxml index 1cbeecd..143d2ca 100644 --- a/pages/pay/payee/payee.wxml +++ b/pages/pay/payee/payee.wxml @@ -20,42 +20,22 @@ - + - ¥15300.00 + ¥{{ item.incomeAmount }} - 张三收款方 + {{ item.payee }}收款方 - - - - - - - - - - - - - ¥15300.00 - - - - - 张三收款方 - - - - - - - - + + + + + diff --git a/pages/paymentManager/paymentManager.js b/pages/paymentManager/paymentManager.js index c3244b5..e3f530a 100644 --- a/pages/paymentManager/paymentManager.js +++ b/pages/paymentManager/paymentManager.js @@ -181,7 +181,7 @@ Page({ }, toPay(e){ 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){ diff --git a/pages/paymentManager/paymentManager.wxml b/pages/paymentManager/paymentManager.wxml index 91f86f4..9e40a36 100644 --- a/pages/paymentManager/paymentManager.wxml +++ b/pages/paymentManager/paymentManager.wxml @@ -39,7 +39,7 @@ {{item.expenditureAmount}} - +