From 21bf8b454eee7e80d9471e4424e7520c4f82f3a7 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期二, 25 七月 2023 11:55:14 +0800
Subject: [PATCH] 通知单及合同相关优化

---
 igds-inout/src/main/java/com/ld/igds/m/view/ContractManage.view.xml |  101 ++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 73 insertions(+), 28 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 ca7db91..57fc926 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
@@ -29,8 +29,19 @@
         <Property></Property>
         <Property name="label">瀹㈡埛鍚嶇О</Property>
       </PropertyDef>
+      <PropertyDef name="type">
+        <Property name="label">鍚堝悓绫诲瀷</Property>
+        <Property name="mapping">
+          <Property name="keyProperty">code</Property>
+          <Property name="valueProperty">name</Property>
+          <Property name="mapValues">${dorado.getDataProvider(&quot;contractManagePR#triggerContractType&quot;).getResult()}</Property>
+        </Property>
+      </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>
@@ -99,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>
@@ -111,6 +127,11 @@
       <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>
       </PropertyDef>
       <PropertyDef name="bankAccount">
         <Property></Property>
@@ -127,7 +148,7 @@
       <PropertyDef name="price">
         <Property name="dataType">Double</Property>
         <Property name="label">鍗曚环</Property>
-        <Property name="displayFormat">#,###0.000 鍏�/鍏枻</Property>
+        <Property name="displayFormat">#,###0.000 鍏�/鍚�</Property>
         <Property name="required">true</Property>
       </PropertyDef>
       <PropertyDef name="money">
@@ -135,6 +156,7 @@
         <Property name="label">鎬婚噾棰�</Property>
         <Property name="displayFormat">#,###0.00 鍏�</Property>
         <Property name="required">true</Property>
+        <Property name="readOnly">true</Property>
       </PropertyDef>
       <PropertyDef name="contactAmount">
         <Property name="dataType">Double</Property>
@@ -202,31 +224,31 @@
         <Property name="label">澶囨敞璇存槑</Property>
       </PropertyDef>
       <PropertyDef name="fddbr">
-        <Property/>
+        <Property></Property>
         <Property name="label">娉曞畾浠h〃浜�</Property>
       </PropertyDef>
       <PropertyDef name="txdz">
-        <Property/>
+        <Property></Property>
         <Property name="label">閫氳鍦板潃</Property>
       </PropertyDef>
       <PropertyDef name="yzbm">
-        <Property/>
+        <Property></Property>
         <Property name="label">閭斂缂栫爜</Property>
       </PropertyDef>
       <PropertyDef name="lxrxm">
-        <Property/>
+        <Property></Property>
         <Property name="label">鑱旂郴浜哄鍚�</Property>
       </PropertyDef>
       <PropertyDef name="lxrdh">
-        <Property/>
+        <Property></Property>
         <Property name="label">鑱旂郴鐢佃瘽</Property>
       </PropertyDef>
       <PropertyDef name="sfzh">
-        <Property/>
+        <Property></Property>
         <Property name="label">韬唤璇佸彿</Property>
       </PropertyDef>
       <PropertyDef name="dzyx">
-        <Property/>
+        <Property></Property>
         <Property name="label">鐢靛瓙淇$</Property>
       </PropertyDef>
       <PropertyDef name="relEndTime">
@@ -250,23 +272,23 @@
         <Property name="label">缁撶畻鎬婚噾棰�</Property>
       </PropertyDef>
       <PropertyDef name="jsyhtyzx">
-        <Property/>
+        <Property></Property>
         <Property name="label">缁撶畻涓庡悎鍚屼竴鑷存��</Property>
       </PropertyDef>
       <PropertyDef name="jsyhtbyzyy">
-        <Property/>
+        <Property></Property>
         <Property name="label">涓嶄竴鑷村師鍥�</Property>
       </PropertyDef>
       <PropertyDef name="auditUser">
-        <Property/>
+        <Property></Property>
         <Property name="label">瀹℃壒浜�</Property>
       </PropertyDef>
       <PropertyDef name="auditDate">
-        <Property/>
+        <Property></Property>
         <Property name="label">瀹℃壒鏃堕棿</Property>
       </PropertyDef>
       <PropertyDef name="auditStatus">
-        <Property/>
+        <Property></Property>
         <Property name="label">瀹℃壒鐘舵��</Property>
       </PropertyDef>
       <PropertyDef name="wcrq">
@@ -278,7 +300,7 @@
         <Property name="label">鏇存柊鏃堕棿</Property>
       </PropertyDef>
       <PropertyDef name="hqzz">
-        <Property/>
+        <Property></Property>
         <Property name="label">璐ф潈缁勭粐</Property>
         <Property name="mapping">
           <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
@@ -352,7 +374,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;
@@ -369,7 +402,7 @@
 	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;
 };</ClientEvent>
@@ -378,11 +411,6 @@
       <Property name="dataType">[dtMain]</Property>
       <Property name="dataProvider">contractManagePR#pageContract</Property>
       <Property name="pageSize">15</Property>
-      <Property name="parameter">
-        <Entity>
-          <Property name="type">1</Property>
-        </Entity>
-      </Property>
     </DataSet>
     <DataSet id="dsParam">
       <Property name="dataType">dtParam</Property>
@@ -436,6 +464,11 @@
         <Property name="labelSeparator">锛�</Property>
         <Property name="labelWidth">100</Property>
         <AutoFormElement>
+          <Property name="property">type</Property>
+          <Property name="name">type</Property>
+          <Editor/>
+        </AutoFormElement>
+        <AutoFormElement>
           <Property name="name">year</Property>
           <Property name="property">year</Property>
           <Property name="trigger">defaultYearDropDown</Property>
@@ -452,6 +485,9 @@
           <Editor/>
         </AutoFormElement>
         <Container layout="regionPadding:15">
+          <Label layoutConstraint="left">
+            <Property name="text">鎿嶄綔鎸夐敭锛�</Property>
+          </Label>
           <Button layoutConstraint="left">
             <ClientEvent name="onClick">var param = view.get(&quot;#dsParam.data&quot;);&#xD;
 view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param.toJSON()).flushAsync();</ClientEvent>
@@ -460,8 +496,8 @@
             <Property name="iconClass">fa fa-refresh</Property>
           </Button>
           <Button>
-            <ClientEvent name="onClick">view.get(&quot;#dsParam&quot;).setData({type:'1'});&#xD;
-view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,{type:'1'}).flushAsync();</ClientEvent>
+            <ClientEvent name="onClick">view.get(&quot;#dsParam&quot;).setData({});&#xD;
+view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,{}).flushAsync();</ClientEvent>
             <Property name="exClassName">btn-warn</Property>
             <Property name="iconClass">fa fa-refresh</Property>
             <Property name="caption">閲嶇疆</Property>
@@ -478,31 +514,42 @@
         <RowNumColumn/>
         <DataColumn name="name">
           <Property name="property">name</Property>
+          <Property name="align">center</Property>
+          <Property name="width">340</Property>
         </DataColumn>
         <DataColumn name="type">
           <Property name="property">type</Property>
+          <Property name="align">center</Property>
         </DataColumn>
         <DataColumn name="year">
           <Property name="property">year</Property>
+          <Property name="align">center</Property>
         </DataColumn>
         <DataColumn name="customerName">
           <Property name="property">customerName</Property>
+          <Property name="align">center</Property>
+          <Property name="width">300</Property>
         </DataColumn>
         <DataColumn name="money">
           <Property name="property">money</Property>
+          <Property name="align">center</Property>
         </DataColumn>
         <DataColumn name="contactAmount">
           <Property name="property">contactAmount</Property>
+          <Property name="align">center</Property>
         </DataColumn>
         <DataColumn>
           <Property name="property">foodVariety</Property>
           <Property name="name">foodVariety</Property>
+          <Property name="align">center</Property>
         </DataColumn>
         <DataColumn name="createUser">
           <Property name="property">createUser</Property>
+          <Property name="align">center</Property>
         </DataColumn>
         <DataColumn name="createTime">
           <Property name="property">createTime</Property>
+          <Property name="align">center</Property>
         </DataColumn>
       </DataGrid>
     </Container>
@@ -708,11 +755,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>
@@ -732,6 +774,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