@@ -470,11 +470,24 @@ Page({ | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | 'Authorization':'Bearer '+getApp().globalData.userInfo.token | ||||
}, | }, | ||||
success: function (r) { | success: function (r) { | ||||
wx.showToast({ | |||||
title: "提交成功!", | |||||
duration: 2000, | |||||
icon:"success" | |||||
}) | |||||
if (r.data.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: "提交成功!", | |||||
duration: 2000, | |||||
icon:"success" | |||||
}) | |||||
setTimeout(function(){ | |||||
wx.switchTab({ | |||||
url: '/pages/index/index' | |||||
}) | |||||
},2000) | |||||
}else{ | |||||
wx.showToast({ | |||||
title: "操作失败!", | |||||
duration: 2000, | |||||
icon:"error" | |||||
}) | |||||
} | |||||
}, | }, | ||||
}) | }) | ||||
}, | }, | ||||
@@ -45,8 +45,8 @@ Page({ | |||||
}, | }, | ||||
transfers:[{//事项信息集合以下是List对象信息 | transfers:[{//事项信息集合以下是List对象信息 | ||||
num:"一", | num:"一", | ||||
capitalExpenditureType:'',//资金支出类别 | |||||
capitalExpenditureTypeText:'',//资金支出类别(展示用) | |||||
capitalExpenditureType:'1',//资金支出类别 | |||||
capitalExpenditureTypeText:'结算类',//资金支出类别(展示用) | |||||
succeedAmount:'',//成功支付金额 | succeedAmount:'',//成功支付金额 | ||||
payer:'',//付款方 | payer:'',//付款方 | ||||
payerAccount:'',//付款方账户 | payerAccount:'',//付款方账户 | ||||
@@ -64,8 +64,8 @@ Page({ | |||||
paymentTime:'',//支付时间 | paymentTime:'',//支付时间 | ||||
bankPriority:'',//银行处理优先级 | bankPriority:'',//银行处理优先级 | ||||
clientPriority:'',//客户处理优先级 | clientPriority:'',//客户处理优先级 | ||||
transferType:'',//付款方式 | |||||
transferTypeText:'',//付款方式(展示用) | |||||
transferType:'1',//付款方式 | |||||
transferTypeText:'村账户转账',//付款方式(展示用) | |||||
requiredTransferTime:'',//要求转账时间 | requiredTransferTime:'',//要求转账时间 | ||||
remark:'',//付款事由 | remark:'',//付款事由 | ||||
startTime:'',//开票日期 | startTime:'',//开票日期 | ||||
@@ -21,6 +21,7 @@ Page({ | |||||
FPimage: [], | FPimage: [], | ||||
QTimage: [], | QTimage: [], | ||||
fileForm:[], | fileForm:[], | ||||
activeNames: ['1'], | |||||
}, | }, | ||||
showPopup() { | showPopup() { | ||||
this.setData({ show: true }); | this.setData({ show: true }); | ||||
@@ -310,6 +311,11 @@ Page({ | |||||
delta: 1 | delta: 1 | ||||
}) | }) | ||||
}, | }, | ||||
onChange(event) { | |||||
this.setData({ | |||||
activeNames: event.detail, | |||||
}); | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
@@ -4,6 +4,8 @@ | |||||
"van-cell-group": "@vant/weapp/cell-group/index", | "van-cell-group": "@vant/weapp/cell-group/index", | ||||
"van-icon": "@vant/weapp/icon/index", | "van-icon": "@vant/weapp/icon/index", | ||||
"van-dialog": "@vant/weapp/dialog/index", | "van-dialog": "@vant/weapp/dialog/index", | ||||
"van-field": "@vant/weapp/field/index" | |||||
"van-field": "@vant/weapp/field/index", | |||||
"van-collapse": "@vant/weapp/collapse/index", | |||||
"van-collapse-item": "@vant/weapp/collapse-item/index" | |||||
} | } | ||||
} | } |
@@ -14,6 +14,38 @@ | |||||
<text>提 交 人:{{form.approvalItemTemplate.submitter}}</text> | <text>提 交 人:{{form.approvalItemTemplate.submitter}}</text> | ||||
<text>联系电话:{{form.approvalItemTemplate.telephone}}</text> | <text>联系电话:{{form.approvalItemTemplate.telephone}}</text> | ||||
</view> | </view> | ||||
<van-collapse accordion value="{{ activeNames }}" bind:change="onChange"> | |||||
<van-collapse-item name="{{index}}" is-link="{{false}}" wx:for="{{form.transfers}}" wx:key="index"> | |||||
<view slot="title" class="tit_box"> | |||||
<text class="title">事项{{item.num}}</text> | |||||
<view class="top-box"> | |||||
<text>支出金额</text> | |||||
<view class="money_box">¥<input class="input_money" readonly 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" bindtap="goSee"></image> | |||||
<image src="/image/apply/icon_update.png" class="update" bindtap="goUpdate"></image> | |||||
<image src="/image/apply/icon_delete.png" class="delete" data-index="{{index}}" bindtap="goDelete"></image> | |||||
</view> | |||||
</van-cell-group> | |||||
</view> | |||||
</view> | |||||
代码是写出来给人看的,附带能在机器上运行 | |||||
</van-collapse-item> | |||||
</van-collapse> | |||||
<block wx:for="{{form.transfers}}" wx:key="index"> | <block wx:for="{{form.transfers}}" wx:key="index"> | ||||
<text class="title">事项{{item.num}}</text> | <text class="title">事项{{item.num}}</text> | ||||
@@ -61,6 +61,22 @@ text{display: block;} | |||||
box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); | box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); | ||||
} | } | ||||
.van-collapse-item .van-cell{ | |||||
width: 94%; | |||||
margin: 0 auto; | |||||
} | |||||
.van-collapse-item .van-cell .tit_box{ | |||||
background: #ffffff; | |||||
padding: 20px; | |||||
/* width: 94%; */ | |||||
margin: 0 auto; | |||||
border-radius: 10px; | |||||
box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); | |||||
} | |||||
.van-collapse-item__content{ | |||||
width: 94%; | |||||
margin: 0 auto; | |||||
} | |||||
.top-box text{ | .top-box text{ | ||||
margin-bottom: 15px; | margin-bottom: 15px; | ||||
} | } | ||||