safecheck-client 3.0.34-7 → 3.0.34-71

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. package/package.json +1 -1
  2. package/src/App-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.vue +55 -0
  3. package/src/assets/123.png +0 -0
  4. package/src/assets/f8632d3c8c4c1cb68e99da754cab1a7.png +0 -0
  5. package/src/components/LoadData.vue +62 -0
  6. package/src/components/NewDefectList/DefectListNew.vue +1 -0
  7. package/src/components/android/AndroidDefectDeal.vue +1 -0
  8. package/src/components/android/AndroidDefectDealBeforeSafe.vue +502 -0
  9. package/src/components/android/AreaSelect.vue +198 -0
  10. package/src/components/android/BuildingSelect.vue +192 -0
  11. package/src/components/android/CheckPlanSelect.vue +229 -0
  12. package/src/components/android/PaperFeedback.vue +1514 -1481
  13. package/src/components/android/PaperFeedbackTemp.vue +1470 -1470
  14. package/src/components/android/QRCode/QRCodeBinding.vue +300 -0
  15. package/src/components/android/QRCode/QRCodePage.vue +212 -0
  16. package/src/components/android/SafePlanItem.vue +509 -509
  17. package/src/components/android/SafecheckDevices.vue +1298 -1298
  18. package/src/components/android/SafecheckDevicesTemp.vue +1333 -1333
  19. package/src/components/android/SafecheckOrderV.vue +8 -12
  20. package/src/components/android/UserinfoSelect.vue +714 -0
  21. package/src/components/android/examples/SafeListExamples.vue +96 -0
  22. package/src/components/android/examples/UserExamples.vue +130 -0
  23. package/src/components/android/userinfo/SafecheckUserInfo.vue +776 -776
  24. package/src/components/rongcheng/AddPlanItem.vue +4 -0
  25. package/src/components/rongcheng/AspiratedUserInfo.vue +1 -1
  26. package/src/components/rongcheng/CheckSearchUser.vue +40 -14
  27. package/src/components/rongcheng/PaperStatem.vue +6 -1
  28. package/src/components/rongcheng/PhoneDevicesInfo.vue +16 -1
  29. package/src/components/rongcheng/PhoneUpUserinfo.vue +0 -92
  30. package/src/components/rongcheng/SafecheckOrderV.vue +12 -3
  31. package/src/components/rongcheng/SafecheckOrderVCli.vue +9 -0
  32. package/src/components/safecheckNew/android/SafecheckOrderV.vue +2731 -2731
  33. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +4 -4
  34. package/src/filiale/baiyin/android/SafecheckOrderV.vue +2785 -0
  35. package/src/filiale/baiyin/android.js +1 -0
  36. package/src/filiale/baiyin/pc/CheckSearchUser.vue +2 -2
  37. package/src/filiale/baiyin/pc/DefectListNew.vue +3 -3
  38. package/src/filiale/baiyin/pc/PaperList.vue +7 -7
  39. package/src/filiale/bayan/android/PaperFeedback.vue +1651 -1651
  40. package/src/filiale/bayan/android/SafecheckDevices.vue +1303 -1303
  41. package/src/filiale/bayan/android/SafecheckOrderV.vue +52 -29
  42. package/src/filiale/bayan/android/SafecheckUserInfo.vue +863 -863
  43. package/src/filiale/bayan/pc/PaperList.vue +1 -0
  44. package/src/filiale/dexin/android/SafecheckDevices.vue +1305 -1305
  45. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +35 -15
  46. package/src/filiale/hanzhong/android/PaperFeedback.vue +1477 -1477
  47. package/src/filiale/hanzhong/android/SafecheckDevices.vue +1313 -1313
  48. package/src/filiale/hanzhong/android/SafecheckUserInfo.vue +786 -786
  49. package/src/filiale/huaran/android/SafecheckOrderV.vue +2803 -0
  50. package/src/filiale/huaran/android.js +12 -0
  51. package/src/filiale/huaran/pc/CheckBook.vue +313 -0
  52. package/src/filiale/huaran/pc/CheckBookAll.vue +69 -0
  53. package/src/filiale/huaran/pc/CheckBookArea.vue +170 -0
  54. package/src/filiale/huaran/pc/CheckBookCompany.vue +166 -0
  55. package/src/filiale/huaran/pc/CheckBookDetails.vue +196 -0
  56. package/src/filiale/huaran/pc/CheckBookEntry.vue +61 -0
  57. package/src/filiale/huaran/pc/CheckBookList.vue +386 -0
  58. package/src/filiale/huaran/pc/CheckBookSearchArea.vue +564 -0
  59. package/src/filiale/huaran/pc/CheckBookSearchUnit.vue +229 -0
  60. package/src/filiale/huaran/pc/CheckBookSearchUser.vue +604 -0
  61. package/src/filiale/huaran/pc/CheckBookUser.vue +112 -0
  62. package/src/filiale/huaran/pc/PaperList.vue +822 -0
  63. package/src/filiale/huaran/pc/PlanManage.vue +887 -0
  64. package/src/filiale/huaran/pc/checkPlanList.vue +419 -0
  65. package/src/filiale/huaran/pc/checkUserList.vue +867 -0
  66. package/src/filiale/huaran/pc.js +27 -0
  67. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -0
  68. package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1229 -0
  69. package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -1298
  70. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2807 -0
  71. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -0
  72. package/src/filiale/jiaxian/android.js +4 -0
  73. package/src/filiale/jingyang/android/PaperFeedback.vue +1493 -1493
  74. package/src/filiale/jingyang/android/SafecheckUserInfo.vue +781 -781
  75. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +15 -7
  76. package/src/filiale/pingxiang/android/PaperFeedback.vue +1399 -1399
  77. package/src/filiale/qingjian/android/SafecheckDevices.vue +1269 -1269
  78. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +800 -800
  79. package/src/filiale/qingtongxia/android/AddPlanItem.vue +450 -0
  80. package/src/filiale/qingtongxia/android/CurrentCreate.vue +1053 -0
  81. package/src/filiale/qingtongxia/android/PhoneUpUserinfo.vue +1230 -0
  82. package/src/filiale/qingtongxia/android/SafecheckUserInfo.vue +782 -0
  83. package/src/filiale/qingtongxia/android.js +4 -0
  84. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +2696 -2696
  85. package/src/filiale/ruihua/android/SafecheckOrderV.vue +2747 -0
  86. package/src/filiale/ruihua/android/SafecheckUserInfo.vue +804 -0
  87. package/src/filiale/ruihua/android.js +11 -0
  88. package/src/filiale/shanxian/pc/checkUserList.vue +4 -4
  89. package/src/filiale/shiquan/android/SafecheckDevices.vue +1269 -1269
  90. package/src/filiale/siyang/android/AddPlanItem.vue +446 -0
  91. package/src/filiale/siyang/android/SafecheckUserInfo.vue +789 -789
  92. package/src/filiale/siyang/android.js +1 -0
  93. package/src/filiale/siyang/pc/CheckBookSearchArea.vue +645 -0
  94. package/src/filiale/siyang/pc/CheckPlanAreaList.vue +512 -0
  95. package/src/filiale/siyang/pc/CheckSearchUser.vue +982 -0
  96. package/src/filiale/siyang/pc/HiddenSituation.vue +167 -0
  97. package/src/filiale/siyang/pc/NewCheckpaper.vue +1938 -1938
  98. package/src/filiale/siyang/pc/checkPlanList.vue +367 -0
  99. package/src/filiale/siyang/pc/checkUserList.vue +790 -786
  100. package/src/filiale/siyang/pc.js +21 -16
  101. package/src/filiale/tongchuan/android/Select.vue +421 -0
  102. package/src/filiale/tongchuan/android.js +1 -0
  103. package/src/filiale/tongchuan/pc/CheckPlanCountChartArea.vue +3 -1
  104. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +6 -2
  105. package/src/filiale/tongchuan/pc/HiddenSituation.vue +3 -1
  106. package/src/filiale/tongchuan/pc/NewCheckpaper.vue +13 -22
  107. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1 -1
  108. package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +5 -2
  109. package/src/filiale/tongchuan/utils/EventListener.js +29 -0
  110. package/src/filiale/tongchuan/utils/coerceBoolean.js +7 -0
  111. package/src/filiale/weinan/android/SafecheckDevices.vue +1295 -1295
  112. package/src/filiale/weinan/android/SafecheckOrderV.vue +1 -1
  113. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +75 -62
  114. package/src/filiale/weinan/pc/CheckDetail.vue +11 -11
  115. package/src/filiale/weinan/pc/DefectPaperNew.vue +31 -0
  116. package/src/filiale/weinan/pc/DeviceChange.vue +1088 -0
  117. package/src/filiale/weinan/pc/checkUserList.vue +49 -113
  118. package/src/filiale/weinan/pc.js +1 -0
  119. package/src/filiale/wuan/android/SafecheckOrderV.vue +2241 -2240
  120. package/src/filiale/wuan/android/SafecheckUserInfo.vue +596 -592
  121. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1731 -1731
  122. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1332 -1332
  123. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -887
  124. package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +13 -11
  125. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +269 -269
  126. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +96 -30
  127. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +10 -10
  128. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1128 -1128
  129. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +972 -972
  130. package/src/filiale/yangchunboneng/pc/PaperList.vue +773 -773
  131. package/src/filiale/yongzhou/android/PaperFeedback.vue +1519 -1519
  132. package/src/filiale/yongzhou/android/SafecheckDevices.vue +1294 -1294
  133. package/src/filiale/yongzhou/android/SafecheckUserInfo.vue +776 -776
  134. package/src/filiale/yuansheng/android/SafecheckDevices.vue +11 -1
  135. package/src/filiale/yuansheng/android/SwitchValve.vue +322 -322
  136. package/src/filiale/yuansheng/android.js +17 -17
  137. package/src/filiale/yuansheng/pc/NewCheckpaper.vue +10 -2
  138. package/src/filiale/yunchengminsheng/android/PaperFeedback.vue +1508 -1508
  139. package/src/filiale/yunchengminsheng/android/SafecheckDevices.vue +1270 -1270
  140. package/src/filiale/yunchengminsheng/android/SafecheckUserInfo.vue +784 -784
  141. package/src/main-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.js +24 -0
  142. package/src/safecheck-android.js +9 -0
  143. package/src/safecheck-page.js +10 -0
@@ -68,10 +68,11 @@
68
68
  </div>
69
69
  <div class="row">
70
70
  <div class="form-group col-sm-4" v-show="$parent.$parent.criteriaShow">
71
- <label class="font_normal_body">通气开始</label>
71
+ <label class="font_normal_body">首次通气开始</label>
72
72
  <datepicker
73
73
  :value.sync="model.f_gas_date_str"
74
74
  style="width: 60%"
75
+ placeholder='首次通气开始日期'
75
76
  :format="'yyyy-MM-dd 00:00:00'"
76
77
  v-model="model.f_gas_date_str"
77
78
  condition="f_uservent_date > '{}'"
@@ -79,38 +80,39 @@
79
80
  </datepicker>
80
81
  </div>
81
82
  <div class="form-group col-sm-4" v-show="$parent.$parent.criteriaShow">
82
- <label class="font_normal_body">通气结束</label>
83
+ <label class="font_normal_body">首次通气结束</label>
83
84
  <datepicker
84
85
  :value.sync="model.f_gas_date_end"
85
86
  style="width: 60%"
87
+ placeholder='首次通气结束日期'
86
88
  :format="'yyyy-MM-dd 23:59:59'"
87
89
  v-model="model.f_gas_date_end"
88
90
  condition="f_uservent_date < '{}'"
89
91
  >
90
92
  </datepicker>
91
93
  </div>
92
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
93
- <label class="font_normal_body">开始时间</label>
94
+ <div class="form-group col-sm-4" v-show="$parent.$parent.criteriaShow" >
95
+ <label class="font_normal_body">表具通气开始</label>
94
96
  <datepicker
95
97
  :value.sync="model.f_check_start"
96
- placeholder='首次通气时间' style="width: 60%"
98
+ placeholder='表具通气开始时间' style="width: 60%"
97
99
  :disabled-days-of-week="[]"
98
100
  :format="'yyyy-MM-dd'"
99
101
  :show-rest-button="reset"
100
102
  v-model="model.f_check_start"
101
- condition="f_uservent_date > ='{} 00:00:00'">
103
+ condition="f_gas_date > ='{} 00:00:00'">
102
104
  </datepicker>
103
105
  </div>
104
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
105
- <label class="font_normal_body">结束时间</label>
106
+ <div class="form-group col-sm-4" v-show="$parent.$parent.criteriaShow" >
107
+ <label class="font_normal_body">表具通气结束</label>
106
108
  <datepicker
107
109
  :value.sync="model.f_check_end"
108
- placeholder='首次通气时间' style="width: 60%"
110
+ placeholder='表具通气结束时间' style="width: 60%"
109
111
  :disabled-days-of-week="[]"
110
112
  :format="'yyyy-MM-dd'"
111
113
  :show-rest-button="reset"
112
114
  v-model="model.f_check_end"
113
- condition="f_uservent_date <= '{} 23:59:59'">
115
+ condition="f_gas_date <= '{} 23:59:59'">
114
116
  </datepicker>
115
117
  </div>
116
118
  </div>
@@ -635,7 +637,7 @@ export default {
635
637
  // this.$refs.paged.$refs.criteria.model.f_is_checkbook = 'f_check_book_name is null'
636
638
  // //tag
637
639
  // // this.init=true
638
- // this.freshCheckBook()
640
+ this.freshCheckBook()
639
641
  }
640
642
  }
641
643
  </script>
@@ -1,269 +1,269 @@
1
- <template>
2
- <div class="auto select-overspread">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div class="form-group col-sm-3" >
8
- <label class="font_normal_body">客户编号</label>
9
- <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
10
- condition="tui.f_userinfo_code = '{}'" @keyup.enter="search()">
11
- </div>
12
- <div class="form-group col-sm-3">
13
- <label class="font_normal_body">客户名称</label>
14
- <input type="text" class="input_search" v-model="model.f_user_name"
15
- style="width: 60%" placeholder="客户名称" condition="tui.f_user_name like '%{}%'">
16
- </div>
17
- <div class="form-group col-sm-3" >
18
- <label class="font_normal_body">地址</label>
19
- <input type="text" class="input_search" v-model="model.f_address"
20
- style="width: 60%" placeholder="地址" condition="tua.f_address like '%{}%'">
21
- </div>
22
- <div class="form-group col-sm-3" >
23
- <label class="font_normal_body">小区名称</label>
24
- <input type="text" class="input_search" v-model="model.f_residential_area"
25
- style="width: 60%" placeholder="小区名称" condition="tua.f_residential_area like '%{}%'">
26
- </div>
27
- </div>
28
- <div class="row">
29
- <div class="form-group col-sm-3" >
30
- <label class="font_normal_body">客户类型</label>
31
- <v-select :value.sync="model.f_user_type" v-model='model.f_user_type'
32
- :value-single="true" style="width: 60%"
33
- class="select_list select"
34
- :options='$parent.$parent.userTypes' placeholder='客户类型'
35
- close-on-select
36
- condition="tuf.f_user_type ='{}'"></v-select>
37
- </div>
38
- <div class="form-group col-sm-3">
39
- <label class="font_normal_body">通气开始</label>
40
- <datepicker
41
- :value.sync="model.f_gas_start"
42
- placeholder='开始时间' style="width: 60%"
43
- :disabled-days-of-week="[]"
44
- :format="'yyyy-MM-dd'"
45
- :show-rest-button="reset"
46
- v-model="model.f_gas_start"
47
- condition="tui.f_uservent_date > ='{} 00:00:00'">
48
- </datepicker>
49
- </div>
50
- <div class="form-group col-sm-3">
51
- <label class="font_normal_body">通气结束</label>
52
- <datepicker
53
- :value.sync="model.f_gas_end"
54
- placeholder='结束时间' style="width: 60%"
55
- :disabled-days-of-week="[]"
56
- :format="'yyyy-MM-dd'"
57
- :show-rest-button="reset"
58
- v-model="model.f_gas_end"
59
- condition="tui.f_uservent_date <= '{} 23:59:59'">
60
- </datepicker>
61
- </div>
62
- </div>
63
- <div class="row">
64
- <div class="form-group col-sm-2 button-range" >
65
- <export-excel-safe :data="$parent.$parent.searchData"
66
- :field="$parent.$parent.excelHeaders"
67
- :choose-col="true"
68
- sqlurl="rs/logic/SafeExportExcel" sql-name="getUserByCheckBook" template-name='安检册明细'></export-excel-safe>
69
- <button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
70
- <button class="button_spacing button_search-1" @click='$parent.$parent.removes()' v-if="$parent.$parent.bookList.length>0" >移出安检册</button>
71
- </div>
72
- </div>
73
- </div>
74
- </criteria>
75
- <data-grid :model="model" class="table_sy" partial='list' v-ref:grid >
76
- <template partial='head' >
77
- <tr>
78
- <th>
79
- <nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"></input>全选</nobr>
80
- </th>
81
- <th><nobr>序号</nobr></th>
82
- <th><nobr>用户编号</nobr></th>
83
- <th><nobr>用户姓名</nobr></th>
84
- <th><nobr>用户电话</nobr></th>
85
- <th><nobr>用户地址</nobr></th>
86
- <th><nobr>通气日期</nobr></th>
87
- <th><nobr>操作</nobr></th>
88
- </tr>
89
- </template>
90
- <template partial='body' >
91
- <tr >
92
- <td style="text-align: center">
93
- <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
94
- @change="$parent.$parent.$parent.checkChange(row, $event)"></input>
95
- </nobr>
96
- </td>
97
- <td style="text-align:center;">{{$index+1}}</td>
98
- <td style="text-align:center">{{row.f_userinfo_code}}</td>
99
- <td style="text-align:center">{{row.f_user_name}}</td>
100
- <td style="text-align:center">{{row.f_user_phone}}</td>
101
- <td style="text-align:center">{{row.f_address}}</td>
102
- <td style="text-align:center">{{row.f_uservent_date}}</td>
103
- <td style="text-align: center">
104
- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.remove(row)'>移出安检册</button>
105
- </td>
106
- </tr>
107
- </template>
108
- <template partial='foot'></template>
109
- </data-grid>
110
- </criteria-paged>
111
- </div>
112
- </template>
113
-
114
- <script>
115
- import {PagedList} from 'vue-client'
116
- import bus from "../../../bus";
117
-
118
- export default {
119
- title: '安检记录列表',
120
- props: ['row'],
121
- data () {
122
- return {
123
- checkAll:false,
124
- rowdata: this.row,
125
- bookList: [],
126
- searchData: {
127
- condition: "1=1"
128
- },
129
- excelHeaders: {
130
- 'f_userinfo_code': '客户编号',
131
- 'f_user_name': '客户姓名',
132
- 'f_user_phone':'客户电话',
133
- 'f_address': '客户地址',
134
- 'f_uservent_date': '通气日期'
135
- },
136
- userTypes: [{label: '全部', value: ''},{label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
137
- model: new PagedList('rs/sql/getUserByCheckBook', 50)
138
- }
139
- },
140
- ready(){
141
- if(this.row){
142
- let condition=''
143
- if(this.row.id){
144
-
145
- condition = `tua.f_check_book_id ='${this.row.id}'`
146
- }else{
147
- condition = `1=1`
148
- }
149
-
150
- // if(this.row.f_check_book_type1=='小区'){
151
- // this.model.url = 'rs/sql/getUserByCheckBook'
152
- // condition = `ta.f_check_book_id =${this.row.f_check_book_id} and ta.id=${this.row.id}`
153
- // }else{
154
- // this.model.url = 'rs/sql/getUserByCheckBookCompany'
155
- // condition = `tc.f_check_book_id =${this.row.f_check_book_id} and tc.id=${this.row.id}`
156
- // }
157
- this.model.search(condition)
158
- this.searchData.condition = condition
159
- //只显示用户页面
160
- this.row.f_check_book_type='用户'
161
- }
162
- },
163
- watch: {
164
- 'checkAll'(val){
165
- if(!val){
166
- this.bookList=[]
167
- }
168
- //如果是全选,则查询这个安检册下的用户
169
-
170
- if(val){
171
- //遍历this.model.rows
172
- this.model.rows.forEach(res=>{
173
- this.bookList.push(res.f_userinfo_id)
174
- })
175
- }
176
- },
177
- 'row' (val) {
178
- if (val) {
179
- this.rowdata = val
180
- let condition=''
181
- condition = `tua.f_check_book_id ='${val.id}'`
182
- // if(this.row.f_check_book_type1=='小区'){
183
- // condition = `ta.f_check_book_id =${val.f_check_book_id} and ta.id=${val.id}`
184
- // }else{
185
- // condition = `tc.f_check_book_id =${val.f_check_book_id} and tc.id=${val.id}`
186
- // }
187
- this.model.search(condition)
188
- }
189
- }
190
- },
191
- methods: {
192
- setCheckAll() {
193
- this.checkAll=this.checkAll?false:true;
194
- // 全选改变后,清空选中数据
195
- this.bookList = []
196
- },
197
- checkModel (row) {
198
- if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
199
- return true
200
- } else {
201
- return false
202
- }
203
- },
204
- checkChange (row, e) {
205
- if (e.target.checked) {
206
- this.bookList.push(row.f_userinfo_id)
207
- } else {
208
- this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
209
- }
210
- },
211
- removes(){
212
-
213
- if(this.bookList.length===0){
214
- this.$showMessage('请选择用户')
215
- return
216
- }
217
- this.$showMessage("确认将用户移出此安检册?",['confirm']).then(res=>{
218
- if(res==='confirm'){
219
- //for遍历this.bookList,将每个用户移出安检册
220
- var c="("
221
- for(var i=0;i<this.bookList.length;i++){
222
- c+=`'${this.bookList[i]}'`+","
223
- }
224
- //去掉最后一个逗号
225
- c=c.substring(0,c.length-1)
226
- c+=")"
227
- let data = {
228
- condition: c,
229
- f_book_id: this.row.id
230
- }
231
- this.$http.post('rs/logic/removesCheckBookUser', {data: data}).then(res=>{
232
- this.$showMessage('移出成功')
233
- this.$refs.paged.$refs.criteria.search()
234
- })
235
- }
236
- })
237
- },
238
- remove(row){
239
-
240
- this.$showMessage("确认移出此安检册?",['confirm']).then(res=>{
241
- if(res==='confirm'){
242
- let data = {
243
- f_userinfo_id: row.f_userinfo_id,
244
- f_book_id: this.row.id
245
- }
246
- this.$http.post('rs/logic/removeUserByCheckBook', {data: data}).then(res=>{
247
- this.$showMessage('移出成功')
248
- this.$refs.paged.$refs.criteria.search()
249
- })
250
- }
251
- })
252
- },
253
- selfSearch (args) {
254
- if (this.rowdata.id) {
255
- args.condition +=` and tua.f_check_book_id ='${this.rowdata.id}'`
256
- // if(this.rowdata.f_check_book_type1=='小区'){
257
- // args.condition += `and ta.f_check_book_id =${this.rowdata.f_check_book_id} and ta.id=${this.rowdata.id}`
258
- // }else{
259
- // args.condition += `and tc.f_check_book_id =${this.rowdata.f_check_book_id} and tc.id=${this.rowdata.id}`
260
- // }
261
- this.model.search(args.condition)
262
- this.searchData.condition = args.condition
263
- } else {
264
- this.$showMessage('请选择片区')
265
- }
266
- }
267
- }
268
- }
269
- </script>
1
+ <template>
2
+ <div class="auto select-overspread">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div class="form-group col-sm-3" >
8
+ <label class="font_normal_body">客户编号</label>
9
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
10
+ condition="tui.f_userinfo_code = '{}'" @keyup.enter="search()">
11
+ </div>
12
+ <div class="form-group col-sm-3">
13
+ <label class="font_normal_body">客户名称</label>
14
+ <input type="text" class="input_search" v-model="model.f_user_name"
15
+ style="width: 60%" placeholder="客户名称" condition="tui.f_user_name like '%{}%'">
16
+ </div>
17
+ <div class="form-group col-sm-3" >
18
+ <label class="font_normal_body">地址</label>
19
+ <input type="text" class="input_search" v-model="model.f_address"
20
+ style="width: 60%" placeholder="地址" condition="tua.f_address like '%{}%'">
21
+ </div>
22
+ <div class="form-group col-sm-3" >
23
+ <label class="font_normal_body">小区名称</label>
24
+ <input type="text" class="input_search" v-model="model.f_residential_area"
25
+ style="width: 60%" placeholder="小区名称" condition="tua.f_residential_area like '%{}%'">
26
+ </div>
27
+ </div>
28
+ <div class="row">
29
+ <div class="form-group col-sm-3" >
30
+ <label class="font_normal_body">客户类型</label>
31
+ <v-select :value.sync="model.f_user_type" v-model='model.f_user_type'
32
+ :value-single="true" style="width: 60%"
33
+ class="select_list select"
34
+ :options='$parent.$parent.userTypes' placeholder='客户类型'
35
+ close-on-select
36
+ condition="tuf.f_user_type ='{}'"></v-select>
37
+ </div>
38
+ <div class="form-group col-sm-3">
39
+ <label class="font_normal_body">首次通气开始</label>
40
+ <datepicker
41
+ :value.sync="model.f_gas_start"
42
+ placeholder='首次通气开始' style="width: 60%"
43
+ :disabled-days-of-week="[]"
44
+ :format="'yyyy-MM-dd'"
45
+ :show-rest-button="reset"
46
+ v-model="model.f_gas_start"
47
+ condition="tui.f_uservent_date > ='{} 00:00:00'">
48
+ </datepicker>
49
+ </div>
50
+ <div class="form-group col-sm-3">
51
+ <label class="font_normal_body">首次通气结束</label>
52
+ <datepicker
53
+ :value.sync="model.f_gas_end"
54
+ placeholder='首次通气结束' style="width: 60%"
55
+ :disabled-days-of-week="[]"
56
+ :format="'yyyy-MM-dd'"
57
+ :show-rest-button="reset"
58
+ v-model="model.f_gas_end"
59
+ condition="tui.f_uservent_date <= '{} 23:59:59'">
60
+ </datepicker>
61
+ </div>
62
+ </div>
63
+ <div class="row">
64
+ <div class="form-group col-sm-2 button-range" >
65
+ <export-excel-safe :data="$parent.$parent.searchData"
66
+ :field="$parent.$parent.excelHeaders"
67
+ :choose-col="true"
68
+ sqlurl="rs/logic/SafeExportExcel" sql-name="getUserByCheckBook" template-name='安检册明细'></export-excel-safe>
69
+ <button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
70
+ <button class="button_spacing button_search-1" @click='$parent.$parent.removes()' v-if="$parent.$parent.bookList.length>0" >移出安检册</button>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </criteria>
75
+ <data-grid :model="model" class="table_sy" partial='list' v-ref:grid >
76
+ <template partial='head' >
77
+ <tr>
78
+ <th>
79
+ <nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"></input>全选</nobr>
80
+ </th>
81
+ <th><nobr>序号</nobr></th>
82
+ <th><nobr>用户编号</nobr></th>
83
+ <th><nobr>用户姓名</nobr></th>
84
+ <th><nobr>用户电话</nobr></th>
85
+ <th><nobr>用户地址</nobr></th>
86
+ <th><nobr>首次通气日期</nobr></th>
87
+ <th><nobr>操作</nobr></th>
88
+ </tr>
89
+ </template>
90
+ <template partial='body' >
91
+ <tr >
92
+ <td style="text-align: center">
93
+ <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
94
+ @change="$parent.$parent.$parent.checkChange(row, $event)"></input>
95
+ </nobr>
96
+ </td>
97
+ <td style="text-align:center;">{{$index+1}}</td>
98
+ <td style="text-align:center">{{row.f_userinfo_code}}</td>
99
+ <td style="text-align:center">{{row.f_user_name}}</td>
100
+ <td style="text-align:center">{{row.f_user_phone}}</td>
101
+ <td style="text-align:center">{{row.f_address}}</td>
102
+ <td style="text-align:center">{{row.f_uservent_date}}</td>
103
+ <td style="text-align: center">
104
+ <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.remove(row)'>移出安检册</button>
105
+ </td>
106
+ </tr>
107
+ </template>
108
+ <template partial='foot'></template>
109
+ </data-grid>
110
+ </criteria-paged>
111
+ </div>
112
+ </template>
113
+
114
+ <script>
115
+ import {PagedList} from 'vue-client'
116
+ import bus from "../../../bus";
117
+
118
+ export default {
119
+ title: '安检记录列表',
120
+ props: ['row'],
121
+ data () {
122
+ return {
123
+ checkAll:false,
124
+ rowdata: this.row,
125
+ bookList: [],
126
+ searchData: {
127
+ condition: "1=1"
128
+ },
129
+ excelHeaders: {
130
+ 'f_userinfo_code': '客户编号',
131
+ 'f_user_name': '客户姓名',
132
+ 'f_user_phone':'客户电话',
133
+ 'f_address': '客户地址',
134
+ 'f_uservent_date': '首次通气日期'
135
+ },
136
+ userTypes: [{label: '全部', value: ''},{label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
137
+ model: new PagedList('rs/sql/getUserByCheckBook', 50)
138
+ }
139
+ },
140
+ ready(){
141
+ if(this.row){
142
+ let condition=''
143
+ if(this.row.id){
144
+
145
+ condition = `tua.f_check_book_id ='${this.row.id}'`
146
+ }else{
147
+ condition = `1=1`
148
+ }
149
+
150
+ // if(this.row.f_check_book_type1=='小区'){
151
+ // this.model.url = 'rs/sql/getUserByCheckBook'
152
+ // condition = `ta.f_check_book_id =${this.row.f_check_book_id} and ta.id=${this.row.id}`
153
+ // }else{
154
+ // this.model.url = 'rs/sql/getUserByCheckBookCompany'
155
+ // condition = `tc.f_check_book_id =${this.row.f_check_book_id} and tc.id=${this.row.id}`
156
+ // }
157
+ this.model.search(condition)
158
+ this.searchData.condition = condition
159
+ //只显示用户页面
160
+ this.row.f_check_book_type='用户'
161
+ }
162
+ },
163
+ watch: {
164
+ 'checkAll'(val){
165
+ if(!val){
166
+ this.bookList=[]
167
+ }
168
+ //如果是全选,则查询这个安检册下的用户
169
+
170
+ if(val){
171
+ //遍历this.model.rows
172
+ this.model.rows.forEach(res=>{
173
+ this.bookList.push(res.f_userinfo_id)
174
+ })
175
+ }
176
+ },
177
+ 'row' (val) {
178
+ if (val) {
179
+ this.rowdata = val
180
+ let condition=''
181
+ condition = `tua.f_check_book_id ='${val.id}'`
182
+ // if(this.row.f_check_book_type1=='小区'){
183
+ // condition = `ta.f_check_book_id =${val.f_check_book_id} and ta.id=${val.id}`
184
+ // }else{
185
+ // condition = `tc.f_check_book_id =${val.f_check_book_id} and tc.id=${val.id}`
186
+ // }
187
+ this.model.search(condition)
188
+ }
189
+ }
190
+ },
191
+ methods: {
192
+ setCheckAll() {
193
+ this.checkAll=this.checkAll?false:true;
194
+ // 全选改变后,清空选中数据
195
+ this.bookList = []
196
+ },
197
+ checkModel (row) {
198
+ if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
199
+ return true
200
+ } else {
201
+ return false
202
+ }
203
+ },
204
+ checkChange (row, e) {
205
+ if (e.target.checked) {
206
+ this.bookList.push(row.f_userinfo_id)
207
+ } else {
208
+ this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
209
+ }
210
+ },
211
+ removes(){
212
+
213
+ if(this.bookList.length===0){
214
+ this.$showMessage('请选择用户')
215
+ return
216
+ }
217
+ this.$showMessage("确认将用户移出此安检册?",['confirm']).then(res=>{
218
+ if(res==='confirm'){
219
+ //for遍历this.bookList,将每个用户移出安检册
220
+ var c="("
221
+ for(var i=0;i<this.bookList.length;i++){
222
+ c+=`'${this.bookList[i]}'`+","
223
+ }
224
+ //去掉最后一个逗号
225
+ c=c.substring(0,c.length-1)
226
+ c+=")"
227
+ let data = {
228
+ condition: c,
229
+ f_book_id: this.row.id
230
+ }
231
+ this.$http.post('rs/logic/removesCheckBookUser', {data: data}).then(res=>{
232
+ this.$showMessage('移出成功')
233
+ this.$refs.paged.$refs.criteria.search()
234
+ })
235
+ }
236
+ })
237
+ },
238
+ remove(row){
239
+
240
+ this.$showMessage("确认移出此安检册?",['confirm']).then(res=>{
241
+ if(res==='confirm'){
242
+ let data = {
243
+ f_userinfo_id: row.f_userinfo_id,
244
+ f_book_id: this.row.id
245
+ }
246
+ this.$http.post('rs/logic/removeUserByCheckBook', {data: data}).then(res=>{
247
+ this.$showMessage('移出成功')
248
+ this.$refs.paged.$refs.criteria.search()
249
+ })
250
+ }
251
+ })
252
+ },
253
+ selfSearch (args) {
254
+ if (this.rowdata.id) {
255
+ args.condition +=` and tua.f_check_book_id ='${this.rowdata.id}'`
256
+ // if(this.rowdata.f_check_book_type1=='小区'){
257
+ // args.condition += `and ta.f_check_book_id =${this.rowdata.f_check_book_id} and ta.id=${this.rowdata.id}`
258
+ // }else{
259
+ // args.condition += `and tc.f_check_book_id =${this.rowdata.f_check_book_id} and tc.id=${this.rowdata.id}`
260
+ // }
261
+ this.model.search(args.condition)
262
+ this.searchData.condition = args.condition
263
+ } else {
264
+ this.$showMessage('请选择片区')
265
+ }
266
+ }
267
+ }
268
+ }
269
+ </script>