Blame view

dist/static/js/pages/leave/main.js 13.3 KB
ce4c83ff   wxy   初始提交
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
  global.webpackJsonp([26],{
  
  /***/ 203:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  
  var _vue = __webpack_require__(1);
  
  var _vue2 = _interopRequireDefault(_vue);
  
  var _index = __webpack_require__(204);
  
  var _index2 = _interopRequireDefault(_index);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  var app = new _vue2.default(_index2.default);
  app.$mount();
  
  exports.default = {
    config: {
      navigationBarTitleText: '请假'
    }
  };
  
  /***/ }),
  
  /***/ 204:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(206);
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__);
601b4cbe   wxy   修改我的评价iOS手机日期显示问题
41
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_48d1cb09_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__ = __webpack_require__(207);
ce4c83ff   wxy   初始提交
42
43
44
45
46
47
48
49
50
51
52
53
54
  var disposed = false
  function injectStyle (ssrContext) {
    if (disposed) return
    __webpack_require__(205)
  }
  var normalizeComponent = __webpack_require__(0)
  /* script */
  
  /* template */
  
  /* styles */
  var __vue_styles__ = injectStyle
  /* scopeId */
601b4cbe   wxy   修改我的评价iOS手机日期显示问题
55
  var __vue_scopeId__ = "data-v-48d1cb09"
ce4c83ff   wxy   初始提交
56
57
58
59
  /* moduleIdentifier (server only) */
  var __vue_module_identifier__ = null
  var Component = normalizeComponent(
    __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue___default.a,
601b4cbe   wxy   修改我的评价iOS手机日期显示问题
60
    __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_48d1cb09_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__["a" /* default */],
ce4c83ff   wxy   初始提交
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
    __vue_styles__,
    __vue_scopeId__,
    __vue_module_identifier__
  )
  Component.options.__file = "src\\pages\\leave\\index.vue"
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
  if (Component.options.functional) {console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions.")}
  
  /* hot reload */
  if (false) {(function () {
    var hotAPI = require("vue-hot-reload-api")
    hotAPI.install(require("vue"), false)
    if (!hotAPI.compatible) return
    module.hot.accept()
    if (!module.hot.data) {
601b4cbe   wxy   修改我的评价iOS手机日期显示问题
76
      hotAPI.createRecord("data-v-48d1cb09", Component.options)
ce4c83ff   wxy   初始提交
77
    } else {
601b4cbe   wxy   修改我的评价iOS手机日期显示问题
78
      hotAPI.reload("data-v-48d1cb09", Component.options)
ce4c83ff   wxy   初始提交
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
    }
    module.hot.dispose(function (data) {
      disposed = true
    })
  })()}
  
  /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  
  
  /***/ }),
  
  /***/ 205:
  /***/ (function(module, exports) {
  
  // removed by extract-text-webpack-plugin
  
  /***/ }),
  
  /***/ 206:
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  
  exports.default = {
    data: function data() {
      return {
        startDate: '',
        startTime: '',
        endDate: '',
        endTime: '',
        cause: '',
        lawPrincipal: '',
        approverId: '',
        commiting: false
      };
    },
  
    methods: {
      commit: function commit(e) {
        var _this = this;
  
        if (this.commiting) return;
        console.log(this.startDate + ' ' + this.startTime + ':00');
        var inputs = this.service.filter(e.mp.detail.value);
        if (!this.service.checkEmptyInput([this.startDate, this.startTime, this.startDate, this.endTime, this.cause], ['开始日期', '开始时间', '结束日期', '结束时间', '请假事由'])) {
          return;
        }
        if (!this.service.checkBadWords([this.cause], ['请假事由'])) {
          return;
        }
        wx.showModal({
          title: '',
          content: '确定要提交吗?',
          success: function success(res) {
            if (res.confirm) {
              _this.execCommit(e);
            }
          }
        });
      },
      execCommit: function execCommit(e) {
        var _this2 = this;
  
        console.log(this.approverId);
        this.commiting = true;
        var startDate = this.startDate + ' ' + this.startTime + ':00';
        var endDate = this.endDate + ' ' + this.endTime + ':00';
        wx.showLoading({ title: '正在提交' });
        wx.request({
          url: this.rootUrl + 'leave/add',
          method: 'POST',
          header: { 'content-type': 'application/x-www-form-urlencoded' },
          data: {
            startDate: startDate,
            endDate: endDate,
            cause: this.cause,
            Approver_id: this.approverId,
            sessionID: wx.getStorageSync('sessionID')
          },
          success: function success(res) {
            console.log(res);
            if (res.statusCode == '500') {
              _this2.service.getUnionId(_this2.rootAvatar, _this2.rootUrl).then(function (res) {
                return _this2.submit_exec(content);
              });
            } else {
              wx.hideLoading();
              if (res.data === 1) {
                wx.showModal({
                  title: '提交成功',
                  content: '',
                  showCancel: false
                });
                _this2.text = '';
                wx.hideLoading();
                _this2.toHomelist();
              } else {
                wx.showToast({ title: '提交失败', icon: 'none' });
              }
              _this2.commiting = false;
            }
          }
        });
      },
  
      //回到首页
      toHomelist: function toHomelist() {
        wx.navigateBack({
          url: '../leaveList/main'
          // delta: 1
        });
        // wx.redirectTo({ url: '../leaveList/main?Refresh=true' })
        // const pages = getCurrentPages()
        // pages[pages.length -2 ].onload()
        // pages[pages.length -2 ].refresh()
      },
      pickerConfirm: function pickerConfirm(e, s) {
        switch (s) {
          case 'time':
            this.startTime = e.mp.detail.value;break;
          case 'date':
            this.startDate = e.mp.detail.value;break;
        }
      },
      pickerConfirm2: function pickerConfirm2(e, s) {
        switch (s) {
          case 'time':
            this.endTime = e.mp.detail.value;break;
          case 'date':
            this.endDate = e.mp.detail.value;break;
        }
      },
  
      // submit1 (){
      //   wx.requestSubscribeMessage({
      //     tmplIds: ['N7I9WVwRXIRzAUOG6aVK7_Zo2EVJFCKBYhqsWip-T8g'],
      //     success (res) {
      //       if (res['N7I9WVwRXIRzAUOG6aVK7_Zo2EVJFCKBYhqsWip-T8g'] === 'accept'){
      //         wx.showToast({
      //           title: '订阅OK!',
      //           duration: 1000,
      //           success(data) {
      //             console.log(res)
      //           }
      //         })
      //       }
      //     },
      //     fail (res) {
      //       console.log(res)
      //     }
      //   })
      // },
      loadArticles: function loadArticles() {
        this.getlaw();
      },
      getlaw: function getlaw() {
        var _this3 = this;
  
        wx.showLoading({ title: '正在加载' });
        wx.request({
          url: this.rootUrl + 'leave/getLawPrincipal',
          method: 'get',
          header: { 'content-type': 'application/x-www-form-urlencoded' },
          data: {
            sessionID: wx.getStorageSync('sessionID')
          },
          success: function success(res) {
            if (res.statusCode == '500') {
              // this.service.getUnionId(this.rootAvatar, this.rootUrl).then(res => this.submit_exec(content))
            } else {
              console.log(res.data);
              _this3.lawPrincipal = res.data.name;
              _this3.approverId = res.data.liid;
              console.log(_this3.lawPrincipal);
              wx.hideLoading();
            }
          }
        });
      }
    },
    onLoad: function onLoad() {
      this.getlaw();
    },
    onShow: function onShow() {
      this.loadArticles();
    },
    onUnload: function onUnload() {
      this.lawPrincipal = '';
      this.approverId = '';
      this.loaded = false;
      this.startTime = '';
      this.startDate = '';
      this.endTime = '';
      this.endDate = '';
    }
  };
  
  /***/ }),
  
  /***/ 207:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
    return _c('div', {
      staticClass: "baseinfo"
    }, [_c('form', {
      staticClass: "baseinfo-box",
      attrs: {
        "eventid": '6'
      },
      on: {
        "submit": _vm.commit
      }
    }, [_c('div', {
      staticClass: "list-input"
    }, [_c('span', [_vm._v("开始时间")]), _vm._v(" "), _c('div', {
      staticClass: "datebox"
    }, [_c('picker', {
      staticClass: "time",
      attrs: {
        "mode": "time",
        "value": _vm.startTime,
        "eventid": '0'
      },
      on: {
        "change": function($event) {
          _vm.pickerConfirm($event, 'time')
        }
      },
      model: {
        value: (_vm.startTime),
        callback: function($$v) {
          _vm.startTime = $$v
        },
        expression: "startTime"
      }
    }, [_c('div', {
      class: {
        unset: _vm.startTime == ''
      },
      attrs: {
        "hover-class": "hover"
      }
    }, [_vm._v(_vm._s(_vm.startTime || '选择时间'))])]), _vm._v(" "), _c('picker', {
      staticClass: "date",
      attrs: {
        "mode": "date",
        "value": _vm.startDate,
        "eventid": '1'
      },
      on: {
        "change": function($event) {
          _vm.pickerConfirm($event, 'date')
        }
      },
      model: {
        value: (_vm.startDate),
        callback: function($$v) {
          _vm.startDate = $$v
        },
        expression: "startDate"
      }
    }, [_c('div', {
      class: {
        unset: _vm.startDate == ''
      },
      attrs: {
        "hover-class": "hover"
      }
    }, [_vm._v(_vm._s(_vm.startDate || '选择日期'))])])], 1)]), _vm._v(" "), _c('div', {
      staticClass: "list-input"
    }, [_c('span', [_vm._v("结束时间")]), _vm._v(" "), _c('div', {
      staticClass: "datebox"
    }, [_c('picker', {
      staticClass: "time",
      attrs: {
        "mode": "time",
        "value": _vm.endTime,
        "eventid": '2'
      },
      on: {
        "change": function($event) {
          _vm.pickerConfirm2($event, 'time')
        }
      },
      model: {
        value: (_vm.endTime),
        callback: function($$v) {
          _vm.endTime = $$v
        },
        expression: "endTime"
      }
    }, [_c('div', {
      class: {
        unset: _vm.endTime == ''
      },
      attrs: {
        "hover-class": "hover"
      }
    }, [_vm._v(_vm._s(_vm.endTime || '选择时间'))])]), _vm._v(" "), _c('picker', {
      staticClass: "date",
      attrs: {
        "mode": "date",
        "value": _vm.endDate,
        "eventid": '3'
      },
      on: {
        "change": function($event) {
          _vm.pickerConfirm2($event, 'date')
        }
      },
      model: {
        value: (_vm.endDate),
        callback: function($$v) {
          _vm.endDate = $$v
        },
        expression: "endDate"
      }
    }, [_c('div', {
      class: {
        unset: _vm.endDate == ''
      },
      attrs: {
        "hover-class": "hover"
      }
    }, [_vm._v(_vm._s(_vm.endDate || '选择日期'))])])], 1)]), _vm._v(" "), _c('div', {
      staticClass: "list-input"
    }, [_c('span', [_vm._v("请假事由")])]), _vm._v(" "), _c('div', {
      staticClass: "longtext"
    }, [_c('textarea', {
      directives: [{
        name: "model",
        rawName: "v-model",
        value: (_vm.cause),
        expression: "cause"
      }],
      attrs: {
        "placeholder": "请输入请假事由",
        "name": "cause",
        "value": _vm.cause,
        "eventid": '4'
      },
      domProps: {
        "value": (_vm.cause)
      },
      on: {
        "input": function($event) {
          if ($event.target.composing) { return; }
          _vm.cause = $event.target.value
        }
      }
    })]), _vm._v(" "), _c('div', {
      staticClass: "list-input"
    }, [_c('span', [_vm._v("审批人")]), _vm._v(" "), _c('input', {
      directives: [{
        name: "model",
        rawName: "v-model",
        value: (_vm.lawPrincipal),
        expression: "lawPrincipal"
      }],
      attrs: {
        "name": "",
        "value": "lawPrincipal",
        "readonly": "",
        "disabled": "",
        "eventid": '5'
      },
      domProps: {
        "value": (_vm.lawPrincipal)
      },
      on: {
        "input": function($event) {
          if ($event.target.composing) { return; }
          _vm.lawPrincipal = $event.target.value
        }
      }
    })]), _vm._v(" "), _c('div', {
      staticClass: "commit"
    }, [_c('button', {
      attrs: {
        "form-type": "submit",
        "hover-class": "fade",
        "disabled": _vm.commiting,
        "bindtap": "submit"
      }
    }, [_vm._v("提交")])], 1)])], 1)
  }
  var staticRenderFns = []
  render._withStripped = true
  var esExports = { render: render, staticRenderFns: staticRenderFns }
  /* harmony default export */ __webpack_exports__["a"] = (esExports);
  if (false) {
    module.hot.accept()
    if (module.hot.data) {
601b4cbe   wxy   修改我的评价iOS手机日期显示问题
525
       require("vue-hot-reload-api").rerender("data-v-48d1cb09", esExports)
ce4c83ff   wxy   初始提交
526
527
528
529
530
531
532
    }
  }
  
  /***/ })
  
  },[203]);
  //# sourceMappingURL=main.js.map