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
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
<!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 type="text/javascript">
            function loadJsCss(callback) {
                var jscss_urls = [
                    {id: "js6", type: "js", url: "root/js/vuedraggable.umd.min.js"},
                ];
                window.top.initJsCss(document, jscss_urls, callback);
            };
            
            function initVue() {
                new FormVue({
                    el: "#vbody",
                    data: {
                        dataname: "fee_model_plan",
                        table_dataname: "fee_model_plan_field",
                        title: "方案定义",
                        
                        dataRequest: [
                            {//协议类型
                                name: "agm_record_type",
                                dataname: "agm_record_type",
                                //url: "root/front/getOneDictionary",
                                //paramsobj: { code: "OrgType", },
                                filter: "",
                                orderby: "",
                                isnotoption: false, //true:不是选项
                                code:"id",//是下拉选项时设置
                                label:"name",//是下拉选项时设置
                            },
                            {//流向类型
                                name: "fee_model_band",
                                dataname: "fee_model_band",
                                //url: "root/front/getOneDictionary",
                                //paramsobj: { code: "OrgType", },
                                filter: "",
                                orderby: "",
                                isnotoption: false, //true:不是选项
                                code:"id",//是下拉选项时设置
                                label:"name",//是下拉选项时设置
                            },
                            {//字段库
                                name: "property",
                                dataname: "sys_data_property",
                                //url: "root/front/getOneDictionary",
                                //paramsobj: { code: "OrgType", },
                                filter: "dataobject_id='fee_memo'",
                                orderby: "list_order_no",
                                isnotoption: true, //true:不是选项
                                code:"field",//是下拉选项时设置
                                label:"label_chinese",//是下拉选项时设置
                            },
                        ],
                        formAttr: {
                            istitle: false,
                            title: "基础信息",
                            columnnumber: 3,
                            labelwidth: "140px",
                            labelposition: "left",//"left",// right//top
                            size: "mini",
                            border: "3px solid #c6c6c600"
                        },
                        
                        default_formFields: [
                            {isshow: "T", field: "policyname", name: "方案名称", isminwidth: true},
                            {isshow: "T", field: "policycode", name: "方案编码", disabled: true, notvalunit: true},
                            {isshow: "T", field: "version", name: "版本号", disabled: true, notvalunit: true},
                            // {isshow: "T", field: "state_name", name: "状态", disabled: true, notvalunit: true},
                            {isshow: "T", field: "effdate", name: "生效日期", type: "date", formatter: "date", required: true, notvalunit: true},
                            {isshow: "T", field: "expdate", name: "失效日期", type: "date", formatter: "date", required: true, notvalunit: true},
                            {isshow: "T", field: "createname", name: "创建人", disabled: true, notvalunit: true},
                            {isshow: "F", field: "record_type_name", name: "准则来源名称", disabled: true, notvalunit: true},
                            
                            {isshow: "T", field: "record_type", name: "准则来源", type: "select", 
                            options: [
                                {value: "协议-回款履约", code: "hkly"},
                                {value: "协议-底价", code: "dj"},
                                {value: "协议-佣金", code: "yj"},
                                {value: "协议-年度达成", code: "nddc"},
                                {value: "协议-二次议价", code: "ecyj"},
                                {value: "协议-省标", code: "sb"},
                            ], required: true, notvalunit: true},
                            {isshow: "F", field: "flow_type_name", name: "流向来源名称", disabled: true, notvalunit: true},
                            {isshow: "T", field: "flow_type", name: "流向来源", type: "select", 
                            options: [
                                {value: "流向-回款", code: "hk"}, 
                                {value: "流向-库存", code: "kc"},
                                {value: "流向-终端纯销", code: "zdcx"},
                            ], required: true, notvalunit: true},
                            {isshow: "T", field: "createtime", name: "创建时间", disabled: true, notvalunit: true},
                            
                            // {isshow: "T", field: "biz_date", name: "订单日期", type: "date", formatter: "date", notvalunit: true},
                            // {isshow: "T", field: "customer_name", name: "客户名称", type: "popup", required: true, notvalunit: true},
                            // {isshow: "T", field: "customer_consignee_address", name: "收货地址", required: true, type: "select",isfilterable:true, isrefresh:true, options: [], props:{value: "id", label: "address", checkStrictly: true}, notvalunit: true},
                            // {isshow: "T", field: "customer_consignee_user_name", name: "联系人", required: true, notvalunit: true},
                            // {isshow: "T", field: "customer_consignee_phone", name: "联系电话", required: true, notvalunit: true},
                            // {isshow: "T", field: "operate_emp_name", name: "业务员名称", disabled: true, notvalunit: true},
                            // {isshow: "T", field: "business_depart_name", name: "业务部门", type: "popup", required: true, notvalunit: true},
                            // {isshow: "T", field: "province_name", name: "区域", width: "120", type: "popup", required: true, notvalunit: true},
                            // {isshow: "T", field: "settle_type", name: "结算方式", type: "select", options: [{label: "现金",value: "cash"}, {label: "信用付款",value: "credit"}], required: true, notvalunit: true},
                            // {isshow: "T", field: "emp_depart_name", name: "销售部门", disabled: true, defaultval: "", notvalunit: true},
                            // {isshow: "T", field: "contract_no", name: "合同号", notvalunit: true},
                            // {isshow: "T", field: "amt_credit", name: "授信额度", disabled: true, formatter: "money", notvalunit: true},
                            // {isshow: "F", field: "iscreditsuccess", name: "资信检查结果", formatter: "TF3", notvalunit: true},
                            // {isshow: "T", field: "amt", name: "订单总金额", disabled: true, formatter: "money", align: "right", notvalunit: true},
                            // {isshow: "T", field: "amt_receipts", name: "折扣后金额", disabled: true, formatter: "money", align: "right", notvalunit: true},
                            // {isshow: "T", field: "amt_discount", name: "折扣总金额", disabled: true, formatter: "money", align: "right", notvalunit: true},
                        ],
                        formFields: [],
                        
                        newformData: {
                            //id: uuid_short(),
                            // code: createCode("BA"),
                            create_time: createDatetime(),
                            state_code: "Draft",
                            state_name: "录入",
                            creator_name: window.top.vue.userinfo.name,
                            type_code: "",
                            type_name: "",
                        },
                        formData: {
                            record_type: "",
                            flow_type: ""
                        },
                        
                        isRefresh: true,
                        default_tableFields: [
                            
                        ],
                        tableFields: [],
                        newTableData: {
                            create_time: createDatetime(),
                            creator_name: window.top.vue.userinfo.name,
                        },
                        tableData: [],
                        
                        //按键权限设置
                        isedit: false,//提交前编辑,保存/提交
                        isrefuseedit: false,//拒绝后编辑,保存/再次提交
                        isapproval: false,//审批,同意/拒绝/转办/退回
                        
                        iscommit: false,//提交标记
                        
                        //弹窗参数
                        popupParames: {},
                        //字段设置
                        tablefieldClick: {},
                        formfieldClick: {},
                        tableHeight: 0,
                        
                        
                        record_map: {
                            hkly: [ //回款履约
                                //条款ID    条款编码    客户ID    客户编码    客户名称    付款条款编码    付款条款名称    备注说明
                                {isshow: "T", field: "field1", name: "条款ID", width: "180"},
                                {isshow: "T", field: "field1", name: "条款编码", width: "180"},
                                {isshow: "T", field: "field1", name: "客户ID", width: "180"},
                                {isshow: "T", field: "field1", name: "客户编码", width: "100"},
                                {isshow: "T", field: "field1", name: "客户名称", width: "200", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "付款条款编码", width: "180"},
                                {isshow: "T", field: "field1", name: "付款条款名称", width: "180", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "备注说明", width: "220", align: "left", isminwidth: true},
                            ],
                            dj: [ // 底价
                                // ID    协议编码    协议类型    经销商编码    经销商名称    医院名称    医院名称    产品编码    产品名称    规格    
                                // 返利单价    达成奖    年指标    季度1    季度2    季度3    季度4    1月    2月    3月    4月    5月    6月    7月    8月    9月    10月    11月    12月
                                {isshow: "T", field: "field1", name: "协议编码", width: "180"},
                                {isshow: "T", field: "field1", name: "协议类型", width: "180"},
                                {isshow: "T", field: "field1", name: "经销商编码", width: "100"},
                                {isshow: "T", field: "field1", name: "经销商名称", width: "200", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "医院编码", width: "180"},
                                {isshow: "T", field: "field1", name: "医院名称", width: "180", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "产品编码", width: "220", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "产品名称", width: "220", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "规格", width: "220", align: "left", isminwidth: true},
                                
                                {isshow: "T", field: "field1", name: "返利单价", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "达成奖", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "年指标", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度1", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度2", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度3", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度4", width: "100", align: "right"},
                                
                                {isshow: "T", field: "field1", name: "1月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "2月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "3月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "4月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "5月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "6月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "7月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "8月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "9月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "10月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "11月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "12月", width: "100", align: "right"},
                            ],
                            yj: [ // 佣金
                                // ID    协议编码    协议类型    经销商编码    经销商名称    医院名称    医院名称    产品编码    产品名称    规格    
                                // 终端售价    佣金    达成奖    年指标    季度1    季度2    季度3    季度4    1月    2月    3月    4月    5月    6月    7月    8月    9月    10月    11月    12月
                        
                                {isshow: "T", field: "field1", name: "协议编码", width: "180"},
                                {isshow: "T", field: "field1", name: "协议类型", width: "180"},
                                {isshow: "T", field: "field1", name: "经销商编码", width: "100"},
                                {isshow: "T", field: "field1", name: "经销商名称", width: "200", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "医院编码", width: "180"},
                                {isshow: "T", field: "field1", name: "医院名称", width: "180", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "产品编码", width: "220", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "产品名称", width: "220", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "规格", width: "220", align: "left", isminwidth: true},
                                
                                {isshow: "T", field: "field1", name: "终端售价", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "佣金", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "年指标", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度1", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度2", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度3", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度4", width: "100", align: "right"},
                                
                                {isshow: "T", field: "field1", name: "1月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "2月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "3月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "4月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "5月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "6月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "7月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "8月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "9月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "10月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "11月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "12月", width: "100", align: "right"},
                            ],
                            nddc: [ //年度达成
                                // ID    协议编码    协议类型    经销商编码    经销商名称    医院名称    医院名称    产品编码    产品名称    规格    
                                // 达成奖    年指标    季度1    季度2    季度3    季度4    1月    2月    3月    4月    5月    6月    7月    8月    9月    10月    11月    12月
                            
                                {isshow: "T", field: "field1", name: "协议编码", width: "180"},
                                {isshow: "T", field: "field1", name: "协议类型", width: "180"},
                                {isshow: "T", field: "field1", name: "经销商编码", width: "100"},
                                {isshow: "T", field: "field1", name: "经销商名称", width: "200", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "医院编码", width: "180"},
                                {isshow: "T", field: "field1", name: "医院名称", width: "180", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "产品编码", width: "220", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "产品名称", width: "220", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "规格", width: "220", align: "left", isminwidth: true},
                                
                                {isshow: "T", field: "field1", name: "达成奖", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "年指标", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度1", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度2", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度3", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "季度4", width: "100", align: "right"},
                                
                                {isshow: "T", field: "field1", name: "1月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "2月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "3月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "4月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "5月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "6月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "7月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "8月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "9月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "10月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "11月", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "12月", width: "100", align: "right"},
                            ],
                            ecyj: [ // 二次议价
                                //id    申请号    医院id    医院编码    医院名称    医院省份    医院城市    产品-id    产品-编码    产品-名称    规格    
                                // 中标价    扣率    折扣单价    实际销售价    生效时间    失效时间    备注    创建人-id    创建人-姓名    创建时间    更新时间
                                {isshow: "T", field: "field1", name: "ID", width: "180"},
                                {isshow: "T", field: "field1", name: "申请号", width: "180"},
                                {isshow: "T", field: "field1", name: "医院编码", width: "180"},
                                {isshow: "T", field: "field1", name: "医院名称", width: "100", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "医院省份", width: "100"},
                                {isshow: "T", field: "field1", name: "医院城市", width: "100"},
                                {isshow: "T", field: "field1", name: "产品编码", width: "100"},
                                {isshow: "T", field: "field1", name: "产品名称", width: "100", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "规格", width: "100"},
                                
                                {isshow: "T", field: "field1", name: "中标价", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "扣率", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "折扣单价", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "实际销售价", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "生效时间", width: "100"},
                                {isshow: "T", field: "field1", name: "失效时间", width: "100"},
                                {isshow: "T", field: "field1", name: "备注", width: "200", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "创建人", width: "100"},
                                {isshow: "T", field: "field1", name: "创建时间", width: "100"},
                                {isshow: "T", field: "field1", name: "更新时间", width: "100"},
                            ],
                            sb: [ //省标
                                // id    申请号    经销商编码    经销商名称    省份    城市    产品ID    产品编码    产品名称    产品规格    
                                // 原协议价    扣率    折扣金额    生效时间    失效时间    备注    创建人-id    创建人-姓名    创建时间    更新时间
                                {isshow: "T", field: "field1", name: "ID", width: "180"},
                                {isshow: "T", field: "field1", name: "申请号", width: "180"},
                                {isshow: "T", field: "field1", name: "经销商编码", width: "180"},
                                {isshow: "T", field: "field1", name: "经销商名称", width: "100", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "省份", width: "100"},
                                {isshow: "T", field: "field1", name: "城市", width: "100"},
                                {isshow: "T", field: "field1", name: "产品编码", width: "100"},
                                {isshow: "T", field: "field1", name: "产品名称", width: "100", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "规格", width: "100"},
                                
                                {isshow: "T", field: "field1", name: "原协议价", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "扣率", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "折扣金额", width: "100", align: "right"},
                                {isshow: "T", field: "field1", name: "生效时间", width: "100"},
                                {isshow: "T", field: "field1", name: "失效时间", width: "100"},
                                {isshow: "T", field: "field1", name: "备注", width: "200", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "创建人", width: "100"},
                                {isshow: "T", field: "field1", name: "创建时间", width: "100"},
                                {isshow: "T", field: "field1", name: "更新时间", width: "100"},
                            ]
                            
                        },
                        
                        flow_map: {
                            hk: [ //回款
                                //ID    idx    年份    月份    客户编码    客户名称    订单号    收款单号    发货单号    发货日期    收款日期    订单金额    收款金额
                                {isshow: "T", field: "field1", name: "年份", width: "180"},
                                {isshow: "T", field: "field1", name: "月份", width: "180"},
                                {isshow: "T", field: "field1", name: "客户编码", width: "100"},
                                {isshow: "T", field: "field1", name: "客户名称", width: "200", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "订单号", width: "180"},
                                {isshow: "T", field: "field1", name: "收款单号"},
                                {isshow: "T", field: "field1", name: "发货单号"},
                                {isshow: "T", field: "field1", name: "发货日期", width: "220"},
                                {isshow: "T", field: "field1", name: "收款日期", width: "220"},
                                {isshow: "T", field: "field1", name: "订单金额", width: "220"},
                                {isshow: "T", field: "field1", name: "收款金额", width: "220", align: "left"},
                            ],
                            kc: [ //库存
                                //库存日期    经销商编码    经销商名称    产品编码    产品名称    规格    数量
                                {isshow: "T", field: "field1", name: "库存日期", width: "180"},
                                {isshow: "T", field: "field1", name: "经销商编码", width: "100"},
                                {isshow: "T", field: "field1", name: "经销商名称", width: "200", align: "left", isminwidth: true},
                                {isshow: "T", field: "field1", name: "产品编码", width: "100"},
                                {isshow: "T", field: "field1", name: "产品名称", width: "180"},
                                {isshow: "T", field: "field1", name: "规格", width: "100"},
                                {isshow: "T", field: "field1", name: "数量", width: "220"},
                            ],
                            zdcx: [ //终端纯销
                                //ID    年份    月份    流向日期    上游省份    上游城市    上游ID    上游编码    上游名称    下游省份    下游城市    下游ID    下游编码    下游名称    
                                // 产品ID    产品编码    产品名称    数量
 
                                {isshow: "T", field: "field1", name: "年份", width: "180"},
                                {isshow: "T", field: "field1", name: "月份", width: "100"},
                                {isshow: "T", field: "field1", name: "流向日期", width: "100"},
                                {isshow: "T", field: "field1", name: "上游省份", width: "100"},
                                {isshow: "T", field: "field1", name: "上游城市", width: "100"},
                                {isshow: "T", field: "field1", name: "上游编码", width: "100"},
                                {isshow: "T", field: "field1", name: "上游名称", width: "100"},
                                {isshow: "T", field: "field1", name: "下游省份", width: "100"},
                                {isshow: "T", field: "field1", name: "下游城市", width: "100"},
                                {isshow: "T", field: "field1", name: "下游编码", width: "100"},
                                {isshow: "T", field: "field1", name: "下游名称", width: "100"},
                                {isshow: "T", field: "field1", name: "产品编码", width: "100"},
                                {isshow: "T", field: "field1", name: "产品名称", width: "100"},
                                {isshow: "T", field: "field1", name: "规格", width: "100"},
                                {isshow: "T", field: "field1", name: "数量", width: "100"},
                            ],
                        },
                        recordArray_agm: [],
                        recordArray: [
                            {isshow: "T", field: "field1", name: '字段1', type: "input"},
                            {isshow: "T", field: "field2", name: '字段2', type: "select"},
                            {isshow: "T", field: "field3", name: '字段3', type: "date"},
                            {isshow: "T", field: "field4", name: '字段4', type: "textarea"},
                        ],
                        
                        flowArray: [
                            {isshow: "T", field: "fieldA", name: '字段a', type: "input"},
                            {isshow: "T", field: "fieldB", name: '字段b', type: "select"},
                            {isshow: "T", field: "fieldC", name: '字段c', type: "date"},
                            {isshow: "T", field: "fieldD", name: '字段d', type: "textarea"},
                        ],
                        
                        guidelineArray: [
                            // {id: "1001", record: [], flow: [], field: "field1", name: '新字段', record_field: "field1", field_name: '字段1', flow_field: "fieldA", flow_name: '字段a'},
                            // {id: "add_field", name: '新增字段'},
                        ],
                        grpup_record: {
                            name:'guideline',
                            pull:"clone",
                            put:false
                        },
                        grpup_flow: {
                            name:'guideline',
                            pull:"clone",
                            put:false
                        },
                        
                        activeName: "",
                        recordTabName: "",
                        
                    },
                    created() {
                        let clientHeight = document.documentElement.clientHeight;
                        this.tableHeight = clientHeight - 94;
                        
                        this.popupParames = clone(Root.popupParames);
                        this.title = this.popupParames.title || this.popupParames.text
                        if (this.popupParames.data) {
                            this.formData = clone(this.popupParames.data);
                        }
                        
                        if (this.popupParames.sceneCode) {
                            if (this.popupParames.sceneCode == "add") {//新增
                                if (this.newformData) {
                                    let formData_ = clone(this.formData);
                                    
                                    for (var k in this.newformData) {
                                        formData_[k] = this.newformData[k];
                                    }
                                    this.formData = formData_;
                                }
                                
                                if (this.newTableData) {
                                    this.tableData.push(clone(this.newTableData));
                                }
                                
                                this.isedit = true;
                            }
                            else if (this.popupParames.sceneCode == "browse") {//只读
                                this.formAttr.disabled = true;
                            }
                            else if (this.popupParames.sceneCode == "edit") {//编辑
                                this.isedit = true;
                            }
                            else if (this.popupParames.sceneCode == "approval") {//审批
                                this.formAttr.disabled = true;
                                this.isapproval = true;
                            }
                            else if (this.popupParames.sceneCode == "refuseedit") {//拒绝后的编辑
                                this.isrefuseedit = true;
                            }
                        }
                    },
                    
                    mounted() {
                        var me = this;
                        //预加载数据
                        if (this.dataRequest && this.dataRequest.length) {
                            var result = {};
                            this.loadRequestData(this.dataRequest, result, function(data) {
                                me.dataRequestObj = data;
                                //预加载数据后给哪些字段设置options或formatterjson
                                console.log("预加载", data);
                                if (me.dataRequestObj.property) {
                                    me.dataRequestObj.property.map(r=>{
                                        r.name = r.label_chinese
                                    })
                                }
                                me.initData();
                            });
                        }
                        else {
                            this.initData();
                        }
                        
                        // 以服务的方式调用的 Loading 需要异步关闭
                        this.$nextTick(() => { 
                            hideLoading();
                            
                            //重新设置弹窗宽高
                            // this.$nextTick(function(){
                            //     //let w_ = this.$refs.popup_body.offsetWidth  "px";
                            //     let w_ = "900px";
                            //     let h_ = this.$refs.popup_body.offsetHeight + "px";
                            //     Root.setPopupWH(w_, h_);
                            // })
                        });
                    },
                    
                    methods:{
                        //关闭弹窗
                        closeDialog() {
                            var me = this;
                            if (me.popupParames.totab){
                                Root.tab.removeItem(Root.tab.selected);
                                Root.tab.open(me.popupParames.parentOption, false); 
                            }
                            else {
                                Root.hidePopup();
                            }
                        },
                        //关闭前调回调
                        saveAfter() {
                            var me = this;
                            if(this.popupParames.callback) {
                                let obj = {
                                    //row: this.formData
                                }
                                this.popupParames.callback(obj, function() {
                                    me.closeDialog();
                                });
                            }
                            else {
                                me.closeDialog();
                            }
                        },
                        
                        initData() {
                            let me = this
                            var id_ = null;
                            if (this.formData.id) {
                                id_ = this.formData.id;
                            }
                            this.getRowDataById(id_, function(result) {//查询后的回调,用于获取字段的
                                if (result.meta && result.meta[me.dataname] && result.meta[me.dataname].fields) {
                                    var metas = clone(result.meta[me.dataname].fields);
                                    var table_dataname_ = "";
                                    for (var dataname_ in result.meta) {
                                        if (dataname_ != me.dataname && !table_dataname_) {
                                            table_dataname_ = dataname_;
                                        }
                                    }
                                    var table_metas = [];
                                    if (table_dataname_) {
                                        me.table_dataname = table_dataname_;
                                        table_metas = clone(result.meta[table_dataname_].fields);
                                    }
                                    
                                    var formFields_ = [];
                                    var tableFields_ = [];
                                    metas.map(f=>{
                                        f.isshow = "T";
                                        if (f.field == "source_agreement_id") {
                                            f.options = me.dataRequestObj.agm_record_type;
                                        }
                                        if (f.field == "source_flow_id") {
                                            f.options = me.dataRequestObj.fee_model_band;
                                        }
                                        
                                        formFields_.push(clone(f));
                                    })
                                    table_metas.map(f=>{
                                        f.isshow = "T";
                                        tableFields_.push(clone(f));
                                    })
                                    
                                    if (!me.formFields || (me.formFields && me.formFields.length == 0)) {
                                        me.formFields = clone(formFields_);
                                        // me.formFields = clone(me.default_formFields);
                                        
                                        me.tableFields = clone(tableFields_);
                                        
                                        //字段数组转字段obj
                                        me.fieldsToFieldsObj();
                                        
                                        //设置字段事件
                                        me.tableFieldClick();
                                    }
                                }
                                me.activeName = "tab_zdpz";
                                if (me.rowData[me.dataname]) {
                                    me.formData = me.rowData[me.dataname];
                                    if (me.formData.source_agreement_id) {
                                        me.recordTabName = "record";
                                        var filter_ = "dataobject_id = (SELECT dataname from agm_record_type where id='"+me.formData.source_agreement_id+"')";
                                        me.getFieldByDataname(filter_, function(array) {
                                            me.recordArray_agm = clone(array);
                                            me.recordArray = array
                                        })
                                    }
                                    else {
                                        me.recordTabName = "allfields";
                                    }
                                    if (me.formData.source_flow_id) {
                                        var filter_ = "dataobject_id = (SELECT table_name from fee_model_band where id='"+me.formData.source_flow_id+"')";
                                        me.getFieldByDataname(filter_, function(array) {
                                            me.flowArray = array
                                        })
                                    }
                                }
                                if (me.rowData[me.table_dataname]) {
                                    // me.tableData = me.rowData[me.table_dataname];
                                    var guidelineArray_ = clone(me.rowData[me.table_dataname]);
                                    guidelineArray_.map(r=>{
                                        r.field = r.field_name;
                                        r.name = r.field_label;
                                        
                                        r.record = [];
                                        r.flow = [];
                                        if (r.agm_field_name) {
                                            var fr_ = {
                                                field: r.agm_field_name, 
                                                name: r.agm_field_label
                                            }
                                            r.record = [fr_];
                                        }
                                        if (r.flow_field_name) {
                                            var ff_ = {
                                                field: r.flow_field_name, 
                                                name: r.flow_field_label
                                            }
                                            r.flow = [ff_];
                                        }
                                        
                                    })
                                    me.guidelineArray = guidelineArray_
                                }
                            })
                        },
                        
                        getFieldByDataname(filter, callback) {
                            var me = this;
                            var param_ = {
                                dataname: "sys_data_property",
                                filter: filter,
                                orderby: "list_order_no"
                            }
                            
                            Server.call("root/data/getEntitySet", param_, function(result) {
                                var fields = [];
                                if (result && result.data && result.data.entityset) {
                                    // var aaa = clone(result.data.entityset);
                                    // var aa_ = []
                                    // aaa.map(a=>{
                                    //     var a_ = {
                                    //         "code": a.code,
                                    //         "name": a.label_chinese,
                                    //         "fieldname": a.code,
                                    //         "expression": "[折扣条款-零售补偿].["+a.label_chinese+"]",
                                    //     } 
                                    //     aa_.push(a_)
                                    // })
                                    // console.log("字段aa", aa_);
                                    
                                    var fields_ = clone(result.data.entityset);
                                    fields_.map(r=>{
                                        r.name = r.label_chinese
                                    })
                                    fields = fields_;
                                }
                                
                                if (callback) {
                                    callback(fields);
                                }
                                
                            })
                        },
                        
                        tableFieldClick() {
                            var me = this;
                            //表单字段事件设置
                            this.formfieldClick = {
                                source_agreement_id: {
                                    select: {
                                        onchange: function(obj) {//下拉更改事件
                                            var filter_ = "dataobject_id = (SELECT dataname from agm_record_type where id='"+ obj.selectoption.code +"')";
                                            me.getFieldByDataname(filter_, function(array) {
                                                me.recordArray_agm = clone(array);
                                                me.recordArray = array
                                            })
                                            
                                            obj.data.source_agreement_name = obj.selectoption.value;
                                        }
                                    }
                                },
                                source_flow_id: {
                                    select: {
                                        onchange: function(obj) {//下拉更改事件
                                            var filter_ = "dataobject_id = (SELECT table_name from fee_model_band where id='"+ obj.selectoption.code +"')";
                                            me.getFieldByDataname(filter_, function(array) {
                                                me.flowArray = array
                                            })
                                            
                                            obj.data.source_flow_name = obj.selectoption.value;
                                        }
                                    }
                                }
                            };
                            
                            //表格字段事件设置
                            this.tablefieldClick = {
                                
                            };
                        },
                        recordEnd(e) {
                            
                        },
                        flowEnd(e) {
                            
                        },
                        end1(e){
                            // console.log(e)
                            // var that=this;
                            // var  items=this.formFields.filter(function(m){
                            //     return  m.id==that.moveId
                            // })
                            // //如果左边
                            // if(items.length<2) return;
                            // this.formFields.splice(e.newDraggableIndex, 1)
                        },
                        
                        onMove(e,originalEvent){
                            // this.moveId = e.relatedContext.element.id;
                            // //不允许停靠
                            // if (e.relatedContext.element.id == 1) return false;
                            // //不允许拖拽
                            // if (e.draggedContext.element.id == 4) return false;
                            // if (e.draggedContext.element.id == 11) return false;
                            // return true;
                        },
                        onMoveGuideline(e,originalEvent) {
                            // //不允许拖拽
                            // if (e.draggedContext.element.id == "add_field") return false;
                            // return true;
                        },
                        recordClone(origin) {
                            var aa = "";
                            // console.log(origin,'origin')
                            // clone 从一个数组拖拽到另外一个数组时触发的事件和add不同,clone是复制了数组元素
                            // 所以我们可以重新new 拷贝一个新对象
                            let data1 = JSON.parse(JSON.stringify(origin))
                            let data = JSON.parse(JSON.stringify(origin))
                            data.id = uuid();
                            data.record = [data1];
                            data.flow = [];
                            // console.log(data,'data')
                            return data
                        },
                        flowClone(origin) {
                            var aa = "";
                            // console.log(origin,'origin')
                            // clone 从一个数组拖拽到另外一个数组时触发的事件和add不同,clone是复制了数组元素
                            // 所以我们可以重新new 拷贝一个新对象
                            let data1 = JSON.parse(JSON.stringify(origin))
                            let data = JSON.parse(JSON.stringify(origin))
                            data.id = uuid();
                            data.record = [];
                            data.flow = [data1];
                            // console.log(data,'data')
                            return data
                        },
                        guidelineClone(e,originalEvent) {
                            var aa = "";
                            console.log(e)
                        },
                        
                        onMove_record(e,originalEvent) {
                            
                        },
                        remove_g(array, row) {
                            array.remove(row);
                        },
                        
                        ////
                        addTableData() {
                            var new_field = {id: uuid(),record: [], flow: [], field: createBaseCode("field"), name: '新字段'};
                            this.guidelineArray.unshift(new_field);
                            
                            // var table_row = clone(this.newTableData);
                            // this.rowChange(table_row, "add", this.table_dataname);
                        },
                        
                        delData(scope) {
                            let me = this;
                            let row = scope.row;
                            let index_ = scope.$index;
                            
                            Root.confirm('确定删除数据【' + JSON.stringify(row) + '】吗?', '删除提示', {
                              confirmButtonText: '删除',
                              cancelButtonText: '取消',
                              type: 'warning'
                            }).then(() => {
                                me.rowChange(row, "del", me.table_dataname);
                            }).catch(() => {
                                Root.message({
                                    type: 'info',
                                    message: '已取消删除'
                                });          
                            });
                        },
                        
                        rowChange(row, type, tablename) {
                            var me = this;
                            if (type == "add") {
                                this.tableData.unshift(row);
                            }
                            else if (type == "del") {
                                if (row.id) {
                                    let param = {
                                        dataname: tablename,
                                        id: row.id
                                    }
                                    
                                    Server.call("root/data/deleteEntity", param, function(result) {
                                        console.log(result);
                                        if (result && result.data) {
                                            me.tableData.remove(row);
                                            
                                            Root.message({
                                                type: 'success',
                                                message: '删除成功!'
                                            });
                                        }
                                    });
                                }
                                else {
                                    this.tableData.remove(row);
                                }
                            }
                            else {
                                
                            }
                        },
                        recordTabChange(tab, event) {
                            var me = this;
                            if (me.recordTabName == "allfields") {
                                me.recordArray = clone(me.dataRequestObj.property);
                            }
                            else if (me.recordTabName == "record") {
                                me.recordArray = clone(me.recordArray_agm);
                            }
                        },
                        
                        //提交
                        submitRowTable() {
                            this.iscommit = true;
                            this.saveRowTable();
                        },
                        saveRowTable() {
                            var aa = this.guidelineArray;
                            console.log("参数", aa);
                        },
                        //保存
                        saveRowTable2() {
                            var me = this;
                            var operator_ = "save";//保存
                            if(me.iscommit) {
                                operator_ = "commit";//提交
                            }
                            
                            var entity_ = clone(this.formData);
                            var entity = {};
                            for (var r in entity_) {
                                if (entity_[r]) {
                                    entity[r] = entity_[r];
                                }
                            }
                            
                            var tableData_ = [];
                            this.tableData.map(r=>{
                                var row_ = {};
                                for (var k in r) {
                                    if (r[k]) {
                                        row_[k] = r[k];
                                    }
                                }
                                tableData_.push(row_);
                            })
                            
                            if (tableData_.length == 0) {
                                Root.message({
                                    type: 'warning',
                                    message: '请先添加明细数据'
                                });
                                return
                            }
                            
                            let param = {
                                dataname: this.dataname,
                                operator: operator_,
                                data: {},
                            }
                            param.data[this.dataname] = entity;
                            param.data[this.table_dataname] = tableData_;
                            
                            Server.call("root/data/saveEntity", param, function(result) {
                                console.log(result);
                                if (result.success) {
                                    if(me.iscommit){
                                        me.iscommit = false;
                                        Root.message({
                                            type: 'success',
                                            message: '提交成功'
                                        }); 
                                        me.saveAfter();
                                    }
                                    else {
                                        Root.message({
                                            type: 'success',
                                            message: '保存成功'
                                        }); 
                                        me.saveAfter();
                                    }
                                }
                            });
                        },
                        
                        // 公式设计
                        formulaConfig() {
                            //先保存政策的定义,根据政策id和政策生成的备忘录字段设计公式
                            //目前没有保存就先已假的信息配置公式
                            var me = this;
                            
                            var config = {
                                totab: true, //true: 以Tab导航的方式打开
                                width: "900px",
                                height: "900px",
                                icon: "icon-product",
                                text: "公式定义",
                                id: "settingFormula_edit" + me.formData.id,//totab: true时需设置,用于判断是否已打开此页面
                                // url: "module/performance/page/settingFormula_edit.html",
                                url: "module/performance/page/designer/designer.html?id=" + me.formData.id,
                                data: me.formData,
                                delta: {policyArray :this.guidelineArray},
                                sceneCode: "browse", //"add"//"browse",
                                callback: function(obj, callback) {
                                    me.onQuery();
                                    if (callback) {
                                        callback();
                                    }
                                }
                            };
                            me.doPopupByPublic(config);
                        },
                        
                    }
                });
            };
            
            loadJsCss(function () {
                initVue();
            });
        </script>
        <style>
            /*  在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */
            [v-cloak] {
                display: none !important;
            }
        </style>
        <style scoped>
            .field_title {
                height: 40px; 
                line-height: 40px; 
                font-size: 14px;
            }
            
            .item {
                padding: 6px;
                background-color: #fdfdfd;
                border: solid 1px #eee;
                /* margin-bottom: 10px; */
                cursor: move;
            }
            .item:hover {
                background-color: #f1f1f1;
                cursor: move;
            }
            
            .field_list {
                border: 1px solid #ccc;
                overflow: auto;
            }
            .field_list .item span{
                padding-left: 10px;
            }
            
            .item_r {
                padding: 0px 10px;
                /* border: solid 1px #eee; */
                /* margin-bottom: 10px; */
                border-radius: 10px;
                cursor: move;
                position: relative;
            }
            .item_r_delete {
                color: red; 
                position: absolute; 
                right: 10px; 
                top: 0px;
            }
            .item_r_delete:hover {
                /* background-color: #f1f1f1; */
                /* font-size: 16px; */
                cursor: pointer;
            }
            .el-icon-delete:hover {
                /* font-size: 16px; */
                cursor: pointer;
            }
            .guideline_ghost {
                /* padding: 0px; */
                /* height: 10px !important; */
                overflow: hidden;
                background-color: #42adef !important;
                color: #42adef !important;
            }
            .guideline_ghost_r {
                padding: 0px;
                /* height: 16px !important; */
                overflow: hidden;
                background-color: #dca12c !important;
                color: #dca12c !important;
            }
            .guideline_ghost_f {
                padding: 0px;
                /* height: 16px !important; */
                overflow: hidden;
                background-color: #b5d6fa !important;
                color: #b5d6fa !important;
            }
            
            .el-divider--horizontal {
                margin: 14px 0px !important;
            }
            .text_null_r span:empty:before{
                content: "可拖入协议字段";
                color: #bccdd9;
                padding-left: 10px;
            }
            .text_null_f span:empty:before{
                content: "可拖入流向字段";
                color: #bccdd9;
                padding-left: 10px;
            }
        </style>
    </head>
    
    <body style="margin: 0px;">
        <div v-cloak id="vbody">
            <div id="page_root">
                <div ref="popup_body" style="padding: 0 20px;">
                    <div class="el-dialog__header">
                        <div class="dialog-title">
                            <span> {{title}}</span>
                        </div>
                    </div>    
                    <div :style="{height: tableHeight + 'px', 'overflow-y': 'auto'}">
                        <div class="el-dialog__body">
                            <h-form
                                ref="form1"
                                :form-attr="formAttr"
                                :table-fields="formFields"
                                :form-data="formData"
                                :table-field-click="formfieldClick"
                            >
                            </h-form>
                            
                            <div class="h_dialog__body">
                                <div v-if="isedit || isrefuseedit" style=" text-align: right;">
                                    <!-- 工具栏 -->
                                    <!-- <div  style=" display: inline-block; width: 90px;">
                                        <el-button-group>
                                            <el-button @click="addTableData">新增明细</el-button>
                                        </el-button-group>
                                    </div> -->
                                </div>
                                <el-tabs v-model="activeName">
                                    <el-tab-pane label="备忘录字段配置" name="tab_zdpz"></el-tab-pane>
                                </el-tabs>
                                
                                <div v-show="activeName" :style="{height: (tableHeight - 180) + 'px', width: '100%'}">
                                    <div :style="{height: (tableHeight - 180) + 'px', width: '20%', float: 'left'}"> 
                                        <div class="field_title">
                                        <!-- {{formData.record_type_name ? formData.record_type_name : "协议字段"}} -->
                                            <el-tabs v-model="recordTabName" @tab-click="recordTabChange">
                                                <el-tab-pane :label="formData.source_agreement_name ? formData.source_agreement_name : '协议字段'" name="record"></el-tab-pane>
                                                <el-tab-pane label="字段库" name="allfields"></el-tab-pane>
                                            </el-tabs>
                                        </div>
                                        <div class="field_list" :style="{height: (tableHeight - 180 - 40) + 'px'}" > 
                                            <draggable v-model="recordArray" @end="recordEnd" :clone="recordClone" :move="onMove"
                                            :options="{group:{name: 'guideline',pull:'clone',put: false},sort: false}"  animation="300">
                                                <transition-group>
                                                    <div class="item" v-for="(item, index1) in recordArray" :key="'r'+index1">
                                                        <i :class="item.icon ? item_g.icon : 'el-icon-copy-document'"></i>
                                                        <span>{{item.name}}</span>
                                                    </div>
                                                </transition-group>
                                            </draggable>
                                        </div>
                                    </div>
                                    <div :style="{height: (tableHeight - 180) + 'px', width: '20%', float: 'right'}">
                                        <div class="field_title">{{formData.source_flow_name ? formData.source_flow_name : "流向字段"}}</div>
                                        <div class="field_list" :style="{height: (tableHeight - 180 - 40) + 'px'}" >
                                            <draggable v-model="flowArray" @end="flowEnd" :clone="flowClone" :move="onMove"
                                            :options="{group:{name: 'guideline',pull:'clone',put: false},sort: true}"  animation="300">
                                                <transition-group>
                                                    <div class="item" v-for="(item, index1) in flowArray" :key="'f'+index1">
                                                        <i :class="item.icon ? item_g.icon : 'el-icon-copy-document'"></i>
                                                        <span>{{item.name}}</span>
                                                    </div>
                                                </transition-group>
                                            </draggable>
                                        </div>
                                    </div>
                                    
                                    <div :style="{height: (tableHeight - 180) + 'px', width: '56%', margin: '0 auto'}">
                                        <div class="field_title">
                                            <el-row style="height: 28px;">
                                                <el-col :span="10"><div style="text-align: left;">备忘录字段</div></el-col>
                                                <el-col :span="7"><div style="text-align: center;">协议映射字段</div></el-col>
                                                <el-col :span="7"><div style="text-align: center;">流向映射字段</div></el-col>
                                            </el-row>
                                        </div>
                                        <!-- <div style="width: 100%; height: 30px; line-height: 30px;">
                                            <el-button icon="el-icon-plus" @click="addTableData" style="width: 100%;" size="medium">新增自定义字段</el-button>
                                        </div> -->
                                        <div :style="{height: (tableHeight - 180 - 40) + 'px', border: '1px dashed #ccc', overflow: 'auto'}" >
                                            <draggable v-model="guidelineArray" ghost-class="guideline_ghost" group="guideline" @end="end1" @add="guidelineClone" :move="onMoveGuideline"
                                            :options="{group:{name: 'itxst'},sort: true}"  animation="300">
                                                <transition-group :style="{height: (tableHeight - 180 - 40) + 'px', 'background-color': '#eee', display: 'block'}">
                                                    <div class="item" v-for="(item, index1) in guidelineArray" :key="'g'+index1">
                                                        <el-row style="height: 28px;line-height: 28px;">
                                                            <el-col :span="10">
                                                                <div class="" style="text-align: left;">
                                                                    <i class="el-icon-copy-document"></i>
                                                                    <span>{{index1 + 1}}.</span>
                                                                    <el-input size="mini" placeholder="请输入字段名称" style="width: 80%;" v-model="item.name"></el-input>
                                                                    <!-- <el-input size="mini" placeholder="请输入字段" style="width: 40%;" v-model="item.field"></el-input> -->
                                                                    <i class="el-icon-delete" style="color: red;" @click="remove_g(guidelineArray, item)"></i>
                                                                </div>
                                                            </el-col>
                                                            <el-col :span="1"><el-divider></el-divider></el-col>
                                                            <el-col :span="6">
                                                                <div class="text_null_r">
                                                                    <draggable v-model="item.record" ghost-class="guideline_ghost_r" group="guideline" animation="300" :move="onMove_record">
                                                                        <transition-group style="display: block; height: 28px; border: 1px dotted #ccc;">
                                                                            <div class="item_r" style="background-color: #faea89;" v-for="(item_g, index1) in item.record" :key="'gr'+index1">
                                                                                <span>{{item_g.name}} </span>
                                                                                <div class="item_r_delete" style="" @click="remove_g(item.record, item_g)">
                                                                                    <i class="el-icon-delete"  ></i>
                                                                                </div>
                                                                            </div>
                                                                        </transition-group>
                                                                    </draggable>
                                                                </div>
                                                            </el-col>
                                                            <el-col :span="1"><el-divider></el-divider></el-col>
                                                            <el-col :span="6">
                                                                <div class="text_null_f">
                                                                    <draggable v-model="item.flow" ghost-class="guideline_ghost_f" group="guideline" animation="300" :move="onMove_record">
                                                                        <transition-group style="display: block; height: 28px; border: 1px dotted #ccc;">
                                                                            <div class="item_r" style="background-color: #b8e2fa;" v-for="(item_g, index1) in item.flow" :key="'gr'+index1">
                                                                                <span>{{item_g.name}} </span>
                                                                                <div class="item_r_delete" style="" @click="remove_g(item.flow, item_g)">
                                                                                    <i class="el-icon-delete"></i>
                                                                                </div>
                                                                            </div>
                                                                        </transition-group>
                                                                    </draggable>
                                                                </div>
                                                            </el-col>
                                                        </el-row>
                                                    </div>
                                                </transition-group>
                                            </draggable>
                                        </div>
                                        
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="el-dialog__footer">
                        <el-button size="small" type="default" @click="closeDialog">取 消</el-button>
                        <el-button size="small" type="default" @click="formulaConfig">公式设置</el-button>
                        <el-button size="small" v-if="isedit || isrefuseedit" type="primary" @click="saveRowTable":icon="buttonsconfig.save.icon">{{buttonsconfig.save.name}}</el-button>
                        <el-button size="small" v-if="isedit" type="success" @click="submitRowTable":icon="buttonsconfig.submit.icon">{{buttonsconfig.submit.name}}</el-button>
                        <el-button size="small" v-if="isrefuseedit" type="success" @click="">再次提交</el-button>
                        
                        <el-button size="small" v-if="isapproval" type="primary" @click="">通 过</el-button>
                        <el-button size="small" v-if="isapproval" type="danger" @click="">拒 绝</el-button>
                        <el-button size="small" v-if="isapproval" type="primary" @click="">转 办</el-button>
                        <el-button size="small" v-if="isapproval" type="success" @click="">退 回</el-button>
                    </div>
                </div>
            </div>
        </div>
        
        <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;">
            <div class="spinner">
              <div class="cube1"></div>
              <div class="cube2"></div>
            </div>
        </div>
    </body>
</html>