sale-client 3.7.16 → 3.7.18

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.
File without changes
@@ -0,0 +1,2 @@
1
+ #Thu Dec 11 10:17:57 CST 2025
2
+ gradle.version=5.2.1
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.7.16",
3
+ "version": "3.7.18",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -355,6 +355,8 @@
355
355
  this.eticket_msg = false
356
356
  this.disabled = false
357
357
  this.eticket_show = true
358
+ // 将备注同步到开票请求字段,避免bz为空
359
+ this.row.f_eticket_reason = this.row.f_remarks
358
360
  this.$refs.eticketbill.openETicket(this.row.id, this.row, this.row.f_type, false, this.invoice_is_pax, this.row.f_paper_type)
359
361
  },
360
362
  eticket_toggle () {
@@ -186,6 +186,11 @@
186
186
  <input class="form-control col-sm-2"
187
187
  v-model="row.f_email" placeholder="邮箱推送">
188
188
  </div>
189
+ <div class="col-sm-12 form-group form-input-group">
190
+ <label class="control-label">备注:</label>
191
+ <input class="form-control col-sm-2"
192
+ v-model="row.f_remarks" placeholder="备注">
193
+ </div>
189
194
  </div>
190
195
  </div>
191
196
  </article>
@@ -334,6 +339,8 @@ export default {
334
339
  confirm () {
335
340
  this.eticket_msg = false
336
341
  this.eticket_show = true
342
+ // 将备注同步到开票请求字段,避免bz为空
343
+ this.row.f_eticket_reason = this.row.f_remarks
337
344
  this.$refs.eticketbill.openETicket(this.selecteds.map(item => item.id), this.row, '结算收费', false, this.invoice_is_pax, this.invoice_type)
338
345
  this.search()
339
346
  },
@@ -191,7 +191,11 @@
191
191
  <input class="form-control col-sm-2"
192
192
  v-model="row.f_email" placeholder="邮箱推送">
193
193
  </div>
194
- </div>
194
+ <div class="col-sm-12 form-group form-input-group">
195
+ <label class="control-label">备注:</label>
196
+ <input class="form-control col-sm-2"
197
+ v-model="row.f_remarks" placeholder="备注">
198
+ </div>
195
199
  </div>
196
200
  </article>
197
201
  <footer slot="modal-footer" class="modal-footer">
@@ -358,6 +362,8 @@ export default {
358
362
  this.eticket_msg = false
359
363
  this.eticket_show = true
360
364
  const ids = this.selecteds.map(item => item.id).length > 0 ? this.selecteds.map(item => item.id) : this.row.id
365
+ // 将备注同步到开票请求字段,避免bz为空
366
+ this.row.f_eticket_reason = this.row.f_remarks
361
367
  this.$refs.eticketbill.openETicket(ids, this.row, '物联网收费', false, this.invoice_is_pax, this.invoice_type)
362
368
  this.search()
363
369
  },
@@ -0,0 +1,570 @@
1
+ <template>
2
+ <div @keyup.enter="search">
3
+ <partial-view v-ref:pv>
4
+ <criteria-paged :model="model" :pager="false" v-ref:paged>
5
+ <criteria @condition-changed='$parent.$parent.selfSearch' partial='criteria' v-ref:cri>
6
+ <div class="form-horizontal" novalidate partial>
7
+ <div class="row">
8
+ <div class="form-group col-sm-4">
9
+ <!-- <label>用户编号:</label> -->
10
+ <input class="input_search" condition="f_userinfo_code = '{}'" placeholder='客户编号' style="width: 80%"
11
+ type="text"
12
+ v-model="model.f_userinfo_code">
13
+ </div>
14
+ <div class="form-group col-sm-4" style="flex: 1;width: max-content">
15
+ <!-- <label>操作类型:</label> -->
16
+ <v-select :options='$parent.$parent.$parent.operationtypes'
17
+
18
+ :value.sync="model.f_operat_type"
19
+ :width="'100%'"
20
+ close-on-select
21
+ condition="f_operat_type = '{}'"
22
+ id="f_paytype"
23
+ placeholder='操作类型'
24
+ style="width: 100%"
25
+ v-model="model.f_operat_type"></v-select>
26
+ </div>
27
+ <div class="form-group col-sm-2 button-range" style="padding-right: 10px">
28
+ <button @click="search()" class="button_search">查询</button>
29
+ <div
30
+ :class="{'button_shrink_top':$parent.$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.$parent.criteriaShow}"
31
+ @click="$parent.$parent.$parent.criteriaShow=!$parent.$parent.$parent.criteriaShow" class="button_spacing" style="float: right"></div>
32
+ </div>
33
+ <div class="form-group col-sm-5" v-show="$parent.$parent.$parent.criteriaShow">
34
+ <!-- <label>用户编号:</label> -->
35
+ <input class="input_search" condition="r.f_operator like '%{}%'" placeholder='操作员' style="width: 80%"
36
+ type="text"
37
+ v-model="model.f_operator">
38
+ </div>
39
+ </div>
40
+ <!-- <partial name="cardcriteria"></partial> -->
41
+ <!-- <div class="form-group">
42
+ <partial name="cardcriteria"></partial>
43
+ </div> -->
44
+ </div>
45
+ </criteria>
46
+ <div partial="list" style="overflow-y: scroll;height: 90%">
47
+ <accordion :one-at-atime="true" type="info" >
48
+ <panel :is-click="false" :is-open="true" type="info" v-for="row in model.rows" >
49
+ <span @click="$parent.$parent.$parent.selected(row)" class="panel-title row" slot="header"
50
+ style="cursor: pointer;">
51
+ <div class="col-sm-11">
52
+ <!-- <div class="row" v-if="row.f_state==='冲正' " style="color: red">-->
53
+ <!-- <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>-->
54
+ <!-- <span class="col-sm-4">{{$parent.$parent.$parent.dateDes(row.f_operate_date)}}</span>-->
55
+ <!-- <span class="col-sm-4">{{row.type}}</span>-->
56
+ <!-- </div>-->
57
+ <div class="row">
58
+ <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>
59
+ <span class="col-sm-4">{{$parent.$parent.$parent.dateDes(row.f_operate_date)}}</span>
60
+ <span class="col-sm-4">{{row.type}}</span>
61
+ </div>
62
+ </div>
63
+ <div class="col-sm-1" v-if="$parent.$parent.$parent.isOperate" title="涉及权限:冲正权限">
64
+ <dropdown class="auto"
65
+ v-if="(row.type ==='机表收费撤销' || row.type ==='卡表收费撤销' || row.type ==='物联网收费撤销' || row.type ==='其他收费撤销'
66
+ || row.type ==='气损收费撤销' || row.type ==='预存缴费' || row.type === '补卡' || row.type === '物联网收费' ||
67
+ row.type === '用户退费' || row.type === '机表收费' || row.type === '数码表收费' ||
68
+ row.type === '卡表收费' || row.type === '超用收费' || row.type === '发卡售气' || row.type === '其他收费' ||
69
+ row.type === '换表' || row.state === 1 || row.type==='调价补费' || row.type==='卡表赠气' ||
70
+ row.type==='物联网赠气'|| row.type==='物联网赠费'|| row.type==='卡表赠费'|| row.type==='卡表赠气'||
71
+ row.type==='卡表收费撤销'||row.type==='物联网补费' || row.type==='物联网扣费'||row.type==='机表补费'||
72
+ row.type==='机表扣费'||row.type==='物联网补气'||row.type==='物联网扣气'||row.type==='气损收费' ||
73
+ row.type === '气表清零' || row.type === '掉气补气' || row.type === '其他补气' || row.type === '清零补气' ||
74
+ row.type === '换表补气' || row.type === '过户'|| row.type ==='价格补差' || row.type ==='价格补差撤销' || row.type === '转气转出' || row.type === '转气转入') && row.type!=='新增户档案'">
75
+ <button data-toggle="dropdown" style="border: 0px;background: none;" type="button"
76
+ v-if="row.f_user_state==='正常'||row.f_user_state==='预备'||row.type==='气损收费' ">
77
+ <span class="glyphicon glyphicon-th-list"></span>
78
+ </button>
79
+ <ul class="dropdown-menu dropdown-menu-right" slot="dropdown-menu" style=" min-width: 60px;" v-if="row.f_user_state==='正常'||row.f_user_state==='预备'||row.type==='气损收费' ">
80
+ <!-- <li-->
81
+ <!-- v-if="row.type === '换新表' || row.type === '气表清零' || row.type === '掉气补气' || row.type === '其他补气' || row.type === '清零补气' || row.type === '换表补气'-->
82
+ <!-- || 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==='气损收费' ">-->
83
+ <!-- <a @click.stop="$parent.$parent.$parent.operate('票据补打', row)" href="#">票据补打</a>-->
84
+ <!-- </li>-->
85
+ <!-- <li-->
86
+ <!-- v-if="row.state === 1 && (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==='物联网赠气')">-->
87
+ <!-- <a @click.stop="$parent.$parent.$parent.operate('撤销', row)" href="#">撤销</a>-->
88
+ <!-- </li>-->
89
+ <li>
90
+ <a @click.stop="$parent.$parent.$parent.operate('票据补打', row)" href="#">票据补打</a>
91
+ </li>
92
+ <li>
93
+ <a v-if="row.type!=='转气转出' && row.type!=='转气转入'" @click.stop="$parent.$parent.$parent.operate('撤销', row)" href="#">撤销</a>
94
+ </li>
95
+ </ul>
96
+ </dropdown>
97
+ </div>
98
+
99
+ </span>
100
+ <div class="panel-body" v-if="$parent.$parent.$parent.isSelected(row)">
101
+ <salecardgas-detail :data="row" v-if="row.type === '发卡售气'"></salecardgas-detail>
102
+ <movemeter-detail :data="row" v-if="row.type === '迁表'"></movemeter-detail>
103
+ <salecardgas-detail :data="row" v-if="row.type === '换表发卡'"></salecardgas-detail>
104
+ <cardmetercenter-detail :data="row" v-if="row.type === '卡表收费'||row.type === '数码表收费' "></cardmetercenter-detail>
105
+ <movegas-detail :data="row" v-if="row.type === '转气转出'"></movegas-detail>
106
+ <movegas-detail :data="row" v-if="row.type === '转气转入'"></movegas-detail>
107
+ <machinemetercenter-detail :data="row" v-if="row.type === '机表收费'"></machinemetercenter-detail>
108
+ <autoaccounts-detail :data="row" v-if="row.type === '自动下账'"></autoaccounts-detail>
109
+ <bankdk-detail :data="row" v-if="row.type === '银行代扣'"></bankdk-detail>
110
+ <bank-pay :data="row" v-if="row.type === '银行支付'"></bank-pay>
111
+ <wechat-pay :data="row" v-if="row.type === '微信支付'"></wechat-pay>
112
+ <disablemanage-detail :data="row" v-if="row.type === '停用'"></disablemanage-detail>
113
+ <enablemanage-detail :data="row" v-if="row.type === '启用'"></enablemanage-detail>
114
+ <replacecardmanage-detail :data="row" v-if="row.type === '补卡'"></replacecardmanage-detail>
115
+ <machinecard-detail :data="row" v-if="row.type === '机表补卡'"></machinecard-detail>
116
+ <transfermanage-detail :data="row" v-if="row.type === '过户'"></transfermanage-detail>
117
+ <othercharge-detail :data="row" v-if="row.type === '其他收费欠费登记'||row.type === '其他收费'||row.type === '维修收费'"></othercharge-detail>
118
+ <inputtorchange-detail :data="row" v-if="row.type === '抄表员变更'"></inputtorchange-detail>
119
+ <offgasaddgas-detail :data="row" v-if=" row.type === '换表补气' || row.type === '批量换表补气' || row.type === '其他补气' || row.type === '清零补气' || row.type === '掉气补气'||row.type==='物联网补费'||row.type==='物联网扣费'||row.type==='机表补费'||row.type==='机表扣费'||row.type==='物联网补气'||row.type==='物联网扣气' " ></offgasaddgas-detail>
120
+ <iotopen-detail :data="row" v-if="row.type === '开通'"></iotopen-detail>
121
+ <iotmetercenter-detail :data="row" v-if="row.type === '物联网收费' || row.type === '物联网开户' || row.type === '调价退费' || row.type === '调价补费'||row.type === '退押金' "></iotmetercenter-detail>
122
+ <overuserchange-detail :data="row" v-if="row.type === '超用收费'"></overuserchange-detail>
123
+ <adduser-detail :data="row" v-if="row.type === '新增户档案'"></adduser-detail>
124
+ <gaspricechange-detail :data="row" v-if="row.type === '气价变更'"></gaspricechange-detail>
125
+ <userchange-detail :data="row" v-if="row.type === '档案变更'"></userchange-detail>
126
+ <changemeter-detail :data="row" v-if="row.type === '换新表' || row.type === '批量换表' || row.type === '气表清零'"></changemeter-detail>
127
+ <changeflowmeter-detail :data="row" v-if="row.type === '换卡控流量计'"></changeflowmeter-detail>
128
+ <cardoveruser-detail :data="row" v-if="row.type === '卡表超用'||row.type === '超用'"></cardoveruser-detail>
129
+ <cancellation-detail :data="row" v-if="row.type === '销户'"></cancellation-detail>
130
+ <refund-detail :data="row" v-if="row.type === '退费' || row.type == '卡表退费'"></refund-detail>
131
+
132
+ <change-meter-cancel :data="row" v-if="row.type === '换表撤销'"></change-meter-cancel>
133
+ <autoaccounts-cancel-detail :data="row" v-if="row.type === '自动下账撤销'"></autoaccounts-cancel-detail>
134
+ <transfermanage-cancel-detail :data="row" v-if="row.type === '过户撤销'"></transfermanage-cancel-detail>
135
+ <cardmetercenter-cancel-detail :data="row" v-if="row.type === '卡表收费撤销'"></cardmetercenter-cancel-detail>
136
+ <machinemetercenter-cancel-detail :data="row" v-if="row.type === '机表收费撤销'"></machinemetercenter-cancel-detail>
137
+ <machinemetercenter-cancel-detail :data="row" v-if="row.type == '预存缴费撤销'"></machinemetercenter-cancel-detail>
138
+ <othercharge-cancel-detail :data="row" v-if="row.type === '其他收费撤销'"></othercharge-cancel-detail>
139
+ <replacecardmanage-cancel-detail :data="row" v-if="row.type === '补卡撤销'"></replacecardmanage-cancel-detail>
140
+ <iotmetercenter-cancel-detail :data="row" v-if="row.type === '物联网收费撤销'"></iotmetercenter-cancel-detail>
141
+ <feededuction-detail :data="row" v-if="row.type === '补费' ||row.type === '扣费' ||row.type === '补气' ||row.type === '扣气' "></feededuction-detail>
142
+ <with-gas :data="row" v-if="row.type==='物联网赠气' || row.type==='物联网赠费'||row.type==='卡表赠气'||row.type==='卡表赠费'"></with-gas>
143
+ <replace-card-manageDetail :data="row" v-if=" row.type==='物联网补费'||row.type==='物联网扣费'||row.type==='机表补费'||row.type==='机表扣费'||row.type==='物联网补气'||row.type==='物联网扣气' "></replace-card-manageDetail>
144
+ <blacklist-detail :data="row" v-if="row.type ==='拉黑' ||row.type === '取消拉黑' "></blacklist-detail>
145
+ <advance-delivery-detail :data="row" v-if="row.type ==='卡表预交' "></advance-delivery-detail>
146
+ <machinemetercenter-detail :data="row" v-if="row.type === '预存缴费'||row.type == '调价预存'"></machinemetercenter-detail>
147
+ <price-adjustment-detail :data="row" v-if="row.type === '价格补差'"></price-adjustment-detail>
148
+ <gasloss-detail :data="row" v-if="row.type === '气损收费' || row.type === '气损收费撤销'"></gasloss-detail>
149
+ <garbage-detail :data="row" v-if="row.type === '垃圾费收费'"></garbage-detail>
150
+ </div>
151
+ <div style="margin-top: 8px;background: #FFF;" v-if="!$parent.$parent.$parent.isSelected(row)">
152
+ <span>{{row.f_describe}}</span>
153
+ </div>
154
+ </panel>
155
+ </accordion>
156
+ </div>
157
+
158
+ </criteria-paged>
159
+ </partial-view>
160
+ <record-cancel :data="cancel_data" :show.sync="cancel_show" @cancel="cancelOper()" @cancel-success="cancelSucc()" v-if="cancel_show"></record-cancel>
161
+ <reissue-bill :data="reissue_data" :show.sync="reissue_show" @cancel="reissueOper()" @reissue-success="reissueSucc()" v-if="reissue_show"></reissue-bill>
162
+ </div>
163
+ </template>
164
+ <script>
165
+ /**
166
+ *操作记录信息
167
+ */
168
+ import {PagedList} from 'vue-client'
169
+ import co from 'co'
170
+
171
+ let cancelGen = function *(self, data) {
172
+ let msgRet = yield self.$showMessage('撤销后数据不可恢复,确认撤销录入吗?', ['confirm', 'cancel'])
173
+ if (msgRet === 'cancel') return
174
+ // 撤销操作完成,刷新界面
175
+ self.search()
176
+ }
177
+
178
+ /**
179
+ * 发票补打
180
+ */
181
+ let reprintGen = async function (self, row) {
182
+ try {
183
+ row.billUrl = self.getBillUrl(row)
184
+ if (!row.billUrl) {
185
+ self.$showMessage('当前操作类型暂时没有票据')
186
+ return
187
+ }
188
+ row.f_bill_type = row.type
189
+ row.f_bill_style = '普通收据'
190
+ row.f_operator = self.$login.f.name
191
+ row.f_operatorid = self.$login.f.id
192
+ row.f_orgid = self.$login.f.orgid
193
+ row.f_orgname = self.$login.f.orgs
194
+ row.f_depid = self.$login.f.depids
195
+ row.f_depname = self.$login.f.deps
196
+ self.reissue_data = JSON.parse(JSON.stringify(row))
197
+ if (row.type === '调价预存') {
198
+ let id = await self.$resetpost('rs/sql/singleTable_OrderBy', {
199
+ data: {
200
+ items: 'f_surplus_id',
201
+ tablename: 't_sellinggas',
202
+ condition: `id = '${row.id}'`,
203
+ orderitem: 'id'
204
+ }
205
+ }, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
206
+ self.reissue_data.id = id.data[0].f_surplus_id
207
+ }
208
+ self.reissue_show = true
209
+ } catch (error) {
210
+ if (error.status) {
211
+ self.$warn(`加载数据出错, ${JSON.stringify(error)}`, 'CardList')
212
+ }
213
+ throw error
214
+ }
215
+ }
216
+ let asyncCardList = async function (self) {
217
+ await self.$getConfig(self, 'CardList')
218
+ console.log('操作汇总config', self.config)
219
+ }
220
+ export default {
221
+ title: '操作汇总',
222
+ data () {
223
+ return {
224
+ config: {
225
+ cancleother: false, // 默认可以撤销别人的操作
226
+ cancletime: true // 默认可以冲正今天以前的操作
227
+ },
228
+ model: new PagedList(`${this.sqlurl}`, 9999,
229
+ {
230
+ items: '"' + this.items + '"',
231
+ tablename: '"' + this.tablename + '"',
232
+ orderitem: '"' + this.orderitem + '"'
233
+ }),
234
+ show: false,
235
+ asideTitle: '用户操作',
236
+ row: Object,
237
+ comp: null,
238
+ operationtypes: this.$appdata.getParam('操作类型') ? [{
239
+ label: '全部',
240
+ value: ''
241
+ }, ...this.$appdata.getParam('操作类型')] : [],
242
+
243
+ cancel_show: false,
244
+ cancel_data: null,
245
+ criteriaShow: false,
246
+ reissue_show: false,
247
+ reissue_data: null,
248
+ authArr: this.$login.r ? this.$login.r : []
249
+ }
250
+ },
251
+ props: {
252
+ sqlurl: {
253
+ type: String,
254
+ default: 'rs/sql/getRecord'
255
+ },
256
+ items: {
257
+ type: String,
258
+ default: '*'
259
+ },
260
+ tablename: {
261
+ type: String,
262
+ default: 't_record'
263
+ },
264
+ orderitem: {
265
+ type: String,
266
+ default: 'f_operate_date desc'
267
+ },
268
+ btns: {
269
+ type: Array
270
+ },
271
+ operationtype: {
272
+ type: String,
273
+ default: ''
274
+ },
275
+ userinfoid: {},
276
+ isOperate: {
277
+ type: Boolean,
278
+ default: true
279
+ },
280
+ f_orgid: ''
281
+ },
282
+ ready () {
283
+ this.$refs.paged.$refs.cri.model.f_operat_type = [this.operationtype]
284
+ asyncCardList(this)
285
+ // this.search()
286
+ },
287
+ methods: {
288
+ dateDes (date) {
289
+ return this.$login.dateDescripte(date)
290
+ },
291
+ selected (row) {
292
+ if (this.row === row) {
293
+ this.row = null
294
+ } else {
295
+ this.row = row
296
+ }
297
+ },
298
+ isSelected (row) {
299
+ return this.row === row
300
+ },
301
+ search () {
302
+ let condition = '1=1'
303
+ if (this.f_orgid) {
304
+ condition += `and (u.f_filialeid in ${this.f_orgid} or u.f_orgid in ${this.f_orgid}) `
305
+ } else {
306
+ condition += `and (u.f_filialeid = '${this.$login.f.orgid}' or u.f_orgid ='${this.$login.f.orgid}')`
307
+ }
308
+ this.$refs.pv.load(this.sqlurl, {data: {condition: condition}}).then((a) => {
309
+ if (a.data.length === 0) {
310
+ this.model.rows = []
311
+ this.model.state = '错误'
312
+ this.model.error = '没有符合条件的记录'
313
+ return
314
+ }
315
+ this.model.state = '正确'
316
+ this.model.rows = a.data
317
+ })
318
+ },
319
+ disEvent (btn) {
320
+ this.$dispatch(`${btn.eventName}`)
321
+ },
322
+ async operate (title, row) {
323
+ console.log('撤销的这条数据的信息', row)
324
+ if (title === '撤销') {
325
+ // 验证是否能撤销
326
+ let res = await this.$resetpost('rs/logic/recordRepealJudge', {data: row}, {
327
+ resolveMsg: null,
328
+ rejectMsg: '验证权限错误!!'
329
+ })
330
+ if (!res.data.pass) {
331
+ this.$showMessage(res.data.msg)
332
+ return
333
+ }
334
+ if (row.type === '卡表收费') {
335
+ if (!this.authArr.includes('无卡收费撤销权限')) {
336
+ this.$showAlert('当前用户没有【无卡收费撤销权限】,请联系管理员获取此权限后再进行该操作!', 'warning', 3000)
337
+ return
338
+ }
339
+ }
340
+ if (row.type === '物联网收费' || row.type === '卡表赠气' || row.type === '物联网赠费' || row.type === '卡表赠费' || row.type === '物联网赠气') {
341
+ let table_name = this.$appdata.getSingleValue('新抄表')? 't_web_handplan' : 't_handplan'
342
+ let getWebHand = await this.$SqlService.singleTable(table_name, `f_hand_state = '有效' and f_input_date > '${row.f_operate_date}' and f_userfiles_id = '${row.f_userfiles_id}'`)
343
+ console.log('长度', getWebHand)
344
+ if (getWebHand.data.length > 0) {
345
+ this.$showAlert('此次物联网收费之后有结算,不能撤销此纪录', 'warning', 1500)
346
+ return
347
+ }
348
+ } else if (row.type === '机表收费') {
349
+ let getWebHand = await this.$SqlService.singleTable('t_handplan', `f_hand_state = '有效' and f_input_date > '${row.f_operate_date}' and f_whether_pay = '是' and f_userfiles_id = '${row.f_userfiles_id}'`)
350
+
351
+ console.log('长度', getWebHand)
352
+ if (getWebHand.data.length > 0) {
353
+ this.$showAlert('此次机表收费之后有自动下账,不能撤销此纪录', 'warning', 1500)
354
+ return
355
+ }
356
+ let sql = `select th.*from t_handplan th
357
+ left join t_sellinghand tsh on th.id=tsh.f_hand_id
358
+ where th.f_hand_state = '有效' and th.f_input_date > '${row.f_operate_date}' and tsh.f_debt_money>0
359
+ and th.f_userfiles_id = '${row.f_userfiles_id}' and tsh.f_state='有效'`
360
+ let getwate = await this.$resetpost('rs/logic/sqlquery', {data: {sql: sql}}, {
361
+ resolveMsg: null,
362
+ rejectMsg: '获取记录详情出错!!'
363
+ })
364
+ if (getwate.data.length > 0) {
365
+ this.$showAlert('此次机表收费之后有自动下账,不能撤销此纪录', 'warning', 1500)
366
+ return
367
+ }
368
+ }
369
+ if (this.authArr.includes('冲正权限')) {
370
+ if (this.config.cancleother) {
371
+ if (row.f_operator != this.$login.f.name) {
372
+ this.$showAlert('不能撤销不是自己进行的操作', 'warning', 1500)
373
+ return
374
+ }
375
+ }
376
+ if (this.config.cancletime && !this.$login.f.rolesnames.includes('管理员')) {
377
+ let a = this.$login.toStandardYearMonth()
378
+ console.log('当前时间', a < row.f_operate_date)
379
+ if (!this.authArr.includes('跨月撤销')) {
380
+ if (row.f_operate_date < a) {
381
+ this.$showAlert('不能撤销非本月的记录,请联系管理员获取【跨月撤销】的权限。', 'warning', 1500)
382
+ return
383
+ }
384
+ a = this.$login.toStandardDateString() + ' 00:00:00'
385
+ if (row.f_operate_date < a) {
386
+ this.$showAlert('不能撤销不是当天的操作', 'warning', 1500)
387
+ return
388
+ }
389
+ }
390
+ }
391
+ } else {
392
+ this.$showAlert('当前用户没有【冲正权限】', 'warning', 1500)
393
+ return
394
+ }
395
+ }
396
+
397
+ if (title === '撤销') {
398
+ this.cancel_show = true
399
+ this.cancel_data = row
400
+ } else {
401
+ let reprint = reprintGen(this, row)
402
+ return co(reprint)
403
+ }
404
+ },
405
+ cancelOper () {
406
+ this.cancel_data = null
407
+ this.cancel_show = false
408
+ },
409
+ cancelSucc () {
410
+ console.log('-----------------------------撤销成功了,隐藏掉')
411
+ this.cancel_show = false
412
+ this.$dispatch('refresh')
413
+ },
414
+ reissueOper () {
415
+ this.reissue_data = null
416
+ this.reissue_show = false
417
+ },
418
+ reissueSucc () {
419
+ this.reissue_show = false
420
+ this.$dispatch('refresh')
421
+ },
422
+
423
+ getBillUrl (row) {
424
+ let type = row.type
425
+ let name = ''
426
+ // 根据type数据 选择调用的Logic
427
+ if (type === '过户') {
428
+ name = 'rs/report/transfer_bill'
429
+ } else if (type === '换新表' || type === '气表清零') {
430
+ name = 'rs/report/change_meter'
431
+ } else if (type === '机表收费' || type === '机表收费撤销') {
432
+ if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
433
+ name = 'rs/report/fmy_machine_bill'
434
+ } else {
435
+ name = 'rs/report/machine_bill'
436
+ }
437
+ } else if (type === '物联网收费' || type === '物联网收费撤销' || type === '物联网开户') {
438
+ if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
439
+ name = 'rs/report/fmy_iot_bill'
440
+ } else {
441
+ name = 'rs/report/iot_bill'
442
+ }
443
+ } else if (type === '物联网补费' || type === '物联网扣费' || type === '物联网补气' || type === '物联网扣气' || type === '机表补费' || type === '机表扣费') {
444
+ name = 'rs/report/MakeUp'
445
+ } else if (type === '超用收费') {
446
+ name = 'rs/report/overuse_bill'
447
+ } else if (type === '其他收费' || type === '其他收费撤销') {
448
+ name = 'rs/report/otherCharge_bill'
449
+ } else if (type === '补卡') {
450
+ name = 'rs/report/replace_sell'
451
+ } else if (type === '发卡售气') {
452
+ if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
453
+ name = 'rs/report/fmy_sendCard_bill'
454
+ } else {
455
+ if (row.f_meter_classify === '金额卡表' && this.$appdata.getSingleValue('金额气量区分卡表票据')) {
456
+ name = 'rs/report/fee_sendCard_bill'
457
+ } else {
458
+ name = 'rs/report/sendCard_bill'
459
+ }
460
+ }
461
+ } else if (type === '卡表收费' || type === '卡表收费撤销' || type === '卡表收费撤销') {
462
+ if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
463
+ name = 'rs/report/fmy_card_bill'
464
+ } else {
465
+ if (row.f_meter_classify === '金额卡表' && this.$appdata.getSingleValue('金额气量区分卡表票据')) {
466
+ name = 'rs/report/fee_card_bill'
467
+ } else {
468
+ name = 'rs/report/card_bill'
469
+ }
470
+ }
471
+ } else if (type === '预存缴费') {
472
+ name = 'rs/report/pre_sell'
473
+ } else if (type === '调价预存') {
474
+ name = 'rs/report/refund_sell'
475
+ } else if (type === '退费') {
476
+ name = 'rs/report/refund_sell'
477
+ } else if (type === '调价补费') {
478
+ name = 'rs/report/compensation_bill'
479
+ } else if (type === '数码表收费') {
480
+ name = 'rs/report/digtial_bill'
481
+ } else if (type === '气损收费' || type === '气损收费撤销') {
482
+ name = 'rs/report/gasloss_bill'
483
+ } else if (type === '掉气补气') {
484
+ name = 'rs/report/acceptOffGasAddGas_bill'
485
+ } else if (type === '其他补气') {
486
+ name = 'rs/report/acceptOtherGas_bill'
487
+ } else if (type === '清零补气' || type === '换表补气' || type === '批量换表补气') {
488
+ if (row.f_meter_classify.indexOf('卡表') > -1) {
489
+ name = 'rs/report/card_gas_bill'
490
+ } else {
491
+ name = 'rs/report/iot_sell'
492
+ }
493
+ } else if (type === '垃圾费收费') {
494
+ name = 'rs/report/garbageChargeReport'
495
+ } else if (type === '物联网赠费') {
496
+ name = 'rs/report/iotGiftFee'
497
+ } else if (type === '物联网赠气') {
498
+ name = 'rs/report/iotGiftGas'
499
+ } else if (type === '卡表赠费') {
500
+ name = 'rs/report/icGiftFee'
501
+ } else if (type === '卡表赠气') {
502
+ name = 'rs/report/icGiftGas'
503
+ } else if (type === '转气转出') {
504
+ name = 'rs/report/gas_transfer_out'
505
+ } else if (type === '转气转入') {
506
+ name = 'rs/report/gas_transfer_into'
507
+ }
508
+ return name
509
+ },
510
+ // 撤销为统一操作,所以写到基础组件中
511
+ operateCancel (row) {
512
+ let cancel = cancelGen(this, row)
513
+ co(cancel)
514
+ },
515
+ selfSearch (args) {
516
+ // if (!this.$login.f.parent.parent.name.includes('统一资源管理')) {
517
+ // args.condition += `and f_filialeids = '${this.$login.f.f_orgids}'`
518
+ // }
519
+ if (this.f_orgid) {
520
+ args.condition += `and r.f_orgid in ${this.f_orgid}`
521
+ } else {
522
+ args.condition += `and r.f_orgid = '${this.$login.f.orgid}'`
523
+ }
524
+ if (this.authArr.includes('操作记录查询限定')) {
525
+ args.condition += ` and r.f_operatorid = '${this.$login.f.id}'`
526
+ }
527
+ this.model.search(args.condition, args.model)
528
+ }
529
+ },
530
+ watch: {
531
+ // 'userinfoid' (newVal) {
532
+ // this.model.rows={}
533
+ // if (newVal && newVal !== '') {
534
+ // this.$nextTick(function () {
535
+ // this.$refs.paged.$refs.cri.model.f_userinfo_code = newVal
536
+ // }.bind(this))
537
+ // }else{
538
+ // this.$nextTick(function () {
539
+ // this.$refs.paged.$refs.cri.model.f_userinfo_code = ""
540
+ // }.bind(this))
541
+ // }
542
+ // this.$refs.paged.$refs.cri.model.f_operat_type = ''
543
+ // }
544
+ 'userinfoid' (newVal) {
545
+ if (newVal && newVal !== '') {
546
+ this.$nextTick(function () {
547
+ this.$refs.paged.$refs.cri.model.f_userinfo_code = newVal
548
+ }.bind(this))
549
+ this.$refs.paged.$refs.cri.model.f_operat_type = ''
550
+ let condition = `f_userinfo_code = '${newVal}' and u.f_filialeid = '${this.$login.f.orgid}'`
551
+ this.$refs.pv.load(this.sqlurl, {data: {condition: condition}}).then((a) => {
552
+ if (a.data.length === 0) {
553
+ this.model.rows = []
554
+ this.model.state = '错误'
555
+ this.model.error = '没有符合条件的记录'
556
+ return
557
+ }
558
+ this.model.state = '正确'
559
+ this.model.rows = a.data
560
+ })
561
+ } else {
562
+ this.model.rows = {}
563
+ this.$nextTick(function () {
564
+ this.$refs.paged.$refs.cri.model.f_userinfo_code = ''
565
+ }.bind(this))
566
+ }
567
+ }
568
+ }
569
+ }
570
+ </script>