safecheck-client 3.0.34-6 → 3.0.34-61

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/docs/FormPrint.md +18 -18
  2. package/docs/GridTree.md +47 -47
  3. package/docs/PrintFile.md +38 -38
  4. package/docs/tree.md +40 -40
  5. package/package.json +1 -1
  6. package/src/App-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.vue +55 -0
  7. package/src/assets/123.png +0 -0
  8. package/src/assets/f8632d3c8c4c1cb68e99da754cab1a7.png +0 -0
  9. package/src/components/LoadData.vue +62 -0
  10. package/src/components/NewDefectList/DefectListNew.vue +617 -616
  11. package/src/components/android/AddGas.vue +147 -147
  12. package/src/components/android/AndroidDefectDeal.vue +1 -0
  13. package/src/components/android/AreaPlan.vue +566 -566
  14. package/src/components/android/AreaSelect.vue +208 -0
  15. package/src/components/android/BuildingSelect.vue +217 -0
  16. package/src/components/android/CheckPlanSelect.vue +248 -0
  17. package/src/components/android/CheckerMonthly.vue +84 -84
  18. package/src/components/android/LcheckUnplan.vue +108 -108
  19. package/src/components/android/PaperFeedback.vue +33 -0
  20. package/src/components/android/QRCode/QRCodeBinding.vue +300 -0
  21. package/src/components/android/QRCode/QRCodePage.vue +212 -0
  22. package/src/components/android/SafecheckDevices.vue +2 -2
  23. package/src/components/android/SafecheckOrderV.vue +8 -12
  24. package/src/components/android/SwitchValve.vue +323 -323
  25. package/src/components/android/examples/SafeListExamples.vue +96 -0
  26. package/src/components/android/examples/UserExamples.vue +130 -0
  27. package/src/components/checkerphonestate/Checker.vue +32 -32
  28. package/src/components/checkerphonestate/CheckerState.vue +97 -97
  29. package/src/components/defects/AddDefectModal.vue +120 -120
  30. package/src/components/defects/AddDevice.vue +95 -95
  31. package/src/components/defects/DevicesSeting.vue +106 -106
  32. package/src/components/metterfiles/AddUserfiles.vue +246 -246
  33. package/src/components/metterfiles/MetterFiles.vue +104 -104
  34. package/src/components/notice/NoticeQuery.vue +76 -76
  35. package/src/components/paper/RepairVerifyForm.vue +76 -76
  36. package/src/components/phonestate/DailyTraffic.vue +57 -57
  37. package/src/components/phonestate/LastKnownState.vue +74 -74
  38. package/src/components/rongcheng/AddPlanItem.vue +4 -0
  39. package/src/components/rongcheng/AspiratedUserInfo.vue +1 -1
  40. package/src/components/rongcheng/CheckSearchUser.vue +40 -14
  41. package/src/components/rongcheng/PaperStatem.vue +6 -1
  42. package/src/components/rongcheng/PhoneDevicesInfo.vue +16 -1
  43. package/src/components/rongcheng/PhoneUpUserinfo.vue +0 -92
  44. package/src/components/rongcheng/SafecheckOrderV.vue +12 -3
  45. package/src/components/rongcheng/SafecheckOrderVCli.vue +9 -0
  46. package/src/components/task/RepairAnnual.vue +79 -79
  47. package/src/components/task/RepairAnnualDetail.vue +49 -49
  48. package/src/components/task/RepairMonthly.vue +91 -91
  49. package/src/components/task/TaskAnnual.vue +77 -77
  50. package/src/components/task/TaskAnnualDetail.vue +47 -47
  51. package/src/components/task/TaskMonthly.vue +89 -89
  52. package/src/components/userfile/UserfileChange.vue +277 -277
  53. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +4 -4
  54. package/src/filiale/baiyin/android/SafecheckOrderV.vue +2785 -0
  55. package/src/filiale/baiyin/android.js +1 -0
  56. package/src/filiale/baiyin/pc/CheckSearchUser.vue +2 -2
  57. package/src/filiale/baiyin/pc/DefectListNew.vue +3 -3
  58. package/src/filiale/baiyin/pc/PaperList.vue +7 -7
  59. package/src/filiale/baiyin/pc/checkUserList.vue +771 -771
  60. package/src/filiale/baiyin/pc.js +21 -21
  61. package/src/filiale/bayan/android/SafecheckOrderV.vue +52 -29
  62. package/src/filiale/bayan/pc/PaperList.vue +1 -0
  63. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +35 -15
  64. package/src/filiale/huaran/android/SafecheckOrderV.vue +2803 -0
  65. package/src/filiale/huaran/android.js +12 -0
  66. package/src/filiale/huaran/pc/CheckBook.vue +313 -0
  67. package/src/filiale/huaran/pc/CheckBookAll.vue +69 -0
  68. package/src/filiale/huaran/pc/CheckBookArea.vue +170 -0
  69. package/src/filiale/huaran/pc/CheckBookCompany.vue +166 -0
  70. package/src/filiale/huaran/pc/CheckBookDetails.vue +196 -0
  71. package/src/filiale/huaran/pc/CheckBookEntry.vue +61 -0
  72. package/src/filiale/huaran/pc/CheckBookList.vue +386 -0
  73. package/src/filiale/huaran/pc/CheckBookSearchArea.vue +564 -0
  74. package/src/filiale/huaran/pc/CheckBookSearchUnit.vue +229 -0
  75. package/src/filiale/huaran/pc/CheckBookSearchUser.vue +604 -0
  76. package/src/filiale/huaran/pc/CheckBookUser.vue +112 -0
  77. package/src/filiale/huaran/pc/PaperList.vue +822 -0
  78. package/src/filiale/huaran/pc/PlanManage.vue +887 -0
  79. package/src/filiale/huaran/pc/checkPlanList.vue +419 -0
  80. package/src/filiale/huaran/pc/checkUserList.vue +867 -0
  81. package/src/filiale/huaran/pc.js +27 -0
  82. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -0
  83. package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1229 -0
  84. package/src/filiale/jiaxian/android/SafecheckDevices.vue +6 -6
  85. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2807 -0
  86. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -0
  87. package/src/filiale/jiaxian/android.js +4 -0
  88. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +15 -7
  89. package/src/filiale/ruihua/android/SafecheckOrderV.vue +2747 -0
  90. package/src/filiale/ruihua/android/SafecheckUserInfo.vue +804 -0
  91. package/src/filiale/ruihua/android.js +11 -0
  92. package/src/filiale/shanxian/pc/checkUserList.vue +700 -700
  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/checkPlanList.vue +367 -0
  98. package/src/filiale/siyang/pc/checkUserList.vue +22 -18
  99. package/src/filiale/siyang/pc.js +5 -0
  100. package/src/filiale/tongchuan/android/Select.vue +421 -0
  101. package/src/filiale/tongchuan/android.js +1 -0
  102. package/src/filiale/tongchuan/pc/CheckPlanCountChartArea.vue +3 -1
  103. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +6 -2
  104. package/src/filiale/tongchuan/pc/HiddenSituation.vue +3 -1
  105. package/src/filiale/tongchuan/pc/NewCheckpaper.vue +13 -22
  106. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1060 -1060
  107. package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +5 -2
  108. package/src/filiale/tongchuan/utils/EventListener.js +29 -0
  109. package/src/filiale/tongchuan/utils/coerceBoolean.js +7 -0
  110. package/src/filiale/weinan/android/SafecheckDevices.vue +1 -1
  111. package/src/filiale/weinan/android/SafecheckOrderV.vue +1 -1
  112. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +735 -722
  113. package/src/filiale/weinan/pc/CheckDetail.vue +278 -278
  114. package/src/filiale/weinan/pc/DefectListNew.vue +617 -617
  115. package/src/filiale/weinan/pc/DefectMainNew.vue +63 -63
  116. package/src/filiale/weinan/pc/DefectPaperNew.vue +31 -0
  117. package/src/filiale/weinan/pc/DeviceChange.vue +1088 -0
  118. package/src/filiale/weinan/pc/checkUserList.vue +712 -776
  119. package/src/filiale/weinan/pc.js +47 -46
  120. package/src/filiale/wuan/android/SafecheckOrderV.vue +1 -0
  121. package/src/filiale/wuan/android/SafecheckUserInfo.vue +4 -0
  122. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1192 -1192
  123. package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +472 -472
  124. package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +473 -473
  125. package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +13 -11
  126. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +6 -6
  127. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +10 -10
  128. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +10 -10
  129. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +6 -6
  130. package/src/filiale/yangchunboneng/pc/PaperList.vue +6 -6
  131. package/src/filiale/yuansheng/android/SafecheckDevices.vue +11 -1
  132. package/src/filiale/yuansheng/pc/NewCheckpaper.vue +10 -2
  133. package/src/main-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.js +24 -0
  134. package/src/safecheck-android.js +7 -0
  135. package/src/safecheck-page.js +10 -0
@@ -1,278 +1,278 @@
1
- <template>
2
- <div>
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <div partial>
6
- <!-- <p class="text-center" style="padding: 7px;"><b>安检计划项明细</b></p>-->
7
- <ul class="nav nav-tabs">
8
- <li role="presentation" class="active"><a style=" color: #5ac0d9 !important;">安检计划项明细</a></li>
9
- </ul>
10
- <div class="row">
11
- <div class="form-group col-sm-4" >
12
- <label class="font_normal_body">安检状态</label>
13
- <v-select style="width:60% "
14
- class="select select_list"
15
- :value.sync="$parent.$parent.f_state"
16
- v-model="$parent.$parent.f_state"
17
- :options='$parent.$parent.checkState'
18
- placeholder='安检状态'
19
- close-on-select
20
- value-single
21
- >
22
- </v-select>
23
- </div>
24
- <div class="form-group col-sm-4" >
25
- <v-select style="width:60% "
26
- v-if="$parent.$parent.f_state=='未入户'"
27
- class="select select_list"
28
- :value.sync="$parent.$parent.f_noruhu"
29
- v-model="$parent.$parent.f_noruhu"
30
- :options='$parent.$parent.noChecks'
31
- placeholder='请选择状态'
32
- :multiple="true"
33
- >
34
- </v-select>
35
- </div>
36
- <div class="form-group col-sm-4 button-range" >
37
- <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
38
- <export-excel-safe :data="$parent.$parent.exportParameter"
39
- :field="$parent.$parent.excelHeaders"
40
- sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
41
- template-name='安检计划明细' :choose-col="true">
42
- </export-excel-safe>
43
- <!--<export-excel-safe-->
44
- <!--:data="{condition: $parent.$parent.condition}"-->
45
- <!--:field="$parent.$parent.getfield"-->
46
- <!--sqlurl="rs/logic/saleExport" sql-name="getGasUser" :template-name="$parent.$parent.pricename+'气价使用人'"-->
47
- <!--:choose-col="true"></export-excel-safe>-->
48
-
49
- </div>
50
- </div>
51
- </div>
52
- </criteria>
53
- <data-grid :model="model" partial='list' class="table_sy">
54
-
55
- <template partial='head'>
56
- <tr>
57
- <th><nobr>计划名称</nobr></th>
58
- <th><nobr>用户编号</nobr></th>
59
- <th><nobr>用户名称</nobr></th>
60
- <th><nobr>小区名称</nobr></th>
61
- <th><nobr>地址</nobr></th>
62
- <th><nobr>安检状态</nobr></th>
63
- <th><nobr>是否安检</nobr></th>
64
- </tr>
65
- </template>
66
- <template partial='body'>
67
- <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
68
- <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
69
- <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
70
- <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
71
- <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
72
- <td style="text-align: center"><nobr>{{row.f_last_check_state}}</nobr></td>
73
- <td style="text-align: center"><nobr>{{row.f_state}}</nobr></td>
74
- </template>
75
- </data-grid>
76
- </criteria-paged>
77
- </div>
78
- </template>
79
-
80
- <script>
81
- import { PagedList } from 'vue-client'
82
-
83
- export default {
84
- title: '安检计划项列表',
85
- data () {
86
- return {
87
- model: new PagedList('rs/sql/planItem', 20),
88
- checkState:[{label:'全部',value:''},{label:'入户',value:'入户'},{label:'未入户',value:'未入户'}],
89
- noChecks:[{label:'未检',value:'未检'},{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'复访不遇',value:'复访不遇'}],
90
- excelHeaders: {
91
- //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
92
- 'f_plan_name':'计划名称',
93
- 'f_userinfo_code': '用户编号',
94
- 'f_user_name': '用户名称',
95
- 'f_user_phone': '用户电话',
96
- //'count_item':'安检次数',
97
- 'f_user_type': '用户类型',
98
- 'f_residential_area': '小区名称',
99
- 'f_address':'地址',
100
- 'f_state':'是否已检',
101
- 'f_last_check_date':'安检日期',
102
- 'f_last_check_state': '安检状态'
103
- },
104
- f_state:'',
105
- f_noruhu:''
106
- }
107
- },
108
- props: [ 'check','checkstatus','checkstart','checkend','starttime','endtime' ],
109
- watch: {
110
- 'check' (val) {
111
- let condition
112
- //tag
113
- condition = `c.f_checker='${this.check.f_checker}' and i.f_state!='作废' and i.f_filialeid = '${this.$login.f.orgid}'`
114
- if(this.checkstatus){
115
- condition += ` and cp.f_entry_status = '${this.checkstatus}'`
116
- }
117
- if (this.checkstart && this.checkend ) {
118
- let year1 = this.checkstart.substr(0,4)
119
- let year2 = this.checkend.substr(0,4)
120
- let month1 = this.checkstart.substr(5,2)
121
- let month2 = this.checkend.substr(5,2)
122
- if(year1 == year2){
123
- condition += ` and f_plan_year = ${year1} and f_plan_month >= ${month1} and f_plan_month <= ${month2}`
124
- }else{
125
- condition += ` and ((f_plan_year = ${year1} and f_plan_month >= ${month1}) or (f_plan_year = ${year2} and f_plan_month <= ${month2}) or (f_plan_year >${year1} and f_plan_year < ${year2}))`
126
- }
127
- }
128
- if(this.checkstart && !this.checkend){
129
- this.$showMessage('计划起始和截至时间必须同时选择!')
130
- return
131
- }
132
- if(!this.checkstart && this.checkend){
133
- this.$showMessage('计划起始和截至时间必须同时选择!')
134
- return
135
- }
136
- if(this.starttime){
137
- condition += ` and f_last_check_date > '${this.starttime} 00:00:00'`
138
- }
139
- if(this.endtime){
140
- condition += ` and f_last_check_date < '${this.endtime} 23:59:59'`
141
- }
142
- this.f_noruhu=[]
143
- this.f_state=''
144
- this.model.search(condition, {})
145
-
146
- }
147
- },
148
-
149
- ready () {
150
- //tag
151
- if (this.check) {
152
- let condition
153
- //tag
154
- condition = `c.f_checker='${this.check.f_checker}' and i.f_state!='作废' and i.f_filialeid = '${this.$login.f.orgid}'`
155
- if(this.checkstatus){
156
- condition += ` and cp.f_entry_status = '${this.checkstatus}'`
157
- }
158
- if (this.checkstart && this.checkend ) {
159
- let year1 = this.checkstart.substr(0,4)
160
- let year2 = this.checkend.substr(0,4)
161
- let month1 = this.checkstart.substr(5,2)
162
- let month2 = this.checkend.substr(5,2)
163
- if(year1 == year2){
164
- condition += ` and f_plan_year = ${year1} and f_plan_month >= ${month1} and f_plan_month <= ${month2}`
165
- }else{
166
- condition += ` and ((f_plan_year = ${year1} and f_plan_month >= ${month1}) or (f_plan_year = ${year2} and f_plan_month <= ${month2}) or (f_plan_year >${year1} and f_plan_year < ${year2}))`
167
- }
168
- }
169
- if(this.checkstart && !this.checkend){
170
- this.$showMessage('计划起始和截至时间必须同时选择!')
171
- return
172
- }
173
- if(!this.checkstart && this.checkend){
174
- this.$showMessage('计划起始和截至时间必须同时选择!')
175
- return
176
- }
177
- if(this.starttime){
178
- condition += ` and f_last_check_date > '${this.starttime} 00:00:00'`
179
- }
180
- if(this.endtime){
181
- condition += ` and f_last_check_date < '${this.endtime} 23:59:59'`
182
- }
183
-
184
- this.model.search(condition, {})
185
- }
186
- },
187
- methods:{
188
- selfSearch(args){
189
- //
190
- if (this.check) {
191
- args.condition = `c.f_checker='${this.check.f_checker}' and i.f_state!='作废' and i.f_filialeid = '${this.$login.f.orgid}'`
192
- if(this.checkstatus){
193
- args.condition += ` and cp.f_entry_status = '${this.checkstatus}'`
194
- }
195
- if (this.checkstart && this.checkend ) {
196
- let year1 = this.checkstart.substr(0,4)
197
- let year2 = this.checkend.substr(0,4)
198
- let month1 = this.checkstart.substr(5,2)
199
- let month2 = this.checkend.substr(5,2)
200
- if(year1 == year2){
201
- args.condition += ` and f_plan_year = ${year1} and f_plan_month >= ${month1} and f_plan_month <= ${month2}`
202
- }else{
203
- args.condition += ` and ((f_plan_year = ${year1} and f_plan_month >= ${month1}) or (f_plan_year = ${year2} and f_plan_month <= ${month2}) or (f_plan_year >${year1} and f_plan_year < ${year2}))`
204
- }
205
- }
206
- if(this.checkstart && !this.checkend){
207
- this.$showMessage('计划起始和截至时间必须同时选择!')
208
- return
209
- }
210
- if(!this.checkstart && this.checkend){
211
- this.$showMessage('计划起始和截至时间必须同时选择!')
212
- return
213
- }
214
- if(this.starttime){
215
- args.condition += ` and f_last_check_date > '${this.starttime} 00:00:00'`
216
- }
217
- if(this.endtime){
218
- args.condition += ` and f_last_check_date < '${this.endtime} 23:59:59'`
219
- }
220
- //
221
- if( this.f_state){
222
- if(this.f_state=='入户'){
223
- args.condition=args.condition+" and i.f_state='已检' and f_last_check_state='入户'"
224
- }else if(this.f_state=='未入户'){
225
- if(this.f_noruhu && this.f_noruhu.length==1){
226
- if(this.f_noruhu[0]=='复访不遇'){
227
- args.condition += "and i.f_state='已检' and f_last_check_state='到访不遇' and f_check_version > 1 "
228
- }else{
229
- args.condition += this.f_noruhu[0]=='未检'?" and i.f_state='未检'":` and i.f_state='已检' and f_last_check_state='${this.f_noruhu[0]}'`
230
- }
231
- }else if(this.f_noruhu && this.f_noruhu.length==2){
232
- if(this.f_noruhu.indexOf('未检')!=-1){
233
- //
234
- if(this.f_noruhu.indexOf('到访不遇')!=-1){
235
- args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and f_last_check_state='到访不遇'))"
236
- }else if(this.f_noruhu.indexOf('复访不遇')!=-1) {
237
- args.condition=args.condition + " and (i.f_state='未检' or (i.f_state='已检' and f_last_check_state = '到访不遇' AND f_check_version >2))"
238
- }else{
239
- args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and f_last_check_state='拒检'))"
240
- }
241
-
242
- }else{
243
- if(this.f_noruhu.indexOf('复访不遇')!=-1){
244
- if(this.f_noruhu.indexOf('到访不遇')!=-1){
245
- args.condition=args.condition + " and (i.f_state='已检' and (f_last_check_state='到访不遇'))"
246
- }else{
247
- args.condition=args.condition + " and i.f_state='已检' and ((f_last_check_state='到访不遇' and f_check_version >2) or f_last_check_state='拒检' )"
248
- }
249
- }else{
250
- args.condition=args.condition+" and (i.f_state='已检' and (f_last_check_state='到访不遇' or f_last_check_state='拒检'))"
251
- }
252
- }
253
- }else{
254
- if(this.f_noruhu.indexOf('未检')!=-1){
255
- args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and (f_last_check_state='到访不遇' or f_last_check_state='拒检')))"
256
- }
257
- else{
258
- args.condition=args.condition+" and (i.f_state='已检' and (f_last_check_state='到访不遇' or f_last_check_state='拒检'))"
259
- }
260
- }
261
-
262
- }
263
-
264
- }
265
- this.model.search(args.condition, args.model)
266
- }
267
- }
268
- },
269
- computed: {
270
- // 导出到Excel的条件构造
271
- exportParameter() {
272
- return {
273
- condition: this.$refs.paged.model.condition
274
- }
275
- }
276
- },
277
- }
278
- </script>
1
+ <template>
2
+ <div>
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div partial>
6
+ <!-- <p class="text-center" style="padding: 7px;"><b>安检计划项明细</b></p>-->
7
+ <ul class="nav nav-tabs">
8
+ <li role="presentation" class="active"><a style=" color: #5ac0d9 !important;">安检计划项明细</a></li>
9
+ </ul>
10
+ <div class="row">
11
+ <div class="form-group col-sm-4" >
12
+ <label class="font_normal_body">安检状态</label>
13
+ <v-select style="width:60% "
14
+ class="select select_list"
15
+ :value.sync="$parent.$parent.f_state"
16
+ v-model="$parent.$parent.f_state"
17
+ :options='$parent.$parent.checkState'
18
+ placeholder='安检状态'
19
+ close-on-select
20
+ value-single
21
+ >
22
+ </v-select>
23
+ </div>
24
+ <div class="form-group col-sm-4" >
25
+ <v-select style="width:60% "
26
+ v-if="$parent.$parent.f_state=='未入户'"
27
+ class="select select_list"
28
+ :value.sync="$parent.$parent.f_noruhu"
29
+ v-model="$parent.$parent.f_noruhu"
30
+ :options='$parent.$parent.noChecks'
31
+ placeholder='请选择状态'
32
+ :multiple="true"
33
+ >
34
+ </v-select>
35
+ </div>
36
+ <div class="form-group col-sm-4 button-range" >
37
+ <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
38
+ <export-excel-safe :data="$parent.$parent.exportParameter"
39
+ :field="$parent.$parent.excelHeaders"
40
+ sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
41
+ template-name='安检计划明细' :choose-col="true">
42
+ </export-excel-safe>
43
+ <!--<export-excel-safe-->
44
+ <!--:data="{condition: $parent.$parent.condition}"-->
45
+ <!--:field="$parent.$parent.getfield"-->
46
+ <!--sqlurl="rs/logic/saleExport" sql-name="getGasUser" :template-name="$parent.$parent.pricename+'气价使用人'"-->
47
+ <!--:choose-col="true"></export-excel-safe>-->
48
+
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </criteria>
53
+ <data-grid :model="model" partial='list' class="table_sy">
54
+
55
+ <template partial='head'>
56
+ <tr>
57
+ <th><nobr>计划名称</nobr></th>
58
+ <th><nobr>用户编号</nobr></th>
59
+ <th><nobr>用户名称</nobr></th>
60
+ <th><nobr>小区名称</nobr></th>
61
+ <th><nobr>地址</nobr></th>
62
+ <th><nobr>安检状态</nobr></th>
63
+ <th><nobr>是否安检</nobr></th>
64
+ </tr>
65
+ </template>
66
+ <template partial='body'>
67
+ <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
68
+ <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
69
+ <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
70
+ <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
71
+ <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
72
+ <td style="text-align: center"><nobr>{{row.f_last_check_state}}</nobr></td>
73
+ <td style="text-align: center"><nobr>{{row.f_state}}</nobr></td>
74
+ </template>
75
+ </data-grid>
76
+ </criteria-paged>
77
+ </div>
78
+ </template>
79
+
80
+ <script>
81
+ import { PagedList } from 'vue-client'
82
+
83
+ export default {
84
+ title: '安检计划项列表',
85
+ data () {
86
+ return {
87
+ model: new PagedList('rs/sql/planItem', 20),
88
+ checkState:[{label:'全部',value:''},{label:'入户',value:'入户'},{label:'未入户',value:'未入户'}],
89
+ noChecks:[{label:'未检',value:'未检'},{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'复访不遇',value:'复访不遇'}],
90
+ excelHeaders: {
91
+ //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
92
+ 'f_plan_name':'计划名称',
93
+ 'f_userinfo_code': '用户编号',
94
+ 'f_user_name': '用户名称',
95
+ 'f_user_phone': '用户电话',
96
+ //'count_item':'安检次数',
97
+ 'f_user_type': '用户类型',
98
+ 'f_residential_area': '小区名称',
99
+ 'f_address':'地址',
100
+ 'f_state':'是否已检',
101
+ 'f_last_check_date':'安检日期',
102
+ 'f_last_check_state': '安检状态'
103
+ },
104
+ f_state:'',
105
+ f_noruhu:''
106
+ }
107
+ },
108
+ props: [ 'check','checkstatus','checkstart','checkend','starttime','endtime' ],
109
+ watch: {
110
+ 'check' (val) {
111
+ let condition
112
+ //tag
113
+ condition = `c.f_checker='${this.check.f_checker}' and i.f_state!='作废' and i.f_filialeid = '${this.$login.f.orgid}'`
114
+ if(this.checkstatus){
115
+ condition += ` and cp.f_entry_status = '${this.checkstatus}'`
116
+ }
117
+ if (this.checkstart && this.checkend ) {
118
+ let year1 = this.checkstart.substr(0,4)
119
+ let year2 = this.checkend.substr(0,4)
120
+ let month1 = this.checkstart.substr(5,2)
121
+ let month2 = this.checkend.substr(5,2)
122
+ if(year1 == year2){
123
+ condition += ` and f_plan_year = ${year1} and f_plan_month >= ${month1} and f_plan_month <= ${month2}`
124
+ }else{
125
+ condition += ` and ((f_plan_year = ${year1} and f_plan_month >= ${month1}) or (f_plan_year = ${year2} and f_plan_month <= ${month2}) or (f_plan_year >${year1} and f_plan_year < ${year2}))`
126
+ }
127
+ }
128
+ if(this.checkstart && !this.checkend){
129
+ this.$showMessage('计划起始和截至时间必须同时选择!')
130
+ return
131
+ }
132
+ if(!this.checkstart && this.checkend){
133
+ this.$showMessage('计划起始和截至时间必须同时选择!')
134
+ return
135
+ }
136
+ if(this.starttime){
137
+ condition += ` and f_last_check_date > '${this.starttime} 00:00:00'`
138
+ }
139
+ if(this.endtime){
140
+ condition += ` and f_last_check_date < '${this.endtime} 23:59:59'`
141
+ }
142
+ this.f_noruhu=[]
143
+ this.f_state=''
144
+ this.model.search(condition, {})
145
+
146
+ }
147
+ },
148
+
149
+ ready () {
150
+ //tag
151
+ if (this.check) {
152
+ let condition
153
+ //tag
154
+ condition = `c.f_checker='${this.check.f_checker}' and i.f_state!='作废' and i.f_filialeid = '${this.$login.f.orgid}'`
155
+ if(this.checkstatus){
156
+ condition += ` and cp.f_entry_status = '${this.checkstatus}'`
157
+ }
158
+ if (this.checkstart && this.checkend ) {
159
+ let year1 = this.checkstart.substr(0,4)
160
+ let year2 = this.checkend.substr(0,4)
161
+ let month1 = this.checkstart.substr(5,2)
162
+ let month2 = this.checkend.substr(5,2)
163
+ if(year1 == year2){
164
+ condition += ` and f_plan_year = ${year1} and f_plan_month >= ${month1} and f_plan_month <= ${month2}`
165
+ }else{
166
+ condition += ` and ((f_plan_year = ${year1} and f_plan_month >= ${month1}) or (f_plan_year = ${year2} and f_plan_month <= ${month2}) or (f_plan_year >${year1} and f_plan_year < ${year2}))`
167
+ }
168
+ }
169
+ if(this.checkstart && !this.checkend){
170
+ this.$showMessage('计划起始和截至时间必须同时选择!')
171
+ return
172
+ }
173
+ if(!this.checkstart && this.checkend){
174
+ this.$showMessage('计划起始和截至时间必须同时选择!')
175
+ return
176
+ }
177
+ if(this.starttime){
178
+ condition += ` and f_last_check_date > '${this.starttime} 00:00:00'`
179
+ }
180
+ if(this.endtime){
181
+ condition += ` and f_last_check_date < '${this.endtime} 23:59:59'`
182
+ }
183
+
184
+ this.model.search(condition, {})
185
+ }
186
+ },
187
+ methods:{
188
+ selfSearch(args){
189
+ //
190
+ if (this.check) {
191
+ args.condition = `c.f_checker='${this.check.f_checker}' and i.f_state!='作废' and i.f_filialeid = '${this.$login.f.orgid}'`
192
+ if(this.checkstatus){
193
+ args.condition += ` and cp.f_entry_status = '${this.checkstatus}'`
194
+ }
195
+ if (this.checkstart && this.checkend ) {
196
+ let year1 = this.checkstart.substr(0,4)
197
+ let year2 = this.checkend.substr(0,4)
198
+ let month1 = this.checkstart.substr(5,2)
199
+ let month2 = this.checkend.substr(5,2)
200
+ if(year1 == year2){
201
+ args.condition += ` and f_plan_year = ${year1} and f_plan_month >= ${month1} and f_plan_month <= ${month2}`
202
+ }else{
203
+ args.condition += ` and ((f_plan_year = ${year1} and f_plan_month >= ${month1}) or (f_plan_year = ${year2} and f_plan_month <= ${month2}) or (f_plan_year >${year1} and f_plan_year < ${year2}))`
204
+ }
205
+ }
206
+ if(this.checkstart && !this.checkend){
207
+ this.$showMessage('计划起始和截至时间必须同时选择!')
208
+ return
209
+ }
210
+ if(!this.checkstart && this.checkend){
211
+ this.$showMessage('计划起始和截至时间必须同时选择!')
212
+ return
213
+ }
214
+ if(this.starttime){
215
+ args.condition += ` and f_last_check_date > '${this.starttime} 00:00:00'`
216
+ }
217
+ if(this.endtime){
218
+ args.condition += ` and f_last_check_date < '${this.endtime} 23:59:59'`
219
+ }
220
+ //
221
+ if( this.f_state){
222
+ if(this.f_state=='入户'){
223
+ args.condition=args.condition+" and i.f_state='已检' and i.f_last_check_state='入户'"
224
+ }else if(this.f_state=='未入户'){
225
+ if(this.f_noruhu && this.f_noruhu.length==1){
226
+ if(this.f_noruhu[0]=='复访不遇'){
227
+ args.condition += "and i.f_state='已检' and i.f_last_check_state='到访不遇' and i.f_check_version > 1 "
228
+ }else{
229
+ args.condition += this.f_noruhu[0]=='未检'?" and i.f_state='未检'":` and i.f_state='已检' and i.f_last_check_state='${this.f_noruhu[0]}'`
230
+ }
231
+ }else if(this.f_noruhu && this.f_noruhu.length==2){
232
+ if(this.f_noruhu.indexOf('未检')!=-1){
233
+ //
234
+ if(this.f_noruhu.indexOf('到访不遇')!=-1){
235
+ args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and i.f_last_check_state='到访不遇'))"
236
+ }else if(this.f_noruhu.indexOf('复访不遇')!=-1) {
237
+ args.condition=args.condition + " and (i.f_state='未检' or (i.f_state='已检' and i.f_last_check_state = '到访不遇' AND i.f_check_version >2))"
238
+ }else{
239
+ args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and i.f_last_check_state='拒检'))"
240
+ }
241
+
242
+ }else{
243
+ if(this.f_noruhu.indexOf('复访不遇')!=-1){
244
+ if(this.f_noruhu.indexOf('到访不遇')!=-1){
245
+ args.condition=args.condition + " and (i.f_state='已检' and (i.f_last_check_state='到访不遇'))"
246
+ }else{
247
+ args.condition=args.condition + " and i.f_state='已检' and ((i.f_last_check_state='到访不遇' and f_check_version >2) or i.f_last_check_state='拒检' )"
248
+ }
249
+ }else{
250
+ args.condition=args.condition+" and (i.f_state='已检' and (i.f_last_check_state='到访不遇' or i.f_last_check_state='拒检'))"
251
+ }
252
+ }
253
+ }else{
254
+ if(this.f_noruhu.indexOf('未检')!=-1){
255
+ args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and (i.f_last_check_state='到访不遇' or i.f_last_check_state='拒检')))"
256
+ }
257
+ else{
258
+ args.condition=args.condition+" and (i.f_state='已检' and (i.f_last_check_state='到访不遇' or i.f_last_check_state='拒检'))"
259
+ }
260
+ }
261
+
262
+ }
263
+
264
+ }
265
+ this.model.search(args.condition, args.model)
266
+ }
267
+ }
268
+ },
269
+ computed: {
270
+ // 导出到Excel的条件构造
271
+ exportParameter() {
272
+ return {
273
+ condition: this.$refs.paged.model.condition
274
+ }
275
+ }
276
+ },
277
+ }
278
+ </script>