sale-client 3.6.252 → 3.6.254

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.252",
3
+ "version": "3.6.254",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -22,19 +22,19 @@
22
22
  <div class="col-sm-4 form-group" >
23
23
  <label for="f_llj_brand" class="font_normal_body" title="参数:流量计品牌">&ensp;流量计品牌</label>
24
24
  <v-select :value.sync="row.f_llj_brand" v-model="row.f_llj_brand"
25
- :options='lljbrand' placeholder='流量计品牌'
25
+ :options='lljbrand' placeholder='流量计品牌' :value-single="true"
26
26
  close-on-select></v-select>
27
27
  </div>
28
28
  <div class="col-sm-4 form-group" >
29
29
  <label for="f_llj_type" class="font_normal_body" title="参数:流量计类型">&ensp;流量计类型</label>
30
30
  <v-select :value.sync="row.f_llj_type" v-model="row.f_llj_type"
31
- :options='lljtype' placeholder='流量计类型'
31
+ :options='lljtype' placeholder='流量计类型' :value-single="true"
32
32
  close-on-select></v-select>
33
33
  </div>
34
34
  <div class="col-sm-4 form-group" >
35
35
  <label for="f_meter_flow" class="font_normal_body" title="参数:气表流量">&ensp;气表流量</label>
36
36
  <v-select :value.sync="row.f_meter_flow" v-model="row.f_meter_flow"
37
- :options='meterflow' placeholder='气表流量'
37
+ :options='meterflow' placeholder='气表流量' :value-single="true"
38
38
  close-on-select></v-select>
39
39
  </div>
40
40
  <div class="col-sm-4 form-group">
@@ -42,15 +42,6 @@
42
42
  <input type="text" class="input_search" style="width:60%" v-model="row.f_llj_model" placeholder='流量计型号'
43
43
  v-next-el="{id: 'meterbase'}">
44
44
  </div>
45
- <!-- <div class="col-sm-4 form-group" >-->
46
- <!-- <label for="f_llj_meternumber" class="font_normal_body">流量计表号</label>-->
47
- <!-- <input type="text" class="input_search" style="width:60%" v-model="row.f_llj_meternumber"-->
48
- <!-- placeholder='表号'>-->
49
- <!-- </div>-->
50
- <!-- <div style="" class="col-sm-8 form-group">-->
51
- <!-- <label for="f_llj_address" class="font_normal_body ">流量计位置</label>-->
52
- <!-- <input class="input_search" style="width:80%" placeholder='流量计安装位置' v-model="row.f_llj_address"/>-->
53
- <!-- </div>-->
54
45
  <div class="col-sm-4 form-group">
55
46
  <label for="f_llj_date" class="font_normal_body">流量计出厂</label>
56
47
  <datepicker style="width:60%" placeholder="流量计出厂日期"
@@ -66,7 +57,7 @@
66
57
  v-model="row.f_bqf_type"
67
58
  width="60%"
68
59
  search="true"
69
- enterPush="true"
60
+ enterPush="true" :value-single="true"
70
61
  :options="bqftype"
71
62
  placeholder="表前阀型号"
72
63
  close-on-select></v-select>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <tab-button v-ref:list>
3
+ <tabs header="开票记录">
4
+ <e-ticket-record-list></e-ticket-record-list>
5
+ </tabs>
6
+ <!-- <tabs header="物联网表结算">-->
7
+ <!-- <e-ticket-open-iot></e-ticket-open-iot>-->
8
+ <!-- </tabs>-->
9
+ <tabs header="卡表结算">
10
+ <e-ticket-open-card></e-ticket-open-card>
11
+ </tabs>
12
+ <tabs header="抄表结算">
13
+ <e-ticket-open-hand></e-ticket-open-hand>
14
+ </tabs>
15
+ <tabs header="自定义开票">
16
+ <cust-query-eticket></cust-query-eticket>
17
+ </tabs>
18
+ </tab-button>
19
+ </template>
20
+
21
+ <script>
22
+ import TabButton from '../../../comprehen/common/TabButton'
23
+ import Tabs from '../../../comprehen/common/Tabs'
24
+ export default {
25
+ name: 'eticket',
26
+ title: '发票管理',
27
+ components: { Tabs, TabButton },
28
+ data () {
29
+ return {// 页面开关
30
+ f_start_date: '',
31
+ f_end_date: '',
32
+ listpage: true,
33
+ width: {
34
+ left: '100%',
35
+ right: '0%'
36
+ },
37
+ // searchNumber:'',
38
+ rowData: {},
39
+ show: [true]
40
+ }
41
+ },
42
+ ready () {},
43
+ methods: {
44
+ cancel (obj) {
45
+ this.listpage = true
46
+ },
47
+ dealMsg (obj) {
48
+ this.rowData = obj
49
+ this.listpage = false
50
+ console.log(obj.model)
51
+ this.f_start_date = obj.model.startDate
52
+ this.f_end_date = obj.model.endDate
53
+ }
54
+ }
55
+ }
56
+ </script>
57
+
58
+ <style scoped>
59
+
60
+ </style>
@@ -132,15 +132,16 @@
132
132
  <input class="form-control col-sm-2"
133
133
  v-model="row.f_paper_name" placeholder="开票名称">
134
134
  </div>
135
- <div class="col-sm-6 form-group form-input-group" :class="[!invoice_type ? 'has-error' : '']">
136
- <label class="control-label">发票种类:</label> <v-select v-model="invoice_type"
135
+ <div class="col-sm-6 form-group form-input-group">
136
+ <nobr class="col-sm-4"><label class="control-label">是否征税:</label></nobr>
137
+ <v-select v-model="invoice_is_pax"
137
138
  placeholder='请选择'
138
- :value.sync="invoice_type"
139
+ :value.sync="invoice_is_pax"
139
140
  close-on-select
140
141
  :width="60"
141
142
  :value-single="true"
142
143
  :search="false"
143
- :options='invoice_types' clear-button>
144
+ :options='is_pax' clear-button>
144
145
  </v-select>
145
146
  </div>
146
147
  <div class="col-sm-12 form-group form-input-group">
@@ -153,15 +154,10 @@
153
154
  <input class="form-control col-sm-2"
154
155
  v-model="row.f_taxpayer_id" placeholder="纳税人识别号">
155
156
  </div>
156
- <div class="col-sm-12 form-group form-input-group" :class="[!row.f_buy_address ? 'has-error' : '']">
157
- <label class="control-label">开票地址:</label>
157
+ <div class="col-sm-12 form-group form-input-group" :class="[!row.f_address_phone ? 'has-error' : '']">
158
+ <label class="control-label">开票地址电话:</label>
158
159
  <input class="form-control col-sm-2"
159
- v-model="row.f_buy_address" placeholder="开票地址">
160
- </div>
161
- <div class="col-sm-12 form-group form-input-group" :class="[!row.f_buy_phone ? 'has-error' : '']">
162
- <label class="control-label">开票电话:</label>
163
- <input class="form-control col-sm-2"
164
- v-model="row.f_buy_phone" placeholder="开票电话">
160
+ v-model="row.f_address_phone" placeholder="开票地址">
165
161
  </div>
166
162
  <div class="col-sm-12 form-group form-input-group">
167
163
  <label class="control-label">邮箱推送:</label>
@@ -173,7 +169,7 @@
173
169
  </article>
174
170
  <footer slot="modal-footer" class="modal-footer">
175
171
  <button type="button" class="btn button_search"
176
- :disabled="!(row.f_paper_name&&row.f_buy_phone&&row.f_buy_address&&invoice_type)"
172
+ :disabled="!(row.f_paper_name&&row.f_address_phone)"
177
173
  @click='confirm'>确认收费
178
174
  </button>
179
175
  </footer>
@@ -224,8 +220,7 @@ export default {
224
220
  f_orgid: '',
225
221
  other: [],
226
222
  footer: [],
227
- invoice_types: this.$appdata.getParam('发票种类'),
228
- invoice_type: '',
223
+ invoice_is_pax: '征税',
229
224
  is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
230
225
  initres: {
231
226
  org: [this.$login.f.orgid],
@@ -239,16 +234,14 @@ export default {
239
234
  // 合计数据
240
235
  sumsmodel: {},
241
236
  msg: [],
237
+ f_charge_type: '',
242
238
  orgname: [],
243
239
  depname: [],
244
240
  is_report: [{label: '是', value: ` = '是'`}, {label: '否', value: ' is null'}],
245
241
  eticket_msg: false,
246
242
  invoice_show_gas: '否',
247
243
  show_gas: [{label: '是', value: '是'}, {label: '否', value: '否'}],
248
- row: {
249
- f_buy_address: '',
250
- f_buy_phone: ''
251
- },
244
+ row: {},
252
245
  mid: [{label: '全部', value: ''}, {label: '是', value: ' > 0 '}, {label: '否', value: ' is null'}],
253
246
  reissue_data: null,
254
247
  reissue_show: false
@@ -282,6 +275,10 @@ export default {
282
275
  this.$showAlert('所选择用户不是同一用户!!', 'warning', 2000)
283
276
  return
284
277
  }
278
+ if ([...new Set(this.selecteds.map(item => item.f_meter_classify))].length > 1) {
279
+ this.$showAlert('机表和物联网表不能一起结算,请选择具体的气表类型查询后再点击开票!!', 'warning', 2000)
280
+ return
281
+ }
285
282
  if (this.selecteds.filter(item => item.is_bill === '是').length >= 1) {
286
283
  // await this.$showMessage('选中的有已开过票得记录,确认开票吗?', ['confirm', 'cancel']).then(
287
284
  // (response) => {
@@ -298,16 +295,24 @@ export default {
298
295
  condition: `f_userinfo_code = '${[...new Set(this.selecteds.map(item => item.f_userinfo_code))][0]}'`
299
296
  }
300
297
  }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
301
- this.row = Object.assign(row.data[0], this.row)
302
- this.invoice_show_gas = this.row.f_collection_type === '按气量' ? '是' : '否'
298
+ this.row = row.data[0]
299
+ console.log([...new Set(this.selecteds.map(item => item.f_meter_classify))][0])
300
+ if ([...new Set(this.selecteds.map(item => item.f_meter_classify))][0] === '物联网表') {
301
+ this.invoice_show_gas = this.row.f_collection_type === '按气量' ? '是' : '否'
302
+ this.f_charge_type = '物联网结算'
303
+ } else {
304
+ this.invoice_show_gas = '是'
305
+ this.f_charge_type = '机表结算'
306
+ }
303
307
  if (!this.row.f_taxpayer_id) {
304
308
  this.row.f_taxpayer_id = this.row.f_idnumber
305
309
  }
306
310
  if (!this.row.f_paper_name) {
307
311
  this.row.f_paper_name = this.row.f_user_name
308
312
  }
309
- this.row.f_buy_address = this.row.f_address
310
- this.row.f_buy_phone = this.row.f_user_phone
313
+ if (!this.row.f_address_phone) {
314
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
315
+ }
311
316
  this.eticket_msg = true
312
317
  },
313
318
  async open_report () {
@@ -334,7 +339,7 @@ export default {
334
339
  confirm () {
335
340
  this.eticket_msg = false
336
341
  this.eticket_show = true
337
- this.$refs.eticketbill.openETicket(this.selecteds.map(item => item.id), this.row, '是', this.invoice_is_pax, '机表结算')
342
+ this.$refs.eticketbill.openETicket(this.selecteds.map(item => item.id), this.row, this.invoice_show_gas, this.invoice_is_pax, this.f_charge_type)
338
343
  },
339
344
  selfSearch (args) {
340
345
  this.selecteds = []
@@ -20,6 +20,41 @@
20
20
  v-model="model.f_user_type">
21
21
  </v-select>
22
22
  </div>
23
+ <div class="col-sm-6 form-group">
24
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_consolidated_user" v-show="false"
25
+ >
26
+ <label class="font_normal_body" for="f_consolidated_user">合表用户</label>
27
+ <v-select :disabled='isEdit'
28
+ :options='isLowIncomes'
29
+ :value-single="true"
30
+ :value.sync="model.f_consolidated_user"
31
+ close-on-select
32
+ placeholder='请选择'
33
+ v-model="model.f_consolidated_user">
34
+ </v-select>
35
+ </div>
36
+ <div class="row" v-if="model.f_consolidated_user==='1'">
37
+ <div :class="[$v.f_resident_area.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
38
+ <label class="font_normal_body" for="f_resident_area">居民面积</label>
39
+ <input :disabled='isEdit' class="input_search" placeholder="居民面积" style="width:60%" @blur="getPrice()"
40
+ type="text" v-model="model.f_resident_area" v-validate:f_resident_area='{required: true }'>
41
+ </div>
42
+ <div :class="[$v.f_resident_price.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
43
+ <label class="font_normal_body" for="f_resident_price">居民气价</label>
44
+ <input :disabled='isEdit' class="input_search" placeholder="居民气价" style="width:60%" @blur="getPrice()"
45
+ type="text" v-model="model.f_resident_price" v-validate:f_resident_price='{required: true }'>
46
+ </div>
47
+ <div :class="[$v.f_non_resident_area.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
48
+ <label class="font_normal_body" for="f_non_resident_area">非居民面积</label>
49
+ <input :disabled='isEdit' class="input_search" placeholder="非居民面积" style="width:60%" @blur="getPrice()"
50
+ type="text" v-model="model.f_non_resident_area" v-validate:f_non_resident_area='{required: true }'>
51
+ </div>
52
+ <div :class="[$v.f_non_resident_price.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
53
+ <label class="font_normal_body" for="f_non_resident_price">非居民气价</label>
54
+ <input :disabled='isEdit' class="input_search" placeholder="非居民气价" style="width:60%" @blur="getPrice()"
55
+ type="text" v-model="model.f_non_resident_price" v-validate:f_non_resident_price='{required: true }'>
56
+ </div>
57
+ </div>
23
58
  <div :class="[$v.f_gasproperties.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
24
59
  <input class="input_search" style="width:60%" type="text" v-model="model.f_gasproperties" v-show="false"
25
60
  v-validate:f_gasproperties='{required: true }'>
@@ -33,17 +68,17 @@
33
68
  v-model="model.f_gasproperties">
34
69
  </v-select>
35
70
  </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 }'>
71
+ <div :class="[$v.pricetype.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
72
+ <input class="input_search" style="width:60%" type="text" v-model="$refs.pricetype.selectedItems" v-show="false"
73
+ v-validate:pricetype='{required: true }'>
39
74
  <label title="参数:气价类型" class="font_normal_body" for="f_price_type">气价类型</label>
40
75
  <v-select :disabled='isEdit'
41
76
  :options='pricetype'
42
77
  :value-single="true"
43
78
  :value.sync="model.f_price_type"
44
79
  close-on-select
45
- id="f_price_type"
46
80
  placeholder='请选择'
81
+ v-ref:pricetype
47
82
  v-model="model.f_price_type">
48
83
  </v-select>
49
84
  </div>
@@ -105,14 +140,6 @@
105
140
  style="width:60%"
106
141
  type="text" v-model="model.f_population_base" v-validate:f_population_base="{pattern: '/^[1-9]\\d*$/'}">
107
142
  </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
143
  <unit-price :is-disable.sync='isEdit' :unitmodel.sync='model.detailprice' v-if="unitshow"></unit-price>
117
144
  </div>
118
145
 
@@ -272,7 +299,7 @@ let initGen = async function (self, val) {
272
299
  blodid: '',
273
300
  stairshow: false,
274
301
  model: {
275
- f_price_type: [],
302
+ f_price_type: '',
276
303
  f_stairmonths: 1,
277
304
  f_perform_date: '',
278
305
  detailprice: [],
@@ -320,12 +347,20 @@ let initGen = async function (self, val) {
320
347
  this.initModel()
321
348
  }
322
349
  },
350
+ 'model.f_consolidated_user' (val) {
351
+ if (val === '1') {
352
+ this.model.f_price_type = '固定气价'
353
+ }
354
+ },
323
355
  'model.f_price_type' (val) {
324
356
  this.unitshow = false
325
357
  this.mixshow = false
326
358
  this.stairshow = false
327
359
  if (val === '固定气价') {
328
360
  this.model.detailprice = []
361
+ if (this.model.f_consolidated_user === '1') {
362
+ this.getPrice()
363
+ }
329
364
  this.unitshow = true
330
365
  } else if (val === '混合气价') {
331
366
  this.model.detailprice = []
@@ -341,6 +376,18 @@ let initGen = async function (self, val) {
341
376
  initGen(this, this.data)
342
377
  },
343
378
  methods: {
379
+ getPrice () {
380
+ if (this.model.f_resident_area && this.model.f_resident_price && this.model.f_non_resident_area && this.model.f_non_resident_price) {
381
+ let money = ((this.model.f_resident_area - 0) * (this.model.f_resident_price - 0)) + ((this.model.f_non_resident_area - 0) * (this.model.f_non_resident_price - 0))
382
+ console.log('money....' + money)
383
+ let area = ((this.model.f_resident_area - 0) + (this.model.f_non_resident_area - 0))
384
+ console.log('area....' + area)
385
+ let price = (money / area).toFixed(2)
386
+ console.log(price)
387
+ this.model.detailprice = []
388
+ this.model.detailprice.push({f_price: price})
389
+ }
390
+ },
344
391
  async CheckDuplicate () {
345
392
  if (!this.data) {
346
393
  let http = new HttpResetClass()
@@ -409,7 +456,7 @@ let initGen = async function (self, val) {
409
456
 
410
457
  async savePrice () {
411
458
  // 去除重复或者空的明细
412
- if (this.model.f_price_type[0] === '阶梯气价') {
459
+ if (this.model.f_price_type === '阶梯气价') {
413
460
  this.removeDuplication(this.model)
414
461
  }
415
462
  // 审核配置
@@ -423,7 +470,7 @@ let initGen = async function (self, val) {
423
470
  // this.model.limit_gas.f_start_date = this.model.f_perform_date
424
471
  }
425
472
  // 现调用气价修改的逻辑 返回:version 和之前的对比 增加的话, 进行提示操作 反之 结束
426
- await this.$LogicService.gasPrice(this.model, this.data)
473
+ await this.$TCLogicService.gasPrice(this.model, this.data)
427
474
  // 操作了气价 清空分公司initdata缓存
428
475
  let http = new HttpResetClass()
429
476
  await http.load('POST', 'rs/logic/delSaleInitData', {data: {}}, {resolveMsg: null, rejectMsg: null})
@@ -121,6 +121,18 @@
121
121
  :options='is_pax' clear-button>
122
122
  </v-select>
123
123
  </div>
124
+ <div class="col-sm-6 form-group form-input-group" :class="[!row.f_paper_type ? 'has-error' : '']">
125
+ <label class="control-label">发票种类:</label>
126
+ <v-select v-model="row.f_paper_type"
127
+ placeholder='请选择'
128
+ :value.sync="row.f_paper_type"
129
+ close-on-select
130
+ :width="60"
131
+ :value-single="true"
132
+ :search="false"
133
+ :options='invoice_types' clear-button>
134
+ </v-select>
135
+ </div>
124
136
  <div class="col-sm-12 form-group form-input-group">
125
137
  <label class="control-label">开户行及账号:</label>
126
138
  <input class="form-control col-sm-2"
@@ -177,6 +189,7 @@ export default {
177
189
  f_orgid: '',
178
190
  other: [],
179
191
  footer: [],
192
+ invoice_types: this.$appdata.getParam('发票种类'),
180
193
  invoice_is_pax: '征税',
181
194
  is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
182
195
  initres: {
@@ -126,6 +126,18 @@
126
126
  :options='is_pax' clear-button>
127
127
  </v-select>
128
128
  </div>
129
+ <div class="col-sm-6 form-group form-input-group" :class="[!row.f_paper_type ? 'has-error' : '']">
130
+ <label class="control-label">发票种类:</label>
131
+ <v-select v-model="row.f_paper_type"
132
+ placeholder='请选择'
133
+ :value.sync="row.f_paper_type"
134
+ close-on-select
135
+ :width="60"
136
+ :value-single="true"
137
+ :search="false"
138
+ :options='invoice_types' clear-button>
139
+ </v-select>
140
+ </div>
129
141
  <div class="col-sm-12 form-group form-input-group">
130
142
  <label class="control-label">开户行及账号:</label>
131
143
  <input class="form-control col-sm-2"
@@ -182,6 +194,7 @@ export default {
182
194
  f_orgid: '',
183
195
  other: [],
184
196
  footer: [],
197
+ invoice_types: this.$appdata.getParam('发票种类'),
185
198
  invoice_is_pax: '征税',
186
199
  is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
187
200
  initres: {
@@ -125,6 +125,18 @@
125
125
  :options='is_pax' clear-button>
126
126
  </v-select>
127
127
  </div>
128
+ <div class="col-sm-6 form-group form-input-group" :class="[!row.f_paper_type ? 'has-error' : '']">
129
+ <label class="control-label">发票种类:</label>
130
+ <v-select v-model="row.f_paper_type"
131
+ placeholder='请选择'
132
+ :value.sync="row.f_paper_type"
133
+ close-on-select
134
+ :width="60"
135
+ :value-single="true"
136
+ :search="false"
137
+ :options='invoice_types' clear-button>
138
+ </v-select>
139
+ </div>
128
140
  <div class="col-sm-12 form-group form-input-group">
129
141
  <label class="control-label">开户行及账号:</label>
130
142
  <input class="form-control col-sm-2"
@@ -181,6 +193,7 @@ export default {
181
193
  f_orgid: '',
182
194
  other: [],
183
195
  footer: [],
196
+ invoice_types: this.$appdata.getParam('发票种类'),
184
197
  invoice_is_pax: '征税',
185
198
  is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
186
199
  initres: {
@@ -234,6 +247,7 @@ export default {
234
247
  if (!this.row.f_email) {
235
248
  this.row.f_email = this.row.f_email
236
249
  }
250
+ this.invoice_type = this.row.f_paper_type
237
251
  this.eticket_msg = true
238
252
  },
239
253
  async open_eTicket () {
@@ -61,7 +61,7 @@ export default {
61
61
  id: sellId,
62
62
  charge_item: type,
63
63
  invoice_type: 0,
64
- invoice_kind,
64
+ invoice_kind: row.f_paper_type,
65
65
  retry,
66
66
  f_dept_id: this.$login.f.depids,
67
67
  f_operator: this.$login.f.name,
@@ -0,0 +1,496 @@
1
+ import Vue from 'vue'
2
+ import co from 'co'
3
+
4
+ let disableGen = function * (data) {
5
+ let owe = yield Vue.resetpost('rs/sql/getOverdue', {data: {f_userfiles_id: data.f_userfile_id + ''}}, {resolveMsg: null, rejectMsg: null})
6
+ console.log('表具停用看是否有欠费', owe.data)
7
+ let hasHandplan = yield Vue.resetpost('rs/sql/saleSingleTable', {data: {tablename: 't_handplan', condition: `f_meter_state = '未抄表' and f_userfiles_id = '${data.f_userfile_id + ''}'`}}, {resolveMsg: null, rejectMsg: null})
8
+ console.log('是否有未抄表数据', hasHandplan.data)
9
+ if (owe.data.length > 0 && hasHandplan.data.length > 0) {
10
+ Vue.showAlert('该表具还有欠费或者未抄表数据,不能停用!!', 'danger', 0)
11
+ } else {
12
+ yield Vue.resetpost('rs/entity/t_disable', data, {resolveMsg: '表具停用成功', rejectMsg: '表具停用失败'})
13
+ }
14
+ }
15
+
16
+ let TCLogicService = {
17
+ install (Vue, options) {
18
+ // 给vue增添对话框显示方法
19
+ Vue.TCLogicService = Vue.prototype.$TCLogicService = TCLogicService
20
+ },
21
+
22
+ // 总分表
23
+ addSplit (total_id, split_tables) {
24
+ let data = {
25
+ total_id: total_id,
26
+ split_ids: split_tables
27
+ }
28
+ console.log('终于到总分表保存了,,,,', data)
29
+ return Vue.resetpost('rs/logic/totalsplit', {data: data}, {resolveMsg: '成功建立总分表关系', rejectMsg: '建立总分表关系出错!!!'})
30
+ },
31
+
32
+ // 表具启用
33
+ meterEnable (model, row) {
34
+ let data = {
35
+ f_userfiles_id: {
36
+ f_userfiles_id: row.f_userfiles_id,
37
+ f_table_state: '正常',
38
+ version: row.version
39
+ },
40
+ f_userfile_id: row.f_userfiles_id,
41
+ f_user_id: row.f_user_id,
42
+ record_userinfo: row.f_userinfo_id,
43
+ f_userinfo_id: row.f_userinfo_id,
44
+ f_user_name: row.f_user_name,
45
+ f_comments: model.f_reason[0],
46
+ f_othereason: model.f_othereason,
47
+ f_operat_type: '启用',
48
+ f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行表具启用操作`,
49
+ f_state: '有效',
50
+ f_operator: Vue.$login.f.name,
51
+ f_operatorid: Vue.$login.f.id,
52
+ f_orgid: Vue.$login.f.orgid,
53
+ f_orgname: Vue.$login.f.orgs,
54
+ f_depid: Vue.$login.f.depids,
55
+ f_depname: Vue.$login.f.deps,
56
+ f_zoneid: Vue.$login.f.zoneid,
57
+ f_zones: Vue.$login.f.zones
58
+ }
59
+ return Vue.resetpost('rs/entity/t_enable', data, {resolveMsg: '表具启用成功', rejectMsg: '表具启用失败'})
60
+ },
61
+
62
+ // 表具停用
63
+ meterDisable (model, row) {
64
+ let data = {
65
+ f_userfiles_id: {
66
+ f_userfiles_id: row.f_userfiles_id,
67
+ f_table_state: '停用',
68
+ version: row.version
69
+ },
70
+ f_userfile_id: row.f_userfiles_id,
71
+ f_user_id: row.f_user_id,
72
+ f_userinfo_id: row.f_userinfo_id,
73
+ f_user_name: row.f_user_name,
74
+ f_comments: model.f_reason[0],
75
+ f_othereason: model.f_othereason,
76
+ f_operat_type: '停用',
77
+ f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行表具停用操作`,
78
+ f_state: '有效',
79
+ f_operator: Vue.$login.f.name,
80
+ f_operatorid: Vue.$login.f.id,
81
+ f_orgid: Vue.$login.f.orgid,
82
+ f_orgname: Vue.$login.f.orgs,
83
+ f_depid: Vue.$login.f.depids,
84
+ f_depname: Vue.$login.f.deps,
85
+ f_zoneid: Vue.$login.f.zoneid,
86
+ f_zones: Vue.$login.f.zones
87
+ }
88
+ let disable = disableGen(data)
89
+ return co(disable)
90
+ },
91
+
92
+ // 其他收费
93
+ otherCharge (model, row) {
94
+ let data = {
95
+ f_time_date: model.f_time_date,
96
+ f_serial_id: model.f_serial_id,
97
+ record_userinfo: row.f_userinfo_id,
98
+ f_serial_number: model.f_serial_number,
99
+ f_userfiles_id: row.f_userfiles_id,
100
+ f_user_id: row.f_user_id,
101
+ f_user_name:row.f_user_name,
102
+ f_address:row.f_address,
103
+ f_user_type:row.f_user_type,
104
+ f_gasproperties:row.f_gasproperties,
105
+ // f_number: model.f_number,
106
+ // f_unitprice: model.f_unitprice,
107
+ f_collection: model.f_collection,
108
+ f_comments: model.f_comments,
109
+ f_payment: model.f_payment[0],
110
+ f_voucher_number: model.f_voucher_number,
111
+ f_bill_style: model.f_print[0],
112
+ // f_brand_spec: model.f_brand_spec[0],
113
+ f_userinfo_id: row.f_userinfo_id,
114
+ f_service_person: model.f_service_person[0],
115
+ f_operat_type: '其他收费',
116
+ f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行其他收费操作`,
117
+ f_state: '有效',
118
+ f_operator: Vue.$login.f.name,
119
+ f_operatorid: Vue.$login.f.id,
120
+ f_orgid: Vue.$login.f.orgid,
121
+ f_orgname: Vue.$login.f.orgs,
122
+ f_depid: Vue.$login.f.depids,
123
+ f_depname: Vue.$login.f.deps,
124
+ f_zoneid: Vue.$login.f.zoneid,
125
+ f_zones: Vue.$login.f.zones,
126
+ // 其他费用信息
127
+ t_userfees: model.t_userfees,
128
+ f_fee_type: model.f_fee_type[0],
129
+ f_fee_time: model.f_fee_time[0],
130
+ otherdetail: model.otherdetail
131
+ }
132
+ return Vue.resetpost('rs/logic/sale_othercharge_logic', data, {resolveMsg: '其他收费成功', rejectMsg: '其他收费失败'})
133
+ },
134
+ otherChargeByPay (model, row) {
135
+ let data = {
136
+ f_serial_id: model.f_serial_id,
137
+ nopay_id: model.nopay_id,
138
+ record_userinfo: row.f_userinfo_id,
139
+ f_userfiles_id: row.f_userfiles_id,
140
+ f_user_id: row.f_user_id,
141
+ f_user_name:row.f_user_name,
142
+ f_address:row.f_address,
143
+ f_user_type:row.f_user_type,
144
+ f_gasproperties:row.f_gasproperties,
145
+ // f_number: model.f_number,
146
+ // f_unitprice: model.f_unitprice,
147
+ f_collection: model.f_collection,
148
+ f_comments: model.f_comments,
149
+ f_payment: model.f_payment[0],
150
+ f_voucher_number: model.f_voucher_number,
151
+ f_bill_style: model.f_print[0],
152
+ // f_brand_spec: model.f_brand_spec[0],
153
+ f_userinfo_id: row.f_userinfo_id,
154
+ f_service_person: model.f_service_person[0],
155
+ f_operat_type: '其他收费',
156
+ f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行其他收费操作`,
157
+ f_state: '有效',
158
+ f_operator: Vue.$login.f.name,
159
+ f_operatorid: Vue.$login.f.id,
160
+ f_orgid: Vue.$login.f.orgid,
161
+ f_orgname: Vue.$login.f.orgs,
162
+ f_depid: Vue.$login.f.depids,
163
+ f_depname: Vue.$login.f.deps,
164
+ f_zoneid: Vue.$login.f.zoneid,
165
+ f_zones: Vue.$login.f.zones,
166
+ // 其他费用信息
167
+ t_userfees: model.t_userfees,
168
+ otherdetail: model.otherdetail
169
+ }
170
+ return Vue.resetpost('rs/logic/sale_othercharge_bypay', data, {resolveMsg: '其他收费成功', rejectMsg: '其他收费失败'})
171
+ },
172
+ // 维修收费
173
+ repairCharge (model, row) {
174
+ let data = {
175
+ record_userinfo: row.f_userinfo_id,
176
+ f_userfiles_id: row.f_userfiles_id,
177
+ f_user_id: row.f_user_id,
178
+ // f_number: model.f_number,
179
+ // f_unitprice: model.f_unitprice,
180
+ f_collection: model.f_collection,
181
+ f_comments: model.f_comments,
182
+ f_payment: model.f_payment[0],
183
+ f_voucher_number: model.f_voucher_number,
184
+ f_bill_style: model.f_print[0],
185
+ // f_brand_spec: model.f_brand_spec[0],
186
+ f_userinfo_id: row.f_userinfo_id,
187
+ f_service_person: model.f_service_person[0],
188
+ f_operat_type: '维修收费',
189
+ f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行维修收费操作`,
190
+ f_state: '有效',
191
+ f_operator: Vue.$login.f.name,
192
+ f_operatorid: Vue.$login.f.id,
193
+ f_orgid: Vue.$login.f.orgid,
194
+ f_orgname: Vue.$login.f.orgs,
195
+ f_depid: Vue.$login.f.depids,
196
+ f_depname: Vue.$login.f.deps,
197
+ f_zoneid: Vue.$login.f.zoneid,
198
+ f_zones: Vue.$login.f.zones,
199
+ // 其他费用信息
200
+ t_userfees: model.t_userfees,
201
+ f_fee_type: model.f_fee_type[0],
202
+ f_fee_time: model.f_fee_time[0],
203
+ otherdetail: model.otherdetail
204
+ }
205
+ return Vue.resetpost('rs/logic/repaircharge', data, {resolveMsg: '维修收费成功', rejectMsg: '维修收费失败'})
206
+ },
207
+ // 过户管理
208
+ changeAccount (model) {
209
+ // console.log('过户。,。。', model)
210
+ return Vue.resetpost('rs/logic/transferSave', {data: {model: model}}, {resolveMsg: '过户成功', rejectMsg: '过户失败'})
211
+ },
212
+
213
+ updateGasPrice (data) {
214
+ // 批量变更气价
215
+ return Vue.resetpost('rs/logic/updateBatchPrice', data, {resolveMsg: '批量修改成功', rejectMsg: '批量变更气价失败'})
216
+ },
217
+ // 增加气表品牌
218
+ addGasBrand (model, Arrlist) {
219
+ let data = {
220
+ f_meter_brand: model.f_meter_brand,
221
+ f_manufacturers: model.f_manufacturers,
222
+ f_meter_type: model.f_meter_type,
223
+ f_police_gas: model.f_police_gas ? model.f_police_gas : 0,
224
+ f_cardnumber: model.f_cardnumber,
225
+ f_card_password: model.f_card_password,
226
+ f_topup_ceil: model.f_topup_ceil ? model.f_topup_ceil : 0,
227
+ f_overdr_lines: model.f_overdr_lines ? model.f_overdr_lines : 0,
228
+ f_meter_limit: model.f_meter_limit ? model.f_meter_limit : 0,
229
+ f_checkout_limit: model.f_checkout_limit ? model.f_checkout_limit : 0,
230
+ f_is_replacement: model.f_is_replacement ? model.f_is_replacement : '',
231
+ f_alias: model.f_alias,
232
+ f_isdecimal: model.f_isdecimal,
233
+ f_collection_type: model.f_collection_type,
234
+ f_calculation: model.f_calculation,
235
+ f_system_settlement: model.f_system_settlement,
236
+ f_comments: model.f_comments,
237
+ f_is_check: model.f_is_check,
238
+ f_is_step: model.f_is_step,
239
+ f_priority: model.f_priority,
240
+ f_support_purchase: model.f_support_purchase,
241
+ f_issupport_feededuction: model.f_issupport_feededuction,
242
+ f_dynamic_expire: model.f_dynamic_expire,
243
+ f_hascard: model.f_hascard,
244
+ f_share_times: model.f_share_times,
245
+ f_share_open: model.f_share_open,
246
+ f_operatorid: Vue.$login.f.id,
247
+ f_operator: Vue.$login.f.name,
248
+ f_orgid: Vue.$login.f.orgid,
249
+ f_orgname: Vue.$login.f.orgs,
250
+ f_depid: Vue.$login.f.depids,
251
+ f_depname: Vue.$login.f.deps,
252
+
253
+ gasmodellist: Arrlist
254
+ }
255
+ return Vue.resetpost('rs/logic/addGasBrand', {data: data}, {resolveMsg: '添加气表成功', rejectMsg: '增加气表失败'})
256
+ },
257
+ // 修改气表品牌
258
+ modifyGasBrand (model, Arrlist) {
259
+ console.log('气表品牌保存,,', model)
260
+ model.f_operatorid = Vue.$login.f.id
261
+ model.f_operator = Vue.$login.f.name
262
+ model.f_orgid = Vue.$login.f.orgid
263
+ model.f_orgname = Vue.$login.f.orgs
264
+ model.f_depid = Vue.$login.f.depids
265
+ model.f_depname = Vue.$login.f.deps
266
+ return Vue.resetpost('rs/logic/updataGasBrand', {data: {data: model, gasmodellist: Arrlist}}, {resolveMsg: '修改气表品牌成功', rejectMsg: '修改气表品牌失败'})
267
+ },
268
+ // 删除气表品牌
269
+ delGasBrand (row) {
270
+ console.log(row)
271
+ return Vue.resetpost('rs/logic/delGasBrand', {data: {id: row.id, f_orgid: Vue.$login.f.orgid}})
272
+ },
273
+ deleteUsingOrg (row) {
274
+ console.log(row)
275
+ return Vue.resetpost('rs/logic/deleteUsingOrg', {data: {id: row.f_gasbrand_id, f_orgid: row.f_orgid}})
276
+ },
277
+ createMessage (data) {
278
+ return Vue.resetpost('rs/logic/messageBatchOperate', data, {resolveMsg: '生成短信成功', rejectMsg: '生成短信失败'})
279
+ },
280
+ createMessageNew (data) {
281
+ return Vue.resetpost('rs/logic/messageBatchOperateNew', data, {resolveMsg: '生成短信成功', rejectMsg: '生成短信失败'})
282
+ },
283
+ helpInfo (model) {
284
+ let data = {
285
+ id: model.id,
286
+ f_allowed_user: model.f_allowed_user,
287
+ f_allowed_company: model.f_allowed_company,
288
+ f_password: model.f_password,
289
+ f_operator: model.f_operator
290
+ }
291
+ return Vue.resetpost('rs/logic/helpInfoAdd', {data: data})
292
+ },
293
+ del (model) {
294
+ let data = {
295
+ id: model.id
296
+ }
297
+ return Vue.resetpost('rs/logic/delHelpRow', {data: data})
298
+ },
299
+
300
+ // 抄表册
301
+ gasMeterBook (model, row) {
302
+ console.log('表册信息保存,,', model)
303
+ let data = {
304
+ f_book_code: model.f_book_code,
305
+ f_book_name: model.f_book_name,
306
+ f_inputtor: model.f_inputtor,
307
+ f_period: model.f_period,
308
+ f_hand_begin_date: model.f_hand_begin_date,
309
+ f_hand_end_date: model.f_hand_end_date,
310
+ f_book_remark: model.f_book_remark,
311
+ f_filiale_id: model.f_filiale_id,
312
+ f_filiale_name: model.f_filiale_name,
313
+ f_comments: model.f_comments,
314
+ f_state: '有效',
315
+ f_book_state: model.f_book_state,
316
+ f_meterbook_end_date:model.f_meterbook_end_date,
317
+ f_operatorid: Vue.$login.f.id,
318
+ f_operator: Vue.$login.f.name,
319
+ f_orgid: model.f_filiale_id,
320
+ f_orgname: model.f_filiale_name,
321
+ f_depid: Vue.$login.f.depids,
322
+ f_depname: Vue.$login.f.deps,
323
+ f_book_slice_area: model.f_book_slice_area,
324
+ userid: Vue.$login.f.id,
325
+ type: '添加'
326
+ }
327
+
328
+ if (row && row.id != null) {
329
+ data.id = row.id
330
+ data.version = row.version
331
+ data.type = '修改'
332
+ }
333
+ console.log('data提交之前', data)
334
+ return Vue.resetpost('rs/logic/saveMeterBook', {data: data})
335
+ },
336
+ gasPrice (model, row, blodid) {
337
+ console.log(123 + model)
338
+ let data = {
339
+ f_blodid: blodid,
340
+ f_price_type: model.f_price_type,
341
+ f_price_name: model.f_price_name,
342
+ f_user_type: model.f_user_type,
343
+ f_gasproperties: model.f_gasproperties,
344
+ f_perform_date: model.f_perform_date,
345
+ f_end_date: '2099-12-31 23:59:59',
346
+ f_islow_income: model.f_islow_income - 0,
347
+ f_limit_cycle: model.f_limit_cycle ? model.f_limit_cycle : 0,
348
+ f_limit_gas: model.f_limit_gas ? model.f_limit_gas : 0,
349
+
350
+ // 阶梯相关字段
351
+ f_stairmonths: null,
352
+ f_population_base: null,
353
+ f_stair_start_date: null,
354
+ f_add_price: model.f_add_price,
355
+ f_isheat: model.f_isheat - 0,
356
+ f_deduction_way: model.f_deduction_way,
357
+ // 采暖季相关字段
358
+ f_heat_start_date: model.f_heat_start_date ? model.f_heat_start_date : null,
359
+ f_heat_cycle: model.f_heat_cycle ? model.f_heat_cycle : null,
360
+
361
+ f_priority: model.f_priority,
362
+ f_comments: model.f_comments,
363
+ f_state: '有效',
364
+ f_operatorid: Vue.$login.f.id,
365
+ f_operator: Vue.$login.f.name,
366
+ f_orgid: Vue.$login.f.orgid,
367
+ f_orgname: Vue.$login.f.orgs,
368
+ f_depid: Vue.$login.f.depids,
369
+ f_depname: Vue.$login.f.deps,
370
+
371
+ // 所属分公司
372
+ f_filialeid: model.f_filialeid,
373
+ f_filialename: model.f_filialename,
374
+
375
+ detailprice: model.detailprice,
376
+ f_processid: model.f_processid,
377
+ userid: Vue.$login.f.id,
378
+ audit: model.audit,
379
+ type: '添加',
380
+ f_consolidated_user: model.f_consolidated_user,
381
+ f_resident_area: model.f_resident_area,
382
+ f_resident_price: model.f_resident_price,
383
+ f_non_resident_area: model.f_non_resident_area,
384
+ f_non_resident_price: model.f_non_resident_price
385
+ }
386
+ if(model.f_priceStates && model.f_priceStates=='否'){
387
+ data.f_end_date=null
388
+ }
389
+ if (model.toBeUsePriceId && model.toBeUsePriceVersion) {
390
+ // 待使用 气价的id
391
+ data.toBeUsePriceId = model.toBeUsePriceId
392
+ data.toBeUsePriceVersion = model.toBeUsePriceVersion
393
+ }
394
+
395
+ if (model.limit_gas) {
396
+ data.limit_gas = model.limit_gas
397
+ }
398
+
399
+ if (data.purchaselimit) {
400
+ data.purchaselimit.forEach((item, index) => {
401
+ data.purchaselimit[index].value = model.purchaselimit[index].value
402
+ })
403
+ }
404
+ if (data.f_price_type === '固定气价') {
405
+ if (data.detailprice[0].id) {
406
+ delete data.detailprice[0].id
407
+ }
408
+ data.detailprice[0].f_price_name = 1
409
+ } else if (data.f_price_type === '混合气价') {
410
+ if (delete data.detailprice[0].id) {
411
+ delete data.detailprice[0].id
412
+ }
413
+ data.detailprice[0].f_price_name = 1
414
+ data.detailprice[0].f_mixprice = model.detailprice[0].f_mixprice[0]
415
+ if (delete data.detailprice[1].id) {
416
+ delete data.detailprice[1].id
417
+ }
418
+ data.detailprice[1].f_price_name = 2
419
+ data.detailprice[1].f_mixprice = model.detailprice[1].f_mixprice[0]
420
+ } else if (data.f_price_type === '阶梯气价') {
421
+ data.f_stairmonths = model.f_stairmonths
422
+ data.f_population_base = model.f_population_base
423
+ data.f_stair_start_date = model.f_stair_start_date
424
+ data.detailprice.forEach((item, index) => {
425
+ data.detailprice[index].f_price_name = index + 1
426
+ if (index === 0){
427
+ data.detailprice[index].f_available_gas = data.detailprice[index].f_gas
428
+ } else {
429
+ data.detailprice[index].f_available_gas = data.detailprice[index].f_gas-data.detailprice[index-1].f_gas
430
+ }
431
+
432
+ if (data.detailprice[index].id) {
433
+ if (delete data.detailprice[index].id) {
434
+ delete data.detailprice[index].id
435
+ }
436
+ } else if (data.detailprice[index].f_ratio) {
437
+ data.detailprice[index].f_ratio = null
438
+ } else if (!data.detailprice[index].f_add_gas) {
439
+ data.detailprice[index].f_add_gas = 0
440
+ } else if (!data.detailprice[index].f_add_gas_heat) {
441
+ data.detailprice[index].f_add_gas_heat = 0
442
+ }
443
+ })
444
+ }
445
+ if (row && row.id != null) {
446
+ data.oldprice = {
447
+ id: row.id
448
+ }
449
+ data.type = '修改'
450
+ data.f_price_id = row.f_price_id
451
+ data.f_version = (row.f_version - 0)
452
+ }
453
+ console.log('data提交之前', data)
454
+ return Vue.resetpost('rs/logic/gasprice', {data: data})
455
+ },
456
+ basicLiving (model, row) {
457
+ console.log('看传过来的model')
458
+ console.log(model)
459
+ let data = {
460
+ f_userinfo_id: model.f_userinfo_id,
461
+ f_userfiles_id: model.f_userfiles_id,
462
+ f_start_date: model.f_start_date,
463
+ f_end_date: model.f_end_date,
464
+ // f_period: model.f_period,
465
+ f_state: '有效',
466
+ f_price_id: model.f_price_id,
467
+ f_operatorid: Vue.$login.f.id,
468
+ f_operator: Vue.$login.f.name,
469
+ f_orgid: Vue.$login.f.orgid,
470
+ f_orgname: Vue.$login.f.orgs,
471
+ f_depid: Vue.$login.f.depids,
472
+ f_depname: Vue.$login.f.deps,
473
+
474
+ type: '添加'
475
+ }
476
+ if (row && row.id != null) {
477
+ data.oldbasicliving = {
478
+ id: row.id
479
+ }
480
+ data.type = '修改'
481
+ }
482
+ console.log('data提交之前', data)
483
+ return Vue.resetpost('rs/logic/addBasicLiving', {data: data})
484
+ },
485
+ sendMessage (condition) {
486
+ return Vue.resetpost('rs/logic/sendSms', {condition: condition})
487
+ },
488
+ deletMessage (condition) {
489
+ return Vue.resetpost('rs/logic/deleteSms', {condition: condition}, {resolveMsg: '删除短信成功', rejectMsg: '删除短信失败'})
490
+ },
491
+ deletAllMessage (condition) {
492
+ return Vue.resetpost('rs/logic/deleteSms', {condition: condition, operate: 'all'}, {resolveMsg: '删除短信成功', rejectMsg: '删除短信失败'})
493
+ }
494
+ }
495
+
496
+ export default TCLogicService
@@ -2,6 +2,9 @@
2
2
 
3
3
  import Vue from 'vue'
4
4
 
5
+ import TCLogicService from './plugins/LogicService'
6
+ Vue.use(TCLogicService)
7
+
5
8
  export default function () {
6
9
  // 档案信息
7
10
  Vue.component('file-user-files', (resolve) => { require(['./FileUserFiles'], resolve) })
@@ -140,4 +143,6 @@ export default function () {
140
143
  Vue.component('web-meter-info', (resolve) => { require(['./WebMeterInfo'], resolve) })
141
144
  // 税号审核
142
145
  Vue.component('paper-audit', (resolve) => { require(['./paperaudit'], resolve) })
146
+ // 电子发票管理
147
+ Vue.component('e-ticket-manage', (resolve) => { require(['./EticketManage'], resolve) })
143
148
  }