address-client 4.0.23 → 4.0.25

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.
File without changes
Binary file
File without changes
@@ -0,0 +1,7 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
4
+ networkTimeout=10000
5
+ validateDistributionUrl=true
6
+ zipStoreBase=GRADLE_USER_HOME
7
+ zipStorePath=wrapper/dists
package/gradlew ADDED
@@ -0,0 +1,252 @@
1
+ #!/bin/sh
2
+
3
+ #
4
+ # Copyright © 2015-2021 the original authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ # SPDX-License-Identifier: Apache-2.0
19
+ #
20
+
21
+ ##############################################################################
22
+ #
23
+ # Gradle start up script for POSIX generated by Gradle.
24
+ #
25
+ # Important for running:
26
+ #
27
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
28
+ # noncompliant, but you have some other compliant shell such as ksh or
29
+ # bash, then to run this script, type that shell name before the whole
30
+ # command line, like:
31
+ #
32
+ # ksh Gradle
33
+ #
34
+ # Busybox and similar reduced shells will NOT work, because this script
35
+ # requires all of these POSIX shell features:
36
+ # * functions;
37
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
38
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
39
+ # * compound commands having a testable exit status, especially «case»;
40
+ # * various built-in commands including «command», «set», and «ulimit».
41
+ #
42
+ # Important for patching:
43
+ #
44
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
45
+ # by Bash, Ksh, etc; in particular arrays are avoided.
46
+ #
47
+ # The "traditional" practice of packing multiple parameters into a
48
+ # space-separated string is a well documented source of bugs and security
49
+ # problems, so this is (mostly) avoided, by progressively accumulating
50
+ # options in "$@", and eventually passing that to Java.
51
+ #
52
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
53
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
54
+ # see the in-line comments for details.
55
+ #
56
+ # There are tweaks for specific operating systems such as AIX, CygWin,
57
+ # Darwin, MinGW, and NonStop.
58
+ #
59
+ # (3) This script is generated from the Groovy template
60
+ # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
61
+ # within the Gradle project.
62
+ #
63
+ # You can find Gradle at https://github.com/gradle/gradle/.
64
+ #
65
+ ##############################################################################
66
+
67
+ # Attempt to set APP_HOME
68
+
69
+ # Resolve links: $0 may be a link
70
+ app_path=$0
71
+
72
+ # Need this for daisy-chained symlinks.
73
+ while
74
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
75
+ [ -h "$app_path" ]
76
+ do
77
+ ls=$( ls -ld "$app_path" )
78
+ link=${ls#*' -> '}
79
+ case $link in #(
80
+ /*) app_path=$link ;; #(
81
+ *) app_path=$APP_HOME$link ;;
82
+ esac
83
+ done
84
+
85
+ # This is normally unused
86
+ # shellcheck disable=SC2034
87
+ APP_BASE_NAME=${0##*/}
88
+ # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89
+ APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90
+ ' "$PWD" ) || exit
91
+
92
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
93
+ MAX_FD=maximum
94
+
95
+ warn () {
96
+ echo "$*"
97
+ } >&2
98
+
99
+ die () {
100
+ echo
101
+ echo "$*"
102
+ echo
103
+ exit 1
104
+ } >&2
105
+
106
+ # OS specific support (must be 'true' or 'false').
107
+ cygwin=false
108
+ msys=false
109
+ darwin=false
110
+ nonstop=false
111
+ case "$( uname )" in #(
112
+ CYGWIN* ) cygwin=true ;; #(
113
+ Darwin* ) darwin=true ;; #(
114
+ MSYS* | MINGW* ) msys=true ;; #(
115
+ NONSTOP* ) nonstop=true ;;
116
+ esac
117
+
118
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
119
+
120
+
121
+ # Determine the Java command to use to start the JVM.
122
+ if [ -n "$JAVA_HOME" ] ; then
123
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
124
+ # IBM's JDK on AIX uses strange locations for the executables
125
+ JAVACMD=$JAVA_HOME/jre/sh/java
126
+ else
127
+ JAVACMD=$JAVA_HOME/bin/java
128
+ fi
129
+ if [ ! -x "$JAVACMD" ] ; then
130
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
131
+
132
+ Please set the JAVA_HOME variable in your environment to match the
133
+ location of your Java installation."
134
+ fi
135
+ else
136
+ JAVACMD=java
137
+ if ! command -v java >/dev/null 2>&1
138
+ then
139
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
140
+
141
+ Please set the JAVA_HOME variable in your environment to match the
142
+ location of your Java installation."
143
+ fi
144
+ fi
145
+
146
+ # Increase the maximum file descriptors if we can.
147
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
148
+ case $MAX_FD in #(
149
+ max*)
150
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
151
+ # shellcheck disable=SC2039,SC3045
152
+ MAX_FD=$( ulimit -H -n ) ||
153
+ warn "Could not query maximum file descriptor limit"
154
+ esac
155
+ case $MAX_FD in #(
156
+ '' | soft) :;; #(
157
+ *)
158
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
159
+ # shellcheck disable=SC2039,SC3045
160
+ ulimit -n "$MAX_FD" ||
161
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
162
+ esac
163
+ fi
164
+
165
+ # Collect all arguments for the java command, stacking in reverse order:
166
+ # * args from the command line
167
+ # * the main class name
168
+ # * -classpath
169
+ # * -D...appname settings
170
+ # * --module-path (only if needed)
171
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
172
+
173
+ # For Cygwin or MSYS, switch paths to Windows format before running java
174
+ if "$cygwin" || "$msys" ; then
175
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
176
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
177
+
178
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
179
+
180
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
181
+ for arg do
182
+ if
183
+ case $arg in #(
184
+ -*) false ;; # don't mess with options #(
185
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
186
+ [ -e "$t" ] ;; #(
187
+ *) false ;;
188
+ esac
189
+ then
190
+ arg=$( cygpath --path --ignore --mixed "$arg" )
191
+ fi
192
+ # Roll the args list around exactly as many times as the number of
193
+ # args, so each arg winds up back in the position where it started, but
194
+ # possibly modified.
195
+ #
196
+ # NB: a `for` loop captures its iteration list before it begins, so
197
+ # changing the positional parameters here affects neither the number of
198
+ # iterations, nor the values presented in `arg`.
199
+ shift # remove old arg
200
+ set -- "$@" "$arg" # push replacement arg
201
+ done
202
+ fi
203
+
204
+
205
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
206
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207
+
208
+ # Collect all arguments for the java command:
209
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210
+ # and any embedded shellness will be escaped.
211
+ # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212
+ # treated as '${Hostname}' itself on the command line.
213
+
214
+ set -- \
215
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
216
+ -classpath "$CLASSPATH" \
217
+ org.gradle.wrapper.GradleWrapperMain \
218
+ "$@"
219
+
220
+ # Stop when "xargs" is not available.
221
+ if ! command -v xargs >/dev/null 2>&1
222
+ then
223
+ die "xargs is not available"
224
+ fi
225
+
226
+ # Use "xargs" to parse quoted args.
227
+ #
228
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
229
+ #
230
+ # In Bash we could simply go:
231
+ #
232
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
233
+ # set -- "${ARGS[@]}" "$@"
234
+ #
235
+ # but POSIX shell has neither arrays nor command substitution, so instead we
236
+ # post-process each arg (as a line of input to sed) to backslash-escape any
237
+ # character that might be a shell metacharacter, then use eval to reverse
238
+ # that process (while maintaining the separation between arguments), and wrap
239
+ # the whole thing up as a single "set" statement.
240
+ #
241
+ # This will of course break if any of these variables contains a newline or
242
+ # an unmatched quote.
243
+ #
244
+
245
+ eval "set -- $(
246
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
247
+ xargs -n1 |
248
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
249
+ tr '\n' ' '
250
+ )" '"$@"'
251
+
252
+ exec "$JAVACMD" "$@"
package/gradlew.bat ADDED
@@ -0,0 +1,94 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+ @rem SPDX-License-Identifier: Apache-2.0
17
+ @rem
18
+
19
+ @if "%DEBUG%"=="" @echo off
20
+ @rem ##########################################################################
21
+ @rem
22
+ @rem Gradle startup script for Windows
23
+ @rem
24
+ @rem ##########################################################################
25
+
26
+ @rem Set local scope for the variables with windows NT shell
27
+ if "%OS%"=="Windows_NT" setlocal
28
+
29
+ set DIRNAME=%~dp0
30
+ if "%DIRNAME%"=="" set DIRNAME=.
31
+ @rem This is normally unused
32
+ set APP_BASE_NAME=%~n0
33
+ set APP_HOME=%DIRNAME%
34
+
35
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
36
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37
+
38
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40
+
41
+ @rem Find java.exe
42
+ if defined JAVA_HOME goto findJavaFromJavaHome
43
+
44
+ set JAVA_EXE=java.exe
45
+ %JAVA_EXE% -version >NUL 2>&1
46
+ if %ERRORLEVEL% equ 0 goto execute
47
+
48
+ echo. 1>&2
49
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50
+ echo. 1>&2
51
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52
+ echo location of your Java installation. 1>&2
53
+
54
+ goto fail
55
+
56
+ :findJavaFromJavaHome
57
+ set JAVA_HOME=%JAVA_HOME:"=%
58
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59
+
60
+ if exist "%JAVA_EXE%" goto execute
61
+
62
+ echo. 1>&2
63
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64
+ echo. 1>&2
65
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66
+ echo location of your Java installation. 1>&2
67
+
68
+ goto fail
69
+
70
+ :execute
71
+ @rem Setup the command line
72
+
73
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74
+
75
+
76
+ @rem Execute Gradle
77
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78
+
79
+ :end
80
+ @rem End local scope for the variables with windows NT shell
81
+ if %ERRORLEVEL% equ 0 goto mainEnd
82
+
83
+ :fail
84
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85
+ rem the _cmd.exe /c_ return code!
86
+ set EXIT_CODE=%ERRORLEVEL%
87
+ if %EXIT_CODE% equ 0 set EXIT_CODE=1
88
+ if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89
+ exit /b %EXIT_CODE%
90
+
91
+ :mainEnd
92
+ if "%OS%"=="Windows_NT" endlocal
93
+
94
+ :omega
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-client",
3
- "version": "4.0.23",
3
+ "version": "4.0.25",
4
4
  "description": "地址管理前台组件",
5
5
  "author": "wanbochao",
6
6
  "license": "ISC",
@@ -196,13 +196,35 @@
196
196
  }
197
197
  },
198
198
  search () {
199
+ let condition = this.$refs.paged.$refs.cri.condition || ''
200
+ if (this.areaid) {
201
+ let areaCondition = `f_residential_area_id = '${this.areaid}'`
202
+ if (condition) {
203
+ condition = `${areaCondition} and ${condition}`
204
+ } else {
205
+ condition = areaCondition
206
+ }
207
+ this.$refs.paged.$refs.cri.condition = condition
208
+ }
209
+
199
210
  this.$refs.paged.$refs.cri.search()
200
211
  },
201
212
  selfSearch (args) {
202
213
  if (!this.f_orgid) {
203
214
  this.getorg([this.$login.f.orgid])
204
215
  }
205
- args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
216
+ // 处理 areaid 条件
217
+ let condition = args.condition || ''
218
+ if (this.areaid) {
219
+ let areaCondition = `f_residential_area_id = '${this.areaid}'`
220
+ if (condition) {
221
+ condition = `${areaCondition} and ${condition}`
222
+ } else {
223
+ condition = areaCondition
224
+ }
225
+ }
226
+ condition = `${condition} and a.f_filialeid = '${this.f_filialeids}'`
227
+ args.condition = condition
206
228
  this.model.search(args.condition, args.model)
207
229
  },
208
230
 
@@ -218,8 +240,18 @@
218
240
  },
219
241
  computed: {
220
242
  getCondition() {
243
+ let condition = this.$refs.paged.$refs.cri.condition || '';
244
+ if (this.areaid) {
245
+ let areaCondition = `f_residential_area_id = '${this.areaid}'`
246
+ if (condition) {
247
+ condition = `${areaCondition} and ${condition}`
248
+ } else {
249
+ condition = areaCondition
250
+ }
251
+ }
221
252
  return {
222
- condition: `${this.$refs.paged.$refs.cri.condition}` + `and a.f_filialeid = '${this.f_filialeids}'`}
253
+ condition: `${condition} and a.f_filialeid = '${this.f_filialeids}'`
254
+ }
223
255
  }
224
256
  }
225
257
 
@@ -102,6 +102,12 @@
102
102
  close-on-select condition="f_inputtor='{}'"
103
103
  placeholder='抄表员' v-model="model.f_inputtor"></v-select>
104
104
  </div>
105
+ <div :class="$parent.$parent.style">
106
+ <label class="font_normal_body">维修片区</label>
107
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_slice_area"
108
+ condition="f_slice_area like '%{}%'" placeholder="维修片区"
109
+ :size="model.f_slice_area ? model.f_slice_area.length*2 : 6"/>
110
+ </div>
105
111
  </div>
106
112
  </div>
107
113
  </criteria>
@@ -12,7 +12,7 @@
12
12
  <div v-if="areatype != '楼栋'">
13
13
  <!--基本小区(单位)信息-->
14
14
  <div class="col-sm-6 form-group" v-if="!config.hasnumber">
15
- <label class="font_normal_body">小区编号</label>
15
+ <label class="font_normal_body">小区编号1</label>
16
16
  <input type="text" class="input_search" style="width:60%" v-model="areamodel.f_area_id"
17
17
  @blur="areaidChange" placeholder="小区编号">
18
18
  </div>
@@ -55,6 +55,15 @@
55
55
  close-on-select v-ref:slice>
56
56
  </v-select>
57
57
  </div>
58
+ <div class="col-sm-6 form-group" :class="[$v.community.required ? 'has-error' : 'has-success']">
59
+ <label class="font_normal_body">社&emsp;&emsp;区</label>
60
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.community.selectedItems"
61
+ v-validate:community='{required: true }'>
62
+ <v-select :value.sync="areamodel.f_community_id" v-model="areamodel.f_community_id"
63
+ :options='communitys' placeholder='社区' filer-key="name" :value-single="true"
64
+ close-on-select v-ref:community>
65
+ </v-select>
66
+ </div>
58
67
  <!--小区(特殊)信息-->
59
68
  <div v-if="!f_special"
60
69
  class="col-sm-6 form-group"
@@ -311,6 +320,7 @@ export default {
311
320
  pcdslist: [],
312
321
  //初始化街道数据
313
322
  streetslist: [],
323
+ communitys:[],
314
324
  //小区
315
325
  areamodel: {
316
326
  f_area_id: '',
@@ -369,6 +379,7 @@ export default {
369
379
  // 初始化片区
370
380
  await this.initSlice(this.f_filialeids)
371
381
  await this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
382
+ await this.initcommunitys(` f_filialeid = '${this.f_filialeids}'`)
372
383
  },
373
384
  initrow(val) {
374
385
  this.areamodel.f_meter_book = val.f_meter_book;
@@ -466,6 +477,29 @@ export default {
466
477
  this.pcdslist = redata
467
478
 
468
479
  },
480
+ //初始化社区
481
+ async initcommunitys(conditon){
482
+ this.communitys = []
483
+ let HttpReset = new HttpResetClass()
484
+ let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
485
+ data: {
486
+ items: 'id,f_community_name',
487
+ tablename: 't_community',
488
+ orderitem: 'id',
489
+ condition: conditon
490
+ }
491
+ }, {resolveMsg: null, rejectMsg: '获取社区失败!'})
492
+ let redata = []
493
+ req.data.forEach((row, n) => {
494
+ redata[n] = {
495
+ label: row.f_community_name,
496
+ value: row.id,
497
+ data:row,
498
+ id:row.id
499
+ }
500
+ })
501
+ this.communitys=redata
502
+ },
469
503
  //初始化街道 添加小区
470
504
  async initstreets(pconditon) {
471
505
  this.streetslist = []
@@ -622,6 +656,9 @@ export default {
622
656
  }
623
657
  }
624
658
  this.areamodel.f_pcd = this.findbyid(this.pcdslist, this.areamodel.f_pcd_id).f_pcd
659
+ if (this.findbyid(this.communitys,this.areamodel.f_community_id)) {
660
+ this.areamodel.f_community=this.findbyid(this.communitys,this.areamodel.f_community_id).f_community_name
661
+ }
625
662
  this.areamodel.f_street = this.findbyid(this.streetslist, this.areamodel.f_street_id).f_street
626
663
 
627
664
  await this.$resetpost('api/af-revenue/logic/address_updatearea', this.areamodel)
@@ -0,0 +1,428 @@
1
+ <template>
2
+ <div class="flex" @keyup.enter="search">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div :class="$parent.$parent.style">
8
+ <label class="font_normal_body">组织机构</label>
9
+ <res-select restype='organization'
10
+ @res-select="$parent.$parent.getorg"
11
+ is-mul="false"
12
+ :initresid='$parent.$parent.curorgid'>
13
+ </res-select>
14
+ </div>
15
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
16
+ <label class="font_normal_body">小区编号</label>
17
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
18
+ condition="f_area_id = '{}'" placeholder="小区编号"/>
19
+ </div>
20
+ <div :class="$parent.$parent.style" v-if="false">
21
+ <label class="font_normal_body">省&emsp;&emsp;份</label>
22
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_province"
23
+ condition="f_province like '%{}%'" placeholder="省份"/>
24
+ </div>
25
+ <!--<div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">-->
26
+ <div :class="$parent.$parent.style" v-if="false">
27
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
28
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
29
+ condition="f_city like '%{}%'" placeholder="城市"/>
30
+ </div>
31
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
32
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
33
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
34
+ condition="f_district like '%{}%'" placeholder="区县"/>
35
+ </div>
36
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
37
+ <label class="font_normal_body">街道/乡镇</label>
38
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
39
+ condition="f_street like '%{}%'" placeholder="街道/乡镇"/>
40
+ </div>
41
+ <div class="col-sm-4 form-group button-range">
42
+ <button class="button_search button_spacing" @click="search()" >查询</button>
43
+ <button class="button_search button_spacing" @click="$parent.$parent.batchDelete()">批量删除</button>
44
+ <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
45
+ <button v-if="$parent.$parent.f_special"class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('单位')">添加单位</button>
46
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
47
+ <export-excel :data="$parent.$parent.getCondition"
48
+ :field="$parent.$parent.getfield"
49
+ sqlurl="api/af-revenue/logic/exportfile"
50
+ sql-name="manage_getarealist"
51
+ template-name='小区信息查询导出'
52
+ :choose-col="true"></export-excel>
53
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
54
+ </div>
55
+ </div>
56
+ <div class="row" v-if="$parent.$parent.criteriaShow">
57
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
58
+ <label class="font_normal_body">小区编号</label>
59
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
60
+ condition="f_area_id = '{}'" placeholder="小区编号"/>
61
+ </div>
62
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
63
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
64
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
65
+ condition="f_city like '%{}%'" placeholder="城市"
66
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
67
+ </div>
68
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
69
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
70
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
71
+ condition="f_district like '%{}%'" placeholder="区县"
72
+ :size="model.f_district ? model.f_district.length*2 : 6"/>
73
+ </div>
74
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
75
+ <label class="font_normal_body">街道/乡镇</label>
76
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
77
+ condition="f_street like '%{}%'" placeholder="街道/乡镇"
78
+ :size="model.f_street ? model.f_street.length*2 : 6"/>
79
+ </div>
80
+ <div :class="$parent.$parent.style">
81
+ <label class="font_normal_body">小区名称</label>
82
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area"
83
+ condition="f_residential_area like '%{}%'" placeholder="小区"
84
+ :size="model.f_residential_area ? model.f_residential_area.length*2 : 6"/>
85
+ </div>
86
+ <div :class="$parent.$parent.style">
87
+ <label class="font_normal_body">小区属性</label>
88
+ <v-select :options='$parent.$parent.areaAttributes' :value.sync="model.f_area_attributes"
89
+ close-on-select condition="f_area_attributes='{}'"
90
+ placeholder='小区属性' v-model="model.f_area_attributes"></v-select>
91
+ </div>
92
+ <div :class="$parent.$parent.style">
93
+ <label class="font_normal_body">房屋类型</label>
94
+ <v-select :options='$parent.$parent.housetype' :value.sync="model.f_house_type"
95
+ close-on-select condition="f_house_type='{}'"
96
+ placeholder='房屋类型' v-model="model.f_house_type"></v-select>
97
+ </div>
98
+ <div :class="$parent.$parent.style">
99
+ <label class="font_normal_body">安装位置</label>
100
+ <v-select :options='$parent.$parent.position' :value.sync="model.f_position"
101
+ close-on-select condition="f_position='{}'"
102
+ placeholder='安装位置' v-model="model.f_position"></v-select>
103
+ </div>
104
+ <div :class="$parent.$parent.style">
105
+ <label class="font_normal_body">&emsp;抄表员</label>
106
+ <v-select :options='$parent.$parent.inputtores' :value.sync="model.f_inputtor"
107
+ close-on-select condition="f_inputtor='{}'"
108
+ placeholder='抄表员' v-model="model.f_inputtor"></v-select>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </criteria>
113
+
114
+ <data-grid :model="model" partial='list' class="list_area table_sy" :optional="true" v-ref:grid>
115
+ <template partial='head'>
116
+ <th><nobr>序号</nobr></th>
117
+ <th v-if="false"><nobr>省份</nobr></th>
118
+ <th v-if="false"><nobr>城市</nobr></th>
119
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>区/县</nobr></th>
120
+ <th><nobr>街道/乡镇</nobr></th>
121
+ <th><nobr>社区</nobr></th>
122
+ <th><nobr>小区属性</nobr></th>
123
+ <!--民用小区信息开始-->
124
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
125
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>地址</nobr></th>
126
+ <th v-if="!$parent.$parent.$parent.f_special && !$parent.$parent.$parent.$parent.areaShow"><nobr>小区备注</nobr></th>
127
+ <!--民用小区信息结束-->
128
+ <!--非民用单位信息开始-->
129
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
130
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
131
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
132
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
133
+ <!--非民用单位信息结束-->
134
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>抄表员</nobr></th>
135
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>房屋类型</nobr></th>
136
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>安装位置</nobr></th>
137
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>片区/管理站 </nobr></th>
138
+ <th><nobr>操作人</nobr></th>
139
+ <th><nobr>操作日期</nobr></th>
140
+ <th title="该小区下现有的地址数"><nobr>地址数</nobr></th>
141
+ <th><nobr>操作</nobr></th>
142
+ </template>
143
+ <template partial='body'>
144
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
145
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
146
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
147
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
148
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
149
+ <td style="text-align:center"><nobr>{{row.f_community}}</nobr></td>
150
+ <td style="text-align:center"><nobr>{{row.f_area_attributes}}</nobr></td>
151
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
152
+ <td style="text-align:center"><nobr>{{row.f_area_address}}</nobr></td>
153
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
154
+ <!--非民用单位信息开始-->
155
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
156
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
157
+ <!--非民用单位信息结束-->
158
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_inputtor}}</nobr></td>
159
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_house_type}}</nobr></td>
160
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_position}}</nobr></td>
161
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
162
+ <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
163
+ <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
164
+ <td style="text-align:center"><button @click.stop="$parent.$parent.$parent.operates(row.id)" class="btn btn-link"><b>{{row.addressnum}}</b></button></td>
165
+ <td><nobr>
166
+ <!--<button type="button" name="button" class="btn btn-link"
167
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
168
+ <button v-if="!row.addressnum>0" type="button" name="button" class="btn btn-danger"
169
+ style="padding: 5px 12px"
170
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
171
+ </nobr>
172
+ </td>
173
+ </template>
174
+ <template partial='foot'></template>
175
+ </data-grid>
176
+ </criteria-paged>
177
+ <modal :show="showDelete" large backdrop="false" :width="900">
178
+ <header slot="modal-header" class="modal-header">
179
+ <p class="bg-info text-center" style="padding: 8px;">提示</p>
180
+ </header>
181
+ <article slot="modal-body" class="modal-body">
182
+ <p>您一共选中{{selectDataLen}}个小区,您确定是否要删除吗?</p>
183
+ </article>
184
+ <footer slot="modal-footer" class="modal-footer">
185
+ <button v-show="showDelete" type="button" class="button_search button_spacing" @click='confirmDelete()' :disabled='!$v.valid'>确认</button>
186
+ <button v-show="showDelete" type="button" class="button_clear button_spacing" @click='cancelDelete()'>取消</button>
187
+ </footer>
188
+ </modal>
189
+ </div>
190
+ </template>
191
+
192
+ <script>
193
+ import { PagedList } from 'vue-client'
194
+ let readyGen = async function (self) {
195
+ self.getfield = self.config.excelHeaders
196
+ self.search()
197
+ }
198
+ export default {
199
+
200
+ data () {
201
+ return {
202
+ showDelete: false,
203
+ criteriaShow: false,
204
+ model: new PagedList('api/af-revenue/sql/address_getarealist',20),
205
+ selectDataLen: 0,
206
+ addflag: false,
207
+ addtitle:'',
208
+ getfield: {},
209
+ getRowData:[],
210
+ // 公司下拉
211
+ curorgid: [this.$login.f.orgid],
212
+ f_orgid: '',
213
+ //初始化小区数据
214
+ areaslist:[],
215
+ config: {
216
+ // 导出列要和查询列相同
217
+ excelHeaders: {
218
+ 'f_district':'区/县',
219
+ 'f_street':'街道名称',
220
+ 'f_community':'社区名称',
221
+ 'f_area_attributes':'小区属性',
222
+ 'f_residential_area':'小区名称',
223
+ 'f_area_address':'小区地址',
224
+ 'f_comments':'小区备注',
225
+ 'f_inputtor':'抄表员',
226
+ 'f_house_type':'房屋类型',
227
+ 'f_position':'安装位置',
228
+ 'f_slice_area':'片区/管理站',
229
+ 'f_operator':'操作人',
230
+ 'f_operate_date':'操作日期',
231
+ 'addressnum':'地址数'
232
+ }
233
+ },
234
+ housetype:[{label:'全部',value:''},{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
235
+ areaAttributes: [{label: '新小区', value: '新小区'}, {label: '老小区', value: '老小区'}],
236
+ position:this.$appdata.getParam('安装位置')?[{label:'全部',value:''},...this.$appdata.getParam('安装位置')]:[{label:'全部',value:''}]
237
+ }
238
+ },
239
+ title: '小区管理',
240
+ props:{
241
+ f_filialeids:{
242
+ type: String
243
+ },
244
+ style: {
245
+ type: String,
246
+ default: 'col-sm-2 form-group'
247
+ },
248
+ f_special:{
249
+ type: String
250
+ }
251
+ },
252
+ ready(){
253
+ readyGen(this)
254
+
255
+ },
256
+ methods: {
257
+ hidden() {
258
+ this.criteriaShow = !this.criteriaShow
259
+ },
260
+ search() {
261
+ this.$refs.paged.$refs.cri.search()
262
+ },
263
+ operates(areaid){
264
+ this.$parent.areaShow = false
265
+ this.$parent.addressShow = true
266
+ this.$parent.areaid = areaid
267
+ },
268
+ async delete(row){
269
+ if(row.id >= 0){
270
+ var id = row.id
271
+ let useraredss = await this.$resetpost('api/af-revenue/sql/address_singleTable',
272
+ {data: {
273
+ items: 'f_residential_area_id',
274
+ tablename: 't_user_address',
275
+ condition: `f_residential_area_id='${id}'`}
276
+ },
277
+ {resolveMsg: null, rejectMsg: null})
278
+ if(useraredss.data.length>0){
279
+ this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
280
+ }else{
281
+ this.$resetdelete('api/af-revenue/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
282
+ this.$dispatch('cancel')
283
+ })
284
+ }
285
+ }
286
+ },
287
+ add(val){
288
+ if (this.f_filialeids) {
289
+ this.$refs.paged.$refs.grid.selectStore.selected = null
290
+ this.$dispatch('add')
291
+ } else {
292
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
293
+ }
294
+ },
295
+ modify(val){
296
+ this.$refs.paged.$refs.grid.selectStore.selected = null
297
+ this.$dispatch('modify',val)
298
+ },
299
+ selfSearch (args) {
300
+
301
+ if (!this.f_orgid) {
302
+ this.getorg([this.$login.f.orgid])
303
+ }
304
+ if(this.f_special){
305
+ args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
306
+ }else{
307
+ args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
308
+ }
309
+ this.model.search(args.condition, args.model)
310
+ this.$parent.addressShow = false
311
+ },
312
+ //清空
313
+ clear(){
314
+ this.$refs.paged.$refs.cri.model = {}
315
+ },
316
+ getorg (val) {
317
+ this.f_orgid = this.$login.convertToIn(val)
318
+ this.f_filialeids = val[0]
319
+ },
320
+ async batchDelete () {
321
+ let flag = true
322
+ if (this.f_filialeids) {
323
+ if (this.$refs.paged.$refs.grid.getRowData().length != 0) {
324
+ // 获取要批量删除的小区数据
325
+ this.getRowData = this.$refs.paged.$refs.grid.getRowData()
326
+ this.getRowData.forEach((row,n) => {
327
+ console.log(JSON.stringify(row) + '==========')
328
+ if (row.addressnum > 0 ) {
329
+ this.$showAlert('您所选择的小区下已有地址信息,无法删除!','warning',2000)
330
+ this.selectDataLen = 0
331
+ flag = false
332
+ }
333
+ })
334
+ if(flag){
335
+ this.selectDataLen = this.getRowData.length
336
+ console.log(this.selectDataLen + '-----------------------')
337
+ this.showDelete = true
338
+ }
339
+ } else {
340
+ this.$showAlert('请至少选择一项!', 'warning', 2000)
341
+ }
342
+ }else {
343
+ this.$showAlert('请先选择左上角的所在分公司!', 'warning', 2000)
344
+ }
345
+ },
346
+ confirmDelete () {
347
+ let msg = {
348
+ resolveMsg: '批量删除成功!',
349
+ rejectMsg: '批量删除失败!'
350
+ }
351
+ let oldAreaIds = this.getRowData
352
+ console.log('所选中的小区信息:=======' + JSON.stringify(oldAreaIds))
353
+ this.$resetpost('api/af-revenue/logic/batchDelete',{
354
+ data:{
355
+ oldAreaIds:oldAreaIds,
356
+ f_operator: this.$login.f.name,
357
+ f_operatorid: this.$login.f.id,
358
+ f_orgid: this.$login.f.orgid,
359
+ f_orgname: this.$login.f.orgs,
360
+ f_depid: this.$login.f.depids,
361
+ f_depname: this.$login.f.deps
362
+ }
363
+ },msg)
364
+ this.$refs.paged.$refs.grid.selectInit()
365
+ this.$refs.paged.$refs.cri.search()
366
+ this.showDelete = false
367
+ },
368
+ cancelDelete () {
369
+ this.$refs.paged.$refs.grid.selectInit()
370
+ this.$refs.paged.$refs.cri.search()
371
+ this.showDelete = false
372
+ },
373
+ // areaChange(val){
374
+ // console.log("小区变化",val)
375
+ // let selectArea // 选中的小区数据
376
+ // for (let row of this.areaslist) {
377
+ // if (val == row.value) {
378
+ // selectArea = row.data
379
+ // break
380
+ // }
381
+ // }
382
+ // if (selectArea) {
383
+ // this.areamodel.f_residential_area_id = selectArea.id
384
+ // this.areamodel.f_pcd = selectArea.f_pcd
385
+ // this.areamodel.f_pcd_id = selectArea.f_pcd_id
386
+ // this.areamodel.f_street = selectArea.f_street
387
+ // this.areamodel.f_street_id = selectArea.f_street_id
388
+ // this.areamodel.f_slice_area = selectArea.f_slice_area
389
+ // this.areamodel.f_residential_area = selectArea.f_residential_area
390
+ // }
391
+ // this.$nextTick(() => {
392
+ // this.$resetValidation()
393
+ // })
394
+ // },
395
+ },
396
+ watch:{
397
+
398
+ },
399
+ computed:{
400
+ getCondition() {
401
+ var condition=''
402
+ if(this.f_special){
403
+ condition = `${this.$refs.paged.$refs.cri.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
404
+ }else{
405
+ condition = `${this.$refs.paged.$refs.cri.condition} and s.f_filialeid = ${this.f_orgid}`
406
+ }
407
+ return {
408
+ condition: condition
409
+ }
410
+ },
411
+ inputtores () {
412
+ // 获取抄表员
413
+ let rs = new Array()
414
+ if (this.$login.f.f_gasman.length > 0) {
415
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
416
+ let temp = {
417
+ label: this.$login.f.f_gasman[i].name,
418
+ value: this.$login.f.f_gasman[i].name
419
+ }
420
+ rs.push(temp)
421
+ }
422
+ }
423
+ return rs
424
+ }
425
+ }
426
+
427
+ }
428
+ </script>
@@ -2,7 +2,8 @@
2
2
  import Vue from 'vue'
3
3
 
4
4
  let specialComp = {
5
- // 'area-list': (resolve) => { require(['./AreaList'], resolve) },
5
+ //小区列表
6
+ 'area-list': (resolve) => { require(['./AreaList'], resolve) },
6
7
  // 添加小区
7
8
  'add-area-msg': (resolve) => { require(['./AddAreaMsg'], resolve) }
8
9
  }