@@ -58,7 +58,7 @@ contact-button { | |||||
.ns image{ | .ns image{ | ||||
position: absolute; | position: absolute; | ||||
left: 3%; | left: 3%; | ||||
width: 20px; | |||||
width: 35px; | |||||
z-index: 9; | z-index: 9; | ||||
} | } | ||||
.ns text{ | .ns text{ | ||||
@@ -1,18 +1,18 @@ | |||||
module.exports = { | module.exports = { | ||||
DEV: { | 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: { | 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: { | 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: { | IMGURL: { | ||||
URL_PREFIX: 'http://192.168.31.178:8080', | |||||
// URL_PREFIX: 'https://dazu.nongshen.net/api', | |||||
// URL_PREFIX: 'http://192.168.31.178:8080', | |||||
URL_PREFIX: 'https://dazu.nongshen.net/api', | |||||
} | } | ||||
} | } |
@@ -9,9 +9,13 @@ Page({ | |||||
*/ | */ | ||||
data: { | data: { | ||||
isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
result:['1'], | |||||
result2:['1'], | |||||
showGroup:true | |||||
result:[], | |||||
result2:[], | |||||
showGroup:true, | |||||
flowList:[], | |||||
showProjectFundType:false, | |||||
checkedStatusText:'未提交', | |||||
checkedStatus:'1' | |||||
}, | }, | ||||
/** | /** | ||||
@@ -27,7 +31,58 @@ Page({ | |||||
this.setData({result2:event.detail}) | this.setData({result2:event.detail}) | ||||
}, | }, | ||||
switchTab(e){ | switchTab(e){ | ||||
var that = this; | |||||
this.setData({showGroup:e.currentTarget.dataset.gid}) | this.setData({showGroup:e.currentTarget.dataset.gid}) | ||||
if(e.currentTarget.dataset.gid){ | |||||
//收入事项 | |||||
let data = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
accountType:'', | |||||
checkedStatus:this.data.checkedStatus, | |||||
incomeExpensesType:'1', | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data ,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
let list = res.rows; | |||||
for (let i = 0; i < list.length; i++) { | |||||
const element = list[i]; | |||||
element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||||
element.incomeTypeText = UTIL.getTransform(element.incomeType,that.data.incomeTypeOptions); | |||||
} | |||||
this.setData({ | |||||
flowListSR:list, | |||||
flowListSRNum:res.total | |||||
}); | |||||
} | |||||
} | |||||
}) | |||||
}else{ | |||||
let data2 = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
accountType:'', | |||||
checkedStatus:this.data.checkedStatus, | |||||
incomeExpensesType:'2', | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data2 ,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
let list = res.rows; | |||||
for (let i = 0; i < list.length; i++) { | |||||
const element = list[i]; | |||||
element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||||
} | |||||
this.setData({ | |||||
flowListZC:list, | |||||
flowListZCNum:res.total | |||||
}); | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}, | }, | ||||
back:function(){ | back:function(){ | ||||
wx.navigateBack({ | wx.navigateBack({ | ||||
@@ -45,9 +100,165 @@ Page({ | |||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow() { | onShow() { | ||||
var that = this; | |||||
}, | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'checked_status', {method:'GET'}, { | |||||
success: (res) => { | |||||
that.setData({ | |||||
capitalExpenditureTypeOptions:res.data, | |||||
}) | |||||
} | |||||
}) | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'income_type', {method:'GET'}, { | |||||
success: (res) => { | |||||
that.setData({ | |||||
incomeTypeOptions:res.data, | |||||
}) | |||||
} | |||||
}) | |||||
//收入事项 | |||||
let data = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
accountType:'', | |||||
checkedStatus:'1', | |||||
incomeExpensesType:'1', | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data ,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
let list = res.rows; | |||||
for (let i = 0; i < list.length; i++) { | |||||
const element = list[i]; | |||||
element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||||
element.incomeTypeText = UTIL.getTransform(element.incomeType,that.data.incomeTypeOptions); | |||||
} | |||||
this.setData({ | |||||
flowListSR:list, | |||||
flowListSRNum:res.total | |||||
}); | |||||
} | |||||
} | |||||
}) | |||||
//支出事项 | |||||
let data2 = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
accountType:'', | |||||
checkedStatus:'1', | |||||
incomeExpensesType:'2', | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data2 ,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
let list = res.rows; | |||||
for (let i = 0; i < list.length; i++) { | |||||
const element = list[i]; | |||||
element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||||
} | |||||
this.setData({ | |||||
flowListZC:list, | |||||
flowListZCNum:res.total | |||||
}); | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
openPopup(even){ | |||||
this.setData({ | |||||
showProjectFundType:true | |||||
}) | |||||
}, | |||||
onConfirmPick(event){ | |||||
var that = this; | |||||
this.setData({ | |||||
[event.currentTarget.dataset.name]: false, | |||||
checkedStatus: event.detail.value.dictValue, | |||||
checkedStatusText: event.detail.value.dictLabel, | |||||
}); | |||||
if(that.data.showGroup){ | |||||
let data = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
accountType:'', | |||||
checkedStatus:event.detail.value.dictValue, | |||||
incomeExpensesType:'1', | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data ,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
let list = res.rows; | |||||
for (let i = 0; i < list.length; i++) { | |||||
const element = list[i]; | |||||
element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||||
element.incomeTypeText = UTIL.getTransform(element.incomeType,that.data.incomeTypeOptions); | |||||
} | |||||
this.setData({ | |||||
flowListSR:list, | |||||
flowListSRNum:res.total | |||||
}); | |||||
} | |||||
} | |||||
}) | |||||
}else{ | |||||
let data2 = { | |||||
pageNum:'1', | |||||
pageSize:'999', | |||||
accountType:'', | |||||
checkedStatus:event.detail.value.dictValue, | |||||
incomeExpensesType:'2', | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data2 ,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
let list = res.rows; | |||||
for (let i = 0; i < list.length; i++) { | |||||
const element = list[i]; | |||||
element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||||
} | |||||
this.setData({ | |||||
flowListZC:list, | |||||
flowListZCNum:res.total | |||||
}); | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}, | |||||
closeBox(even){ | |||||
console.log(even.currentTarget.dataset.name); | |||||
this.setData({ | |||||
[even.currentTarget.dataset.name]:false | |||||
}) | |||||
}, | |||||
goSubmit(){ | |||||
var that = this ; | |||||
let url = API.URL_GET_GETBOOKKEEP | |||||
wx.request({ | |||||
url, | |||||
method:"POST", | |||||
timeout: 60000, | |||||
data:that.data.result, | |||||
header: { | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
}, | |||||
success: function (response) { | |||||
wx.showToast({ | |||||
title: "提交成功!", | |||||
duration: 2000, | |||||
icon:"success" | |||||
}) | |||||
setTimeout(function(){ | |||||
wx.reLaunch({ | |||||
url: '/pages/index/index' | |||||
}) | |||||
},2000) | |||||
} | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
*/ | */ | ||||
@@ -3,6 +3,9 @@ | |||||
"van-cell": "@vant/weapp/cell/index", | "van-cell": "@vant/weapp/cell/index", | ||||
"van-cell-group": "@vant/weapp/cell-group/index", | "van-cell-group": "@vant/weapp/cell-group/index", | ||||
"van-checkbox": "@vant/weapp/checkbox/index", | "van-checkbox": "@vant/weapp/checkbox/index", | ||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index" | |||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index", | |||||
"van-empty": "@vant/weapp/empty/index", | |||||
"van-popup": "@vant/weapp/popup/index", | |||||
"van-picker": "@vant/weapp/picker/index" | |||||
} | } | ||||
} | } |
@@ -4,95 +4,45 @@ | |||||
<text style="top:{{isIPX?'54px':'30px'}};">记账申请</text> | <text style="top:{{isIPX?'54px':'30px'}};">记账申请</text> | ||||
</view> | </view> | ||||
<view class="work_plan" style="margin-top:{{isIPX?'88px':'65px'}};"> | <view class="work_plan" style="margin-top:{{isIPX?'88px':'65px'}};"> | ||||
<view class="menu_item {{showGroup?'active':''}} " bindtap="switchTab" data-gid='{{true}}'>收入事项<text class="remind">4</text></view> | |||||
<view class="menu_item {{!showGroup?'active':''}} " bindtap="switchTab" data-gid='{{false}}'>支出事项<text class="remind">5</text></view> | |||||
<view class="menu_item {{showGroup?'active':''}} " bindtap="switchTab" data-gid='{{true}}'>收入事项<text class="remind">{{flowListSRNum}}</text></view> | |||||
<view class="menu_item {{!showGroup?'active':''}} " bindtap="switchTab" data-gid='{{false}}'>支出事项<text class="remind">{{flowListZCNum}}</text></view> | |||||
<view class="downView" bindtap="openPopup"> | |||||
<text>{{checkedStatusText}}</text> | |||||
<image src="/image/icon/triangle.png"></image> | |||||
</view> | |||||
<van-popup show="{{showProjectFundType}}" round position="bottom" bind:close="closeBox" data-name="showProjectFundType"> | |||||
<van-picker | |||||
columns="{{capitalExpenditureTypeOptions}}" | |||||
show-toolbar | |||||
value-key="dictLabel" | |||||
bind:cancel="closeBox" | |||||
bind:confirm="onConfirmPick" | |||||
data-name="showProjectFundType" | |||||
data-value="checkedStatusText" | |||||
/> | |||||
</van-popup> | |||||
</view> | </view> | ||||
<van-checkbox-group wx:if="{{showGroup}}" value="{{ result }}" bind:change="onChange"> | <van-checkbox-group wx:if="{{showGroup}}" value="{{ result }}" bind:change="onChange"> | ||||
<view class="li"> | |||||
<van-checkbox name="1" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||||
<view style="width: 40%;"> | |||||
<text class="tit">2021年联合社鱼塘承包款</text> | |||||
<view class="fksr"> | |||||
<image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||||
经营收入 | |||||
</view> | |||||
</view> | |||||
<view> | |||||
<text class="fj_name">附件3</text> | |||||
<text class="time">2021-5-26</text> | |||||
</view> | |||||
<view> | |||||
<view class="wtj"> | |||||
<image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||||
未提交 | |||||
</view> | |||||
<text class="money">¥6533.60</text> | |||||
</view> | |||||
</van-checkbox> | |||||
</view> | |||||
<view class="li"> | |||||
<van-checkbox name="2" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||||
<view style="width: 40%;"> | |||||
<text class="tit">张旺财农机租赁款</text> | |||||
<view class="fksr"> | |||||
<image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||||
经营收入 | |||||
</view> | |||||
</view> | |||||
<view> | |||||
<text class="fj_name">附件8</text> | |||||
<text class="time">2022-6-6</text> | |||||
</view> | |||||
<view> | |||||
<view class="wtj"> | |||||
<image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||||
未提交 | |||||
</view> | |||||
<text class="money">¥7823.00</text> | |||||
</view> | |||||
</van-checkbox> | |||||
</view> | |||||
<view class="li"> | |||||
<van-checkbox name="3" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||||
<view style="width: 40%;"> | |||||
<text class="tit">库存小麦销售收入款</text> | |||||
<view class="fksr"> | |||||
<image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||||
经营收入 | |||||
</view> | |||||
</view> | |||||
<view> | |||||
<text class="fj_name">附件6</text> | |||||
<text class="time">2022-2-16</text> | |||||
</view> | |||||
<view> | |||||
<view class="wtj"> | |||||
<image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||||
未提交 | |||||
</view> | |||||
<text class="money">¥1245.86</text> | |||||
</view> | |||||
</van-checkbox> | |||||
</view> | |||||
<view class="li"> | |||||
<van-checkbox name="4" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||||
<view class="li" wx:for="{{flowListSR}}" wx:key="index"> | |||||
<van-checkbox name="{{item.id}}" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||||
<view style="width: 40%;"> | <view style="width: 40%;"> | ||||
<text class="tit">仓库3月份租金</text> | |||||
<text class="tit">{{item.accountSummary}}</text> | |||||
<view class="fksr"> | <view class="fksr"> | ||||
<image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | <image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | ||||
经营收入 | |||||
{{item.incomeTypeText}} | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view> | <view> | ||||
<text class="fj_name">附件2</text> | |||||
<text class="time">2022-4-24</text> | |||||
<text class="fj_name">附件{{item.enclosureCount}}</text> | |||||
<text class="time">{{item.incomeDate}}</text> | |||||
</view> | </view> | ||||
<view> | <view> | ||||
<view class="wtj"> | <view class="wtj"> | ||||
<image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | <image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | ||||
未提交 | |||||
{{item.checkedStatusText}} | |||||
</view> | </view> | ||||
<text class="money">¥4968.38</text> | |||||
<text class="money">¥{{item.jieAmount}}</text> | |||||
</view> | </view> | ||||
</van-checkbox> | </van-checkbox> | ||||
</view> | </view> | ||||
@@ -100,10 +50,10 @@ | |||||
<van-checkbox-group wx:if="{{!showGroup}}" value="{{ result2 }}" bind:change="onChange2"> | <van-checkbox-group wx:if="{{!showGroup}}" value="{{ result2 }}" bind:change="onChange2"> | ||||
<view class="li"> | |||||
<view class="li" wx:for="{{flowListZC}}" wx:key="index"> | |||||
<van-checkbox name="1" shape="square" checked-color="#2C8E68" style="width: 100%;"> | <van-checkbox name="1" shape="square" checked-color="#2C8E68" style="width: 100%;"> | ||||
<view style="width: 40%;"> | <view style="width: 40%;"> | ||||
<text class="tit">联合社购买电脑费用</text> | |||||
<text class="tit">{{item.accountSummary}}</text> | |||||
<view class="fksr"> | <view class="fksr"> | ||||
<image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | <image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | ||||
现金支出 | 现金支出 | ||||
@@ -111,106 +61,22 @@ | |||||
</view> | </view> | ||||
<view> | <view> | ||||
<text class="fj_name">附件9</text> | <text class="fj_name">附件9</text> | ||||
<text class="time">2021-1-26</text> | |||||
</view> | |||||
<view> | |||||
<view class="wtj"> | |||||
<image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||||
未提交 | |||||
</view> | |||||
<text class="money">¥1358.70</text> | |||||
</view> | |||||
</van-checkbox> | |||||
</view> | |||||
<view class="li"> | |||||
<van-checkbox name="2" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||||
<view style="width: 40%;"> | |||||
<text class="tit">2季度办公用品报销款</text> | |||||
<view class="fksr"> | |||||
<image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||||
电子支出 | |||||
</view> | |||||
</view> | |||||
<view> | |||||
<text class="fj_name">附件1</text> | |||||
<text class="time">2021-5-30</text> | |||||
</view> | |||||
<view> | |||||
<view class="wtj"> | |||||
<image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||||
未提交 | |||||
</view> | |||||
<text class="money">¥2368.89</text> | |||||
</view> | |||||
</van-checkbox> | |||||
</view> | |||||
<view class="li"> | |||||
<van-checkbox name="3" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||||
<view style="width: 40%;"> | |||||
<text class="tit">3月份办公会工作餐费用</text> | |||||
<view class="fksr"> | |||||
<image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||||
现金支出 | |||||
</view> | |||||
</view> | |||||
<view> | |||||
<text class="fj_name">附件10</text> | |||||
<text class="time">2021-2-15</text> | |||||
</view> | |||||
<view> | |||||
<view class="wtj"> | |||||
<image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||||
未提交 | |||||
</view> | |||||
<text class="money">¥5698.00</text> | |||||
</view> | |||||
</van-checkbox> | |||||
</view> | |||||
<view class="li"> | |||||
<van-checkbox name="4" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||||
<view style="width: 40%;"> | |||||
<text class="tit">购入化肥款</text> | |||||
<view class="fksr"> | |||||
<image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||||
现金支出 | |||||
</view> | |||||
</view> | |||||
<view> | |||||
<text class="fj_name">附件12</text> | |||||
<text class="time">2021-7-26</text> | |||||
</view> | |||||
<view> | |||||
<view class="wtj"> | |||||
<image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||||
未提交 | |||||
</view> | |||||
<text class="money">¥4238.96</text> | |||||
</view> | |||||
</van-checkbox> | |||||
</view> | |||||
<view class="li"> | |||||
<van-checkbox name="5" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||||
<view style="width: 40%;"> | |||||
<text class="tit">村东水田槙保费用</text> | |||||
<view class="fksr"> | |||||
<image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||||
公务卡支出 | |||||
</view> | |||||
</view> | |||||
<view> | |||||
<text class="fj_name">附件15</text> | |||||
<text class="time">2021-12-19</text> | |||||
<text class="time">{{item.incomeDate}}</text> | |||||
</view> | </view> | ||||
<view> | <view> | ||||
<view class="wtj"> | <view class="wtj"> | ||||
<image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | <image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | ||||
未提交 | 未提交 | ||||
</view> | </view> | ||||
<text class="money">¥9883.00</text> | |||||
<text class="money">¥{{item.jieAmount}}</text> | |||||
</view> | </view> | ||||
</van-checkbox> | </van-checkbox> | ||||
</view> | </view> | ||||
</van-checkbox-group> | </van-checkbox-group> | ||||
<van-empty wx:if="{{flowListSRNum == 0 && showGroup}}" description="暂无收入事项数据" /> | |||||
<van-empty wx:if="{{flowListZCNum == 0 && !showGroup}}" description="暂无支出事项数据" /> | |||||
<view class="ipXbtn"></view> | <view class="ipXbtn"></view> | ||||
<view class="ipXbtn"></view> | <view class="ipXbtn"></view> | ||||
<view class="bottom"> | <view class="bottom"> | ||||
@@ -10,10 +10,9 @@ text{display: block;} | |||||
box-shadow: 2px 5px 5px #ddd; | box-shadow: 2px 5px 5px #ddd; | ||||
border-radius: 60rpx; | border-radius: 60rpx; | ||||
text-align: center; | text-align: center; | ||||
font-size: 16px; | |||||
position: relative; | position: relative; | ||||
margin-right: 20px; | margin-right: 20px; | ||||
padding: 8px 20px; | |||||
padding: 8px 10px; | |||||
} | } | ||||
.work_plan .menu_item.active{ | .work_plan .menu_item.active{ | ||||
background-color: #2C8E68; | background-color: #2C8E68; | ||||
@@ -165,4 +164,20 @@ text{display: block;} | |||||
padding: 10px 0px; | padding: 10px 0px; | ||||
background-image: linear-gradient(to right, #2C8E68, #5CAE77); | background-image: linear-gradient(to right, #2C8E68, #5CAE77); | ||||
color: #fff; | color: #fff; | ||||
} | |||||
.downView{ | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
padding: 0 20px; | |||||
border: 1px solid #5CAE77; | |||||
border-radius: 50px; | |||||
background: #fff; | |||||
margin-left: auto; | |||||
} | |||||
.downView image{ | |||||
width: 10px; | |||||
height: 8px; | |||||
margin-left: 10px; | |||||
} | } |
@@ -9,39 +9,6 @@ Page({ | |||||
*/ | */ | ||||
data: { | data: { | ||||
isIPX: app.globalData.isIPX, | 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: '同意' | |||||
}, | |||||
], | |||||
//事务总表对象 | //事务总表对象 | ||||
item:{}, | item:{}, | ||||
detpId:"", | detpId:"", | ||||
@@ -50,6 +17,7 @@ Page({ | |||||
result:[], | result:[], | ||||
show:false, | show:false, | ||||
showPopup:false, | showPopup:false, | ||||
showPopup2:false, | |||||
templateList:[], | templateList:[], | ||||
templateDetailList:[], | templateDetailList:[], | ||||
groups:[], | groups:[], | ||||
@@ -63,12 +31,30 @@ Page({ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad(options) { | onLoad(options) { | ||||
this.setData({itemId:options.id,deptId:options.deptId}); | |||||
//this.getApprovalItemList(); | |||||
console.log(options); | |||||
this.setData({ | |||||
itemId:options.id, | |||||
deptId:options.deptId, | |||||
form:JSON.parse(options.form) | |||||
}); | |||||
console.log(JSON.parse(options.form)); | |||||
if(options.type == 'template'){ | |||||
let list = []; | |||||
console.log(JSON.parse(options.applyOptions)); | |||||
JSON.parse(options.applyOptions).approvalTemplateDetailList.map(rr => { | |||||
list.push(rr.userId+"") | |||||
}) | |||||
this.setData({ | |||||
templateDetailList:JSON.parse(options.applyOptions).approvalTemplateDetailList, | |||||
result:list | |||||
}) | |||||
}else{ | |||||
// this.townList(); | |||||
// this.villageList(); | |||||
this.getApprovalItemsById(); | |||||
} | |||||
this.groupList(); | this.groupList(); | ||||
// this.townList(); | |||||
// this.villageList(); | |||||
this.getApprovalItemsById(); | |||||
//this.getApprovalItemList();JSON.parse(options.array) | |||||
}, | }, | ||||
getApprovalItemsById(){ | getApprovalItemsById(){ | ||||
let _this = this | let _this = this | ||||
@@ -85,13 +71,12 @@ Page({ | |||||
if(_this.data.item.templateId!=""&&_this.data.item.templateId!=null){ | if(_this.data.item.templateId!=""&&_this.data.item.templateId!=null){ | ||||
_this.setData({item:response.data.data,temId:_this.data.itemId}) | _this.setData({item:response.data.data,temId:_this.data.itemId}) | ||||
let d = { | let d = { | ||||
templateId : _this.data.item.templateId, | |||||
orderByColumn:"id", | |||||
isAsc:"asc", | |||||
method:"GET" | method:"GET" | ||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_TEMPLATEDETAIL, d, { | |||||
console.log(_this.data.itemId); | |||||
UTIL.httpRequest(API.URL_GET_TEMPLATEDETAIL + _this.data.itemId, d, { | |||||
success: (r) => { | success: (r) => { | ||||
console.log(r); | |||||
if (r.code == API.SUCCESS_CODE) { | if (r.code == API.SUCCESS_CODE) { | ||||
_this.setData({templateDetailList:r.rows}); | _this.setData({templateDetailList:r.rows}); | ||||
let list = [] | let list = [] | ||||
@@ -109,8 +94,44 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
inputTem:function(e){ | inputTem:function(e){ | ||||
console.log(e) | |||||
this.setData({temName:e.detail.value}) | this.setData({temName:e.detail.value}) | ||||
}, | }, | ||||
inputTem2:function(e){ | |||||
this.setData({temName2:e.detail.value}) | |||||
}, | |||||
confirmTemNew(e){ | |||||
var that = this; | |||||
let data={ | |||||
approvalTemplate:{ | |||||
name:that.data.temName2, | |||||
type:1, | |||||
dataType:0 | |||||
}, | |||||
approvalTemplateDetailList:that.data.templateDetailList, | |||||
applyData:that.data.form | |||||
} | |||||
let dataList = { | |||||
templateName:that.data.temName2, | |||||
templateContent:JSON.stringify(data), | |||||
method:"POST" | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETTEMPLATEADD,dataList,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: "保存成功!", | |||||
duration: 2000, | |||||
icon:"success" | |||||
}) | |||||
setTimeout(function(){ | |||||
that.setData({showPopup2:false,temName2:''}) | |||||
},2000) | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
confirmTem:function(e){ | confirmTem:function(e){ | ||||
let data={ | let data={ | ||||
approvalTemplate:{ | approvalTemplate:{ | ||||
@@ -126,6 +147,11 @@ Page({ | |||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
let list = this.data.templateList | let list = this.data.templateList | ||||
list.push(res.data) | list.push(res.data) | ||||
wx.showToast({ | |||||
title: "保存成功!", | |||||
duration: 2000, | |||||
icon:"success" | |||||
}) | |||||
this.setData({ | this.setData({ | ||||
temId:res.data.id, | temId:res.data.id, | ||||
templateList:list, | templateList:list, | ||||
@@ -139,6 +165,9 @@ Page({ | |||||
cancelTem:function(e){ | cancelTem:function(e){ | ||||
this.setData({temName:"",showPopup:false}); | this.setData({temName:"",showPopup:false}); | ||||
}, | }, | ||||
cancelTemNew:function(e){ | |||||
this.setData({temName2:"",showPopup2:false}); | |||||
}, | |||||
upItem:function(e){ | upItem:function(e){ | ||||
let index = e.currentTarget.dataset.id | let index = e.currentTarget.dataset.id | ||||
let item = this.data.templateDetailList[index] | let item = this.data.templateDetailList[index] | ||||
@@ -167,50 +196,33 @@ Page({ | |||||
}, | }, | ||||
getApprovalItemList:function(){ | getApprovalItemList:function(){ | ||||
let data={ | let data={ | ||||
dataType:0, | |||||
pageNum:1, | |||||
pageSize:50, | |||||
method:"GET" | method:"GET" | ||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_TEMPLATELIST, data, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
this.setData({templateList:res.rows}); | |||||
if(res.total>0){ | |||||
let d = { | |||||
templateId : res.rows[0].id, | |||||
orderByColumn:"id", | |||||
isAsc:"asc", | |||||
method:"GET" | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_TEMPLATEDETAIL, d, { | |||||
success: (r) => { | |||||
if (r.code == API.SUCCESS_CODE) { | |||||
this.setData({templateDetailList:r.rows}); | |||||
let list = [] | |||||
r.rows.map(rr => { | |||||
list.push(rr.userId+"") | |||||
}) | |||||
this.setData({result:list}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_TEMPLATEDETAIL+this.data.itemId,data, { | |||||
success: (r) => { | |||||
if (r.code == API.SUCCESS_CODE) { | |||||
this.setData({templateDetailList:r.data}); | |||||
let list = [] | |||||
r.data.map(rr => { | |||||
list.push(rr.userId+"") | |||||
}) | |||||
this.setData({result:list}) | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
chooseTemplate:function(e){ | chooseTemplate:function(e){ | ||||
let data = { | let data = { | ||||
templateId : e.currentTarget.dataset.id, | |||||
orderByColumn:"id", | |||||
isAsc:"asc", | |||||
method:"GET" | method:"GET" | ||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_TEMPLATEDETAIL, data, { | |||||
UTIL.httpRequest(API.URL_GET_GETAPPROVALBYID+e.currentTarget.dataset.id, data, { | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
this.setData({templateDetailList:res.rows}); | |||||
let list = []; | |||||
res.data.map(rr => { | |||||
list.push(rr.userId+"") | |||||
}) | |||||
this.setData({templateDetailList:res.data,result:list}); | |||||
this.closeBox(); | this.closeBox(); | ||||
} | } | ||||
} | } | ||||
@@ -279,6 +291,17 @@ Page({ | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
let parmes = { | |||||
pageNum:'1', | |||||
pageSize:'999' | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_TEMPLATELIST,parmes ,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
this.setData({templateList:res.rows}); | |||||
} | |||||
} | |||||
}) | |||||
}, | }, | ||||
villageList:function(){ | villageList:function(){ | ||||
@@ -302,6 +325,7 @@ Page({ | |||||
}, | }, | ||||
onChange(event) { | onChange(event) { | ||||
let _this = this | let _this = this | ||||
console.log(event); | |||||
this.setData({result:event.detail}) | this.setData({result:event.detail}) | ||||
this.setData({templateDetailList:[]}) | this.setData({templateDetailList:[]}) | ||||
let list = _this.data.templateDetailList | let list = _this.data.templateDetailList | ||||
@@ -313,24 +337,26 @@ Page({ | |||||
list.push(sin) | list.push(sin) | ||||
_this.setData({templateDetailList:list}) | _this.setData({templateDetailList:list}) | ||||
} | } | ||||
} | |||||
for(let i in _this.data.villages){ | |||||
if(_this.data.villages[i].userId == str){ | |||||
let sin = _this.data.villages[i] | |||||
list.push(sin) | |||||
_this.setData({templateDetailList:list}) | |||||
} | |||||
} | |||||
for(let i in _this.data.towns){ | |||||
if(_this.data.towns[i].userId == str){ | |||||
let sin = _this.data.towns[i] | |||||
list.push(sin) | |||||
_this.setData({templateDetailList:list}) | |||||
} | |||||
} | |||||
} | |||||
for(let i in _this.data.villages){ | |||||
if(_this.data.villages[i].userId == str){ | |||||
let sin = _this.data.villages[i] | |||||
list.push(sin) | |||||
_this.setData({templateDetailList:list}) | |||||
} | |||||
} | |||||
for(let i in _this.data.towns){ | |||||
if(_this.data.towns[i].userId == str){ | |||||
let sin = _this.data.towns[i] | |||||
list.push(sin) | |||||
_this.setData({templateDetailList:list}) | |||||
} | |||||
} | |||||
} | } | ||||
let li = this.data.templateDetailList | let li = this.data.templateDetailList | ||||
console.log(li); | |||||
li = li.filter(function(e,i,s){ | li = li.filter(function(e,i,s){ | ||||
s[i].name = i+1 | s[i].name = i+1 | ||||
s[i].approvalOrder = i+1 | s[i].approvalOrder = i+1 | ||||
@@ -350,76 +376,34 @@ Page({ | |||||
s[i].name = i+1 | s[i].name = i+1 | ||||
return true | return true | ||||
}) | }) | ||||
if(this.data.temId==""||this.data.temId==null){ | |||||
let data={ | |||||
approvalTemplate:{ | |||||
name:this.data.temName, | |||||
type:1, | |||||
dataType:1 | |||||
}, | |||||
approvalTemplateDetailList:list, | |||||
method:"POST" | |||||
} | |||||
UTIL.httpRequest(API.URL_POST_MOBILEADD,data,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
let list = this.data.templateList | |||||
list.push(res.data) | |||||
this.setData({ | |||||
temId:res.data.id, | |||||
templateList:list, | |||||
temName:"" | |||||
}); | |||||
let item_ = this.data.item | |||||
item_.templateId = res.data.id | |||||
item_.method = "POST" | |||||
UTIL.httpRequest(API.URL_POST_APPROVALITEMSEDIT,item_,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
wx.showToast({ | |||||
title: "保存成功!", | |||||
duration: 2000, | |||||
icon:"success" | |||||
}) | |||||
setTimeout(function(){ | |||||
wx.reLaunch({ | |||||
url: '/pages/index/index' | |||||
}) | |||||
},2000) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
}else{ | |||||
let url = API.URL_POST_TEMPLATEEDIT | |||||
wx.request({ | |||||
url, | |||||
data: list, | |||||
method:"POST", | |||||
timeout: 60000, | |||||
header: { | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
}, | |||||
success: function (response) { | |||||
wx.showToast({ | |||||
title: "保存成功!", | |||||
duration: 2000, | |||||
icon:"success" | |||||
}) | |||||
setTimeout(function(){ | |||||
wx.reLaunch({ | |||||
url: '/pages/index/index' | |||||
}) | |||||
},2000) | |||||
}, | |||||
}) | |||||
for (let index = 0; index < list.length; index++) { | |||||
list[index].approvalTemplateId = _this.data.itemId; | |||||
} | } | ||||
let url = API.URL_GET_GETAPPROVALPROCESSADD | |||||
wx.request({ | |||||
url, | |||||
data: list, | |||||
method:"POST", | |||||
timeout: 60000, | |||||
header: { | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
}, | |||||
success: function (response) { | |||||
wx.showToast({ | |||||
title: "保存成功!", | |||||
duration: 2000, | |||||
icon:"success" | |||||
}) | |||||
setTimeout(function(){ | |||||
wx.reLaunch({ | |||||
url: '/pages/index/index' | |||||
}) | |||||
},2000) | |||||
}, | |||||
}) | |||||
}, | }, | ||||
submit:function(){ | submit:function(){ | ||||
let _this = this | let _this = this | ||||
if(this.data.temId==""||this.data.temId==null){ | |||||
let data={ | let data={ | ||||
approvalTemplate:{ | approvalTemplate:{ | ||||
name:this.data.temName, | name:this.data.temName, | ||||
@@ -429,47 +413,55 @@ Page({ | |||||
approvalTemplateDetailList:this.data.templateDetailList, | approvalTemplateDetailList:this.data.templateDetailList, | ||||
method:"POST" | method:"POST" | ||||
} | } | ||||
UTIL.httpRequest(API.URL_POST_MOBILEADD,data,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
let list = this.data.templateList | |||||
list.push(res.data) | |||||
this.setData({ | |||||
temId:res.data.id, | |||||
templateList:list, | |||||
temName:"" | |||||
}); | |||||
let item_ = this.data.item | |||||
item_.templateId = res.data.id | |||||
item_.method = "POST" | |||||
UTIL.httpRequest(API.URL_POST_APPROVALITEMSEDIT,item_,{ | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
_this.requestSubmit() | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
} | |||||
let list = this.data.templateDetailList | |||||
list = list.filter(function(e,i,s){ | |||||
s[i].name = i+1 | |||||
return true | |||||
}) | }) | ||||
}else{ | |||||
let url = API.URL_POST_TEMPLATEEDIT | |||||
wx.request({ | |||||
url, | |||||
data: _this.data.templateDetailList, | |||||
method:"POST", | |||||
timeout: 60000, | |||||
header: { | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
}, | |||||
success: function (response) { | |||||
_this.requestSubmit() | |||||
}, | |||||
}) | |||||
} | |||||
for (let index = 0; index < list.length; index++) { | |||||
list[index].approvalTemplateId = _this.data.itemId; | |||||
} | |||||
let url = API.URL_GET_GETAPPROVALPROCESSADD | |||||
wx.request({ | |||||
url, | |||||
data: _this.data.templateDetailList, | |||||
method:"POST", | |||||
timeout: 60000, | |||||
header: { | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
}, | |||||
success: function (response) { | |||||
_this.requestSubmit() | |||||
}, | |||||
}) | |||||
// UTIL.httpRequest(API.URL_GET_GETAPPROVALPROCESSADD,this.data.templateDetailList,{ | |||||
// success: (res) => { | |||||
// if (res.code == API.SUCCESS_CODE) { | |||||
// let list = this.data.templateList | |||||
// list.push(res.data) | |||||
// this.setData({ | |||||
// temId:res.data.id, | |||||
// templateList:list, | |||||
// temName:"" | |||||
// }); | |||||
// let item_ = this.data.item | |||||
// item_.templateId = res.data.id | |||||
// item_.method = "POST" | |||||
// _this.requestSubmit() | |||||
// // UTIL.httpRequest(API.URL_POST_APPROVALITEMSEDIT,item_,{ | |||||
// // success: (res) => { | |||||
// // if (res.code == API.SUCCESS_CODE) { | |||||
// // } | |||||
// // } | |||||
// // }) | |||||
// } | |||||
// } | |||||
// }) | |||||
}, | }, | ||||
requestSubmit:function(){ | requestSubmit:function(){ | ||||
let url = API.URL_POST_APPROVALITEMSSUBMIT+this.data.item.id+"/"+this.data.item.templateId | |||||
let url = API.URL_POST_APPROVALITEMSSUBMIT+this.data.itemId | |||||
wx.request({ | wx.request({ | ||||
url, | url, | ||||
method:"POST", | method:"POST", | ||||
@@ -517,6 +509,12 @@ Page({ | |||||
temName:"" | temName:"" | ||||
}); | }); | ||||
}, | }, | ||||
showPopupNew() { | |||||
this.setData({ | |||||
showPopup2: true, | |||||
temName:"" | |||||
}); | |||||
}, | |||||
onClose() { | onClose() { | ||||
this.setData({ showPopup: false}); | this.setData({ showPopup: false}); | ||||
@@ -14,14 +14,14 @@ | |||||
<view class="indexBorder"> | <view class="indexBorder"> | ||||
<view class="ssT" wx:if="{{index>0}}"></view> | <view class="ssT" wx:if="{{index>0}}"></view> | ||||
<view class="yq"></view> | <view class="yq"></view> | ||||
<view class="ss" wx:if="{{steps.length != index+1}}"></view> | |||||
<view class="ss" wx:if="{{templateDetailList.length != index+1}}"></view> | |||||
</view> | </view> | ||||
</block> | </block> | ||||
<block wx:else> | <block wx:else> | ||||
<view class="indexBorder indexCenter"> | <view class="indexBorder indexCenter"> | ||||
<view class="ssT" wx:if="{{index>0}}"></view> | <view class="ssT" wx:if="{{index>0}}"></view> | ||||
<view class="yq"></view> | <view class="yq"></view> | ||||
<view class="ss" wx:if="{{steps.length != index+1}}"></view> | |||||
<view class="ss" wx:if="{{templateDetailList.length != index+1}}"></view> | |||||
</view> | </view> | ||||
</block> | </block> | ||||
</van-col> | </van-col> | ||||
@@ -59,15 +59,19 @@ | |||||
<view class="bottomBtn"> | <view class="bottomBtn"> | ||||
<view bindtap="openBox"> | <view bindtap="openBox"> | ||||
<image src="/image/apply/icon_add.png"></image> | |||||
<image src="/image/icon/icon_xzmb.png"></image> | |||||
<text>选择审批模板</text> | <text>选择审批模板</text> | ||||
</view> | </view> | ||||
<view bindtap="showPopupNew" style="margin: 0 10px;"> | |||||
<image src="/image/icon/icon_zfmb.png"></image> | |||||
<text>保存支付模板</text> | |||||
</view> | |||||
<view bindtap="showPopup"> | <view bindtap="showPopup"> | ||||
<image src="/image/apply/icon_pres.png"></image> | |||||
<image src="/image/icon/icon_shmb.png"></image> | |||||
<text>保存审批模板</text> | <text>保存审批模板</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- <view class="btn_box"> | |||||
<!-- <view class="btn_box"> | |||||
<view bindtap="openBox">选择审批模板</view> | <view bindtap="openBox">选择审批模板</view> | ||||
<view bindtap="showPopup">保存审批模板</view> | <view bindtap="showPopup">保存审批模板</view> | ||||
</view> --> | </view> --> | ||||
@@ -78,7 +82,7 @@ | |||||
<view class="btn2" bindtap="submit">保存并提交</view> | <view class="btn2" bindtap="submit">保存并提交</view> | ||||
</view> | </view> | ||||
<van-action-sheet show="{{show}}" title="选择审批模板" bind:close="closeBox"> | |||||
<van-action-sheet show="{{show}}" title="选择审批模板" bind:close="closeBox" safe-area-inset-bottom="{{true}}"> | |||||
<!-- <van-swipe-cell right-width="{{ 65 }}"> | <!-- <van-swipe-cell right-width="{{ 65 }}"> | ||||
<van-cell label="支付水电、网费、房租" bindtap="goTemplate" > | <van-cell label="支付水电、网费、房租" bindtap="goTemplate" > | ||||
<view slot="title"> | <view slot="title"> | ||||
@@ -90,17 +94,25 @@ | |||||
<image src="/image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | <image src="/image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | ||||
</view> | </view> | ||||
</van-swipe-cell> --> | </van-swipe-cell> --> | ||||
<van-swipe-cell right-width="{{ 65 }}" wx:for="{{templateList}}" wx:key="index" wx:for-item="item" > | |||||
<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-cell title="{{item.name}}" bindtap='chooseTemplate' data-id="{{item.id}}"> | <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-icon slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | ||||
</van-cell> | </van-cell> | ||||
<view slot="right" class="deleteBox" bindtap='deleteTemplate' data-id="{{item.id}}"> | |||||
<image src="/image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | |||||
</view> | |||||
</van-swipe-cell> | |||||
<view slot="right" class="deleteBox" bindtap='deleteTemplate' data-id="{{item.id}}"> | |||||
<image src="/image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | |||||
</view> | |||||
</van-swipe-cell> | |||||
</scroll-view> | |||||
<van-empty wx:if="{{templateList.length == 0}}" description="暂无审批模板" /> | <van-empty wx:if="{{templateList.length == 0}}" description="暂无审批模板" /> | ||||
</van-action-sheet> | </van-action-sheet> | ||||
<modal hidden="{{!showPopup}}" title="审批模板" confirm-text="保存" cancel-text="取消" bindcancel="cancelTem" bindconfirm="confirmTem"> | <modal hidden="{{!showPopup}}" title="审批模板" confirm-text="保存" cancel-text="取消" bindcancel="cancelTem" bindconfirm="confirmTem"> | ||||
<input type='text' placeholder="请输入模板名称" bindinput="inputTem" auto-focus/> | |||||
</modal> | |||||
<input type='text' value="{{temName}}" placeholder="请输入模板名称" bindinput="inputTem" auto-focus/> | |||||
</modal> | |||||
<modal hidden="{{!showPopup2}}" title="支付模板" confirm-text="保存" cancel-text="取消" bindcancel="cancelTemNew" bindconfirm="confirmTemNew"> | |||||
<input type='text' value="{{temName2}}" placeholder="请输入模板名称" bindinput="inputTem2" auto-focus/> | |||||
</modal> |
@@ -243,20 +243,22 @@ text{display: block;} | |||||
justify-content:space-between; | justify-content:space-between; | ||||
} | } | ||||
.bottomBtn view{ | .bottomBtn view{ | ||||
display: flex; | |||||
width: 48%; | width: 48%; | ||||
background-color: #ffffff; | background-color: #ffffff; | ||||
border-radius: 5px; | border-radius: 5px; | ||||
box-shadow: 0px 5px 9px #DCDCDC; | box-shadow: 0px 5px 9px #DCDCDC; | ||||
padding: 10px 0px; | padding: 10px 0px; | ||||
text-align: center; | text-align: center; | ||||
align-items:center; | |||||
justify-content:center; | |||||
font-size: 14px; | font-size: 14px; | ||||
color: #2C8E68; | color: #2C8E68; | ||||
} | } | ||||
.bottomBtn view image{ | .bottomBtn view image{ | ||||
width: 18px; | width: 18px; | ||||
height: 18px; | height: 18px; | ||||
margin-right: 5px; | |||||
margin: 0 auto; | |||||
display: block; | |||||
} | |||||
.bottomBtn view text{ | |||||
display: block; | |||||
margin-top: 5px; | |||||
} | } |
@@ -50,7 +50,7 @@ swichPaymentApply:function(e){ | |||||
}, | }, | ||||
goTemplate:function(e){ | goTemplate:function(e){ | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: 'paymentTemplate/add/add?id='+e.currentTarget.dataset.id+'&type=template' | |||||
url: 'paymentTemplate/add/add?id='+e.currentTarget.dataset.id+'&type=template&option='+e.currentTarget.dataset.options | |||||
}) | }) | ||||
}, | }, | ||||
@@ -97,6 +97,17 @@ swichPaymentApply:function(e){ | |||||
*/ | */ | ||||
onShow: function () { | onShow: function () { | ||||
var that = this; | var that = this; | ||||
wx.showLoading({ | |||||
title: '正在加载账户列表', | |||||
mask:true | |||||
}) | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
success: (res) => { | |||||
this.setData({ | |||||
bankTypeOptions:res.data | |||||
}); | |||||
} | |||||
}) | |||||
var sendData = { | var sendData = { | ||||
pageNum:'1', | pageNum:'1', | ||||
pageSize:'100', | pageSize:'100', | ||||
@@ -106,6 +117,15 @@ swichPaymentApply:function(e){ | |||||
method:'GET', | method:'GET', | ||||
accountType:102 | accountType:102 | ||||
} | } | ||||
var sendData2 = { | |||||
pageNum:'1', | |||||
pageSize:'100', | |||||
accountName:'', | |||||
bankAccountNumber:'', | |||||
status:'N', | |||||
method:'GET', | |||||
accountType:101 | |||||
} | |||||
UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
@@ -113,7 +133,7 @@ swichPaymentApply:function(e){ | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
UTIL.httpRequest(API.URL_GET_APPROVALITEMSLIST, {method:'GET',dataType:'1'}, { | |||||
UTIL.httpRequest(API.URL_GET_GETTEMPLATELIST, {method:'GET'}, { | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
that.setData({ | that.setData({ | ||||
@@ -122,15 +142,33 @@ swichPaymentApply:function(e){ | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData,{ | |||||
setTimeout(function(){ | |||||
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 "); | |||||
res.rows[i].balance = parseFloat(res.rows[i].balance).toFixed(2); | |||||
res.rows[i].bankTypeText = UTIL.getTransform(res.rows[i].bankType,that.data.bankTypeOptions);; | |||||
} | |||||
console.log(res.rows) | |||||
that.setData({ | |||||
accountList:res.rows | |||||
}) | |||||
wx.hideLoading(); | |||||
} | |||||
}) | |||||
},1000) | |||||
UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData2,{ | |||||
success: (res) => { | success: (res) => { | ||||
for (let i = 0; i < res.rows.length; i++) { | for (let i = 0; i < res.rows.length; i++) { | ||||
if(res.rows[i].bankAccountNumber==null){continue;} | |||||
res.rows[i].bankAccountNumber = res.rows[i].bankAccountNumber.replace(/(\d{4})(?=\d)/g, "$1 ") | |||||
// if(res.rows[i].bankAccountNumber==null){continue;} | |||||
// res.rows[i].bankAccountNumber = res.rows[i].bankAccountNumber.replace(/(\d{4})(?=\d)/g, "$1 "); | |||||
res.rows[i].balance = parseFloat(res.rows[i].balance).toFixed(2); | |||||
console.log(res.rows[i].balance) | |||||
} | } | ||||
console.log(res.rows) | |||||
that.setData({ | that.setData({ | ||||
accountList:res.rows | |||||
accountListXJ:res.rows | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
@@ -138,7 +176,7 @@ swichPaymentApply:function(e){ | |||||
delete(e){ | delete(e){ | ||||
console.log(e); | console.log(e); | ||||
var that = this; | var that = this; | ||||
UTIL.httpRequest(API.URL_GET_REMOVEAPPROVAL + e.currentTarget.dataset.id, {method:'GET'},{ | |||||
UTIL.httpRequest(API.URL_GET_GETTEMPLATEREMOVE + e.currentTarget.dataset.id, {method:'GET'},{ | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
that.data.approvalItemsOptions.splice(e.currentTarget.dataset.index, 1); | that.data.approvalItemsOptions.splice(e.currentTarget.dataset.index, 1); | ||||
@@ -156,10 +194,10 @@ swichPaymentApply:function(e){ | |||||
}, | }, | ||||
getMr(e){ | getMr(e){ | ||||
var that = this; | var that = this; | ||||
UTIL.httpRequest(API.URL_GET_GETSETDEFAULTVALUES + e.currentTarget.dataset.id, {method:'GET'},{ | |||||
UTIL.httpRequest(API.URL_GET_GETTEMPLATERESETDEFAULT + e.currentTarget.dataset.id, {method:'GET'},{ | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
UTIL.httpRequest(API.URL_GET_APPROVALITEMSLIST, {method:'GET',dataType:'1'}, { | |||||
UTIL.httpRequest(API.URL_GET_GETTEMPLATELIST, {method:'GET'}, { | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
wx.showToast({ | wx.showToast({ | ||||
@@ -11,15 +11,16 @@ | |||||
</view> | </view> | ||||
<view class="main"> | <view class="main"> | ||||
<van-tabs sticky color="#000"> | |||||
<van-tabs sticky color="#000" animated> | |||||
<van-tab title="银行账户"> | <van-tab title="银行账户"> | ||||
<view class="bank_box" wx:for="{{accountList}}" wx:key="index"> | <view class="bank_box" wx:for="{{accountList}}" wx:key="index"> | ||||
<text class="zt">{{item.bankUseType == 1 ?'基本户':'一般户'}}</text> | <text class="zt">{{item.bankUseType == 1 ?'基本户':'一般户'}}</text> | ||||
<image src="../../image/apply/bgt.png" style="width: 100%;position: absolute;top:0;right:0;z-index: 9;height: 100%;"></image> | |||||
<view class="bank_content {{item.bankType == 1 ? 'ICBC':item.bankType == 2||item.bankType == 5 ? 'RCB':item.bankType == 3 ? 'ABC':item.bankType == 4 ? 'CCB':''}}"> | |||||
<image src="../../image/apply/bgt.png" wx:if="{{item.bankUseType == 1}}" style="width: 100%;position: absolute;top:0;right:0;z-index: 9;height: 100%;"></image> | |||||
<image src="../../image/apply/bgy.png" wx:else style="width: 100%;position: absolute;top:0;right:0;z-index: 9;height: 100%;"></image> | |||||
<view class="bank_content {{iOf.indexOf(item.bankTypeText,'中国银行') > -1 ? 'ICBC':iOf.indexOf(item.bankTypeText,'农商行') > -1 ? 'RCB':iOf.indexOf(item.bankTypeText,'农业银行') > -1 ? 'ABC':iOf.indexOf(item.bankTypeText,'建设银行') > -1 ? 'CCB':''}}"> | |||||
<view class="bankName"> | <view class="bankName"> | ||||
<image src="../../image/apply/{{item.bankType == 1 ? 'ICBC':item.bankType == 2||item.bankType == 5 ? 'RCB':item.bankType == 3 ? 'ABC':item.bankType == 4 ? 'CCB':''}}.png" style="width: 25px" mode="widthFix"></image> | |||||
<text>{{item.bankType == 1 ? '中国银行':item.bankType == 2||item.bankType == 5 ? '农商行(山东省)':item.bankType == 3 ? '农业银行':item.bankType == 4 ? '建设银行':''}}</text> | |||||
<image src="../../image/apply/{{iOf.indexOf(item.bankTypeText,'中国银行') > -1 ? 'ICBC':iOf.indexOf(item.bankTypeText,'农商行') > -1 ? 'RCB':iOf.indexOf(item.bankTypeText,'农业银行') > -1 ? 'ABC':iOf.indexOf(item.bankTypeText,'建设银行') > -1 ? 'CCB':''}}.png" style="width: 25px" mode="widthFix"></image> | |||||
<text>{{item.accountName}}</text> | |||||
</view> | </view> | ||||
<view style="margin-top: 2vh;">{{item.bankAccountNumber}}<text>卡号</text></view> | <view style="margin-top: 2vh;">{{item.bankAccountNumber}}<text>卡号</text></view> | ||||
@@ -33,12 +34,43 @@ | |||||
<van-empty wx:if="{{accountList.length == 0}}" description="暂无银行账户" /> | <van-empty wx:if="{{accountList.length == 0}}" description="暂无银行账户" /> | ||||
</van-tab> | </van-tab> | ||||
<van-tab title="现金账户"> | |||||
<view class="bank_box" wx:for="{{accountListXJ}}" wx:key="index"> | |||||
<view class="bank_content XJ"> | |||||
<view class="bankName"> | |||||
<image src="../../image/apply/XJ.png" style="width: 25px" mode="widthFix"></image> | |||||
<text>{{item.accountName}}</text> | |||||
</view> | |||||
<view style="margin-top: 2vh;">{{item.subjectId}}<text>科目</text></view> | |||||
<view>可用余额</view> | |||||
<view style="font-weight: bold;font-size: 22px;margin-top: 2vh;"> | |||||
{{item.balance}} | |||||
<!-- <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> | |||||
</view> | |||||
<!-- <view class="addBtn"> | |||||
<image src="/image/icon/icon_add.png"></image> | |||||
<text>添加现金账户</text> | |||||
</view> --> | |||||
<van-empty wx:if="{{accountList.length == 0}}" description="暂无现金账户" /> | |||||
<!-- <van-empty wx:if="{{accountList.length == 0}}" description="暂无银行账户" /> --> | |||||
</van-tab> | |||||
<van-tab title="公务卡"> | <van-tab title="公务卡"> | ||||
<view class="bank_box"> | <view class="bank_box"> | ||||
<view class="bank_content gwk"> | <view class="bank_content gwk"> | ||||
<image src="../../image/apply/gwk_icon.png" style="width: 28%;" mode="widthFix"></image> | |||||
<view style="margin-bottom: 2vh;">6217 0021 9000 7972 186<text>卡号</text></view> | |||||
<view class="bankName"> | |||||
<image src="../../image/apply/icon_GWK.png" style="width: 25px" mode="widthFix"></image> | |||||
<text>公务卡</text> | |||||
</view> | |||||
<view style="margin-top: 2vh;">6217 0021 9000 7972 186<text>卡号</text></view> | |||||
<view>可用余额</view> | <view>可用余额</view> | ||||
<view style="font-weight: bold;font-size: 22px;margin-top: 2vh;">10,288.83</view> | <view style="font-weight: bold;font-size: 22px;margin-top: 2vh;">10,288.83</view> | ||||
</view> | </view> | ||||
@@ -56,27 +88,35 @@ | |||||
</view> | </view> | ||||
<view class="ipXbtn"></view> | <view class="ipXbtn"></view> | ||||
<van-action-sheet show="{{show}}" title="支付模板" bind:close="closeBox"> | <van-action-sheet show="{{show}}" title="支付模板" bind:close="closeBox"> | ||||
<van-swipe-cell right-width="{{ 130 }}" wx:for="{{approvalItemsOptions}}" wx:key="index"> | |||||
<van-cell-group> | |||||
<van-cell label="{{item.approvalItems}}" bindtap="goTemplate" data-id="{{item.id}}" > | |||||
<view slot="title"> | |||||
<view class="van-cell-text">{{item.templateName}}<van-tag plain type="danger" color="#FC9A55" style="margin-left:10px;" wx:if="{{index == 0}}"><image src="/image/apply/icon_mr.png" style="width: 12px;height: 12px;margin-right: 2px;"></image>默认</van-tag></view> | |||||
<scroll-view scroll-y="true" style="height: 400rpx;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-top="0"> | |||||
<van-swipe-cell right-width="{{ 130 }}" wx:for="{{approvalItemsOptions}}" wx:key="index"> | |||||
<van-cell-group> | |||||
<van-cell label="{{item.approvalItems}}" bindtap="goTemplate" data-options="{{item.templateContent}}" data-id="{{item.id}}" > | |||||
<view slot="title"> | |||||
<view class="van-cell-text">{{item.templateName}}<van-tag plain type="danger" color="#FC9A55" style="margin-left:10px;" wx:if="{{index == 0&&item.defaultValue == 1}}"><image src="/image/apply/icon_mr.png" style="width: 12px;height: 12px;margin-right: 2px;"></image>默认</van-tag></view> | |||||
</view> | |||||
<van-icon wx:if="{{index == 0&&item.defaultValue == 1}}" slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mrmb.png?sign=5e5df640777f6a7993c45e1a559dd998&t=1648619865" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
<van-icon wx:else slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
</van-cell> | |||||
</van-cell-group> | |||||
<view slot="right" class="deleteBox"> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;border-right: 1px solid #eee;"> | |||||
<image src="../../image/apply/button_mr.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="getMr"></image> | |||||
</view> | </view> | ||||
<van-icon wx:if="{{index == 0}}" slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mrmb.png?sign=5e5df640777f6a7993c45e1a559dd998&t=1648619865" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
<van-icon wx:else slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||||
</van-cell> | |||||
</van-cell-group> | |||||
<view slot="right" class="deleteBox"> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;border-right: 1px solid #eee;"> | |||||
<image src="../../image/apply/button_mr.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="getMr"></image> | |||||
</view> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | |||||
</view> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | |||||
</view> | </view> | ||||
</view> | |||||
</van-swipe-cell> | |||||
<van-empty wx:if="{{approvalItemsOptions.length == 0}}" description="暂无支付模板" /> | |||||
</van-swipe-cell> | |||||
<van-empty wx:if="{{approvalItemsOptions.length == 0}}" description="暂无支付模板" /> | |||||
</scroll-view> | |||||
</van-action-sheet> | </van-action-sheet> | ||||
<wxs module="iOf"> | |||||
var indexOf = function(name,value){ | |||||
return name.indexOf(value); | |||||
} | |||||
module.exports.indexOf = indexOf; | |||||
</wxs> |
@@ -40,7 +40,10 @@ | |||||
width: 100%; | width: 100%; | ||||
padding: 2vh; | padding: 2vh; | ||||
} | } | ||||
.XJ{ | |||||
background:url('https://dazu.nongshen.net/api/profile/wechat/bg_XJ.png') no-repeat center; | |||||
background-size: 100% 100%; | |||||
} | |||||
.ICBC{ | .ICBC{ | ||||
background:url('https://dazu.nongshen.net/api/profile/wechat/bg_ICBC.png') no-repeat center; | background:url('https://dazu.nongshen.net/api/profile/wechat/bg_ICBC.png') no-repeat center; | ||||
background-size: 100% 100%; | background-size: 100% 100%; | ||||
@@ -61,7 +64,25 @@ | |||||
background:url('https://dazu.nongshen.net/api/profile/wechat/bg_GWK.png') no-repeat center; | background:url('https://dazu.nongshen.net/api/profile/wechat/bg_GWK.png') no-repeat center; | ||||
background-size: 100% 100%; | background-size: 100% 100%; | ||||
} | } | ||||
.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; | |||||
} | |||||
.bankName{ | .bankName{ | ||||
margin-top: 0!important; | margin-top: 0!important; | ||||
} | } | ||||
@@ -81,7 +102,9 @@ | |||||
font-size: 14px; | font-size: 14px; | ||||
margin-left: 10vw; | margin-left: 10vw; | ||||
} | } | ||||
.bank_box:first-child{ | |||||
margin-top: 20px; | |||||
} | |||||
.bank_box{ | .bank_box{ | ||||
position: relative; | position: relative; | ||||
box-shadow: 0px 5px 9px #ccc; | box-shadow: 0px 5px 9px #ccc; | ||||
@@ -89,10 +112,9 @@ | |||||
border-radius: 15px; | border-radius: 15px; | ||||
width: 94%; | width: 94%; | ||||
margin: 0 auto; | margin: 0 auto; | ||||
margin-top: 20px; | |||||
margin-bottom: 20px; | |||||
} | } | ||||
.zt { | .zt { | ||||
font-size: 14px; | |||||
position: absolute; | position: absolute; | ||||
top: 10px; | top: 10px; | ||||
transform: rotate(45deg); | transform: rotate(45deg); | ||||
@@ -102,8 +124,8 @@ | |||||
} | } | ||||
.holder{ | .holder{ | ||||
padding: 15px 25px ; | |||||
background-color: rgba(255,255,255,0.9); | |||||
padding: 10px 25px ; | |||||
background-color: rgba(255,255,255,0.6); | |||||
color: #333333; | color: #333333; | ||||
font-size: 16px; | font-size: 16px; | ||||
border-top-left-radius: 30px; | border-top-left-radius: 30px; | ||||
@@ -39,6 +39,7 @@ Page({ | |||||
}, | }, | ||||
transfers:[{//事项信息集合以下是List对象信息 | transfers:[{//事项信息集合以下是List对象信息 | ||||
num:"一", | num:"一", | ||||
amountReadonly:false, | |||||
expenditureAmountTirme:false, | expenditureAmountTirme:false, | ||||
remarkTirme:false, | remarkTirme:false, | ||||
showCapitalExpenditureType:false, | showCapitalExpenditureType:false, | ||||
@@ -49,6 +50,7 @@ Page({ | |||||
showAccount:false, | showAccount:false, | ||||
showDialog:false, | showDialog:false, | ||||
showContraction:false, | showContraction:false, | ||||
showMoneyOrder:false, | |||||
SJimage:[], | SJimage:[], | ||||
FPimage:[], | FPimage:[], | ||||
QTimage:[], | QTimage:[], | ||||
@@ -107,6 +109,17 @@ Page({ | |||||
code:'', | code:'', | ||||
totalAmount:'', | totalAmount:'', | ||||
}, | }, | ||||
moneyOrderForm:{ | |||||
orderNum:'', | |||||
orderType:'', | |||||
orderAmount:'', | |||||
billPayUnit:'', | |||||
billReceiveUnit:'', | |||||
startTime:'', | |||||
endTime:'', | |||||
orderStatus:'', | |||||
remark:'', | |||||
} | |||||
}], | }], | ||||
}, | }, | ||||
@@ -126,8 +139,272 @@ Page({ | |||||
*/ | */ | ||||
onLoad(options) { | onLoad(options) { | ||||
var that = this; | var that = this; | ||||
console.log(options); | |||||
if(options.id){ | |||||
//所属银行 | |||||
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_GETMONEYORDERLIST, {method:'GET'}, { | |||||
success: (res) => { | |||||
that.setData({ | |||||
moneyOrderOptions:res.rows, | |||||
}) | |||||
} | |||||
}) | |||||
// 付款方式类型字典查询 (2.0) | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'yn_pay_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, | |||||
}) | |||||
} | |||||
}) | |||||
if(options.type == 'template'){ | |||||
wx.showLoading({ | |||||
title: '正在加载模板', | |||||
mask:true | |||||
}) | |||||
let list = JSON.parse(options.option); | |||||
that.setData({ | |||||
templateModel:JSON.parse(options.option), | |||||
formType:options.type | |||||
}) | |||||
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()), | |||||
}) | |||||
} | |||||
}) | |||||
// if(options.type == "template"){list.approvalItemTemplate.id=""} | |||||
console.log(list); | |||||
if(options.type == "template"){list.applyData.approvalItemTemplate.id=""} | |||||
setTimeout(function(){ | |||||
for (let i = 0; i < list.applyData.transfers.length; i++) { | |||||
list.applyData.transfers[i].payeeList.forEach((item2,index2)=>{ | |||||
list.applyData.transfers[i].payeeList[index2].incomeAmount = parseFloat(0).toFixed(2); | |||||
}) | |||||
console.log(that.data.capitalExpenditureTypeOptions); | |||||
list.applyData.transfers[i].capitalExpenditureTypeText = UTIL.getTransform(list.applyData.transfers[i].capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | |||||
list.applyData.transfers[i].transferTypeText = UTIL.getTransform(list.applyData.transfers[i].paymentPattern,that.data.transferTypeOptions); | |||||
list.applyData.transfers[i].bankTypeText = UTIL.getTransform(list.applyData.transfers[i].bankType,that.data.bankTypeOptions); | |||||
list.applyData.transfers[i].num = UTIL.convertToChinaNum(i+1); | |||||
list.applyData.transfers[i].expenditureAmount = ''; | |||||
if(list.applyData.transfers[i].capitalExpenditureType == 2){ | |||||
let prames = { | |||||
outId:list.applyData.transfers[i].id, | |||||
ynType: list.applyData.transfers[i].transferType=='1'||list.applyData.transfers[i].transferType=='2'||list.applyData.transfers[i].transferType=='4'?'1':'2' | |||||
} | |||||
// 工程项目查询 | |||||
UTIL.httpRequest(API.URL_GET_GETPROJECTTO , prames, { | |||||
success: (res) => { | |||||
res.data.projectFundTypeText = UTIL.getTransform(res.data.projectFundType,that.data.projectFundTypeOptions); | |||||
list.applyData.transfers[i].projectForm = res.data | |||||
} | |||||
}) | |||||
} | |||||
if(list.applyData.transfers[i].capitalExpenditureType == 4){ | |||||
let prames = { | |||||
transferId:list.applyData.transfers[i].id, | |||||
} | |||||
// 关联合同查询 | |||||
UTIL.httpRequest(API.URL_GET_GETSELECTINFOBYOUTID , prames, { | |||||
success: (res) => { | |||||
list.applyData.transfers[i].contractionForm = res.data | |||||
console.log(list.applyData.transfers[i]); | |||||
} | |||||
}) | |||||
} | |||||
let fileForm = []; | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:list.applyData.transfers[i].id, | |||||
fileType:1 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list2 = []; | |||||
res.data.forEach((item2,index2)=>{ | |||||
wx.downloadFile({ | |||||
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
success (response) { | |||||
if (response.statusCode === 200) { | |||||
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----------------"); | |||||
list2.push({ | |||||
tempFilePath:response.tempFilePath, | |||||
id:item2.id | |||||
}) | |||||
list.applyData.transfers[i].SJimage = list2; | |||||
} | |||||
} | |||||
}) | |||||
}) | |||||
} | |||||
}) | |||||
//发票 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:list.applyData.transfers[i].id, | |||||
fileType:2 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list2 = []; | |||||
res.data.forEach((item2,index2)=>{ | |||||
wx.downloadFile({ | |||||
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
success (response) { | |||||
if (response.statusCode === 200) { | |||||
fileForm.push({ | |||||
file: response.tempFilePath, | |||||
fileType:'2', | |||||
bizPath:'transfer', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:'' | |||||
}) | |||||
console.log("--------------fileForm2 start----------------"); | |||||
console.log(fileForm); | |||||
console.log("--------------fileForm2 end----------------"); | |||||
list2.push({ | |||||
tempFilePath:response.tempFilePath, | |||||
id:item2.id | |||||
}) | |||||
list.applyData.transfers[i].FPimage = list2; | |||||
} | |||||
} | |||||
}) | |||||
}) | |||||
} | |||||
}) | |||||
//其他 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:list.applyData.transfers[i].id, | |||||
fileType:3 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list2 = []; | |||||
res.data.forEach((item2,index2)=>{ | |||||
wx.downloadFile({ | |||||
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 | |||||
success (response) { | |||||
if (response.statusCode === 200) { | |||||
fileForm.push({ | |||||
file: response.tempFilePath, | |||||
fileType:'3', | |||||
bizPath:'transfer', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:'' | |||||
}) | |||||
console.log("--------------fileForm2 start----------------"); | |||||
console.log(fileForm); | |||||
console.log("--------------fileForm2 end----------------"); | |||||
list2.push({ | |||||
tempFilePath:response.tempFilePath, | |||||
id:item2.id | |||||
}) | |||||
list.applyData.transfers[i].QTimage = list2; | |||||
} | |||||
} | |||||
}) | |||||
}) | |||||
} | |||||
}) | |||||
list.applyData.transfers[i].id = ""; | |||||
list.applyData.transfers[i].fileForm = fileForm; | |||||
} | |||||
},1000) | |||||
var timer2 = setTimeout(function(){ | |||||
that.setData({ | |||||
form:list.applyData, | |||||
activeNames:null, | |||||
applyDate: list.applyData.transfers[0].applyDate, | |||||
["form.approvalItemTemplate.totalAmount"]:parseFloat(0).toFixed(2), | |||||
}) | |||||
wx.hideLoading(); | |||||
},3000) | |||||
}else if(options.id && options.type != 'template'){ | |||||
UTIL.showLoadingHaveMask(); | UTIL.showLoadingHaveMask(); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
UTIL.httpRequest(API.URL_GET_APPROVALITEMS+options.id, {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_APPROVALITEMS+options.id, {method:'GET'}, { | ||||
@@ -135,9 +412,7 @@ Page({ | |||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
console.log(that.data.capitalExpenditureTypeOptions); | console.log(that.data.capitalExpenditureTypeOptions); | ||||
if(res.data.approvalItemTemplate == null){return;} | if(res.data.approvalItemTemplate == null){return;} | ||||
if(options.type == "template"){res.data.approvalItemTemplate.id=""} | |||||
res.data.approvalItemTemplate.totalAmount = parseFloat(res.data.approvalItemTemplate.totalAmount).toFixed(2) | |||||
res.data.transfers.forEach( (item,index) => { | res.data.transfers.forEach( (item,index) => { | ||||
that.setData({ | that.setData({ | ||||
@@ -146,11 +421,21 @@ Page({ | |||||
res.data.transfers[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | res.data.transfers[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | ||||
console.log(item.paymentPattern); | |||||
console.log(that.data.transferTypeOptions); | |||||
res.data.transfers[index].transferTypeText = UTIL.getTransform(item.paymentPattern,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); | res.data.transfers[index].bankTypeText = UTIL.getTransform(item.bankType,that.data.bankTypeOptions); | ||||
res.data.transfers[index].num = UTIL.convertToChinaNum(index+1); | res.data.transfers[index].num = UTIL.convertToChinaNum(index+1); | ||||
res.data.transfers[index].collapseDis = true; | |||||
res.data.transfers[index].expenditureAmount = parseFloat(res.data.transfers[index].expenditureAmount).toFixed(2); | |||||
res.data.transfers[index].moneyOrderForm = []; | |||||
// res.data.transfers[index].expenditureAmount = parseFloat(0).toFixed(2); | |||||
res.data.transfers[index].payeeList.forEach( (response,i) => { | res.data.transfers[index].payeeList.forEach( (response,i) => { | ||||
@@ -188,6 +473,22 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
if(res.data.transfers[index].transferType == '12'){ | |||||
var transferTimer = setTimeout(function(){ | |||||
that.setData({ | |||||
["form.transfers["+index+"].moneyOrderForm"]:{ | |||||
billPayUnit : res.data.transfers[index].payer, | |||||
orderNum : res.data.transfers[index].payerAccount, | |||||
id : res.data.transfers[index].cashierId, | |||||
startTime : res.data.transfers[index].startTime, | |||||
endTime : res.data.transfers[index].endTime, | |||||
orderType : res.data.transfers[index].orderType, | |||||
orderAmount:res.data.transfers[index].expenditureAmount | |||||
}, | |||||
["form.transfers["+index+"].amountReadonly"]:true | |||||
}) | |||||
},1000) | |||||
} | |||||
UTIL.httpRequest( | UTIL.httpRequest( | ||||
API.URL_GET_FINDLIST, | API.URL_GET_FINDLIST, | ||||
{ | { | ||||
@@ -289,11 +590,12 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
}) | }) | ||||
that.setData({ | |||||
form:res.data, | |||||
activeNames:null | |||||
}) | |||||
UTIL.hideLoadingHaveMask(); | |||||
that.setData({ | |||||
form:res.data, | |||||
activeNames:null | |||||
}) | |||||
UTIL.hideLoadingHaveMask(); | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
@@ -320,168 +622,19 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
} | } | ||||
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, | |||||
}) | |||||
// 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) { | onChangeBox(event) { | ||||
console.log(event); | console.log(event); | ||||
@@ -499,76 +652,6 @@ Page({ | |||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow() { | onShow() { | ||||
var that = this; | |||||
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, | |||||
// }) | |||||
// } | |||||
// }) | |||||
// 付款方式类型字典查询 (2.0) | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'yn_pay_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, | |||||
}) | |||||
} | |||||
}) | |||||
}, | }, | ||||
openBox(even){ | openBox(even){ | ||||
@@ -628,6 +711,7 @@ Page({ | |||||
[event.currentTarget.dataset.value+'.bankAccountType']: '2', | [event.currentTarget.dataset.value+'.bankAccountType']: '2', | ||||
[event.currentTarget.dataset.value+'.isPeers']: '', | [event.currentTarget.dataset.value+'.isPeers']: '', | ||||
[event.currentTarget.dataset.value+'.paymentPattern']: event.detail.value.dictValue, | [event.currentTarget.dataset.value+'.paymentPattern']: event.detail.value.dictValue, | ||||
[event.currentTarget.dataset.value+'.amountReadonly']:false, | |||||
balance:0, | balance:0, | ||||
}); | }); | ||||
console.log(event.detail.value.dictValue); | console.log(event.detail.value.dictValue); | ||||
@@ -716,6 +800,7 @@ Page({ | |||||
success: (res) => { | success: (res) => { | ||||
that.setData({ | that.setData({ | ||||
moneyorderOptions:res.rows, | moneyorderOptions:res.rows, | ||||
[event.currentTarget.dataset.value+'.amountReadonly']:true | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
@@ -740,20 +825,18 @@ Page({ | |||||
console.log(event); | console.log(event); | ||||
this.setData({ | this.setData({ | ||||
[event.currentTarget.dataset.name]: false, | [event.currentTarget.dataset.name]: false, | ||||
[event.currentTarget.dataset.value]: event.detail.value.name, | |||||
['form.transfers['+event.detail.index+'].contractionForm.code']: event.detail.value.code, | |||||
['form.transfers['+event.detail.index+'].contractionForm.totalAmount']: event.detail.value.totalAmount, | |||||
['form.transfers['+event.detail.index+'].contractionForm.contractionId']: event.detail.value.id, | |||||
[event.currentTarget.dataset.value+".name"]: event.detail.value.name, | |||||
[event.currentTarget.dataset.value+'.code']: event.detail.value.code, | |||||
[event.currentTarget.dataset.value+'.totalAmount']: event.detail.value.totalAmount, | |||||
[event.currentTarget.dataset.value+'.contractionId']: event.detail.value.id, | |||||
}); | }); | ||||
}, | }, | ||||
onConfirmMoneyorder(event) { | |||||
onConfirmMoneyOrder(event) { | |||||
console.log(event); | console.log(event); | ||||
this.setData({ | this.setData({ | ||||
[event.currentTarget.dataset.name]: false, | [event.currentTarget.dataset.name]: false, | ||||
[event.currentTarget.dataset.value]: event.detail.value.name, | |||||
['contractionForm.code']: event.detail.value.code, | |||||
['contractionForm.totalAmount']: event.detail.value.totalAmount, | |||||
['contractionForm.id']: event.detail.value.id, | |||||
[event.currentTarget.dataset.value+'.moneyOrderForm']: event.detail.value, | |||||
[event.currentTarget.dataset.value+'.expenditureAmount']: event.detail.value.orderAmount, | |||||
}); | }); | ||||
}, | }, | ||||
goPayeeList(event){ | goPayeeList(event){ | ||||
@@ -793,14 +876,69 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
onChangeMoneyOut(event){ | |||||
console.log(event); | |||||
var that = this; | |||||
if( !(event.detail.value > -1)){ | |||||
this.setData({ | |||||
["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:'', | |||||
}) | |||||
return; | |||||
} | |||||
if( event.detail.value.indexOf('.')>0 && event.detail.value.toString().split(".")[1].length>2){ | |||||
this.setData({ | |||||
["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:event.detail.value.toString().split(".")[0] + '.' + event.detail.value.toString().split(".")[1].substr(0,2), | |||||
}) | |||||
return; | |||||
} | |||||
this.setData({ | |||||
// ["form.transfers["+event.currentTarget.dataset.index+"].payeeList["+event.currentTarget.dataset.childrenindex+"].incomeAmount"]: event.detail, | |||||
["form.transfers["+event.currentTarget.dataset.index+"].payeeList[0].incomeAmount"]: event.detail.value, | |||||
["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:event.detail.value, | |||||
// ["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:event.detail, | |||||
}) | |||||
if(event.detail.value == ''){ | |||||
that.data.form.transfers[event.currentTarget.dataset.index].payeeList[0].incomeAmount = parseFloat(0).toFixed(2); | |||||
that.data.form.transfers[event.currentTarget.dataset.index].expenditureAmount = parseFloat(0).toFixed(2); | |||||
} | |||||
var moneyCount = 0 ; | |||||
for (let i = 0; i < that.data.form.transfers.length; i++) { | |||||
const element = that.data.form.transfers[i]; | |||||
for (let j = 0; j < element.payeeList.length; j++) { | |||||
const element2 = element.payeeList[j]; | |||||
console.log(element2.incomeAmount); | |||||
var allCount = 0 ; | |||||
moneyCount = parseFloat(moneyCount) + parseFloat(element2.incomeAmount); | |||||
// allCount = parseFloat(allCount)+parseFloat(element2.incomeAmount); | |||||
// this.setData({ | |||||
// ["form.transfers["+i+"].expenditureAmount"]:allCount, | |||||
// }) | |||||
} | |||||
} | |||||
this.setData({ | |||||
["form.approvalItemTemplate.totalAmount"]:moneyCount.toFixed(2), | |||||
}) | |||||
}, | |||||
onChangeMoney(event){ | onChangeMoney(event){ | ||||
console.log(event); | console.log(event); | ||||
var that = this; | var that = this; | ||||
if(event.detail == ''){ | |||||
if( !(event.detail > -1)){ | |||||
this.setData({ | |||||
["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:'', | |||||
}) | |||||
return; | |||||
} | |||||
if( event.detail.indexOf('.')>0 && event.detail.toString().split(".")[1].length>2){ | |||||
this.setData({ | this.setData({ | ||||
["form.approvalItemTemplate.totalAmount"]:parseFloat(0).toFixed(2), | |||||
["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:event.detail.toString().split(".")[0] + '.' + event.detail.toString().split(".")[1].substr(0,2), | |||||
}) | }) | ||||
return | |||||
return; | |||||
} | } | ||||
this.setData({ | this.setData({ | ||||
// ["form.transfers["+event.currentTarget.dataset.index+"].payeeList["+event.currentTarget.dataset.childrenindex+"].incomeAmount"]: event.detail, | // ["form.transfers["+event.currentTarget.dataset.index+"].payeeList["+event.currentTarget.dataset.childrenindex+"].incomeAmount"]: event.detail, | ||||
@@ -822,12 +960,11 @@ Page({ | |||||
// }) | // }) | ||||
} | } | ||||
} | } | ||||
console.log(moneyCount.toFixed(2)); | |||||
this.setData({ | this.setData({ | ||||
["form.approvalItemTemplate.totalAmount"]:moneyCount.toFixed(2), | ["form.approvalItemTemplate.totalAmount"]:moneyCount.toFixed(2), | ||||
}) | }) | ||||
console.log(that.data.form); | console.log(that.data.form); | ||||
console.log(moneyCount.toFixed(2)); | |||||
console.log(allCount.toFixed(2)); | console.log(allCount.toFixed(2)); | ||||
}, | }, | ||||
back:function(){ | back:function(){ | ||||
@@ -883,7 +1020,7 @@ Page({ | |||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
if(element.payer == ''){ | |||||
if(element.payer == ''&&element.transferType != 12){ | |||||
UTIL.showToastNoneIcon('请选择事项'+UTIL.convertToChinaNum(i+1)+'的付款方!'); | UTIL.showToastNoneIcon('请选择事项'+UTIL.convertToChinaNum(i+1)+'的付款方!'); | ||||
return; | return; | ||||
} | } | ||||
@@ -895,6 +1032,16 @@ Page({ | |||||
UTIL.showToastNoneIcon('请填写事项'+UTIL.convertToChinaNum(i+1)+'收款方的收入金额!'); | UTIL.showToastNoneIcon('请填写事项'+UTIL.convertToChinaNum(i+1)+'收款方的收入金额!'); | ||||
return; | return; | ||||
} | } | ||||
if(element.transferType == '12'){ | |||||
list.transfers[i].payer = list.transfers[i].moneyOrderForm.billPayUnit; | |||||
list.transfers[i].payerAccount = list.transfers[i].moneyOrderForm.orderNum; | |||||
list.transfers[i].cashierId = list.transfers[i].moneyOrderForm.id; | |||||
list.transfers[i].startTime = list.transfers[i].moneyOrderForm.startTime; | |||||
list.transfers[i].endTime = list.transfers[i].moneyOrderForm.endTime; | |||||
list.transfers[i].orderType = list.transfers[i].moneyOrderForm.orderType; | |||||
} | |||||
} | } | ||||
if(e.currentTarget.dataset.type == 1){ | if(e.currentTarget.dataset.type == 1){ | ||||
if(that.data.form.approvalItemTemplate.templateName == ''){ | if(that.data.form.approvalItemTemplate.templateName == ''){ | ||||
@@ -910,6 +1057,8 @@ Page({ | |||||
} | } | ||||
that.data.form.method = 'POST'; | that.data.form.method = 'POST'; | ||||
that.data.form.approvalItemTemplate.dataType = e.currentTarget.dataset.type; | that.data.form.approvalItemTemplate.dataType = e.currentTarget.dataset.type; | ||||
console.log(that.data.form); | |||||
UTIL.httpRequest(API.URL_GET_SAVE, that.data.form, { | UTIL.httpRequest(API.URL_GET_SAVE, that.data.form, { | ||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
@@ -928,6 +1077,7 @@ Page({ | |||||
if(that.data.form.transfers[j].capitalExpenditureType == 4){ | if(that.data.form.transfers[j].capitalExpenditureType == 4){ | ||||
that.data.form.transfers[j].contractionForm.transferId = res.data.transfers[j].id; | that.data.form.transfers[j].contractionForm.transferId = res.data.transfers[j].id; | ||||
that.data.form.transfers[j].contractionForm.id = ''; | |||||
that.data.form.transfers[j].contractionForm.method = 'POST'; | that.data.form.transfers[j].contractionForm.method = 'POST'; | ||||
// 关联合同提交 | // 关联合同提交 | ||||
@@ -937,7 +1087,9 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
} | } | ||||
if(that.data.form.transfers[j].fileForm == undefined){continue;} | if(that.data.form.transfers[j].fileForm == undefined){continue;} | ||||
console.log(that.data.form.transfers[j].fileForm); | |||||
for (let i = 0; i < that.data.form.transfers[j].fileForm.length; i++) { | 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 | that.data.form.transfers[j].fileForm[i].tableId = res.data.transfers[j].id | ||||
const element = that.data.form.transfers[j].fileForm[i]; | const element = that.data.form.transfers[j].fileForm[i]; | ||||
@@ -963,7 +1115,7 @@ Page({ | |||||
} | } | ||||
if(e.currentTarget.dataset.type == 0){ | if(e.currentTarget.dataset.type == 0){ | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/apply/approval/approval?id='+res.data.approvalItemTemplate.id+'&deptId='+res.data.approvalItemTemplate.deptId, | |||||
url: '/pages/apply/approval/approval?id='+res.data.approvalItemTemplate.id+'&deptId='+res.data.approvalItemTemplate.deptId+'&form='+JSON.stringify(res.data)+'&type='+that.data.formType+'&applyOptions='+JSON.stringify(that.data.templateModel), | |||||
}) | }) | ||||
} | } | ||||
if(e.currentTarget.dataset.type == 2){ | if(e.currentTarget.dataset.type == 2){ | ||||
@@ -1042,12 +1194,9 @@ Page({ | |||||
SJtakephoto(e){ | SJtakephoto(e){ | ||||
var that = this; | var that = this; | ||||
let fileForm = that.data.form.transfers[e.currentTarget.dataset.index].fileForm?that.data.form.transfers[e.currentTarget.dataset.index].fileForm:[]; | let fileForm = that.data.form.transfers[e.currentTarget.dataset.index].fileForm?that.data.form.transfers[e.currentTarget.dataset.index].fileForm:[]; | ||||
wx.chooseMedia({ | wx.chooseMedia({ | ||||
count: 9, | |||||
mediaType: ['image','video'], | |||||
mediaType: ['image'], | |||||
sourceType: ['album', 'camera'], | sourceType: ['album', 'camera'], | ||||
maxDuration: 30, | |||||
camera: 'back', | camera: 'back', | ||||
success(res) { | success(res) { | ||||
console.log(res); | console.log(res); | ||||
@@ -1061,12 +1210,17 @@ Page({ | |||||
}) | }) | ||||
}) | }) | ||||
console.log(fileForm); | console.log(fileForm); | ||||
let tem = that.data.form.transfers[e.currentTarget.dataset.index].SJimage?that.data.form.transfers[e.currentTarget.dataset.index].SJimage:[]; | |||||
res.tempFiles.forEach(r=>{ | |||||
tem.push({ | |||||
tempFilePath:r.tempFilePath | |||||
}) | |||||
}) | |||||
console.log(tem); | |||||
that.setData({ | that.setData({ | ||||
["form.transfers["+e.currentTarget.dataset.index+"].SJimage"]:res.tempFiles, | |||||
["form.transfers["+e.currentTarget.dataset.index+"].SJimage"]:tem, | |||||
["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm, | ["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm, | ||||
}) | }) | ||||
let SJlength = that.data.form.transfers[e.currentTarget.dataset.index].SJimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].SJimage.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 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 QTlength = that.data.form.transfers[e.currentTarget.dataset.index].QTimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].QTimage.length; | ||||
@@ -1074,17 +1228,18 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
["form.transfers["+e.currentTarget.dataset.index+"].fileNum"]:fileNum, | ["form.transfers["+e.currentTarget.dataset.index+"].fileNum"]:fileNum, | ||||
}) | }) | ||||
},fail(err){ | |||||
console.log(err); | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
FPtakephoto(e){ | FPtakephoto(e){ | ||||
var that = this; | var that = this; | ||||
let fileForm = that.data.form.transfers[e.currentTarget.dataset.index].fileForm?that.data.form.transfers[e.currentTarget.dataset.index].fileForm:[]; | let fileForm = that.data.form.transfers[e.currentTarget.dataset.index].fileForm?that.data.form.transfers[e.currentTarget.dataset.index].fileForm:[]; | ||||
console.log(fileForm); | |||||
wx.chooseMedia({ | wx.chooseMedia({ | ||||
count: 9, | |||||
mediaType: ['image','video'], | |||||
mediaType: ['image'], | |||||
sourceType: ['album', 'camera'], | sourceType: ['album', 'camera'], | ||||
maxDuration: 30, | |||||
camera: 'back', | camera: 'back', | ||||
success(res) { | success(res) { | ||||
console.log(res); | console.log(res); | ||||
@@ -1098,7 +1253,7 @@ Page({ | |||||
}) | }) | ||||
}) | }) | ||||
let tem = that.data.form.transfers[e.currentTarget.dataset.index].FPimage; | |||||
let tem = that.data.form.transfers[e.currentTarget.dataset.index].FPimage?that.data.form.transfers[e.currentTarget.dataset.index].FPimage:[]; | |||||
res.tempFiles.forEach(r=>{ | res.tempFiles.forEach(r=>{ | ||||
tem.push({ | tem.push({ | ||||
@@ -1118,6 +1273,8 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
["form.transfers["+e.currentTarget.dataset.index+"].fileNum"]:fileNum, | ["form.transfers["+e.currentTarget.dataset.index+"].fileNum"]:fileNum, | ||||
}) | }) | ||||
},fail(err){ | |||||
console.log(err); | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
@@ -1125,10 +1282,8 @@ Page({ | |||||
var that = this; | var that = this; | ||||
let fileForm = that.data.form.transfers[e.currentTarget.dataset.index].fileForm?that.data.form.transfers[e.currentTarget.dataset.index].fileForm:[]; | let fileForm = that.data.form.transfers[e.currentTarget.dataset.index].fileForm?that.data.form.transfers[e.currentTarget.dataset.index].fileForm:[]; | ||||
wx.chooseMedia({ | wx.chooseMedia({ | ||||
count: 9, | |||||
mediaType: ['image','video'], | |||||
mediaType: ['image'], | |||||
sourceType: ['album', 'camera'], | sourceType: ['album', 'camera'], | ||||
maxDuration: 30, | |||||
camera: 'back', | camera: 'back', | ||||
success(res) { | success(res) { | ||||
console.log(res); | console.log(res); | ||||
@@ -1142,8 +1297,15 @@ Page({ | |||||
}) | }) | ||||
}) | }) | ||||
console.log(fileForm); | console.log(fileForm); | ||||
let tem = that.data.form.transfers[e.currentTarget.dataset.index].QTimage?that.data.form.transfers[e.currentTarget.dataset.index].QTimage:[]; | |||||
res.tempFiles.forEach(r=>{ | |||||
tem.push({ | |||||
tempFilePath:r.tempFilePath | |||||
}) | |||||
}) | |||||
that.setData({ | that.setData({ | ||||
["form.transfers["+e.currentTarget.dataset.index+"].QTimage"]:res.tempFiles, | |||||
["form.transfers["+e.currentTarget.dataset.index+"].QTimage"]:tem, | |||||
["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm | ["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm | ||||
}) | }) | ||||
let SJlength = that.data.form.transfers[e.currentTarget.dataset.index].SJimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].SJimage.length; | let SJlength = that.data.form.transfers[e.currentTarget.dataset.index].SJimage == undefined ? 0:that.data.form.transfers[e.currentTarget.dataset.index].SJimage.length; | ||||
@@ -1153,6 +1315,8 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
["form.transfers["+e.currentTarget.dataset.index+"].fileNum"]:fileNum, | ["form.transfers["+e.currentTarget.dataset.index+"].fileNum"]:fileNum, | ||||
}) | }) | ||||
},fail(err){ | |||||
console.log(err); | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
@@ -1162,7 +1326,7 @@ Page({ | |||||
console.log(this.data.form); | console.log(this.data.form); | ||||
for (let i = 0; i < transList.length; i++) { | for (let i = 0; i < transList.length; i++) { | ||||
const element = transList[i]; | const element = transList[i]; | ||||
if(element.applyDate == '' || element.remark == '' || element.payer == '' || element.payeeList[0].payee == '' || element.payeeList[0].incomeAmount == '' || element.payeeList[0].incomeAmount == undefined){ | |||||
if(element.applyDate == '' || element.remark == '' || element.expenditureAmount == '' || element.payer == '' || element.payeeList[0].payee == '' || element.payeeList[0].incomeAmount == '' || element.payeeList[0].incomeAmount == undefined){ | |||||
UTIL.showToastNoneIcon('事项'+UTIL.convertToChinaNum(i+1)+'的信息填写不完整,检查后重试!'); | UTIL.showToastNoneIcon('事项'+UTIL.convertToChinaNum(i+1)+'的信息填写不完整,检查后重试!'); | ||||
return; | return; | ||||
} | } | ||||
@@ -1216,7 +1380,7 @@ Page({ | |||||
payeeId:'0',//收款方id | payeeId:'0',//收款方id | ||||
payee:'',//收款方 | payee:'',//收款方 | ||||
bankDeposit:'',//开户行 | bankDeposit:'',//开户行 | ||||
incomeAmount:'',//收入金额 | |||||
incomeAmount:'0.00',//收入金额 | |||||
bankType:'',//所属银行0其他银行1中国银行2农商行(山东省)3农业银行4建设银行5工商银行 | bankType:'',//所属银行0其他银行1中国银行2农商行(山东省)3农业银行4建设银行5工商银行 | ||||
payeeAccount:'',//收款账户 | payeeAccount:'',//收款账户 | ||||
}], | }], | ||||
@@ -1303,18 +1467,38 @@ Page({ | |||||
deleteTransfers(e){ | deleteTransfers(e){ | ||||
var that = this ; | var that = this ; | ||||
console.log(e.currentTarget.dataset.index); | console.log(e.currentTarget.dataset.index); | ||||
that.setData({ | |||||
["form.transfers["+e.currentTarget.dataset.index+"].collapseDis"]:true | |||||
}) | |||||
// that.data.form.transfers[e.currentTarget.dataset.index].collapseDis = true; | |||||
if(that.data.form.transfers.length<2){ | if(that.data.form.transfers.length<2){ | ||||
UTIL.showToastNoneIcon('最少保留一条事项'); | UTIL.showToastNoneIcon('最少保留一条事项'); | ||||
that.setData({ | |||||
["form.transfers["+e.currentTarget.dataset.index+"].collapseDis"]:false | |||||
}) | |||||
return; | return; | ||||
} | } | ||||
that.data.form.transfers.splice(e.currentTarget.dataset.index,1); | that.data.form.transfers.splice(e.currentTarget.dataset.index,1); | ||||
for (let i = 0; i < that.data.form.transfers.length; i++) { | |||||
that.data.form.transfers[i].num = UTIL.convertToChinaNum(i+1) | |||||
} | |||||
console.log(that.data.form); | |||||
that.setData({ | that.setData({ | ||||
form:that.data.form | form:that.data.form | ||||
}) | }) | ||||
}, | }, | ||||
disabledNone(e){ | |||||
console.log("b"); | |||||
var that = this ; | |||||
that.setData({ | |||||
["form.transfers["+e.currentTarget.dataset.index+"].collapseDis"]:true | |||||
}) | |||||
}, | |||||
disabledBlock(e){ | |||||
console.log("a"); | |||||
var that = this ; | |||||
that.setData({ | |||||
["form.transfers["+e.currentTarget.dataset.index+"].collapseDis"]:false | |||||
}) | |||||
}, | |||||
onOpen(e){ | onOpen(e){ | ||||
var that = this ; | var that = this ; | ||||
console.log(that.data.activeNames); | console.log(that.data.activeNames); | ||||
@@ -1337,12 +1521,21 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
deleteimg(e){ | deleteimg(e){ | ||||
console.log(e); | |||||
let options = e.currentTarget.dataset.options; | let options = e.currentTarget.dataset.options; | ||||
console.log(options); | |||||
let file = this.data.form.transfers[e.currentTarget.dataset.parentsindex].fileForm; | |||||
for (let i = 0; i < file.length; i++) { | |||||
const element = file[i]; | |||||
if(element.file == options[e.currentTarget.dataset.index].tempFilePath){ | |||||
file.splice(i,1); | |||||
} | |||||
} | |||||
options.splice(e.currentTarget.dataset.index,1); | options.splice(e.currentTarget.dataset.index,1); | ||||
let length = this.data.form.transfers[e.currentTarget.dataset.parentsindex].fileNum - 1; | |||||
this.setData({ | this.setData({ | ||||
[e.currentTarget.dataset.name]:options | |||||
[e.currentTarget.dataset.name]:options, | |||||
["form.transfers["+e.currentTarget.dataset.parentsindex+"].fileNum"]:length, | |||||
["form.transfers["+e.currentTarget.dataset.parentsindex+"].fileForm"]:file, | |||||
}) | }) | ||||
UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+e.currentTarget.dataset.id , {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+e.currentTarget.dataset.id , {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
@@ -21,7 +21,7 @@ | |||||
<view class="main-box top-box topBox" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="main-box top-box topBox" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
<text class="box-title">审批事项</text> | <text class="box-title">审批事项</text> | ||||
<van-field required focus="{{topInputTirme}}" error="{{topInputTirme}}" class="input_tittop {{topInputTirme?'error':''}}" data-formname="topInput" value="{{ form.approvalItemTemplate.approvalItems }}" placeholder="请输入审批事项" border="{{ false }}" bind:input="bindKeyInput" bind:blur="errorPd"/> | |||||
<van-field required focus="{{topInputTirme}}" error="{{topInputTirme}}" class="input_tittop {{topInputTirme?'error':''}}" data-formname="topInput" value="{{ form.approvalItemTemplate.approvalItems }}" placeholder="请输入审批事项" border="{{ false }}" bind:input="bindKeyInput"/> | |||||
<text>支出总金额</text> | <text>支出总金额</text> | ||||
<view class="money_box">¥<input class="input_money" type="digit" disabled placeholder="总金额" placeholder-style="color:#E90000;" value="{{form.approvalItemTemplate.totalAmount}}"/></view> | <view class="money_box">¥<input class="input_money" type="digit" disabled placeholder="总金额" placeholder-style="color:#E90000;" value="{{form.approvalItemTemplate.totalAmount}}"/></view> | ||||
<text>提交单位:{{form.approvalItemTemplate.submitCompany}}</text> | <text>提交单位:{{form.approvalItemTemplate.submitCompany}}</text> | ||||
@@ -35,31 +35,33 @@ | |||||
</view> | </view> | ||||
<van-collapse accordion value="{{ activeNames }}" bind:change="onChangeBox" bind:open="onOpen" bind:close="onCloseSecond"> | <van-collapse accordion value="{{ activeNames }}" bind:change="onChangeBox" bind:open="onOpen" bind:close="onCloseSecond"> | ||||
<van-collapse-item name="{{index}}" disabled="{{item.collapseDis}}" is-link="{{false}}" wx:for="{{form.transfers}}" wx:key="index"> | |||||
<van-collapse-item name="{{index}}" disabled="{{item.collapseDis}}" is-link="{{false}}" wx:for="{{form.transfers}}" wx:key="index" data-index="{{index}}" > | |||||
<view slot="title" wx:if="{{item.showTitle}}" class="main-title">事项{{form.transfers[index].num}} | <view slot="title" wx:if="{{item.showTitle}}" class="main-title">事项{{form.transfers[index].num}} | ||||
<image src="/image/apply/delete.png" style="width: 24px;height: 24px;position: absolute;right: 4%;top: 10px;" data-index="{{index}}" bindtap="deleteTransfers"></image> | <image src="/image/apply/delete.png" style="width: 24px;height: 24px;position: absolute;right: 4%;top: 10px;" data-index="{{index}}" bindtap="deleteTransfers"></image> | ||||
<image src="/image/apply/icon_close.png" style="width: 24px;height: 24px;position: absolute;right: calc(4% + 30px);top: 10px;transform: rotateX(180deg);" data-index="{{index}}" ></image> | |||||
<image src="/image/apply/icon_close.png" style="width: 24px;height: 24px;position: absolute;right: calc(4% + 30px);top: 10px;transform: rotateX(180deg);" data-index="{{index}}" bindtap="disabledBlock"></image> | |||||
</view> | </view> | ||||
<view slot="title" class="tit_box" wx:if="{{!item.showTitle}}"> | <view slot="title" class="tit_box" wx:if="{{!item.showTitle}}"> | ||||
<text class="title" style="text-align: center;">事项{{item.num}}</text> | |||||
<text class="title" style="text-align: center;color: #000;">事项{{item.num}}</text> | |||||
<view class="top-box"> | <view class="top-box"> | ||||
<text>支出金额</text> | |||||
<view class="money_box">¥<input class="input_money" disabled placeholder="金额" placeholder-style="color:#E90000;" value="{{item.expenditureAmount}}"/></view> | |||||
<text style="color: #000;">支出金额</text> | |||||
<view class="money_box" data-index="{{index}}" bindtap="disabledNone">¥<input class="input_money" type="digit" placeholder="0.00" placeholder-style="color:#E90000;" value="{{form.transfers[index].expenditureAmount}}" data-formname="form.transfers[{{index}}].expenditureAmount" data-index="{{index}}" input-align="right" bindinput="onChangeMoneyOut"/></view> | |||||
<van-cell-group border="{{ false }}"> | <van-cell-group border="{{ false }}"> | ||||
<van-cell title="{{item.remark}}" border="{{ false }}" > | |||||
<van-cell title="{{item.remark}}" border="{{ false }}"> | |||||
<view slot="icon" style="width: 15%;">事由:</view> | <view slot="icon" style="width: 15%;">事由:</view> | ||||
</van-cell> | </van-cell> | ||||
<van-cell title="{{item.payer}}" border="{{ false }}" center > | |||||
<van-cell title="{{item.payer}}" border="{{ false }}" center> | |||||
<view slot="icon" style="width: 15%;"><image src="/image/apply/icon_fu.png" style="width: 20px;height: 20px;"></image></view> | <view slot="icon" style="width: 15%;"><image src="/image/apply/icon_fu.png" style="width: 20px;height: 20px;"></image></view> | ||||
</van-cell> | </van-cell> | ||||
<van-cell title="{{item.payeeList[0].payee}}" center border="{{ false }}" > | |||||
<van-cell title="{{item.payeeList[0].payee}}" center border="{{ false }}"> | |||||
<view slot="icon" style="width: 15%;"><image src="/image/apply/icon_shou.png" style="width: 20px;height: 20px;"></image></view> | <view slot="icon" style="width: 15%;"><image src="/image/apply/icon_shou.png" style="width: 20px;height: 20px;"></image></view> | ||||
</van-cell> | </van-cell> | ||||
<view class="btnBox"> | <view class="btnBox"> | ||||
<image src="/image/apply/down.png" data-index="{{index}}" class="down"></image> | |||||
<image src="/image/apply/down.png" data-index="{{index}}" class="down" bindtap="disabledBlock"></image> | |||||
<!-- <image src="/image/apply/icon_update.png" class="update" bindtap="goUpdate"></image> --> | <!-- <image src="/image/apply/icon_update.png" class="update" bindtap="goUpdate"></image> --> | ||||
<image src="/image/apply/icon_delete.png" class="delete" data-index="{{index}}" bindtap="goDelete"></image> | |||||
<image src="/image/apply/icon_delete.png" class="delete" data-index="{{index}}" bindtap="deleteTransfers"></image> | |||||
</view> | </view> | ||||
</van-cell-group> | </van-cell-group> | ||||
</view> | </view> | ||||
@@ -69,16 +71,12 @@ | |||||
<view class="main-box table-box"> | <view class="main-box table-box"> | ||||
<!-- <van-field label="申请流水号" value="{{ form.approvalItemTemplate.telephone }}" placeholder="请输入申请流水号" border="{{ false }}" bind:change="onChange" input-align="right"/> --> | <!-- <van-field label="申请流水号" value="{{ form.approvalItemTemplate.telephone }}" placeholder="请输入申请流水号" border="{{ false }}" bind:change="onChange" input-align="right"/> --> | ||||
<van-field required label="支出金额" type="digit" focus="{{form.transfers[index].expenditureAmountTirme}}" error="{{form.transfers[index].expenditureAmountTirme}}" type="digit" value="{{ form.transfers[index].expenditureAmount }}" placeholder="请输入支出金额" border="{{ false }}" data-formname="form.transfers[{{index}}].expenditureAmount" data-index="{{index}}" input-align="right" bind:change="onChangeMoney" bind:blur="errorJE"/> | |||||
<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 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="收入金额" 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" bind:blur="errorYY"/> | |||||
<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-popup show="{{form.transfers[index].showTransferType}}" round position="bottom" bind:close="closeBox" data-name="form.transfers[{{index}}].showTransferType"> | <van-popup show="{{form.transfers[index].showTransferType}}" round position="bottom" bind:close="closeBox" data-name="form.transfers[{{index}}].showTransferType"> | ||||
<van-picker | <van-picker | ||||
columns="{{transferTypeOptions}}" | columns="{{transferTypeOptions}}" | ||||
@@ -152,11 +150,11 @@ | |||||
bind:cancel="closeBox" | bind:cancel="closeBox" | ||||
bind:confirm="onConfirmContraction" | bind:confirm="onConfirmContraction" | ||||
data-name="form.transfers[{{index}}].showContraction" | data-name="form.transfers[{{index}}].showContraction" | ||||
data-value="form.transfers[{{index}}].contractionForm.name" | |||||
data-value="form.transfers[{{index}}].contractionForm" | |||||
/> | /> | ||||
</van-popup> | </van-popup> | ||||
<van-field label="合同名称" readonly value="{{ form.transfers[index].contractionForm.name }}" placeholder="请选择合同名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link bindtap="openBox" data-name="form.transfers[{{index}}].showContraction"/> | <van-field label="合同名称" readonly value="{{ form.transfers[index].contractionForm.name }}" placeholder="请选择合同名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link bindtap="openBox" data-name="form.transfers[{{index}}].showContraction"/> | ||||
<van-field label="合同编码" value="{{ form.transfers[index].contractionForm.code }}" placeholder="请输入合同编码" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field label="合同编码" readonly value="{{ form.transfers[index].contractionForm.code }}" placeholder="请输入合同编码" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field label="合同价款(元)" readonly value="{{ form.transfers[index].contractionForm.totalAmount }}" placeholder="请输入合同价款(元)" border="{{ false }}" bind:change="onChange" input-align="right"/> | <van-field label="合同价款(元)" readonly value="{{ form.transfers[index].contractionForm.totalAmount }}" placeholder="请输入合同价款(元)" border="{{ false }}" bind:change="onChange" input-align="right"/> | ||||
</view> | </view> | ||||
@@ -197,24 +195,24 @@ | |||||
<van-field readonly wx:if="{{form.transfers[index].transferType == 11}}" label="可用余额(元)" value="{{ balance }}" placeholder="可用余额" border="{{ false }}" bind:change="onChange" input-align="right"/> | <van-field readonly wx:if="{{form.transfers[index].transferType == 11}}" label="可用余额(元)" value="{{ balance }}" placeholder="可用余额" border="{{ false }}" bind:change="onChange" input-align="right"/> | ||||
<block wx:elif="{{form.transfers[index].transferType == 12}}"> | <block wx:elif="{{form.transfers[index].transferType == 12}}"> | ||||
<van-popup show="{{showAccount}}" round position="bottom" bind:close="closeBox" data-name="showMoneyorder"> | |||||
<van-popup show="{{form.transfers[index].showMoneyOrder}}" round position="bottom" bind:close="closeBox" data-name="showMoneyOrder"> | |||||
<van-picker | <van-picker | ||||
columns="{{moneyorderOptions}}" | |||||
columns="{{moneyOrderOptions}}" | |||||
show-toolbar | show-toolbar | ||||
value-key="accountName" | |||||
value-key="billPayUnit" | |||||
bind:cancel="closeBox" | bind:cancel="closeBox" | ||||
bind:confirm="onConfirmMoneyorder" | |||||
data-name="showMoneyorder" | |||||
bind:confirm="onConfirmMoneyOrder" | |||||
data-name="form.transfers[{{index}}].showMoneyOrder" | |||||
data-value="form.transfers[{{index}}]" | data-value="form.transfers[{{index}}]" | ||||
/> | /> | ||||
</van-popup> | </van-popup> | ||||
<van-field readonly label="出票方" value="{{ form.transfers[index].payerAccount }}" placeholder="请选择出票方" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showMoneyorder"/> | |||||
<van-field readonly label="出票方" value="{{form.transfers[index].moneyOrderForm.billPayUnit }}" placeholder="请选择出票方" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="form.transfers[{{index}}].showMoneyOrder"/> | |||||
<van-field readonly label="汇票号码" value="{{ form.transfers[index].bankTypeText }}" placeholder="汇票号码" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field readonly label="出票金额(元)" value="{{ form.transfers[index].bankTypeText }}" placeholder="出票金额(元)" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field readonly label="汇票类型" value="{{ form.transfers[index].bankTypeText }}" placeholder="汇票类型" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field readonly label="开票日" value="{{ form.transfers[index].bankTypeText }}" placeholder="开票日" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field readonly label="到期日" value="{{ form.transfers[index].bankTypeText }}" placeholder="到期日" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field readonly label="汇票号码" value="{{ form.transfers[index].moneyOrderForm.orderNum }}" placeholder="汇票号码" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field readonly label="出票金额(元)" value="{{ form.transfers[index].moneyOrderForm.orderAmount }}" placeholder="出票金额(元)" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field readonly label="汇票类型" value="{{ form.transfers[index].moneyOrderForm.orderType }}" placeholder="汇票类型" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field readonly label="开票日" value="{{ form.transfers[index].moneyOrderForm.startTime }}" placeholder="开票日" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field readonly label="到期日" value="{{ form.transfers[index].moneyOrderForm.endTime }}" placeholder="到期日" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
</block> | </block> | ||||
<block wx:else> | <block wx:else> | ||||
<van-field required readonly label="付款账号" value="{{ form.transfers[index].payerAccount }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/> | <van-field required readonly label="付款账号" value="{{ form.transfers[index].payerAccount }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/> | ||||
@@ -224,49 +222,31 @@ | |||||
</view> | </view> | ||||
<text class="title">收款方信息</text> | <text class="title">收款方信息</text> | ||||
<view class="center-box"> | <view class="center-box"> | ||||
<view class="main-box table-box" wx:if="{{form.transfers[index].bankType == 1 && form.transfers[index].transferType != 10 && form.transfers[index].transferType != 11 && form.transfers[index].transferType != 12}}"> | |||||
<van-cell title="收款账户类型" center border="{{false}}"> | |||||
<view style="float: right;"> | |||||
<van-radio-group | |||||
value="{{ form.transfers[index].bankAccountType }}" | |||||
bind:change="onChange" | |||||
direction="horizontal" | |||||
data-value="form.transfers[{{index}}].bankAccountType" | |||||
> | |||||
<van-radio name="1" checked-color="#2C8E68">公户</van-radio> | |||||
<van-radio name="2" checked-color="#2C8E68">私户</van-radio> | |||||
</van-radio-group> | |||||
</view> | |||||
</van-cell> | |||||
</view> | |||||
<!-- <view class="main-box table-box" wx:if="{{(form.transfers[index].bankType == 2 || form.transfers[index].bankType == 3 || form.transfers[index].bankType == 4) && (form.transfers[index].transferType != 10 && form.transfers[index].transferType != 11 && form.transfers[index].transferType != 12)}}"> | |||||
<van-cell title="是否同行" center border="{{false}}"> | |||||
<view style="float: right;"> | |||||
<van-radio-group | |||||
value="{{ form.transfers[index].isPeers }}" | |||||
bind:change="onChange" | |||||
direction="horizontal" | |||||
data-value="form.transfers[{{index}}].isPeers" | |||||
> | |||||
<van-radio name="Y" checked-color="#2C8E68">是</van-radio> | |||||
<van-radio name="N" checked-color="#2C8E68">否</van-radio> | |||||
</van-radio-group> | |||||
</view> | |||||
</van-cell> | |||||
</view> --> | |||||
<view class="main-box table-box" wx:for="{{form.transfers[index].payeeList}}" wx:for-index="childrenIndex" wx:key="payeeId"> | |||||
<van-field required readonly value="{{ form.transfers[index].payeeList[childrenIndex].payee }}" placeholder="请选择收款方" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="goPayeeList" data-payer="{{form.transfers[index].payer}}" data-index="{{index}}" data-isPeers="{{ form.transfers[index].isPeers }}" data-bankType="{{ form.transfers[index].bankType }}" data-accountType="{{ form.transfers[index].bankAccountType }}" data-transferType="{{ form.transfers[index].transferType }}"> | |||||
<block wx:if="{{form.transfers[index].transferType == 12}}"> | |||||
<view class="main-box table-box" wx:for="{{form.transfers[index].payeeList}}" wx:for-index="childrenIndex" wx:key="payeeId"> | |||||
<van-field required value="{{ form.transfers[index].payeeList[childrenIndex].payee }}" placeholder="请选择收款方" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"> | |||||
<view slot="label"> | <view slot="label"> | ||||
收款方<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">选择</van-tag> | |||||
收款方<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">输入</van-tag> | |||||
</view> | </view> | ||||
</van-field> | |||||
<van-field required readonly label="收款账号" value="{{ form.transfers[index].payeeList[childrenIndex].payeeAccount }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field required readonly label="开户银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankDeposit }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | |||||
<!-- <van-field 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 readonly label="所属银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankTypeText }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | |||||
</view> | |||||
</van-field> | |||||
<van-field required readonly label=" 联系方式" value="{{ form.transfers[index].payeeList[childrenIndex].phone }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field required readonly label="所属单位" value="{{ form.transfers[index].payeeList[childrenIndex].unit }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | |||||
<van-field required readonly label="负责人全称" value="{{ form.transfers[index].payeeList[childrenIndex].leader }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | |||||
<van-field required readonly label="资金用途" value="{{ form.transfers[index].payeeList[childrenIndex].remark }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | |||||
</view> | |||||
</block> | |||||
<block wx:else> | |||||
<view class="main-box table-box"> | |||||
<van-field required readonly value="{{ form.transfers[index].payeeList[childrenIndex].payee }}" placeholder="请选择收款方" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="goPayeeList" data-payer="{{form.transfers[index].payer}}" data-index="{{index}}" data-isPeers="{{ form.transfers[index].isPeers }}" data-bankType="{{ form.transfers[index].bankType }}" data-accountType="{{ form.transfers[index].bankAccountType }}" data-transferType="{{ form.transfers[index].transferType }}"> | |||||
<view slot="label"> | |||||
收款方<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">选择</van-tag> | |||||
</view> | |||||
</van-field> | |||||
<van-field required readonly label="收款账号" value="{{ form.transfers[index].payeeList[childrenIndex].payeeAccount }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||||
<van-field required readonly label="开户银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankDeposit }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | |||||
</view> | |||||
</block> | |||||
</view> | </view> | ||||
<view class="main-box"> | <view class="main-box"> | ||||
@@ -289,7 +269,7 @@ | |||||
<view class="img_box"> | <view class="img_box"> | ||||
<view class="img_list" wx:for="{{form.transfers[index].SJimage}}" wx:for-index="childrenIndex" wx:key="id"> | <view class="img_list" wx:for="{{form.transfers[index].SJimage}}" wx:for-index="childrenIndex" wx:key="id"> | ||||
<image class="img_li" src="{{item.tempFilePath}}" data-option="{{form.transfers[index].SJimage}}" data-index="{{childrenIndex}}" bindtap="openPreview"></image> | <image class="img_li" src="{{item.tempFilePath}}" data-option="{{form.transfers[index].SJimage}}" data-index="{{childrenIndex}}" bindtap="openPreview"></image> | ||||
<van-icon name="/image/apply/img_delete.png" size="20px" data-index="{{childrenIndex}}" data-name="form.transfers[{{index}}].SJimage" data-options="{{form.transfers[index].SJimage}}" data-id="{{item.id}}" bindtap="deleteimg" /> | |||||
<van-icon name="/image/apply/img_delete.png" size="20px" data-index="{{childrenIndex}}" data-parentsIndex="{{index}}" data-name="form.transfers[{{index}}].SJimage" data-options="{{form.transfers[index].SJimage}}" data-id="{{item.id}}" bindtap="deleteimg" /> | |||||
</view> | </view> | ||||
<view class="img_list"> | <view class="img_list"> | ||||
<image class="img_li img_add" src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="SJtakephoto"></image> | <image class="img_li img_add" src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="SJtakephoto"></image> | ||||
@@ -304,7 +284,7 @@ | |||||
<view class="img_list" wx:for="{{form.transfers[index].FPimage}}" wx:for-index="childrenIndex" wx:key="id"> | <view class="img_list" wx:for="{{form.transfers[index].FPimage}}" wx:for-index="childrenIndex" wx:key="id"> | ||||
<image class="img_li" src="{{item.tempFilePath}}" data-option="{{form.transfers[index].FPimage}}" data-index="{{childrenIndex}}" bindtap="openPreview"></image> | <image class="img_li" src="{{item.tempFilePath}}" data-option="{{form.transfers[index].FPimage}}" data-index="{{childrenIndex}}" bindtap="openPreview"></image> | ||||
<van-icon name="/image/apply/img_delete.png" size="20px" data-index="{{childrenIndex}}" data-name="form.transfers[{{index}}].FPimage" data-options="{{form.transfers[index].FPimage}}" data-id="{{item.id}}" bindtap="deleteimg" /> | |||||
<van-icon name="/image/apply/img_delete.png" size="20px" data-index="{{childrenIndex}}" data-parentsIndex="{{index}}" data-name="form.transfers[{{index}}].FPimage" data-options="{{form.transfers[index].FPimage}}" data-id="{{item.id}}" bindtap="deleteimg" /> | |||||
</view> | </view> | ||||
<view class="img_list"> | <view class="img_list"> | ||||
<image class="img_li img_add" src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="FPtakephoto"></image> | <image class="img_li img_add" src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="FPtakephoto"></image> | ||||
@@ -318,7 +298,7 @@ | |||||
<view class="img_box"> | <view class="img_box"> | ||||
<view class="img_list" wx:for="{{form.transfers[index].QTimage}}" wx:for-index="childrenIndex" wx:key="id"> | <view class="img_list" wx:for="{{form.transfers[index].QTimage}}" wx:for-index="childrenIndex" wx:key="id"> | ||||
<image class="img_li" src="{{item.tempFilePath}}" data-option="{{form.transfers[index].QTimage}}" data-index="{{childrenIndex}}" bindtap="openPreview" ></image> | <image class="img_li" src="{{item.tempFilePath}}" data-option="{{form.transfers[index].QTimage}}" data-index="{{childrenIndex}}" bindtap="openPreview" ></image> | ||||
<van-icon name="/image/apply/img_delete.png" size="20px" data-index="{{childrenIndex}}" data-name="form.transfers[{{index}}].QTimage" data-options="{{form.transfers[index].QTimage}}" data-id="{{item.id}}" bindtap="deleteimg" /> | |||||
<van-icon name="/image/apply/img_delete.png" size="20px" data-index="{{childrenIndex}}" data-parentsIndex="{{index}}" data-name="form.transfers[{{index}}].QTimage" data-options="{{form.transfers[index].QTimage}}" data-id="{{item.id}}" bindtap="deleteimg" /> | |||||
</view> | </view> | ||||
<view class="img_list"> | <view class="img_list"> | ||||
<image class="img_li img_add" src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="QTtakephoto"></image> | <image class="img_li img_add" src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="QTtakephoto"></image> | ||||
@@ -599,10 +579,10 @@ | |||||
<block wx:if="{{!isUpdate}}"> | <block wx:if="{{!isUpdate}}"> | ||||
<view class="bottomBtn"> | <view class="bottomBtn"> | ||||
<view bindtap="goSubmitMB"> | |||||
<!-- <view bindtap="goSubmitMB"> | |||||
<image src="/image/apply/icon_pres.png"></image> | <image src="/image/apply/icon_pres.png"></image> | ||||
<text>保存模板</text> | <text>保存模板</text> | ||||
</view> | |||||
</view> --> | |||||
<view bindtap="addList"> | <view bindtap="addList"> | ||||
<image src="/image/apply/icon_add.png"></image> | <image src="/image/apply/icon_add.png"></image> | ||||
<text>新增事项</text> | <text>新增事项</text> | ||||
@@ -156,7 +156,7 @@ text{display: block;} | |||||
} | } | ||||
.bottomBtn view{ | .bottomBtn view{ | ||||
display: flex; | display: flex; | ||||
width: 48%; | |||||
width: 100%; | |||||
background-color: #ffffff; | background-color: #ffffff; | ||||
border-radius: 5px; | border-radius: 5px; | ||||
box-shadow: 0px 5px 9px #DCDCDC; | box-shadow: 0px 5px 9px #DCDCDC; | ||||
@@ -386,7 +386,7 @@ text{display: block;} | |||||
color: #E90000; | color: #E90000; | ||||
font-size: 26px; | font-size: 26px; | ||||
display: inline-block; | display: inline-block; | ||||
width: 50%; | |||||
width: 70%; | |||||
text-align: center; | text-align: center; | ||||
} | } | ||||
@@ -408,10 +408,9 @@ text{display: block;} | |||||
height: 26px; | height: 26px; | ||||
} | } | ||||
.down{ | .down{ | ||||
width: 15px; | |||||
height: 8px; | |||||
width: 30px; | |||||
height: 26px; | |||||
margin: 0 auto; | margin: 0 auto; | ||||
margin-top: 18px; | |||||
} | } | ||||
.update{ | .update{ | ||||
@@ -461,5 +460,4 @@ text{display: block;} | |||||
} | } | ||||
.van-collapse .tit_box .top-box .van-cell{ | .van-collapse .tit_box .top-box .van-cell{ | ||||
margin-bottom: 15px; | margin-bottom: 15px; | ||||
} | |||||
} |
@@ -3,6 +3,64 @@ | |||||
<text style="top:{{isIPX?'54px':'30px'}};">新增付款方</text> | <text style="top:{{isIPX?'54px':'30px'}};">新增付款方</text> | ||||
</view> | </view> | ||||
<view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
<van-field label="账户类型" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="所属银行" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="账户分类" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="所属镇账户" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="账簿号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="管控类型" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="客户编号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="账户名称" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field label="银行账号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field label="开户银行" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="联行号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field label="关联科目" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="开户银行地址" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field label="支付口令" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field readonly label="账户类别" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||||
<view slot="input"> | |||||
<van-radio-group | |||||
value="{{ form.accountType }}" | |||||
bind:change="onChange" | |||||
direction="horizontal" | |||||
data-value="form.accountType" | |||||
> | |||||
<van-radio name="1" checked-color="#2C8E68">公户</van-radio> | |||||
<van-radio name="2" checked-color="#2C8E68">私户</van-radio> | |||||
</van-radio-group> | |||||
</view> | |||||
</van-field> | |||||
<van-field label="初始余额" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field label="手机号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field label="内部账号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field label="内部户名" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field label="账簿号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||||
<van-field readonly label="是否停用" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||||
<view slot="input"> | |||||
<van-radio-group | |||||
value="{{ form.accountType }}" | |||||
bind:change="onChange" | |||||
direction="horizontal" | |||||
data-value="form.accountType" | |||||
> | |||||
<van-radio name="1" checked-color="#2C8E68">是</van-radio> | |||||
<van-radio name="2" checked-color="#2C8E68">否</van-radio> | |||||
</van-radio-group> | |||||
</view> | |||||
</van-field> | |||||
<van-popup show="{{showBankType}}" round position="bottom" bind:close="closeBox" data-name="showBankType"> | <van-popup show="{{showBankType}}" round position="bottom" bind:close="closeBox" data-name="showBankType"> | ||||
<van-picker | <van-picker | ||||
columns="{{bankTypeOptions}}" | columns="{{bankTypeOptions}}" | ||||
@@ -75,6 +133,37 @@ | |||||
<van-field readonly label="开户行" value="{{ form.bankDepositText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showDeposit" /> | <van-field readonly label="开户行" value="{{ form.bankDepositText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showDeposit" /> | ||||
<van-field label="联行号" value="{{ form.payeePaymentLines }}" placeholder="请输入" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | <van-field label="联行号" value="{{ form.payeePaymentLines }}" placeholder="请输入" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | ||||
</view> | </view> | ||||
<view class="bottom"> | |||||
<view class="main-box table-box"> | |||||
<van-field readonly label="账簿是否限额" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||||
<view slot="input"> | |||||
<van-radio-group | |||||
value="{{ form.accountType }}" | |||||
bind:change="onChange" | |||||
direction="horizontal" | |||||
data-value="form.accountType" | |||||
> | |||||
<van-radio name="1" checked-color="#2C8E68">是</van-radio> | |||||
<van-radio name="2" checked-color="#2C8E68">否</van-radio> | |||||
</van-radio-group> | |||||
</view> | |||||
</van-field> | |||||
<van-field label="单笔交易限额" value="{{ form.payee }}" placeholder=" " border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field readonly label="账簿是否透支" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||||
<view slot="input"> | |||||
<van-radio-group | |||||
value="{{ form.accountType }}" | |||||
bind:change="onChange" | |||||
direction="horizontal" | |||||
data-value="form.accountType" | |||||
> | |||||
<van-radio name="1" checked-color="#2C8E68">是</van-radio> | |||||
<van-radio name="2" checked-color="#2C8E68">否</van-radio> | |||||
</van-radio-group> | |||||
</view> | |||||
</van-field> | |||||
<van-field label="透支类型" value="{{ form.payee }}" placeholder=" " border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
<van-field label="透支额度" value="{{ form.payee }}" placeholder=" " border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||||
</view> | |||||
<!-- <view class="bottom"> | |||||
<view class="btn2" bindtap="goSubmit">确认</view> | <view class="btn2" bindtap="goSubmit">确认</view> | ||||
</view> | |||||
</view> --> |
@@ -6,6 +6,7 @@ | |||||
margin: 0 auto; | margin: 0 auto; | ||||
border-radius: 10px; | border-radius: 10px; | ||||
box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); | box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); | ||||
margin-bottom: 15px; | |||||
} | } | ||||
.table-box van-field van-cell .van-cell{ | .table-box van-field van-cell .van-cell{ | ||||
margin-bottom: 15px; | margin-bottom: 15px; | ||||
@@ -17,7 +17,7 @@ Page({ | |||||
active:0, | active:0, | ||||
spsxOptions:[], | spsxOptions:[], | ||||
paymentPatternOptions:[], | paymentPatternOptions:[], | ||||
nickName:app.globalData.user, | |||||
nickName:'', | |||||
comment:'', | comment:'', | ||||
activeNames: 0, | activeNames: 0, | ||||
}, | }, | ||||
@@ -27,24 +27,13 @@ Page({ | |||||
*/ | */ | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
var that = this; | var that = this; | ||||
console.log(options); | |||||
that.setData({ | that.setData({ | ||||
taskId:options.taskId, | taskId:options.taskId, | ||||
pageType:options.type | pageType:options.type | ||||
}) | }) | ||||
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, | |||||
nickName:res.user.nickName | |||||
}) | |||||
} | |||||
} | |||||
wx.showLoading({ | |||||
title: '正在加载模板', | |||||
mask:true | |||||
}) | }) | ||||
//所属银行 | //所属银行 | ||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | ||||
@@ -102,144 +91,161 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
UTIL.httpRequest(API.URL_GET_APPROVALITEMS+options.id, {method:'GET'}, { | |||||
UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
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].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); | |||||
}) | |||||
console.log(res.data.transfers[index].capitalExpenditureType); | |||||
if(res.data.transfers[index].capitalExpenditureType == 2){ | |||||
let prames = { | |||||
outId:res.data.transfers[index].id, | |||||
ynType: res.data.transfers[index].transferType=='1'||res.data.transfers[index].transferType=='2'||res.data.transfers[index].transferType=='4'?'1':'2' | |||||
that.setData({ | |||||
nickName:res.user.nickName | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
setTimeout(function(){ | |||||
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.approvalItemTemplate.totalAmount = parseFloat(res.data.approvalItemTemplate.totalAmount).toFixed(2) | |||||
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].paymentPatternText = UTIL.getTransform(item.paymentPattern,that.data.paymentPatternOptions); | |||||
res.data.transfers[index].num = UTIL.convertToChinaNum(index+1), | |||||
res.data.transfers[index].expenditureAmount = parseFloat(res.data.transfers[index].expenditureAmount).toFixed(2) | |||||
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); | |||||
}) | |||||
console.log(res.data.transfers[index].capitalExpenditureType); | |||||
if(res.data.transfers[index].capitalExpenditureType == 2){ | |||||
let prames = { | |||||
outId:res.data.transfers[index].id, | |||||
ynType: res.data.transfers[index].transferType=='1'||res.data.transfers[index].transferType=='2'||res.data.transfers[index].transferType=='4'?'1':'2' | |||||
} | |||||
// 工程项目查询 | |||||
UTIL.httpRequest(API.URL_GET_GETPROJECTTO , prames, { | |||||
success: (res) => { | |||||
res.data.projectFundTypeText = UTIL.getTransform(res.data.projectFundType,that.data.projectFundTypeOptions); | |||||
that.setData({ | |||||
["form.transfers["+index+"].projectForm"]:res.data, | |||||
}) | |||||
} | |||||
}) | |||||
} | } | ||||
// 工程项目查询 | |||||
UTIL.httpRequest(API.URL_GET_GETPROJECTTO , prames, { | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:item.id, | |||||
fileType:1 | |||||
}, | |||||
{ | |||||
success: (res) => { | success: (res) => { | ||||
res.data.projectFundTypeText = UTIL.getTransform(res.data.projectFundType,that.data.projectFundTypeOptions); | |||||
that.setData({ | |||||
["form.transfers["+index+"].projectForm"]:res.data, | |||||
let list = []; | |||||
res.data.forEach((item2,index2)=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item2.fileUrl | |||||
}) | |||||
that.setData({ | |||||
["form.transfers["+index+"].SJimage"]:list, | |||||
}); | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
} | |||||
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)=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item2.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)=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item2.fileUrl | |||||
}) | |||||
that.setData({ | |||||
["form.transfers["+index+"].FPimage"]:list, | |||||
}); | |||||
}) | }) | ||||
that.setData({ | |||||
["form.transfers["+index+"].SJimage"]:list, | |||||
}); | |||||
}) | |||||
} | |||||
}) | |||||
//发票 | |||||
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)=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item2.fileUrl | |||||
} | |||||
}) | |||||
//其他 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:item.id, | |||||
fileType:3 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list = []; | |||||
res.data.forEach((item2,index2)=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item2.fileUrl | |||||
}) | |||||
that.setData({ | |||||
["form.transfers["+index+"].QTimage"]:list, | |||||
}); | |||||
}) | }) | ||||
that.setData({ | |||||
["form.transfers["+index+"].FPimage"]:list, | |||||
}); | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
}) | |||||
that.setData({ | |||||
form:res.data, | |||||
activeNames:null | |||||
}) | }) | ||||
//其他 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:item.id, | |||||
fileType:3 | |||||
}, | |||||
{ | |||||
wx.hideLoading(); | |||||
} | |||||
} | |||||
}) | |||||
// 查询审批事项流转进度 | |||||
UTIL.httpRequest(API.URL_GET_GETPROCESS+options.id , {method:'GET'}, { | |||||
success: (res) => { | |||||
console.log(res); | |||||
if(res.data.processSchedule != null){ | |||||
that.setData({spsxOptions:res.data.processSchedule.spsx}) | |||||
} | |||||
that.setData({instanceId:res.data.instanceId}) | |||||
if(options.business == 'xj'){ | |||||
console.log(that.data.instanceId) | |||||
// 查询现金审批事项流转进度 | |||||
UTIL.httpRequest(API.URL_GET_REVIEWPROCESS+that.data.instanceId , {method:'GET'}, { | |||||
success: (res) => { | success: (res) => { | ||||
let list = []; | |||||
res.data.forEach((item2,index2)=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item2.fileUrl | |||||
}) | |||||
that.setData({ | |||||
["form.transfers["+index+"].QTimage"]:list, | |||||
}); | |||||
}) | |||||
console.log(res); | |||||
if(res.data.processSchedule.spsx){ | |||||
that.setData({spsxOptions:res.data.processSchedule.spsx}) | |||||
} | |||||
that.setData({instanceId:res.data.instanceId}) | |||||
} | } | ||||
}) | }) | ||||
}) | |||||
that.setData({ | |||||
form:res.data, | |||||
activeNames:null | |||||
}) | |||||
} | |||||
} | } | ||||
} | |||||
}) | |||||
}) | |||||
},1000) | |||||
// 查询审批事项流转进度 | |||||
UTIL.httpRequest(API.URL_GET_GETPROCESS+options.id , {method:'GET'}, { | |||||
success: (res) => { | |||||
console.log(res); | |||||
if(res.data.processSchedule != null){ | |||||
that.setData({spsxOptions:res.data.processSchedule.spsx}) | |||||
} | |||||
that.setData({instanceId:res.data.instanceId}) | |||||
if(options.business == 'xj'){ | |||||
console.log(that.data.instanceId) | |||||
// 查询现金审批事项流转进度 | |||||
UTIL.httpRequest(API.URL_GET_REVIEWPROCESS+that.data.instanceId , {method:'GET'}, { | |||||
success: (res) => { | |||||
console.log(res); | |||||
if(res.data.processSchedule.spsx){ | |||||
that.setData({spsxOptions:res.data.processSchedule.spsx}) | |||||
} | |||||
that.setData({instanceId:res.data.instanceId}) | |||||
} | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
}, | }, | ||||
goDis(){ | goDis(){ | ||||
@@ -1,7 +1,7 @@ | |||||
<!--pages/handle/expenditureAudit/expenditureAudit.wxml--> | <!--pages/handle/expenditureAudit/expenditureAudit.wxml--> | ||||
<view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | ||||
<image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | ||||
<text style="top:{{isIPX?'54px':'30px'}};">支出申请</text> | |||||
<text style="top:{{isIPX?'54px':'30px'}};">支出申请审批</text> | |||||
</view> | </view> | ||||
<view class="pure_top" style="top:{{isIPX?'88px':'64px'}};"></view> | <view class="pure_top" style="top:{{isIPX?'88px':'64px'}};"></view> | ||||
<view class="main-box top-box topBox" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="main-box top-box topBox" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
@@ -310,10 +310,13 @@ | |||||
</van-col> | </van-col> | ||||
</van-row> | </van-row> | ||||
</view> | </view> | ||||
<view class="bottom" wx:if="{{pageType!='see'}}"> | |||||
<view class="bottom" style="margin-bottom: 0px;" wx:if="{{pageType!='see'}}"> | |||||
<button type="warn" plain class="btnDis" bindtap="goDis">驳回</button> | <button type="warn" plain class="btnDis" bindtap="goDis">驳回</button> | ||||
<button type="primary" class="btnAgree" bindtap="goAgree">同意</button> | <button type="primary" class="btnAgree" bindtap="goAgree">同意</button> | ||||
</view> | </view> | ||||
<view class="bottom" wx:if="{{pageType!='see'}}"> | |||||
<button type="primary" plain class="btnOther" bindtap="goAgree">转办</button> | |||||
</view> | |||||
<view class="ipXbtn"></view> | <view class="ipXbtn"></view> | ||||
<wxs module="sub"> | <wxs module="sub"> | ||||
var times = function(time){ | var times = function(time){ | ||||
@@ -346,6 +346,13 @@ text{display: block;} | |||||
margin-left: 6%; | margin-left: 6%; | ||||
} | } | ||||
.btnOther{ | |||||
border-color: #F2A438!important; | |||||
color: #ffffff!important; | |||||
background-image: linear-gradient(to right, #F2A438, #F2652E); | |||||
width: 100%!important; | |||||
} | |||||
.input_tit{ | .input_tit{ | ||||
border: 1px solid #DCDCDC; | border: 1px solid #DCDCDC; | ||||
padding: 0px 10px; | padding: 0px 10px; | ||||
@@ -368,7 +375,7 @@ text{display: block;} | |||||
color: #E90000; | color: #E90000; | ||||
font-size: 26px; | font-size: 26px; | ||||
display: inline-block; | display: inline-block; | ||||
width: 50%; | |||||
width: 70%; | |||||
text-align: center; | text-align: center; | ||||
} | } | ||||
@@ -130,7 +130,7 @@ Page({ | |||||
getTaskList:function(e){ | getTaskList:function(e){ | ||||
let data = { | let data = { | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:10, | |||||
pageSize:999, | |||||
orderByColumn:"A.ID_", | orderByColumn:"A.ID_", | ||||
isAsc:"desc", | isAsc:"desc", | ||||
systemType:4, | systemType:4, | ||||
@@ -159,7 +159,7 @@ Page({ | |||||
getTaskDoneList:function(e){ | getTaskDoneList:function(e){ | ||||
let data = { | let data = { | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:10, | |||||
pageSize:999, | |||||
orderByColumn:"A.ID_", | orderByColumn:"A.ID_", | ||||
isAsc:"desc", | isAsc:"desc", | ||||
systemType:4, | systemType:4, | ||||
@@ -171,9 +171,9 @@ Page({ | |||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
this.setData({doneNum:res.total}) | this.setData({doneNum:res.total}) | ||||
if(res.rows!=null&&res.rows!=""){ | if(res.rows!=null&&res.rows!=""){ | ||||
for(var index in res.rows){ | |||||
let d = this.dictTranslate(this.data.transferType,res.rows[index].formData.transferType) | |||||
res.rows[index].formData.transferType = d | |||||
for(let i = 0;i<res.total;i++){ | |||||
let d = this.dictTranslate(this.data.transferType,res.rows[i].formData.transferType) | |||||
res.rows[i].formData.transferType = d | |||||
} | } | ||||
this.setData({doneList:res.rows}) | this.setData({doneList:res.rows}) | ||||
} | } | ||||
@@ -383,8 +383,8 @@ Page({ | |||||
let _this = this | let _this = this | ||||
UTIL.httpRequest(API.URL_GET_CHANGEBOOK,data, { | UTIL.httpRequest(API.URL_GET_CHANGEBOOK,data, { | ||||
success: (res) => { | success: (res) => { | ||||
_this.reset() | |||||
_this.onLoad() | |||||
_this.reset(); | |||||
_this.onShow(); | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
@@ -548,5 +548,26 @@ Page({ | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: even.currentTarget.dataset.url, | url: even.currentTarget.dataset.url, | ||||
}) | }) | ||||
} | |||||
}, | |||||
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.yzdList.splice(e.currentTarget.dataset.index, 1); | |||||
wx.showToast({ | |||||
title: '删除成功!', | |||||
icon: 'success', | |||||
duration: 2000 | |||||
}) | |||||
that.setData({ | |||||
yzdList : that.data.yzdList, | |||||
yzdNum:that.data.yzdNum-1 | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
}) | }) |
@@ -3,7 +3,8 @@ | |||||
"icon-loading":"/component/iconLoading/iconLoading", | "icon-loading":"/component/iconLoading/iconLoading", | ||||
"pop-up": "/component/pop-up/index", | "pop-up": "/component/pop-up/index", | ||||
"van-empty": "@vant/weapp/empty/index", | "van-empty": "@vant/weapp/empty/index", | ||||
"van-transition": "@vant/weapp/transition/index" | |||||
"van-transition": "@vant/weapp/transition/index", | |||||
"van-swipe-cell": "@vant/weapp/swipe-cell/index" | |||||
}, | }, | ||||
"navigationStyle": "custom" | "navigationStyle": "custom" | ||||
} | } |
@@ -72,11 +72,11 @@ | |||||
</view> | </view> | ||||
<!--子导航功能导航--> | <!--子导航功能导航--> | ||||
<view class="child_function"> | <view class="child_function"> | ||||
<view class="flex_block" data-url="/pages/payee/list/list" bindtap="navigate"> | |||||
<view class="flex_block" data-url="/pages/payee/list/list" bindtap="showModal"><!--bindtap="navigate"--> | |||||
<view class="image"><image class="attribute" src="../../image/index/child_function_01.png" mode="aspectFit"></image></view> | <view class="image"><image class="attribute" src="../../image/index/child_function_01.png" mode="aspectFit"></image></view> | ||||
<text class="desc">收款人</text> | <text class="desc">收款人</text> | ||||
</view> | </view> | ||||
<view class="flex_block" data-url="/pages/drawee/drawee" bindtap="navigate"> | |||||
<view class="flex_block" data-url="/pages/drawee/drawee" bindtap="showModal"><!--bindtap="navigate"--> | |||||
<view class="image"><image class="attribute" src="../../image/index/child_function_02.png" mode="aspectFit"></image></view> | <view class="image"><image class="attribute" src="../../image/index/child_function_02.png" mode="aspectFit"></image></view> | ||||
<text class="desc">付款人</text> | <text class="desc">付款人</text> | ||||
</view> | </view> | ||||
@@ -124,7 +124,7 @@ | |||||
<!-- <view class="more" bindtap="toList">></view> --> | <!-- <view class="more" bindtap="toList">></view> --> | ||||
</view> | </view> | ||||
<scroll-view scroll-y="true" style="height: {{wrokScrollHeight}}px;" > | |||||
<scroll-view scroll-y="true" style="height: {{wrokScrollHeight}}px;padding: 0rpx 32.5rpx;" > | |||||
<view class="workflow" wx:if="{{active=='1'}}" wx:for-item="item" wx:for="{{todoList}}" wx:key="id" data-id="{{item.formData.id}}" data-taskId="{{item.taskId}}" data-business='{{item.formData.activityBusinessType=="35"?"xj":"yh"}}' data-type="up" bindtap="gosee"> | <view class="workflow" wx:if="{{active=='1'}}" wx:for-item="item" wx:for="{{todoList}}" wx:key="id" data-id="{{item.formData.id}}" data-taskId="{{item.taskId}}" data-business='{{item.formData.activityBusinessType=="35"?"xj":"yh"}}' data-type="up" bindtap="gosee"> | ||||
<!--1--> | <!--1--> | ||||
<view class="workflow_list"> | <view class="workflow_list"> | ||||
@@ -138,7 +138,7 @@ | |||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | <image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | ||||
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text> | <text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text> | ||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>{{item.formData.totalAmount}}</view> | |||||
<view class="amount"><text class="unit">¥</text>{{float.float(item.formData.totalAmount)}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -155,7 +155,7 @@ | |||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | <image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | ||||
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text> | <text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text> | ||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>{{item.formData.totalAmount}}</view> | |||||
<view class="amount"><text class="unit">¥</text>{{float.float(item.formData.totalAmount)}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -164,7 +164,7 @@ | |||||
<view class="workflow_list"> | <view class="workflow_list"> | ||||
<view class="process_intro"> | <view class="process_intro"> | ||||
<view class="name"> | <view class="name"> | ||||
<view class="name_tit">{{item.submitter}}</view> | |||||
<view class="name_tit">{{item.approvalItems}}</view> | |||||
<view class="{{item.status == '1'?'in':item.status == '2'?'disagree':item.status == '3'?'agree':''}}">{{item.status == '1'?'审核中':item.status == '2'?'已拒绝':item.status == '3'?'已通过':''}}</view> | <view class="{{item.status == '1'?'in':item.status == '2'?'disagree':item.status == '3'?'agree':''}}">{{item.status == '1'?'审核中':item.status == '2'?'已拒绝':item.status == '3'?'已通过':''}}</view> | ||||
</view> | </view> | ||||
<!-- <view class="state">已发起</view> --> | <!-- <view class="state">已发起</view> --> | ||||
@@ -173,29 +173,35 @@ | |||||
<view class="process_pay"> | <view class="process_pay"> | ||||
<view class="describe"> | <view class="describe"> | ||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | <image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | ||||
<text class="textLimit">{{item.approvalItems}}</text> | |||||
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text> | |||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>{{item.totalAmount}}</view> | |||||
<view class="amount"><text class="unit">¥</text>{{float.float(item.totalAmount)}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="workflow" wx:if="{{active=='4'}}" wx:for-item="item" wx:for="{{yzdList}}" wx:key="id" data-id="{{item.id}}" bindtap="godetail"> | |||||
<van-swipe-cell right-width="{{ 65 }}" wx:if="{{active=='4'}}" wx:for-item="item" wx:for="{{yzdList}}" wx:key="id" class="workflow"> | |||||
<!--1--> | <!--1--> | ||||
<view class="workflow_list"> | |||||
<view class="workflow_list" data-id="{{item.id}}" bindtap="godetail"> | |||||
<view class="process_intro"> | <view class="process_intro"> | ||||
<view class="name">{{item.submitter}}</view> | |||||
<view class="name">{{item.approvalItems}}</view> | |||||
<!-- <view class="state">已制单</view> --> | <!-- <view class="state">已制单</view> --> | ||||
<view class="time">{{item.submitDate}}</view> | <view class="time">{{item.submitDate}}</view> | ||||
</view> | </view> | ||||
<view class="process_pay"> | <view class="process_pay"> | ||||
<view class="describe"> | <view class="describe"> | ||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | |||||
<text class="textLimit">{{item.approvalItems}}</text> | |||||
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image> | |||||
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text> | |||||
</view> | </view> | ||||
<view class="amount"><text class="unit">¥</text>{{item.totalAmount}}</view> | |||||
<view class="amount"><text class="unit">¥</text>{{float.float(item.totalAmount)}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | |||||
<view slot="right" class="deleteBox"> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | |||||
</view> | |||||
</view> | |||||
</van-swipe-cell> | |||||
<van-empty wx:if="{{todoNum == '0' && active=='1'}}" description="暂无待办数据" /> | <van-empty wx:if="{{todoNum == '0' && active=='1'}}" description="暂无待办数据" /> | ||||
@@ -226,4 +232,11 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</pop-up> | </pop-up> | ||||
</view> | |||||
</view> | |||||
<wxs module="float"> | |||||
var float = function(money){ | |||||
return parseFloat(money).toFixed(2) | |||||
} | |||||
module.exports.float = float; | |||||
</wxs> |
@@ -226,15 +226,15 @@ | |||||
color: #31936c; | color: #31936c; | ||||
} | } | ||||
.workflow{ | |||||
padding: 10rpx 32.5rpx; | |||||
} | |||||
.workflow .workflow_list{ | |||||
height: 150rpx; | |||||
.workflow,.van-swipe-cell { | |||||
/* padding: 10rpx 32.5rpx; */ | |||||
background-color: #fff; | background-color: #fff; | ||||
border-radius: 24rpx; | border-radius: 24rpx; | ||||
box-shadow:0rpx 0rpx 10rpx rgba(0,0,0,.1); | |||||
box-shadow: 0rpx 5rpx 5rpx rgba(0,0,0,.1); | |||||
margin-bottom: 20rpx; | margin-bottom: 20rpx; | ||||
} | |||||
.workflow .workflow_list{ | |||||
height: 150rpx; | |||||
padding:15rpx 25rpx 10rpx 35rpx; | padding:15rpx 25rpx 10rpx 35rpx; | ||||
} | } | ||||
.workflow .workflow_list .process_intro{ | .workflow .workflow_list .process_intro{ | ||||
@@ -412,4 +412,12 @@ | |||||
padding: 2px 5px; | padding: 2px 5px; | ||||
border-radius: 5px; | border-radius: 5px; | ||||
font-size: 12px; | font-size: 12px; | ||||
} | |||||
.deleteBox{ | |||||
width: 65px; | |||||
text-align: center; | |||||
height: 100%; | |||||
background: #F6F6F6; | |||||
align-items: center; | |||||
display: flex; | |||||
} | } |
@@ -133,52 +133,75 @@ Page({ | |||||
goSubmit(){ | goSubmit(){ | ||||
console.log(this.data.form); | console.log(this.data.form); | ||||
var that = this; | var that = this; | ||||
wx.showLoading({ | |||||
title: '正在保存', | |||||
mask:true | |||||
}) | |||||
if(that.data.form.bankType == ''){ | if(that.data.form.bankType == ''){ | ||||
wx.hideLoading(); | |||||
UTIL.showToastNoneIcon('请选择所属银行!'); | UTIL.showToastNoneIcon('请选择所属银行!'); | ||||
return; | return; | ||||
} | } | ||||
if(that.data.form.payee == ''){ | if(that.data.form.payee == ''){ | ||||
wx.hideLoading(); | |||||
UTIL.showToastNoneIcon('请填写户名!'); | UTIL.showToastNoneIcon('请填写户名!'); | ||||
return; | return; | ||||
} | } | ||||
if(that.data.form.payeeAccount == ''){ | if(that.data.form.payeeAccount == ''){ | ||||
wx.hideLoading(); | |||||
UTIL.showToastNoneIcon('请填写收款账号!'); | UTIL.showToastNoneIcon('请填写收款账号!'); | ||||
return; | return; | ||||
} | } | ||||
if(that.data.form.payeeType == ''){ | if(that.data.form.payeeType == ''){ | ||||
wx.hideLoading(); | |||||
UTIL.showToastNoneIcon('请选择收款人类型!'); | UTIL.showToastNoneIcon('请选择收款人类型!'); | ||||
return; | return; | ||||
} | } | ||||
if(that.data.form.accountType == ''){ | if(that.data.form.accountType == ''){ | ||||
wx.hideLoading(); | |||||
UTIL.showToastNoneIcon('请选择账户类型!'); | UTIL.showToastNoneIcon('请选择账户类型!'); | ||||
return; | return; | ||||
} | } | ||||
if(that.data.form.bankDeposit == ''){ | if(that.data.form.bankDeposit == ''){ | ||||
wx.hideLoading(); | |||||
UTIL.showToastNoneIcon('请选择开户行!'); | UTIL.showToastNoneIcon('请选择开户行!'); | ||||
return; | return; | ||||
} | } | ||||
if(that.data.form.payeePaymentLines == ''){ | if(that.data.form.payeePaymentLines == ''){ | ||||
wx.hideLoading(); | |||||
UTIL.showToastNoneIcon('请输入联行号!'); | UTIL.showToastNoneIcon('请输入联行号!'); | ||||
return; | return; | ||||
} | } | ||||
that.setData({ | that.setData({ | ||||
['form.method']:'POST' | ['form.method']:'POST' | ||||
}) | }) | ||||
UTIL.httpRequest(API.URL_GET_PAYEEADD, that.data.form, { | UTIL.httpRequest(API.URL_GET_PAYEEADD, that.data.form, { | ||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
wx.hideLoading(); | |||||
wx.showToast({ | |||||
title: "提交成功!", | |||||
duration: 2000, | |||||
icon:"success" | |||||
}) | |||||
let pages = getCurrentPages(); | let pages = getCurrentPages(); | ||||
let currentPage = null; //当前页面 | let currentPage = null; //当前页面 | ||||
let prevPage = null; //上一个页面 | let prevPage = null; //上一个页面 | ||||
currentPage = pages[pages.length - 1]; //获取当前页面,将其赋值 | currentPage = pages[pages.length - 1]; //获取当前页面,将其赋值 | ||||
prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 | prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 | ||||
prevPage.onLoad(prevPage.options) | prevPage.onLoad(prevPage.options) | ||||
wx.navigateBack({ | |||||
delta:1 | |||||
setTimeout(function(){ | |||||
wx.navigateBack({ | |||||
delta:1 | |||||
}) | |||||
},2000) | |||||
}else{ | |||||
wx.hideLoading(); | |||||
wx.showToast({ | |||||
title: "提交失败!", | |||||
duration: 2000, | |||||
icon:"error" | |||||
}) | }) | ||||
} | } | ||||
} | } | ||||
@@ -21,6 +21,13 @@ Page({ | |||||
console.log(options) | console.log(options) | ||||
// 可优化:数据请求放到 onload中 新增后在子页面修改父页面数据 | // 可优化:数据请求放到 onload中 新增后在子页面修改父页面数据 | ||||
var that = this; | var that = this; | ||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||||
success: (res) => { | |||||
that.setData({ | |||||
bankTypeOptions:res.data, | |||||
}) | |||||
} | |||||
}) | |||||
that.setData({ | that.setData({ | ||||
// isPeers:options.isPeers,//是否同行 | // isPeers:options.isPeers,//是否同行 | ||||
// bankType:options.bankType,//所属银行 | // bankType:options.bankType,//所属银行 | ||||
@@ -43,37 +50,21 @@ Page({ | |||||
status:'0', | status:'0', | ||||
method:'GET' | 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, { | UTIL.httpRequest(API.URL_GET_SELECTLIST , prames, { | ||||
success: (res) => { | success: (res) => { | ||||
let array = res.rows ; | let array = res.rows ; | ||||
var payeeType = that.data.payeeType; | var payeeType = that.data.payeeType; | ||||
var list = []; | var list = []; | ||||
array.map(res=>{ | array.map(res=>{ | ||||
res.payeeAccountText = res.payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); | 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; | 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(payeeType == 2 && array.length>0){ | ||||
if(res.payeeType == 4 || res.payeeType == 3 ){ | if(res.payeeType == 4 || res.payeeType == 3 ){ | ||||
console.log("2222222222222222222"); | |||||
list.push(res) | list.push(res) | ||||
} | } | ||||
} | } | ||||
if(payeeType == 1 && array.length>0){ | if(payeeType == 1 && array.length>0){ | ||||
if(res.payeeType == 1){ | if(res.payeeType == 1){ | ||||
console.log("111111111111111111"); | |||||
list.push(res) | list.push(res) | ||||
} | } | ||||
} | } | ||||
@@ -119,19 +110,15 @@ Page({ | |||||
var payeeType = that.data.payeeType; | var payeeType = that.data.payeeType; | ||||
var list = []; | var list = []; | ||||
array.map(res=>{ | array.map(res=>{ | ||||
res.payeeAccountText = res.payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); | 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; | res.bankTypeText = (that.data.bankTypeOptions.filter(function (e) { return e.dictValue == res.bankType; }))[0].dictLabel; | ||||
if(payeeType == 2 && array.length>0){ | if(payeeType == 2 && array.length>0){ | ||||
if(res.payeeType == 4 || res.payeeType == 3 ){ | if(res.payeeType == 4 || res.payeeType == 3 ){ | ||||
console.log("2222222222222222222"); | |||||
list.push(res) | list.push(res) | ||||
} | } | ||||
} | } | ||||
if(payeeType == 1 && array.length>0){ | if(payeeType == 1 && array.length>0){ | ||||
if(res.payeeType == 1){ | if(res.payeeType == 1){ | ||||
console.log("111111111111111111"); | |||||
list.push(res) | list.push(res) | ||||
} | } | ||||
} | } | ||||
@@ -164,8 +151,10 @@ Page({ | |||||
toggle(event) { | toggle(event) { | ||||
const { index } = event.currentTarget.dataset; | const { index } = event.currentTarget.dataset; | ||||
const checkbox = this.selectComponent(`.checkboxes-${index}`); | |||||
checkbox.toggle(); | |||||
this.setData({ | |||||
result: index, | |||||
}); | |||||
console.log(index); | |||||
}, | }, | ||||
back:function(){ | back:function(){ | ||||
wx.navigateBack({ | wx.navigateBack({ | ||||
@@ -189,7 +178,8 @@ Page({ | |||||
prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 | prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 | ||||
if (prevPage) { | if (prevPage) { | ||||
prevPage.setData({ | prevPage.setData({ | ||||
["form.transfers["+that.data.index+"].payeeList[0]"]: array[0]//将想要传的信息赋值给上一个页面data中的值 | |||||
["form.transfers["+that.data.index+"].payeeList[0]"]: array[0],//将想要传的信息赋值给上一个页面data中的值 | |||||
["form.transfers["+that.data.index+"].accountType"]:array[0].accountType | |||||
}) | }) | ||||
that.back() | that.back() | ||||
} | } | ||||
@@ -22,7 +22,7 @@ | |||||
wx:key="index" | wx:key="index" | ||||
value-class="value-class" | value-class="value-class" | ||||
clickable | clickable | ||||
data-index="{{ index }}" | |||||
data-index="{{ item.id }}" | |||||
bind:click="toggle" | bind:click="toggle" | ||||
use-label-slot | use-label-slot | ||||
> | > | ||||
@@ -56,7 +56,7 @@ | |||||
{ | { | ||||
"name": "事项新增", | "name": "事项新增", | ||||
"pathName": "pages/apply/paymentTemplate/add/add", | "pathName": "pages/apply/paymentTemplate/add/add", | ||||
"query": "", | |||||
"query": "id=149", | |||||
"launchMode": "default", | "launchMode": "default", | ||||
"scene": null | "scene": null | ||||
}, | }, | ||||
@@ -87,11 +87,18 @@ | |||||
"query": "", | "query": "", | ||||
"launchMode": "default", | "launchMode": "default", | ||||
"scene": null | "scene": null | ||||
}, | |||||
{ | |||||
"name": "添加付款方", | |||||
"pathName": "pages/drawee/add/add", | |||||
"query": "", | |||||
"launchMode": "default", | |||||
"scene": null | |||||
} | } | ||||
] | ] | ||||
} | } | ||||
}, | }, | ||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", | "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", | ||||
"projectname": "WXMB", | "projectname": "WXMB", | ||||
"libVersion": "2.24.0" | |||||
"libVersion": "2.24.1" | |||||
} | } |
@@ -78,7 +78,10 @@ const URL_GET_SELECTACCOUNTLIST = `${URL_PREFIX}/cashier/account/accountList`; | |||||
const URL_GET_TEMPLATELIST = `${URL_PREFIX}/service/template/list`; | const URL_GET_TEMPLATELIST = `${URL_PREFIX}/service/template/list`; | ||||
//查询审批流模板列表 | //查询审批流模板列表 | ||||
const URL_GET_TEMPLATEDETAIL = `${URL_PREFIX}/service/templateDetail/list`; | |||||
const URL_GET_TEMPLATEDETAIL = `${URL_PREFIX}/yinnong/approvalProcess/getApprovalProcessByItemId/`; | |||||
//查询审批流模板列表 | |||||
const URL_GET_GETAPPROVALBYID = `${URL_PREFIX}/service/templateDetail/getApprovalByTemplateId//`; | |||||
//根据系统组织机构id查询所在乡镇 | //根据系统组织机构id查询所在乡镇 | ||||
const URL_GET_TOWNINFOBYDEPTID = `${URL_PREFIX}/system/dept/getTownInfoByDeptId/`; | const URL_GET_TOWNINFOBYDEPTID = `${URL_PREFIX}/system/dept/getTownInfoByDeptId/`; | ||||
//根据条件查询用户信息 | //根据条件查询用户信息 | ||||
@@ -158,6 +161,33 @@ const URL_GET_GETSETDEFAULTVALUES = `${URL_PREFIX}/yinnong/approvalItems/setDefa | |||||
//根据附件id删除附件信息 | //根据附件id删除附件信息 | ||||
const URL_GET_GETFILEREMOVE = `${URL_PREFIX}/system/attachment/remove/`; | const URL_GET_GETFILEREMOVE = `${URL_PREFIX}/system/attachment/remove/`; | ||||
//增加支付模板 | |||||
const URL_GET_GETTEMPLATEADD = `${URL_PREFIX}/yinnong/paymentTemplate/add`; | |||||
//查询支付模板(变更) | |||||
const URL_GET_GETTEMPLATELIST = `${URL_PREFIX}/yinnong/paymentTemplate/list`; | |||||
//根据id删除支付模板(变更) | |||||
const URL_GET_GETTEMPLATEREMOVE = `${URL_PREFIX}/yinnong/paymentTemplate/remove/`; | |||||
//通过审批模板id设置默认模板(变更) | |||||
const URL_GET_GETTEMPLATERESETDEFAULT = `${URL_PREFIX}/yinnong/paymentTemplate/setDefaultValues/`; | |||||
//增加审批流模板信息(变更) | |||||
const URL_GET_GETAPPROVALPROCESSADD = `${URL_PREFIX}/yinnong/approvalProcess/add`; | |||||
//银行收支流水 | |||||
const URL_GET_GETFLOWLIST = `${URL_PREFIX}/cashier/flow/list`; | |||||
//批量银行收支流水记账申请 | |||||
const URL_GET_GETBOOKKEEP = `${URL_PREFIX}/cashier/flow/bookkeepingApplication`; | |||||
//汇票列表查询 | |||||
const URL_GET_GETMONEYORDERLIST = `${URL_PREFIX}/yinnong/moneyorder/list`; | |||||
//汇票、现金支出申请 | |||||
const URL_GET_GETCASHSAVE = `${URL_PREFIX}/yinnong/approvalItems/cashSave`; | |||||
/****************接口地址end****************/ | /****************接口地址end****************/ | ||||
@@ -225,5 +255,15 @@ export { | |||||
URL_GET_GETSELECTINFOBYOUTID, | URL_GET_GETSELECTINFOBYOUTID, | ||||
URL_GET_GETBALANCEENQUIRY, | URL_GET_GETBALANCEENQUIRY, | ||||
URL_GET_GETSETDEFAULTVALUES, | URL_GET_GETSETDEFAULTVALUES, | ||||
URL_GET_GETFILEREMOVE | |||||
URL_GET_GETFILEREMOVE, | |||||
URL_GET_GETTEMPLATEADD, | |||||
URL_GET_GETTEMPLATELIST, | |||||
URL_GET_GETTEMPLATEREMOVE, | |||||
URL_GET_GETTEMPLATERESETDEFAULT, | |||||
URL_GET_GETAPPROVALPROCESSADD, | |||||
URL_GET_GETFLOWLIST, | |||||
URL_GET_GETBOOKKEEP, | |||||
URL_GET_GETAPPROVALBYID, | |||||
URL_GET_GETMONEYORDERLIST, | |||||
URL_GET_GETCASHSAVE | |||||
} | } |
@@ -296,18 +296,18 @@ function getUserInfoFomWX() { | |||||
* @param {回调} param0 | * @param {回调} param0 | ||||
*/ | */ | ||||
function getLocationFromWX({ success, fail }) { | function getLocationFromWX({ success, fail }) { | ||||
wx.getLocation({ | |||||
type: 'wgs84', | |||||
success(res) { | |||||
getApp().globalData.setInfo.latitude = res.latitude; | |||||
getApp().globalData.setInfo.longitude = res.longitude; | |||||
success(); | |||||
} | |||||
, fail(res) { | |||||
showToastNoneIcon('获取地理信息失败'); | |||||
fail(res); | |||||
} | |||||
}) | |||||
// wx.getLocation({ | |||||
// type: 'wgs84', | |||||
// success(res) { | |||||
// getApp().globalData.setInfo.latitude = res.latitude; | |||||
// getApp().globalData.setInfo.longitude = res.longitude; | |||||
// success(); | |||||
// } | |||||
// , fail(res) { | |||||
// showToastNoneIcon('获取地理信息失败'); | |||||
// fail(res); | |||||
// } | |||||
// }) | |||||
} | } | ||||
@@ -418,10 +418,14 @@ function convertToChinaNum (num) { | |||||
return result; | return result; | ||||
} | } | ||||
function getTransform(dictValue,options){ | function getTransform(dictValue,options){ | ||||
var dictLabel = ""; | |||||
var dictLabel2 = ""; | |||||
console.log(options); | console.log(options); | ||||
dictLabel = (options.filter(function (e) { return e.dictValue == dictValue; }))[0].dictLabel; | |||||
return dictLabel; | |||||
options.map(item=>{ | |||||
if(item.dictValue == dictValue){ | |||||
dictLabel2 = item.dictLabel | |||||
} | |||||
}) | |||||
return dictLabel2; | |||||
} | } | ||||
export { | export { | ||||
getCurrentPageUrl, | getCurrentPageUrl, | ||||