diff --git a/app.json b/app.json index d99e9d4..7c639d8 100644 --- a/app.json +++ b/app.json @@ -16,7 +16,11 @@ "pages/apply/paymentTemplate/add/add", "pages/payee/index", "pages/payee/add/add", - "component/pop-up/index" + "component/pop-up/index", + "pages/Bookkeeping/Bookkeeping", + "pages/payee/list/list", + "pages/drawee/drawee", + "pages/drawee/add/add" ], "window": { "backgroundTextStyle": "light", diff --git a/app.wxss b/app.wxss index 9b9f609..9781076 100644 --- a/app.wxss +++ b/app.wxss @@ -58,7 +58,7 @@ contact-button { .ns image{ position: absolute; left: 3%; - width: 10px; + width: 20px; z-index: 9; } .ns text{ diff --git a/image/apply/XJ.png b/image/apply/XJ.png new file mode 100644 index 0000000..9d88156 Binary files /dev/null and b/image/apply/XJ.png differ diff --git a/image/apply/back.png b/image/apply/back.png index e4f61e9..cff4071 100644 Binary files a/image/apply/back.png and b/image/apply/back.png differ diff --git a/image/apply/button_mr.png b/image/apply/button_mr.png new file mode 100644 index 0000000..b19d3f9 Binary files /dev/null and b/image/apply/button_mr.png differ diff --git a/image/apply/gwk_icon.png b/image/apply/gwk_icon.png deleted file mode 100644 index 73069d8..0000000 Binary files a/image/apply/gwk_icon.png and /dev/null differ diff --git a/image/apply/icon_GWK.png b/image/apply/icon_GWK.png new file mode 100644 index 0000000..d59f18f Binary files /dev/null and b/image/apply/icon_GWK.png differ diff --git a/image/apply/icon_mr.png b/image/apply/icon_mr.png new file mode 100644 index 0000000..1db0032 Binary files /dev/null and b/image/apply/icon_mr.png differ diff --git a/image/apply/img_delete.png b/image/apply/img_delete.png new file mode 100644 index 0000000..a582e6e Binary files /dev/null and b/image/apply/img_delete.png differ diff --git a/image/icon/icon_add.png b/image/icon/icon_add.png new file mode 100644 index 0000000..a628bb1 Binary files /dev/null and b/image/icon/icon_add.png differ diff --git a/image/index/child_function_06.png b/image/index/child_function_06.png new file mode 100644 index 0000000..ad7e0a6 Binary files /dev/null and b/image/index/child_function_06.png differ diff --git a/image/index/child_function_07.png b/image/index/child_function_07.png new file mode 100644 index 0000000..59fe3bf Binary files /dev/null and b/image/index/child_function_07.png differ diff --git a/image/index/child_function_08.png b/image/index/child_function_08.png new file mode 100644 index 0000000..2ea9b95 Binary files /dev/null and b/image/index/child_function_08.png differ diff --git a/image/index/child_function_09.png b/image/index/child_function_09.png new file mode 100644 index 0000000..8f8157e Binary files /dev/null and b/image/index/child_function_09.png differ diff --git a/image/index/child_function_10.png b/image/index/child_function_10.png new file mode 100644 index 0000000..9921481 Binary files /dev/null and b/image/index/child_function_10.png differ diff --git a/pages/Bookkeeping/Bookkeeping.js b/pages/Bookkeeping/Bookkeeping.js new file mode 100644 index 0000000..1f0347e --- /dev/null +++ b/pages/Bookkeeping/Bookkeeping.js @@ -0,0 +1,85 @@ +// pages/Bookkeeping/Bookkeeping.js +import * as UTIL from '../../utils/util.js'; +import * as API from '../../utils/API.js'; +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + isIPX: app.globalData.isIPX, + result:['1'], + result2:['1'], + showGroup:true + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + onChange(event) { + this.setData({result:event.detail}) + }, + onChange2(event) { + this.setData({result2:event.detail}) + }, + switchTab(e){ + this.setData({showGroup:e.currentTarget.dataset.gid}) + }, + back:function(){ + wx.navigateBack({ + delta: 1 + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/Bookkeeping/Bookkeeping.json b/pages/Bookkeeping/Bookkeeping.json new file mode 100644 index 0000000..490636d --- /dev/null +++ b/pages/Bookkeeping/Bookkeeping.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "van-cell": "@vant/weapp/cell/index", + "van-cell-group": "@vant/weapp/cell-group/index", + "van-checkbox": "@vant/weapp/checkbox/index", + "van-checkbox-group": "@vant/weapp/checkbox-group/index" + } +} \ No newline at end of file diff --git a/pages/Bookkeeping/Bookkeeping.wxml b/pages/Bookkeeping/Bookkeeping.wxml new file mode 100644 index 0000000..65b9a25 --- /dev/null +++ b/pages/Bookkeeping/Bookkeeping.wxml @@ -0,0 +1,218 @@ + + + + 记账申请 + + + 收入事项4 + 支出事项5 + + + + + + 2021年联合社鱼塘承包款 + + + 经营收入 + + + + 附件3 + 2021-5-26 + + + + + 未提交 + + ¥6533.60 + + + + + + + 张旺财农机租赁款 + + + 经营收入 + + + + 附件8 + 2022-6-6 + + + + + 未提交 + + ¥7823.00 + + + + + + + 库存小麦销售收入款 + + + 经营收入 + + + + 附件6 + 2022-2-16 + + + + + 未提交 + + ¥1245.86 + + + + + + + 仓库3月份租金 + + + 经营收入 + + + + 附件2 + 2022-4-24 + + + + + 未提交 + + ¥4968.38 + + + + + + + + + + + 联合社购买电脑费用 + + + 现金支出 + + + + 附件9 + 2021-1-26 + + + + + 未提交 + + ¥1358.70 + + + + + + + 2季度办公用品报销款 + + + 电子支出 + + + + 附件1 + 2021-5-30 + + + + + 未提交 + + ¥2368.89 + + + + + + + 3月份办公会工作餐费用 + + + 现金支出 + + + + 附件10 + 2021-2-15 + + + + + 未提交 + + ¥5698.00 + + + + + + + 购入化肥款 + + + 现金支出 + + + + 附件12 + 2021-7-26 + + + + + 未提交 + + ¥4238.96 + + + + + + + 村东水田槙保费用 + + + 公务卡支出 + + + + 附件15 + 2021-12-19 + + + + + 未提交 + + ¥9883.00 + + + + + + + + 提交记账 + \ No newline at end of file diff --git a/pages/Bookkeeping/Bookkeeping.wxss b/pages/Bookkeeping/Bookkeeping.wxss new file mode 100644 index 0000000..9fa590b --- /dev/null +++ b/pages/Bookkeeping/Bookkeeping.wxss @@ -0,0 +1,168 @@ +/* pages/Bookkeeping/Bookkeeping.wxss */ +text{display: block;} +.work_plan{ + padding: 40rpx 32.5rpx 30rpx; + display: flex; +} + +.work_plan .menu_item{ + background-color: #fff; + box-shadow: 2px 5px 5px #ddd; + border-radius: 60rpx; + text-align: center; + font-size: 16px; + position: relative; + margin-right: 20px; + padding: 8px 20px; +} +.work_plan .menu_item.active{ + background-color: #2C8E68; + color: #fff; +} +.work_plan .menu_item .remind{ + height: 30rpx; + background: #e90101; + color: #fff; + font-size: 26rpx; + position: absolute; + line-height: 30rpx; + padding:0 10rpx; + border-radius: 25px; + top: -10rpx; + right: -10rpx; +} + +.work_plan .more{ + flex: 1; + text-align: center; + line-height: 60rpx; + font-size: 36rpx; + color: #31936c; +} +.workflow{ + padding: 10rpx 32.5rpx; +} +.workflow .workflow_list{ + height: 150rpx; + background-color: #fff; + border-radius: 24rpx; + box-shadow:0rpx 0rpx 10rpx rgba(0,0,0,.1); + margin-bottom: 20rpx; + padding:15rpx 25rpx 10rpx 35rpx; +} +.workflow .workflow_list .process_intro{ + display: flex; + height: 62rpx; + align-items: center; +} + +.workflow .process_intro .name{ + width: 390rpx; + font-size: 34rpx; + margin-right: 30rpx; + display: flex; + justify-content: space-between; + align-items: center; +} +.workflow .process_intro .name .name_tit{ + width: 290rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.li{ + display: flex; + justify-content: space-between; + width: 94%; + margin: 0 auto; + background: #fff; + padding: 14px; + border-radius: 10px; + box-shadow: 2px 5px 5px #ddd; + margin-bottom: 15px; +} +.li view text{ + margin-top: 15px; +} +.li view text:nth-child(1){ + margin-top: 0px; +} +.li .fksr{ + display: flex; + align-items: center; + margin-top: 15px; + color: #2C8E68; + font-size: 16px; +} +.li .wtj{ + display: flex; + align-items: center; + justify-content: center; + padding: 3px 8px; + background-color: rgba(233, 0, 0,0.1); + border-radius: 5px; + color: #444444; + font-size: 14px; +} +.li .tit{ + font-size: 18px; + color: #444444; + line-height: 25px; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + word-break: break-all; + overflow: hidden; +} +.li .fj_name{ + font-size: 14px; + color: #B3DB62; + line-height: 25px; +} +.li .time{ + font-size: 14px; + color: #9B9CAA; +} +.li .money{ + font-size: 18px; + color: #5CAE77; +} +.van-checkbox__label { + display: flex; + justify-content: space-between; + width: 100%; +} + +.van-checkbox__icon-wrap { + border-radius: 5px; +} +.van-checkbox__icon { + border-radius: 5px; + border: 2px solid #2C8E68!important; + background-color: rgba(44, 142, 104, 0.2); +} +.bottom{ + width: 100%; + margin: 0 auto; + text-align: center; + padding: 15px 0; + display: flex; + position: fixed; + bottom: 0%; + background: #fff; + box-shadow: 0 0 5px #ddd; +} + +.bottom view { + width: 47%; + margin: 0 auto; + border-radius: 30px; + display: inline-block; +} + +.bottom .btn2{ + border: 1px solid transparent; + padding: 10px 0px; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + color: #fff; +} \ No newline at end of file diff --git a/pages/apply/index.js b/pages/apply/index.js index fc860c0..fd77857 100644 --- a/pages/apply/index.js +++ b/pages/apply/index.js @@ -50,7 +50,33 @@ swichPaymentApply:function(e){ }, goTemplate:function(e){ wx.navigateTo({ - url: 'paymentTemplate/paymentTemplate?id='+e.currentTarget.dataset.id + url: 'paymentTemplate/add/add?id='+e.currentTarget.dataset.id+'&type=template' + }) + }, + + updateMoney:function(e){ + UTIL.showLoadingHaveMask('正在查询'); + UTIL.httpRequest(API.URL_GET_GETBALANCEENQUIRY+e.currentTarget.dataset.id, {method:'GET'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({ + ["accountList["+e.currentTarget.dataset.index+"].balance"]:res.msg + }) + UTIL.hideLoadingHaveMask(); + wx.showToast({ + title: '查询成功', + icon: 'success', + duration: 2000, + }) + }else{ + UTIL.hideLoadingHaveMask(); + wx.showToast({ + title: '查询失败', + icon: 'error', + duration: 2000, + }) + } + } }) }, @@ -116,10 +142,37 @@ swichPaymentApply:function(e){ success: (res) => { if (res.code == API.SUCCESS_CODE) { that.data.approvalItemsOptions.splice(e.currentTarget.dataset.index, 1); + wx.showToast({ + title: '删除成功!', + icon: 'success', + duration: 2000 + }) that.setData({ approvalItemsOptions : that.data.approvalItemsOptions }) - UTIL.showToastNoneIcon('删除成功!'); + } + } + }) + }, + getMr(e){ + var that = this; + UTIL.httpRequest(API.URL_GET_GETSETDEFAULTVALUES + e.currentTarget.dataset.id, {method:'GET'},{ + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + UTIL.httpRequest(API.URL_GET_APPROVALITEMSLIST, {method:'GET',dataType:'1'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + wx.showToast({ + title: '设置成功!', + icon: 'success', + duration: 2000 + }) + that.setData({ + approvalItemsOptions : res.rows + }) + } + } + }) } } }) diff --git a/pages/apply/index.wxml b/pages/apply/index.wxml index 06dadbe..a0b9962 100644 --- a/pages/apply/index.wxml +++ b/pages/apply/index.wxml @@ -14,19 +14,19 @@ - 一般户 + {{item.bankUseType == 1 ?'基本户':'一般户'}} - + - - {{item.bankType == 1 ? '中国银行':item.bankType == 2 ? '农商行(山东省)':item.bankType == 3 ? '农业银行':item.bankType == 4 ? '建设银行':''}} + + {{item.bankType == 1 ? '中国银行':item.bankType == 2||item.bankType == 5 ? '农商行(山东省)':item.bankType == 3 ? '农业银行':item.bankType == 4 ? '建设银行':''}} {{item.bankAccountNumber}}卡号 可用余额 {{item.balance}} - + @@ -56,19 +56,27 @@ - + - {{item.templateName}}默认 + {{item.templateName}}默认 - - + + + + + + + + + + - \ No newline at end of file + diff --git a/pages/apply/index.wxss b/pages/apply/index.wxss index cf05cd5..af24882 100644 --- a/pages/apply/index.wxss +++ b/pages/apply/index.wxss @@ -144,7 +144,7 @@ } .deleteBox{ - width: 65px; + width: 130px; text-align: center; height: 100%; background: #F6F6F6; diff --git a/pages/apply/paymentTemplate/add/add.js b/pages/apply/paymentTemplate/add/add.js index ac35276..6a41cc4 100644 --- a/pages/apply/paymentTemplate/add/add.js +++ b/pages/apply/paymentTemplate/add/add.js @@ -58,6 +58,7 @@ Page({ capitalExpenditureTypeText:'结算类',//资金支出类别(展示用) succeedAmount:'',//成功支付金额 payer:'',//付款方 + paymentPattern:'1', payerAccount:'',//付款方账户 bankType:'',//所属银行 bankTypeText:'',//所属银行(展示用) @@ -74,13 +75,13 @@ Page({ bankPriority:'',//银行处理优先级 clientPriority:'',//客户处理优先级 transferType:'1',//付款方式 - transferTypeText:'村账户转账',//付款方式(展示用) + transferTypeText:'垫付报销:电子支付',//付款方式(展示用) requiredTransferTime:'',//要求转账时间 remark:'',//付款事由 startTime:'',//开票日期 endTime:'',//到期日期 orderType:'',//汇票类型 - bankAccountType:'',//账户类别1 公户2私户 + bankAccountType:'2',//账户类别1 公户2私户 villageAccountType:'',//账户分类 payeeList:[{//收款方账户集合 payeeId:'0',//收款方id @@ -134,6 +135,9 @@ Page({ if (res.code == API.SUCCESS_CODE) { console.log(that.data.capitalExpenditureTypeOptions); if(res.data.approvalItemTemplate == null){return;} + + if(options.type == "template"){res.data.approvalItemTemplate.id=""} + res.data.transfers.forEach( (item,index) => { that.setData({ @@ -142,7 +146,7 @@ Page({ res.data.transfers[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); - res.data.transfers[index].transferTypeText = UTIL.getTransform(item.transferType,that.data.transferTypeOptions); + res.data.transfers[index].transferTypeText = UTIL.getTransform(item.paymentPattern,that.data.transferTypeOptions); res.data.transfers[index].bankTypeText = UTIL.getTransform(item.bankType,that.data.bankTypeOptions); @@ -199,31 +203,23 @@ Page({ res.data.forEach((item2,index2)=>{ - wx.downloadFile({ - url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 - success (response) { - if (response.statusCode === 200) { - let fileForm = item.fileForm?item.fileForm:[]; - fileForm.push({ - file: response.tempFilePath, - fileType:'1', - bizPath:'transfer', - tableName:'t_yinnong_transfer', - tableId:'' - }) - console.log("--------------fileForm2 start----------------"); - console.log(fileForm); - console.log("--------------fileForm2 end----------------"); - list.push({ - tempFilePath:response.tempFilePath - }) - that.setData({ - ["form.transfers["+index+"].SJimage"]:list, - ["form.transfers["+index+"].fileForm"]:fileForm - }); - } - } + let fileForm = item.fileForm?item.fileForm:[]; + fileForm.push({ + file: URL_PREFIX+item2.fileUrl, + fileType:'1', + bizPath:'transfer', + tableName:'t_yinnong_transfer', + tableId:'' + }) + list.push({ + tempFilePath:URL_PREFIX+item2.fileUrl, + id:item2.id }) + that.setData({ + ["form.transfers["+index+"].SJimage"]:list, + ["form.transfers["+index+"].fileForm"]:fileForm + }); + }) } @@ -241,28 +237,22 @@ Page({ success: (res) => { let list = []; res.data.forEach((item2,index2)=>{ - wx.downloadFile({ - url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 - success (response) { - if (response.statusCode === 200) { - let fileForm = item.fileForm?item.fileForm:[]; - fileForm.push({ - file: response.tempFilePath, - fileType:'2', - bizPath:'transfer', - tableName:'t_yinnong_transfer', - tableId:item.id - }) - list.push({ - tempFilePath:response.tempFilePath - }) - that.setData({ - ["form.transfers["+index+"].FPimage"]:list, - ["form.transfers["+index+"].fileForm"]:fileForm - }); - } - } + let fileForm = item.fileForm?item.fileForm:[]; + fileForm.push({ + file: URL_PREFIX+item2.fileUrl, + fileType:'2', + bizPath:'transfer', + tableName:'t_yinnong_transfer', + tableId:item.id + }) + list.push({ + tempFilePath:URL_PREFIX+item2.fileUrl, + id:item2.id }) + that.setData({ + ["form.transfers["+index+"].FPimage"]:list, + ["form.transfers["+index+"].fileForm"]:fileForm + }); }) } }) @@ -278,203 +268,36 @@ Page({ { success: (res) => { let list = []; - let fileForm = item.fileForm?item.fileForm:[]; res.data.forEach((item2,index2)=>{ - wx.downloadFile({ - url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 - success (response) { - if (response.statusCode === 200) { - let fileForm = item.fileForm?item.fileForm:[]; - fileForm.push({ - file: response.tempFilePath, - fileType:'3', - bizPath:'transfer', - tableName:'t_yinnong_transfer', - tableId:item.id - }) - list.push({ - tempFilePath:response.tempFilePath - }) - that.setData({ - ["form.transfers["+index+"].QTimage"]:list, - ["form.transfers["+index+"].fileForm"]:fileForm - }); - } - } - }) - }) - } - }) - }) - that.setData({ - form:res.data, - activeNames:null - }) - UTIL.hideLoadingHaveMask(); - } - } - }) - },1000) - }else if(options.type == 'update'&!options.id){ - console.log(options); - setTimeout(function(){ - let array = JSON.parse(options.array); - array.transfers.forEach( (item,index) => { - item.capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); - item.transferTypeText = UTIL.getTransform(item.transferType,that.data.transferTypeOptions); - - item.bankTypeText = UTIL.getTransform(item.bankType,that.data.bankTypeOptions); - - item.payeeList.forEach( (response,i) => { - item.payeeList[i].bankTypeText = UTIL.getTransform(response.bankType,that.data.bankTypeOptions); - }) - if(item.capitalExpenditureType == 2){ - let prames = { - outId:item.id, - ynType: item.transferType=='1'||item.transferType=='2'||item.transferType=='4'?'1':'2' - } - // 工程项目查询 - UTIL.httpRequest(API.URL_GET_GETPROJECTTO , prames, { - success: (res) => { - res.data.projectFundTypeText = UTIL.getTransform(res.data.projectFundType,that.data.projectFundTypeOptions); - array.transfers[index].projectForm = res.data; - } - }) - } - - - //收据附件 - UTIL.httpRequest( - API.URL_GET_FINDLIST, - { - method:'GET', - tableName:'t_yinnong_transfer', - tableId:item.id, - fileType:1 - }, - { - success: (res) => { - - let list = []; - - res.data.forEach((item2,index2)=>{ - - wx.downloadFile({ - url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 - success (response) { - if (response.statusCode === 200) { - let fileForm = item.fileForm?item.fileForm:[]; - fileForm.push({ - file: response.tempFilePath, - fileType:'1', - bizPath:'transfer', - tableName:'t_yinnong_transfer', - tableId:'' - }) - console.log("--------------fileForm2 start----------------"); - console.log(fileForm); - console.log("--------------fileForm2 end----------------"); - list.push({ - tempFilePath:response.tempFilePath - }) - that.setData({ - ["form.transfers["+index+"].SJimage"]:list, - ["form.transfers["+index+"].fileForm"]:fileForm - }); - } - } - }) - }) - - } - }) - //发票 - UTIL.httpRequest( - API.URL_GET_FINDLIST, - { - method:'GET', - tableName:'t_yinnong_transfer', - tableId:item.id, - fileType:2 - }, - { - success: (res) => { - let list = []; - res.data.forEach((item2,index2)=>{ - wx.downloadFile({ - url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 - success (response) { - if (response.statusCode === 200) { - let fileForm = item.fileForm?item.fileForm:[]; - fileForm.push({ - file: response.tempFilePath, - fileType:'2', - bizPath:'transfer', - tableName:'t_yinnong_transfer', - tableId:item.id - }) - list.push({ - tempFilePath:response.tempFilePath - }) - that.setData({ - ["form.transfers["+index+"].FPimage"]:list, - ["form.transfers["+index+"].fileForm"]:fileForm - }); - } - } - }) - }) - } - }) - //其他 - UTIL.httpRequest( - API.URL_GET_FINDLIST, - { - method:'GET', - tableName:'t_yinnong_transfer', - tableId:item.id, - fileType:3 - }, - { - success: (res) => { - let list = []; - let fileForm = item.fileForm?item.fileForm:[]; - res.data.forEach((item2,index2)=>{ - wx.downloadFile({ - url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 - success (response) { - if (response.statusCode === 200) { let fileForm = item.fileForm?item.fileForm:[]; fileForm.push({ - file: response.tempFilePath, + file: URL_PREFIX+item2.fileUrl, fileType:'3', bizPath:'transfer', tableName:'t_yinnong_transfer', tableId:item.id }) list.push({ - tempFilePath:response.tempFilePath + tempFilePath:URL_PREFIX+item2.fileUrl, + id:item2.id }) that.setData({ ["form.transfers["+index+"].QTimage"]:list, ["form.transfers["+index+"].fileForm"]:fileForm }); - } + }) } }) }) + that.setData({ + form:res.data, + activeNames:null + }) + UTIL.hideLoadingHaveMask(); } - }) - }) - that.setData({ - form : array, - isUpdate : true + } }) - if(options.add == "add"){ - that.addList(); - } },1000) - }else{ //村账户查询参数 var perames = { @@ -497,6 +320,168 @@ Page({ } }) } + + // else if(options.type == 'update'&!options.id){ + // console.log(options); + // setTimeout(function(){ + // let array = JSON.parse(options.array); + // array.transfers.forEach( (item,index) => { + // item.capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); + // item.transferTypeText = UTIL.getTransform(item.transferType,that.data.transferTypeOptions); + + // item.bankTypeText = UTIL.getTransform(item.bankType,that.data.bankTypeOptions); + + // item.payeeList.forEach( (response,i) => { + // item.payeeList[i].bankTypeText = UTIL.getTransform(response.bankType,that.data.bankTypeOptions); + // }) + // if(item.capitalExpenditureType == 2){ + // let prames = { + // outId:item.id, + // ynType: item.transferType=='1'||item.transferType=='2'||item.transferType=='4'?'1':'2' + // } + // // 工程项目查询 + // UTIL.httpRequest(API.URL_GET_GETPROJECTTO , prames, { + // success: (res) => { + // res.data.projectFundTypeText = UTIL.getTransform(res.data.projectFundType,that.data.projectFundTypeOptions); + // array.transfers[index].projectForm = res.data; + // } + // }) + // } + + + // //收据附件 + // UTIL.httpRequest( + // API.URL_GET_FINDLIST, + // { + // method:'GET', + // tableName:'t_yinnong_transfer', + // tableId:item.id, + // fileType:1 + // }, + // { + // success: (res) => { + + // let list = []; + + // res.data.forEach((item2,index2)=>{ + + // wx.downloadFile({ + // url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 + // success (response) { + // if (response.statusCode === 200) { + // let fileForm = item.fileForm?item.fileForm:[]; + // fileForm.push({ + // file: response.tempFilePath, + // fileType:'1', + // bizPath:'transfer', + // tableName:'t_yinnong_transfer', + // tableId:'' + // }) + // console.log("--------------fileForm2 start----------------"); + // console.log(fileForm); + // console.log("--------------fileForm2 end----------------"); + // list.push({ + // tempFilePath:response.tempFilePath + // }) + // that.setData({ + // ["form.transfers["+index+"].SJimage"]:list, + // ["form.transfers["+index+"].fileForm"]:fileForm + // }); + // } + // } + // }) + // }) + + // } + // }) + // //发票 + // UTIL.httpRequest( + // API.URL_GET_FINDLIST, + // { + // method:'GET', + // tableName:'t_yinnong_transfer', + // tableId:item.id, + // fileType:2 + // }, + // { + // success: (res) => { + // let list = []; + // res.data.forEach((item2,index2)=>{ + // wx.downloadFile({ + // url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 + // success (response) { + // if (response.statusCode === 200) { + // let fileForm = item.fileForm?item.fileForm:[]; + // fileForm.push({ + // file: response.tempFilePath, + // fileType:'2', + // bizPath:'transfer', + // tableName:'t_yinnong_transfer', + // tableId:item.id + // }) + // list.push({ + // tempFilePath:response.tempFilePath + // }) + // that.setData({ + // ["form.transfers["+index+"].FPimage"]:list, + // ["form.transfers["+index+"].fileForm"]:fileForm + // }); + // } + // } + // }) + // }) + // } + // }) + // //其他 + // UTIL.httpRequest( + // API.URL_GET_FINDLIST, + // { + // method:'GET', + // tableName:'t_yinnong_transfer', + // tableId:item.id, + // fileType:3 + // }, + // { + // success: (res) => { + // let list = []; + // let fileForm = item.fileForm?item.fileForm:[]; + // res.data.forEach((item2,index2)=>{ + // wx.downloadFile({ + // url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 + // success (response) { + // if (response.statusCode === 200) { + // let fileForm = item.fileForm?item.fileForm:[]; + // fileForm.push({ + // file: response.tempFilePath, + // fileType:'3', + // bizPath:'transfer', + // tableName:'t_yinnong_transfer', + // tableId:item.id + // }) + // list.push({ + // tempFilePath:response.tempFilePath + // }) + // that.setData({ + // ["form.transfers["+index+"].QTimage"]:list, + // ["form.transfers["+index+"].fileForm"]:fileForm + // }); + // } + // } + // }) + // }) + // } + // }) + // }) + // that.setData({ + // form : array, + // isUpdate : true + // }) + // if(options.add == "add"){ + // that.addList(); + // } + // },1000) + + // } }, onChangeBox(event) { console.log(event); @@ -515,7 +500,6 @@ Page({ */ onShow() { var that = this; - UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { success: (res) => { if (res.code == API.SUCCESS_CODE) { @@ -546,7 +530,15 @@ Page({ } }) // 付款方式类型字典查询 - UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'transfer_type', {method:'GET'}, { + // UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'transfer_type', {method:'GET'}, { + // success: (res) => { + // that.setData({ + // transferTypeOptions:res.data, + // }) + // } + // }) + // 付款方式类型字典查询 (2.0) + UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'yn_pay_type', {method:'GET'}, { success: (res) => { that.setData({ transferTypeOptions:res.data, @@ -633,10 +625,18 @@ Page({ [event.currentTarget.dataset.value+'.payerAccount']: '', [event.currentTarget.dataset.value+'.bankTypeText']: '', [event.currentTarget.dataset.value+'.bankType']: '', - [event.currentTarget.dataset.value+'.bankAccountType']: '', + [event.currentTarget.dataset.value+'.bankAccountType']: '2', [event.currentTarget.dataset.value+'.isPeers']: '', + [event.currentTarget.dataset.value+'.paymentPattern']: event.detail.value.dictValue, balance:0, }); + console.log(event.detail.value.dictValue); + + if(event.detail.value.dictValue == 1 || event.detail.value.dictValue == 2 || event.detail.value.dictValue == 4 || event.detail.value.dictValue == 6 || event.detail.value.dictValue == 7 ){event.detail.value.dictValue = 1 ;} + else if(event.detail.value.dictValue == 3){event.detail.value.dictValue = 2 ;} + else if(event.detail.value.dictValue == 5){event.detail.value.dictValue = 12 ;} + else if(event.detail.value.dictValue == 8){event.detail.value.dictValue = 11 ;} + if(event.detail.value.dictValue == 1){//村账户查询参数 perames = { pageNum:1, @@ -757,7 +757,7 @@ Page({ }); }, goPayeeList(event){ - console.log(event); + console.log(event.currentTarget.dataset.transfertype) if(event.currentTarget.dataset.payer == null || event.currentTarget.dataset.payer == ''){ UTIL.showToastNoneIcon('请先选择付款方!'); return; @@ -765,8 +765,9 @@ Page({ if(event.currentTarget.dataset.accounttype == null ){ event.currentTarget.dataset.accounttype = '' } + // '/pages/payee/index?isPeers='+event.currentTarget.dataset.ispeers+'&bankType='+event.currentTarget.dataset.banktype+'&accountType='+event.currentTarget.dataset.accounttype+'&transferType='+event.currentTarget.dataset.transfertype + '&index='+event.currentTarget.dataset.index+'&money='+this.data.form.transfers 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 + '&index='+event.currentTarget.dataset.index+'&money='+this.data.form.transfers[event.currentTarget.dataset.index].expenditureAmount, + url: '/pages/payee/index?transferType='+event.currentTarget.dataset.transfertype+'&money='+this.data.form.transfers[event.currentTarget.dataset.index].expenditureAmount + '&index='+event.currentTarget.dataset.index, }) }, onChange(event){ @@ -861,7 +862,6 @@ Page({ }) return; } - for (let i = 0; i < list.transfers.length; i++) { const element = list.transfers[i]; if(element.applyDate == ''){ @@ -896,9 +896,6 @@ Page({ return; } } - - - if(e.currentTarget.dataset.type == 1){ if(that.data.form.approvalItemTemplate.templateName == ''){ UTIL.showToastNoneIcon('请输入模板名称!'); @@ -913,7 +910,6 @@ Page({ } that.data.form.method = 'POST'; that.data.form.approvalItemTemplate.dataType = e.currentTarget.dataset.type; - UTIL.httpRequest(API.URL_GET_SAVE, that.data.form, { success: (res) => { if (res.code == API.SUCCESS_CODE) { @@ -941,7 +937,6 @@ Page({ } }) } - if(that.data.form.transfers[j].fileForm == undefined){continue;} for (let i = 0; i < that.data.form.transfers[j].fileForm.length; i++) { that.data.form.transfers[j].fileForm[i].tableId = res.data.transfers[j].id @@ -966,9 +961,6 @@ Page({ }) } } - - - if(e.currentTarget.dataset.type == 0){ wx.navigateTo({ url: '/pages/apply/approval/approval?id='+res.data.approvalItemTemplate.id+'&deptId='+res.data.approvalItemTemplate.deptId, @@ -979,14 +971,10 @@ Page({ title: '保存成功', icon: 'success', duration: 2000, - complete(){ - setTimeout(function(){ - that.back(); - },2000) - } }) } if(e.currentTarget.dataset.type == 1){ + console.log("aaa"); wx.showToast({ title: '保存成功', icon: 'success', @@ -1028,8 +1016,9 @@ Page({ }) }, bindKeyInput(even){ + console.log(even); this.setData({ - ["form.approvalItemTemplate.approvalItems"]: even.detail.value, + ["form.approvalItemTemplate.approvalItems"]: even.detail, }) }, errorPd(e){ @@ -1078,9 +1067,9 @@ Page({ ["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm, }) - let SJlength = that.data.form.transfers[e.currentTarget.dataset.index].SJimage.length; - let FPlength = that.data.form.transfers[e.currentTarget.dataset.index].FPimage.length; - let QTlength = that.data.form.transfers[e.currentTarget.dataset.index].QTimage.length; + let SJlength = that.data.form.transfers[e.currentTarget.dataset.index].SJimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].SJimage.length; + let FPlength = that.data.form.transfers[e.currentTarget.dataset.index].FPimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].FPimage.length; + let QTlength = that.data.form.transfers[e.currentTarget.dataset.index].QTimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].QTimage.length; let fileNum = parseInt( SJlength ) + parseInt( FPlength ) + parseInt( QTlength ) ; that.setData({ ["form.transfers["+e.currentTarget.dataset.index+"].fileNum"]:fileNum, @@ -1108,14 +1097,23 @@ Page({ tableId:'' }) }) - console.log(fileForm); + + let tem = that.data.form.transfers[e.currentTarget.dataset.index].FPimage; + + res.tempFiles.forEach(r=>{ + tem.push({ + tempFilePath:r.tempFilePath + }) + }) + + console.log(tem); that.setData({ - ["form.transfers["+e.currentTarget.dataset.index+"].FPimage"]:res.tempFiles, + ["form.transfers["+e.currentTarget.dataset.index+"].FPimage"]:tem, ["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm }) - let SJlength = that.data.form.transfers[e.currentTarget.dataset.index].SJimage.length; - let FPlength = that.data.form.transfers[e.currentTarget.dataset.index].FPimage.length; - let QTlength = that.data.form.transfers[e.currentTarget.dataset.index].QTimage.length; + let SJlength = that.data.form.transfers[e.currentTarget.dataset.index].SJimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].SJimage.length; + let FPlength = that.data.form.transfers[e.currentTarget.dataset.index].FPimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].FPimage.length; + let QTlength = that.data.form.transfers[e.currentTarget.dataset.index].QTimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].QTimage.length; let fileNum = parseInt( SJlength ) + parseInt( FPlength ) + parseInt( QTlength ) ; that.setData({ ["form.transfers["+e.currentTarget.dataset.index+"].fileNum"]:fileNum, @@ -1148,9 +1146,9 @@ Page({ ["form.transfers["+e.currentTarget.dataset.index+"].QTimage"]:res.tempFiles, ["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm }) - let SJlength = that.data.form.transfers[e.currentTarget.dataset.index].SJimage.length; - let FPlength = that.data.form.transfers[e.currentTarget.dataset.index].FPimage.length; - let QTlength = that.data.form.transfers[e.currentTarget.dataset.index].QTimage.length; + let SJlength = that.data.form.transfers[e.currentTarget.dataset.index].SJimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].SJimage.length; + let FPlength = that.data.form.transfers[e.currentTarget.dataset.index].FPimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].FPimage.length; + let QTlength = that.data.form.transfers[e.currentTarget.dataset.index].QTimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].QTimage.length; let fileNum = parseInt( SJlength ) + parseInt( FPlength ) + parseInt( QTlength ) ; that.setData({ ["form.transfers["+e.currentTarget.dataset.index+"].fileNum"]:fileNum, @@ -1185,18 +1183,18 @@ Page({ FPimage:[], QTimage:[], showTitle:true, - capitalExpenditureType:'',//资金支出类别 - capitalExpenditureTypeText:'',//资金支出类别(展示用) + capitalExpenditureType:'1',//资金支出类别 + capitalExpenditureTypeText:'结算类',//资金支出类别(展示用) succeedAmount:'',//成功支付金额 payer:'',//付款方 payerAccount:'',//付款方账户 bankType:'',//所属银行 bankTypeText:'',//所属银行(展示用) - isPeers:'',//是否同行 + isPeers:'N',//是否同行 operatorCode:'',//操作员代码 enterpriseCode:'',//企业编码 expenditureAmount:'',//支出总金额 - applyDate:UTIL.formatDate(that.data.applyDate),//申请时间 + applyDate:that.data.applyDate,//申请时间 transferStatus:'',//转账状态 auditStatus:'0',//审批状态 paymentState:'',//支付状态 @@ -1204,14 +1202,15 @@ Page({ paymentTime:'',//支付时间 bankPriority:'',//银行处理优先级 clientPriority:'',//客户处理优先级 - transferType:'',//付款方式 - transferTypeText:'',//付款方式(展示用) + paymentPattern:'1', + transferType:'1',//付款方式 + transferTypeText:'垫付报销:电子支付',//付款方式(展示用) requiredTransferTime:'',//要求转账时间 remark:'',//付款事由 startTime:'',//开票日期 endTime:'',//到期日期 orderType:'',//汇票类型 - bankAccountType:'',//账户类别1 公户2私户 + bankAccountType:'2',//账户类别1 公户2私户 villageAccountType:'',//账户分类 payeeList:[{//收款方账户集合 payeeId:'0',//收款方id @@ -1238,6 +1237,26 @@ Page({ totalAmount:'', }, }); + //村账户查询参数 + var perames = { + pageNum:1, + pageSize:999, + accountType:'102', + method:'post', +   params: { +         "townAccountType":"0" +     } + } + // 付款方列表 + UTIL.httpRequest(API.URL_GET_SELECTACCOUNTLIST , perames, { + success: (res) => { + that.setData({ + accountOptions:res.rows, + ["form.transfers[0].applyDate"]: UTIL.formatDate(new Date()), + applyDate: UTIL.formatDate(new Date()), + }) + } + }) this.setData({ ["form.transfers"] : transList, activeNames:transList.length-1 @@ -1317,6 +1336,24 @@ Page({ ["form.transfers["+e.detail+"].showTitle"]:false }) }, + deleteimg(e){ + console.log(e); + let options = e.currentTarget.dataset.options; + + options.splice(e.currentTarget.dataset.index,1); + this.setData({ + [e.currentTarget.dataset.name]:options + }) + UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+e.currentTarget.dataset.id , {method:'GET'}, { + success: (res) => { + wx.showToast({ + title: '删除成功!', + icon: 'success', + duration: 2000, + }) + } + }) + }, /** * 生命周期函数--监听页面隐藏 */ diff --git a/pages/apply/paymentTemplate/add/add.wxml b/pages/apply/paymentTemplate/add/add.wxml index c859432..9eb6021 100644 --- a/pages/apply/paymentTemplate/add/add.wxml +++ b/pages/apply/paymentTemplate/add/add.wxml @@ -70,11 +70,29 @@ - + + + + + + + + + + + - + 关联项目 @@ -147,7 +165,7 @@ 付款方信息 - + - 付款方必填 + 付款方选择 @@ -199,7 +217,7 @@ - + @@ -238,12 +256,12 @@ --> - + - 姓名收款方 + 收款方选择 - + @@ -269,8 +287,13 @@ 收\n据 - - + + + + + + + @@ -278,8 +301,14 @@ 发\n票 - - + + + + + + + + @@ -287,8 +316,13 @@ 其\n他 - - + + + + + + + diff --git a/pages/apply/paymentTemplate/add/add.wxss b/pages/apply/paymentTemplate/add/add.wxss index 171486a..3647466 100644 --- a/pages/apply/paymentTemplate/add/add.wxss +++ b/pages/apply/paymentTemplate/add/add.wxss @@ -138,14 +138,15 @@ text{display: block;} display: flex; /* flex-wrap: wrap; */ } -.fj-li image{ - width: 25%; +.fj-li .img_li{ + width: 100%; height: 18.5vw; - margin-left: 5%; } -.fj-li image:nth-child(n+5){ - margin-top: 15px; + +.fj-li .img_add{ + overflow: hidden; } + .bottomBtn{ display: flex; width: 94%; @@ -357,6 +358,23 @@ text{display: block;} .img_box{ position: relative; width: 100%; + display: flex; + flex-wrap: wrap; + } + .img_box .img_list{ + width: 25%; + margin-left: 5%; + position: relative; + } + .img_box .img_list .van-icon{ + font-size: 20px; + position: absolute; + top: 0; + right: 0; + transform: translate(50%,-50%); + } + .img_box .img_list:nth-child(n+4){ + margin-top: 15px; } .van-cell--required:before { left: -8px!important; diff --git a/pages/drawee/add/add.js b/pages/drawee/add/add.js new file mode 100644 index 0000000..a64b12b --- /dev/null +++ b/pages/drawee/add/add.js @@ -0,0 +1,227 @@ +// pages/payee/add/add.js +import * as UTIL from '../../../utils/util.js'; +import * as API from '../../../utils/API.js'; +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + isIPX: app.globalData.isIPX, + form:{ + payee:'', + payeeAccount:'', + bankType:'', + bankDeposit:'', + accountType:'2', + payeeType:'1', + payeeTypeText:'收款方', + payeePaymentLines:'', + status:'0', + }, + showBankType:false, + showAccountType:false, + bankTypeOptions:[], + bankTypeText:'', + accountTypeOptions:[], + payeeTypeOptions:[], + accountTypeText:'', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + 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){ + console.log(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, + ["form.payeePaymentLines"]:even.detail.value.payeePaymentLines + }) + }, + closeBox(even){ + console.log(even.currentTarget.dataset.name); + this.setData({ + [even.currentTarget.dataset.name]:false + }) + }, + goSubmit(){ + console.log(this.data.form); + var that = this; + + if(that.data.form.bankType == ''){ + UTIL.showToastNoneIcon('请选择所属银行!'); + return; + } + if(that.data.form.payee == ''){ + UTIL.showToastNoneIcon('请填写户名!'); + return; + } + if(that.data.form.payeeAccount == ''){ + UTIL.showToastNoneIcon('请填写收款账号!'); + return; + } + if(that.data.form.payeeType == ''){ + UTIL.showToastNoneIcon('请选择收款人类型!'); + return; + } + if(that.data.form.accountType == ''){ + UTIL.showToastNoneIcon('请选择账户类型!'); + return; + } + if(that.data.form.bankDeposit == ''){ + UTIL.showToastNoneIcon('请选择开户行!'); + return; + } + if(that.data.form.payeePaymentLines == ''){ + UTIL.showToastNoneIcon('请输入联行号!'); + return; + } + + + that.setData({ + ['form.method']:'POST' + }) + UTIL.httpRequest(API.URL_GET_PAYEEADD, that.data.form, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + + let pages = getCurrentPages(); + let currentPage = null; //当前页面 + let prevPage = null; //上一个页面 + currentPage = pages[pages.length - 1]; //获取当前页面,将其赋值 + prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 + prevPage.onLoad(prevPage.options) + wx.navigateBack({ + delta:1 + }) + } + } + }) + }, + onChange(even){ + console.log(even); + this.setData({ + [even.currentTarget.dataset.formname]:even.detail + }) + }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/drawee/add/add.json b/pages/drawee/add/add.json new file mode 100644 index 0000000..88dadef --- /dev/null +++ b/pages/drawee/add/add.json @@ -0,0 +1,19 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "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" + } +} \ No newline at end of file diff --git a/pages/drawee/add/add.wxml b/pages/drawee/add/add.wxml new file mode 100644 index 0000000..ab5cbf5 --- /dev/null +++ b/pages/drawee/add/add.wxml @@ -0,0 +1,80 @@ + + + 新增付款方 + + + + + + + + + + + + + + + + + + + + + + 公户 + 私户 + + + + + + + + + + + + + + + + 确认 + \ No newline at end of file diff --git a/pages/drawee/add/add.wxss b/pages/drawee/add/add.wxss new file mode 100644 index 0000000..af85688 --- /dev/null +++ b/pages/drawee/add/add.wxss @@ -0,0 +1,59 @@ +/* pages/payee/add/add.wxss */ +.main-box{ + background: #ffffff; + padding: 20px; + width: 94%; + margin: 0 auto; + border-radius: 10px; + box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); +} +.table-box van-field van-cell .van-cell{ + margin-bottom: 15px; +} +.table-box van-field:last-child van-cell .van-cell{ + margin-bottom: 0px; +} +.van-cell{ + padding: 0!important; + margin-bottom: 15px; +} +.van-cell__value { + display: flex; + justify-content: flex-end; +} +.van-radio--horizontal { + margin-right: 0!important; + margin-left: var(--padding-sm,12px) +} +.van-cell--required:before { + left: 0!important; +} + +.van-field__label { + padding-left: 10px; +} + +.bottom{ + width: 100%; + margin: 0 auto; + text-align: center; + margin-top: 30px; + margin-bottom: 30px; + display: flex; + position: absolute; + bottom: 10%; +} + +.bottom view { + width: 47%; + margin: 0 auto; + border-radius: 30px; + display: inline-block; +} + +.bottom .btn2{ + border: 1px solid transparent; + padding: 8px 0px; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + color: #fff; +} \ No newline at end of file diff --git a/pages/drawee/drawee.js b/pages/drawee/drawee.js new file mode 100644 index 0000000..321bdd8 --- /dev/null +++ b/pages/drawee/drawee.js @@ -0,0 +1,240 @@ +import * as UTIL from '../../utils/util.js'; +import * as API from '../../utils/API.js'; +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + isIPX: app.globalData.isIPX, + show:false, + accountList:[], + approvalItemsOptions:[], + bookName:'', + accountListXJ:[] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + //跳转支出申请 +swichPaymentApply:function(e){ + console.log(e.currentTarget.dataset.current); + // let cur = e.currentTarget.dataset.current; + // if (this.data.currentTaB == cur) { + // return false; + // }else{ + // wx.navigateTo({ + // url: '../inCome/index?id=' + id, + // }) + // } + wx.navigateTo({ + url: '/pages/apply/paymentTemplate/add/add', + }) + }, + openBox:function(){ + var that = this ; + that.setData({ + show: true, + }) + }, + closeBox:function(){ + var that = this ; + that.setData({ + show: false, + }) + }, + goTemplate:function(e){ + wx.navigateTo({ + url: 'paymentTemplate/add/add?id='+e.currentTarget.dataset.id+'&type=template' + }) + }, + + updateMoney:function(e){ + UTIL.showLoadingHaveMask('正在查询'); + UTIL.httpRequest(API.URL_GET_GETBALANCEENQUIRY+e.currentTarget.dataset.id, {method:'GET'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({ + ["accountList["+e.currentTarget.dataset.index+"].balance"]:res.msg + }) + UTIL.hideLoadingHaveMask(); + wx.showToast({ + title: '查询成功', + icon: 'success', + duration: 2000, + }) + }else{ + UTIL.hideLoadingHaveMask(); + wx.showToast({ + title: '查询失败', + icon: 'error', + duration: 2000, + }) + } + } + }) + }, + + back:function(){ + wx.navigateBack({ + delta: 1 + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + var that = this; + var sendData = { + pageNum:'1', + pageSize:'100', + accountName:'', + bankAccountNumber:'', + status:'N', + method:'GET', + accountType:102 + } + var sendData2 = { + pageNum:'1', + pageSize:'100', + accountName:'', + bankAccountNumber:'', + status:'N', + method:'GET', + accountType:101 + } + UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({bookName:res.user.bookName}) + } + } + }) + UTIL.httpRequest(API.URL_GET_APPROVALITEMSLIST, {method:'GET',dataType:'1'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + that.setData({ + approvalItemsOptions : res.rows + }) + } + } + }) + UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData,{ + success: (res) => { + 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 ") + } + console.log(res.rows) + that.setData({ + accountList:res.rows + }) + } + }) + + UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData2,{ + success: (res) => { + 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 ") + } + console.log(res.rows) + that.setData({ + accountListXJ:res.rows + }) + } + }) + }, + delete(e){ + console.log(e); + var that = this; + UTIL.httpRequest(API.URL_GET_REMOVEAPPROVAL + e.currentTarget.dataset.id, {method:'GET'},{ + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + that.data.approvalItemsOptions.splice(e.currentTarget.dataset.index, 1); + wx.showToast({ + title: '删除成功!', + icon: 'success', + duration: 2000 + }) + that.setData({ + approvalItemsOptions : that.data.approvalItemsOptions + }) + } + } + }) + }, + getMr(e){ + var that = this; + UTIL.httpRequest(API.URL_GET_GETSETDEFAULTVALUES + e.currentTarget.dataset.id, {method:'GET'},{ + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + UTIL.httpRequest(API.URL_GET_APPROVALITEMSLIST, {method:'GET',dataType:'1'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + wx.showToast({ + title: '设置成功!', + icon: 'success', + duration: 2000 + }) + that.setData({ + approvalItemsOptions : res.rows + }) + } + } + }) + } + } + }) + }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + navigate(even){ + wx.navigateTo({ + url: even.currentTarget.dataset.url, + }) + }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/drawee/drawee.json b/pages/drawee/drawee.json new file mode 100644 index 0000000..95130fe --- /dev/null +++ b/pages/drawee/drawee.json @@ -0,0 +1,13 @@ +{ + "usingComponents": { + "van-tab": "@vant/weapp/tab/index", + "van-tabs": "@vant/weapp/tabs/index", + "van-action-sheet": "@vant/weapp/action-sheet/index", + "van-swipe-cell": "@vant/weapp/swipe-cell/index", + "van-cell": "@vant/weapp/cell/index", + "van-cell-group": "@vant/weapp/cell-group/index", + "van-icon": "@vant/weapp/icon/index", + "van-tag": "@vant/weapp/tag/index", + "van-empty": "@vant/weapp/empty/index" + } +} \ No newline at end of file diff --git a/pages/drawee/drawee.wxml b/pages/drawee/drawee.wxml new file mode 100644 index 0000000..30e2ca9 --- /dev/null +++ b/pages/drawee/drawee.wxml @@ -0,0 +1,101 @@ + + + + 支出申请 + + + + + 付款单位 + {{bookName}} + + + + + + + {{item.bankUseType == 1 ?'基本户':'一般户'}} + + + + + {{item.accountName}} + + + {{item.bankAccountNumber}}卡号 + 可用余额 + + {{item.balance}} + + + + + + + + 添加银行账户 + + + + + + + + + + {{item.accountName}} + + + {{item.bankAccountNumber}}科目 + 可用余额 + + {{item.balance}} + + + + + + + + 添加现金账户 + + + + + + + + + + + + + + 公务卡 + + 6217 0021 9000 7972 186卡号 + 可用余额 + 10,288.83 + + 持有人:王强 + + + + + + + 添加公务卡 + + + + + + + + + + var indexOf = function(name,value){ + return name.indexOf(value)>0; + } + module.exports.indexOf = indexOf; + \ No newline at end of file diff --git a/pages/drawee/drawee.wxss b/pages/drawee/drawee.wxss new file mode 100644 index 0000000..f520af3 --- /dev/null +++ b/pages/drawee/drawee.wxss @@ -0,0 +1,186 @@ +/* pages/drawee/drawee.wxss */ +.top{ + display: flex; + width: 94%; + margin: 0 auto; + background-color: #ffffff; + border-radius: 10px; + margin-top: 3vw; + overflow: hidden; +} +.top view{ + padding: 18px 15px; + align-items: center; + justify-content: center; + position: relative; +} +.top image{ + position: absolute; + width: 94%; +} +.top-title{ + flex: 1; + text-align: center; +} +.top-tit{ + color: #fff; +} +.main{ + width: 100%; + margin: 0 auto; + margin-top: 3vw; +} + +.van-tabs__nav { + background-color: #F4F4F4; +} + +.bank_content{ + color: #fff; + width: 100%; + padding: 2vh; +} + +.XJ{ + background:url('https://dazu.nongshen.net/api/profile/wechat/bg_XJ.png') no-repeat center; + background-size: 100% 100%; +} + +.ICBC{ + background:url('https://dazu.nongshen.net/api/profile/wechat/bg_ICBC.png') no-repeat center; + background-size: 100% 100%; +} +.ABC{ + background:url('https://dazu.nongshen.net/api/profile/wechat/bg_ABC.png') no-repeat center; + background-size: 100% 100%; +} +.CCB{ + background:url('https://dazu.nongshen.net/api/profile/wechat/bg_CCB.png') no-repeat center; + background-size: 100% 100%; +} +.RCB{ + background:url('https://dazu.nongshen.net/api/profile/wechat/bg_RCB.png') no-repeat center; + background-size: 100% 100%; +} +.gwk{ + background:url('https://dazu.nongshen.net/api/profile/wechat/bg_GWK.png') no-repeat center; + background-size: 100% 100%; +} + +.bankName{ + margin-top: 0!important; + display: flex; + align-items: center; +} +.bankName image{ + vertical-align: middle; + margin-right: 5px; +} +.bankName text{ + margin: 0!important; + display: inline-block; +} +.bank_content view{ + margin-top: 1vh; +} + +.bank_content view text{ + font-size: 14px; + margin-left: 10vw; +} + +.bank_box{ + position: relative; + box-shadow: 0px 5px 9px #ccc; + overflow: hidden; + border-radius: 15px; + width: 94%; + margin: 0 auto; + margin-bottom: 20px; +} +.bank_box:first-child{ + margin-top: 20px; +} +.zt { + font-size: 14px; + position: absolute; + top: 10px; + transform: rotate(45deg); + right: 0px; + color: #FFF; + z-index: 10; +} + +.holder{ + padding: 10px 25px ; + background-color: rgba(255,255,255,0.6); + color: #333333; + font-size: 16px; + border-top-left-radius: 30px; + border-bottom-left-radius: 30px; + position:absolute; + bottom:20%; + right:0; +} + +.bottom{ + width: 84%; + margin: 0 auto; + text-align: center; + margin-top: 30px; + margin-bottom: 30px; + display: flex; +} + +.bottom view { + width: 47%; + margin: 0 auto; + border-radius: 30px; + display: inline-block; +} + +.bottom .btn1{ + border: 1px solid #2C8E68; + padding: 8px 0px; + color: #2C8E68; +} + +.bottom .btn2{ + border: 1px solid transparent; + padding: 8px 0px; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + margin-left: 6%; + color: #fff; +} + +.deleteBox{ + width: 130px; + text-align: center; + height: 100%; + background: #F6F6F6; + align-items: center; + display: flex; +} +.van-action-sheet__header { + background: #f2f2f2; + color: #2C8E68; +} +.addBtn{ + display: flex; + align-items: center; + justify-content: center; + border: 1px dashed #5CAE77; + background: rgba(92, 174, 119, 0.1); + width: 94%; + padding: 10px 0; + border-radius: 10px; + margin: 0 auto; +} +.addBtn text{ + color: #2C8E68; + margin-left: 10px; +} +.addBtn image{ + width: 22.09px; + height: 22.09px; +} \ No newline at end of file diff --git a/pages/handle/expenditureAudit/expenditureAudit.js b/pages/handle/expenditureAudit/expenditureAudit.js index b5ec335..26f7667 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.js +++ b/pages/handle/expenditureAudit/expenditureAudit.js @@ -16,8 +16,10 @@ Page({ isIPX: app.globalData.isIPX, active:0, spsxOptions:[], + paymentPatternOptions:[], nickName:app.globalData.user, - comment:'' + comment:'', + activeNames: 0, }, /** @@ -84,6 +86,14 @@ Page({ }) } }) + // 支付方式 + UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'yn_pay_type', {method:'GET'}, { + success: (res) => { + that.setData({ + paymentPatternOptions:res.data, + }) + } + }) // 获取合同信息列表 UTIL.httpRequest(API.URL_GET_CONTRACTIONLIST , {method:'GET'}, { success: (res) => { @@ -103,6 +113,11 @@ Page({ res.data.transfers[index].bankTypeText = UTIL.getTransform(item.bankType,that.data.bankTypeOptions); + res.data.transfers[index].paymentPatternText = UTIL.getTransform(item.paymentPattern,that.data.paymentPatternOptions); + + res.data.transfers[index].num = UTIL.convertToChinaNum(index+1), + + res.data.transfers[index].showTitle = false; res.data.transfers[index].payeeList.forEach( (response,i) => { res.data.transfers[index].payeeList[i].bankTypeText = UTIL.getTransform(response.bankType,that.data.bankTypeOptions); }) @@ -192,7 +207,8 @@ Page({ }) }) that.setData({ - form:res.data + form:res.data, + activeNames:null }) } } @@ -305,6 +321,46 @@ Page({ comment:e.detail.value }) }, + onChangeBox(event) { + console.log(event); + this.setData({ + activeNames: event.detail, + }); + }, + onCloseSecond(e){ + var that = this ; + console.log(e); + that.setData({ + ["form.transfers["+e.detail+"].showTitle"]:false + }) + }, + onOpen(e){ + var that = this ; + console.log(that.data.activeNames); + console.log(e); + for (let i = 0; i < this.data.form.transfers.length; i++) { + const element = this.data.form.transfers[i]; + this.setData({ + ["form.transfers["+i+"].showTitle"] : false, + }) + } + that.setData({ + ["form.transfers["+e.detail+"].showTitle"]:true + }) + }, + 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] + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/handle/expenditureAudit/expenditureAudit.json b/pages/handle/expenditureAudit/expenditureAudit.json index c230a0f..fad0550 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.json +++ b/pages/handle/expenditureAudit/expenditureAudit.json @@ -15,6 +15,8 @@ "van-popup": "@vant/weapp/popup/index", "van-picker": "@vant/weapp/picker/index", "van-calendar": "@vant/weapp/calendar/index", - "van-dialog": "@vant/weapp/dialog/index" + "van-dialog": "@vant/weapp/dialog/index", + "van-collapse": "@vant/weapp/collapse/index", + "van-collapse-item": "@vant/weapp/collapse-item/index" } } \ No newline at end of file diff --git a/pages/handle/expenditureAudit/expenditureAudit.wxml b/pages/handle/expenditureAudit/expenditureAudit.wxml index 4f0975e..36eb8ce 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.wxml +++ b/pages/handle/expenditureAudit/expenditureAudit.wxml @@ -4,166 +4,264 @@ 支出申请 - + 审批事项 - + + + 支出总金额 + 提交单位:{{form.approvalItemTemplate.submitCompany}} - 提交日期:{{form.approvalItemTemplate.submitDate}} - 提 交 人:{{form.approvalItemTemplate.submitter}} + + 人:{{form.approvalItemTemplate.submitter}} + + 联系电话:{{form.approvalItemTemplate.telephone}} - 总 金 额:{{form.approvalItemTemplate.totalAmount}} + + - - 事项{{form.transfers[index].num}} - - 基础信息 - - - - - - - - - - - 关联项目 - - - - - - + + + + 事项{{form.transfers[index].num}} + - - - - 关联合同 - - - - + + 事项{{item.num}} + + 支出金额 + + + + 事由: + + + + + + + + + + + + + + - + + 基础信息 + + + + - 付款方信息 - - + - - - 付款方必填 - - + + + - - - + + + + 关联项目 + + + + - - - - - - - - - - + - - 收款方信息 - - - - - - 公户 - 私户 - - - - - - - - - - - + - - + - - - - 姓名收款方 + + 关联合同 + + + + + + + + - - - - + - - - - - - - - 附件可拍照 - - - 总数 {{form.transfers[index].fileNum?form.transfers[index].fileNum:0}}张 - - - - - - 收\n据 - - - - - + 付款方信息 + + + + + + 付款方选择 + + + + + + + + + + + + + + + + + + + + + - - - 发\n票 + 收款方信息 + + + + + + 公户 + 私户 + + + - - - + + + + + + 收款方选择 + + + + + + + - - - 其\n他 - - - - + + + + + + 附件可拍照 + + + 总数 {{form.transfers[index].fileNum?form.transfers[index].fileNum:0}}张 + + + + + + 收\n据 + + + + + + + + 发\n票 + + + + + + + + 其\n他 + + + + + + + - - - + + 审批流程 diff --git a/pages/handle/expenditureAudit/expenditureAudit.wxss b/pages/handle/expenditureAudit/expenditureAudit.wxss index 372a725..becec47 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.wxss +++ b/pages/handle/expenditureAudit/expenditureAudit.wxss @@ -17,13 +17,16 @@ text{display: block;} width: 100%; font-size: 16px; } -.input_tit{ +.input_tittop input{ border: 1px solid #DCDCDC; padding: 0px 10px; height: 32px; line-height: 32px; border-radius: 5px; - margin-bottom: 15px; + width: 100%; +} +.error input{ + border: 1px solid red!important; } .bgPage{ width: 140%; @@ -33,7 +36,8 @@ text{display: block;} z-index: -1; } .center{ - padding-bottom: 28px; + padding-bottom: 15px; + background: #f2f2f2; } .main-title{ background-image: linear-gradient(to right, #2C8E68 , #B3DB62); @@ -41,6 +45,7 @@ text{display: block;} font-size: 18px; padding: 10px 0; text-align: center; + position: relative; } .main-box{ background: #ffffff; @@ -56,9 +61,23 @@ text{display: block;} .title{ padding: 10px calc(3% + 20px); } +.topBox .van-cell{ + padding: 0!important; + margin-bottom: 15px; +} +.topBox .van-cell .van-cell__title, .topBox .van-cell .van-cell__value , .topBox .van-cell .van-field__label{ + font-size: 15px; + color: #000000!important; +} +.topBox .van-cell .van-cell__title{ + margin-right: 0!important; + max-width: 76px!important; + min-width: 76px!important; +} + .top-box{ - margin-top: 20px; - margin-bottom: 28px; + /* margin-top: 20px; + margin-bottom: 28px; */ } .top-box text{ margin-bottom: 15px; @@ -92,7 +111,7 @@ text{display: block;} border: 1px solid red; color: red; } -.van-cell{ +.table-box .van-cell{ padding: 0!important; } @font-face { @@ -112,7 +131,7 @@ text{display: block;} text-align: center; border-radius: 5px; white-space:pre-wrap; - padding: 22px 15px; + padding: 22px 8px; } .fj-li{ margin-top: 20px; @@ -132,6 +151,7 @@ text{display: block;} width: 94%; margin: 0 auto; justify-content:space-between; + margin-top: 30px; } .bottomBtn view{ display: flex; @@ -189,6 +209,242 @@ text{display: block;} color: #fff; width: 100%; } +.steps-box{ + padding: 0; + margin-top: 15px; +} +.steps-box .van-row{ + padding: 0 20px; +} + +.steps-box view{ + margin-bottom: 0; +} + +.steps-box .van-col{ + position: relative; + height: 70px; + } + .steps-box .van-col--21{ + padding: 12PX 0; + padding-left: 10px; + } + .steps-box .van-row:nth-child(2n){ + background: rgba(29,111,233,0.1); + } + .steps-box .van-cell{ + background: transparent; + padding: 0 10Px; + } + .steps-box .bq{ + display: inline-block; + padding: 0PX 10PX; + line-height: 0.64rem; + border-radius: 5PX; + } + .steps-box .index{ + background: #1D6FE9; + color: #ffffff; + text-align: center; + width: 20PX; + height: 20PX; + line-height: 20PX; + border-radius: 50%; + position: absolute; + left: 0; + top: 50%; + transform: translate(0,-50%); + } + .steps-box .indexCenter{ + top: 0!important; + } + .steps-box .van-row:first-child .van-col:first-child .indexBorder{ + top: calc(50% - 5px); + } + .steps-box .indexBorder{ + width: 10PX; + position: absolute; + right: 0; + top: 0; + height: 100%; + + } + .steps-box .indexBorder .yq{ + height: 10PX; + width: 10PX; + background: #C9C9C9; + border-radius: 50%; + } + .steps-box .indexBorder .ss{ + height: calc(50% - 5PX); + width: 1PX; + background: #C9C9C9; + position: relative; + left: 4PX; + } + .steps-box .indexBorder .ssT{ + height: calc(50% - 5PX); + width: 1PX; + background: #C9C9C9; + position: relative; + left: 4PX; + } + .agree{ + background-color: rgba(92, 174, 119, 0.1); + color:#5CAE77 ; + width: 80%; + text-align: center; + float: right; + } + .in{ + background-color: rgba(245, 163, 39, 0.1); + color:#F5A327 ; + width: 80%; + text-align: center; + float: right; + } + .disagree{ + background-color: rgba(233, 0, 0, 0.1); + color:#E90000 ; + width: 80%; + text-align: center; + float: right; + } + .steps-box .van-cell__title{ + flex: 0.7; + } + .steps-box .van-cell__value{ + flex: 0.3; + } + .steps-tit{ + font-size: 16px; + text-align: center; + background-color: #2C8E68; + color: #ffffff; + padding: 20px 0; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + } + .bottom{ + width: 84%; + margin: 0 auto; + text-align: center; + margin-top: 30px; + margin-bottom: 80px; + } + + .bottom button { + width: 47%; + margin: 0 auto; + border-radius: 30px; + display: inline-block; + } + + .bottom .btnAgree{ + border: 1px solid transparent; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + margin-left: 6%; + } + + .input_tit{ + border: 1px solid #DCDCDC; + padding: 0px 10px; + height: 32px; + line-height: 32px; + border-radius: 5px; + margin-bottom: 15px; + } + .img_box{ + position: relative; + width: 100%; + } + .van-cell--required:before { + left: -8px!important; + } + .input_money{ + padding: 0px 10px; + height: 32px; + line-height: 32px; + color: #E90000; + font-size: 26px; + display: inline-block; + width: 50%; + text-align: center; + } + + .money_box{ + font-size: 26px; + border-bottom:1px solid #DCDCDC; + width: 70%; + margin: 0 auto; + margin-bottom: 15px; + color: #E90000; + display: flex; + align-items: center; + justify-content: center; + } + + .btnBox{ + text-align: center; + position: relative; + height: 26px; + } + .down{ + width: 15px; + height: 8px; + margin: 0 auto; + margin-top: 18px; + } + + .update{ + width: 26px; + height: 26px; + position: absolute; + right: 41px; + } + .delete{ + width: 26px; + height: 26px; + position: absolute; + right: 0; + } + + .van-collapse-item { + background: transparent; + margin: 0 auto; + width: 100%; + margin: 0 auto; + margin-top: 15px; + } + .van-collapse-item__content{ + padding: 0!important; + } + + .van-collapse .van-cell{ + padding: 0; + background: transparent; + } + + .van-collapse .tit_box .title{ + text-align: center; + font-size: 18px; + } + .van-collapse .main-box{ + /* padding: 0; + box-shadow: none; */ + } + .van-collapse .tit_box{ + width: 94%; + background: #ffffff; + margin: 0 auto; + border-radius: 10px; + box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); + padding: 20px; + } + .van-collapse .tit_box .top-box .van-cell{ + margin-bottom: 15px; + } + .steps-box{ padding: 0; } diff --git a/pages/inCome/inCome.wxml b/pages/inCome/inCome.wxml index 40a71e0..b9016b5 100644 --- a/pages/inCome/inCome.wxml +++ b/pages/inCome/inCome.wxml @@ -7,7 +7,7 @@ 收入单位 - 龙水镇龙洞村股份经济联合社 + 学坝社区股份经济合作联合社 基础信息 diff --git a/pages/index/index.js b/pages/index/index.js index 44551aa..13ebc35 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -47,13 +47,48 @@ Page({ {"dictVale":10,"dictLabel":"现金提现"}, {"dictVale":11,"dictLabel":"现金使用"}, {"dictVale":12,"dictLabel":"汇票支出"} - ] + ], + showList:false, + showListText:'更多', + num:1 }, onLoad: function (options) { //获取滚动条高度 this.computeBarLocation(); }, - + openView(){ + var that = this; + let num = that.data.num; + console.log((num%2)); + if( (num%2) > 0 ){ + num++; + that.setData({ + showList:true, + showListText:'收起', + num:num + }) + }else{ + num++; + that.setData({ + showList:false, + showListText:'更多', + num:num + }) + } + }, + // getUserProfile(e) { + // // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认 + // // 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗 + // wx.getUserProfile({ + // desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 + // success: (res) => { + // this.setData({ + // userInfo: res.userInfo, + // hasUserInfo: true + // }) + // } + // }) + // }, onShow(){ //获取用户信息 this.getUserInfo() @@ -224,6 +259,12 @@ Page({ url: '../inCome/inCome?', }) }, + //跳转收入登记 + swichKeeping:function(e){ + wx.navigateTo({ + url: '/pages/Bookkeeping/Bookkeeping', + }) + }, //跳转支出申请 swichPayment:function(e){ console.log(e.currentTarget.dataset.current); @@ -492,7 +533,7 @@ Page({ showModal(){ wx.showModal({ title: '提示', - content: '功能正在开发中,敬请期待', + content: '此功能未正式启用!', showCancel: false, success (res) { if (res.confirm) { @@ -502,5 +543,10 @@ Page({ } } }) + }, + navigate(even){ + wx.navigateTo({ + url: even.currentTarget.dataset.url, + }) } }) \ No newline at end of file diff --git a/pages/index/index.json b/pages/index/index.json index 35c4329..8d542db 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -2,7 +2,8 @@ "usingComponents": { "icon-loading":"/component/iconLoading/iconLoading", "pop-up": "/component/pop-up/index", - "van-empty": "@vant/weapp/empty/index" + "van-empty": "@vant/weapp/empty/index", + "van-transition": "@vant/weapp/transition/index" }, "navigationStyle": "custom" } \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index a841c6e..d7f6f7f 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -5,7 +5,9 @@ - + + + @@ -55,7 +57,7 @@ 收入登记 - + @@ -70,34 +72,56 @@ - + 收款人 - + 付款人 - - 合同报送 + + 开户行 - 固资变动 + 银行汇票 - - - 资源变动 + + + + 工程项目 + + + + 合同信息 + + + + 合同报送 + + + + 固资变动 + + + + 资源变动 + + + + + {{showListText}} 待办{{todoNum}} 已办{{doneNum}} - 已发起{{yfqNum}} - 已制单{{yzdNum}} - > + 已提交{{yfqNum}} + 草稿箱{{yzdNum}} + @@ -135,7 +159,7 @@ - + @@ -177,9 +201,9 @@ - + - + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 4e8c525..071675e 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -21,8 +21,8 @@ .information_header .portrait_head{ width: 110rpx; height: 110rpx; - background: #000; border-radius: 50%; + overflow: hidden; } .information_header .information_main{ flex: 1; @@ -155,15 +155,20 @@ } .child_function{ - margin: 55rpx 20rpx 0; + margin: 35rpx 20rpx 0; display: flex; + flex-wrap: wrap; + align-content:space-between; } .child_function .flex_block{ - flex: 1; display: flex; justify-content: center; align-items: center; flex-direction: column; + width: 20%; +} +.child_function .flex_block:nth-child(n+6){ + margin-top: 25rpx; } .child_function .flex_block .image{ width: 76rpx; @@ -182,6 +187,7 @@ .work_plan{ padding: 40rpx 32.5rpx 30rpx; display: flex; + justify-content: space-between; } .work_plan .menu_item{ @@ -194,8 +200,6 @@ text-align: center; font-size: 32rpx; position: relative; - margin-right: 16rpx; - } .work_plan .menu_item.active{ background-color: #5bae78; diff --git a/pages/payee/add/add.js b/pages/payee/add/add.js index a124048..a64b12b 100644 --- a/pages/payee/add/add.js +++ b/pages/payee/add/add.js @@ -14,8 +14,9 @@ Page({ payeeAccount:'', bankType:'', bankDeposit:'', - accountType:'', - payeeType:'', + accountType:'2', + payeeType:'1', + payeeTypeText:'收款方', payeePaymentLines:'', status:'0', }, @@ -115,10 +116,12 @@ Page({ }) }, onConfirmDeposit(even){ + console.log(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, + ["form.payeePaymentLines"]:even.detail.value.payeePaymentLines }) }, closeBox(even){ diff --git a/pages/payee/add/add.wxml b/pages/payee/add/add.wxml index 7e5cfcd..b429a46 100644 --- a/pages/payee/add/add.wxml +++ b/pages/payee/add/add.wxml @@ -1,7 +1,7 @@ - 新增收款人 + 新增收款方 @@ -15,9 +15,9 @@ data-value="form.bankType" /> - - - + + + - + + + + 公户 + 私户 + + + + + + + + { let array = res.rows ; - for (let i = 0; i < array.length; i++) { - array[i].payeeAccountText = array[i].payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); - console.log(that.data.bankTypeOptions.filter(function (e) { return e.dictValue == array[i].bankType; })); - array[i].bankTypeText = (that.data.bankTypeOptions.filter(function (e) { return e.dictValue == array[i].bankType; }))[0].dictLabel; - } + var payeeType = that.data.payeeType; + var list = []; + array.map(res=>{ + + res.payeeAccountText = res.payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); + console.log(that.data.bankTypeOptions); + res.bankTypeText = (that.data.bankTypeOptions.filter(function (e) { return e.dictValue == res.bankType; }))[0].dictLabel; + + console.log(res); + + + if(payeeType == 2 && array.length>0){ + if(res.payeeType == 4 || res.payeeType == 3 ){ + console.log("2222222222222222222"); + list.push(res) + } + } + if(payeeType == 1 && array.length>0){ + if(res.payeeType == 1){ + console.log("111111111111111111"); + list.push(res) + } + } + }) that.setData({ - list:array, + list:list, }) } }) @@ -78,10 +97,10 @@ Page({ pageSize:999, orderByColumn:'id', isAsc:'asc', - isPeers:that.data.isPeers,//是否同行 - bankType:that.data.bankType,//所属银行 - accountType:that.data.accountType,//账户类型 - payeeType:that.data.payeeType,//申请转帐类型 + // isPeers:that.data.isPeers,//是否同行 + // bankType:that.data.bankType,//所属银行 + // accountType:that.data.accountType,//账户类型 + // payeeType:that.data.payeeType,//申请转帐类型 status:'0', name:e.detail, method:'GET' @@ -97,12 +116,28 @@ Page({ 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; - } + var payeeType = that.data.payeeType; + var list = []; + array.map(res=>{ + + res.payeeAccountText = res.payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); + res.bankTypeText = (that.data.bankTypeOptions.filter(function (e) { return e.dictValue == res.bankType; }))[0].dictLabel; + + if(payeeType == 2 && array.length>0){ + if(res.payeeType == 4 || res.payeeType == 3 ){ + console.log("2222222222222222222"); + list.push(res) + } + } + if(payeeType == 1 && array.length>0){ + if(res.payeeType == 1){ + console.log("111111111111111111"); + list.push(res) + } + } + }) that.setData({ - list:array, + list:list, }) } }) diff --git a/pages/payee/index.wxml b/pages/payee/index.wxml index 0d78ceb..784048d 100644 --- a/pages/payee/index.wxml +++ b/pages/payee/index.wxml @@ -27,7 +27,7 @@ use-label-slot > - + diff --git a/pages/payee/list/list.js b/pages/payee/list/list.js new file mode 100644 index 0000000..8b24f01 --- /dev/null +++ b/pages/payee/list/list.js @@ -0,0 +1,196 @@ +// pages/payee/index.js +import * as UTIL from '../../../utils/util.js'; +import * as API from '../../../utils/API.js'; +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + isIPX: app.globalData.isIPX, + list: {}, + result: "", + bankTypeOptions:[] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + console.log(options) + // 可优化:数据请求放到 onload中 新增后在子页面修改父页面数据 + var that = this; + that.setData({ + index:options.index + }) + var that = this; + // 获取收款账号列表 + let prames = { + pageNum:1, + pageSize:999, + orderByColumn:'id', + isAsc:'desc', + 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 ; + var payeeType = that.data.payeeType; + var list = []; + array.map(res=>{ + + res.payeeAccountText = res.payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); + console.log(that.data.bankTypeOptions); + res.bankTypeText = (that.data.bankTypeOptions.filter(function (e) { return e.dictValue == res.bankType; }))[0].dictLabel; + + console.log(res); + list.push(res) + }) + that.setData({ + list:list, + }) + } + }) + }, + 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 ; + var payeeType = that.data.payeeType; + var list = []; + array.map(res=>{ + res.payeeAccountText = res.payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); + res.bankTypeText = (that.data.bankTypeOptions.filter(function (e) { return e.dictValue == res.bankType; }))[0].dictLabel; + list.push(res) + }) + that.setData({ + list:list, + }) + } + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + onChange(event) { + console.log(event); + this.setData({ + result: event.detail, + }); + }, + + toggle(event) { + const { index } = event.currentTarget.dataset; + const checkbox = this.selectComponent(`.checkboxes-${index}`); + checkbox.toggle(); + }, + back:function(){ + wx.navigateBack({ + delta: 1 + }) + }, + 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; }); + array[0].incomeAmount = that.data.money; + 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["+that.data.index+"].payeeList[0]"]: array[0]//将想要传的信息赋值给上一个页面data中的值 + }) + that.back() + } + }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/payee/list/list.json b/pages/payee/list/list.json new file mode 100644 index 0000000..fc8dd62 --- /dev/null +++ b/pages/payee/list/list.json @@ -0,0 +1,11 @@ +{ + "usingComponents": { + "van-checkbox": "@vant/weapp/checkbox/index", + "van-checkbox-group": "@vant/weapp/checkbox-group/index", + "van-cell": "@vant/weapp/cell/index", + "van-cell-group": "@vant/weapp/cell-group/index", + "van-search": "@vant/weapp/search/index", + "van-radio": "@vant/weapp/radio/index", + "van-radio-group": "@vant/weapp/radio-group/index" + } +} \ No newline at end of file diff --git a/pages/payee/list/list.wxml b/pages/payee/list/list.wxml new file mode 100644 index 0000000..e9ef879 --- /dev/null +++ b/pages/payee/list/list.wxml @@ -0,0 +1,43 @@ + + + + 支出申请 + + + + 新增 + + + + + + + + + + + + + {{item.payee}} + + + {{item.payeeAccountText}}    {{item.bankTypeText}} + + + + diff --git a/pages/payee/list/list.wxss b/pages/payee/list/list.wxss new file mode 100644 index 0000000..5746d72 --- /dev/null +++ b/pages/payee/list/list.wxss @@ -0,0 +1,66 @@ +/* pages/payee/index.wxss */ +page{background-color: #fff;} +.value-class { + flex: none !important; +} +.van-cell:after { + border-bottom: 1px solid #ddd!important; +} +.van-cell{ + background-color: transparent!important; +} +.van-search__content { + border: 1px solid #5CAE77!important; + background: transparent!important; +} +van-search { + flex: 0.8; +} +.search_box{ + display: flex; +} +.add_btn{ + flex: 0.2; + padding: var(--search-padding,10px 12px); + padding-left: 0; +} +.add_btn text{ + background-color: #62AD66; + display: block; + height: 100%; + text-align: center; + line-height: 36px; + color: #fff; + border-radius: 36px; + box-shadow: 0px 5px 5px #ddd; +} +.bottom{ + width: 100%; + margin: 0 auto; + text-align: center; + padding-top: 30px; + padding-bottom: 30px; + display: flex; + position: fixed; + bottom: 0; + background: #FFF; + box-shadow: 0px -5px 9px #eee; +} + +.bottom view { + width: 47%; + margin: 0 auto; + border-radius: 30px; + display: inline-block; +} + +.bottom .btn2{ + border: 1px solid transparent; + padding: 8px 0px; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + color: #fff; +} + +.van-radio-group{ + padding-bottom: 100px; +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 07b0f87..52b14dc 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -73,11 +73,25 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "记账申请", + "pathName": "pages/Bookkeeping/Bookkeeping", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "收款人列表", + "pathName": "pages/payee/list/list", + "query": "", + "launchMode": "default", + "scene": null } ] } }, "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "projectname": "WXMB", - "libVersion": "2.23.4" + "libVersion": "2.24.0" } \ No newline at end of file diff --git a/utils/API.js b/utils/API.js index 7551628..37766aa 100644 --- a/utils/API.js +++ b/utils/API.js @@ -149,6 +149,15 @@ const URL_GET_GETRELATIONADD = `${URL_PREFIX}/contraction/info/relationAdd`; //根据申请转账id获取关联合同信息 const URL_GET_GETSELECTINFOBYOUTID = `${URL_PREFIX}/contraction/info/selectInfoByOutId`; +//付款账号余额查询 +const URL_GET_GETBALANCEENQUIRY = `${URL_PREFIX}/yinnong/transfer/balanceEnquiry/`; + +//通过审批事项id设置默认模板 +const URL_GET_GETSETDEFAULTVALUES = `${URL_PREFIX}/yinnong/approvalItems/setDefaultValues/`; + +//根据附件id删除附件信息 +const URL_GET_GETFILEREMOVE = `${URL_PREFIX}/system/attachment/remove/`; + /****************接口地址end****************/ @@ -213,5 +222,8 @@ export { URL_GET_ADDPROJECTTO, URL_GET_GETPROJECTTO, URL_GET_GETRELATIONADD, - URL_GET_GETSELECTINFOBYOUTID + URL_GET_GETSELECTINFOBYOUTID, + URL_GET_GETBALANCEENQUIRY, + URL_GET_GETSETDEFAULTVALUES, + URL_GET_GETFILEREMOVE } \ No newline at end of file diff --git a/utils/util.js b/utils/util.js index 138e9f6..1728268 100644 --- a/utils/util.js +++ b/utils/util.js @@ -274,7 +274,7 @@ function getCOdeFromWX({ complate }) { /** * ,获取到的微信用户信息(昵称、头像、省市 赋值给globalData.wxUserInfo) */ -function getUserInfoFomWX({ success }) { +function getUserInfoFomWX() { wx.getUserProfile({ desc: '用于完善会员资料', success: res => { @@ -285,7 +285,6 @@ function getUserInfoFomWX({ success }) { // getApp().globalData.wxUserInfo.city = res.userInfo.city; console.log("获取到个人信息:" + res.userInfo.nickName); success(res); - }, complete: res => { }