czt
2026-01-21 f1e70d3246fe269cfa5d2353efbeee8c91061f3b
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
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtWorkConf">
      <Property name="creationType">com.fzzy.work.domain.WorkOrderConf</Property>
      <PropertyDef name="id">
        <Property></Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">所属库区</Property>
        <Property name="required">true</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#getDeptByUserType&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">kqmc</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="bizType">
        <Property></Property>
        <Property name="label">业务类型</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;workOrderPR#triggerType&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="valTag">
        <Property></Property>
        <Property name="label">启用流程</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerYN&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="required">true</Property>
        <Property name="defaultValue">N</Property>
      </PropertyDef>
      <PropertyDef name="nodeName1">
        <Property></Property>
        <Property name="label">节点名称</Property>
      </PropertyDef>
      <PropertyDef name="nodeVal1">
        <Property></Property>
        <Property name="label">是否有效</Property>
      </PropertyDef>
      <PropertyDef name="nodeName2">
        <Property></Property>
        <Property name="label">节点名称</Property>
      </PropertyDef>
      <PropertyDef name="nodeVal2">
        <Property></Property>
        <Property name="label">是否有效</Property>
      </PropertyDef>
      <PropertyDef name="nodeName3">
        <Property></Property>
        <Property name="label">节点名称</Property>
      </PropertyDef>
      <PropertyDef name="nodeVal3">
        <Property></Property>
        <Property name="label">是否有效</Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注信息</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
      </PropertyDef>
      <PropertyDef name="createBy">
        <Property></Property>
        <Property name="label">创建人</Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">创建时间</Property>
      </PropertyDef>
      <PropertyDef name="updateBy">
        <Property></Property>
        <Property name="label">修改人</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">修改时间</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">var deptId = &quot;${request.getParameter('deptId')}&quot;;&#xD;
&#xD;
query = function(){&#xD;
    view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,deptId).flushAsync();&#xD;
}&#xD;
query();&#xD;
&#xD;
&#xD;
addData = function(){&#xD;
    view.get(&quot;#dsMain&quot;).insert({&#xD;
        deptId:deptId&#xD;
    });&#xD;
    &#xD;
    //流程图&#xD;
    view.get(&quot;#iFrameFlow&quot;).set(&quot;path&quot;,&quot;work/flow-conf?id=&quot;)&#xD;
    &#xD;
    &#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}&#xD;
&#xD;
showDetail = function(){&#xD;
    var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
    //流程图&#xD;
    view.get(&quot;#iFrameFlow&quot;).set(&quot;path&quot;,&quot;work/flow-conf?id=&quot;+cur.get(&quot;id&quot;));&#xD;
    &#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}&#xD;
&#xD;
//流程图中节点启用禁用的方法&#xD;
onNodeValChange = function(nodes){&#xD;
    if(!nodes) return;&#xD;
    var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
    nodes.forEach(function(node,index){&#xD;
        if(&quot;node1&quot; == node.node){&#xD;
            if(node.val){cur.set(&quot;nodeVal1&quot;,&quot;Y&quot;);} else{cur.set(&quot;nodeVal1&quot;,&quot;N&quot;);}&#xD;
            cur.set(&quot;nodeName1&quot;,node.name);&#xD;
        }&#xD;
        if(&quot;node2&quot; == node.node){&#xD;
            if(node.val){cur.set(&quot;nodeVal2&quot;,&quot;Y&quot;);} else{cur.set(&quot;nodeVal2&quot;,&quot;N&quot;);}&#xD;
            cur.set(&quot;nodeName2&quot;,node.name);&#xD;
        }&#xD;
        if(&quot;node3&quot; == node.node){&#xD;
            if(node.val){cur.set(&quot;nodeVal3&quot;,&quot;Y&quot;);} else{cur.set(&quot;nodeVal3&quot;,&quot;N&quot;);}&#xD;
            cur.set(&quot;nodeName3&quot;,node.name);&#xD;
        }&#xD;
    });&#xD;
}&#xD;
</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtWorkConf]</Property>
      <Property name="dataProvider">workOrderPR#confList</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <Container>
      <Property name="className">c-data</Property>
      <ToolBar>
        <ToolBarButton>
          <ClientEvent name="onClick">addData();</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">showDetail();</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;#dsMain.data:#&quot;);
if (!data) {
    $alert(&quot;请选择数据&quot;);
    return;
}
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;);
        data.remove();
    }
});</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="deptId">
          <Property name="property">deptId</Property>
        </DataColumn>
        <DataColumn name="bizType">
          <Property name="property">bizType</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="valTag">
          <Property name="property">valTag</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="updateBy">
          <Property name="property">updateBy</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="updateTime">
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="remark">
          <Property name="property">remark</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Dialog id="dialogMain">
      <Property name="width">1100</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>
        <Container>
          <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">120</Property>
            <AutoFormElement layoutConstraint="colSpan:2">
              <Property name="name">deptId</Property>
              <Property name="property">deptId</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">bizType</Property>
              <Property name="property">bizType</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement layoutConstraint="colSpan:2">
              <Property name="name">remark</Property>
              <Property name="property">remark</Property>
              <Property name="editorType">TextArea</Property>
              <Editor/>
            </AutoFormElement>
            <AutoFormElement>
              <Property name="name">valTag</Property>
              <Property name="property">valTag</Property>
              <Editor/>
            </AutoFormElement>
          </AutoForm>
        </Container>
        <IFrame id="iFrameFlow">
          <Property name="path">work/flow-conf</Property>
          <Property name="height">280</Property>
          <Property name="width">100%</Property>
        </IFrame>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="saveAction">
      <Property name="dataResolver">workOrderPR#saveConf</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDelData">
      <Property name="confirmMessage">确定要删除数据么?</Property>
      <Property name="service">workOrderPR#deleteConf</Property>
    </AjaxAction>
  </View>
</ViewConfig>