address-client 4.0.12 → 4.0.13
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/.gradle/8.5/checksums/checksums.lock +0 -0
- package/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/{8.10 → 8.5}/executionHistory/executionHistory.bin +0 -0
- package/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
- package/.gradle/{8.10 → 8.5}/fileHashes/fileHashes.bin +0 -0
- package/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/.gradle/file-system.probe +0 -0
- package/build/dev-server.js +59 -72
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/gradlew +2 -5
- package/gradlew.bat +10 -12
- package/package.json +1 -1
- package/src/filiale/yangchun/AddStreetOrPcd.vue +316 -0
- package/src/filiale/yangchun/AddressList.vue +639 -0
- package/src/filiale/yangchun/AreaList.vue +417 -0
- package/src/filiale/yangchun/StreetList.vue +243 -0
- package/src/filiale/yangchun/sale.js +8 -0
- package/.gradle/8.10/checksums/checksums.lock +0 -0
- package/.gradle/8.10/executionHistory/executionHistory.lock +0 -0
- package/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
- /package/.gradle/{8.10 → 8.5}/dependencies-accessors/gc.properties +0 -0
- /package/.gradle/{8.10 → 8.5}/fileChanges/last-build.bin +0 -0
- /package/.gradle/{8.10 → 8.5}/gc.properties +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
2
|
-
gradle.version=
|
|
1
|
+
#Mon Dec 07 15:35:10 CST 2020
|
|
2
|
+
gradle.version=5.2.1
|
|
Binary file
|
|
Binary file
|
package/build/dev-server.js
CHANGED
|
@@ -14,105 +14,92 @@ var proxy = httpProxy.createProxyServer()
|
|
|
14
14
|
var str = 'http://192.168.50.4:8400', str2= 'http://192.168.50.4:8400'
|
|
15
15
|
var str3= 'http://192.168.50.4:8400'
|
|
16
16
|
var proxyTable = {
|
|
17
|
-
'/api/af-revenue': {
|
|
18
|
-
pathRewrite: {'/api/af-revenue': '/'},
|
|
19
|
-
target: 'http://127.0.0.1:9026'
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
'/api': {
|
|
23
|
-
target: str
|
|
24
|
-
},
|
|
25
17
|
'/api/af-auth': {
|
|
26
18
|
target: str
|
|
27
19
|
},
|
|
28
|
-
'/
|
|
29
|
-
target: str,
|
|
30
|
-
changeOrigin: true
|
|
31
|
-
},
|
|
32
|
-
'/invoice/rs/logic/getInvoice': {
|
|
33
|
-
target: str
|
|
34
|
-
},
|
|
35
|
-
// '/rs/sql/filemanage_getUserfies':{
|
|
36
|
-
// target: 'http://127.0.0.1:8080/'
|
|
37
|
-
// },
|
|
38
|
-
// '/rs/logic/importNetworkValve':{
|
|
39
|
-
// target: 'http://127.0.0.1:8080/'
|
|
40
|
-
// },
|
|
41
|
-
'/rs/file': {
|
|
42
|
-
target: str
|
|
43
|
-
},
|
|
44
|
-
'/webapps': {
|
|
20
|
+
'/api/af-system': {
|
|
45
21
|
target: str
|
|
46
22
|
},
|
|
47
|
-
'/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
'/invoice': {
|
|
51
|
-
target: str
|
|
23
|
+
'/api/af-revenue': {
|
|
24
|
+
pathRewrite: {'/api/af-revenue': '/'},
|
|
25
|
+
target: 'http://127.0.0.1:9026'
|
|
52
26
|
},
|
|
53
|
-
'/rs/
|
|
27
|
+
'/rs/entity': {
|
|
54
28
|
target: str
|
|
29
|
+
// secure:true,
|
|
30
|
+
// changeOrigin:true
|
|
31
|
+
// target: 'http://127.0.0.1:8080'
|
|
55
32
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
33
|
+
'/webapps':{
|
|
34
|
+
target: str3,
|
|
35
|
+
secure:true,
|
|
36
|
+
changeOrigin:true
|
|
37
|
+
// target: 'http://127.0.0.1:8080'
|
|
60
38
|
},
|
|
61
|
-
// 查找资源服务数据
|
|
62
39
|
'/rs/logic/getLogin': {
|
|
63
|
-
target:
|
|
40
|
+
target: str3,
|
|
41
|
+
secure:true,
|
|
42
|
+
changeOrigin:true
|
|
64
43
|
},
|
|
65
|
-
// 查找资源服务数据
|
|
66
44
|
'/rs/logic/getInitData': {
|
|
67
|
-
target:
|
|
45
|
+
target: str3,
|
|
46
|
+
secure:true,
|
|
47
|
+
changeOrigin:true,
|
|
68
48
|
},
|
|
69
49
|
'/rs/logic/getSaleInitData': {
|
|
70
|
-
target:
|
|
50
|
+
target: str3,
|
|
51
|
+
secure:true,
|
|
52
|
+
changeOrigin:true
|
|
53
|
+
},
|
|
54
|
+
// '/rs/logic':{
|
|
55
|
+
// target: str3,
|
|
56
|
+
// secure:true,
|
|
57
|
+
// changeOrigin:true
|
|
58
|
+
// // target: 'http://127.0.0.1:8080'
|
|
59
|
+
// },
|
|
60
|
+
'/rs/vue': {
|
|
61
|
+
target: str3,
|
|
62
|
+
secure:true,
|
|
63
|
+
changeOrigin:true
|
|
71
64
|
},
|
|
72
|
-
// 用户登录服务地址
|
|
73
65
|
'/rs/user': {
|
|
74
|
-
target:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
target: str
|
|
78
|
-
},
|
|
79
|
-
'/rs/data': {
|
|
80
|
-
target: str
|
|
81
|
-
},
|
|
82
|
-
'/rs/license': {
|
|
83
|
-
target: str
|
|
66
|
+
target: str3,
|
|
67
|
+
secure:true,
|
|
68
|
+
changeOrigin:true
|
|
84
69
|
},
|
|
85
70
|
'/rs/db': {
|
|
86
|
-
target:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
target: str
|
|
90
|
-
},
|
|
91
|
-
'/rs/config': {
|
|
92
|
-
target: str
|
|
71
|
+
target: str3,
|
|
72
|
+
secure:true,
|
|
73
|
+
changeOrigin:true
|
|
93
74
|
},
|
|
94
|
-
'/rs/
|
|
95
|
-
target:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
target:
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
'/rs/logic': {
|
|
102
|
-
target: str
|
|
75
|
+
'/rs/search': {
|
|
76
|
+
target: str3,
|
|
77
|
+
secure:true,
|
|
78
|
+
changeOrigin:true
|
|
79
|
+
// target: 'http://127.0.0.1:8080'
|
|
103
80
|
},
|
|
104
|
-
'/rs/
|
|
105
|
-
target:
|
|
81
|
+
'/rs/data': {
|
|
82
|
+
target: str3,
|
|
83
|
+
secure:true,
|
|
84
|
+
changeOrigin:true
|
|
106
85
|
},
|
|
107
86
|
'/rs/sql': {
|
|
108
87
|
target: str
|
|
88
|
+
// secure: true,
|
|
89
|
+
// changeOrigin:true
|
|
90
|
+
// target: 'http://127.0.0.1:8080'
|
|
109
91
|
},
|
|
110
|
-
'/
|
|
92
|
+
'/rs/logic': {
|
|
111
93
|
target: str
|
|
94
|
+
// secure: true,
|
|
95
|
+
// changeOrigin:true
|
|
96
|
+
// target: 'http://127.0.0.1:8080'
|
|
112
97
|
},
|
|
113
98
|
'/rs': {
|
|
114
|
-
target:
|
|
115
|
-
|
|
99
|
+
// target: 'http://192.168.50.199:8300'
|
|
100
|
+
target: str3,
|
|
101
|
+
secure:true,
|
|
102
|
+
changeOrigin:true
|
|
116
103
|
}
|
|
117
104
|
}
|
|
118
105
|
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
package/gradlew
CHANGED
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
# See the License for the specific language governing permissions and
|
|
16
16
|
# limitations under the License.
|
|
17
17
|
#
|
|
18
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
19
|
-
#
|
|
20
18
|
|
|
21
19
|
##############################################################################
|
|
22
20
|
#
|
|
@@ -57,7 +55,7 @@
|
|
|
57
55
|
# Darwin, MinGW, and NonStop.
|
|
58
56
|
#
|
|
59
57
|
# (3) This script is generated from the Groovy template
|
|
60
|
-
# https://github.com/gradle/gradle/blob/HEAD/
|
|
58
|
+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
61
59
|
# within the Gradle project.
|
|
62
60
|
#
|
|
63
61
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
@@ -86,8 +84,7 @@ done
|
|
|
86
84
|
# shellcheck disable=SC2034
|
|
87
85
|
APP_BASE_NAME=${0##*/}
|
|
88
86
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
89
|
-
APP_HOME=$( cd
|
|
90
|
-
' "$PWD" ) || exit
|
|
87
|
+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
|
91
88
|
|
|
92
89
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
93
90
|
MAX_FD=maximum
|
package/gradlew.bat
CHANGED
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
@rem See the License for the specific language governing permissions and
|
|
14
14
|
@rem limitations under the License.
|
|
15
15
|
@rem
|
|
16
|
-
@rem SPDX-License-Identifier: Apache-2.0
|
|
17
|
-
@rem
|
|
18
16
|
|
|
19
17
|
@if "%DEBUG%"=="" @echo off
|
|
20
18
|
@rem ##########################################################################
|
|
@@ -45,11 +43,11 @@ set JAVA_EXE=java.exe
|
|
|
45
43
|
%JAVA_EXE% -version >NUL 2>&1
|
|
46
44
|
if %ERRORLEVEL% equ 0 goto execute
|
|
47
45
|
|
|
48
|
-
echo.
|
|
49
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
50
|
-
echo.
|
|
51
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
52
|
-
echo location of your Java installation.
|
|
46
|
+
echo.
|
|
47
|
+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
48
|
+
echo.
|
|
49
|
+
echo Please set the JAVA_HOME variable in your environment to match the
|
|
50
|
+
echo location of your Java installation.
|
|
53
51
|
|
|
54
52
|
goto fail
|
|
55
53
|
|
|
@@ -59,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
|
59
57
|
|
|
60
58
|
if exist "%JAVA_EXE%" goto execute
|
|
61
59
|
|
|
62
|
-
echo.
|
|
63
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
64
|
-
echo.
|
|
65
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
66
|
-
echo location of your Java installation.
|
|
60
|
+
echo.
|
|
61
|
+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
62
|
+
echo.
|
|
63
|
+
echo Please set the JAVA_HOME variable in your environment to match the
|
|
64
|
+
echo location of your Java installation.
|
|
67
65
|
|
|
68
66
|
goto fail
|
|
69
67
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="span">
|
|
3
|
+
<validator name='v'>
|
|
4
|
+
<p class="bg-info text-center" style="padding: 8px;" v-if="operation=='add'">添加{{areatype}}</p>
|
|
5
|
+
<p class="bg-info text-center" style="padding: 8px;" v-if="operation=='modify'&&areatype=='街道'">修改【{{streetmodel.f_street}}】街道</p>
|
|
6
|
+
<p class="bg-info text-center" style="padding: 8px;" v-if="operation=='modify'&&areatype=='省市区'">修改【{{pcdmodel.f_pcd}}】</p>
|
|
7
|
+
<div class="auto select-overspread form-horizontal">
|
|
8
|
+
<div style="text-align:right;margin-top:6px;" class="col-sm-12">
|
|
9
|
+
<!-- 省市区-->
|
|
10
|
+
<div v-if="areatype=='省市区'" class="row">
|
|
11
|
+
<div class="col-sm-6 form-group "
|
|
12
|
+
:class="[$v.f_province.required ? 'has-error' : 'has-success']">
|
|
13
|
+
<label class="font_normal_body">省  份</label>
|
|
14
|
+
<input type="text" v-model="pcdmodel.f_province"
|
|
15
|
+
class="input_search" style="width:60%" placeholder="省份"
|
|
16
|
+
v-validate:f_province='{required: true }'>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="col-sm-6 form-group "
|
|
19
|
+
:class="[$v.f_city.required ? 'has-error' : 'has-success']">
|
|
20
|
+
<label class="font_normal_body">城  市</label>
|
|
21
|
+
<input type="text" v-model="pcdmodel.f_city"
|
|
22
|
+
class="input_search" style="width:60%" placeholder="城市"
|
|
23
|
+
v-validate:f_city='{required: true }'>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="col-sm-6 form-group "
|
|
26
|
+
:class="[$v.f_district.required ? 'has-error' : 'has-success']">
|
|
27
|
+
<label class="font_normal_body">区  / 县</label>
|
|
28
|
+
<input type="text" v-model="pcdmodel.f_district"
|
|
29
|
+
class="input_search" style="width:60%" placeholder="区/县"
|
|
30
|
+
v-validate:f_district='{required: true }'>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="col-sm-6 form-group " v-if="config.hasnumber"
|
|
33
|
+
:class="[$v.f_pcd_number.required ? 'has-error' : 'has-success']">
|
|
34
|
+
<label class="font_normal_body">区域编码</label>
|
|
35
|
+
<input type="number" v-model="pcdmodel.f_pcd_number"
|
|
36
|
+
class="input_search" style="width:60%" placeholder="区/县"
|
|
37
|
+
@change="numberyanzheng"
|
|
38
|
+
v-validate:f_pcd_number='{required: true }'>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="col-sm-12 form-group">
|
|
41
|
+
<label class="font_normal_body " style="">备  注</label>
|
|
42
|
+
<textarea class="input_textarea" rows="3" style="margin-top:25px;width:80%;height: auto;" v-model="pcdmodel.f_comments"></textarea>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<!-- 街道-->
|
|
46
|
+
<div v-if="areatype=='街道'" class="row">
|
|
47
|
+
<div class="col-sm-6 form-group "
|
|
48
|
+
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
|
|
49
|
+
<label class="font_normal_body">省 市 区</label>
|
|
50
|
+
<input type="text" v-show="false" v-model="streetmodel.f_pcd_id"
|
|
51
|
+
v-validate:f_pcd_id='{required: true }'>
|
|
52
|
+
<v-select
|
|
53
|
+
:value.sync="streetmodel.f_pcd_id" :value-single="true"
|
|
54
|
+
:options='pcdslist' placeholder='请选择'
|
|
55
|
+
close-on-select search="true" @change="pcdChange">
|
|
56
|
+
</v-select>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="col-sm-6 form-group "
|
|
59
|
+
:class="[$v.f_street.required ? 'has-error' : 'has-success']">
|
|
60
|
+
<label class="font_normal_body">街道/乡镇</label>
|
|
61
|
+
<input type="text" v-model="streetmodel.f_street"
|
|
62
|
+
class="input_search" style="width:60%" placeholder="街道/乡镇"
|
|
63
|
+
v-validate:f_street='{required: true }'>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="col-sm-6 form-group " v-if="config.hasnumber"
|
|
66
|
+
:class="[$v.f_street_number.required ? 'has-error' : 'has-success']">
|
|
67
|
+
<label class="font_normal_body">街道编号</label>
|
|
68
|
+
<input type="text" v-model="streetmodel.f_street_number"
|
|
69
|
+
@change="streetyanzheng"
|
|
70
|
+
class="input_search" style="width:60%" placeholder="街道编号"
|
|
71
|
+
v-validate:f_street_number='{required: true }'>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="col-sm-6 form-group "
|
|
74
|
+
:class="[$v.f_iscity.required ? 'has-error' : 'has-success']">
|
|
75
|
+
<label class="font_normal_body">地区类型</label>
|
|
76
|
+
<input type="text" v-show="false" v-model="streetmodel.f_iscity"
|
|
77
|
+
v-validate:f_iscity='{required: true }'>
|
|
78
|
+
<v-select
|
|
79
|
+
:value.sync="streetmodel.f_iscity" :value-single="true"
|
|
80
|
+
:options='iscity' placeholder='请选择'
|
|
81
|
+
close-on-select>
|
|
82
|
+
</v-select>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="col-sm-12 form-group">
|
|
85
|
+
<label class="font_normal_body " style="">备  注</label>
|
|
86
|
+
<textarea class="input_textarea" rows="3" style="margin-top:25px;width:80%;height: auto;" v-model="streetmodel.f_comments"></textarea>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div class="row">
|
|
91
|
+
<div style="margin-top:40px;text-align:right;">
|
|
92
|
+
<button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid' v-if="this.$login.r.includes('街道修改保存')">保存</button>
|
|
93
|
+
<button class="button_clear button_spacing" @click="cancel()">取消</button>
|
|
94
|
+
</div>
|
|
95
|
+
<div v-if="areatype=='省市区'" class="row" style="margin-top:40px;height: 580px;">
|
|
96
|
+
<city-list v-ref:addpcd @select-changed="selected" :f_filialeids.sync="f_filialeids"></city-list>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</validator>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
103
|
+
|
|
104
|
+
<script>
|
|
105
|
+
import {HttpResetClass} from 'vue-client'
|
|
106
|
+
|
|
107
|
+
let getAreaConfig = async function (self) {
|
|
108
|
+
// 获取气价里面的配置
|
|
109
|
+
await self.$getConfig(self, 'UserPcd')
|
|
110
|
+
console.log('原地址配置',self.config)
|
|
111
|
+
console.log('获取地址配置',self.config)
|
|
112
|
+
Object.assign(self.model, self.config)
|
|
113
|
+
}
|
|
114
|
+
export default {
|
|
115
|
+
title: '区域地址添加',
|
|
116
|
+
data () {
|
|
117
|
+
return {
|
|
118
|
+
//初始化省市区数据
|
|
119
|
+
config:{
|
|
120
|
+
hasnumber: false
|
|
121
|
+
},
|
|
122
|
+
pcdslist:[],
|
|
123
|
+
iscity:[{label:'市区',value:'市区'},{label:'乡镇',value:'乡镇'}],
|
|
124
|
+
//省市区
|
|
125
|
+
pcdmodel: {
|
|
126
|
+
f_province:'',
|
|
127
|
+
f_city:'',
|
|
128
|
+
f_district:'',
|
|
129
|
+
f_comments:'',
|
|
130
|
+
f_pcd_number: ''
|
|
131
|
+
},
|
|
132
|
+
//街道
|
|
133
|
+
streetmodel: {
|
|
134
|
+
f_pcd_id:'',
|
|
135
|
+
f_street_id:'',
|
|
136
|
+
slice_area: null,
|
|
137
|
+
f_slice_area: null,
|
|
138
|
+
f_adjustable_id: null,
|
|
139
|
+
f_street:'',
|
|
140
|
+
f_comments:'',
|
|
141
|
+
f_street_number:''
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
props: ['f_filialeids', 'areatype','row','operation'],
|
|
146
|
+
ready(){
|
|
147
|
+
this.initdata()
|
|
148
|
+
getAreaConfig(this)
|
|
149
|
+
},
|
|
150
|
+
methods: {
|
|
151
|
+
async streetyanzheng(){
|
|
152
|
+
console.log(this.streetmodel.f_street_number.length)
|
|
153
|
+
let res =await this.$resetpost('api/af-revenue/sql/address_singleTableOrderBy', {
|
|
154
|
+
data: {
|
|
155
|
+
items: '*',
|
|
156
|
+
tablename: 't_street',
|
|
157
|
+
orderitem: 'id',
|
|
158
|
+
condition: `f_street_number = '${this.streetmodel.f_street_number}' and f_orgid = '${this.$login.f.orgid}'`
|
|
159
|
+
}
|
|
160
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
161
|
+
if (res.data.length>0){
|
|
162
|
+
if (res.data[0].id != this.streetmodel.id) {
|
|
163
|
+
this.$showAlert('当前编号已存在', 'warning', 2000)
|
|
164
|
+
this.streetmodel.f_street_number = ''
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
async numberyanzheng(){
|
|
169
|
+
console.log(this.pcdmodel.f_pcd_number.length)
|
|
170
|
+
if (this.pcdmodel.f_pcd_number.length != 3){
|
|
171
|
+
this.$showAlert('请输入正确的位数', 'warning', 2000)
|
|
172
|
+
this.pcdmodel.f_pcd_number = ''
|
|
173
|
+
}else{
|
|
174
|
+
let res =await this.$resetpost('api/af-revenue/sql/address_singleTableOrderBy', {
|
|
175
|
+
data: {
|
|
176
|
+
items: '*',
|
|
177
|
+
tablename: 't_pcd',
|
|
178
|
+
orderitem: 'id',
|
|
179
|
+
condition: `f_pcd_number = '${this.pcdmodel.f_pcd_number}' and f_orgid = '${this.$login.f.orgid}'`
|
|
180
|
+
}
|
|
181
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
182
|
+
if (res.data.length>0){
|
|
183
|
+
if (res.data[0].id != this.pcdmodel.id) {
|
|
184
|
+
this.$showAlert('当前编号已存在', 'warning', 2000)
|
|
185
|
+
this.pcdmodel.f_pcd_number = ''
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
//初始化省市区,添加街道
|
|
191
|
+
initpcds(pconditon){
|
|
192
|
+
console.log("省市区准备")
|
|
193
|
+
let HttpReset = new HttpResetClass()
|
|
194
|
+
HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
|
195
|
+
data: {
|
|
196
|
+
items: '*',
|
|
197
|
+
tablename: 't_pcd',
|
|
198
|
+
orderitem: 'id',
|
|
199
|
+
condition: pconditon
|
|
200
|
+
}
|
|
201
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
|
|
202
|
+
let redata = []
|
|
203
|
+
req.data.forEach((row, n) => {
|
|
204
|
+
redata[n] = {
|
|
205
|
+
label: row.f_pcd,
|
|
206
|
+
value: row.id,
|
|
207
|
+
data:row,
|
|
208
|
+
id:row.id
|
|
209
|
+
}
|
|
210
|
+
})
|
|
211
|
+
this.pcdslist=redata
|
|
212
|
+
})
|
|
213
|
+
},
|
|
214
|
+
//根据名字找数据
|
|
215
|
+
findbyid(list,name){
|
|
216
|
+
var result
|
|
217
|
+
list.forEach((row, n) => {
|
|
218
|
+
if(name==row.id){
|
|
219
|
+
result= row.data
|
|
220
|
+
}
|
|
221
|
+
})
|
|
222
|
+
return result
|
|
223
|
+
},
|
|
224
|
+
//初始化数据
|
|
225
|
+
initdata(){
|
|
226
|
+
if(this.areatype=='街道'){
|
|
227
|
+
this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
|
|
228
|
+
}
|
|
229
|
+
if(this.areatype=='小区'){
|
|
230
|
+
this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
|
|
231
|
+
this.initstreets(` f_filialeid = '${this.f_filialeids}'`)
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
//省/市/区变化
|
|
235
|
+
pcdChange(val){
|
|
236
|
+
console.log("省/市/区变化",val)
|
|
237
|
+
this.$resetValidation()
|
|
238
|
+
},
|
|
239
|
+
//保存
|
|
240
|
+
async confirm(){
|
|
241
|
+
if(this.areatype=='省市区'){
|
|
242
|
+
await this.savepcd()
|
|
243
|
+
this.$refs.addpcd.search()
|
|
244
|
+
}
|
|
245
|
+
if(this.areatype=='街道'){
|
|
246
|
+
await this.savestreet()
|
|
247
|
+
}
|
|
248
|
+
this.cleardara()
|
|
249
|
+
this.$dispatch('confirm')
|
|
250
|
+
},
|
|
251
|
+
//保存省市区
|
|
252
|
+
async savepcd(){
|
|
253
|
+
this.pcdmodel.f_filialeid = this.f_filialeids
|
|
254
|
+
this.pcdmodel.f_operator = this.$login.f.name
|
|
255
|
+
this.pcdmodel.f_operatorid = this.$login.f.id
|
|
256
|
+
this.pcdmodel.f_orgid = this.$login.f.orgid
|
|
257
|
+
this.pcdmodel.f_orgname = this.$login.f.orgs
|
|
258
|
+
this.pcdmodel.f_depid = this.$login.f.depids
|
|
259
|
+
this.pcdmodel.f_depname = this.$login.f.deps
|
|
260
|
+
this.pcdmodel.f_pcd = this.pcdmodel.f_province+this.pcdmodel.f_city+this.pcdmodel.f_district
|
|
261
|
+
await this.$resetpost('api/af-revenue/logic/address_updatepcd', this.pcdmodel)
|
|
262
|
+
},
|
|
263
|
+
//保存街道
|
|
264
|
+
async savestreet(){
|
|
265
|
+
this.streetmodel.f_filialeid = this.f_filialeids
|
|
266
|
+
this.streetmodel.f_operator= this.$login.f.name
|
|
267
|
+
this.streetmodel.f_operatorid = this.$login.f.id
|
|
268
|
+
this.streetmodel.f_orgid = this.$login.f.orgid
|
|
269
|
+
this.streetmodel.f_orgname = this.$login.f.orgs
|
|
270
|
+
this.streetmodel.f_depid = this.$login.f.depids
|
|
271
|
+
this.streetmodel.f_depname = this.$login.f.deps
|
|
272
|
+
this.streetmodel.f_pcd=this.findbyid(this.pcdslist,this.streetmodel.f_pcd_id).f_pcd
|
|
273
|
+
console.log('获取街道model', this.streetmodel)
|
|
274
|
+
await this.$resetpost('api/af-revenue/logic/address_updatestreet', this.streetmodel)
|
|
275
|
+
},
|
|
276
|
+
cancel(){
|
|
277
|
+
this.cleardara()
|
|
278
|
+
this.$dispatch('cancel')
|
|
279
|
+
},
|
|
280
|
+
cleardara () {
|
|
281
|
+
this.pcdmodel = {
|
|
282
|
+
f_province: '',
|
|
283
|
+
f_city: '',
|
|
284
|
+
f_district: '',
|
|
285
|
+
f_comments:''
|
|
286
|
+
}
|
|
287
|
+
this.streetmodel = {
|
|
288
|
+
f_pcd_id: '',
|
|
289
|
+
f_slice_area: '',
|
|
290
|
+
f_adjustable_id: '',
|
|
291
|
+
f_street: '',
|
|
292
|
+
f_comments:''
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
},
|
|
297
|
+
watch: {
|
|
298
|
+
'areatype'(){
|
|
299
|
+
this.initdata()
|
|
300
|
+
},
|
|
301
|
+
'f_filialeids'(){
|
|
302
|
+
if (this.streetmodel.f_filialeid) {
|
|
303
|
+
if (this.streetmodel.f_filialeid != this.f_filialeids) {
|
|
304
|
+
this.$dispatch('cancel')
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
if (this.pcdmodel.f_filialeid) {
|
|
308
|
+
if (this.pcdmodel.f_filialeid != this.f_filialeids) {
|
|
309
|
+
this.$dispatch('cancel')
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
this.initdata()
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
</script>
|