sgj
2026-03-23 fff68633c2fb6aad6b6b42077bb8d5833b92d4d2
fzzy-igdss-view/src/main/java/com/fzzy/igds/PledgeContract.view.xml
@@ -10,7 +10,19 @@
*/
query = function(){
    view.get("#dsMain").flushAsync();
}&#xD;</ClientEvent>
}&#xD;&#xD;
&#xD;
queryDepot= function(){&#xD;
   var entity = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
   if(entity){&#xD;
      var code = entity.get(&quot;id&quot;);&#xD;
      view.get(&quot;#dsPledgeContractDepot&quot;).set(&quot;parameter&quot;,{PledgeId:code}).flush();&#xD;
   }else{&#xD;
      $notify(&quot;请先选择质押合同信息!&quot;);&#xD;
   }&#xD;
&#xD;
}&#xD;
</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="loadMode">lazy</Property>
@@ -21,17 +33,10 @@
      <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>
    <DataSet id="dsPledgeContractDepot">
      <Property name="dataProvider">pledgeContractPR#listAllData</Property>
      <Property name="dataType">[dtPledgeContractDepot]</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>
@@ -65,35 +70,40 @@
    </Container>
    <Container>
      <Property name="className">c-data</Property>
      <ToolBar>
        <ToolBarButton>
          <ClientEvent name="onClick">&#xD;
      <SplitPanel>
        <Property name="direction">right</Property>
        <Property name="position">350</Property>
        <MainControl>
          <Container>
            <ToolBar>
              <ToolBarButton>
                <ClientEvent name="onClick">&#xD;
view.get(&quot;#ajaxInitAdd&quot;).execute(function(data){&#xD;
       view.get(&quot;#dsMain&quot;).insert(data);&#xD;
        view.get(&quot;#dialogMain&quot;).show();&#xD;
    });</ClientEvent>
          <Property name="caption">新增</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-plus</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);
                <Property name="caption">新增</Property>
                <Property name="exClassName">btn1</Property>
                <Property name="width">100</Property>
                <Property name="iconClass">fa fa-plus</Property>
              </ToolBarButton>
              <ToolBarButton>
                <ClientEvent name="onClick">var data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);
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>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-pencil-square-o</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;)
                <Property name="id">btnUpdate</Property>
                <Property name="caption">修改</Property>
                <Property name="exClassName">btn2</Property>
                <Property name="width">100</Property>
                <Property name="iconClass">fa fa-pencil-square-o</Property>
              </ToolBarButton>
              <ToolBarButton>
                <ClientEvent name="onClick">var data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;)
if(!data){
   $alert(&quot;请选择需要删除的信息……&quot;);
   $alert(&quot;请选择需要删除的质押合同信息……&quot;);
}else{
   view.get(&quot;#ajaxDelData&quot;).set(&quot;parameter&quot;, data).execute(function(result){
      if(&quot;200&quot;!=result.code){
@@ -104,56 +114,131 @@
      }
   })
}</ClientEvent>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-times</Property>
        </ToolBarButton>
      </ToolBar>
      <DataGrid id="dgMain" layoutConstraint="padding:8" selectionMode="singleRow">
        <ClientEvent name="onDataRowClick">self.set(&quot;selection&quot;, arg.data)</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <DataColumn name="pledgeBank">
          <Property name="property">pledgeBank</Property>
        </DataColumn>
        <DataColumn name="pledgeCompany">
          <Property name="property">pledgeCompany</Property>
        </DataColumn>
        <DataColumn name="name">
          <Property name="property">name</Property>
          <Property name="width">400</Property>
        </DataColumn>
        <DataColumn name="status">
          <Property name="property">status</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="remark">
          <Property name="property">remark</Property>
        </DataColumn>
        <DataColumn name="updateBy">
          <Property name="property">updateBy</Property>
          <Property name="align">center</Property>
          <Property name="width">160</Property>
        </DataColumn>
        <DataColumn name="updateTime">
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
          <Property name="width">200</Property>
        </DataColumn>
        <DataColumn name="signTime">
          <Property name="property">signTime</Property>
        </DataColumn>
        <DataColumn name="pledgeStart">
          <Property name="property">pledgeStart</Property>
        </DataColumn>
        <DataColumn name="pledgeEnd">
          <Property name="property">pledgeEnd</Property>
        </DataColumn>
      </DataGrid>
                <Property name="caption">删除</Property>
                <Property name="exClassName">btn3</Property>
                <Property name="width">100</Property>
                <Property name="iconClass">fa fa-times</Property>
              </ToolBarButton>
              <ToolBarButton>
                <ClientEvent name="onClick">//var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
var cur = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(cur){&#xD;
   var entity = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
   var Id = entity.get(&quot;id&quot;);&#xD;
   var code = entity.get(&quot;pledgeCompany&quot;);&#xD;
   view.get(&quot;#dsDepotSelect&quot;).set(&quot;parameter&quot;,{parentId:code,PledgeId:Id}).flush();&#xD;
   view.get(&quot;#dialogDepot&quot;).show();&#xD;
}else{&#xD;
   $notify(&quot;请先选择质押合同信息!&quot;);&#xD;
}</ClientEvent>
                <Property name="caption">配置仓库</Property>
                <Property name="exClassName">btn1</Property>
                <Property name="width">100</Property>
                <Property name="iconClass">fa fa-plus</Property>
              </ToolBarButton>
            </ToolBar>
            <DataGrid id="dgMain" layoutConstraint="padding:8" selectionMode="singleRow">
              <ClientEvent name="onDataRowClick">self.set(&quot;selection&quot;, arg.data);&#xD;
var entity = view.get(&quot;#dsMain.data:#&quot;);&#xD;
var code = entity.get(&quot;id&quot;);&#xD;
view.get(&quot;#dsPledgeContractDepot&quot;).set(&quot;parameter&quot;,{PledgeId:code}).flush();</ClientEvent>
              <Property name="dataSet">dsMain</Property>
              <Property name="readOnly">true</Property>
              <Property name="fixedColumnCount">3</Property>
              <RowSelectorColumn/>
              <RowNumColumn/>
              <DataColumn name="pledgeCompany">
                <Property name="property">pledgeCompany</Property>
                <Property name="width">200</Property>
                <Property name="align">center</Property>
              </DataColumn>
              <DataColumn name="pledgeBank">
                <Property name="property">pledgeBank</Property>
                <Property name="width">200</Property>
                <Property name="align">center</Property>
              </DataColumn>
              <DataColumn name="name">
                <Property name="property">name</Property>
                <Property name="width">400</Property>
                <Property name="align">center</Property>
              </DataColumn>
              <DataColumn name="status">
                <Property name="property">status</Property>
                <Property name="align">center</Property>
                <Property name="width">150</Property>
              </DataColumn>
              <DataColumn name="remark">
                <Property name="property">remark</Property>
                <Property name="width">300</Property>
                <Property name="align">center</Property>
              </DataColumn>
              <DataColumn name="updateBy">
                <Property name="property">updateBy</Property>
                <Property name="align">center</Property>
                <Property name="width">300</Property>
              </DataColumn>
              <DataColumn name="updateTime">
                <Property name="property">updateTime</Property>
                <Property name="align">center</Property>
                <Property name="width">150</Property>
              </DataColumn>
              <DataColumn name="signTime">
                <Property name="property">signTime</Property>
                <Property name="width">150</Property>
                <Property name="align">center</Property>
              </DataColumn>
              <DataColumn name="pledgeStart">
                <Property name="property">pledgeStart</Property>
                <Property name="width">150</Property>
                <Property name="align">center</Property>
              </DataColumn>
              <DataColumn name="pledgeEnd">
                <Property name="property">pledgeEnd</Property>
                <Property name="width">150</Property>
                <Property name="align">center</Property>
              </DataColumn>
            </DataGrid>
          </Container>
        </MainControl>
        <SideControl>
          <Container>
            <ToolBar>
              <ToolBarButton>
                <ClientEvent name="onClick">var data = view.get(&quot;#dgMainItem&quot;).get(&quot;selection&quot;)
if(!data){
   $alert(&quot;请选择需要删除的质押仓库信息……&quot;);
}else{
   view.get(&quot;#ajaxDelDepotData&quot;).set(&quot;parameter&quot;, data).execute(function(result){
      if(&quot;200&quot;!=result.code){
         $alert(&quot;异常信息:&quot;+result.message);
      }else{
         $notify(&quot;执行成功&quot;);
            queryDepot();
      }
   })
}</ClientEvent>
                <Property name="caption">删除仓库</Property>
                <Property name="exClassName">btn3</Property>
                <Property name="width">100</Property>
                <Property name="iconClass">fa fa-times</Property>
              </ToolBarButton>
            </ToolBar>
            <DataGrid id="dgMainItem" layoutConstraint="padding:8" selectionMode="singleRow">
              <ClientEvent name="onDataRowClick">self.set(&quot;selection&quot;, arg.data)</ClientEvent>
              <Property name="dataSet">dsPledgeContractDepot</Property>
              <Property name="readOnly">true</Property>
              <RowSelectorColumn/>
              <RowNumColumn/>
              <DataColumn name="pledgeDept">
                <Property name="property">pledgeDept</Property>
              </DataColumn>
              <DataColumn name="pledgeDepot">
                <Property name="property">pledgeDepot</Property>
              </DataColumn>
            </DataGrid>
          </Container>
        </SideControl>
      </SplitPanel>
    </Container>
    <Dialog id="dialogMain" layout="regionPadding:8">
      <Property name="closeable">false</Property>
@@ -182,7 +267,7 @@
      </Buttons>
      <Children>
        <Container>
          <AutoForm layoutConstraint="top ">
          <AutoForm layoutConstraint="top">
            <Property name="dataSet">dsMain</Property>
            <Property name="showHint">false</Property>
            <Property name="cols">210,*,210</Property>
@@ -225,14 +310,23 @@
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">pledgeDept</Property>
              <Property name="property">pledgeDept</Property>
              <Property name="trigger">dsDeptDropDown</Property>
              <Property name="name">contractAmount</Property>
              <Property name="property">contractAmount</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">status</Property>
              <Property name="property">status</Property>
              <Property name="name">repaidAmount</Property>
              <Property name="property">repaidAmount</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement layoutConstraint="colSpan:2">
              <Property name="name">contractName</Property>
              <Property name="property">contractName</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">contractNo</Property>
              <Property name="property">contractNo</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
@@ -250,36 +344,9 @@
              <Property name="property">pledgeEnd</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement layoutConstraint="colSpan:2">
              <Property name="name">contractName</Property>
              <Property name="property">contractName</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">contractNo</Property>
              <Property name="property">contractNo</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">contractAmount</Property>
              <Property name="property">contractAmount</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">repaidAmount</Property>
              <Property name="property">repaidAmount</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">depotIds</Property>
              <Property name="property">depotIds</Property>
              <Property name="trigger">dsDepotDropDown</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement layoutConstraint="colSpan:3">
              <Property name="name">remark</Property>
              <Property name="property">remark</Property>
              <Property name="editorType">TextArea</Property>
              <Property name="name">status</Property>
              <Property name="property">status</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
@@ -294,10 +361,16 @@
              <Property name="readOnly">true</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement layoutConstraint="colSpan:3">
              <Property name="name">remark</Property>
              <Property name="property">remark</Property>
              <Property name="editorType">TextArea</Property>
              <Editor/>
            </AutoFormElement>
            <HtmlContainer layoutConstraint="colSpan:3">
              <Property name="content">1.当前单据仅作为当前系统业务信息登记使用,不作为实际双方合约约束。&lt;br>&#xD;
2.当前单据默认支持为1个合约对应1个库区,如果同时对应多个库区请数据登记。&lt;br>&#xD;
3.质押状态如果=解压,系统对应催办提醒等功能自动完成。&lt;br></Property>
3.质押状态如果=解押,系统对应催办提醒等功能自动完成。&lt;br></Property>
              <Property name="exClassName">h-tip</Property>
              <Property name="contentOverflow">hidden</Property>
            </HtmlContainer>
@@ -314,61 +387,93 @@
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDelData">
      <Property name="confirmMessage">确定要删除数据么?</Property>
      <Property name="confirmMessage">确定要删除该质押合同数据吗?</Property>
      <Property name="service">pledgeContractPR#delete</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDelDepotData">
      <Property name="confirmMessage">确定要删除该质押仓库数据么吗?</Property>
      <Property name="service">pledgeContractPR#deleteDepot</Property>
    </AjaxAction>
    <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>
    <Dialog id="dialogDepot">
      <ClientEvent name="onReady">var entity = view.get(&quot;#dsMain.data:#&quot;);&#xD;
var code = entity.get(&quot;pledgeCompany&quot;);&#xD;
view.get(&quot;#dsDepotSelect&quot;).set(&quot;parameter&quot;,{parentId:code}).flush();</ClientEvent>
      <Property name="width">50%</Property>
      <Property name="height">80%</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">var selection = view.get(&quot;#dialogDepotSelect&quot;).get(&quot;selection&quot;);&#xD;
var cur = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
var ua = view.get(&quot;#saveAction&quot;);&#xD;
if(selection.length == 0) return;&#xD;
&#xD;
var items = cur.get(&quot;depotData&quot;);&#xD;
var tag = true;&#xD;
selection.each(function(entity){&#xD;
   tag = true;&#xD;
   items.each(function(data){&#xD;
      if(data.get(&quot;pledgeDepot&quot;) == entity.get(&quot;id&quot;)) tag = false;&#xD;
   });&#xD;
   if(tag){&#xD;
      items.insert({&#xD;
         pledgeDepot:entity.get(&quot;id&quot;),&#xD;
         pledgeDept:entity.get(&quot;deptId&quot;),&#xD;
         pledgeId:cur.get(&quot;id&quot;),&#xD;
         companyId:cur.get(&quot;companyId&quot;)&#xD;
      });&#xD;
   }&#xD;
});   &#xD;
ua.execute(function(){&#xD;
   self.get(&quot;parent&quot;).hide();&#xD;
   view.get(&quot;#dialogDepotSelect&quot;).set(&quot;selection&quot;,null);&#xD;
   queryDepot();&#xD;
});&#xD;
</ClientEvent>
          <Property name="caption">确认选择</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">self.get(&quot;parent&quot;).hide();&#xD;
view.get(&quot;#dialogDepotSelect&quot;).set(&quot;selection&quot;,null);</ClientEvent>
          <Property name="caption">取消操作</Property>
        </Button>
      </Buttons>
      <Children>
        <DataSet id="dsDepotSelect">
          <Property name="dataType">[dtDepot]</Property>
          <Property name="dataProvider">pledgeContractPR#getUnplacedDepotData</Property>
          <Property name="userData">库区列表下拉框</Property>
          <Property name="loadMode">manual</Property>
        </DataSet>
        <DataGrid id="dialogDepotSelect">
          <Property name="dataSet">dsDepotSelect</Property>
          <Property name="selectionMode">multiRows</Property>
          <RowSelectorColumn>
            <Property name="caption">选择</Property>
            <Property name="width">50</Property>
          </RowSelectorColumn>
          <DataColumn>
            <Property name="property">deptId</Property>
            <Property name="readOnly">true</Property>
            <Property name="name">deptId</Property>
          </DataColumn>
          <DataColumn name="name">
            <Property name="property">name</Property>
            <Property name="readOnly">true</Property>
          </DataColumn>
          <DataColumn name="id">
            <Property name="property">id</Property>
            <Property name="readOnly">true</Property>
          </DataColumn>
          <DataColumn name="depotType">
            <Property name="property">depotType</Property>
            <Property name="readOnly">true</Property>
          </DataColumn>
        </DataGrid>
      </Children>
      <Tools/>
    </Dialog>
  </View>
</ViewConfig>