<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<activity id="__S7BHutFQQC4nY7My4rr">
  <name>保存</name>
  <parentId>__sWMP3F5IpD1HWbJ44yJ</parentId>
  <type>11</type>
  <onActionForm></onActionForm>
  <onActionView></onActionView>
  <onActionFlow></onActionFlow>
  <onActionPrint></onActionPrint>
  <colorType>default</colorType>
  <beforeActionScript><![CDATA[//判断表单结束时间不能为空，且结束时间必须晚于开始时间              
     (function(){              
             var doc=getCurrentDocument();          
              var createdType = getItemValueAsString("createdType");           
                var domainId = getDomainid();        
              if(createdType==null || createdType.trim().length()<=0){           
                var sql="select ITEM_ALLSPACESIZE, ITEM_USESPACESIZE, ITEM_FREESPACESIZE from tlk_com_resource_space where DOMAINID = '"+domainId+"' limit 1";       
                var datas = queryByDSName("tms",sql);   
                var data = datas.iterator().next();//取值          
                var resourceSize = parseDouble(getItemValueAsString("resourceSize"));       
                var freeSpace = parseDouble(data.get("ITEM_FREESPACESIZE"));       
                if(freeSpace > resourceSize){          
                	var allSpaceSize = parseDouble(data.get("ITEM_ALLSPACESIZE"));           
                	var useSpaceSize = parseDouble(data.get("ITEM_USESPACESIZE")) + resourceSize;           
                	var freeSpaceSize = allSpaceSize - useSpaceSize;         
                  var updateSql = "update tlk_com_resource_space set ITEM_USESPACESIZE = '"+useSpaceSize+"',"+       
                      												" ITEM_FREESPACESIZE = '"+freeSpaceSize+"' where DOMAINID = '"+domainId+"'";          
                  updateByDSName("tms", updateSql);       
                }else{       
                	return createAlert("资源空间不足！");       
                }       
               }          
          
                             
              })()]]></beforeActionScript>
  <afterActionScript><![CDATA[(function(){    
    var doc=getCurrentDocument();    
    var docId = doc.getId();    
   var createdType = getItemValueAsString("createdType");        
   if(createdType==null || createdType.trim().length()<=0){      
     var updateSql = "update tlk_lesson_resource set ITEM_CREATEDTYPE = '1' where ID = '"+docId+"'";  
     updateByDSName("tms", updateSql);  
   }         
    })()]]></afterActionScript>
  <retractBeforeActionScript><![CDATA[]]></retractBeforeActionScript>
  <retractAfterActionScript><![CDATA[]]></retractAfterActionScript>
  <hiddenScript><![CDATA[]]></hiddenScript>
  <readonlyScript><![CDATA[]]></readonlyScript>
  <startFlowScript><![CDATA[							]]></startFlowScript>
  <editMode>0</editMode>
  <flowShowType>表单中显示流程操作</flowShowType>
  <fileNameScript><![CDATA[]]></fileNameScript>
  <orderno>1</orderno>
  <stateToShow></stateToShow>
  <parentView></parentView>
  <parentForm>__sWMP3F5IpD1HWbJ44yJ</parentForm>
  <impmappingconfigid>__7tkXQ8UWGSqrTJkHtCB</impmappingconfigid>
  <jumpType>0</jumpType>
  <expSub>false</expSub>
  <icon></icon>
  <disableFlowNode>true</disableFlowNode>
  <changeFlowOperator>true</changeFlowOperator>
  <changeFlowCc>true</changeFlowCc>
  <multiLanguageLabel></multiLanguageLabel>
  <dispatcherMode>0</dispatcherMode>
  <dispatcherUrl><![CDATA[]]></dispatcherUrl>
  <dispatcherParams><![CDATA[]]></dispatcherParams>
  <jumpMode>0</jumpMode>
  <jumpActOpenType>0</jumpActOpenType>
  <withOld>false</withOld>
  <actionType>0</actionType>
  <actionDispatcherUrlScript><![CDATA[]]></actionDispatcherUrlScript>
  <actionSelection>0</actionSelection>
  <relatedFormId></relatedFormId>
  <actionScript><![CDATA[]]></actionScript>
  <workFlowType>0</workFlowType>
  <contextMenu>true</contextMenu>
  <showInToolbar>true</showInToolbar>
  <transpond>选择</transpond>
  <targetList>__pv8pd9ykExqgVfGcWYM|</targetList>
  <label><![CDATA[]]></label>
</activity>