ソースを参照

优化

master
pangdongxu 3年前
コミット
cc484481f3
12個のファイルの変更152行の追加41行の削除
  1. バイナリ
      image/icon/icon_zfkl.png
  2. +33
    -22
      pages/apply/approval/approval.js
  3. +3
    -3
      pages/apply/approval/approval.wxml
  4. +4
    -8
      pages/apply/paymentTemplate/add/add.js
  5. +2
    -2
      pages/apply/paymentTemplate/add/add.wxml
  6. +1
    -0
      pages/apply/paymentTemplate/add/add.wxss
  7. +70
    -1
      pages/drawee/drawee.js
  8. +1
    -0
      pages/drawee/drawee.json
  9. +18
    -1
      pages/drawee/drawee.wxml
  10. +8
    -0
      pages/drawee/drawee.wxss
  11. +1
    -1
      project.private.config.json
  12. +11
    -3
      utils/API.js

バイナリ
image/icon/icon_zfkl.png ファイルの表示

変更前 変更後
幅: 24  |  高さ: 24  |  サイズ: 755 B

+ 33
- 22
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) => {


+ 3
- 3
pages/apply/approval/approval.wxml ファイルの表示

@@ -96,7 +96,7 @@
</van-swipe-cell> -->

<scroll-view scroll-y="true" style="height: 400rpx;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-top="0">
<van-swipe-cell right-width="{{ 65 }}" wx:for="{{templateList}}" wx:key="index" wx:for-item="item" >
<van-swipe-cell right-width="{{ 65 }}" wx:for="{{templateList}}" wx:key="index" wx:for-item="item">
<van-cell title="{{item.name}}" bindtap='chooseTemplate' data-id="{{item.id}}">
<van-icon slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" />
</van-cell>
@@ -111,8 +111,8 @@
<van-empty wx:if="{{templateList.length == 0}}" description="暂无审批模板" />
</van-action-sheet>
<modal hidden="{{!showPopup}}" title="审批模板" confirm-text="保存" cancel-text="取消" bindcancel="cancelTem" bindconfirm="confirmTem">
<input type='text' value="{{temName}}" placeholder="请输入模板名称" bindinput="inputTem" auto-focus/>
<input type='text' value="{{temName}}" placeholder="请输入模板名称" bindinput="inputTem"/>
</modal>
<modal hidden="{{!showPopup2}}" title="支付模板" confirm-text="保存" cancel-text="取消" bindcancel="cancelTemNew" bindconfirm="confirmTemNew">
<input type='text' value="{{temName2}}" placeholder="请输入模板名称" bindinput="inputTem2" auto-focus/>
<input type='text' value="{{temName2}}" placeholder="请输入模板名称" bindinput="inputTem2"/>
</modal>

+ 4
- 8
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,
})


+ 2
- 2
pages/apply/paymentTemplate/add/add.wxml ファイルの表示

@@ -71,11 +71,11 @@
<view class="main-box table-box">
<!-- <van-field label="申请流水号" value="{{ form.approvalItemTemplate.telephone }}" placeholder="请输入申请流水号" border="{{ false }}" bind:change="onChange" input-align="right"/> -->
<van-field readonly="{{form.transfers[index].amountReadonly}}" required label="支出金额" type="digit" error="{{form.transfers[index].expenditureAmountTirme}}" type="digit" value="{{ form.transfers[index].expenditureAmount }}" placeholder="0.00" border="{{ false }}" data-formname="form.transfers[{{index}}].expenditureAmount" data-index="{{index}}" input-align="right" bind:input="onChangeMoney"/>
<van-field readonly="{{form.transfers[index].amountReadonly}}" required label="支出金额" type="digit" type="digit" value="{{ form.transfers[index].expenditureAmount }}" placeholder="0.00" border="{{ false }}" data-formname="form.transfers[{{index}}].expenditureAmount" data-index="{{index}}" input-align="right" bind:input="onChangeMoney"/>

<!-- <van-field required label="收入金额" value="{{ form.transfers[index].payeeList[childrenIndex].incomeAmount }}" placeholder="请输入收入金额" border="{{ false }}" bind:change="onChangeMoney" input-align="right" data-formname="form.transfers[{{index}}].payeeList[{{childrenIndex}}]" data-index="{{index}}" data-childrenIndex="{{childrenIndex}}"/> -->

<van-field required label="支出原因" focus="{{form.transfers[index].remarkTirme}}" error="{{form.transfers[index].remarkTirme}}" value="{{ form.transfers[index].remark }}" placeholder="请输入支出原因" border="{{ false }}" bind:change="onChange" input-align="right" data-formname="form.transfers[{{index}}].remark" data-value="form.transfers[{{index}}].remark"/>
<van-field required label="支出原因" focus="{{form.transfers[index].remarkTirme}}" value="{{ form.transfers[index].remark }}" placeholder="请输入支出原因" border="{{ false }}" bind:change="onChange" input-align="right" data-formname="form.transfers[{{index}}].remark" data-value="form.transfers[{{index}}].remark"/>
<van-popup show="{{form.transfers[index].showTransferType}}" round position="bottom" bind:close="closeBox" data-name="form.transfers[{{index}}].showTransferType">
<van-picker


+ 1
- 0
pages/apply/paymentTemplate/add/add.wxss ファイルの表示

@@ -181,6 +181,7 @@ text{display: block;}
margin-top: 50px;
margin-bottom: 50px;
display: flex;
z-index: 999999;
}

.bottom view {


+ 70
- 1
pages/drawee/drawee.js ファイルの表示

@@ -12,7 +12,21 @@ Page({
accountList:[],
approvalItemsOptions:[],
bookName:'',
accountListXJ:[]
accountListXJ:[],
showDialog:false,
projectId:'',
beforeClose(action) {
return new Promise((resolve) => {
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});
},
/**
* 生命周期函数--监听页面隐藏
*/


+ 1
- 0
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"
}
}

+ 18
- 1
pages/drawee/drawee.wxml ファイルの表示

@@ -27,6 +27,9 @@
<view>可用余额</view>
<view style="font-weight: bold;font-size: 22px;margin-top: 2vh;">
{{item.balance}}
<image src="/image/icon/icon_zfkl.png" data-id="{{item.id}}" data-index="{{index}}" bindtap="showDialog" style="width: 20px;height: 20px;vertical-align: middle;position: absolute;right: calc(2vh + 30px);z-index: 10;"></image>

<image src="/image/apply/update.png" data-id="{{item.id}}" data-index="{{index}}" bindtap="updateMoney" style="width: 20px;height: 20px;vertical-align: middle;position: absolute;right: 2vh;z-index: 10;"></image>
</view>
</view>
@@ -90,7 +93,21 @@
</van-tab> -->
</van-tabs>
</view>

<van-dialog
use-slot
title="修改支付口令"
show="{{ showDialog }}"
bind:close="onClose"
theme='round-button'
confirmButtonText="保存"
data-type="1"
bind:confirm="edit"
before-close="{{beforeClose }}"
closeOnClickOverlay="{{ true }}"
>
<input class="input_tit" placeholder="请输入新的口令" style="width: 90%;margin: 0 auto;margin-top: 25px;margin-bottom: 10px;text-align: center;border: 1px solid #ddd;height: 35px;line-height: 35px;" value="{{form.approvalItemTemplate.templateName}}" password bindinput="bindNameInput"/>
<text style="width: 90%;margin: 0 auto;margin-top: 15px;margin-bottom: 10px;font-size: 12px;display: block;color: red;text-align: center;">提示:\n此口令为银农直联平台支付人员权限的验证!\n至少6个字符,必须包括字母、数字和符号</text>
</van-dialog>
<view class="ipXbtn"></view>

<wxs module="iOf">


+ 8
- 0
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;
}

+ 1
- 1
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"
}

+ 11
- 3
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
}

読み込み中…
キャンセル
保存