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
<!doctype html>
<html>
    <head>
        <meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache">
        <title>商业详情</title>
        <script src="../../jsnew/elementDefault.js?v=20220425"></script>
        <script src="../../jsnew/vue/vue.js"></script>
        <script src="../../jsnew/vue/element-ui/element-ui_15/index.js"></script>
        <script src="../../jsnew/myelement.js?v=20220425"></script>
        <script src="../../jsnew/vue/page.js?v=20220425"></script>
        <!-- <script src="../md/setting.js"></script> -->
        
        <link href="../../jsnew/vue/element-ui/element-ui_15/theme-chalk/index.css" rel="stylesheet">
        <link href="../../jsnew/myelement.css?v=20220426" rel="stylesheet">
        <link href="../../jsnew/theme.css?v=20220426" rel="stylesheet">
        <link href="../../css/iconfont.css" rel="stylesheet">
        <link href="../../jsnew/page.css?v=20220425" rel="stylesheet">
        <link href="//at.alicdn.com/t/font_2374495_13ltsxm2eor.css" rel="stylesheet">
    </head>
    <body>
        <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">
                          <i class="iconfont icon-customermanagement"></i>
                          <span> {{title}}</span>
                          
                          <div class="el-dialog__footer" style="padding: 0px 20px; border-top: 0px; float: right;">
                              <el-button size="small" type="primary" @click="">打 印</el-button>
                              <el-button size="small" type="default" @click="closeDialog">取 消</el-button>
                          </div>
                        </div>
                        
                    </div>    
 
                    <div :style="{height: t_height +'px', 'overflow-y': 'auto'}">
                        <div class="el-dialog__body">
                            <h-form
                                ref="form1"
                                :form-attr="formAttr"
                                :table-fields="formFields"
                                :form-data="formData"
                            >
                            </h-form>
                            
                            <div class="h_dialog__body" style=" padding-top: 20px;">
                                <div style="width: 100%; height: 100%; border: 0px;">
                                    <div class="topbar" style="padding-left: 0px;">
                                        <span>审批记录</span>
                                        <div style="float: right; margin-right: 20px;">
                                            <el-button-group>
                                                <el-button type="primary">查看流程图</el-button>
                                            </el-button-group>
                                        </div>
                                    </div>
                                    <div calss="versionNo">
                                        <h-table
                                            ref="table1"
                                            :table-fields="tableFields" 
                                            :is-pagination="false"
                                            :isdraggableorder="true"
                                        >
                                        </h-table>
                                    </div>
                                </div>
                            </div>
 
                            <div class="h_dialog__body" style=" padding-top: 20px;">
                                <div style="width: 100%; height: 100%; border: 0px;">
                                    <div class="topbar" style="padding-left: 0px;">
                                        <span>版本记录</span>
                                    </div>
                                    <div class="versionNo">
                                        <h-table
                                            ref="table2"
                                            :table-fields="tableFields2" 
                                            :table-data="tableData" 
                                            :isdraggableorder="true"
                                            :is-pagination="false"
                                            :table-field-click="tablefieldClick"
                                        >
                                        </h-table>
                                        
                                    </div>
                                </div>
                            </div>
                        </div>
                    </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>
 
        <script type="text/javascript">
            function initVue() {
                new FormVue({
                    el: "#vbody",
                    data: {
                        title: "商业详情查看",
                        // 商业基本信息字段
                        default_formFields: [
                            {isshow: "T", required: false, field: "amount", name: "返还总金额", type: "input", pattern: '^[0-9]+(/.[0-9]{0,4})?$'},
                            {isshow: "T", field: "business_code", name: "商业编码", type:"span", required: true},
                            {isshow: "T", field: "uscc", name:"统一社会信用代码", type: "span", required: true,},
                            {isshow: "T", field: "business_name", name: "商业名称", type: "span", required: true,},
                            {isshow: "T", field: "legal_rep", name: "法人代表", type:"span", required: true },
                            {isshow: "T", field: "country", name: "注册国家", type: "select", required: true,},
                            {isshow: "T", field: "register_province", name: "注册省份", type:"select", required: true},
                            {isshow: "T", field: "city", name: "注册城市" , type: "select", required: true,},
                            {isshow: "T", field: "county", name: "注册区县", type: "select", required: true,},
                            {isshow: "T", field: "record_province", name: "备案省份", type:"select", required: true},
                            {isshow: "T", field: "dep_code", name: "备案省商务部门",type: "select", required: true,},
                            {isshow: "T", field: "cus_dep_code", name: "省商务部门编码", type: "span", required: true,},
                            {isshow: "T", field: "operator_name", name: "操作人", type: "span", required: true,},
                            {isshow: "T", field: "operator_name", name: "操作人姓名", type:"span", required: true},
                            {isshow: "T", field: "apply_dep_code", name: "操作人部门编码", type: "span"},
                            {isshow: "T", field: "apply_dep_name", name: "操作人部门", type: "span",},
                            {isshow: "T", field: "address", name: "注册地址", type: "span", colspan: 2, required: true},
                            {isshow: "T", field: "customer_eas_code", name: "EAS编码", type: "span",},
                        ],
 
                        // 商业基本信息表单样式
                        formAttr: {
                            title: "商业基本信息",
                            istitle: true,
                            columnnumber: 3,
                            labelwidth: "150px",
                            labelposition: "left",
                            size: "medium",
                            border: "0px solid #c6c6c600",
                            disabled: false
                        },
                        formFields: [],
                        formData: {amount: ""},
 
                        // 审批字段
                        default_tableFields: [
                            {isshow: "T", field: "field1", name: "当前节点", width: "150", type:"span", required: true},
                            {isshow: "T", field: "field2", name: "申请/审批时间", width: "100", type:"span", formatter: "formatter_date", required: true, isminwidth: true,},
                            {isshow: "T", field: "field3", name: "审批情况", width: "150", type:"span", formatter: "formatter_date", required: true, isminwidth: true,},
                            {isshow: "T", field: "field4", name: "原因", width: "150", type: "span", required: true, isminwidth: true,},
                            {isshow: "T", field: "field5", name: "申请/审批人", width: "150", type:"span", required: true, isminwidth: true,}, 
                            {isshow: "T", field: "field6", name: "附件", width: "200", type:"span", required: true, isminwidth: true,}, 
                        ],
                        tableFields: [],
 
                        // 版本字段
                        default_tableFields2: [
                            {isshow: "T", field: "submit_person", name: "提交人", width: "150", type:"span", required: true},
                            {isshow: "T", field: "submit_date", name: "提交时间", width: "100", type:"span", formatter: "formatter_date", required: true, isminwidth: true,},
                            {isshow: "T", field: "version_no", name: "版本号", width: "150", type:"span", required: true, isminwidth: true,},
                            {isshow: "T", field: "approval", name: "审批状态", width: "150", type: "span", required: true, isminwidth: true,},
                        ],
                        tableFields2: [],
                        tablefieldClick: {},
                        tableData: [
                            {
                                submit_person: "admin",
                                submit_date: "2023-08-10",
                                version_no: "v20230810",
                                approval: "审批通过",
                            },
                        ],
 
                        // 弹窗参数
                        popupParames: {},
                        t_height: null,
                    },
 
                    created() {
                        this.popupParames = clone(Root.popupParames);
                        // this.title = this.popupParames.title || this.popupParames.text;
                        if (this.popupParames.data) {
                            this.formData = clone(this.popupParames.data);
                        }
                    },
 
                    mounted() {
                        var me = this;
                        me.t_height = document.documentElement.clientHeight*1 - 91;
 
                        me.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();
                            }
                        },
 
                        initData() {
                            var me = this;
 
                            if (!me.formFields || (me.formFields && me.formFields.length == 0)) {
                                me.formFields = clone(me.default_formFields);
                                me.tableFields = clone(me.default_tableFields);
                                me.tableFields2 = clone(me.default_tableFields2);
 
                                //字段数组转字段obj
                                me.fieldsToFieldsObj();
                                
                                //设置字段事件
                                me.tableFieldClick();
                            }
                        },
 
                        // 字段点击事件
                        tableFieldClick() {
                            var me = this;
                            // 点击表格字段
                            me.tablefieldClick = {
                                version_no: {
                                    val: {
                                        onclick: function(obj) {
                                            me.showVersionInfo(obj);
                                        }
                                    }
                                },
                                approval: {
                                    val: {
                                        onclick: function(obj) {
                                            //
                                        }
                                    }
                                }
                            }
                        },
 
                        // 点击版本号展示当前版本信息
                        showVersionInfo(obj) {
                            var me = this;
                            var config = {
                                totab: false, // true,以tab导航形式打开,false,以弹框形式打开
                                width: "600px",
                                height: "500px",
                                icon: "icon-product",
                                text: "版本查看",
                                data: obj.data,
                                delta: {},
                                id: "version_info" + "browse",
                                url: "../detail/version_info.html",
                                scenecode: "browse", // browse:查看,add:新增,refuseedit:拒绝后的编辑,
                                                     // approval:审批,edit:编辑,change:变更,end:终止
                                callback: function(obj,callback) {
                                    if(callback) {
                                        callback();
                                    }
                                },
                            }
                            me.doPopupByPublic(config);
                        },
                    },
                });
            };
            initVue();
        </script>
 
        <style>
            [v-cloak] {
                display: none !important;
            }
 
            .topbar {
                font-size: 16px;
            }
        </style>
    </body>
</html>