czt
9 天以前 db67639449287bcec461916a7dca6003ee5dd03c
fzzy-igdss-view/src/main/java/com/fzzy/igds/Bank.view.xml
@@ -4,20 +4,21 @@
  <Context/>
  <Model/>
  <View layout="padding:10">
    <ClientEvent name="onReady">&#xD;
flushData = function(){&#xD;
   var dataTree =  view.get(&quot;#dataTree1&quot;);&#xD;
   var current = dataTree.get(&quot;currentEntity&quot;);&#xD;
   view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,current.get(&quot;id&quot;)).flushAsync();&#xD;
}&#xD;
</ClientEvent>
    <ClientEvent name="onClick">&#xD;
/**&#xD;
* 查询&#xD;
*/&#xD;
query = function(){&#xD;
    view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
}&#xD;</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="loadMode">lazy</Property>
      <Property name="dataType">[dtBank]</Property>
      <Property name="pageSize">20</Property>
      <Property name="dataProvider">bankPR#listAll</Property>
    </DataSet>
    <DataSet id="dsParam">
      <ClientEvent name="onReady">self.insert();</ClientEvent>
      <ClientEvent name="onReady">self.insert({});</ClientEvent>
      <Property name="dataType">dtBaseParam</Property>
    </DataSet>
    <Container>
@@ -34,10 +35,19 @@
          <Editor/>
        </AutoFormElement>
        <Button>
          <ClientEvent name="onClick">var param = view.get(&quot;#dsParam.data&quot;);&#xD;
console.log(&quot;param&quot;);&#xD;
view.get(&quot;#dsMian&quot;).set(&quot;parameter&quot;,param).flushAsync();&#xD;
</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;#dsParam&quot;).set(&quot;data&quot;,{});</ClientEvent>
          <Property name="caption">重置</Property>
          <Property name="exClassName">btn-q2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
        </Button>
      </AutoForm>
    </Container>
@@ -45,34 +55,16 @@
      <Property name="className">c-data</Property>
      <ToolBar>
        <ToolBarButton>
          <ClientEvent name="onClick">flushData();</ClientEvent>
          <Property name="caption">刷新</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-refresh</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var dataTree =  view.get(&quot;#dataTree1&quot;);&#xD;
var current = dataTree.get(&quot;currentEntity&quot;);&#xD;
&#xD;
var newData = {warehouseId:current.get(&quot;id&quot;)};&#xD;
view.get(&quot;#dsMain&quot;).insert(newData);&#xD;
&#xD;
view.get(&quot;#dialogMain&quot;).show();&#xD;
</ClientEvent>
          <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).insert({});&#xD;
view.get(&quot;#dialogMain&quot;).show();</ClientEvent>
          <Property name="caption">新增</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-plus-circle</Property>
          <Property name="iconClass">fa fa-plus</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">
          const data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);
          if (!data) {
            $alert(&quot;请选择数据&quot;);
            return;
          }
          view.get(&quot;#dialogUpdate&quot;).show();
          <ClientEvent name="onClick">var data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);
view.get(&quot;#dialogMain&quot;).show();
        </ClientEvent>
          <Property name="id">btnUpdate</Property>
          <Property name="caption">修改</Property>
@@ -81,75 +73,58 @@
          <Property name="iconClass">fa fa-pencil-square-o</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">
          let data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;)
          if(!data){
          $alert(&quot;请选择数据&quot;)
          }else{
          view.get(&quot;#ajaxDelData&quot;).set(&quot;parameter&quot;, data).execute(function(result){
          data.remove()
          })
          }
        </ClientEvent>
          <ClientEvent name="onClick">var data = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;)
if(!data){
   $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);
      }else{
         $notify(&quot;执行成功&quot;);
            query();&#xD;
      }
   })
}</ClientEvent>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-times-circle</Property>
        </ToolBarButton>
        <Separator/>
        <ToolBarButton>
          <Property name="caption">导出</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-file-excel-o</Property>
        </ToolBarButton>
        <ToolBarButton>
          <Property name="caption">打印</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-print</Property>
          <Property name="width">100</Property>
        </ToolBarButton>
        <ToolBarButton>
          <Property name="caption">帮助</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-question-circle</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>
        <RowNumColumn/>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <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>
      </DataGrid>
      <ToolBar layoutConstraint="bottom">
        <Fill/>
        <DataPilot>
          <Property name="itemCodes">pageSize,pages</Property>
          <Property name="dataSet">dsMain</Property>
        </DataPilot>
      </ToolBar>
    </Container>
    <Dialog id="dialogMain">
      <Property name="width">90%</Property>
      <Property name="height">90%</Property>
      <Property name="caption">产品信息</Property>
      <Property name="width">550</Property>
      <Property name="caption">银行信息</Property>
      <Property name="closeable">false</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Buttons>
@@ -173,57 +148,37 @@
      </Buttons>
      <Children>
        <AutoForm layoutConstraint="padding:10">
          <Property name="cols">*,*,*</Property>
          <Property name="cols">*</Property>
          <Property name="dataSet">dsMain</Property>
          <Property name="labelSeparator">:</Property>
          <Property name="labelAlign">right</Property>
          <Property name="labelWidth">100</Property>
          <AutoFormElement layoutConstraint="colSpan:2">
          <AutoFormElement>
            <Property name="name">name</Property>
            <Property name="property">name</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">model</Property>
            <Property name="property">model</Property>
            <Property name="name">status</Property>
            <Property name="property">status</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">unit</Property>
            <Property name="property">unit</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">warehouseId</Property>
            <Property name="property">warehouseId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">disabled</Property>
            <Property name="property">disabled</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement layoutConstraint="colSpan:3">
            <Property name="name">spec</Property>
            <Property name="property">spec</Property>
            <Property name="editorType">TextArea</Property>
            <Property name="height">150</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement layoutConstraint="colSpan:3">
            <Property name="name">remark</Property>
            <Property name="property">remark</Property>
            <Property name="editorType">TextArea</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">updateTime</Property>
            <Property name="property">updateTime</Property>
            <Property name="name">updateBy</Property>
            <Property name="property">updateBy</Property>
            <Property name="readOnly">true</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">updateUser</Property>
            <Property name="property">updateUser</Property>
            <Property name="name">updateTime</Property>
            <Property name="property">updateTime</Property>
            <Property name="readOnly">true</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
@@ -231,6 +186,7 @@
      <Tools/>
    </Dialog>
    <UpdateAction id="saveAction">
      <Property name="dataResolver">bankPR#saveUpdate</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
@@ -238,7 +194,7 @@
    </UpdateAction>
    <AjaxAction id="ajaxDelData">
      <Property name="confirmMessage">确定要删除数据么?</Property>
      <Property name="service">imsProductPR#delete</Property>
      <Property name="service">bankPR#delete</Property>
    </AjaxAction>
  </View>
</ViewConfig>