From b1798fdc3ef26d88e53c1578a242011db2b6c7cf Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期一, 29 十二月 2025 18:10:48 +0800
Subject: [PATCH] 合同增加仓库字段,关联公司、库区联动下拉

---
 fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java            |    9 ++
 fzzy-igdss-view/src/main/java/models/core.model.xml                 |  129 ++++++++++++++++++++++++++++++++
 fzzy-igdss-view/src/main/java/com/fzzy/igds/PledgeContract.view.xml |   77 ++++++++++++++++++-
 fzzy-igdss-web/src/main/resources/lib/dorado-skin-ruoyi-1.0.10.jar  |    0 
 4 files changed, 209 insertions(+), 6 deletions(-)

diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java b/fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java
index 4206348..5466970 100644
--- a/fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java
@@ -92,6 +92,15 @@
     }
 
     /**
+     * depotPR#getDataByCompanyId
+     * @return
+     */
+    @DataProvider
+    public List<Depot> getDataByCompanyId(){
+        return depotService.getData(null, null ,false);
+    }
+
+    /**
      * depotPR#getDepot 鑾峰彇浠撳簱淇℃伅
      *
      * @param depotId
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/PledgeContract.view.xml b/fzzy-igdss-view/src/main/java/com/fzzy/igds/PledgeContract.view.xml
index ca05f87..2201381 100644
--- a/fzzy-igdss-view/src/main/java/com/fzzy/igds/PledgeContract.view.xml
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/PledgeContract.view.xml
@@ -21,6 +21,18 @@
       <ClientEvent name="onReady">self.insert({});</ClientEvent>
       <Property name="dataType">dtBaseParam</Property>
     </DataSet>
+    <DataSet id="dsDeptList">
+      <Property name="dataProvider">deptPR#getData</Property>
+      <Property name="userData">搴撳尯鍒楄〃涓嬫媺妗�</Property>
+      <Property name="loadMode">manual</Property>
+      <Property name="dataType">[dtDept]</Property>
+    </DataSet>
+    <DataSet id="dsDepotList">
+      <Property name="dataProvider">depotPR#getData</Property>
+      <Property name="userData">浠撳簱鍒楄〃涓嬫媺妗�</Property>
+      <Property name="loadMode">manual</Property>
+      <Property name="dataType">[dtDepot]</Property>
+    </DataSet>
     <Container>
       <Property name="className">c-param</Property>
       <AutoForm>
@@ -67,8 +79,11 @@
         </ToolBarButton>
         <ToolBarButton>
           <ClientEvent name="onClick">var data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);
-view.get(&quot;#dialogMain&quot;).show();
-        </ClientEvent>
+if(data){&#xD;
+    view.get(&quot;#dialogMain&quot;).show();
+}else{&#xD;
+    $notify(&quot;璇烽�夋嫨闇�瑕佷慨鏀圭殑淇℃伅鈥︹��&quot;);&#xD;
+}&#xD;</ClientEvent>
           <Property name="id">btnUpdate</Property>
           <Property name="caption">淇敼</Property>
           <Property name="exClassName">btn2</Property>
@@ -78,8 +93,8 @@
         <ToolBarButton>
           <ClientEvent name="onClick">var data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;)
 if(!data){
-	$alert(&quot;璇烽�夋嫨鏁版嵁&quot;);
-	}else{
+	$alert(&quot;璇烽�夋嫨闇�瑕佸垹闄ょ殑淇℃伅鈥︹��&quot;);
+}else{
 	view.get(&quot;#ajaxDelData&quot;).set(&quot;parameter&quot;, data).execute(function(result){
 		if(&quot;200&quot;!=result.code){
 			$alert(&quot;寮傚父淇℃伅锛�&quot;+result.message);
@@ -143,7 +158,7 @@
     <Dialog id="dialogMain" layout="regionPadding:8">
       <Property name="closeable">false</Property>
       <Property name="caption">璐ㄦ娂鍚堝悓</Property>
-      <Property name="width">65%</Property>
+      <Property name="width">80%</Property>
       <Property name="iconClass">fa fa-tasks</Property>
       <Property name="height">90%</Property>
       <Buttons>
@@ -212,6 +227,7 @@
             <AutoFormElement>
               <Property name="name">pledgeDept</Property>
               <Property name="property">pledgeDept</Property>
+              <Property name="trigger">dsDeptDropDown</Property>
               <Editor/>
             </AutoFormElement>
             <AutoFormElement>
@@ -257,6 +273,7 @@
             <AutoFormElement>
               <Property name="name">depotIds</Property>
               <Property name="property">depotIds</Property>
+              <Property name="trigger">dsDepotDropDown</Property>
               <Editor/>
             </AutoFormElement>
             <AutoFormElement layoutConstraint="colSpan:3">
@@ -303,5 +320,55 @@
     <AjaxAction id="ajaxInitAdd">
       <Property name="service">pledgeContractPR#initAdd</Property>
     </AjaxAction>
+    <DataSetDropDown id="dsDeptDropDown">
+      <ClientEvent name="onOpen">&#xD;
+var entity = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+if(!entity){&#xD;
+    $alert(&quot;璇峰厛閫夋嫨璐ㄦ娂鍏徃&quot;);&#xD;
+}else{&#xD;
+    var pledgeCompany = entity.get(&quot;pledgeCompany&quot;);&#xD;
+    if(!pledgeCompany){&#xD;
+        $alert(&quot;璇峰厛閫夋嫨璐ㄦ娂鍏徃&quot;);&#xD;
+    }else{&#xD;
+        view.get(&quot;#dsDeptList&quot;).set(&quot;parameter&quot;,entity.get(&quot;pledgeCompany&quot;)).flushAsync();&#xD;
+    }
+}</ClientEvent>
+      <Property name="dataSet">dsDeptList</Property>
+      <Property name="height">450</Property>
+      <Property name="autoOpen">true</Property>
+      <Property name="assignmentMap">pledgeDept=id</Property>
+      <Property name="width">400</Property>
+      <DataColumn>
+        <Property name="align">center</Property>
+        <Property name="name">kqmc</Property>
+        <Property name="property">kqmc</Property>
+        <Editor/>
+      </DataColumn>
+    </DataSetDropDown>
+    <DataSetDropDown id="dsDepotDropDown">
+      <ClientEvent name="onOpen">&#xD;
+var entity = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+if(!entity){&#xD;
+    $alert(&quot;璇峰厛閫夋嫨璐ㄦ娂搴撳尯&quot;);&#xD;
+}else{&#xD;
+    var pledgeDept = entity.get(&quot;pledgeDept&quot;);&#xD;
+    if(!pledgeDept){&#xD;
+        $alert(&quot;璇峰厛閫夋嫨璐ㄦ娂搴撳尯&quot;);&#xD;
+    }else{&#xD;
+        view.get(&quot;#dsDepotList&quot;).set(&quot;parameter&quot;,entity.get(&quot;pledgeDept&quot;)).flushAsync();&#xD;
+    }
+}</ClientEvent>
+      <Property name="dataSet">dsDepotList</Property>
+      <Property name="height">400</Property>
+      <Property name="autoOpen">true</Property>
+      <Property name="assignmentMap">depotIds=id</Property>
+      <Property name="width">400</Property>
+      <DataColumn>
+        <Property name="align">center</Property>
+        <Property name="name">name</Property>
+        <Property name="property">name</Property>
+        <Editor/>
+      </DataColumn>
+    </DataSetDropDown>
   </View>
 </ViewConfig>
diff --git a/fzzy-igdss-view/src/main/java/models/core.model.xml b/fzzy-igdss-view/src/main/java/models/core.model.xml
index 214d755..88a3068 100644
--- a/fzzy-igdss-view/src/main/java/models/core.model.xml
+++ b/fzzy-igdss-view/src/main/java/models/core.model.xml
@@ -1077,7 +1077,7 @@
       <Property></Property>
       <Property name="label">璐ㄦ娂浠撳簱</Property>
       <Property name="mapping">
-        <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
+        <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getDataByCompanyId&quot;).getResult()}</Property>
         <Property name="keyProperty">id</Property>
         <Property name="valueProperty">name</Property>
       </Property>
@@ -1880,4 +1880,131 @@
       <Property name="label">鏇存柊鏃堕棿</Property>
     </PropertyDef>
   </DataType>
+  <DataType name="dtDept">
+    <Property name="creationType">com.fzzy.igds.domain.Dept</Property>
+    <PropertyDef name="id">
+      <Property></Property>
+      <Property name="label">搴撳尯缂栫爜</Property>
+      <Property name="readOnly">true</Property>
+    </PropertyDef>
+    <PropertyDef name="parentId">
+      <Property></Property>
+      <Property name="label">鏀跺偍鍏徃</Property>
+      <Property name="mapping">
+        <Property name="mapValues">${dorado.getDataProvider(&quot;companyPR#getData&quot;).getResult()}</Property>
+        <Property name="keyProperty">id</Property>
+        <Property name="valueProperty">dwmc</Property>
+      </Property>
+      <Property name="readOnly">true</Property>
+    </PropertyDef>
+    <PropertyDef name="companyId">
+      <Property></Property>
+      <Property name="label">缁勭粐缂栫爜</Property>
+    </PropertyDef>
+    <PropertyDef name="kqmc">
+      <Property></Property>
+      <Property name="label">搴撳尯鍚嶇О</Property>
+      <Property name="readOnly">true</Property>
+    </PropertyDef>
+    <PropertyDef name="kqdz">
+      <Property></Property>
+      <Property name="label">搴撳尯鍦板潃</Property>
+    </PropertyDef>
+    <PropertyDef name="xzqhdm">
+      <Property></Property>
+      <Property name="label">鍖哄垝浠g爜</Property>
+      <Property name="readOnly">true</Property>
+    </PropertyDef>
+    <PropertyDef name="xzqhmc">
+      <Property></Property>
+      <Property name="label">鎵�鍦ㄥ尯鍘�</Property>
+    </PropertyDef>
+    <PropertyDef name="kqcq">
+      <Property></Property>
+      <Property name="label">搴撳尯浜ф潈</Property>
+      <Property name="mapping">
+        <Property name="keyProperty">key</Property>
+        <Property name="valueProperty">value</Property>
+        <Property name="mapValues">
+          <Collection>
+            <Entity>
+              <Property name="key">1</Property>
+              <Property name="value">1-鑷湁</Property>
+            </Entity>
+            <Entity>
+              <Property name="key">2</Property>
+              <Property name="value">2-绉熻祦</Property>
+            </Entity>
+            <Entity>
+              <Property name="key">3</Property>
+              <Property name="value">3-鍏辨湁</Property>
+            </Entity>
+            <Entity>
+              <Property name="key">4</Property>
+              <Property name="value">4-娣峰悎</Property>
+            </Entity>
+            <Entity>
+              <Property name="key">9</Property>
+              <Property name="value">9-鍏朵粬</Property>
+            </Entity>
+          </Collection>
+        </Property>
+      </Property>
+    </PropertyDef>
+    <PropertyDef name="yxcr">
+      <Property name="dataType">Double</Property>
+      <Property name="label">鏈夋晥浠撳</Property>
+      <Property name="displayFormat">#0.000 鍚�</Property>
+    </PropertyDef>
+    <PropertyDef name="zdmj">
+      <Property name="dataType">Double</Property>
+      <Property name="label">鍗犲湴闈㈢Н</Property>
+      <Property name="displayFormat">#0.000 骞虫柟绫�</Property>
+    </PropertyDef>
+    <PropertyDef name="cfs">
+      <Property name="dataType">Integer</Property>
+      <Property name="label">浠撳簱鏁�</Property>
+      <Property name="displayFormat">#0 鏍�</Property>
+    </PropertyDef>
+    <PropertyDef name="jd">
+      <Property name="dataType">Double</Property>
+      <Property name="label">缁忓害</Property>
+    </PropertyDef>
+    <PropertyDef name="wd">
+      <Property name="dataType">Double</Property>
+      <Property name="label">绾害</Property>
+    </PropertyDef>
+    <PropertyDef name="remark">
+      <Property></Property>
+      <Property name="label">澶囨敞璇存槑</Property>
+    </PropertyDef>
+    <PropertyDef name="createTime">
+      <Property name="dataType">DateTime</Property>
+      <Property name="label">鍒涘缓鏃堕棿</Property>
+      <Property name="readOnly">true</Property>
+    </PropertyDef>
+    <PropertyDef name="createBy">
+      <Property></Property>
+      <Property name="label">鍒涘缓浜�</Property>
+      <Property name="readOnly">true</Property>
+    </PropertyDef>
+    <PropertyDef name="updateTime">
+      <Property name="dataType">DateTime</Property>
+      <Property name="label">鏇存柊鏃堕棿</Property>
+      <Property name="readOnly">true</Property>
+    </PropertyDef>
+    <PropertyDef name="updateBy">
+      <Property></Property>
+      <Property name="label">鏇存柊浜�</Property>
+      <Property name="readOnly">true</Property>
+    </PropertyDef>
+    <PropertyDef name="imgPath">
+      <Property></Property>
+      <Property name="label">鍥捐矾寰�</Property>
+    </PropertyDef>
+    <PropertyDef name="imgName">
+      <Property></Property>
+      <Property name="label">楦熺灠鍥�</Property>
+    </PropertyDef>
+  </DataType>
 </Model>
diff --git a/fzzy-igdss-web/src/main/resources/lib/dorado-skin-ruoyi-1.0.10.jar b/fzzy-igdss-web/src/main/resources/lib/dorado-skin-ruoyi-1.0.10.jar
new file mode 100644
index 0000000..99bdf14
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/lib/dorado-skin-ruoyi-1.0.10.jar
Binary files differ

--
Gitblit v1.9.3