sale-client 3.5.50 → 3.5.52

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.5.50",
3
+ "version": "3.5.52",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -52,6 +52,8 @@
52
52
  </button>
53
53
  <button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.createInfoForFile()">批量建档
54
54
  </button>
55
+ <button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.downloadFiles()">模板下载
56
+ </button>
55
57
  <button @click="$parent.$parent.importFile" class="button_export button_spacing"
56
58
  style="float: right" v-if="false">导入
57
59
  </button>
@@ -424,6 +426,17 @@ let loadParamGem = async function (self) {
424
426
  }
425
427
  },
426
428
  methods: {
429
+ downloadFiles(){
430
+ let downurl='rs/downloadfile/file?filename=预备户批量建档导入Excel模板';
431
+ this.$resetget(downurl,{}).then(res=>{
432
+ var link = document.createElement('a');
433
+ link.target="_blank"
434
+ link.href =downurl ;
435
+ link.setAttribute("download", "预备户批量建档导入Excel模板.xlsx"); //指定下载后的文件名,防跳转
436
+ document.body.appendChild(link);
437
+ link.click();
438
+ })
439
+ },
427
440
  close () {
428
441
  this.printflag = false
429
442
  this.clean()
@@ -105,6 +105,7 @@ let asyncMachineMeterCenter = async function (self) {
105
105
  }
106
106
  export default {
107
107
  name: 'BatchCharge',
108
+ title: '团体缴费',
108
109
  data () {
109
110
  return {
110
111
  config: {
@@ -46,10 +46,9 @@
46
46
  <!-- <span class="col-sm-4">{{row.type}}</span>-->
47
47
  <!-- </div>-->
48
48
  <div class="row">
49
- <!--<strong :title="row.f_userinfo_code" class="col-sm-4" show-overflow-tooltip="true">{{row.f_userinfo_code.length>9?''+row.f_userinfo_code.substring(0,9)+'...':row.f_userinfo_code}}</strong>-->
50
- <span class="col-sm-6">{{$parent.$parent.$parent.dateDes(row.f_operate_date)}}</span>
51
- <!-- <span class="col-sm-6 font_normal_body" title="参数名称:付款方式">收款方式:</span>-->
52
- <span class="col-sm-6">{{row.type}}</span>
49
+ <strong :title="row.f_userinfo_code" class="col-sm-4" show-overflow-tooltip="true">{{row.f_userinfo_code.length>9?''+row.f_userinfo_code.substring(0,9)+'...':row.f_userinfo_code}}</strong>
50
+ <span class="col-sm-4">{{$parent.$parent.$parent.dateDes(row.f_operate_date)}}</span>
51
+ <span class="col-sm-4">{{row.type}}</span>
53
52
  </div>
54
53
  </div>
55
54
  <div class="col-sm-1" v-if="$parent.$parent.$parent.isOperate" title="涉及权限:冲正权限">
@@ -75,7 +74,9 @@
75
74
  v-if="(row.type === '批量收费'||row.type === '团体收费' || row.type === '迁表' || row.type === '拆表' || row.type === '物联网开户' || row.type === '物联网收费' || row.type === '其他收费'|| row.type === '气费减免'||row.type === '维修收费' || row.type === '过户' || row.type === '换新表' || row.type === '气表清零' || row.type === '机表收费' || row.type === '超用收费' || row.type === '其他收费' || row.type === '补卡'|| row.type === '调价补费'|| row.type=='预存缴费' || row.type==='卡表赠气'|| row.type==='物联网赠费'|| row.type==='卡表赠费'|| row.type==='物联网赠气')||row.type==='气损收费'">
76
75
  <a @click.stop="$parent.$parent.$parent.operate('撤销', row)" href="#">撤销</a>
77
76
  </li>
78
-
77
+ <li v-else>
78
+ <a href="#">暂无其他操作</a>
79
+ </li>
79
80
  </ul>
80
81
  </dropdown>
81
82
  </div>
@@ -132,7 +133,7 @@
132
133
  <advance-delivery-detail :data="row" v-if="row.type ==='卡表预交' "></advance-delivery-detail>
133
134
  <machinemetercenter-detail :data="row" v-if="row.type === '预存缴费'"></machinemetercenter-detail>
134
135
  <gasloss-detail :data="row" v-if="row.type === '气损收费'"></gasloss-detail>
135
- <batch-charge-detail :data="row" v-if="row.type === '批量收费' || row.type === '团体收费'"></batch-charge-detail>
136
+ <batch-charge-detail :data="row" v-if="row.type === '批量收费' || row.type === '团体收费' || row.type === '团体退费'"></batch-charge-detail>
136
137
  </div>
137
138
  <div style="margin-top: 8px;background: #FFF;" v-if="!$parent.$parent.$parent.isSelected(row)">
138
139
  <span>{{row.f_describe}}</span>
@@ -234,7 +235,7 @@
234
235
  asideTitle: '用户操作',
235
236
  row: Object,
236
237
  comp: null,
237
- operationtypes: [{label: '批量收费', value: '批量收费'}, {label: '团体收费', value: '团体收费'}],
238
+ operationtypes: [{label: '团体收费', value: '团体收费'}, {label: '团体退费', value: '团体退费'}],
238
239
  cancel_show: false,
239
240
  cancel_data: null,
240
241
  paytype: this.$appdata.getParam('付款方式'),
@@ -157,16 +157,18 @@
157
157
  sqlurl="rs/logic/saleExport" sql-name="batchOweQuery" template-name='团体欠费明细导出'>
158
158
  </export-excel>
159
159
 
160
- <owe-record-query v-if="oweShow" :f_civill_id="f_civill_id"></owe-record-query>
160
+ <owe-record-query v-if="oweShow" :row="row" :f_civill_id="f_civill_id"></owe-record-query>
161
161
  </div>
162
162
  </template>
163
163
 
164
164
  <script>
165
- import {PagedList} from 'vue-client'
165
+ import {HttpResetClass, PagedList} from 'vue-client'
166
166
 
167
167
  export default {
168
168
  data () {
169
169
  return {
170
+ interval: null,
171
+ searchTime: this.$appdata.getSingleValue('磁条卡读卡间隔') ? this.$appdata.getSingleValue('磁条卡读卡间隔') : 2,
170
172
  oughtfee: [{label: '全部', value: ''}, {label: '是', value: '> 0'}, {label: '否', value: '<= 0'}],
171
173
  model: new PagedList('rs/sql/ncarchivesQuery', 20),
172
174
  // 公司下拉
@@ -195,7 +197,8 @@ export default {
195
197
  }
196
198
  },
197
199
  defaultfield: [],
198
- printModel: new PagedList('rs/sql/batchOweQuery', 20)
200
+ printModel: new PagedList('rs/sql/batchOweQuery', 20),
201
+ row: null
199
202
  }
200
203
  },
201
204
  title: '档案查询',
@@ -221,8 +224,60 @@ export default {
221
224
  ready () {
222
225
  this.getfield = this.config.excelHeaders
223
226
  this.search()
227
+ this.readCiTiaoCard()
228
+ },
229
+ destroyed () {
230
+ clearInterval(this.interval)
231
+ },
232
+ watch: {
233
+ 'oweShow' (val) {
234
+ if (val) {
235
+ clearInterval(this.interval)
236
+ } else {
237
+ this.readCiTiaoCard()
238
+ }
239
+ }
224
240
  },
225
241
  methods: {
242
+ async readCiTiaoCard () {
243
+ console.log('读磁条卡,开始,不停的循环')
244
+ let data = {}
245
+ let getUser = {data: []}
246
+ let forgid = this.$login.convertToIn([this.$login.f.orgid])
247
+ try {
248
+ // let res = {data:{Factory : 'CiTiao',CardID : '00000009'}}
249
+ let http = new HttpResetClass()
250
+ this.interval = setInterval(async () => {
251
+ // 1秒一轮回
252
+ http.load('POST', 'http://127.0.0.1:8003/ReadCard_HEC', data, {
253
+ resolveMsg: null,
254
+ rejectMsg: null
255
+ }).then(async res => {
256
+ if (res.data.CardID !== '') {
257
+ if (res.data.Err === null && res.data.Exception) {
258
+ this.$showAlert(res.data.Exception, 'danger', 2000)
259
+ // clearInterval(interval)
260
+ } else {
261
+ if (res.data.Factory === 'CiTiao') {
262
+ // 获取用户信息
263
+ getUser = await this.$resetpost('rs/sql/ncarchivesQuery', {
264
+ data: {
265
+ condition: `f_orgid in ${forgid} and f_card_id='${res.data.CardID}'`,
266
+ orderitem: `f_userinfo_id`
267
+ }
268
+ }, {resolveMsg: null, rejectMsg: '读卡失败'})
269
+ this.showOwe(getUser.data[0])
270
+ clearInterval(this.interval)
271
+ }
272
+ }
273
+ }
274
+ })
275
+ }, this.searchTime * 1000)
276
+ } catch (error) {
277
+ console.log('捕获到异常', error)
278
+ // this.$showAlert(error.data, 'danger', 2000)
279
+ }
280
+ },
226
281
  // 打印
227
282
  async print (row) {
228
283
  let condition = `p.f_civill_id = ${row.id}`
@@ -237,6 +292,7 @@ export default {
237
292
  showOwe (row) {
238
293
  if (this.chargeToChoose) {
239
294
  this.f_civill_id = row.id
295
+ this.row = row
240
296
  this.oweShow = true
241
297
  }
242
298
  },
@@ -10,7 +10,7 @@
10
10
  @click="setField('历史操作')">历史操作</a></li>
11
11
  </ul>
12
12
  <div class="tab-content span" style="overflow-y: auto">
13
- <card-list-rewrite v-show="worktype === '历史操作'" :operationtype="['团体收费']" v-ref:card></card-list-rewrite>
13
+ <card-list-rewrite v-show="worktype === '历史操作'" sqlurl="rs/sql/getGroupRecord" v-ref:card></card-list-rewrite>
14
14
  </div>
15
15
  </div>
16
16
  </div>
@@ -43,7 +43,16 @@
43
43
  </div>
44
44
  <div class="auto" style="margin-top: 1%;">
45
45
  <div style="height: auto" class="select-overspread">
46
- <batch-charge :data="model" :owe="owe" :civill="civill" v-if="chargeShow"></batch-charge>
46
+ <div class="form-inline" style="height: auto">
47
+ <div class="form-group" v-for="btn in operBtns">
48
+ <button :id="btn.name" type="button" style="color:black" :class="[($index === 0) ? 'btn btn-click' : 'btn btn-un-click']" @click="business(btn)" >
49
+ <span style="color:black">{{btn.name}}</span>
50
+ </button>
51
+ </div>
52
+ </div>
53
+ <div v-show="chargeShow" style="height: auto" class="select-overspread">
54
+ <route v-ref:route></route>
55
+ </div>
47
56
  </div>
48
57
  </div>
49
58
  </template>
@@ -58,10 +67,15 @@
58
67
  owe: {rows: []},
59
68
  model: {f_collection: 0},
60
69
  civill: null,
61
- chargeShow: false
70
+ chargeShow: false,
71
+ operBtns: [
72
+ {name: '团体缴费', value: {routeName: 'batch-charge'}},
73
+ {name: '余额退款', value: {routeName: 'group-refund'}},
74
+ {name: '制磁条卡', value: {routeName: 'show-citiao_card'}}
75
+ ]
62
76
  }
63
77
  },
64
- props: ['searchdata', 'f_civill_id'],
78
+ props: ['searchdata', 'f_civill_id', 'row'],
65
79
  ready () {
66
80
  this.getsalerecord()
67
81
  },
@@ -78,7 +92,28 @@
78
92
  this.owe.rows = record.data.owe
79
93
  this.model = Object.assign(this.model, record.data.model)
80
94
  this.civill = record.data.civill
95
+ this.business(this.operBtns[0])
96
+ },
97
+ business (btn) {
98
+ // 处理按钮样式
99
+ this.styleChange(btn.name)
81
100
  this.chargeShow = true
101
+ this.$refs.route.init(btn.value.routeName, {row: this.row, data: this.model, owe: this.owe, civill: this.civill})
102
+ },
103
+ styleChange (name) {
104
+ this.operBtns.forEach((res) => {
105
+ if (res.name === name) {
106
+ if (document.getElementById(res.name)) {
107
+ document.getElementById(res.name).style.backgroundColor = '#6aa6e2'
108
+ document.getElementById(res.name).style.color = 'white'
109
+ }
110
+ } else {
111
+ if (document.getElementById(res.name)) {
112
+ document.getElementById(res.name).style.backgroundColor = 'white'
113
+ document.getElementById(res.name).style.color = 'black'
114
+ }
115
+ }
116
+ })
82
117
  }
83
118
  },
84
119
  watch: {
@@ -0,0 +1,181 @@
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">
7
+ <label class="font_normal_body" title="参数名称:付款方式">收款方式</label>
8
+ <v-select v-model="f_payment"
9
+ placeholder='请选择'
10
+ style="width:60%"
11
+ :value.sync="model.f_payment"
12
+ :options='paytype'
13
+ close-on-select clear-button></v-select>
14
+ </div>
15
+ <div class="col-sm-4 form-group">
16
+ <label for="f_print" class="font_normal_body">打印格式</label>
17
+ <v-select id="print"
18
+ v-model="f_print"
19
+ style="width:60%"
20
+ placeholder='请选择'
21
+ :value.sync="model.f_print"
22
+ :options='printstyle'
23
+ close-on-select clear-button>
24
+ </v-select>
25
+ </div>
26
+
27
+ <div class="col-sm-4 form-group">
28
+ <label class="font_normal_body">剩余金额</label>
29
+ <input class="input_search" style="width:60%" type="number" v-model="row.f_balance" readonly>
30
+ </div>
31
+ </div>
32
+
33
+ <div class="row">
34
+ <div class="col-sm-8">
35
+ <label for="f_paper_account" class="font_normal_body ">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
36
+ <input class="input_search" style="width:80%" v-model="model.f_comments">
37
+ </div>
38
+ <div class="col-sm-4 form-group" v-if="!config.overBalance"
39
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
40
+ <label class="font_normal_body">退费金额</label>
41
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
42
+ v-validate:f_refund_fee='{required: true, dctest: [row.f_balance, "<=" ]}' placeholder="退费金额">
43
+ </div>
44
+ <div class="col-sm-4 form-group" v-if="config.overBalance"
45
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
46
+ <label class="font_normal_body">退费金额</label>
47
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
48
+ v-validate:f_refund_fee='{required: true, dctest: [0, ">=" ]}' placeholder="退费金额">
49
+ </div>
50
+ </div>
51
+ </form>
52
+ <div style="text-align:right;">
53
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
54
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
55
+ </div>
56
+ </validator>
57
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
58
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="clean" @printok="printok"
59
+ :data='printModel' v-ref:printbill></print-bill>
60
+ </div>
61
+ </template>
62
+
63
+
64
+ <script>
65
+ let readyGen = async function (self) {
66
+ await self.$getConfig(self, 'GroupRefund')
67
+ console.log('团体退费config', self.config)
68
+ // 默认打印格式
69
+ self.blodid = self.row.id
70
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
71
+ self.model.f_payment = [self.config.payment]
72
+
73
+ self.model.f_use_type = self.config.billType
74
+ self.model.f_bill_type = self.model.f_print
75
+ self.hasValidateBill = self.config.hasBillManage
76
+ }
77
+
78
+ export default {
79
+ title: '团体退费',
80
+ data () {
81
+ return {
82
+ config: {
83
+ showupload: false, // 默认不上传附件
84
+ hasPrint: false, // 默认打票
85
+ hasBillManage: false, // 默认不启用发票管理
86
+ overBalance: false, // 为true时退费金额可以大于余额
87
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
88
+ payment: '现金缴费',
89
+ billType: '燃气费'
90
+ },
91
+ model: {
92
+ f_refund_fee: '',
93
+ f_comments: '',
94
+ f_payment: '',
95
+ f_print: ''
96
+ },
97
+
98
+ blodid: '',
99
+ hasValidateBill: false,
100
+ validateOk: false,
101
+
102
+ printModel: {},
103
+ print: false,
104
+ billUrl: '',
105
+ billData: {
106
+ url: 'rs/report/refund_sell',
107
+ bill: ''
108
+ },
109
+
110
+ // 下拉框值
111
+ paytype: this.$appdata.getParam('付款方式'),
112
+ printstyle: this.$appdata.getParam('打印格式')
113
+ }
114
+ },
115
+ props: ['row'],
116
+ ready () {
117
+ readyGen(this)
118
+ },
119
+ methods: {
120
+ async confirm () {
121
+ let param = {
122
+ version: this.row.version,
123
+ id: this.row.id,
124
+ f_customer: this.row.f_customer,
125
+ f_refund_fee: this.model.f_refund_fee,
126
+ f_comments: this.model.f_comments,
127
+ f_payment: this.model.f_payment[0],
128
+ f_print: this.model.f_print[0],
129
+ operInfo: {
130
+ f_operator: this.$login.f.name,
131
+ f_operatorid: this.$login.f.id,
132
+ f_orgid: this.$login.f.orgid,
133
+ f_orgname: this.$login.f.orgs,
134
+ f_depid: this.$login.f.depids,
135
+ f_depname: this.$login.f.deps
136
+ }
137
+ }
138
+
139
+ let res = await this.$resetpost('rs/logic/groupRefund', {data: param}, {
140
+ warnMsg: `确定要对用户${this.row.f_user_name}进行退费吗?`,
141
+ resolveMsg: '退费成功!!',
142
+ rejectMsg: '退费失败!!请重试!!'
143
+ })
144
+
145
+ if (this.model.f_print.indexOf('电子发票') == -1 && this.config.hasPrint && !this.$login.r.includes('不打印发票')) {
146
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
147
+ if (this.config.hasBillManage) {
148
+ // 启用发票管理,获取票据管理中的票号并存储记录
149
+ this.printModel.id = res.data.id
150
+ this.printModel.f_bill_type = '退费'
151
+ this.printModel.f_bill_style = this.model.f_print[0]
152
+ // this.billUrl = 'rs/report/refund_sell'
153
+ this.print = true
154
+ } else {
155
+ this.printModel.id = res.data.id
156
+ // this.billUrl = 'rs/report/refund_sell'
157
+ this.print = true
158
+ }
159
+ } else if (this.config.printType === '国税发票') {
160
+ // TODO
161
+ this.$dispatch('success')
162
+ } else if (this.config.printType === '电子发票') {
163
+ // TODO
164
+ this.$dispatch('success')
165
+ } else {
166
+ this.$dispatch('success')
167
+ }
168
+ },
169
+ clean () {
170
+ this.$dispatch('refresh')
171
+ },
172
+ printok () {
173
+ this.$dispatch('success')
174
+ },
175
+ validateBill (val) {
176
+ this.validateOk = !val.isOk
177
+ this.billData.bill = val.bill
178
+ }
179
+ }
180
+ }
181
+ </script>
@@ -24,6 +24,8 @@
24
24
  <div style="float: right">
25
25
  <button class="button_search" @click="search()">查 询</button>
26
26
  <button class="btn btn-default" @click="$parent.$parent.battchinsurance()" >批量保险收费</button>
27
+ <button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.downloadFiles()">模板下载
28
+ </button>
27
29
  <div
28
30
  :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
29
31
  @click="$parent.$parent.criteriaShow=!$parent.$parent.criteriaShow"
@@ -156,6 +158,17 @@
156
158
  this.search()
157
159
  },
158
160
  methods: {
161
+ downloadFiles(){
162
+ let downurl='rs/downloadfile/file?filename=批量保险收费导入Excel模板';
163
+ this.$resetget(downurl,{}).then(res=>{
164
+ var link = document.createElement('a');
165
+ link.target="_blank"
166
+ link.href =downurl ;
167
+ link.setAttribute("download", "批量保险收费导入Excel模板.xlsx"); //指定下载后的文件名,防跳转
168
+ document.body.appendChild(link);
169
+ link.click();
170
+ })
171
+ },
159
172
  search () {
160
173
  this.$refs.paged.$refs.criteria.search()
161
174
  },
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <p class="bg-info text-center" style="padding: 8px;font-size: 20px">操作记录</p>
6
+ <!-- <data-grid :model="inData" v-ref:grid partial='list'>
7
+ <template partial='head'>-->
8
+ <table class="list_area table_sy" style="width: 600px">
9
+ <tr>
10
+ <th style="text-align: center">序号</th>
11
+ <th style="text-align: center">修改内容</th>
12
+ <th style="text-align: center">变更前</th>
13
+ <th style="text-align: center">变更后</th>
14
+ <th style="text-align: center">状态</th>
15
+ <th style="text-align: center">修改时间</th>
16
+ <th style="text-align: center">操作人</th>
17
+ </tr>
18
+
19
+ <tr v-for="row in recordlist">
20
+ <td style="text-align: center;">{{$index + 1}}</td>
21
+ <td style="text-align: center;">{{row.chinesename}}</td>
22
+ <td style="text-align: center;">{{row.oldvalue}}</td>
23
+ <td style="text-align: center;">{{row.newvalue}}</td>
24
+ <td style="text-align: center;">{{row.state}}</td>
25
+ <td style="text-align: center;">{{row.modifitime}}</td>
26
+ <td style="text-align: center;">{{row.operator}}</td>
27
+ </tr>
28
+ </table>
29
+ </form>
30
+
31
+ </validator>
32
+ </div>
33
+ </template>
34
+
35
+ <script>
36
+ export default {
37
+ name: 'addwarehouse',
38
+
39
+ data () {
40
+ return {
41
+ inData: [],
42
+ obj: {},
43
+ userid: this.$login.f.id
44
+
45
+ }
46
+ },
47
+ props: {
48
+ recordlist: Array
49
+ },
50
+ created () {
51
+ },
52
+ ready () {
53
+ },
54
+ methods: {
55
+
56
+ }
57
+ }
58
+ </script>
59
+
60
+ <style lang="less">
61
+ </style>