|  |  |  | 
|---|
|  |  |  | 
 | 
|---|
|  |  |  | }
 | 
|---|
|  |  |  | });
 | 
|---|
|  |  |  | }
 | 
|---|
|  |  |  | 
 | 
|---|
|  |  |  | //删除附件
 | 
|---|
|  |  |  | delFile = function(){
 | 
|---|
|  |  |  | var entity = view.get("#dgFiles").getCurrentItem();
 | 
|---|
|  |  |  | view.get("#ajaxDelFile").set("parameter",{
 | 
|---|
|  |  |  | fileName:entity.get("fileName"),
 | 
|---|
|  |  |  | createTime:entity.get("createTime")
 | 
|---|
|  |  |  | }).execute(function(result){
 | 
|---|
|  |  |  | if(result){
 | 
|---|
|  |  |  | $alert(result);
 | 
|---|
|  |  |  | }else{
 | 
|---|
|  |  |  | entity.remove();
 | 
|---|
|  |  |  | $alert("删除成功!");
 | 
|---|
|  |  |  | }
 | 
|---|
|  |  |  | });
 | 
|---|
|  |  |  | }</ClientEvent> | 
|---|
|  |  |  | <Property name="packages">font-awesome,css-common</Property> | 
|---|
|  |  |  | <Property name="javaScriptFile">./static/plugins/lodop/LodopFuncs.js</Property> | 
|---|
|  |  |  | 
|---|
|  |  |  | <DataColumn name="fileName"> | 
|---|
|  |  |  | <Property name="property">fileName</Property> | 
|---|
|  |  |  | </DataColumn> | 
|---|
|  |  |  | <DataColumn> | 
|---|
|  |  |  | <ClientEvent name="onRenderCell">arg.dom.innerHTML = "<a href='javascript:;' onClick='delFile()'>删除</a>";
 | 
|---|
|  |  |  | </ClientEvent> | 
|---|
|  |  |  | <Property name="property">fileId</Property> | 
|---|
|  |  |  | <Property name="name">fileId</Property> | 
|---|
|  |  |  | <Property name="align">center</Property> | 
|---|
|  |  |  | <Property name="caption">操作</Property> | 
|---|
|  |  |  | <Property name="readOnly">true</Property> | 
|---|
|  |  |  | <Property name="width">80</Property> | 
|---|
|  |  |  | </DataColumn> | 
|---|
|  |  |  | </DataGrid> | 
|---|
|  |  |  | </Children> | 
|---|
|  |  |  | </FieldSet> | 
|---|
|  |  |  | 
|---|
|  |  |  | <CustomDropDown id="ddNotice"> | 
|---|
|  |  |  | <Property name="minHeight">400</Property> | 
|---|
|  |  |  | <Property name="assignmentMap">noticeId=id,customerName=customerName</Property> | 
|---|
|  |  |  | <Property name="minWidth">500</Property> | 
|---|
|  |  |  | <Property name="minWidth">1000</Property> | 
|---|
|  |  |  | <Property name="autoOpen">true</Property> | 
|---|
|  |  |  | <Container layout="regionPadding:5"> | 
|---|
|  |  |  | <DataSet id="dsNotice"> | 
|---|
|  |  |  | 
|---|
|  |  |  | }</ClientEvent> | 
|---|
|  |  |  | <Property name="dataSet">dsNotice</Property> | 
|---|
|  |  |  | <Property name="readOnly">true</Property> | 
|---|
|  |  |  | <DataColumn name="name"> | 
|---|
|  |  |  | <Property name="property">name</Property> | 
|---|
|  |  |  | <Property name="align">center</Property> | 
|---|
|  |  |  | <Property name="width">100</Property> | 
|---|
|  |  |  | </DataColumn> | 
|---|
|  |  |  | <DataColumn> | 
|---|
|  |  |  | <Property name="property">customerName</Property> | 
|---|
|  |  |  | <Property name="align">center</Property> | 
|---|
|  |  |  | <Property name="name">customerName</Property> | 
|---|
|  |  |  | <Property name="width">240</Property> | 
|---|
|  |  |  | </DataColumn> | 
|---|
|  |  |  | <DataColumn name="name"> | 
|---|
|  |  |  | <Property name="property">name</Property> | 
|---|
|  |  |  | <DataColumn name="foodVariety"> | 
|---|
|  |  |  | <Property name="property">foodVariety</Property> | 
|---|
|  |  |  | <Property name="align">center</Property> | 
|---|
|  |  |  | </DataColumn> | 
|---|
|  |  |  | <DataColumn name="year"> | 
|---|
|  |  |  | <Property name="property">year</Property> | 
|---|
|  |  |  | <Property name="align">center</Property> | 
|---|
|  |  |  | </DataColumn> | 
|---|
|  |  |  | <DataColumn name="depotId"> | 
|---|
|  |  |  | <Property name="property">depotId</Property> | 
|---|
|  |  |  | <Property name="align">center</Property> | 
|---|
|  |  |  | <Property name="width">180</Property> | 
|---|
|  |  |  | </DataColumn> | 
|---|
|  |  |  | <DataColumn name="contractName"> | 
|---|
|  |  |  | <Property name="property">contractName</Property> | 
|---|
|  |  |  | <Property name="align">center</Property> | 
|---|
|  |  |  | <Property name="width">300</Property> | 
|---|
|  |  |  | </DataColumn> | 
|---|
|  |  |  | </DataGrid> | 
|---|
|  |  |  | </Container> | 
|---|
|  |  |  | 
|---|
|  |  |  | <UploadAction id="uploadImg"> | 
|---|
|  |  |  | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 | 
|---|
|  |  |  | var plateNum = data.get("plateNum");
 | 
|---|
|  |  |  | var bizTag = "EMPTY";
 | 
|---|
|  |  |  | self.set("parameter",{
 | 
|---|
|  |  |  | plateNum:plateNum,
 | 
|---|
|  |  |  | bizTag:"EMPTY_WEIGHT"
 | 
|---|
|  |  |  | bizTag: bizTag
 | 
|---|
|  |  |  | })</ClientEvent> | 
|---|
|  |  |  | <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据
 | 
|---|
|  |  |  | var mainData = view.get("#dsMain.data");
 | 
|---|
|  |  |  | 
|---|
|  |  |  | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 | 
|---|
|  |  |  | if(data){
 | 
|---|
|  |  |  | var plateNum = data.get("plateNum");
 | 
|---|
|  |  |  | var bizTag = "EMPTY";
 | 
|---|
|  |  |  | self.set("parameter",{
 | 
|---|
|  |  |  | plateNum:plateNum
 | 
|---|
|  |  |  | bizTag:bizTag
 | 
|---|
|  |  |  | })
 | 
|---|
|  |  |  | }</ClientEvent> | 
|---|
|  |  |  | <Property name="maxFileSize">20MB</Property> | 
|---|
|  |  |  | 
|---|
|  |  |  | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 | 
|---|
|  |  |  | 
 | 
|---|
|  |  |  | var plateNum = data.get("plateNum");
 | 
|---|
|  |  |  | var bizTag = "FULL";
 | 
|---|
|  |  |  | self.set("parameter",{
 | 
|---|
|  |  |  | plateNum:plateNum,
 | 
|---|
|  |  |  | bizTag:"FULL_WEIGHT"
 | 
|---|
|  |  |  | bizTag: bizTag
 | 
|---|
|  |  |  | })</ClientEvent> | 
|---|
|  |  |  | <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据
 | 
|---|
|  |  |  | var mainData = view.get("#dsMain.data");
 | 
|---|
|  |  |  | 
|---|
|  |  |  | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 | 
|---|
|  |  |  | if(data){
 | 
|---|
|  |  |  | var plateNum = data.get("plateNum");
 | 
|---|
|  |  |  | var bizTag = "FULL";
 | 
|---|
|  |  |  | self.set("parameter",{
 | 
|---|
|  |  |  | plateNum:plateNum
 | 
|---|
|  |  |  | bizTag:bizTag
 | 
|---|
|  |  |  | })
 | 
|---|
|  |  |  | }</ClientEvent> | 
|---|
|  |  |  | <Property name="maxFileSize">20MB</Property> | 
|---|
|  |  |  | 
|---|
|  |  |  | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 | 
|---|
|  |  |  | 
 | 
|---|
|  |  |  | var plateNum = data.get("plateNum");
 | 
|---|
|  |  |  | var bizTag = "HANDLE";
 | 
|---|
|  |  |  | self.set("parameter",{
 | 
|---|
|  |  |  | plateNum:plateNum,
 | 
|---|
|  |  |  | bizTag:"HAND"
 | 
|---|
|  |  |  | bizTag: bizTag
 | 
|---|
|  |  |  | })</ClientEvent> | 
|---|
|  |  |  | <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据
 | 
|---|
|  |  |  | var mainData = view.get("#dsMain.data");
 | 
|---|
|  |  |  | 
|---|
|  |  |  | <ClientEvent name="beforeFileUploaded">var data = view.get("#dsMain.data:#")
 | 
|---|
|  |  |  | if(data){
 | 
|---|
|  |  |  | var plateNum = data.get("plateNum");
 | 
|---|
|  |  |  | var bizTag = "HANDLE";
 | 
|---|
|  |  |  | self.set("parameter",{
 | 
|---|
|  |  |  | plateNum:plateNum
 | 
|---|
|  |  |  | bizTag:bizTag
 | 
|---|
|  |  |  | })
 | 
|---|
|  |  |  | }</ClientEvent> | 
|---|
|  |  |  | <Property name="maxFileSize">20MB</Property> | 
|---|
|  |  |  | 
|---|
|  |  |  | <Property name="fileResolver">inoutDataPR#uploadImage</Property> | 
|---|
|  |  |  | <Filters/> | 
|---|
|  |  |  | </UploadAction> | 
|---|
|  |  |  | <AjaxAction id="ajaxDelFile"> | 
|---|
|  |  |  | <Property name="service">inoutDataPR#delImage</Property> | 
|---|
|  |  |  | <Property name="async">true</Property> | 
|---|
|  |  |  | <Property name="confirmMessage">确定要删除么?</Property> | 
|---|
|  |  |  | </AjaxAction> | 
|---|
|  |  |  | </View> | 
|---|
|  |  |  | </ViewConfig> | 
|---|