jiazx0107
2025-11-20 e9998eb7f991a88e19b3c63c7dcffb64e1c409ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <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>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtBank]</Property>
      <Property name="pageSize">20</Property>
    </DataSet>
    <DataSet id="dsParam">
      <ClientEvent name="onReady">self.insert();</ClientEvent>
      <Property name="dataType">dtBaseParam</Property>
    </DataSet>
    <Container>
      <Property name="className">c-param</Property>
      <AutoForm>
        <Property name="cols">*,90,90,*,*</Property>
        <Property name="dataSet">dsParam</Property>
        <Property name="labelAlign">right</Property>
        <AutoFormElement>
          <Property name="name">name</Property>
          <Property name="property">name</Property>
          <Property name="label">银行名称</Property>
          <Property name="labelWidth">90</Property>
          <Editor/>
        </AutoFormElement>
        <Button>
          <Property name="caption">搜索</Property>
        </Button>
        <Button>
          <Property name="caption">重置</Property>
        </Button>
      </AutoForm>
    </Container>
    <Container>
      <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>
          <Property name="caption">新增</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-plus-circle</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>
          <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">
          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>
          <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>
        </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/>
        <DataColumn name="name">
          <Property name="property">name</Property>
        </DataColumn>
        <DataColumn name="status">
          <Property name="property">status</Property>
        </DataColumn>
        <DataColumn name="remark">
          <Property name="property">remark</Property>
        </DataColumn>
        <DataColumn name="updateBy">
          <Property name="property">updateBy</Property>
        </DataColumn>
        <DataColumn name="updateTime">
          <Property name="property">updateTime</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="closeable">false</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#saveAction&quot;).execute(function(){&#xD;
    self.get(&quot;parent&quot;).hide();&#xD;
});</ClientEvent>
          <Property name="caption">保存</Property>
          <Property name="iconClass">fa fa-check-circle</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">120</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-times-circle</Property>
          <Property name="width">120</Property>
        </Button>
      </Buttons>
      <Children>
        <AutoForm layoutConstraint="padding:10">
          <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">
            <Property name="name">name</Property>
            <Property name="property">name</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">model</Property>
            <Property name="property">model</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>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">updateUser</Property>
            <Property name="property">updateUser</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="saveAction">
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDelData">
      <Property name="confirmMessage">确定要删除数据么?</Property>
      <Property name="service">imsProductPR#delete</Property>
    </AjaxAction>
  </View>
</ViewConfig>