You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

125 lines
2.5 KiB

// pages/updataguaranteeno/updataguaranteeno.js已审核
var network = require("../../../utils/net.js")
var timechage = require("../../../utils/dateTimeUtil.js")
function load(that,ID){
let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/Load';
let params = [ID];
network.transfer_request(method, params, function (res) {
if (res.result.GuaranteeDate!=null){
that.setData({
guaranteedate: timechage.formatTimeTwo(res.result.GuaranteeDate.substring(6, 19), 'Y-M-D'),
})
}
if (res.result.CashBackDate!=null){
that.setData({
CashBackDate: timechage.formatTimeTwo(res.result.CashBackDate.substring(6, 19), 'Y-M-D')
})
}
if (res.result.GuaranteeMoney!=null){
that.setData({
GuaranteeMoney: res.result.GuaranteeMoney,
})
}
that.setData({
Customer_Name: res.result.Customer_Name,
AccountingUnit_Name: res.result.AccountingUnit_Name,
Department_Name: res.result.Department_Name,
})
setDetails(that,res.result.Details)
})
}
function setDetails(that,ary){
let array=[]
for(var i=0;i<ary.length;i++){
let data="";
if (ary[i].Date!=null){
data = timechage.formatTimeTwo(ary[i].Date.substring(6, 19), 'Y-M-D')
}
var dmo={
DmoTypeIDName: ary[i].DmoTypeIDName,
BillID: ary[i].BillID,
Value: ary[i].Value,
Customer_Name: ary[i].Customer_Name,
Date: data
}
array.push(dmo)
}
that.setData({
array: array
})
}
Page({
/**
* 页面的初始数据
*/
data: {
array:[],
Customer_Name:"",
AccountingUnit_Name:"",
Department_Name:"",
guaranteedate:"",
CashBackDate:"",
GuaranteeMoney:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
let ID = Number(options.ID)
wx.setNavigationBarTitle({
title: '业务担保单No.' + ID,
})
load(that,ID)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
})