sale-client 4.2.16 → 4.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.2.16",
3
+ "version": "4.2.18",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,578 @@
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 @click.stop="$parent.$parent.$parent.operate('撤销', row)" v-show="$parent.$parent.$parent.cardCanCel(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==='物联网扣气'||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
+ <insurance-manage-detail :data="row" v-if="row.type === '保险收费'"></insurance-manage-detail>
133
+
134
+ <change-meter-cancel :data="row" v-if="row.type === '换表撤销'"></change-meter-cancel>
135
+ <autoaccounts-cancel-detail :data="row" v-if="row.type === '自动下账撤销'"></autoaccounts-cancel-detail>
136
+ <transfermanage-cancel-detail :data="row" v-if="row.type === '过户撤销'"></transfermanage-cancel-detail>
137
+ <cardmetercenter-cancel-detail :data="row" v-if="row.type === '卡表收费撤销'"></cardmetercenter-cancel-detail>
138
+ <machinemetercenter-cancel-detail :data="row" v-if="row.type === '机表收费撤销'"></machinemetercenter-cancel-detail>
139
+ <machinemetercenter-cancel-detail :data="row" v-if="row.type == '预存缴费撤销'"></machinemetercenter-cancel-detail>
140
+ <othercharge-cancel-detail :data="row" v-if="row.type === '其他收费撤销'"></othercharge-cancel-detail>
141
+ <replacecardmanage-cancel-detail :data="row" v-if="row.type === '补卡撤销'"></replacecardmanage-cancel-detail>
142
+ <iotmetercenter-cancel-detail :data="row" v-if="row.type === '物联网收费撤销'"></iotmetercenter-cancel-detail>
143
+ <feededuction-detail :data="row" v-if="row.type === '补费' ||row.type === '扣费' ||row.type === '补气' ||row.type === '扣气' "></feededuction-detail>
144
+ <with-gas :data="row" v-if="row.type==='物联网赠气' || row.type==='物联网赠费'||row.type==='卡表赠气'||row.type==='卡表赠费'"></with-gas>
145
+ <replace-card-manageDetail :data="row" v-if=" row.type==='物联网补费'||row.type==='物联网扣费'||row.type==='机表补费'||row.type==='机表扣费'||row.type==='物联网补气'||row.type==='物联网扣气' "></replace-card-manageDetail>
146
+ <blacklist-detail :data="row" v-if="row.type ==='拉黑' ||row.type === '取消拉黑' "></blacklist-detail>
147
+ <advance-delivery-detail :data="row" v-if="row.type ==='卡表预交' "></advance-delivery-detail>
148
+ <machinemetercenter-detail :data="row" v-if="row.type === '预存缴费'||row.type == '调价预存'"></machinemetercenter-detail>
149
+ <price-adjustment-detail :data="row" v-if="row.type === '价格补差'"></price-adjustment-detail>
150
+ <gasloss-detail :data="row" v-if="row.type === '气损收费' || row.type === '气损收费撤销'"></gasloss-detail>
151
+ <garbage-detail :data="row" v-if="row.type === '垃圾费收费'"></garbage-detail>
152
+ </div>
153
+ <div style="margin-top: 8px;background: #FFF;" v-if="!$parent.$parent.$parent.isSelected(row)">
154
+ <span>{{row.f_describe}}</span>
155
+ </div>
156
+ </panel>
157
+ </accordion>
158
+ </div>
159
+
160
+ </criteria-paged>
161
+ </partial-view>
162
+ <record-cancel :data="cancel_data" :show.sync="cancel_show" @cancel="cancelOper()" @cancel-success="cancelSucc()" v-if="cancel_show"></record-cancel>
163
+ <reissue-bill :data="reissue_data" :show.sync="reissue_show" @cancel="reissueOper()" @reissue-success="reissueSucc()" v-if="reissue_show"></reissue-bill>
164
+ </div>
165
+ </template>
166
+ <script>
167
+ /**
168
+ *操作记录信息
169
+ */
170
+ import {PagedList} from 'vue-client'
171
+ import co from 'co'
172
+
173
+ let cancelGen = function *(self, data) {
174
+ let msgRet = yield self.$showMessage('撤销后数据不可恢复,确认撤销录入吗?', ['confirm', 'cancel'])
175
+ if (msgRet === 'cancel') return
176
+ // 撤销操作完成,刷新界面
177
+ self.search()
178
+ }
179
+
180
+ /**
181
+ * 发票补打
182
+ */
183
+ let reprintGen = async function (self, row) {
184
+ try {
185
+ row.billUrl = self.getBillUrl(row)
186
+ if (!row.billUrl) {
187
+ self.$showMessage('当前操作类型暂时没有票据')
188
+ return
189
+ }
190
+ row.f_bill_type = row.type
191
+ row.f_bill_style = '普通收据'
192
+ row.f_operator = self.$login.f.name
193
+ row.f_operatorid = self.$login.f.id
194
+ row.f_orgid = self.$login.f.orgid
195
+ row.f_orgname = self.$login.f.orgs
196
+ row.f_depid = self.$login.f.depids
197
+ row.f_depname = self.$login.f.deps
198
+ self.reissue_data = JSON.parse(JSON.stringify(row))
199
+ if (row.type === '调价预存') {
200
+ let id = await self.$resetpost('api/af-revenue/sql/singleTable_OrderBy', {
201
+ data: {
202
+ items: 'f_surplus_id',
203
+ tablename: 't_sellinggas',
204
+ condition: `id = '${row.id}'`,
205
+ orderitem: 'id'
206
+ }
207
+ }, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
208
+ self.reissue_data.id = id.data[0].f_surplus_id
209
+ }
210
+ self.reissue_show = true
211
+ } catch (error) {
212
+ if (error.status) {
213
+ self.$warn(`加载数据出错, ${JSON.stringify(error)}`, 'CardList')
214
+ }
215
+ throw error
216
+ }
217
+ }
218
+ let asyncCardList = async function (self) {
219
+ await self.$getConfig(self, 'CardList')
220
+ console.log('操作汇总config', self.config)
221
+ }
222
+ export default {
223
+ title: '操作汇总',
224
+ data () {
225
+ return {
226
+ config: {
227
+ cancleother: false, // 默认可以撤销别人的操作
228
+ cancletime: true // 默认可以冲正今天以前的操作
229
+ },
230
+ model: new PagedList(`${this.sqlurl}`, 9999,
231
+ {
232
+ items: '"' + this.items + '"',
233
+ tablename: '"' + this.tablename + '"',
234
+ orderitem: '"' + this.orderitem + '"'
235
+ }),
236
+ show: false,
237
+ asideTitle: '用户操作',
238
+ row: Object,
239
+ comp: null,
240
+ operationtypes: this.$appdata.getParam('操作类型') ? [{
241
+ label: '全部',
242
+ value: ''
243
+ }, ...this.$appdata.getParam('操作类型')] : [],
244
+
245
+ cancel_show: false,
246
+ cancel_data: null,
247
+ criteriaShow: false,
248
+ reissue_show: false,
249
+ reissue_data: null,
250
+ authArr: this.$login.r ? this.$login.r : []
251
+ }
252
+ },
253
+ props: {
254
+ sqlurl: {
255
+ type: String,
256
+ default: 'api/af-revenue/sql/getRecord'
257
+ },
258
+ items: {
259
+ type: String,
260
+ default: '*'
261
+ },
262
+ tablename: {
263
+ type: String,
264
+ default: 't_record'
265
+ },
266
+ orderitem: {
267
+ type: String,
268
+ default: 'f_operate_date desc'
269
+ },
270
+ btns: {
271
+ type: Array
272
+ },
273
+ operationtype: {
274
+ type: String,
275
+ default: ''
276
+ },
277
+ userinfoid: {},
278
+ isOperate: {
279
+ type: Boolean,
280
+ default: true
281
+ },
282
+ f_orgid: ''
283
+ },
284
+ ready () {
285
+ this.$refs.paged.$refs.cri.model.f_operat_type = [this.operationtype]
286
+ asyncCardList(this)
287
+ // this.search()
288
+ },
289
+ methods: {
290
+ cardCanCel (row) {
291
+ if(row.type === '机表收费'){
292
+ return this.$login.r.includes('机表收费撤销')
293
+ }
294
+ return true
295
+ },
296
+ dateDes (date) {
297
+ return this.$login.dateDescripte(date)
298
+ },
299
+ selected (row) {
300
+ if (this.row === row) {
301
+ this.row = null
302
+ } else {
303
+ this.row = row
304
+ }
305
+ },
306
+ isSelected (row) {
307
+ return this.row === row
308
+ },
309
+ search () {
310
+ let condition = '1=1'
311
+ if (this.f_orgid) {
312
+ condition += `and (u.f_filialeid in ${this.f_orgid} or u.f_orgid in ${this.f_orgid}) `
313
+ } else {
314
+ condition += `and (u.f_filialeid = '${this.$login.f.orgid}' or u.f_orgid ='${this.$login.f.orgid}')`
315
+ }
316
+ this.$refs.pv.load(this.sqlurl, {data: {condition: condition}}).then((a) => {
317
+ if (a.data.length === 0) {
318
+ this.model.rows = []
319
+ this.model.state = '错误'
320
+ this.model.error = '没有符合条件的记录'
321
+ return
322
+ }
323
+ this.model.state = '正确'
324
+ this.model.rows = a.data
325
+ })
326
+ },
327
+ disEvent (btn) {
328
+ this.$dispatch(`${btn.eventName}`)
329
+ },
330
+ async operate (title, row) {
331
+ console.log('撤销的这条数据的信息', row)
332
+ if (title === '撤销') {
333
+ // 验证是否能撤销
334
+ let res = await this.$resetpost('api/af-revenue/logic/recordRepealJudge', {data: row}, {
335
+ resolveMsg: null,
336
+ rejectMsg: '验证权限错误!!'
337
+ })
338
+ if (!res.data.pass) {
339
+ this.$showMessage(res.data.msg)
340
+ return
341
+ }
342
+ if (row.type === '卡表收费') {
343
+ if (!this.authArr.includes('无卡收费撤销权限')) {
344
+ this.$showAlert('当前用户没有【无卡收费撤销权限】,请联系管理员获取此权限后再进行该操作!', 'warning', 3000)
345
+ return
346
+ }
347
+ }
348
+ if (row.type === '物联网收费' || row.type === '卡表赠气' || row.type === '物联网赠费' || row.type === '卡表赠费' || row.type === '物联网赠气') {
349
+ let table_name = this.$appdata.getSingleValue('新抄表')? 't_web_handplan' : 't_handplan'
350
+ 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}'`)
351
+ console.log('长度', getWebHand)
352
+ if (getWebHand.data.length > 0) {
353
+ this.$showAlert('此次物联网收费之后有结算,不能撤销此纪录', 'warning', 1500)
354
+ return
355
+ }
356
+ } else if (row.type === '机表收费') {
357
+ 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}'`)
358
+
359
+ console.log('长度', getWebHand)
360
+ if (getWebHand.data.length > 0) {
361
+ this.$showAlert('此次机表收费之后有自动下账,不能撤销此纪录', 'warning', 1500)
362
+ return
363
+ }
364
+ let sql = `select th.*from t_handplan th
365
+ left join t_sellinghand tsh on th.id=tsh.f_hand_id
366
+ where th.f_hand_state = '有效' and th.f_input_date > '${row.f_operate_date}' and tsh.f_debt_money>0
367
+ and th.f_userfiles_id = '${row.f_userfiles_id}' and tsh.f_state='有效'`
368
+ let getwate = await this.$resetpost('api/af-revenue/logic/sqlquery', {data: {sql: sql}}, {
369
+ resolveMsg: null,
370
+ rejectMsg: '获取记录详情出错!!'
371
+ })
372
+ if (getwate.data.length > 0) {
373
+ this.$showAlert('此次机表收费之后有自动下账,不能撤销此纪录', 'warning', 1500)
374
+ return
375
+ }
376
+ }
377
+ if (this.authArr.includes('冲正权限')) {
378
+ if (this.config.cancleother) {
379
+ if (row.f_operator != this.$login.f.name) {
380
+ this.$showAlert('不能撤销不是自己进行的操作', 'warning', 1500)
381
+ return
382
+ }
383
+ }
384
+ if (this.config.cancletime && !this.$login.f.rolesnames.includes('管理员')) {
385
+ let a = this.$login.toStandardYearMonth()
386
+ console.log('当前时间', a < row.f_operate_date)
387
+ if (!this.authArr.includes('跨月撤销')) {
388
+ if (row.f_operate_date < a) {
389
+ this.$showAlert('不能撤销非本月的记录,请联系管理员获取【跨月撤销】的权限。', 'warning', 1500)
390
+ return
391
+ }
392
+ a = this.$login.toStandardDateString() + ' 00:00:00'
393
+ if (row.f_operate_date < a) {
394
+ this.$showAlert('不能撤销不是当天的操作', 'warning', 1500)
395
+ return
396
+ }
397
+ }
398
+ }
399
+ } else {
400
+ this.$showAlert('当前用户没有【冲正权限】', 'warning', 1500)
401
+ return
402
+ }
403
+ }
404
+
405
+ if (title === '撤销') {
406
+ this.cancel_show = true
407
+ this.cancel_data = row
408
+ } else {
409
+ let reprint = reprintGen(this, row)
410
+ return co(reprint)
411
+ }
412
+ },
413
+ cancelOper () {
414
+ this.cancel_data = null
415
+ this.cancel_show = false
416
+ },
417
+ cancelSucc () {
418
+ console.log('-----------------------------撤销成功了,隐藏掉')
419
+ this.cancel_show = false
420
+ this.$dispatch('refresh')
421
+ },
422
+ reissueOper () {
423
+ this.reissue_data = null
424
+ this.reissue_show = false
425
+ },
426
+ reissueSucc () {
427
+ this.reissue_show = false
428
+ this.$dispatch('refresh')
429
+ },
430
+
431
+ getBillUrl (row) {
432
+ let type = row.type
433
+ let name = ''
434
+ // 根据type数据 选择调用的Logic
435
+ if (type === '过户') {
436
+ name = 'api/af-revenue/report/transfer_bill'
437
+ } else if (type === '换新表' || type === '气表清零') {
438
+ name = 'api/af-revenue/report/change_meter'
439
+ } else if (type === '机表收费' || type === '机表收费撤销') {
440
+ if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
441
+ name = 'api/af-revenue/report/fmy_machine_bill'
442
+ } else {
443
+ name = 'api/af-revenue/report/machine_bill'
444
+ }
445
+ } else if (type === '物联网收费' || type === '物联网收费撤销' || type === '物联网开户' || type === '物联网赠气') {
446
+ if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
447
+ name = 'api/af-revenue/report/fmy_iot_bill'
448
+ } else {
449
+ name = 'api/af-revenue/report/iot_bill'
450
+ }
451
+ } else if (type === '物联网补费' || type === '物联网扣费' || type === '物联网补气' || type === '物联网扣气' || type === '机表补费' || type === '机表扣费') {
452
+ name = 'api/af-revenue/report/MakeUp'
453
+ } else if (type === '超用收费') {
454
+ name = 'api/af-revenue/report/overuse_bill'
455
+ } else if (type === '其他收费' || type === '其他收费撤销') {
456
+ name = 'api/af-revenue/report/otherCharge_bill'
457
+ } else if (type === '补卡') {
458
+ name = 'api/af-revenue/report/replace_sell'
459
+ } else if (type === '发卡售气') {
460
+ if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
461
+ name = 'api/af-revenue/report/fmy_sendCard_bill'
462
+ } else {
463
+ if (row.f_meter_classify === '金额卡表' && this.$appdata.getSingleValue('金额气量区分卡表票据')) {
464
+ name = 'api/af-revenue/report/fee_sendCard_bill'
465
+ } else {
466
+ name = 'api/af-revenue/report/sendCard_bill'
467
+ }
468
+ }
469
+ } else if (type === '卡表收费' || type === '卡表收费撤销' || type === '卡表收费撤销') {
470
+ if (row.f_user_type === '非民用' && this.$login.r.includes('非民用纸质票据拆分')) {
471
+ name = 'api/af-revenue/report/fmy_card_bill'
472
+ } else {
473
+ if (row.f_meter_classify === '金额卡表' && this.$appdata.getSingleValue('金额气量区分卡表票据')) {
474
+ name = 'api/af-revenue/report/fee_card_bill'
475
+ } else {
476
+ name = 'api/af-revenue/report/card_bill'
477
+ }
478
+ }
479
+ } else if (type === '预存缴费') {
480
+ name = 'api/af-revenue/report/pre_sell'
481
+ } else if (type === '调价预存') {
482
+ name = 'api/af-revenue/report/refund_sell'
483
+ } else if (type === '退费') {
484
+ name = 'api/af-revenue/report/refund_sell'
485
+ } else if (type === '调价补费') {
486
+ name = 'api/af-revenue/report/compensation_bill'
487
+ } else if (type === '数码表收费') {
488
+ name = 'api/af-revenue/report/digtial_bill'
489
+ } else if (type === '气损收费' || type === '气损收费撤销') {
490
+ name = 'api/af-revenue/report/gasloss_bill'
491
+ } else if (type === '掉气补气') {
492
+ name = 'api/af-revenue/report/acceptOffGasAddGas_bill'
493
+ } else if (type === '其他补气') {
494
+ name = 'api/af-revenue/report/acceptOtherGas_bill'
495
+ } else if (type === '清零补气' || type === '换表补气' || type === '批量换表补气' || type === '低保户导入补气') {
496
+ if (row.f_meter_classify.indexOf('卡表') > -1) {
497
+ name = 'api/af-revenue/report/card_gas_bill'
498
+ } else {
499
+ name = 'api/af-revenue/report/iot_sell'
500
+ }
501
+ } else if (type === '垃圾费收费') {
502
+ name = 'api/af-revenue/report/garbageChargeReport'
503
+ } else if (type === '物联网赠费') {
504
+ name = 'api/af-revenue/report/iotGiftFee'
505
+ } else if (type === '物联网赠气') {
506
+ name = 'api/af-revenue/report/iotGiftGas'
507
+ } else if (type === '卡表赠费') {
508
+ name = 'api/af-revenue/report/icGiftFee'
509
+ } else if (type === '卡表赠气') {
510
+ name = 'api/af-revenue/report/icGiftGas'
511
+ } else if (type === '保险收费') {
512
+ name = 'api/af-revenue/report/insurance_bill'
513
+ } else if (type === '自动下账') {
514
+ name = 'api/af-revenue/report/autoAccounts_bill'
515
+ }
516
+ return name
517
+ },
518
+ // 撤销为统一操作,所以写到基础组件中
519
+ operateCancel (row) {
520
+ let cancel = cancelGen(this, row)
521
+ co(cancel)
522
+ },
523
+ selfSearch (args) {
524
+ // if (!this.$login.f.parent.parent.name.includes('统一资源管理')) {
525
+ // args.condition += `and f_filialeids = '${this.$login.f.f_orgids}'`
526
+ // }
527
+ if (this.f_orgid) {
528
+ args.condition += `and r.f_orgid in ${this.f_orgid}`
529
+ } else {
530
+ args.condition += `and r.f_orgid = '${this.$login.f.orgid}'`
531
+ }
532
+ if (this.authArr.includes('操作记录查询限定')) {
533
+ args.condition += ` and r.f_operatorid = '${this.$login.f.id}'`
534
+ }
535
+ this.model.search(args.condition, args.model)
536
+ }
537
+ },
538
+ watch: {
539
+ // 'userinfoid' (newVal) {
540
+ // this.model.rows={}
541
+ // if (newVal && newVal !== '') {
542
+ // this.$nextTick(function () {
543
+ // this.$refs.paged.$refs.cri.model.f_userinfo_code = newVal
544
+ // }.bind(this))
545
+ // }else{
546
+ // this.$nextTick(function () {
547
+ // this.$refs.paged.$refs.cri.model.f_userinfo_code = ""
548
+ // }.bind(this))
549
+ // }
550
+ // this.$refs.paged.$refs.cri.model.f_operat_type = ''
551
+ // }
552
+ 'userinfoid' (newVal) {
553
+ if (newVal && newVal !== '') {
554
+ this.$nextTick(function () {
555
+ this.$refs.paged.$refs.cri.model.f_userinfo_code = newVal
556
+ }.bind(this))
557
+ this.$refs.paged.$refs.cri.model.f_operat_type = ''
558
+ let condition = `f_userinfo_code = '${newVal}' and u.f_filialeid = '${this.$login.f.orgid}'`
559
+ this.$refs.pv.load(this.sqlurl, {data: {condition: condition}}).then((a) => {
560
+ if (a.data.length === 0) {
561
+ this.model.rows = []
562
+ this.model.state = '错误'
563
+ this.model.error = '没有符合条件的记录'
564
+ return
565
+ }
566
+ this.model.state = '正确'
567
+ this.model.rows = a.data
568
+ })
569
+ } else {
570
+ this.model.rows = {}
571
+ this.$nextTick(function () {
572
+ this.$refs.paged.$refs.cri.model.f_userinfo_code = ''
573
+ }.bind(this))
574
+ }
575
+ }
576
+ }
577
+ }
578
+ </script>
@@ -0,0 +1,6 @@
1
+ // 分公司特殊组件页面注册
2
+ import Vue from 'vue'
3
+
4
+ export default function () {
5
+ Vue.component('card-list', (resolve) => { require(['./CardList'], resolve) })
6
+ }
@@ -182,6 +182,14 @@
182
182
  condition="f_total_gas <= {} " placeholder="">
183
183
  </div>
184
184
  </div>
185
+ <div class="col-sm-2 form-group">
186
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
187
+ <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
188
+ :options='$parent.$parent.meterbooks' placeholder='抄表册'
189
+ style="width:60%"
190
+ :multiple="true"
191
+ condition="f_meter_book_num in {}"></v-select>
192
+ </div>
185
193
 
186
194
  <res-select-group :initres="$parent.$parent.initres"
187
195
  @re-res="$parent.$parent.getRes"
@@ -439,6 +447,8 @@ import {PagedList, HttpResetClass} from 'vue-client'
439
447
  import Vue from 'vue'
440
448
  let readySomething = async function (self) {
441
449
  await self.$LoadParams.loadParam()
450
+ await self.$LoadParams.loadMeterBook(self.f_filialeid)
451
+ self.loadMeterBooks()
442
452
  self.initParams()
443
453
  }
444
454
  let readyGen = async function (self) {
@@ -618,6 +628,9 @@ export default {
618
628
  imgclose () {
619
629
  this.imgshow = false
620
630
  },
631
+ loadMeterBooks () {
632
+ this.meterbooks = this.$GetSaleParam.getMeterBooks()
633
+ },
621
634
  imgShow (val) {
622
635
  this.imgfilename = `api/af-revenue/file/image/` + val
623
636
  this.imgshow = true
@@ -789,12 +802,12 @@ export default {
789
802
  this.rowsdata = []
790
803
  this.radio = []
791
804
  this.checkAll = []
792
-
805
+
793
806
  // 重置DataGrid的选择状态
794
807
  if (this.$refs.paged && this.$refs.paged.$refs.grid && this.$refs.paged.$refs.grid.selectInit) {
795
808
  this.$refs.paged.$refs.grid.selectInit()
796
809
  }
797
-
810
+
798
811
  this.$refs.paged.$refs.criteria.search()
799
812
  },
800
813
  selfSearch (args) {
@@ -1082,12 +1095,12 @@ export default {
1082
1095
 
1083
1096
  await this.$resetpost('api/af-revenue/logic/runSQL', { sql: sql })
1084
1097
  this.$showAlert(`成功删除 ${selectedRows.length} 条记录`, 'success', 2000)
1085
-
1098
+
1086
1099
  // 重置DataGrid的选择状态
1087
1100
  if (this.$refs.paged && this.$refs.paged.$refs.grid && this.$refs.paged.$refs.grid.selectInit) {
1088
1101
  this.$refs.paged.$refs.grid.selectInit()
1089
1102
  }
1090
-
1103
+
1091
1104
  // 直接刷新数据,让界面状态完全重置
1092
1105
  this.search()
1093
1106
  } catch (error) {