87,910
社区成员
发帖
与我相关
我的任务
分享
//页面数据绑定
function BandData(Vm,dataSource){
var Obj=eval(dataSource);
for (var oKey in Obj[0]){
if (Obj[0][oKey].toString()=='true'){
Vm[oKey]= ko.observable(true);
}
else if (Obj[0][oKey].toString()=='false'){
Vm[oKey]= ko.observable(false);
}
else{
Vm[oKey]= ko.observable(Obj[0][oKey].toString());
}
}
Vm['Csrq'] = ko.dependentObservable(function () {//出生日期
return this.出生日期年() + '-' + this.出生日期月() +'-'+this.出生日期日();}, Vm);
Vm['Fbrq'] = ko.dependentObservable(function () {//发病日期
return this.发病日期年() + '-' + this.发病日期月() +'-'+this.发病日期日();}, Vm);
Vm['Zdrq'] = ko.dependentObservable(function () {//诊断日期
return this.诊断日期年()+'-'+this.诊断日期月() +'-'+this.诊断日期日()+' '+this.诊断日期时()+':00:00.000';}, Vm);
Vm['Dzzdrq'] = ko.dependentObservable(function () {//订正诊断日期
return this.订正诊断日期年() + '-' + this.订正诊断日期月() +'-'+this.订正诊断日期日();}, Vm);
Vm['Swrq'] = ko.dependentObservable(function () {//死亡日期
return this.死亡日期年() + '-' + this.死亡日期月() +'-'+this.死亡日期日()+' '+this.死亡日期时()+':00:00.000';}, Vm);
Vm['Tkrq'] = ko.dependentObservable(function () {//填卡日期
return this.填卡日期年() + '-' + this.填卡日期月() +'-'+this.填卡日期日();}, Vm);
}
function BandComplexDateFromJson(rows){
//刷新日期控件(出生日期)
$.ms_DatePicker({
YearSelector: "#Csrq_year",
MonthSelector: "#Csrq_month",
DaySelector: "#Csrq_day",
FirstYear: "1900",
DefualtYear:rows[0].出生日期年,
DefualtMonth:rows[0].出生日期月,
DefualtDay:rows[0].出生日期日,
ValidateIDBirthDay: "1"
});
//通过Json数据设置省市县三级联动下拉列表框
function BandComplexAreaFromJson(rows){
var prov = rows[0].所在省;
var city = rows[0].所在市;
var district = rows[0].所在县;
//alert('provId='+ prov + ' cityId=' +city + ' districtId=' + district);
setComplexAreaByName('seachprov', 'seachcity', 'seachdistrict',prov,city,district);
delete updateData['Xzz_shi'];//移除现所在市
}