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
<!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 = [];
                window.top.initJsCss(document, jscss_urls, callback);
            };
            
            function initVue() {
                new ListVue({
                    el: "#vbody",
                    data: {
                        title: "折扣计算进度",
                        popupParames: {},
                        formdata: {},//fileid, filename
                        filetype: "",
                        file_pdf: "",
                        imglist: [],
                        seal: false,
                        
                        washProcessList1: [
                            {id: "001", name: "协次计算", statusname: "0%"},
                            {id: "002", name: "折扣申请计算", statusname: "0%"},
                            // {id: "001", name: "获取员工、架构、客户、指标主数据", statusname: "0%"},
                            // {id: "002", name: "获取业务数据", statusname: "0%"},
                            // {id: "003", name: "获取折扣方案参数", statusname: "0%"},
                            // {id: "004", name: "匹配员工、考勤、业务数据", statusname: "0%"},
                            // {id: "005", name: "计算完成,生成折扣列表", statusname: "0%"},
                        ],
                        washProcessList2: [
                            {id: "001", name: "获取经销商,架构主数据", statusname: "0%"},
                            {id: "002", name: "获取流向数据", statusname: "0%"},
                            {id: "003", name: "匹配折扣准则,计算费用", statusname: "0%"},
                            {id: "004", name: "计算完成,生成费用明细", statusname: "0%"},
                        ],
                        washProcessCnt: {
                            flow_cnt: 2000,
                            com_cnt: 2000,
                            sys_cnt: 1800,
                            user_cnt: 200
                        },
                        formAttr: {
                            istitle: false,
                            title: "表单名称",
                            columnnumber: 2,
                            labelwidth: "140px",
                            labelposition: "left",//"left",// right//top
                            size: "mini",
                            border: "1px solid #c6c6c600"
                        },
                        default_formFields: [
                            {isshow: "T", field: "nowadays", name: "当前期间", type: "span"},
                            {isshow: "T", field: "time", name: "距离费用定版时间", type: "span"},
                            {isshow: "T", field: "month_count", name: "本月已经计算次数", type: "span"},
                            {isshow: "T", field: "lastdate", name: "上次计算时间", type: "span"},
                        ],
                        formData: {
                            nowadays: dateFormat(new Date(), "yyyy-MM-dd"),
                            time: "3天",
                            month_count: "4次",
                            lastdate: "2023-04-20 15:21:54"
                        },
                        formfieldClick: {},
                        checked1: false,
                        checked2: false,
                        plantype: "",
                    },
                    created() {
                        this.popupParames = clone(Root.popupParames);
                        if (this.popupParames.delta && this.popupParames.delta.type) {
                            this.plantype = this.popupParames.delta.type;
                        }
                        this.formdata = clone(this.popupParames.data);
                        
                    },
                    
                    mounted() {
                        this.initData();
                        this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
                            hideLoading();
                            //重新设置弹窗宽高
                            this.$nextTick(function(){
                                //let w_ = this.$refs.popup_body.offsetWidth  "px";
                                let w_ = "900px";
                                let h_ = this.$refs.popup_body.offsetHeight + 20 + "px";
                                
                                // let w_ = "700px";
                                // let h_ = "400px";
                                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: clone(this.formdata)
                                }
                                this.popupParames.callback(obj, function() {
                                    me.closeDialog();
                                });
                            }
                            else {
                                me.closeDialog();
                            }
                        },
                        
                        onServerInitData(data) {
                            var me = this.data;
                        },
                        
                        initData() {
                            
                        },
                        
                        download() {
                            var fileid = this.formdata.fileid;
                            handleDownload(fileid);
                        },
                        
                    }
                });
            };
            
            loadJsCss(function () {
                initVue();
            });
        </script>
        
        <style>
            html{
                overflow-x: hidden;
            }
            .z_checkbox .el-checkbox__label {
                font-size: 16px;
                color: #000;
            }
            .z_checkbox .el-checkbox {
                
            }
        </style>
    </head>
    
    <body style="margin: 0px;">
        <div v-cloak id="vbody">
            <div id="page_root">
                <div ref="popup_body" style="padding: 0px 20px;">
                    <!-- <div class="el-dialog__header">
                        <div class="dialog-title">
                          <i class="iconfont icon-customermanagement"></i>
                          <span> {{title}} </span>
                        </div>
                    </div> -->    
                    <div style="height: 510px;">
                        <div style="height: 480px; overflow-y: auto; margin: 10px 0px;">
                            <div style="padding: 0 20px; line-height: 40px;">
                                <el-row>
                                    <el-col :span="12">
                                        <div class="">
                                            <i class="el-icon-date"></i>
                                            <span>当前期间:</span><span>{{formData.nowadays}}</span>
                                        </div>
                                    </el-col>
                                    <el-col :span="12">
                                        <div class="">
                                            <i class="el-icon-date"></i>
                                            <span>距离费用定版时间:</span><span>{{formData.time}}</span>
                                        </div>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="12">
                                        <div class="">
                                            <i class="el-icon-collection-tag"></i>
                                            <span>本月已经计算次数:</span><span>{{formData.month_count}}</span>
                                        </div>
                                    </el-col>
                                    <el-col :span="12">
                                        <div class="">
                                            <i class="el-icon-alarm-clock"></i>
                                            <span>上次计算时间:</span><span>{{formData.lastdate}}</span>
                                        </div>
                                    </el-col>
                                </el-row>
                            </div>
                            
                            <!--  -->
                            <div v-if="plantype == 'task'" class="versionNo" style="position: relative; padding: 10px 20px;">
                                <div class="z_checkbox">
                                    <el-checkbox v-model="checked2">折扣明细</el-checkbox>
                                </div>
                                <template v-if="washProcessList2.length">
                                    <div style="padding: 0 20px;">
                                        <div v-for="(wash, k) in washProcessList2" :key="k">
                                            <div style="border-bottom: 1px dashed #aaa; height: 40px;line-height: 40px; font-size: 14px;">
                                                <span>&#40;{{(k + 1)}}&#41;</span>
                                                <span>{{wash.name}}</span>
                                                
                                                <span style="float: right;">{{wash.statusname}}</span>
                                            </div>
                                        </div>
                                    </div>
                                </template>
                            </div>
                            
                            <div v-else-if="plantype == 'rebate'"  class="versionNo" style="position: relative; padding: 10px 20px;">
                                <div class="z_checkbox">
                                    <el-checkbox v-model="checked1">折扣准则</el-checkbox>
                                </div>
                                <template v-if="washProcessList1.length">
                                    <div style="padding: 0 20px;">
                                        <div v-for="(wash, k) in washProcessList1" :key="k">
                                            <div style="border-bottom: 1px dashed #aaa; height: 40px;line-height: 40px; font-size: 14px;">
                                                <span>&#40;{{k + 1}}&#41;</span>
                                                <span>{{wash.name}}</span>
                                                
                                                <span style="float: right;">{{wash.statusname}}</span>
                                            </div>
                                        </div>
                                    </div>
                                </template>
                            </div>
                        </div>
                    </div>
                    <div class="el-dialog__footer">
                        <el-button size="small" type="default" @click="closeDialog">关 闭</el-button>
                        <el-button size="small" type="success" @click="">运 行</el-button>
                        
                    </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>
        </div>
            
    </body>
</html>