system-phone 3.0.49-56 → 3.0.49-57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +5 -5
- package/.editorconfig +9 -9
- package/.eslintrc.js +16 -16
- package/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/CHANGELOG.md +1 -1
- package/Dockerfile +3 -3
- package/README.md +36 -36
- package/SystemPhone.iml +8 -8
- package/build/css-loaders.js +34 -34
- package/build/dev-client.js +8 -8
- package/build/dev-server.js +141 -141
- package/build/example-server.js +80 -80
- package/build/release.sh +28 -28
- package/build/utils.js +71 -71
- package/build/webpack.base.conf.js +82 -82
- package/build/webpack.dev.conf.js +31 -31
- package/build/webpack.example.conf.js +49 -49
- package/build/webpack.prod.conf.js +60 -60
- package/build/webpack.test.conf.js +31 -31
- package/build.gradle +27 -27
- package/config/dev.env.js +6 -6
- package/config/index.js +38 -38
- package/config/prod.env.js +3 -3
- package/config/test.env.js +6 -6
- package/gradle/wrapper/gradle-wrapper.properties +5 -5
- package/gradlew +183 -183
- package/gradlew.bat +100 -100
- package/index.html +21 -21
- package/nginx.conf +304 -304
- package/package.json +1 -1
- package/release.bat +5 -5
- package/src/App.vue +25 -25
- package/src/Util.js +415 -415
- package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
- package/src/android-bootstrap/less/.csscomb.json +304 -304
- package/src/android-bootstrap/less/.csslintrc +19 -19
- package/src/android-bootstrap/less/alerts.less +73 -73
- package/src/android-bootstrap/less/badges.less +66 -66
- package/src/android-bootstrap/less/bootstrap.less +56 -56
- package/src/android-bootstrap/less/breadcrumbs.less +26 -26
- package/src/android-bootstrap/less/button-groups.less +247 -247
- package/src/android-bootstrap/less/buttons.less +173 -173
- package/src/android-bootstrap/less/carousel.less +269 -269
- package/src/android-bootstrap/less/close.less +34 -34
- package/src/android-bootstrap/less/code.less +69 -69
- package/src/android-bootstrap/less/component-animations.less +33 -33
- package/src/android-bootstrap/less/dropdowns.less +216 -216
- package/src/android-bootstrap/less/forms.less +626 -626
- package/src/android-bootstrap/less/glyphicons.less +305 -305
- package/src/android-bootstrap/less/grid.less +84 -84
- package/src/android-bootstrap/less/input-groups.less +167 -167
- package/src/android-bootstrap/less/jumbotron.less +52 -52
- package/src/android-bootstrap/less/labels.less +64 -64
- package/src/android-bootstrap/less/list-group.less +141 -141
- package/src/android-bootstrap/less/media.less +66 -66
- package/src/android-bootstrap/less/mixins/alerts.less +14 -14
- package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
- package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
- package/src/android-bootstrap/less/mixins/buttons.less +69 -69
- package/src/android-bootstrap/less/mixins/center-block.less +7 -7
- package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
- package/src/android-bootstrap/less/mixins/forms.less +90 -90
- package/src/android-bootstrap/less/mixins/gradients.less +59 -59
- package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
- package/src/android-bootstrap/less/mixins/grid.less +122 -122
- package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
- package/src/android-bootstrap/less/mixins/image.less +33 -33
- package/src/android-bootstrap/less/mixins/labels.less +12 -12
- package/src/android-bootstrap/less/mixins/list-group.less +30 -30
- package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
- package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
- package/src/android-bootstrap/less/mixins/opacity.less +8 -8
- package/src/android-bootstrap/less/mixins/pagination.less +24 -24
- package/src/android-bootstrap/less/mixins/panels.less +24 -24
- package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
- package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
- package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
- package/src/android-bootstrap/less/mixins/resize.less +6 -6
- package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
- package/src/android-bootstrap/less/mixins/size.less +10 -10
- package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
- package/src/android-bootstrap/less/mixins/table-row.less +44 -44
- package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
- package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
- package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
- package/src/android-bootstrap/less/mixins.less +40 -40
- package/src/android-bootstrap/less/modals.less +151 -151
- package/src/android-bootstrap/less/navbar.less +660 -660
- package/src/android-bootstrap/less/navs.less +290 -290
- package/src/android-bootstrap/less/normalize.less +424 -424
- package/src/android-bootstrap/less/pager.less +76 -76
- package/src/android-bootstrap/less/pagination.less +89 -89
- package/src/android-bootstrap/less/panels.less +274 -274
- package/src/android-bootstrap/less/popovers.less +131 -131
- package/src/android-bootstrap/less/print.less +101 -101
- package/src/android-bootstrap/less/progress-bars.less +87 -87
- package/src/android-bootstrap/less/responsive-embed.less +35 -35
- package/src/android-bootstrap/less/responsive-utilities.less +194 -194
- package/src/android-bootstrap/less/scaffolding.less +161 -161
- package/src/android-bootstrap/less/tables.less +262 -262
- package/src/android-bootstrap/less/theme.less +291 -291
- package/src/android-bootstrap/less/thumbnails.less +36 -36
- package/src/android-bootstrap/less/tooltip.less +102 -102
- package/src/android-bootstrap/less/type.less +303 -303
- package/src/android-bootstrap/less/utilities.less +55 -55
- package/src/android-bootstrap/less/variables.less +896 -896
- package/src/android-bootstrap/less/wells.less +29 -29
- package/src/bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
- package/src/bootstrap/less/.csscomb.json +304 -304
- package/src/bootstrap/less/.csslintrc +19 -19
- package/src/bootstrap/less/alerts.less +73 -73
- package/src/bootstrap/less/badges.less +66 -66
- package/src/bootstrap/less/bootstrap.less +56 -56
- package/src/bootstrap/less/breadcrumbs.less +26 -26
- package/src/bootstrap/less/button-groups.less +247 -247
- package/src/bootstrap/less/buttons.less +172 -172
- package/src/bootstrap/less/carousel.less +269 -269
- package/src/bootstrap/less/close.less +34 -34
- package/src/bootstrap/less/code.less +69 -69
- package/src/bootstrap/less/component-animations.less +33 -33
- package/src/bootstrap/less/dropdowns.less +216 -216
- package/src/bootstrap/less/forms.less +626 -626
- package/src/bootstrap/less/glyphicons.less +305 -305
- package/src/bootstrap/less/grid.less +84 -84
- package/src/bootstrap/less/input-groups.less +167 -167
- package/src/bootstrap/less/jumbotron.less +52 -52
- package/src/bootstrap/less/labels.less +64 -64
- package/src/bootstrap/less/list-group.less +141 -141
- package/src/bootstrap/less/media.less +66 -66
- package/src/bootstrap/less/mixins/alerts.less +14 -14
- package/src/bootstrap/less/mixins/background-variant.less +9 -9
- package/src/bootstrap/less/mixins/border-radius.less +18 -18
- package/src/bootstrap/less/mixins/buttons.less +69 -69
- package/src/bootstrap/less/mixins/center-block.less +7 -7
- package/src/bootstrap/less/mixins/clearfix.less +22 -22
- package/src/bootstrap/less/mixins/forms.less +90 -90
- package/src/bootstrap/less/mixins/gradients.less +59 -59
- package/src/bootstrap/less/mixins/grid-framework.less +92 -92
- package/src/bootstrap/less/mixins/grid.less +122 -122
- package/src/bootstrap/less/mixins/hide-text.less +21 -21
- package/src/bootstrap/less/mixins/image.less +33 -33
- package/src/bootstrap/less/mixins/labels.less +12 -12
- package/src/bootstrap/less/mixins/list-group.less +30 -30
- package/src/bootstrap/less/mixins/nav-divider.less +10 -10
- package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
- package/src/bootstrap/less/mixins/opacity.less +8 -8
- package/src/bootstrap/less/mixins/pagination.less +24 -24
- package/src/bootstrap/less/mixins/panels.less +24 -24
- package/src/bootstrap/less/mixins/progress-bar.less +10 -10
- package/src/bootstrap/less/mixins/reset-filter.less +8 -8
- package/src/bootstrap/less/mixins/reset-text.less +18 -18
- package/src/bootstrap/less/mixins/resize.less +6 -6
- package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
- package/src/bootstrap/less/mixins/size.less +10 -10
- package/src/bootstrap/less/mixins/tab-focus.less +9 -9
- package/src/bootstrap/less/mixins/table-row.less +44 -44
- package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
- package/src/bootstrap/less/mixins/text-overflow.less +8 -8
- package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
- package/src/bootstrap/less/mixins.less +40 -40
- package/src/bootstrap/less/modals.less +151 -151
- package/src/bootstrap/less/navbar.less +660 -660
- package/src/bootstrap/less/navs.less +286 -286
- package/src/bootstrap/less/normalize.less +424 -424
- package/src/bootstrap/less/pager.less +76 -76
- package/src/bootstrap/less/pagination.less +89 -89
- package/src/bootstrap/less/panels.less +275 -275
- package/src/bootstrap/less/popovers.less +131 -131
- package/src/bootstrap/less/print.less +101 -101
- package/src/bootstrap/less/progress-bars.less +87 -87
- package/src/bootstrap/less/responsive-embed.less +35 -35
- package/src/bootstrap/less/responsive-utilities.less +194 -194
- package/src/bootstrap/less/scaffolding.less +161 -161
- package/src/bootstrap/less/tables.less +262 -262
- package/src/bootstrap/less/theme.less +291 -291
- package/src/bootstrap/less/thumbnails.less +36 -36
- package/src/bootstrap/less/tooltip.less +102 -102
- package/src/bootstrap/less/type.less +303 -303
- package/src/bootstrap/less/utilities.less +55 -55
- package/src/bootstrap/less/variables.less +895 -895
- package/src/bootstrap/less/wells.less +29 -29
- package/src/components/AloneLoadParams.vue +26 -26
- package/src/components/AlreadyService.vue +193 -193
- package/src/components/AttendManage.vue +534 -534
- package/src/components/LoadAppdata.vue +38 -38
- package/src/components/LoginApp.vue +732 -732
- package/src/components/LoginAppNew.vue +587 -587
- package/src/components/ModifyPassWord.vue +216 -216
- package/src/components/NavBottom.vue +117 -117
- package/src/components/NavBottomV.vue +141 -141
- package/src/components/NavBottomVVV.vue +185 -185
- package/src/components/OnlineManage.vue +256 -256
- package/src/components/PhoneAllInfo.vue +68 -68
- package/src/components/PhoneChangemeterInfo.vue +116 -116
- package/src/components/PhoneImageInfo.vue +102 -102
- package/src/components/PhoneInfoTable.vue +39 -39
- package/src/components/PhoneMeterInfo.vue +132 -132
- package/src/components/PhoneRepairInfo.vue +146 -146
- package/src/components/PhoneSafeInfo.vue +101 -101
- package/src/components/PhoneSellInfo.vue +148 -148
- package/src/components/PhoneSellInfoLite.vue +112 -112
- package/src/components/PhoneUser.vue +202 -202
- package/src/components/PhoneUserDetil.vue +70 -70
- package/src/components/PhoneUserFind.vue +138 -138
- package/src/components/RightTree.vue +217 -217
- package/src/components/SystemSetUp.vue +332 -332
- package/src/components/TabBarPhone.vue +81 -81
- package/src/components/Test.vue +14 -14
- package/src/components/ToolsPage.vue +199 -199
- package/src/components/UploadManage.vue +194 -194
- package/src/components/gaomi/NavBottomV.vue +223 -223
- package/src/components/gaomi/NavBottomVVVV.vue +210 -210
- package/src/components/gaomi/Scroller.vue +63 -63
- package/src/components/gaomi/SystemSetUp.vue +186 -186
- package/src/components/gaomi/ToolsPage.vue +168 -168
- package/src/components/idea/feedBack.vue +150 -150
- package/src/components/idea/feedbackAdd.vue +366 -366
- package/src/components/info/ConfigInfo.vue +122 -122
- package/src/components/info/FindUserInfo.vue +157 -157
- package/src/components/info/InfoTable.vue +37 -37
- package/src/components/iot/InstructMessage.vue +313 -313
- package/src/components/iot/IotBaseInfo.vue +97 -97
- package/src/components/iot/IotMeterInfo.vue +77 -77
- package/src/components/iot/iotMonitoringMain.vue +501 -501
- package/src/components/online/ApplyOnline.vue +581 -581
- package/src/components/online/BJZhongRan/ApplyOnline.vue +600 -600
- package/src/components/screen/ChargeContentPage.vue +656 -656
- package/src/components/screen/ContentPage.vue +611 -611
- package/src/components/screen/GongdanContentPage.vue +149 -149
- package/src/components/screen/ListCountItem.vue +93 -93
- package/src/components/screen/ModuleTitle.vue +48 -48
- package/src/components/screen/SafeOrderContentPage.vue +440 -440
- package/src/components/screen/SecurityCheckItem.vue +50 -50
- package/src/components/screen/TotalItem.vue +76 -76
- package/src/components/screen/TotalUserNumber.vue +77 -77
- package/src/components/screen/WorkOrderItem.vue +51 -51
- package/src/components/screen/WorkOrderRightDownItem.vue +103 -103
- package/src/components/screen/WorkOrderRightItem.vue +115 -115
- package/src/components/userinfo/paymentQuery.vue +189 -189
- package/src/components/userinfo/queryFile.vue +190 -190
- package/src/components/wasm.vue +18 -18
- package/src/expandcssAndroid.less +521 -521
- package/src/filiale/yulinyuchuan/AlreadyService.vue +194 -194
- package/src/filiale/yulinyuchuan/AttendManage.vue +537 -537
- package/src/filiale/yulinyuchuan/LoginApp.vue +741 -741
- package/src/filiale/yulinyuchuan/OnlineManage.vue +256 -256
- package/src/filiale/yulinyuchuan/SystemSetUp.vue +332 -332
- package/src/filiale/yulinyuchuan/UploadManage.vue +195 -195
- package/src/filiale/yulinyuchuan/systemphonegrid.js +9 -9
- package/src/index.js +9 -9
- package/src/main.js +38 -38
- package/src/plugins/GetStringData.js +18 -18
- package/src/plugins/LoadParams.js +24 -24
- package/src/plugins/const.js +404 -404
- package/src/plugins/vue-py.js +37 -37
- package/src/services/ConfigService.js +24 -24
- package/src/stores/AppData.js +73 -65
- package/src/systemphone-gaomi.js +105 -105
- package/src/systemphone.js +58 -58
- package/src/systemphonegrid.js +181 -181
- package/src/util/LdapHelper.js +75 -75
- package/static/app.json +4 -4
- package/static/const.js +404 -404
- package/static/globals.txt +74 -74
- package/static/layui/font/iconfont.svg +554 -554
- package/static/vue-py.js +37 -37
- package/static/wasm_exec.js +465 -465
- package/test/unit/.eslintrc +5 -5
- package/test/unit/TestUtil.js +35 -35
- package/test/unit/context.html +20 -20
- package/test/unit/index.js +13 -13
- package/test/unit/init.js +13 -13
- package/test/unit/karma.conf.js +50 -50
- package/test/unit/specs/App.spec.js +17 -17
- package/test/unit/specs/Test.spec.js +28 -28
- package/test/unit/specs/components/LoginApp.spec.js +21 -21
- package/test/unit/specs/sevices/ConfigService.spec.js +23 -23
- package/test/unit/specs/sevices/GetDBTest.spec.js +28 -28
|
@@ -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>
|