sale-client 3.4.146 → 3.4.149

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.4.146",
3
+ "version": "3.4.149",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -824,7 +824,7 @@
824
824
  // 获取用户信息
825
825
  getUser = await this.$resetpost('rs/sql/sale_getUser', {
826
826
  data: {
827
- condition: `gb.f_meter_type in ('机表','物联网表') and u.f_userinfo_code='${res.data.CardID}'`,
827
+ condition: `gb.f_meter_type in ('机表','物联网表') and i.f_userinfo_code='${res.data.CardID}'`,
828
828
  orderitem: `${this.orderitem}`
829
829
  }
830
830
  }, {resolveMsg: '读卡成功', rejectMsg: '读卡失败'})
@@ -1,168 +1,169 @@
1
- <template>
2
- <div class="auto">
3
- <validator name='v'>
4
- <form novalidate class="form-horizontal">
5
-
6
- <div class="row" style="margin-top:5px;">
7
- <span style="color:red ">您进行的业务是【{{ model.f_type }}】</span>
8
- </div>
9
- <div>
10
- <div class="col-sm-4" v-if="config.cardFee">
11
- <label class=" font_normal_body">卡&emsp;&emsp;费</label>
12
- <input class="input_search" style="width:60%" type="number" v-model="model.f_cardfees">
13
- </div>
14
- </div>
15
- <!--</div>-->
16
- <div class="row" style="margin-top:5px;">
17
- <label for="f_comments" class=" font_normal_body">备&emsp;&emsp;注</label>
18
- <input id="f_comments" class="input_search" style="width:87%" v-model="model.f_comments"
19
- v-validate:f_comments='{required: true }'
20
- :placeholder="`${model.f_type}备注`"/>
21
-
22
- </div>
23
- </form>
24
- <accept-bill :show="acceptprint" :bill-url='acceptUrl' v-on:toggle="close" :data='row' :billdata="printData"
25
- @closeaccept="closeAccept" v-ref:acceptbill></accept-bill>
26
- <validate-bill v-if="hasValidateBill && lose" :data="model" @validate-bill="validateBill"></validate-bill>
27
- <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="close" @printok="printok"
28
- :data='row' v-ref:printbill></print-bill>
29
- <div style="text-align:right;height:auto;margin-top:30px;margin-right:50px;">
30
- <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid || validateOk'>确认</button>
31
- <button class="button_clear btn-gn" @click="clean()">取消</button>
32
- </div>
33
- </validator>
34
- </div>
35
- <upload :blodid="blodid" v-if="config.showupload" isremark="true" fusetype="机表发卡"></upload>
36
- </template>
37
- <script>
38
- /**
39
- *综合业务
40
- *补卡管理组件
41
- */
42
-
43
- let asyncReplaceManage = async function (self) {
44
- await self.$getConfig(self, 'CiTiaoCardManage')
45
- console.log('补卡config', self)
46
- if (self.row.f_whether_hairpin === '已发' || self.row.f_card_id) {
47
- self.model.f_type = '补磁条卡'
48
- } else {
49
- self.model.f_type = '发磁条卡'
50
- }
51
- self.fillcardChange(self.model.f_type)
52
- }
53
-
54
- export default {
55
- title: '机表发卡',
56
- data () {
57
- return {
58
- config: {
59
- showupload: false, // 默认不显示上传附件
60
- hasPrint: false, // 默认打票
61
- hasBillManage: false, // 默认不启用发票管理
62
- cardFee: false, // 默认不显示卡费
63
- payment: '现金缴费'
64
- },
65
- model: {
66
- f_comments: '',
67
- f_type: '发磁条卡',
68
- f_cardfees: 0,
69
- f_replace_time: ''
70
- },
71
- printData: {
72
- reason: '',
73
- cardfee: ''
74
- },
75
- cardallot: null,
76
- lose: true,
77
- blodid: '',
78
- print: false,
79
- billData: {
80
- url: 'rs/report/show_citiao_card',
81
- bill: ''
82
- },
83
- // 启用发票管理需要对票号进行验证
84
- hasValidateBill: false,
85
- validateOk: false,
86
- acceptprint: false,
87
- acceptUrl: ''
88
- }
89
- },
90
- props: ['row'],
91
- ready () {
92
- this.blodid = this.row.f_userinfo_id
93
- asyncReplaceManage(this).then(() => {
94
- this.$emit(ready())
95
- }).catch((error) => {
96
- this.$emit('error', error)
97
- })
98
- },
99
- watch: {
100
- 'model.f_type' (val) {
101
- this.fillcardChange(val)
102
- }
103
- },
104
- methods: {
105
- confirm () {
106
- this.$dispatch('no-button')
107
- this.writeCard()
108
- },
109
- // 写卡保存数据 迁至此处
110
- writeCard () {
111
- if (!this.row.f_card_id) {
112
- this.row.f_card_id = this.row.f_userinfo_code
113
- }
114
- this.$CardService.replaceCiTiaoCard(this.model, this.row).then((res) => {
115
- if (this.config.hasPrint) {
116
- if (this.config.hasBillManage) {
117
- this.row.id = res.data.id
118
- this.row.f_bill_type = '补卡'
119
- this.row.f_bill_style = ''
120
- this.print = true
121
- } else {
122
- console.log('不保存打票记录')
123
- this.row.id = res.data.id
124
- this.print = true
125
- }
126
- } else {
127
- console.log('我没走打票')
128
- this.$dispatch('success', '补卡管理', this.row, res)
129
- }
130
- }
131
- ).catch(
132
- (error) => {
133
- if (error.status === 603) {
134
- this.$error('重复提交')
135
- return
136
- }
137
- this.$dispatch('error', '补卡管理', this.row, error)
138
- }
139
- )
140
- },
141
- closeAccept () {
142
- this.acceptprint = false
143
- },
144
- clean () {
145
- this.$dispatch('refresh')
146
- },
147
- close () {
148
- this.print = false
149
- this.acceptprint = false
150
- this.clean()
151
- },
152
- validateBill (val) {
153
- this.validateOk = !val.isOk
154
- this.billData.bill = val.bill
155
- },
156
- printok () {
157
- // 收据打完,判断是否还有其他票据进行请求 TODO
158
- this.$dispatch('success')
159
- },
160
- fillcardChange (val) {
161
- this.lose = true
162
- }
163
- }
164
- }
165
- </script>
166
-
167
- <style>
168
- </style>
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+
6
+ <div class="row" style="margin-top:5px;">
7
+ <span style="color:red ">您进行的业务是【{{ model.f_type }}】</span>
8
+ </div>
9
+ <div>
10
+ <div class="col-sm-4" v-if="config.cardFee">
11
+ <label class=" font_normal_body">卡&emsp;&emsp;费</label>
12
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_cardfees">
13
+ </div>
14
+ </div>
15
+ <!--</div>-->
16
+ <div class="row" style="margin-top:5px;">
17
+ <label for="f_comments" class=" font_normal_body">备&emsp;&emsp;注</label>
18
+ <input id="f_comments" class="input_search" style="width:87%" v-model="model.f_comments"
19
+ v-validate:f_comments='{required: true }'
20
+ :placeholder="`${model.f_type}备注`"/>
21
+
22
+ </div>
23
+ </form>
24
+ <accept-bill :show="acceptprint" :bill-url='acceptUrl' v-on:toggle="close" :data='row' :billdata="printData"
25
+ @closeaccept="closeAccept" v-ref:acceptbill></accept-bill>
26
+ <validate-bill v-if="hasValidateBill && lose" :data="model" @validate-bill="validateBill"></validate-bill>
27
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="close" @printok="printok"
28
+ :data='row' v-ref:printbill></print-bill>
29
+ <div style="text-align:right;height:auto;margin-top:30px;margin-right:50px;">
30
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid || validateOk'>确认</button>
31
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
32
+ </div>
33
+ </validator>
34
+ </div>
35
+ <upload :blodid="blodid" v-if="config.showupload" isremark="true" fusetype="机表发卡"></upload>
36
+ </template>
37
+ <script>
38
+ /**
39
+ *综合业务
40
+ *补卡管理组件
41
+ */
42
+
43
+ let asyncReplaceManage = async function (self) {
44
+ await self.$getConfig(self, 'CiTiaoCardManage')
45
+ console.log('补卡config', self)
46
+ if (self.row.f_whether_hairpin === '已发' || self.row.f_card_id) {
47
+ self.model.f_type = '补磁条卡'
48
+ } else {
49
+ self.model.f_type = '发磁条卡'
50
+ }
51
+ self.fillcardChange(self.model.f_type)
52
+ }
53
+
54
+ export default {
55
+ title: '机表发卡',
56
+ data () {
57
+ return {
58
+ config: {
59
+ showupload: false, // 默认不显示上传附件
60
+ hasPrint: false, // 默认打票
61
+ hasBillManage: false, // 默认不启用发票管理
62
+ cardFee: false, // 默认不显示卡费
63
+ payment: '现金缴费'
64
+ },
65
+ model: {
66
+ f_comments: '',
67
+ f_type: '发磁条卡',
68
+ f_cardfees: 0,
69
+ f_replace_time: ''
70
+ },
71
+ printData: {
72
+ reason: '',
73
+ cardfee: ''
74
+ },
75
+ cardallot: null,
76
+ lose: true,
77
+ blodid: '',
78
+ print: false,
79
+ billData: {
80
+ url: 'rs/report/show_citiao_card',
81
+ bill: ''
82
+ },
83
+ // 启用发票管理需要对票号进行验证
84
+ hasValidateBill: false,
85
+ validateOk: false,
86
+ acceptprint: false,
87
+ acceptUrl: ''
88
+ }
89
+ },
90
+ props: ['row'],
91
+ ready () {
92
+ this.blodid = this.row.f_userinfo_id
93
+ asyncReplaceManage(this).then(() => {
94
+ this.$emit(ready())
95
+ }).catch((error) => {
96
+ this.$emit('error', error)
97
+ })
98
+ },
99
+ watch: {
100
+ 'model.f_type' (val) {
101
+ this.fillcardChange(val)
102
+ }
103
+ },
104
+ methods: {
105
+ confirm () {
106
+ this.$dispatch('no-button')
107
+ this.writeCard()
108
+ },
109
+ // 写卡保存数据 迁至此处
110
+ writeCard () {
111
+ if (!this.row.f_card_id) {
112
+ this.row.f_card_id = this.row.f_userinfo_code
113
+ }
114
+ this.$dispatch('stop_citiao_search', '补卡管理')
115
+ this.$CardService.replaceCiTiaoCard(this.model, this.row).then((res) => {
116
+ if (this.config.hasPrint) {
117
+ if (this.config.hasBillManage) {
118
+ this.row.id = res.data.id
119
+ this.row.f_bill_type = '补卡'
120
+ this.row.f_bill_style = ''
121
+ this.print = true
122
+ } else {
123
+ console.log('不保存打票记录')
124
+ this.row.id = res.data.id
125
+ this.print = true
126
+ }
127
+ } else {
128
+ console.log('我没走打票')
129
+ this.$dispatch('success', '补卡管理', this.row, res)
130
+ }
131
+ }
132
+ ).catch(
133
+ (error) => {
134
+ if (error.status === 603) {
135
+ this.$error('重复提交')
136
+ return
137
+ }
138
+ this.$dispatch('error', '补卡管理', this.row, error)
139
+ }
140
+ )
141
+ },
142
+ closeAccept () {
143
+ this.acceptprint = false
144
+ },
145
+ clean () {
146
+ this.$dispatch('success', '补卡管理')
147
+ },
148
+ close () {
149
+ this.print = false
150
+ this.acceptprint = false
151
+ this.clean()
152
+ },
153
+ validateBill (val) {
154
+ this.validateOk = !val.isOk
155
+ this.billData.bill = val.bill
156
+ },
157
+ printok () {
158
+ // 收据打完,判断是否还有其他票据进行请求 TODO
159
+ this.$dispatch('success', '补卡管理')
160
+ },
161
+ fillcardChange (val) {
162
+ this.lose = true
163
+ }
164
+ }
165
+ }
166
+ </script>
167
+
168
+ <style>
169
+ </style>
@@ -72,6 +72,7 @@ export default {
72
72
  warningInfo: null,
73
73
  modalrow: null,
74
74
  showModal: false,
75
+ searchTime: this.$appdata.getSingleValue('磁条卡读卡间隔') ? this.$appdata.getSingleValue('磁条卡读卡间隔') : 2,
75
76
  rowData: {},
76
77
  interval: null,
77
78
  dibao_remind: this.$appdata.getSingleValue('低保快到期提醒') ? this.$appdata.getSingleValue('低保快到期提醒') : 0,
@@ -110,21 +111,22 @@ export default {
110
111
  // 获取用户信息
111
112
  getUser = await this.$resetpost('rs/sql/sale_getUser', {
112
113
  data: {
113
- condition: `gb.f_meter_type in ('机表','物联网表') and u.f_userinfo_code='${res.data.CardID}'`,
114
+ condition: `gb.f_meter_type in ('机表','物联网表') and i.f_userinfo_code='${res.data.CardID}'`,
114
115
  orderitem: `f_userinfo_id`
115
116
  }
116
117
  }, {resolveMsg: null, rejectMsg: '读卡失败'})
117
118
  this.$refs.list.model.rows = getUser.data
118
- if (this.row.f_userinfo_code != getUser.data[0].f_userinfo_code) {
119
+ if (!this.row || (this.row && this.row.f_userinfo_code != getUser.data[0].f_userinfo_code)) {
119
120
  await this.toBusiness(getUser.data[0])
120
- clearInterval(this.interval)
121
- await this.readCiTiaoCard()
121
+ // 因为两秒一次所以进到收费页面不用重新再读取
122
+ // clearInterval(this.interval)
123
+ // await this.readCiTiaoCard()
122
124
  }
123
125
  }
124
126
  }
125
127
  }
126
128
  })
127
- }, 1500)
129
+ }, this.searchTime * 1000)
128
130
  } catch (error) {
129
131
  console.log('捕获到异常', error)
130
132
  // this.$showAlert(error.data, 'danger', 2000)
@@ -218,6 +220,9 @@ export default {
218
220
  }
219
221
  },
220
222
  events: {
223
+ 'stop_citiao_search'(){
224
+ clearInterval(this.interval)
225
+ },
221
226
  'error' (name, row, res) {
222
227
  this.clean()
223
228
  },
@@ -230,6 +235,8 @@ export default {
230
235
  if (name === '机表收费确认') {
231
236
  this.serRow(row)
232
237
  return
238
+ } else if (name === '补卡管理') {
239
+ this.readCiTiaoCard()
233
240
  }
234
241
  this.clean()
235
242
  this.$refs.list.search()