sale-client 3.6.59 → 3.6.61

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.
@@ -1,5 +1,5 @@
1
1
  var path = require('path')
2
- const [localUrl, serverRul] = ['http://192.168.50.4:8400', 'http://192.168.50.4:8400']
2
+ const [localUrl, serverRul] = [ 'http://127.0.0.1:8080/', 'http://140.249.18.101:8400/']
3
3
  var merge = require('webpack-merge')
4
4
  var baseConfig = require('./webpack.dev.conf')
5
5
  var devConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.59",
3
+ "version": "3.6.61",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@
9
9
  <div style="margin-top:10px;" v-for="(index, row) in model.otherdetail">
10
10
  <div class="row">
11
11
  <div class="col-sm-4" :class="{'has-success':row.f_brand_spec,'select-error':!row.f_brand_spec}">
12
- <label for="f_brand_spec" class="font_normal_body " title="参数名称:品名及规格">收费类型</label>
12
+ <label for="f_brand_spec" class="font_normal_body " title="参数名称:品名及规格">{{brandType}}</label>
13
13
  <v-select id="f_brand_spec"
14
14
  placeholder='请选择'
15
15
  v-model="row.f_brand_spec"
@@ -175,6 +175,7 @@
175
175
  </div>
176
176
  </template>
177
177
  <script>
178
+ import {HttpResetClass} from 'vue-client'
178
179
  let otherChargeGen = async function (self, parameter) {
179
180
  try {
180
181
  // 加入扫码盒付款码支付流水号
@@ -275,6 +276,7 @@ let asyncOtherCharge = async function (self) {
275
276
  self.model.f_use_type = self.config.billType
276
277
  self.model.f_bill_type = self.model.f_print
277
278
  self.hasValidateBill = self.config.hasBillManage
279
+ self.initSecuritypersons()
278
280
  // self.setTypename(self.model.f_brand_spec[0])
279
281
  }
280
282
  export default {
@@ -327,6 +329,7 @@ export default {
327
329
  typeNameList: [],
328
330
  typenumberList: [],
329
331
  brandspec: this.$appdata.getParam('品名及规格'),
332
+ brandType: this.$appdata.getSingleValue('其他收费类型') ? this.$appdata.getSingleValue('其他收费类型') : '收费类型',
330
333
  printstyle: this.$appdata.getParam('打印格式'),
331
334
  paytype: this.$appdata.getParam('付款方式'),
332
335
  feetype: this.$appdata.getParam('其他费用'),
@@ -347,6 +350,27 @@ export default {
347
350
  }
348
351
  },
349
352
  methods: {
353
+ // 初始化安检人
354
+ initSecuritypersons () {
355
+ let origin = this.$appdata.getSingleValue('服务人员来源')
356
+ if (origin) {
357
+ try {
358
+ this.services = []
359
+ let http = new HttpResetClass()
360
+ http.load('post', '/rs/search', {
361
+ source: `this.getParentByType($organization$).getChildByName($${origin}$).getUsers()`,
362
+ userid: this.$login.f.id
363
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
364
+ console.log('获取安检人员', res.data)
365
+ for (let i = 0; i < res.data.length; i++) {
366
+ this.services.push({label: res.data[i].name, value: res.data[i].name})
367
+ }
368
+ })
369
+ } catch (e) {
370
+ console.log('获取安检人员失败')
371
+ }
372
+ }
373
+ },
350
374
  setTypeprice (val) {
351
375
  console.log("单价变化:",val)
352
376
  if (this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber[0]) {
@@ -72,12 +72,9 @@
72
72
  </div>
73
73
  </div>
74
74
  </criteria>
75
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
75
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :optional="true">
76
76
  <template partial='head'>
77
77
  <tr>
78
- <th>
79
- <input type="checkbox" @click="$parent.$parent.$parent.addOrRemove($parent.$parent.$parent.selectAll)" :checked="$parent.$parent.$parent.selectAll">
80
- </th>
81
78
  <th>序号</th>
82
79
  <th>客户编号</th>
83
80
  <th>用户姓名</th>
@@ -90,9 +87,6 @@
90
87
  </tr>
91
88
  </template>
92
89
  <template partial='body' >
93
- <td style="text-align:center">
94
- <input type="checkbox" v-model="$parent.$parent.$parent.selecteds" :value="row">
95
- </td>
96
90
  <td style="text-align:center">{{$index+1}}</td>
97
91
  <td style="text-align:center">{{row.f_userinfo_code}}</td>
98
92
  <td style="text-align:center">{{row.f_user_name}}</td>
@@ -173,21 +167,20 @@
173
167
  return {
174
168
  criteriaShow: false,
175
169
  f_filialeids: Vue.$login.f.orgids,
176
- model: new PagedList('rs/sql/openSellelent', 50, {},),
170
+ model: new PagedList('rs/sql/openSellelent', 50, {}),
177
171
  f_outlets: Vue.$login.f.f_parentname,
178
172
  f_filiale: Vue.$login.f.f_fengongsi,
179
173
  f_operator: Vue.$login.f.name,
180
174
  f_orgstr: Vue.$login.f.orgpathstr,
181
- f_filialeids: Vue.$login.f.f_orgids,
182
175
  invoice_is_pax: '征税',
183
176
  is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
184
177
  selecteds: [],
185
- eticket_show:false,
178
+ eticket_show: false,
186
179
  eticket_msg: false,
187
180
  invoice_show_gas: '否',
188
181
  show_gas: [{label: '是', value: '是'}, {label: '否', value: '否'}],
189
182
  row: {},
190
- disabled:false,
183
+ disabled: false,
191
184
  mid: [{label: '全部', value: ''}, {label: '是', value: ' > 0 '}, {label: '否', value: ' is null'}]
192
185
  }
193
186
  },
@@ -196,20 +189,21 @@
196
189
  this.$refs.paged.$refs.cri.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
197
190
  },
198
191
  methods: {
199
- closeEticket(){
200
- this.eticket_msg=false
201
- this.disabled=false
192
+ closeEticket () {
193
+ this.eticket_msg = false
194
+ this.disabled = false
202
195
  },
203
196
  getorg (val) {
204
197
  this.f_orgid = this.$login.convertToIn(val)
205
198
  this.f_filialeids = val[0]
206
199
  },
207
- cancel(){
208
- this.show=false
209
- this.info={}
200
+ cancel () {
201
+ this.show = false
202
+ this.info = {}
210
203
  },
211
204
  async open_eTicket () {
212
- if(this.selecteds.length>1){
205
+ this.selecteds = this.$refs.paged.$refs.grid.getRowData()
206
+ if (this.selecteds.length > 1) {
213
207
  this.$showAlert('选中条数大于一条,请重新修改!!', 'warning', 2000)
214
208
  return
215
209
  }
@@ -217,7 +211,7 @@
217
211
  let row = await HttpReset.load('POST', 'rs/sql/sale_getUser', {
218
212
  data: {
219
213
  orderitem: 'f_userinfo_code',
220
- condition: `f_userinfo_code = '${[...new Set(this.selecteds.map(item => item.f_userinfo_code))][0]}'`
214
+ condition: `f_userinfo_code = '${this.selecteds[0].f_userinfo_code}'`
221
215
  }
222
216
  }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
223
217
  this.row = row.data[0]
@@ -231,20 +225,20 @@
231
225
  if (!this.row.f_address_phone) {
232
226
  this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
233
227
  }
234
- if(this.selecteds.map(item => item.f_type).toString()=='其他收费'){
235
- this.disabled=true
228
+ if (this.selecteds.map(item => item.f_type).toString() == '其他收费') {
229
+ this.disabled = true
236
230
  }
237
231
 
238
232
  this.eticket_msg = true
239
233
  },
240
234
  confirm () {
241
235
  this.eticket_msg = false
242
- this.disabled=false
236
+ this.disabled = false
243
237
  this.eticket_show = true
244
- if(this.selecteds.map(item => item.f_type).toString()=='其他收费'||this.selecteds.map(item => item.f_type).toString()=='卡表收费'||this.selecteds.map(item => item.f_type).toString()=='发卡售气'){
245
- this.invoice_show_gas='是'
238
+ if (this.selecteds.map(item => item.f_type).toString() == '其他收费' || this.selecteds.map(item => item.f_type).toString() == '卡表收费' || this.selecteds.map(item => item.f_type).toString() == '发卡售气') {
239
+ this.invoice_show_gas = '是'
246
240
  }
247
- this.$refs.eticketbill.openETicket(this.selecteds.map(item => item.id), this.row, this.invoice_show_gas,this.invoice_is_pax, this.selecteds.map(item => item.f_type).toString())
241
+ this.$refs.eticketbill.openETicket(this.selecteds.map(item => item.id), this.row, this.selecteds[0].f_type)
248
242
  },
249
243
  eticket_toggle () {
250
244
  this.eticket_show = false
@@ -254,37 +248,23 @@
254
248
  if (!this.f_orgid) {
255
249
  this.getorg([this.$login.f.orgid])
256
250
  }
257
- args.condition=` f_orgid='${this.f_filialeids}' and ${args.condition}`
251
+ args.condition = ` f_orgid='${this.f_filialeids}' and ${args.condition}`
258
252
 
259
253
  await this.model.search(args.condition, this.model)
260
- this.addOrRemove(true)
261
254
  },
262
255
  search () {
263
256
  this.$refs.paged.$refs.cri.search()
264
257
  this.$dispatch('refresh')
265
- },
266
- addOrRemove (is) {
267
- this.selecteds = []
268
- if (!is) { // 添加本页所有数据到ids中
269
- this.model.rows.forEach((row) => {
270
- this.selecteds.push(row)
271
- })
272
- this.selectAll = true
273
- } else { // 从ids中取消所有的数据
274
- this.selecteds = []
275
- this.selectAll = false
276
- }
277
- console.log("selectdde",this.selecteds)
278
258
  }
279
259
  },
280
260
  computed: {
281
- chargetypes(){
282
- return [{label: '全部', value: ''},...this.$appdata.getParam('收费类型')]
283
- },
261
+ chargetypes () {
262
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('收费类型')]
263
+ }
284
264
  },
285
- watch:{
286
- selecteds(){
287
- console.log("框框的长度",this.selecteds.length)
265
+ watch: {
266
+ selecteds () {
267
+ console.log('框框的长度', this.selecteds.length)
288
268
  }
289
269
  }
290
270
  }
@@ -14,8 +14,7 @@
14
14
  v-model="model.startDate"
15
15
  :value.sync="model.startDate"
16
16
  :format="'yyyy-MM-dd HH:mm:ss'"
17
- :show-reset-button="true"
18
- condition="f_input_date >= '{}'">
17
+ :show-reset-button="true">
19
18
  </datepicker>
20
19
  </div>
21
20
  <div class="col-sm-2 form-group">
@@ -24,8 +23,7 @@
24
23
  v-model="model.endDate"
25
24
  :value.sync="model.endDate"
26
25
  :format="'yyyy-MM-dd HH:mm:ss'"
27
- :show-reset-button="true"
28
- condition="f_input_date <= '{}'">
26
+ :show-reset-button="true">
29
27
  </datepicker>
30
28
  </div>
31
29
  <div class="col-sm-2 form-group">
@@ -71,13 +69,16 @@
71
69
  <nobr>小区名称</nobr>
72
70
  </th>
73
71
  <th>
74
- <nobr>抄表数</nobr>
72
+ <nobr>应抄户数</nobr>
75
73
  </th>
76
74
  <th>
77
- <nobr>实抄表数</nobr>
75
+ <nobr>未抄户数</nobr>
78
76
  </th>
79
77
  <th>
80
- <nobr>档案户数</nobr>
78
+ <nobr>已抄无用量</nobr>
79
+ </th>
80
+ <th>
81
+ <nobr>实抄户数</nobr>
81
82
  </th>
82
83
  <th>
83
84
  <nobr>用气量</nobr>
@@ -95,13 +96,19 @@
95
96
  <nobr>{{row.f_residential_area}}</nobr>
96
97
  </td>
97
98
  <td style="text-align: center;">
98
- <nobr>{{row.handplannum}}</nobr>
99
+ <nobr>{{row.f_user_number}}</nobr>
100
+ </td>
101
+ <td style="text-align: center;">
102
+ <nobr>{{row.f_no_hand}}</nobr>
99
103
  </td>
100
104
  <td style="text-align: center;">
101
- <nobr>{{row.ishandplan}}</nobr>
105
+ <nobr>{{row.f_no_hand}}</nobr>
102
106
  </td>
103
107
  <td style="text-align: center;">
104
- <nobr>{{row.peoplenum}}</nobr>
108
+ <nobr>{{row.f_out_hand}}</nobr>
109
+ </td>
110
+ <td style="text-align: center;">
111
+ <nobr>{{row.f_hand_num}}</nobr>
105
112
  </td>
106
113
  <td style="text-align: center;">
107
114
  <nobr>{{row.f_oughtamount}}</nobr>
@@ -158,9 +165,9 @@ export default {
158
165
  other: [],
159
166
  footer: [],
160
167
  data: {},
161
- model: new PagedList('rs/sql/salehandplanRate', 20, {}, {
162
- f_oughtamount: 0,
163
- f_oughtfee: 0,
168
+ model: new PagedList('rs/sql/salehandplanRate', 20, {startDate: 'this.model.startDate', endDate: 'this.model.endDate'}, {
169
+ f_oughtamount: 0,
170
+ f_oughtfee: 0
164
171
  }),
165
172
  initres: {
166
173
  org: [this.$login.f.orgid],
@@ -181,13 +188,14 @@ export default {
181
188
  defaultPrint: [],
182
189
  excelHeaders: {
183
190
  'f_residential_area': '小区名称',
184
- 'handplannum': '抄表数',
185
- 'ishandplan': '实抄表数',
186
- 'peoplenum': '档案户数',
191
+ 'f_user_number': '应抄户数',
192
+ 'f_no_hand': '未抄户数',
193
+ 'f_out_hand': '已抄无用量',
194
+ 'f_hand_num': '实抄户数',
187
195
  'f_oughtamount': '用气量',
188
196
  'f_oughtfee': '用气金额',
189
- 'handplansate1':'抄表率'
190
- }
197
+ 'handplansate1': '抄表率'
198
+ }
191
199
  },
192
200
  inputtores: [{label: '全部', value: ''}], // 抄表员
193
201
  condition: ' 1 = 1'
@@ -347,10 +347,10 @@ export default {
347
347
  // TODO 查询失败后保存发票详情
348
348
  await this.save_msg({
349
349
  f_eticket_id: ticket_id,
350
- f_sign_result: result.errmsg,
350
+ f_sign_result: result.msg,
351
351
  f_bill_state: '开票失败'
352
352
  })
353
- this.return_msg = '电子票开票出错,错误【' + result.errmsg + '】,请前往发票管理重新尝试'
353
+ this.return_msg = '电子票开票出错,错误【' + result.msg + '】,请前往发票管理重新尝试'
354
354
  } else {
355
355
  await this.save_msg({
356
356
  f_eticket_id: ticket_id,
@@ -42,7 +42,7 @@ export default function () {
42
42
  // 卡表收费
43
43
  Vue.component('card-meter-center', (resolve) => { require(['./components/revenue/CardMeterCenter'], resolve) })
44
44
  // 收费(综合)-其他收费xin
45
- Vue.component('other-charge-new', (resolve) => { require(['./OtherChargeNew'], resolve) })
45
+ // Vue.component('other-charge-new', (resolve) => { require(['./OtherChargeNew'], resolve) })
46
46
  // 收费(综合)-换表
47
47
  Vue.component('change-meter', (resolve) => { require(['./ChangeMeter'], resolve) })
48
48
  // 清零
@@ -636,6 +636,19 @@ export default {
636
636
  )
637
637
  },
638
638
  async apply () {
639
+ let data = {
640
+ items: 'id',
641
+ condition: `f_blobid = '${this.row.f_userinfo_id}' and f_uploaddate > '${this.$login.toStandardDateString()} 00:00:00'`,
642
+ tablename: '"t_files"',
643
+ orderitem: '"id"'
644
+ }
645
+ let http = new HttpResetClass()
646
+ let res = await http.load('POST', 'rs/sql/saleSingleTable', {data: data},
647
+ {resolveMsg: null, rejectMsg: '获取文件失败!!'})
648
+ if (!res.data.length > 0) {
649
+ this.$showAlert('请上传文件后再进行换标审批!!!', 'warning', 3000)
650
+ return
651
+ }
639
652
  this.addTaskModel.f_task_name = `用户:${this.row.f_user_name},编号:${this.row.f_userinfo_code} 申请换表`
640
653
  this.addTaskModel.f_userinfo_code = this.row.f_userinfo_code
641
654
  this.addTaskModel.f_memorandum = this.model.f_difference_reason
@@ -590,6 +590,19 @@ export default {
590
590
  )
591
591
  },
592
592
  async apply () {
593
+ let data = {
594
+ items: 'id',
595
+ condition: `f_blobid = '${this.row.f_userinfo_id}' and f_uploaddate > '${this.$login.toStandardDateString()} 00:00:00'`,
596
+ tablename: '"t_files"',
597
+ orderitem: '"id"'
598
+ }
599
+ let http = new HttpResetClass()
600
+ let res = await http.load('POST', 'rs/sql/saleSingleTable', {data: data},
601
+ {resolveMsg: null, rejectMsg: '获取文件失败!!'})
602
+ if (!res.data.length > 0) {
603
+ this.$showAlert('请上传文件后再进行清零审批!!!', 'warning', 3000)
604
+ return
605
+ }
593
606
  this.addTaskModel.f_task_name = `用户:${this.row.f_user_name},编号:${this.row.f_userinfo_code} 申请清零`
594
607
  this.addTaskModel.f_userinfo_code = this.row.f_userinfo_code
595
608
  this.addTaskModel.f_memorandum = this.model.f_difference_reason
@@ -54,7 +54,7 @@ export default {
54
54
  }
55
55
  await this.$resetpost('rs/entity/t_eticket', model, {resolveMsg: null, rejectMsg: '保存发票记录失败'})
56
56
  },
57
- async openETicket (sellId, row, show_gas, is_pax, type) {
57
+ async openETicket (sellId, row,type, show_gas ='是', is_pax ='征税') {
58
58
  try {
59
59
  let model = {
60
60
  id: sellId,
@@ -0,0 +1,242 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'select-error' : '']">
7
+ <label class="font_normal_body" title="参数名称:付款方式">收款方式</label>
8
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems" v-validate:payment='{required: true }'>
9
+ <v-select v-model="f_payment"
10
+ placeholder='请选择'
11
+ style="width:60%"
12
+ :value.sync="model.f_payment"
13
+ :options='paytype'
14
+ v-ref:payment
15
+ close-on-select clear-button></v-select>
16
+
17
+ </div>
18
+ <div class="col-sm-4 form-group">
19
+ <label for="f_print" class="font_normal_body">打印格式</label>
20
+
21
+ <v-select id="print"
22
+ v-model="f_print"
23
+ style="width:60%"
24
+ placeholder='请选择'
25
+ :value.sync="model.f_print"
26
+ :options='printstyle'
27
+ close-on-select clear-button>
28
+ </v-select>
29
+ </div>
30
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按气量'">
31
+ <label class="font_normal_body">剩余气量</label>
32
+ <input class="input_search" style="width:60%" type="number" v-model="data.f_balance_gas" readonly>
33
+ </div>
34
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按气量'">
35
+ <label class="font_normal_body">核算单价</label>
36
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_price" >
37
+ </div>
38
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按金额'">
39
+ <label class="font_normal_body">剩余金额</label>
40
+ <input class="input_search" style="width:60%" type="number" v-model="data.f_balance_amount" readonly>
41
+ </div>
42
+ <div class="col-sm-4 form-group" v-if="config.overBalance && data.f_collection_type === '按气量'"
43
+ :class="[$v.f_refund_gas.required || $v.f_refund_gas.dctest ? 'has-error' : 'has-success']">
44
+ <label class="font_normal_body">冲减气量</label>
45
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_gas"
46
+ v-validate:f_refund_gas='{required: true, dctest: [0, ">=" ]}' placeholder="冲减气量" >
47
+ </div>
48
+ <div class="col-sm-4 form-group" v-if="!config.overBalance && data.f_collection_type === '按气量'"
49
+ :class="[$v.f_refund_gas.required || $v.f_refund_gas.dctest ? 'has-error' : 'has-success']">
50
+ <label class="font_normal_body">冲减气量</label>
51
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_gas"
52
+ v-validate:f_refund_gas='{required: true, dctest: [data.f_balance_gas, "<=" ]}' placeholder="冲减气量" >
53
+ </div>
54
+ </div>
55
+
56
+ <div class="row">
57
+
58
+ <div class="col-sm-8">
59
+ <label for="f_paper_account" class="font_normal_body ">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
60
+ <input class="input_search" style="width:80%" v-model="model.f_comments">
61
+ </div>
62
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按气量'">
63
+ <label class="font_normal_body">退费金额</label>
64
+ <input class="input_search" style="width:60%"
65
+ type="number" v-model="model.f_refund_fee"
66
+ placeholder="退费金额">
67
+ </div>
68
+ <div class="col-sm-4 form-group" v-if="!config.overBalance && data.f_collection_type === '按金额'"
69
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
70
+ <label class="font_normal_body">退费金额</label>
71
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
72
+ v-validate:f_refund_fee='{required: true, dctest: [data.f_balance_amount, "<=" ]}' placeholder="退费金额">
73
+ </div>
74
+ <div class="col-sm-4 form-group" v-if="config.overBalance && data.f_collection_type === '按金额'"
75
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
76
+ <label class="font_normal_body">退费金额</label>
77
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
78
+ v-validate:f_refund_fee='{required: true, dctest: [0, ">=" ]}' placeholder="退费金额">
79
+ </div>
80
+ </div>
81
+ </form>
82
+ <div style="text-align:right;">
83
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid||!check'>确认</button>
84
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
85
+ </div>
86
+ </validator>
87
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
88
+ <!--<print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="clean" @printok="printok" :data='printModel'></print-bill>-->
89
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="clean" @printok="printok" :data='printModel' v-ref:printbill></print-bill>
90
+ </div>
91
+
92
+ <upload :blodid="data.f_userinfo_id" isremark="true" fusetype="退费管理"></upload>
93
+ </template>
94
+
95
+
96
+ <script>
97
+ let readyGen = async function (self) {
98
+ await self.$getConfig(self, 'IOTRefund')
99
+ // 默认打印格式
100
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
101
+ self.model.f_payment = [self.config.payment]
102
+
103
+ self.model.f_use_type = self.config.billType
104
+ self.model.f_bill_type = self.model.f_print
105
+ self.hasValidateBill = self.config.hasBillManage
106
+ }
107
+
108
+ export default {
109
+ title: '物联网表退费',
110
+ data () {
111
+ return {
112
+ config: {
113
+ showupload: false, // 默认不上传附件
114
+ hasPrint: false, // 默认打票
115
+ hasBillManage: false, // 默认不启用发票管理
116
+ overBalance: false, //为true时退费金额可以大于余额
117
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
118
+ payment: '现金缴费',
119
+ billType: '燃气费'
120
+ },
121
+ model: {
122
+ f_refund_fee: '',
123
+ f_refund_gas: '',
124
+ f_comments: '',
125
+ f_payment: '',
126
+ f_print: '',
127
+ f_price: 0
128
+ },
129
+ check:true,
130
+ blodid: '',
131
+ hasValidateBill: false,
132
+ validateOk: false,
133
+
134
+ printModel: {},
135
+ print: false,
136
+ billUrl: '',
137
+ billData: {
138
+ url: 'rs/report/refund_sell',
139
+ bill: ''
140
+ },
141
+
142
+ // 下拉框值
143
+ paytype: this.$appdata.getParam('付款方式'),
144
+ printstyle: this.$appdata.getParam('打印格式')
145
+ }
146
+ },
147
+ props: ['data'],
148
+ ready () {
149
+ readyGen(this)
150
+ if (this.data.f_collection_type === '按气量') {
151
+ // this.$showAlert('按气量缴费的物联网表退费功能尚未开放!!', 'warning', 3000)
152
+ this.model.f_price = this.data.f_price
153
+
154
+ // this.$dispatch('refresh')
155
+ }
156
+ console.log(123)
157
+ if(this.data.f_calculation!=='系统结算'){
158
+ this.check = false
159
+ this.$showAlert('表端计费表不支持扣费!!', 'warning', 3000)
160
+ }
161
+ },
162
+ methods: {
163
+ async confirm () {
164
+ let param = {
165
+ f_user_id: this.data.f_user_id,
166
+ f_userfiles_id: this.data.f_userfiles_id,
167
+ version: this.data.version,
168
+ f_price: this.model.f_price,
169
+ f_refund_gas: this.model.f_refund_gas,
170
+ f_refund_fee: this.model.f_refund_fee,
171
+ f_comments: this.model.f_comments,
172
+ f_collection_type: this.data.f_collection_type,
173
+ f_payment: this.model.f_payment[0],
174
+ f_print: this.model.f_print[0],
175
+ f_price_id: this.data.f_price_id,
176
+ f_total_gas: parseFloat(this.data.f_total_gas) - parseFloat(this.model.f_refund_gas),
177
+ f_total_fee: parseFloat(this.data.f_total_fee) - parseFloat(this.model.f_refund_fee),
178
+ f_stairprice_id: this.data.f_stairprice_id,
179
+ operInfo: {
180
+ f_operator: this.$login.f.name,
181
+ f_operatorid: this.$login.f.id,
182
+ f_orgid: this.$login.f.orgid,
183
+ f_orgname: this.$login.f.orgs,
184
+ f_depid: this.$login.f.depids,
185
+ f_depname: this.$login.f.deps
186
+ }
187
+ }
188
+ console.log('退费传参', param)
189
+ let res = await this.$resetpost('rs/logic/iotRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'})
190
+ console.log('退费', res)
191
+ console.log('退费this.config', this.config)
192
+ console.log('退费this.model', this.model)
193
+ if (this.config.hasPrint) {
194
+ if (this.model.f_print.indexOf('电子发票') == -1) {
195
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
196
+ if (this.config.hasBillManage) {
197
+ // 启用发票管理,获取票据管理中的票号并存储记录
198
+ this.printModel.id = res.data.id
199
+ this.printModel.f_bill_type = '退费'
200
+ this.printModel.f_bill_style = this.model.f_print[0]
201
+ // this.billUrl = 'rs/report/refund_sell'
202
+ this.print = true
203
+ } else {
204
+ this.printModel.id = res.data.id
205
+ // this.billUrl = 'rs/report/refund_sell'
206
+ this.print = true
207
+ }
208
+ } else if (this.config.printType === '国税发票') {
209
+ // TODO
210
+ this.$dispatch('success')
211
+ } else if (this.config.printType === '电子发票') {
212
+ // TODO
213
+ this.$dispatch('success')
214
+ }
215
+ }else{
216
+ this.$dispatch('success')
217
+ }
218
+ },
219
+ refundChange () {
220
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
221
+ },
222
+ clean () {
223
+ this.$dispatch('refresh')
224
+ },
225
+ printok () {
226
+ this.$dispatch('success')
227
+ },
228
+ validateBill (val) {
229
+ this.validateOk = !val.isOk
230
+ this.billData.bill = val.bill
231
+ }
232
+ },
233
+ watch:{
234
+ 'model.f_price'(){
235
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
236
+ },
237
+ 'model.f_refund_gas'(){
238
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
239
+ }
240
+ }
241
+ }
242
+ </script>
@@ -43,4 +43,6 @@ export default function () {
43
43
  Vue.component('transfer-manage', (resolve) => { require(['./TransferManage'], resolve) })
44
44
  // 使用该气价的用户信息
45
45
  Vue.component('gasprice-user', (resolve) => { require(['./GasPriceUser'], resolve) })
46
+ // 使用该气价的用户信息
47
+ Vue.component('iot-refund', (resolve) => { require(['./IOTRefund'], resolve) })
46
48
  }
package/src/main.js CHANGED
@@ -3,8 +3,7 @@ import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
5
  import sale from './sale'
6
- // import wenxi from './filiale/yuansheng/sale'
7
- // import FilialeSale from './filiale/yuansheng/sale'
6
+ import FilialeSale from './filiale/haile/sale'
8
7
  import address from 'address-client/src/address'
9
8
  import ldap from 'ldap-clients/src/ldap'
10
9
  import VueClipboard from 'vue-clipboard2'
@@ -15,8 +14,7 @@ Vue.config.silent = true
15
14
  all()
16
15
  system(false)
17
16
  sale()
18
- // wenxi()
19
- // FilialeSale()
17
+ FilialeSale()
20
18
  address()
21
19
  ldap()
22
20
  require('system-clients/src/styles/less/bootstrap.less')