sale-client 3.6.568 → 3.6.569

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.
@@ -1,2 +1,2 @@
1
- #Mon Apr 14 10:14:01 CST 2025
1
+ #Wed Jun 25 17:54:33 CST 2025
2
2
  gradle.version=5.2.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.568",
3
+ "version": "3.6.569",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -164,7 +164,7 @@
164
164
  f_user_id: this.data.f_user_id,
165
165
  f_userfiles_id: this.data.f_userfiles_id,
166
166
  version: this.data.version,
167
- f_refund_fee: (this.model.f_refund_fee - 0),
167
+ f_refund_fee: this.model.f_refund_fee,
168
168
  f_comments: this.model.f_comments,
169
169
  f_payment: this.model.f_payment[0],
170
170
  f_print: this.model.f_print[0],
@@ -129,7 +129,15 @@
129
129
  condition="i.f_user_level = '{}'"
130
130
  close-on-select style="width: 60%"></v-select>
131
131
  </div>
132
-
132
+ <div class="form-group col-sm-3" >
133
+ <label class="font_normal_body">组织机构</label>
134
+ <res-select :initresid='$parent.$parent.curorgid'
135
+ @res-select="$parent.$parent.getorg"
136
+ class="select select_list"
137
+ restype='organization'
138
+ style="width: 60%">
139
+ </res-select>
140
+ </div>
133
141
  <div class="form-group col-sm-3">
134
142
  <label class="font_normal_body">卡&emsp;&emsp;号</label>
135
143
  <input type="text" class="input_search" style="width:60%" v-model="model.f_card_id" placeholder='卡号'
@@ -844,7 +852,9 @@ let cardBtnGen = async function (self, val) {
844
852
  if (!this.f_orgid) {
845
853
  this.getorg([this.$login.f.orgid])
846
854
  }
847
-
855
+ if (this.f_orgid) {
856
+ args.condition = `u.f_filialeid in ${this.f_orgid} and ${args.condition}`
857
+ }
848
858
  this.excelCondition = args.condition
849
859
  args.condition = `${args.condition}`
850
860
  if (this.defbtn === '发卡售气') {
@@ -106,7 +106,7 @@ export default {
106
106
  // 获取用户信息
107
107
  getUser = await this.$resetpost('rs/sql/sale_getUser', {
108
108
  data: {
109
- condition: `gb.f_meter_type in ('机表','物联网表') and i.f_userinfo_code='${res.data.CardID}'`,
109
+ condition: `u.f_filialeid in ${forgid} and gb.f_meter_type in ('机表','物联网表') and i.f_userinfo_code='${res.data.CardID}'`,
110
110
  orderitem: `f_userinfo_id`
111
111
  }
112
112
  }, {resolveMsg: null, rejectMsg: '读卡失败'})
@@ -220,11 +220,11 @@ export default {
220
220
  xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
221
221
  }
222
222
  }
223
- xhr.send(form)
224
223
  if (Vue.$login && Vue.$login.jwt) {
225
224
  xhr.setRequestHeader('Authorization', 'Bearer ' + Vue.$login.jwtNew)
226
225
  xhr.setRequestHeader('Token', Vue.$login.jwt)
227
226
  }
227
+ xhr.send(form)
228
228
  setTimeout(() => {
229
229
  this.load(this)
230
230
  }, 5000)
@@ -0,0 +1,234 @@
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 form-group">
7
+ <label class="font_normal_body" title="参数名称:付款方式">收款方式</label>
8
+
9
+ <v-select v-model="f_payment"
10
+ placeholder='请选择'
11
+ style="width:60%"
12
+ :value.sync="model.f_payment"
13
+ :options='paytype'
14
+ close-on-select clear-button></v-select>
15
+
16
+ </div>
17
+ <div class="col-sm-4 form-group">
18
+ <label for="f_print" class="font_normal_body">打印格式</label>
19
+
20
+ <v-select id="print"
21
+ v-model="f_print"
22
+ style="width:60%"
23
+ placeholder='请选择'
24
+ :value.sync="model.f_print"
25
+ :options='printstyle'
26
+ close-on-select clear-button>
27
+ </v-select>
28
+ </div>
29
+ <div class="col-sm-4 form-group">
30
+ <label class="font_normal_body" title="参数值:计入/不计入,计入:更新档案结余及累购,不计入:只保存记录不对档案进行操作">计入累购</label>
31
+ <input v-show="false" v-model="model.f_add_gas" v-validate:f_operat_type='{required: true}'>
32
+ <v-select :value.sync="model.f_add_gas" value-single
33
+ :options='addGas' placeholder='请选择'
34
+ selected="是否计入累购"
35
+ style="width:60%"
36
+ close-on-select></v-select>
37
+ </div>
38
+ <div class="col-sm-4 form-group">
39
+ <label class="font_normal_body">剩余金额</label>
40
+ <input class="input_search" style="width:60%" type="number" v-model="data.f_balance" readonly>
41
+ </div>
42
+ </div>
43
+
44
+ <div class="row">
45
+
46
+
47
+ <div class="col-sm-8">
48
+ <label for="f_paper_account" class="font_normal_body ">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
49
+ <input class="input_search" style="width:80%" v-model="model.f_comments">
50
+ </div>
51
+ <div class="col-sm-4 form-group" v-if="!config.overBalance"
52
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
53
+ <label class="font_normal_body">退费金额</label>
54
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
55
+ v-validate:f_refund_fee='{required: true, dctest: [data.f_balance, "<=" ]}' placeholder="退费金额">
56
+ </div>
57
+ <div class="col-sm-4 form-group" v-if="config.overBalance"
58
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
59
+ <label class="font_normal_body">退费金额</label>
60
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
61
+ v-validate:f_refund_fee='{required: true, dctest: [0, ">=" ]}' placeholder="退费金额">
62
+ </div>
63
+ </div>
64
+ </form>
65
+ <div style="text-align:right;">
66
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
67
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
68
+ </div>
69
+ </validator>
70
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
71
+ <!--<print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="clean" @printok="printok" :data='printModel'></print-bill>-->
72
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="clean" @printok="printok" :data='printModel' v-ref:printbill></print-bill>
73
+ </div>
74
+
75
+ <upload :blodid="data.f_userinfo_id" :businessid="randomBusinessId" isremark="true" fusetype="退费管理"></upload>
76
+ </template>
77
+
78
+
79
+ <script>
80
+ let readyGen = async function (self) {
81
+ await self.$getConfig(self, 'MachineTRefund')
82
+ console.log('机表退费config', self.config)
83
+ // 默认打印格式
84
+ self.blodid = self.data.f_userinfo_id
85
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
86
+ self.model.f_payment = [self.config.payment]
87
+
88
+ self.model.f_use_type = self.config.billType
89
+ self.model.f_bill_type = self.model.f_print
90
+ self.hasValidateBill = self.config.hasBillManage
91
+ }
92
+
93
+ export default {
94
+ title: '机表退费',
95
+ data () {
96
+ return {
97
+ config: {
98
+ showupload: false, // 默认不上传附件
99
+ hasPrint: false, // 默认打票
100
+ hasBillManage: false, // 默认不启用发票管理
101
+ overBalance: false, // 为true时退费金额可以大于余额
102
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
103
+ payment: '现金缴费',
104
+ billType: '燃气费'
105
+ },
106
+ model: {
107
+ f_refund_fee: '',
108
+ f_add_gas: '计入',
109
+ f_comments: '',
110
+ f_payment: '',
111
+ f_print: ''
112
+ },
113
+ addGas: [{label: '计入', value: '计入'}, {label: '不计入', value: '不计入'}],
114
+ blodid: '',
115
+ hasValidateBill: false,
116
+ randomBusinessId: '',
117
+ resid: [], // 存放新增的f_files表中id
118
+ validateOk: false,
119
+
120
+ printModel: {},
121
+ print: false,
122
+ billUrl: '',
123
+ billData: {
124
+ url: 'rs/report/refund_sell',
125
+ bill: ''
126
+ },
127
+
128
+ // 下拉框值
129
+ paytype: this.$appdata.getParam('付款方式'),
130
+ printstyle: this.$appdata.getParam('打印格式')
131
+ }
132
+ },
133
+ props: ['data'],
134
+ ready () {
135
+ /* if (this.data.f_billing === '按气量') {
136
+ this.$showAlert('按气量缴费的机表退费功能尚未开放!!', 'warning', 3000)
137
+ this.$dispatch('refresh')
138
+ } else { */
139
+ readyGen(this)
140
+ /* } */
141
+ this.getRandomId()
142
+ },
143
+ events: {
144
+ // 删除Resid数组元素
145
+ 'delResid' (val) {
146
+ this.resid.$remove({id: val, f_biobid: ''})
147
+ // this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
148
+ },
149
+ // 增加Resid数组元素
150
+ 'resid' (val) {
151
+ this.resid.push({id: val, f_biobid: ''})
152
+ }
153
+ },
154
+ methods: {
155
+ getRandomId () {
156
+ this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
157
+ let res = Math.random() * 16 | 0
158
+ let v = c == 'x' ? res : (res & 0x3 | 0x8)
159
+ return v.toString(16)
160
+ })
161
+ },
162
+ async confirm () {
163
+ let param = {
164
+ f_user_id: this.data.f_user_id,
165
+ f_userfiles_id: this.data.f_userfiles_id,
166
+ version: this.data.version,
167
+ f_refund_fee: (this.model.f_refund_fee - 0),
168
+ f_comments: this.model.f_comments,
169
+ f_payment: this.model.f_payment[0],
170
+ f_print: this.model.f_print[0],
171
+ f_price_id: this.data.f_price_id,
172
+ f_add_gas: this.model.f_add_gas,
173
+ f_total_fee: parseFloat(this.data.f_total_fee) - parseFloat(this.model.f_refund_fee),
174
+ f_stairprice_id: this.data.f_stairprice_id,
175
+ operInfo: {
176
+ f_operator: this.$login.f.name,
177
+ f_operatorid: this.$login.f.id,
178
+ f_orgid: this.$login.f.orgid,
179
+ f_orgname: this.$login.f.orgs,
180
+ f_depid: this.$login.f.depids,
181
+ f_depname: this.$login.f.deps
182
+ }
183
+ }
184
+ if (this.model.f_add_gas !== '计入') {
185
+ param.f_total_fee = this.data.f_total_fee
186
+ }
187
+ let res = await this.$resetpost('rs/logic/machineRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'})
188
+ console.log('机表退费返回的数据==========>', res)
189
+ let param1 = []
190
+ for (let row of this.resid) {
191
+ param1.push({id: row.id})
192
+ }
193
+ let data = {
194
+ param: param1,
195
+ f_blobid: res.data.id
196
+ }
197
+ await this.$resetpost('rs/logic/updatefiles', data)
198
+ if (this.model.f_print.indexOf('电子发票') == -1 && this.config.hasPrint && !this.$login.r.includes('不打印发票')) {
199
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
200
+ if (this.config.hasBillManage) {
201
+ // 启用发票管理,获取票据管理中的票号并存储记录
202
+ this.printModel.id = res.data.id
203
+ this.printModel.f_bill_type = '退费'
204
+ this.printModel.f_bill_style = this.model.f_print[0]
205
+ // this.billUrl = 'rs/report/refund_sell'
206
+ this.print = true
207
+ } else {
208
+ this.printModel.id = res.data.id
209
+ // this.billUrl = 'rs/report/refund_sell'
210
+ this.print = true
211
+ }
212
+ } else if (this.config.printType === '国税发票') {
213
+ // TODO
214
+ this.$dispatch('success')
215
+ } else if (this.config.printType === '电子发票') {
216
+ // TODO
217
+ this.$dispatch('success')
218
+ } else {
219
+ this.$dispatch('success')
220
+ }
221
+ },
222
+ clean () {
223
+ this.$dispatch('refresh')
224
+ },
225
+ printok () {
226
+ this.$dispatch('success')
227
+ },
228
+ validateBill (val) {
229
+ this.validateOk = !val.isOk
230
+ this.billData.bill = val.bill
231
+ }
232
+ }
233
+ }
234
+ </script>
@@ -0,0 +1,406 @@
1
+ <template>
2
+ <div class="binary-left" style="width:48%">
3
+ <div class="row auto">
4
+ <div class="col-sm-4">
5
+ <label class="font_normal_body" style="text-align:left">参数类型</label>
6
+ </div>
7
+ <div class="col-sm-8">
8
+ <v-select
9
+ placeholder="请选择参数类型"
10
+ :value.sync="paramtype"
11
+ style="width:40%"
12
+ width="40%"
13
+ :value-single="true"
14
+ v-model="paramtype"
15
+ :options='paramtypes'
16
+ close-on-select
17
+ ></v-select>
18
+ </div>
19
+ <!--<div class="col-sm-8" >
20
+ -&#45;&#45;&#45;&#45;{{row.overdueMessageValue}}
21
+ <input :type="text" v-model="row.overdueMessageValue" :value.sync="row.overdueMessageValue" style="width:70%" placeholder="" class="input_search">
22
+ </div>-->
23
+ <div v-for="data in newmeterinfo" style="height: auto">
24
+ <div class="col-sm-12" style="height: auto" v-if="data.name===paramtype" v-for="param in data.params">
25
+ <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:7%;color:#4a7cae" :title="param.remark"></p>
28
+ </div>
29
+ <div class="col-sm-8" v-if="param.type!=='option'">
30
+ <input :type="param.type" v-model="row[param.title]" :value.sync="row[param.title]" style="width:70%" placeholder="" class="input_search">
31
+ </div>
32
+ <div class="col-sm-8" v-if="param.type==='option'">
33
+ <v-select
34
+ :placeholder='param.name'
35
+ :value.sync="row[param.title]"
36
+ style="width:70%"
37
+ width="70%"
38
+ :multiple="param.multiple ? param.multiple : false"
39
+ :value-single="param.multiple ? param.multiple == true ? false : true : true"
40
+ :close-on-select="param.multiple ? param.multiple == true ? false : true :true"
41
+ v-model="row[param.title]"
42
+ :options='param.params'
43
+ >
44
+ </v-select>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <div class="form-group col-sm-4" style="float:right;white-space: nowrap;width: auto">
49
+ <button class="button_search" @click="setParam()" v-if="paramtype && user ">提交</button>
50
+ <button class="button_search" @click="setParamDefault()" v-if="paramtype && !user">提交</button>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ <div class="binary-right" style="width:48%;overflow-y: auto;max-height:1000px;" v-if="user">
55
+ <div class="row list_area table_sy">
56
+ <h4 style="display:inline-block;"><font style="font-weight: bold">已选中客户数:</font>{{user.length}}</h4>
57
+ <div v-if="condition" class="row auto">
58
+ <h4 style="display:inline-block;"><font style="font-weight: bold">查询条件:</font>{{condition}}</h4>
59
+ </div>
60
+ <table class="table table-bordered table-striped table-hover" style="margin-top: 15px" id="table1" >
61
+ <thead>
62
+ <th style="text-align:center"><nobr>客户编号</nobr></th>
63
+ <th style="text-align:center"><nobr>客户姓名</nobr></th>
64
+ <th style="text-align:center"><nobr>客户类型</nobr></th>
65
+ <th style="text-align:center"><nobr>气表品牌</nobr></th>
66
+ </thead>
67
+ <tbody>
68
+ <tr v-for="row in user">
69
+ <td><nobr>{{row.f_userinfo_code}}</nobr></td>
70
+ <td><nobr>{{row.f_user_name}}</nobr></td>
71
+ <td><nobr>{{row.f_user_type}}</nobr></td>
72
+ <td><nobr>{{row.f_meter_brand}}</nobr></td>
73
+ </tr>
74
+ </tbody>
75
+ </table>
76
+ </div>
77
+ </div>
78
+ <div class="binary-right flex-row" style="width:80%;overflow-y: auto;max-height:1000px;" v-if="!user">
79
+ <div class="binary-left" style="width:24% ;text-align:center;align-content: center;">
80
+ <div class="row">
81
+ <div v-for="data in newmeterinfo" style="height: auto">
82
+ <ul class="nav nav-tabs col-sm-12" >
83
+ <li class="active"><a>{{data.name}}</a></li>
84
+ </ul>
85
+ <div class="col-sm-12" style="height: auto" v-for="p in data.params">
86
+ {{p.name}}:{{param[p.title]}}
87
+ </div>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ <div class="binary-right" style="width:74%;overflow-y: auto;max-height:1000px;">
92
+ <div class="row list_area table_sy">
93
+ <table class="table table-bordered table-striped table-hover" id="table1" >
94
+ <thead>
95
+ <th style="text-align:center"><nobr>参数类型</nobr></th>
96
+ <th style="text-align:center"><nobr>参数名</nobr></th>
97
+ <th style="text-align:center"><nobr>旧参数值</nobr></th>
98
+ <th style="text-align:center"><nobr>新参数值</nobr></th>
99
+ <!-- <th style="text-align:center"><nobr>气表品牌</nobr></th>-->
100
+ </thead>
101
+ <tbody>
102
+ <tr v-for="row in history">
103
+ <td><nobr>{{row.f_param_group_name}}</nobr></td>
104
+ <td><nobr>{{row.f_param_name}}</nobr></td>
105
+ <td><nobr>{{row.oldvalue}}</nobr></td>
106
+ <td><nobr>{{row.f_param_value}}</nobr></td>
107
+
108
+ <!-- <td><nobr>{{row.f_user_type}}</nobr></td>-->
109
+ <!-- <td><nobr>{{row.f_meter_brand}}</nobr></td>-->
110
+ </tr>
111
+ </tbody>
112
+ </table>
113
+ </div>
114
+ </div>
115
+ </div>
116
+
117
+ </template>
118
+
119
+
120
+ <script>
121
+ import {HttpResetClass} from 'vue-client'
122
+ import axios from 'axios'
123
+
124
+ export default {
125
+ title: '参数设置',
126
+ props: ['user', 'checked1', 'gasbrandid', 'condition'],
127
+
128
+ data () {
129
+ return {
130
+ newmeterinfo: [{}],
131
+ row: {},
132
+ gasbrand: null,
133
+ paramtypes: [],
134
+ paramtype: '',
135
+ param: {},
136
+ history: []
137
+ }
138
+ },
139
+ ready () {
140
+
141
+ },
142
+ watch: {
143
+ param: {
144
+ handler: function (val) {
145
+ console.log('--------------param变了', val)
146
+ },
147
+ deep: true
148
+ },
149
+ 'gasbrandid' (val) {
150
+ if (val[0]) {
151
+ this.refreshParam(val[0])
152
+ }
153
+ },
154
+ 'paramtype' (val) {
155
+ console.log('改了paramtype!', val)
156
+ this.row = {}
157
+ if (val) {
158
+ for (let i = 0; i < this.newmeterinfo.length; i++) {
159
+ if (this.newmeterinfo[i].name == this.paramtype) {
160
+ const params = this.newmeterinfo[i].params
161
+ for (let j = 0; j < params.length; j++) {
162
+ const param = params[j]
163
+ if (param.data) {
164
+ if (Array.isArray(param.data)) {
165
+ this.$set(`row['${param.title}']`, [])
166
+ for (let u = 0; u < param.data.length; u++) {
167
+ for (let z = 0; z < param.params.length; z++) {
168
+ if (param.data[u] == param.params[z].value.code) {
169
+ this.row[param.title].push(param.params[z].value)
170
+ }
171
+ }
172
+ }
173
+ } else {
174
+ this.$set(`row['${param.title}']`, param.data)
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
180
+ console.log('this.row', this.row)
181
+ // if (this.user.length === 1) {
182
+ // this.$resetpost('rs/sql/getIotParams', {data: {t_userfiles_id: this.user[0].f_userfiles_id}}, {resolveMsg: null, rejectMsg: null}).then((rat) => {
183
+ // this.row = {}
184
+ // if (rat.data.length > 0) {
185
+ // rat.data.forEach((item) => {
186
+ // console.log('=============>this.paramtype', val)
187
+ // console.log('=============>item', item.f_param_group_name)
188
+ // if (val === item.f_param_group_name) {
189
+ // this.$set('row.' + item.f_param_lname, item.f_param_value)
190
+ // }
191
+ // })
192
+ // // let param = JSON.parse(rat.data[0].f_data)
193
+ // // console.log(param)
194
+ // // this.row= param
195
+ // }
196
+ // })
197
+ // }
198
+ }
199
+ }
200
+ },
201
+ methods: {
202
+ close () {
203
+ this.row = {}
204
+ this.$dispatch('close')
205
+ },
206
+ async setParamDefault () {
207
+ let params = []
208
+ for (let i = 0; i < this.newmeterinfo.length; i++) {
209
+ for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
210
+ if (this.newmeterinfo[i].name === this.paramtype) {
211
+ for (let key in this.row) {
212
+ if (key === this.newmeterinfo[i].params[j].title) {
213
+ let data = {}
214
+ data.tag = this.newmeterinfo[i].tag
215
+ data.param_group = this.newmeterinfo[i].name
216
+ data.param_name = this.newmeterinfo[i].params[j].name
217
+ if (this.row[key]) {
218
+ if (Array.isArray(this.row[key])) {
219
+ let valueArr = []
220
+ let contentArr = []
221
+ this.row[key].forEach((item, index) => {
222
+ valueArr.push(item.code)
223
+ contentArr.push(item.content)
224
+ })
225
+ data.param_value = valueArr
226
+ data.param_content = contentArr
227
+ } else if (Object.prototype.toString.call(this.row[key]) === '[object Object]') {
228
+ data.param_value = this.row[key].code
229
+ data.param_content = this.row[key].content
230
+ } else {
231
+ data.param_value = this.row[key]
232
+ data.param_content = this.row[key]
233
+ }
234
+ } else {
235
+ data.param_value = null
236
+ data.param_content = null
237
+ }
238
+ data.param_lname = this.newmeterinfo[i].params[j].title
239
+ if (this.row[key]) {
240
+ params.push(data)
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ let param = {
248
+ condition: 'g.f_gasbrand_id = ' + this.gasbrandid[0],
249
+ switchCheckAll: this.checked1,
250
+ users: '',
251
+ params: params,
252
+ f_alias: this.gasbrand.f_alias,
253
+ columnName: '',
254
+ // inputter_name: this.$login.f.name,
255
+ f_operator: this.$login.f.name,
256
+ f_operatorid: this.$login.f.id,
257
+ f_orgid: this.$login.f.orgid,
258
+ f_orgname: this.$login.f.orgs,
259
+ f_depid: this.$login.f.depids,
260
+ f_depname: this.$login.f.deps,
261
+ f_gasbrand_id: this.gasbrandid[0]
262
+ }
263
+ console.log(param)
264
+ await this.$resetpost('/rs/logic/alteration_batch', {data: param}, {rejectMsg: '批量保存失败', resolveMsg: '保存成功'})
265
+ this.row = null
266
+ this.$dispatch('clear')
267
+ },
268
+ async setParam () {
269
+ let user = []
270
+ let filesid = ''
271
+ this.user.forEach((item) => {
272
+ user.push(item.f_userfiles_id)
273
+ filesid += item.f_userfiles_id + ','
274
+ })
275
+ filesid = filesid.substr(0, filesid.length - 1)
276
+ let params = []
277
+ for (let i = 0; i < this.newmeterinfo.length; i++) {
278
+ for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
279
+ if (this.newmeterinfo[i].name === this.paramtype) {
280
+ for (let key in this.row) {
281
+ if (key === this.newmeterinfo[i].params[j].title) {
282
+ let data = {}
283
+ data.param_group = this.newmeterinfo[i].name
284
+ data.param_name = this.newmeterinfo[i].params[j].name
285
+ data.tag = this.newmeterinfo[i].tag
286
+ if (this.row[key]) {
287
+ if (Array.isArray(this.row[key])) {
288
+ let valueArr = []
289
+ let contentArr = []
290
+ this.row[key].forEach((item, index) => {
291
+ valueArr.push(item.code)
292
+ contentArr.push(item.content)
293
+ })
294
+ data.param_value = valueArr
295
+ data.param_content = contentArr
296
+ } else if (Object.prototype.toString.call(this.row[key]) === '[object Object]') {
297
+ data.param_value = this.row[key].code
298
+ data.param_content = this.row[key].content
299
+ } else {
300
+ data.param_value = this.row[key]
301
+ data.param_content = this.row[key]
302
+ }
303
+ } else {
304
+ data.param_value = null
305
+ data.param_content = null
306
+ }
307
+ data.param_lname = this.newmeterinfo[i].params[j].title
308
+ if (this.row[key]) {
309
+ params.push(data)
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }
315
+ }
316
+ debugger
317
+ let param = {
318
+ condition: 'g.f_gasbrand_id = ' + this.gasbrandid[0] + ' and f.f_userfiles_id in (' + filesid + ')',
319
+ switchCheckAll: this.checked1,
320
+ users: user,
321
+ params: params,
322
+ f_alias: this.gasbrand.f_alias,
323
+ columnName: 'g.f_userfiles_id',
324
+ // inputter_name: this.$login.f.name,
325
+ f_operator: this.$login.f.name,
326
+ f_operatorid: this.$login.f.id,
327
+ f_orgid: this.$login.f.orgid,
328
+ f_orgname: this.$login.f.orgs,
329
+ f_depid: this.$login.f.depids,
330
+ f_depname: this.$login.f.deps,
331
+ f_gasbrand_id: this.gasbrandid[0]
332
+ }
333
+ console.log(param)
334
+ await this.$resetpost('/rs/logic/alteration_batch', {data: param}, {rejectMsg: '批量保存失败', resolveMsg: '保存成功'})
335
+ this.row = null
336
+ this.$dispatch('clear')
337
+ },
338
+ async refreshParam (val) {
339
+ this.paramtypes = []
340
+ let temp = {
341
+ tablename: 't_gasbrand',
342
+ condition: `id=${val}`
343
+ }
344
+ await this.$resetpost('rs/sql/saleSingleTable', {data: temp}, {resolveMsg: null, rejectMsg: null}).then((res) => {
345
+ this.gasbrand = res.data[0]
346
+ })
347
+ this.newmeterinfo = [{}]
348
+ let res = await axios.post('/webmeter/rs/logic/getParamsByGasBrand', {data: {gasBrandId: val}}, {timeout: 10 * 60 * 1000})
349
+ // let res = await this.$resetpost('/webmeter/rs/logic/getParamsByGasBrand', {data: {gasBrandId: val}}, {resolveMsg: '参数已加载', rejectMsg: null})
350
+ this.newmeterinfo = res.data
351
+ for (let i = 0; i < this.newmeterinfo.length; i++) {
352
+ this.paramtypes.push({label: this.newmeterinfo[i].name, value: this.newmeterinfo[i].name})
353
+ for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
354
+ if (this.newmeterinfo[i].params[j].params instanceof Array) {
355
+ for (let k = 0; k < this.newmeterinfo[i].params[j].params.length; k++) {
356
+ this.newmeterinfo[i].params[j].params[k].value = {
357
+ id: this.newmeterinfo[i].params[j].params[k].label,
358
+ code: this.newmeterinfo[i].params[j].params[k].value,
359
+ content: this.newmeterinfo[i].params[j].params[k].label
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
365
+ this.$dispatch('showparam', true)
366
+ },
367
+ async getBrandParamsHistory () {
368
+ let http = new HttpResetClass()
369
+ let res = await http.load('POST', 'rs/sql/getBrandParamHistory', {
370
+ data: {
371
+ condition: `ga.f_gasbrand_id= ${this.gasbrandid}`
372
+ }
373
+ }, {resolveMsg: null, rejectMsg: '获取参数历史信息信息失败'})
374
+ this.history = res.data
375
+ let rat = await http.load('POST', 'rs/sql/singleTable_OrderBy', {
376
+ data: {
377
+ items: '*',
378
+ tablename: 't_gasparammanage',
379
+ condition: `f_gasbrand_id= ${this.gasbrandid}`,
380
+ orderitem: 'id desc'
381
+ }
382
+ }, {resolveMsg: null, rejectMsg: '获取参数历史信息信息失败'})
383
+ if (rat.data.length > 0) {
384
+ rat.data.forEach((item) => {
385
+ if (!this.param[item.f_param_lname]) {
386
+ console.log(item.f_param_value, item.f_param_content)
387
+ if (item.f_param_value != item.f_param_content && item.f_param_content) {
388
+ item.f_param_value = item.f_param_content
389
+ }
390
+ console.log('参数取出来了---', item.f_param_lname)
391
+ this.$set(`param['${item.f_param_lname}']`, item.f_param_value)
392
+ }
393
+ // this.param[item.f_param_lname] = item.f_param_value
394
+ })
395
+ }
396
+ console.log('参数取出来了', this.param)
397
+ }
398
+ }
399
+ }
400
+ </script>
401
+ <style>
402
+ .btn-border {
403
+ border: none;
404
+ border-radius: 6px;
405
+ }
406
+ </style>
@@ -119,4 +119,5 @@ export default function () {
119
119
  Vue.component('account-message-list', (resolve) => { require(['./revenue/sms/AccountMessageList.vue'], resolve) })
120
120
  // 付款码支付
121
121
  Vue.component('payment-code', (resolve) => { require(['./PaymentCode.vue'], resolve) })
122
+ Vue.component('param-set-form', (resolve) => { require(['./ParamSetForm'], resolve) })
122
123
  }
@@ -203,8 +203,9 @@
203
203
  :value.sync="row.f_price_ratio"
204
204
  v-validate:meternumber='{required: true }' placeholder='比率'>
205
205
  </div>
206
- <div class="col-sm-4 form-group" >
207
- <label for="f_scrap_date" class="font_normal_body">&ensp;检测日期</label>
206
+ <div class="col-sm-4 form-group" :class="[$m.f_scrap_date.required ? 'has-error' : '']">
207
+ <input type="text" v-model="row.f_scrap_date" v-show="false" v-validate:f_scrap_date='{required: true }'>
208
+ <label for="f_scrap_date" class="font_normal_body">&ensp;*检测日期</label>
208
209
  <datepicker style="width:60%" id="ScrapDate" placeholder="检测日期" width='100%'
209
210
  v-model="row.f_scrap_date"
210
211
  :value.sync="row.f_scrap_date"
@@ -193,11 +193,11 @@ export default {
193
193
  xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
194
194
  }
195
195
  }
196
- xhr.send(form)
197
196
  if (Vue.$login && Vue.$login.jwt) {
198
197
  xhr.setRequestHeader('Authorization', 'Bearer ' + Vue.$login.jwtNew)
199
198
  xhr.setRequestHeader('Token', Vue.$login.jwt)
200
199
  }
200
+ xhr.send(form)
201
201
  setTimeout(() => {
202
202
  this.load(this)
203
203
  }, 5000)
File without changes
File without changes
Binary file