manage-client 3.3.261 → 3.3.262-1

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": "manage-client",
3
- "version": "3.3.261",
3
+ "version": "3.3.262-1",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1207,14 +1207,36 @@
1207
1207
  this.gasproperties =[{label: '全部', value: ''}]
1208
1208
  }
1209
1209
  },
1210
- initParams() {
1210
+ // initParams() {
1211
+ // // 初始化气表品牌
1212
+ // let brandArr = []
1213
+ // this.$MagGetSaleParam.getGasbrand().forEach((item) => {
1214
+ // let temp = {}
1215
+ // temp.label = item.label
1216
+ // temp.value = item.value.f_meter_brand
1217
+ // brandArr.push(temp)
1218
+ // })
1219
+ // this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
1220
+ // //初始化气表价格
1221
+ // this.prices = this.$MagGetSaleParam.getPrices();
1222
+ // },
1223
+ initParams () {
1211
1224
  // 初始化气表品牌
1212
1225
  let brandArr = []
1213
1226
  this.$MagGetSaleParam.getGasbrand().forEach((item) => {
1214
- let temp = {}
1215
- temp.label = item.label
1216
- temp.value = item.value.f_meter_brand
1217
- brandArr.push(temp)
1227
+ if(item.value.f_meter_type==='物联网表'){
1228
+ let temp = {}
1229
+ temp.label = item.label
1230
+ temp.value = item.value.f_meter_brand
1231
+ brandArr.push(temp)
1232
+
1233
+ let styleArr = [{label: '全部', value: ''}]
1234
+ for (let row of item.value.gasmodel) {
1235
+ styleArr.push({label: row.label,value: row.value.f_meter_style})
1236
+ }
1237
+ this.meterstyle[temp.value] = styleArr
1238
+ }
1239
+
1218
1240
  })
1219
1241
  this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
1220
1242
  //初始化气表价格
@@ -385,17 +385,37 @@
385
385
  this.orgCondtionStr = " and f_orgid = " + this.$login.f.orgid + " and f_error_type IS NOT NULL and f_error_level IS NOT NULL "
386
386
  }
387
387
  },
388
- initParams () {
389
- let arr = []
390
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
391
- let temp = {}
392
- temp.label = item.label
393
- temp.value = item.value.f_meter_brand
394
- arr.push(temp)
388
+ // initParams () {
389
+ // let arr = []
390
+ // this.$MagGetSaleParam.getGasbrand().forEach((item) => {
391
+ // let temp = {}
392
+ // temp.label = item.label
393
+ // temp.value = item.value.f_meter_brand
394
+ // arr.push(temp)
395
+ //
396
+ // })
397
+ // this.meterbrands = [{label: '全部', value: ''}, ...arr]
398
+ // },
399
+ initParams () {
400
+ // 初始化气表品牌
401
+ let brandArr = []
402
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
403
+ if(item.value.f_meter_type==='物联网表'){
404
+ let temp = {}
405
+ temp.label = item.label
406
+ temp.value = item.value.f_meter_brand
407
+ brandArr.push(temp)
395
408
 
396
- })
397
- this.meterbrands = [{label: '全部', value: ''}, ...arr]
398
- },
409
+ let styleArr = [{label: '全部', value: ''}]
410
+ for (let row of item.value.gasmodel) {
411
+ styleArr.push({label: row.label,value: row.value.f_meter_style})
412
+ }
413
+ this.meterstyle[temp.value] = styleArr
414
+ }
415
+
416
+ })
417
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
418
+ },
399
419
  hidden(){
400
420
  this.criteriaShow = !this.criteriaShow
401
421
  },
@@ -366,16 +366,38 @@
366
366
  this.$refs.paged.$refs.criteria.model.inputEndDate = Util.addDate(new Date(),-1).substring(0,10) + ' 23:59:59'
367
367
  },
368
368
  methods: {
369
- initParams() {
369
+ // initParams() {
370
+ // // 初始化气表品牌
371
+ // let brandArr = []
372
+ // this.$MagGetSaleParam.getGasbrand().forEach((item) => {
373
+ // if (item.value.f_meter_type==='物联网表'){
374
+ // let temp = {}
375
+ // temp.label = item.label
376
+ // temp.value = item.value.f_meter_brand
377
+ // brandArr.push(temp)
378
+ // }
379
+ // })
380
+ // this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
381
+ // //初始化气表价格
382
+ // this.prices = this.$MagGetSaleParam.getPrices();
383
+ // },
384
+ initParams () {
370
385
  // 初始化气表品牌
371
386
  let brandArr = []
372
387
  this.$MagGetSaleParam.getGasbrand().forEach((item) => {
373
- if (item.value.f_meter_type==='物联网表'){
388
+ if(item.value.f_meter_type==='物联网表'){
374
389
  let temp = {}
375
390
  temp.label = item.label
376
391
  temp.value = item.value.f_meter_brand
377
392
  brandArr.push(temp)
393
+
394
+ let styleArr = [{label: '全部', value: ''}]
395
+ for (let row of item.value.gasmodel) {
396
+ styleArr.push({label: row.label,value: row.value.f_meter_style})
397
+ }
398
+ this.meterstyle[temp.value] = styleArr
378
399
  }
400
+
379
401
  })
380
402
  this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
381
403
  //初始化气表价格
@@ -233,16 +233,38 @@
233
233
  this.gasproperties =[{label: '全部', value: ''}]
234
234
  }
235
235
  },
236
- initParams() {
236
+ // initParams() {
237
+ // // 初始化气表品牌
238
+ // let brandArr = []
239
+ // this.$MagGetSaleParam.getGasbrand().forEach((item) => {
240
+ // let temp = {}
241
+ // if(item.value.f_meter_type==='物联网表'){
242
+ // temp.label = item.label
243
+ // temp.value = item.value.f_meter_brand
244
+ // brandArr.push(temp )
245
+ // }
246
+ // })
247
+ // this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
248
+ // //初始化气表价格
249
+ // this.prices = this.$MagGetSaleParam.getPrices();
250
+ // },
251
+ initParams () {
237
252
  // 初始化气表品牌
238
253
  let brandArr = []
239
254
  this.$MagGetSaleParam.getGasbrand().forEach((item) => {
240
- let temp = {}
241
255
  if(item.value.f_meter_type==='物联网表'){
256
+ let temp = {}
242
257
  temp.label = item.label
243
258
  temp.value = item.value.f_meter_brand
244
- brandArr.push(temp )
259
+ brandArr.push(temp)
260
+
261
+ let styleArr = [{label: '全部', value: ''}]
262
+ for (let row of item.value.gasmodel) {
263
+ styleArr.push({label: row.label,value: row.value.f_meter_style})
264
+ }
265
+ this.meterstyle[temp.value] = styleArr
245
266
  }
267
+
246
268
  })
247
269
  this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
248
270
  //初始化气表价格
@@ -305,15 +305,37 @@
305
305
 
306
306
  console.log('Header Data:', this.other);
307
307
  },
308
- initParams() {
308
+ // initParams() {
309
+ // // 初始化气表品牌
310
+ // let brandArr = []
311
+ // this.$MagGetSaleParam.getGasbrand().forEach((item) => {
312
+ // let temp = {}
313
+ // if(item.value.f_meter_type==='物联网表'){
314
+ // temp.label = item.label
315
+ // temp.value = item.value.f_meter_brand
316
+ // brandArr.push(temp )
317
+ // }
318
+ //
319
+ // })
320
+ // this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
321
+ // //初始化气表价格
322
+ // this.prices = this.$MagGetSaleParam.getPrices();
323
+ // },
324
+ initParams () {
309
325
  // 初始化气表品牌
310
326
  let brandArr = []
311
327
  this.$MagGetSaleParam.getGasbrand().forEach((item) => {
312
- let temp = {}
313
328
  if(item.value.f_meter_type==='物联网表'){
329
+ let temp = {}
314
330
  temp.label = item.label
315
331
  temp.value = item.value.f_meter_brand
316
- brandArr.push(temp )
332
+ brandArr.push(temp)
333
+
334
+ let styleArr = [{label: '全部', value: ''}]
335
+ for (let row of item.value.gasmodel) {
336
+ styleArr.push({label: row.label,value: row.value.f_meter_style})
337
+ }
338
+ this.meterstyle[temp.value] = styleArr
317
339
  }
318
340
 
319
341
  })
@@ -171,7 +171,7 @@ export default{
171
171
  'f_userinfo_code': '客户编号', 'f_user_name': '客户名称', 'f_address': '客户地址', 'f_zones':'片区','f_user_phone': '客户手机', 'f_meternumber': '表号','ym_data': '数据年月',
172
172
  'f_last_tablebase': '上期底数', 'f_tablebase': '本期底数', 'f_oughtamount': '用气量', 'f_oughtfee': '用气金额', 'f_debt_money': '预存扣费','f_balance': '上期余额','f_curbalance': '本期余额',
173
173
  'f_accounts_state': '下账状态', 'f_sellinggas_operate_date': '收费时间', 'f_inputtor': '抄表员', 'f_hand_date': '下发日期', 'f_input_date': '录入日期', 'f_meter_state': '抄表状态', 'f_hand_state': '记录状态',
174
- 'f_operator': '操作员', 'f_depname': '部门', 'f_orgname': '公司', 'f_surplus_gas': '剩余气量', 'f_haircut_gas': '扣减气量',
174
+ 'f_operator': '操作员', 'f_depname': '部门', 'f_orgname': '公司', 'f_surplus_gas': '剩余气量', 'f_haircut_gas': '扣减气量', 'f_price_name': '气价名称',
175
175
  'f_stair1amount': '一阶气量', 'f_stair1price': '一阶单价', 'f_stair1fee': '一阶气费',
176
176
  'f_stair2amount': '二阶气量', 'f_stair2price': '二阶单价', 'f_stair2fee': '二阶气费',
177
177
  'f_stair3amount': '三阶气量', 'f_stair3price': '三阶单价', 'f_stair3fee': '三阶气费', 'f_rest_date': '所属年月'
@@ -168,7 +168,7 @@
168
168
  <v-select :value.sync="model.f_price_name"
169
169
  v-model="model.f_price_name"
170
170
  multiple
171
- :options="$parent.$parent.getPricenames"
171
+ :options="$parent.$parent.pricenames"
172
172
  condition="f_price_name in {}"
173
173
  ></v-select>
174
174
  </div>
@@ -904,16 +904,31 @@
904
904
  showbottomsum:false //页面下方是否有合计: 默认为false, 在watch修改
905
905
  }
906
906
  },
907
+ // ready() {
908
+ // if (this.batchid) {
909
+ // this.$refs.paged.$refs.cri.model.startDate = this.data ? this.data.startDate : this.$login.toStandardDateString() + ' 00:00:00'
910
+ // this.$refs.paged.$refs.cri.model.endDate = this.data ? this.data.endDate : this.$login.toStandardDateString() + ' 23:59:59'
911
+ // this.$refs.paged.$refs.cri.search()
912
+ // return
913
+ // }
914
+ // // this.$refs.paged.$refs.cri.model.f_state=['有效']
915
+ // this.getaddress()
916
+ // this.getEquipment()
917
+ // //加载抄表册
918
+ // this.$MagGetSaleParam.initinputtor();
919
+ // this.getinputtores();
920
+ // // this.initres.dep.push(this.$login.f.depids)
921
+ // readySomething(this).then(() => {
922
+ // this.$emit('ready')
923
+ // }).catch((error) => {
924
+ // this.$emit('error', error)
925
+ // })
926
+ // },
907
927
  ready() {
908
- if (this.batchid) {
909
- this.$refs.paged.$refs.cri.model.startDate = this.data ? this.data.startDate : this.$login.toStandardDateString() + ' 00:00:00'
910
- this.$refs.paged.$refs.cri.model.endDate = this.data ? this.data.endDate : this.$login.toStandardDateString() + ' 23:59:59'
911
- this.$refs.paged.$refs.cri.search()
912
- return
913
- }
914
- // this.$refs.paged.$refs.cri.model.f_state=['有效']
928
+ this.$refs.paged.$refs.cri.model.f_state=['有效']
915
929
  this.getaddress()
916
930
  this.getEquipment()
931
+ this.titleShow = this.$appdata.getSingleValue('是否显示筛选框') == null? true : this.$appdata.getSingleValue('是否显示筛选框')
917
932
  //加载抄表册
918
933
  this.$MagGetSaleParam.initinputtor();
919
934
  this.getinputtores();
@@ -925,8 +940,39 @@
925
940
  })
926
941
  },
927
942
  methods: {
928
- pricetypechanged(){
943
+ // pricetypechanged(){
944
+ // this.$refs.paged.$refs.cri.model.f_price_name = []
945
+ // },
946
+ async pricetypechanged(){
929
947
  this.$refs.paged.$refs.cri.model.f_price_name = []
948
+ this.pricenames = []
949
+ if (this.$refs.paged.$refs.cri.model.pricetype) {
950
+ let http = new HttpResetClass()
951
+ let param = {
952
+ items: 'f_price_name',
953
+ tablename: 't_stairprice',
954
+ condition: `f_price_type = '${this.$refs.paged.$refs.cri.model.pricetype[0]}' and f_orgid = '${this.$login.f.orgid}'`,
955
+ orderitem: 'id'
956
+ }
957
+ var res = await http.load('POST', 'api/af-revenue/sql/manage_singleTable', {data: param}, {resolveMsg: null, rejectMsg: '获取设备列表失败!'})
958
+ let uniqueMap = {}
959
+ let arr = []
960
+ for (var i = 0; i < res.data.length; i++) {
961
+ let item = res.data[i];
962
+ if (!uniqueMap[item.f_price_name]) {
963
+ arr.push(item);
964
+ uniqueMap[item.f_price_name] = true;
965
+ }
966
+ }
967
+ console.log('arr',arr)
968
+ if (arr.length > 0) {
969
+ arr.forEach(row => {
970
+ this.pricenames.push({label: row.f_price_name,value: row.f_price_name})
971
+ })
972
+ } else {
973
+ this.pricenames.push({label: '全部', value: ''})
974
+ }
975
+ }
930
976
  },
931
977
  // 获取设备下拉选
932
978
  async getEquipment () {
@@ -1115,7 +1161,7 @@
1115
1161
 
1116
1162
  },
1117
1163
  async updateParams() {
1118
- await this.$MagLoadParams.loadParam(this.f_filialeid)
1164
+ await this.$MagLoadParams.loadParam(this.$login.f.orgid)
1119
1165
  this.inputtores = [];
1120
1166
  this.inputtores.push({label: "全部", value: ""})
1121
1167
  if(this.allorgid!=null){
@@ -208,6 +208,7 @@
208
208
  <div class="col-sm-2 form-group">
209
209
  <label class="font_normal_body">气价类型</label>
210
210
  <v-select :value.sync="model.pricetype" v-model="model.pricetype"
211
+ @change="$parent.$parent.pricetypechanged"
211
212
  placeholder='气价类型' :options="$parent.$parent.pricetypes"
212
213
  close-on-select v-ref:type>
213
214
  </v-select>
@@ -216,7 +217,7 @@
216
217
  <label class="font_normal_body">气价名称</label>
217
218
  <v-select :value.sync="model.f_price_name"
218
219
  v-model="model.f_price_name"
219
- :options="$parent.$parent.getPricenames"
220
+ :options="$parent.$parent.pricenames"
220
221
  condition="f_price_name = '{}'"
221
222
  close-on-select></v-select>
222
223
  </div>
@@ -842,6 +843,7 @@
842
843
  modelval: [],
843
844
  gasproperties:[],
844
845
  inputtouPerson: [],
846
+ pricenames: [],
845
847
  meterbrands: [],
846
848
  printshow: false,
847
849
  f_filialeid: this.$login.f.f_orgid,
@@ -888,6 +890,37 @@
888
890
  })
889
891
  },
890
892
  methods: {
893
+ async pricetypechanged(){
894
+ this.$refs.paged.$refs.cri.model.f_price_name = []
895
+ this.pricenames = []
896
+ if (this.$refs.paged.$refs.cri.model.pricetype) {
897
+ let http = new HttpResetClass()
898
+ let param = {
899
+ items: 'f_price_name',
900
+ tablename: 't_stairprice',
901
+ condition: `f_price_type = '${this.$refs.paged.$refs.cri.model.pricetype[0]}' and f_orgid = '${this.$login.f.orgid}'`,
902
+ orderitem: 'id'
903
+ }
904
+ var res = await http.load('POST', 'api/af-revenue/sql/manage_singleTable', {data: param}, {resolveMsg: null, rejectMsg: '获取设备列表失败!'})
905
+ let uniqueMap = {}
906
+ let arr = []
907
+ for (var i = 0; i < res.data.length; i++) {
908
+ let item = res.data[i];
909
+ if (!uniqueMap[item.f_price_name]) {
910
+ arr.push(item);
911
+ uniqueMap[item.f_price_name] = true;
912
+ }
913
+ }
914
+ console.log('arr',arr)
915
+ if (arr.length > 0) {
916
+ arr.forEach(row => {
917
+ this.pricenames.push({label: row.f_price_name,value: row.f_price_name})
918
+ })
919
+ } else {
920
+ this.pricenames.push({label: '全部', value: ''})
921
+ }
922
+ }
923
+ },
891
924
  getuuid(){
892
925
  let uuidA = '';
893
926
  var s = [];
@@ -1281,34 +1314,19 @@
1281
1314
  pricetypes() {
1282
1315
  return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
1283
1316
  },
1284
- getPricenames() {
1285
- let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
1286
- let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
1287
- let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
1288
- console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.$login.f.orgid,this.prices)
1289
- if(this.$refs.paged.$refs.cri.model !==null) {
1290
- let rs = []
1291
- let priceArr = []
1292
- if ( pricetype.length >0) {
1293
- let params = {
1294
- f_price_type: pricetype[0],
1295
- filter: this.$login.f.orgid,
1296
- prices: this.prices
1317
+ getPricenames () {
1318
+ let f_filialeid = this.f_filialeid
1319
+ let result = []
1320
+ this.$GetSaleParam.prices.forEach((item) => {
1321
+ if (item.f_state === '有效' && f_filialeid == item.f_filialeid) {
1322
+ let value = {
1323
+ label: item.f_price_name,
1324
+ value: item
1297
1325
  }
1298
- this.$MagGetSaleParam.getPrice(params).forEach((item) => {
1299
- let temp = {}
1300
- temp.label = item.label
1301
- temp.value = item.value.f_price_name
1302
- priceArr.push(temp)
1303
- })
1304
- rs = [{label: '全部', value: ''}, ...priceArr]
1305
- }
1306
- if (rs.length === 0) {
1307
- console.log('rs读出来是空')
1308
- this.$refs.paged.$refs.cri.model.f_price_name = ''
1326
+ result.push(value)
1309
1327
  }
1310
- return rs
1311
- }
1328
+ })
1329
+ return Array.from(new Set(result))
1312
1330
  },
1313
1331
  inputtor () {
1314
1332
  // 获取抄表员
@@ -136,6 +136,7 @@
136
136
  <div class="col-sm-2 form-group">
137
137
  <label class="font_normal_body">气价类型</label>
138
138
  <v-select :value.sync="model.pricetype" v-model="model.pricetype"
139
+ @change="$parent.$parent.pricetypechanged"
139
140
  placeholder='气价类型' :options="$parent.$parent.pricetypes"
140
141
  close-on-select v-ref:type>
141
142
  </v-select>
@@ -144,7 +145,7 @@
144
145
  <label class="font_normal_body">气价名称</label>
145
146
  <v-select :value.sync="model.f_price_name"
146
147
  v-model="model.f_price_name"
147
- :options="$parent.$parent.getPricenames"
148
+ :options="$parent.$parent.pricenames"
148
149
  condition="f_price_name = '{}'"
149
150
  close-on-select></v-select>
150
151
  </div>
@@ -558,6 +559,7 @@
558
559
  defaultPrint: ['f_userinfo_code', 'f_address', 'f_user_name', 'f_meternumber']
559
560
  },
560
561
  prices: [],
562
+ pricenames: [],
561
563
  bgl:[{label: '全部', value: ''},{label: '有', value: '1'},{label: '无', value: '0'}],
562
564
  meterbooks:[{label: '全部',value: ''}], //抄表册
563
565
  tempfalg :false,
@@ -582,6 +584,37 @@
582
584
  })
583
585
  },
584
586
  methods: {
587
+ async pricetypechanged(){
588
+ this.$refs.paged.$refs.cri.model.f_price_name = []
589
+ this.pricenames = []
590
+ if (this.$refs.paged.$refs.cri.model.pricetype) {
591
+ let http = new HttpResetClass()
592
+ let param = {
593
+ items: 'f_price_name',
594
+ tablename: 't_stairprice',
595
+ condition: `f_price_type = '${this.$refs.paged.$refs.cri.model.pricetype[0]}' and f_orgid = '${this.$login.f.orgid}'`,
596
+ orderitem: 'id'
597
+ }
598
+ var res = await http.load('POST', 'api/af-revenue/sql/manage_singleTable', {data: param}, {resolveMsg: null, rejectMsg: '获取设备列表失败!'})
599
+ let uniqueMap = {}
600
+ let arr = []
601
+ for (var i = 0; i < res.data.length; i++) {
602
+ let item = res.data[i];
603
+ if (!uniqueMap[item.f_price_name]) {
604
+ arr.push(item);
605
+ uniqueMap[item.f_price_name] = true;
606
+ }
607
+ }
608
+ console.log('arr',arr)
609
+ if (arr.length > 0) {
610
+ arr.forEach(row => {
611
+ this.pricenames.push({label: row.f_price_name,value: row.f_price_name})
612
+ })
613
+ } else {
614
+ this.pricenames.push({label: '全部', value: ''})
615
+ }
616
+ }
617
+ },
585
618
  sort (field, rule) {
586
619
  // 将所有排序方式设为不排序,实现相互排斥
587
620
  for (let key in this.orderFields) {
@@ -321,6 +321,14 @@
321
321
  close-on-select
322
322
  style="width: 139px !important; min-width: 139px; max-width: 139px;"></v-select>
323
323
  </div>
324
+ <div class="col-sm-2 form-group">
325
+ <label class="font_normal_body">使用类型</label>
326
+ <v-select :value.sync="model.f_usetype" v-model="model.f_usetype"
327
+ :options='$parent.$parent.usetypes' placeholder='请选择'
328
+ style="width:60%"
329
+ close-on-select
330
+ condition="f_usetype = '{}'"></v-select>
331
+ </div>
324
332
  </div>
325
333
  </div>
326
334
  </criteria>
@@ -340,6 +348,7 @@
340
348
  <th><nobr>气价类型</nobr></th>
341
349
  <th><nobr>气价名称</nobr></th>
342
350
  <th><nobr>单价</nobr></th>
351
+ <th><nobr>使用类型</nobr></th>
343
352
 
344
353
  <th><nobr>安装位置</nobr></th>
345
354
  <th><nobr>气表类型</nobr></th>
@@ -429,6 +438,7 @@
429
438
  <td style="text-align: center;"><nobr>&nbsp;&nbsp;</nobr></td>
430
439
  <td style="text-align: center;"><nobr>{{row.f_price_name}}</nobr></td>
431
440
  <td style="text-align: center;"><nobr>&nbsp;&nbsp;</nobr></td>
441
+ <td style="text-align: center;"><nobr>{{row.f_usetype}}</nobr></td>
432
442
 
433
443
  <td style="text-align: center;"><nobr>{{row.f_position}}</nobr></td>
434
444
  <td style="text-align: center;"><nobr>{{row.f_meter_type}}</nobr></td>
@@ -802,6 +812,9 @@ export default {
802
812
  qdf() {
803
813
  return [{label: '全部', value: ''}, ...this.$appdata.getParam('切断阀')]
804
814
  },
815
+ usetypes() {
816
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
817
+ },
805
818
  zbf() {
806
819
  return [{label: '全部', value: ''}, ...this.$appdata.getParam('自闭阀')]
807
820
  },
@@ -0,0 +1,571 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main">
4
+ <div class="flex" :class="{showbottom:showbottomsum}" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row" >
9
+ <div class="col-sm-2">
10
+ <label class="font_normal_body">组织机构</label>
11
+ <res-select :initresid="$parent.$parent.org"
12
+ style="width:60%"
13
+ @res-select="$parent.$parent.getorg"
14
+ :is-mul=false
15
+ restype='organization'>
16
+ </res-select>
17
+ </div>
18
+ <div class="col-sm-2">
19
+ <label class="font_normal_body">客户编号</label>
20
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='客户编号'
21
+ condition="ss.f_userinfo_code = '{}'" v-next-el='f_userinfo_code' v-el:meternumber
22
+ >
23
+ </div>
24
+ <div class="col-sm-2">
25
+ <label class="font_normal_body">客户名称</label>
26
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_username" placeholder='客户名称'
27
+ condition="ss.f_user_name = '{}'" v-next-el='userid' v-el:username>
28
+ </div>
29
+ <div class="col-sm-2">
30
+ <label class="font_normal_body">客户地址</label>
31
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_address" placeholder='客户地址'
32
+ condition="ss.f_address like '%{}%'" v-next-el='f_address' v-el:f_address>
33
+ </div>
34
+ <div class="span" style="float:right;margin-top:10px">
35
+ <button class="button_search button_spacing" @click="search()">查询</button>
36
+ <button class="button_clear button_spacing" @click="$parent.$parent.clearmsg">清空</button>
37
+ <export-excel :data="$parent.$parent.getCondition" class="button_export button_spacing"
38
+ :field="$parent.$parent.getfield"
39
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="newGasStatisticsQuery" template-name='用气量统计表'
40
+ :choose-col="true"></export-excel>
41
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
42
+ :defaultfield="$parent.$parent.defaultfield"
43
+ titletable="缴费记录报表" :starthead="$parent.$parent.getstart"
44
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
45
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
46
+ </div>
47
+ </div>
48
+ <div class="row" v-show="$parent.$parent.criteriaShow">
49
+ <div class="col-sm-2">
50
+ <label class="font_normal_body">电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话</label>
51
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_user_phone" placeholder='电话'
52
+ condition="ss.f_user_phone = '{}'" v-next-el='f_user_phone' v-el:f_user_phone
53
+ >
54
+ </div>
55
+ <div class="col-sm-2">
56
+ <label class="font_normal_body">小&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</label>
57
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_residential_area" placeholder='小区'
58
+ condition="ss.f_residential_area like '%{}%'" v-next-el='f_residential_area' v-el:f_residential_area>
59
+ </div>
60
+ <div class="col-sm-2">
61
+ <label class="font_normal_body">表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</label>
62
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_meternumber" placeholder='表号'
63
+ condition="ss.f_meternumber = '{}'" v-next-el='meternumber' v-el:meternumber
64
+ >
65
+ </div>
66
+ <div class="col-sm-2">
67
+ <label class="font_normal_body">燃气证号</label>
68
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_gascode" placeholder='燃气证号'
69
+ condition="ss.f_gascode like '%{}%'" v-next-el='f_gascode' v-el:f_gascode
70
+ >
71
+ </div>
72
+ <div class="col-sm-2 form-group">
73
+ <label class="font_normal_body">气价类型</label>
74
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
75
+ @change="$parent.$parent.pricetypechanged"
76
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
77
+ close-on-select v-ref:type>
78
+ </v-select>
79
+ </div>
80
+ <div class="col-sm-2 form-group">
81
+ <label class="font_normal_body">气价名称</label>
82
+ <v-select :value.sync="model.f_price_name"
83
+ v-model="model.f_price_name"
84
+ multiple
85
+ :options="$parent.$parent.pricenames"
86
+ condition="f_price_name in {}"
87
+ ></v-select>
88
+ </div>
89
+ <div class="col-sm-2 form-group">
90
+ <label class="font_normal_body">气表品牌</label>
91
+ <v-select :value.sync="model.f_meter_brand" multiple
92
+ v-model="model.f_meter_brand"
93
+ :options="$parent.$parent.meterbrands"
94
+ condition="ss.f_meter_brand in {}"
95
+ value-single="false"
96
+ close-on-select></v-select>
97
+ </div>
98
+ <div class="col-sm-2 form-group">
99
+ <label class="font_normal_body">是否换表</label>
100
+ <v-select :value.sync="model.f_changetable_state"
101
+ v-model="model.f_changetable_state"
102
+ :options="$parent.$parent.isChange"
103
+ condition="ss.f_changetable_state = '{}'"
104
+ close-on-select></v-select>
105
+ </div>
106
+ <div class="col-sm-2 form-group">
107
+ <label class="font_normal_body">用气状态</label>
108
+ <v-select :value.sync="model.f_gas_state"
109
+ v-model="model.f_gas_state"
110
+ :options="$parent.$parent.gasState"
111
+ condition="ss.f_gas_state = '{}'"
112
+ close-on-select></v-select>
113
+ </div>
114
+ <div class="col-sm-2 form-group">
115
+ <label class="font_normal_body">气表状态</label>
116
+ <v-select :value.sync="model.f_table_state"
117
+ v-model="model.f_table_state"
118
+ :options="$parent.$parent.tableState"
119
+ condition="f_table_state = '{}'"
120
+ close-on-select></v-select>
121
+ </div>
122
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
123
+ <label class="font_normal_body">用气量区间</label>
124
+ <div class="row">
125
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount1"
126
+ condition="ss.f_oughtamount >= {} " placeholder="">
127
+ <label class="font_normal_body"> ≤ x ≤ </label>
128
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount2"
129
+ condition="ss.f_oughtamount <= {} " placeholder="">
130
+ </div>
131
+ </div>
132
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
133
+ <label class="font_normal_body">&nbsp;充值区间&nbsp;&nbsp;</label>
134
+ <div class="row">
135
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_collection1"
136
+ condition="ss.f_collection >= {} " placeholder="">
137
+ <label class="font_normal_body"> ≤ x ≤ </label>
138
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_collection2"
139
+ condition="ss.f_collection <= {} " placeholder="">
140
+ </div>
141
+ </div>
142
+ <div class="col-sm-2 form-group" >
143
+ <label class="font_normal_body" for="startDate">开始时间</label>
144
+ <datepicker id="startDate" placeholder="开始日期" style="width: 60%"
145
+ v-model="model.startDate"
146
+ :value.sync="model.startDate"
147
+ :disabled-days-of-Week="[]"
148
+ :format="'yyyy-MM-dd 00:00:00'"
149
+ :show-reset-button="reset">
150
+ </datepicker>
151
+ </div>
152
+ <div class="col-sm-2 form-group" >
153
+ <label class="font_normal_body" for="endDate">结束时间</label>
154
+ <datepicker id="endDate" placeholder="结束日期" style="width: 60%"
155
+ v-model="model.endDate"
156
+ :value.sync="model.endDate"
157
+ :disabled-days-of-Week="[]"
158
+ :format="'yyyy-MM-dd 23:59:59'"
159
+ :show-reset-button="reset">
160
+ </datepicker>
161
+ </div>
162
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
163
+ <label class="font_normal_body">余额区间</label>
164
+ <div class="row">
165
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_balance_amount_sta"
166
+ condition="ss.f_balance_amount >= {} " placeholder="">
167
+ <label class="font_normal_body"> ≤ x ≤ </label>
168
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_balance_amount_end"
169
+ condition="ss.f_balance_amount <= {} " placeholder="">
170
+ </div>
171
+ </div>
172
+ <div class="col-sm-2 form-group">
173
+ <label class="font_normal_body">用户类型</label>
174
+ <v-select :value.sync="model.f_user_type" v-model="model.f_user_type"
175
+ :options='$parent.$parent.usertypes' placeholder='请选择'
176
+ condition="f_user_type = '{}'"
177
+ close-on-select></v-select>
178
+ </div>
179
+ <div class="col-sm-2 form-group">
180
+ <label class="font_normal_body">用气性质</label>
181
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
182
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
183
+ condition="f_gasproperties = '{}'"
184
+ close-on-select></v-select>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </criteria>
189
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
190
+ <template partial='head'>
191
+ <tr>
192
+ <th><nobr>客户编号</nobr></th>
193
+ <th><nobr>客户名称</nobr></th>
194
+ <th><nobr>小区</nobr></th>
195
+ <th><nobr>地址</nobr></th>
196
+ <th><nobr>电话</nobr></th>
197
+
198
+ <th><nobr>气表状态</nobr></th>
199
+ <th><nobr>燃气证号</nobr></th>
200
+ <th><nobr>气表品牌</nobr></th>
201
+ <th><nobr>表号</nobr></th>
202
+ <th><nobr>表具类型</nobr></th>
203
+ <th><nobr>表描述</nobr></th>
204
+ <th><nobr>气价名称</nobr></th>
205
+
206
+ <th><nobr>用气性质</nobr></th>
207
+ <th><nobr>期初余额</nobr></th>
208
+ <th><nobr>起方</nobr></th>
209
+ <th><nobr>止方</nobr></th>
210
+ <th><nobr>期间用气量</nobr></th>
211
+
212
+ <th><nobr>期间用气金额</nobr></th>
213
+ <th><nobr>期间充值金额</nobr></th>
214
+ <th><nobr>期末余额</nobr></th>
215
+ <th><nobr>用气状态</nobr></th>
216
+ <th><nobr>是否换表</nobr></th>
217
+ <th><nobr>首次抄表时间</nobr></th>
218
+ <th><nobr>最后通讯日期</nobr></th>
219
+ </tr>
220
+ </template>
221
+ <template partial='body' partial='list'>
222
+ <tr >
223
+ <td style="text-align: left;"><nobr> <span @click="$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr></td>
224
+ <td style="text-align: left;"><nobr>{{row.f_user_name}}</nobr></td>
225
+ <td style="text-align: left;"><nobr>{{row.f_residential_area}}</nobr></td>
226
+ <td style="text-align: left;"><nobr>{{row.f_address}}</nobr></td>
227
+ <td style="text-align: center;"><nobr>{{row.f_user_phone}}</nobr></td>
228
+
229
+ <td style="text-align:center"><nobr>{{row.f_table_state}}</nobr></td>
230
+ <td style="text-align:center"><nobr>{{row.f_gascode}}</nobr></td>
231
+ <th style="text-align:center"><nobr>{{row.f_meter_brand}}</nobr></th>
232
+ <th style="text-align:center"><nobr>{{row.f_meternumber}}</nobr></th>
233
+ <th style="text-align:center"><nobr>{{row.f_meter_classify}}</nobr></th>
234
+ <th style="text-align:center"><nobr>{{row.f_meter_title}}</nobr></th>
235
+ <th style="text-align:center"><nobr>{{row.f_price_name}}</nobr></th>
236
+
237
+
238
+ <th style="text-align:center"><nobr>{{row.f_gasproperties}}</nobr></th>
239
+
240
+
241
+ <th style="text-align:center"><nobr>{{row.f_balance}}</nobr></th>
242
+ <th style="text-align:center"><nobr>{{row.f_last_tablebase}}</nobr></th>
243
+ <th style="text-align:center"><nobr>{{row.f_tablebase}}</nobr></th>
244
+ <th style="text-align:center"><nobr>{{row.f_oughtamount}}</nobr></th>
245
+ <th style="text-align:center"><nobr>{{row.f_oughtfee}}</nobr></th>
246
+
247
+ <th style="text-align:center"><nobr>{{row.f_collection}}</nobr></th>
248
+ <th style="text-align:center"><nobr>{{row.f_curbalance}}</nobr></th>
249
+ <th style="text-align:center"><nobr>{{row.f_gas_state}}</nobr></th>
250
+ <th style="text-align:center"><nobr>{{row.f_changetable_state}}</nobr></th>
251
+ <th style="text-align:center"><nobr>{{row.f_first_input_date}}</nobr></th>
252
+ <th style="text-align:center"><nobr>{{row.f_input_date}}</nobr></th>
253
+ </tr>
254
+ </template>
255
+ <template partial='foot'></template>
256
+ </data-grid>
257
+ </criteria-paged>
258
+ <table class="table-hover">
259
+ <tr style="position: relative" class="table-bordered">
260
+ <td
261
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
262
+ 汇总信息
263
+ </td>
264
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
265
+ 期间用气量:&emsp;{{sumsmodel.f_oughtamount}}
266
+ </td>
267
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
268
+ 期间用气金额:&emsp;{{sumsmodel.f_oughtfee}}
269
+ </td>
270
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
271
+ 期间充值金额:&emsp;{{sumsmodel.f_collection}}
272
+ </td>
273
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
274
+ 一阶气量合计:&emsp;{{sumsmodel.f_stairamount1}}
275
+ </td>
276
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
277
+ 一阶气费合计:&emsp;{{sumsmodel.f_stair1fee}}
278
+ </td>
279
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
280
+ 二阶气量合计:&emsp;{{sumsmodel.f_stairamount2}}
281
+ </td>
282
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
283
+ 二阶气费合计:&emsp;{{sumsmodel.f_stair2fee}}
284
+ </td>
285
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
286
+ 三阶气量合计:&emsp;{{sumsmodel.f_stairamount3}}
287
+ </td>
288
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
289
+ 三阶气费合计:&emsp;{{sumsmodel.f_stair3fee}}
290
+ </td>
291
+ </tr>
292
+ </table>
293
+ </div>
294
+ </div>
295
+ </div>
296
+ <div class="flex-row" style="width:99%;height:98%;margin-bottom:0px" v-if="showdetail">
297
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
298
+ </div>
299
+ </template>
300
+
301
+ <script>
302
+ import {HttpResetClass, PagedList} from 'vue-client'
303
+ import exportConfig from '../../components/sale/config/exportConfig'
304
+ import * as Util from '../../Util'
305
+ import plugins from '../../plugins/GetLoginInfoService'
306
+
307
+ let readySomething = async function (self) {
308
+ await self.$MagLoadParams.loadParam()
309
+ self.initParams()
310
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
311
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums;
312
+ }
313
+ export default {
314
+ title: '用气量统计表',
315
+ data () {
316
+ return {
317
+ show:false,
318
+ org:[this.$login.f.orgid],
319
+ orgcondition: ' and ss.f_orgid = ' + this.$login.f.orgid,
320
+ //f_filialeid: this.$login.f.f_orgid,
321
+ detaillist: [],
322
+ meterbrands: [],
323
+ prices: [],
324
+ gasproperties:[],
325
+ pricenames: [],
326
+ condition:'',
327
+ rowdata:{},
328
+ getstart:'',
329
+ config: {
330
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_meternumber', 'f_gasproperties', 'f_balance', 'f_last_tablebase','f_tablebase',
331
+ 'f_oughtamount', 'f_oughtfee', 'f_collection', 'f_curbalance', 'f_gas_state', 'f_changetable_state', 'f_input_date']
332
+ },
333
+ sumsmodel: {},
334
+ orgid:[this.$login.f.orgid],
335
+ criteriaShow:false,
336
+ showdetail:false,
337
+ //默认打印列
338
+ defaultfield: [],
339
+ orgCondtionStr: '',
340
+ model: new PagedList('api/af-revenue/sql/newGasStatisticsQuery', 50,{
341
+ startDate: 'this.model.startDate',
342
+ endDate: 'this.model.endDate'
343
+ },{
344
+ f_oughtamount: 0,
345
+ f_oughtfee: 0,
346
+ f_collection:0,
347
+ f_stairamount1:0,
348
+ f_stair1fee:0,
349
+ f_stairamount2:0,
350
+ f_stair2fee:0,
351
+ f_stairamount3:0,
352
+ f_stair3fee:0
353
+ }),
354
+ showbottomsum:false //页面下方是否有合计: 默认为false, 在watch修改
355
+ }
356
+ },
357
+ ready () {
358
+ // this.$refs.paged.$refs.criteria.search()
359
+ readySomething(this).then(() => {
360
+ this.$emit('ready')
361
+ }).catch((error) => {
362
+ this.$emit('error', error)
363
+ })
364
+ this.$refs.paged.$refs.criteria.model.startDate = Util.addDate(new Date(),-1).substring(0,10) + ' 00:00:00'
365
+ this.$refs.paged.$refs.criteria.model.endDate = Util.addDate(new Date(),-1).substring(0,10) + ' 23:59:59'
366
+ this.$refs.paged.$refs.criteria.model.inputStartDate = Util.addDate(new Date(),-1).substring(0,10) + ' 00:00:00'
367
+ this.$refs.paged.$refs.criteria.model.inputEndDate = Util.addDate(new Date(),-1).substring(0,10) + ' 23:59:59'
368
+ },
369
+ methods: {
370
+ initParams() {
371
+ // 初始化气表品牌
372
+ let brandArr = []
373
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
374
+ if (item.value.f_meter_type==='物联网表'){
375
+ let temp = {}
376
+ temp.label = item.label
377
+ temp.value = item.value.f_meter_brand
378
+ brandArr.push(temp)
379
+ }
380
+ })
381
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
382
+ //初始化气表价格
383
+ this.prices = this.$MagGetSaleParam.getPrices();
384
+ },
385
+ async updateParams() {
386
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
387
+ this.initParams()
388
+ },
389
+ getorg(obj) {
390
+ if(plugins.convertToIn(obj)!==null&&plugins.convertToIn(obj)!==''){
391
+ this.orgcondition = " and ss.f_orgid in " + plugins.convertToIn(obj)
392
+ }else{
393
+ this.orgcondition = " and ss.f_orgid = " + this.$login.f.orgid
394
+ }
395
+ },
396
+ async pricetypechanged(){
397
+ this.$refs.paged.$refs.criteria.model.f_price_name = []
398
+ this.pricenames = []
399
+ if (this.$refs.paged.$refs.criteria.model.pricetype) {
400
+ let http = new HttpResetClass()
401
+ let param = {
402
+ items: 'f_price_name',
403
+ tablename: 't_stairprice',
404
+ condition: `f_price_type = '${this.$refs.paged.$refs.criteria.model.pricetype[0]}' and f_orgid = '${this.$login.f.orgid}'`,
405
+ orderitem: 'id'
406
+ }
407
+ var res = await http.load('POST', 'api/af-revenue/sql/manage_singleTable', {data: param}, {resolveMsg: null, rejectMsg: '获取设备列表失败!'})
408
+ let uniqueMap = {}
409
+ let arr = []
410
+ for (var i = 0; i < res.data.length; i++) {
411
+ let item = res.data[i];
412
+ if (!uniqueMap[item.f_price_name]) {
413
+ arr.push(item);
414
+ uniqueMap[item.f_price_name] = true;
415
+ }
416
+ }
417
+ console.log('arr',arr)
418
+ if (arr.length > 0) {
419
+ arr.forEach(row => {
420
+ this.pricenames.push({label: row.f_price_name,value: row.f_price_name})
421
+ })
422
+ } else {
423
+ this.pricenames.push({label: '全部', value: ''})
424
+ }
425
+ }
426
+ },
427
+ userTypeChange () {
428
+ this.gasproperties=[]
429
+ if(this.$refs.paged.$refs.criteria.model !==null) {
430
+ this.$refs.paged.$refs.criteria.model.f_gasproperties=''
431
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0])
432
+ }
433
+ else{
434
+ this.gasproperties =[{label: '全部', value: ''}]
435
+ }
436
+ },
437
+ hidden(){
438
+ this.criteriaShow = !this.criteriaShow
439
+ },
440
+ cancel() {
441
+ this.showdetail = false
442
+ },
443
+ clearmsg () {
444
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
445
+ this.$refs.paged.$refs.criteria.model[key] = []
446
+ })
447
+ },
448
+ getRes (obj) {
449
+ this.orgCondtionStr = condition
450
+ this.orgname = obj.orgnames[0]
451
+ this.depname = obj.depnames[0]
452
+ },
453
+ showmsg(obj){
454
+ this.rowdata=obj
455
+ this.showdetail=true
456
+ },
457
+
458
+ search (args) {
459
+ args.condition = `${args.condition}`+this.orgcondition
460
+ this.condition = args.condition
461
+ this.model.search(args.condition, args.model)
462
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
463
+ // args.condition = `${args.condition}`
464
+ // if (this.orgcondition)
465
+ // args.condition = `${args.condition}` + this.orgcondition
466
+ // else
467
+ // args.condition = `${args.condition}` + 'and m.f_orgid in ' + '(' + this.$login.f.orgid + ')'
468
+ // this.model.search(args.condition, args.model)
469
+ }
470
+ },
471
+ watch: {
472
+ 'model.rows'(val) {
473
+ //如果有合计 这里为true, 其他为false ,反正相反
474
+ this.showbottomsum=true;
475
+ if(val.length === 0){
476
+ this.sumsmodel = {}
477
+ this.showbottomsum=false;
478
+ }
479
+ },
480
+ 'orgCondtionStr'(val) {
481
+ let res = val.match(/'(.*?)'/)
482
+ console.log('正则提取:',res && res[1])
483
+ if (res) {
484
+ this.f_filialeid = res[1]
485
+ // this.updateParams()
486
+ }
487
+ }
488
+ },
489
+ computed: {
490
+ getstart(){
491
+ return `开始时间:${this.$refs.paged.$refs.criteria.model.startDate} 结束时间:${this.$refs.paged.$refs.criteria.model.endDate}`
492
+ },
493
+ getPricenames () {
494
+ let pricetype = this.$refs.paged.$refs.criteria.model.pricetype
495
+ if (this.$refs.paged.$refs.criteria.model !== null) {
496
+ let rs = []
497
+ let priceArr = []
498
+ if (pricetype.length > 0) {
499
+ let params = {
500
+ f_price_type: pricetype[0],
501
+ filter: this.f_filialeid,
502
+ prices: this.prices
503
+ }
504
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
505
+ let temp = {}
506
+ temp.label = item.label
507
+ temp.value = item.value.f_price_name
508
+ priceArr.push(temp)
509
+ })
510
+ if (priceArr.length == 0) {
511
+ rs = [{label: '全部', value: ''}]
512
+ } else {
513
+ rs = [...priceArr]
514
+ }
515
+ }
516
+ if (rs.length === 0) {
517
+ console.log('rs读出来是空')
518
+ this.$refs.paged.$refs.criteria.model.f_price_name = ''
519
+ }
520
+ return rs
521
+ }
522
+ },
523
+ getfield () {
524
+ return exportConfig.GasStatistics
525
+ },
526
+ usertypes() {
527
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
528
+ },
529
+ gasproperties() {
530
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用气性质')]
531
+ },
532
+ pricetypes() {
533
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
534
+ },
535
+ tableState() {
536
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')]
537
+ },
538
+ gasState() {
539
+ return [{label:'正常', value:'正常'},
540
+ {label:'异常', value:'异常'},
541
+ ]
542
+ },
543
+ isChange() {
544
+ return [{label:'是', value:'是'},
545
+ {label:'否', value:'否'},
546
+ ]
547
+ },
548
+ getCondition () {
549
+ // var con = ""
550
+ // if (this.orgCondtionStr) {
551
+ // con = `${this.$refs.paged.$refs.criteria.condition} and m.f_orgid in (${this.orgCondtionStr})`
552
+ // }
553
+ // else {
554
+ // con = `${this.$refs.paged.$refs.criteria.condition}and m.f_orgid in ('${this.$login.f.orgid}' )`
555
+ // }
556
+ return {
557
+ startDate: this.$refs.paged.$refs.criteria.model.startDate,
558
+ endDate: this.$refs.paged.$refs.criteria.model.endDate,
559
+ condition: this.condition
560
+ }
561
+ }
562
+ }
563
+ }
564
+ </script>
565
+
566
+ <style>
567
+ .showbottom{
568
+ height:95%
569
+ }
570
+ </style>
571
+
@@ -0,0 +1,15 @@
1
+ import Vue from 'vue'
2
+ import echarts from 'echarts'
3
+ import MagLoadParams from '../../stores/MagLoadParams'
4
+ import MagGetSaleParam from '../../stores/MagGetSaleParams'
5
+
6
+ /** **************************收费组件注册******************************/
7
+
8
+ export default function () {
9
+ Vue.prototype.$echarts = echarts
10
+ Vue.use(MagLoadParams)
11
+ Vue.use(MagGetSaleParam)
12
+ // 物联网表用气量统计表新
13
+ Vue.component('new-use-gas-statistics', (resolve) => { require(['./NewGasStatistics'], resolve) })
14
+ }
15
+
@@ -61,11 +61,16 @@ let MagGetSaleParam = {
61
61
  MagGetSaleParam.gasbrands[index] = {}
62
62
  MagGetSaleParam.gasbrands[index].label = item.f_meter_brand
63
63
  let gasmodel = []
64
- item.gasmodel.forEach((item, index) => {
65
- gasmodel[index] = {}
66
- gasmodel[index].label = item.f_meter_style + item.f_type
67
- gasmodel[index].value = item
68
- })
64
+ if (Array.isArray(item.gasmodel)) {
65
+ console.log('isArray', item.gasmodel)
66
+ item.gasmodel.forEach((item, index) => {
67
+ gasmodel[index] = {}
68
+ gasmodel[index].label = item.f_meter_style + item.f_type
69
+ gasmodel[index].value = item
70
+ })
71
+ } else {
72
+ console.error("gasmodel is not an array or is undefined");
73
+ }
69
74
  item.gasmodel = gasmodel
70
75
  MagGetSaleParam.gasbrands[index].value = item
71
76
  })
@@ -43,15 +43,20 @@ let MagLoadParams = {
43
43
  GetSaleParam.gasbrands[index] = {}
44
44
  GetSaleParam.gasbrands[index].label = item.f_meter_brand
45
45
  let gasmodel = []
46
- item.gasmodel.forEach((item, index) => {
47
- gasmodel[index] = {}
48
- gasmodel[index].label = item.f_meter_style + item.f_type
49
- gasmodel[index].value = item
50
- })
46
+ if (Array.isArray(item.gasmodel)) {
47
+ item.gasmodel.forEach((item, index) => {
48
+ gasmodel[index] = {}
49
+ gasmodel[index].label = item.f_meter_style + item.f_type
50
+ gasmodel[index].value = item
51
+ })
52
+ } else {
53
+ console.error("gasmodel is not an array or is undefined");
54
+ }
51
55
  item.gasmodel = gasmodel
52
56
  GetSaleParam.gasbrands[index].value = item
53
57
  })
54
58
 
59
+
55
60
  fromSystem.adjustable.forEach((item, index) => {
56
61
  GetSaleParam.adjustables[index] = {}
57
62
  GetSaleParam.adjustables[index].label = item.f_adjustable_name