czt
2026-01-08 51603d9354ddef5d8960fe0e6b3e21059da5ff66
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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model/>
  <View layout="padding:10">
    <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">[dtPledgeContract]</Property>
      <Property name="dataProvider">pledgeContractPR#listAll</Property>
    </DataSet>
    <DataSet id="dsParam">
      <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>
        <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>
          <ClientEvent name="onClick">var param = view.get(&quot;#dsParam.data&quot;);&#xD;
console.log(&quot;param&quot;,param);&#xD;
view.get(&quot;#dsMain&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>
    <Container>
      <Property name="className">c-data</Property>
      <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;);
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;)
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</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>
    </Container>
    <Dialog id="dialogMain" layout="regionPadding:8">
      <Property name="closeable">false</Property>
      <Property name="caption">质押合同</Property>
      <Property name="width">80%</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Property name="height">90%</Property>
      <Buttons>
        <Button id="btnOk">
          <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>
        <Container>
          <AutoForm layoutConstraint="top ">
            <Property name="dataSet">dsMain</Property>
            <Property name="showHint">false</Property>
            <Property name="cols">210,*,210</Property>
            <Control/>
            <Label>
              <Property name="exClassName">f-title</Property>
              <Property name="text">质押合同单</Property>
            </Label>
            <Control/>
            <Control layoutConstraint="colSpan:2"/>
            <AutoFormElement>
              <Property name="name">id</Property>
              <Property name="property">id</Property>
              <Property name="editorType">Label</Property>
              <Property name="showHint">false</Property>
              <Property name="labelAlign">right</Property>
              <Property name="showLabel">false</Property>
              <Editor/>
            </AutoFormElement>
          </AutoForm>
          <AutoForm>
            <Property name="dataSet">dsMain</Property>
            <Property name="cols">*,*,*</Property>
            <Property name="labelAlign">right</Property>
            <Property name="labelSeparator">:</Property>
            <Property name="labelWidth">120</Property>
            <AutoFormElement layoutConstraint="colSpan:2">
              <Property name="name">name</Property>
              <Property name="property">name</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">pledgeBank</Property>
              <Property name="property">pledgeBank</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">pledgeCompany</Property>
              <Property name="property">pledgeCompany</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">pledgeDept</Property>
              <Property name="property">pledgeDept</Property>
              <Property name="trigger">dsDeptDropDown</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">depotNames</Property>
              <Property name="property">depotNames</Property>
              <Property name="trigger">CDDDept</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">signTime</Property>
              <Property name="property">signTime</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">pledgeStart</Property>
              <Property name="property">pledgeStart</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">pledgeEnd</Property>
              <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">status</Property>
              <Property name="property">status</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">createBy</Property>
              <Property name="property">createBy</Property>
              <Property name="readOnly">true</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">createTime</Property>
              <Property name="property">createTime</Property>
              <Property name="readOnly">true</Property>
              <Editor/>
            </AutoFormElement>
            <HtmlContainer layoutConstraint="colSpan:3">
              <Property name="content">1.当前单据仅作为当前系统业务信息登记使用,不作为实际双方合约约束。&lt;br>&#xD;
2.当前单据默认支持为1个合约对应1个库区,如果同时对应多个库区请数据登记。&lt;br>&#xD;
3.质押状态如果=解压,系统对应催办提醒等功能自动完成。&lt;br></Property>
              <Property name="exClassName">h-tip</Property>
              <Property name="contentOverflow">hidden</Property>
            </HtmlContainer>
          </AutoForm>
        </Container>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="saveAction">
      <Property name="dataResolver">pledgeContractPR#saveUpdate</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDelData">
      <Property name="confirmMessage">确定要删除数据么?</Property>
      <Property name="service">pledgeContractPR#delete</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>
    <CustomDropDown id="CDDDept">
      <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;#dsDeptSelect&quot;).set(&quot;parameter&quot;,entity.get(&quot;pledgeDept&quot;)).flushAsync();&#xD;
    }
}</ClientEvent>
      <Property name="minWidth">400</Property>
      <Property name="minHeight">400</Property>
      <Property name="assignmentMap">depotIds=depotIds,depotNames=depotNames</Property>
      <Panel>
        <Property name="showCaptionBar">false</Property>
        <Buttons>
          <Button>
            <ClientEvent name="onClick">var selection = view.get(&quot;#dgDepotSelect&quot;).get(&quot;selection&quot;);&#xD;
if(!selection || selection.length == 0){&#xD;
    $alert(&quot;请选择仓库&quot;);&#xD;
    return;&#xD;
}&#xD;
&#xD;
var depotIds = &quot;&quot;,depotNames=&quot;&quot;;&#xD;
selection.each(function(item){&#xD;
    depotIds += item.get(&quot;id&quot;)+&quot;,&quot;;&#xD;
    depotNames+=item.get(&quot;name&quot;)+&quot;,&quot;;&#xD;
});&#xD;
&#xD;
view.get(&quot;#CDDDept&quot;).close({depotIds:depotIds,depotNames:depotNames});</ClientEvent>
            <Property name="caption">确认选择</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">view.get(&quot;#CDDDept&quot;).close({});&#xD;
                view.get(&quot;#dgDepotSelect&quot;).set(&quot;selection&quot;,null);</ClientEvent>
            <Property name="caption">取消操作</Property>
          </Button>
        </Buttons>
        <Children>
          <DataSet id="dsDeptSelect">
            <Property name="dataType">[dtDepot]</Property>
            <Property name="dataProvider">depotPR#getData</Property>
            <Property name="userData">库区列表下拉框</Property>
            <Property name="loadMode">manual</Property>
          </DataSet>
          <DataGrid id="dgDepotSelect">
            <Property name="dataSet">dsDeptSelect</Property>
            <Property name="selectionMode">multiRows</Property>
            <RowSelectorColumn>
              <Property name="caption">选择</Property>
              <Property name="width">50</Property>
            </RowSelectorColumn>
            <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/>
      </Panel>
    </CustomDropDown>
  </View>
</ViewConfig>