|
|
@@ -33,20 +33,10 @@ Page({ |
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
*/ |
|
|
|
onLoad(options) { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面初次渲染完成 |
|
|
|
*/ |
|
|
|
onReady() { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面显示 |
|
|
|
*/ |
|
|
|
onShow() { |
|
|
|
var that = this ; |
|
|
|
that.setData({ |
|
|
|
projectId:options.id |
|
|
|
}) |
|
|
|
var that = this; |
|
|
|
// 所属银行字典查询 |
|
|
|
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { |
|
|
@@ -73,6 +63,44 @@ Page({ |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
if(options.id){ |
|
|
|
UTIL.httpRequest(API.URL_GET_PAYEEGET + options.id, {method:'GET'}, { |
|
|
|
success: (res) => { |
|
|
|
UTIL.httpRequest(API.URL_GET_DEPOSITLIST, {method:'GET',bankType:res.data.bankType,status:'0'}, { |
|
|
|
success: (res2) => { |
|
|
|
that.setData({ |
|
|
|
depositOptions:res2.rows, |
|
|
|
}) |
|
|
|
console.log(res.data.bankType) |
|
|
|
console.log(res2.rows) |
|
|
|
if(res.data.bankType!="999"){ |
|
|
|
res.data.bankDepositText = res2.rows.filter(function (e) { return e.id == res.data.bankDeposit; })[0].bankDeposit; |
|
|
|
} |
|
|
|
res.data.payeeTypeText = UTIL.getTransform(res.data.payeeType,that.data.payeeTypeOptions); |
|
|
|
res.data.bankTypeText = UTIL.getTransform(res.data.bankType,that.data.bankTypeOptions); |
|
|
|
that.setData({ |
|
|
|
form:res.data, |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面初次渲染完成 |
|
|
|
*/ |
|
|
|
onReady() { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面显示 |
|
|
|
*/ |
|
|
|
onShow() { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
back:function(){ |
|
|
@@ -176,7 +204,17 @@ Page({ |
|
|
|
that.setData({ |
|
|
|
['form.method']:'POST' |
|
|
|
}) |
|
|
|
UTIL.httpRequest(API.URL_GET_PAYEEADD, that.data.form, { |
|
|
|
|
|
|
|
let url = ''; |
|
|
|
|
|
|
|
if(this.data.projectId){ |
|
|
|
url = API.URL_GET_PAYEEEDIT; |
|
|
|
console.log("修改"); |
|
|
|
}else{ |
|
|
|
url = API.URL_GET_PAYEEADD; |
|
|
|
console.log("新增"); |
|
|
|
} |
|
|
|
UTIL.httpRequest(url, that.data.form, { |
|
|
|
success: (res) => { |
|
|
|
if (res.code == API.SUCCESS_CODE) { |
|
|
|
wx.showToast({ |
|
|
|