CZT
2023-11-27 c206acfaedc69c390fb67daa81bc686f58a212ef
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.ld.igds.models.GrainOilShop</Property>
      <PropertyDef name="lydbh">
        <Property></Property>
        <Property name="label">粮油店编码</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">所属分库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="lydmc">
        <Property></Property>
        <Property name="label">名称</Property>
      </PropertyDef>
      <PropertyDef name="xzqhbm">
        <Property name="label">行政区划编码</Property>
      </PropertyDef>
      <PropertyDef name="xzqhmc">
        <Property name="label">行政区划名称</Property>
      </PropertyDef>
      <PropertyDef name="lxr">
        <Property name="label">联系人</Property>
      </PropertyDef>
      <PropertyDef name="lxrdh">
          <Property></Property>
          <Property name="label">联系人电话</Property>
      </PropertyDef>
      <PropertyDef name="fgfw">
        <Property name="dataType">Double</Property>
        <Property name="label">覆盖范围</Property>
        <Property name="displayFormat">#0.00公里</Property>
      </PropertyDef>
      <PropertyDef name="sjcr">
          <Property name="dataType">Double</Property>
          <Property name="label">实际仓容</Property>
          <Property name="displayFormat">#0.00吨</Property>
      </PropertyDef>
      <PropertyDef name="ajqyrq">
        <Property name="dataType">Date</Property>
        <Property name="label">廒间启用日期</Property>
      </PropertyDef>
      <PropertyDef name="dz">
        <Property></Property>
        <Property name="label">地址</Property>
      </PropertyDef>
      <PropertyDef name="lon">
          <Property></Property>
          <Property name="label">经度</Property>
      </PropertyDef>
      <PropertyDef name="lat">
          <Property></Property>
          <Property name="label">纬度</Property>
      </PropertyDef>
      <PropertyDef name="bz">
          <Property></Property>
          <Property name="label">备注</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">Date</Property>
        <Property name="label">数据更新时间</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtParam">
      <PropertyDef name="lydmc">
        <Property name="label">粮油店名称</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="regionPadding:10">
    <ClientEvent name="onReady">view.get(&quot;#dsParam&quot;).insert({});</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider">grainOilShopPR#pageData</Property>
      <Property name="dataType">[dtMain]</Property>
      <Property name="pageSize">15</Property>
    </DataSet>
    <DataSet id="dsParam">
      <Property name="dataType">dtParam</Property>
    </DataSet>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="height">55</Property>
      <Property name="contentOverflow">hidden</Property>
      <Label layoutConstraint="left">
        <Property name="text">菜单栏:</Property>
      </Label>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).insert();&#xD;
view.get(&quot;#dialogMain&quot;).show();</ClientEvent>
        <Property name="caption">新增</Property>
        <Property name="exClassName">btn-normal</Property>
        <Property name="iconClass">fa fa-plus</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var dialog= view.get(&quot;#dialogMain&quot;);&#xD;
dialog.show();</ClientEvent>
        <Property name="caption">编辑</Property>
        <Property name="exClassName">btn-warm</Property>
        <Property name="iconClass">fa fa-pencil</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(!cur) return;&#xD;
view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,cur).execute(function(result){&#xD;
    if(result){&#xD;
        $alert(result);&#xD;
        return;&#xD;
    }else{&#xD;
        cur.remove();&#xD;
    }&#xD;
});</ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn-warn</Property>
        <Property name="iconClass">fa fa-trash-o</Property>
      </Button>
    </Container>
    <Container layout="regionPadding:10" layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <AutoForm>
        <Property name="dataSet">dsParam</Property>
        <Property name="cols">*,*,*,*</Property>
        <AutoFormElement>
          <Property name="name">lydmc</Property>
          <Property name="property">lydmc</Property>
          <Editor/>
        </AutoFormElement>
        <Container layout="regionPadding:10">
          <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).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="exClassName">btn-normal</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button layoutConstraint="left">
            <ClientEvent name="onClick">view.get(&quot;#dsParam&quot;).flushAsync();</ClientEvent>
            <Property name="caption">重置</Property>
            <Property name="iconClass">fa fa-refresh</Property>
            <Property name="exClassName">btn-default</Property>
          </Button>
        </Container>
      </AutoForm>
      <DataGrid id="dgMain">
        <ClientEvent name="onDataRowDoubleClick">var dialog= view.get(&quot;#dialogMain&quot;);&#xD;
dialog.show();</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <RowNumColumn/>
        <DataColumn name="lydmc">
          <Property name="property">lydmc</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="xzqhmc">
          <Property name="property">xzqhmc</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="lxr">
          <Property name="property">lxr</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="lxrdh">
          <Property name="property">lxrdh</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="fgfw">
          <Property name="property">fgfw</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="sjcr">
          <Property name="property">sjcr</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="updateTime">
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Container layoutConstraint="bottom">
      <Property name="exClassName">bg-color</Property>
      <DataPilot layoutConstraint="right">
        <Property name="dataSet">dsMain</Property>
        <Property name="itemCodes">pageSize,pages</Property>
      </DataPilot>
    </Container>
    <Dialog id="dialogMain">
      <Property name="closeable">false</Property>
      <Property name="caption">粮油店信息</Property>
      <Property name="width">60%</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Buttons>
        <Button id="btnOk">
          <ClientEvent name="onClick">view.get(&quot;#uaSave&quot;).execute(function(result){&#xD;
    if(result){&#xD;
        $alert(result);&#xD;
    }else{&#xD;
        $notify(&quot;保存成功!!&quot;);&#xD;
        view.get(&quot;#dialogMain&quot;).hide();&#xD;
    }&#xD;
});</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="iconClass">fa fa-check</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="iconClass">fa fa-times</Property>
        </Button>
      </Buttons>
      <Children>
        <AutoForm>
          <Property name="dataSet">dsMain</Property>
          <Property name="cols">*,*</Property>
          <Property name="labelAlign">right</Property>
          <Property name="labelSeparator">:</Property>
          <Property name="labelWidth">150</Property>
          <AutoFormElement>
            <Property name="name">lydbh</Property>
            <Property name="property">lydbh</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">deptId</Property>
            <Property name="property">deptId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">lydmc</Property>
            <Property name="property">lydmc</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">xzqhbm</Property>
            <Property name="property">xzqhbm</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">lxr</Property>
            <Property name="property">lxr</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">lxrdh</Property>
            <Property name="property">lxrdh</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">fgfw</Property>
            <Property name="property">fgfw</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">lon</Property>
            <Property name="property">lon</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">lat</Property>
            <Property name="property">lat</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">sjcr</Property>
            <Property name="property">sjcr</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">dz</Property>
            <Property name="property">dz</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">bz</Property>
            <Property name="property">bz</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaSave">
      <Property name="dataResolver">grainOilShopPR#saveData</Property>
      <Property name="successMessage">数据保存完成!</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="validateData">false</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDel">
      <Property name="service">grainOilShopPR#delData</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
  </View>
</ViewConfig>