From a8296ef06369452e9151624b6ac4e7cb12a394e3 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 21 一月 2026 16:06:18 +0800
Subject: [PATCH] 导入数据模板下载

---
 fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml |  163 +++++++++++++++++++++++++++++++++---------------------
 1 files changed, 100 insertions(+), 63 deletions(-)

diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml b/fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml
index f7c8f17..17d2574 100644
--- a/fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml
@@ -418,7 +418,7 @@
     	var user = encodeURIComponent(select.get(&quot;userName&quot;));&#xD;
     	var plateNum = encodeURIComponent(select.get(&quot;plateNum&quot;));&#xD;
 	&#xD;
-    	view.get(&quot;#iFrameImg&quot;).set(&quot;path&quot;, &quot;./basic/inout/inout-img?id=&quot; + select.get(&quot;id&quot;)+&quot;&amp;plateNum=&quot;+plateNum+&quot;&amp;user=&quot;+user);&#xD;
+    	view.get(&quot;#iFrameImg&quot;).set(&quot;path&quot;, &quot;/basic/inout/inout-img?id=&quot; + select.get(&quot;id&quot;)+&quot;&amp;plateNum=&quot;+plateNum+&quot;&amp;user=&quot;+user);&#xD;
     	view.get(&quot;#dialogImg&quot;).show();&#xD;
 	}else{&#xD;
     	$notify(&quot;璇烽�夋嫨鏁版嵁鈥︹��&quot;);&#xD;
@@ -610,6 +610,22 @@
           <Property name="iconClass">fa fa-print</Property>
           <Property name="width">120</Property>
         </ToolBarButton>
+        <ToolBarButton>
+          <Property name="caption">瀵煎叆EXCEL</Property>
+          <Property name="exClassName">btn2</Property>
+          <Property name="iconClass">fa fa-file-excel-o</Property>
+          <Property name="action">uploadExcel</Property>
+          <Property name="width">120</Property>
+        </ToolBarButton>
+        <ToolBarButton>
+          <ClientEvent name="onClick">&#xD;
+var url = &quot;/export/download-inout-excel&quot;;&#xD;
+window.open(url);&#xD;</ClientEvent>
+          <Property name="caption">妯℃澘涓嬭浇</Property>
+          <Property name="exClassName">btn1</Property>
+          <Property name="iconClass">fa fa-cloud-download</Property>
+          <Property name="width">120</Property>
+        </ToolBarButton>
       </ToolBar>
       <DataGrid id="dataGridMain" layoutConstraint="padding:8">
         <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridMain&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
@@ -718,7 +734,7 @@
     <Dialog id="dialogMain" layout="regionPadding:8">
       <Property name="iconClass">fa fa-tasks</Property>
       <Property name="caption">鍗曟嵁淇℃伅</Property>
-      <Property name="width">70%</Property>
+      <Property name="width">80%</Property>
       <Property name="closeable">false</Property>
       <Property name="height">90%</Property>
       <Buttons>
@@ -756,7 +772,7 @@
           <Children>
             <AutoForm>
               <Property name="dataSet">dsMain</Property>
-              <Property name="cols">*,*,*</Property>
+              <Property name="cols">*,*,*,*</Property>
               <Property name="labelAlign">right</Property>
               <Property name="labelSeparator">锛�</Property>
               <Property name="labelWidth">100</Property>
@@ -770,7 +786,7 @@
                 <Property name="property">plateNum</Property>
                 <Editor/>
               </AutoFormElement>
-              <AutoFormElement>
+              <AutoFormElement layoutConstraint="colSpan:2">
                 <Property name="name">deptId</Property>
                 <Property name="property">deptId</Property>
                 <Property name="readOnly">true</Property>
@@ -780,6 +796,11 @@
                 <Property name="name">depotId</Property>
                 <Property name="property">depotId</Property>
                 <Property name="label">瑁呭嵏浠撳簱</Property>
+                <Editor/>
+              </AutoFormElement>
+              <AutoFormElement>
+                <Property name="name">foodVariety</Property>
+                <Property name="property">foodVariety</Property>
                 <Editor/>
               </AutoFormElement>
               <AutoFormElement>
@@ -793,29 +814,8 @@
                 <Editor/>
               </AutoFormElement>
               <AutoFormElement>
-                <Property name="name">foodVariety</Property>
-                <Property name="property">foodVariety</Property>
-                <Editor/>
-              </AutoFormElement>
-              <AutoFormElement>
-                <Property name="name">perWet</Property>
-                <Property name="property">perWet</Property>
-                <Editor/>
-              </AutoFormElement>
-              <AutoFormElement>
-                <Property name="name">userContact</Property>
-                <Property name="property">userContact</Property>
-                <Property name="label">鑱旂郴鐢佃瘽</Property>
-                <Editor/>
-              </AutoFormElement>
-              <AutoFormElement>
                 <Property name="name">foodLevel</Property>
                 <Property name="property">foodLevel</Property>
-                <Editor/>
-              </AutoFormElement>
-              <AutoFormElement>
-                <Property name="name">perImpurity</Property>
-                <Property name="property">perImpurity</Property>
                 <Editor/>
               </AutoFormElement>
               <AutoFormElement>
@@ -831,6 +831,12 @@
                 <Editor/>
               </AutoFormElement>
               <AutoFormElement>
+                <Property name="name">userContact</Property>
+                <Property name="property">userContact</Property>
+                <Property name="label">鑱旂郴鐢佃瘽</Property>
+                <Editor/>
+              </AutoFormElement>
+              <AutoFormElement>
                 <Property name="label">瀹㈡埛鍚嶇О</Property>
                 <Property name="property">customerName</Property>
                 <Property name="editable">false</Property>
@@ -842,6 +848,16 @@
                 <Property name="property">noticeId</Property>
                 <Editor/>
               </AutoFormElement>
+              <AutoFormElement>
+                <Property name="name">perWet</Property>
+                <Property name="property">perWet</Property>
+                <Editor/>
+              </AutoFormElement>
+              <AutoFormElement>
+                <Property name="name">perImpurity</Property>
+                <Property name="property">perImpurity</Property>
+                <Editor/>
+              </AutoFormElement>
             </AutoForm>
           </Children>
         </FieldSet>
@@ -851,76 +867,76 @@
           <Children>
             <AutoForm>
               <Property name="dataSet">dsMain</Property>
-              <Property name="cols">*,50,*,50,*,50</Property>
+              <Property name="cols">*,*,*,*</Property>
               <Property name="labelAlign">right</Property>
               <Property name="labelWidth">100</Property>
               <Property name="labelSeparator">锛�</Property>
-              <AutoFormElement layoutConstraint="colSpan:2">
-                <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
-                <Property name="name">fullWeight</Property>
-                <Property name="property">fullWeight</Property>
-                <Editor/>
-              </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
+              <AutoFormElement>
                 <Property name="name">fullWeightTime</Property>
                 <Property name="property">fullWeightTime</Property>
                 <Editor/>
               </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
+              <AutoFormElement>
                 <Property name="name">fullWeightUser</Property>
                 <Property name="property">fullWeightUser</Property>
                 <Property name="label">婊¤溅绉伴噸浜�</Property>
                 <Editor/>
               </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
+              <AutoFormElement>
                 <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
-                <Property name="name">emptyWeight</Property>
-                <Property name="property">emptyWeight</Property>
+                <Property name="name">fullWeight</Property>
+                <Property name="property">fullWeight</Property>
                 <Editor/>
               </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
-                <Property name="name">emptyWeightTime</Property>
-                <Property name="property">emptyWeightTime</Property>
-                <Editor/>
-              </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
-                <Property name="name">emptyWeightUser</Property>
-                <Property name="property">emptyWeightUser</Property>
-                <Property name="label">绌鸿溅绉伴噸浜�</Property>
-                <Editor/>
-              </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
-                <Property name="name">netWeight</Property>
-                <Property name="property">netWeight</Property>
-                <Property name="readOnly">true</Property>
-                <Editor/>
-              </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
+              <AutoFormElement>
                 <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                 <Property name="name">deOther</Property>
                 <Property name="property">deOther</Property>
                 <Editor/>
               </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
+              <AutoFormElement>
+                <Property name="name">emptyWeightTime</Property>
+                <Property name="property">emptyWeightTime</Property>
+                <Editor/>
+              </AutoFormElement>
+              <AutoFormElement>
+                <Property name="name">emptyWeightUser</Property>
+                <Property name="property">emptyWeightUser</Property>
+                <Property name="label">绌鸿溅绉伴噸浜�</Property>
+                <Editor/>
+              </AutoFormElement>
+              <AutoFormElement>
+                <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
+                <Property name="name">emptyWeight</Property>
+                <Property name="property">emptyWeight</Property>
+                <Editor/>
+              </AutoFormElement>
+              <AutoFormElement>
+                <Property name="name">netWeight</Property>
+                <Property name="property">netWeight</Property>
+                <Property name="readOnly">true</Property>
+                <Editor/>
+              </AutoFormElement>
+              <AutoFormElement>
                 <Property name="name">registerTime</Property>
                 <Property name="property">registerTime</Property>
                 <Editor/>
               </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
+              <AutoFormElement>
+                <Property name="name">completeTime</Property>
+                <Property name="property">completeTime</Property>
+                <Editor/>
+              </AutoFormElement>
+              <AutoFormElement>
                 <Property name="name">settleWeight</Property>
                 <Property name="property">settleWeight</Property>
                 <Property name="readOnly">true</Property>
                 <Editor/>
               </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
+              <AutoFormElement>
                 <Property name="name">recordWeight</Property>
                 <Property name="property">recordWeight</Property>
                 <Property name="readOnly">true</Property>
-                <Editor/>
-              </AutoFormElement>
-              <AutoFormElement layoutConstraint="colSpan:2">
-                <Property name="name">completeTime</Property>
-                <Property name="property">completeTime</Property>
                 <Editor/>
               </AutoFormElement>
             </AutoForm>
@@ -1176,5 +1192,26 @@
       </Container>
     </CustomDropDown>
     <YearDropDown id="yearDropDown"/>
+    <UploadAction id="uploadExcel">
+      <ClientEvent name="onFileUploaded">var fileName = arg.returnValue;&#xD;
+if(fileName){&#xD;
+    $notify(&quot;闄勪欢涓婁紶鎴愬姛锛屽紑濮嬫墽琛岃В鏋愨�︹��&quot;);&#xD;
+    view.get(&quot;#ajaxAnalysisExcel&quot;).set(&quot;parameter&quot;,fileName).execute(function(result){&#xD;
+        if(&quot;200&quot;!=result.code){
+            $alert(result.message);&#xD;
+        }else{
+            $alert(result.message);&#xD;
+            query();&#xD;
+        }
+    });&#xD;
+}</ClientEvent>
+      <Property name="fileResolver">fileUploadManage#uploadExcel</Property>
+      <Property name="maxFileSize">10MB</Property>
+      <Filters/>
+    </UploadAction>
+    <AjaxAction id="ajaxAnalysisExcel">
+      <Property name="service">inoutDataPR#analysisExcel</Property>
+      <Property name="executingMessage">姝e湪鎵ц瑙f瀽鈥︹��</Property>
+    </AjaxAction>
   </View>
 </ViewConfig>

--
Gitblit v1.9.3