system-phone 3.0.49 → 3.1.0

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 +732 -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 +91 -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,601 +1,601 @@
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_filiale: Vue.user.f_fengongsi,
246
- f_outlets: Vue.user.f_parentname,
247
- f_orgstr: Vue.user.orgpathstr,
248
- f_filialeids: Vue.user.f_orgids,
249
- f_operatorid: Vue.user.id,
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
- f_company: "",
269
- f_company_address: "",
270
- f_create_date: ''
271
- },
272
- //初始化省市区数据
273
- pcdslist: [],
274
- //初始化街道数据
275
- streetslist: [],
276
- //初始化街道数据
277
- areaslist: [],
278
- sliceArea: [],
279
- aroundmeterlist: [{label: '左表', value: '左表'}, {label: '右表', value: '右表'}],
280
- houseTypeOptions: [{label: '自有房', value: '自有房'}, {label: '租赁房', value: '租赁房'}],
281
- isNotIdNumber: false,
282
- isBusy: false
283
- }
284
- },
285
- async ready() {
286
- console.log('进入在线报装页面www')
287
- console.log('Vue.user ===> ' + JSON.stringify(Vue.user))
288
- await this.initpcds(` f_filialeids = '${Vue.user.f_orgids}'`)
289
- await this.initAreas(Vue.user.orgid)
290
- console.log('pcdslist ===> ' + JSON.stringify(this.pcdslist))
291
- console.log('sliceArea ===> ' + JSON.stringify(this.sliceArea))
292
- },
293
- methods: {
294
- scan() {
295
- HostApp.__this__ = this
296
- HostApp.scanCode({callback: "javascript:HostApp.__this__.scanCallback();"})
297
- },
298
- scanCallback() {
299
- let response = HostApp.getCode()
300
- console.log(`扫码返回值:${response}`)
301
- if (response.code == 200) {
302
- this.userdata.userinfo.userfiles.f_meternumber = response.data
303
- } else {
304
- this.$showMessage('无法识别该条形码,请调整手机聚焦重试。')
305
- }
306
- },
307
- // 初始化片区
308
- async initAreas(val) {
309
- let http = new HttpResetClass()
310
- let getAllArea = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {
311
- source: 'this.getParentByType($organization$).getChildByName($区$).getChildren()',
312
- userid: Vue.user.id
313
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
314
-
315
- // let arr = getAllArea.data.filter((res) => {
316
- // return res.parentid == val
317
- // })
318
- let arr = getAllArea.data.filter((res) => {
319
- return true
320
- })
321
- console.log('过滤之后的片区:' + JSON.stringify(arr))
322
- this.sliceArea = []
323
- arr.forEach((res) => {
324
- this.sliceArea.push({label: res.name, value: {name: res.name, code: res.number}})
325
- })
326
- },
327
-
328
- //初始化省市区,添加街道
329
- async initpcds(pconditon) {
330
- this.pcdslist = []
331
- let HttpReset = new HttpResetClass()
332
- let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
333
- data: {
334
- items: '*',
335
- tablename: 't_pcd',
336
- orderitem: 'id',
337
- condition: pconditon
338
- }
339
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
340
- let redata = []
341
- req.data.forEach((row, n) => {
342
- redata[n] = {
343
- label: row.f_pcd,
344
- value: row.id,
345
- data: row,
346
- id: row.id
347
- }
348
- })
349
- this.pcdslist = redata
350
- },
351
- //初始化街道 添加小区
352
- async initstreets(pconditon) {
353
- this.streetslist = []
354
- let HttpReset = new HttpResetClass()
355
- let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
356
- data: {
357
- items: '*',
358
- tablename: 't_street',
359
- orderitem: 'id',
360
- condition: pconditon
361
- }
362
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
363
- let redata = []
364
- req.data.forEach((row, n) => {
365
- redata[n] = {
366
- label: row.f_street,
367
- value: row.id,
368
- data: row,
369
- id: row.id
370
- }
371
- })
372
- this.streetslist = redata
373
- },
374
- //初始化小区添加小区
375
- async initareas(pconditon) {
376
- if (this.usertype) {
377
- pconditon = pconditon + ` and f_special='1' `
378
- }
379
- this.areaslist = []
380
- let HttpReset = new HttpResetClass()
381
- let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
382
- data: {
383
- items: '*',
384
- tablename: 't_area',
385
- orderitem: 'id',
386
- condition: pconditon
387
- }
388
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
389
- let redata = []
390
- req.data.forEach((row) => {
391
- redata.push({
392
- label: row.f_residential_area,
393
- value: row.id,
394
- data: row,
395
- id: row.id
396
- })
397
- })
398
- this.areaslist = redata
399
- },
400
- //省/市/区变化
401
- async pcdChange(val) {
402
- console.log(`省/市/区变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
403
- if (val) {
404
- //那就把[小区,街道]重新组织一下
405
- await this.initstreets(` f_filialeids = '${Vue.user.f_orgids}' and f_pcd_id ='${val}' `)
406
- if (this.addressData.f_street_id) {
407
- if (this.findbyid(this.streetslist, this.addressData.f_street_id)) {
408
- let pcd_id = this.findbyid(this.streetslist, this.addressData.f_street_id).f_pcd_id
409
- if (pcd_id != val) {
410
- this.addressData.f_street_id = ''
411
- }
412
- } else {
413
- this.addressData.f_street_id = ''
414
- }
415
-
416
- //那就把[小区,街道]重新组织一下
417
- if (this.addressData.f_street_id) {
418
- await this.initareas(` f_street_id ='${this.addressData.f_street_id}' `)
419
- if (this.addressData.f_residential_area_id) {
420
- if (this.findbyid(this.areaslist, this.addressData.f_residential_area_id)) {
421
- let pcd_id = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_pcd_id
422
- if (pcd_id != val) {
423
- this.addressData.f_residential_area_id = ''
424
- }
425
- } else {
426
- this.addressData.f_residential_area_id = ''
427
- }
428
-
429
- }
430
- }
431
- }
432
- }
433
- this.$resetValidation()
434
- },
435
- //小区变化
436
- areaChange(val) {
437
- console.log(`小区变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
438
- if (val) {
439
- let getArea = this.areaslist.filter((res) => {
440
- return res.id = this.addressData.f_residential_area_id
441
- })
442
- if (getArea.length > 0) {
443
- console.log('获取小区数据', getArea[0].data)
444
- this.addressData.slice_area = [{name: getArea[0].data.f_slice_area, code: getArea[0].data.f_area_code}]
445
- }
446
- }
447
- this.$resetValidation()
448
- },
449
- //街道变化
450
- async streetChange(val) {
451
- console.log(`街道变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
452
- if (this.streetslist[0]) {
453
- var street = ''
454
- this.streetslist.forEach((item) => {
455
- if (item.id === val) {
456
- street = item.label
457
- }
458
- })
459
- this.addressData.f_address = street
460
- }
461
- if (val) {
462
- //那就把[小区]重新组织一下
463
- await this.initareas(` f_street_id ='${val}' `)
464
- if (this.addressData.f_residential_area_id) {
465
- if (this.findbyid(this.areaslist, this.addressData.f_residential_area_id)) {
466
- let street_id = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_street_id
467
- if (street_id != val) {
468
- this.addressData.f_residential_area_id = ''
469
- }
470
- } else {
471
- this.addressData.f_residential_area_id = ''
472
- }
473
-
474
- }
475
- }
476
- this.$resetValidation()
477
- },
478
- //根据名字找数据
479
- findbyid(list, name) {
480
- let result
481
- list.forEach((row, n) => {
482
- if (name == row.value) {
483
- result = row.data
484
- }
485
- })
486
- return result
487
- },
488
- getNowDate() {
489
- let now = new Date()
490
- let dateStr = ''
491
- dateStr += now.getFullYear()
492
- dateStr += '-' + (now.getMonth() + 1)
493
- dateStr += '-' + now.getDate()
494
- dateStr += ' ' + now.getHours()
495
- dateStr += ':' + now.getMinutes()
496
- dateStr += ':' + now.getSeconds()
497
- dateStr += '.' + now.getMilliseconds()
498
- return dateStr
499
- },
500
- async createAddress() {
501
- if (this.addressData.slice_area) {
502
- if (this.addressData.slice_area.length > 0) {
503
- this.addressData.f_slice_area = this.addressData.slice_area[0].name
504
- this.addressData.f_area_code = this.addressData.slice_area[0].code
505
- }
506
- }
507
- this.addressData.f_pcd = this.findbyid(this.pcdslist, this.addressData.f_pcd_id).f_pcd
508
- this.addressData.f_street = this.findbyid(this.streetslist, this.addressData.f_street_id).f_street
509
- this.addressData.f_residential_area = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_residential_area
510
- 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
511
- this.addressData.f_create_date = this.getNowDate()
512
- console.log("调用创建地址接口参数 ==> " + JSON.stringify(this.addressData))
513
- let http = new HttpResetClass()
514
- return await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/address_updateuseraddress`, this.addressData)
515
- },
516
- async createUserData() {
517
- let http = new HttpResetClass()
518
- return await http.load('POST',
519
- `${this.$androidUtil.getProxyUrl()}/rs/logic/sale_simple_userSave`,
520
- this.userdata
521
- )
522
- },
523
- async summit() {
524
- this.isBusy = true
525
- try {
526
- // 先创建地址信息
527
- console.log('创建地址')
528
- let response = await this.createAddress()
529
- console.log('createAddressResponse ===> ' + JSON.stringify(response))
530
- this.userdata.address.id = response.data.id
531
- } catch (e) {
532
- console.log('e ===> ' + JSON.stringify(e))
533
- // 如果地址已存在,使用存在的地址建档
534
- if (e.status && e.status == 635) {
535
- console.log('地址已存在,获取已存在地址id')
536
- let http = new HttpResetClass()
537
- let data = {
538
- data: {
539
- items: 'id',
540
- tablename: 't_user_address',
541
- condition: `f_address = '${this.addressData.f_address}'`
542
- }
543
- }
544
- let response = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/querySingleTable`, data)
545
- console.log('searchAddressResponse ===> ' + JSON.stringify(response))
546
- if (response.data && response.data.length > 0) {
547
- this.userdata.address.id = response.data[0].id
548
- }
549
- } else {
550
- this.$showMessage('错误:' + JSON.stringify(e))
551
- this.isBusy = false
552
- return
553
- }
554
- }
555
- try {
556
- // 再建立档案
557
- console.log('创建档案')
558
- let response = await this.createUserData()
559
- console.log('createUserDataResponse ===> ' + JSON.stringify(response))
560
- if (response.data.status == 200) {
561
- this.$showMessage('档案创建成功!')
562
- } else {
563
- this.$showMessage('档案创建失败!' + JSON.stringify(response.data))
564
- }
565
- console.log('创建成功f_userinfo_id ===> ' + JSON.stringify(response.data.f_userinfo_id))
566
- // 上传成功,重新初始化数据
567
- Object.assign(this.$data, this.$options.data())
568
- await this.initpcds(` f_filialeids = '${Vue.user.f_orgids}'`)
569
- await this.initAreas(Vue.user.orgid)
570
- } catch (e) {
571
- console.log('e ===> ' + JSON.stringify(e))
572
- this.$showMessage('错误:' + JSON.stringify(e))
573
- }
574
- this.isBusy = false
575
- },
576
- },
577
- watch: {
578
- 'userdata.userinfo.userfiles.f_meternumber': async function (newVal, oldVal) {
579
- console.log('newVal ===> ' + JSON.stringify(newVal))
580
- console.log('oldVal ===> ' + JSON.stringify(oldVal))
581
- // let response = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/xxxxxx`, {})
582
- },
583
- 'userdata.userinfo.f_idnumber'(val) {
584
- if (val) {
585
- 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))) {
586
- // this.$showAlert('输入的身份证号长度不对,或者号码不符合规定!\n15位号码应全为数字,18位号码末位可以为数字或X。')
587
- this.isNotIdNumber = true
588
- } else {
589
- this.isNotIdNumber = false
590
- }
591
- } else {
592
- this.isNotIdNumber = false
593
- }
594
- }
595
- }
596
- }
597
- </script>
598
-
599
- <style scoped>
600
-
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_filiale: Vue.user.f_fengongsi,
246
+ f_outlets: Vue.user.f_parentname,
247
+ f_orgstr: Vue.user.orgpathstr,
248
+ f_filialeids: Vue.user.f_orgids,
249
+ f_operatorid: Vue.user.id,
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
+ f_company: "",
269
+ f_company_address: "",
270
+ f_create_date: ''
271
+ },
272
+ //初始化省市区数据
273
+ pcdslist: [],
274
+ //初始化街道数据
275
+ streetslist: [],
276
+ //初始化街道数据
277
+ areaslist: [],
278
+ sliceArea: [],
279
+ aroundmeterlist: [{label: '左表', value: '左表'}, {label: '右表', value: '右表'}],
280
+ houseTypeOptions: [{label: '自有房', value: '自有房'}, {label: '租赁房', value: '租赁房'}],
281
+ isNotIdNumber: false,
282
+ isBusy: false
283
+ }
284
+ },
285
+ async ready() {
286
+ console.log('进入在线报装页面www')
287
+ console.log('Vue.user ===> ' + JSON.stringify(Vue.user))
288
+ await this.initpcds(` f_filialeids = '${Vue.user.f_orgids}'`)
289
+ await this.initAreas(Vue.user.orgid)
290
+ console.log('pcdslist ===> ' + JSON.stringify(this.pcdslist))
291
+ console.log('sliceArea ===> ' + JSON.stringify(this.sliceArea))
292
+ },
293
+ methods: {
294
+ scan() {
295
+ HostApp.__this__ = this
296
+ HostApp.scanCode({callback: "javascript:HostApp.__this__.scanCallback();"})
297
+ },
298
+ scanCallback() {
299
+ let response = HostApp.getCode()
300
+ console.log(`扫码返回值:${response}`)
301
+ if (response.code == 200) {
302
+ this.userdata.userinfo.userfiles.f_meternumber = response.data
303
+ } else {
304
+ this.$showMessage('无法识别该条形码,请调整手机聚焦重试。')
305
+ }
306
+ },
307
+ // 初始化片区
308
+ async initAreas(val) {
309
+ let http = new HttpResetClass()
310
+ let getAllArea = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {
311
+ source: 'this.getParentByType($organization$).getChildByName($区$).getChildren()',
312
+ userid: Vue.user.id
313
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
314
+
315
+ // let arr = getAllArea.data.filter((res) => {
316
+ // return res.parentid == val
317
+ // })
318
+ let arr = getAllArea.data.filter((res) => {
319
+ return true
320
+ })
321
+ console.log('过滤之后的片区:' + JSON.stringify(arr))
322
+ this.sliceArea = []
323
+ arr.forEach((res) => {
324
+ this.sliceArea.push({label: res.name, value: {name: res.name, code: res.number}})
325
+ })
326
+ },
327
+
328
+ //初始化省市区,添加街道
329
+ async initpcds(pconditon) {
330
+ this.pcdslist = []
331
+ let HttpReset = new HttpResetClass()
332
+ let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
333
+ data: {
334
+ items: '*',
335
+ tablename: 't_pcd',
336
+ orderitem: 'id',
337
+ condition: pconditon
338
+ }
339
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
340
+ let redata = []
341
+ req.data.forEach((row, n) => {
342
+ redata[n] = {
343
+ label: row.f_pcd,
344
+ value: row.id,
345
+ data: row,
346
+ id: row.id
347
+ }
348
+ })
349
+ this.pcdslist = redata
350
+ },
351
+ //初始化街道 添加小区
352
+ async initstreets(pconditon) {
353
+ this.streetslist = []
354
+ let HttpReset = new HttpResetClass()
355
+ let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
356
+ data: {
357
+ items: '*',
358
+ tablename: 't_street',
359
+ orderitem: 'id',
360
+ condition: pconditon
361
+ }
362
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
363
+ let redata = []
364
+ req.data.forEach((row, n) => {
365
+ redata[n] = {
366
+ label: row.f_street,
367
+ value: row.id,
368
+ data: row,
369
+ id: row.id
370
+ }
371
+ })
372
+ this.streetslist = redata
373
+ },
374
+ //初始化小区添加小区
375
+ async initareas(pconditon) {
376
+ if (this.usertype) {
377
+ pconditon = pconditon + ` and f_special='1' `
378
+ }
379
+ this.areaslist = []
380
+ let HttpReset = new HttpResetClass()
381
+ let req = await HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/address_singleTableOrderBy`, {
382
+ data: {
383
+ items: '*',
384
+ tablename: 't_area',
385
+ orderitem: 'id',
386
+ condition: pconditon
387
+ }
388
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
389
+ let redata = []
390
+ req.data.forEach((row) => {
391
+ redata.push({
392
+ label: row.f_residential_area,
393
+ value: row.id,
394
+ data: row,
395
+ id: row.id
396
+ })
397
+ })
398
+ this.areaslist = redata
399
+ },
400
+ //省/市/区变化
401
+ async pcdChange(val) {
402
+ console.log(`省/市/区变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
403
+ if (val) {
404
+ //那就把[小区,街道]重新组织一下
405
+ await this.initstreets(` f_filialeids = '${Vue.user.f_orgids}' and f_pcd_id ='${val}' `)
406
+ if (this.addressData.f_street_id) {
407
+ if (this.findbyid(this.streetslist, this.addressData.f_street_id)) {
408
+ let pcd_id = this.findbyid(this.streetslist, this.addressData.f_street_id).f_pcd_id
409
+ if (pcd_id != val) {
410
+ this.addressData.f_street_id = ''
411
+ }
412
+ } else {
413
+ this.addressData.f_street_id = ''
414
+ }
415
+
416
+ //那就把[小区,街道]重新组织一下
417
+ if (this.addressData.f_street_id) {
418
+ await this.initareas(` f_street_id ='${this.addressData.f_street_id}' `)
419
+ if (this.addressData.f_residential_area_id) {
420
+ if (this.findbyid(this.areaslist, this.addressData.f_residential_area_id)) {
421
+ let pcd_id = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_pcd_id
422
+ if (pcd_id != val) {
423
+ this.addressData.f_residential_area_id = ''
424
+ }
425
+ } else {
426
+ this.addressData.f_residential_area_id = ''
427
+ }
428
+
429
+ }
430
+ }
431
+ }
432
+ }
433
+ this.$resetValidation()
434
+ },
435
+ //小区变化
436
+ areaChange(val) {
437
+ console.log(`小区变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
438
+ if (val) {
439
+ let getArea = this.areaslist.filter((res) => {
440
+ return res.id = this.addressData.f_residential_area_id
441
+ })
442
+ if (getArea.length > 0) {
443
+ console.log('获取小区数据', getArea[0].data)
444
+ this.addressData.slice_area = [{name: getArea[0].data.f_slice_area, code: getArea[0].data.f_area_code}]
445
+ }
446
+ }
447
+ this.$resetValidation()
448
+ },
449
+ //街道变化
450
+ async streetChange(val) {
451
+ console.log(`街道变化 => ${JSON.stringify(val)} => ${JSON.stringify(this.addressData)}`)
452
+ if (this.streetslist[0]) {
453
+ var street = ''
454
+ this.streetslist.forEach((item) => {
455
+ if (item.id === val) {
456
+ street = item.label
457
+ }
458
+ })
459
+ this.addressData.f_address = street
460
+ }
461
+ if (val) {
462
+ //那就把[小区]重新组织一下
463
+ await this.initareas(` f_street_id ='${val}' `)
464
+ if (this.addressData.f_residential_area_id) {
465
+ if (this.findbyid(this.areaslist, this.addressData.f_residential_area_id)) {
466
+ let street_id = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_street_id
467
+ if (street_id != val) {
468
+ this.addressData.f_residential_area_id = ''
469
+ }
470
+ } else {
471
+ this.addressData.f_residential_area_id = ''
472
+ }
473
+
474
+ }
475
+ }
476
+ this.$resetValidation()
477
+ },
478
+ //根据名字找数据
479
+ findbyid(list, name) {
480
+ let result
481
+ list.forEach((row, n) => {
482
+ if (name == row.value) {
483
+ result = row.data
484
+ }
485
+ })
486
+ return result
487
+ },
488
+ getNowDate() {
489
+ let now = new Date()
490
+ let dateStr = ''
491
+ dateStr += now.getFullYear()
492
+ dateStr += '-' + (now.getMonth() + 1)
493
+ dateStr += '-' + now.getDate()
494
+ dateStr += ' ' + now.getHours()
495
+ dateStr += ':' + now.getMinutes()
496
+ dateStr += ':' + now.getSeconds()
497
+ dateStr += '.' + now.getMilliseconds()
498
+ return dateStr
499
+ },
500
+ async createAddress() {
501
+ if (this.addressData.slice_area) {
502
+ if (this.addressData.slice_area.length > 0) {
503
+ this.addressData.f_slice_area = this.addressData.slice_area[0].name
504
+ this.addressData.f_area_code = this.addressData.slice_area[0].code
505
+ }
506
+ }
507
+ this.addressData.f_pcd = this.findbyid(this.pcdslist, this.addressData.f_pcd_id).f_pcd
508
+ this.addressData.f_street = this.findbyid(this.streetslist, this.addressData.f_street_id).f_street
509
+ this.addressData.f_residential_area = this.findbyid(this.areaslist, this.addressData.f_residential_area_id).f_residential_area
510
+ 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
511
+ this.addressData.f_create_date = this.getNowDate()
512
+ console.log("调用创建地址接口参数 ==> " + JSON.stringify(this.addressData))
513
+ let http = new HttpResetClass()
514
+ return await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/address_updateuseraddress`, this.addressData)
515
+ },
516
+ async createUserData() {
517
+ let http = new HttpResetClass()
518
+ return await http.load('POST',
519
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/sale_simple_userSave`,
520
+ this.userdata
521
+ )
522
+ },
523
+ async summit() {
524
+ this.isBusy = true
525
+ try {
526
+ // 先创建地址信息
527
+ console.log('创建地址')
528
+ let response = await this.createAddress()
529
+ console.log('createAddressResponse ===> ' + JSON.stringify(response))
530
+ this.userdata.address.id = response.data.id
531
+ } catch (e) {
532
+ console.log('e ===> ' + JSON.stringify(e))
533
+ // 如果地址已存在,使用存在的地址建档
534
+ if (e.status && e.status == 635) {
535
+ console.log('地址已存在,获取已存在地址id')
536
+ let http = new HttpResetClass()
537
+ let data = {
538
+ data: {
539
+ items: 'id',
540
+ tablename: 't_user_address',
541
+ condition: `f_address = '${this.addressData.f_address}'`
542
+ }
543
+ }
544
+ let response = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/querySingleTable`, data)
545
+ console.log('searchAddressResponse ===> ' + JSON.stringify(response))
546
+ if (response.data && response.data.length > 0) {
547
+ this.userdata.address.id = response.data[0].id
548
+ }
549
+ } else {
550
+ this.$showMessage('错误:' + JSON.stringify(e))
551
+ this.isBusy = false
552
+ return
553
+ }
554
+ }
555
+ try {
556
+ // 再建立档案
557
+ console.log('创建档案')
558
+ let response = await this.createUserData()
559
+ console.log('createUserDataResponse ===> ' + JSON.stringify(response))
560
+ if (response.data.status == 200) {
561
+ this.$showMessage('档案创建成功!')
562
+ } else {
563
+ this.$showMessage('档案创建失败!' + JSON.stringify(response.data))
564
+ }
565
+ console.log('创建成功f_userinfo_id ===> ' + JSON.stringify(response.data.f_userinfo_id))
566
+ // 上传成功,重新初始化数据
567
+ Object.assign(this.$data, this.$options.data())
568
+ await this.initpcds(` f_filialeids = '${Vue.user.f_orgids}'`)
569
+ await this.initAreas(Vue.user.orgid)
570
+ } catch (e) {
571
+ console.log('e ===> ' + JSON.stringify(e))
572
+ this.$showMessage('错误:' + JSON.stringify(e))
573
+ }
574
+ this.isBusy = false
575
+ },
576
+ },
577
+ watch: {
578
+ 'userdata.userinfo.userfiles.f_meternumber': async function (newVal, oldVal) {
579
+ console.log('newVal ===> ' + JSON.stringify(newVal))
580
+ console.log('oldVal ===> ' + JSON.stringify(oldVal))
581
+ // let response = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/xxxxxx`, {})
582
+ },
583
+ 'userdata.userinfo.f_idnumber'(val) {
584
+ if (val) {
585
+ 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))) {
586
+ // this.$showAlert('输入的身份证号长度不对,或者号码不符合规定!\n15位号码应全为数字,18位号码末位可以为数字或X。')
587
+ this.isNotIdNumber = true
588
+ } else {
589
+ this.isNotIdNumber = false
590
+ }
591
+ } else {
592
+ this.isNotIdNumber = false
593
+ }
594
+ }
595
+ }
596
+ }
597
+ </script>
598
+
599
+ <style scoped>
600
+
601
601
  </style>