From cc484481f38a42a5de38abdd30567d5bec8ac9e1 Mon Sep 17 00:00:00 2001 From: pangdongxu <850374051@qq.com> Date: Sat, 28 May 2022 16:30:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- image/icon/icon_zfkl.png | Bin 0 -> 755 bytes pages/apply/approval/approval.js | 55 +++++++++++------- pages/apply/approval/approval.wxml | 6 +- pages/apply/paymentTemplate/add/add.js | 12 ++-- pages/apply/paymentTemplate/add/add.wxml | 4 +- pages/apply/paymentTemplate/add/add.wxss | 1 + pages/drawee/drawee.js | 71 ++++++++++++++++++++++- pages/drawee/drawee.json | 1 + pages/drawee/drawee.wxml | 19 +++++- pages/drawee/drawee.wxss | 8 +++ project.private.config.json | 2 +- utils/API.js | 14 ++++- 12 files changed, 152 insertions(+), 41 deletions(-) create mode 100644 image/icon/icon_zfkl.png diff --git a/image/icon/icon_zfkl.png b/image/icon/icon_zfkl.png new file mode 100644 index 0000000000000000000000000000000000000000..565fb143a844b06d9de65a8f63277ae010fd31e8 GIT binary patch literal 755 zcmV7m^Zvf(rjEsyAa2dmh zO#*6gJy0$Ip97HO7693e*et@Z0BAVKwez7aCenPcGLVlFftG-L1qUb=01XGZ7-TpK zc>3urL)U@T3^!gs0gG#h$}p5Ugfd9;31f2r$P$o`zyNLmF2hehxy6vbX$FHj&`>93 zeXyo|cP}#B1X?!HFN48UMh%-KfiRzdEr5pkc_0%Mkto1zPBnw6tQteBdpwGG_0EM1 zXP(?<*qPjd%>qzx8G_;jW&y}cs3rgfK(0?(-Oq3|tCxX~oeRaFPd~pgSWhcvm={`z z%NGlQ79=o2U4I{&GZvrQ%g}Xj4a4Qa>DZ(hK)#DLaspy!tnxrXMUVvrKt?|{71NGy zVVHhmD^3d%SNDNkpJnNT%Ys6X1qXn#_Q)!3ynYOf*qIE^fT@QVAO%cKprFE%st$rI zcmOm+9@!vJ1a7)^f*7;mYW%b;FcJb#@&d?$|L7)xybeks$bg59gQ46Z3@p@nU=_oc zUq4XfO=MIV=7$zxIErWsn%&|U0<sE;q%Y$#P|Rl$r#BLn*|`#Kq&Q369%cxr4j?5bqvc}M;u>Zst~!CF zu!7WT3t)P1Rhb|K;NT(wfPy6fZUmJRrtEdbNAAV;@nS+f8D002ovPDHLkV1jOgHQN9H literal 0 HcmV?d00001 diff --git a/pages/apply/approval/approval.js b/pages/apply/approval/approval.js index 5b4bd30..f2900a9 100644 --- a/pages/apply/approval/approval.js +++ b/pages/apply/approval/approval.js @@ -212,51 +212,61 @@ Page({ }) }, chooseTemplate:function(e){ + var that = this ; let data = { method:"GET" } UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { - success: (res) => { - if (res.code == API.SUCCESS_CODE) { + success: (res2) => { + if (res2.code == API.SUCCESS_CODE) { that.setData({ - username:res.user.nickName, + username:res2.user.nickName, }) - - } - } - }) - UTIL.httpRequest(API.URL_GET_GETAPPROVALBYID+e.currentTarget.dataset.id, data, { - success: (res) => { - if (res.code == API.SUCCESS_CODE) { - let list = []; - res.data.map((rr,index) => { - if(rr.nickName == that.data.username){ - res.data.splice(index,1); + UTIL.httpRequest(API.URL_GET_GETAPPROVALBYID+e.currentTarget.dataset.id, data, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + let list = []; + res.data.map((rr,index) => { + if(rr.nickName == res2.user.nickName){ + res.data.splice(index,1); + } + list.push(rr.userId+"") + }) + res.data.map((rrr,index)=>{ + rrr.name = index+1 + }) + this.setData({templateDetailList:res.data,result:list}); + this.closeBox(); + } } - list.push(rr.userId+"") }) - this.setData({templateDetailList:res.data,result:list}); - this.closeBox(); } } }) + }, deleteTemplate:function(e){ - let ids = [e.currentTarget.dataset.id] - let url = API.URL_GET_MOBILEREMOVE+ids + let ids =e.currentTarget.dataset.id; + let data = { + id:ids, + status:"1" + } + let url = API.URL_GET_MOBILEREMOVE let _this = this wx.request({ url, - method:"GET", + method:"POST", timeout: 60000, + data:data, header: { 'Authorization':'Bearer '+getApp().globalData.userInfo.token }, success: function (response) { console.log(e); + console.log(response) _this.data.templateList.splice(e.currentTarget.dataset.index, 1); wx.showToast({ - title: '删除成功!', + title: '禁用成功!', icon: 'success', duration: 2000 }) @@ -316,7 +326,8 @@ Page({ }) let parmes = { pageNum:'1', - pageSize:'999' + pageSize:'999', + status:"0" } UTIL.httpRequest(API.URL_GET_TEMPLATELIST,parmes ,{ success: (res) => { diff --git a/pages/apply/approval/approval.wxml b/pages/apply/approval/approval.wxml index 5206db2..08cda93 100644 --- a/pages/apply/approval/approval.wxml +++ b/pages/apply/approval/approval.wxml @@ -96,7 +96,7 @@ --> - + @@ -111,8 +111,8 @@ \ No newline at end of file diff --git a/pages/apply/paymentTemplate/add/add.js b/pages/apply/paymentTemplate/add/add.js index 1367310..48fcd1f 100644 --- a/pages/apply/paymentTemplate/add/add.js +++ b/pages/apply/paymentTemplate/add/add.js @@ -1273,7 +1273,7 @@ Page({ }else{ wx.showToast({ title: '操作失败', - icon: 'success', + icon: 'error', duration: 2000 }) } @@ -1593,11 +1593,11 @@ Page({ var that = this ; console.log(e.currentTarget.dataset.index); // that.data.form.transfers[e.currentTarget.dataset.index].collapseDis = true; - if(that.data.form.transfers.length<2){ - UTIL.showToastNoneIcon('最少保留一条事项'); that.setData({ - ["form.transfers["+e.currentTarget.dataset.index+"].collapseDis"]:false + ["form.transfers["+e.currentTarget.dataset.index+"].collapseDis"]:true }) + if(that.data.form.transfers.length<2){ + UTIL.showToastNoneIcon('最少保留一条事项'); return; } that.data.form.approvalItemTemplate.totalAmount = parseFloat(parseFloat(that.data.form.approvalItemTemplate.totalAmount)- parseFloat(that.data.form.transfers[e.currentTarget.dataset.index].expenditureAmount)).toFixed(2); @@ -1607,10 +1607,6 @@ Page({ that.data.form.transfers[i].num = UTIL.convertToChinaNum(i+1) } console.log(that.data.form); - - - console.log(parseFloat(that.data.form.approvalItemTemplate.totalAmount)); - console.log(parseFloat(that.data.form.transfers[e.currentTarget.dataset.index].expenditureAmount)); that.setData({ form:that.data.form, }) diff --git a/pages/apply/paymentTemplate/add/add.wxml b/pages/apply/paymentTemplate/add/add.wxml index 0bb40ca..31f9590 100644 --- a/pages/apply/paymentTemplate/add/add.wxml +++ b/pages/apply/paymentTemplate/add/add.wxml @@ -71,11 +71,11 @@ - + - + { + setTimeout(() => { + if (action === 'confirm') { + // 拦截确认操作 + resolve(false); + } else { + resolve(true); + } + }, 0); + }); + } }, /** @@ -208,6 +222,61 @@ swichPaymentApply:function(e){ } }) }, + showDialog(e){ + var that = this ; + that.setData({showDialog:true,projectId:e.currentTarget.dataset.id}) + }, + //支付口令修改 + edit(e){ + var that = this ; + var zz = /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]{6,}$/; + if(!(zz.test(that.data.password))){ + wx.showToast({ + title: '请根据提示修改', + icon: 'error', + duration: 2000, + }) + return; + } + let data = { + id: that.data.projectId , + accountPassword: that.data.password, + method:'POST' + } + UTIL.httpRequest(API.URL_GET_PASSWORDEDIT, data,{ + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + wx.showToast({ + title: '设置成功!', + icon: 'success', + duration: 2000 + }) + that.setData({ + showDialog : false, + id: '' , + accountPassword: '', + }) + }else if(res.code == "403"){ + wx.showToast({ + title: "无修改权限", + icon: 'error', + duration: 2000 + }) + }else{ + wx.showToast({ + title: "系统错误", + icon: 'error', + duration: 2000 + }) + } + } + }) + }, + bindNameInput(e){ + var that = this ; + console.log(e); + that.setData({password:e.detail.value}); + }, /** * 生命周期函数--监听页面隐藏 */ diff --git a/pages/drawee/drawee.json b/pages/drawee/drawee.json index 95130fe..344d848 100644 --- a/pages/drawee/drawee.json +++ b/pages/drawee/drawee.json @@ -8,6 +8,7 @@ "van-cell-group": "@vant/weapp/cell-group/index", "van-icon": "@vant/weapp/icon/index", "van-tag": "@vant/weapp/tag/index", + "van-dialog": "@vant/weapp/dialog/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 index 02838b3..8d254e3 100644 --- a/pages/drawee/drawee.wxml +++ b/pages/drawee/drawee.wxml @@ -27,6 +27,9 @@ 可用余额 {{item.balance}} + + + @@ -90,7 +93,21 @@ --> - + + + 提示:\n此口令为银农直联平台支付人员权限的验证!\n至少6个字符,必须包括字母、数字和符号 + diff --git a/pages/drawee/drawee.wxss b/pages/drawee/drawee.wxss index f520af3..104bf07 100644 --- a/pages/drawee/drawee.wxss +++ b/pages/drawee/drawee.wxss @@ -183,4 +183,12 @@ .addBtn image{ width: 22.09px; height: 22.09px; +} + +.van-button--danger { + background: linear-gradient(to right, #429a68, #9ecf67)!important; +} +.van-dialog__header { + color: #429a68; + font-size: 20px; } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index bb0c074..95c2f7d 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -149,5 +149,5 @@ }, "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "projectname": "WXMB", - "libVersion": "2.24.3" + "libVersion": "2.24.2" } \ No newline at end of file diff --git a/utils/API.js b/utils/API.js index 81a0564..f975a7e 100644 --- a/utils/API.js +++ b/utils/API.js @@ -81,7 +81,7 @@ const URL_GET_TEMPLATELIST = `${URL_PREFIX}/service/template/list`; const URL_GET_TEMPLATEDETAIL = `${URL_PREFIX}/yinnong/approvalProcess/getApprovalProcessByItemId/`; //查询审批流模板列表 -const URL_GET_GETAPPROVALBYID = `${URL_PREFIX}/service/templateDetail/getApprovalByTemplateId//`; +const URL_GET_GETAPPROVALBYID = `${URL_PREFIX}/service/templateDetail/getApprovalByTemplateId/`; //根据系统组织机构id查询所在乡镇 const URL_GET_TOWNINFOBYDEPTID = `${URL_PREFIX}/system/dept/getTownInfoByDeptId/`; //根据条件查询用户信息 @@ -89,7 +89,7 @@ const URL_GET_USERLIST = `${URL_PREFIX}/system/user/queryUserByBookId`; //新增模板 const URL_POST_MOBILEADD = `${URL_PREFIX}/service/template/mobileAdd`; //删除模板 -const URL_GET_MOBILEREMOVE = `${URL_PREFIX}/service/template/remove/`; +const URL_GET_MOBILEREMOVE = `${URL_PREFIX}/service/template/edit`; //通过审批事项id查询审批事项 const URL_GET_APPROVALITEMSBYID = `${URL_PREFIX}/yinnong/approvalItems/get/`; //审批流id保存到事项审批 @@ -263,6 +263,12 @@ const URL_GET_FINANCIALLIST = `${URL_PREFIX}/finance/open/financialAmountPublicM //删除开户行 const URL_GET_DEPOSITDELETE = `${URL_PREFIX}/yinnong/deposit/remove/`; +//支付口令修改 +const URL_GET_PASSWORDEDIT = `${URL_PREFIX}/cashier/account/editPassWord`; + +//收款人修改 +const URL_GET_PAYEEEDIT = `${URL_PREFIX}/yinnong/payee/edit`; + /****************接口地址end****************/ @@ -364,5 +370,7 @@ export { URL_POST_PERMANENTADD, URL_POST_PERMANENTUPDATE, URL_GET_FINANCIALLIST, - URL_GET_SUBJECTLIST + URL_GET_SUBJECTLIST, + URL_GET_PASSWORDEDIT, + URL_GET_PAYEEEDIT } \ No newline at end of file