对象调用方法

Model.prototype.button20Click = function(event) {
var md5Str = JSON.parse(localStorage.getItem("user")).md5Str;
var itemScoreData = this.comp("itemScoreData");
itemScoreData.setValue("edit_status", 1);// 设置状态为整改回复
var isSave = this.isSaveScore(itemScoreData);
if (isSave) {
return;
}
var self = this;
var arrmessage = this.addMessage(self);
messageObject.insertMessage(arrmessage, md5Str);
// itemScoreData.saveData();
this.close();
};


// 
Model.prototype.addMessage = function(self) {
var itemScoreData = self.comp("itemScoreData");
var personData = self.comp("personData");
var rectify_person_id = itemScoreData.getValue("rectify_person_id");// 整改人的id
var creat_person_id = itemScoreData.getValue("creat_person_id");// 创建人的id
var arrmessage = [];
var rows = {
"isFinish" : 0,// 已读未读
"fProjectID" : itemScoreData.getValue("ins_project_id"),// 项目id
"fMessageTypeID" : "ZLJC",// 消息类别编码
"fMessageType" : itemScoreData.getValue("ins_type"),// 消息类别名称
"fMasterID" : itemScoreData.getValue("id"),// 业务表外键
"fSubmitter" : itemScoreData.getValue("ins_person_name"),// 创建人名称
"fSubmitterID" : creat_person_id,// 创建人id
"fSubmitImage" : personData.getValueByID("fImage", creat_person_id),// 创建人头像
"fApproverID" : rectify_person_id,// 整改人的id
"fApprover" : itemScoreData.getValue("rectify_person_name"),// 整改人名称
"fApproverImage" : personData.getValueByID("fImage", rectify_person_id),// 整改人头像
"fProjectName" : itemScoreData.getValue("ins_project_name"),// 项目名称
"fState" : itemScoreData.getValue("pass_status_name"),// 通过状态的名称
"fStateID" : itemScoreData.getValue("pass_status"),// 通过状态
"fCreateTime" : itemScoreData.getValue("creat_time"),// 创建时间
"fAddress" : itemScoreData.getValue("work_site"),// 地点
"fCCIDs" : itemScoreData.getValue("transcribe_person_id"),// 抄送人的id
"fCCNames" : itemScoreData.getValue("transcribe_person_name"),// 抄送人的名字
"isHasCC" : itemScoreData.getValue("isHasCC"),// 已经阅读的抄送人
}
arrmessage.push(rows);
return arrmessage;
}

猜你喜欢

转载自blog.csdn.net/boss2967/article/details/79499810