apply-clients 4.1.23-weinan → 4.1.25-weinan

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.
@@ -78,7 +78,7 @@ export default {
78
78
  // json配置数据处理
79
79
  async initializeJSON() {
80
80
  // 有默认值,value就给默认值,没有就是null
81
- this.data.fields.forEach(item => {
81
+ for (const item of this.data.fields) {
82
82
  if (!item.value) {
83
83
  if (item.value === 0) {
84
84
  item.value = 0
@@ -128,8 +128,11 @@ export default {
128
128
  }
129
129
  }
130
130
  }
131
+ if (item.ready) {
132
+ item.options = await this[item.ready]()
133
+ }
131
134
  }
132
- })
135
+ }
133
136
 
134
137
  // 控制组件
135
138
  if (this.data.components) {
@@ -454,6 +457,30 @@ export default {
454
457
  })
455
458
  this.setLabelOptions('区域',pcd)
456
459
  },
460
+ // 获取气价
461
+ async getPrice(f_price_id) {
462
+ let data = {
463
+ condition: `sp.f_orgid = '${this.$login.f.orgid}'`
464
+ }
465
+
466
+ if (!isEmpty(f_price_id)) {
467
+ data.condition = `sp.f_orgid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
468
+ }
469
+ let http = new HttpResetClass()
470
+ let res = await http.load(
471
+ 'POST',
472
+ `rs/sql/applyGetPrice`,
473
+ {data: data},
474
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
475
+ )
476
+
477
+ return res.data.map(item => {
478
+ return {
479
+ label: item.f_price_name,
480
+ value: item
481
+ }
482
+ })
483
+ },
457
484
  // 地址关联
458
485
  addressInitialization() {
459
486
  this.$getConfig(this, 'UserAddress')
@@ -701,6 +728,20 @@ export default {
701
728
  // ========================= 武安 =================================
702
729
  },
703
730
  events: {
731
+ // 选择气价
732
+ 'priceChange'(index) {
733
+ if (isEmpty(this.show_data.f_stair_price_name)) {
734
+ return
735
+ }
736
+
737
+ let stairPrice = this.getLableValue('气价名称')
738
+ console.log("气价信息", stairPrice)
739
+ this.setLabelValue('气价类型', stairPrice.f_price_type)
740
+ this.setLabelValue('用气性质', stairPrice.f_gasproperties)
741
+ this.setLabelValue('气价', stairPrice.f_price)
742
+ this.show_data.f_price_id = stairPrice.f_price_id
743
+ this.show_data.f_price_name = stairPrice.f_price_name
744
+ },
704
745
  // ========================= 武安 =================================
705
746
  // ========================= 武安 =================================
706
747
  'openAddModel'(index) {