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
| <!doctype html>
| <html>
| <head>
| <meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache">
| <title>字典</title>
| <script src="../../../js/vue/vue.js"></script>
| <script src="../../../js/vue/element-ui/lib/index.js"></script>
| <script src="../../../js/myelement.js?v=20220615"></script>
| <script src="../../../js/vue/page.js?v=20220615"></script>
| <script src="../setting.js"></script>
|
| <link href="../../../js/vue/element-ui/lib/theme-chalk/index.css" rel="stylesheet">
| <link href="../../../css/myelement.css?v=20220425" rel="stylesheet">
| <link href="../../../css/iconfont.css" rel="stylesheet">
| <link href="../../../css/page.css?v=20220425" rel="stylesheet">
| <link href="//at.alicdn.com/t/font_2374495_13ltsxm2eor.css" rel="stylesheet">
| </head>
|
| <body>
| <div id="vbody">
| <div id="page_root">
| <div class="topbar">
| <span>{{title}}</span>
|
| <div style="float: right; margin-right: 24px;">
| <el-button-group style="margin-left: 3px;">
| <el-button @click="addData">新增</el-button>
| <el-button @click="editData">修改</el-button>
| <el-button @click="delData">删除</el-button>
| </el-button-group>
| </div>
| </div>
|
| <div class="topbar-line">
| <div style="float: left; width: 100%;">
| <el-tabs v-model="activeName" @tab-click="handleClick">
| <el-tab-pane label="发货主体" name="1"></el-tab-pane>
| <el-tab-pane label="字典" name="2"></el-tab-pane>
| <el-tab-pane label="业务部门" name="3"></el-tab-pane>
| </el-tabs>
| </div>
|
| <div class="query-icon">
| <i class="iconfont icon-query"></i>
| </div>
| <div class="query-bar">
| <h-form-filter
| ref="form1"
| :form-attr="filterAttr"
| :table-fields="filterFields"
| :form-data="filterObj"
| :buttonloading="tableloading"
| :isbuttonquery="true"
|
| v-on:on-formchange="onQuery"
| v-on:show-popup="showFilterPopup"
| v-on:on-query="onQuery"
| v-on:on-init-query="onInitFilter"
| v-on:on-edit-query="onEditFilter"
| >
| </h-form-filter>
| </div>
| </div>
|
| <div class="versionNo">
| <h-table
| v-if="isRefresh"
| ref="table1"
| :tableloading="tableloading"
| :table-fields="tableFields"
| :table-data="tableData"
| :is-edit-table-data="isEditTableData"
| :pagesize="pagesize"
| :pagenum="pagenum"
| :total="total"
| :table-height="tableHeight"
| :is-highlight-row="true"
| :is-show-index="true"
|
| v-on:get-data="getData"
| v-on:edit-data="editData"
| v-on:del-data="delData"
| v-on:cell-click="cellClick"
| v-on:row-click="rowClick"
| >
| </h-table>
| </div>
| </div>
|
| <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 100vh;">
| <div class="spinner">
| <div class="cube1"></div>
| <div class="cube2"></div>
| </div>
| </div>
| </div>
|
| <script type="text/javascript">
| new ListVue({
| el: "#vbody",
| data: {
| pageAttr: {
| heightType: "page"
| },
|
| dataname: "delivery_message",
| orderby: "",
| tabname : "1",
| filterFields: [
| {isshow: "T", field: "delivery_part_code", name: "发货主体编码", fieldname:"", fieldtype: "like", type: ""},
| ],
| tableFields: [
| {isshow: "T", field: "code", name: "发货主体编码", disabled: true, width: "130"},
| {isshow: "T", field: "factory_code", name: "mdm编码"},
| {isshow: "T", field: "name", name: "发货主体名称", width: "130"},
| {isshow: "T", field: "short_name", name: "发货主体简称", width: "130"},
| {isshow: "T", field: "book_no", name: "U8账套号"},
|
|
| {isshow: "T", field: "sap", name: "是否sap",formatterjson:"{\"true\":\"是\",\"false\":\"否\"}"},
| {isshow: "T", field: "organization_code", name: "sap组织编码", width: "130"},
| {isshow: "T", field: "channel", name: "sap连接编码", width: "130"},
| {isshow: "T", field: "product_group_code", name: "sap产品组编码", width: "130"},
|
| {isshow: "T", field: "fw_code", name: "销管编码"},
| {isshow: "T", field: "revocation_address", name: "退货地址", width: "200"},
| {isshow: "T", field: "address", name: "地址", align: "left", width: "250"},
|
| {isshow: "T", field: "bank_name", name: "银行", align: "left", width: "250"},
| {isshow: "T", field: "bank_no", name: "卡号", width: "200"},
| {isshow: "T", field: "phone", name: "电话"},
| {isshow: "T", field: "uscc", name: "USCC", width: "200"},
|
|
| {isshow: "T", field: "only_open", name: "是否开启", width: "80",formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| {isshow: "T", field: "only_sales", name: "是否销售", width: "80" ,formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| {isshow: "T", field: "is_poxy", name: "是否代理", width: "80" ,formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| {isshow: "T", field: "approve_node", name: "是否新增产品", width: "150" ,formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| {isshow: "T", field: "has_gsp", name: "是否gsp证书", width: "150" ,formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| // {isshow: "F", field: "is_poxy", name: "是否代理", width: "150",formatter:"formatter_agreeStatus"},
| ],
|
| filterAttr: {
| columnnumber: 3,
| labelwidth: "130px",
| labelposition: "right",
| size: "medium",
| border: "0px solid #c6c6c600",
| },
| dataRequest: [
| {
| isClientMode: false,
| code: "code",
| label: "name",
| name: "name",
| dataname: "dict_message",
| },
| ],
| dataRequestObj: {},
| title: "字典管理",
| activeName: "1",
| },
| created() {
| var me = this;
| },
| mounted() {
| var me = this;
|
| this.initData();
| this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
| hideLoading();
| });
| },
| methods:{
| initData() {
| this.onQuery();
| },
|
| onServerInitData(data) {
| var me = this.data;
|
| if(me.filterFields.length > 0) {
| me.filterFields.map(e=>{
| me.filterFieldsObj[e.field] = e;
| });
| }
| if(me.tableFields.length > 0) {
| me.tableFields.map(e=>{
| me.tableFieldsObj[e.field] = e;
| });
|
| }
| },
|
| handleClick(tab) {
| var me = this;
|
| this.filterObj = {}
|
| if (tab.name == "1") {
| this.filterTxt = "";
| this.dataname = "delivery_message";
|
| this.filterFields = [
| {isshow: "T", field: "delivery_part_code", name: "发货主体编码", fieldname:"", fieldtype: "like", type: ""},
| ]
| this.tableFields = [
| {isshow: "T", field: "code", name: "发货主体编码", disabled: true, width: "130"},
| {isshow: "T", field: "factory_code", name: "mdm编码"},
| {isshow: "T", field: "name", name: "发货主体名称", width: "130"},
| {isshow: "T", field: "short_name", name: "发货主体简称", width: "130"},
| {isshow: "T", field: "book_no", name: "U8账套号"},
|
|
| {isshow: "T", field: "sap", name: "是否sap",formatterjson:"{\"true\":\"是\",\"false\":\"否\"}"},
| {isshow: "T", field: "organization_code", name: "sap组织编码", width: "130"},
| {isshow: "T", field: "channel", name: "sap连接编码", width: "130"},
| {isshow: "T", field: "product_group_code", name: "sap产品组编码", width: "130"},
|
| {isshow: "T", field: "fw_code", name: "销管编码"},
| {isshow: "T", field: "revocation_address", name: "退货地址", width: "200"},
| {isshow: "T", field: "address", name: "地址", align: "left", width: "250"},
|
| {isshow: "T", field: "bank_name", name: "银行", align: "left", width: "250"},
| {isshow: "T", field: "bank_no", name: "卡号", width: "200"},
| {isshow: "T", field: "phone", name: "电话"},
| {isshow: "T", field: "uscc", name: "USCC", width: "200"},
|
|
| {isshow: "T", field: "only_open", name: "是否开启", width: "80",formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| {isshow: "T", field: "only_sales", name: "是否销售", width: "80" ,formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| {isshow: "T", field: "is_poxy", name: "是否代理", width: "80" ,formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| {isshow: "T", field: "approve_node", name: "是否新增产品", width: "150" ,formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| {isshow: "T", field: "has_gsp", name: "是否gsp证书", width: "150" ,formatterjson:"{\"true\":\"是\",\"false\":\"否\"}", type: "select", options: [{label:"是",value:"true"},{label:"否",value:"false"}],defaultval:""},
| ]
| }
| else if (tab.name == "2") {
| this.filterTxt = "";
| this.dataname = "dict_message";
| this.tabname= "2";
| this.filterFields = [
| {isshow: "T", field: "item_code", name: "编码", fieldname:"", fieldtype: "like", type: ""},
| {isshow: "T", field: "value", name: "显示名称", fieldname:"", fieldtype: "like", type: ""},
| {isshow: "T", field: "name", name: "上级名称", type: "select", options: [{label:"业务线",value:"业务线"},{label:"商业属性",value:"商业属性"},{label:"兑付时间",value:"兑付时间"},{label:"控制类型",value:"控制类型"},{label:"客户身份",value:"客户身份"},{label:"客户主体",value:"客户主体"},{label:"客户类型",value:"客户类型"},{label:"资信状态",value:"资信状态"},{label:"经销商商业评级",value:"经销商商业评级"},{label:"经销商等级",value:"经销商等级"},{label:"经销商状态",value:"经销商状态"},{label:"发货主体",value:"发货主体"},{label:"按需类型",value:"按需类型"},{label:"许可证类型清单",value:"许可证类型清单"},{label:"管理主体",value:"管理主体"},{label:"营销公司",value:"营销公司"},{label:"业务类型",value:"业务类型"},{label:"税率",value:"税率"},{label:"资质冻结类型",value:"资质冻结类型"},{label:"生产计划类型",value:"生产计划类型"},{label:"商返类型",value:"商返类型"},{label:"销售公司",value:"销售公司"},{label:"销售类型",value:"销售类型"},{label:"结算类型",value:"结算类型"},{label:"中标类型",value:"中标类型"}]},
| ]
| this.tableFields = [
| {isshow: "T", field: "item_code", name: "编码", width: "200"},
| {isshow: "T", field: "value", name: "显示名称", align: "left"},
| {isshow: "T", field: "parent_id", name: "上级ID", width: "200"},
| {isshow: "T", field: "name", name: "上级名称", align: "left"},
| ]
| }
| else if (tab.name == "3") {
| this.filterTxt = "";
| this.dataname = "department";
| this.tabname= "3";
| this.filterFields = [
| {isshow: "T", field: "name", name: "业务部门名称", fieldname:"", fieldtype: "like", type: ""},
| ]
| this.tableFields = [
| {isshow: "T", field: "code", name: "编码", width: "200"},
| {isshow: "T", field: "name", name: "名称", align: "left"},
| {isshow: "T", field: "line_type", name: "业务类型", align: "left"},
| ]
| }
| if(me.filterFields.length > 0) {
| me.filterFields.map(e=>{
| me.filterFieldsObj[e.field] = e;
| });
| }
| if(me.tableFields.length > 0) {
| me.tableFields.map(e=>{
| me.tableFieldsObj[e.field] = e;
| });
|
| }
|
| this.onQuery();
| },
|
| onAddData(config) {
| var me = this;
|
| config.combine({
| url: "../md/plan/dictionary_edit.html?v=2",
| sceneCode: "add",
| data: {},
| delta: {type: me.activeName},
| callback: function(obj) {
| me.onQuery();
| }
| });
|
| return true;
| },
|
| onEditData(config, scope) {
| var me = this;
| var row = this.selectedrow;
|
| //1. empty row
| if (!row || !row.id) {
| Root.message({
| type: 'warning',
| message: '请选择要编辑的数据'
| });
| return false;
| }
|
| //2. popup
| config.combine({
| url: "../md/plan/dictionary_edit.html",
| sceneCode: "edit",
| data: row,
| delta: {type: me.activeName},
| callback: function(obj) {
| me.onQuery();
| }
| });
|
| return true;
| },
|
| onDelData() {
| let me = this
| let id;
| tabname = this.tabname;
| if (tabname == "2"){
| id = this.selectedrow.syt_id
| }else{
| id = this.selectedrow.id
| }
| let row = this.selectedrow;
|
| let name_ = "该数据";
|
| if (!this.dataname) {
| Root.message({
| type: 'warning',
| message: '该事件需指定数据对象'
| });
| return
| }
| if (!row.id) {
| Root.message({
| type: 'warning',
| message: '该事件需存在数据ID'
| });
| return
| }
|
| Root.confirm('确定删除' + name_ + '吗?', '删除提示', {
| confirmButtonText: '删除',
| cancelButtonText: '取消',
| type: 'warning'
| }).then(() => {
| let param = {
| id: id,
| isClientMode: false,
| dataname: this.dataname,
| }
| Server.call("root/data/deleteEntity", param, function(result) {
| console.log(result);
| if (tabname == "1"){
| let param2 = {
| filter:{
| delivery_part_code: row.code
| },
|
| isClientMode: false,
| dataname: "delivery_invoice_mapping",
| }
| Server.call("root/data/deleteEntitySet", param2, function(result) {
|
| });
|
| }
| Root.message({
| type: 'success',
| message: '删除成功!'
| });
| me.doQuery();
| });
| }).catch(() => {
| Root.message({
| type: 'info',
| message: '已取消删除'
| });
| });
| }
| }
| });
|
| </script>
| <style>
|
| </style>
| </body>
| </html>
|
|