| @@ -7,5 +7,8 @@ module.exports = { | |||||
| }, | }, | ||||
| PROD: { | PROD: { | ||||
| URL_PREFIX: 'http://192.168.31.178:8080/api', | URL_PREFIX: 'http://192.168.31.178:8080/api', | ||||
| }, | |||||
| IMGURL: { | |||||
| URL_PREFIX: 'http://192.168.31.178:8080', | |||||
| } | } | ||||
| } | } | ||||
| @@ -88,13 +88,16 @@ swichPaymentApply:function(e){ | |||||
| UTIL.httpRequest(API.URL_GET_APPROVALITEMSLIST, {method:'GET',dataType:'1'}, { | UTIL.httpRequest(API.URL_GET_APPROVALITEMSLIST, {method:'GET',dataType:'1'}, { | ||||
| success: (res) => { | success: (res) => { | ||||
| if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
| that.setData({ | |||||
| approvalItemsOptions : res.rows | |||||
| }) | |||||
| } | } | ||||
| } | } | ||||
| }) | }) | ||||
| UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData,{ | UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData,{ | ||||
| success: (res) => { | success: (res) => { | ||||
| for (let i = 0; i < res.rows.length; i++) { | for (let i = 0; i < res.rows.length; i++) { | ||||
| if(res.rows[i].bankAccountNumber==null){continue;} | |||||
| res.rows[i].bankAccountNumber = res.rows[i].bankAccountNumber.replace(/(\d{4})(?=\d)/g, "$1 ") | res.rows[i].bankAccountNumber = res.rows[i].bankAccountNumber.replace(/(\d{4})(?=\d)/g, "$1 ") | ||||
| } | } | ||||
| console.log(res.rows) | console.log(res.rows) | ||||
| @@ -49,47 +49,19 @@ | |||||
| </view> | </view> | ||||
| <van-action-sheet show="{{show}}" title="支付模板" bind:close="closeBox"> | <van-action-sheet show="{{show}}" title="支付模板" bind:close="closeBox"> | ||||
| <van-swipe-cell right-width="{{ 65 }}"> | |||||
| <van-swipe-cell right-width="{{ 65 }}" wx:for="{{approvalItemsOptions}}" wx:key="index"> | |||||
| <van-cell-group> | <van-cell-group> | ||||
| <van-cell label="支付水电、网费、房租" bindtap="goTemplate" > | |||||
| <van-cell label="{{item.approvalItems}}" bindtap="goTemplate" > | |||||
| <view slot="title"> | <view slot="title"> | ||||
| <view class="van-cell-text">日常支付水电模板<van-tag plain type="danger" color="#FC9A55" style="margin-left:10px;">默认</van-tag></view> | |||||
| <view class="van-cell-text">{{item.templateName}}<van-tag plain type="danger" color="#FC9A55" style="margin-left:10px;" wx:if="{{index == 0}}">默认</van-tag></view> | |||||
| </view> | </view> | ||||
| <van-icon slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mrmb.png?sign=5e5df640777f6a7993c45e1a559dd998&t=1648619865" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
| </van-cell> | |||||
| </van-cell-group> | |||||
| <view slot="right" class="deleteBox"> | |||||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | |||||
| </view> | |||||
| </van-swipe-cell> | |||||
| <van-swipe-cell right-width="{{ 65 }}"> | |||||
| <van-cell-group> | |||||
| <van-cell title="日常支付水电模板" label="支付水电、网费、房租" > | |||||
| <van-icon slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
| </van-cell> | |||||
| </van-cell-group> | |||||
| <view slot="right" class="deleteBox"> | |||||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | |||||
| </view> | |||||
| </van-swipe-cell> | |||||
| <van-swipe-cell right-width="{{ 65 }}"> | |||||
| <van-cell-group> | |||||
| <van-cell title="日常支付水电模板" label="支付水电、网费、房租" > | |||||
| <van-icon slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
| </van-cell> | |||||
| </van-cell-group> | |||||
| <view slot="right" class="deleteBox"> | |||||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | |||||
| </view> | |||||
| </van-swipe-cell> | |||||
| <van-swipe-cell right-width="{{ 65 }}"> | |||||
| <van-cell-group> | |||||
| <van-cell title="日常支付水电模板" label="支付水电、网费、房租" > | |||||
| <van-icon slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
| <van-icon wx:if="{{index == 0}}" slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mrmb.png?sign=5e5df640777f6a7993c45e1a559dd998&t=1648619865" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
| <van-icon wx:else slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
| </van-cell> | </van-cell> | ||||
| </van-cell-group> | </van-cell-group> | ||||
| <view slot="right" class="deleteBox"> | <view slot="right" class="deleteBox"> | ||||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | ||||
| </view> | </view> | ||||
| </van-swipe-cell> | </van-swipe-cell> | ||||
| </van-action-sheet> | </van-action-sheet> | ||||
| @@ -1,6 +1,11 @@ | |||||
| // pages/apply/paymentTemplate/add/add.js | // pages/apply/paymentTemplate/add/add.js | ||||
| import * as UTIL from '../../../../utils/util.js'; | import * as UTIL from '../../../../utils/util.js'; | ||||
| import * as API from '../../../../utils/API.js'; | import * as API from '../../../../utils/API.js'; | ||||
| let EVN_CONFIG = require('../../../../env/env'); | |||||
| const DISTRIBUTE_ENVIROMENT = 'IMGURL'; | |||||
| let { | |||||
| URL_PREFIX, | |||||
| } = EVN_CONFIG[DISTRIBUTE_ENVIROMENT]; | |||||
| const app = getApp(); | const app = getApp(); | ||||
| Page({ | Page({ | ||||
| @@ -19,12 +24,14 @@ Page({ | |||||
| showProject:false, | showProject:false, | ||||
| showProjectFundType:false, | showProjectFundType:false, | ||||
| showAccount:false, | showAccount:false, | ||||
| showDialog:false, | |||||
| capitalExpenditureTypeOptions:[], | capitalExpenditureTypeOptions:[], | ||||
| transferTypeOptions:[], | transferTypeOptions:[], | ||||
| projectOptions:[], | projectOptions:[], | ||||
| projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
| contractionOptions:[], | contractionOptions:[], | ||||
| accountOptions:[], | accountOptions:[], | ||||
| moneyorderOptions:[], | |||||
| form:{ | form:{ | ||||
| approvalItemTemplate:{ | approvalItemTemplate:{ | ||||
| approvalItems:'',//审批事项 | approvalItems:'',//审批事项 | ||||
| @@ -35,47 +42,46 @@ Page({ | |||||
| totalAmount:'',//合计金额 | totalAmount:'',//合计金额 | ||||
| templateName:'',//模板名称 选择保存模板的时候添加 | templateName:'',//模板名称 选择保存模板的时候添加 | ||||
| dataType:'',//数据类型 | dataType:'',//数据类型 | ||||
| transfers:[{//事项信息集合以下是List对象信息 | |||||
| capitalExpenditureType:'',//资金支出类别 | |||||
| capitalExpenditureTypeText:'',//资金支出类别(展示用) | |||||
| succeedAmount:'',//成功支付金额 | |||||
| payer:'',//付款方 | |||||
| payerAccount:'',//付款方账户 | |||||
| bankType:'',//所属银行 | |||||
| bankTypeText:'',//所属银行(展示用) | |||||
| isPeers:'',//是否同行 | |||||
| operatorCode:'',//操作员代码 | |||||
| enterpriseCode:'',//企业编码 | |||||
| expenditureAmount:'',//支出总金额 | |||||
| applyDate:'',//申请时间 | |||||
| transferStatus:'',//转账状态 | |||||
| auditStatus:'',//审批状态 | |||||
| paymentState:'',//支付状态 | |||||
| approvalMode:'',//审批模式 | |||||
| paymentTime:'',//支付时间 | |||||
| bankPriority:'',//银行处理优先级 | |||||
| clientPriority:'',//客户处理优先级 | |||||
| transferType:'',//付款方式 | |||||
| transferTypeText:'',//付款方式(展示用) | |||||
| requiredTransferTime:'',//要求转账时间 | |||||
| remark:'',//付款事由 | |||||
| startTime:'',//开票日期 | |||||
| endTime:'',//到期日期 | |||||
| orderType:'',//汇票类型 | |||||
| bankAccountType:'',//账户类别 | |||||
| villageAccountType:'',//账户分类 | |||||
| }], | |||||
| bankAccountType:'1',//账户类别1 公户2私户 | |||||
| }, | |||||
| transfers:[{//事项信息集合以下是List对象信息 | |||||
| num:"一", | |||||
| capitalExpenditureType:'',//资金支出类别 | |||||
| capitalExpenditureTypeText:'',//资金支出类别(展示用) | |||||
| succeedAmount:'',//成功支付金额 | |||||
| payer:'',//付款方 | |||||
| payerAccount:'',//付款方账户 | |||||
| bankType:'',//所属银行 | |||||
| bankTypeText:'',//所属银行(展示用) | |||||
| isPeers:'',//是否同行 | |||||
| operatorCode:'',//操作员代码 | |||||
| enterpriseCode:'',//企业编码 | |||||
| expenditureAmount:'',//支出总金额 | |||||
| applyDate:'',//申请时间 | |||||
| transferStatus:'',//转账状态 | |||||
| auditStatus:'',//审批状态 | |||||
| paymentState:'',//支付状态 | |||||
| approvalMode:'',//审批模式 | |||||
| paymentTime:'',//支付时间 | |||||
| bankPriority:'',//银行处理优先级 | |||||
| clientPriority:'',//客户处理优先级 | |||||
| transferType:'',//付款方式 | |||||
| transferTypeText:'',//付款方式(展示用) | |||||
| requiredTransferTime:'',//要求转账时间 | |||||
| remark:'',//付款事由 | |||||
| startTime:'',//开票日期 | |||||
| endTime:'',//到期日期 | |||||
| orderType:'',//汇票类型 | |||||
| bankAccountType:'',//账户类别1 公户2私户 | |||||
| villageAccountType:'',//账户分类 | |||||
| payeeList:[{//收款方账户集合 | payeeList:[{//收款方账户集合 | ||||
| payeeId:'',//收款方id | |||||
| payeeId:'0',//收款方id | |||||
| payee:'',//收款方 | payee:'',//收款方 | ||||
| bankDeposit:'',//开户行 | bankDeposit:'',//开户行 | ||||
| incomeAmount:'',//收入金额 | incomeAmount:'',//收入金额 | ||||
| bankType:'',//所属银行0其他银行1中国银行2农商行(山东省)3农业银行4建设银行5工商银行 | bankType:'',//所属银行0其他银行1中国银行2农商行(山东省)3农业银行4建设银行5工商银行 | ||||
| payeeAccount:'',//收款账户 | payeeAccount:'',//收款账户 | ||||
| }], | }], | ||||
| } | |||||
| }], | |||||
| }, | }, | ||||
| projectForm:{ | projectForm:{ | ||||
| projectId:'', | projectId:'', | ||||
| @@ -93,14 +99,105 @@ Page({ | |||||
| code:'', | code:'', | ||||
| totalAmount:'', | totalAmount:'', | ||||
| }, | }, | ||||
| accountForm:{} | |||||
| accountForm:{}, | |||||
| fileForm:[] | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad(options) { | onLoad(options) { | ||||
| var that = this; | |||||
| setTimeout(function(){ | |||||
| UTIL.httpRequest(API.URL_GET_USERAPPRO, {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if (res.code == API.SUCCESS_CODE) { | |||||
| console.log(that.data.capitalExpenditureTypeOptions); | |||||
| 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); | |||||
| res.data.transfers[index].bankTypeText = UTIL.getTransform(item.bankType,that.data.bankTypeOptions); | |||||
| res.data.transfers[index].payeeList.forEach( (response,i) => { | |||||
| res.data.transfers[index].payeeList[i].bankTypeText = UTIL.getTransform(response.bankType,that.data.bankTypeOptions); | |||||
| }) | |||||
| }) | |||||
| that.setData({ | |||||
| form:res.data | |||||
| }) | |||||
| //收据附件 | |||||
| UTIL.httpRequest( | |||||
| API.URL_GET_FINDLIST, | |||||
| { | |||||
| method:'GET', | |||||
| tableName:'t_yinnong_approval_item_template', | |||||
| tableId:res.data.approvalItemTemplate.id, | |||||
| fileType:1 | |||||
| }, | |||||
| { | |||||
| success: (res) => { | |||||
| let list = []; | |||||
| res.data.forEach(item=>{ | |||||
| list.push({ | |||||
| tempFilePath:URL_PREFIX+item.fileUrl | |||||
| }) | |||||
| }) | |||||
| that.setData({ | |||||
| SJimage:list | |||||
| }); | |||||
| } | |||||
| }) | |||||
| //发票 | |||||
| UTIL.httpRequest( | |||||
| API.URL_GET_FINDLIST, | |||||
| { | |||||
| method:'GET', | |||||
| tableName:'t_yinnong_approval_item_template', | |||||
| tableId:res.data.approvalItemTemplate.id, | |||||
| fileType:2 | |||||
| }, | |||||
| { | |||||
| success: (res) => { | |||||
| let list = []; | |||||
| res.data.forEach(item=>{ | |||||
| list.push({ | |||||
| tempFilePath:URL_PREFIX+item.fileUrl | |||||
| }) | |||||
| }) | |||||
| that.setData({ | |||||
| FPimage:list | |||||
| }); | |||||
| } | |||||
| }) | |||||
| //其他 | |||||
| UTIL.httpRequest( | |||||
| API.URL_GET_FINDLIST, | |||||
| { | |||||
| method:'GET', | |||||
| tableName:'t_yinnong_approval_item_template', | |||||
| tableId:res.data.approvalItemTemplate.id, | |||||
| fileType:3 | |||||
| }, | |||||
| { | |||||
| success: (res) => { | |||||
| let list = []; | |||||
| res.data.forEach(item=>{ | |||||
| list.push({ | |||||
| tempFilePath:URL_PREFIX+item.fileUrl | |||||
| }) | |||||
| }) | |||||
| that.setData({ | |||||
| QTimage:list | |||||
| }); | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| },1000) | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -115,6 +212,7 @@ Page({ | |||||
| */ | */ | ||||
| onShow() { | onShow() { | ||||
| var that = this; | var that = this; | ||||
| 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) { | ||||
| @@ -128,6 +226,14 @@ Page({ | |||||
| } | } | ||||
| } | } | ||||
| }) | }) | ||||
| //所属银行 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| this.setData({ | |||||
| bankTypeOptions:res.data | |||||
| }); | |||||
| } | |||||
| }) | |||||
| // 资金支出类别字典查询 | // 资金支出类别字典查询 | ||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'capital_expenditure_type', {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'capital_expenditure_type', {method:'GET'}, { | ||||
| success: (res) => { | success: (res) => { | ||||
| @@ -168,22 +274,7 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| // 获取合同信息列表 | |||||
| let prames = { | |||||
| pageNum:1, | |||||
| pageSize:999, | |||||
| isPeers:'', | |||||
| orderByColumn:'id', | |||||
| isAsc:'asc', | |||||
| status:'0' | |||||
| } | |||||
| UTIL.httpRequest(API.URL_GET_SELECTLIST , {method:'GET'}, { | |||||
| success: (res) => { | |||||
| that.setData({ | |||||
| contractionOptions:res.rows, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| openBox(even){ | openBox(even){ | ||||
| this.setData({ | this.setData({ | ||||
| @@ -220,6 +311,7 @@ Page({ | |||||
| this.setData({ | this.setData({ | ||||
| [event.currentTarget.dataset.name]: false, | [event.currentTarget.dataset.name]: false, | ||||
| [event.currentTarget.dataset.value+'.payer']: event.detail.value.accountName, | [event.currentTarget.dataset.value+'.payer']: event.detail.value.accountName, | ||||
| [event.currentTarget.dataset.value+'.cashierId']: event.detail.value.id, | |||||
| [event.currentTarget.dataset.value+'.payerAccount']: event.detail.value.bankAccountNumber, | [event.currentTarget.dataset.value+'.payerAccount']: event.detail.value.bankAccountNumber, | ||||
| [event.currentTarget.dataset.value+'.bankTypeText']: array[0].dictLabel, | [event.currentTarget.dataset.value+'.bankTypeText']: array[0].dictLabel, | ||||
| [event.currentTarget.dataset.value+'.bankType']: event.detail.value.bankType, | [event.currentTarget.dataset.value+'.bankType']: event.detail.value.bankType, | ||||
| @@ -237,6 +329,8 @@ Page({ | |||||
| [event.currentTarget.dataset.value+'.payerAccount']: '', | [event.currentTarget.dataset.value+'.payerAccount']: '', | ||||
| [event.currentTarget.dataset.value+'.bankTypeText']: '', | [event.currentTarget.dataset.value+'.bankTypeText']: '', | ||||
| [event.currentTarget.dataset.value+'.bankType']: '', | [event.currentTarget.dataset.value+'.bankType']: '', | ||||
| [event.currentTarget.dataset.value+'.bankAccountType']: '', | |||||
| [event.currentTarget.dataset.value+'.isPeers']: '', | |||||
| balance:0, | balance:0, | ||||
| }); | }); | ||||
| if(event.detail.value.dictValue == 1){//村账户查询参数 | if(event.detail.value.dictValue == 1){//村账户查询参数 | ||||
| @@ -308,6 +402,20 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| } | } | ||||
| if(event.detail.value.dictValue == 12){//汇票支出查询参数 | |||||
| perames = { | |||||
| pageNum:1, | |||||
| pageSize:999, | |||||
| } | |||||
| // 付款方列表 | |||||
| UTIL.httpRequest(API.URL_GET_MONEYORDERLIST , perames, { | |||||
| success: (res) => { | |||||
| that.setData({ | |||||
| moneyorderOptions:res.rows, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| this.setData({ | this.setData({ | ||||
| [event.currentTarget.dataset.name]: false, | [event.currentTarget.dataset.name]: false, | ||||
| [event.currentTarget.dataset.value+'.transferType']: event.detail.value.dictValue, | [event.currentTarget.dataset.value+'.transferType']: event.detail.value.dictValue, | ||||
| @@ -334,6 +442,202 @@ Page({ | |||||
| ['contractionForm.id']: event.detail.value.id, | ['contractionForm.id']: event.detail.value.id, | ||||
| }); | }); | ||||
| }, | }, | ||||
| onConfirmMoneyorder(event) { | |||||
| console.log(event); | |||||
| this.setData({ | |||||
| [event.currentTarget.dataset.name]: false, | |||||
| [event.currentTarget.dataset.value]: event.detail.value.name, | |||||
| ['contractionForm.code']: event.detail.value.code, | |||||
| ['contractionForm.totalAmount']: event.detail.value.totalAmount, | |||||
| ['contractionForm.id']: event.detail.value.id, | |||||
| }); | |||||
| }, | |||||
| goPayeeList(event){ | |||||
| console.log(event); | |||||
| wx.navigateTo({ | |||||
| url: '/pages/payee/index?isPeers='+event.currentTarget.dataset.ispeers+'&bankType='+event.currentTarget.dataset.banktype+'&accountType='+event.currentTarget.dataset.accounttype+'&transferType='+event.currentTarget.dataset.transfertype, | |||||
| }) | |||||
| }, | |||||
| onChange(event){ | |||||
| console.log(event); | |||||
| this.setData({ | |||||
| [event.currentTarget.dataset.value]: event.detail, | |||||
| }) | |||||
| }, | |||||
| onChangeMoney(event){ | |||||
| console.log(event); | |||||
| this.setData({ | |||||
| [event.currentTarget.dataset.value]: event.detail, | |||||
| ["form.approvalItemTemplate.totalAmount"]:event.detail, | |||||
| ["form.transfers[0].expenditureAmount"]:event.detail, | |||||
| }) | |||||
| }, | |||||
| back:function(){ | |||||
| wx.navigateBack({ | |||||
| delta: 1 | |||||
| }) | |||||
| }, | |||||
| goSubmitMB(){ | |||||
| this.setData({ | |||||
| showDialog:true | |||||
| }) | |||||
| }, | |||||
| onClose(){ | |||||
| this.setData({ | |||||
| showDialog:false | |||||
| }) | |||||
| }, | |||||
| bindNameInput(even){ | |||||
| this.setData({ | |||||
| ["form.approvalItemTemplate.templateName"]:even.detail.value | |||||
| }) | |||||
| }, | |||||
| goSubmit(e){ | |||||
| var that = this; | |||||
| if(e.currentTarget.dataset.type == 1){ | |||||
| if(that.data.form.approvalItemTemplate.templateName == ''){ | |||||
| UTIL.showToastNoneIcon('请输入模板名称!'); | |||||
| return; | |||||
| } | |||||
| } | |||||
| that.setData({ | |||||
| ['form.method']:'POST', | |||||
| ["form.approvalItemTemplate.dataType"]:e.currentTarget.dataset.type | |||||
| }) | |||||
| UTIL.httpRequest(API.URL_GET_SAVE, that.data.form, { | |||||
| success: (res) => { | |||||
| if (res.code == API.SUCCESS_CODE) { | |||||
| for (let i = 0; i < that.data.fileForm.length; i++) { | |||||
| that.data.fileForm[i].tableId = res.data.id | |||||
| const element = that.data.fileForm[i]; | |||||
| wx.uploadFile({ | |||||
| url: API.URL_GET_UPLOAD, | |||||
| filePath: element.file, | |||||
| name: 'file', | |||||
| header: { | |||||
| "Content-Type": "multipart/form-data",//记得设置 | |||||
| "chartset":"utf-8", | |||||
| 'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
| }, | |||||
| formData:element, | |||||
| success (res){ | |||||
| console.log(res); | |||||
| }, | |||||
| fail(res){ | |||||
| console.log(res) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| bindKeyInput(even){ | |||||
| this.setData({ | |||||
| ["form.approvalItemTemplate.approvalItems"]: even.detail.value, | |||||
| }) | |||||
| }, | |||||
| SJtakephoto(){ | |||||
| var that = this; | |||||
| let fileForm = that.data.fileForm; | |||||
| wx.chooseMedia({ | |||||
| count: 9, | |||||
| mediaType: ['image','video'], | |||||
| sourceType: ['album', 'camera'], | |||||
| maxDuration: 30, | |||||
| camera: 'back', | |||||
| success(res) { | |||||
| console.log(res); | |||||
| res.tempFiles.forEach(item => { | |||||
| fileForm.push({ | |||||
| file: item.tempFilePath, | |||||
| fileType:'1', | |||||
| bizPath:'transfer', | |||||
| tableName:'t_yinnong_approval_item_template', | |||||
| tableId:'' | |||||
| }) | |||||
| }) | |||||
| that.setData({ | |||||
| SJimage:res.tempFiles, | |||||
| fileForm:fileForm | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| FPtakephoto(){ | |||||
| var that = this; | |||||
| let fileForm = that.data.fileForm; | |||||
| wx.chooseMedia({ | |||||
| count: 9, | |||||
| mediaType: ['image','video'], | |||||
| sourceType: ['album', 'camera'], | |||||
| maxDuration: 30, | |||||
| camera: 'back', | |||||
| success(res) { | |||||
| res.tempFiles.forEach(item => { | |||||
| fileForm.push({ | |||||
| file: item.tempFilePath, | |||||
| fileType:'2', | |||||
| bizPath:'transfer', | |||||
| tableName:'t_yinnong_approval_item_template', | |||||
| tableId:'' | |||||
| }) | |||||
| }) | |||||
| that.setData({ | |||||
| FPimage:res.tempFiles, | |||||
| fileForm:fileForm | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| QTtakephoto(){ | |||||
| var that = this; | |||||
| let fileForm = that.data.fileForm; | |||||
| wx.chooseMedia({ | |||||
| count: 9, | |||||
| mediaType: ['image','video'], | |||||
| sourceType: ['album', 'camera'], | |||||
| maxDuration: 30, | |||||
| camera: 'back', | |||||
| success(res) { | |||||
| res.tempFiles.forEach(item => { | |||||
| fileForm.push({ | |||||
| file: item.tempFilePath, | |||||
| fileType:'3', | |||||
| bizPath:'transfer', | |||||
| tableName:'t_yinnong_approval_item_template', | |||||
| tableId:'' | |||||
| }) | |||||
| }) | |||||
| that.setData({ | |||||
| QTimage:res.tempFiles, | |||||
| fileForm:fileForm | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| addList(){ | |||||
| let transList = this.data.form.transfers; | |||||
| transList.push({ | |||||
| num:UTIL.convertToChinaNum(transList.length+1) | |||||
| }); | |||||
| this.setData({ | |||||
| ["form.transfers"] : transList | |||||
| }) | |||||
| }, | |||||
| openPreview(e){ | |||||
| let array = []; | |||||
| console.log(e); | |||||
| e.currentTarget.dataset.option.forEach(item=>{ | |||||
| array.push(item.tempFilePath) | |||||
| }) | |||||
| console.log(array); | |||||
| wx.previewImage({ | |||||
| urls: array, | |||||
| showmenu:true, | |||||
| current:array[e.currentTarget.dataset.index] | |||||
| }) | |||||
| }, | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
| */ | */ | ||||
| @@ -14,6 +14,7 @@ | |||||
| "van-field": "@vant/weapp/field/index", | "van-field": "@vant/weapp/field/index", | ||||
| "van-popup": "@vant/weapp/popup/index", | "van-popup": "@vant/weapp/popup/index", | ||||
| "van-picker": "@vant/weapp/picker/index", | "van-picker": "@vant/weapp/picker/index", | ||||
| "van-calendar": "@vant/weapp/calendar/index" | |||||
| "van-calendar": "@vant/weapp/calendar/index", | |||||
| "van-dialog": "@vant/weapp/dialog/index" | |||||
| } | } | ||||
| } | } | ||||
| @@ -12,17 +12,17 @@ | |||||
| <text>提 交 人:{{form.approvalItemTemplate.submitter}}</text> | <text>提 交 人:{{form.approvalItemTemplate.submitter}}</text> | ||||
| <text>联系电话:{{form.approvalItemTemplate.telephone}}</text> | <text>联系电话:{{form.approvalItemTemplate.telephone}}</text> | ||||
| </view> | </view> | ||||
| <block wx:for="{{form.approvalItemTemplate.transfers}}" wx:key="index"> | |||||
| <view class="main-title">事项一</view> | |||||
| <block wx:for="{{form.transfers}}" wx:key="index"> | |||||
| <view 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"> | ||||
| <!-- <van-field label="申请流水号" value="{{ form.approvalItemTemplate.telephone }}" placeholder="请输入申请流水号" border="{{ false }}" bind:change="onChange" input-align="right"/> --> | <!-- <van-field label="申请流水号" value="{{ form.approvalItemTemplate.telephone }}" placeholder="请输入申请流水号" border="{{ false }}" bind:change="onChange" input-align="right"/> --> | ||||
| <van-field label="申请时间" readonly is-link value="{{ form.approvalItemTemplate.transfers[index].applyDate }}" placeholder="请选择申请时间" border="{{ false }}" bind:change="onChange" input-align="right" bindtap="openBox" data-name="showApplyDate" /> | |||||
| <van-calendar show="{{ showApplyDate }}" bind:close="closeBox" data-name="showApplyDate" bind:confirm="onConfirm" data-value="form.approvalItemTemplate.transfers[{{index}}].applyDate" show-confirm="{{ false }}" /> | |||||
| <van-field label="申请时间" readonly is-link value="{{ form.transfers[index].applyDate }}" placeholder="请选择申请时间" border="{{ false }}" bind:change="onChange" input-align="right" bindtap="openBox" data-name="showApplyDate" /> | |||||
| <van-calendar show="{{ showApplyDate }}" bind:close="closeBox" data-name="showApplyDate" bind:confirm="onConfirm" data-value="form.transfers[{{index}}].applyDate" show-confirm="{{ false }}" /> | |||||
| <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-field readonly label="合计支出" value="{{ form.transfers[index].expenditureAmount }}" placeholder="(自动计算)" border="{{ false }}" data-formname="form.transfers[{{index}}].expenditureAmount" input-align="right"/> | |||||
| <van-field label="支出原因" value="{{ form.transfers[index].remark }}" placeholder="请输入支出原因" border="{{ false }}" bind:change="onChange" input-align="right" data-formname="form.transfers[{{index}}].remark" data-value="form.transfers[{{index}}].remark"/> | |||||
| <van-popup show="{{showCapitalExpenditureType}}" round position="bottom" bind:close="closeBox" data-name="showCapitalExpenditureType"> | <van-popup show="{{showCapitalExpenditureType}}" round position="bottom" bind:close="closeBox" data-name="showCapitalExpenditureType"> | ||||
| <van-picker | <van-picker | ||||
| columns="{{capitalExpenditureTypeOptions}}" | columns="{{capitalExpenditureTypeOptions}}" | ||||
| @@ -31,12 +31,12 @@ | |||||
| bind:cancel="closeBox" | bind:cancel="closeBox" | ||||
| bind:confirm="onConfirmPick" | bind:confirm="onConfirmPick" | ||||
| data-name="showCapitalExpenditureType" | data-name="showCapitalExpenditureType" | ||||
| data-value="form.approvalItemTemplate.transfers[{{index}}].capitalExpenditureType" | |||||
| data-value="form.transfers[{{index}}].capitalExpenditureType" | |||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field label="资金支出类别" readonly value="{{ form.approvalItemTemplate.transfers[index].capitalExpenditureTypeText }}" placeholder="请选择资金支出类别" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showCapitalExpenditureType"/> | |||||
| <van-field label="资金支出类别" readonly value="{{ form.transfers[index].capitalExpenditureTypeText }}" placeholder="请选择资金支出类别" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showCapitalExpenditureType"/> | |||||
| </view> | </view> | ||||
| <block wx:if="{{form.approvalItemTemplate.transfers[index].capitalExpenditureType == 2}}"> | |||||
| <block wx:if="{{form.transfers[index].capitalExpenditureType == 2}}"> | |||||
| <text class="title">关联项目</text> | <text class="title">关联项目</text> | ||||
| <view class="main-box table-box"> | <view class="main-box table-box"> | ||||
| <van-popup show="{{showProject}}" round position="bottom" bind:close="closeBox" data-name="showProject"> | <van-popup show="{{showProject}}" round position="bottom" bind:close="closeBox" data-name="showProject"> | ||||
| @@ -71,7 +71,7 @@ | |||||
| </view> | </view> | ||||
| </block> | </block> | ||||
| <block wx:if="{{form.approvalItemTemplate.transfers[index].capitalExpenditureType == 4}}"> | |||||
| <block wx:if="{{form.transfers[index].capitalExpenditureType == 4}}"> | |||||
| <text class="title">关联合同</text> | <text class="title">关联合同</text> | ||||
| <view class="main-box table-box"> | <view class="main-box table-box"> | ||||
| <van-popup show="{{showContraction}}" round position="bottom" bind:close="closeBox" data-name="showContraction"> | <van-popup show="{{showContraction}}" round position="bottom" bind:close="closeBox" data-name="showContraction"> | ||||
| @@ -103,10 +103,10 @@ | |||||
| bind:cancel="closeBox" | bind:cancel="closeBox" | ||||
| bind:confirm="onConfirmaTransfer" | bind:confirm="onConfirmaTransfer" | ||||
| data-name="showTransferType" | data-name="showTransferType" | ||||
| data-value="form.approvalItemTemplate.transfers[{{index}}]" | |||||
| data-value="form.transfers[{{index}}]" | |||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field label="付款方式" readonly value="{{ form.approvalItemTemplate.transfers[index].transferTypeText }}" placeholder="请输入付款方式" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showTransferType"/> | |||||
| <van-field label="付款方式" readonly value="{{ form.transfers[index].transferTypeText }}" placeholder="请输入付款方式" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showTransferType"/> | |||||
| <van-popup show="{{showAccount}}" round position="bottom" bind:close="closeBox" data-name="showAccount"> | <van-popup show="{{showAccount}}" round position="bottom" bind:close="closeBox" data-name="showAccount"> | ||||
| <van-picker | <van-picker | ||||
| @@ -116,31 +116,52 @@ | |||||
| bind:cancel="closeBox" | bind:cancel="closeBox" | ||||
| bind:confirm="onConfirmAccount" | bind:confirm="onConfirmAccount" | ||||
| data-name="showAccount" | data-name="showAccount" | ||||
| data-value="form.approvalItemTemplate.transfers[{{index}}]" | |||||
| data-value="form.transfers[{{index}}]" | |||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field readonly value="{{ form.approvalItemTemplate.transfers[index].payer }}" placeholder="请选择付款方名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showAccount"> | |||||
| <van-field wx:if="{{form.transfers[index].transferType != 12}}" readonly value="{{ form.transfers[index].payer }}" placeholder="请选择付款方名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showAccount"> | |||||
| <view slot="label"> | <view slot="label"> | ||||
| 付款方<van-tag plain type="danger" color="red" round style="margin-left:10px;">必填</van-tag> | 付款方<van-tag plain type="danger" color="red" round style="margin-left:10px;">必填</van-tag> | ||||
| </view> | </view> | ||||
| </van-field> | </van-field> | ||||
| <van-field readonly wx:if="{{form.approvalItemTemplate.transfers[index].transferType == 11}}" label="可用余额(元)" value="{{ balance }}" placeholder="可用余额" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <van-field readonly wx:if="{{form.transfers[index].transferType == 11}}" label="可用余额(元)" value="{{ balance }}" placeholder="可用余额" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <block wx:elif="{{form.transfers[index].transferType == 12}}"> | |||||
| <van-popup show="{{showAccount}}" round position="bottom" bind:close="closeBox" data-name="showMoneyorder"> | |||||
| <van-picker | |||||
| columns="{{moneyorderOptions}}" | |||||
| show-toolbar | |||||
| value-key="accountName" | |||||
| bind:cancel="closeBox" | |||||
| bind:confirm="onConfirmMoneyorder" | |||||
| data-name="showMoneyorder" | |||||
| data-value="form.transfers[{{index}}]" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field readonly label="出票方" value="{{ form.transfers[index].payerAccount }}" placeholder="请选择出票方" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showMoneyorder"/> | |||||
| <van-field readonly label="汇票号码" value="{{ form.transfers[index].bankTypeText }}" placeholder="汇票号码" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <van-field readonly label="出票金额(元)" value="{{ form.transfers[index].bankTypeText }}" placeholder="出票金额(元)" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <van-field readonly label="汇票类型" value="{{ form.transfers[index].bankTypeText }}" placeholder="汇票类型" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <van-field readonly label="开票日" value="{{ form.transfers[index].bankTypeText }}" placeholder="开票日" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <van-field readonly label="到期日" value="{{ form.transfers[index].bankTypeText }}" placeholder="到期日" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| </block> | |||||
| <block wx:else> | <block wx:else> | ||||
| <van-field readonly label="付款方账号" value="{{ form.approvalItemTemplate.transfers[index].payerAccount }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <van-field readonly label="所属银行" value="{{ form.approvalItemTemplate.transfers[index].bankTypeText }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <van-field readonly label="付款方账号" value="{{ form.transfers[index].payerAccount }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <van-field readonly label="所属银行" value="{{ form.transfers[index].bankTypeText }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| </block> | </block> | ||||
| </view> | </view> | ||||
| <text class="title">收款方信息</text> | <text class="title">收款方信息</text> | ||||
| <view class="center-box"> | <view class="center-box"> | ||||
| <view class="main-box table-box"> | |||||
| <view class="main-box table-box" wx:if="{{form.transfers[index].bankType == 1 && form.transfers[index].transferType != 10 && form.transfers[index].transferType != 11 && form.transfers[index].transferType != 12}}"> | |||||
| <van-cell title="收款账户类型" center border="{{false}}"> | <van-cell title="收款账户类型" center border="{{false}}"> | ||||
| <view> | |||||
| <view style="float: right;"> | |||||
| <van-radio-group | <van-radio-group | ||||
| value="{{ form.approvalItemTemplate.bankAccountType }}" | |||||
| value="{{ form.transfers[index].bankAccountType }}" | |||||
| bind:change="onChange" | bind:change="onChange" | ||||
| direction="horizontal" | direction="horizontal" | ||||
| data-value="form.transfers[{{index}}].bankAccountType" | |||||
| > | > | ||||
| <van-radio name="1" checked-color="#2C8E68">公户</van-radio> | <van-radio name="1" checked-color="#2C8E68">公户</van-radio> | ||||
| <van-radio name="2" checked-color="#2C8E68">私户</van-radio> | <van-radio name="2" checked-color="#2C8E68">私户</van-radio> | ||||
| @@ -148,17 +169,33 @@ | |||||
| </view> | </view> | ||||
| </van-cell> | </van-cell> | ||||
| </view> | </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 class="main-box table-box" wx:if="{{(form.transfers[index].bankType == 2 || form.transfers[index].bankType == 3 || form.transfers[index].bankType == 4) && (form.transfers[index].transferType != 10 && form.transfers[index].transferType != 11 && form.transfers[index].transferType != 12)}}"> | |||||
| <van-cell title="是否同行" center border="{{false}}"> | |||||
| <view style="float: right;"> | |||||
| <van-radio-group | |||||
| value="{{ form.transfers[index].isPeers }}" | |||||
| bind:change="onChange" | |||||
| direction="horizontal" | |||||
| data-value="form.transfers[{{index}}].isPeers" | |||||
| > | |||||
| <van-radio name="Y" checked-color="#2C8E68">是</van-radio> | |||||
| <van-radio name="N" checked-color="#2C8E68">否</van-radio> | |||||
| </van-radio-group> | |||||
| </view> | |||||
| </van-cell> | |||||
| </view> | |||||
| <view class="main-box table-box" wx:for="{{form.transfers[index].payeeList}}" wx:for-index="childrenIndex" wx:key="payeeId"> | |||||
| <van-field 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-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> | ||||
| </view> | </view> | ||||
| </van-field> | </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 readonly label="收款账户" value="{{ form.transfers[index].payeeList[childrenIndex].payeeAccount }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
| <van-field 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 label="收入金额" value="{{ form.transfers[index].payeeList[childrenIndex].incomeAmount }}" placeholder="请输入收入金额" border="{{ false }}" bind:change="onChangeMoney" input-align="right" data-formname="form.transfers[{{index}}].payeeList[{{childrenIndex}}].incomeAmount"/> | |||||
| <van-field label="所属银行" value="{{ form.approvalItemTemplate.transfers[index].bankType }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | |||||
| <van-field readonly label="所属银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankTypeText }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -180,21 +217,24 @@ | |||||
| 收 | 收 | ||||
| 据 | 据 | ||||
| </text> | </text> | ||||
| <image src="/image/apply/fj_upload.png" mode="widthFix"></image> | |||||
| <image wx:for="{{SJimage}}" src="{{item.tempFilePath}}" wx:key="index" data-option="{{SJimage}}" data-index="{{index}}" bindtap="openPreview"></image> | |||||
| <image src="/image/apply/fj_upload.png" bindtap="SJtakephoto"></image> | |||||
| </view> | </view> | ||||
| <view class="fj-li"> | <view class="fj-li"> | ||||
| <text> | <text> | ||||
| 发 | 发 | ||||
| 票 | 票 | ||||
| </text> | </text> | ||||
| <image src="/image/apply/fj_upload.png" mode="widthFix"></image> | |||||
| <image wx:for="{{FPimage}}" src="{{item.tempFilePath}}" wx:key="index"></image> | |||||
| <image src="/image/apply/fj_upload.png" bindtap="FPtakephoto"></image> | |||||
| </view> | </view> | ||||
| <view class="fj-li"> | <view class="fj-li"> | ||||
| <text> | <text> | ||||
| 其 | 其 | ||||
| 他 | 他 | ||||
| </text> | </text> | ||||
| <image src="/image/apply/fj_upload.png" mode="widthFix"></image> | |||||
| <image wx:for="{{QTimage}}" src="{{item.tempFilePath}}" wx:key="index"></image> | |||||
| <image src="/image/apply/fj_upload.png" bindtap="QTtakephoto"></image> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -235,24 +275,38 @@ | |||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| </view> --> | </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 class="bottom"> | |||||
| <view class="btn1" bindtap="openBox">保存</view> | |||||
| <view class="btn2" bindtap="goApproval">下一步</view> | |||||
| </view> | |||||
| </view> | </view> | ||||
| </block> | </block> | ||||
| <view class="bottomBtn"> | |||||
| <view bindtap="goSubmitMB"> | |||||
| <image src="/image/apply/icon_pres.png"></image> | |||||
| <text>保存模板</text> | |||||
| </view> | |||||
| <view bindtap="addList"> | |||||
| <image src="/image/apply/icon_add.png"></image> | |||||
| <text>新增事项</text> | |||||
| </view> | |||||
| </view> | |||||
| <view class="bottom"> | |||||
| <view class="btn1" data-type="2" bindtap="goSubmit">保存</view> | |||||
| <view class="btn2" data-type="0" bindtap="goSubmit">下一步</view> | |||||
| </view> | |||||
| <!-- <view class="bottom"> | <!-- <view class="bottom"> | ||||
| <button type="warn" plain class="btnDis">驳回</button> | <button type="warn" plain class="btnDis">驳回</button> | ||||
| <button type="primary" class="btnAgree">同意</button> | <button type="primary" class="btnAgree">同意</button> | ||||
| </view> --> | </view> --> | ||||
| <van-dialog | |||||
| use-slot | |||||
| title="支付模板" | |||||
| show="{{ showDialog }}" | |||||
| bind:close="onClose" | |||||
| theme='round-button' | |||||
| confirmButtonText="保存" | |||||
| data-type="1" | |||||
| bind:confirm="goSubmit" | |||||
| closeOnClickOverlay="{{ true }}" | |||||
| > | |||||
| <input class="input_tit" placeholder="请输入模板名称" style="width: 90%;margin: 0 auto;margin-top: 15px;margin-bottom: 10px;text-align: center;" value="{{form.approvalItemTemplate.templateName}}" bindinput="bindNameInput"/> | |||||
| </van-dialog> | |||||
| @@ -33,7 +33,7 @@ text{display: block;} | |||||
| z-index: -1; | z-index: -1; | ||||
| } | } | ||||
| .center{ | .center{ | ||||
| padding-bottom: 50px; | |||||
| padding-bottom: 28px; | |||||
| } | } | ||||
| .main-title{ | .main-title{ | ||||
| background-image: linear-gradient(to right, #2C8E68 , #B3DB62); | background-image: linear-gradient(to right, #2C8E68 , #B3DB62); | ||||
| @@ -121,6 +121,7 @@ text{display: block;} | |||||
| } | } | ||||
| .fj-li image{ | .fj-li image{ | ||||
| width: 22%; | width: 22%; | ||||
| height: 18.5vw; | |||||
| margin-left: 5%; | margin-left: 5%; | ||||
| } | } | ||||
| .fj-li image:nth-child(4n+1){ | .fj-li image:nth-child(4n+1){ | ||||
| @@ -133,7 +134,6 @@ text{display: block;} | |||||
| display: flex; | display: flex; | ||||
| width: 94%; | width: 94%; | ||||
| margin: 0 auto; | margin: 0 auto; | ||||
| margin-top: 25px; | |||||
| justify-content:space-between; | justify-content:space-between; | ||||
| } | } | ||||
| .bottomBtn view{ | .bottomBtn view{ | ||||
| @@ -306,7 +306,7 @@ text{display: block;} | |||||
| margin: 0 auto; | margin: 0 auto; | ||||
| text-align: center; | text-align: center; | ||||
| margin-top: 30px; | margin-top: 30px; | ||||
| margin-bottom: 30px; | |||||
| margin-bottom: 80px; | |||||
| } | } | ||||
| .bottom button { | .bottom button { | ||||
| @@ -320,4 +320,13 @@ text{display: block;} | |||||
| border: 1px solid transparent; | border: 1px solid transparent; | ||||
| background-image: linear-gradient(to right, #2C8E68, #5CAE77); | background-image: linear-gradient(to right, #2C8E68, #5CAE77); | ||||
| margin-left: 6%; | margin-left: 6%; | ||||
| } | |||||
| .input_tit{ | |||||
| border: 1px solid #DCDCDC; | |||||
| padding: 0px 10px; | |||||
| height: 32px; | |||||
| line-height: 32px; | |||||
| border-radius: 5px; | |||||
| margin-bottom: 15px; | |||||
| } | } | ||||
| @@ -1,4 +1,6 @@ | |||||
| // pages/payee/add/add.js | // pages/payee/add/add.js | ||||
| import * as UTIL from '../../../utils/util.js'; | |||||
| import * as API from '../../../utils/API.js'; | |||||
| const app = getApp(); | const app = getApp(); | ||||
| Page({ | Page({ | ||||
| @@ -7,6 +9,23 @@ Page({ | |||||
| */ | */ | ||||
| data: { | data: { | ||||
| isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
| form:{ | |||||
| payee:'', | |||||
| payeeAccount:'', | |||||
| bankType:'', | |||||
| bankDeposit:'', | |||||
| accountType:'', | |||||
| payeeType:'', | |||||
| payeePaymentLines:'', | |||||
| status:'0', | |||||
| }, | |||||
| showBankType:false, | |||||
| showAccountType:false, | |||||
| bankTypeOptions:[], | |||||
| bankTypeText:'', | |||||
| accountTypeOptions:[], | |||||
| payeeTypeOptions:[], | |||||
| accountTypeText:'', | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -27,9 +46,109 @@ Page({ | |||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| onShow() { | onShow() { | ||||
| var that = this; | |||||
| // 所属银行字典查询 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| // let array = res.data.filter(function (e) { return e.dictValue == event.detail.value.bankType; }); | |||||
| this.setData({ | |||||
| bankTypeOptions:res.data | |||||
| }); | |||||
| } | |||||
| }) | |||||
| // 付款方式类型字典查询 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'account_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| that.setData({ | |||||
| accountTypeOptions:res.data, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| // 付款方式类型字典查询 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'payee_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| that.setData({ | |||||
| payeeTypeOptions:res.data, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| back:function(){ | |||||
| wx.navigateBack({ | |||||
| delta: 1 | |||||
| }) | |||||
| }, | |||||
| openBox(even){ | |||||
| console.log(even); | |||||
| var that = this ; | |||||
| if(even.currentTarget.dataset.name == "showDeposit"){ | |||||
| if(that.data.form.bankType == ''){ | |||||
| UTIL.showToastNoneIcon('请先选择所属银行!'); | |||||
| that.setData({ | |||||
| [even.currentTarget.dataset.name]:false, | |||||
| }) | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.setData({ | |||||
| [even.currentTarget.dataset.name]:true | |||||
| }) | |||||
| }, | |||||
| onConfirm(even){ | |||||
| console.log(even); | |||||
| var that = this ; | |||||
| if(even.currentTarget.dataset.name == "showBankType"){ | |||||
| // 付款方式类型字典查询 | |||||
| UTIL.httpRequest(API.URL_GET_DEPOSITLIST, {method:'GET',bankType:even.detail.value.dictValue,status:'0'}, { | |||||
| success: (res) => { | |||||
| that.setData({ | |||||
| depositOptions:res.rows, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| this.setData({ | |||||
| [even.currentTarget.dataset.value]:even.detail.value.dictValue, | |||||
| [even.currentTarget.dataset.value+"Text"]:even.detail.value.dictLabel, | |||||
| [even.currentTarget.dataset.name]:false, | |||||
| }) | |||||
| }, | |||||
| onConfirmDeposit(even){ | |||||
| this.setData({ | |||||
| [even.currentTarget.dataset.value]:even.detail.value.id, | |||||
| [even.currentTarget.dataset.value+"Text"]:even.detail.value.bankDeposit, | |||||
| [even.currentTarget.dataset.name]:false, | |||||
| }) | |||||
| }, | |||||
| closeBox(even){ | |||||
| console.log(even.currentTarget.dataset.name); | |||||
| this.setData({ | |||||
| [even.currentTarget.dataset.name]:false | |||||
| }) | |||||
| }, | |||||
| goSubmit(){ | |||||
| console.log(this.data.form); | |||||
| var that = this; | |||||
| that.setData({ | |||||
| ['form.method']:'POST' | |||||
| }) | |||||
| UTIL.httpRequest(API.URL_GET_PAYEEADD, that.data.form, { | |||||
| success: (res) => { | |||||
| if (res.code == API.SUCCESS_CODE) { | |||||
| wx.navigateBack({ | |||||
| delta:1 | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| onChange(even){ | |||||
| console.log(even); | |||||
| this.setData({ | |||||
| [even.currentTarget.dataset.formname]:even.detail | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
| */ | */ | ||||
| @@ -1,6 +1,19 @@ | |||||
| { | { | ||||
| "navigationStyle": "custom", | "navigationStyle": "custom", | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "van-field": "@vant/weapp/field/index" | |||||
| "van-row": "@vant/weapp/row/index", | |||||
| "van-col": "@vant/weapp/col/index", | |||||
| "van-cell": "@vant/weapp/cell/index", | |||||
| "van-cell-group": "@vant/weapp/cell-group/index", | |||||
| "van-tag": "@vant/weapp/tag/index", | |||||
| "van-icon": "@vant/weapp/icon/index", | |||||
| "van-steps": "@vant/weapp/steps/index", | |||||
| "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-popup": "@vant/weapp/popup/index", | |||||
| "van-picker": "@vant/weapp/picker/index", | |||||
| "van-calendar": "@vant/weapp/calendar/index" | |||||
| } | } | ||||
| } | } | ||||
| @@ -1,16 +1,64 @@ | |||||
| <!--pages/payee/add/add.wxml--> | <!--pages/payee/add/add.wxml--> | ||||
| <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | ||||
| <image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | |||||
| <text style="top:{{isIPX?'54px':'30px'}};">支出申请</text> | |||||
| <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | |||||
| <text style="top:{{isIPX?'54px':'30px'}};">新增收款人</text> | |||||
| </view> | </view> | ||||
| <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
| <van-field label="所属银行" value="{{ value }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down"/> | |||||
| <van-field label="户名" value="{{ value }}" placeholder="请输入姓名" border="{{ false }}" bind:change="onChange" input-align="right" required/> | |||||
| <van-field label="卡号" value="{{ value }}" placeholder="请输入收款账号" border="{{ false }}" bind:change="onChange" input-align="right" required/> | |||||
| <van-field label="账户类型" value="{{ value }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down"/> | |||||
| <van-field label="开户行" value="{{ value }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" /> | |||||
| <van-field label="联行号" value="{{ value }}" placeholder="请输入" border="{{ false }}" bind:change="onChange" input-align="right" required/> | |||||
| <van-popup show="{{showBankType}}" round position="bottom" bind:close="closeBox" data-name="showBankType"> | |||||
| <van-picker | |||||
| columns="{{bankTypeOptions}}" | |||||
| show-toolbar | |||||
| value-key="dictLabel" | |||||
| bind:cancel="closeBox" | |||||
| bind:confirm="onConfirm" | |||||
| data-name="showBankType" | |||||
| data-value="form.bankType" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field label="所属银行" value="{{ form.bankTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showBankType"/> | |||||
| <van-field label="户名" value="{{ form.payee }}" placeholder="请输入姓名" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
| <van-field label="卡号" value="{{ form.payeeAccount }}" placeholder="请输入收款账号" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeeAccount"/> | |||||
| <van-popup show="{{showPayeeType}}" round position="bottom" bind:close="closeBox" data-name="showPayeeType"> | |||||
| <van-picker | |||||
| columns="{{payeeTypeOptions}}" | |||||
| show-toolbar | |||||
| value-key="dictLabel" | |||||
| bind:cancel="closeBox" | |||||
| bind:confirm="onConfirm" | |||||
| data-name="showPayeeType" | |||||
| data-value="form.payeeType" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field label="收款人类型" value="{{ form.payeeTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showPayeeType" /> | |||||
| <van-popup show="{{showAccountType}}" round position="bottom" bind:close="closeBox" data-name="showAccountType"> | |||||
| <van-picker | |||||
| columns="{{accountTypeOptions}}" | |||||
| show-toolbar | |||||
| value-key="dictLabel" | |||||
| bind:cancel="closeBox" | |||||
| bind:confirm="onConfirm" | |||||
| data-name="showAccountType" | |||||
| data-value="form.accountType" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field label="账户类型" value="{{ form.accountTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showAccountType"/> | |||||
| <van-popup show="{{showDeposit}}" round position="bottom" bind:close="closeBox" data-name="showDeposit"> | |||||
| <van-picker | |||||
| columns="{{depositOptions}}" | |||||
| show-toolbar | |||||
| value-key="bankDeposit" | |||||
| bind:cancel="closeBox" | |||||
| bind:confirm="onConfirmDeposit" | |||||
| data-name="showDeposit" | |||||
| data-value="form.bankDeposit" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field label="开户行" value="{{ form.bankDepositText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showDeposit" /> | |||||
| <van-field label="联行号" value="{{ form.payeePaymentLines }}" placeholder="请输入" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||||
| </view> | </view> | ||||
| <view class="bottom"> | <view class="bottom"> | ||||
| <view class="btn2" bindtap="swichPaymentApply">确认</view> | |||||
| <view class="btn2" bindtap="goSubmit">确认</view> | |||||
| </view> | </view> | ||||
| @@ -1,4 +1,6 @@ | |||||
| // pages/payee/index.js | // pages/payee/index.js | ||||
| import * as UTIL from '../../utils/util.js'; | |||||
| import * as API from '../../utils/API.js'; | |||||
| const app = getApp(); | const app = getApp(); | ||||
| Page({ | Page({ | ||||
| @@ -7,17 +9,100 @@ Page({ | |||||
| */ | */ | ||||
| data: { | data: { | ||||
| isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
| list: ['a', 'b', 'c'], | |||||
| result: ['a', 'b'], | |||||
| list: {}, | |||||
| result: "", | |||||
| bankTypeOptions:[] | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad(options) { | onLoad(options) { | ||||
| console.log(options) | |||||
| var that = this; | |||||
| that.setData({ | |||||
| isPeers:options.isPeers,//是否同行 | |||||
| bankType:options.bankType,//所属银行 | |||||
| accountType:options.accountType,//账户类型 | |||||
| payeeType:options.transferType,//申请转帐类型 | |||||
| }) | |||||
| // 获取收款账号列表 | |||||
| let prames = { | |||||
| pageNum:1, | |||||
| pageSize:999, | |||||
| orderByColumn:'id', | |||||
| isAsc:'asc', | |||||
| isPeers:options.isPeers,//是否同行 | |||||
| bankType:options.bankType,//所属银行 | |||||
| accountType:options.accountType,//账户类型 | |||||
| payeeType:options.transferType,//申请转帐类型 | |||||
| status:'0', | |||||
| method:'GET' | |||||
| } | |||||
| console.log(prames); | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| that.setData({ | |||||
| bankTypeOptions:res.data, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| UTIL.httpRequest(API.URL_GET_SELECTLIST , prames, { | |||||
| success: (res) => { | |||||
| let array = res.rows ; | |||||
| for (let i = 0; i < array.length; i++) { | |||||
| array[i].payeeAccountText = array[i].payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); | |||||
| array[i].bankTypeText = (that.data.bankTypeOptions.filter(function (e) { return e.dictValue == array[i].bankType; }))[0].dictLabel; | |||||
| } | |||||
| that.setData({ | |||||
| list:array, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| goAdd(){ | |||||
| wx.navigateTo({ | |||||
| url: 'add/add', | |||||
| }) | |||||
| }, | |||||
| goSearch(e){ | |||||
| var that = this; | |||||
| // 获取收款账号列表 | |||||
| let prames = { | |||||
| pageNum:1, | |||||
| pageSize:999, | |||||
| orderByColumn:'id', | |||||
| isAsc:'asc', | |||||
| isPeers:that.data.isPeers,//是否同行 | |||||
| bankType:that.data.bankType,//所属银行 | |||||
| accountType:that.data.accountType,//账户类型 | |||||
| payeeType:that.data.payeeType,//申请转帐类型 | |||||
| status:'0', | |||||
| name:e.detail, | |||||
| method:'GET' | |||||
| } | |||||
| console.log(prames); | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| that.setData({ | |||||
| bankTypeOptions:res.data, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| UTIL.httpRequest(API.URL_GET_PAYEESELECTLIST , prames, { | |||||
| success: (res) => { | |||||
| let array = res.rows ; | |||||
| for (let i = 0; i < array.length; i++) { | |||||
| array[i].payeeAccountText = array[i].payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); | |||||
| array[i].bankTypeText = (that.data.bankTypeOptions.filter(function (e) { return e.dictValue == array[i].bankType; }))[0].dictLabel; | |||||
| } | |||||
| that.setData({ | |||||
| list:array, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| @@ -32,6 +117,7 @@ Page({ | |||||
| }, | }, | ||||
| onChange(event) { | onChange(event) { | ||||
| console.log(event); | |||||
| this.setData({ | this.setData({ | ||||
| result: event.detail, | result: event.detail, | ||||
| }); | }); | ||||
| @@ -42,7 +128,32 @@ Page({ | |||||
| const checkbox = this.selectComponent(`.checkboxes-${index}`); | const checkbox = this.selectComponent(`.checkboxes-${index}`); | ||||
| checkbox.toggle(); | checkbox.toggle(); | ||||
| }, | }, | ||||
| back:function(){ | |||||
| wx.navigateBack({ | |||||
| delta: 1 | |||||
| }) | |||||
| }, | |||||
| noop() {}, | noop() {}, | ||||
| goSubmit(){ | |||||
| var that = this; | |||||
| if(that.data.result == ''){ | |||||
| UTIL.showToastNoneIcon('请选择一个收款人!'); | |||||
| return; | |||||
| } | |||||
| let array = that.data.list.filter(function (e) { return e.id == that.data.result; }); | |||||
| console.log(array); | |||||
| let pages = getCurrentPages(); | |||||
| let currentPage = null; //当前页面 | |||||
| let prevPage = null; //上一个页面 | |||||
| currentPage = pages[pages.length - 1]; //获取当前页面,将其赋值 | |||||
| prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 | |||||
| if (prevPage) { | |||||
| prevPage.setData({ | |||||
| ["form.transfers[0].payeeList[0]"]: array[0]//将想要传的信息赋值给上一个页面data中的值 | |||||
| }) | |||||
| that.back() | |||||
| } | |||||
| }, | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
| */ | */ | ||||
| @@ -4,6 +4,8 @@ | |||||
| "van-checkbox-group": "@vant/weapp/checkbox-group/index", | "van-checkbox-group": "@vant/weapp/checkbox-group/index", | ||||
| "van-cell": "@vant/weapp/cell/index", | "van-cell": "@vant/weapp/cell/index", | ||||
| "van-cell-group": "@vant/weapp/cell-group/index", | "van-cell-group": "@vant/weapp/cell-group/index", | ||||
| "van-search": "@vant/weapp/search/index" | |||||
| "van-search": "@vant/weapp/search/index", | |||||
| "van-radio": "@vant/weapp/radio/index", | |||||
| "van-radio-group": "@vant/weapp/radio-group/index" | |||||
| } | } | ||||
| } | } | ||||
| @@ -9,11 +9,13 @@ | |||||
| shape="round" | shape="round" | ||||
| background="transparent" | background="transparent" | ||||
| placeholder="请输入搜索关键词" | placeholder="请输入搜索关键词" | ||||
| clearable | |||||
| bind:change="goSearch" | |||||
| /> | /> | ||||
| <view class="add_btn"><text>新增</text></view> | |||||
| <view class="add_btn" bindtap="goAdd"><text>新增</text></view> | |||||
| </view> | </view> | ||||
| <van-checkbox-group value="{{ result }}" bind:change="onChange"> | |||||
| <van-radio-group value="{{ result }}" bind:change="onChange"> | |||||
| <van-cell-group> | <van-cell-group> | ||||
| <van-cell | <van-cell | ||||
| wx:for="{{ list }}" | wx:for="{{ list }}" | ||||
| @@ -23,26 +25,29 @@ | |||||
| data-index="{{ index }}" | data-index="{{ index }}" | ||||
| bind:click="toggle" | bind:click="toggle" | ||||
| use-label-slot | use-label-slot | ||||
| center | |||||
| > | > | ||||
| <view slot="icon" style="margin-right: 10px;"> | <view slot="icon" style="margin-right: 10px;"> | ||||
| <image src="/image/apply/icon_icbc.png" style="width: 20px;height: 20px;vertical-align: middle;"></image> | |||||
| <image wx:if="{{item.bankType == 0}}" src="/image/apply/icon_other.png" style="width: 20px;height: 20px;vertical-align: middle;"></image> | |||||
| <image wx:if="{{item.bankType == 1}}" src="/image/apply/icon_icbc.png" style="width: 20px;height: 20px;vertical-align: middle;"></image> | |||||
| <image wx:if="{{item.bankType == 2}}" src="/image/apply/icon_RCB.png" style="width: 20px;height: 20px;vertical-align: middle;"></image> | |||||
| <image wx:if="{{item.bankType == 3}}" src="/image/apply/icon_ABC.png" style="width: 20px;height: 20px;vertical-align: middle;"></image> | |||||
| <image wx:if="{{item.bankType == 4}}" src="/image/apply/icon_CCB.png" style="width: 20px;height: 20px;vertical-align: middle;"></image> | |||||
| </view> | </view> | ||||
| <view slot="title"> | <view slot="title"> | ||||
| 张亮亮 | |||||
| {{item.payee}} | |||||
| </view> | </view> | ||||
| <view slot="label"> | <view slot="label"> | ||||
| 6217****2186 中国银行 | |||||
| <text decode = "{{true}}">{{item.payeeAccountText}}    {{item.bankTypeText}}</text> | |||||
| </view> | </view> | ||||
| <van-checkbox | |||||
| <van-radio | |||||
| catch:tap="noop" | catch:tap="noop" | ||||
| checked-color="#2C8E68" | checked-color="#2C8E68" | ||||
| class="checkboxes-{{ index }}" | class="checkboxes-{{ index }}" | ||||
| name="{{ item }}" | |||||
| name="{{ item.id }}" | |||||
| /> | /> | ||||
| </van-cell> | </van-cell> | ||||
| </van-cell-group> | </van-cell-group> | ||||
| </van-checkbox-group> | |||||
| </van-radio-group> | |||||
| <view class="bottom"> | <view class="bottom"> | ||||
| <view class="btn2" bindtap="swichPaymentApply">确认</view> | |||||
| <view class="btn2" bindtap="goSubmit">确认</view> | |||||
| </view> | </view> | ||||
| @@ -31,12 +31,16 @@ van-search { | |||||
| box-shadow: 0px 5px 5px #ddd; | box-shadow: 0px 5px 5px #ddd; | ||||
| } | } | ||||
| .bottom{ | .bottom{ | ||||
| width: 84%; | |||||
| width: 100%; | |||||
| margin: 0 auto; | margin: 0 auto; | ||||
| text-align: center; | text-align: center; | ||||
| margin-top: 30px; | |||||
| margin-bottom: 30px; | |||||
| padding-top: 30px; | |||||
| padding-bottom: 30px; | |||||
| display: flex; | display: flex; | ||||
| position: fixed; | |||||
| bottom: 0; | |||||
| background: #FFF; | |||||
| box-shadow: 0px -5px 9px #eee; | |||||
| } | } | ||||
| .bottom view { | .bottom view { | ||||
| @@ -51,4 +55,8 @@ van-search { | |||||
| padding: 8px 0px; | padding: 8px 0px; | ||||
| background-image: linear-gradient(to right, #2C8E68, #5CAE77); | background-image: linear-gradient(to right, #2C8E68, #5CAE77); | ||||
| color: #fff; | color: #fff; | ||||
| } | |||||
| .van-radio-group{ | |||||
| padding-bottom: 100px; | |||||
| } | } | ||||
| @@ -59,10 +59,25 @@ | |||||
| "query": "", | "query": "", | ||||
| "launchMode": "default", | "launchMode": "default", | ||||
| "scene": null | "scene": null | ||||
| }, | |||||
| { | |||||
| "name": "收款人列表", | |||||
| "pathName": "pages/payee/index", | |||||
| "query": "isPeers=N", | |||||
| "launchMode": "default", | |||||
| "scene": null | |||||
| }, | |||||
| { | |||||
| "name": "新增收款人", | |||||
| "pathName": "pages/payee/add/add", | |||||
| "query": "", | |||||
| "launchMode": "default", | |||||
| "scene": null | |||||
| } | } | ||||
| ] | ] | ||||
| } | } | ||||
| }, | }, | ||||
| "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", | "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", | ||||
| "projectname": "WXMB" | |||||
| "projectname": "WXMB", | |||||
| "libVersion": "2.23.3" | |||||
| } | } | ||||
| @@ -60,11 +60,35 @@ const URL_GET_GETPROJECTLIST = `${URL_PREFIX}/yinnong/project/list`; | |||||
| const URL_GET_CONTRACTIONLIST = `${URL_PREFIX}/contraction/info/list`; | const URL_GET_CONTRACTIONLIST = `${URL_PREFIX}/contraction/info/list`; | ||||
| //查询收款账号列表 | //查询收款账号列表 | ||||
| const URL_GET_SELECTLIST = `${URL_PREFIX}/yinnong/payee/selectList`; | |||||
| const URL_GET_SELECTLIST = `${URL_PREFIX}/yinnong/payee/selectlist`; | |||||
| //查询收款账号列表 | |||||
| //查询收款账号列表2 | |||||
| const URL_GET_PAYEESELECTLIST = `${URL_PREFIX}/yinnong/payee/list`; | |||||
| //当前账套付款账户列表 | |||||
| const URL_GET_SELECTACCOUNTLIST = `${URL_PREFIX}/cashier/account/accountList`; | const URL_GET_SELECTACCOUNTLIST = `${URL_PREFIX}/cashier/account/accountList`; | ||||
| //汇票列表 | |||||
| const URL_GET_MONEYORDERLIST = `${URL_PREFIX}/yinnong/moneyorder/list`; | |||||
| //通过所属银行查询开户行信息 | |||||
| const URL_GET_DEPOSITLIST = `${URL_PREFIX}/yinnong/deposit/list`; | |||||
| //新增收款方账户 | |||||
| const URL_GET_PAYEEADD = `${URL_PREFIX}/yinnong/payee/add`; | |||||
| //增加支出申请/模板 | |||||
| const URL_GET_SAVE = `${URL_PREFIX}/yinnong/approvalItems/save`; | |||||
| //附件上传 | |||||
| const URL_GET_UPLOAD = `${URL_PREFIX}/common/attach`; | |||||
| //获取当前用户的审批事项信息 | |||||
| const URL_GET_USERAPPRO = `${URL_PREFIX}/yinnong/approvalItems/getUserApprovalItems`; | |||||
| //查看附件列表 | |||||
| const URL_GET_FINDLIST = `${URL_PREFIX}/system/attachment/find`; | |||||
| /****************接口地址end****************/ | /****************接口地址end****************/ | ||||
| @@ -95,5 +119,13 @@ export { | |||||
| URL_GET_GETPROJECTLIST, | URL_GET_GETPROJECTLIST, | ||||
| URL_GET_CONTRACTIONLIST, | URL_GET_CONTRACTIONLIST, | ||||
| URL_GET_SELECTLIST, | URL_GET_SELECTLIST, | ||||
| URL_GET_SELECTACCOUNTLIST | |||||
| URL_GET_SELECTACCOUNTLIST, | |||||
| URL_GET_MONEYORDERLIST, | |||||
| URL_GET_PAYEESELECTLIST, | |||||
| URL_GET_DEPOSITLIST, | |||||
| URL_GET_PAYEEADD, | |||||
| URL_GET_SAVE, | |||||
| URL_GET_UPLOAD, | |||||
| URL_GET_USERAPPRO, | |||||
| URL_GET_FINDLIST | |||||
| } | } | ||||
| @@ -383,6 +383,47 @@ function formatDate(unixtime) { | |||||
| // return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;//年月日时分秒 | // return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;//年月日时分秒 | ||||
| return y + '-' + m + '-' + d; | return y + '-' + m + '-' + d; | ||||
| } | } | ||||
| /** | |||||
| * 将数字(整数)转为汉字 | |||||
| * @param num | |||||
| * @description 从零到一亿亿,需要小数的可自行截取小数点后面的数字直接替换对应arr1的读法就行了 | |||||
| */ | |||||
| function convertToChinaNum (num) { | |||||
| var arr1 = new Array('零', '一', '二', '三', '四', '五', '六', '七', '八', '九'); | |||||
| var arr2 = new Array('', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千','万', '十', '百', '千','亿');//可继续追加更高位转换值 | |||||
| if(!num || isNaN(num)){ | |||||
| return "零"; | |||||
| } | |||||
| var english = num.toString().split("") | |||||
| var result = ""; | |||||
| for (var i = 0; i < english.length; i++) { | |||||
| var des_i = english.length - 1 - i;//倒序排列设值 | |||||
| result = arr2[i] + result; | |||||
| var arr1_index = english[des_i]; | |||||
| result = arr1[arr1_index] + result; | |||||
| } | |||||
| //将【零千、零百】换成【零】 【十零】换成【十】 | |||||
| result = result.replace(/零(千|百|十)/g, '零').replace(/十零/g, '十'); | |||||
| //合并中间多个零为一个零 | |||||
| result = result.replace(/零+/g, '零'); | |||||
| //将【零亿】换成【亿】【零万】换成【万】 | |||||
| result = result.replace(/零亿/g, '亿').replace(/零万/g, '万'); | |||||
| //将【亿万】换成【亿】 | |||||
| result = result.replace(/亿万/g, '亿'); | |||||
| //移除末尾的零 | |||||
| result = result.replace(/零+$/, '') | |||||
| //将【零一十】换成【零十】 | |||||
| //result = result.replace(/零一十/g, '零十');//貌似正规读法是零一十 | |||||
| //将【一十】换成【十】 | |||||
| result = result.replace(/^一十/g, '十'); | |||||
| return result; | |||||
| } | |||||
| function getTransform(dictValue,options){ | |||||
| var dictLabel = ""; | |||||
| console.log(options); | |||||
| dictLabel = (options.filter(function (e) { return e.dictValue == dictValue; }))[0].dictLabel; | |||||
| return dictLabel; | |||||
| } | |||||
| export { | export { | ||||
| getCurrentPageUrl, | getCurrentPageUrl, | ||||
| getCurrentPageUrlWithArgs, | getCurrentPageUrlWithArgs, | ||||
| @@ -399,5 +440,7 @@ export { | |||||
| convert_length, | convert_length, | ||||
| isIPhoneX, | isIPhoneX, | ||||
| js_date_time, | js_date_time, | ||||
| formatDate | |||||
| formatDate, | |||||
| convertToChinaNum, | |||||
| getTransform | |||||
| } | } | ||||