sale-client 3.5.21 → 3.5.24

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 (62) hide show
  1. package/.babelrc +5 -5
  2. package/.gradle/3.5.1/file-changes/last-build.bin +0 -0
  3. package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
  4. package/.gradle/buildOutputCleanup/built.bin +0 -0
  5. package/.gradle/buildOutputCleanup/cache.properties +2 -0
  6. package/.gradle/buildOutputCleanup/cache.properties.lock +1 -0
  7. package/build/dev-server.js +161 -161
  8. package/package.json +2 -2
  9. package/src/components/FilesManage/FileUserFiles.vue +1 -0
  10. package/src/components/common/userinfo_detail/UserBaseInfoNew.vue +3 -1
  11. package/src/components/revenue/comprehen/Maintenance/hand/handListMaintain.vue +28 -29
  12. package/src/components/webMeter/paramSave/ParamSet.vue +6 -8
  13. package/src/components/webMeter/paramSave/ParamSetForm.vue +34 -37
  14. package/src/filiale/{weinan → WEINAN}/AutomaticPurse.vue +0 -0
  15. package/src/filiale/{weinan → WEINAN}/CardList.vue +0 -0
  16. package/src/filiale/{weinan → WEINAN}/CardMeterCenter.vue +0 -0
  17. package/src/filiale/{weinan → WEINAN}/CardMeterChargeCancel.vue +0 -0
  18. package/src/filiale/{weinan → WEINAN}/ChangeMeter.vue +0 -0
  19. package/src/filiale/{weinan → WEINAN}/ChargeList.vue +0 -0
  20. package/src/filiale/{weinan → WEINAN}/ChargeManageNew.vue +0 -0
  21. package/src/filiale/{weinan → WEINAN}/ChargeQueryUser.vue +0 -0
  22. package/src/filiale/{weinan → WEINAN}/ChargeRecordQuery.vue +0 -0
  23. package/src/filiale/{weinan → WEINAN}/DisableManage.vue +0 -0
  24. package/src/filiale/{weinan → WEINAN}/EnableManage.vue +0 -0
  25. package/src/filiale/{weinan → WEINAN}/FileAddressManage.vue +0 -0
  26. package/src/filiale/{weinan → WEINAN}/FileUserAddress.vue +0 -0
  27. package/src/filiale/{weinan → WEINAN}/HighMeter.vue +0 -0
  28. package/src/filiale/{weinan → WEINAN}/IOTMeterCenter.vue +0 -0
  29. package/src/filiale/{weinan → WEINAN}/MachineMeterCenter.vue +0 -0
  30. package/src/filiale/{weinan → WEINAN}/MeterMessage.vue +0 -0
  31. package/src/filiale/{weinan → WEINAN}/MeterinfoTest.vue +0 -0
  32. package/src/filiale/{weinan → WEINAN}/OffGasAddGas.vue +0 -0
  33. package/src/filiale/{weinan → WEINAN}/OtherGas.vue +0 -0
  34. package/src/filiale/{weinan → WEINAN}/OverUseCharge.vue +0 -0
  35. package/src/filiale/{weinan → WEINAN}/RecordCancel.vue +0 -0
  36. package/src/filiale/{weinan → WEINAN}/RecordQueryUser.vue +0 -0
  37. package/src/filiale/{weinan → WEINAN}/ReplaceCardManage.vue +0 -0
  38. package/src/filiale/{weinan → WEINAN}/ShowCardSellGas.vue +0 -0
  39. package/src/filiale/{weinan → WEINAN}/Stairinfo.vue +0 -0
  40. package/src/filiale/{weinan → WEINAN}/TransferManage.vue +0 -0
  41. package/src/filiale/{weinan → WEINAN}/UserBaseInfoNew.vue +0 -0
  42. package/src/filiale/{weinan → WEINAN}/UserEssentialInfoTest.vue +0 -0
  43. package/src/filiale/{weinan → WEINAN}/UserGeneralInfoTest.vue +0 -0
  44. package/src/filiale/{weinan → WEINAN}/UserInfoDetailManageNew.vue +0 -0
  45. package/src/filiale/{weinan → WEINAN}/Userinfo.vue +0 -0
  46. package/src/filiale/{weinan → WEINAN}/gasmove.vue +0 -0
  47. package/src/filiale/{weinan → WEINAN}/meterinfodetail.vue +0 -0
  48. package/src/filiale/{weinan → WEINAN}/plugins/FileManageService.js +0 -0
  49. package/src/filiale/{weinan → WEINAN}/plugins/getTimeService.js +0 -0
  50. package/src/filiale/{weinan → WEINAN}/sale.js +0 -0
  51. package/src/filiale/{weinan → WEINAN}/sale.js~Stashed changes +0 -0
  52. package/src/filiale/{weinan → WEINAN}/static/mainicon//347/237/251/345/275/2421828.png +0 -0
  53. package/src/filiale/dongguan/components/FilesManage/FileUserFiles.vue +1026 -0
  54. package/src/filiale/dongguan/components/common/userinfo_detail/UserBaseInfoNew.vue +3 -1
  55. package/src/filiale/dongguan/components/comprehen/StairPrice/GasPrice.vue +518 -0
  56. package/src/filiale/dongguan/sale.js +5 -1
  57. package/src/filiale/kelai/MeterinfoTest.vue +952 -0
  58. package/src/filiale/kelai/sale.js +6 -0
  59. package/src/filiale/macheng/FilesManageNew/UserEssentialInfoTest.vue +2 -2
  60. package/src/filiale/macheng/FilesManageNew/UserGeneralInfoTest.vue +1 -1
  61. package/src/filiale/shaoguan/handListMaintain.vue +11 -11
  62. package/src/plugins/LogicService.js +2 -2
@@ -317,7 +317,9 @@
317
317
  uuidA = s.join('');
318
318
  return uuidA;
319
319
  },
320
- goChargeManage () {
320
+ async goChargeManage () {
321
+ await this.$copyText(this.row.f_userinfo_code)
322
+ this.$showAlert(`用户编号已复制到剪切板!`, 'success', 2000)
321
323
  this.$goto('charge-manage', {f: this.$login.f}, 'main')
322
324
  },
323
325
  openUser () {
@@ -0,0 +1,518 @@
1
+ <template>
2
+ <div class="auto select-overspread" >
3
+ <validator name='v'>
4
+ <form class="form-horizontal" novalidate>
5
+ <ul class="nav nav-tabs" style="margin-bottom: 10px">
6
+ <li class="active"><a href="#">气价信息</a></li>
7
+ </ul>
8
+ <div class="row">
9
+ <div :class="[$v.f_user_type.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
10
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_user_type" v-show="false"
11
+ v-validate:f_user_type='{required: true }'>
12
+ <label title="参数:用户类型" class="font_normal_body" for="f_user_type">客户类型</label>
13
+ <v-select :disabled='isEdit'
14
+ :options='usertype'
15
+ :value-single="true"
16
+ :value.sync="model.f_user_type"
17
+ @change="usertypeChange"
18
+ close-on-select
19
+ placeholder='请选择'
20
+ v-model="model.f_user_type">
21
+ </v-select>
22
+ </div>
23
+ <div :class="[$v.f_gasproperties.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
24
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_gasproperties" v-show="false"
25
+ v-validate:f_gasproperties='{required: true }'>
26
+ <label class="font_normal_body" for="f_gasproperties">用气性质</label>
27
+ <v-select :disabled='isEdit'
28
+ :options='gastype'
29
+ :value-single="true"
30
+ :value.sync="model.f_gasproperties"
31
+ close-on-select
32
+ placeholder='请选择'
33
+ v-model="model.f_gasproperties">
34
+ </v-select>
35
+ </div>
36
+ <div :class="[$v.f_price_type.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
37
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_price_type" v-show="false"
38
+ v-validate:f_price_type='{required: true }'>
39
+ <label title="参数:气价类型" class="font_normal_body" for="f_price_type">气价类型</label>
40
+ <v-select :disabled='isEdit'
41
+ :options='pricetype'
42
+ :value-single="true"
43
+ :value.sync="model.f_price_type"
44
+ close-on-select
45
+ id="f_price_type"
46
+ placeholder='请选择'
47
+ v-model="model.f_price_type">
48
+ </v-select>
49
+ </div>
50
+ <div :class="[$v.f_price_name.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
51
+ <label class="font_normal_body" for="f_price_name">气价名称</label>
52
+ <input :disabled='isEdit' class="input_search" placeholder="气价名称" style="width:60%" @blur="CheckDuplicate"
53
+ type="text" v-model="model.f_price_name" v-validate:f_price_name='{required: true }'>
54
+ </div>
55
+ </div>
56
+ <div class="row" v-if="model.f_price_type === '阶梯气价'">
57
+ <div :class="[$v.f_stairmonths.required || $v.f_stairmonths.dctest ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
58
+ <label class="font_normal_body" for="f_stairmonths">阶段月数</label>
59
+ <input :disabled='isEdit' class="input_search" style="width:60%" type="number"
60
+ v-model="model.f_stairmonths" v-validate:f_stairmonths='{required: true, dctest: [ 12, "<=" ] }'>
61
+ <span class="help-block" v-if="$v.f_stairmonths.dctest">阶段月数不能大于12</span>
62
+ </div>
63
+ <div :class="[$v.f_stair_start_date.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group" v-if="stairStartShow">
64
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_stair_start_date" v-show="false"
65
+ v-validate:f_stair_start_date='{required: true }'>
66
+ <label class="font_normal_body" for="f_stair_start_date">开始日期</label>
67
+ <datepicker :disabled='isEdit'
68
+ :format="'yyyy-MM-dd'"
69
+ :value.sync="model.f_stair_start_date"
70
+ class="datepicker"
71
+ id="f_stair_start_date"
72
+ placeholder="阶梯开始日期"
73
+ style="width: 60%"
74
+ v-model="model.f_stair_start_date">
75
+ </datepicker>
76
+ <span class="help-block" id="helpBlock" style="font-size: 1.4rem">本年或<br/>本月1号</span>
77
+ </div>
78
+ </div>
79
+ <div class="row">
80
+ <div :class="[$v.f_perform_date.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group" class="col-sm-6">
81
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_perform_date" v-show="false"
82
+ v-validate:f_perform_date='{required: true }'>
83
+ <label class="font_normal_body" for="f_perform_date">生效日期</label>
84
+ <datepicker :disabled='isEdit'
85
+ :value.sync="model.f_perform_date"
86
+ id="f_perform_date"
87
+ placeholder="生效日期"
88
+ :format="'yyyy-MM-dd HH:mm:ss'"
89
+ style="width: 60%" v-model="model.f_perform_date">
90
+ </datepicker>
91
+ </div>
92
+ <div class="col-sm-6 form-group">
93
+ <label class="font_normal_body">是否低保</label>
94
+ <v-select :options='isLowIncomes'
95
+ :value-single="true"
96
+ :value.sync="model.f_islow_income"
97
+ close-on-select
98
+ placeholder='请选择'
99
+ style="width: 60%" v-model="model.f_islow_income">
100
+ </v-select>
101
+ </div>
102
+ <div :class="[$v.f_population_base.pattern ? 'has-error' : 'has-success']" class="col-sm-6 form-group" v-if="model.f_price_type === '阶梯气价'">
103
+ <label class="font_normal_body" for="f_population_base">人口基数</label>
104
+ <input :disabled='isEdit' :value.sync="model.f_population_base" class="input_search" placeholder="人口基数"
105
+ style="width:60%"
106
+ type="text" v-model="model.f_population_base" v-validate:f_population_base="{pattern: '/^[1-9]\\d*$/'}">
107
+ </div>
108
+ <div class="col-sm-6 form-group">
109
+ <label class="font_normal_body">使用公司</label>
110
+ <res-select :initresid='curorgid'
111
+ @res-select="getorg"
112
+ is-mul="false"
113
+ restype='organization'>
114
+ </res-select>
115
+ </div>
116
+ <unit-price :is-disable.sync='isEdit' :unitmodel.sync='model.detailprice' v-if="unitshow"></unit-price>
117
+ </div>
118
+
119
+ <div v-if="config.heatingSeason && model.f_price_type == '阶梯气价'">
120
+ <div class="row">
121
+ <div class="col-sm-6 form-group">
122
+ <label class="font_normal_body">是否采暖</label>
123
+ <v-select :options='isLowIncomes'
124
+ :value-single="true"
125
+ :value.sync="model.f_isheat"
126
+ close-on-select
127
+ placeholder='请选择'
128
+ style="width: 60%" v-model="model.f_isheat">
129
+ </v-select>
130
+ </div>
131
+ <div class="col-sm-6 form-group">
132
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_deduction_way" v-show="false"
133
+ v-validate:f_deduction_way='{required: true }'>
134
+ <label class="font_normal_body">扣费方式</label>
135
+ <v-select :options='deductionWays'
136
+ :value-single="true"
137
+ :value.sync="model.f_deduction_way"
138
+ @change="deductionChange"
139
+ close-on-select
140
+ placeholder='请选择'
141
+ style="width: 60%" v-model="model.f_deduction_way">
142
+ </v-select>
143
+ </div>
144
+
145
+ </div>
146
+ <div class="row" v-if="model.f_isheat == '1'">
147
+ <div :class="[$v.f_heat_start_date.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
148
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_heat_start_date" v-show="false"
149
+ v-validate:f_heat_start_date='{required: true }'>
150
+ <label class="font_normal_body">采暖起始</label>
151
+ <datepicker :disabled='isEdit'
152
+ :format="'MM-dd'"
153
+ :value.sync="model.f_heat_start_date"
154
+ class="datepicker"
155
+ placeholder="阶梯开始日期"
156
+ style="width: 60%" v-model="model.f_heat_start_date">
157
+ </datepicker>
158
+ </div>
159
+ <div :class="[$v.f_heat_cycle.dctest ? 'has-error' : 'has-success']" class="col-sm-6 form-group" >
160
+ <label class="font_normal_body">采暖周期</label>
161
+ <input class="input_search" style="width:60%" type="number"
162
+ v-model="model.f_heat_cycle" v-validate:f_heat_cycle='{dctest: [ 12, "<=" ] }'>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ <div class="row" >
167
+ <div class="col-sm-6 form-group">
168
+ <label class="font_normal_body ">优&ensp;先&ensp;级</label>
169
+ <input :disabled='isEdit' class="input_search" placeholder="优先级" style="width:60%"
170
+ type="text" v-model="model.f_priority" v-validate:f_priority='{required: true }'>
171
+ </div>
172
+ </div>
173
+ <div class="row">
174
+ <div class="col-sm-12 form-group" style="height: auto !important;">
175
+ <label class="font_normal_body ">备&emsp;&emsp;注</label>
176
+ <textarea class="input_textarea" rows="3" style="width:80%;margin-top:5px;" v-model="model.f_comments"></textarea>
177
+ </div>
178
+ </div>
179
+
180
+ </form>
181
+
182
+ <!--<div style="width: 40%;overflow-y: scroll">-->
183
+ <div class='auto' style="margin-top: 10px;">
184
+
185
+ <mix-price :is-disable.sync='isEdit' :mixmodel.sync='model.detailprice' v-if="mixshow"></mix-price>
186
+ <stair-price :is-disable.sync='isEdit' :isheat.sync="model.f_isheat" :stairmodel.sync='model.detailprice' style="height: 40%;"
187
+ v-if="stairshow"></stair-price>
188
+ </div>
189
+
190
+ <div style="text-align:right;height:auto;margin-top:6px;">
191
+ <button :disabled='!$v.valid' @click="confirm()" class="button_search" v-if="!isEdit">确认</button>
192
+ <button @click="deletePrice()" class="button_delete" v-if="!isEdit && data.usercount === 0">删除</button>
193
+ <button @click="limitClick" class="button_search" type="button" v-if="config.isLimit">限购配置</button>
194
+ <button @click="close()" class="button_clear">取消</button>
195
+ </div>
196
+ <div v-if="data" style="text-align:right;height:auto;margin-top:6px;">
197
+ <a @click="showChangeView">查看变更记录</a>
198
+ </div>
199
+ <!--</div>-->
200
+ </validator>
201
+ <limit-gas :f_price_id="model.id" :show.sync="limitShow" @limit="getLimitGas"></limit-gas>
202
+ <upload :blodid="blodid" cols="col-sm-12" isremark="true" fusetype="气价修改"></upload>
203
+ </div>
204
+ </template>
205
+ <script>
206
+ /**
207
+ *阶梯气价管理组件
208
+ */
209
+
210
+ import {HttpResetClass} from 'vue-client'
211
+ let initGen = async function (self, val) {
212
+ let http = new HttpResetClass()
213
+ self.blodid = self.data.id
214
+ // 启动流程的情况下 获取改气价有无正在审核的气价,若有则禁止编辑,若无则可编辑
215
+ let hasUnAudit = false
216
+ console.log('当前信息', val)
217
+ if (self.config.audit) {
218
+ let res = await http.load('POST', 'rs/sql/saleSingleTable', {
219
+ data: {
220
+ tablename: 't_stairprice',
221
+ condition: `f_price_id = '${val.f_price_id}' and f_filialeid = '${val.f_filialeids}' and f_state = '待审核'`
222
+ }
223
+ }, {resolveMsg: null, rejectMsg: '获取有无待审核气价时出错!!!'})
224
+ console.log('获取有无待审核气价', res)
225
+ // 这里默认待审核气价只有一条
226
+ if (res.data.length === 1) {
227
+ // 判断当前气价是否是待审核气价
228
+ hasUnAudit = res.data[0].id !== val.id
229
+ } else if (res.data.length > 1) {
230
+ self.$showAlert('意外获取到多条待审核记录!请联系管理人员!', 'danger', 0)
231
+ }
232
+ }
233
+ self.model = Object.assign({}, self.model, val)
234
+
235
+ self.model.f_filialeid = self.model.f_filialeid ? self.model.f_filialeid : self.f_filialeid
236
+ self.model.f_orgid = self.model.f_orgid ? self.model.f_orgid : self.$login.f.orgid
237
+ self.model.f_orgname = self.model.f_orgname ? self.model.f_orgname : self.$login.f.orgs
238
+ self.model.f_depid = self.model.f_depid ? self.model.f_depid : self.$login.f.depids
239
+ self.model.f_depname = self.model.f_depname ? self.model.f_depname : self.$login.f.deps
240
+
241
+ self.curorgid.push(self.model.f_filialeid)
242
+ self.model.f_islow_income = self.model.f_islow_income + ''
243
+ self.model.f_isheat = self.model.f_isheat + ''
244
+
245
+ self.stairStartShow = !self.model.f_deduction_way.includes('day')
246
+ self.isEdit = self.model.f_price_state === '已作废' || hasUnAudit
247
+ console.log('观察data里面的model', self.model, val)
248
+ if (self.model.id) {
249
+ let price = await http.load('POST', 'rs/sql/singleTable_OrderBy', {
250
+ data: {
251
+ items: 'f_price_name, f_gas, f_price, isnull(f_add_gas, 0) f_add_gas, isnull(f_add_gas_heat, 0) f_add_gas_heat',
252
+ tablename: 't_detailprice',
253
+ condition: `f_stairprice_id = '${self.model.id}'`,
254
+ orderitem: 'f_price_name asc'
255
+ }
256
+ }, {resolveMsg: null, rejectMsg: '获取气价明细出错!!!'})
257
+
258
+ if (self.model.f_price_type[0] === '混合气价') {
259
+ price.data[0].f_mixprice = [price.data[0].f_mixprice]
260
+ price.data[1].f_mixprice = [price.data[1].f_mixprice]
261
+ }
262
+ self.model.detailprice = price.data
263
+ }
264
+ }
265
+
266
+ export default {
267
+ data () {
268
+ return {
269
+ unitshow: false,
270
+ mixshow: false,
271
+ blodid: `${new Date().getTime()}${Math.random()}`,
272
+ stairshow: false,
273
+ model: {
274
+ f_price_type: [],
275
+ f_stairmonths: 1,
276
+ f_perform_date: '',
277
+ detailprice: [],
278
+ f_population_base: 4,
279
+ f_population_increment: 0,
280
+ f_stair_start_date: '',
281
+ f_heat_way: '按月',
282
+ f_deduction_way: this.config.deductionWay,
283
+ f_islow_income: '0',
284
+ f_isheat: '0',
285
+ f_comments: '',
286
+ f_priority: 100
287
+ },
288
+ // 编辑控制
289
+ isEdit: false,
290
+
291
+ // 扣费方式的改变 如果涉及日运算,则阶梯开始时间和生效时间不做显示
292
+ stairStartShow: true,
293
+
294
+ // 公司树状图信息
295
+ curorgid: [],
296
+
297
+ f_filialeid: '', // 所属公司
298
+ f_filialename: '', // 所属公司名称
299
+
300
+ // 限购配置
301
+ limitShow: false,
302
+ limit_gas: null,
303
+
304
+ // 下拉框数据
305
+ usertype: this.$appdata.getParam('用户类型'),
306
+ pricetype: this.$appdata.getParam('气价类型'),
307
+ hearways: [{label: '按月', value: '按月'}, {label: '按季', value: '按季'}],
308
+ isLowIncomes: [{label: '是', value: '1'}, {label: '否', value: '0'}],
309
+ deductionWays: [{label: '周期扣费', value: 'cycle'}, {label: '周期平均扣费', value: 'cycleMM'}, {label: '日运算扣费', value: 'day'}, {label: '采暖季独立扣费', value: 'singleHS'}, {label: '采暖季日扣费', value: 'dayHS'}],
310
+ gastype: []
311
+ }
312
+ },
313
+ props: ['data', 'config', 'f_filialeid'],
314
+ watch: {
315
+ 'data' (val) {
316
+ if (val) {
317
+ initGen(this, val)
318
+ } else {
319
+ this.initModel()
320
+ }
321
+ },
322
+ 'model.f_price_type' (val) {
323
+ this.unitshow = false
324
+ this.mixshow = false
325
+ this.stairshow = false
326
+ if (val === '固定气价') {
327
+ this.model.detailprice = []
328
+ this.unitshow = true
329
+ } else if (val === '混合气价') {
330
+ this.model.detailprice = []
331
+ this.mixshow = true
332
+ } else if (val === '阶梯气价') {
333
+ this.model.detailprice = [{f_gas: '', f_price: '', f_add_gas: 0, f_add_gas_heat: 0}]
334
+ if (this.model.f_deduction_way == undefined || this.model.f_deduction_way == '') {
335
+ this.model.f_deduction_way = 'cycle'
336
+ }
337
+ this.stairshow = true
338
+ }
339
+ }
340
+ },
341
+ ready () {
342
+ console.log('看看都传了什么', this.data, this.config)
343
+ initGen(this, this.data)
344
+ },
345
+ methods: {
346
+ async CheckDuplicate () {
347
+ if (!this.data) {
348
+ let http = new HttpResetClass()
349
+ let res = await http.load('post', 'rs/sql/getGasPriceInfo', {data: {condition: ` f_filialeid in ('${this.$login.f.orgid}') and 1=1 `, orderitem: 'f_price_id'}}, {resolveMsg: null, rejectMsg: null})
350
+ for (let i = 0; i < res.data.length; i++) {
351
+ if (res.data[i].f_price_name == this.model.f_price_name) {
352
+ this.$showAlert('气价名称重复,请重新输入', 'warning', 3000)
353
+ this.model.f_price_name = ''
354
+ return
355
+ }
356
+ }
357
+ }
358
+ },
359
+ async confirm () {
360
+ // 验证公司组织是否已选择
361
+ try {
362
+ if (!this.f_filialeid) {
363
+ this.$showAlert('请选择气价使用公司', 'warning', 2000)
364
+ return
365
+ }
366
+ if (this.data) {
367
+ if (this.data.f_perform_date == this.model.f_perform_date) {
368
+ this.$showAlert('请更改生效日期', 'warning', 2000)
369
+ return
370
+ }
371
+ let datenow = new Date()
372
+ let a = datenow.setDate(datenow.getDate() - 1)
373
+ let month = datenow.getMonth() + 1
374
+ let date = datenow.getDate()
375
+ let hour = datenow.getHours()
376
+ let min = datenow.getMinutes()
377
+ let sec = datenow.getSeconds()
378
+ a = datenow.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
379
+ a = a + ' 23:59:59'
380
+ if (this.model.f_perform_date <= this.data.f_perform_date) {
381
+ this.$showAlert('生效日期不能小于上次生效时间', 'warning', 2000)
382
+ return
383
+ }
384
+ }
385
+
386
+ // 验证此生效时间之后是否有待使用气价, 如果有提示是否作废待使用气价,
387
+ let validateResult = await this.$resetpost('rs/logic/sale_validatePrice', {data: this.model}, {
388
+ resolveMsg: null,
389
+ rejectMsg: '验证气价出错!!'
390
+ })
391
+ console.log('验证气价:', validateResult)
392
+ if (validateResult.data.toBeUsePrice.length > 0) {
393
+ // 有待使用气价, 将待使用气价信息展示
394
+ let awaitOper = await this.$showMessage(`此气价存在待使用记录, 将于${validateResult.data.toBeUsePrice[0].f_perform_date} 开始使用!是否将其作废?`, ['confirm', 'cancel'])
395
+ console.log('用户点击了:', {awaitOper})
396
+ if (awaitOper == 'confirm') {
397
+ // 传至后台用于新版本号的处理
398
+ this.model.toBeUsePriceId = validateResult.data.toBeUsePrice[0].id
399
+ this.model.toBeUsePriceVersion = validateResult.data.toBeUsePrice[0].f_version
400
+ this.savePrice()
401
+ }
402
+ } else {
403
+ this.savePrice()
404
+ }
405
+ } catch (e) {
406
+ this.$dispatch('error', '气价管理', this.data, res)
407
+ }
408
+ },
409
+
410
+ async savePrice () {
411
+ // 去除重复或者空的明细
412
+ if (this.model.f_price_type[0] === '阶梯气价') {
413
+ this.removeDuplication(this.model)
414
+ }
415
+ // 审核配置
416
+ this.model.audit = this.config.audit
417
+
418
+ console.log('进入保存气价方法')
419
+ this.model.f_filialeid = this.f_filialeid ? this.f_filialeid : this.$login.f.orgid
420
+
421
+ if (this.limit_gas) {
422
+ this.model.limit_gas = this.limit_gas
423
+ this.model.limit_gas.f_start_date = this.model.f_perform_date
424
+ }
425
+ // 现调用气价修改的逻辑 返回:version 和之前的对比 增加的话, 进行提示操作 反之 结束
426
+ await this.$LogicService.gasPrice(this.model, this.data, this.blodid)
427
+ // 操作了气价 清空分公司initdata缓存
428
+ let http = new HttpResetClass()
429
+ await http.load('POST', 'rs/logic/delSaleInitData', {data: {}}, {resolveMsg: null, rejectMsg: null})
430
+
431
+ this.$dispatch('success', '气价管理', this.data)
432
+ this.initModel()
433
+ },
434
+
435
+ async deletePrice () {
436
+ let res = await this.$showMessage(`您确定要删除此气价吗?`, ['confirm', 'cancel'])
437
+ if (res === 'confirm') {
438
+ await this.$resetpost('rs/logic/delprice', {data: {id: this.model.id}}, {
439
+ resolveMsg: '删除气价成功',
440
+ rejectMsg: '删除气价失败'
441
+ })
442
+ let http = new HttpResetClass()
443
+ await http.load('POST', 'rs/logic/delSaleInitData', {data: {}}, {resolveMsg: null, rejectMsg: null})
444
+ }
445
+ this.$dispatch('success')
446
+ },
447
+
448
+ getLimitGas (val) {
449
+ console.log('获取到限购值。', val)
450
+ this.limit_gas = val
451
+ },
452
+
453
+ getorg (id, name) {
454
+ this.f_filialeid = id[0]
455
+ this.f_filialename = name[0]
456
+ },
457
+ initModel () {
458
+ this.model = {
459
+ f_user_type: '',
460
+ f_gasproperties: '',
461
+ f_price_type: '',
462
+ f_stairmonths: 1,
463
+ f_perform_date: '',
464
+ detailprice: [],
465
+ f_stair_start_date: '',
466
+ f_population_increment: 0,
467
+ f_population_base: 4,
468
+ f_comments: '',
469
+ f_deduction_way: this.config.deductionWay
470
+ }
471
+ },
472
+ close () {
473
+ this.$dispatch('close')
474
+ },
475
+ removeDuplication (val) {
476
+ if (val.detailprice.length > 0) {
477
+ let hash = []
478
+ let arr = []
479
+ for (var i = 0; i < val.detailprice.length; i++) {
480
+ // hash[val.detailprice[i].f_gas] != null
481
+ if (!val.detailprice[i].f_gas) {
482
+ continue
483
+ }
484
+ if (!hash[val.detailprice[i].f_gas]) {
485
+ arr.push(val.detailprice[i])
486
+ hash[val.detailprice[i].f_gas] = true
487
+ }
488
+ }
489
+ val.detailprice = arr
490
+ }
491
+ },
492
+ usertypeChange (val) {
493
+ if (val) {
494
+ this.gastype = this.$appdata.getParam(this.model.f_user_type)
495
+ }
496
+ },
497
+ deductionChange (val) {
498
+ // 扣费方式的改变 如果涉及日运算,则阶梯开始时间和生效时间不做显示
499
+ this.stairStartShow = !val.includes('day')
500
+ },
501
+ limitClick () {
502
+ this.limitShow = true
503
+ },
504
+ showChangeView () {
505
+ this.$parent.changeView = true
506
+ }
507
+ }
508
+ }
509
+ </script>
510
+ <style lang="less">
511
+ #gas-price-form {
512
+ .form-group {
513
+ margin-left: 0px;
514
+ margin-right: 0px;
515
+ }
516
+ }
517
+
518
+ </style>
@@ -6,6 +6,10 @@ let specialComp = {
6
6
  'high-meter-idcard': (resolve) => { require(['./components/HighMeterCard'], resolve) },
7
7
  // 用户基本信息
8
8
  'user-base-info-new': (resolve) => { require(['./components/common/userinfo_detail/UserBaseInfoNew'], resolve) },
9
- 'user-meterinfodetail': (resolve) => { require(['./components/meterinfodetail'], resolve) }
9
+ 'user-meterinfodetail': (resolve) => { require(['./components/meterinfodetail'], resolve) },
10
+ // 气价管理(新增)
11
+ 'gas-price': (resolve) => { require(['./components/comprehen/StairPrice/GasPrice'], resolve) },
12
+ // 档案信息(V3现用档案管理)
13
+ 'file-user-files': (resolve) => { require(['./components/FilesManage/FileUserFiles'], resolve) }
10
14
  }
11
15
  exports.specialComp = specialComp