system-phone 3.0.49 → 3.1.1

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.
Files changed (134) hide show
  1. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  2. package/SystemPhone.iml +8 -8
  3. package/build/dev-server.js +141 -141
  4. package/build/webpack.base.conf.js +82 -82
  5. package/build.gradle +27 -27
  6. package/gradle/wrapper/gradle-wrapper.properties +5 -5
  7. package/gradlew +183 -183
  8. package/gradlew.bat +100 -100
  9. package/index.html +21 -21
  10. package/package.json +1 -1
  11. package/src/App.vue +25 -25
  12. package/src/Util.js +415 -415
  13. package/src/assets/images//346/211/223/345/215/241.png +0 -0
  14. package/src/assets//344/277/235/351/231/251/347/231/273/350/256/260.png +0 -0
  15. package/src/assets//345/210/240/351/231/244/347/205/247/347/211/207.png +0 -0
  16. package/src/assets//345/215/217/345/212/251/345/256/211/346/243/200.png +0 -0
  17. package/src/assets//345/215/241/350/241/250/346/212/204/350/241/250/345/276/205/345/212/236.png +0 -0
  18. package/src/assets//345/233/236/350/256/277.png +0 -0
  19. package/src/assets//345/234/260/345/235/200/345/217/230/346/233/264.png +0 -0
  20. package/src/assets//345/242/236/345/200/274/345/276/205/345/212/236.png +0 -0
  21. package/src/assets//345/244/226/351/203/250/345/256/211/346/243/200/344/270/212/344/274/240.png +0 -0
  22. package/src/assets//345/244/226/351/203/250/345/256/211/346/243/200/344/273/243/345/212/236.png +0 -0
  23. package/src/assets//345/244/226/351/203/250/345/256/211/346/243/200/345/267/262/345/212/236.png +0 -0
  24. package/src/assets//345/244/226/351/203/250/345/256/211/346/243/200/345/276/205/345/212/236.png +0 -0
  25. package/src/assets//345/244/226/351/203/250/351/233/206/344/270/255/345/256/211/346/243/200.png +0 -0
  26. package/src/assets//345/256/211/346/243/200/345/216/206/345/217/262/346/237/245/347/234/213.png +0 -0
  27. package/src/assets//345/256/211/346/243/200/347/256/241/347/220/206/346/234/252/351/200/211/344/270/255.png +0 -0
  28. package/src/assets//345/256/211/346/243/200/347/256/241/347/220/206/351/200/211/344/270/255.png +0 -0
  29. package/src/assets//345/256/211/346/243/200/350/275/254/345/215/225/345/256/241/346/240/270.png +0 -0
  30. package/src/assets//345/267/245/345/215/225/345/244/215/346/243/200.png +0 -0
  31. package/src/assets//345/267/245/345/225/206/345/256/211/346/243/200.png +0 -0
  32. package/src/assets//345/276/205/345/212/236/347/273/237/350/256/241.png +0 -0
  33. package/src/assets//346/212/204/350/241/250/351/207/215/344/274/240.png +0 -0
  34. package/src/assets//346/212/245/345/273/272/344/273/243/345/212/236.png +0 -0
  35. package/src/assets//346/226/275/345/260/201.png +0 -0
  36. package/src/assets//346/226/275/345/260/201/347/256/241/347/220/206.png +0 -0
  37. package/src/assets//346/260/221/347/224/250/345/256/211/346/243/200.png +0 -0
  38. package/src/assets//347/205/247/347/211/207/345/210/240/351/231/244.png +0 -0
  39. package/src/assets//347/211/251/350/201/224/347/275/221/350/241/250.png +0 -0
  40. package/src/assets//347/224/250/346/210/267/345/273/272/346/241/243.png +0 -0
  41. package/src/assets//347/224/250/346/210/267/350/256/260/345/275/225.png +0 -0
  42. package/src/assets//347/273/264/344/277/256/345/234/250/347/272/277/346/237/245/350/257/242.png +0 -0
  43. package/src/assets//347/273/264/344/277/256/347/231/273/350/256/260.png +0 -0
  44. package/src/assets//347/273/264/344/277/256/350/256/260/345/275/225.png +0 -0
  45. package/src/assets//350/256/241/345/210/222/345/256/211/346/243/200.png +0 -0
  46. package/src/assets//350/256/241/345/210/222/347/273/237/350/256/241.png +0 -0
  47. package/src/assets//351/200/232/346/260/224/346/211/223/345/216/213/347/225/231/345/272/225.png +0 -0
  48. package/src/assets//351/223/205/345/260/201/347/256/241/347/220/206.png +0 -0
  49. package/src/assets//351/230/200/346/216/247/347/256/241/347/220/206.png +0 -0
  50. package/src/assets//351/235/236/345/261/205/346/260/221/345/256/211/346/243/200.png +0 -0
  51. package/src/assets//351/235/236/346/260/221/347/224/250/345/256/211/346/243/200.png +0 -0
  52. package/src/assets//351/242/204/347/272/246/345/256/211/346/243/200/345/276/205/345/212/236.png +0 -0
  53. package/src/assets//351/246/226/351/241/265/345/244/247/345/233/276.png +0 -0
  54. package/src/components/AloneLoadParams.vue +26 -26
  55. package/src/components/AlreadyService.vue +193 -193
  56. package/src/components/AttendManage.vue +120 -1
  57. package/src/components/LoadAppdata.vue +38 -38
  58. package/src/components/LoginApp.vue +732 -724
  59. package/src/components/LoginAppNew.vue +587 -587
  60. package/src/components/LoginAppV4.vue +716 -0
  61. package/src/components/ModifyPassWord.vue +216 -216
  62. package/src/components/NavBottom.vue +117 -117
  63. package/src/components/NavBottomV.vue +141 -141
  64. package/src/components/NavBottomVVV.vue +185 -185
  65. package/src/components/OnlineManage.vue +1 -1
  66. package/src/components/PhoneAllInfo.vue +68 -68
  67. package/src/components/PhoneChangemeterInfo.vue +116 -116
  68. package/src/components/PhoneImageInfo.vue +102 -0
  69. package/src/components/PhoneInfoTable.vue +39 -39
  70. package/src/components/PhoneMeterInfo.vue +132 -132
  71. package/src/components/PhoneRepairInfo.vue +146 -146
  72. package/src/components/PhoneSafeInfo.vue +4 -4
  73. package/src/components/PhoneSellInfo.vue +148 -123
  74. package/src/components/PhoneSellInfoLite.vue +112 -112
  75. package/src/components/PhoneUser.vue +202 -202
  76. package/src/components/PhoneUserDetil.vue +70 -70
  77. package/src/components/PhoneUserFind.vue +138 -138
  78. package/src/components/SystemSetUp.vue +332 -308
  79. package/src/components/TabBarPhone.vue +81 -81
  80. package/src/components/Test.vue +14 -14
  81. package/src/components/ToolsPage.vue +27 -4
  82. package/src/components/UploadManage.vue +194 -194
  83. package/src/components/gaomi/NavBottomV.vue +223 -223
  84. package/src/components/gaomi/NavBottomVVVV.vue +210 -210
  85. package/src/components/gaomi/Scroller.vue +63 -63
  86. package/src/components/gaomi/SystemSetUp.vue +186 -186
  87. package/src/components/gaomi/ToolsPage.vue +168 -168
  88. package/src/components/idea/feedBack.vue +150 -150
  89. package/src/components/idea/feedbackAdd.vue +366 -366
  90. package/src/components/info/ConfigInfo.vue +122 -122
  91. package/src/components/info/FindUserInfo.vue +157 -157
  92. package/src/components/info/InfoTable.vue +37 -37
  93. package/src/components/iot/InstructMessage.vue +313 -313
  94. package/src/components/iot/IotBaseInfo.vue +97 -97
  95. package/src/components/iot/IotMeterInfo.vue +77 -77
  96. package/src/components/iot/iotMonitoringMain.vue +501 -501
  97. package/src/components/online/ApplyOnline.vue +581 -581
  98. package/src/components/online/BJZhongRan/ApplyOnline.vue +600 -600
  99. package/src/components/screen/ChargeContentPage.vue +656 -656
  100. package/src/components/screen/ContentPage.vue +611 -611
  101. package/src/components/screen/GongdanContentPage.vue +149 -149
  102. package/src/components/screen/ListCountItem.vue +93 -93
  103. package/src/components/screen/ModuleTitle.vue +48 -48
  104. package/src/components/screen/SafeOrderContentPage.vue +440 -440
  105. package/src/components/screen/SecurityCheckItem.vue +50 -50
  106. package/src/components/screen/TotalItem.vue +76 -76
  107. package/src/components/screen/TotalUserNumber.vue +77 -77
  108. package/src/components/screen/WorkOrderItem.vue +51 -51
  109. package/src/components/screen/WorkOrderRightDownItem.vue +103 -103
  110. package/src/components/screen/WorkOrderRightItem.vue +115 -115
  111. package/src/components/userinfo/paymentQuery.vue +189 -189
  112. package/src/components/userinfo/queryFile.vue +190 -190
  113. package/src/components/wasm.vue +18 -18
  114. package/src/expandcssAndroid.less +521 -521
  115. package/src/filiale/yulinyuchuan/AlreadyService.vue +194 -0
  116. package/src/filiale/yulinyuchuan/AttendManage.vue +537 -0
  117. package/src/filiale/yulinyuchuan/LoginApp.vue +741 -0
  118. package/src/filiale/yulinyuchuan/OnlineManage.vue +256 -0
  119. package/src/filiale/yulinyuchuan/SystemSetUp.vue +332 -0
  120. package/src/filiale/yulinyuchuan/UploadManage.vue +195 -0
  121. package/src/filiale/yulinyuchuan/systemphonegrid.js +9 -0
  122. package/src/index.js +9 -9
  123. package/src/main.js +38 -38
  124. package/src/plugins/const.js +404 -404
  125. package/src/plugins/vue-py.js +37 -37
  126. package/src/stores/AppData.js +79 -63
  127. package/src/systemphone-gaomi.js +105 -105
  128. package/src/systemphone.js +60 -58
  129. package/src/systemphonegrid.js +15 -40
  130. package/src/util/LdapHelper.js +75 -75
  131. package/static/const.js +404 -404
  132. package/static/layui/font/iconfont.svg +554 -554
  133. package/static/vue-py.js +37 -37
  134. package/static/wasm_exec.js +465 -465
@@ -1,582 +1,582 @@
1
- <template>
2
- <div>
3
- <!--表具信息-->
4
- <validator name='v' :data.sync="data">
5
- <div class="auto select-overspread form-horizontal repair-bg">
6
- <div class="bq-parent">
7
- <blockquote class="blockquote">
8
- <p>表具信息</p>
9
- </blockquote>
10
- </div>
11
- <div class="panel panel-default auto repair-info-content">
12
- <div class="panel-body auto repair-info-content compatible">
13
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_meternumber.required ? 'has-error' : 'has-success']">
14
- <label for="f_meternumber" class="lb-left text-justify">表号</label>
15
- <input id="f_meternumber" v-model="userdata.userinfo.userfiles.f_meternumber" v-validate:f_meternumber="{required: true}" type="text" class="form-control"/>
16
- <button type="button" name="button" class="btn btn-primary" @click="scan">扫码</button>
17
- </div>
18
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_meter_brand.required ? 'has-error' : 'has-success']">
19
- <label for="f_meter_brand" class="lb-left text-justify">气表品牌</label>
20
- <input id="f_meter_brand" v-model="userdata.userinfo.userfiles.f_meter_brand" v-validate:f_meter_brand="{required: true}" type="text" class="form-control">
21
- </div>
22
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_meter_style.required ? 'has-error' : 'has-success']">
23
- <label for="f_meter_style" class="lb-left text-justify">气表型号</label>
24
- <input id="f_meter_style" v-model="userdata.userinfo.userfiles.f_meter_style" v-validate:f_meter_style="{required: true}" type="text" class="form-control">
25
- </div>
26
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_meter_type.required ? 'has-error' : 'has-success']">
27
- <label for="f_meter_type" class="lb-left text-justify">气表类型</label>
28
- <input id="f_meter_type" v-model="userdata.userinfo.userfiles.f_meter_type" v-validate:f_meter_type="{required: true}" type="text" class="form-control">
29
- </div>
30
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_aroundmeter.required ? 'has-error' : 'has-success']">
31
- <label for="f_aroundmeter" class="lb-left text-justify">进气方向</label>
32
- <input type="text"
33
- v-show="false"
34
- v-model="userdata.userinfo.userfiles.f_aroundmeter"
35
- v-validate:f_aroundmeter='{required: true}'>
36
- <v-select id="f_aroundmeter"
37
- :value.sync="userdata.userinfo.userfiles.f_aroundmeter"
38
- :value-single="true"
39
- :options='aroundmeterlist'
40
- placeholder='请选择'
41
- close-on-select>
42
- </v-select>
43
- </div>
44
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_initial_base.required ? 'has-error' : 'has-success']">
45
- <label for="f_initial_base" class="lb-left text-justify">表基数</label>
46
- <input id="f_initial_base" v-model="userdata.userinfo.userfiles.f_initial_base" v-validate:f_initial_base="{required: true}" type="number" class="form-control">
47
- </div>
48
- </div>
49
- </div>
50
- </div>
51
- <div class="bq-parent">
52
- <blockquote class="blockquote">
53
- <input class="magic-checkbox" type="checkbox" id="isStay" v-model="isStay"/>
54
- <label for="isStay" style="width:150px;padding-bottom: 10px">用户是否入住</label>
55
- </blockquote>
56
- </div>
57
- <!--用户信息-->
58
- <div class="auto select-overspread form-horizontal repair-bg" v-show="isStay">
59
- <div class="bq-parent">
60
- <blockquote class="blockquote">
61
- <p>用户信息</p>
62
- </blockquote>
63
- </div>
64
- <div class="panel panel-default auto repair-info-content">
65
- <div class="panel-body auto repair-info-content compatible">
66
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
67
- <label for="f_user_name" class="lb-left text-justify">用户姓名</label>
68
- <input id="f_user_name" v-model="userdata.userinfo.f_user_name" type="text" class="form-control"/>
69
- </div>
70
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
71
- <label for="f_idnumber" class="lb-left text-justify">身份证号</label>
72
- <input id="f_idnumber" v-model="userdata.userinfo.f_idnumber" type="text" class="form-control">
73
- </div>
74
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" v-show="isNotIdNumber">
75
- <span style="font-size:10px;color: red">输入的身份证号长度不对,或者号码不符合规定!</span>
76
- </div>
77
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
78
- <label for="f_user_phone" class="lb-left text-justify">用户电话</label>
79
- <input id="f_user_phone" v-model="userdata.userinfo.f_user_phone" type="text" class="form-control">
80
- </div>
81
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
82
- <label for="f_price_name" class="lb-left text-justify">住户类型</label>
83
- <v-select id="f_price_name"
84
- :value.sync="userdata.userinfo.f_price_name"
85
- :value-single="true"
86
- :options='houseTypeOptions'
87
- placeholder='请选择'
88
- close-on-select>
89
- </v-select>
90
- </div>
91
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
92
- <label for="f_comments" class="lb-left text-justify">备注</label>
93
- <textarea id="f_comments" class="form-control" cols="30" rows="4" style="resize: vertical;" v-model="userdata.userinfo.f_comments"></textarea>
94
- </div>
95
- </div>
96
- </div>
97
- </div>
98
- <!--地址信息-->
99
- <div class="auto select-overspread form-horizontal repair-bg">
100
- <div class="bq-parent">
101
- <blockquote class="blockquote">
102
- <p>地址信息</p>
103
- </blockquote>
104
- </div>
105
- <div class="panel panel-default auto repair-info-content">
106
- <div class="panel-body auto repair-info-content compatible">
107
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
108
- <label for="f_pcd_id" class="lb-left text-justify">省市区</label>
109
- <input type="text"
110
- v-show="false"
111
- v-model="addressData.f_pcd_id"
112
- v-validate:f_pcd_id='{required: true}'>
113
- <v-select id="f_pcd_id"
114
- :value.sync="addressData.f_pcd_id"
115
- :value-single="true"
116
- :options='pcdslist'
117
- placeholder='请选择'
118
- close-on-select
119
- search="true"
120
- @change="pcdChange">
121
- </v-select>
122
- </div>
123
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
124
- <label for="f_street_id" class="lb-left text-justify">街道名称</label>
125
- <input type="text"
126
- v-show="false"
127
- v-model="addressData.f_street_id"
128
- v-validate:f_street_id='{required: true}'>
129
- <v-select id="f_street_id"
130
- :value.sync="addressData.f_street_id"
131
- :value-single="true"
132
- :options='streetslist'
133
- placeholder='请选择'
134
- close-on-select
135
- search="true"
136
- @change="streetChange">
137
- </v-select>
138
- </div>
139
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
140
- <label for="f_residential_area_id" class="lb-left text-justify">小区名称</label>
141
- <input type="text"
142
- v-show="false"
143
- v-model="addressData.f_residential_area_id"
144
- v-validate:f_residential_area_id='{required: true}'>
145
- <v-select id="f_residential_area_id"
146
- :value.sync="addressData.f_residential_area_id"
147
- :value-single="true"
148
- :options='areaslist'
149
- placeholder='请选择'
150
- close-on-select
151
- search="true"
152
- @change="areaChange">
153
- </v-select>
154
- </div>
155
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.slice.required ? 'has-error' : 'has-success']">
156
- <label for="f_meter_type" class="lb-left text-justify">片区</label>
157
- <input type="text"
158
- v-show="false"
159
- v-model="$refs.slice.selectedItems"
160
- v-validate:slice='{required: true}'>
161
- <v-select id="slice_area"
162
- :value.sync="addressData.slice_area"
163
- :options='sliceArea'
164
- placeholder='片区/管理站'
165
- filer-key="name"
166
- close-on-select
167
- v-ref:slice>
168
- </v-select>
169
- </div>
170
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_building.required ? 'has-error' : 'has-success']">
171
- <label for="f_building" class="lb-left text-justify">楼号</label>
172
- <input id="f_building" v-model="addressData.f_building" v-validate:f_building='{required: true}' type="text" class="form-control" style="width: 70%">
173
- <input id="f_building_suffix" v-model="addressData.f_building_suffix" type="text" class="form-control" style="width: 30%">
174
- </div>
175
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_unit.required ? 'has-error' : 'has-success']">
176
- <label for="f_unit" class="lb-left text-justify">单元</label>
177
- <input id="f_unit" v-model="addressData.f_unit" v-validate:f_unit='{required: true}' type="text" class="form-control" style="width: 70%">
178
- <input id="f_unit_suffix" v-model="addressData.f_unit_suffix" type="text" class="form-control" style="width: 30%">
179
- </div>
180
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_floor.required ? 'has-error' : 'has-success']">
181
- <label for="f_floor" class="lb-left text-justify">楼层</label>
182
- <input id="f_floor" v-model="addressData.f_floor" v-validate:f_floor='{required: true}' type="text" class="form-control" style="width: 70%">
183
- <input id="f_floor_suffix" v-model="addressData.f_floor_suffix" type="text" class="form-control" style="width: 30%">
184
- </div>
185
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_room.required ? 'has-error' : 'has-success']">
186
- <label for="f_room" class="lb-left text-justify">门牌号</label>
187
- <input id="f_room" type="text" v-model="addressData.f_room" v-validate:f_room='{required: true}' class="form-control" style="width: 70%">
188
- <input id="f_room_suffix" type="text" v-model="addressData.f_room_suffix" class="form-control" style="width: 30%">
189
- </div>
190
- </div>
191
- </div>
192
- </div>
193
- </validator>
194
- <!--提交-->
195
- <div class="panel panel-default auto repair-info-content" style="width: 100%;height: auto">
196
- <div style="margin: 0 auto;width: 25%">
197
- <button type="button" name="button" class="col-sm-3 btn btn-primary" :disabled='!$v.valid' @click='summit()'>
198
- 上传档案
199
- </button>
200
- </div>
201
- </div>
202
- <work-busy :is-busy="isBusy"></work-busy>
203
- </div>
204
- </template>
205
-
206
- <script>
207
- import Vue from 'vue'
208
- import {HttpResetClass} from 'vue-client'
209
-
210
- export default {
211
- title: "ApplyOnline",
212
- data() {
213
- return {
214
- userdata: {
215
- address: {
216
- id: null
217
- },
218
- f_user_type: "民用",
219
- userinfo: {
220
- userfiles: {
221
- f_meternumber: null,
222
- f_meter_brand: null,
223
- f_meter_style: null,
224
- f_meter_type: null,
225
- f_aroundmeter: null,
226
- f_initial_base: null,
227
- f_table_state: "待开通"
228
- },
229
- f_price_name: null,
230
- f_rent_phone: null,
231
- f_user_phone: null,
232
- f_user_name: null,
233
- f_idnumber: null,
234
- f_comments: null
235
- },
236
- devices: [],
237
- f_operator: Vue.user.ename
238
- },
239
- // 是否入住
240
- isStay: false,
241
- addressData: {
242
- f_create_person: Vue.user.name,
243
- f_filialeid: Vue.user.orgid,
244
- f_operator: Vue.user.name,
245
- f_operatorid: Vue.user.id,
246
- f_orgid: Vue.user.orgid,
247
- f_orgname: Vue.user.orgs,
248
- f_depid: Vue.user.depids,
249
- f_depname: Vue.user.deps,
250
- f_pcd: null,
251
- f_pcd_id: null,
252
- f_street: null,
253
- f_street_id: null,
254
- f_residential_area: null,
255
- f_residential_area_id: null,
256
- f_address: null,
257
- slice_area: null,
258
- f_slice_area: null,
259
- f_area_code: null,
260
- f_building: null,
261
- f_building_suffix: "号楼",
262
- f_unit: null,
263
- f_unit_suffix: "单元",
264
- f_floor: null,
265
- f_floor_suffix: "层",
266
- f_room: null,
267
- f_room_suffix: "室"
268
- },
269
- //初始化省市区数据
270
- pcdslist: [],
271
- //初始化街道数据
272
- streetslist: [],
273
- //初始化街道数据
274
- areaslist: [],
275
- sliceArea: [],
276
- aroundmeterlist: [{label: '左表', value: '左表'}, {label: '右表', value: '右表'}],
277
- houseTypeOptions: [{label: '自有房', value: '自有房'}, {label: '租赁房', value: '租赁房'}],
278
- isNotIdNumber: false,
279
- isBusy: false
280
- }
281
- },
282
- async ready() {
283
- console.log('进入在线报装页面www')
284
- await this.initpcds(` f_filialeid = '${Vue.user.orgid}'`)
285
- await this.initAreas(Vue.user.orgid)
286
- console.log('pcdslist ===> ' + JSON.stringify(this.pcdslist))
287
- console.log('sliceArea ===> ' + JSON.stringify(this.sliceArea))
288
- },
289
- methods: {
290
- scan() {
291
- HostApp.__this__ = this
292
- HostApp.scanCode({callback: "javascript:HostApp.__this__.scanCallback();"})
293
- },
294
- scanCallback() {
295
- let response = HostApp.getCode()
296
- console.log(`扫码返回值:${response}`)
297
- if (response.code == 200) {
298
- this.userdata.userinfo.userfiles.f_meternumber = response.data
299
- } else {
300
- this.$showMessage('无法识别该条形码,请调整手机聚焦重试。')
301
- }
302
- },
303
- // 初始化片区
304
- async initAreas(val) {
305
- if (val) {
306
- let http = new HttpResetClass()
307
- let getAllArea = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {
308
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
309
- userid: Vue.user.id
310
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
311
-
312
- let arr = getAllArea.data.filter((res) => {
313
- return res.parentid == val
314
- })
315
- console.log('过滤之后的片区:' + JSON.stringify(arr))
316
- this.sliceArea = []
317
- arr.forEach((res) => {
318
- this.sliceArea.push({label: res.name, value: {name: res.name, code: res.number}})
319
- })
320
- }
321
- },
322
-
323
- //初始化省市区,添加街道
324
- async initpcds(pconditon) {
325
- this.pcdslist = []
326
- let HttpReset = new HttpResetClass()
327
- let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
328
- data: {
329
- items: '*',
330
- tablename: 't_pcd',
331
- orderitem: 'id',
332
- condition: pconditon
333
- }
334
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
335
- let redata = []
336
- req.data.forEach((row, n) => {
337
- redata[n] = {
338
- label: row.f_pcd,
339
- value: row.id,
340
- data: row,
341
- id: row.id
342
- }
343
- })
344
- this.pcdslist = redata
345
- },
346
- //初始化街道 添加小区
347
- async initstreets(pconditon) {
348
- this.streetslist = []
349
- let HttpReset = new HttpResetClass()
350
- let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
351
- data: {
352
- items: '*',
353
- tablename: 't_street',
354
- orderitem: 'id',
355
- condition: pconditon
356
- }
357
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
358
- let redata = []
359
- req.data.forEach((row, n) => {
360
- redata[n] = {
361
- label: row.f_street,
362
- value: row.id,
363
- data: row,
364
- id: row.id
365
- }
366
- })
367
- this.streetslist = redata
368
- },
369
- //初始化小区添加小区
370
- async initareas(pconditon) {
371
- if (this.usertype) {
372
- pconditon = pconditon + ` and f_special='1' `
373
- }
374
- this.areaslist = []
375
- let HttpReset = new HttpResetClass()
376
- let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
377
- data: {
378
- items: '*',
379
- tablename: 't_area',
380
- orderitem: 'id',
381
- condition: pconditon
382
- }
383
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
384
- let redata = []
385
- req.data.forEach((row) => {
386
- redata.push({
387
- label: row.f_residential_area,
388
- value: row.id,
389
- data: row,
390
- id: row.id
391
- })
392
- })
393
- this.areaslist = redata
394
- },
395
- //省/市/区变化
396
- async pcdChange(val) {
397
- console.log(`省/市/区变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
398
- if (val) {
399
- //那就把[小区,街道]重新组织一下
400
- await this.initstreets(` f_filialeid = '${Vue.user.orgid}' and f_pcd_id ='${val}' `)
401
- if (this.addressData.f_street_id) {
402
- if (this.findbyid(this.streetslist, this.addressData.f_street_id)) {
403
- let pcd_id = this.findbyid(this.streetslist, this.addressData.f_street_id).f_pcd_id
404
- if (pcd_id != val) {
405
- this.addressData.f_street_id = ''
406
- }
407
- } else {
408
- this.addressData.f_street_id = ''
409
- }
410
-
411
- //那就把[小区,街道]重新组织一下
412
- if (this.addressData.f_street_id) {
413
- await this.initareas(` f_street_id ='${this.addressData.f_street_id}' `)
414
- if (this.addressData.f_residential_area_id) {
415
- if (this.findbyid(this.areaslist, this.addressData.f_residential_area_id)) {
416
- let pcd_id = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_pcd_id
417
- if (pcd_id != val) {
418
- this.addressData.f_residential_area_id = ''
419
- }
420
- } else {
421
- this.addressData.f_residential_area_id = ''
422
- }
423
-
424
- }
425
- }
426
- }
427
- }
428
- this.$resetValidation()
429
- },
430
- //小区变化
431
- areaChange(val) {
432
- console.log(`小区变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
433
- if (val) {
434
- let getArea = this.areaslist.filter((res) => {
435
- return res.id = this.addressData.f_residential_area_id
436
- })
437
- if (getArea.length > 0) {
438
- console.log('获取小区数据', getArea[0].data)
439
- this.addressData.slice_area = [{name: getArea[0].data.f_slice_area, code: getArea[0].data.f_area_code}]
440
- }
441
- }
442
- this.$resetValidation()
443
- },
444
- //街道变化
445
- async streetChange(val) {
446
- console.log(`街道变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
447
- if (this.streetslist[0]) {
448
- var street = ''
449
- this.streetslist.forEach((item) => {
450
- if (item.id === val) {
451
- street = item.label
452
- }
453
- })
454
- this.addressData.f_address = street
455
- }
456
- if (val) {
457
- //那就把[小区]重新组织一下
458
- await this.initareas(` f_street_id ='${val}' `)
459
- if (this.addressData.f_residential_area_id) {
460
- if (this.findbyid(this.areaslist, this.addressData.f_residential_area_id)) {
461
- let street_id = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_street_id
462
- if (street_id != val) {
463
- this.addressData.f_residential_area_id = ''
464
- }
465
- } else {
466
- this.addressData.f_residential_area_id = ''
467
- }
468
-
469
- }
470
- }
471
- this.$resetValidation()
472
- },
473
- //根据名字找数据
474
- findbyid(list, name) {
475
- let result
476
- list.forEach((row, n) => {
477
- if (name == row.value) {
478
- result = row.data
479
- }
480
- })
481
- return result
482
- },
483
- async createAddress() {
484
- if (this.addressData.slice_area) {
485
- if (this.addressData.slice_area.length > 0) {
486
- this.addressData.f_slice_area = this.addressData.slice_area[0].name
487
- this.addressData.f_area_code = this.addressData.slice_area[0].code
488
- }
489
- }
490
- this.addressData.f_pcd = this.findbyid(this.pcdslist, this.addressData.f_pcd_id).f_pcd
491
- this.addressData.f_street = this.findbyid(this.streetslist, this.addressData.f_street_id).f_street
492
- this.addressData.f_residential_area = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_residential_area
493
- this.addressData.f_address = this.addressData.f_street + this.addressData.f_residential_area + (this.addressData.f_building ? this.addressData.f_building + this.addressData.f_building_suffix : '') + (this.addressData.f_unit ? this.addressData.f_unit + this.addressData.f_unit_suffix : '') + (this.addressData.f_floor ? this.addressData.f_floor + this.addressData.f_floor_suffix : '') + this.addressData.f_room + this.addressData.f_room_suffix
494
- console.log("调用创建地址接口参数 ==> " + JSON.stringify(this.addressData))
495
- let http = new HttpResetClass()
496
- return await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/address_updateuseraddress`, this.addressData)
497
- },
498
- async createUserData() {
499
- let http = new HttpResetClass()
500
- return await http.load('POST',
501
- `${this.$androidUtil.getProxyUrl()}/rs/logic/sale_userSave`,
502
- this.userdata
503
- )
504
- },
505
- async summit() {
506
- this.isBusy = true
507
- try {
508
- // 先创建地址信息
509
- console.log('创建地址')
510
- let response = await this.createAddress()
511
- console.log('createAddressResponse ===> ' + JSON.stringify(response))
512
- this.userdata.address.id = response.data.id
513
- } catch (e) {
514
- console.log('e ===> ' + JSON.stringify(e))
515
- // 如果地址已存在,使用存在的地址建档
516
- if (e.status && e.status == 635) {
517
- console.log('地址已存在,获取已存在地址id')
518
- let http = new HttpResetClass()
519
- let data = {
520
- data: {
521
- items: 'id',
522
- tablename: 't_user_address',
523
- condition: `f_address = '${this.addressData.f_address}'`
524
- }
525
- }
526
- let response = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/querySingleTable`, data)
527
- console.log('searchAddressResponse ===> ' + JSON.stringify(response))
528
- if (response.data && response.data.length > 0) {
529
- this.userdata.address.id = response.data[0].id
530
- }
531
- } else {
532
- this.$showMessage('错误:' + JSON.stringify(e))
533
- this.isBusy = false
534
- return
535
- }
536
- }
537
- try {
538
- // 再建立档案
539
- console.log('创建档案')
540
- let response = await this.createUserData()
541
- console.log('createUserDataResponse ===> ' + JSON.stringify(response))
542
- if (response.data.status == 200) {
543
- this.$showMessage('档案创建成功!')
544
- } else {
545
- this.$showMessage('档案创建失败!' + JSON.stringify(response.data))
546
- }
547
- // 上传成功,重新初始化数据
548
- Object.assign(this.$data, this.$options.data())
549
- await this.initpcds(` f_filialeid = '${Vue.user.orgid}'`)
550
- await this.initAreas(Vue.user.orgid)
551
- } catch (e) {
552
- console.log('e ===> ' + JSON.stringify(e))
553
- this.$showMessage('错误:' + JSON.stringify(e))
554
- }
555
- this.isBusy = false
556
- },
557
- },
558
- watch: {
559
- 'userdata.userinfo.userfiles.f_meternumber': async function (newVal, oldVal) {
560
- console.log('newVal ===> ' + JSON.stringify(newVal))
561
- console.log('oldVal ===> ' + JSON.stringify(oldVal))
562
- // let response = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/xxxxxx`, {})
563
- },
564
- 'userdata.userinfo.f_idnumber'(val){
565
- if(val){
566
- if (!(/^[1-9][0-9]{5}([1][9][0-9]{2}|[2][0][0|1][0-9])([0][1-9]|[1][0|1|2])([0][1-9]|[1|2][0-9]|[3][0|1])[0-9]{3}([0-9]|[X])$/.test(val))) {
567
- // this.$showAlert('输入的身份证号长度不对,或者号码不符合规定!\n15位号码应全为数字,18位号码末位可以为数字或X。')
568
- this.isNotIdNumber = true
569
- }else{
570
- this.isNotIdNumber = false
571
- }
572
- }else{
573
- this.isNotIdNumber = false
574
- }
575
- }
576
- }
577
- }
578
- </script>
579
-
580
- <style scoped>
581
-
1
+ <template>
2
+ <div>
3
+ <!--表具信息-->
4
+ <validator name='v' :data.sync="data">
5
+ <div class="auto select-overspread form-horizontal repair-bg">
6
+ <div class="bq-parent">
7
+ <blockquote class="blockquote">
8
+ <p>表具信息</p>
9
+ </blockquote>
10
+ </div>
11
+ <div class="panel panel-default auto repair-info-content">
12
+ <div class="panel-body auto repair-info-content compatible">
13
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_meternumber.required ? 'has-error' : 'has-success']">
14
+ <label for="f_meternumber" class="lb-left text-justify">表号</label>
15
+ <input id="f_meternumber" v-model="userdata.userinfo.userfiles.f_meternumber" v-validate:f_meternumber="{required: true}" type="text" class="form-control"/>
16
+ <button type="button" name="button" class="btn btn-primary" @click="scan">扫码</button>
17
+ </div>
18
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_meter_brand.required ? 'has-error' : 'has-success']">
19
+ <label for="f_meter_brand" class="lb-left text-justify">气表品牌</label>
20
+ <input id="f_meter_brand" v-model="userdata.userinfo.userfiles.f_meter_brand" v-validate:f_meter_brand="{required: true}" type="text" class="form-control">
21
+ </div>
22
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_meter_style.required ? 'has-error' : 'has-success']">
23
+ <label for="f_meter_style" class="lb-left text-justify">气表型号</label>
24
+ <input id="f_meter_style" v-model="userdata.userinfo.userfiles.f_meter_style" v-validate:f_meter_style="{required: true}" type="text" class="form-control">
25
+ </div>
26
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_meter_type.required ? 'has-error' : 'has-success']">
27
+ <label for="f_meter_type" class="lb-left text-justify">气表类型</label>
28
+ <input id="f_meter_type" v-model="userdata.userinfo.userfiles.f_meter_type" v-validate:f_meter_type="{required: true}" type="text" class="form-control">
29
+ </div>
30
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_aroundmeter.required ? 'has-error' : 'has-success']">
31
+ <label for="f_aroundmeter" class="lb-left text-justify">进气方向</label>
32
+ <input type="text"
33
+ v-show="false"
34
+ v-model="userdata.userinfo.userfiles.f_aroundmeter"
35
+ v-validate:f_aroundmeter='{required: true}'>
36
+ <v-select id="f_aroundmeter"
37
+ :value.sync="userdata.userinfo.userfiles.f_aroundmeter"
38
+ :value-single="true"
39
+ :options='aroundmeterlist'
40
+ placeholder='请选择'
41
+ close-on-select>
42
+ </v-select>
43
+ </div>
44
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_initial_base.required ? 'has-error' : 'has-success']">
45
+ <label for="f_initial_base" class="lb-left text-justify">表基数</label>
46
+ <input id="f_initial_base" v-model="userdata.userinfo.userfiles.f_initial_base" v-validate:f_initial_base="{required: true}" type="number" class="form-control">
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ <div class="bq-parent">
52
+ <blockquote class="blockquote">
53
+ <input class="magic-checkbox" type="checkbox" id="isStay" v-model="isStay"/>
54
+ <label for="isStay" style="width:150px;padding-bottom: 10px">用户是否入住</label>
55
+ </blockquote>
56
+ </div>
57
+ <!--用户信息-->
58
+ <div class="auto select-overspread form-horizontal repair-bg" v-show="isStay">
59
+ <div class="bq-parent">
60
+ <blockquote class="blockquote">
61
+ <p>用户信息</p>
62
+ </blockquote>
63
+ </div>
64
+ <div class="panel panel-default auto repair-info-content">
65
+ <div class="panel-body auto repair-info-content compatible">
66
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
67
+ <label for="f_user_name" class="lb-left text-justify">用户姓名</label>
68
+ <input id="f_user_name" v-model="userdata.userinfo.f_user_name" type="text" class="form-control"/>
69
+ </div>
70
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
71
+ <label for="f_idnumber" class="lb-left text-justify">身份证号</label>
72
+ <input id="f_idnumber" v-model="userdata.userinfo.f_idnumber" type="text" class="form-control">
73
+ </div>
74
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" v-show="isNotIdNumber">
75
+ <span style="font-size:10px;color: red">输入的身份证号长度不对,或者号码不符合规定!</span>
76
+ </div>
77
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
78
+ <label for="f_user_phone" class="lb-left text-justify">用户电话</label>
79
+ <input id="f_user_phone" v-model="userdata.userinfo.f_user_phone" type="text" class="form-control">
80
+ </div>
81
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
82
+ <label for="f_price_name" class="lb-left text-justify">住户类型</label>
83
+ <v-select id="f_price_name"
84
+ :value.sync="userdata.userinfo.f_price_name"
85
+ :value-single="true"
86
+ :options='houseTypeOptions'
87
+ placeholder='请选择'
88
+ close-on-select>
89
+ </v-select>
90
+ </div>
91
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
92
+ <label for="f_comments" class="lb-left text-justify">备注</label>
93
+ <textarea id="f_comments" class="form-control" cols="30" rows="4" style="resize: vertical;" v-model="userdata.userinfo.f_comments"></textarea>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ <!--地址信息-->
99
+ <div class="auto select-overspread form-horizontal repair-bg">
100
+ <div class="bq-parent">
101
+ <blockquote class="blockquote">
102
+ <p>地址信息</p>
103
+ </blockquote>
104
+ </div>
105
+ <div class="panel panel-default auto repair-info-content">
106
+ <div class="panel-body auto repair-info-content compatible">
107
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
108
+ <label for="f_pcd_id" class="lb-left text-justify">省市区</label>
109
+ <input type="text"
110
+ v-show="false"
111
+ v-model="addressData.f_pcd_id"
112
+ v-validate:f_pcd_id='{required: true}'>
113
+ <v-select id="f_pcd_id"
114
+ :value.sync="addressData.f_pcd_id"
115
+ :value-single="true"
116
+ :options='pcdslist'
117
+ placeholder='请选择'
118
+ close-on-select
119
+ search="true"
120
+ @change="pcdChange">
121
+ </v-select>
122
+ </div>
123
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
124
+ <label for="f_street_id" class="lb-left text-justify">街道名称</label>
125
+ <input type="text"
126
+ v-show="false"
127
+ v-model="addressData.f_street_id"
128
+ v-validate:f_street_id='{required: true}'>
129
+ <v-select id="f_street_id"
130
+ :value.sync="addressData.f_street_id"
131
+ :value-single="true"
132
+ :options='streetslist'
133
+ placeholder='请选择'
134
+ close-on-select
135
+ search="true"
136
+ @change="streetChange">
137
+ </v-select>
138
+ </div>
139
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
140
+ <label for="f_residential_area_id" class="lb-left text-justify">小区名称</label>
141
+ <input type="text"
142
+ v-show="false"
143
+ v-model="addressData.f_residential_area_id"
144
+ v-validate:f_residential_area_id='{required: true}'>
145
+ <v-select id="f_residential_area_id"
146
+ :value.sync="addressData.f_residential_area_id"
147
+ :value-single="true"
148
+ :options='areaslist'
149
+ placeholder='请选择'
150
+ close-on-select
151
+ search="true"
152
+ @change="areaChange">
153
+ </v-select>
154
+ </div>
155
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.slice.required ? 'has-error' : 'has-success']">
156
+ <label for="f_meter_type" class="lb-left text-justify">片区</label>
157
+ <input type="text"
158
+ v-show="false"
159
+ v-model="$refs.slice.selectedItems"
160
+ v-validate:slice='{required: true}'>
161
+ <v-select id="slice_area"
162
+ :value.sync="addressData.slice_area"
163
+ :options='sliceArea'
164
+ placeholder='片区/管理站'
165
+ filer-key="name"
166
+ close-on-select
167
+ v-ref:slice>
168
+ </v-select>
169
+ </div>
170
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_building.required ? 'has-error' : 'has-success']">
171
+ <label for="f_building" class="lb-left text-justify">楼号</label>
172
+ <input id="f_building" v-model="addressData.f_building" v-validate:f_building='{required: true}' type="text" class="form-control" style="width: 70%">
173
+ <input id="f_building_suffix" v-model="addressData.f_building_suffix" type="text" class="form-control" style="width: 30%">
174
+ </div>
175
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_unit.required ? 'has-error' : 'has-success']">
176
+ <label for="f_unit" class="lb-left text-justify">单元</label>
177
+ <input id="f_unit" v-model="addressData.f_unit" v-validate:f_unit='{required: true}' type="text" class="form-control" style="width: 70%">
178
+ <input id="f_unit_suffix" v-model="addressData.f_unit_suffix" type="text" class="form-control" style="width: 30%">
179
+ </div>
180
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_floor.required ? 'has-error' : 'has-success']">
181
+ <label for="f_floor" class="lb-left text-justify">楼层</label>
182
+ <input id="f_floor" v-model="addressData.f_floor" v-validate:f_floor='{required: true}' type="text" class="form-control" style="width: 70%">
183
+ <input id="f_floor_suffix" v-model="addressData.f_floor_suffix" type="text" class="form-control" style="width: 30%">
184
+ </div>
185
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" :class="[$v.f_room.required ? 'has-error' : 'has-success']">
186
+ <label for="f_room" class="lb-left text-justify">门牌号</label>
187
+ <input id="f_room" type="text" v-model="addressData.f_room" v-validate:f_room='{required: true}' class="form-control" style="width: 70%">
188
+ <input id="f_room_suffix" type="text" v-model="addressData.f_room_suffix" class="form-control" style="width: 30%">
189
+ </div>
190
+ </div>
191
+ </div>
192
+ </div>
193
+ </validator>
194
+ <!--提交-->
195
+ <div class="panel panel-default auto repair-info-content" style="width: 100%;height: auto">
196
+ <div style="margin: 0 auto;width: 25%">
197
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" :disabled='!$v.valid' @click='summit()'>
198
+ 上传档案
199
+ </button>
200
+ </div>
201
+ </div>
202
+ <work-busy :is-busy="isBusy"></work-busy>
203
+ </div>
204
+ </template>
205
+
206
+ <script>
207
+ import Vue from 'vue'
208
+ import {HttpResetClass} from 'vue-client'
209
+
210
+ export default {
211
+ title: "ApplyOnline",
212
+ data() {
213
+ return {
214
+ userdata: {
215
+ address: {
216
+ id: null
217
+ },
218
+ f_user_type: "民用",
219
+ userinfo: {
220
+ userfiles: {
221
+ f_meternumber: null,
222
+ f_meter_brand: null,
223
+ f_meter_style: null,
224
+ f_meter_type: null,
225
+ f_aroundmeter: null,
226
+ f_initial_base: null,
227
+ f_table_state: "待开通"
228
+ },
229
+ f_price_name: null,
230
+ f_rent_phone: null,
231
+ f_user_phone: null,
232
+ f_user_name: null,
233
+ f_idnumber: null,
234
+ f_comments: null
235
+ },
236
+ devices: [],
237
+ f_operator: Vue.user.ename
238
+ },
239
+ // 是否入住
240
+ isStay: false,
241
+ addressData: {
242
+ f_create_person: Vue.user.name,
243
+ f_filialeid: Vue.user.orgid,
244
+ f_operator: Vue.user.name,
245
+ f_operatorid: Vue.user.id,
246
+ f_orgid: Vue.user.orgid,
247
+ f_orgname: Vue.user.orgs,
248
+ f_depid: Vue.user.depids,
249
+ f_depname: Vue.user.deps,
250
+ f_pcd: null,
251
+ f_pcd_id: null,
252
+ f_street: null,
253
+ f_street_id: null,
254
+ f_residential_area: null,
255
+ f_residential_area_id: null,
256
+ f_address: null,
257
+ slice_area: null,
258
+ f_slice_area: null,
259
+ f_area_code: null,
260
+ f_building: null,
261
+ f_building_suffix: "号楼",
262
+ f_unit: null,
263
+ f_unit_suffix: "单元",
264
+ f_floor: null,
265
+ f_floor_suffix: "层",
266
+ f_room: null,
267
+ f_room_suffix: "室"
268
+ },
269
+ //初始化省市区数据
270
+ pcdslist: [],
271
+ //初始化街道数据
272
+ streetslist: [],
273
+ //初始化街道数据
274
+ areaslist: [],
275
+ sliceArea: [],
276
+ aroundmeterlist: [{label: '左表', value: '左表'}, {label: '右表', value: '右表'}],
277
+ houseTypeOptions: [{label: '自有房', value: '自有房'}, {label: '租赁房', value: '租赁房'}],
278
+ isNotIdNumber: false,
279
+ isBusy: false
280
+ }
281
+ },
282
+ async ready() {
283
+ console.log('进入在线报装页面www')
284
+ await this.initpcds(` f_filialeid = '${Vue.user.orgid}'`)
285
+ await this.initAreas(Vue.user.orgid)
286
+ console.log('pcdslist ===> ' + JSON.stringify(this.pcdslist))
287
+ console.log('sliceArea ===> ' + JSON.stringify(this.sliceArea))
288
+ },
289
+ methods: {
290
+ scan() {
291
+ HostApp.__this__ = this
292
+ HostApp.scanCode({callback: "javascript:HostApp.__this__.scanCallback();"})
293
+ },
294
+ scanCallback() {
295
+ let response = HostApp.getCode()
296
+ console.log(`扫码返回值:${response}`)
297
+ if (response.code == 200) {
298
+ this.userdata.userinfo.userfiles.f_meternumber = response.data
299
+ } else {
300
+ this.$showMessage('无法识别该条形码,请调整手机聚焦重试。')
301
+ }
302
+ },
303
+ // 初始化片区
304
+ async initAreas(val) {
305
+ if (val) {
306
+ let http = new HttpResetClass()
307
+ let getAllArea = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {
308
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
309
+ userid: Vue.user.id
310
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
311
+
312
+ let arr = getAllArea.data.filter((res) => {
313
+ return res.parentid == val
314
+ })
315
+ console.log('过滤之后的片区:' + JSON.stringify(arr))
316
+ this.sliceArea = []
317
+ arr.forEach((res) => {
318
+ this.sliceArea.push({label: res.name, value: {name: res.name, code: res.number}})
319
+ })
320
+ }
321
+ },
322
+
323
+ //初始化省市区,添加街道
324
+ async initpcds(pconditon) {
325
+ this.pcdslist = []
326
+ let HttpReset = new HttpResetClass()
327
+ let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
328
+ data: {
329
+ items: '*',
330
+ tablename: 't_pcd',
331
+ orderitem: 'id',
332
+ condition: pconditon
333
+ }
334
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
335
+ let redata = []
336
+ req.data.forEach((row, n) => {
337
+ redata[n] = {
338
+ label: row.f_pcd,
339
+ value: row.id,
340
+ data: row,
341
+ id: row.id
342
+ }
343
+ })
344
+ this.pcdslist = redata
345
+ },
346
+ //初始化街道 添加小区
347
+ async initstreets(pconditon) {
348
+ this.streetslist = []
349
+ let HttpReset = new HttpResetClass()
350
+ let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
351
+ data: {
352
+ items: '*',
353
+ tablename: 't_street',
354
+ orderitem: 'id',
355
+ condition: pconditon
356
+ }
357
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
358
+ let redata = []
359
+ req.data.forEach((row, n) => {
360
+ redata[n] = {
361
+ label: row.f_street,
362
+ value: row.id,
363
+ data: row,
364
+ id: row.id
365
+ }
366
+ })
367
+ this.streetslist = redata
368
+ },
369
+ //初始化小区添加小区
370
+ async initareas(pconditon) {
371
+ if (this.usertype) {
372
+ pconditon = pconditon + ` and f_special='1' `
373
+ }
374
+ this.areaslist = []
375
+ let HttpReset = new HttpResetClass()
376
+ let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
377
+ data: {
378
+ items: '*',
379
+ tablename: 't_area',
380
+ orderitem: 'id',
381
+ condition: pconditon
382
+ }
383
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
384
+ let redata = []
385
+ req.data.forEach((row) => {
386
+ redata.push({
387
+ label: row.f_residential_area,
388
+ value: row.id,
389
+ data: row,
390
+ id: row.id
391
+ })
392
+ })
393
+ this.areaslist = redata
394
+ },
395
+ //省/市/区变化
396
+ async pcdChange(val) {
397
+ console.log(`省/市/区变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
398
+ if (val) {
399
+ //那就把[小区,街道]重新组织一下
400
+ await this.initstreets(` f_filialeid = '${Vue.user.orgid}' and f_pcd_id ='${val}' `)
401
+ if (this.addressData.f_street_id) {
402
+ if (this.findbyid(this.streetslist, this.addressData.f_street_id)) {
403
+ let pcd_id = this.findbyid(this.streetslist, this.addressData.f_street_id).f_pcd_id
404
+ if (pcd_id != val) {
405
+ this.addressData.f_street_id = ''
406
+ }
407
+ } else {
408
+ this.addressData.f_street_id = ''
409
+ }
410
+
411
+ //那就把[小区,街道]重新组织一下
412
+ if (this.addressData.f_street_id) {
413
+ await this.initareas(` f_street_id ='${this.addressData.f_street_id}' `)
414
+ if (this.addressData.f_residential_area_id) {
415
+ if (this.findbyid(this.areaslist, this.addressData.f_residential_area_id)) {
416
+ let pcd_id = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_pcd_id
417
+ if (pcd_id != val) {
418
+ this.addressData.f_residential_area_id = ''
419
+ }
420
+ } else {
421
+ this.addressData.f_residential_area_id = ''
422
+ }
423
+
424
+ }
425
+ }
426
+ }
427
+ }
428
+ this.$resetValidation()
429
+ },
430
+ //小区变化
431
+ areaChange(val) {
432
+ console.log(`小区变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
433
+ if (val) {
434
+ let getArea = this.areaslist.filter((res) => {
435
+ return res.id = this.addressData.f_residential_area_id
436
+ })
437
+ if (getArea.length > 0) {
438
+ console.log('获取小区数据', getArea[0].data)
439
+ this.addressData.slice_area = [{name: getArea[0].data.f_slice_area, code: getArea[0].data.f_area_code}]
440
+ }
441
+ }
442
+ this.$resetValidation()
443
+ },
444
+ //街道变化
445
+ async streetChange(val) {
446
+ console.log(`街道变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
447
+ if (this.streetslist[0]) {
448
+ var street = ''
449
+ this.streetslist.forEach((item) => {
450
+ if (item.id === val) {
451
+ street = item.label
452
+ }
453
+ })
454
+ this.addressData.f_address = street
455
+ }
456
+ if (val) {
457
+ //那就把[小区]重新组织一下
458
+ await this.initareas(` f_street_id ='${val}' `)
459
+ if (this.addressData.f_residential_area_id) {
460
+ if (this.findbyid(this.areaslist, this.addressData.f_residential_area_id)) {
461
+ let street_id = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_street_id
462
+ if (street_id != val) {
463
+ this.addressData.f_residential_area_id = ''
464
+ }
465
+ } else {
466
+ this.addressData.f_residential_area_id = ''
467
+ }
468
+
469
+ }
470
+ }
471
+ this.$resetValidation()
472
+ },
473
+ //根据名字找数据
474
+ findbyid(list, name) {
475
+ let result
476
+ list.forEach((row, n) => {
477
+ if (name == row.value) {
478
+ result = row.data
479
+ }
480
+ })
481
+ return result
482
+ },
483
+ async createAddress() {
484
+ if (this.addressData.slice_area) {
485
+ if (this.addressData.slice_area.length > 0) {
486
+ this.addressData.f_slice_area = this.addressData.slice_area[0].name
487
+ this.addressData.f_area_code = this.addressData.slice_area[0].code
488
+ }
489
+ }
490
+ this.addressData.f_pcd = this.findbyid(this.pcdslist, this.addressData.f_pcd_id).f_pcd
491
+ this.addressData.f_street = this.findbyid(this.streetslist, this.addressData.f_street_id).f_street
492
+ this.addressData.f_residential_area = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_residential_area
493
+ this.addressData.f_address = this.addressData.f_street + this.addressData.f_residential_area + (this.addressData.f_building ? this.addressData.f_building + this.addressData.f_building_suffix : '') + (this.addressData.f_unit ? this.addressData.f_unit + this.addressData.f_unit_suffix : '') + (this.addressData.f_floor ? this.addressData.f_floor + this.addressData.f_floor_suffix : '') + this.addressData.f_room + this.addressData.f_room_suffix
494
+ console.log("调用创建地址接口参数 ==> " + JSON.stringify(this.addressData))
495
+ let http = new HttpResetClass()
496
+ return await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/address_updateuseraddress`, this.addressData)
497
+ },
498
+ async createUserData() {
499
+ let http = new HttpResetClass()
500
+ return await http.load('POST',
501
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/sale_userSave`,
502
+ this.userdata
503
+ )
504
+ },
505
+ async summit() {
506
+ this.isBusy = true
507
+ try {
508
+ // 先创建地址信息
509
+ console.log('创建地址')
510
+ let response = await this.createAddress()
511
+ console.log('createAddressResponse ===> ' + JSON.stringify(response))
512
+ this.userdata.address.id = response.data.id
513
+ } catch (e) {
514
+ console.log('e ===> ' + JSON.stringify(e))
515
+ // 如果地址已存在,使用存在的地址建档
516
+ if (e.status && e.status == 635) {
517
+ console.log('地址已存在,获取已存在地址id')
518
+ let http = new HttpResetClass()
519
+ let data = {
520
+ data: {
521
+ items: 'id',
522
+ tablename: 't_user_address',
523
+ condition: `f_address = '${this.addressData.f_address}'`
524
+ }
525
+ }
526
+ let response = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/querySingleTable`, data)
527
+ console.log('searchAddressResponse ===> ' + JSON.stringify(response))
528
+ if (response.data && response.data.length > 0) {
529
+ this.userdata.address.id = response.data[0].id
530
+ }
531
+ } else {
532
+ this.$showMessage('错误:' + JSON.stringify(e))
533
+ this.isBusy = false
534
+ return
535
+ }
536
+ }
537
+ try {
538
+ // 再建立档案
539
+ console.log('创建档案')
540
+ let response = await this.createUserData()
541
+ console.log('createUserDataResponse ===> ' + JSON.stringify(response))
542
+ if (response.data.status == 200) {
543
+ this.$showMessage('档案创建成功!')
544
+ } else {
545
+ this.$showMessage('档案创建失败!' + JSON.stringify(response.data))
546
+ }
547
+ // 上传成功,重新初始化数据
548
+ Object.assign(this.$data, this.$options.data())
549
+ await this.initpcds(` f_filialeid = '${Vue.user.orgid}'`)
550
+ await this.initAreas(Vue.user.orgid)
551
+ } catch (e) {
552
+ console.log('e ===> ' + JSON.stringify(e))
553
+ this.$showMessage('错误:' + JSON.stringify(e))
554
+ }
555
+ this.isBusy = false
556
+ },
557
+ },
558
+ watch: {
559
+ 'userdata.userinfo.userfiles.f_meternumber': async function (newVal, oldVal) {
560
+ console.log('newVal ===> ' + JSON.stringify(newVal))
561
+ console.log('oldVal ===> ' + JSON.stringify(oldVal))
562
+ // let response = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/xxxxxx`, {})
563
+ },
564
+ 'userdata.userinfo.f_idnumber'(val){
565
+ if(val){
566
+ if (!(/^[1-9][0-9]{5}([1][9][0-9]{2}|[2][0][0|1][0-9])([0][1-9]|[1][0|1|2])([0][1-9]|[1|2][0-9]|[3][0|1])[0-9]{3}([0-9]|[X])$/.test(val))) {
567
+ // this.$showAlert('输入的身份证号长度不对,或者号码不符合规定!\n15位号码应全为数字,18位号码末位可以为数字或X。')
568
+ this.isNotIdNumber = true
569
+ }else{
570
+ this.isNotIdNumber = false
571
+ }
572
+ }else{
573
+ this.isNotIdNumber = false
574
+ }
575
+ }
576
+ }
577
+ }
578
+ </script>
579
+
580
+ <style scoped>
581
+
582
582
  </style>