浏览代码

支出申请接口

master
pangdongxu 3 年前
父节点
当前提交
0bfa1c17b7
共有 7 个文件被更改,包括 247 次插入182 次删除
  1. 二进制
      image/apply/icon_exel.png
  2. +2
    -0
      pages/apply/index.js
  3. +3
    -15
      pages/apply/index.wxml
  4. +77
    -36
      pages/apply/paymentTemplate/add/add.js
  5. +3
    -1
      pages/apply/paymentTemplate/add/add.json
  6. +140
    -129
      pages/apply/paymentTemplate/add/add.wxml
  7. +22
    -1
      utils/util.js

二进制
image/apply/icon_exel.png 查看文件

之前 之后
宽度: 23  |  高度: 23  |  大小: 1023 B

+ 2
- 0
pages/apply/index.js 查看文件

@@ -1,5 +1,7 @@
// pages/apply/index.js
const app = getApp();
import * as UTIL from '../../utils/util.js';
import * as API from '../../utils/API.js';
Page({

/**


+ 3
- 15
pages/apply/index.wxml 查看文件

@@ -13,27 +13,15 @@
<view class="main">
<van-tabs sticky color="#000">
<van-tab title="银行账户">
<view class="bank_box">
<view class="bank_box" wx:for="{{accountList}}" wx:key="index">
<text class="zt">一般户</text>
<image src="../../image/apply/jsyh_bg2.png" style="width: 100%;position: absolute;bottom:0;z-index: 9;" mode="widthFix"></image>
<image src="../../image/apply/bgt.png" style="width: 100%;position: absolute;top:0;right:0;z-index: 9;height: 100%;"></image>
<view class="bank_content">
<image src="../../image/apply/jsyh_icon.png" style="width: 28%;" mode="widthFix"></image>
<view style="margin-bottom: 2vh;">6217 0021 9000 7972 186<text>卡号</text></view>
<view style="margin-bottom: 2vh;">{{item.bankAccountNumber}}<text>卡号</text></view>
<view>可用余额</view>
<view style="font-weight: bold;font-size: 22px;margin-top: 2vh;">10,288.83</view>
</view>
</view>

<view class="bank_box">
<text class="zt">一般户</text>
<image src="../../image/apply/jsyh_bg2.png" style="width: 100%;position: absolute;bottom:0;z-index: 9;" mode="widthFix"></image>
<image src="../../image/apply/bgt.png" style="width: 100%;position: absolute;top:0;right:0;z-index: 9;height: 100%;"></image>
<view class="bank_content">
<image src="../../image/apply/jsyh_icon.png" style="width: 28%;" mode="widthFix"></image>
<view style="margin-bottom: 2vh;">6217 0021 9000 7972 186<text>卡号</text></view>
<view>可用余额</view>
<view style="font-weight: bold;font-size: 22px;margin-top: 2vh;">10,288.83</view>
<view style="font-weight: bold;font-size: 22px;margin-top: 2vh;">{{item.balance}}</view>
</view>
</view>



+ 77
- 36
pages/apply/paymentTemplate/add/add.js 查看文件

@@ -1,4 +1,6 @@
// pages/apply/paymentTemplate/add/add.js
import * as UTIL from '../../../../utils/util.js';
import * as API from '../../../../utils/API.js';
const app = getApp();
Page({

@@ -8,40 +10,57 @@ Page({
data: {
isIPX: app.globalData.isIPX,
radio:'1',
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,
showCapitalExpenditureType:false,
form:{
approvalItemTemplate:{
approvalItems:'',//审批事项
submitCompany:'',//提交单位
submitDate:'',//提交日期
submitter:'',//提交人
telephone:'',//联系方式
totalAmount:'',//合计金额
templateName:'',//模板名称 选择保存模板的时候添加
dataType:'',//数据类型
transfers:[{//事项信息集合以下是List对象信息
capitalExpenditureType:'',//资金支出类别
succeedAmount:'',//成功支付金额
payer:'',//付款方
payerAccount:'',//付款方账户
bankType:'',//所属银行
isPeers:'',//是否同行
operatorCode:'',//操作员代码
enterpriseCode:'',//企业编码
expenditureAmount:'',//支出总金额
applyDate:'',//申请时间
transferStatus:'',//转账状态
auditStatus:'',//审批状态
paymentState:'',//支付状态
approvalMode:'',//审批模式
paymentTime:'',//支付时间
bankPriority:'',//银行处理优先级
clientPriority:'',//客户处理优先级
transferType:'',//申请类型
requiredTransferTime:'',//要求转账时间
remark:'',//付款事由
startTime:'',//开票日期
endTime:'',//到期日期
orderType:'',//汇票类型
bankAccountType:'',//账户类别
villageAccountType:'',//账户分类
}],
bankAccountType:'1',//账户类别1 公户2私户
payeeList:[{//收款方账户集合
payeeId:'',//收款方id
payee:'',//收款方
bankDeposit:'',//开户行
incomeAmount:'',//收入金额
bankType:'',//所属银行0其他银行1中国银行2农商行(山东省)3农业银行4建设银行5工商银行
payeeAccount:'',//收款账户
}],

}
}
},

/**
@@ -62,9 +81,31 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {

var that = this;
UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, {
success: (res) => {
if (res.code == API.SUCCESS_CODE) {
that.setData({
["form.approvalItemTemplate.submitCompany"]:res.user.bookName,
["form.approvalItemTemplate.submitDate"]:UTIL.js_date_time(new Date()),
["form.approvalItemTemplate.submitter"]:res.user.nickName,
["form.approvalItemTemplate.telephone"]:res.user.phonenumber,
})

}
}
})
},
openBox(even){
this.setData({
[even.currentTarget.dataset.name]:true
})
},
closeBox(even){
this.setData({
[even.currentTarget.dataset.name]:false
})
},

/**
* 生命周期函数--监听页面隐藏
*/


+ 3
- 1
pages/apply/paymentTemplate/add/add.json 查看文件

@@ -11,6 +11,8 @@
"van-button": "@vant/weapp/button/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-field": "@vant/weapp/field/index"
"van-field": "@vant/weapp/field/index",
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index"
}
}

+ 140
- 129
pages/apply/paymentTemplate/add/add.wxml 查看文件

@@ -6,158 +6,169 @@
<view class="pure_top" style="top:{{isIPX?'88px':'64px'}};"></view>
<view class="main-box top-box" style="margin-top:{{isIPX?'100px':'75px'}};">
<text class="box-title">审批事项</text>
<input class="input_tit" placeholder="请输入审批事项"/>
<text>提交单位:龙华村联合社</text>
<text>提交日期:2022年1月18日</text>
<text>提 交 人:报账员</text>
<text>联系电话:13906311234</text>
<input class="input_tit" placeholder="请输入审批事项" value="{{form.approvalItemTemplate.approvalItems}}" bindinput="bindKeyInput"/>
<text>提交单位:{{form.approvalItemTemplate.submitCompany}}</text>
<text>提交日期:{{form.approvalItemTemplate.submitDate}}</text>
<text>提 交 人:{{form.approvalItemTemplate.submitter}}</text>
<text>联系电话:{{form.approvalItemTemplate.telephone}}</text>
</view>
<view class="main-title">事项一</view>
<view class="center">
<text class="title">基础信息</text>
<view class="main-box table-box">
<van-field label="申请流水号" value="{{ value }}" placeholder="请输入申请流水号" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="申请时间" value="{{ value }}" placeholder="请输入申请时间" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="合计支出" value="{{ value }}" placeholder="请输入合计支出" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="支出原因" value="{{ value }}" placeholder="请输入支出原因" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="资金支出类别" value="{{ value }}" placeholder="请输入资金支出类别" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/>
</view>
<text class="title">关联项目</text>
<view class="main-box table-box">
<van-field label="项目名称" value="{{ value }}" placeholder="请输入项目名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link/>
</view>
<text class="title">付款方信息</text>
<view class="main-box table-box">
<van-field label="付款方式" value="{{ value }}" placeholder="请输入付款方式" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/>

<van-field value="{{ value }}" placeholder="请输入付款方名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down">
<view slot="label">
付款方名称<van-tag plain type="danger" color="red" round style="margin-left:10px;">必填</van-tag>
</view>
</van-field>
<van-field label="付款方账号" value="{{ value }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="所属银行" value="{{ value }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="转账附言" value="{{ value }}" placeholder="请输入转账附言" border="{{ false }}" bind:change="onChange" input-align="right"/>
</view>
<text class="title">收款方信息</text>
<view class="center-box">
<block wx:for="{{form.approvalItemTemplate.transfers}}" wx:key="index">
<view class="main-title">事项一</view>
<view class="center">
<text class="title">基础信息</text>
<view class="main-box table-box">
<van-cell title="收款账户类型" center border="{{false}}">
<view>
<van-radio-group
value="{{ radio }}"
bind:change="onChange"
direction="horizontal"XX
>
<van-radio name="1" checked-color="#2C8E68" disabled>公户</van-radio>
<van-radio name="2" checked-color="#2C8E68" disabled>私户</van-radio>
</van-radio-group>
</view>
</van-cell>
<!-- <van-field label="申请流水号" value="{{ form.approvalItemTemplate.telephone }}" placeholder="请输入申请流水号" border="{{ false }}" bind:change="onChange" input-align="right"/> -->
<van-field label="申请时间" value="{{ form.approvalItemTemplate.transfers[index].applyDate }}" placeholder="请输入申请时间" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="合计支出" value="{{ form.approvalItemTemplate.transfers[index].expenditureAmount }}" placeholder="请输入合计支出" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="支出原因" value="{{ form.approvalItemTemplate.transfers[index].remark }}" placeholder="请输入支出原因" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-popup show="{{showCapitalExpenditureType}}" round position="bottom" bind:close="closeBox" data-name="showCapitalExpenditureType">
<van-picker
columns="{{columns}}"
bind:cancel="showCapitalExpenditureType = false"
bind:confirm="onConfirm"
/>
</van-popup>
<van-field label="资金支出类别" readonly value="{{ form.approvalItemTemplate.transfers[index].capitalExpenditureType }}" placeholder="请输入资金支出类别" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showCapitalExpenditureType"/>
</view>
<text class="title">关联项目</text>
<view class="main-box table-box">
<van-field value="{{ value }}" placeholder="请输入姓名" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down">
<van-field label="项目名称" value="{{ value }}" placeholder="请输入项目名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link/>
</view>
<text class="title">付款方信息</text>
<view class="main-box table-box">
<!-- 付款方式无 -->
<van-field label="付款方式" value="{{ form.approvalItemTemplate.transfers[index].transferType }}" placeholder="请输入付款方式" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/>

<van-field value="{{ form.approvalItemTemplate.transfers[index].payer }}" placeholder="请输入付款方名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down">
<view slot="label">
姓名<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">收款方</van-tag>
付款方名称<van-tag plain type="danger" color="red" round style="margin-left:10px;">必填</van-tag>
</view>
</van-field>
<van-field label="收款账户" value="{{ value }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="开户银行" value="{{ value }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/>
<van-field label="收入金额" value="{{ value }}" placeholder="请输入收入金额" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="所属银行" value="{{ value }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/>
<van-field label="付款方账号" value="{{ form.approvalItemTemplate.transfers[index].payerAccount }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="所属银行" value="{{ form.approvalItemTemplate.transfers[index].bankType }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right"/>
<!-- 转账附言无 -->
<van-field label="转账附言" value="{{ form.approvalItemTemplate.transfers[index].remark }}" placeholder="请输入转账附言" border="{{ false }}" bind:change="onChange" input-align="right"/>
</view>
</view>

<view class="main-box">
<van-cell>
<!-- <view slot="icon">
<van-icon class-prefix="my-icon" name="extra" />
</view> -->
<view slot="title">
<view class="van-cell-text">附件<van-tag type="danger" style="margin-left: 10px;">可拍照</van-tag></view>
<text class="title">收款方信息</text>
<view class="center-box">
<view class="main-box table-box">
<van-cell title="收款账户类型" center border="{{false}}">
<view>
<van-radio-group
value="{{ form.approvalItemTemplate.bankAccountType }}"
bind:change="onChange"
direction="horizontal"
>
<van-radio name="1" checked-color="#2C8E68">公户</van-radio>
<van-radio name="2" checked-color="#2C8E68">私户</van-radio>
</van-radio-group>
</view>
</van-cell>
</view>
<view>
<view class="van-cell-text">总数<van-tag round color="#5CAE77" plain style="margin-left: 10px;"> 0张 </van-tag></view>
<view class="main-box table-box">
<van-field value="{{ form.approvalItemTemplate.transfers[index].payee }}" placeholder="请输入姓名" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down">
<view slot="label">
姓名<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">收款方</van-tag>
</view>
</van-field>
<van-field label="收款账户" value="{{ form.approvalItemTemplate.transfers[index].payeeAccount }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/>
<van-field label="开户银行" value="{{ form.approvalItemTemplate.transfers[index].bankDeposit }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/>
<van-field label="收入金额" value="{{ form.approvalItemTemplate.transfers[index].incomeAmount }}" placeholder="请输入收入金额" border="{{ false }}" bind:change="onChange" input-align="right"/>

<van-field label="所属银行" value="{{ form.approvalItemTemplate.transfers[index].bankType }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/>
</view>
</van-cell>
<view class="fj-box">
<view class="fj-li">
<text>
</view>

<view class="main-box">
<van-cell>
<!-- <view slot="icon">
<van-icon class-prefix="my-icon" name="extra" />
</view> -->
<view slot="title">
<view class="van-cell-text">附件<van-tag type="danger" style="margin-left: 10px;">可拍照</van-tag></view>
</view>
<view>
<view class="van-cell-text">总数<van-tag round color="#5CAE77" plain style="margin-left: 10px;"> 0张 </van-tag></view>
</view>
</van-cell>
<view class="fj-box">
<view class="fj-li">
<text>
</text>
<image src="/image/apply/fj_upload.png" mode="widthFix"></image>
</view>
<view class="fj-li">
<text>
</text>
<image src="/image/apply/fj_upload.png" mode="widthFix"></image>
</view>
<view class="fj-li">
<text>
</text>
<image src="/image/apply/fj_upload.png" mode="widthFix"></image>
</view>
<view class="fj-li">
<text>
</text>
<image src="/image/apply/fj_upload.png" mode="widthFix"></image>
</view>
<view class="fj-li">
<text>
</text>
<image src="/image/apply/fj_upload.png" mode="widthFix"></image>
</text>
<image src="/image/apply/fj_upload.png" mode="widthFix"></image>
</view>
</view>
</view>
</view>

<!-- <view class="main-box steps-box">
<view class="steps-tit">审批流程</view>
<van-row wx:for="{{steps}}" wx:key="index">
<van-col span="3">
<view class="index">{{index+1}}</view>
<block wx:if="{{index==0}}">
<view class="indexBorder">
<view class="ssT" wx:if="{{index>0}}"></view>
<view class="yq"></view>
<view class="ss" wx:if="{{steps.length != index+1}}"></view>
</view>
</block>
<block wx:else>
<view class="indexBorder indexCenter">
<view class="ssT" wx:if="{{index>0}}"></view>
<view class="yq"></view>
<view class="ss" wx:if="{{steps.length != index+1}}"></view>
</view>
</block>
</van-col>
<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>
<!-- <view class="main-box steps-box">
<view class="steps-tit">审批流程</view>
<van-row wx:for="{{steps}}" wx:key="index">
<van-col span="3">
<view class="index">{{index+1}}</view>
<block wx:if="{{index==0}}">
<view class="indexBorder">
<view class="ssT" wx:if="{{index>0}}"></view>
<view class="yq"></view>
<view class="ss" wx:if="{{steps.length != index+1}}"></view>
</view>
</block>
<block wx:else>
<view class="indexBorder indexCenter">
<view class="ssT" wx:if="{{index>0}}"></view>
<view class="yq"></view>
<view class="ss" wx:if="{{steps.length != index+1}}"></view>
</view>
</block>
</van-col>
<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>

<van-cell center border="{{false}}">
<view slot="title">
<view style="color: #999999;">{{ item.durationInMillis }}</view>
</view>
<view style="color: #999999;font-size: 12px;">{{ item.endTime }}</view>
</van-cell>
</van-col>
</van-row>
</view> -->
<view class="bottomBtn">
<view bindtap="showPopup">
<image src="/image/apply/icon_pres.png"></image>
<text>保存模板</text>
</view>
<view>
<image src="/image/apply/icon_add.png"></image>
<text>新增事项</text>
<van-cell center border="{{false}}">
<view slot="title">
<view style="color: #999999;">{{ item.durationInMillis }}</view>
</view>
<view style="color: #999999;font-size: 12px;">{{ item.endTime }}</view>
</van-cell>
</van-col>
</van-row>
</view> -->
<view class="bottomBtn">
<view bindtap="showPopup">
<image src="/image/apply/icon_pres.png"></image>
<text>保存模板</text>
</view>
<view>
<image src="/image/apply/icon_add.png"></image>
<text>新增事项</text>
</view>
</view>
</view>

<view class="bottom">
<view class="btn1" bindtap="openBox">保存</view>
<view class="btn2" bindtap="goApproval">下一步</view>
<view class="bottom">
<view class="btn1" bindtap="openBox">保存</view>
<view class="btn2" bindtap="goApproval">下一步</view>
</view>
</view>
</view>

</block>
<!-- <view class="bottom">
<button type="warn" plain class="btnDis">驳回</button>
<button type="primary" class="btnAgree">同意</button>


+ 22
- 1
utils/util.js 查看文件

@@ -345,6 +345,26 @@ function compareVersion(v1, v2) {
}
return 0
}
/**
* 获取当前年-月-日 时:分:秒
*/
function js_date_time(unixtime) {
var date = new Date(unixtime);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
var d = date.getDate();
d = d < 10 ? ('0' + d) : d;
var h = date.getHours();
h = h < 10 ? ('0' + h) : h;
var minute = date.getMinutes();
var second = date.getSeconds();
minute = minute < 10 ? ('0' + minute) : minute;
second = second < 10 ? ('0' + second) : second;
// return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;//年月日时分秒
return y + '-' + m + '-' + d + ' ' + h + ':' + minute;

}
export {
getCurrentPageUrl,
getCurrentPageUrlWithArgs,
@@ -359,5 +379,6 @@ export {
getLocationFromWX,
getUserInfoFomWX,
convert_length,
isIPhoneX
isIPhoneX,
js_date_time
}

正在加载...
取消
保存