@@ -107,7 +107,14 @@ swichPaymentApply:function(e){ | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
delete(e){ | |||||
console.log(e); | |||||
UTIL.httpRequest(API.URL_GET_REMOVEAPPROVAL + e.currentTarget.dataset.id, {method:'GET'},{ | |||||
success: (res) => { | |||||
UTIL.showToastNoneIcon('删除成功!'); | |||||
} | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
*/ | */ | ||||
@@ -62,7 +62,7 @@ | |||||
<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-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> | ||||
</van-cell-group> | </van-cell-group> | ||||
<view slot="right" class="deleteBox"> | |||||
<view slot="right" class="deleteBox" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"> | |||||
<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> | ||||
@@ -39,7 +39,7 @@ Page({ | |||||
submitDate:'',//提交日期 | submitDate:'',//提交日期 | ||||
submitter:'',//提交人 | submitter:'',//提交人 | ||||
telephone:'',//联系方式 | telephone:'',//联系方式 | ||||
totalAmount:'',//合计金额 | |||||
totalAmount:0,//合计金额 | |||||
templateName:'',//模板名称 选择保存模板的时候添加 | templateName:'',//模板名称 选择保存模板的时候添加 | ||||
dataType:'',//数据类型 | dataType:'',//数据类型 | ||||
}, | }, | ||||
@@ -58,9 +58,9 @@ Page({ | |||||
expenditureAmount:'',//支出总金额 | expenditureAmount:'',//支出总金额 | ||||
applyDate:'',//申请时间 | applyDate:'',//申请时间 | ||||
transferStatus:'',//转账状态 | transferStatus:'',//转账状态 | ||||
auditStatus:'',//审批状态 | |||||
auditStatus:'0',//审批状态 | |||||
paymentState:'',//支付状态 | paymentState:'',//支付状态 | ||||
approvalMode:'',//审批模式 | |||||
approvalMode:'1',//审批模式 | |||||
paymentTime:'',//支付时间 | paymentTime:'',//支付时间 | ||||
bankPriority:'',//银行处理优先级 | bankPriority:'',//银行处理优先级 | ||||
clientPriority:'',//客户处理优先级 | clientPriority:'',//客户处理优先级 | ||||
@@ -100,7 +100,12 @@ Page({ | |||||
totalAmount:'', | totalAmount:'', | ||||
}, | }, | ||||
accountForm:{}, | accountForm:{}, | ||||
fileForm:[] | |||||
fileForm:[], | |||||
isUpdate:false, | |||||
SJimage: [], | |||||
FPimage: [], | |||||
QTimage: [], | |||||
imgcount:0 | |||||
}, | }, | ||||
/** | /** | ||||
@@ -108,96 +113,239 @@ Page({ | |||||
*/ | */ | ||||
onLoad(options) { | onLoad(options) { | ||||
var that = this; | var that = this; | ||||
setTimeout(function(){ | |||||
UTIL.httpRequest(API.URL_GET_USERAPPRO, {method:'GET'}, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
console.log(that.data.capitalExpenditureTypeOptions); | |||||
res.data.transfers.forEach( (item,index) => { | |||||
res.data.transfers[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | |||||
res.data.transfers[index].transferTypeText = UTIL.getTransform(item.transferType,that.data.transferTypeOptions); | |||||
res.data.transfers[index].bankTypeText = UTIL.getTransform(item.bankType,that.data.bankTypeOptions); | |||||
res.data.transfers[index].payeeList.forEach( (response,i) => { | |||||
res.data.transfers[index].payeeList[i].bankTypeText = UTIL.getTransform(response.bankType,that.data.bankTypeOptions); | |||||
if(options.id){ | |||||
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.transfers.forEach( (item,index) => { | |||||
res.data.transfers[index].capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | |||||
res.data.transfers[index].transferTypeText = UTIL.getTransform(item.transferType,that.data.transferTypeOptions); | |||||
res.data.transfers[index].bankTypeText = UTIL.getTransform(item.bankType,that.data.bankTypeOptions); | |||||
res.data.transfers[index].payeeList.forEach( (response,i) => { | |||||
res.data.transfers[index].payeeList[i].bankTypeText = UTIL.getTransform(response.bankType,that.data.bankTypeOptions); | |||||
}) | |||||
}) | |||||
that.setData({ | |||||
form:res.data | |||||
}) | }) | ||||
}) | |||||
that.setData({ | |||||
form:res.data | |||||
}) | |||||
//收据附件 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_approval_item_template', | |||||
tableId:res.data.approvalItemTemplate.id, | |||||
fileType:1 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list = []; | |||||
res.data.forEach(item=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item.fileUrl | |||||
//收据附件 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:res.data.approvalItemTemplate.id, | |||||
fileType:1 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list = []; | |||||
res.data.forEach(item=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item.fileUrl | |||||
}) | |||||
}) | }) | ||||
}) | |||||
that.setData({ | |||||
SJimage:list | |||||
}); | |||||
} | |||||
}) | |||||
//发票 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_approval_item_template', | |||||
tableId:res.data.approvalItemTemplate.id, | |||||
fileType:2 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list = []; | |||||
res.data.forEach(item=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item.fileUrl | |||||
that.setData({ | |||||
SJimage:list | |||||
}); | |||||
} | |||||
}) | |||||
//发票 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:res.data.approvalItemTemplate.id, | |||||
fileType:2 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list = []; | |||||
res.data.forEach(item=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item.fileUrl | |||||
}) | |||||
}) | }) | ||||
}) | |||||
that.setData({ | |||||
FPimage:list | |||||
}); | |||||
} | |||||
}) | |||||
//其他 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_approval_item_template', | |||||
tableId:res.data.approvalItemTemplate.id, | |||||
fileType:3 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list = []; | |||||
res.data.forEach(item=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item.fileUrl | |||||
that.setData({ | |||||
FPimage:list | |||||
}); | |||||
} | |||||
}) | |||||
//其他 | |||||
UTIL.httpRequest( | |||||
API.URL_GET_FINDLIST, | |||||
{ | |||||
method:'GET', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:res.data.approvalItemTemplate.id, | |||||
fileType:3 | |||||
}, | |||||
{ | |||||
success: (res) => { | |||||
let list = []; | |||||
res.data.forEach(item=>{ | |||||
list.push({ | |||||
tempFilePath:URL_PREFIX+item.fileUrl | |||||
}) | |||||
}) | }) | ||||
}) | |||||
that.setData({ | |||||
QTimage:list | |||||
}); | |||||
} | |||||
}) | |||||
that.setData({ | |||||
QTimage:list | |||||
}); | |||||
} | |||||
}) | |||||
} | |||||
} | } | ||||
} | |||||
}) | |||||
},1000) | |||||
}) | |||||
},1000) | |||||
}else if(options.type == 'update'&!options.id){ | |||||
console.log(options); | |||||
setTimeout(function(){ | |||||
let array = JSON.parse(options.array); | |||||
array.transfers.forEach( (item,index) => { | |||||
item.capitalExpenditureTypeText = UTIL.getTransform(item.capitalExpenditureType,that.data.capitalExpenditureTypeOptions); | |||||
item.transferTypeText = UTIL.getTransform(item.transferType,that.data.transferTypeOptions); | |||||
item.bankTypeText = UTIL.getTransform(item.bankType,that.data.bankTypeOptions); | |||||
item.payeeList.forEach( (response,i) => { | |||||
item.payeeList[i].bankTypeText = UTIL.getTransform(response.bankType,that.data.bankTypeOptions); | |||||
}) | |||||
//收据附件 | |||||
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 | |||||
}) | |||||
},1000) | |||||
} | |||||
}, | }, | ||||
/** | /** | ||||
@@ -455,7 +603,7 @@ Page({ | |||||
goPayeeList(event){ | goPayeeList(event){ | ||||
console.log(event); | console.log(event); | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/payee/index?isPeers='+event.currentTarget.dataset.ispeers+'&bankType='+event.currentTarget.dataset.banktype+'&accountType='+event.currentTarget.dataset.accounttype+'&transferType='+event.currentTarget.dataset.transfertype, | |||||
url: '/pages/payee/index?isPeers='+event.currentTarget.dataset.ispeers+'&bankType='+event.currentTarget.dataset.banktype+'&accountType='+event.currentTarget.dataset.accounttype+'&transferType='+event.currentTarget.dataset.transfertype + '&index='+event.currentTarget.dataset.index, | |||||
}) | }) | ||||
}, | }, | ||||
onChange(event){ | onChange(event){ | ||||
@@ -466,10 +614,11 @@ Page({ | |||||
}, | }, | ||||
onChangeMoney(event){ | onChangeMoney(event){ | ||||
console.log(event); | console.log(event); | ||||
var that = this; | |||||
this.setData({ | this.setData({ | ||||
[event.currentTarget.dataset.value]: event.detail, | |||||
["form.approvalItemTemplate.totalAmount"]:event.detail, | |||||
["form.transfers[0].expenditureAmount"]:event.detail, | |||||
["form.transfers["+event.currentTarget.dataset.index+"].payeeList["+event.currentTarget.dataset.childrenindex+"].incomeAmount"]: event.detail, | |||||
["form.transfers["+event.currentTarget.dataset.index+"].expenditureAmount"]:event.detail, | |||||
}) | }) | ||||
}, | }, | ||||
back:function(){ | back:function(){ | ||||
@@ -500,38 +649,50 @@ Page({ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
that.setData({ | |||||
['form.method']:'POST', | |||||
["form.approvalItemTemplate.dataType"]:e.currentTarget.dataset.type | |||||
}) | |||||
if(e.currentTarget.dataset.type == 3){ | |||||
for (let i = 0; i < that.data.form.transfers.length; i++) { | |||||
that.data.form.transfers[i].approvalMode = '2'; | |||||
} | |||||
that.data.form.approvalItemTemplate.dataType = e.currentTarget.dataset.type | |||||
} | |||||
that.data.form.method = 'POST'; | |||||
that.data.form.approvalItemTemplate.dataType = e.currentTarget.dataset.type; | |||||
let totalAmount = 0 ; | |||||
for (let i = 0; i < that.data.form.transfers.length; i++) { | |||||
totalAmount += parseInt(that.data.form.transfers[i].expenditureAmount); | |||||
} | |||||
that.data.form.approvalItemTemplate.totalAmount = totalAmount; | |||||
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) { | ||||
for (let i = 0; i < that.data.fileForm.length; i++) { | |||||
that.data.fileForm[i].tableId = res.data.id | |||||
const element = that.data.fileForm[i]; | |||||
wx.uploadFile({ | |||||
url: API.URL_GET_UPLOAD, | |||||
filePath: element.file, | |||||
name: 'file', | |||||
header: { | |||||
"Content-Type": "multipart/form-data",//记得设置 | |||||
"chartset":"utf-8", | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
}, | |||||
formData:element, | |||||
success (response){ | |||||
console.log(res); | |||||
if((i+1) == that.data.fileForm.length){ | |||||
wx.navigateTo({ | |||||
url: '/pages/apply/approval/approval?id='+res.data.id, | |||||
}) | |||||
for (let j = 0; j < res.data.transfers.length; j++) { | |||||
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 | |||||
const element = that.data.form.transfers[j].fileForm[i]; | |||||
wx.uploadFile({ | |||||
url: API.URL_GET_UPLOAD, | |||||
filePath: element.file, | |||||
name: 'file', | |||||
header: { | |||||
"Content-Type": "multipart/form-data",//记得设置 | |||||
"chartset":"utf-8", | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
}, | |||||
formData:element, | |||||
success (response){ | |||||
console.log(res); | |||||
if((j+1) == that.data.form.transfers[j].length && (i+1) == that.data.form.transfers[j].fileForm[i].length && e.currentTarget.dataset.type == 0){ | |||||
wx.navigateTo({ | |||||
url: '/pages/apply/approval/approval?id='+res.data.id, | |||||
}) | |||||
} | |||||
}, | |||||
fail(res){ | |||||
console.log(res) | |||||
} | } | ||||
}, | |||||
fail(res){ | |||||
console.log(res) | |||||
} | |||||
}) | |||||
}) | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -542,9 +703,9 @@ Page({ | |||||
["form.approvalItemTemplate.approvalItems"]: even.detail.value, | ["form.approvalItemTemplate.approvalItems"]: even.detail.value, | ||||
}) | }) | ||||
}, | }, | ||||
SJtakephoto(){ | |||||
SJtakephoto(e){ | |||||
var that = this; | var that = this; | ||||
let fileForm = that.data.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, | count: 9, | ||||
mediaType: ['image','video'], | mediaType: ['image','video'], | ||||
@@ -558,20 +719,21 @@ Page({ | |||||
file: item.tempFilePath, | file: item.tempFilePath, | ||||
fileType:'1', | fileType:'1', | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_yinnong_approval_item_template', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:'' | tableId:'' | ||||
}) | }) | ||||
}) | }) | ||||
console.log(fileForm); | |||||
that.setData({ | that.setData({ | ||||
SJimage:res.tempFiles, | |||||
fileForm:fileForm | |||||
["form.transfers["+e.currentTarget.dataset.index+"].SJimage"]:res.tempFiles, | |||||
["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
FPtakephoto(){ | |||||
FPtakephoto(e){ | |||||
var that = this; | var that = this; | ||||
let fileForm = that.data.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, | count: 9, | ||||
mediaType: ['image','video'], | mediaType: ['image','video'], | ||||
@@ -579,25 +741,27 @@ Page({ | |||||
maxDuration: 30, | maxDuration: 30, | ||||
camera: 'back', | camera: 'back', | ||||
success(res) { | success(res) { | ||||
console.log(res); | |||||
res.tempFiles.forEach(item => { | res.tempFiles.forEach(item => { | ||||
fileForm.push({ | fileForm.push({ | ||||
file: item.tempFilePath, | file: item.tempFilePath, | ||||
fileType:'2', | fileType:'2', | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_yinnong_approval_item_template', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:'' | tableId:'' | ||||
}) | }) | ||||
}) | }) | ||||
console.log(fileForm); | |||||
that.setData({ | that.setData({ | ||||
FPimage:res.tempFiles, | |||||
fileForm:fileForm | |||||
["form.transfers["+e.currentTarget.dataset.index+"].FPimage"]:res.tempFiles, | |||||
["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
QTtakephoto(){ | |||||
QTtakephoto(e){ | |||||
var that = this; | var that = this; | ||||
let fileForm = that.data.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, | count: 9, | ||||
mediaType: ['image','video'], | mediaType: ['image','video'], | ||||
@@ -605,18 +769,20 @@ Page({ | |||||
maxDuration: 30, | maxDuration: 30, | ||||
camera: 'back', | camera: 'back', | ||||
success(res) { | success(res) { | ||||
console.log(res); | |||||
res.tempFiles.forEach(item => { | res.tempFiles.forEach(item => { | ||||
fileForm.push({ | fileForm.push({ | ||||
file: item.tempFilePath, | file: item.tempFilePath, | ||||
fileType:'3', | fileType:'3', | ||||
bizPath:'transfer', | bizPath:'transfer', | ||||
tableName:'t_yinnong_approval_item_template', | |||||
tableName:'t_yinnong_transfer', | |||||
tableId:'' | tableId:'' | ||||
}) | }) | ||||
}) | }) | ||||
console.log(fileForm); | |||||
that.setData({ | that.setData({ | ||||
QTimage:res.tempFiles, | |||||
fileForm:fileForm | |||||
["form.transfers["+e.currentTarget.dataset.index+"].QTimage"]:res.tempFiles, | |||||
["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
@@ -624,7 +790,43 @@ Page({ | |||||
addList(){ | addList(){ | ||||
let transList = this.data.form.transfers; | let transList = this.data.form.transfers; | ||||
transList.push({ | transList.push({ | ||||
num:UTIL.convertToChinaNum(transList.length+1) | |||||
num:UTIL.convertToChinaNum(transList.length+1), | |||||
capitalExpenditureType:'',//资金支出类别 | |||||
capitalExpenditureTypeText:'',//资金支出类别(展示用) | |||||
succeedAmount:'',//成功支付金额 | |||||
payer:'',//付款方 | |||||
payerAccount:'',//付款方账户 | |||||
bankType:'',//所属银行 | |||||
bankTypeText:'',//所属银行(展示用) | |||||
isPeers:'',//是否同行 | |||||
operatorCode:'',//操作员代码 | |||||
enterpriseCode:'',//企业编码 | |||||
expenditureAmount:'',//支出总金额 | |||||
applyDate:'',//申请时间 | |||||
transferStatus:'',//转账状态 | |||||
auditStatus:'0',//审批状态 | |||||
paymentState:'',//支付状态 | |||||
approvalMode:'1',//审批模式 | |||||
paymentTime:'',//支付时间 | |||||
bankPriority:'',//银行处理优先级 | |||||
clientPriority:'',//客户处理优先级 | |||||
transferType:'',//付款方式 | |||||
transferTypeText:'',//付款方式(展示用) | |||||
requiredTransferTime:'',//要求转账时间 | |||||
remark:'',//付款事由 | |||||
startTime:'',//开票日期 | |||||
endTime:'',//到期日期 | |||||
orderType:'',//汇票类型 | |||||
bankAccountType:'',//账户类别1 公户2私户 | |||||
villageAccountType:'',//账户分类 | |||||
payeeList:[{//收款方账户集合 | |||||
payeeId:'0',//收款方id | |||||
payee:'',//收款方 | |||||
bankDeposit:'',//开户行 | |||||
incomeAmount:'',//收入金额 | |||||
bankType:'',//所属银行0其他银行1中国银行2农商行(山东省)3农业银行4建设银行5工商银行 | |||||
payeeAccount:'',//收款账户 | |||||
}], | |||||
}); | }); | ||||
this.setData({ | this.setData({ | ||||
["form.transfers"] : transList | ["form.transfers"] : transList | ||||
@@ -643,6 +845,21 @@ Page({ | |||||
current:array[e.currentTarget.dataset.index] | current:array[e.currentTarget.dataset.index] | ||||
}) | }) | ||||
}, | }, | ||||
goKeep(){ | |||||
var that = this; | |||||
let pages = getCurrentPages(); | |||||
let currentPage = null; //当前页面 | |||||
let prevPage = null; //上一个页面 | |||||
currentPage = pages[pages.length - 1]; //获取当前页面,将其赋值 | |||||
prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 | |||||
console.log(that.data.form); | |||||
if (prevPage) { | |||||
prevPage.setData({ | |||||
form : that.data.form,//将想要传的信息赋值给上一个页面data中的值 | |||||
}) | |||||
that.back() | |||||
} | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
*/ | */ | ||||
@@ -186,14 +186,14 @@ | |||||
</view> | </view> | ||||
<view class="main-box table-box" wx:for="{{form.transfers[index].payeeList}}" wx:for-index="childrenIndex" wx:key="payeeId"> | <view class="main-box table-box" wx:for="{{form.transfers[index].payeeList}}" wx:for-index="childrenIndex" wx:key="payeeId"> | ||||
<van-field 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-isPeers="{{ form.transfers[index].isPeers }}" data-bankType="{{ form.transfers[index].bankType }}" data-accountType="{{ form.transfers[index].bankAccountType }}" data-transferType="{{ form.transfers[index].transferType }}"> | |||||
<van-field 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-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"> | <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> | ||||
<van-field readonly label="收款账户" value="{{ form.transfers[index].payeeList[childrenIndex].payeeAccount }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/> | <van-field readonly label="收款账户" value="{{ form.transfers[index].payeeList[childrenIndex].payeeAccount }}" placeholder="请输入收款账户" border="{{ false }}" bind:change="onChange" input-align="right"/> | ||||
<van-field 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 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 label="收入金额" value="{{ form.transfers[index].payeeList[childrenIndex].incomeAmount }}" placeholder="请输入收入金额" border="{{ false }}" bind:change="onChangeMoney" input-align="right" data-formname="form.transfers[{{index}}].payeeList[{{childrenIndex}}].incomeAmount"/> | |||||
<van-field 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 readonly label="所属银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankTypeText }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | <van-field readonly label="所属银行" value="{{ form.transfers[index].payeeList[childrenIndex].bankTypeText }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | ||||
</view> | </view> | ||||
@@ -208,33 +208,36 @@ | |||||
<view class="van-cell-text">附件<van-tag type="danger" style="margin-left: 10px;">可拍照</van-tag></view> | <view class="van-cell-text">附件<van-tag type="danger" style="margin-left: 10px;">可拍照</van-tag></view> | ||||
</view> | </view> | ||||
<view> | <view> | ||||
<view class="van-cell-text">总数<van-tag round color="#5CAE77" plain style="margin-left: 10px;"> 0张 </van-tag></view> | |||||
<view class="van-cell-text">总数<van-tag round color="#5CAE77" plain style="margin-left: 10px;"> {{form.transfers[index].imgcount}}张 </van-tag></view> | |||||
</view> | </view> | ||||
</van-cell> | </van-cell> | ||||
<view class="fj-box"> | <view class="fj-box"> | ||||
<view class="fj-li"> | <view class="fj-li"> | ||||
<text> | |||||
收 | |||||
据 | |||||
</text> | |||||
<image wx:for="{{SJimage}}" src="{{item.tempFilePath}}" wx:key="index" data-option="{{SJimage}}" data-index="{{index}}" bindtap="openPreview"></image> | |||||
<image src="/image/apply/fj_upload.png" bindtap="SJtakephoto"></image> | |||||
<view> | |||||
<text>收\n据</text> | |||||
</view> | |||||
<view class="img_box"> | |||||
<image wx:for="{{form.transfers[index].SJimage}}" src="{{item.tempFilePath}}" wx:key="index" data-option="{{form.transfers[index].SJimage}}" data-index="{{index}}" bindtap="openPreview"></image> | |||||
<image src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="SJtakephoto"></image> | |||||
</view> | |||||
</view> | </view> | ||||
<view class="fj-li"> | <view class="fj-li"> | ||||
<text> | |||||
发 | |||||
票 | |||||
</text> | |||||
<image wx:for="{{FPimage}}" src="{{item.tempFilePath}}" wx:key="index"></image> | |||||
<image src="/image/apply/fj_upload.png" bindtap="FPtakephoto"></image> | |||||
<view> | |||||
<text>发\n票</text> | |||||
</view> | |||||
<view class="img_box"> | |||||
<image wx:for="{{form.transfers[index].FPimage}}" src="{{item.tempFilePath}}" data-option="{{form.transfers[index].FPimage}}" data-index="{{index}}" bindtap="openPreview" wx:key="index"></image> | |||||
<image src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="FPtakephoto"></image> | |||||
</view> | |||||
</view> | </view> | ||||
<view class="fj-li"> | <view class="fj-li"> | ||||
<text> | |||||
其 | |||||
他 | |||||
</text> | |||||
<image wx:for="{{QTimage}}" src="{{item.tempFilePath}}" wx:key="index"></image> | |||||
<image src="/image/apply/fj_upload.png" bindtap="QTtakephoto"></image> | |||||
<view> | |||||
<text>其\n他</text> | |||||
</view> | |||||
<view class="img_box"> | |||||
<image wx:for="{{form.transfers[index].QTimage}}" src="{{item.tempFilePath}}" data-option="{{form.transfers[index].QTimage}}" data-index="{{index}}" bindtap="openPreview" wx:key="index"></image> | |||||
<image src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="QTtakephoto"></image> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -278,21 +281,29 @@ | |||||
</view> | </view> | ||||
</block> | </block> | ||||
<view class="bottomBtn"> | |||||
<view bindtap="goSubmitMB"> | |||||
<image src="/image/apply/icon_pres.png"></image> | |||||
<text>保存模板</text> | |||||
</view> | |||||
<view bindtap="addList"> | |||||
<image src="/image/apply/icon_add.png"></image> | |||||
<text>新增事项</text> | |||||
<block wx:if="{{!isUpdate}}"> | |||||
<view class="bottomBtn"> | |||||
<view bindtap="goSubmitMB"> | |||||
<image src="/image/apply/icon_pres.png"></image> | |||||
<text>保存模板</text> | |||||
</view> | |||||
<view bindtap="addList"> | |||||
<image src="/image/apply/icon_add.png"></image> | |||||
<text>新增事项</text> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | |||||
<view class="bottom"> | |||||
<view class="btn1" data-type="2" bindtap="goSubmit">保存</view> | |||||
<view class="btn2" data-type="0" bindtap="goSubmit">下一步</view> | |||||
</view> | |||||
<view class="bottom"> | |||||
<view class="btn1" data-type="3" bindtap="goSubmit">提交复核</view> | |||||
<view class="btn2" data-type="0" bindtap="goSubmit">下一步</view> | |||||
</view> | |||||
</block> | |||||
<block wx:if="{{isUpdate}}"> | |||||
<view class="bottom"> | |||||
<view class="btn3" data-type="0" bindtap="goKeep">保存</view> | |||||
</view> | |||||
</block> | |||||
<!-- <view class="bottom"> | <!-- <view class="bottom"> | ||||
<button type="warn" plain class="btnDis">驳回</button> | <button type="warn" plain class="btnDis">驳回</button> | ||||
<button type="primary" class="btnAgree">同意</button> | <button type="primary" class="btnAgree">同意</button> | ||||
@@ -109,24 +109,21 @@ text{display: block;} | |||||
.fj-box text{ | .fj-box text{ | ||||
background-color: #5CAE77; | background-color: #5CAE77; | ||||
color: #ffffff; | color: #ffffff; | ||||
display: inline-block; | |||||
text-align: center; | text-align: center; | ||||
border-radius: 5px; | border-radius: 5px; | ||||
white-space:pre-wrap | |||||
white-space:pre-wrap; | |||||
padding: 22px 15px; | |||||
} | } | ||||
.fj-li{ | .fj-li{ | ||||
margin-top: 20px; | margin-top: 20px; | ||||
display: flex; | display: flex; | ||||
flex-wrap: wrap; | |||||
/* flex-wrap: wrap; */ | |||||
} | } | ||||
.fj-li image{ | .fj-li image{ | ||||
width: 22%; | |||||
width: 25%; | |||||
height: 18.5vw; | height: 18.5vw; | ||||
margin-left: 5%; | margin-left: 5%; | ||||
} | } | ||||
.fj-li image:nth-child(4n+1){ | |||||
margin-left: 0; | |||||
} | |||||
.fj-li image:nth-child(n+5){ | .fj-li image:nth-child(n+5){ | ||||
margin-top: 15px; | margin-top: 15px; | ||||
} | } | ||||
@@ -185,6 +182,13 @@ text{display: block;} | |||||
margin-left: 6%; | margin-left: 6%; | ||||
color: #fff; | color: #fff; | ||||
} | } | ||||
.bottom .btn3{ | |||||
border: 1px solid transparent; | |||||
padding: 8px 0px; | |||||
background-image: linear-gradient(to right, #2C8E68, #5CAE77); | |||||
color: #fff; | |||||
width: 100%; | |||||
} | |||||
.steps-box{ | .steps-box{ | ||||
padding: 0; | padding: 0; | ||||
margin-top: 15px; | margin-top: 15px; | ||||
@@ -329,4 +333,8 @@ text{display: block;} | |||||
line-height: 32px; | line-height: 32px; | ||||
border-radius: 5px; | border-radius: 5px; | ||||
margin-bottom: 15px; | margin-bottom: 15px; | ||||
} | |||||
.img_box{ | |||||
position: relative; | |||||
width: 100%; | |||||
} | } |
@@ -10,12 +10,82 @@ Page({ | |||||
data: { | data: { | ||||
isIPX: app.globalData.isIPX, | isIPX: app.globalData.isIPX, | ||||
show: false, | show: false, | ||||
form:{} | |||||
countMoney:0, | |||||
form:{}, | |||||
SJimage: [], | |||||
FPimage: [], | |||||
QTimage: [], | |||||
fileForm:[], | |||||
}, | }, | ||||
showPopup() { | showPopup() { | ||||
this.setData({ show: true }); | this.setData({ show: true }); | ||||
}, | }, | ||||
bindNameInput(even){ | |||||
this.setData({ | |||||
["form.approvalItemTemplate.templateName"]:even.detail.value | |||||
}) | |||||
}, | |||||
goSubmit(e){ | |||||
var that = this; | |||||
if(e.currentTarget.dataset.type == 1){ | |||||
if(that.data.form.approvalItemTemplate.templateName == ''){ | |||||
UTIL.showToastNoneIcon('请输入模板名称!'); | |||||
return; | |||||
} | |||||
} | |||||
if(e.currentTarget.dataset.type == 3){ | |||||
for (let i = 0; i < that.data.form.transfers.length; i++) { | |||||
that.data.form.transfers[i].approvalMode = '2'; | |||||
} | |||||
that.data.form.approvalItemTemplate.dataType = e.currentTarget.dataset.type | |||||
} | |||||
that.data.form.method = 'POST'; | |||||
that.data.form.approvalItemTemplate.dataType = e.currentTarget.dataset.type; | |||||
that.data.form.approvalItemTemplate.id = null; | |||||
for (let i = 0; i < that.data.form.transfers.length; i++) { | |||||
that.data.form.transfers[i].id = null; | |||||
} | |||||
console.log(that.data.form); | |||||
UTIL.httpRequest(API.URL_GET_SAVE, that.data.form, { | |||||
success: (res) => { | |||||
if (res.code == API.SUCCESS_CODE) { | |||||
for (let j = 0; j < res.data.transfers.length; j++) { | |||||
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 | |||||
const element = that.data.form.transfers[j].fileForm[i]; | |||||
wx.uploadFile({ | |||||
url: API.URL_GET_UPLOAD, | |||||
filePath: element.file, | |||||
name: 'file', | |||||
header: { | |||||
"Content-Type": "multipart/form-data",//记得设置 | |||||
"chartset":"utf-8", | |||||
'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
}, | |||||
formData:element, | |||||
success (response){ | |||||
console.log(res); | |||||
if((j+1) == that.data.form.transfers.length && (i+1) == that.data.form.transfers[j].fileForm.length && e.currentTarget.dataset.type == 0){ | |||||
wx.navigateTo({ | |||||
url: '/pages/apply/approval/approval?id='+res.data.id, | |||||
}) | |||||
} | |||||
if((j+1) == that.data.form.transfers.length && (i+1) == that.data.form.transfers[j].fileForm.length && e.currentTarget.dataset.type != 0){ | |||||
UTIL.showToastNoneIcon('操作成功!'); | |||||
that.back(); | |||||
} | |||||
}, | |||||
fail(res){ | |||||
console.log(res) | |||||
} | |||||
}) | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}) | |||||
}, | |||||
onClose() { | onClose() { | ||||
this.setData({ show: false }); | this.setData({ show: false }); | ||||
}, | }, | ||||
@@ -30,20 +100,30 @@ Page({ | |||||
url: 'see/see', | url: 'see/see', | ||||
}) | }) | ||||
}, | }, | ||||
goUpdate(){ | |||||
let array = JSON.stringify(this.data.form) | |||||
wx.navigateTo({ | |||||
url: 'add/add?type=update&array='+array, | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad(options) { | onLoad(options) { | ||||
var that = this ; | var that = this ; | ||||
UTIL.httpRequest(API.URL_GET_APPROVALITEMSBYID + options.id, {method:'GET'}, { | |||||
UTIL.httpRequest(API.URL_GET_APPROVALITEMS + options.id, {method:'GET'}, { | |||||
success: (res) => { | success: (res) => { | ||||
let transList = res.data.transfers; | let transList = res.data.transfers; | ||||
transList.forEach(item => { | |||||
item.num = UTIL.convertToChinaNum(transList.length) | |||||
let countMoney = that.data.countMoney | |||||
transList.forEach((item,index) => { | |||||
item.num = UTIL.convertToChinaNum(index+1) | |||||
countMoney += parseInt(item.expenditureAmount); | |||||
}); | }); | ||||
res.data.transfers = transList | res.data.transfers = transList | ||||
that.setData({ | that.setData({ | ||||
form:res.data | |||||
form:res.data, | |||||
countMoney:countMoney | |||||
}); | }); | ||||
} | } | ||||
}) | }) | ||||
@@ -6,20 +6,20 @@ | |||||
<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" style="margin-top:{{isIPX?'100px':'75px'}};"> | <view class="main-box top-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | ||||
<text class="box-title">审批事项</text> | <text class="box-title">审批事项</text> | ||||
<input class="input_tit" placeholder="房屋出租整年费用" value="{{form.approvalItems}}"/> | |||||
<input class="input_tit" placeholder="房屋出租整年费用" readonly value="{{form.approvalItemTemplate.approvalItems}}"/> | |||||
<text>支出总金额</text> | <text>支出总金额</text> | ||||
<view class="money_box">¥<input class="input_money" placeholder="总金额" placeholder-style="color:#E90000;"/></view> | |||||
<text>提交单位:{{form.submitCompany}}</text> | |||||
<text>提交日期:{{form.submitDate}}</text> | |||||
<text>提 交 人:{{form.submitter}}</text> | |||||
<text>联系电话:{{form.telephone}}</text> | |||||
<view class="money_box">¥<input class="input_money" readonly placeholder="总金额" placeholder-style="color:#E90000;" value="{{countMoney}}"/></view> | |||||
<text>提交单位:{{form.approvalItemTemplate.submitCompany}}</text> | |||||
<text>提交日期:{{form.approvalItemTemplate.submitDate}}</text> | |||||
<text>提 交 人:{{form.approvalItemTemplate.submitter}}</text> | |||||
<text>联系电话:{{form.approvalItemTemplate.telephone}}</text> | |||||
</view> | </view> | ||||
<block wx:for="{{form.transfers}}" wx:key="index"> | <block wx:for="{{form.transfers}}" wx:key="index"> | ||||
<text class="title">事项{{item.num}}</text> | <text class="title">事项{{item.num}}</text> | ||||
<view class="main-box top-box"> | <view class="main-box top-box"> | ||||
<text>支出金额</text> | <text>支出金额</text> | ||||
<view class="money_box">¥<input class="input_money" placeholder="金额" placeholder-style="color:#E90000;" value="{{item.expenditureAmount}}"/></view> | |||||
<view class="money_box">¥<input class="input_money" readonly placeholder="金额" placeholder-style="color:#E90000;" value="{{item.expenditureAmount}}"/></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> | ||||
@@ -33,8 +33,8 @@ | |||||
</van-cell> | </van-cell> | ||||
<view class="btnBox"> | <view class="btnBox"> | ||||
<image src="/image/apply/down.png" class="down" bindtap="goSee"></image> | <image src="/image/apply/down.png" class="down" bindtap="goSee"></image> | ||||
<image src="/image/apply/icon_update.png" class="update"></image> | |||||
<image src="/image/apply/icon_delete.png" class="delete"></image> | |||||
<image src="/image/apply/icon_update.png" class="update" bindtap="goUpdate"></image> | |||||
<image src="/image/apply/icon_delete.png" class="delete" bindtap="goDelete"></image> | |||||
</view> | </view> | ||||
</van-cell-group> | </van-cell-group> | ||||
</view> | </view> | ||||
@@ -46,15 +46,15 @@ | |||||
<image src="/image/apply/icon_pres.png"></image> | <image src="/image/apply/icon_pres.png"></image> | ||||
<text>保存模板</text> | <text>保存模板</text> | ||||
</view> | </view> | ||||
<view> | |||||
<view bindtap="goUpdate"> | |||||
<image src="/image/apply/icon_add.png"></image> | <image src="/image/apply/icon_add.png"></image> | ||||
<text>新增事项</text> | <text>新增事项</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="bottom"> | <view class="bottom"> | ||||
<view class="btn1" bindtap="openBox">提交复核</view> | |||||
<view class="btn2" bindtap="goApproval">下一步</view> | |||||
<view class="btn1" data-type="3" bindtap="goSubmit">提交复核</view> | |||||
<view class="btn2" data-type="0" bindtap="goSubmit">下一步</view> | |||||
</view> | </view> | ||||
<van-dialog | <van-dialog | ||||
@@ -64,7 +64,9 @@ | |||||
bind:close="onClose" | bind:close="onClose" | ||||
theme='round-button' | theme='round-button' | ||||
confirmButtonText="保存" | confirmButtonText="保存" | ||||
data-type="1" | |||||
bind:confirm="goSubmit" | |||||
closeOnClickOverlay="{{ true }}" | closeOnClickOverlay="{{ true }}" | ||||
> | > | ||||
<input class="input_tit" placeholder="请输入模板名称" style="width: 90%;margin: 0 auto;margin-top: 15px;margin-bottom: 10px;text-align: center;"/> | |||||
<input class="input_tit" placeholder="请输入模板名称" style="width: 90%;margin: 0 auto;margin-top: 15px;margin-bottom: 10px;text-align: center;" value="{{form.approvalItemTemplate.templateName}}" bindinput="bindNameInput"/> | |||||
</van-dialog> | </van-dialog> |
@@ -90,6 +90,7 @@ text{display: block;} | |||||
font-size: 26px; | font-size: 26px; | ||||
display: inline-block; | display: inline-block; | ||||
width: 50%; | width: 50%; | ||||
text-align: center; | |||||
} | } | ||||
.money_box{ | .money_box{ | ||||
@@ -25,6 +25,7 @@ Page({ | |||||
bankType:options.bankType,//所属银行 | bankType:options.bankType,//所属银行 | ||||
accountType:options.accountType,//账户类型 | accountType:options.accountType,//账户类型 | ||||
payeeType:options.transferType,//申请转帐类型 | payeeType:options.transferType,//申请转帐类型 | ||||
index:options.index | |||||
}) | }) | ||||
// 获取收款账号列表 | // 获取收款账号列表 | ||||
@@ -149,7 +150,7 @@ Page({ | |||||
prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 | prevPage = pages[pages.length - 2]; //获取上一个页面,将其赋值 | ||||
if (prevPage) { | if (prevPage) { | ||||
prevPage.setData({ | prevPage.setData({ | ||||
["form.transfers[0].payeeList[0]"]: array[0]//将想要传的信息赋值给上一个页面data中的值 | |||||
["form.transfers["+that.data.index+"].payeeList[0]"]: array[0]//将想要传的信息赋值给上一个页面data中的值 | |||||
}) | }) | ||||
that.back() | that.back() | ||||
} | } | ||||
@@ -116,6 +116,12 @@ const URL_GET_USERAPPRO = `${URL_PREFIX}/yinnong/approvalItems/getUserApprovalIt | |||||
//查看附件列表 | //查看附件列表 | ||||
const URL_GET_FINDLIST = `${URL_PREFIX}/system/attachment/find`; | const URL_GET_FINDLIST = `${URL_PREFIX}/system/attachment/find`; | ||||
//查看附件列表 | |||||
const URL_GET_APPROVALITEMS = `${URL_PREFIX}/yinnong/approvalItems/getApprovalItem/`; | |||||
//通过审批事项id删除审批模板 | |||||
const URL_GET_REMOVEAPPROVAL = `${URL_PREFIX}/yinnong/approvalItems/remove/`; | |||||
/****************接口地址end****************/ | /****************接口地址end****************/ | ||||
@@ -168,5 +174,7 @@ export { | |||||
URL_GET_SAVE, | URL_GET_SAVE, | ||||
URL_GET_UPLOAD, | URL_GET_UPLOAD, | ||||
URL_GET_USERAPPRO, | URL_GET_USERAPPRO, | ||||
URL_GET_FINDLIST | |||||
URL_GET_FINDLIST, | |||||
URL_GET_APPROVALITEMS, | |||||
URL_GET_REMOVEAPPROVAL | |||||
} | } |