sale-client 3.6.39 → 3.6.40

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,305 +1,335 @@
1
- <template>
2
- <div class="auto basic-main" style="height:95%">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div class="form-group col-sm-2">
8
- <label class="font_normal_body">客户编号</label>
9
- <input type="text" class="form-control" v-model="model.f_userinfo_code" style="width:60%"
10
- condition="info.f_userinfo_code = '{}' " placeholder="客户编号"
11
- >
12
- </div>
13
- <div class="form-group col-sm-2">
14
- <label class="font_normal_body">用户姓名</label>
15
- <input type="text" class="form-control" v-model="model.f_user_name" style="width:60%"
16
- condition="info.f_user_name = '{}'" placeholder="用户姓名"
17
- >
18
- </div>
19
- <div class="form-group col-sm-2">
20
- <label class="font_normal_body">是否有票</label>
21
- <v-select
22
- v-model="model.mid"
23
- placeholder='是否有票'
24
- :search="false"
25
- condition="mid.count {} "
26
- :value.sync="model.mid"
27
- :options='$parent.$parent.mid'
28
- close-on-select></v-select>
29
- </div>
30
- <div class="row" width="100%">
31
- <div class="col-sm-4 col-sm-2">
32
- <label class="font_normal_body">&nbsp;开始时间</label>
33
- <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_start_date"
34
- class="datepicker"
35
- condition="s.f_operate_date >= '{} 00:00:00'"
36
- placeholder="起始时间"
37
- style="width:60%"
38
- v-model="model.f_start_date"
39
- ></datepicker>
40
- </div>
41
- <div class="col-sm-4 col-sm-2">
42
- <label class="font_normal_body">结束时间</label>
43
- <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_end_date"
44
- class="datepicker"
45
- condition="s.f_operate_date <= '{} 23:59:59'"
46
- placeholder="结束时间"
47
- style="width:60%"
48
- v-model="model.f_end_date"
49
- ></datepicker>
50
- </div>
51
- <div style="float: right">
52
- <button class="button_search" @click="search()">查 询</button>
53
- <button class="button_search" @click="$parent.$parent.open_eTicket()">开票</button>
54
- </div>
55
- </div>
56
- </div>
57
- </div>
58
- </criteria>
59
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
60
- <template partial='head'>
61
- <tr>
62
- <th>
63
- <input type="checkbox" @click="$parent.$parent.$parent.addOrRemove($parent.$parent.$parent.selectAll)"
64
- style="width: 22px;height: 22px" :checked="$parent.$parent.$parent.selectAll">
65
- </th>
66
- <th>客户编号</th>
67
- <th>客户姓名</th>
68
- <th>客户地址</th>
69
- <th>客户电话</th>
70
- <th>缴费类型</th>
71
- <th>实收金额</th>
72
- <th>收款人</th>
73
- <th>收款部门</th>
74
- <th>是否开过票</th>
75
- <th>缴费时间</th>
76
- </tr>
77
- </template>
78
- <template partial='body' :model="model">
79
- <tr>
80
- <td style="text-align:center">
81
- <input type="checkbox" v-model="$parent.$parent.$parent.selecteds" :value="row"
82
- style="width: 22px;height: 22px" @click="$parent.$parent.$parent.checkbox($index, $event)">
83
- </td>
84
- <th style="text-align:center">{{ row.f_userinfo_code }}</th>
85
- <th style="text-align:center">{{ row.f_user_name }}</th>
86
- <th style="text-align:center">{{ row.f_address }}</th>
87
- <th style="text-align:center">{{ row.f_phone }}</th>
88
- <th style="text-align:center">{{ row.f_type }}</th>
89
- <th style="text-align:center">{{ row.f_collection }}</th>
90
- <th style="text-align:center">{{ row.f_operator }}</th>
91
- <th style="text-align:center">{{ row.f_depname }}</th>
92
- <th style="text-align:center">{{ row.is_bill }}</th>
93
- <th style="text-align:center">{{ row.f_operate_date }}</th>
94
- </tr>
95
- </template>
96
- </data-grid>
97
- </criteria-paged>
98
- </div>
99
- <modal :show.sync="eticket_msg" v-ref:modal large backdrop="false" :width="900">
100
- <header slot="modal-header" class="modal-header">
101
- <button type="button" class="close" @click="eticket_msg = false"><span>&times;</span></button>
102
- <h4 class="modal-title">发票信息</h4>
103
- </header>
104
- <article slot="modal-body" class="modal-body">
105
- <div class="auto select-overspread form-horizontal">
106
- <div class="row auto">
107
- <div class="col-sm-6 form-group form-input-group" :class="[!row.f_paper_name ? 'has-error' : '']">
108
- <label class="control-label">开票名称:</label>
109
- <input class="form-control col-sm-2"
110
- v-model="row.f_paper_name" placeholder="开票名称">
111
- </div>
112
- <div class="col-sm-6 form-group form-input-group">
113
- <nobr class="col-sm-4"><label class="control-label">是否征税:</label></nobr>
114
- <v-select v-model="invoice_is_pax"
115
- placeholder='请选择'
116
- :value.sync="invoice_is_pax"
117
- close-on-select
118
- :width="60"
119
- :value-single="true"
120
- :search="false"
121
- :options='is_pax' clear-button>
122
- </v-select>
123
- </div>
124
- <div class="col-sm-12 form-group form-input-group">
125
- <label class="control-label">开户行及账号:</label>
126
- <input class="form-control col-sm-2"
127
- v-model="row.f_paper_account" placeholder="购方开户行及账号">
128
- </div>
129
- <div class="col-sm-12 form-group form-input-group" >
130
- <label class="control-label">纳税人识别号:</label>
131
- <input class="form-control col-sm-2"
132
- v-model="row.f_taxpayer_id" placeholder="纳税人识别号">
133
- </div>
134
- <div class="col-sm-12 form-group form-input-group" :class="[!row.f_address_phone ? 'has-error' : '']">
135
- <label class="control-label">开票地址电话:</label>
136
- <input class="form-control col-sm-2"
137
- v-model="row.f_address_phone" placeholder="开票地址">
138
- </div>
139
- <div class="col-sm-12 form-group form-input-group">
140
- <label class="control-label">邮箱推送:</label>
141
- <input class="form-control col-sm-2"
142
- v-model="row.f_email" placeholder="邮箱推送">
143
- </div>
144
- </div>
145
- </div>
146
- </article>
147
- <footer slot="modal-footer" class="modal-footer">
148
- <button type="button" class="btn button_search"
149
- :disabled="!(row.f_paper_name&&row.f_address_phone)"
150
- @click='confirm'>确认收费
151
- </button>
152
- </footer>
153
- </modal>
154
- <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
155
- </template>
156
- <script>
157
- import {HttpResetClass, PagedList} from 'vue-client'
158
- import * as Util from '../../../../../Util'
159
- let asyncReadyGen = async function (self) {
160
- self.$refs.paged.$refs.cri.model.f_start_date = Util.toStandardDateString().substr(0, 5) + '01-01'
161
- self.$refs.paged.$refs.cri.model.f_end_date = Util.toStandardDateString()
162
- await self.search()
163
- }
164
- export default {
165
- title: '发票管理',
166
- data () {
167
- return {
168
- model: new PagedList('rs/sql/open_eTicket_cardQuery', 20,
169
- {}),
170
- criteriaShow: false,
171
- getfield: {},
172
- f_orgid: '',
173
- other: [],
174
- footer: [],
175
- invoice_is_pax: '征税',
176
- is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
177
- initres: {
178
- org: [this.$login.f.orgid],
179
- dep: [],
180
- user: []
181
- },
182
- eticket_show: false,
183
- selectAll: false,
184
- selecteds: [],
185
- orgCondtionStr: '',
186
- // 合计数据
187
- sumsmodel: {},
188
- msg: [],
189
- orgname: [],
190
- depname: [],
191
- eticket_msg: false,
192
- invoice_show_gas: '否',
193
- show_gas: [{label: '是', value: '是'}, {label: '否', value: '否'}],
194
- row: {},
195
- mid: [{label: '全部', value: ''}, {label: '是', value: ' > 0 '}, {label: '否', value: ' is null'}]
196
- }
197
- },
198
- ready () {
199
- asyncReadyGen(this)
200
- },
201
- methods: {
202
- search () {
203
- this.$refs.paged.$refs.cri.search()
204
- },
205
- async open_eTicket () {
206
- if ([...new Set(this.selecteds.map(item => item.f_userinfo_code))].length > 1) {
207
- this.$showAlert('所选择用户不是同一用户!!', 'warning', 2000)
208
- return
209
- }
210
- if (this.selecteds.filter(item => item.is_bill === '是').length >= 1) {
211
- // await this.$showMessage('选中的有已开过票得记录,确认开票吗?', ['confirm', 'cancel']).then(
212
- // (response) => {
213
- // if (response !== 'confirm') {
214
- //
215
- // }
216
- // })
217
- return this.$showAlert('已结算的记录不能再次结算开票','warning',3000)
218
- }
219
- let HttpReset = new HttpResetClass()
220
- let row = await HttpReset.load('POST', 'rs/sql/sale_getUser', {
221
- data: {
222
- orderitem: 'f_userinfo_code',
223
- condition: `f_userinfo_code = '${[...new Set(this.selecteds.map(item => item.f_userinfo_code))][0]}'`
224
- }
225
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
226
- this.row = row.data[0]
227
- this.invoice_show_gas = this.row.f_collection_type == '按气量' ? '是' : '否'
228
- if (!this.row.f_taxpayer_id) {
229
- this.row.f_taxpayer_id = this.row.f_idnumber
230
- }
231
- if (!this.row.f_paper_name) {
232
- this.row.f_paper_name = this.row.f_user_name
233
- }
234
- if (!this.row.f_address_phone) {
235
- this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
236
- }
237
- if(!this.row.f_email){
238
- this.row.f_email = this.row.f_email
239
- }
240
- this.eticket_msg = true
241
- },
242
- confirm () {
243
- this.eticket_msg = false
244
- this.eticket_show = true
245
- this.$refs.eticketbill.openETicket(this.selecteds.map(item => item.id), this.row, '是',this.invoice_is_pax, '结算收费')
246
- },
247
- selfSearch (args) {
248
- this.selecteds = []
249
- // let f_orgstr = this.orgCondtionStr
250
- // args.condition = `${args.condition} ` + f_orgstr
251
- this.model.search(args.condition, args.model)
252
- },
253
- eticket_toggle () {
254
- this.eticket_show = false
255
- this.search()
256
- },
257
- addOrRemove (is) {
258
- this.selecteds = []
259
- if (!is) { // 添加本页所有数据到ids中
260
- this.model.rows.forEach((row) => {
261
- this.selecteds.push(row)
262
- })
263
- this.selectAll = true
264
- } else { // 从ids中取消所有的数据
265
- this.model.rows.forEach((row, index) => {
266
- if (index <= this.maxIndex) {
267
- this.selecteds.push(row)
268
- }
269
- })
270
- this.selectAll = false
271
- }
272
- },
273
- checkbox (val, event) {
274
- // this.selecteds = []
275
- if (event.target.checked === true) {
276
- // for (let i = 0; i <= val; i++) {
277
- this.selecteds.push(this.model.rows[val])
278
- // }
279
- } else if (event.target.checked === false) {
280
- // for (let i = 0; i <= val - 1; i++) {
281
- this.selecteds.splice(this.selecteds.findIndex(item => item.id === this.model.rows[val].id), 1)
282
- // }
283
- }
284
- this.selectAll = (this.selecteds.length === this.model.rows.length)
285
- }
286
- },
287
- computed: {
288
- getPayee () {
289
- return this.$GetSaleParam.getPayee()
290
- },
291
- getReviewer () {
292
- return this.$GetSaleParam.getReviewer()
293
- },
294
- getDrawer () {
295
- return this.$GetSaleParam.getDrawer()
296
- }
297
- },
298
- events: {
299
- 'search' () {
300
- this.search()
301
- }
302
- },
303
- watch: {}
304
- }
305
- </script>
1
+ <template>
2
+ <div class="auto basic-main" style="height:95%">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div class="form-group col-sm-2">
8
+ <label class="font_normal_body">客户编号</label>
9
+ <input type="text" class="form-control" v-model="model.f_userinfo_code" style="width:60%"
10
+ condition="info.f_userinfo_code = '{}' " placeholder="客户编号"
11
+ >
12
+ </div>
13
+ <div class="form-group col-sm-2">
14
+ <label class="font_normal_body">用户姓名</label>
15
+ <input type="text" class="form-control" v-model="model.f_user_name" style="width:60%"
16
+ condition="info.f_user_name = '{}'" placeholder="用户姓名"
17
+ >
18
+ </div>
19
+ <div class="form-group col-sm-2">
20
+ <label class="font_normal_body">是否有票</label>
21
+ <v-select
22
+ v-model="model.mid"
23
+ placeholder='是否有票'
24
+ :search="false"
25
+ condition="mid.count {} "
26
+ :value.sync="model.mid"
27
+ :options='$parent.$parent.mid'
28
+ close-on-select></v-select>
29
+ </div>
30
+ <div class="row" width="100%">
31
+ <div class="col-sm-4 col-sm-2">
32
+ <label class="font_normal_body">&nbsp;开始时间</label>
33
+ <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_start_date"
34
+ class="datepicker"
35
+ condition="s.f_operate_date >= '{} 00:00:00'"
36
+ placeholder="起始时间"
37
+ style="width:60%"
38
+ v-model="model.f_start_date"
39
+ ></datepicker>
40
+ </div>
41
+ <div class="col-sm-4 col-sm-2">
42
+ <label class="font_normal_body">结束时间</label>
43
+ <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_end_date"
44
+ class="datepicker"
45
+ condition="s.f_operate_date <= '{} 23:59:59'"
46
+ placeholder="结束时间"
47
+ style="width:60%"
48
+ v-model="model.f_end_date"
49
+ ></datepicker>
50
+ </div>
51
+ <div style="float: right">
52
+ <button class="button_search" @click="search()">查 询</button>
53
+ <button class="button_search" @click="$parent.$parent.open_eTicket()">开票</button>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </criteria>
59
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
60
+ <template partial='head'>
61
+ <tr>
62
+ <!-- <th>-->
63
+ <!-- <input type="checkbox" @click="$parent.$parent.$parent.addOrRemove($parent.$parent.$parent.selectAll)"-->
64
+ <!-- style="width: 22px;height: 22px" :checked="$parent.$parent.$parent.selectAll">-->
65
+ <!-- </th>-->
66
+ <th>客户编号</th>
67
+ <th>客户姓名</th>
68
+ <th>客户地址</th>
69
+ <th>客户电话</th>
70
+ <th>缴费类型</th>
71
+ <th>实收金额</th>
72
+ <th>收款人</th>
73
+ <th>收款部门</th>
74
+ <th>是否开过票</th>
75
+ <th>缴费时间</th>
76
+ <th>操作</th>
77
+ </tr>
78
+ </template>
79
+ <template partial='body' :model="model">
80
+ <tr>
81
+ <!-- <td style="text-align:center">-->
82
+ <!-- <input type="checkbox" v-model="$parent.$parent.$parent.selecteds" :value="row"-->
83
+ <!-- style="width: 22px;height: 22px" @click="$parent.$parent.$parent.checkbox($index, $event)">-->
84
+ <!-- </td>-->
85
+ <th style="text-align:center">{{ row.f_userinfo_code }}</th>
86
+ <th style="text-align:center">{{ row.f_user_name }}</th>
87
+ <th style="text-align:center">{{ row.f_address }}</th>
88
+ <th style="text-align:center">{{ row.f_phone }}</th>
89
+ <th style="text-align:center">{{ row.f_type }}</th>
90
+ <th style="text-align:center">{{ row.f_collection }}</th>
91
+ <th style="text-align:center">{{ row.f_operator }}</th>
92
+ <th style="text-align:center">{{ row.f_depname }}</th>
93
+ <th style="text-align:center">{{ row.is_bill }}</th>
94
+ <th style="text-align:center">{{ row.f_operate_date }}</th>
95
+ <th>
96
+ <button class="btn btn-link" @click="$parent.$parent.$parent.kp(row)">开具发票
97
+ </button>
98
+ </th>
99
+ </tr>
100
+ </template>
101
+ </data-grid>
102
+ </criteria-paged>
103
+ </div>
104
+ <modal :show.sync="eticket_msg" v-ref:modal large backdrop="false" :width="900">
105
+ <header slot="modal-header" class="modal-header">
106
+ <button type="button" class="close" @click="eticket_msg = false"><span>&times;</span></button>
107
+ <h4 class="modal-title">发票信息</h4>
108
+ </header>
109
+ <article slot="modal-body" class="modal-body">
110
+ <div class="auto select-overspread form-horizontal">
111
+ <div class="row auto">
112
+ <div class="col-sm-6 form-group form-input-group" :class="[!row.f_paper_name ? 'has-error' : '']">
113
+ <label class="control-label">开票名称:</label>
114
+ <input class="form-control col-sm-2"
115
+ v-model="row.f_paper_name" placeholder="开票名称">
116
+ </div>
117
+ <div class="col-sm-6 form-group form-input-group">
118
+ <nobr class="col-sm-4"><label class="control-label">是否征税:</label></nobr>
119
+ <v-select v-model="invoice_is_pax"
120
+ placeholder='请选择'
121
+ :value.sync="invoice_is_pax"
122
+ close-on-select
123
+ :width="60"
124
+ :value-single="true"
125
+ :search="false"
126
+ :options='is_pax' clear-button>
127
+ </v-select>
128
+ </div>
129
+ <div class="col-sm-12 form-group form-input-group">
130
+ <label class="control-label">开户行及账号:</label>
131
+ <input class="form-control col-sm-2"
132
+ v-model="row.f_paper_account" placeholder="购方开户行及账号">
133
+ </div>
134
+ <div class="col-sm-12 form-group form-input-group" >
135
+ <label class="control-label">纳税人识别号:</label>
136
+ <input class="form-control col-sm-2"
137
+ v-model="row.f_taxpayer_id" placeholder="纳税人识别号">
138
+ </div>
139
+ <div class="col-sm-12 form-group form-input-group" :class="[!row.f_address_phone ? 'has-error' : '']">
140
+ <label class="control-label">开票地址电话:</label>
141
+ <input class="form-control col-sm-2"
142
+ v-model="row.f_address_phone" placeholder="开票地址">
143
+ </div>
144
+ <div class="col-sm-12 form-group form-input-group">
145
+ <label class="control-label">邮箱推送:</label>
146
+ <input class="form-control col-sm-2"
147
+ v-model="row.f_email" placeholder="邮箱推送">
148
+ </div>
149
+ </div>
150
+ </div>
151
+ </article>
152
+ <footer slot="modal-footer" class="modal-footer">
153
+ <button type="button" class="btn button_search"
154
+ :disabled="!(row.f_paper_name&&row.f_address_phone)"
155
+ @click='confirm'>确认收费
156
+ </button>
157
+ </footer>
158
+ </modal>
159
+ <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
160
+ </template>
161
+ <script>
162
+ import {HttpResetClass, PagedList} from 'vue-client'
163
+ import * as Util from '../../../../../Util'
164
+ let asyncReadyGen = async function (self) {
165
+ self.$refs.paged.$refs.cri.model.f_start_date = Util.toStandardDateString().substr(0, 5) + '01-01'
166
+ self.$refs.paged.$refs.cri.model.f_end_date = Util.toStandardDateString()
167
+ await self.search()
168
+ }
169
+ export default {
170
+ title: '发票管理',
171
+ data () {
172
+ return {
173
+ model: new PagedList('rs/sql/open_eTicket_cardQuery', 20,
174
+ {}),
175
+ criteriaShow: false,
176
+ getfield: {},
177
+ f_orgid: '',
178
+ other: [],
179
+ footer: [],
180
+ invoice_is_pax: '征税',
181
+ is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
182
+ initres: {
183
+ org: [this.$login.f.orgid],
184
+ dep: [],
185
+ user: []
186
+ },
187
+ eticket_show: false,
188
+ selectAll: false,
189
+ selecteds: [],
190
+ orgCondtionStr: '',
191
+ // 合计数据
192
+ sumsmodel: {},
193
+ msg: [],
194
+ orgname: [],
195
+ depname: [],
196
+ eticket_msg: false,
197
+ invoice_show_gas: '否',
198
+ show_gas: [{label: '是', value: '是'}, {label: '否', value: '否'}],
199
+ row: {},
200
+ mid: [{label: '全部', value: ''}, {label: '是', value: ' > 0 '}, {label: '否', value: ' is null'}]
201
+ }
202
+ },
203
+ ready () {
204
+ asyncReadyGen(this)
205
+ },
206
+ methods: {
207
+ search () {
208
+ this.$refs.paged.$refs.cri.search()
209
+ },
210
+ async kp (row) {
211
+ let HttpReset = new HttpResetClass()
212
+ let _row = await HttpReset.load('POST', 'rs/sql/sale_getUser', {
213
+ data: {
214
+ orderitem: 'f_userinfo_code',
215
+ condition: `f_userinfo_code = '${row.f_userinfo_code}'`
216
+ }
217
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
218
+ this.row = _row.data[0]
219
+ this.row.id = row.id
220
+ this.invoice_show_gas = this.row.f_collection_type == '按气量' ? '' : ''
221
+ if (!this.row.f_taxpayer_id) {
222
+ this.row.f_taxpayer_id = this.row.f_idnumber
223
+ }
224
+ if (!this.row.f_paper_name) {
225
+ this.row.f_paper_name = this.row.f_user_name
226
+ }
227
+ if (!this.row.f_address_phone) {
228
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
229
+ }
230
+ if (!this.row.f_email) {
231
+ this.row.f_email = this.row.f_email
232
+ }
233
+ this.eticket_msg = true
234
+ },
235
+ async open_eTicket () {
236
+ if ([...new Set(this.selecteds.map(item => item.f_userinfo_code))].length > 1) {
237
+ this.$showAlert('所选择用户不是同一用户!!', 'warning', 2000)
238
+ return
239
+ }
240
+ if (this.selecteds.filter(item => item.is_bill === '是').length >= 1) {
241
+ // await this.$showMessage('选中的有已开过票得记录,确认开票吗?', ['confirm', 'cancel']).then(
242
+ // (response) => {
243
+ // if (response !== 'confirm') {
244
+ //
245
+ // }
246
+ // })
247
+ return this.$showAlert('已结算的记录不能再次结算开票','warning',3000)
248
+ }
249
+ let HttpReset = new HttpResetClass()
250
+ let row = await HttpReset.load('POST', 'rs/sql/sale_getUser', {
251
+ data: {
252
+ orderitem: 'f_userinfo_code',
253
+ condition: `f_userinfo_code = '${[...new Set(this.selecteds.map(item => item.f_userinfo_code))][0]}'`
254
+ }
255
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
256
+ this.row = row.data[0]
257
+ this.invoice_show_gas = this.row.f_collection_type == '按气量' ? '是' : '否'
258
+ if (!this.row.f_taxpayer_id) {
259
+ this.row.f_taxpayer_id = this.row.f_idnumber
260
+ }
261
+ if (!this.row.f_paper_name) {
262
+ this.row.f_paper_name = this.row.f_user_name
263
+ }
264
+ if (!this.row.f_address_phone) {
265
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
266
+ }
267
+ if(!this.row.f_email){
268
+ this.row.f_email = this.row.f_email
269
+ }
270
+ this.eticket_msg = true
271
+ },
272
+ confirm () {
273
+ this.eticket_msg = false
274
+ this.eticket_show = true
275
+ this.$refs.eticketbill.openETicket(this.row.id, this.row, '卡表收费')
276
+ },
277
+ selfSearch (args) {
278
+ this.selecteds = []
279
+ // let f_orgstr = this.orgCondtionStr
280
+ // args.condition = `${args.condition} ` + f_orgstr
281
+ this.model.search(args.condition, args.model)
282
+ },
283
+ eticket_toggle () {
284
+ this.eticket_show = false
285
+ this.search()
286
+ },
287
+ addOrRemove (is) {
288
+ this.selecteds = []
289
+ if (!is) { // 添加本页所有数据到ids中
290
+ this.model.rows.forEach((row) => {
291
+ this.selecteds.push(row)
292
+ })
293
+ this.selectAll = true
294
+ } else { // 从ids中取消所有的数据
295
+ this.model.rows.forEach((row, index) => {
296
+ if (index <= this.maxIndex) {
297
+ this.selecteds.push(row)
298
+ }
299
+ })
300
+ this.selectAll = false
301
+ }
302
+ },
303
+ checkbox (val, event) {
304
+ // this.selecteds = []
305
+ if (event.target.checked === true) {
306
+ // for (let i = 0; i <= val; i++) {
307
+ this.selecteds.push(this.model.rows[val])
308
+ // }
309
+ } else if (event.target.checked === false) {
310
+ // for (let i = 0; i <= val - 1; i++) {
311
+ this.selecteds.splice(this.selecteds.findIndex(item => item.id === this.model.rows[val].id), 1)
312
+ // }
313
+ }
314
+ this.selectAll = (this.selecteds.length === this.model.rows.length)
315
+ }
316
+ },
317
+ computed: {
318
+ getPayee () {
319
+ return this.$GetSaleParam.getPayee()
320
+ },
321
+ getReviewer () {
322
+ return this.$GetSaleParam.getReviewer()
323
+ },
324
+ getDrawer () {
325
+ return this.$GetSaleParam.getDrawer()
326
+ }
327
+ },
328
+ events: {
329
+ 'search' () {
330
+ this.search()
331
+ }
332
+ },
333
+ watch: {}
334
+ }
335
+ </script>