address-client 3.2.108 → 3.2.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/.gradle/8.5/checksums/checksums.lock +0 -0
  2. package/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  3. package/.gradle/8.5/dependencies-accessors/gc.properties +0 -0
  4. package/.gradle/8.5/executionHistory/executionHistory.bin +0 -0
  5. package/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
  6. package/.gradle/8.5/fileChanges/last-build.bin +0 -0
  7. package/.gradle/8.5/fileHashes/fileHashes.bin +0 -0
  8. package/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  9. package/.gradle/8.5/gc.properties +0 -0
  10. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  12. package/.gradle/file-system.probe +0 -0
  13. package/.gradle/vcs-1/gc.properties +0 -0
  14. package/CHANGELOG.md +15 -15
  15. package/build/dev-server.js +185 -185
  16. package/build/libs/AddressClient-V3-3.0.11.jar +0 -0
  17. package/build/tmp/jar/MANIFEST.MF +2 -0
  18. package/build/versionCheck.js +31 -31
  19. package/build/webpack.base.conf.js +82 -82
  20. package/examples/showAdd/App.vue +40 -40
  21. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  22. package/gradle/wrapper/gradle-wrapper.properties +7 -0
  23. package/gradlew +249 -0
  24. package/gradlew.bat +92 -0
  25. package/index.html +44 -44
  26. package/package.json +101 -101
  27. package/src/address.js +74 -74
  28. package/src/components/AddAreaMsg.vue +757 -757
  29. package/src/components/AddCommunityManageMsg.vue +220 -220
  30. package/src/components/AddStreetManageMsg.vue +204 -204
  31. package/src/components/AddStreetOrPcd.vue +316 -316
  32. package/src/components/AddressAddAddress.vue +479 -479
  33. package/src/components/AddressFiles.vue +156 -156
  34. package/src/components/AddressList.vue +632 -630
  35. package/src/components/AddressListLiuLi.vue +17 -17
  36. package/src/components/AddressManage.vue +117 -117
  37. package/src/components/AddressTree.vue +501 -501
  38. package/src/components/AreaFiles.vue +73 -73
  39. package/src/components/AreaList.vue +410 -410
  40. package/src/components/AreaManage.vue +104 -104
  41. package/src/components/AreaTree.vue +508 -508
  42. package/src/components/Basch.vue +72 -72
  43. package/src/components/BatchOrders.vue +328 -328
  44. package/src/components/BuildingList.vue +129 -129
  45. package/src/components/CityList.vue +134 -134
  46. package/src/components/CityManage.vue +76 -76
  47. package/src/components/CommunityAreaList.vue +87 -87
  48. package/src/components/CommunityManage.vue +78 -78
  49. package/src/components/CommunityManageList.vue +244 -244
  50. package/src/components/NewAddressInfo.vue +432 -432
  51. package/src/components/StreetList.vue +241 -241
  52. package/src/components/StreetManage.vue +68 -68
  53. package/src/components/StreetManageList.vue +225 -225
  54. package/src/components/UserAddress.vue +908 -908
  55. package/src/components/UserAddressChange.vue +58 -58
  56. package/src/components/selectAddress/BatchList.vue +326 -326
  57. package/src/filiale/WEINAN/AddAreaMsg.vue +745 -745
  58. package/src/filiale/WEINAN/AddressList.vue +588 -588
  59. package/src/filiale/WEINAN/AddressManage.vue +122 -122
  60. package/src/filiale/WEINAN/AreaList.vue +435 -435
  61. package/src/filiale/WEINAN/AreaManage.vue +109 -109
  62. package/src/filiale/WEINAN/AreaUserList.vue +226 -226
  63. package/src/filiale/WEINAN/UserAddress.vue +783 -783
  64. package/src/filiale/WEINAN/sale.js +18 -18
  65. package/src/filiale/chengtou/UserAddress.vue +894 -894
  66. package/src/filiale/chengtou/sale.js +7 -7
  67. package/src/filiale/dongguan/AddStreetOrPcd.vue +422 -422
  68. package/src/filiale/dongguan/sale.js +7 -7
  69. package/src/filiale/gaomi/AddressList.vue +430 -430
  70. package/src/filiale/gaomi/UserAddress.vue +832 -832
  71. package/src/filiale/gaomi/sale.js +14 -14
  72. package/src/filiale/gongyi/AddAreaMsg.vue +651 -651
  73. package/src/filiale/gongyi/AreaManage.vue +100 -100
  74. package/src/filiale/gongyi/UserAddress.vue +751 -751
  75. package/src/filiale/gongyi/sale.js +14 -14
  76. package/src/filiale/haile/AddressList.vue +615 -615
  77. package/src/filiale/haile/sale.js +8 -8
  78. package/src/filiale/jingwei/UserAddress.vue +764 -764
  79. package/src/filiale/jingwei/sale.js +12 -12
  80. package/src/filiale/lixianV3/AreaList.vue +416 -416
  81. package/src/filiale/lixianV3/sale.js +12 -12
  82. package/src/filiale/macheng/AddAreaMsg.vue +635 -635
  83. package/src/filiale/macheng/AddStreetOrPcd.vue +231 -231
  84. package/src/filiale/macheng/AddressList.vue +613 -613
  85. package/src/filiale/macheng/AreaList.vue +318 -318
  86. package/src/filiale/macheng/CityManage.vue +76 -76
  87. package/src/filiale/macheng/StreetList.vue +186 -186
  88. package/src/filiale/macheng/UserAddress.vue +743 -743
  89. package/src/filiale/macheng/sale.js +17 -17
  90. package/src/filiale/meihekou/UserAddress.vue +898 -898
  91. package/src/filiale/meihekou/sale.js +8 -8
  92. package/src/filiale/qianneng/AddAreaMsg.vue +755 -755
  93. package/src/filiale/qianneng/AddStreetOrPcd.vue +328 -328
  94. package/src/filiale/qianneng/AddressList.vue +638 -638
  95. package/src/filiale/qianneng/AreaList.vue +431 -431
  96. package/src/filiale/qianneng/CityManage.vue +81 -81
  97. package/src/filiale/qianneng/UserAddress.vue +1125 -1125
  98. package/src/filiale/qianneng/sale.js +20 -20
  99. package/src/filiale/qinhua/AddAreaMsg.vue +743 -743
  100. package/src/filiale/qinhua/AddressList.vue +627 -627
  101. package/src/filiale/qinhua/AddressManage.vue +117 -117
  102. package/src/filiale/qinhua/AreaList.vue +425 -425
  103. package/src/filiale/qinhua/AreaManage.vue +100 -100
  104. package/src/filiale/qinhua/CityManage.vue +76 -76
  105. package/src/filiale/qinhua/StreetList.vue +241 -241
  106. package/src/filiale/qinhua/UserAddress.vue +894 -894
  107. package/src/filiale/qinhua/sale.js +20 -20
  108. package/src/filiale/rizhao/UserAddress.vue +897 -897
  109. package/src/filiale/rizhao/sale.js +8 -8
  110. package/src/filiale/rongcheng/AddressList.vue +363 -363
  111. package/src/filiale/rongcheng/UserAddress.vue +799 -799
  112. package/src/filiale/rongcheng/sale.js +11 -11
  113. package/src/filiale/shanggao/AddAreaMsg.vue +752 -752
  114. package/src/filiale/shanggao/AddStreetOrPcd.vue +312 -312
  115. package/src/filiale/shanggao/AddressList.vue +613 -613
  116. package/src/filiale/shanggao/AreaList.vue +436 -436
  117. package/src/filiale/shanggao/BuildingList.vue +129 -129
  118. package/src/filiale/shanggao/StreetList.vue +240 -240
  119. package/src/filiale/shanggao/UserAddress.vue +953 -953
  120. package/src/filiale/shanggao/sale.js +16 -16
  121. package/src/filiale/shanxian/AddAreaMsg.vue +766 -766
  122. package/src/filiale/shanxian/AddressList.vue +658 -658
  123. package/src/filiale/shanxian/AreaList.vue +458 -458
  124. package/src/filiale/shanxian/AreaManage.vue +107 -107
  125. package/src/filiale/shanxian/UserAddress.vue +900 -900
  126. package/src/filiale/shanxian/sale.js +15 -15
  127. package/src/filiale/shaoguan/AddAreaMsg.vue +629 -629
  128. package/src/filiale/shaoguan/UserAddress.vue +762 -762
  129. package/src/filiale/shaoguan/sale.js +11 -11
  130. package/src/filiale/tongchuan/AddAreaMsg.vue +635 -635
  131. package/src/filiale/tongchuan/AddStreetOrPcd.vue +351 -351
  132. package/src/filiale/tongchuan/AddressList.vue +379 -379
  133. package/src/filiale/tongchuan/AreaList.vue +315 -315
  134. package/src/filiale/tongchuan/AreaManage.vue +100 -100
  135. package/src/filiale/tongchuan/CityList.vue +133 -133
  136. package/src/filiale/tongchuan/StreetList.vue +215 -215
  137. package/src/filiale/tongchuan/UserAddress.vue +822 -822
  138. package/src/filiale/tongchuan/sale.js +19 -19
  139. package/src/filiale/wuhai/UserAddress.vue +795 -795
  140. package/src/filiale/wuhai/sale.js +12 -12
  141. package/src/filiale/xinkang/AddAreaMsg.vue +780 -780
  142. package/src/filiale/xinkang/AreaList.vue +413 -413
  143. package/src/filiale/xinkang/sale.js +9 -9
  144. package/src/filiale/yangchun/AddAreaMsg.vue +764 -764
  145. package/src/filiale/yangchun/sale.js +7 -7
  146. package/src/filiale/zhongsheng/AddressList.vue +671 -671
  147. package/src/filiale/zhongsheng/AreaList.vue +500 -500
  148. package/src/filiale/zhongsheng/sale.js +12 -12
  149. package/src/filiale/zhongyi/AddAreaMsg.vue +757 -757
  150. package/src/filiale/zhongyi/sale.js +12 -12
  151. package/src/filiale/zhoukou/AddAreaMsg.vue +673 -673
  152. package/src/filiale/zhoukou/AddressList.vue +391 -391
  153. package/src/filiale/zhoukou/AddressManage.vue +115 -115
  154. package/src/filiale/zhoukou/AreaList.vue +319 -319
  155. package/src/filiale/zhoukou/AreaManage.vue +100 -100
  156. package/src/filiale/zhoukou/UserAddress.vue +925 -925
  157. package/src/filiale/zhoukou/sale.js +23 -23
  158. package/src/main.js +23 -23
@@ -1,432 +1,432 @@
1
- <template>
2
- <div class="auto">
3
- <validator name='v' >
4
- <div class="auto">
5
- <div class="flex-row lb"><label style="margin-left: 6px">小区信息</label></div>
6
- <div class="flex-row auto box">
7
- <div class="addresstitle"><label>小区默认表具信息</label></div>
8
- <div class="addressbody">
9
- <form class="form-horizontal" style="flex: 1;">
10
- <div class="form-group auto">
11
- <div class="col-sm-3 average" :class="[$v.type.required ? 'select-error' : '']">
12
- <input type="text" v-show="false" v-model="$refs.type.selectedItems" v-validate:type='{required: true }'>
13
- <v-select :value.sync="model.f_user_type" v-model="model.f_user_type" :value-single="true"
14
- :options='usertypes' placeholder='客户类型' close-on-select v-ref:type></v-select>
15
- </div>
16
- <div class="col-sm-3 average" :class="[$v.nature.required ? 'select-error' : '']">
17
- <input type="text" v-show="false" v-model="$refs.nature.selectedItems" v-validate:nature='{required: true }'>
18
- <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties" :value-single="true"
19
- :options='gasproperties' placeholder='用气性质'
20
- close-on-select v-ref:nature></v-select>
21
- </div>
22
- <div class="col-sm-3 average" :class="[$v.f_brand.required ? 'select-error' : '']" >
23
- <input type="text" v-show="false" v-model="$refs.f_brand.selectedItems" v-validate:f_brand='{required: true }'>
24
- <v-select :value.sync="model.f_meter_brand" :options='meterbrands' placeholder='气表品牌' close-on-select :value-single="true"
25
- v-model='model.f_meter_brand' v-ref:f_brand></v-select>
26
- </div>
27
- <div class="col-sm-3 average" :class="[$v.f_style.required ? 'select-error' : '']">
28
- <input type="text" v-show="false" v-model="$refs.f_style.selectedItems" v-validate:f_style='{required: true }'>
29
- <v-select :value.sync="model.f_meter_style" :options='meterstyle' placeholder='气表型号' close-on-select :value-single="true" v-model='model.f_meter_style' v-ref:f_style></v-select>
30
- </div>
31
- <div class="col-sm-3 average" :class="[$v.pricetype.required ? 'select-error' : '']">
32
- <input type="text" v-show="false" v-model="$refs.pricetype.selectedItems" v-validate:pricetype='{required: true }'>
33
- <v-select :value.sync="model.f_price_type" v-model="model.f_price_type" :value-single="true"
34
- :options='f_price_types' placeholder='气价类型'
35
- close-on-select v-ref:pricetype></v-select>
36
- </div>
37
- </div>
38
- <div class="form-group auto">
39
- <div class="col-sm-3 average" :class="[$v.pricename.required ? 'select-error' : '']">
40
- <input type="text" v-show="false" v-model="$refs.pricename.selectedItems" v-validate:pricename='{required: true }'>
41
- <v-select :value.sync="model.f_price_name" v-model="model.f_price_name" :value-single="true"
42
- :options='pricenames' placeholder='气价名称'
43
- close-on-select v-ref:pricename></v-select>
44
- </div>
45
- <div class="col-sm-3 average" >
46
- <v-select :value.sync="model.f_position" v-model="model.f_position" :value-single="true" :options='positions'
47
- placeholder='安装位置' close-on-select ></v-select>
48
- </div>
49
- <div class=" col-sm-3 average" >
50
- <v-select :value.sync="model.f_inputtor" v-model="model.f_inputtor" :value-single="true"
51
- :options='inputtores' placeholder=' 抄表员' close-on-select ></v-select>
52
- </div>
53
- <div class="col-sm-3 average" >
54
- <v-select :value.sync="model.f_adjustable_id" :options='adjustables' placeholder=' 调压箱' close-on-select :value-single="true" v-model='model.f_adjustable_id' :search='true' ></v-select>
55
- </div>
56
- <div class="col-sm-3 average" >
57
- <v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area" :value-single="true"
58
- :options='sliceArea' placeholder='片区/管理站' close-on-select></v-select>
59
- </div>
60
- </div>
61
- </form>
62
- </div>
63
- </div>
64
- </div>
65
- </validator>
66
- <div class="form-group auto button" style="overflow: auto">
67
- <button type="button" class="btn btn-success" :disabled="!$v.valid" @click="this.$emit('addchild')" >保存</button>
68
- <button type="button" class="btn btn-info" @click="this.$emit('signout')" >取消</button>
69
- </div>
70
- </div>
71
- </template>
72
-
73
- <script>
74
- import co from 'co'
75
-
76
- let getMeterType = function * (self) {
77
- if (self.row) {
78
- let result = yield self.$resetpost('api/af-revenue/sql/querySingleTable', {data: {items: 'f_meter_type', tablename: 't_gasbrand', condition: `f_meter_brand = '${self.row.f_meter_brand}'`}}, {resolveMsg: null, rejectMsg: null})
79
- if (result && result.data.length > 0) {
80
- console.log('数据格式是神马样子的', result)
81
- if (result.data[0].f_meter_type === '物联网表') {
82
- self.viewsee = true
83
- } else {
84
- self.viewsee = false
85
- }
86
- }
87
- }
88
- }
89
-
90
- let areaGen =async function (self, areaid, parent) {
91
- let data = {}
92
- console.log("小区信息parent的值: ", parent)
93
- console.log("小区信息model的值: ", self.model)
94
- data.f_area = parent.f_area //区
95
- // data.f_slice_area = parent.f_slice_area //片区
96
- data.f_slice_area = self.model.f_slice_area //片区
97
- data.f_street = parent.f_street //街道
98
- data.f_residential_area = parent.f_residential_area //小区名称
99
- data.f_area_address = parent.f_area_address //详细地址
100
- data.f_area_id = areaid // 地址id
101
- data.f_areastr = parent.f_areastr //地址id串
102
- // 如果数据中有id,不校验小区是存在
103
- if (self.model.id) {
104
- data.id = self.model.id
105
- } else {
106
- let tablename = 't_area'
107
- let condition = `f_area_id='${data.f_area_id}'`
108
- console.log('做小区验证了,,,,condition,', condition)
109
- let areaRes = await self.$SqlService.singleTable(tablename, condition)
110
- if (areaRes.data.length > 0) {
111
- // self.$showAlert('小区已存在, 请重新输入', 'danger', 2000)
112
- self.model.f_area = ''
113
- self.model.f_street = ''
114
- self.model.f_residential_area = ''
115
- return
116
- }
117
- }
118
- data.f_filiale = self.model.f_filiale ? self.model.f_filiale : self.$login.f.f_fengongsi
119
- data.f_filialeids = self.model.f_filialeids ? self.model.f_filialeids : self.$login.f.f_orgids
120
- data.f_orgstr = self.model.f_orgstr ? self.model.f_orgstr : self.$login.f.orgpathstr
121
- data.f_outlets = self.$login.f.f_parentname
122
- data.f_show_way = self.model.f_show_way
123
- data.f_adjustable_id = self.model.f_adjustable_id!=''?self.model.f_adjustable_id:null
124
- data.f_price_type = self.model.f_price_type // 气价类型
125
- data.f_price_name = self.model.f_price_name // 气价名称
126
- data.f_user_type = self.model.f_user_type // 用户类型
127
- data.f_gasproperties = self.model.f_gasproperties// 用气性质
128
- data.f_meter_brand = self.model.f_meter_brand // 气表品牌
129
- data.f_meter_style = self.model.f_meter_style?self.model.f_meter_style.f_meter_style:'' // 气表型号
130
- data.f_type = self.model.f_meter_style?self.model.f_meter_style.f_type:'' // 气表型号类型
131
- data.f_position = self.model.f_position// 表安装位置
132
- data.f_inputtor = self.model.f_inputtor // 抄表员
133
- data.f_operator = self.$login.f.name // 操作人
134
- data.f_operate_date = self.$login.toStandardTimeString() // 操作时间
135
- // 父表record中插入
136
- data.f_operat_type = '新建小区'
137
- data.f_operat_type = `新建${self.model.f_residential_area}`
138
- data.f_state = '有效'
139
- data.f_delaypay = 0
140
- console.log("数据参数附属:"+JSON.stringify(data))
141
- let result = await self.$resetpost('api/af-revenue/entity/t_area', data)
142
- // self.$dispatch('success', '新建小区成功', 'new-area-info', data)
143
- console.log("result=", result.data)
144
- self.initModel()
145
- return result
146
- }
147
-
148
- let validateAddressGen = function * (self) {
149
- let areaRes = yield self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: {tablename: 't_area', condition: `f_residential_area = '${self.model.f_residential_area}' and f_street = '${self.model.f_street}'`}}, {resolveMsg: null, rejectMsg: '验证小区,查询出错!!!!'})
150
- console.log('查询出的小区,,,', areaRes)
151
- if (areaRes.data.length > 0) {
152
- self.$showAlert('小区已存在, 请重新输入', 'danger', 0)
153
- self.model.f_street = ''
154
- self.model.f_residential_area = ''
155
- }
156
- }
157
-
158
- export default {
159
- title: '新建小区',
160
- data () {
161
- return {
162
- viewsee: false,
163
- model: {
164
- f_area: '',
165
- f_adjustable_id: '',
166
- f_user_type: '',
167
- f_meter_brand: '',
168
- f_show_way: '',
169
- f_meter_style: '',
170
- f_inputtor: '',
171
- f_position: '',
172
- f_price_type: '', // 气价表中,气价类型
173
- f_price_name: '', // 气价表中,气价名称
174
- f_gasproperties: '' // 气价表中,用气性质
175
- },
176
- imgdefault: '/images/mainicon/biaopan.png',
177
- }
178
- },
179
- props: ['row','areatype'],
180
- ready () {
181
- return co(getMeterType(this)).then(() => {
182
- if(this.areatype) {
183
- this.model.f_area = this.areatype
184
- }
185
- if (this.row) {
186
- this.init()
187
- }
188
- })
189
- },
190
- watch: {
191
- // 'model.f_meter_brand' (val) {
192
- // console.log('val里面是神马', val)
193
- // if (val && val.length > 0) {
194
- // this.$resetpost('api/af-revenue/sql/querySingleTable', {data: {items: 'f_meter_type', tablename: 't_gasbrand', condition: `f_meter_brand = '${val[0].f_meter_brand}'`}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
195
- // console.log('res是神马呀', res)
196
- // if (res.data[0].f_meter_type === '物联网表') {
197
- // this.viewsee = true
198
- // } else {
199
- // this.viewsee = false
200
- // }
201
- // }).catch((error) => {
202
- // console.log('异常提示:' + error)
203
- // })
204
- // }
205
- // },
206
- 'row' (val) {
207
- if (val) {
208
- this.init() // 初始化区,和片区
209
- } else {
210
- this.initModel() // 清空数据
211
- }
212
- },
213
- 'areatype' (val) {
214
- if(val) {
215
- this.model.f_area =val // 初始化 区
216
- } else {
217
- this.model.f_area = null //清除 区
218
- }
219
- },
220
- 'model.f_slice_area' (val) {
221
- console.log("model.f_slice_area = ", val)
222
- }
223
- },
224
- methods: {
225
- confirm (areaid, parent) {
226
- return areaGen(this, areaid, parent).then(() => {
227
- this.$emit('ready')
228
- }).catch((error) => {
229
- this.$emit('error', error)
230
- })
231
- },
232
- cancel () {
233
- this.$dispatch('clean', '取消新建小区', 'new-area-info')
234
- },
235
- validateAddress () {
236
- console.log('开始地址验证..', this.model.f_street, this.model.f_residential_area)
237
- if (this.model.f_street && this.model.f_residential_area) {
238
- co(validateAddressGen(this))
239
- }
240
- },
241
- // 小区初始化
242
- init() {
243
- this.model = Object.assign({}, this.model, this.row)
244
- // 初始化 气表型号
245
- if(this.model.f_meter_brand) {
246
- console.log("2222: ", this.model.f_meter_brand)
247
- this.$GetSaleParam.getGasbrand().forEach((item, index) => {
248
- // 根据气表品牌 查找气表型号
249
- if(this.model.f_meter_brand == item.value.f_meter_brand) {
250
- item.value.gasmodel.forEach((iten, inde) => {
251
- // 用 f_type 和 f_meter_style 去匹配 气表型号
252
- if(this.row.f_meter_style==iten.value.f_meter_style && this.row.f_type==iten.value.f_type) {
253
- console.log("11111: ",iten, " ", this.row)
254
- this.model.f_meter_style = iten.value
255
- }
256
- })
257
- }
258
- })
259
- }
260
- console.log("初始化 气表型号: ", this.model.f_meter_style)
261
- },
262
- initModel () {
263
- this.model = {
264
- f_adjustable_id: '',
265
- f_user_type: '',
266
- f_meter_brand: '',
267
- f_show_way: '',
268
- f_meter_style: '',
269
- f_inputtor: '',
270
- f_position: '',
271
- f_price_type: '', // 气价表中,气价类型
272
- f_price_name: '', // 气价表中,气价名称
273
- f_gasproperties: '' // 气价表中,用气性质
274
- }
275
- }
276
- },
277
- computed: {
278
- usertypes () {
279
- console.log('获取用户类型。,。。', this.$appdata.getParam('用户类型'))
280
- return this.$appdata.getParam('用户类型')
281
- },
282
- f_price_types () {
283
- return this.$appdata.getParam('气价类型')
284
- },
285
- viewstyle () {
286
- return this.$appdata.getParam('显示类型')
287
- },
288
- gasproperties () {
289
- let rs = []
290
- if (this.model.f_user_type) {
291
- rs = this.$appdata.getParam(this.model.f_user_type)
292
- }
293
- return rs
294
- },
295
- positions () {
296
- let ret = this.$appdata.getParam('安装位置')
297
- return ret
298
- },
299
- inputtores () {
300
- // 获取抄表员
301
- console.log('获取抄表员', this.$login.f)
302
- let rs = new Array()
303
- if (this.$login.f.f_gasman.length > 0) {
304
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
305
- let temp = {
306
- label: this.$login.f.f_gasman[i].name,
307
- value: this.$login.f.f_gasman[i].name
308
- }
309
- rs.push(temp)
310
- }
311
- }
312
- // let rs = this.$appdata.getParam('抄表员')
313
- return rs
314
- },
315
- sliceArea () {
316
- let rs = new Array()
317
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
318
- let temp = {
319
- label: this.$login.f.f_allArea[i].label,
320
- value: this.$login.f.f_allArea[i].label
321
- }
322
- rs.push(temp)
323
- }
324
- return rs
325
- },
326
- meterbrands () {
327
- let ret = this.$GetSaleParam.getGasbrand()
328
- let rs = new Array()
329
- ret.forEach((item, index) =>{
330
- rs.push({label: item.label, value: item.value.f_meter_brand})
331
- })
332
- console.log("气表品牌: ", rs)
333
- return rs
334
- },
335
- meterstyle() {
336
- let ret = this.$GetSaleParam.getGasbrand()
337
- console.log("气表型号ret: ", ret)
338
- let rs = new Array()
339
- if(this.model.f_meter_brand) {
340
- ret.forEach((item, index) => {
341
- if(this.model.f_meter_brand == item.value.f_meter_brand) {
342
- rs = item.value.gasmodel
343
- // item.value.gasmodel.forEach((item1, index1) => {
344
- // rs.push({label: item1.label, value: item1.value.f_meter_style})
345
- // })
346
- }
347
- })
348
- }
349
- console.log("气表型号rs: ", rs)
350
- return rs
351
- },
352
- adjustables () {
353
- let filter = this.$login.f.f_orgids
354
- let ret = this.$GetSaleParam.getAdjustable(filter)
355
- let arr = new Array()
356
- ret.forEach((item, index) => {
357
- arr.push({label: `[${item.value.f_adjustable_id}]-${item.label}`, value: item.value.id})
358
- // arr[index].label = `[${item.value.f_adjustable_id}]-${item.label}`
359
- // arr[index].value = item.value.id
360
- })
361
- return [{label: '全部', value: ''}, ...arr]
362
- },
363
- pricenames () {
364
- let rs = new Array()
365
- if (this.model.f_user_type && this.model.f_gasproperties && this.model.f_price_type) {
366
- let params = {
367
- f_user_type: this.model.f_user_type,
368
- f_gasproperties: this.model.f_gasproperties,
369
- f_price_type: this.model.f_price_type,
370
- filter: this.$login.f.f_fengongsi
371
- }
372
- console.log('气价参数。,。。', params)
373
- let ret = this.$GetSaleParam.getPrice(params)
374
- ret.forEach((item, index) => {
375
- rs.push({label: item.label, value: item.value.f_price_name})
376
- // rs[index].value = item.value.f_price_name
377
- })
378
- }
379
- return rs
380
- }
381
- }
382
- }
383
- </script>
384
- <style lang="less" scoped>
385
- .average{
386
- width: 20%;
387
- }
388
- v-select{
389
- width: 110px;
390
- height: 30px;
391
- border-radius: 2px;
392
- border: 1px solid #d0d0d0;
393
- background-color: #ffffff;
394
- }
395
- .box {
396
- width: 727px;
397
- height: 175px;
398
- border-radius: 2px;
399
- background-color: #fafafa;
400
- border: 1px solid #999999;
401
- margin-top: 13px;
402
- }
403
- .addresstitle{
404
- width: 100%;
405
- height: 20%;
406
- font-family: PingFangSC-Bold;
407
- font-size: 16px;
408
- color: #666666;
409
- margin-top: 20px;
410
- margin-left: 20px;
411
- text-align: left;
412
- }
413
- .addressbody{
414
- margin-top: 60px;
415
- width: 100%;
416
- height: auto;
417
- position: absolute;
418
- }
419
- .lb{
420
- width: 100%;
421
- padding-left: 8px;
422
- border: none;
423
- border-left: 4px solid #3db6ef;
424
- font-size: 16px;
425
- font-family: PingFangSC-Bold;
426
- color: #666666;
427
- text-align: left;
428
- }
429
- .button{
430
- margin-top: 20px;
431
- }
432
- </style>
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v' >
4
+ <div class="auto">
5
+ <div class="flex-row lb"><label style="margin-left: 6px">小区信息</label></div>
6
+ <div class="flex-row auto box">
7
+ <div class="addresstitle"><label>小区默认表具信息</label></div>
8
+ <div class="addressbody">
9
+ <form class="form-horizontal" style="flex: 1;">
10
+ <div class="form-group auto">
11
+ <div class="col-sm-3 average" :class="[$v.type.required ? 'select-error' : '']">
12
+ <input type="text" v-show="false" v-model="$refs.type.selectedItems" v-validate:type='{required: true }'>
13
+ <v-select :value.sync="model.f_user_type" v-model="model.f_user_type" :value-single="true"
14
+ :options='usertypes' placeholder='客户类型' close-on-select v-ref:type></v-select>
15
+ </div>
16
+ <div class="col-sm-3 average" :class="[$v.nature.required ? 'select-error' : '']">
17
+ <input type="text" v-show="false" v-model="$refs.nature.selectedItems" v-validate:nature='{required: true }'>
18
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties" :value-single="true"
19
+ :options='gasproperties' placeholder='用气性质'
20
+ close-on-select v-ref:nature></v-select>
21
+ </div>
22
+ <div class="col-sm-3 average" :class="[$v.f_brand.required ? 'select-error' : '']" >
23
+ <input type="text" v-show="false" v-model="$refs.f_brand.selectedItems" v-validate:f_brand='{required: true }'>
24
+ <v-select :value.sync="model.f_meter_brand" :options='meterbrands' placeholder='气表品牌' close-on-select :value-single="true"
25
+ v-model='model.f_meter_brand' v-ref:f_brand></v-select>
26
+ </div>
27
+ <div class="col-sm-3 average" :class="[$v.f_style.required ? 'select-error' : '']">
28
+ <input type="text" v-show="false" v-model="$refs.f_style.selectedItems" v-validate:f_style='{required: true }'>
29
+ <v-select :value.sync="model.f_meter_style" :options='meterstyle' placeholder='气表型号' close-on-select :value-single="true" v-model='model.f_meter_style' v-ref:f_style></v-select>
30
+ </div>
31
+ <div class="col-sm-3 average" :class="[$v.pricetype.required ? 'select-error' : '']">
32
+ <input type="text" v-show="false" v-model="$refs.pricetype.selectedItems" v-validate:pricetype='{required: true }'>
33
+ <v-select :value.sync="model.f_price_type" v-model="model.f_price_type" :value-single="true"
34
+ :options='f_price_types' placeholder='气价类型'
35
+ close-on-select v-ref:pricetype></v-select>
36
+ </div>
37
+ </div>
38
+ <div class="form-group auto">
39
+ <div class="col-sm-3 average" :class="[$v.pricename.required ? 'select-error' : '']">
40
+ <input type="text" v-show="false" v-model="$refs.pricename.selectedItems" v-validate:pricename='{required: true }'>
41
+ <v-select :value.sync="model.f_price_name" v-model="model.f_price_name" :value-single="true"
42
+ :options='pricenames' placeholder='气价名称'
43
+ close-on-select v-ref:pricename></v-select>
44
+ </div>
45
+ <div class="col-sm-3 average" >
46
+ <v-select :value.sync="model.f_position" v-model="model.f_position" :value-single="true" :options='positions'
47
+ placeholder='安装位置' close-on-select ></v-select>
48
+ </div>
49
+ <div class=" col-sm-3 average" >
50
+ <v-select :value.sync="model.f_inputtor" v-model="model.f_inputtor" :value-single="true"
51
+ :options='inputtores' placeholder=' 抄表员' close-on-select ></v-select>
52
+ </div>
53
+ <div class="col-sm-3 average" >
54
+ <v-select :value.sync="model.f_adjustable_id" :options='adjustables' placeholder=' 调压箱' close-on-select :value-single="true" v-model='model.f_adjustable_id' :search='true' ></v-select>
55
+ </div>
56
+ <div class="col-sm-3 average" >
57
+ <v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area" :value-single="true"
58
+ :options='sliceArea' placeholder='片区/管理站' close-on-select></v-select>
59
+ </div>
60
+ </div>
61
+ </form>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </validator>
66
+ <div class="form-group auto button" style="overflow: auto">
67
+ <button type="button" class="btn btn-success" :disabled="!$v.valid" @click="this.$emit('addchild')" >保存</button>
68
+ <button type="button" class="btn btn-info" @click="this.$emit('signout')" >取消</button>
69
+ </div>
70
+ </div>
71
+ </template>
72
+
73
+ <script>
74
+ import co from 'co'
75
+
76
+ let getMeterType = function * (self) {
77
+ if (self.row) {
78
+ let result = yield self.$resetpost('api/af-revenue/sql/querySingleTable', {data: {items: 'f_meter_type', tablename: 't_gasbrand', condition: `f_meter_brand = '${self.row.f_meter_brand}'`}}, {resolveMsg: null, rejectMsg: null})
79
+ if (result && result.data.length > 0) {
80
+ console.log('数据格式是神马样子的', result)
81
+ if (result.data[0].f_meter_type === '物联网表') {
82
+ self.viewsee = true
83
+ } else {
84
+ self.viewsee = false
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+ let areaGen =async function (self, areaid, parent) {
91
+ let data = {}
92
+ console.log("小区信息parent的值: ", parent)
93
+ console.log("小区信息model的值: ", self.model)
94
+ data.f_area = parent.f_area //区
95
+ // data.f_slice_area = parent.f_slice_area //片区
96
+ data.f_slice_area = self.model.f_slice_area //片区
97
+ data.f_street = parent.f_street //街道
98
+ data.f_residential_area = parent.f_residential_area //小区名称
99
+ data.f_area_address = parent.f_area_address //详细地址
100
+ data.f_area_id = areaid // 地址id
101
+ data.f_areastr = parent.f_areastr //地址id串
102
+ // 如果数据中有id,不校验小区是存在
103
+ if (self.model.id) {
104
+ data.id = self.model.id
105
+ } else {
106
+ let tablename = 't_area'
107
+ let condition = `f_area_id='${data.f_area_id}'`
108
+ console.log('做小区验证了,,,,condition,', condition)
109
+ let areaRes = await self.$SqlService.singleTable(tablename, condition)
110
+ if (areaRes.data.length > 0) {
111
+ // self.$showAlert('小区已存在, 请重新输入', 'danger', 2000)
112
+ self.model.f_area = ''
113
+ self.model.f_street = ''
114
+ self.model.f_residential_area = ''
115
+ return
116
+ }
117
+ }
118
+ data.f_filiale = self.model.f_filiale ? self.model.f_filiale : self.$login.f.f_fengongsi
119
+ data.f_filialeids = self.model.f_filialeids ? self.model.f_filialeids : self.$login.f.f_orgids
120
+ data.f_orgstr = self.model.f_orgstr ? self.model.f_orgstr : self.$login.f.orgpathstr
121
+ data.f_outlets = self.$login.f.f_parentname
122
+ data.f_show_way = self.model.f_show_way
123
+ data.f_adjustable_id = self.model.f_adjustable_id!=''?self.model.f_adjustable_id:null
124
+ data.f_price_type = self.model.f_price_type // 气价类型
125
+ data.f_price_name = self.model.f_price_name // 气价名称
126
+ data.f_user_type = self.model.f_user_type // 用户类型
127
+ data.f_gasproperties = self.model.f_gasproperties// 用气性质
128
+ data.f_meter_brand = self.model.f_meter_brand // 气表品牌
129
+ data.f_meter_style = self.model.f_meter_style?self.model.f_meter_style.f_meter_style:'' // 气表型号
130
+ data.f_type = self.model.f_meter_style?self.model.f_meter_style.f_type:'' // 气表型号类型
131
+ data.f_position = self.model.f_position// 表安装位置
132
+ data.f_inputtor = self.model.f_inputtor // 抄表员
133
+ data.f_operator = self.$login.f.name // 操作人
134
+ data.f_operate_date = self.$login.toStandardTimeString() // 操作时间
135
+ // 父表record中插入
136
+ data.f_operat_type = '新建小区'
137
+ data.f_operat_type = `新建${self.model.f_residential_area}`
138
+ data.f_state = '有效'
139
+ data.f_delaypay = 0
140
+ console.log("数据参数附属:"+JSON.stringify(data))
141
+ let result = await self.$resetpost('api/af-revenue/entity/t_area', data)
142
+ // self.$dispatch('success', '新建小区成功', 'new-area-info', data)
143
+ console.log("result=", result.data)
144
+ self.initModel()
145
+ return result
146
+ }
147
+
148
+ let validateAddressGen = function * (self) {
149
+ let areaRes = yield self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: {tablename: 't_area', condition: `f_residential_area = '${self.model.f_residential_area}' and f_street = '${self.model.f_street}'`}}, {resolveMsg: null, rejectMsg: '验证小区,查询出错!!!!'})
150
+ console.log('查询出的小区,,,', areaRes)
151
+ if (areaRes.data.length > 0) {
152
+ self.$showAlert('小区已存在, 请重新输入', 'danger', 0)
153
+ self.model.f_street = ''
154
+ self.model.f_residential_area = ''
155
+ }
156
+ }
157
+
158
+ export default {
159
+ title: '新建小区',
160
+ data () {
161
+ return {
162
+ viewsee: false,
163
+ model: {
164
+ f_area: '',
165
+ f_adjustable_id: '',
166
+ f_user_type: '',
167
+ f_meter_brand: '',
168
+ f_show_way: '',
169
+ f_meter_style: '',
170
+ f_inputtor: '',
171
+ f_position: '',
172
+ f_price_type: '', // 气价表中,气价类型
173
+ f_price_name: '', // 气价表中,气价名称
174
+ f_gasproperties: '' // 气价表中,用气性质
175
+ },
176
+ imgdefault: '/images/mainicon/biaopan.png',
177
+ }
178
+ },
179
+ props: ['row','areatype'],
180
+ ready () {
181
+ return co(getMeterType(this)).then(() => {
182
+ if(this.areatype) {
183
+ this.model.f_area = this.areatype
184
+ }
185
+ if (this.row) {
186
+ this.init()
187
+ }
188
+ })
189
+ },
190
+ watch: {
191
+ // 'model.f_meter_brand' (val) {
192
+ // console.log('val里面是神马', val)
193
+ // if (val && val.length > 0) {
194
+ // this.$resetpost('api/af-revenue/sql/querySingleTable', {data: {items: 'f_meter_type', tablename: 't_gasbrand', condition: `f_meter_brand = '${val[0].f_meter_brand}'`}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
195
+ // console.log('res是神马呀', res)
196
+ // if (res.data[0].f_meter_type === '物联网表') {
197
+ // this.viewsee = true
198
+ // } else {
199
+ // this.viewsee = false
200
+ // }
201
+ // }).catch((error) => {
202
+ // console.log('异常提示:' + error)
203
+ // })
204
+ // }
205
+ // },
206
+ 'row' (val) {
207
+ if (val) {
208
+ this.init() // 初始化区,和片区
209
+ } else {
210
+ this.initModel() // 清空数据
211
+ }
212
+ },
213
+ 'areatype' (val) {
214
+ if(val) {
215
+ this.model.f_area =val // 初始化 区
216
+ } else {
217
+ this.model.f_area = null //清除 区
218
+ }
219
+ },
220
+ 'model.f_slice_area' (val) {
221
+ console.log("model.f_slice_area = ", val)
222
+ }
223
+ },
224
+ methods: {
225
+ confirm (areaid, parent) {
226
+ return areaGen(this, areaid, parent).then(() => {
227
+ this.$emit('ready')
228
+ }).catch((error) => {
229
+ this.$emit('error', error)
230
+ })
231
+ },
232
+ cancel () {
233
+ this.$dispatch('clean', '取消新建小区', 'new-area-info')
234
+ },
235
+ validateAddress () {
236
+ console.log('开始地址验证..', this.model.f_street, this.model.f_residential_area)
237
+ if (this.model.f_street && this.model.f_residential_area) {
238
+ co(validateAddressGen(this))
239
+ }
240
+ },
241
+ // 小区初始化
242
+ init() {
243
+ this.model = Object.assign({}, this.model, this.row)
244
+ // 初始化 气表型号
245
+ if(this.model.f_meter_brand) {
246
+ console.log("2222: ", this.model.f_meter_brand)
247
+ this.$GetSaleParam.getGasbrand().forEach((item, index) => {
248
+ // 根据气表品牌 查找气表型号
249
+ if(this.model.f_meter_brand == item.value.f_meter_brand) {
250
+ item.value.gasmodel.forEach((iten, inde) => {
251
+ // 用 f_type 和 f_meter_style 去匹配 气表型号
252
+ if(this.row.f_meter_style==iten.value.f_meter_style && this.row.f_type==iten.value.f_type) {
253
+ console.log("11111: ",iten, " ", this.row)
254
+ this.model.f_meter_style = iten.value
255
+ }
256
+ })
257
+ }
258
+ })
259
+ }
260
+ console.log("初始化 气表型号: ", this.model.f_meter_style)
261
+ },
262
+ initModel () {
263
+ this.model = {
264
+ f_adjustable_id: '',
265
+ f_user_type: '',
266
+ f_meter_brand: '',
267
+ f_show_way: '',
268
+ f_meter_style: '',
269
+ f_inputtor: '',
270
+ f_position: '',
271
+ f_price_type: '', // 气价表中,气价类型
272
+ f_price_name: '', // 气价表中,气价名称
273
+ f_gasproperties: '' // 气价表中,用气性质
274
+ }
275
+ }
276
+ },
277
+ computed: {
278
+ usertypes () {
279
+ console.log('获取用户类型。,。。', this.$appdata.getParam('用户类型'))
280
+ return this.$appdata.getParam('用户类型')
281
+ },
282
+ f_price_types () {
283
+ return this.$appdata.getParam('气价类型')
284
+ },
285
+ viewstyle () {
286
+ return this.$appdata.getParam('显示类型')
287
+ },
288
+ gasproperties () {
289
+ let rs = []
290
+ if (this.model.f_user_type) {
291
+ rs = this.$appdata.getParam(this.model.f_user_type)
292
+ }
293
+ return rs
294
+ },
295
+ positions () {
296
+ let ret = this.$appdata.getParam('安装位置')
297
+ return ret
298
+ },
299
+ inputtores () {
300
+ // 获取抄表员
301
+ console.log('获取抄表员', this.$login.f)
302
+ let rs = new Array()
303
+ if (this.$login.f.f_gasman.length > 0) {
304
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
305
+ let temp = {
306
+ label: this.$login.f.f_gasman[i].name,
307
+ value: this.$login.f.f_gasman[i].name
308
+ }
309
+ rs.push(temp)
310
+ }
311
+ }
312
+ // let rs = this.$appdata.getParam('抄表员')
313
+ return rs
314
+ },
315
+ sliceArea () {
316
+ let rs = new Array()
317
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
318
+ let temp = {
319
+ label: this.$login.f.f_allArea[i].label,
320
+ value: this.$login.f.f_allArea[i].label
321
+ }
322
+ rs.push(temp)
323
+ }
324
+ return rs
325
+ },
326
+ meterbrands () {
327
+ let ret = this.$GetSaleParam.getGasbrand()
328
+ let rs = new Array()
329
+ ret.forEach((item, index) =>{
330
+ rs.push({label: item.label, value: item.value.f_meter_brand})
331
+ })
332
+ console.log("气表品牌: ", rs)
333
+ return rs
334
+ },
335
+ meterstyle() {
336
+ let ret = this.$GetSaleParam.getGasbrand()
337
+ console.log("气表型号ret: ", ret)
338
+ let rs = new Array()
339
+ if(this.model.f_meter_brand) {
340
+ ret.forEach((item, index) => {
341
+ if(this.model.f_meter_brand == item.value.f_meter_brand) {
342
+ rs = item.value.gasmodel
343
+ // item.value.gasmodel.forEach((item1, index1) => {
344
+ // rs.push({label: item1.label, value: item1.value.f_meter_style})
345
+ // })
346
+ }
347
+ })
348
+ }
349
+ console.log("气表型号rs: ", rs)
350
+ return rs
351
+ },
352
+ adjustables () {
353
+ let filter = this.$login.f.f_orgids
354
+ let ret = this.$GetSaleParam.getAdjustable(filter)
355
+ let arr = new Array()
356
+ ret.forEach((item, index) => {
357
+ arr.push({label: `[${item.value.f_adjustable_id}]-${item.label}`, value: item.value.id})
358
+ // arr[index].label = `[${item.value.f_adjustable_id}]-${item.label}`
359
+ // arr[index].value = item.value.id
360
+ })
361
+ return [{label: '全部', value: ''}, ...arr]
362
+ },
363
+ pricenames () {
364
+ let rs = new Array()
365
+ if (this.model.f_user_type && this.model.f_gasproperties && this.model.f_price_type) {
366
+ let params = {
367
+ f_user_type: this.model.f_user_type,
368
+ f_gasproperties: this.model.f_gasproperties,
369
+ f_price_type: this.model.f_price_type,
370
+ filter: this.$login.f.f_fengongsi
371
+ }
372
+ console.log('气价参数。,。。', params)
373
+ let ret = this.$GetSaleParam.getPrice(params)
374
+ ret.forEach((item, index) => {
375
+ rs.push({label: item.label, value: item.value.f_price_name})
376
+ // rs[index].value = item.value.f_price_name
377
+ })
378
+ }
379
+ return rs
380
+ }
381
+ }
382
+ }
383
+ </script>
384
+ <style lang="less" scoped>
385
+ .average{
386
+ width: 20%;
387
+ }
388
+ v-select{
389
+ width: 110px;
390
+ height: 30px;
391
+ border-radius: 2px;
392
+ border: 1px solid #d0d0d0;
393
+ background-color: #ffffff;
394
+ }
395
+ .box {
396
+ width: 727px;
397
+ height: 175px;
398
+ border-radius: 2px;
399
+ background-color: #fafafa;
400
+ border: 1px solid #999999;
401
+ margin-top: 13px;
402
+ }
403
+ .addresstitle{
404
+ width: 100%;
405
+ height: 20%;
406
+ font-family: PingFangSC-Bold;
407
+ font-size: 16px;
408
+ color: #666666;
409
+ margin-top: 20px;
410
+ margin-left: 20px;
411
+ text-align: left;
412
+ }
413
+ .addressbody{
414
+ margin-top: 60px;
415
+ width: 100%;
416
+ height: auto;
417
+ position: absolute;
418
+ }
419
+ .lb{
420
+ width: 100%;
421
+ padding-left: 8px;
422
+ border: none;
423
+ border-left: 4px solid #3db6ef;
424
+ font-size: 16px;
425
+ font-family: PingFangSC-Bold;
426
+ color: #666666;
427
+ text-align: left;
428
+ }
429
+ .button{
430
+ margin-top: 20px;
431
+ }
432
+ </style>