From 69b106562e1649b04155bf16d7ce635c7cc80c2d Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期四, 12 十月 2023 11:21:17 +0800
Subject: [PATCH] 页面调整

---
 igds-inout/src/main/java/com/ld/igds/m/view/ContractManage.view.xml |  144 +++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 118 insertions(+), 26 deletions(-)

diff --git a/igds-inout/src/main/java/com/ld/igds/m/view/ContractManage.view.xml b/igds-inout/src/main/java/com/ld/igds/m/view/ContractManage.view.xml
index 65e756f..9285318 100644
--- a/igds-inout/src/main/java/com/ld/igds/m/view/ContractManage.view.xml
+++ b/igds-inout/src/main/java/com/ld/igds/m/view/ContractManage.view.xml
@@ -39,6 +39,9 @@
       </PropertyDef>
     </DataType>
     <DataType name="dtMain">
+      <ClientEvent name="onDataChange">if(arg.property ==&quot;customerId&quot;){&#xD;
+	autoByCustomer(arg.newValue);&#xD;
+}</ClientEvent>
       <Property name="creationType">com.ld.igds.models.InoutContract</Property>
       <PropertyDef name="id">
         <Property></Property>
@@ -107,6 +110,11 @@
       <PropertyDef name="customerBank">
         <Property></Property>
         <Property name="label">瀹㈡埛寮�鎴疯</Property>
+        <Property name="mapping">
+          <Property name="keyProperty">code</Property>
+          <Property name="valueProperty">name</Property>
+          <Property name="mapValues">${dorado.getDataProvider(&quot;dicTriggerPR#dicTrigger&quot;).getResult(&quot;KHKHH&quot;)}</Property>
+        </Property>
       </PropertyDef>
       <PropertyDef name="customerBankAccount">
         <Property></Property>
@@ -119,10 +127,17 @@
       <PropertyDef name="bank">
         <Property></Property>
         <Property name="label">鏈柟寮�鎴疯</Property>
+        <Property name="mapping">
+          <Property name="keyProperty">code</Property>
+          <Property name="valueProperty">name</Property>
+          <Property name="mapValues">${dorado.getDataProvider(&quot;dicTriggerPR#dicTrigger&quot;).getResult(&quot;KHKHH&quot;)}</Property>
+        </Property>
+        <Property name="required">true</Property>
       </PropertyDef>
       <PropertyDef name="bankAccount">
         <Property></Property>
         <Property name="label">鏈柟寮�鎴疯璐﹀彿</Property>
+        <Property name="required">true</Property>
       </PropertyDef>
       <PropertyDef name="signUser">
         <Property></Property>
@@ -245,22 +260,32 @@
       <PropertyDef name="lybzj">
         <Property name="dataType">Double</Property>
         <Property name="label">灞ョ害淇濊瘉閲�</Property>
+        <Property name="displayFormat">#,###0.00 鍏�</Property>
       </PropertyDef>
       <PropertyDef name="lyl">
         <Property name="dataType">Double</Property>
         <Property name="label">灞ョ害鐜�</Property>
+        <Property name="displayFormat"> ##.00%</Property>
       </PropertyDef>
       <PropertyDef name="jsjg">
         <Property name="dataType">Double</Property>
-        <Property name="label">缁撶畻浠锋牸锛屽厓/鍚�</Property>
+        <Property name="label">缁撶畻浠锋牸</Property>
+        <Property name="displayFormat">#,###0.000 鍏�/鍚�</Property>
       </PropertyDef>
       <PropertyDef name="jszje">
         <Property name="dataType">Double</Property>
         <Property name="label">缁撶畻鎬婚噾棰�</Property>
+        <Property name="readOnly">true</Property>
+        <Property name="displayFormat">#,###0.00 鍏�</Property>
       </PropertyDef>
       <PropertyDef name="jsyhtyzx">
         <Property></Property>
         <Property name="label">缁撶畻涓庡悎鍚屼竴鑷存��</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;contractManagePR#triggerConsistency&quot;).getResult()}</Property>
+          <Property name="keyProperty">code</Property>
+          <Property name="valueProperty">name</Property>
+        </Property>
       </PropertyDef>
       <PropertyDef name="jsyhtbyzyy">
         <Property></Property>
@@ -273,18 +298,16 @@
       <PropertyDef name="auditDate">
         <Property></Property>
         <Property name="label">瀹℃壒鏃堕棿</Property>
+        <Property name="dataType">Date</Property>
       </PropertyDef>
       <PropertyDef name="auditStatus">
         <Property></Property>
         <Property name="label">瀹℃壒鐘舵��</Property>
       </PropertyDef>
-      <PropertyDef name="wcrq">
-        <Property name="dataType">Date</Property>
-        <Property name="label">瀹屾垚鏃堕棿</Property>
-      </PropertyDef>
       <PropertyDef name="updateTime">
         <Property name="dataType">Date</Property>
         <Property name="label">鏇存柊鏃堕棿</Property>
+        <Property name="readOnly">true</Property>
       </PropertyDef>
       <PropertyDef name="hqzz">
         <Property></Property>
@@ -361,7 +384,18 @@
   </Model>
   <View layout="regionPadding:10">
     <ClientEvent name="onReady">var deptId = window.parent.deptId;//鐖堕〉闈腑鐨勫垎搴撶紪鐮�&#xD;
-&#xD;
+//鏍规嵁瀹㈡埛鑷姩鍥炲~瀹㈡埛绫诲瀷锛屽鎴峰紑鎴疯锛屽鎴峰紑鎴疯璐﹀彿锛屽鎴风绾︿汉&#xD;
+autoByCustomer = function(id){&#xD;
+   view.get(&quot;#ajaxGetCustomer&quot;).set(&quot;parameter&quot;,id).execute(function(result){&#xD;
+     if(result){&#xD;
+     var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+     data.set(&quot;customerType&quot;,result.khlx);&#xD;
+	 data.set(&quot;customerBank&quot;,result.bank);&#xD;
+     data.set(&quot;customerBankAccount&quot;,result.bankNum);&#xD;
+     data.set(&quot;customerSignUser&quot;,result.fddbr);&#xD;
+	}&#xD;
+});&#xD;
+};&#xD;
 addMain = function(){&#xD;
 	view.get(&quot;#dsMain&quot;).insert({});&#xD;
 	view.get(&quot;#dialogMain&quot;).show();&#xD;
@@ -370,16 +404,22 @@
     <ClientEvent name="onCreate">//鑷姩璁$畻&#xD;
 countMoney = function(){&#xD;
 	var curData = view.get(&quot;#dsMain.data:#&quot;);&#xD;
-	&#xD;
 	var price = curData.get(&quot;price&quot;);&#xD;
-	&#xD;
 	var contactAmount = curData.get(&quot;contactAmount&quot;);&#xD;
-	&#xD;
 	if(price &amp;&amp; contactAmount){&#xD;
-		&#xD;
 		//璁$畻鍊掑叆鏁伴噺&#xD;
-		var money = price*contactAmount;&#xD;
+		var money = price*contactAmount/1000;&#xD;
     	curData.set(&quot;money&quot;,money); &#xD;
+	}&#xD;
+};&#xD;
+countSettleMoney = function(){&#xD;
+	var curData = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+	var price = curData.get(&quot;jsjg&quot;);&#xD;
+	var completeNum = curData.get(&quot;completeNum&quot;);&#xD;
+	if(price &amp;&amp; completeNum){&#xD;
+		//璁$畻鍊掑叆鏁伴噺&#xD;
+		var money = price*completeNum/1000;&#xD;
+    	curData.set(&quot;jszje&quot;,money); &#xD;
 	}&#xD;
 };</ClientEvent>
     <Property name="packages">font-awesome,css-common</Property>
@@ -408,6 +448,8 @@
         <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
 if(data){&#xD;
 	view.get(&quot;#dialogMain&quot;).show();&#xD;
+}else{&#xD;
+	$alert(&quot;璇峰嬀閫夐渶瑕佷慨鏀圭殑鏁版嵁锛�&quot;);&#xD;
 }</ClientEvent>
         <Property name="caption">淇敼</Property>
         <Property name="iconClass">fa fa-pencil</Property>
@@ -637,16 +679,6 @@
                     <Editor/>
                   </AutoFormElement>
                   <AutoFormElement>
-                    <Property name="name">completeNum</Property>
-                    <Property name="property">completeNum</Property>
-                    <Editor/>
-                  </AutoFormElement>
-                  <AutoFormElement>
-                    <Property name="name">payType</Property>
-                    <Property name="property">payType</Property>
-                    <Editor/>
-                  </AutoFormElement>
-                  <AutoFormElement>
                     <Property name="name">beginTime</Property>
                     <Property name="property">beginTime</Property>
                     <Editor/>
@@ -665,6 +697,68 @@
                     <Property name="name">planName</Property>
                     <Property name="property">planName</Property>
                     <Property name="trigger">ddPlan</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <Property name="name">auditUser</Property>
+                    <Property name="property">auditUser</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <Property name="name">auditDate</Property>
+                    <Property name="property">auditDate</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <Property name="name">payType</Property>
+                    <Property name="property">payType</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <Property name="name">lybzj</Property>
+                    <Property name="property">lybzj</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <Property name="name">relEndTime</Property>
+                    <Property name="property">relEndTime</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <ClientEvent name="onBlur">countSettleMoney();</ClientEvent>
+                    <Property name="name">completeNum</Property>
+                    <Property name="property">completeNum</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <ClientEvent name="onBlur">countSettleMoney();</ClientEvent>
+                    <Property name="name">jsjg</Property>
+                    <Property name="property">jsjg</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <Property name="name">jszje</Property>
+                    <Property name="property">jszje</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <Property name="name">lyl</Property>
+                    <Property name="property">lyl</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <Property name="name">jsyhtyzx</Property>
+                    <Property name="property">jsyhtyzx</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement>
+                    <Property name="name">updateTime</Property>
+                    <Property name="property">updateTime</Property>
+                    <Editor/>
+                  </AutoFormElement>
+                  <AutoFormElement layoutConstraint="colSpan:3">
+                    <Property name="name">jsyhtbyzyy</Property>
+                    <Property name="property">jsyhtbyzyy</Property>
                     <Editor/>
                   </AutoFormElement>
                 </AutoForm>
@@ -731,11 +825,6 @@
                     <Property name="property">signAddress</Property>
                     <Editor/>
                   </AutoFormElement>
-                  <AutoFormElement layoutConstraint="colSpan:3">
-                    <Property name="name">remark</Property>
-                    <Property name="property">remark</Property>
-                    <Editor/>
-                  </AutoFormElement>
                 </AutoForm>
               </Children>
             </FieldSet>
@@ -755,6 +844,9 @@
       <Property name="confirmMessage">纭畾瑕佸垹闄ゅ悧锛�</Property>
       <Property name="service">contractManagePR#delContract</Property>
     </AjaxAction>
+    <AjaxAction id="ajaxGetCustomer">
+      <Property name="service">inoutCustomerPR#queryListByParam</Property>
+    </AjaxAction>
     <CustomDropDown id="ddCustomer">
       <Property name="minHeight">400</Property>
       <Property name="assignmentMap">customerId=id,customerName=name</Property>

--
Gitblit v1.9.3