sale-client 3.5.47 → 3.5.48

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/.babelrc CHANGED
@@ -1,5 +1,5 @@
1
- {
2
- "presets": ["es2015", "stage-2"],
3
- "plugins": ["transform-runtime"],
4
- "comments": false
5
- }
1
+ {
2
+ "presets": ["es2015", "stage-2"],
3
+ "plugins": ["transform-runtime"],
4
+ "comments": false
5
+ }
@@ -10,9 +10,9 @@ var compiler = webpack(config)
10
10
 
11
11
  // Define HTTP proxies to your custom API backend
12
12
  // https://github.com/chimurai/http-proxy-middleware
13
- var bendi = 'http://127.0.0.1:8080', bendi1 = 'http://121.36.106.17:8400/'
13
+ var bendi = 'http://39.108.82.124:8400/', bendi1 = 'http://121.36.106.17:8400/'
14
14
  // 公司测试服务
15
- var fuwu = 'http://192.168.50.4:8400'
15
+ var fuwu = 'http://39.108.82.124:8400/'
16
16
  // var fuwu = 'http://121.36.106.17:8400/'
17
17
  // 铜川正式
18
18
  // var fuwu = 'http://61.134.55.234:9999/'
@@ -89,13 +89,13 @@ var proxyTable = {
89
89
  target: fuwu
90
90
  },
91
91
  '/rs/report': {
92
- target: 'http://127.0.0.1:8082'
92
+ target: 'http://121.36.106.17:8400/'
93
93
  },
94
94
  '/rs/vue': {
95
95
  target: fuwu
96
96
  },
97
97
  '/webmeter': {
98
- target: 'http://192.168.50.4:8450'
98
+ target: fuwu
99
99
  },
100
100
  '/rs': {
101
101
  // target: 'http://192.168.30.63:8081/'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.47",
3
+ "version": "3.5.48",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -21,35 +21,42 @@
21
21
  <input :type="text" v-model="row.overdueMessageValue" :value.sync="row.overdueMessageValue" style="width:70%" placeholder="" class="input_search">
22
22
  </div>-->
23
23
  <div v-for="(index,data) in newmeterinfo" style="height: auto">
24
- <div class="col-sm-12" style="height: auto" v-if="data.name===paramtype" v-for="(param_index,param) in data.params">
24
+ <div class="col-sm-12" style="height: auto" v-if="data.name===paramtype"
25
+ v-for="(param_index,param) in data.params">
25
26
  <div class="col-sm-4">
26
- <label class="font_normal_body" style="text-align:left">{{param.name}}:</label>
27
- <p class="glyphicon glyphicon-info-sign" style="margin-top:5%;color:#4a7cae" :title="param.remark"></p>
27
+ <label class="font_normal_body" style="text-align:left">{{ param.name }}:</label>
28
+ <p class="glyphicon glyphicon-info-sign" style="margin-top:5%;color:#4a7cae"
29
+ :title="param.remark + ',当前系统设置默认值为:'+param.default_value"></p>
28
30
  </div>
29
- <div class="col-sm-4" >
30
- <label class="font_normal_body" style="text-align:left">{{param.default_value ? `当前默认值为:${param.default_value};` : '当前未设置默认值'}}</label>
31
+ <!-- <div class="col-sm-4">-->
32
+ <!-- <label class="font_normal_body"-->
33
+ <!-- style="text-align:left">{{ param.default_value ? `当前默认值为:${param.default_value};` : '当前未设置默认值' }}</label>-->
34
+ <!-- </div>-->
35
+ <div class="col-sm-8" v-if="paramtype==='设置表功能开关'">
36
+ <radio-btn v-model="row[param.title]" :value.sync="row[param.title]"></radio-btn>
37
+ <!-- <label>启用<input type="radio" v-model="param.isenbale" @click="reMeterinfo(index,param_index,data.params)" :disabled="!param.default_value" value="启用"/></label>-->
38
+ <!-- <label>保持不变<input type="radio" v-model="param.isenbale" @click="reMeterinfo(index,param_index,data.params)" value="保持不变"/></label>-->
31
39
  </div>
32
- <div class="col-sm-4" >
33
- <radio-btn v-model="param.isenbale" :value.sync="param.isenbale" :disabled="!param.default_value"></radio-btn>
34
- <!-- <label>启用<input type="radio" v-model="param.isenbale" @click="reMeterinfo(index,param_index,data.params)" :disabled="!param.default_value" value="启用"/></label>-->
35
- <!-- <label>保持不变<input type="radio" v-model="param.isenbale" @click="reMeterinfo(index,param_index,data.params)" value="保持不变"/></label>-->
36
- </div>
37
- <!-- <div class="col-sm-8" v-if="param.type!=='option'">-->
38
- <!-- <input :type="param.type" v-model="row[param.title]" :value.sync="row[param.title]" style="width:70%" placeholder="" class="input_search">-->
39
- <!-- </div>-->
40
- <!-- <div class="col-sm-8" v-if="param.type==='option'">-->
41
- <!-- <v-select-->
42
- <!-- :placeholder='param.name'-->
43
- <!-- :value.sync="row[param.title]"-->
44
- <!-- style="width:70%"-->
45
- <!-- width="70%"-->
46
- <!-- :value-single="true"-->
47
- <!-- v-model="row[param.title]"-->
48
- <!-- :options='param.params'-->
49
- <!-- close-on-select-->
50
- <!-- >-->
51
- <!-- </v-select>-->
52
- <!-- </div>-->
40
+ <template v-if="paramtype!=='设置表功能开关'">
41
+ <div class="col-sm-8" v-if="param.type!=='option'">
42
+ <input :type="param.type" v-model="row[param.title] = param.default_value"
43
+ :value.sync="row[param.title]=param.default_value" style="width:70%"
44
+ placeholder="" class="input_search">
45
+ </div>
46
+ <div class="col-sm-8" v-if="param.type==='option'">
47
+ <v-select
48
+ :placeholder='param.name'
49
+ :value.sync="row[param.title]"
50
+ style="width:70%"
51
+ width="70%"
52
+ :value-single="true"
53
+ v-model="row[param.title]"
54
+ :options='param.params'
55
+ close-on-select
56
+ >
57
+ </v-select>
58
+ </div>
59
+ </template>
53
60
  </div>
54
61
  </div>
55
62
  <div class="form-group col-sm-4" style="float:right;white-space: nowrap;width: auto">
@@ -60,23 +67,39 @@
60
67
  </div>
61
68
  <div class="binary-right" style="width:48%;overflow-y: auto;max-height:1000px;" v-if="user">
62
69
  <div class="row list_area table_sy">
63
- <h4 style="display:inline-block;"><font style="font-weight: bold">已选中客户数:</font>{{user.length}}</h4>
64
- <div v-if="condition" class="row auto">
65
- <h4 style="display:inline-block;"><font style="font-weight: bold">查询条件:</font>{{condition}}</h4>
70
+ <h4 style="display:inline-block;"><font style="font-weight: bold">已选中客户数:</font>{{ user.length }}</h4>
71
+ <div v-if="condition" class="row auto">
72
+ <h4 style="display:inline-block;"><font style="font-weight: bold">查询条件:</font>{{ condition }}</h4>
66
73
  </div>
67
- <table class="table table-bordered table-striped table-hover" style="margin-top: 15px" id="table1" >
74
+ <table class="table table-bordered table-striped table-hover" style="margin-top: 15px" id="table1">
68
75
  <thead>
69
- <th style="text-align:center"><nobr>客户编号</nobr></th>
70
- <th style="text-align:center"><nobr>客户姓名</nobr></th>
71
- <th style="text-align:center"><nobr>客户类型</nobr></th>
72
- <th style="text-align:center"><nobr>气表品牌</nobr></th>
76
+ <th style="text-align:center">
77
+ <nobr>客户编号</nobr>
78
+ </th>
79
+ <th style="text-align:center">
80
+ <nobr>客户姓名</nobr>
81
+ </th>
82
+ <th style="text-align:center">
83
+ <nobr>客户类型</nobr>
84
+ </th>
85
+ <th style="text-align:center">
86
+ <nobr>气表品牌</nobr>
87
+ </th>
73
88
  </thead>
74
89
  <tbody>
75
90
  <tr v-for="row in user">
76
- <td><nobr>{{row.f_userinfo_code}}</nobr></td>
77
- <td><nobr>{{row.f_user_name}}</nobr></td>
78
- <td><nobr>{{row.f_user_type}}</nobr></td>
79
- <td><nobr>{{row.f_meter_brand}}</nobr></td>
91
+ <td>
92
+ <nobr>{{ row.f_userinfo_code }}</nobr>
93
+ </td>
94
+ <td>
95
+ <nobr>{{ row.f_user_name }}</nobr>
96
+ </td>
97
+ <td>
98
+ <nobr>{{ row.f_user_type }}</nobr>
99
+ </td>
100
+ <td>
101
+ <nobr>{{ row.f_meter_brand }}</nobr>
102
+ </td>
80
103
  </tr>
81
104
  </tbody>
82
105
  </table>
@@ -86,31 +109,47 @@
86
109
  <div class="binary-left" style="width:24% ;text-align:center;align-content: center;">
87
110
  <div class="row">
88
111
  <div v-for="data in newmeterinfo" style="height: auto">
89
- <ul class="nav nav-tabs col-sm-12" >
90
- <li class="active"><a>{{data.name}}</a></li>
112
+ <ul class="nav nav-tabs col-sm-12">
113
+ <li class="active"><a>{{ data.name }}</a></li>
91
114
  </ul>
92
- <div class="col-sm-12" style="height: auto" v-for="p in data.params">
93
- {{p.name}}:{{param[p.title]}}
115
+ <div class="col-sm-12" style="height: auto" v-for="p in data.params">
116
+ {{ p.name }}:{{ param[p.title] }}
94
117
  </div>
95
118
  </div>
96
119
  </div>
97
120
  </div>
98
121
  <div class="binary-right" style="width:74%;overflow-y: auto;max-height:1000px;">
99
122
  <div class="row list_area table_sy">
100
- <table class="table table-bordered table-striped table-hover" id="table1" >
123
+ <table class="table table-bordered table-striped table-hover" id="table1">
101
124
  <thead>
102
- <th style="text-align:center"><nobr>参数类型</nobr></th>
103
- <th style="text-align:center"><nobr>参数名</nobr></th>
104
- <th style="text-align:center"><nobr>旧参数值</nobr></th>
105
- <th style="text-align:center"><nobr>新参数值</nobr></th>
125
+ <th style="text-align:center">
126
+ <nobr>参数类型</nobr>
127
+ </th>
128
+ <th style="text-align:center">
129
+ <nobr>参数名</nobr>
130
+ </th>
131
+ <th style="text-align:center">
132
+ <nobr>旧参数值</nobr>
133
+ </th>
134
+ <th style="text-align:center">
135
+ <nobr>新参数值</nobr>
136
+ </th>
106
137
  <!-- <th style="text-align:center"><nobr>气表品牌</nobr></th>-->
107
138
  </thead>
108
139
  <tbody>
109
140
  <tr v-for="row in history">
110
- <td><nobr>{{row.f_param_group_name}}</nobr></td>
111
- <td><nobr>{{row.f_param_name}}</nobr></td>
112
- <td><nobr>{{row.oldvalue}}</nobr></td>
113
- <td><nobr>{{row.f_param_value}}</nobr></td>
141
+ <td>
142
+ <nobr>{{ row.f_param_group_name }}</nobr>
143
+ </td>
144
+ <td>
145
+ <nobr>{{ row.f_param_name }}</nobr>
146
+ </td>
147
+ <td>
148
+ <nobr>{{ row.oldvalue }}</nobr>
149
+ </td>
150
+ <td>
151
+ <nobr>{{ row.f_param_value }}</nobr>
152
+ </td>
114
153
 
115
154
  <!-- <td><nobr>{{row.f_user_type}}</nobr></td>-->
116
155
  <!-- <td><nobr>{{row.f_meter_brand}}</nobr></td>-->
@@ -125,235 +164,273 @@
125
164
 
126
165
 
127
166
  <script>
128
- import {HttpResetClass} from 'vue-client'
129
- import RadioBtn from './RadioBtn'
167
+ import {HttpResetClass} from 'vue-client'
168
+ import RadioBtn from './RadioBtn'
169
+
130
170
  export default {
131
- title: '参数设置',
132
- props: ['user', 'checked1', 'gasbrandid', 'condition'],
133
- components: {RadioBtn},
134
- data () {
135
- return {
136
- newmeterinfo: [{}],
137
- row: {},
138
- gasbrand: null,
139
- paramtypes: [],
140
- paramtype: '',
141
- param: {},
142
- history: [],
143
- isenbale: false
144
- }
145
- },
146
- ready () {
171
+ title: '参数设置',
172
+ props: ['user', 'checked1', 'gasbrandid', 'condition'],
173
+ components: {RadioBtn},
174
+ data () {
175
+ return {
176
+ newmeterinfo: [{}],
177
+ row: {},
178
+ gasbrand: null,
179
+ paramtypes: [],
180
+ paramtype: '',
181
+ param: {},
182
+ history: [],
183
+ isenbale: false
184
+ }
185
+ },
186
+ ready () {
147
187
 
148
- },
149
- watch: {
150
- param: {
151
- handler: function (val) {
152
- console.log('--------------param变了', val)
153
- },
154
- deep: true
188
+ },
189
+ watch: {
190
+ param: {
191
+ handler: function (val) {
192
+ console.log('--------------param变了', val)
155
193
  },
156
- 'gasbrandid' (val) {
157
- if (val[0]) {
158
- this.refreshParam(val[0])
159
- }
160
- },
161
- 'paramtype' (val) {
162
- console.log('改了paramtype!', val)
163
- this.row = {}
164
- if (val) {
165
- // if (this.user.length === 1) {
166
- // this.$resetpost('rs/sql/getIotParams', {data: {t_userfiles_id: this.user[0].f_userfiles_id}}, {resolveMsg: null, rejectMsg: null}).then((rat) => {
167
- // this.row = {}
168
- // if (rat.data.length > 0) {
169
- // rat.data.forEach((item) => {
170
- // console.log('=============>this.paramtype', val)
171
- // console.log('=============>item', item.f_param_group_name)
172
- // if (val === item.f_param_group_name) {
173
- // this.$set('row.' + item.f_param_lname, item.f_param_value)
174
- // }
175
- // })
176
- // // let param = JSON.parse(rat.data[0].f_data)
177
- // // console.log(param)
178
- // // this.row= param
179
- // }
180
- // })
181
- // }
182
- }
194
+ deep: true
195
+ },
196
+ 'gasbrandid' (val) {
197
+ if (val[0]) {
198
+ this.refreshParam(val[0])
183
199
  }
184
200
  },
185
- methods: {
186
- close () {
187
- this.row = {}
188
- this.$dispatch('close')
189
- },
190
- async setParamDefault () {
191
- let params = []
192
- for (let i = 0; i < this.newmeterinfo.length; i++) {
193
- for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
194
- if (this.newmeterinfo[i].name === this.paramtype) {
195
- if (this.newmeterinfo[i].params[j].isenbale) {
201
+ 'paramtype' (val) {
202
+ console.log('改了paramtype!', val)
203
+ this.row = {}
204
+ if (val) {
205
+ // if (this.user.length === 1) {
206
+ // this.$resetpost('rs/sql/getIotParams', {data: {t_userfiles_id: this.user[0].f_userfiles_id}}, {resolveMsg: null, rejectMsg: null}).then((rat) => {
207
+ // this.row = {}
208
+ // if (rat.data.length > 0) {
209
+ // rat.data.forEach((item) => {
210
+ // console.log('=============>this.paramtype', val)
211
+ // console.log('=============>item', item.f_param_group_name)
212
+ // if (val === item.f_param_group_name) {
213
+ // this.$set('row.' + item.f_param_lname, item.f_param_value)
214
+ // }
215
+ // })
216
+ // // let param = JSON.parse(rat.data[0].f_data)
217
+ // // console.log(param)
218
+ // // this.row= param
219
+ // }
220
+ // })
221
+ // }
222
+ }
223
+ }
224
+ },
225
+ methods: {
226
+ close () {
227
+ this.row = {}
228
+ this.$dispatch('close')
229
+ },
230
+ async setParamDefault () {
231
+ let params = []
232
+ for (let i = 0; i < this.newmeterinfo.length; i++) {
233
+ for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
234
+ if (this.newmeterinfo[i].name === this.paramtype) {
235
+ for (let key in this.row) {
236
+ if (key === this.newmeterinfo[i].params[j].title) {
196
237
  let data = {}
197
- data.param_value = data.param_content = this.newmeterinfo[i].params[j].default_value
198
238
  data.param_group = this.newmeterinfo[i].name
199
239
  data.param_name = this.newmeterinfo[i].params[j].name
240
+ data.param_value = this.row[key] ? (this.row[key].code ? this.row[key].code : this.row[key]) : null
241
+ data.param_content = this.row[key] ? (this.row[key].content ? this.row[key].content : this.row[key]) : null
200
242
  data.param_lname = this.newmeterinfo[i].params[j].title
201
- params.push(data)
243
+ if (this.paramtype === '设置表功能开关') {
244
+ if (this.row[key].length === 2 || (this.row[key].length === 1 && this.row[key][0] === '启用')) {
245
+ data.param_value = data.param_content = '1'
246
+ }
247
+ if (this.row[key].length === 0) {
248
+ data.param_value = data.param_content = '0'
249
+ }
250
+ if (!(this.row[key].length === 1 && this.row[key][0] === '保持不变')) {
251
+ params.push(data)
252
+ }
253
+ } else if (this.row[key]) {
254
+ params.push(data)
255
+ }
202
256
  }
203
257
  }
204
258
  }
205
259
  }
206
- if (params.length === 0) {
207
- this.$showAlert('没有需要设置得参数', 'warning', 2000)
208
- return
209
- }
210
- let param = {
211
- condition: 'g.f_gasbrand_id = ' + this.gasbrandid[0],
212
- switchCheckAll: this.checked1,
213
- users: '',
214
- params: params,
215
- f_alias: this.gasbrand.f_alias,
216
- columnName: '',
217
- // inputter_name: this.$login.f.name,
218
- f_operator: this.$login.f.name,
219
- f_operatorid: this.$login.f.id,
220
- f_orgid: this.$login.f.orgid,
221
- f_orgname: this.$login.f.orgs,
222
- f_depid: this.$login.f.depids,
223
- f_depname: this.$login.f.deps,
224
- f_gasbrand_id: this.gasbrandid[0]
225
- }
226
- console.log(param)
227
- await this.$resetpost('/rs/logic/alteration_batch', {data: param}, {rejectMsg: '批量保存失败', resolveMsg: '保存成功'})
228
- this.row = null
229
- this.$dispatch('clear')
230
- },
231
- async setParam () {
232
- let user = []
233
- let filesid = ''
234
- this.user.forEach((item) => {
235
- user.push(item.f_userfiles_id)
236
- filesid += item.f_userfiles_id + ','
237
- })
238
- filesid = filesid.substr(0, filesid.length - 1)
239
- let params = []
240
- for (let i = 0; i < this.newmeterinfo.length; i++) {
241
- for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
242
- if (this.newmeterinfo[i].name === this.paramtype) {
243
- if (this.newmeterinfo[i].params[j].isenbale) {
260
+ }
261
+ let param = {
262
+ condition: 'g.f_gasbrand_id = ' + this.gasbrandid[0],
263
+ switchCheckAll: this.checked1,
264
+ users: '',
265
+ params: params,
266
+ f_alias: this.gasbrand.f_alias,
267
+ columnName: '',
268
+ // inputter_name: this.$login.f.name,
269
+ f_operator: this.$login.f.name,
270
+ f_operatorid: this.$login.f.id,
271
+ f_orgid: this.$login.f.orgid,
272
+ f_orgname: this.$login.f.orgs,
273
+ f_depid: this.$login.f.depids,
274
+ f_depname: this.$login.f.deps,
275
+ f_gasbrand_id: this.gasbrandid[0]
276
+ }
277
+ console.log(param)
278
+ await this.$resetpost('/rs/logic/alteration_batch', {data: param}, {
279
+ rejectMsg: '批量保存失败',
280
+ resolveMsg: '保存成功'
281
+ })
282
+ this.row = null
283
+ this.$dispatch('clear')
284
+ },
285
+ async setParam () {
286
+ let user = []
287
+ let filesid = ''
288
+ this.user.forEach((item) => {
289
+ user.push(item.f_userfiles_id)
290
+ filesid += item.f_userfiles_id + ','
291
+ })
292
+ filesid = filesid.substr(0, filesid.length - 1)
293
+ let params = []
294
+ for (let i = 0; i < this.newmeterinfo.length; i++) {
295
+ for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
296
+ console.log('this.newmeterinfo[i].name === this.paramtype', this.newmeterinfo[i].name === this.paramtype)
297
+ console.log('this.newmeterinfo[i].name === this.paramtype', this.paramtype)
298
+ if (this.newmeterinfo[i].name === this.paramtype) {
299
+ for (let key in this.row) {
300
+ console.log('this.newmeterinfo[i].params[j].title', this.newmeterinfo[i].params[j].title)
301
+ if (key === this.newmeterinfo[i].params[j].title) {
244
302
  let data = {}
245
- data.param_value = data.param_content = this.newmeterinfo[i].params[j].default_value
246
303
  data.param_group = this.newmeterinfo[i].name
247
304
  data.param_name = this.newmeterinfo[i].params[j].name
305
+ data.tag = this.newmeterinfo[i].params[j].tag
306
+ data.param_value = this.row[key] ? (this.row[key].code ? this.row[key].code : this.row[key]) : null
307
+ data.param_content = this.row[key] ? (this.row[key].content ? this.row[key].content : this.row[key]) : null
248
308
  data.param_lname = this.newmeterinfo[i].params[j].title
249
- params.push(data)
309
+ if (this.paramtype === '设置表功能开关') {
310
+ debugger
311
+ if (this.row[key].length === 2 || (this.row[key].length === 1 && this.row[key][0] === '启用')) {
312
+ data.param_value = data.param_content = '1'
313
+ }
314
+ if (this.row[key].length === 0) {
315
+ data.param_value = data.param_content = '0'
316
+ }
317
+ if (!(this.row[key].length === 1 && this.row[key][0] === '保持不变')) {
318
+ params.push(data)
319
+ }
320
+ } else if (this.row[key]) {
321
+ params.push(data)
322
+ }
250
323
  }
251
324
  }
252
325
  }
253
326
  }
254
- if (params.length === 0) {
255
- this.$showAlert('没有需要设置得参数', 'warning', 2000)
256
- return
257
- }
258
- let param = {
259
- condition: 'g.f_gasbrand_id = ' + this.gasbrandid[0] + ' and f.f_userfiles_id in (' + filesid + ')',
260
- switchCheckAll: this.checked1,
261
- users: user,
262
- params: params,
263
- f_alias: this.gasbrand.f_alias,
264
- columnName: 'g.f_userfiles_id',
265
- // inputter_name: this.$login.f.name,
266
- f_operator: this.$login.f.name,
267
- f_operatorid: this.$login.f.id,
268
- f_orgid: this.$login.f.orgid,
269
- f_orgname: this.$login.f.orgs,
270
- f_depid: this.$login.f.depids,
271
- f_depname: this.$login.f.deps,
272
- f_gasbrand_id: this.gasbrandid[0]
273
- }
274
- console.log(param)
275
- await this.$resetpost('/rs/logic/alteration_batch', {data: param}, {rejectMsg: '批量保存失败', resolveMsg: '保存成功'})
276
- this.row = null
277
- this.$dispatch('clear')
278
- },
279
- async refreshParam (val) {
280
- this.paramtypes = []
281
- let temp = {
282
- tablename: 't_gasbrand',
283
- condition: `id=${val}`
284
- }
285
- await this.$resetpost('rs/sql/saleSingleTable', {data: temp}, {resolveMsg: null, rejectMsg: null}).then((res) => {
286
- this.gasbrand = res.data[0]
287
- })
288
- this.newmeterinfo = [{}]
327
+ }
328
+ debugger
329
+ let param = {
330
+ condition: 'g.f_gasbrand_id = ' + this.gasbrandid[0] + ' and f.f_userfiles_id in (' + filesid + ')',
331
+ switchCheckAll: this.checked1,
332
+ users: user,
333
+ params: params,
334
+ f_alias: this.gasbrand.f_alias,
335
+ columnName: 'g.f_userfiles_id',
336
+ // inputter_name: this.$login.f.name,
337
+ f_operator: this.$login.f.name,
338
+ f_operatorid: this.$login.f.id,
339
+ f_orgid: this.$login.f.orgid,
340
+ f_orgname: this.$login.f.orgs,
341
+ f_depid: this.$login.f.depids,
342
+ f_depname: this.$login.f.deps,
343
+ f_gasbrand_id: this.gasbrandid[0]
344
+ }
345
+ console.log(param)
346
+ await this.$resetpost('/rs/logic/alteration_batch', {data: param}, {
347
+ rejectMsg: '批量保存失败',
348
+ resolveMsg: '保存成功'
349
+ })
350
+ this.row = null
351
+ this.$dispatch('clear')
352
+ },
353
+ async refreshParam (val) {
354
+ this.paramtypes = []
355
+ let temp = {
356
+ tablename: 't_gasbrand',
357
+ condition: `id=${val}`
358
+ }
359
+ await this.$resetpost('rs/sql/saleSingleTable', {data: temp}, {resolveMsg: null, rejectMsg: null}).then((res) => {
360
+ this.gasbrand = res.data[0]
361
+ })
362
+ this.newmeterinfo = [{}]
289
363
 
290
- let res = await this.$resetpost('/webmeter/rs/logic/getParamsByGasBrand', {data: {gasBrandId: val}}, {resolveMsg: '参数已加载', rejectMsg: null})
291
- let allDefaultValue = await this.$resetpost('/rs/sql/getAllDefaultValues', {data: {gasBrandId: val}}, {
292
- resolveMsg: null,
293
- rejectMsg: null
294
- })
295
- this.newmeterinfo = res.data
296
- for (let i = 0; i < this.newmeterinfo.length; i++) {
297
- this.paramtypes.push({label: this.newmeterinfo[i].name, value: this.newmeterinfo[i].name})
298
- for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
299
- this.newmeterinfo[i].params[j].isenbale = false
300
- for (let n = 0; n < allDefaultValue.data.length; n++) {
301
- if (this.newmeterinfo[i].params[j].name === allDefaultValue.data[n].f_param_name && this.newmeterinfo[i].name === allDefaultValue.data[n].f_group_name && allDefaultValue.data[n].f_param_title === this.newmeterinfo[i].params[j].title) {
302
- this.newmeterinfo[i].params[j].default_value = allDefaultValue.data[n].f_param_value
303
- this.newmeterinfo[i].params[j].default_id = allDefaultValue.data[n].default_id
304
- break
305
- }
364
+ let res = await this.$resetpost('/webmeter/rs/logic/getParamsByGasBrand', {data: {gasBrandId: val}}, {
365
+ resolveMsg: '参数已加载',
366
+ rejectMsg: null
367
+ })
368
+ let allDefaultValue = await this.$resetpost('/rs/sql/getAllDefaultValues', {data: {gasBrandId: val}}, {
369
+ resolveMsg: null,
370
+ rejectMsg: null
371
+ })
372
+ this.newmeterinfo = res.data
373
+ for (let i = 0; i < this.newmeterinfo.length; i++) {
374
+ this.paramtypes.push({label: this.newmeterinfo[i].name, value: this.newmeterinfo[i].name})
375
+ for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
376
+ this.newmeterinfo[i].params[j].isenbale = []
377
+ for (let n = 0; n < allDefaultValue.data.length; n++) {
378
+ if (this.newmeterinfo[i].params[j].name === allDefaultValue.data[n].f_param_name && this.newmeterinfo[i].name === allDefaultValue.data[n].f_group_name && allDefaultValue.data[n].f_param_title === this.newmeterinfo[i].params[j].title) {
379
+ this.newmeterinfo[i].params[j].default_value = allDefaultValue.data[n].f_param_value
380
+ this.newmeterinfo[i].params[j].default_id = allDefaultValue.data[n].default_id
381
+ break
306
382
  }
307
- if (this.newmeterinfo[i].params[j].params instanceof Array) {
308
- for (let k = 0; k < this.newmeterinfo[i].params[j].params.length; k++) {
309
- this.newmeterinfo[i].params[j].params[k].value = {
310
- id: this.newmeterinfo[i].params[j].params[k].label,
311
- code: this.newmeterinfo[i].params[j].params[k].value,
312
- content: this.newmeterinfo[i].params[j].params[k].label
313
- }
383
+ }
384
+ if (this.newmeterinfo[i].params[j].params instanceof Array) {
385
+ for (let k = 0; k < this.newmeterinfo[i].params[j].params.length; k++) {
386
+ this.newmeterinfo[i].params[j].params[k].value = {
387
+ id: this.newmeterinfo[i].params[j].params[k].label,
388
+ code: this.newmeterinfo[i].params[j].params[k].value,
389
+ content: this.newmeterinfo[i].params[j].params[k].label
314
390
  }
315
391
  }
316
392
  }
317
393
  }
318
- this.$dispatch('showparam', true)
319
- },
320
- async getBrandParamsHistory () {
321
- let http = new HttpResetClass()
322
- let res = await http.load('POST', 'rs/sql/getBrandParamHistory', {
323
- data: {
324
- condition: `ga.f_gasbrand_id= ${this.gasbrandid}`
394
+ }
395
+ this.$dispatch('showparam', true)
396
+ },
397
+ async getBrandParamsHistory () {
398
+ let http = new HttpResetClass()
399
+ let res = await http.load('POST', 'rs/sql/getBrandParamHistory', {
400
+ data: {
401
+ condition: `ga.f_gasbrand_id= ${this.gasbrandid}`
402
+ }
403
+ }, {resolveMsg: null, rejectMsg: '获取参数历史信息信息失败'})
404
+ this.history = res.data
405
+ let rat = await http.load('POST', 'rs/sql/singleTable_OrderBy', {
406
+ data: {
407
+ items: '*',
408
+ tablename: 't_gasparammanage',
409
+ condition: `f_gasbrand_id= ${this.gasbrandid}`,
410
+ orderitem: 'id'
411
+ }
412
+ }, {resolveMsg: null, rejectMsg: '获取参数历史信息信息失败'})
413
+ if (rat.data.length > 0) {
414
+ rat.data.forEach((item) => {
415
+ if (item.f_param_value === '1') {
416
+ item.f_param_value = '开'
325
417
  }
326
- }, {resolveMsg: null, rejectMsg: '获取参数历史信息信息失败'})
327
- this.history = res.data
328
- let rat = await http.load('POST', 'rs/sql/singleTable_OrderBy', {
329
- data: {
330
- items: '*',
331
- tablename: 't_gasparammanage',
332
- condition: `f_gasbrand_id= ${this.gasbrandid}`,
333
- orderitem: 'id'
418
+ if (item.f_param_value === '0') {
419
+ item.f_param_value = '关'
334
420
  }
335
- }, {resolveMsg: null, rejectMsg: '获取参数历史信息信息失败'})
336
- if (rat.data.length > 0) {
337
- rat.data.forEach((item) => {
338
- if (item.f_param_value === '1') {
339
- item.f_param_value = '开'
340
- }
341
- if (item.f_param_value === '0') {
342
- item.f_param_value = '关'
343
- }
344
- console.log('参数取出来了---', item.f_param_lname)
345
- this.$set(`param['${item.f_param_lname}']`, item.f_param_value)
346
- // this.param[item.f_param_lname] = item.f_param_value
347
- })
348
- }
349
- console.log('参数取出来了', this.param)
421
+ console.log('参数取出来了---', item.f_param_lname)
422
+ this.$set(`param['${item.f_param_lname}']`, item.f_param_value)
423
+ // this.param[item.f_param_lname] = item.f_param_value
424
+ })
350
425
  }
426
+ console.log('参数取出来了', this.param)
351
427
  }
352
428
  }
429
+ }
353
430
  </script>
354
431
  <style>
355
- .btn-border {
356
- border: none;
357
- border-radius: 6px;
358
- }
432
+ .btn-border {
433
+ border: none;
434
+ border-radius: 6px;
435
+ }
359
436
  </style>
@@ -1,16 +1,21 @@
1
1
  <template>
2
- <label>启用<input type="radio" v-model="value" @input="onChange(true)" :disabled="disabled" :value="true"/></label>
3
- <label>保持不变<input type="radio" v-model="value" @click="onChange(false)" :value="false"/></label>
2
+ <label>启用<input type="checkbox" v-model="value" @click="onChange('启用')" value="启用"/></label>
3
+ <label>保持不变<input type="checkbox" v-model="value" @click="onChange('保持不变')" value="保持不变"/></label>
4
4
  </template>
5
5
 
6
6
  <script>
7
7
  export default {
8
8
  name: 'RadioBtn',
9
9
  title: 'RadioBtn',
10
- props: ['value', 'disabled'],
10
+ props: {
11
+ value: {
12
+ type: Array,
13
+ default: []
14
+ }
15
+ },
11
16
  data () {
12
17
  return {
13
-
18
+ checked: []
14
19
  }
15
20
  },
16
21
  model: {
@@ -1,112 +1,112 @@
1
- <template>
2
- <div class="auto">
3
- <validator name='v'>
4
- <form novalidate class="form-horizontal">
5
- <div class="row">
6
- <div class="col-sm-4">
7
- <label for="f_paytype" class=" font_normal_body">付款方式:</label>
8
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_payment" disabled/>
9
- </div>
10
-
11
- <div class="col-sm-4">
12
- <label for="f_pregas" class=" font_normal_body">预购气量:</label>
13
- <input type="number" class="input_search" style="width: 60%" v-model="model.f_pregas" disabled>
14
- </div>
15
-
16
- <div class="col-sm-4">
17
- <label for="f_preamount" class=" font_normal_body">预购金额:</label>
18
- <input type="number" class="input_search" style="width: 60%" v-model="model.f_preamount" disabled>
19
- </div>
20
- </div>
21
- <div class="row" style="margin-top:6px;">
22
- <div class="col-sm-4">
23
- <label for="f_print" class="font_normal_body">收&ensp;款&ensp;人:</label>
24
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_operator" disabled>
25
- </div>
26
- <div class="col-sm-4">
27
- <label for="f_print" class="font_normal_body">部&emsp;&emsp;门:</label>
28
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_depname" disabled>
29
- </div>
30
- <div class="col-sm-4">
31
- <label for="f_print" class="font_normal_body">收费时间:</label>
32
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_operate_date" disabled>
33
- </div>
34
- </div>
35
-
36
- <div class="row" style="margin-top:6px;">
37
-
38
- <div class="col-sm-12">
39
- <label for="f_comments" class="font_normal_body">备&emsp;&emsp;注</label>
40
- <input type="text" class="input_search" style="width:87%" v-model="model.f_comments" placeholder="备注"/>
41
- </div>
42
- </div>
43
- </form>
44
- <print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="close" @printok="printok" :data='row'></print-bill>
45
- <div style="text-align:right;margin-top:80px;margin-right:50px;">
46
- <button class="button_search" @click="confirm()" v-if="jurisdiction.includes('线下写卡')" :disabled='clickConfirm'>写卡</button>
47
- <button class="button_clear" @click="clean()">取消</button>
48
- </div>
49
- </validator>
50
- </div>
51
- </template>
52
- <script>
53
- /**
54
- *综合业务
55
- *卡表收费组件
56
- */
57
- import CardService from './CardService'
58
-
59
- // 执行保存逻辑
60
- let sellgasGen = async function (self) {
61
- try {
62
- self.row.cardInfo = self.cardData
63
- self.row.f_write_comments = self.model.f_comments
64
- await CardService.offlineWrite(self.row)
65
- // 开始打票
66
- self.clickConfirm = false
67
- self.$dispatch('success')
68
- } catch (error) {
69
- self.$showAlert(error, 'danger', 0)
70
- self.$dispatch('refresh')
71
- self.clickConfirm = false
72
- }
73
- }
74
-
75
- export default {
76
- title: '线下写卡',
77
- data () {
78
- return {
79
- model: {},
80
- clickConfirm: false,
81
- jurisdiction: this.$login.r
82
- }
83
- },
84
- props: ['row', 'cardData'],
85
- ready () {
86
- if (this.row.unWriteSell) {
87
- this.model = this.row.unWriteSell[0]
88
- }
89
- },
90
- methods: {
91
- confirm () {
92
- if (!this.cardData) {
93
- this.$showAlert('请先进行读卡再进行线下写卡', 'warning', 3000)
94
- return
95
- }
96
-
97
- this.clickConfirm = true
98
- this.$showMessage(`对用户${this.row.f_user_name}进行写卡操作。该操作只做写卡操作。确定要进行该操作吗?`, ['confirm', 'cancel']).then((res) => {
99
- if (res === 'confirm') {
100
- sellgasGen(this)
101
- }
102
- })
103
- },
104
- clean () {
105
- this.$dispatch('refresh', this.row)
106
- }
107
- }
108
- }
109
- </script>
110
-
111
- <style>
112
- </style>
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4">
7
+ <label for="f_paytype" class=" font_normal_body">付款方式:</label>
8
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_payment" disabled/>
9
+ </div>
10
+
11
+ <div class="col-sm-4">
12
+ <label for="f_pregas" class=" font_normal_body">预购气量:</label>
13
+ <input type="number" class="input_search" style="width: 60%" v-model="model.f_pregas" disabled>
14
+ </div>
15
+
16
+ <div class="col-sm-4">
17
+ <label for="f_preamount" class=" font_normal_body">预购金额:</label>
18
+ <input type="number" class="input_search" style="width: 60%" v-model="model.f_preamount" disabled>
19
+ </div>
20
+ </div>
21
+ <div class="row" style="margin-top:6px;">
22
+ <div class="col-sm-4">
23
+ <label for="f_print" class="font_normal_body">收&ensp;款&ensp;人:</label>
24
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_operator" disabled>
25
+ </div>
26
+ <div class="col-sm-4">
27
+ <label for="f_print" class="font_normal_body">部&emsp;&emsp;门:</label>
28
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_depname" disabled>
29
+ </div>
30
+ <div class="col-sm-4">
31
+ <label for="f_print" class="font_normal_body">收费时间:</label>
32
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_operate_date" disabled>
33
+ </div>
34
+ </div>
35
+
36
+ <div class="row" style="margin-top:6px;">
37
+
38
+ <div class="col-sm-12">
39
+ <label for="f_comments" class="font_normal_body">备&emsp;&emsp;注</label>
40
+ <input type="text" class="input_search" style="width:87%" v-model="model.f_comments" placeholder="备注"/>
41
+ </div>
42
+ </div>
43
+ </form>
44
+ <print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="close" @printok="printok" :data='row'></print-bill>
45
+ <div style="text-align:right;margin-top:80px;margin-right:50px;">
46
+ <button class="button_search" @click="confirm()" v-if="jurisdiction.includes('线下写卡')" :disabled='clickConfirm'>写卡</button>
47
+ <button class="button_clear" @click="clean()">取消</button>
48
+ </div>
49
+ </validator>
50
+ </div>
51
+ </template>
52
+ <script>
53
+ /**
54
+ *综合业务
55
+ *卡表收费组件
56
+ */
57
+ import CardService from './CardService'
58
+
59
+ // 执行保存逻辑
60
+ let sellgasGen = async function (self) {
61
+ try {
62
+ self.row.cardInfo = self.cardData
63
+ self.row.f_write_comments = self.model.f_comments
64
+ await CardService.offlineWrite(self.row)
65
+ // 开始打票
66
+ self.clickConfirm = false
67
+ self.$dispatch('success')
68
+ } catch (error) {
69
+ self.$showAlert(error, 'danger', 0)
70
+ self.$dispatch('refresh')
71
+ self.clickConfirm = false
72
+ }
73
+ }
74
+
75
+ export default {
76
+ title: '线下写卡',
77
+ data () {
78
+ return {
79
+ model: {},
80
+ clickConfirm: false,
81
+ jurisdiction: this.$login.r
82
+ }
83
+ },
84
+ props: ['row', 'cardData'],
85
+ ready () {
86
+ if (this.row.unWriteSell) {
87
+ this.model = this.row.unWriteSell[0]
88
+ }
89
+ },
90
+ methods: {
91
+ confirm () {
92
+ if (!this.cardData) {
93
+ this.$showAlert('请先进行读卡再进行线下写卡', 'warning', 3000)
94
+ return
95
+ }
96
+
97
+ this.clickConfirm = true
98
+ this.$showMessage(`对用户${this.row.f_user_name}进行写卡操作。该操作只做写卡操作。确定要进行该操作吗?`, ['confirm', 'cancel']).then((res) => {
99
+ if (res === 'confirm') {
100
+ sellgasGen(this)
101
+ }
102
+ })
103
+ },
104
+ clean () {
105
+ this.$dispatch('refresh', this.row)
106
+ }
107
+ }
108
+ }
109
+ </script>
110
+
111
+ <style>
112
+ </style>
File without changes
@@ -1,2 +0,0 @@
1
- #Fri Apr 02 10:09:16 CST 2021
2
- gradle.version=3.5.1