tom
2023-12-06 9e968679ed2e6937aeb7b50a6c450d5d19251f42
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
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
    <!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>商业审批</title>
        <script src="../../../js/vue/vue.js"></script>
        <script src="../../../js/vue/element-ui/lib/index.js"></script>
        <script src="../../../js/myelement.js"></script>
        <script src="../../../js/vue/page.js"></script>
        <script src="../setting.js"></script>
        
        <link href="../../../js/vue/element-ui/lib/theme-chalk/index.css" rel="stylesheet">
        <link href="../../../css/myelement.css" rel="stylesheet">
        <link href="../../../css/iconfont.css" rel="stylesheet">
        <link href="../../../css/page.css" 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 style="float: left; margin-right: 24px;">{{title}}</span>
                    
                    <div style="float: right; margin-right: 24px;">
                        <el-button-group style="margin-left: 3px;">
                            <!-- 
                            <el-button v-if="buttons.openanaccount" :disabled="buttons.openanaccount.disabled" @click="acct_mapping('add')">新增商业</el-button>
                            <el-button v-if="buttons.openanaccount" :disabled="buttons.openanaccount.disabled" @click="acct_mapping('edit', 'acctstate', 'input')">开户</el-button>
                            <el-button v-if="buttons.openanaccount" :disabled="buttons.openanaccount.disabled" @click="h_procedure_act('acctstate', 'input', 'working', 'md_description', '开户', '等待审批中', 'customeracct')">开户提交</el-button> 
                             -->
                            <el-button :disabled="!selectedrow.id" @click="acct_mapping('browse')">查看商业</el-button>
                            <el-button v-if="selectedrow.id && activeNamezz != 'records'" @click="approvalData('register_state')">审 批</el-button>
                        </el-button-group>
                    </div>
                </div>
            
                <div class="topbar-line">
                    <div style="float: left; width: 100%;">
                        <el-tabs v-model="activeNamezz" @tab-click="handleClick">
                            <el-tab-pane label="全部审批" name="0"></el-tab-pane>
                            <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-tab-pane label="激活审批" name="4"></el-tab-pane>
                            <el-tab-pane label="审批历史" name="records"></el-tab-pane>
                            
                        </el-tabs>
                    </div>
                    
                    <div class="query-icon">
                        <i class="iconfont icon-query"></i>
                    </div>
                    <div v-show="activeNamezz != 'records'" class="query-bar">
                        <h-form-filter ref="form1" 
                            :form-attr="filterAttr" 
                            :table-fields="filterFields" 
                            :form-data="filterObj" 
                            :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 v-show="activeNamezz == 'records'" class="query-bar">
                        <h-form-filter ref="form_records" 
                            :form-attr="filterAttr" 
                            :table-fields="filterFields" 
                            :form-data="filterObj" 
                            :isbuttonquery="false"
                            
                            v-on:on-formchange="onQueryApprovalRecords" 
                            v-on:show-popup="showFilterPopup"
                            v-on:on-query="onQueryApprovalRecords"
                            v-on:on-init-query="onInitFilterApprovalRecords"
                            v-on:on-edit-query="onEditFilter"
                            >
                        </h-form-filter>
                    </div>
                </div>
                
                <div v-show="activeNamezz != 'records'" class="versionNo">
                    <h-table
                        v-if="isRefresh"
                        ref="table1"
                        :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 v-show="activeNamezz == 'records'" class="versionNo">
                    <h-table
                        v-if="isRefresh"
                        ref="table_records"
                        :table-fields="tableFields_records" 
                        :table-data="tableData_records" 
                        :is-edit-table-data="isEditTableData"
                        :pagesize="pagesize"
                        :pagenum="pagenum"
                        :total="total"
                        :table-height="tableHeight_records"
                        :is-highlight-row="true"
                        :is-show-index="true"
                        
                        v-on:get-data="getApprovalRecordsData"
                        v-on:cell-click="cellClickRecords"
                        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">
            var setting = getSetting("customer_list");
            var initlized = false;
            
            new ListVue({
                el: "#vbody",
                data: {
                    pageAttr: {
                        heightType: "page"
                    },
                    dataname: "customerDeliveryApprove",//"agCustomerDeliveryLine",
                    orderby: "cdm.update_time desc, cdm.customer_uscc",
                    
                    tabaleFieldsName: "customer_factory_approval",
                    filterFieldsName: "customer_acct_approval",
                    
                    filterObjBydefault: {
                        emp_code: localStorage.getItem("emp_code"),
                        status: "working"
                    },
                    dataRequest: [
                        {
                            isClientMode: false,
                            code: "code",
                            label: "name",
                            name: "hierarchy",
                            filter: "long_code like '01!0101!010102!010102628!01010218!20210420-0001%'"
                        },
                        {
                            isClientMode: false,
                            code: "code",
                            label: "name",
                            name: "division_level1",
                            filter: " level='1' and active='1'"
                        },
                        {
                            isClientMode: false,
                            code: "code",
                            label: "name",
                            name: "deliveryOrganizationOpen",
                        }
                    ],
                    dataRequestObj: {},
                    
                    filterAttr: {
                        columnnumber: 4,
                        labelwidth: "130px",
                        labelposition: "right",
                        size: "medium",
                        border: "0px solid #c6c6c600",
                    },
                    tableHeight: 350,
                    title: "商业审批",
                    page: setting.page,
                    buttons: setting.buttons,
                    
                    provinces: [],
                    activeNamezz: "0",
                    
                    total_tab0: 0,
                    total_tab1: 0,
                    total_tab2: 0,
                    total_tab3: 0,
                    total_tab4: 0,
                    total_tabrecords: 0,
                    
                },
                created() {
                    this.getdlempcode("accountCustomerDelivery");//根据流程获取代理人员,设置this.dl_emp_codestrs
                },
                mounted() {
                    var me = this;
                    if (this.dataRequest.length) {
                        var result = {};
                        this.loadRequestData(this.dataRequest, result, function(data) {
                            me.dataRequestObj = data;
                            
                            if (me.tableFields.length) {
                                var tableFields_ = clone(me.tableFields);
                                tableFields_.map(fieldObj_=>{
                                    if (fieldObj_.field == "delivery_part_code") {
                                        fieldObj_.formatterjson = me.dataRequestObj.map.deliveryOrganizationOpen;
                                    }
                                    if (fieldObj_.field == "customer_part_code") {
                                        fieldObj_.formatterjson = me.dataRequestObj.map.dictitem;
                                    }
                                    
                                    if (fieldObj_.field == "province") {
                                        fieldObj_.formatterjson = me.dataRequestObj.map.division_level1;
                                    }
                                    if (fieldObj_.field == "record_province") {
                                        fieldObj_.formatterjson = me.dataRequestObj.map.division_level1;
                                    }
                                    
                                    me.tableFieldsObj[fieldObj_.field] = fieldObj_;
                                });
                                me.tableFields = tableFields_;
                            }
                            
                            if(me.filterFields.length > 0) {
                                var filterFields_ = clone(me.filterFields);
                                filterFields_.map(e=>{
                                    if(e.field == "dep_code") {
                                        e.options = me.dataRequestObj.hierarchy;
                                    }
                                    if(e.field == "record_province") {
                                        e.options = me.dataRequestObj.division_level1;
                                    }
                                    if(e.field == "delivery_part_code") {
                                        e.options = me.dataRequestObj.deliveryOrganizationOpen;
                                    }
                                    me.filterFieldsObj[e.field] = e;
                                });
                                
                                me.filterFields = filterFields_;
                            }
                            
                            /* if (me.tableFields.length) {
                                var tableFields_ = clone(me.tableFields);
                                tableFields_.map(fieldObj_=>{
                                    if (fieldObj_.field == "delivery_part_code") {
                                        fieldObj_.formatterjson = me.dataRequestObj.deliveryOrganizationOpen;
                                        me.dataRequestObj.deliveryOrganizationOpen.map(e=>{
                                            if (!me.dataRequestObj.map) {
                                                me.dataRequestObj.map = {};
                                            }
                                            if (!me.dataRequestObj.map.deliveryOrganizationOpen) {
                                                me.dataRequestObj.map.deliveryOrganizationOpen = {};
                                            }
                                            me.dataRequestObj.map.deliveryOrganizationOpen[e.code] = e.name;
                                        })
                                    }
                                    if (fieldObj_.field == "customer_part_code") {
                                        fieldObj_.formatterjson = me.dataRequestObj.dictitem;
                                        me.dataRequestObj.dictitem.map(e=>{
                                            if (!me.dataRequestObj.map) {
                                                me.dataRequestObj.map = {};
                                            }
                                            if (!me.dataRequestObj.map.dictitem) {
                                                me.dataRequestObj.map.dictitem = {};
                                            }
                                            me.dataRequestObj.map.dictitem[e.code] = e.value;
                                        })
                                    }
                                    
                                    me.tableFieldsObj[fieldObj_.field] = fieldObj_;
                                })
                                
                                me.tableFields = tableFields_;
                            } */
                            me.initData();
                        });
                    }
                    else {
                        this.initData();
                    }
                    this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
                        hideLoading();
                    });
                },
                methods:{
                    initData() {
                        //1. run only
                        if (initlized) { return; }
                        initlized = true;
                      
                        //2. query data
                        this.filterTxt = "cdm.used = 1";
                        
                        var total_tab = "total_tab" + this.activeNamezz;
                        this.totaltab = total_tab;
                        this.onQuery(total_tab);
                    },
                    
                    /* getInitData() {
                        var me = this;
                        var dataname_mapping = "agCustomerDeliveryLine";//"delivery_mapping";
                        
                        let param_table = {
                            isClientMode: false,
                            dataname: dataname_mapping,
                            filter: "customer_id = '" + this.acctObj.id + "'",
                        }
                        
                        Server.call("root/data/getEntitySet", param_table, function(result_) {
                            console.log(result_);
                            if (result_ && result_.data) {
                                me.tableData2= result_.data.entityset;
                            }
                        });
                        
                    }, */
                    
                    onServerInitData(data) {
                        var me = this.data;
                        me.tableFields = data.tableFields;
                        me.filterFields = data.filterFields;
                        
                        if(me.filterFields.length > 0) {
                            me.filterFields.map(e=>{
                                me.filterFieldsObj[e.field] = e;
                            });
                        }
                    },
                    
                    onshowFilterPopup(filter) {
                        var me = this;
                        var fieldObj_ = filter.obj;
                        var filterValue = clone(me.filterObj);
                        var field_ = fieldObj_.field;
                        
                        if (field_ == "operator_code") {
                            Root.showPopup({
                                url: "../md/customer/popup/employee_list.html",
                                delta: {
                                    isvemployeeall: true
                                },
                                width: 800,
                                height: 550,
                                callback: function(result, callback) {
                                    filterValue[field_] = result.row.md_description;
                                    if (fieldObj_.valfield) {
                                        filterValue[fieldObj_.valfield] = result.row.md_code;
                                    }
                                    
                                    me.filterObj = filterValue;
                                    if (callback) {
                                        callback();
                                    }
                                }
                            });
                            
                        }
                    },
                    
                    handleClick(tab) {
                        var me = this;
                        var total_tab = "total_tab" + tab.name;
                        this.totaltab = total_tab;
                        
                        if (tab.name == "0") {
                            //AND cdm.active = 0
                            this.filterTxt = "cdm.used = 1";
                        }
                        else if (tab.name == "1") {
                            this.filterTxt = "cdm.old_id is null";
                        }
                        else if (tab.name == "2") {
                            this.filterTxt = "cdm.old_id is not null and flow_type = 0";
                        }
                        else if (tab.name == "3") {
                            this.filterTxt = "cdm.used = 1 and flow_type = 1 and cdm.freeze = 1";
                        }
                        else if (tab.name == "4") {
                            this.filterTxt = "cdm.used = 1 and flow_type = 1 and cdm.freeze = 0";
                        }
                        
                        if (tab.name == "records") {
                            /* 
                             business_id: "d0557eaf6c714edba1b831b2e41b9209"
                             business_type: "accountCustomerDelivery"
                             end_time: "2021-08-20 07:54:23"
                             flow_id: "4fc1b2b0c3574912bb91b2c08edfb982"
                             node_name: "商务准入部经理"
                             start_time: "2021-08-20 07:54:10"
                             status: "open"
                             submit_user_id: "0"
                             submit_user_name: "admin"
                             
                             {isshow: "T", field: "status", name: "发货主体状态", width: "120", iscellclick: true, formatter: "formatter_OrderState", clickContext: {type: "popup", width: 1200, url: "", sceneCode: "browse", delta: null}},
                             {isshow: "T", field: "md_code", name: "商业编码", width: "120"},
                             {isshow: "T", field: "md_description", name: "商业名称", width: "240", align: "left"},
                             {isshow: "T", field: "uscc", name: "统一社会信用代码", width: "200"},
                             {isshow: "T", field: "province", name: "商业省份", width: "120"},
                             {isshow: "T", field: "delivery_part_code", name: "发货主体", width: "240"},
                             {isshow: "T", field: "customer_part_name", name: "客户主体", width: "120"},
                             {isshow: "T", field: "business_type", name: "商业属性", width: "120", formatterjson: "{\"1\": \"直管\", \"2\": \"非直管\"}"},
                             {isshow: "T", field: "customer_identity", name: "客户身份", formatterjson: "{\"1\": \"经销\", \"2\": \"分销\", \"3\": \"直销\"}"},
                             {isshow: "T", field: "business_operate_code", name: "操作人编码", width: "120"},
                             {isshow: "T", field: "business_operate_name", name: "商业操作人", width: "120"},
                             {isshow: "T", field: "remark", name: "备案原因", type:"input"},
                             
                             */
                             var tableFields_records_ = [
                               {isshow: "T", field: "act_end_time", name: "审批时间", width: "180"},
                               {isshow: "T", field: "act_node_name", name: "审批节点", width: "120"},
                               {isshow: "T", field: "act_status", name: "状态", formatter: "formatter_OrderState", iscellclick: true, clickContext: {type: "popup", width: 1200, url: "", sceneCode: "browse", delta: null}},
                               {isshow: "T", field: "submit_user_name", name: "提交人", width: "100"},
                               
                               {isshow: "T", field: "md_code", name: "商业编码", width: "100"},
                               {isshow: "T", field: "md_description", name: "商业名称", width: "200", align: "left"},
                               {isshow: "T", field: "old_code", name: "EAS编码", width: "100", align: "left"},
                               {isshow: "T", field: "uscc", name: "统一社会信用代码", width: "200"},
                               {isshow: "T", field: "delivery_part_code", name: "发货主体", width: "200", align: "left"},
                               {isshow: "T", field: "customer_part_name", name: "客户主体", width: "120"},
                               {isshow: "T", field: "business_operate_name", name: "操作人", width: "120"},
                               {isshow: "T", field: "business_operate_code", name: "操作人编码", width: "120"},
                               {isshow: "T", field: "business_type", name: "商业属性", width: "120", formatterjson: "{\"1\": \"直管\", \"2\": \"非直管\"}"},
                               {isshow: "T", field: "customer_identity", name: "客户身份", formatterjson: "{\"1\": \"经销\", \"2\": \"分销\", \"3\": \"直销\"}"},
                               
                               {isshow: "T", field: "remark", name: "备案原因", width: "320"},
                            ]
                            
                            tableFields_records_.map(e=>{
                                if (e.field == "delivery_part_code") {
                                    e.formatterjson = me.dataRequestObj.map.deliveryOrganizationOpen;
                                }
                                if (e.field == "customer_part_code") {
                                    e.formatterjson = me.dataRequestObj.map.dictitem;
                                }
                                
                                me.tableFieldsObj_records[e.field] = e;
                            });
                            
                            this.tableFields_records = tableFields_records_;
                            this.paramRecordsObjBydefault = {
                                linkId: "id"
                            };
                            this.dataname_records = "getCustomerDeliveryHistory";
                            
                            this.approvaltype = "accountCustomerDelivery";
                            this.filterTxt = " a.act_business_type in ('accountCustomerDelivery', 'deliveryFreeze') and a.act_end_time is not null and a.act_assignee in ('" + localStorage.getItem("emp_code") + "', '" + localStorage.getItem("emp_id") + "', '" + localStorage.getItem("id") + "'" + me.dl_emp_codestrs + ")";//(a.act_assignee='" + localStorage.getItem("emp_code") + "' or a.act_assignee='" + localStorage.getItem("id") + "')
                            this.approvalfields = ["*"]//["md_description", "uscc", "delivery_part_code"];
                            this.onQueryApprovalRecords(total_tab);
                        }
                        else {
                            this.onQuery(total_tab);
                        }
                    },
                    
                    onAddData(config) {
                        var me = this;
                        
                        config.combine({
                            url: "../md/customer/customer_edit.html",
                            sceneCode: "add",
                            data: {},
                            delta: {},
                            callback: function(obj) {
                                me.saveRowTable_popup(obj);
                            }
                        });
                        
                        return true;
                    },
                    
                    onEditData(config, scope) {
                        var me = this;
                        var row = scope.row;
                        
                        //1. empty row
                        if (!row || !row.id) {
                            Root.message({
                                type: 'warning',
                                message: '请选择要编辑的数据'
                            });  
                            return false;
                        }
                            
                        //2. not input
                        if (row.state != "input") {
                            Root.message({
                                type: 'warning',
                                message: "当前数据不是输入状态"
                            })
                            return false;
                        }
                        
                        //3. popup                    
                        config.combine({
                            url: "../md/customer/customer_edit.html",
                            sceneCode: "edit",
                            data: row,
                            delta: {},
                            callback: function(obj) {
                                me.saveRowTable_popup(obj);
                            }
                        });
                        
                        return true;
                    },
                    
                    onApproveData(config, code) {
                        var me = this;
                        var row = this.selectedrow;
                        
                        //1. empty row
                        if (!row || !row.id) {
                            Root.message({
                                type: 'warning',
                                message: '请选择要审批的数据'
                            });  
                            return false;
                        }
                        
                        //2 check state
                        var field_, url_;
                        if (code == "data_state") {
                            field_ = "state";
                            url_ = "../md/customer/customer_edit.html";
                        }
                        else if (code == "register_state") {
                            field_ = "statecode";
                            url_ = "../md/customer/account_open.html";
                        }
                            
                        var state = row[field_];
                        
                        /* if ("working" != state) {
                            Root.message({
                                type: 'warning',
                                message: "当前数据不是【审批中】状态"
                            })
                            return false;
                        } */
                        
                        //3. popup
                        config.combine({
                            url: url_,
                            sceneCode: "approval",
                            data: row,
                            delta: {},
                            callback: function(obj) {
                                me.saveRowTable_popup(obj);
                            }
                        })
                        return true;
                    },
                    
                    onCellClick(config, obj) {
                        var clickContext = this.selectCellField.clickContext;
                        
                        if(this.selectCellField.field == "status" && obj.row.flow_id){
                            /* clickContext.url = "";
                            if(obj.row.status != 'input' && obj.row.flow_id){
                                clickContext.url = window.top.RootSetting.url_act +  "act/diagram/" + obj.row.flow_id;
                            } */
                            clickContext.hide_close = true;
                            clickContext.url = "../approval/ApprovalList.html";//Approval_flowid
                            var part_type_ = "";
                            if(obj.row.part_type) {
                                part_type_ = "-" + obj.row.part_type;
                            }
                            
                            clickContext.delta = {
                                flow_id: obj.row.flow_id,
                                title: obj.row.md_description + "-" + obj.row.delivery_part_name + part_type_
                            }
                            
                            clickContext.width = "75vw";
                            clickContext.height = "65vh";
                            clickContext.hide_close = true;
                        }
                        
                        if(this.selectCellField.field == "act_status" && obj.row.flow_id){
                            clickContext.hide_close = true;
                            clickContext.url = "../approval/ApprovalList.html";
                            clickContext.delta = {
                                flow_id: obj.row.flow_id,
                                title: obj.row.md_description + "-" + obj.row.delivery_part_name
                            }
                            
                            clickContext.width = "75vw";
                            clickContext.height = "65vh";
                            clickContext.hide_close = true;
                        }
                        
                        if (clickContext && clickContext.type == "popup" && clickContext.url) {
                            config.combine({
                                hide_close: clickContext.hide_close,
                                url: clickContext.url,
                                sceneCode: clickContext.sceneCode,
                                data: obj.row,
                                delta: clickContext.delta ? clickContext.delta : {},
                                width: clickContext.width,
                                height: clickContext.height,
                            })
                        }
                        else {
                            return false;
                        }
                        
                        return true;
                    },
                    
                    acct_mapping(type) {
                        let me = this;
                        let row = {};
                        var text_ = "查看商业";
                        var id_ = "newacct";
                        var sceneCode_ = "add";
                        
                        row = clone(this.selectedrow);
                        sceneCode_ = type;
                        text_ = row.md_description;
                        id_ = "acct" + row.id;
                        
                        var config = {
                            totab: true,
                            width: "1500px",
                            icon: "icon-product",
                            text: text_,
                            id: id_,
                            url: "../md/customer/customer_acct.html?v=1",
                            sceneCode: sceneCode_,
                            data: row,
                            delta: "",
                            callback: function(obj, callback) {
                                if (callback) {
                                    callback();
                                }
                            }
                        };
                        this.doPopupByPublic(config);
                    },
                    
                    consignee_mapping(){
                        var row = this.selectedrow;
                        var row_ ;
                        let me = this;
                        if (!row.id) {
                            Root.message({
                                type: 'warning',
                                message: '请先选择一条数据'
                            })
                            return;
                        }
                        
                        Root.popupParames = {
                            width: "900px",
                            //height: "580px",
                            url: "../md/customer/consignee_mapping.html",
                             callback: function(obj, callback) {
                                if (callback) {
                                    callback();
                                }
                            } 
                        };
                        
                        Root.popupParames.data = row; 
                        Root.showPopup(Root.popupParames);
                        
                    },
                    invoice_mapping(){
                        var row = this.selectedrow;
                        
                        if (!row.id) {
                            Root.message({
                                type: 'warning',
                                message: '请先选择一条数据'
                            })
                            return;
                        }
                        
                    },
                    licence_mapping(){
                        var row = this.selectedrow;
                        
                        if (!row.id) {
                            Root.message({
                                type: 'warning',
                                message: '请先选择一条数据'
                            })
                            return;
                        }
                        Root.popupParames = {
                            width: "900px",
                            //height: "580px",
                            url: "../md/customer/licence_mapping.html",
                             callback: function(obj, callback) {
                                if (callback) {
                                    callback();
                                }
                            } 
                        };
                        
                        Root.popupParames.data = row; 
                        Root.showPopup(Root.popupParames);
                        
                        
                    },
                    //绑定审批流程的
                    h_procedure_act(field_, original_val, new_val, confirm_field, confirm_type, success_val) {
                        var row = this.selectedrow;
                        
                        if (!row.field1) {
                            Root.message({
                                type: 'warning',
                                message: '请先选择一条数据'
                            })
                            return;
                        }
                        
                        if (row && row[field_] != original_val) {
                            Root.message({
                                type: 'warning',
                                message: row[field_]
                            })
                            return;
                        }
                        
                        Root.confirm('确定' + confirm_type + '-' + row[confirm_field] + '-吗?', confirm_type + '提示', {
                            confirmButtonText: confirm_type,
                            cancelButtonText: '取消',
                            type: 'warning'
                        }).then(() => {
                            if (field_ == "field10") {//提交审批
                                
                            }
                            else if (field_ == "field15") {//提交开户提交审批
                                
                            }
                            
                            this.selectedrow[field_] = new_val;
                            window.top.setAlertNum();
                            Root.message({
                                type: 'success',
                                message: success_val
                            });
                        }).catch(() => {
                            Root.message({
                                type: 'info',
                                message: '已取消'
                            });          
                        });
                    },
                    approvalData() {
                        let me = this;
                        var row = this.selectedrow;
                        var text_ = row.md_description + row.delivery_part_name;
                        var id_ = "approval_acct" + row.id;
                            /* this.getFormData(row); */
                        //activeNamezz
                        var delta_ = {};
                        
                        /* if (row.part_type && row.part_type != "") {
                            delta_ = {
                                act_type: "dj_jh"//冻结_激活
                            }
                        } */
                        
                        var config = {
                            totab: true,
                            width: "1500px",
                            icon: "icon-product",
                            text: text_,
                            id: id_,
                            url: "../md/customer/customer_acct.html?v=1",
                            sceneCode: "approval",
                            data: row,
                            delta: delta_,
                            callback: function(obj, callback) {
                                //me.uploadFileAfter(obj);
                                me.onQuery();
                                if (callback) {
                                    callback();
                                }
                            }
                        };
                        this.doPopupByPublic(config);
                    },
                    
                }
            });
 
        </script>
        <style>
            
        </style>
    </body>
</html>