sale-client 3.5.194 → 3.5.195

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.194",
3
+ "version": "3.5.195",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- <template >
1
+ <template>
2
2
  <div class="flex" style="justify-content: space-between;">
3
3
  <div @keyup.enter="search" style="">
4
4
  <criteria-paged :model="model" v-ref:paged>
@@ -15,8 +15,8 @@
15
15
  v-model="model.f_start_date"
16
16
  ></datepicker>
17
17
  </div>
18
- <div class="col-sm-2 form-group" >
19
- <label class="font_normal_body" >结束时间</label>
18
+ <div class="col-sm-2 form-group">
19
+ <label class="font_normal_body">结束时间</label>
20
20
  <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_end_date"
21
21
  class="datepicker"
22
22
  condition="f_operate_date <= '{} 23:59:59' "
@@ -44,7 +44,9 @@
44
44
 
45
45
  <div style="float: right">
46
46
  <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
47
- <print-data :defaultfield="$parent.$parent.defaultfield" :field="$parent.$parent.fields" :is-selected="true" :model="$parent.$parent.printModel"
47
+ <print-data :defaultfield="$parent.$parent.defaultfield"
48
+ :field="$parent.$parent.isIot?$parent.$parent.iotFields:$parent.$parent.fields"
49
+ :is-selected="true" :model="$parent.$parent.printModel"
48
50
  @print-data="$parent.$parent.print()" print-name="购气流水"></print-data>
49
51
  </div>
50
52
  </div>
@@ -55,58 +57,104 @@
55
57
  <data-grid :model="model" class="list_area table_sy" partial='list' v-ref:grid>
56
58
  <template partial='head'>
57
59
  <tr>
58
- <th><nobr>收费类型</nobr></th>
59
- <th><nobr>收费区间</nobr></th>
60
+ <th>
61
+ <nobr>收费类型</nobr>
62
+ </th>
63
+ <th v-if="!$parent.$parent.$parent.isIot">
64
+ <nobr>收费区间</nobr>
65
+ </th>
60
66
 
61
- <th><nobr>表号</nobr></th>
62
- <th><nobr>上期指数</nobr></th>
63
- <th><nobr>本期指数</nobr></th>
64
- <th><nobr>气价</nobr></th>
65
- <th><nobr>气量</nobr></th>
66
- <th><nobr>气费金额</nobr></th>
67
- <th><nobr>滞纳金</nobr></th>
68
- <th><nobr>减免金额</nobr></th>
69
- <th><nobr>上期结余</nobr></th>
70
- <th><nobr>应交金额</nobr></th>
71
- <th><nobr>实收金额</nobr></th>
72
- <th><nobr>本期结余</nobr></th>
73
- <th><nobr>付款方式</nobr></th>
74
- <th><nobr>操作员</nobr></th>
75
- <th><nobr>缴费日期</nobr></th>
76
- <th><nobr>缴费时间</nobr></th>
77
- <th><nobr>缴费状态</nobr></th>
78
- <th><nobr>网点</nobr></th>
79
- <th><nobr>备注</nobr></th>
80
- <th><nobr>操作</nobr></th>
67
+ <th>
68
+ <nobr>表号</nobr>
69
+ </th>
70
+ <th v-if="!$parent.$parent.$parent.isIot">
71
+ <nobr>上期指数</nobr>
72
+ </th>
73
+ <th v-if="!$parent.$parent.$parent.isIot">
74
+ <nobr>本期指数</nobr>
75
+ </th>
76
+ <th>
77
+ <nobr>气价</nobr>
78
+ </th>
79
+ <th>
80
+ <nobr>气量</nobr>
81
+ </th>
82
+ <th>
83
+ <nobr>气费金额</nobr>
84
+ </th>
85
+ <th>
86
+ <nobr>滞纳金</nobr>
87
+ </th>
88
+ <th>
89
+ <nobr>减免金额</nobr>
90
+ </th>
91
+ <th>
92
+ <nobr>上期结余</nobr>
93
+ </th>
94
+ <th>
95
+ <nobr v-if="!$parent.$parent.$parent.isIot">应交金额</nobr>
96
+ </th>
97
+ <th>
98
+ <nobr>实收金额</nobr>
99
+ </th>
100
+ <th>
101
+ <nobr>本期结余</nobr>
102
+ </th>
103
+ <th>
104
+ <nobr>付款方式</nobr>
105
+ </th>
106
+ <th>
107
+ <nobr>操作员</nobr>
108
+ </th>
109
+ <th>
110
+ <nobr>缴费日期</nobr>
111
+ </th>
112
+ <th>
113
+ <nobr>缴费时间</nobr>
114
+ </th>
115
+ <th>
116
+ <nobr>缴费状态</nobr>
117
+ </th>
118
+ <th>
119
+ <nobr>网点</nobr>
120
+ </th>
121
+ <th>
122
+ <nobr>备注</nobr>
123
+ </th>
124
+ <th>
125
+ <nobr>操作</nobr>
126
+ </th>
81
127
  </tr>
82
128
  </template>
83
129
  <template partial='body' partial='list' v-ref:grid>
84
- <tr >
85
- <td style="text-align:center">{{row.type}}</td>
86
- <td style="text-align:center">{{row.f_hand_date}}</td>
130
+ <tr>
131
+ <td style="text-align:center">{{ row.type }}</td>
132
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{ row.f_hand_date }}</td>
87
133
 
88
- <td style="text-align:center">{{row.f_meternumber}}</td>
89
- <td style="text-align:center">{{row.f_last_tablebase}}</td>
90
- <td style="text-align:center">{{row.f_tablebase}}</td>
91
- <td style="text-align:center">{{row.f_price}}</td>
92
- <td style="text-align:center">{{row.f_pregas}}</td>
93
- <td style="text-align:center">{{row.f_preamount}}</td>
94
- <td style="text-align:center">{{row.f_delaypay}}</td>
95
- <td style="text-align:center">{{row.f_jianmian}}</td>
96
- <td style="text-align:center">{{row.f_balance}}</td>
97
- <td style="text-align:center">{{row.f_oughtfee}}</td>
98
- <td style="text-align:center">{{row.f_collection}}</td>
99
- <td style="text-align:center">{{row.f_curbalance}}</td>
100
- <td style="text-align:center">{{row.f_payment}}</td>
101
- <td style="text-align:center">{{row.f_operator}}</td>
102
- <td style="text-align:center">{{row.f_operate_date.substring(0,10)}}</td>
103
- <td style="text-align:center">{{row.f_operate_date.substring(11,19)}}</td>
104
- <td style="text-align:center">{{row.f_state}}</td>
105
- <td style="text-align:center">{{row.f_depname}}</td>
106
- <td style="text-align:center">{{row.f_comments}}</td>
134
+ <td style="text-align:center">{{ row.f_meternumber }}</td>
135
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{ row.f_last_tablebase }}</td>
136
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{ row.f_tablebase }}</td>
137
+ <td style="text-align:center">{{ row.f_price }}</td>
138
+ <td style="text-align:center">{{ row.f_pregas }}</td>
139
+ <td style="text-align:center">{{ row.f_preamount }}</td>
140
+ <td style="text-align:center">{{ row.f_delaypay }}</td>
141
+ <td style="text-align:center">{{ row.f_jianmian }}</td>
142
+ <td style="text-align:center">{{ row.f_balance }}</td>
143
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{ row.f_oughtfee }}</td>
144
+ <td style="text-align:center">{{ row.f_collection }}</td>
145
+ <td style="text-align:center">{{ row.f_curbalance }}</td>
146
+ <td style="text-align:center">{{ row.f_payment }}</td>
147
+ <td style="text-align:center">{{ row.f_operator }}</td>
148
+ <td style="text-align:center">{{ row.f_operate_date.substring(0, 10) }}</td>
149
+ <td style="text-align:center">{{ row.f_operate_date.substring(11, 19) }}</td>
150
+ <td style="text-align:center">{{ row.f_state }}</td>
151
+ <td style="text-align:center">{{ row.f_depname }}</td>
152
+ <td style="text-align:center">{{ row.f_comments }}</td>
107
153
  <td style="text-align:center">
108
- <button @click.stop="$parent.$parent.$parent.report(row)" class="btn btn-link" name="button" type="button"
109
- v-if="row.f_state==='有效'">票据补打</button>
154
+ <button @click.stop="$parent.$parent.$parent.report(row)" class="btn btn-link" name="button"
155
+ type="button"
156
+ v-if="row.f_state==='有效'">票据补打
157
+ </button>
110
158
  </td>
111
159
  </tr>
112
160
  </template>
@@ -120,255 +168,261 @@
120
168
  style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
121
169
  汇总信息
122
170
  </td>
123
- <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
124
- <!-- 气量合计:&emsp;{{model.sums.f_pregas}}-->
125
- <!-- </td>-->
126
- <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
127
- <!-- 金额合计:&emsp;{{model.sums.f_preamount}}-->
128
- <!-- </td>-->
129
- <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
130
- <!-- 应交合计:&emsp;{{model.sums.f_oughtfee}}-->
131
- <!-- </td>-->
171
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
172
+ <!-- 气量合计:&emsp;{{model.sums.f_pregas}}-->
173
+ <!-- </td>-->
174
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
175
+ <!-- 金额合计:&emsp;{{model.sums.f_preamount}}-->
176
+ <!-- </td>-->
177
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
178
+ <!-- 应交合计:&emsp;{{model.sums.f_oughtfee}}-->
179
+ <!-- </td>-->
132
180
  <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
133
- 实收合计:&emsp;{{model.sums.f_collection}}
181
+ 实收合计:&emsp;{{ model.sums.f_collection }}
134
182
  </td>
135
183
  </tr>
136
184
  </table>
137
- <reissue-bill :data="reissue_data" :show.sync="reissue_show" @cancel="reissueOper()" @reissue-success="reissueSucc()" v-if="reissue_show"></reissue-bill>
185
+ <reissue-bill :data="reissue_data" :show.sync="reissue_show" @cancel="reissueOper()"
186
+ @reissue-success="reissueSucc()" v-if="reissue_show"></reissue-bill>
138
187
 
139
188
  </div>
140
189
  </template>
141
190
 
142
191
  <script>
143
- import {HttpResetClass, PagedList} from 'vue-client'
144
- import co from 'co'
145
- let reprintGen = function * (self, row) {
146
- try {
147
- let reissueData = {}
148
- reissueData = Object.assign({}, reissueData, row)
192
+ import {HttpResetClass, PagedList} from 'vue-client'
193
+ import co from 'co'
149
194
 
150
- reissueData.f_bill_type = row.type
151
- reissueData.f_bill_style = '普通收据'
152
- reissueData.f_operator = self.$login.f.name
153
- reissueData.f_operatorid = self.$login.f.id
154
- reissueData.f_orgid = self.$login.f.orgid
155
- reissueData.f_orgname = self.$login.f.orgs
156
- reissueData.f_depid = self.$login.f.depids
157
- reissueData.f_depname = self.$login.f.deps
158
- reissueData.billUrl = self.getBillUrl(row.type)
195
+ let reprintGen = function* (self, row) {
196
+ try {
197
+ let reissueData = {}
198
+ reissueData = Object.assign({}, reissueData, row)
159
199
 
160
- self.reissue_data = reissueData
161
- self.reissue_show = true
162
- } catch (error) {
163
- if (error.status) {
164
- self.$warn(`加载数据出错, ${JSON.stringify(error)}`, 'CardList')
165
- }
166
- throw error
200
+ reissueData.f_bill_type = row.type
201
+ reissueData.f_bill_style = '普通收据'
202
+ reissueData.f_operator = self.$login.f.name
203
+ reissueData.f_operatorid = self.$login.f.id
204
+ reissueData.f_orgid = self.$login.f.orgid
205
+ reissueData.f_orgname = self.$login.f.orgs
206
+ reissueData.f_depid = self.$login.f.depids
207
+ reissueData.f_depname = self.$login.f.deps
208
+ reissueData.billUrl = self.getBillUrl(row.type)
209
+
210
+ self.reissue_data = reissueData
211
+ self.reissue_show = true
212
+ } catch (error) {
213
+ if (error.status) {
214
+ self.$warn(`加载数据出错, ${JSON.stringify(error)}`, 'CardList')
167
215
  }
216
+ throw error
168
217
  }
169
- export default {
170
- title: '收费',
171
- data () {
172
- return {
173
- reissue_show: false,
174
- reissue_data: null,
175
- condition: '1=1',
176
- model: new PagedList('rs/sql/sale_ChargeQuery', 20, {f_user_id: this.row.f_user_id}, {
177
- f_preamount: 0,
178
- f_pregas: 0,
179
- f_oughtfee: 0,
180
- f_collection: 0
181
- }),
182
- show: false,
183
- list: [],
184
- jiaofeistates: this.$appdata.getParam('缴费状态') ? [{
185
- label: '全部',
186
- value: ''
187
- }, ...this.$appdata.getParam('缴费状态')] : [],
188
- types: this.$appdata.getParam('收费类型') ? [{
189
- label: '全部',
190
- value: ''
191
- }, ...this.$appdata.getParam('收费类型')] : [],
192
- // 控制单选
193
- radio: [],
194
- // 选中的页
195
- all: [],
196
- // row数据
197
- rowsdata: [],
198
- fields: {
199
- 'f_userinfo_code': '客户编号',
200
- 'f_user_name': '客户姓名',
201
- 'f_preamount': '购气金额',
202
- 'f_pregas': '购气量',
203
- 'f_hand_date': '收费区间',
204
- 'f_operate_date': '缴费时间',
205
- 'f_operator': '操作员',
206
- 'f_last_tablebase': '上期指数',
207
- 'f_tablebase': '本期指数',
208
- 'f_comments': '备注'
209
- },
210
- defaultfield: [
211
- 'f_userinfo_code',
212
- 'f_user_name',
213
- 'f_preamount',
214
- 'f_pregas',
215
- 'f_hand_date',
216
- 'f_operate_date',
217
- 'f_operator',
218
- 'f_last_tablebase',
219
- 'f_tablebase',
220
- 'f_comments'
221
- ],
222
- printModel: {
223
- rows: []
218
+ }
219
+ export default {
220
+ title: '收费',
221
+ data () {
222
+ return {
223
+ reissue_show: false,
224
+ reissue_data: null,
225
+ condition: '1=1',
226
+ model: new PagedList(`${this.row.f_meter_type === '物联网表' ? 'rs/sql/sale_WebChargeQuery' : 'rs/sql/sale_ChargeQuery'}`, 20, {f_user_id: this.row.f_user_id}, {
227
+ f_collection: 0
228
+ }),
229
+ isIot: this.row.f_meter_type === '物联网表',
230
+ show: false,
231
+ list: [],
232
+ jiaofeistates: this.$appdata.getParam('缴费状态') ? [{
233
+ label: '全部',
234
+ value: ''
235
+ }, ...this.$appdata.getParam('缴费状态')] : [],
236
+ types: this.$appdata.getParam('收费类型') ? [{
237
+ label: '全部',
238
+ value: ''
239
+ }, ...this.$appdata.getParam('收费类型')] : [],
240
+ // 控制单选
241
+ radio: [],
242
+ // 选中的页
243
+ all: [],
244
+ // row数据
245
+ rowsdata: [],
246
+ fields: {
247
+ 'f_userinfo_code': '客户编号',
248
+ 'f_user_name': '客户姓名',
249
+ 'f_preamount': '购气金额',
250
+ 'f_pregas': '购气量',
251
+ 'f_hand_date': '收费区间',
252
+ 'f_operate_date': '缴费时间',
253
+ 'f_operator': '操作员',
254
+ 'f_last_tablebase': '上期指数',
255
+ 'f_tablebase': '本期指数',
256
+ 'f_comments': '备注'
257
+ },
258
+ iotFields: {
259
+ 'f_userinfo_code': '客户编号',
260
+ 'f_user_name': '客户姓名',
261
+ 'f_preamount': '购气金额',
262
+ 'f_pregas': '购气量',
263
+ 'f_operate_date': '缴费时间',
264
+ 'f_operator': '操作员',
265
+ 'f_comments': '备注'
266
+ },
267
+ defaultfield: [
268
+ 'f_userinfo_code',
269
+ 'f_user_name',
270
+ 'f_preamount',
271
+ 'f_pregas',
272
+ 'f_operate_date',
273
+ 'f_operator',
274
+ 'f_comments'
275
+ ],
276
+ printModel: {
277
+ rows: []
278
+ }
279
+ }
280
+ },
281
+ props: ['row'],
282
+ ready () {
283
+ this.$refs.paged.$refs.criteria.model.f_state = ['有效']
284
+ this.$refs.paged.$refs.criteria.model.f_user_id = this.row.f_user_id
285
+ this.$refs.paged.$refs.criteria.search()
286
+ },
287
+ methods: {
288
+ async search () {
289
+ console.log('aaa:', this.$refs.paged.$refs.criteria.condition)
290
+ this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_user_id = '${this.row.f_user_id}' and f_orgid = '${this.$login.f.orgid}'`
291
+ this.model.search(this.condition, this.model)
292
+ let http = new HttpResetClass()
293
+ let res = await http.load('POST', `${this.row.f_meter_type === '物联网表' ? 'rs/sql/sale_WebChargeQuery' : 'rs/sql/sale_ChargeQuery'}`, {
294
+ data: {
295
+ condition: this.condition,
296
+ f_user_id: this.row.f_user_id
224
297
  }
298
+ }, {resolveMsg: null, rejectMsg: null})
299
+ this.printModel.rows = res.data
300
+ },
301
+ // 多选框初始化
302
+ selectInit () {
303
+ this.rowsdata = []
304
+ this.all = []
305
+ this.radio = []
306
+ },
307
+ reissueSucc () {
308
+ this.reissue_show = false
309
+ this.$dispatch('refresh')
310
+ },
311
+ reissueOper () {
312
+ this.reissue_data = null
313
+ this.reissue_show = false
314
+ },
315
+ getBillUrl (type) {
316
+ let name = ''
317
+ // 根据type数据 选择调用的Logic
318
+ if (type === '机表收费') {
319
+ name = 'rs/report/machine_bill'
320
+ } else if (type === '物联网收费') {
321
+ name = 'rs/report/iot_bill'
322
+ } else if (type === '超用收费') {
323
+ name = 'rs/report/overuse_bill'
324
+ } else if (type === '其他收费') {
325
+ name = 'rs/report/otherCharge_bill'
326
+ } else if (type === '发卡售气') {
327
+ name = 'rs/report/sendCard_bill'
328
+ } else if (type === '卡表收费') {
329
+ name = 'rs/report/card_bill'
330
+ } else if (type === '预存缴费') {
331
+ name = 'rs/report/pre_sell'
225
332
  }
333
+ return name
226
334
  },
227
- props: ['row'],
228
- ready () {
229
- this.$refs.paged.$refs.criteria.model.f_state = ['有效']
230
- this.$refs.paged.$refs.criteria.model.f_user_id = this.row.f_user_id
231
- this.$refs.paged.$refs.criteria.search()
335
+ report (row) {
336
+ let reprint = reprintGen(this, row)
337
+ return co(reprint)
232
338
  },
233
- methods: {
234
- async search () {
235
- console.log('aaa:', this.$refs.paged.$refs.criteria.condition)
236
- this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_user_id = '${this.row.f_user_id}' and f_orgid = '${this.$login.f.orgid}'`
237
- this.model.search(this.condition, this.model)
238
- let http = new HttpResetClass()
239
- let res = await http.load('POST', 'rs/sql/sale_ChargeQuery', {
240
- data: {
241
- condition: this.condition,
242
- f_user_id: this.row.f_user_id
243
- }
244
- }, {resolveMsg: null, rejectMsg: null})
245
- this.printModel.rows = res.data
246
- },
247
- // 多选框初始化
248
- selectInit () {
249
- this.rowsdata = []
250
- this.all = []
251
- this.radio = []
252
- },
253
- reissueSucc () {
254
- this.reissue_show = false
255
- this.$dispatch('refresh')
256
- },
257
- reissueOper () {
258
- this.reissue_data = null
259
- this.reissue_show = false
260
- },
261
- getBillUrl (type) {
262
- let name = ''
263
- // 根据type数据 选择调用的Logic
264
- if (type === '机表收费') {
265
- name = 'rs/report/machine_bill'
266
- } else if (type === '物联网收费') {
267
- name = 'rs/report/iot_bill'
268
- } else if (type === '超用收费') {
269
- name = 'rs/report/overuse_bill'
270
- } else if (type === '其他收费') {
271
- name = 'rs/report/otherCharge_bill'
272
- } else if (type === '发卡售气') {
273
- name = 'rs/report/sendCard_bill'
274
- } else if (type === '卡表收费') {
275
- name = 'rs/report/card_bill'
276
- } else if (type === '预存缴费') {
277
- name = 'rs/report/pre_sell'
278
- }
279
- return name
280
- },
281
- report (row) {
282
- let reprint = reprintGen(this, row)
283
- return co(reprint)
284
- },
285
- print () {
286
- this.selectInit()
287
- },
288
- select () {
289
- let index = this.model.pageIndex - 1
290
- if (!this.radio[index]) {
291
- this.radio.$set(index, [])
292
- }
293
- if (this.all[index]) {
294
- // 数据
295
- this.rowsdata[index] = Object.assign([], this.model.rows)
296
- // 勾选
297
- for (var i = 0; i < this.model.rows.length; i++) {
298
- this.radio[index].$set(i, true)
299
- }
300
- } else {
301
- // 数据
302
- this.rowsdata[index] = []
303
- // 不勾选
304
- for (var i = 0; i < this.model.rows.length; i++) {
305
- this.radio[index].$set(i, false)
306
- }
339
+ print () {
340
+ this.selectInit()
341
+ },
342
+ select () {
343
+ let index = this.model.pageIndex - 1
344
+ if (!this.radio[index]) {
345
+ this.radio.$set(index, [])
346
+ }
347
+ if (this.all[index]) {
348
+ // 数据
349
+ this.rowsdata[index] = Object.assign([], this.model.rows)
350
+ // 勾选
351
+ for (var i = 0; i < this.model.rows.length; i++) {
352
+ this.radio[index].$set(i, true)
307
353
  }
308
- let z = 0
309
- for (let i = 0; i < this.all.length; i++) {
310
- for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
311
- this.printModel.rows[z++] = this.rowsdata[i][j]
312
- }
354
+ } else {
355
+ // 数据
356
+ this.rowsdata[index] = []
357
+ // 不勾选
358
+ for (var i = 0; i < this.model.rows.length; i++) {
359
+ this.radio[index].$set(i, false)
313
360
  }
314
- },
315
- selectOne (event, row, i) {
316
- let index = this.model.pageIndex - 1
317
- if (!this.rowsdata[index]) {
318
- this.rowsdata[index] = []
361
+ }
362
+ let z = 0
363
+ for (let i = 0; i < this.all.length; i++) {
364
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
365
+ this.printModel.rows[z++] = this.rowsdata[i][j]
319
366
  }
320
- if (!this.radio[index]) {
321
- this.radio.$set(index, [])
367
+ }
368
+ },
369
+ selectOne (event, row, i) {
370
+ let index = this.model.pageIndex - 1
371
+ if (!this.rowsdata[index]) {
372
+ this.rowsdata[index] = []
373
+ }
374
+ if (!this.radio[index]) {
375
+ this.radio.$set(index, [])
376
+ }
377
+ if (event.target.checked) {
378
+ // 数据
379
+ this.rowsdata[index][i] = row
380
+ // 勾选
381
+ this.radio[index].$set(i, true)
382
+ // 判断是否全部选中
383
+ var allState = true
384
+ if (this.model.rows.length != this.radio[index].length) {
385
+ allState = false
322
386
  }
323
- if (event.target.checked) {
324
- // 数据
325
- this.rowsdata[index][i] = row
326
- // 勾选
327
- this.radio[index].$set(i, true)
328
- // 判断是否全部选中
329
- var allState = true
330
- if (this.model.rows.length != this.radio[index].length) {
387
+ for (var state of this.radio[index]) {
388
+ if (!state) {
331
389
  allState = false
332
390
  }
333
- for (var state of this.radio[index]) {
334
- if (!state) {
335
- allState = false
336
- }
337
- }
338
- if (allState) {
339
- this.all.$set(index, true)
340
- } else {
341
- this.all.$set(index, false)
342
- }
391
+ }
392
+ if (allState) {
393
+ this.all.$set(index, true)
343
394
  } else {
344
- // 数据
345
- this.rowsdata[index][i] = []
346
- // 不勾选
347
- this.radio[index].$set(i, false)
348
- // 任意取消一个则全选状态设为false
349
395
  this.all.$set(index, false)
350
396
  }
351
- let z = 0
352
- this.printModel.rows = []
353
- for (let i = 0; i < this.all.length; i++) {
354
- for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
355
- if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
356
- this.printModel.rows[z++] = this.rowsdata[i][j]
357
- }
397
+ } else {
398
+ // 数据
399
+ this.rowsdata[index][i] = []
400
+ // 不勾选
401
+ this.radio[index].$set(i, false)
402
+ // 任意取消一个则全选状态设为false
403
+ this.all.$set(index, false)
404
+ }
405
+ let z = 0
406
+ this.printModel.rows = []
407
+ for (let i = 0; i < this.all.length; i++) {
408
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
409
+ if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
410
+ this.printModel.rows[z++] = this.rowsdata[i][j]
358
411
  }
359
412
  }
360
413
  }
361
- },
362
- computed: {
363
- ischecked () {
364
- return function (index, i) {
365
- if (!this.radio[index]) {
366
- return false
367
- }
368
- return this.radio[index][i]
414
+ }
415
+ },
416
+ computed: {
417
+ ischecked () {
418
+ return function (index, i) {
419
+ if (!this.radio[index]) {
420
+ return false
369
421
  }
422
+ return this.radio[index][i]
370
423
  }
371
424
  }
372
425
  }
426
+ }
373
427
  </script>
374
428