apply-clients 3.0.10-216 → 3.0.10-219

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.0.10-216",
3
+ "version": "3.0.10-219",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -344,7 +344,12 @@
344
344
  resolveMsg: null,
345
345
  rejectMsg: '获取收费信息失败'
346
346
  })
347
- this.model=res
347
+ console.log("看看res :",res)
348
+ let temp = {
349
+ rows:[]
350
+ }
351
+ temp.rows = res.data
352
+ this.model=temp
348
353
  },
349
354
  generateUUID() {
350
355
  var d = new Date().getTime()
@@ -398,6 +403,8 @@
398
403
  //用户id
399
404
  let array = []
400
405
  let arraydata = {}
406
+ console.log("看看rows:",this.model.rows)
407
+ console.log("看看model:",this.model)
401
408
  for (let i = 0; i < this.model.rows.length; i++) {
402
409
  arraydata = {
403
410
  f_charge_money: this.model.rows[i].f_unaccounts_money,
@@ -451,8 +458,8 @@
451
458
  res = await http.load('POST', 'rs/logic/updateBatchUnaccounts', {data: data}, {resolveMsg: null, rejectMsg: "更新失败"})
452
459
  if (res.data.status == 200) {
453
460
  this.$showMessage("缴费成功")
454
- this.$refs.cp.$refs.cri.search()
455
461
  this.closecharge()
462
+ this.$refs.cp.$refs.cri.search()
456
463
  }else {
457
464
  this.$showMessage("缴费失败")
458
465
  this.closecharge()
@@ -518,8 +525,9 @@
518
525
  res = await http.load('POST', 'rs/logic/updateBatchUnaccounts', {data: data}, {resolveMsg: null, rejectMsg: "更新失败"})
519
526
  if (res.data.status == 200) {
520
527
  this.$showMessage("缴费成功")
521
- this.$refs.cp.$refs.cri.search()
522
528
  this.closeSingleCharge()
529
+ this.$refs.cp.$refs.cri.search()
530
+
523
531
  }else {
524
532
  this.$showMessage("缴费失败")
525
533
  this.closeSingleCharge()
@@ -1,433 +1,433 @@
1
- <template>
2
- <criteria-paged :model="model" v-ref:cp>
3
- <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
4
- <div class="form-horizontal select-overspread container-fluid auto" partial>
5
- <div class="row">
6
- <div class="form-group col-sm-3">
7
- <label class="font_normal_body">隐患项目名称:</label>
8
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_hidden_name"
9
- v-on:keyup.enter="$parent.$parent.search()" condition="f_hidden_name like '%{}%'" placeholder='隐患项目名称'>
10
- </div>
11
- <div class="form-group col-sm-2">
12
- <label class="font_normal_body">所属公司:</label>
13
- <v-select
14
- v-model="model.f_orgname"
15
- placeholder='请选择'
16
- :value.sync="model.f_orgname"
17
- condition="f_orgname = '{}'"
18
- :options='$parent.$parent.apply_org'
19
- class="select select_list"
20
- :value-single="true"
21
- close-on-select ></v-select>
22
- </div>
23
- <div class="form-group col-sm-2">
24
- <label class="font_normal_body">施工单位:</label>
25
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_project_unit"
26
- v-on:keyup.enter="$parent.$parent.search()" condition="f_project_unit like '%{}%'" placeholder=''>
27
- </div>
28
- <div class="form-group col-sm-3">
29
- <label class="font_normal_body">项目整改状态:</label>
30
- <v-select
31
- v-model="model.f_project_state"
32
- placeholder='请选择'
33
- :value.sync="model.f_project_state"
34
- :options='$parent.$parent.projectStatus'
35
- condition="f_project_state = '{}'"
36
- class="select select_list"
37
- :value-single="true"
38
- close-on-select ></v-select>
39
- </div>
40
- <div class="form-group col-sm-2">
41
- <label class="font_normal_body">隐患级别:</label>
42
- <v-select
43
- v-model="model.f_project_state"
44
- placeholder='请选择'
45
- :value.sync="model.f_project_state"
46
- :options='$parent.$parent.hiddenrank'
47
- condition="f_project_state = '{}'"
48
- class="select select_list"
49
- :value-single="true"
50
- close-on-select ></v-select>
51
- </div>
52
- </div>
53
- <div class="row">
54
- <div class="form-group col-sm-3">
55
- <label for="startDate" class="font_normal_body">预计开工时间:</label>
56
- <datepicker id="startDate" placeholder="开始日期"
57
- style="width: 60%!important;"
58
- v-model="model.startDate"
59
- :value.sync="model.startDate"
60
- :format="'yyyy-MM-dd HH:mm:ss'"
61
- :show-reset-button="true"
62
- condition="f_start_working_date >= '{}'">
63
- </datepicker>
64
- </div>
65
- <div class="form-group col-sm-3">
66
- <label for="startDate" class="font_normal_body">预计完工时间:</label>
67
- <datepicker id="startDate1" placeholder="开始日期"
68
- style="width: 60%!important;"
69
- v-model="model.startDate2"
70
- :value.sync="model.startDate2"
71
- :format="'yyyy-MM-dd HH:mm:ss'"
72
- :show-reset-button="true"
73
- condition="f_complete_working_date <= '{}'">
74
- </datepicker>
75
- </div>
76
- <div class="form-group col-sm-5">
77
- <label for="startDate" class="font_normal_body">已超过约定工期天数:</label>
78
- <input type="text" class="input_search" v-model="model.f_overdue_date"
79
- condition="f_overdue_date >= '{}'" placeholder='已超过约定工期天数'>
80
- </div>
81
- </div>
82
- <div class="row">
83
-
84
- <div class="form-group col-sm-3">
85
- <label class="font_normal_body">项目预计整改费用:</label>
86
- <input type="text" class="input_search"
87
- v-model="model.f_budget_correction_fee"
88
- placeholder=''
89
- condition="f_budget_correction_fee = '{}'"/>
90
- </div>
91
- <div class="form-group col-sm-9 button-range">
92
- <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
93
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
94
- <button class="button_search button_spacing" @click="$parent.$parent.return()" v-el:cx>返回</button>
95
- <export-excel progress="apply_getExportProgress"
96
- :data="{condition: $parent.$parent.condition}"
97
- :field="$parent.$parent.getfield()"
98
- sqlurl="rs/logic/apply_exportfile"
99
- sql-name="hiddenProject"
100
- template-name='安全隐患导出'
101
- :choose-col="true">
102
- </export-excel>
103
- <button class="button_new button_spacing" style="width: 100px" @click="$parent.$parent.openAddContract()">添加隐患</button>
104
- </div>
105
- </div>
106
- </div>
107
- </criteria>
108
- <data-grid v-if="$parent.showData" :model="model" partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
109
- <template partial='head'>
110
- <tr>
111
- <th style="white-space: nowrap;">序号</th>
112
- <th style="white-space: nowrap;">所属公司</th>
113
- <th style="white-space: nowrap;">隐患项目名称</th>
114
- <th style="white-space: nowrap;">项目地点</th>
115
- <th style="white-space: nowrap;">隐患类别</th>
116
- <th style="white-space: nowrap;">隐患级别</th>
117
- <th style="white-space: nowrap;">施工单位</th>
118
- <th style="white-space: nowrap;">项目排查时间</th>
119
- <th style="white-space: nowrap;">项目状态</th>
120
- <th style="white-space: nowrap;">预计开工日期</th>
121
- <th style="white-space: nowrap;">预计完工日期</th>
122
- <th style="white-space: nowrap;">工期(天数)</th>
123
- <th style="white-space: nowrap;">已超过约定工期天数</th>
124
- <th style="white-space: nowrap;">项目预计整改费用</th>
125
- <th style="white-space: nowrap;">项目实际整改费用</th>
126
- <th style="white-space: nowrap;">累计付款</th>
127
- <th style="white-space: nowrap;">材料款</th>
128
- <th style="white-space: nowrap;">工程款</th>
129
- <th style="white-space: nowrap;">人工款</th>
130
- <th style="white-space: nowrap;">是否属于年度预算内整改</th>
131
- <th style="white-space: nowrap;">操作</th>
132
- </tr>
133
- </template>
134
- <template partial='body'>
135
- <tr >
136
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
137
- <nobr><font>{{$index+1}}</font></nobr>
138
- </td>
139
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
140
- <nobr><font>{{row.f_orgname}}</font></nobr>
141
- </td>
142
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
143
- <nobr><font>{{row.f_hidden_name}}</font></nobr>
144
- </td>
145
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
146
- <nobr><font>{{row.f_hidden_address}}</font></nobr>
147
- </td>
148
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
149
- <nobr><font>{{row.f_hidden_classes}}</font></nobr>
150
- </td>
151
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
152
- <nobr><font>{{row.f_hidden_rank}}</font></nobr>
153
- </td>
154
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
155
- <nobr><font>{{row.f_project_unit}}</font></nobr>
156
- </td>
157
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
158
- <nobr><font>{{row.f_troubleshoot_date}}</font></nobr>
159
- </td>
160
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
161
- <nobr><font>{{row.f_project_state}}</font></nobr>
162
- </td>
163
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
164
- <nobr><font>{{row.f_start_working_date}}</font></nobr>
165
- </td>
166
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
167
- <nobr><font>{{row.f_complete_working_date}}</font></nobr>
168
- </td>
169
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
170
- <nobr><font>{{row.f_working_date}}</font></nobr>
171
- </td>
172
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
173
- <nobr><font>{{row.f_overdue_date}}</font></nobr>
174
- </td>
175
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
176
- <nobr><font>{{row.f_budget_correction_fee}}</font></nobr>
177
- </td>
178
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
179
- <nobr><font>{{row.f_actual_rectification_cost}}</font></nobr>
180
- </td>
181
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
182
- <nobr><font>{{row.f_total_payment}}</font></nobr>
183
- </td>
184
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
185
- <nobr><font>{{row.f_materials_fee}}</font></nobr>
186
- </td>
187
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
188
- <nobr><font>{{row.f_project_fee}}</font></nobr>
189
- </td>
190
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
191
- <nobr><font>{{row.f_artificial_fee}}</font></nobr>
192
- </td>
193
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
194
- <nobr><font>{{row.f_hidden_budget_correction}}</font></nobr>
195
- </td>
196
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;">
197
- <nobr>
198
- <a href="#" @click="$parent.$parent.$parent.openRenew(row)">修改</a>&emsp;|&emsp;
199
- <a href="#" @click="$parent.$parent.$parent.deleteRow(row)">删除</a>
200
- </nobr>
201
- </td>
202
- </tr>
203
- </template>
204
- </data-grid>
205
- </criteria-paged>
206
- </template>
207
-
208
- <script>
209
- import {HttpResetClass, PagedList} from 'vue-client'
210
- import {isEmpty} from '../../Util'
211
- // Date格式化
212
- Date.prototype.Format = function (fmt) {
213
- var o = {
214
- 'M+': this.getMonth() + 1, // 月份
215
- 'd+': this.getDate(), // 日
216
- 'H+': this.getHours(), // 小时
217
- 'm+': this.getMinutes(), // 分
218
- 's+': this.getSeconds(), // 秒
219
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
220
- 'S': this.getMilliseconds() // 毫秒
221
- }
222
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
223
- for (var k in o) {
224
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
225
- }
226
- return fmt
227
- }
228
- export default {
229
- title: '隐患项目列表',
230
- props: ['showData'],
231
- data () {
232
- return {
233
- model: new PagedList('gongcheng/rs/sql/hiddenProject', 30, {
234
- data: {
235
- orgid: this.$login.f.orgid,
236
- date: new Date().Format('yyyy-MM-dd')
237
- }
238
- }
239
- ),
240
- projectStatus: [{label: '全部', value: ''}, ...this.$appdata.getParam('项目整改状态')],
241
- hiddenrank: [{label: '全部', value: ''}, {label: '一般', value: '一般'},{label: '较大',value: '较大'},{label: '重大', value: '重大'}],
242
- // projectStatus: [{label: '全部', value: ''}, {label: '完工', value: '完工'},{label: '未完工', value: '未完工'}],
243
- criteriaShow: false,
244
- apply_org: [],
245
- chargeAll: {
246
- count: 0,
247
- sum: 0,
248
- yujisum:0,
249
- shijisum:0
250
- },
251
- condition: ''
252
- }
253
- },
254
- ready () {
255
- this.$refs.cp.$refs.cri.model.f_overdue_date = 1
256
- // 调用查询
257
- this.search()
258
- this.getOrgName()
259
- },
260
- methods: {
261
- async getChargeAll(args){
262
- debugger
263
- let http = new HttpResetClass()
264
- let data = {
265
- condition: args.condition,
266
- data: {
267
- orgid: this.$login.f.orgid
268
- }
269
- }
270
- let res = await http.load('POST', 'gongcheng/rs/sql/yinhuanchargeAll', {data: data}, {resolveMsg: null, rejectMsg: null})
271
-
272
- this.chargeAll = res.data[0]
273
- },
274
- // 获取所有组织名称
275
- async getOrgName() {
276
- console.log("打印公司",this.$login.f.orgs)
277
- debugger
278
- let http = new HttpResetClass()
279
- let org = this.$login.f.orgs === '重庆盛焰集团' || this.$login.f.orgs === '湖南燎原燃气有限公司' ? " 1 = 1" : " name = '" + this.$login.f.orgs + "'"
280
- let data = {
281
- tablename: 't_organization',
282
- condition: " name != '组织机构' and " + org
283
- }
284
- let res = await http.load('POST','gongcheng/rs/sql/applysingleTable',{data:data}, {
285
- resolveMsg: null,
286
- rejectMsg: '获取公司名称失败'
287
- })
288
- for (let i = 0; i < res.data.length; i++) {
289
- // 所属公司
290
- let data1 = []
291
- let array1 = []
292
- data1 = res.data.map(item => {
293
- return item.name;
294
- })
295
- for (let q = 0; q < data1.length; q++) {
296
- let arraydata = {
297
- 'label': data1[q],
298
- 'value': data1[q]
299
- }
300
- debugger
301
- if (array1.length != 0) {
302
- for (let w = 0; w < array1.length; w++) {
303
- if (array1[w].label == data1[q]) {
304
- break
305
- }
306
- while (w == array1.length - 1) {
307
- array1.push(arraydata)
308
- break
309
- }
310
- }
311
- } else {
312
- debugger
313
- array1.push(arraydata)
314
- }
315
- }
316
- this.apply_org = array1
317
- }
318
- },
319
- openInvalid (row) {
320
- this.$dispatch('openInvalid', row)
321
- },
322
- searchCondition (args) {
323
- if(this.$login.f.orgs !== '重庆盛焰集团') {
324
- args.condition += ` and f_orgname = '${this.$login.f.orgs}'`
325
- }
326
- if (!isEmpty(args.model.f_contract_status)) {
327
- args.condition += ` and ${args.model.f_contract_status}`
328
- }
329
- this.getChargeAll(args)
330
- if (!isEmpty(args.model.f_contract_status)) {
331
- args.condition += ` and ${args.model.f_contract_status}`
332
- }
333
- this.condition = args.condition
334
- this.getChargeAll(args)
335
- this.model.search(args.condition, args.model)
336
- },
337
- openRenew (row) {
338
- this.$dispatch('openRenew', row)
339
- },
340
- // 删除
341
- deleteRow (row) {
342
- this.$showMessage("确定要删除该行吗", ['confirm', 'cancel'], 'danger').then((res) => {
343
- if(res === 'confirm'){
344
- this.$resetpost('gongcheng/rs/logic/deleteProject', {id: row.id, tablename: 't_hidden_project'}, {resolveMsg: '删除成功', rejectMsg: '删除失败'})
345
- this.search()
346
- }
347
- })
348
- },
349
- // 添加合同
350
- openAddContract () {
351
- this.$dispatch('openAddContract')
352
- },
353
- // 查看合同详情
354
- openViewContract (row) {
355
- this.$dispatch('openViewContract', row)
356
- },
357
- clear () {
358
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
359
- this.$refs.cp.$refs.cri.model[key] = null
360
- })
361
- },
362
- // 查询
363
- search () {
364
- this.$dispatch('search')
365
- },
366
- return(){
367
- this.$dispatch('return')
368
- },
369
- getfield() {
370
- let report = {
371
- 'f_hidden_name': '工程项目名称',
372
- 'f_hidden_address': '项目地点',
373
- 'f_hidden_classes': '隐患类别',
374
- 'f_hidden_rank': '隐患级别',
375
- 'f_hidden_describe': '隐患描述',
376
- 'f_hidden_scheme': '制定整改方案',
377
- 'f_hidden_schemer': '整改责任人',
378
- 'f_troubleshoot_date': '项目排查时间',
379
- 'f_project_state': '项目状态',
380
- 'f_oa_approval': 'oa是否审批',
381
- 'f_budget_correction_fee': '项目预算整改费用',
382
- 'f_actual_rectification_cost': '项目实际整改费用',
383
- 'f_total_payment': '累计付款',
384
- 'f_materials_fee': '材料款',
385
- 'f_project_fee': '工程款',
386
- 'f_artificial_fee': '人工款',
387
- 'f_start_working_date': '预计开工日期',
388
- 'f_complete_working_date': '预计完工日期',
389
- 'f_working_date': '工期',
390
- 'f_start_practical_date': '实际开工日期',
391
- 'f_complete_practical_date': '实际完工日期',
392
- 'f_practical_date': '实际工期',
393
- 'f_overdue_date': '已超过约定工期天数',
394
- 'f_hidden_dangers': '项目隐患抽查情况',
395
- 'f_hidden_budget_correction': '是否属于年度预算内整改',
396
- 'f_info': '反馈内容',
397
- 'f_info_date': '反馈时间',
398
- 'f_ziorg_info': '子公司意见反馈',
399
- 'f_ziorg_date': '子公司意见反馈时间',
400
- 'f_zong_gc_info': '总部工程部意见反馈',
401
- 'f_ziorg_gc_date': '总部工程部意见反馈时间',
402
- 'f_zong_wz_info': '总部物资部意见反馈',
403
- 'f_zong_wz_date': '总部物资部意见反馈时间',
404
- 'f_zong_sj_info': '总部设计部意见反馈',
405
- 'f_zong_sj_date': '总部设计部意见反馈时间',
406
- 'f_zong_yy_info': '总部运营部意见反馈',
407
- 'f_zong_yy_date': '总部运营部意见反馈时间',
408
- 'f_zong_aq_info': '总部安全部意见反馈',
409
- 'f_zong_aq_date': '总部安全部意见反馈时间',
410
- 'f_zong_sjb_info': '总部审计部意见反馈',
411
- 'f_zong_sjb_date': '总部审计部意见反馈时间',
412
- 'f_operator': '操作人',
413
- 'f_orgname': '所属公司'
414
-
415
- }
416
- return report
417
- }
418
- },
419
- events: {
420
- },
421
- computed: {
422
- }
423
- }
424
- </script>
425
-
426
- <style scoped>
427
- .warning {
428
- background-color: #f0ad4e;
429
- }
430
- .danger {
431
- background-color: #d9534f;
432
- }
433
- </style>
1
+ <template>
2
+ <criteria-paged :model="model" v-ref:cp>
3
+ <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
4
+ <div class="form-horizontal select-overspread container-fluid auto" partial>
5
+ <div class="row">
6
+ <div class="form-group col-sm-3">
7
+ <label class="font_normal_body">隐患项目名称:</label>
8
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_hidden_name"
9
+ v-on:keyup.enter="$parent.$parent.search()" condition="f_hidden_name like '%{}%'" placeholder='隐患项目名称'>
10
+ </div>
11
+ <div class="form-group col-sm-2">
12
+ <label class="font_normal_body">所属公司:</label>
13
+ <v-select
14
+ v-model="model.f_orgname"
15
+ placeholder='请选择'
16
+ :value.sync="model.f_orgname"
17
+ condition="f_orgname = '{}'"
18
+ :options='$parent.$parent.apply_org'
19
+ class="select select_list"
20
+ :value-single="true"
21
+ close-on-select ></v-select>
22
+ </div>
23
+ <div class="form-group col-sm-2">
24
+ <label class="font_normal_body">施工单位:</label>
25
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_project_unit"
26
+ v-on:keyup.enter="$parent.$parent.search()" condition="f_project_unit like '%{}%'" placeholder=''>
27
+ </div>
28
+ <div class="form-group col-sm-3">
29
+ <label class="font_normal_body">项目整改状态:</label>
30
+ <v-select
31
+ v-model="model.f_project_state"
32
+ placeholder='请选择'
33
+ :value.sync="model.f_project_state"
34
+ :options='$parent.$parent.projectStatus'
35
+ condition="f_project_state = '{}'"
36
+ class="select select_list"
37
+ :value-single="true"
38
+ close-on-select ></v-select>
39
+ </div>
40
+ <div class="form-group col-sm-2">
41
+ <label class="font_normal_body">隐患级别:</label>
42
+ <v-select
43
+ v-model="model.f_hidden_rank"
44
+ placeholder='请选择'
45
+ :value.sync="model.f_hidden_rank"
46
+ :options='$parent.$parent.hiddenrank'
47
+ condition="f_hidden_rank = '{}'"
48
+ class="select select_list"
49
+ :value-single="true"
50
+ close-on-select ></v-select>
51
+ </div>
52
+ </div>
53
+ <div class="row">
54
+ <div class="form-group col-sm-3">
55
+ <label for="startDate" class="font_normal_body">预计开工时间:</label>
56
+ <datepicker id="startDate" placeholder="开始日期"
57
+ style="width: 60%!important;"
58
+ v-model="model.startDate"
59
+ :value.sync="model.startDate"
60
+ :format="'yyyy-MM-dd HH:mm:ss'"
61
+ :show-reset-button="true"
62
+ condition="f_start_working_date >= '{}'">
63
+ </datepicker>
64
+ </div>
65
+ <div class="form-group col-sm-3">
66
+ <label for="startDate" class="font_normal_body">预计完工时间:</label>
67
+ <datepicker id="startDate1" placeholder="开始日期"
68
+ style="width: 60%!important;"
69
+ v-model="model.startDate2"
70
+ :value.sync="model.startDate2"
71
+ :format="'yyyy-MM-dd HH:mm:ss'"
72
+ :show-reset-button="true"
73
+ condition="f_complete_working_date <= '{}'">
74
+ </datepicker>
75
+ </div>
76
+ <div class="form-group col-sm-5">
77
+ <label for="startDate" class="font_normal_body">已超过约定工期天数:</label>
78
+ <input type="text" class="input_search" v-model="model.f_overdue_date"
79
+ condition="f_overdue_date >= '{}'" placeholder='已超过约定工期天数'>
80
+ </div>
81
+ </div>
82
+ <div class="row">
83
+
84
+ <div class="form-group col-sm-3">
85
+ <label class="font_normal_body">项目预计整改费用:</label>
86
+ <input type="text" class="input_search"
87
+ v-model="model.f_budget_correction_fee"
88
+ placeholder=''
89
+ condition="f_budget_correction_fee = '{}'"/>
90
+ </div>
91
+ <div class="form-group col-sm-9 button-range">
92
+ <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
93
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
94
+ <button class="button_search button_spacing" @click="$parent.$parent.return()" v-el:cx>返回</button>
95
+ <export-excel progress="apply_getExportProgress"
96
+ :data="{condition: $parent.$parent.condition}"
97
+ :field="$parent.$parent.getfield()"
98
+ sqlurl="rs/logic/apply_exportfile"
99
+ sql-name="hiddenProject"
100
+ template-name='安全隐患导出'
101
+ :choose-col="true">
102
+ </export-excel>
103
+ <button class="button_new button_spacing" style="width: 100px" @click="$parent.$parent.openAddContract()">添加隐患</button>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ </criteria>
108
+ <data-grid v-if="$parent.showData" :model="model" partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
109
+ <template partial='head'>
110
+ <tr>
111
+ <th style="white-space: nowrap;">序号</th>
112
+ <th style="white-space: nowrap;">所属公司</th>
113
+ <th style="white-space: nowrap;">隐患项目名称</th>
114
+ <th style="white-space: nowrap;">项目地点</th>
115
+ <th style="white-space: nowrap;">隐患类别</th>
116
+ <th style="white-space: nowrap;">隐患级别</th>
117
+ <th style="white-space: nowrap;">施工单位</th>
118
+ <th style="white-space: nowrap;">项目排查时间</th>
119
+ <th style="white-space: nowrap;">项目状态</th>
120
+ <th style="white-space: nowrap;">预计开工日期</th>
121
+ <th style="white-space: nowrap;">预计完工日期</th>
122
+ <th style="white-space: nowrap;">工期(天数)</th>
123
+ <th style="white-space: nowrap;">已超过约定工期天数</th>
124
+ <th style="white-space: nowrap;">项目预计整改费用</th>
125
+ <th style="white-space: nowrap;">项目实际整改费用</th>
126
+ <th style="white-space: nowrap;">累计付款</th>
127
+ <th style="white-space: nowrap;">材料款</th>
128
+ <th style="white-space: nowrap;">工程款</th>
129
+ <th style="white-space: nowrap;">人工款</th>
130
+ <th style="white-space: nowrap;">是否属于年度预算内整改</th>
131
+ <th style="white-space: nowrap;">操作</th>
132
+ </tr>
133
+ </template>
134
+ <template partial='body'>
135
+ <tr >
136
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
137
+ <nobr><font>{{$index+1}}</font></nobr>
138
+ </td>
139
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
140
+ <nobr><font>{{row.f_orgname}}</font></nobr>
141
+ </td>
142
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
143
+ <nobr><font>{{row.f_hidden_name}}</font></nobr>
144
+ </td>
145
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
146
+ <nobr><font>{{row.f_hidden_address}}</font></nobr>
147
+ </td>
148
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
149
+ <nobr><font>{{row.f_hidden_classes}}</font></nobr>
150
+ </td>
151
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
152
+ <nobr><font>{{row.f_hidden_rank}}</font></nobr>
153
+ </td>
154
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
155
+ <nobr><font>{{row.f_project_unit}}</font></nobr>
156
+ </td>
157
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
158
+ <nobr><font>{{row.f_troubleshoot_date}}</font></nobr>
159
+ </td>
160
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
161
+ <nobr><font>{{row.f_project_state}}</font></nobr>
162
+ </td>
163
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
164
+ <nobr><font>{{row.f_start_working_date}}</font></nobr>
165
+ </td>
166
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
167
+ <nobr><font>{{row.f_complete_working_date}}</font></nobr>
168
+ </td>
169
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
170
+ <nobr><font>{{row.f_working_date}}</font></nobr>
171
+ </td>
172
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
173
+ <nobr><font>{{row.f_overdue_date}}</font></nobr>
174
+ </td>
175
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
176
+ <nobr><font>{{row.f_budget_correction_fee}}</font></nobr>
177
+ </td>
178
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
179
+ <nobr><font>{{row.f_actual_rectification_cost}}</font></nobr>
180
+ </td>
181
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
182
+ <nobr><font>{{row.f_total_payment}}</font></nobr>
183
+ </td>
184
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
185
+ <nobr><font>{{row.f_materials_fee}}</font></nobr>
186
+ </td>
187
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
188
+ <nobr><font>{{row.f_project_fee}}</font></nobr>
189
+ </td>
190
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
191
+ <nobr><font>{{row.f_artificial_fee}}</font></nobr>
192
+ </td>
193
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
194
+ <nobr><font>{{row.f_hidden_budget_correction}}</font></nobr>
195
+ </td>
196
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;">
197
+ <nobr>
198
+ <a href="#" @click="$parent.$parent.$parent.openRenew(row)">修改</a>&emsp;|&emsp;
199
+ <a href="#" @click="$parent.$parent.$parent.deleteRow(row)">删除</a>
200
+ </nobr>
201
+ </td>
202
+ </tr>
203
+ </template>
204
+ </data-grid>
205
+ </criteria-paged>
206
+ </template>
207
+
208
+ <script>
209
+ import {HttpResetClass, PagedList} from 'vue-client'
210
+ import {isEmpty} from '../../Util'
211
+ // Date格式化
212
+ Date.prototype.Format = function (fmt) {
213
+ var o = {
214
+ 'M+': this.getMonth() + 1, // 月份
215
+ 'd+': this.getDate(), // 日
216
+ 'H+': this.getHours(), // 小时
217
+ 'm+': this.getMinutes(), // 分
218
+ 's+': this.getSeconds(), // 秒
219
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
220
+ 'S': this.getMilliseconds() // 毫秒
221
+ }
222
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
223
+ for (var k in o) {
224
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
225
+ }
226
+ return fmt
227
+ }
228
+ export default {
229
+ title: '隐患项目列表',
230
+ props: ['showData'],
231
+ data () {
232
+ return {
233
+ model: new PagedList('gongcheng/rs/sql/hiddenProject', 30, {
234
+ data: {
235
+ orgid: this.$login.f.orgid,
236
+ date: new Date().Format('yyyy-MM-dd')
237
+ }
238
+ }
239
+ ),
240
+ projectStatus: [{label: '全部', value: ''}, ...this.$appdata.getParam('项目整改状态')],
241
+ hiddenrank: [{label: '全部', value: ''}, {label: '一般', value: '一般'},{label: '较大',value: '较大'},{label: '重大', value: '重大'}],
242
+ // projectStatus: [{label: '全部', value: ''}, {label: '完工', value: '完工'},{label: '未完工', value: '未完工'}],
243
+ criteriaShow: false,
244
+ apply_org: [],
245
+ chargeAll: {
246
+ count: 0,
247
+ sum: 0,
248
+ yujisum:0,
249
+ shijisum:0
250
+ },
251
+ condition: ''
252
+ }
253
+ },
254
+ ready () {
255
+ this.$refs.cp.$refs.cri.model.f_overdue_date = 1
256
+ // 调用查询
257
+ this.search()
258
+ this.getOrgName()
259
+ },
260
+ methods: {
261
+ async getChargeAll(args){
262
+ debugger
263
+ let http = new HttpResetClass()
264
+ let data = {
265
+ condition: args.condition,
266
+ data: {
267
+ orgid: this.$login.f.orgid
268
+ }
269
+ }
270
+ let res = await http.load('POST', 'gongcheng/rs/sql/yinhuanchargeAll', {data: data}, {resolveMsg: null, rejectMsg: null})
271
+
272
+ this.chargeAll = res.data[0]
273
+ },
274
+ // 获取所有组织名称
275
+ async getOrgName() {
276
+ console.log("打印公司",this.$login.f.orgs)
277
+ debugger
278
+ let http = new HttpResetClass()
279
+ let org = this.$login.f.orgs === '重庆盛焰集团' || this.$login.f.orgs === '湖南燎原燃气有限公司' ? " 1 = 1" : " name = '" + this.$login.f.orgs + "'"
280
+ let data = {
281
+ tablename: 't_organization',
282
+ condition: " name != '组织机构' and " + org
283
+ }
284
+ let res = await http.load('POST','gongcheng/rs/sql/applysingleTable',{data:data}, {
285
+ resolveMsg: null,
286
+ rejectMsg: '获取公司名称失败'
287
+ })
288
+ for (let i = 0; i < res.data.length; i++) {
289
+ // 所属公司
290
+ let data1 = []
291
+ let array1 = []
292
+ data1 = res.data.map(item => {
293
+ return item.name;
294
+ })
295
+ for (let q = 0; q < data1.length; q++) {
296
+ let arraydata = {
297
+ 'label': data1[q],
298
+ 'value': data1[q]
299
+ }
300
+ debugger
301
+ if (array1.length != 0) {
302
+ for (let w = 0; w < array1.length; w++) {
303
+ if (array1[w].label == data1[q]) {
304
+ break
305
+ }
306
+ while (w == array1.length - 1) {
307
+ array1.push(arraydata)
308
+ break
309
+ }
310
+ }
311
+ } else {
312
+ debugger
313
+ array1.push(arraydata)
314
+ }
315
+ }
316
+ this.apply_org = array1
317
+ }
318
+ },
319
+ openInvalid (row) {
320
+ this.$dispatch('openInvalid', row)
321
+ },
322
+ searchCondition (args) {
323
+ if(this.$login.f.orgs !== '重庆盛焰集团') {
324
+ args.condition += ` and f_orgname = '${this.$login.f.orgs}'`
325
+ }
326
+ if (!isEmpty(args.model.f_contract_status)) {
327
+ args.condition += ` and ${args.model.f_contract_status}`
328
+ }
329
+ this.getChargeAll(args)
330
+ if (!isEmpty(args.model.f_contract_status)) {
331
+ args.condition += ` and ${args.model.f_contract_status}`
332
+ }
333
+ this.condition = args.condition
334
+ this.getChargeAll(args)
335
+ this.model.search(args.condition, args.model)
336
+ },
337
+ openRenew (row) {
338
+ this.$dispatch('openRenew', row)
339
+ },
340
+ // 删除
341
+ deleteRow (row) {
342
+ this.$showMessage("确定要删除该行吗", ['confirm', 'cancel'], 'danger').then((res) => {
343
+ if(res === 'confirm'){
344
+ this.$resetpost('gongcheng/rs/logic/deleteProject', {id: row.id, tablename: 't_hidden_project'}, {resolveMsg: '删除成功', rejectMsg: '删除失败'})
345
+ this.search()
346
+ }
347
+ })
348
+ },
349
+ // 添加合同
350
+ openAddContract () {
351
+ this.$dispatch('openAddContract')
352
+ },
353
+ // 查看合同详情
354
+ openViewContract (row) {
355
+ this.$dispatch('openViewContract', row)
356
+ },
357
+ clear () {
358
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
359
+ this.$refs.cp.$refs.cri.model[key] = null
360
+ })
361
+ },
362
+ // 查询
363
+ search () {
364
+ this.$dispatch('search')
365
+ },
366
+ return(){
367
+ this.$dispatch('return')
368
+ },
369
+ getfield() {
370
+ let report = {
371
+ 'f_hidden_name': '工程项目名称',
372
+ 'f_hidden_address': '项目地点',
373
+ 'f_hidden_classes': '隐患类别',
374
+ 'f_hidden_rank': '隐患级别',
375
+ 'f_hidden_describe': '隐患描述',
376
+ 'f_hidden_scheme': '制定整改方案',
377
+ 'f_hidden_schemer': '整改责任人',
378
+ 'f_troubleshoot_date': '项目排查时间',
379
+ 'f_project_state': '项目状态',
380
+ 'f_oa_approval': 'oa是否审批',
381
+ 'f_budget_correction_fee': '项目预算整改费用',
382
+ 'f_actual_rectification_cost': '项目实际整改费用',
383
+ 'f_total_payment': '累计付款',
384
+ 'f_materials_fee': '材料款',
385
+ 'f_project_fee': '工程款',
386
+ 'f_artificial_fee': '人工款',
387
+ 'f_start_working_date': '预计开工日期',
388
+ 'f_complete_working_date': '预计完工日期',
389
+ 'f_working_date': '工期',
390
+ 'f_start_practical_date': '实际开工日期',
391
+ 'f_complete_practical_date': '实际完工日期',
392
+ 'f_practical_date': '实际工期',
393
+ 'f_overdue_date': '已超过约定工期天数',
394
+ 'f_hidden_dangers': '项目隐患抽查情况',
395
+ 'f_hidden_budget_correction': '是否属于年度预算内整改',
396
+ 'f_info': '反馈内容',
397
+ 'f_info_date': '反馈时间',
398
+ 'f_ziorg_info': '子公司意见反馈',
399
+ 'f_ziorg_date': '子公司意见反馈时间',
400
+ 'f_zong_gc_info': '总部工程部意见反馈',
401
+ 'f_ziorg_gc_date': '总部工程部意见反馈时间',
402
+ 'f_zong_wz_info': '总部物资部意见反馈',
403
+ 'f_zong_wz_date': '总部物资部意见反馈时间',
404
+ 'f_zong_sj_info': '总部设计部意见反馈',
405
+ 'f_zong_sj_date': '总部设计部意见反馈时间',
406
+ 'f_zong_yy_info': '总部运营部意见反馈',
407
+ 'f_zong_yy_date': '总部运营部意见反馈时间',
408
+ 'f_zong_aq_info': '总部安全部意见反馈',
409
+ 'f_zong_aq_date': '总部安全部意见反馈时间',
410
+ 'f_zong_sjb_info': '总部审计部意见反馈',
411
+ 'f_zong_sjb_date': '总部审计部意见反馈时间',
412
+ 'f_operator': '操作人',
413
+ 'f_orgname': '所属公司'
414
+
415
+ }
416
+ return report
417
+ }
418
+ },
419
+ events: {
420
+ },
421
+ computed: {
422
+ }
423
+ }
424
+ </script>
425
+
426
+ <style scoped>
427
+ .warning {
428
+ background-color: #f0ad4e;
429
+ }
430
+ .danger {
431
+ background-color: #d9534f;
432
+ }
433
+ </style>