sale-client 4.0.113 → 4.0.115

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.
@@ -0,0 +1,2 @@
1
+ #Wed Jan 22 10:06:39 CST 2025
2
+ gradle.version=5.2.1
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.0.113",
3
+ "version": "4.0.115",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -29,6 +29,11 @@
29
29
 
30
30
  <div style="float: right">
31
31
  <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
32
+ <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
33
+ :field="$parent.$parent.fields" :header="$parent.$parent.other"
34
+ sqlurl="rs/logic/saleExport" sql-name="sale_cardhandplanQuery" template-name='抄表查询导出'
35
+ :choose-col="true" ref="salehandplanExport"></export-excel>
36
+
32
37
  <print-data :defaultfield="$parent.$parent.defaultfield" :field="$parent.$parent.fields" :is-selected="true" :model="$parent.$parent.printModel"
33
38
  @print-data="$parent.$parent.print()" print-name="其他收费流水"></print-data>
34
39
  </div>
@@ -124,145 +129,180 @@
124
129
  </template>
125
130
 
126
131
  <script>
127
- import {HttpResetClass, PagedList} from 'vue-client'
132
+ import {HttpResetClass, PagedList} from 'vue-client'
128
133
 
129
- export default {
130
- title: '抄表',
134
+ export default {
135
+ title: '抄表',
131
136
 
132
- data () {
133
- return {
134
- condition: '1=1',
135
- model: new PagedList('api/af-revenue/sql/sale_cardhandplanQuery', 20, {}),
136
- // 控制单选
137
- radio: [],
138
- showdetail: false,
139
- otherchargeid: '',
140
- // 选中的页
141
- all: [],
142
- // row数据
143
- rowsdata: [],
144
- searchValue: this.$appdata.getSingleValue('综合条件查询') ? this.$appdata.getSingleValue('综合条件查询') : 'f_userfiles_id',
145
- fields: {'f_userinfo_code': '客户编号', 'f_user_name': '客户姓名', 'f_meternumber': '表号', 'f_last_tablebase': '上期底数', 'f_tablebase': '本期底数', 'f_real_amount': '用气量', 'f_real_amount': '补差气量', 'f_change_price': '补差单价', 'f_real_fee': '补差金额', 'f_hand_date': '录入日期', 'f_inputtor': '抄表员', 'f_meter_state': '抄表状态', 'f_operator': '操作人'},
146
- defaultfield: [
147
- 'f_userinfo_code', 'f_user_name', 'f_meternumber', 'f_last_tablebase', 'f_tablebase', 'f_real_amount', 'f_real_amount', 'f_change_price', 'f_change_price', 'f_real_fee', 'f_hand_date', 'f_inputtor', 'f_meter_state', 'f_inputtor', 'f_operator'
148
- ],
149
- printModel: {
150
- rows: []
151
- }
137
+ data () {
138
+ return {
139
+ condition: '1=1',
140
+ getfields: {},
141
+ model: new PagedList('api/af-revenue/sql/sale_cardhandplanQuery', 20, {}),
142
+ // 控制单选
143
+ radio: [],
144
+ showdetail: false,
145
+ otherchargeid: '',
146
+ // 选中的页
147
+ all: [],
148
+ // row数据
149
+ rowsdata: [],
150
+ searchValue: this.$appdata.getSingleValue('综合条件查询') ? this.$appdata.getSingleValue('综合条件查询') : 'f_userfiles_id',
151
+ fields: {'f_userinfo_code': '客户编号', 'f_user_name': '客户姓名', 'f_meternumber': '表号', 'f_last_tablebase': '上期底数', 'f_tablebase': '本期底数', 'f_real_amount': '用气量', 'f_real_amount': '补差气量', 'f_change_price': '补差单价', 'f_real_fee': '补差金额', 'f_hand_date': '录入日期', 'f_inputtor': '抄表员', 'f_meter_state': '抄表状态', 'f_operator': '操作人'},
152
+ defaultfield: [
153
+ 'f_userinfo_code', 'f_user_name', 'f_meternumber', 'f_last_tablebase', 'f_tablebase', 'f_real_amount', 'f_real_amount', 'f_change_price', 'f_change_price', 'f_real_fee', 'f_hand_date', 'f_inputtor', 'f_meter_state', 'f_inputtor', 'f_operator'
154
+ ],
155
+ printModel: {
156
+ rows: []
157
+ },
158
+ other: [],
159
+ footer: [],
160
+ // 合计数据
161
+ sumsmodel: {}
162
+ }
163
+ },
164
+ props: ['row'],
165
+ ready () {
166
+ this.$refs.paged.$refs.criteria.search()
167
+ },
168
+ methods: {
169
+ getotherfooter () {
170
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
171
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
172
+ this.other = []
173
+ this.footer = []
174
+ // let exportdata = this.getCondition;
175
+ let otherInData = []
176
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
177
+ let footerData = [], exportfield = this.getfields
178
+ footerData.push('合计')
179
+ let self = this
180
+ for (var field in self.sumsmodel) {
181
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`)
152
182
  }
183
+ this.footer.push(footerData)
184
+ this.other.push(otherInData)
153
185
  },
154
- props: ['row'],
155
- ready () {
156
- this.$refs.paged.$refs.criteria.search()
157
- },
158
- methods: {
159
- async search () {
160
- this.condition = `${this.$refs.paged.$refs.criteria.condition} and ${this.searchValue} = '${this.row[this.searchValue]}' `
161
- this.model.search(this.condition, this.model)
162
- let http = new HttpResetClass()
163
- let res = await http.load('POST', 'api/af-revenue/sql/sale_cardhandplanQuery', {
164
- data: {
165
- condition: this.condition
166
- }
167
- }, {resolveMsg: null, rejectMsg: null})
168
- this.printModel.rows = res.data
169
- },
170
- // 多选框初始化
171
- selectInit () {
172
- this.rowsdata = []
173
- this.all = []
174
- this.radio = []
175
- },
176
- print () {
177
- this.selectInit()
178
- },
179
- select () {
180
- let index = this.model.pageIndex - 1
181
- if (!this.radio[index]) {
182
- this.radio.$set(index, [])
186
+ async search () {
187
+ this.condition = `${this.$refs.paged.$refs.criteria.condition} and ${this.searchValue} = '${this.row[this.searchValue]}' `
188
+ this.model.search(this.condition, this.model)
189
+ let http = new HttpResetClass()
190
+ let res = await http.load('POST', 'api/af-revenue/sql/sale_cardhandplanQuery', {
191
+ data: {
192
+ condition: this.condition
183
193
  }
184
- if (this.all[index]) {
185
- // 数据
186
- this.rowsdata[index] = Object.assign([], this.model.rows)
187
- // 勾选
188
- for (var i = 0; i < this.model.rows.length; i++) {
189
- this.radio[index].$set(i, true)
190
- }
191
- } else {
192
- // 数据
193
- this.rowsdata[index] = []
194
- // 不勾选
195
- for (var i = 0; i < this.model.rows.length; i++) {
196
- this.radio[index].$set(i, false)
197
- }
194
+ }, {resolveMsg: null, rejectMsg: null})
195
+ this.printModel.rows = res.data
196
+ },
197
+ // 多选框初始化
198
+ selectInit () {
199
+ this.rowsdata = []
200
+ this.all = []
201
+ this.radio = []
202
+ },
203
+ print () {
204
+ this.selectInit()
205
+ },
206
+ select () {
207
+ let index = this.model.pageIndex - 1
208
+ if (!this.radio[index]) {
209
+ this.radio.$set(index, [])
210
+ }
211
+ if (this.all[index]) {
212
+ // 数据
213
+ this.rowsdata[index] = Object.assign([], this.model.rows)
214
+ // 勾选
215
+ for (var i = 0; i < this.model.rows.length; i++) {
216
+ this.radio[index].$set(i, true)
198
217
  }
199
- let z = 0
200
- for (let i = 0; i < this.all.length; i++) {
201
- for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
202
- this.printModel.rows[z++] = this.rowsdata[i][j]
203
- }
218
+ } else {
219
+ // 数据
220
+ this.rowsdata[index] = []
221
+ // 不勾选
222
+ for (var i = 0; i < this.model.rows.length; i++) {
223
+ this.radio[index].$set(i, false)
204
224
  }
205
- },
206
- selectOne (event, row, i) {
207
- let index = this.model.pageIndex - 1
208
- if (!this.rowsdata[index]) {
209
- this.rowsdata[index] = []
225
+ }
226
+ let z = 0
227
+ for (let i = 0; i < this.all.length; i++) {
228
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
229
+ this.printModel.rows[z++] = this.rowsdata[i][j]
210
230
  }
211
- if (!this.radio[index]) {
212
- this.radio.$set(index, [])
231
+ }
232
+ },
233
+ selectOne (event, row, i) {
234
+ let index = this.model.pageIndex - 1
235
+ if (!this.rowsdata[index]) {
236
+ this.rowsdata[index] = []
237
+ }
238
+ if (!this.radio[index]) {
239
+ this.radio.$set(index, [])
240
+ }
241
+ if (event.target.checked) {
242
+ // 数据
243
+ this.rowsdata[index][i] = row
244
+ // 勾选
245
+ this.radio[index].$set(i, true)
246
+ // 判断是否全部选中
247
+ var allState = true
248
+ if (this.model.rows.length != this.radio[index].length) {
249
+ allState = false
213
250
  }
214
- if (event.target.checked) {
215
- // 数据
216
- this.rowsdata[index][i] = row
217
- // 勾选
218
- this.radio[index].$set(i, true)
219
- // 判断是否全部选中
220
- var allState = true
221
- if (this.model.rows.length != this.radio[index].length) {
251
+ for (var state of this.radio[index]) {
252
+ if (!state) {
222
253
  allState = false
223
254
  }
224
- for (var state of this.radio[index]) {
225
- if (!state) {
226
- allState = false
227
- }
228
- }
229
- if (allState) {
230
- this.all.$set(index, true)
231
- } else {
232
- this.all.$set(index, false)
233
- }
255
+ }
256
+ if (allState) {
257
+ this.all.$set(index, true)
234
258
  } else {
235
- // 数据
236
- this.rowsdata[index][i] = []
237
- // 不勾选
238
- this.radio[index].$set(i, false)
239
- // 任意取消一个则全选状态设为false
240
259
  this.all.$set(index, false)
241
260
  }
242
- let z = 0
243
- this.printModel.rows = []
244
- for (let i = 0; i < this.all.length; i++) {
245
- for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
246
- if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
247
- this.printModel.rows[z++] = this.rowsdata[i][j]
248
- }
261
+ } else {
262
+ // 数据
263
+ this.rowsdata[index][i] = []
264
+ // 不勾选
265
+ this.radio[index].$set(i, false)
266
+ // 任意取消一个则全选状态设为false
267
+ this.all.$set(index, false)
268
+ }
269
+ let z = 0
270
+ this.printModel.rows = []
271
+ for (let i = 0; i < this.all.length; i++) {
272
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
273
+ if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
274
+ this.printModel.rows[z++] = this.rowsdata[i][j]
249
275
  }
250
276
  }
251
- },
252
- showchargedetail (row) {
253
- this.showdetail = true
254
- this.otherchargeid = row.id
255
277
  }
256
278
  },
257
- computed: {
258
- ischecked () {
259
- return function (index, i) {
260
- if (!this.radio[index]) {
261
- return false
262
- }
263
- return this.radio[index][i]
279
+ showchargedetail (row) {
280
+ this.showdetail = true
281
+ this.otherchargeid = row.id
282
+ }
283
+ },
284
+ computed: {
285
+ ischecked () {
286
+ return function (index, i) {
287
+ if (!this.radio[index]) {
288
+ return false
264
289
  }
290
+ return this.radio[index][i]
265
291
  }
292
+ },
293
+ getCondition () {
294
+ return {
295
+ condition: this.condition
296
+ }
297
+ }
298
+ },
299
+ watch: {
300
+ sumsmodel: {
301
+ handler: function (val) {
302
+ this.getotherfooter()
303
+ },
304
+ deep: true
266
305
  }
267
306
  }
307
+ }
268
308
  </script>
@@ -52,11 +52,16 @@
52
52
 
53
53
  <div style="float: right">
54
54
  <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
55
+ <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
56
+ :field="$parent.$parent.fields" :header="$parent.$parent.other"
57
+ sqlurl="rs/logic/saleExport" :sql-name="$parent.$parent.sqlname" template-name='抄表查询导出'
58
+ :choose-col="true" ref="salehandplanExport"></export-excel>
59
+
55
60
  <print-data :defaultfield="$parent.$parent.defaultfield" :field="$parent.$parent.fields" :is-selected="true" :model="$parent.$parent.printModel"
56
61
  @print-data="$parent.$parent.print()"
57
62
  :starthead="$parent.$parent.starthead"
58
63
  titletable="预存气费打印明细"
59
- ></print-data>
64
+ ></print-data>
60
65
  </div>
61
66
  </div>
62
67
 
@@ -94,16 +99,16 @@
94
99
  </template>
95
100
  <template partial='body' partial='list' v-ref:grid>
96
101
  <tr>
97
- <td style="text-align:center" v-show="false">{{row.f_hand_date.substring(0,7)}}</td>
102
+ <td style="text-align:center" v-show="false">{{row.f_hand_date.substring(0,7)}}</td>
98
103
  <th v-show="false"><nobr >{{row.datas}}</nobr></th>
99
104
  <td style="text-align:center">{{row.f_hand_date}}</td>
100
105
  <td style="text-align:center">{{row.f_input_date}}</td>
101
106
  <td style="text-align:center">{{row.f_last_tablebase}}</td>
102
107
  <td style="text-align:center">{{row.f_tablebase}}</td>
103
- <td style="text-align:center">{{row.f_balance}}</td>
108
+ <td style="text-align:center">{{row.f_balance}}</td>
104
109
  <td style="text-align:center">{{row.f_oughtamount}}</td>
105
110
  <td style="text-align:center">{{row.f_oughtfee}}</td>
106
- <td style="text-align:center">{{row.f_curbalance}}</td>
111
+ <td style="text-align:center">{{row.f_curbalance}}</td>
107
112
  <td style="text-align:center" v-if="!row.f_meter_type.includes('物联网表')">{{row.f_whether_pay}}</td>
108
113
  <td style="text-align:center" v-if="!f_calculation.includes('表端结算')">{{row.f_stair1price}}</td>
109
114
  <td style="text-align:center" v-if="!f_calculation.includes('表端结算')">{{row.f_stairamount1}}</td>
@@ -115,7 +120,7 @@
115
120
  <td style="text-align:center">{{row.f_result_state?row.f_result_state:''}}</td>
116
121
  <td style="text-align:center">{{row.f_hand_state}}</td>
117
122
  <td style="text-align:center">{{row.f_inputtor}}</td>
118
- <td style="text-align:center">{{row.f_input_person}}</td>
123
+ <td style="text-align:center">{{row.f_input_person}}</td>
119
124
  </tr>
120
125
  </template>
121
126
  <template partial='foot'></template>
@@ -160,209 +165,247 @@
160
165
  </template>
161
166
 
162
167
  <script>
163
- import {HttpResetClass, PagedList} from 'vue-client'
168
+ import {HttpResetClass, PagedList} from 'vue-client'
164
169
 
165
- export default {
166
- title: '抄表',
167
- data () {
168
- return {
169
- condition: '1=1',
170
- model: new PagedList(`${this.row.f_meter_type === '物联网表'?'api/af-revenue/sql/sale_WebHandplanQuery':'api/af-revenue/sql/sale_HandplanQuery'}`, 20, {f_user_id: this.row.f_user_id}, {
171
- f_oughtfee: 0,
172
- f_oughtamount: 0,
173
- f_stairamount1: 0,
174
- f_stair1fee: 0,
175
- f_stair2amount: 0,
176
- f_stair2fee: 0,
177
- f_stair3amount: 0,
178
- f_stair3fee: 0
179
- }),
180
- show: false,
181
- f_calculation: '',
182
- lists: [],
183
- meterstates: this.$appdata.getParam('抄表状态') ? [{
184
- label: '全部',
185
- value: ''
186
- }, ...this.$appdata.getParam('抄表状态')] : [],
187
- handstates: this.$appdata.getParam('表单状态') ? [{
188
- label: '全部',
189
- value: ''
190
- }, ...this.$appdata.getParam('表单状态')] : [],
191
- // 控制单选
192
- radio: [],
193
- // 选中的页
194
- all: [],
195
- // row数据
196
- rowsdata: [],
197
- searchValue: this.$appdata.getSingleValue('综合条件查询') ? this.$appdata.getSingleValue('综合条件查询') : 'f_userfiles_id',
198
- starthead: '',
199
- fields: {'f_userinfo_code': '用户编号',
200
- 'f_user_name': '姓名',
201
- 'f_last_tablebase': '上期底数',
202
- 'f_tablebase': '本期底数',
203
- 'f_balance': '上期余额',
204
- 'f_curbalance': '本期余额',
205
- 'f_oughtamount': '用气量',
206
- 'f_oughtfee': '用气金额',
207
- 'f_detailprice': '结算明细',
208
- 'datas': '用气周期',
209
- 'money1': '违约金',
210
- 'f_stair1price': '一阶单价',
211
- 'f_stairamount1': '一阶用量',
212
- 'f_stair2price': '二阶单价',
213
- 'f_stair2amount': '二阶用量',
214
- 'f_stair3price': '三阶单价',
215
- 'f_stair3amount': '三阶用量',
216
- 'f_oughtfee1': '应交金额',
217
- 'f_inputtor': '抄表员',
218
- 'f_input_date': '抄表日期',
219
- 'f_whether_pay': '是否缴费',
220
- 'f_hand_date': '录入时间'},
221
- defaultfield: [
222
- 'datas', 'f_last_tablebase', 'f_last_tablebase', 'f_oughtamount', 'f_oughtfee', 'f_oughtfee1', 'money1', 'price1'
223
- ],
224
- fooinfo: [
225
- '单位',
226
- '收款人'
227
- ],
228
- printModel: {
229
- rows: []
230
- }
231
- }
232
- },
233
- props: ['row'],
234
- ready () {
235
- this.$refs.paged.$refs.criteria.model.f_hand_state = ['有效']
236
- this.f_calculation = this.row.f_calculation
237
- this.$refs.paged.$refs.criteria.search()
238
- // this.sumgasandmoney= this.$refs.paged.$refs.grid.model.sums
239
- for (let i in this.all) {
240
- this.money += i.f_oughtamount
241
- this.gas += i.f_oughtfee
170
+ export default {
171
+ title: '抄表',
172
+ data () {
173
+ return {
174
+ condition: '1=1',
175
+ model: new PagedList(`${this.row.f_meter_type === '物联网表'?'api/af-revenue/sql/sale_WebHandplanQuery':'api/af-revenue/sql/sale_HandplanQuery'}`, 20, {f_user_id: this.row.f_user_id}, {
176
+ f_oughtfee: 0,
177
+ f_oughtamount: 0,
178
+ f_stairamount1: 0,
179
+ f_stair1fee: 0,
180
+ f_stair2amount: 0,
181
+ f_stair2fee: 0,
182
+ f_stair3amount: 0,
183
+ f_stair3fee: 0
184
+ }),
185
+ show: false,
186
+ f_calculation: '',
187
+ lists: [],
188
+ meterstates: this.$appdata.getParam('抄表状态') ? [{
189
+ label: '全部',
190
+ value: ''
191
+ }, ...this.$appdata.getParam('抄表状态')] : [],
192
+ handstates: this.$appdata.getParam('表单状态') ? [{
193
+ label: '全部',
194
+ value: ''
195
+ }, ...this.$appdata.getParam('表单状态')] : [],
196
+ // 控制单选
197
+ radio: [],
198
+ // 选中的页
199
+ all: [],
200
+ // row数据
201
+ rowsdata: [],
202
+ sqlname: `${this.row.f_meter_type === '物联网表'?'sale_WebHandplanQuery':'sale_HandplanQuery'}`,
203
+ searchValue: this.$appdata.getSingleValue('综合条件查询') ? this.$appdata.getSingleValue('综合条件查询') : 'f_userfiles_id',
204
+ starthead: '',
205
+ fields: {
206
+ 'f_userinfo_code': '用户编号',
207
+ 'f_user_name': '姓名',
208
+ 'f_last_tablebase': '上期底数',
209
+ 'f_tablebase': '本期底数',
210
+ 'f_balance': '上期余额',
211
+ 'f_curbalance': '本期余额',
212
+ 'f_oughtamount': '用气量',
213
+ 'f_oughtfee': '用气金额',
214
+ 'f_detailprice': '结算明细',
215
+ 'datas': '用气周期',
216
+ 'money1': '违约金',
217
+ 'f_stair1price': '一阶单价',
218
+ 'f_stair1fee': '一阶用气金额',
219
+ 'f_stairamount1': '一阶用量',
220
+ 'f_stair2price': '二阶单价',
221
+ 'f_stair2fee': '二阶用气金额',
222
+ 'f_stair2amount': '二阶用量',
223
+ 'f_stair3price': '三阶单价',
224
+ 'f_stair3fee': '三阶用气金额',
225
+ 'f_stair3amount': '三阶用量',
226
+ 'f_oughtfee1': '应交金额',
227
+ 'f_inputtor': '抄表员',
228
+ 'f_input_date': '抄表日期',
229
+ 'f_hand_date': '录入时间'},
230
+ defaultfield: [
231
+ 'datas', 'f_last_tablebase', 'f_last_tablebase', 'f_oughtamount', 'f_oughtfee', 'f_oughtfee1', 'money1', 'price1'
232
+ ],
233
+ fooinfo: [
234
+ '单位',
235
+ '收款人'
236
+ ],
237
+ printModel: {
238
+ rows: []
239
+ },
240
+ other: [],
241
+ footer: [],
242
+ // 合计数据
243
+ sumsmodel: {}
244
+ }
245
+ },
246
+ props: ['row'],
247
+ ready () {
248
+ this.$refs.paged.$refs.criteria.model.f_hand_state = ['有效']
249
+ this.f_calculation = this.row.f_calculation
250
+ this.$refs.paged.$refs.criteria.search()
251
+ this.sumsmodel= this.$refs.paged.$refs.grid.model.sums
252
+ for (let i in this.all) {
253
+ this.money += i.f_oughtamount
254
+ this.gas += i.f_oughtfee
255
+ }
256
+ },
257
+ methods: {
258
+ getotherfooter () {
259
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
260
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
261
+ this.other = []
262
+ this.footer = []
263
+ // let exportdata = this.getCondition;
264
+ let otherInData = []
265
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
266
+ let footerData = [], exportfield = this.fields
267
+ footerData.push('合计')
268
+ let self = this
269
+ for (var field in self.sumsmodel) {
270
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`)
242
271
  }
272
+ this.footer.push(footerData)
273
+ this.other.push(otherInData)
243
274
  },
244
- methods: {
245
- // search() {
246
- // this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_user_id = '${this.row.f_user_id}'`
247
- // this.model.search(this.condition, this.model)
248
- // },
249
- async search () {
250
- this.condition = `${this.$refs.paged.$refs.criteria.condition} and ${this.searchValue} = '${this.row[this.searchValue]}'`
251
- this.model.search(this.condition, this.model)
252
- let http = new HttpResetClass()
253
- let res = await http.load('POST', `${this.row.f_meter_type === '物联网表'?'api/af-revenue/sql/sale_WebHandplanQuery':'api/af-revenue/sql/sale_HandplanQuery'}`, {
254
- data: {
255
- f_user_id: this.row.f_user_id,
256
- condition: this.condition
257
- }
258
- }, {resolveMsg: null, rejectMsg: null})
259
- this.printModel.rows = res.data
260
-
261
- this.starthead = '用户编号:' + this.row.f_userinfo_code + '&emsp;&emsp;用户姓名:' + this.row.f_user_name + '&emsp;&emsp;用户地址:' + this.row.f_address
262
- },
263
- // 多选框初始化
264
- selectInit () {
265
- this.rowsdata = []
266
- this.all = []
267
- this.radio = []
268
- },
269
- print () {
270
- console.log('====================================')
271
- console.log('print')
272
- console.log(this.printModel)
273
- this.selectInit()
274
- },
275
- select () {
276
- let index = this.model.pageIndex - 1
277
- if (!this.radio[index]) {
278
- this.radio.$set(index, [])
275
+ // search() {
276
+ // this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_user_id = '${this.row.f_user_id}'`
277
+ // this.model.search(this.condition, this.model)
278
+ // },
279
+ async search () {
280
+ this.condition = `${this.$refs.paged.$refs.criteria.condition} and ${this.searchValue} = '${this.row[this.searchValue]}'`
281
+ this.model.search(this.condition, this.model)
282
+ let http = new HttpResetClass()
283
+ let res = await http.load('POST', `${this.row.f_meter_type === '物联网表'?'api/af-revenue/sql/sale_WebHandplanQuery':'api/af-revenue/sql/sale_HandplanQuery'}`, {
284
+ data: {
285
+ f_user_id: this.row.f_user_id,
286
+ condition: this.condition
279
287
  }
280
- if (this.all[index]) {
281
- // 数据
282
- this.rowsdata[index] = Object.assign([], this.model.rows)
283
- // 勾选
284
- for (var i = 0; i < this.model.rows.length; i++) {
285
- this.radio[index].$set(i, true)
286
- }
287
- } else {
288
- // 数据
289
- this.rowsdata[index] = []
290
- // 不勾选
291
- for (var i = 0; i < this.model.rows.length; i++) {
292
- this.radio[index].$set(i, false)
293
- }
288
+ }, {resolveMsg: null, rejectMsg: null})
289
+ this.printModel.rows = res.data
290
+
291
+ this.starthead = '用户编号:' + this.row.f_userinfo_code + '&emsp;&emsp;用户姓名:' + this.row.f_user_name + '&emsp;&emsp;用户地址:' + this.row.f_address
292
+ },
293
+ // 多选框初始化
294
+ selectInit () {
295
+ this.rowsdata = []
296
+ this.all = []
297
+ this.radio = []
298
+ },
299
+ print () {
300
+ console.log('====================================')
301
+ console.log('print')
302
+ console.log(this.printModel)
303
+ this.selectInit()
304
+ },
305
+ select () {
306
+ let index = this.model.pageIndex - 1
307
+ if (!this.radio[index]) {
308
+ this.radio.$set(index, [])
309
+ }
310
+ if (this.all[index]) {
311
+ // 数据
312
+ this.rowsdata[index] = Object.assign([], this.model.rows)
313
+ // 勾选
314
+ for (var i = 0; i < this.model.rows.length; i++) {
315
+ this.radio[index].$set(i, true)
294
316
  }
295
- let z = 0
296
- for (let i = 0; i < this.all.length; i++) {
297
- for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
298
- this.printModel.rows[z++] = this.rowsdata[i][j]
299
- }
317
+ } else {
318
+ // 数据
319
+ this.rowsdata[index] = []
320
+ // 不勾选
321
+ for (var i = 0; i < this.model.rows.length; i++) {
322
+ this.radio[index].$set(i, false)
300
323
  }
301
- },
302
- selectOne (event, row, i) {
303
- let index = this.model.pageIndex - 1
304
- if (!this.rowsdata[index]) {
305
- this.rowsdata[index] = []
324
+ }
325
+ let z = 0
326
+ for (let i = 0; i < this.all.length; i++) {
327
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
328
+ this.printModel.rows[z++] = this.rowsdata[i][j]
306
329
  }
307
- if (!this.radio[index]) {
308
- this.radio.$set(index, [])
330
+ }
331
+ },
332
+ selectOne (event, row, i) {
333
+ let index = this.model.pageIndex - 1
334
+ if (!this.rowsdata[index]) {
335
+ this.rowsdata[index] = []
336
+ }
337
+ if (!this.radio[index]) {
338
+ this.radio.$set(index, [])
339
+ }
340
+ if (event.target.checked) {
341
+ // 数据
342
+ this.rowsdata[index][i] = row
343
+ // 勾选
344
+ this.radio[index].$set(i, true)
345
+ // 判断是否全部选中
346
+ var allState = true
347
+ if (this.model.rows.length != this.radio[index].length) {
348
+ allState = false
309
349
  }
310
- if (event.target.checked) {
311
- // 数据
312
- this.rowsdata[index][i] = row
313
- // 勾选
314
- this.radio[index].$set(i, true)
315
- // 判断是否全部选中
316
- var allState = true
317
- if (this.model.rows.length != this.radio[index].length) {
350
+ for (var state of this.radio[index]) {
351
+ if (!state) {
318
352
  allState = false
319
353
  }
320
- for (var state of this.radio[index]) {
321
- if (!state) {
322
- allState = false
323
- }
324
- }
325
- if (allState) {
326
- this.all.$set(index, true)
327
- } else {
328
- this.all.$set(index, false)
329
- }
354
+ }
355
+ if (allState) {
356
+ this.all.$set(index, true)
330
357
  } else {
331
- // 数据
332
- this.rowsdata[index][i] = []
333
- // 不勾选
334
- this.radio[index].$set(i, false)
335
- // 任意取消一个则全选状态设为false
336
358
  this.all.$set(index, false)
337
359
  }
338
- let z = 0
339
- this.printModel.rows = []
340
- for (let i = 0; i < this.all.length; i++) {
341
- for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
342
- if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
343
- this.printModel.rows[z++] = this.rowsdata[i][j]
344
- }
360
+ } else {
361
+ // 数据
362
+ this.rowsdata[index][i] = []
363
+ // 不勾选
364
+ this.radio[index].$set(i, false)
365
+ // 任意取消一个则全选状态设为false
366
+ this.all.$set(index, false)
367
+ }
368
+ let z = 0
369
+ this.printModel.rows = []
370
+ for (let i = 0; i < this.all.length; i++) {
371
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
372
+ if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
373
+ this.printModel.rows[z++] = this.rowsdata[i][j]
345
374
  }
346
375
  }
347
376
  }
377
+ }
378
+ },
379
+ computed: {
380
+ whetherpaies () {
381
+ return [
382
+ {label: '全部', value: ''},
383
+ {label: '已缴费', value: '是'},
384
+ {label: '未缴费', value: '否'}
385
+ ]
348
386
  },
349
- computed: {
350
- whetherpaies () {
351
- return [
352
- {label: '全部', value: ''},
353
- {label: '已缴费', value: '是'},
354
- {label: '未缴费', value: '否'}
355
- ]
356
- },
357
- ischecked () {
358
- return function (index, i) {
359
- if (!this.radio[index]) {
360
- return false
361
- }
362
- return this.radio[index][i]
387
+ ischecked () {
388
+ return function (index, i) {
389
+ if (!this.radio[index]) {
390
+ return false
363
391
  }
392
+ return this.radio[index][i]
393
+ }
394
+ },
395
+ getCondition () {
396
+ return {
397
+ condition: this.condition
364
398
  }
365
399
  }
400
+ },
401
+ watch: {
402
+ sumsmodel: {
403
+ handler: function (val) {
404
+ this.getotherfooter()
405
+ },
406
+ deep: true
407
+ }
366
408
  }
409
+ }
367
410
  </script>
368
411
 
@@ -27,7 +27,10 @@
27
27
  payment: {},
28
28
  // 用户信息
29
29
  row: {},
30
- type: "燃气收费",
30
+ type: {
31
+ type: String,
32
+ default: '燃气收费'
33
+ },
31
34
  // 付款金额
32
35
  money: {}
33
36
  },
File without changes