sale-client 3.5.17 → 3.5.20

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.17",
3
+ "version": "3.5.20",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -140,18 +140,18 @@
140
140
  </template>
141
141
  <script>
142
142
 
143
- import {HttpResetClass} from "vue-client";
143
+ import {HttpResetClass} from 'vue-client'
144
144
 
145
145
  export default {
146
146
  data () {
147
147
  return {
148
148
  isshow: false,
149
149
  tempPosition: {
150
- position: { //经纬度信息
151
- lng: 0, //经度
152
- lat: 0 //纬度
150
+ position: { // 经纬度信息
151
+ lng: 0, // 经度
152
+ lat: 0 // 纬度
153
153
  },
154
- formattedAddress: '' //地址信息
154
+ formattedAddress: '' // 地址信息
155
155
  },
156
156
  model: {
157
157
  f_adjustable_id: '',
@@ -165,11 +165,11 @@ export default {
165
165
  f_open_date: '',
166
166
  f_manufacturer: '',
167
167
  f_remark: '',
168
- f_adjustable_lng: '', //经度
169
- f_adjustable_lat: '', //纬度
168
+ f_adjustable_lng: '', // 经度
169
+ f_adjustable_lat: '' // 纬度
170
170
  },
171
- riser:[{}],
172
- delrow:[],
171
+ riser: [{}],
172
+ delrow: [],
173
173
  haveid: false,
174
174
  havename: false,
175
175
  changedate: true,
@@ -206,44 +206,46 @@ export default {
206
206
  this.model.f_depid = this.$login.f.depids
207
207
  this.model.f_depname = this.$login.f.deps
208
208
  let http = new HttpResetClass()
209
- let res=await http.load('post', `rs/entity/t_adjustablebox`, this.model,{resolveMsg:'调压箱保存成功', rejectMsg: '保存失败!!!'})
210
- if(this.riser[0]){
211
- for(var i=0;i<this.riser.length;i++){
212
- var params={
213
- id:this.riser[i].id,
214
- f_table_name:`t_adjustablebox`,
215
- f_field_name:'id',
216
- f_parent_id:res.data.id,
217
- f_value:this.riser[i].f_value,
218
- f_chinese_name:'立管编号',
219
- f_operator : this.$login.f.name,
220
- f_operatorid : this.$login.f.id,
221
- f_orgid : this.$login.f.orgid,
222
- f_orgname : this.$login.f.orgs,
223
- f_depid : this.$login.f.depids,
224
- f_depname : this.$login.f.deps
225
- }
226
- if(this.riser[i].f_value){
227
- await http.load('post', `rs/entity/t_attribute`, params, {resolveMsg: null, rejectMsg: null})
228
- }else{
229
- await this.$resetdelete('rs/entity/t_attribute', {id: this.riser[i].id}, {warnMsg:null,resolveMsg: null, rejectMsg: null})
230
- }
231
- }
209
+ let res = await http.load('post', `rs/entity/t_adjustablebox`, this.model, {resolveMsg: '调压箱保存成功', rejectMsg: '保存失败!!!'})
210
+ if (this.riser[0]) {
211
+ for (var i = 0; i < this.riser.length; i++) {
212
+ var params = {
213
+ id: this.riser[i].id,
214
+ f_table_name: `t_adjustablebox`,
215
+ f_field_name: 'id',
216
+ f_parent_id: res.data.id,
217
+ f_value: this.riser[i].f_value,
218
+ f_chinese_name: '立管编号',
219
+ f_operator: this.$login.f.name,
220
+ f_operatorid: this.$login.f.id,
221
+ f_orgid: this.$login.f.orgid,
222
+ f_orgname: this.$login.f.orgs,
223
+ f_depid: this.$login.f.depids,
224
+ f_depname: this.$login.f.deps
232
225
  }
233
- if(this.delrow.length>0){
234
- for(var i=0;i<this.delrow.length;i++){
235
- await this.$resetdelete('rs/entity/t_attribute', {id: this.delrow[i]}, {warnMsg:null,resolveMsg: null, rejectMsg: null})
236
- }
226
+ if (this.riser[i].f_value) {
227
+ await http.load('post', `rs/entity/t_attribute`, params, {resolveMsg: null, rejectMsg: null})
228
+ } else {
229
+ await this.$resetdelete('rs/entity/t_attribute', {id: this.riser[i].id}, {warnMsg: null, resolveMsg: null, rejectMsg: null})
237
230
  }
238
- this.$dispatch('success', '调压箱保存成功', this.model, res)
239
- this.riser=[{}]
240
- this.delrow=[]
231
+ }
232
+ }
233
+ if (this.delrow.length > 0) {
234
+ for (var i = 0; i < this.delrow.length; i++) {
235
+ await this.$resetdelete('rs/entity/t_attribute', {id: this.delrow[i]}, {warnMsg: null, resolveMsg: null, rejectMsg: null})
236
+ }
237
+ }
238
+ // 操作了调压箱 清空分公司initdata缓存
239
+ await http.load('POST', 'rs/logic/delSaleInitData', {data: {}}, {resolveMsg: null, rejectMsg: null})
241
240
 
241
+ this.$dispatch('success', '调压箱保存成功', this.model, res)
242
+ this.riser = [{}]
243
+ this.delrow = []
242
244
  },
243
- delriser (index,row) {
245
+ delriser (index, row) {
244
246
  if (this.riser.length > 1) {
245
247
  this.riser.splice(index, 1)
246
- if(row.id){
248
+ if (row.id) {
247
249
  this.delrow.push(row.id)
248
250
  }
249
251
  }
@@ -252,7 +254,7 @@ export default {
252
254
  this.riser.push({})
253
255
  },
254
256
  async datatomodel () {
255
- this.delrow=[]
257
+ this.delrow = []
256
258
  this.$nextTick(() => {
257
259
  if (JSON.stringify(this.data) === '{}') {
258
260
  Object.assign(this.$data.model, this.$options.data().model)
@@ -270,13 +272,13 @@ export default {
270
272
  this.model.f_operate_date ? this.changedate = false : this.changedate = true
271
273
  }
272
274
  })
273
- if(this.data.id){
274
- var data=await this.$resetpost('rs/sql/saleSingleTable', {data: {tablename: 't_attribute', condition: `f_table_name = 't_adjustablebox' and f_parent_id = '${this.data.id}' and f_chinese_name ='立管编号'`}}, {resolveMsg: null, rejectMsg: '获取调压箱失败'})
275
- this.riser=data.data
275
+ if (this.data.id) {
276
+ var data = await this.$resetpost('rs/sql/saleSingleTable', {data: {tablename: 't_attribute', condition: `f_table_name = 't_adjustablebox' and f_parent_id = '${this.data.id}' and f_chinese_name ='立管编号'`}}, {resolveMsg: null, rejectMsg: '获取调压箱失败'})
277
+ this.riser = data.data
276
278
  }
277
279
 
278
- if (this.riser.length===0){
279
- this.riser=[{}]
280
+ if (this.riser.length === 0) {
281
+ this.riser = [{}]
280
282
  }
281
283
  },
282
284
  cancel () {
@@ -305,7 +307,7 @@ export default {
305
307
  this.isshow = true
306
308
  },
307
309
  closeModal () {
308
- this.isshow = false;
310
+ this.isshow = false
309
311
  },
310
312
  getmylocation (res) {
311
313
  this.tempPosition = res
@@ -314,7 +316,7 @@ export default {
314
316
  this.model.f_adjustable_address = this.tempPosition.formattedAddress
315
317
  this.model.f_adjustable_lng = this.tempPosition.position.lng
316
318
  this.model.f_adjustable_lat = this.tempPosition.position.lat
317
- this.isshow = false;
319
+ this.isshow = false
318
320
  }
319
321
  }
320
322
  }
@@ -41,10 +41,11 @@
41
41
  <!--@change="$parent.$parent.$parent.select()" style="width: 22px;height: 22px"/>-->
42
42
  <!--</th>-->
43
43
  <th><nobr>读取类型</nobr></th>
44
- <th><nobr>读取内容</nobr></th>
44
+ <!--<th><nobr>读取内容</nobr></th>-->
45
45
  <th><nobr>数据日期</nobr></th>
46
46
  <th><nobr>用量合计</nobr></th>
47
47
  <th><nobr>插入日期</nobr></th>
48
+ <th><nobr>查看</nobr></th>
48
49
  </tr>
49
50
  </template>
50
51
  <template partial='body' partial='list' v-ref:grid>
@@ -54,15 +55,24 @@
54
55
  <!--:checked="$parent.$parent.$parent.ischecked($parent.model.pageIndex-1,$index)" style="width: 22px;height: 22px;"/>-->
55
56
  <!--</td>-->
56
57
  <td style="text-align:center"><nobr>{{row.f_type}}</nobr></td>
57
- <td style="text-align:center"><nobr>{{row.f_data}}</nobr></td>
58
+ <!--<td style="text-align:center"><nobr>{{row.f_data}}</nobr></td>-->
58
59
  <td style="text-align:center"><nobr>{{row.f_data_date}}</nobr></td>
59
60
  <td style="text-align:center"><nobr>{{row.f_data_total}}</nobr></td>
60
61
  <td style="text-align:center"><nobr>{{row.f_insert_date}}</nobr></td>
62
+ <td style="text-align:center"@click="$parent.$parent.$parent.dealmsg(row)" ><button class="btn">查看</button></td>
61
63
  </tr>
62
64
  </template>
63
65
  <template partial='foot'></template>
64
66
  </data-grid>
65
67
  </criteria-paged>
68
+ <modal :show.sync="isShowDetailInfo" width="1000px" title="详情展示" v-ref:modal backdrop="false" >
69
+ <article slot="modal-body" class="modal-body">
70
+ <json-parse :data-json="rowData" :json-fields="jsonFields"></json-parse>
71
+ </article>
72
+ <footer slot="modal-footer" class="modal-footer">
73
+ <button type="button" class="btn btn-success" @click='cancel'>关闭</button>
74
+ </footer>
75
+ </modal>
66
76
  </div>
67
77
  </div>
68
78
  </template>
@@ -85,7 +95,19 @@
85
95
  fields: {'f_preamount': '购气金额', 'f_pregas': '购气量', 'f_operate_date': '缴费时间', 'f_operator': '操作员', 'f_comments': '备注'},
86
96
  defaultfield: [
87
97
  'f_preamount', 'f_pregas', 'f_operate_date', 'f_operator', 'f_comments'
88
- ]
98
+ ],
99
+ jsonFields: {
100
+ factoryFlow: '工况流量',
101
+ dataDate: '记录时间',
102
+ factoryTotal: '工况累积量',
103
+ temperature: '温度',
104
+ standardTotal: '标况累积量',
105
+ pressure: '压力',
106
+ standardFlow: '标流量',
107
+ Result: '结果'
108
+ },
109
+ isShowDetailInfo: false,
110
+ rowData: ''
89
111
  }
90
112
  },
91
113
  props: ['row'],
@@ -93,6 +115,23 @@
93
115
  this.$refs.paged.$refs.criteria.search()
94
116
  },
95
117
  methods: {
118
+ /**
119
+ * 退出json详细信息页面
120
+ */
121
+ cancel () {
122
+ this.isShowDetailInfo = false
123
+ },
124
+ /**
125
+ * 展示json
126
+ * @param obj 传递的row
127
+ */
128
+
129
+ dealmsg (obj) {
130
+ console.log('==================>', obj)
131
+ this.isShowDetailInfo = true
132
+ this.rowData = obj.f_data
133
+ debugger
134
+ },
96
135
  search () {
97
136
  this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_userfiles_id = '${this.row.f_userfiles_id}'`
98
137
  this.model.search(this.condition, this.model)
@@ -39,7 +39,6 @@ export default {
39
39
  },
40
40
  props: ['data'],
41
41
  ready () {
42
- debugger
43
42
  checkGas(this)
44
43
  },
45
44
  watch: {