From ae4451e6bf0d4f5a136ad5b1a23907e65a9dc809 Mon Sep 17 00:00:00 2001 From: pangdongxu <850374051@qq.com> Date: Thu, 14 Apr 2022 17:32:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env/env.js | 16 +- pages/apply/paymentTemplate/add/add.js | 188 +++++++++------ .../expenditureAudit/expenditureAudit.js | 218 ++++++++++++++++++ .../expenditureAudit/expenditureAudit.json | 9 +- .../expenditureAudit/expenditureAudit.wxml | 207 ++++++++++++----- .../expenditureAudit/expenditureAudit.wxss | 140 ++++++++--- pages/handle/liist.js | 45 ++-- pages/handle/liist.wxml | 14 +- pages/index/index.js | 40 +++- pages/index/index.wxml | 26 +-- utils/API.js | 8 +- 11 files changed, 697 insertions(+), 214 deletions(-) diff --git a/env/env.js b/env/env.js index 45a8b43..67cd1c7 100644 --- a/env/env.js +++ b/env/env.js @@ -1,18 +1,18 @@ module.exports = { DEV: { - // URL_PREFIX: 'http://192.168.31.178/api', - URL_PREFIX: 'https://dazu.nongshen.net/api', + URL_PREFIX: 'http://192.168.31.178/api', + // URL_PREFIX: 'https://dazu.nongshen.net/api', }, PRE: { - // URL_PREFIX: 'http://192.168.31.178:8080/api', - URL_PREFIX: 'https://dazu.nongshen.net/api', + URL_PREFIX: 'http://192.168.31.178:8080/api', + // URL_PREFIX: 'https://dazu.nongshen.net/api', }, PROD: { - // URL_PREFIX: 'http://192.168.31.178:8080/api', - URL_PREFIX: 'https://dazu.nongshen.net/api', + URL_PREFIX: 'http://192.168.31.178:8080/api', + // URL_PREFIX: 'https://dazu.nongshen.net/api', }, IMGURL: { - // URL_PREFIX: 'http://192.168.31.178:8080', - URL_PREFIX: 'https://dazu.nongshen.net', + URL_PREFIX: 'http://192.168.31.178:8080', + // URL_PREFIX: 'https://dazu.nongshen.net', } } \ No newline at end of file diff --git a/pages/apply/paymentTemplate/add/add.js b/pages/apply/paymentTemplate/add/add.js index ce32952..0a857b7 100644 --- a/pages/apply/paymentTemplate/add/add.js +++ b/pages/apply/paymentTemplate/add/add.js @@ -130,75 +130,131 @@ Page({ 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_transfer', - tableId:res.data.approvalItemTemplate.id, - fileType:1 - }, - { - success: (res) => { - let list = []; - res.data.forEach(item=>{ - list.push({ - tempFilePath:URL_PREFIX+item.fileUrl + + 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 + }); + } + } + }) }) - }) - that.setData({ - SJimage:list - }); - } - }) - //发票 - UTIL.httpRequest( - API.URL_GET_FINDLIST, - { - method:'GET', - tableName:'t_yinnong_transfer', - tableId:res.data.approvalItemTemplate.id, - fileType:2 - }, - { - success: (res) => { - let list = []; - res.data.forEach(item=>{ - list.push({ - tempFilePath:URL_PREFIX+item.fileUrl + + } + }) + //发票 + 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 + }); + } + } + }) }) - }) - that.setData({ - FPimage:list - }); - } - }) - //其他 - UTIL.httpRequest( - API.URL_GET_FINDLIST, - { - method:'GET', - tableName:'t_yinnong_transfer', - tableId:res.data.approvalItemTemplate.id, - fileType:3 - }, - { - success: (res) => { - let list = []; - res.data.forEach(item=>{ - list.push({ - tempFilePath:URL_PREFIX+item.fileUrl + } + }) + //其他 + 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({ - QTimage:list - }); - } + } + }) + }) + that.setData({ + form:res.data }) } } diff --git a/pages/handle/expenditureAudit/expenditureAudit.js b/pages/handle/expenditureAudit/expenditureAudit.js index 8b2aeff..5afa726 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.js +++ b/pages/handle/expenditureAudit/expenditureAudit.js @@ -1,4 +1,11 @@ // pages/handle/expenditureAudit/expenditureAudit.js +import * as UTIL from '../../../utils/util.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(); Page({ @@ -47,7 +54,218 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { + var that = this; + console.log(options); + UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + that.setData({ + ["form.approvalItemTemplate.submitCompany"]:res.user.bookName, + ["form.approvalItemTemplate.submitDate"]:UTIL.js_date_time(new Date()), + ["form.approvalItemTemplate.submitter"]:res.user.nickName, + ["form.approvalItemTemplate.telephone"]:res.user.phonenumber, + }) + } + } + }) + //所属银行 + 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'}, { + success: (res) => { + that.setData({ + capitalExpenditureTypeOptions:res.data, + }) + } + }) + // 付款方式类型字典查询 + UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'transfer_type', {method:'GET'}, { + success: (res) => { + that.setData({ + transferTypeOptions:res.data, + }) + } + }) + // 项目工程列表 + UTIL.httpRequest(API.URL_GET_GETPROJECTLIST , {method:'GET'}, { + success: (res) => { + that.setData({ + projectOptions:res.rows, + }) + } + }) + // 工程款类型字典查询 + UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'project_fund_type', {method:'GET'}, { + success: (res) => { + that.setData({ + projectFundTypeOptions:res.data, + }) + } + }) + // 获取合同信息列表 + UTIL.httpRequest(API.URL_GET_CONTRACTIONLIST , {method:'GET'}, { + success: (res) => { + that.setData({ + contractionOptions:res.rows, + }) + } + }) + UTIL.httpRequest(API.URL_GET_APPROVALITEMS+options.id, {method:'GET'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + console.log(that.data.capitalExpenditureTypeOptions); + if(res.data.approvalItemTemplate == null){return;} + 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); + }) + + 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:res.data + }) + } + } + }) + // 查询审批事项流转进度 + UTIL.httpRequest(API.URL_GET_GETPROCESS+options.id , {method:'GET'}, { + success: (res) => { + console.log(res); + } + }) }, /** diff --git a/pages/handle/expenditureAudit/expenditureAudit.json b/pages/handle/expenditureAudit/expenditureAudit.json index b3365dc..c230a0f 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.json +++ b/pages/handle/expenditureAudit/expenditureAudit.json @@ -8,6 +8,13 @@ "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-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", + "van-dialog": "@vant/weapp/dialog/index" } } \ No newline at end of file diff --git a/pages/handle/expenditureAudit/expenditureAudit.wxml b/pages/handle/expenditureAudit/expenditureAudit.wxml index 0e67bf7..f7af5a2 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.wxml +++ b/pages/handle/expenditureAudit/expenditureAudit.wxml @@ -6,76 +6,161 @@ 审批事项 - 房屋出租整年费用 - 提交单位:龙华村联合社 - 提交日期:2022年1月18日 - 提 交 人:报账员 - 联系电话:13906311234 + + 提交单位:{{form.approvalItemTemplate.submitCompany}} + 提交日期:{{form.approvalItemTemplate.submitDate}} + 提 交 人:{{form.approvalItemTemplate.submitter}} + 联系电话:{{form.approvalItemTemplate.telephone}} -事项一 - - 基础信息 - - 申请流水号 2056886342464224214 - 申请时间 2021-1-26 - 合计支出 ¥ 00.00 - 支出原因 请输入支出原因 - 资金支出类别 结算类 - - 付款方信息 - - 付款方式 2056886342464224214 - 付款方名称必填 2021-1-26 - 付款方账号 ¥ 00.00 - 所属银行 请输入支出原因 - 转账附言 结算类 - - 收款方信息 - - 收款账户类型 结算类 + + 事项{{form.transfers[index].num}} + + 基础信息 - 张曼玉 2056886342464224214 - 李四 2021-1-26 - 收款账户 6785 4565 4554 5111 542 - 开户银行 中国银行哈工大支行 - 收入金额 ¥153000 - 所属银行 中国银行哈工大支行 + + + + + + + - + + 关联项目 + + + + + + + + - - - - - 附件可拍照 + + 关联合同 + + + + - - 总数6张 + + + + 付款方信息 + + + + + + 付款方必填 + + + + + + + + + + + + + + + + + + + + 收款方信息 + + + + + + 公户 + 私户 + + + - - - - -收 -据 - + + + + + + + + + - - -发 -票 - + + + + + 姓名收款方 + + + + + + + - - -其 -他 - + + + + + + + 附件可拍照 + + + 总数 {{form.transfers[index].fileNum?form.transfers[index].fileNum:0}}张 + + + + + + 收\n据 + + + + + + + + + 发\n票 + + + + + + + + + 其\n他 + + + + + + - 审批流程 @@ -115,7 +200,7 @@ - + diff --git a/pages/handle/expenditureAudit/expenditureAudit.wxss b/pages/handle/expenditureAudit/expenditureAudit.wxss index 90c616f..35d03a4 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.wxss +++ b/pages/handle/expenditureAudit/expenditureAudit.wxss @@ -1,4 +1,4 @@ -/* pages/handle/expenditureAudit/expenditureAudit.wxss */ +/* pages/apply/paymentTemplate/add/add.wxss */ text{display: block;} .top{ height: 64px; @@ -17,24 +17,13 @@ text{display: block;} width: 100%; font-size: 16px; } -.pure_top { - width: 100%; - height: 120px; - position: absolute; - z-index: -1; - overflow: hidden -} - -.pure_top::after { - content: ''; - width: 140%; - height: 120px; - position: absolute; - left: -20%; - top: 0; - z-index: -1; - border-radius: 0 0 50% 50%; - background: linear-gradient(to right, #2C8E68, #B3DB62); +.input_tit{ + border: 1px solid #DCDCDC; + padding: 0px 10px; + height: 32px; + line-height: 32px; + border-radius: 5px; + margin-bottom: 15px; } .bgPage{ width: 140%; @@ -43,6 +32,9 @@ text{display: block;} height: 300px; z-index: -1; } +.center{ + padding-bottom: 28px; +} .main-title{ background-image: linear-gradient(to right, #2C8E68 , #B3DB62); color: #ffffff; @@ -71,27 +63,28 @@ text{display: block;} .top-box text{ margin-bottom: 15px; } -.main-box view{ - margin-bottom: 15px; -} -.main-box view:last-child{ +.top-box text:last-child{ margin-bottom: 0px; } .box-title{ color: #2C8E68; text-align: center; + font-size: 16px; } .center-box .main-box{ margin-bottom: 15px; } -.xm{ +.xm van-cell:first-child .van-cell{ border-bottom: 1px solid #cccccc; margin: 0; - padding-bottom: 15px; + padding-bottom: 15px!important; + margin-bottom: 15px; } -.table-box view{ - display: flex; - justify-content: space-between; +.table-box van-field van-cell .van-cell{ + margin-bottom: 15px; +} +.table-box van-field:last-child van-cell .van-cell{ + margin-bottom: 0px; } .table-box view text icon{ display: inline-block; @@ -116,13 +109,85 @@ text{display: block;} .fj-box text{ background-color: #5CAE77; color: #ffffff; - display: inline-block; text-align: center; border-radius: 5px; - white-space:pre-wrap + white-space:pre-wrap; + padding: 22px 15px; } .fj-li{ margin-top: 20px; + display: flex; + /* flex-wrap: wrap; */ +} +.fj-li image{ + width: 25%; + height: 18.5vw; + margin-left: 5%; +} +.fj-li image:nth-child(n+5){ + margin-top: 15px; +} +.bottomBtn{ + display: flex; + width: 94%; + margin: 0 auto; + justify-content:space-between; +} +.bottomBtn view{ + display: flex; + width: 48%; + background-color: #ffffff; + border-radius: 5px; + box-shadow: 0px 5px 9px #DCDCDC; + padding: 10px 0px; + text-align: center; + align-items:center; + justify-content:center; + font-size: 14px; + color: #2C8E68; +} +.bottomBtn view image{ + width: 18px; + height: 18px; + margin-right: 5px; +} + + +.bottom{ + width: 84%; + margin: 0 auto; + text-align: center; + margin-top: 50px; + margin-bottom: 50px; + 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; +} +.bottom .btn3{ + border: 1px solid transparent; + padding: 8px 0px; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + color: #fff; + width: 100%; } .steps-box{ padding: 0; @@ -245,7 +310,7 @@ text{display: block;} margin: 0 auto; text-align: center; margin-top: 30px; - margin-bottom: 30px; + margin-bottom: 80px; } .bottom button { @@ -259,4 +324,17 @@ text{display: block;} 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%; } \ No newline at end of file diff --git a/pages/handle/liist.js b/pages/handle/liist.js index 4a92d05..9844319 100644 --- a/pages/handle/liist.js +++ b/pages/handle/liist.js @@ -1,6 +1,7 @@ // pages/handle/liist.js import * as UTIL from '../../utils/util.js'; import * as API from '../../utils/API.js'; +const app = getApp(); Page({ /** @@ -37,7 +38,8 @@ Page({ {"dictVale":10,"dictLabel":"现金提现"}, {"dictVale":11,"dictLabel":"现金使用"}, {"dictVale":12,"dictLabel":"汇票支出"} - ] + ], + userInfoObj:[] }, /** @@ -50,15 +52,29 @@ Page({ }else{ this.setData({pageTitle:"发起/制单"}) } - //查询待办 - this.getTaskList(); - //查询已办 - this.getTaskDoneList(); - //查询已发起 - this.getTransferList(); - this.getTransferList1(); - //查询已制单 - this.getTransferList2(); + //获取用户信息 + this.getUserInfo() + + }, + /* 获取用户信息*/ + getUserInfo(){ + UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({userInfoObj:res.user}) + this.setData({region:res.user.deptName}) + this.setData({item:JSON.stringify(res.user)}) + //查询待办 + this.getTaskList(); + //查询已办 + this.getTaskDoneList(); + //查询已发起 + this.getTransferList(); + //查询已制单 + this.getTransferList2(); + } + } + }) }, bindPickerChange:function(e){zhibob this.setData({index:e.detail.value}); @@ -68,6 +84,7 @@ Page({ active:e.currentTarget.dataset.gid }) }, + dictTranslate(d,value){ let val = "" for(var index in d){ @@ -127,7 +144,7 @@ Page({ // pageNum:1, // pageSize:10, transferType:"1", - auditStatus:"2", + status:"5", method:"GET", capitalExpenditureType:(this.data.index+1) } @@ -173,12 +190,14 @@ Page({ }, //已制单 getTransferList2:function(e){ + console.log(this.data.userInfoObj) let data = { // pageNum:1, // pageSize:10, transferType:"1", - auditStatus:"0", - method:"GET" + status:"0", + method:"GET", + submitter:this.data.userInfoObj.nickName } UTIL.httpRequest(API.URL_GET_TRANSFERLIST,data, { success: (res) => { diff --git a/pages/handle/liist.wxml b/pages/handle/liist.wxml index 7a81459..bb92f15 100644 --- a/pages/handle/liist.wxml +++ b/pages/handle/liist.wxml @@ -32,7 +32,7 @@ --> - + @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -95,16 +95,16 @@ - {{item.payer}} + {{item.submitter}} - {{item.applyDate}} + {{item.submitDate}} - {{item.remark}} + {{item.approvalItems}} - {{item.expenditureAmount}} + {{item.totalAmount}} diff --git a/pages/index/index.js b/pages/index/index.js index c9bfd9f..1035711 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -59,11 +59,7 @@ Page({ this.getTaskList(); //查询已办 this.getTaskDoneList(); - //查询已发起 - this.getTransferList(); - this.getTransferList1(); - //查询已制单 - this.getTransferList2(); + //查询dept this.getTreeDept(); }, @@ -101,7 +97,8 @@ Page({ orderByColumn:"A.ID_", isAsc:"desc", systemType:4, - method:"GET" + method:"GET", + taskName:'相关人员审批' } UTIL.httpRequest(API.URL_GET_TASKLIST,data, { success: (res) => { @@ -129,7 +126,8 @@ Page({ orderByColumn:"A.ID_", isAsc:"desc", systemType:4, - method:"GET" + method:"GET", + taskName:'相关人员审批' } UTIL.httpRequest(API.URL_GET_TASKDONELIST,data, { success: (res) => { @@ -155,8 +153,9 @@ Page({ // pageNum:1, // pageSize:10, transferType:"1", - auditStatus:"2", - method:"GET" + status:"5", + method:"GET", + applyUserName:this.data.userInfoObj.nickName } UTIL.httpRequest(API.URL_GET_TRANSFERLIST,data, { success: (res) => { @@ -202,8 +201,9 @@ Page({ // pageNum:1, // pageSize:10, transferType:"1", - auditStatus:"0", - method:"GET" + status:"0", + method:"GET", + submitter:this.data.userInfoObj.nickName } UTIL.httpRequest(API.URL_GET_TRANSFERLIST,data, { success: (res) => { @@ -279,6 +279,12 @@ Page({ this.setData({region:res.user.deptName}) this.setData({item:JSON.stringify(res.user)}) this.getBookList() + //查询已制单 + this.getTransferList2(); + + //查询已发起 + this.getTransferList(); + // this.getTransferList1(); } } }) @@ -459,5 +465,15 @@ Page({ }) }) } - } + }, + godetail:function(e){ + wx.navigateTo({ + url: '/pages/apply/paymentTemplate/add/add?id='+e.currentTarget.dataset.id, + }) + }, + gosee:function(e){ + wx.navigateTo({ + url: '/pages/handle/expenditureAudit/expenditureAudit?id='+e.currentTarget.dataset.id, + }) + }, }) \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 54cc24c..0df3dc6 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -100,20 +100,20 @@ - + - {{item.formData.payer}} + {{item.formData.approvalItems}} - {{item.formData.applyDate}} + {{item.formData.applyTime}} {{item.formData.remark}} - {{item.formData.expenditureAmount}} + {{item.formData.totalAmount}} @@ -138,33 +138,33 @@ - {{item.payer}} + {{item.submitter}} - {{item.applyDate}} + {{item.submitDate}} - {{item.remark}} + {{item.approvalItems}} - {{item.expenditureAmount}} + {{item.totalAmount}} - + - {{item.payer}} + {{item.submitter}} - {{item.applyDate}} + {{item.submitDate}} - {{item.remark}} + {{item.approvalItems}} - {{item.expenditureAmount}} + {{item.totalAmount}} diff --git a/utils/API.js b/utils/API.js index 9b10539..df798b7 100644 --- a/utils/API.js +++ b/utils/API.js @@ -38,7 +38,7 @@ const URL_GET_TASKLIST = `${URL_PREFIX}/activiti/process/taskList`; //获取已办 const URL_GET_TASKDONELIST = `${URL_PREFIX}/activiti/process/taskDoneList`; //获取已发起、已制单 -const URL_GET_TRANSFERLIST = `${URL_PREFIX}/yinnong/transfer/list`; +const URL_GET_TRANSFERLIST = `${URL_PREFIX}/yinnong/approvalItems/list`; // 修改密码 const URL_POST_UPDATEPWD = `${URL_PREFIX}/system/user/profile/updatePwd`; // 上传图片 @@ -125,6 +125,9 @@ const URL_GET_APPROVALITEMS = `${URL_PREFIX}/yinnong/approvalItems/getApprovalIt //通过审批事项id删除审批模板 const URL_GET_REMOVEAPPROVAL = `${URL_PREFIX}/yinnong/approvalItems/remove/`; +//查询审批事项流转进度 +const URL_GET_GETPROCESS = `${URL_PREFIX}/yinnong/approvalItems/getProcessSchedule/`; + /****************接口地址end****************/ export { @@ -179,5 +182,6 @@ export { URL_GET_USERAPPRO, URL_GET_FINDLIST, URL_GET_APPROVALITEMS, - URL_GET_REMOVEAPPROVAL + URL_GET_REMOVEAPPROVAL, + URL_GET_GETPROCESS } \ No newline at end of file From 7e9e520a5a324f60b27b948505b46dc030405823 Mon Sep 17 00:00:00 2001 From: pangdongxu <850374051@qq.com> Date: Fri, 15 Apr 2022 13:37:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../expenditureAudit/expenditureAudit.js | 83 +++++++++++-------- .../expenditureAudit/expenditureAudit.wxml | 20 ++--- pages/index/index.js | 2 +- pages/index/index.wxml | 12 +-- utils/API.js | 6 +- utils/util.js | 2 +- 6 files changed, 71 insertions(+), 54 deletions(-) diff --git a/pages/handle/expenditureAudit/expenditureAudit.js b/pages/handle/expenditureAudit/expenditureAudit.js index 5afa726..83de29e 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.js +++ b/pages/handle/expenditureAudit/expenditureAudit.js @@ -14,40 +14,8 @@ Page({ */ data: { isIPX: app.globalData.isIPX, - steps: [ - { - assigneeName: '同意', - activityName: '测试测试', - durationInMillis: '描述信息', - endTime: '2022-01-02', - comment: '同意', - type: '1' - }, - { - assigneeName: '申请中', - activityName: '测试测试', - durationInMillis: '描述信息', - endTime: '2022-01-02', - comment: '同意', - type: '2' - }, - { - assigneeName: '驳回', - activityName: '测试测试', - durationInMillis: '描述信息', - endTime: '2022-01-02', - comment: '同意', - type: '3' - }, - { - assigneeName: '步骤四', - activityName: '测试测试', - durationInMillis: '描述信息', - endTime: '2022-01-02', - comment: '同意' - }, - ], - active:0 + active:0, + spsxOptions:[] }, /** @@ -56,6 +24,9 @@ Page({ onLoad: function (options) { var that = this; console.log(options); + that.setData({ + taskId:options.taskId + }) UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { success: (res) => { if (res.code == API.SUCCESS_CODE) { @@ -264,10 +235,52 @@ Page({ UTIL.httpRequest(API.URL_GET_GETPROCESS+options.id , {method:'GET'}, { success: (res) => { console.log(res); + that.setData({ + spsxOptions:res.data.processSchedule.spsx, + instanceId:res.data.instanceId + }) + } + }) + }, + goDis(){ + var that = this ; + let data = { + taskId:that.data.taskId, + instanceId:that.data.instanceId, + variables:JSON.stringify({ + comment:'驳回', + pass:false, + }), + method:'POST' + }; + UTIL.httpRequest(API.URL_GET_PROCESSCOMPLETE , data, { + success: (res) => { + console.log(res); + // that.setData({ + // spsxOptions:res.data.processSchedule.spsx + // }) + } + }) + }, + goAgree(){ + var that = this ; + let data = { + taskId:that.data.taskId, + instanceId:that.data.instanceId, + variables:JSON.stringify({ + "comment":'同意', + "pass":true, + }) + }; + UTIL.httpRequest(API.URL_GET_PROCESSCOMPLETE ,data, { + success: (res) => { + console.log(res); + // that.setData({ + // spsxOptions:res.data.processSchedule.spsx + // }) } }) }, - /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/handle/expenditureAudit/expenditureAudit.wxml b/pages/handle/expenditureAudit/expenditureAudit.wxml index f7af5a2..8261f29 100644 --- a/pages/handle/expenditureAudit/expenditureAudit.wxml +++ b/pages/handle/expenditureAudit/expenditureAudit.wxml @@ -164,7 +164,7 @@ 审批流程 - + {{index+1}} @@ -172,29 +172,29 @@ - + - + - - {{ item.assigneeName }} - {{ item.assigneeName }} - {{ item.assigneeName }} + + {{ item.comment }} + {{ item.comment }} + {{ item.comment }} {{ item.durationInMillis }} - {{ item.endTime }} + {{ item.time.substr(0,10) }} @@ -202,6 +202,6 @@ - - + + diff --git a/pages/index/index.js b/pages/index/index.js index 1035711..4d01682 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -473,7 +473,7 @@ Page({ }, gosee:function(e){ wx.navigateTo({ - url: '/pages/handle/expenditureAudit/expenditureAudit?id='+e.currentTarget.dataset.id, + url: '/pages/handle/expenditureAudit/expenditureAudit?id='+e.currentTarget.dataset.id+'&taskId='+e.currentTarget.dataset.taskid, }) }, }) \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 0df3dc6..d3fe2bf 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -100,7 +100,7 @@ - + @@ -111,7 +111,7 @@ - {{item.formData.remark}} + {{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}} {{item.formData.totalAmount}} @@ -121,16 +121,16 @@ - {{item.formData.payer}} + {{item.formData.approvalItems}} - {{item.formData.applyDate}} + {{item.formData.applyTime}} - {{item.formData.remark}} + {{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}} - {{item.formData.expenditureAmount}} + {{item.formData.totalAmount}} diff --git a/utils/API.js b/utils/API.js index df798b7..34b7dc6 100644 --- a/utils/API.js +++ b/utils/API.js @@ -128,6 +128,9 @@ const URL_GET_REMOVEAPPROVAL = `${URL_PREFIX}/yinnong/approvalItems/remove/`; //查询审批事项流转进度 const URL_GET_GETPROCESS = `${URL_PREFIX}/yinnong/approvalItems/getProcessSchedule/`; +//审批流办理 +const URL_GET_PROCESSCOMPLETE = `${URL_PREFIX}/activiti/process/mobileComplete`; + /****************接口地址end****************/ export { @@ -183,5 +186,6 @@ export { URL_GET_FINDLIST, URL_GET_APPROVALITEMS, URL_GET_REMOVEAPPROVAL, - URL_GET_GETPROCESS + URL_GET_GETPROCESS, + URL_GET_PROCESSCOMPLETE } \ No newline at end of file diff --git a/utils/util.js b/utils/util.js index 138e9f6..1ee5c99 100644 --- a/utils/util.js +++ b/utils/util.js @@ -118,7 +118,7 @@ function httpRequest(url, data, { wx.request({ url, data: finalData, - method:data.method, + method:data.method?data.method:'POST', timeout: 60000, header: { 'Authorization':'Bearer '+getApp().globalData.userInfo.token