<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<activity id="__CbtK3AhWdqYxSvSu9Ur">
  <name>提交修改</name>
  <parentId>__J7TQPQBN4EheTEbwQZr</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <type>13</type>
  <onActionFlow></onActionFlow>
  <onActionPrint></onActionPrint>
  <colorType>default</colorType>
  <beforeActionScript><![CDATA[//在表单控件值脚本中获取当前文档对象
(function(){
 var avatar = getItemValueAsString("avatar"); 
  println("======>"+avatar);
 var idCardNoFrontUrl = getItemValueAsString("idCardNoFrontUrl");
   println("======>"+idCardNoFrontUrl);
 var idCardNoBackUrl = getItemValueAsString("idCardNoBackUrl"); 
  println("======>"+idCardNoBackUrl);
 var contractFile = getItemValueAsString("contractFile"); 

if(!isNotNull(avatar)){return "一寸免冠白底彩照不得为空！";}
if(!isNotNull(idCardNoFrontUrl)){return "身份证人面像不得为空！";}
if(!isNotNull(idCardNoBackUrl)){return "身份证国徽面不得为空！";}
//if(!isNotNull(contractFile)){return "合同文件不得为空！";}

})()]]></beforeActionScript>
  <afterActionScript><![CDATA[]]></afterActionScript>
  <retractBeforeActionScript><![CDATA[]]></retractBeforeActionScript>
  <retractAfterActionScript><![CDATA[]]></retractAfterActionScript>
  <hiddenScript><![CDATA[(function(){
var materialApproveStatus = getItemValueAsString("materialApproveStatus"); 
if("审核通过".equals(materialApproveStatus)) {
    return true;
}else{
	return false
}
})()]]></hiddenScript>
  <readonlyScript><![CDATA[]]></readonlyScript>
  <startFlowScript><![CDATA[							]]></startFlowScript>
  <editMode>0</editMode>
  <fileNameScript><![CDATA[]]></fileNameScript>
  <iconurl></iconurl>
  <orderno>1</orderno>
  <stateToShow></stateToShow>
  <parentForm>__J7TQPQBN4EheTEbwQZr</parentForm>
  <jumpType>0</jumpType>
  <expSub>false</expSub>
  <icon></icon>
  <disableFlowNode>false</disableFlowNode>
  <changeFlowOperator>false</changeFlowOperator>
  <changeFlowCc>false</changeFlowCc>
  <multiLanguageLabel></multiLanguageLabel>
  <dispatcherMode>0</dispatcherMode>
  <dispatcherUrl><![CDATA[]]></dispatcherUrl>
  <dispatcherParams><![CDATA[[{"paramKey":"","paramValue":""}]]]></dispatcherParams>
  <jumpMode>0</jumpMode>
  <jumpActOpenType>0</jumpActOpenType>
  <withOld>false</withOld>
  <actionType>1</actionType>
  <actionDispatcherUrlScript><![CDATA[]]></actionDispatcherUrlScript>
  <actionSelection>0</actionSelection>
  <relatedFormId>选择</relatedFormId>
  <actionScript><![CDATA[#include "optsLib";
#include "applyUpdateField";
#include "applyUpdateFile";
(function(){
var doc=getCurrentDocument();
var newAvatar = getItemValueAsString("avatar");
  
var newBirthday = getItemValueAsDate("birthday");
  var newSex = getItemValueAsString("sex");
var newEducation = getItemValueAsString("education");
var newNation = getItemValueAsString("nation");
  var newHeight = getItemValueAsString("height");
  println("newHeight"+newHeight);
   var newIsSubsidy = getItemValueAsString("isSubsidy");
var newResidentPlaceType = getItemValueAsString("residentPlaceType");
var newResidentType = getItemValueAsString("residentType");
var newIdCardNoFrontUrl = getItemValueAsString("idCardNoFrontUrl");
var newIdCardNoBackUrl = getItemValueAsString("idCardNoBackUrl");
var newContractName = getItemValueAsString("contractName");
var newContractId = getItemValueAsString("contractId");
var newSecondPartyName = getItemValueAsString("secondPartyName");
var newEffectStartDate = getItemValueAsString("effectStartDate");
var newEffectEndDate = getItemValueAsString("effectEndDate");
var newContractFile = getItemValueAsString("contractFile");
  var newEducationCard = getItemValueAsString("educationCard");
    var newPhysical = getItemValueAsString("physical");

var applyId = getId();
var applyInfoDoc=findDocument(applyId);
var oldIsSubsidy = applyInfoDoc.findItem("isSubsidy").getValue();
applyInfoDoc.findItem("isSubsidy").setValue(newIsSubsidy);
  
  var oldBirthday = applyInfoDoc.findItem("birthday").getValue();
applyInfoDoc.findItem("birthday").setValue(newBirthday);
 oldBirthday=format(oldBirthday,"yyyy-MM-dd ");
 newBirthday=format(newBirthday,"yyyy-MM-dd ");
  var oldSex = applyInfoDoc.findItem("sex").getValue();
applyInfoDoc.findItem("sex").setValue(newSex);
  var oldHeight = applyInfoDoc.findItem("height").getValue();
   println("oldHeight"+oldHeight);
applyInfoDoc.findItem("height").setValue(newHeight);
  var oldAvatar = applyInfoDoc.findItem("avatar").getValue();
applyInfoDoc.findItem("avatar").setValue(newAvatar);
var oldEducation = applyInfoDoc.findItem("education").getValue();
applyInfoDoc.findItem("education").setValue(newEducation);
var oldNation = applyInfoDoc.findItem("nation").getValue();
applyInfoDoc.findItem("nation").setValue(newNation);
var oldResidentPlaceType = applyInfoDoc.findItem("residentPlaceType").getValue();
applyInfoDoc.findItem("residentPlaceType").setValue(newResidentPlaceType);
var oldResidentType = applyInfoDoc.findItem("residentType").getValue();
applyInfoDoc.findItem("residentType").setValue(newResidentType);
var oldIdCardNoFrontUrl = applyInfoDoc.findItem("idCardNoFrontUrl").getValue();
applyInfoDoc.findItem("idCardNoFrontUrl").setValue(newIdCardNoFrontUrl);
var oldIdCardNoBackUrl = applyInfoDoc.findItem("idCardNoBackUrl").getValue();
applyInfoDoc.findItem("idCardNoBackUrl").setValue(newIdCardNoBackUrl);
var oldContractName = applyInfoDoc.findItem("contractName").getValue();
applyInfoDoc.findItem("contractName").setValue(newContractName);
var oldContractId = applyInfoDoc.findItem("contractId").getValue();
applyInfoDoc.findItem("contractId").setValue(newContractId);
var oldSecondPartyName = applyInfoDoc.findItem("secondPartyName").getValue();
applyInfoDoc.findItem("secondPartyName").setValue(newSecondPartyName);
var oldEffectStartDate = applyInfoDoc.findItem("effectStartDate").getValue();
applyInfoDoc.findItem("effectStartDate").setValue(newEffectStartDate);
var oldEffectEndDate = applyInfoDoc.findItem("effectEndDate").getValue();
applyInfoDoc.findItem("effectEndDate").setValue(newEffectEndDate);
var oldContractFile = applyInfoDoc.findItem("contractFile").getValue();
applyInfoDoc.findItem("contractFile").setValue(newContractFile);
  var oldEducationCard = applyInfoDoc.findItem("educationCard").getValue();
applyInfoDoc.findItem("educationCard").setValue(newEducationCard);
   var oldPhysical = applyInfoDoc.findItem("physical").getValue();
applyInfoDoc.findItem("physical").setValue(newPhysical);

 var process = getDocumentProcess();
process.doUpdate(applyInfoDoc); 
var viewId="__kXAsPze9eXl53HmaexP";
applyUpdateField(viewId,"文化程度",applyId,echoEducation(newEducation),echoEducation(oldEducation));
applyUpdateField(viewId,"民族",applyId,echoNation(newNation),echoNation(oldNation));
    newBirthday=newBirthday+"";
  oldBirthday=oldBirthday+""
  applyUpdateField(viewId,"出生年月",applyId,newBirthday.substring(0,10),oldBirthday.substring(0,10));
  applyUpdateField(viewId,"性别",applyId,echoSex(newSex),echoSex(oldSex));
  newHeight=newHeight+"";
  oldHeight=oldHeight+""
  applyUpdateField(viewId,"身高",applyId,newHeight.substring(0,3),oldHeight.substring(0,3));
    applyUpdateField(viewId,"是否参与补贴",applyId,echoYesOrNo(newIsSubsidy),echoYesOrNo(oldIsSubsidy));
applyUpdateField(viewId,"户籍所在地",applyId,echoResidentPlaceType(newResidentPlaceType),echoResidentPlaceType(oldResidentPlaceType));
applyUpdateField(viewId,"户籍类型",applyId,echoHouseholdType(newResidentType),echoHouseholdType(oldResidentType));
applyUpdateField(viewId,"合同名称",applyId,newContractName,oldContractName);
applyUpdateField(viewId,"乙方名称",applyId,newSecondPartyName,oldSecondPartyName);
applyUpdateField(viewId,"合同有效期",applyId,newEffectStartDate + "~" + newEffectEndDate,oldEffectStartDate + "~" + oldEffectEndDate);
applyUpdateFile(viewId,"一寸免冠白底彩照",applyId,newAvatar,oldAvatar);
applyUpdateFile(viewId,"合同文件",applyId,newContractFile,oldContractFile);
  applyUpdateFile(viewId,"学历证件",applyId,newEducationCard,oldEducationCard);
  applyUpdateFile(viewId,"体检证明",applyId,newPhysical,oldPhysical);
applyUpdateFile(viewId,"身份证人面像",applyId,newIdCardNoFrontUrl,oldIdCardNoFrontUrl);
applyUpdateFile(viewId,"身份证国徽面",applyId,newIdCardNoBackUrl,oldIdCardNoBackUrl);



})()]]></actionScript>
  <workFlowType>0</workFlowType>
  <contextMenu>false</contextMenu>
  <showInToolbar>true</showInToolbar>
  <transpond>选择</transpond>
  <targetList>ism1EiHqAkpLpSd2Zr7|</targetList>
  <label><![CDATA[]]></label>
</activity>