From cfda6a07227caa1a9dfe2e403fbe4345b239a4e6 Mon Sep 17 00:00:00 2001
From: jiazx0107 <jiazx0107@163.com>
Date: 星期五, 19 十二月 2025 18:40:43 +0800
Subject: [PATCH] 提交工单管理功能2

---
 fzzy-igdss-view/src/main/java/com/fzzy/work/WorkOrder.view.xml |  304 ++++++++++++++++++++++++++++++++++----------------
 1 files changed, 208 insertions(+), 96 deletions(-)

diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/work/WorkOrder.view.xml b/fzzy-igdss-view/src/main/java/com/fzzy/work/WorkOrder.view.xml
index 1e6c185..b5325a6 100644
--- a/fzzy-igdss-view/src/main/java/com/fzzy/work/WorkOrder.view.xml
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/work/WorkOrder.view.xml
@@ -28,6 +28,11 @@
       <PropertyDef name="status">
         <Property></Property>
         <Property name="label">宸ュ崟鐘舵��</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;workOrderPR#triggerStatus&quot;).getResult()}</Property>
+          <Property name="valueProperty">dictLabel</Property>
+          <Property name="keyProperty">dictValue</Property>
+        </Property>
       </PropertyDef>
       <PropertyDef name="assigneeId">
         <Property></Property>
@@ -61,6 +66,13 @@
         <Property></Property>
         <Property name="label">澶囨敞璇存槑</Property>
       </PropertyDef>
+      <PropertyDef name="companyId">
+        <Property/>
+      </PropertyDef>
+      <PropertyDef name="deptId">
+        <Property/>
+        <Property name="label">鎵�灞炲簱鍖�</Property>
+      </PropertyDef>
     </DataType>
     <DataType name="dtParam">
       <Property name="creationType">com.fzzy.work.data.WorkOrderParam</Property>
@@ -90,31 +102,42 @@
     </DataType>
   </Model>
   <View layout="padding:10">
-    <ClientEvent name="onReady">query = function(){&#xD;
-    view.get(&quot;#dsQuery&quot;).flushAsync();&#xD;
-};&#xD;
-query();&#xD;
-&#xD;
+    <ClientEvent name="onReady">query= function(){&#xD;
+	var param = view.get(&quot;#dsQuery.data&quot;);&#xD;
+	var tabIndex = view.get(&quot;#tabMain.currentIndex&quot;);&#xD;
+	if(0 == tabIndex){&#xD;
+		view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param).flushAsync();&#xD;
+	}else{&#xD;
+		view.get(&quot;#dsMain2&quot;).set(&quot;parameter&quot;,param).flushAsync();&#xD;
+	}&#xD;
+}&#xD;
       &#xD;
 //瀹d紶鎿嶄綔&#xD;
 renderCell1 = function(arg,self){&#xD;
    var data = arg.data;&#xD;
-   var htm = &quot;&lt;a onClick='audit()' class='a-btn1'>瀹℃壒&lt;/a>&amp;nbsp;|&amp;nbsp;&lt;a onClick='showDetail()' class='a-btn2'>璇︾粏&lt;/a>&quot;;&#xD;
+   var htm = &quot;&lt;a onClick='audit()' class='a-btn1'>鎸囨淳&lt;/a>&amp;nbsp;|&amp;nbsp;&lt;a onClick='showDetail()' class='a-btn2'>璇︾粏&lt;/a>&quot;;&#xD;
    arg.dom.innerHTML = htm;&#xD;
 };&#xD;
 &#xD;
 renderStatus = function(arg){&#xD;
-	var txt = arg.data.getText(&quot;auditStatus&quot;);&#xD;
-	if(!txt) return true;&#xD;
-	var htm = &quot;&lt;span class='s2'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
-	if(txt.includes(&quot;閫�鍥�&quot;)){&#xD;
+	var val = arg.data.get(&quot;status&quot;);&#xD;
+	var txt = arg.data.getText(&quot;status&quot;);&#xD;
+	if(!val) return true;&#xD;
+	var htm = &quot;&lt;span class='s1'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
+	if(val==&quot;20&quot;){//宸叉淳鍗�&#xD;
+		htm = &quot;&lt;span class='s2'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
+	}&#xD;
+	if(val==&quot;30&quot;){//澶勭悊涓�&#xD;
+		htm = &quot;&lt;span class='s4'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
+	}&#xD;
+	if(val==&quot;40&quot;){//宸茶В鍐�&#xD;
 		htm = &quot;&lt;span class='s3'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
 	}&#xD;
-	if(txt.includes(&quot;鎷掔粷&quot;)){&#xD;
+	if(val==&quot;50&quot;){//宸插叧闂�&#xD;
 		htm = &quot;&lt;span class='s3'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
 	}&#xD;
-	if(txt.includes(&quot;閫氳繃&quot;)){&#xD;
-		htm = &quot;&lt;span class='s1'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
+	if(val==&quot;60&quot;){//鎸傝捣&#xD;
+		htm = &quot;&lt;span class='s3'>&quot;+txt+&quot;&lt;/span>&quot;;&#xD;
 	}&#xD;
     arg.dom.innerHTML = htm;&#xD;
 }&#xD;
@@ -129,20 +152,28 @@
 }</ClientEvent>
     <Property name="packages">font-awesome,css-common</Property>
     <DataSet id="dsMain">
+      <ClientEvent name="onLoadData">$notify(&quot;鏁版嵁鍔犺浇瀹屾垚鈥︹��&quot;);</ClientEvent>
       <Property name="dataType">[dtMain]</Property>
       <Property name="dataProvider">workOrderPR#pageQuery</Property>
-      <Property name="pageSize">15</Property>
+      <Property name="pageSize">10</Property>
+      <Property name="loadMode">lazy</Property>
+    </DataSet>
+    <DataSet id="dsMain2">
+      <ClientEvent name="onLoadData">$notify(&quot;鏁版嵁鍔犺浇瀹屾垚鈥︹��&quot;);&#xD;
+</ClientEvent>
+      <Property name="dataType">[dtMain]</Property>
+      <Property name="dataProvider">workOrderPR#pageQuery2</Property>
+      <Property name="pageSize">10</Property>
       <Property name="loadMode">lazy</Property>
     </DataSet>
     <DataSet id="dsQuery">
-      <ClientEvent name="onReady">self.insert({});&#xD;
-</ClientEvent>
-      <Property name="dataType">[dtParam]</Property>
+      <ClientEvent name="onReady">self.insert({});</ClientEvent>
+      <Property name="dataType">dtParam</Property>
     </DataSet>
     <Container>
       <Property name="className">c-param</Property>
       <AutoForm>
-        <Property name="cols">*,*,*,*</Property>
+        <Property name="cols">*,*,*,*,90,90</Property>
         <Property name="dataSet">dsQuery</Property>
         <Property name="labelAlign">right</Property>
         <Property name="labelWidth">100</Property>
@@ -157,11 +188,6 @@
           <Editor/>
         </AutoFormElement>
         <AutoFormElement>
-          <Property name="name">status</Property>
-          <Property name="property">status</Property>
-          <Editor/>
-        </AutoFormElement>
-        <AutoFormElement>
           <Property name="name">start</Property>
           <Property name="property">start</Property>
           <Editor/>
@@ -172,18 +198,13 @@
           <Editor/>
         </AutoFormElement>
         <Button>
-          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
-            if(data){&#xD;
-            view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data).flushAsync();&#xD;
-            }else{&#xD;
-            view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
-            }</ClientEvent>
+          <ClientEvent name="onClick">query();</ClientEvent>
           <Property name="caption">鎼滅储</Property>
           <Property name="iconClass">fa fa-search</Property>
           <Property name="exClassName">btn-q1</Property>
         </Button>
         <Button>
-          <ClientEvent name="onClick">view.get(&quot;#dsQuery&quot;).flushAsync();</ClientEvent>
+          <ClientEvent name="onClick">view.get(&quot;#dsQuery&quot;).set(&quot;data&quot;,{});</ClientEvent>
           <Property name="caption">閲嶇疆</Property>
           <Property name="exClassName">btn-q2</Property>
           <Property name="iconClass">fa fa-refresh</Property>
@@ -192,73 +213,164 @@
     </Container>
     <Container>
       <Property name="className">c-data</Property>
-      <ToolBar>
-        <ToolBarButton layoutConstraint="left">
-          <Property name="caption">瀵煎嚭EXCEL</Property>
-          <Property name="exClassName">btn4</Property>
-          <Property name="iconClass">fa fa-file-excel-o</Property>
-        </ToolBarButton>
-      </ToolBar>
-      <DataGrid id="dataGridMain" layoutConstraint="padding:8">
-        <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridMain&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
-        <Property name="dataSet">dsMain</Property>
-        <Property name="readOnly">true</Property>
-        <Property name="selectionMode">singleRow</Property>
-        <Property name="readOnly">true</Property>
-        <RowSelectorColumn/>
-        <RowNumColumn>
-          <Property name="width">50</Property>
-          <Property name="caption">搴忓彿</Property>
-        </RowNumColumn>
-        <DataColumn name="id">
-          <Property name="property">id</Property>
-        </DataColumn>
-        <DataColumn name="title">
-          <Property name="property">title</Property>
-        </DataColumn>
-        <DataColumn name="description">
-          <Property name="property">description</Property>
-        </DataColumn>
-        <DataColumn name="bizType">
-          <Property name="property">bizType</Property>
-        </DataColumn>
-        <DataColumn name="category">
-          <Property name="property">category</Property>
-        </DataColumn>
-        <DataColumn name="assigneeName">
-          <Property name="property">assigneeName</Property>
-        </DataColumn>
-        <DataColumn name="receiveTime">
-          <Property name="property">receiveTime</Property>
-        </DataColumn>
-        <DataColumn name="createUserName">
-          <Property name="property">createUserName</Property>
-        </DataColumn>
-        <DataColumn name="createTime">
-          <Property name="property">createTime</Property>
-        </DataColumn>
-        <DataColumn>
-          <ClientEvent name="onRenderCell">renderStatus(arg);</ClientEvent>
-          <Property name="property">status</Property>
-          <Property name="width">120</Property>
-          <Property name="align">center</Property>
-          <Property name="name">status</Property>
-        </DataColumn>
-        <DataColumn>
-          <ClientEvent name="onRenderCell">renderCell1(arg,self);</ClientEvent>
-          <Property name="caption">鎿嶄綔</Property>
+      <TabControl id="tabMain">
+        <ControlTab>
+          <Property name="caption">鍏ㄩ儴</Property>
+          <Property name="iconClass">fa fa-th-large</Property>
           <Property name="width">150</Property>
-          <Property name="align">center</Property>
-          <Editor/>
-        </DataColumn>
-      </DataGrid>
-      <ToolBar layoutConstraint="bottom">
-        <Fill/>
-        <DataPilot layoutConstraint="right">
-          <Property name="itemCodes">pageSize,pages</Property>
-          <Property name="dataSet">dsMain</Property>
-        </DataPilot>
-      </ToolBar>
+          <Container>
+            <DataGrid layoutConstraint="padding:8">
+              <ClientEvent name="onDataRowClick">self.set(&quot;selection&quot;,arg.data);</ClientEvent>
+              <Property name="dataSet">dsMain</Property>
+              <Property name="readOnly">true</Property>
+              <Property name="selectionMode">singleRow</Property>
+              <Property name="readOnly">true</Property>
+              <Property name="fixedColumnCount">3</Property>
+              <RowSelectorColumn/>
+              <RowNumColumn>
+                <Property name="width">50</Property>
+                <Property name="caption">搴忓彿</Property>
+              </RowNumColumn>
+              <DataColumn>
+                <ClientEvent name="onRenderCell">renderCell1(arg,self);</ClientEvent>
+                <Property name="caption">鎿嶄綔</Property>
+                <Property name="width">150</Property>
+                <Property name="align">center</Property>
+                <Editor/>
+              </DataColumn>
+              <DataColumn name="id">
+                <Property name="property">id</Property>
+                <Property name="width">180</Property>
+              </DataColumn>
+              <DataColumn name="deptId">
+                <Property name="property">deptId</Property>
+                <Property name="width">250</Property>
+              </DataColumn>
+              <DataColumn name="title">
+                <Property name="property">title</Property>
+                <Property name="width">300</Property>
+              </DataColumn>
+              <DataColumn>
+                <ClientEvent name="onRenderCell">renderStatus(arg);</ClientEvent>
+                <Property name="property">status</Property>
+                <Property name="width">120</Property>
+                <Property name="align">center</Property>
+                <Property name="name">status</Property>
+              </DataColumn>
+              <DataColumn name="bizType">
+                <Property name="property">bizType</Property>
+                <Property name="width">120</Property>
+                <Property name="align">center</Property>
+              </DataColumn>
+              <DataColumn name="assigneeName">
+                <Property name="property">assigneeName</Property>
+                <Property name="align">center</Property>
+                <Property name="width">150</Property>
+              </DataColumn>
+              <DataColumn name="receiveTime">
+                <Property name="property">receiveTime</Property>
+                <Property name="width">150</Property>
+                <Property name="align">center</Property>
+              </DataColumn>
+              <DataColumn name="createUserName">
+                <Property name="property">createUserName</Property>
+                <Property name="align">center</Property>
+                <Property name="width">150</Property>
+              </DataColumn>
+              <DataColumn name="createTime">
+                <Property name="property">createTime</Property>
+                <Property name="align">center</Property>
+                <Property name="width">150</Property>
+              </DataColumn>
+            </DataGrid>
+            <ToolBar layoutConstraint="bottom">
+              <Fill/>
+              <DataPilot layoutConstraint="right">
+                <Property name="itemCodes">pageSize,pages</Property>
+                <Property name="dataSet">dsMain</Property>
+              </DataPilot>
+            </ToolBar>
+          </Container>
+        </ControlTab>
+        <ControlTab>
+          <Property name="caption">宸茬粨鏉�</Property>
+          <Property name="iconClass">fa fa-history</Property>
+          <Property name="width">150</Property>
+          <Container>
+            <DataGrid layoutConstraint="padding:8">
+              <ClientEvent name="onDataRowClick">self.set(&quot;selection&quot;,arg.data);</ClientEvent>
+              <Property name="dataSet">dsMain2</Property>
+              <Property name="readOnly">true</Property>
+              <Property name="selectionMode">singleRow</Property>
+              <Property name="readOnly">true</Property>
+              <Property name="fixedColumnCount">3</Property>
+              <RowSelectorColumn/>
+              <RowNumColumn>
+                <Property name="width">50</Property>
+                <Property name="caption">搴忓彿</Property>
+              </RowNumColumn>
+              <DataColumn>
+                <ClientEvent name="onRenderCell">renderCell1(arg,self);</ClientEvent>
+                <Property name="caption">鎿嶄綔</Property>
+                <Property name="width">150</Property>
+                <Property name="align">center</Property>
+                <Editor/>
+              </DataColumn>
+              <DataColumn name="id">
+                <Property name="property">id</Property>
+                <Property name="width">180</Property>
+              </DataColumn>
+              <DataColumn name="deptId">
+                <Property name="property">deptId</Property>
+                <Property name="width">250</Property>
+              </DataColumn>
+              <DataColumn name="title">
+                <Property name="property">title</Property>
+                <Property name="width">300</Property>
+              </DataColumn>
+              <DataColumn>
+                <ClientEvent name="onRenderCell">renderStatus(arg);</ClientEvent>
+                <Property name="property">status</Property>
+                <Property name="width">120</Property>
+                <Property name="align">center</Property>
+                <Property name="name">status</Property>
+              </DataColumn>
+              <DataColumn name="bizType">
+                <Property name="property">bizType</Property>
+                <Property name="width">120</Property>
+                <Property name="align">center</Property>
+              </DataColumn>
+              <DataColumn name="assigneeName">
+                <Property name="property">assigneeName</Property>
+                <Property name="align">center</Property>
+                <Property name="width">150</Property>
+              </DataColumn>
+              <DataColumn name="receiveTime">
+                <Property name="property">receiveTime</Property>
+                <Property name="width">150</Property>
+                <Property name="align">center</Property>
+              </DataColumn>
+              <DataColumn name="createUserName">
+                <Property name="property">createUserName</Property>
+                <Property name="align">center</Property>
+                <Property name="width">150</Property>
+              </DataColumn>
+              <DataColumn name="createTime">
+                <Property name="property">createTime</Property>
+                <Property name="align">center</Property>
+                <Property name="width">150</Property>
+              </DataColumn>
+            </DataGrid>
+            <ToolBar layoutConstraint="bottom">
+              <Fill/>
+              <DataPilot layoutConstraint="right">
+                <Property name="itemCodes">pageSize,pages</Property>
+                <Property name="dataSet">dsMain2</Property>
+              </DataPilot>
+            </ToolBar>
+          </Container>
+        </ControlTab>
+      </TabControl>
     </Container>
     <Dialog id="dialogMain" layout="regionPadding:8">
       <Property name="closeable">false</Property>

--
Gitblit v1.9.3