sale-client 3.5.99 → 3.5.101

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.99",
3
+ "version": "3.5.101",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -676,7 +676,7 @@ export default {
676
676
  f_user_type: row.f_user_type,
677
677
  f_gasproperties: row.f_gasproperties,
678
678
  f_position: row.f_position,
679
- f_meter_book_num: row.f_meter_book,
679
+ f_meter_book_num: row.f_meter_book ? row.f_meter_book : '',
680
680
  f_usestate: '正常',
681
681
  f_adjustable: row.f_adjustable_id,
682
682
  f_install_date: row.f_install_date,
@@ -0,0 +1,304 @@
1
+ <template>
2
+ <div class="auto" >
3
+ <validator name='v'>
4
+ <div novalidate class=" select-overspread container-fluid auto" partial>
5
+ <ul class="nav nav-tabs">
6
+ <li class="active a-tabs"><a href="#">低保信息</a></li>
7
+ </ul>
8
+ <form class="form-horizontal form-group">
9
+ <div class="row">
10
+ <div class="col-sm-6 form-group">
11
+ <label class="font_normal_body">所属公司</label>
12
+ <res-select :initresid='curorgid' @res-select="getorg" is-mul="false" restype='organization'></res-select>
13
+ </div>
14
+ <div class="col-sm-6 form-group" :class="[$v.f_userinfo_code.required ? 'has-error' : 'has-success']">
15
+ <label for="f_userinfo_code" class="font_normal_body">用户编号</label>
16
+ <input class="input_search" style="width:60%" type="text" class="input_search" style="width:60%"
17
+ v-model="model.f_userinfo_code" @keyup.enter="getinfo()"
18
+ v-validate:f_userinfo_code='{required: true }' :disabled='isEdit' placeholder="输入编号,回车查询">
19
+ </div>
20
+ <div class="col-sm-6 form-group">
21
+ <label for="f_user_name" class=" font_normal_body">用户姓名</label>
22
+ <input class="input_search" style="width:60%" type="text" class="input_search" style="width:60%"
23
+ v-model="model.f_user_name" readonly
24
+ placeholder="用户姓名">
25
+
26
+ </div>
27
+ </div>
28
+
29
+ <div class="row">
30
+ <div class="col-sm-12 form-group" >
31
+ <label for="f_address" class=" font_normal_body">地&emsp;&emsp;址</label>
32
+ <input class="input_search" type="text" class="input_search" style="width:80%" v-model="model.f_address"
33
+ readonly
34
+ placeholder="地址">
35
+ </div>
36
+
37
+ </div>
38
+
39
+ <div class="row" >
40
+ <div class="col-sm-6 form-group" id="f_start_date" :class="[$v.f_start_date.required ? 'has-error' : 'has-success']">
41
+ <input type="text" class="input_search" style="width:60%" v-show="false" v-model="model.f_start_date"
42
+ v-validate:f_start_date='{required: true }'>
43
+ <label for="f_start_date" class=" font_normal_body">开始日期</label>
44
+ <datepicker style="width: 60%"
45
+ placeholder="开始日期"
46
+ v-model="model.f_start_date"
47
+ :value.sync="model.f_start_date"
48
+ class="datepicker"
49
+ :format="'yyyy-MM-dd'"
50
+ :disabled='isEdit'>
51
+ </datepicker>
52
+ </div>
53
+ <div class="col-sm-6 form-group" id="f_end_date" :class="[$v.f_end_date.required ? 'has-error' : 'has-success']">
54
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_end_date"
55
+ v-validate:f_end_date='{required: true }' v-show="false" >
56
+ <label for="f_end_date" class=" font_normal_body">结束日期</label>
57
+ <datepicker style="width: 60%"
58
+ placeholder="结束日期"
59
+ v-model="model.f_end_date"
60
+ :value.sync="model.f_end_date"
61
+ class="datepicker"
62
+ :format="'yyyy-MM-dd'"
63
+ :disabled='isEdit'>
64
+ </datepicker>
65
+
66
+ </div>
67
+ </div>
68
+
69
+ <div class="row">
70
+ <div class="col-sm-6 form-group" :class="[$v.f_price_id.required ? 'has-error' : 'has-success']">
71
+ <label class="font_normal_body">气&emsp;&emsp;价</label>
72
+ <input type="text" class="input_search" style="width:60%" v-show="false" v-model="model.f_price_id"
73
+ v-validate:f_price_id='{required: true }'>
74
+ <v-select id="f_price_name"
75
+ v-model="model.f_price_id"
76
+ :value.sync="model.f_price_id"
77
+ :options='pricename'
78
+ :value-single="true"
79
+ close-on-select></v-select>
80
+
81
+ </div>
82
+ </div>
83
+
84
+ <div style="text-align:right;height:auto;margin-top:6px;">
85
+ <button class="button_search" type="button" @click="confirm('确认')" v-if="!isEdit" :disabled='!$v.valid'>
86
+ 确认
87
+ </button>
88
+ <button class="button_search" type="button" style="width:100px;" @click="confirm('取消低保户')"
89
+ v-show="isBasicLiving1 || model.isBasicLiving1 =='true'" :disabled='!$v.valid'>
90
+ 取消低保户
91
+ </button>
92
+ <button class="button_search" type="button" @click="close()">取消</button>
93
+ </div>
94
+ <!--<upload :blodid="model.f_userinfo_id" cols="col-sm-12" isremark="true" fusetype="低保户"></upload>-->
95
+ </form>
96
+
97
+ </div>
98
+
99
+
100
+ </validator>
101
+
102
+ </div>
103
+ </template>
104
+ <script>
105
+ import {HttpResetClass} from 'vue-client'
106
+
107
+ let initGen = async function (self, val) {
108
+ // 获取低保气价
109
+ self.$resetpost('rs/sql/get_priceId',
110
+ {data: {f_orgid: self.f_filiale_id, condition: `f_islow_income = '1'`}},
111
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
112
+ let rs = []
113
+ for (let i = 0; i < res.data.length; i++) {
114
+ let temp = {
115
+ label: res.data[i].f_price_name,
116
+ value: res.data[i].f_price_id
117
+ }
118
+ rs.push(temp)
119
+ }
120
+ self.pricename = [...rs]
121
+ })
122
+
123
+ if (val) {
124
+ self.model = Object.assign({}, self.model, val)
125
+ }
126
+ // let http = new HttpResetClass()
127
+ // let res = await http.load('POST', 'rs/sql/get_BasicLiving',
128
+ // {data: {condition: `id = '${val.id}'`}}, {
129
+ // resolveMsg: null,
130
+ // rejectMsg: null
131
+ // })
132
+ // console.log(res.data)
133
+ // self.model = Object.assign({}, self.model, val)
134
+ // self.model.f_userinfo_code = res.data[0].f_userinfo_code
135
+ // self.model.f_userinfo_id = res.data[0].f_userinfo_id
136
+ // self.model.f_user_phone = res.data[0].f_user_phone
137
+ // self.model.f_address = res.data[0].f_address
138
+ // self.model.f_user_phone = res.data[0].f_user_phone
139
+ // self.model.f_start_date = res.data[0].f_start_date
140
+ // self.model.f_end_date = res.data[0].f_end_date
141
+ // self.model.f_period = res.data[0].f_period
142
+ // self.model.f_price_id = res.data[0].f_price_id
143
+ // self.model.f_price_name = res.data[0].f_price_name
144
+ // self.model.f_operator = self.$login.f.name
145
+ // self.model.f_operatorid = self.$login.f.id
146
+ // self.model.f_filialeid = self.model.f_filialeid ? self.model.f_filialeid : self.$login.f.orgid
147
+ // self.model.f_orgid = self.model.f_orgid ? self.model.f_orgid : self.$login.f.orgid
148
+ // self.model.f_orgname = self.model.f_orgname ? self.model.f_orgname : self.$login.f.orgs
149
+ // self.model.f_depid = self.model.f_depid ? self.model.f_depid : self.$login.f.depids
150
+ // self.model.f_depname = self.model.f_depname ? self.model.f_depname : self.$login.f.deps
151
+ }
152
+
153
+ export default {
154
+ title: '低保户',
155
+ props: {
156
+ f_islow_income: {
157
+ type: String,
158
+ default: '1'
159
+ },
160
+ data: {
161
+ type: Object
162
+ }
163
+ },
164
+ data () {
165
+ return {
166
+ // 公司树状图信息
167
+ curorgid: [this.$login.f.orgid],
168
+ pricename: [{value: '', label: ''}],
169
+ model: {
170
+ f_userinfo_code: '',
171
+ f_userinfo_id: '',
172
+ f_user_name: '',
173
+ f_address: '',
174
+ f_price_id: '',
175
+ f_price_name: '',
176
+ f_user_phone: '',
177
+ f_start_date: '',
178
+ f_end_date: '',
179
+ f_period: '',
180
+ f_state: '有效'
181
+
182
+ },
183
+ isBasicLiving1: false,
184
+ // 编辑控制
185
+ isEdit: false,
186
+ // 所属公司
187
+ f_filiale_id: this.$login.f.orgid,
188
+ // 所属公司名称
189
+ f_filiale_name: this.$login.f.orgs
190
+ }
191
+ },
192
+ ready () {
193
+ if (this.data) {
194
+ this.isBasicLiving1 = true
195
+ initGen(this, this.data)
196
+ } else {
197
+ this.initModel()
198
+ }
199
+ },
200
+ watch: {
201
+ 'data' (val) {
202
+ if (val) {
203
+ initGen(this, val)
204
+ } else {
205
+ this.initModel()
206
+ }
207
+ },
208
+ 'model.f_start_date' (val) {
209
+ if (this.model.f_end_date) {
210
+ this.compareDate(val, this.model.f_end_date)
211
+ }
212
+ },
213
+ 'model.f_end_date' (val) {
214
+ if (this.model.f_start_date) {
215
+ this.compareDate(this.model.f_start_date, val)
216
+ }
217
+ },
218
+ 'f_filiale_id' () {
219
+ initGen(this, this.data)
220
+ }
221
+ },
222
+ methods: {
223
+
224
+ async getinfo () {
225
+ let res = await this.$resetpost('rs/sql/sale_getUserAndPeriod',
226
+ {data: {condition: "f_userinfo_code = '" + this.model.f_userinfo_code + "' and f_orgid ='" + this.f_filiale_id + "'"}}, {
227
+ resolveMsg: null,
228
+ rejectMsg: null
229
+ })
230
+ if (res.data.length == 0) {
231
+ this.$showAlert('查询无此用户!!请核对编号', 'warning', 3000)
232
+ } else {
233
+ this.model = res.data[0]
234
+ this.$parent.blodid = this.model.f_userinfo_id
235
+ this.model.f_start_date = this.$login.toStandardDateString()
236
+ }
237
+ },
238
+ async confirm (type) {
239
+ // if (type == '取消低保户' && !this.$login.r.find(value => value == '取消低保户')) {
240
+ // this.$showMessage('你没有取消低保户的权限,请联系管理员!')
241
+ // return
242
+ // }
243
+ if (type == '取消低保户'){
244
+ let data = {
245
+ f_userinfo_code: this.f_userinfo_code,
246
+ f_userinfo_id: this.model.f_userinfo_id,
247
+ f_user_name: this.model.f_user_name,
248
+ f_address: this.model.f_address,
249
+ f_price_id: this.model.f_price_id,
250
+ f_price_name: this.model.f_price_name
251
+ }
252
+ let res =await this.$resetpost('rs/logic/stopBasicLivingNew', {data: data},{resolveMsg: null, rejectMsg: null})
253
+ this.initModel()
254
+ this.$dispatch('success','isBasicLiving')
255
+ }else {
256
+ await this.$LogicService.basicLiving(this.model, this.data)
257
+ this.initModel()
258
+ this.$dispatch('success', 'isBasicLiving')
259
+ }
260
+ },
261
+ getorg (id, name) {
262
+ this.f_filialeid = id[0]
263
+ this.f_filialename = name[0]
264
+ },
265
+ initModel () {
266
+ this.model = {
267
+ f_userinfo_code: '',
268
+ f_userinfo_id: '',
269
+ f_user_name: '',
270
+ f_address: '',
271
+ f_price_id: 0,
272
+ f_price_name: '',
273
+ f_user_phone: '',
274
+ f_start_date: '',
275
+ f_end_date: '',
276
+ f_period: '',
277
+ f_state: '正常'
278
+ }
279
+ },
280
+ close () {
281
+ this.$dispatch('close')
282
+ },
283
+
284
+ compareDate (date1, date2) {
285
+ let s = new Date(date1)
286
+ let e = new Date(date2)
287
+ if (e < s) {
288
+ this.model.f_start_date = ''
289
+ this.model.f_end_date = ''
290
+ this.$showAlert('结束日期不能小于开始日期', 'warning', 2000)
291
+ }
292
+ }
293
+ }
294
+ }
295
+ </script>
296
+ <style lang="less">
297
+ #gas-price-form {
298
+ .form-group {
299
+ margin-left: 0px;
300
+ margin-right: 0px;
301
+ }
302
+ }
303
+
304
+ </style>
@@ -10,6 +10,7 @@ let specialComp = {
10
10
  // 气价管理(新增)
11
11
  'gas-price': (resolve) => { require(['./components/comprehen/StairPrice/GasPrice'], resolve) },
12
12
  // 档案信息(V3现用档案管理)
13
- 'file-user-files': (resolve) => { require(['./components/FilesManage/FileUserFiles'], resolve) }
13
+ 'file-user-files': (resolve) => { require(['./components/FilesManage/FileUserFiles'], resolve) },
14
+ 'basic-living': (resolve) => { require(['./components/BasicLiving'], resolve) }
14
15
  }
15
16
  exports.specialComp = specialComp
@@ -44,7 +44,6 @@
44
44
  created () {
45
45
  },
46
46
  ready () {
47
- console.log('日你妈')
48
47
  },
49
48
  methods: {
50
49
  // 返回结果为true意味着可以通行
@@ -14,5 +14,7 @@ let specialComp = {
14
14
  'change_fill_sendcard': (resolve) => { require(['./ChangeSendCard'], resolve) },
15
15
  // 发卡售气
16
16
  'show-card-sell-gas': (resolve) => { require(['./ShowCardSellGas'], resolve) },
17
+ // 卡表收费
18
+ 'card-meter-center': (resolve) => { require(['./CardMeterCenter'], resolve) },
17
19
  }
18
20
  exports.specialComp = specialComp
@@ -0,0 +1,518 @@
1
+ <template>
2
+ <div class="auto select-overspread" >
3
+ <validator name='v'>
4
+ <form class="form-horizontal" novalidate>
5
+ <ul class="nav nav-tabs" style="margin-bottom: 10px">
6
+ <li class="active"><a href="#">气价信息</a></li>
7
+ </ul>
8
+ <div class="row">
9
+ <div :class="[$v.f_user_type.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
10
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_user_type" v-show="false"
11
+ v-validate:f_user_type='{required: true }'>
12
+ <label title="参数:用户类型" class="font_normal_body" for="f_user_type">客户类型</label>
13
+ <v-select :disabled='isEdit'
14
+ :options='usertype'
15
+ :value-single="true"
16
+ :value.sync="model.f_user_type"
17
+ @change="usertypeChange"
18
+ close-on-select
19
+ placeholder='请选择'
20
+ v-model="model.f_user_type">
21
+ </v-select>
22
+ </div>
23
+ <div :class="[$v.f_gasproperties.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
24
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_gasproperties" v-show="false"
25
+ v-validate:f_gasproperties='{required: true }'>
26
+ <label class="font_normal_body" for="f_gasproperties">用气性质</label>
27
+ <v-select :disabled='isEdit'
28
+ :options='gastype'
29
+ :value-single="true"
30
+ :value.sync="model.f_gasproperties"
31
+ close-on-select
32
+ placeholder='请选择'
33
+ v-model="model.f_gasproperties">
34
+ </v-select>
35
+ </div>
36
+ <div :class="[$v.f_price_type.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
37
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_price_type" v-show="false"
38
+ v-validate:f_price_type='{required: true }'>
39
+ <label title="参数:气价类型" class="font_normal_body" for="f_price_type">气价类型</label>
40
+ <v-select :disabled='isEdit'
41
+ :options='pricetype'
42
+ :value-single="true"
43
+ :value.sync="model.f_price_type"
44
+ close-on-select
45
+ id="f_price_type"
46
+ placeholder='请选择'
47
+ v-model="model.f_price_type">
48
+ </v-select>
49
+ </div>
50
+ <div :class="[$v.f_price_name.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
51
+ <label class="font_normal_body" for="f_price_name">气价名称</label>
52
+ <input :disabled='isEdit' class="input_search" placeholder="气价名称" style="width:60%" @blur="CheckDuplicate"
53
+ type="text" v-model="model.f_price_name" v-validate:f_price_name='{required: true }'>
54
+ </div>
55
+ </div>
56
+ <div class="row" v-if="model.f_price_type === '阶梯气价'">
57
+ <div :class="[$v.f_stairmonths.required || $v.f_stairmonths.dctest ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
58
+ <label class="font_normal_body" for="f_stairmonths">阶段月数</label>
59
+ <input :disabled='isEdit' class="input_search" style="width:60%" type="number"
60
+ v-model="model.f_stairmonths" v-validate:f_stairmonths='{required: true, dctest: [ 12, "<=" ] }'>
61
+ <span class="help-block" v-if="$v.f_stairmonths.dctest">阶段月数不能大于12</span>
62
+ </div>
63
+ <div :class="[$v.f_stair_start_date.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group" v-if="stairStartShow">
64
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_stair_start_date" v-show="false"
65
+ v-validate:f_stair_start_date='{required: true }'>
66
+ <label class="font_normal_body" for="f_stair_start_date">开始日期</label>
67
+ <datepicker :disabled='isEdit'
68
+ :format="'yyyy-MM-dd'"
69
+ :value.sync="model.f_stair_start_date"
70
+ class="datepicker"
71
+ id="f_stair_start_date"
72
+ placeholder="阶梯开始日期"
73
+ style="width: 60%"
74
+ v-model="model.f_stair_start_date">
75
+ </datepicker>
76
+ <span class="help-block" id="helpBlock" style="font-size: 1.4rem">本年或<br/>本月1号</span>
77
+ </div>
78
+ </div>
79
+ <div class="row">
80
+ <div :class="[$v.f_perform_date.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group" class="col-sm-6">
81
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_perform_date" v-show="false"
82
+ v-validate:f_perform_date='{required: true }'>
83
+ <label class="font_normal_body" for="f_perform_date">生效日期</label>
84
+ <datepicker :disabled='isEdit'
85
+ :value.sync="model.f_perform_date"
86
+ id="f_perform_date"
87
+ placeholder="生效日期"
88
+ :format="'yyyy-MM-dd HH:mm:ss'"
89
+ style="width: 60%" v-model="model.f_perform_date">
90
+ </datepicker>
91
+ </div>
92
+ <div class="col-sm-6 form-group">
93
+ <label class="font_normal_body">是否低保</label>
94
+ <v-select :options='isLowIncomes'
95
+ :value-single="true"
96
+ :value.sync="model.f_islow_income"
97
+ close-on-select
98
+ placeholder='请选择'
99
+ style="width: 60%" v-model="model.f_islow_income">
100
+ </v-select>
101
+ </div>
102
+ <div :class="[$v.f_population_base.pattern ? 'has-error' : 'has-success']" class="col-sm-6 form-group" v-if="model.f_price_type === '阶梯气价'">
103
+ <label class="font_normal_body" for="f_population_base">人口基数</label>
104
+ <input :disabled='isEdit' :value.sync="model.f_population_base" class="input_search" placeholder="人口基数"
105
+ style="width:60%"
106
+ type="text" v-model="model.f_population_base" v-validate:f_population_base="{pattern: '/^[1-9]\\d*$/'}">
107
+ </div>
108
+ <div class="col-sm-6 form-group">
109
+ <label class="font_normal_body">使用公司</label>
110
+ <res-select :initresid='curorgid'
111
+ @res-select="getorg"
112
+ is-mul="false"
113
+ restype='organization'>
114
+ </res-select>
115
+ </div>
116
+ <unit-price :is-disable.sync='isEdit' :unitmodel.sync='model.detailprice' v-if="unitshow"></unit-price>
117
+ </div>
118
+
119
+ <div v-if="config.heatingSeason && model.f_price_type == '阶梯气价'">
120
+ <div class="row">
121
+ <div class="col-sm-6 form-group">
122
+ <label class="font_normal_body">是否采暖</label>
123
+ <v-select :options='isLowIncomes'
124
+ :value-single="true"
125
+ :value.sync="model.f_isheat"
126
+ close-on-select
127
+ placeholder='请选择'
128
+ style="width: 60%" v-model="model.f_isheat">
129
+ </v-select>
130
+ </div>
131
+ <div class="col-sm-6 form-group">
132
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_deduction_way" v-show="false"
133
+ v-validate:f_deduction_way='{required: true }'>
134
+ <label class="font_normal_body">扣费方式</label>
135
+ <v-select :options='deductionWays'
136
+ :value-single="true"
137
+ :value.sync="model.f_deduction_way"
138
+ @change="deductionChange"
139
+ close-on-select
140
+ placeholder='请选择'
141
+ style="width: 60%" v-model="model.f_deduction_way">
142
+ </v-select>
143
+ </div>
144
+
145
+ </div>
146
+ <div class="row" v-if="model.f_isheat == '1'">
147
+ <div :class="[$v.f_heat_start_date.required ? 'has-error' : 'has-success']" class="col-sm-6 form-group">
148
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_heat_start_date" v-show="false"
149
+ v-validate:f_heat_start_date='{required: true }'>
150
+ <label class="font_normal_body">采暖起始</label>
151
+ <datepicker :disabled='isEdit'
152
+ :format="'MM-dd'"
153
+ :value.sync="model.f_heat_start_date"
154
+ class="datepicker"
155
+ placeholder="阶梯开始日期"
156
+ style="width: 60%" v-model="model.f_heat_start_date">
157
+ </datepicker>
158
+ </div>
159
+ <div :class="[$v.f_heat_cycle.dctest ? 'has-error' : 'has-success']" class="col-sm-6 form-group" >
160
+ <label class="font_normal_body">采暖周期</label>
161
+ <input class="input_search" style="width:60%" type="number"
162
+ v-model="model.f_heat_cycle" v-validate:f_heat_cycle='{dctest: [ 12, "<=" ] }'>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ <div class="row" >
167
+ <div class="col-sm-6 form-group">
168
+ <label class="font_normal_body ">优&ensp;先&ensp;级</label>
169
+ <input :disabled='isEdit' class="input_search" placeholder="优先级" style="width:60%"
170
+ type="text" v-model="model.f_priority" v-validate:f_priority='{required: true }'>
171
+ </div>
172
+ </div>
173
+ <div class="row">
174
+ <div class="col-sm-12 form-group" style="height: auto !important;">
175
+ <label class="font_normal_body ">备&emsp;&emsp;注</label>
176
+ <textarea class="input_textarea" rows="3" style="width:80%;margin-top:5px;" v-model="model.f_comments"></textarea>
177
+ </div>
178
+ </div>
179
+
180
+ </form>
181
+
182
+ <!--<div style="width: 40%;overflow-y: scroll">-->
183
+ <div class='auto' style="margin-top: 10px;">
184
+
185
+ <mix-price :is-disable.sync='isEdit' :mixmodel.sync='model.detailprice' v-if="mixshow"></mix-price>
186
+ <stair-price :is-disable.sync='isEdit' :isheat.sync="model.f_isheat" :stairmodel.sync='model.detailprice' style="height: 40%;"
187
+ v-if="stairshow"></stair-price>
188
+ </div>
189
+
190
+ <div style="text-align:right;height:auto;margin-top:6px;">
191
+ <button :disabled='!$v.valid' @click="confirm()" class="button_search" v-if="!isEdit">确认</button>
192
+ <button @click="deletePrice()" class="button_delete" v-if="!isEdit && data.usercount === 0 && data.usercountnew === 0">删除</button>
193
+ <button @click="limitClick" class="button_search" type="button" v-if="config.isLimit">限购配置</button>
194
+ <button @click="close()" class="button_clear">取消</button>
195
+ </div>
196
+ <div v-if="data" style="text-align:right;height:auto;margin-top:6px;">
197
+ <a @click="showChangeView">查看变更记录</a>
198
+ </div>
199
+ <!--</div>-->
200
+ </validator>
201
+ <limit-gas :f_price_id="model.id" :show.sync="limitShow" @limit="getLimitGas"></limit-gas>
202
+ <upload v-if="data" :blodid="blodid" cols="col-sm-12" isremark="true" fusetype="气价修改"></upload>
203
+ </div>
204
+ </template>
205
+ <script>
206
+ /**
207
+ *阶梯气价管理组件
208
+ */
209
+
210
+ import {HttpResetClass} from 'vue-client'
211
+ let initGen = async function (self, val) {
212
+ let http = new HttpResetClass()
213
+ self.blodid = self.data.id
214
+ // 启动流程的情况下 获取改气价有无正在审核的气价,若有则禁止编辑,若无则可编辑
215
+ let hasUnAudit = false
216
+ console.log('当前信息', val)
217
+ if (self.config.audit) {
218
+ let res = await http.load('POST', 'rs/sql/saleSingleTable', {
219
+ data: {
220
+ tablename: 't_stairprice',
221
+ condition: `f_price_id = '${val.f_price_id}' and f_filialeid = '${val.f_filialeids}' and f_state = '待审核'`
222
+ }
223
+ }, {resolveMsg: null, rejectMsg: '获取有无待审核气价时出错!!!'})
224
+ console.log('获取有无待审核气价', res)
225
+ // 这里默认待审核气价只有一条
226
+ if (res.data.length === 1) {
227
+ // 判断当前气价是否是待审核气价
228
+ hasUnAudit = res.data[0].id !== val.id
229
+ } else if (res.data.length > 1) {
230
+ self.$showAlert('意外获取到多条待审核记录!请联系管理人员!', 'danger', 0)
231
+ }
232
+ }
233
+ self.model = Object.assign({}, self.model, val)
234
+
235
+ self.model.f_filialeid = self.model.f_filialeid ? self.model.f_filialeid : self.f_filialeid
236
+ self.model.f_orgid = self.model.f_orgid ? self.model.f_orgid : self.$login.f.orgid
237
+ self.model.f_orgname = self.model.f_orgname ? self.model.f_orgname : self.$login.f.orgs
238
+ self.model.f_depid = self.model.f_depid ? self.model.f_depid : self.$login.f.depids
239
+ self.model.f_depname = self.model.f_depname ? self.model.f_depname : self.$login.f.deps
240
+
241
+ self.curorgid.push(self.model.f_filialeid)
242
+ self.model.f_islow_income = self.model.f_islow_income + ''
243
+ self.model.f_isheat = self.model.f_isheat + ''
244
+
245
+ self.stairStartShow = !self.model.f_deduction_way.includes('day')
246
+ self.isEdit = self.model.f_price_state === '已作废' || hasUnAudit
247
+ console.log('观察data里面的model', self.model, val)
248
+ if (self.model.id) {
249
+ let price = await http.load('POST', 'rs/sql/singleTable_OrderBy', {
250
+ data: {
251
+ items: 'f_price_name, f_gas, f_price, isnull(f_add_gas, 0) f_add_gas, isnull(f_add_gas_heat, 0) f_add_gas_heat',
252
+ tablename: 't_detailprice',
253
+ condition: `f_stairprice_id = '${self.model.id}'`,
254
+ orderitem: 'f_price_name asc'
255
+ }
256
+ }, {resolveMsg: null, rejectMsg: '获取气价明细出错!!!'})
257
+
258
+ if (self.model.f_price_type[0] === '混合气价') {
259
+ price.data[0].f_mixprice = [price.data[0].f_mixprice]
260
+ price.data[1].f_mixprice = [price.data[1].f_mixprice]
261
+ }
262
+ self.model.detailprice = price.data
263
+ }
264
+ }
265
+
266
+ export default {
267
+ data () {
268
+ return {
269
+ unitshow: false,
270
+ mixshow: false,
271
+ blodid: '',
272
+ stairshow: false,
273
+ model: {
274
+ f_price_type: [],
275
+ f_stairmonths: 1,
276
+ f_perform_date: '',
277
+ detailprice: [],
278
+ f_population_base: 4,
279
+ f_population_increment: 0,
280
+ f_stair_start_date: '',
281
+ f_heat_way: '按月',
282
+ f_deduction_way: this.config.deductionWay,
283
+ f_islow_income: '0',
284
+ f_isheat: '0',
285
+ f_comments: '',
286
+ f_priority: 100
287
+ },
288
+ // 编辑控制
289
+ isEdit: false,
290
+
291
+ // 扣费方式的改变 如果涉及日运算,则阶梯开始时间和生效时间不做显示
292
+ stairStartShow: true,
293
+
294
+ // 公司树状图信息
295
+ curorgid: [],
296
+
297
+ f_filialeid: '', // 所属公司
298
+ f_filialename: '', // 所属公司名称
299
+
300
+ // 限购配置
301
+ limitShow: false,
302
+ limit_gas: null,
303
+
304
+ // 下拉框数据
305
+ usertype: this.$appdata.getParam('用户类型'),
306
+ pricetype: this.$appdata.getParam('气价类型'),
307
+ hearways: [{label: '按月', value: '按月'}, {label: '按季', value: '按季'}],
308
+ isLowIncomes: [{label: '是', value: '1'}, {label: '否', value: '0'}],
309
+ deductionWays: [{label: '周期扣费', value: 'cycle'}, {label: '周期平均扣费', value: 'cycleMM'}, {label: '日运算扣费', value: 'day'}, {label: '采暖季独立扣费', value: 'singleHS'}, {label: '采暖季日扣费', value: 'dayHS'}],
310
+ gastype: []
311
+ }
312
+ },
313
+ props: ['data', 'config', 'f_filialeid'],
314
+ watch: {
315
+ 'data' (val) {
316
+ if (val) {
317
+ initGen(this, val)
318
+ } else {
319
+ this.initModel()
320
+ }
321
+ },
322
+ 'model.f_price_type' (val) {
323
+ this.unitshow = false
324
+ this.mixshow = false
325
+ this.stairshow = false
326
+ if (val === '固定气价') {
327
+ this.model.detailprice = []
328
+ this.unitshow = true
329
+ } else if (val === '混合气价') {
330
+ this.model.detailprice = []
331
+ this.mixshow = true
332
+ } else if (val === '阶梯气价') {
333
+ this.model.detailprice = [{f_gas: '', f_price: '', f_add_gas: 0, f_add_gas_heat: 0}]
334
+ if (this.model.f_deduction_way == undefined || this.model.f_deduction_way == '') {
335
+ this.model.f_deduction_way = 'cycle'
336
+ }
337
+ this.stairshow = true
338
+ }
339
+ }
340
+ },
341
+ ready () {
342
+ console.log('看看都传了什么', this.data, this.config)
343
+ initGen(this, this.data)
344
+ },
345
+ methods: {
346
+ async CheckDuplicate () {
347
+ if (!this.data) {
348
+ let http = new HttpResetClass()
349
+ let res = await http.load('post', 'rs/sql/getGasPriceInfo', {data: {condition: ` f_filialeid in ('${this.$login.f.orgid}') and 1=1 `, orderitem: 'f_price_id'}}, {resolveMsg: null, rejectMsg: null})
350
+ for (let i = 0; i < res.data.length; i++) {
351
+ if (res.data[i].f_price_name == this.model.f_price_name) {
352
+ this.$showAlert('气价名称重复,请重新输入', 'warning', 3000)
353
+ this.model.f_price_name = ''
354
+ return
355
+ }
356
+ }
357
+ }
358
+ },
359
+ async confirm () {
360
+ // 验证公司组织是否已选择
361
+ try {
362
+ if (!this.f_filialeid) {
363
+ this.$showAlert('请选择气价使用公司', 'warning', 2000)
364
+ return
365
+ }
366
+ if (this.data) {
367
+ if (this.data.f_perform_date == this.model.f_perform_date) {
368
+ this.$showAlert('请更改生效日期', 'warning', 2000)
369
+ return
370
+ }
371
+ let datenow = new Date()
372
+ let a = datenow.setDate(datenow.getDate() - 1)
373
+ let month = datenow.getMonth() + 1
374
+ let date = datenow.getDate()
375
+ let hour = datenow.getHours()
376
+ let min = datenow.getMinutes()
377
+ let sec = datenow.getSeconds()
378
+ a = datenow.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
379
+ a = a + ' 23:59:59'
380
+ if (this.model.f_perform_date <= this.data.f_perform_date) {
381
+ this.$showAlert('生效日期不能小于上次生效时间', 'warning', 2000)
382
+ return
383
+ }
384
+ }
385
+
386
+ // 验证此生效时间之后是否有待使用气价, 如果有提示是否作废待使用气价,
387
+ let validateResult = await this.$resetpost('rs/logic/sale_validatePrice', {data: this.model}, {
388
+ resolveMsg: null,
389
+ rejectMsg: '验证气价出错!!'
390
+ })
391
+ console.log('验证气价:', validateResult)
392
+ if (validateResult.data.toBeUsePrice.length > 0) {
393
+ // 有待使用气价, 将待使用气价信息展示
394
+ let awaitOper = await this.$showMessage(`此气价存在待使用记录, 将于${validateResult.data.toBeUsePrice[0].f_perform_date} 开始使用!是否将其作废?`, ['confirm', 'cancel'])
395
+ console.log('用户点击了:', {awaitOper})
396
+ if (awaitOper == 'confirm') {
397
+ // 传至后台用于新版本号的处理
398
+ this.model.toBeUsePriceId = validateResult.data.toBeUsePrice[0].id
399
+ this.model.toBeUsePriceVersion = validateResult.data.toBeUsePrice[0].f_version
400
+ this.savePrice()
401
+ }
402
+ } else {
403
+ this.savePrice()
404
+ }
405
+ } catch (e) {
406
+ this.$dispatch('error', '气价管理', this.data, res)
407
+ }
408
+ },
409
+
410
+ async savePrice () {
411
+ // 去除重复或者空的明细
412
+ if (this.model.f_price_type[0] === '阶梯气价') {
413
+ this.removeDuplication(this.model)
414
+ }
415
+ // 审核配置
416
+ this.model.audit = this.config.audit
417
+
418
+ console.log('进入保存气价方法')
419
+ this.model.f_filialeid = this.f_filialeid ? this.f_filialeid : this.$login.f.orgid
420
+
421
+ if (this.limit_gas) {
422
+ this.model.limit_gas = this.limit_gas
423
+ //this.model.limit_gas.f_start_date = this.model.f_perform_date
424
+ }
425
+ // 现调用气价修改的逻辑 返回:version 和之前的对比 增加的话, 进行提示操作 反之 结束
426
+ await this.$LogicService.gasPrice(this.model, this.data)
427
+ // 操作了气价 清空分公司initdata缓存
428
+ let http = new HttpResetClass()
429
+ await http.load('POST', 'rs/logic/delSaleInitData', {data: {}}, {resolveMsg: null, rejectMsg: null})
430
+
431
+ this.$dispatch('success', '气价管理', this.data)
432
+ this.initModel()
433
+ },
434
+
435
+ async deletePrice () {
436
+ let res = await this.$showMessage(`您确定要删除此气价吗?`, ['confirm', 'cancel'])
437
+ if (res === 'confirm') {
438
+ await this.$resetpost('rs/logic/delprice', {data: {id: this.model.id}}, {
439
+ resolveMsg: '删除气价成功',
440
+ rejectMsg: '删除气价失败'
441
+ })
442
+ let http = new HttpResetClass()
443
+ await http.load('POST', 'rs/logic/delSaleInitData', {data: {}}, {resolveMsg: null, rejectMsg: null})
444
+ }
445
+ this.$dispatch('success')
446
+ },
447
+
448
+ getLimitGas (val) {
449
+ console.log('获取到限购值。', val)
450
+ this.limit_gas = val
451
+ },
452
+
453
+ getorg (id, name) {
454
+ this.f_filialeid = id[0]
455
+ this.f_filialename = name[0]
456
+ },
457
+ initModel () {
458
+ this.model = {
459
+ f_user_type: '',
460
+ f_gasproperties: '',
461
+ f_price_type: '',
462
+ f_stairmonths: 1,
463
+ f_perform_date: '',
464
+ detailprice: [],
465
+ f_stair_start_date: '',
466
+ f_population_increment: 0,
467
+ f_population_base: 4,
468
+ f_comments: '',
469
+ f_deduction_way: this.config.deductionWay
470
+ }
471
+ },
472
+ close () {
473
+ this.$dispatch('close')
474
+ },
475
+ removeDuplication (val) {
476
+ if (val.detailprice.length > 0) {
477
+ let hash = []
478
+ let arr = []
479
+ for (var i = 0; i < val.detailprice.length; i++) {
480
+ // hash[val.detailprice[i].f_gas] != null
481
+ if (!val.detailprice[i].f_gas) {
482
+ continue
483
+ }
484
+ if (!hash[val.detailprice[i].f_gas]) {
485
+ arr.push(val.detailprice[i])
486
+ hash[val.detailprice[i].f_gas] = true
487
+ }
488
+ }
489
+ val.detailprice = arr
490
+ }
491
+ },
492
+ usertypeChange (val) {
493
+ if (val) {
494
+ this.gastype = this.$appdata.getParam(this.model.f_user_type)
495
+ }
496
+ },
497
+ deductionChange (val) {
498
+ // 扣费方式的改变 如果涉及日运算,则阶梯开始时间和生效时间不做显示
499
+ this.stairStartShow = !val.includes('day')
500
+ },
501
+ limitClick () {
502
+ this.limitShow = true
503
+ },
504
+ showChangeView () {
505
+ this.$parent.changeView = true
506
+ }
507
+ }
508
+ }
509
+ </script>
510
+ <style lang="less">
511
+ #gas-price-form {
512
+ .form-group {
513
+ margin-left: 0px;
514
+ margin-right: 0px;
515
+ }
516
+ }
517
+
518
+ </style>
@@ -0,0 +1,319 @@
1
+ <template>
2
+ <div @keyup.enter="search" class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria @condition-changed='$parent.selfSearch' partial='criteria' v-ref:cri>
5
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
6
+ <div class="row">
7
+ <div :class="{'col-sm-2 form-group':!$parent.$parent.$parent.isdetail,'col-sm-3 form-group':$parent.$parent.$parent.isdetail}">
8
+ <label class="font_normal_body">组织机构</label>
9
+ <res-select :initresid='$parent.$parent.curorgid'
10
+ @res-select="$parent.$parent.getorg"
11
+ class="select select_list"
12
+ restype='organization'
13
+ style="width: 60%">
14
+ </res-select>
15
+ </div>
16
+ <div :class="{'col-sm-2 form-group':!$parent.$parent.$parent.isdetail,'col-sm-3 form-group':$parent.$parent.$parent.isdetail}">
17
+ <label class="font_normal_body">气价名称</label>
18
+ <input class="input_search" condition="f_price_name like '%{}%'" placeholder='气价名称' style="width:60%" type="text"
19
+ v-el:qjmc v-model="model.f_price_name" v-next-el="cx"
20
+ >
21
+ </div>
22
+ <!--<div class="col-sm-4">-->
23
+ <!--<label class="font_normal_body">生效时间大于</label>-->
24
+ <!--<datepicker :format="'yyyy-MM-dd'"-->
25
+ <!--:value.sync="model.performDate"-->
26
+ <!--placeholder="生效日期"-->
27
+ <!--condition="performDate > '{}'"-->
28
+ <!--v-model="model.performDate" style="width: 55%">-->
29
+ <!--</datepicker>-->
30
+ <!--</div>-->
31
+ <div class="form-group col-sm-6 button-range" style="margin-right: 10px" >
32
+ <button @click="$parent.$parent.batchAdjust()" class="button_new button_spacing">批量调价</button>
33
+ <button @click="$parent.$parent.search()" class="button_search button_spacing" v-el:cx>查询</button>
34
+ <button @click="$parent.$parent.add()" class="button_new button_spacing">新增</button>
35
+
36
+ <div :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
37
+ @click="$parent.$parent.criteriaShow=!$parent.$parent.criteriaShow"
38
+ class="button_spacing"
39
+ style="float: right"></div>
40
+ </div>
41
+ </div>
42
+ <div class="row" v-show="$parent.$parent.criteriaShow">
43
+ <div :class="{'col-sm-2 form-group':!$parent.$parent.$parent.isdetail,'col-sm-3 form-group':$parent.$parent.$parent.isdetail}">
44
+ <label class="font_normal_body">气价编号</label>
45
+ <input type="number" class="input_search" style="width: 60%" v-model="model.f_user_name" placeholder='气价编号'
46
+ condition="f_price_id = '{}'" >
47
+ </div>
48
+ <div :class="{'col-sm-2 form-group':!$parent.$parent.$parent.isdetail,'col-sm-3 form-group':$parent.$parent.$parent.isdetail}">
49
+ <label class="font_normal_body">气价来源</label>
50
+ <v-select :value.sync="model.f_custom" v-model="model.f_custom"
51
+ placeholder='气价来源' :options="$parent.$parent.custom"
52
+ condition="custom = '{}'"
53
+ close-on-select v-ref:type>
54
+ </v-select>
55
+ </div>
56
+ <div :class="{'col-sm-2 form-group':!$parent.$parent.$parent.isdetail,'col-sm-3 form-group':$parent.$parent.$parent.isdetail}">
57
+ <label class="font_normal_body">客户类型</label>
58
+ <v-select :value.sync="model.f_user_type"
59
+ @change="$parent.$parent.userTypeChange()"
60
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
61
+ condition="f_user_type = '{}'"
62
+ close-on-select></v-select>
63
+ </div>
64
+ <div :class="{'col-sm-2 form-group':!$parent.$parent.$parent.isdetail,'col-sm-3 form-group':$parent.$parent.$parent.isdetail}">
65
+ <label class="font_normal_body">用气性质</label>
66
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
67
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
68
+ condition="f_gasproperties = '{}'"
69
+ close-on-select></v-select>
70
+ </div>
71
+ <div :class="{'col-sm-2 form-group':!$parent.$parent.$parent.isdetail,'col-sm-3 form-group':$parent.$parent.$parent.isdetail}">
72
+ <label class="font_normal_body">气价类型</label>
73
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
74
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
75
+ condition="f_price_type = '{}'"
76
+ close-on-select v-ref:type>
77
+ </v-select>
78
+ </div>
79
+ <div :class="{'col-sm-2 form-group':!$parent.$parent.$parent.isdetail,'col-sm-3 form-group':$parent.$parent.$parent.isdetail}">
80
+ <label class="font_normal_body">气价状态</label>
81
+ <v-select :value.sync="model.f_price_state" v-model="model.f_price_state"
82
+ placeholder='气价状态' :options="$parent.$parent.price_states"
83
+ condition="f_price_state = '{}'"
84
+ close-on-select v-ref:type>
85
+ </v-select>
86
+ </div>
87
+ </div>
88
+ </div>
89
+
90
+ </criteria>
91
+ <data-grid :model="model" class="list_area table_sy" partial='list' v-ref:grid>
92
+ <template partial='head'>
93
+ <tr>
94
+ <th>
95
+ <nobr>序号</nobr>
96
+ </th>
97
+ <th>
98
+ <nobr>气价编号</nobr>
99
+ </th>
100
+ <th v-show="!$parent.$parent.$parent.$parent.usershow && !($parent.$parent.$parent.$parent.isdetail && !$parent.$parent.$parent.$parent.usershow)">
101
+ <nobr>气价名称</nobr>
102
+ </th>
103
+ <th v-show="!$parent.$parent.$parent.$parent.usershow && !($parent.$parent.$parent.$parent.isdetail && !$parent.$parent.$parent.$parent.usershow)">
104
+ <nobr>客户类型</nobr>
105
+ </th>
106
+ <th v-show="!$parent.$parent.$parent.$parent.usershow && !($parent.$parent.$parent.$parent.isdetail && !$parent.$parent.$parent.$parent.usershow)">
107
+ <nobr>用气性质</nobr>
108
+ </th>
109
+ <th v-show="!$parent.$parent.$parent.$parent.usershow && !($parent.$parent.$parent.$parent.isdetail && !$parent.$parent.$parent.$parent.usershow)">
110
+ <nobr>气价类型</nobr>
111
+ </th>
112
+ <th>
113
+ <nobr>最新版本</nobr>
114
+ </th>
115
+ <th>
116
+ <nobr>气价信息</nobr>
117
+ </th>
118
+ <th>
119
+ <nobr>使用分公司</nobr>
120
+ </th>
121
+ <th>
122
+ <nobr>使用户数</nobr>
123
+ </th>
124
+ <th>
125
+ <nobr>报建使用户数</nobr>
126
+ </th>
127
+ <th>
128
+ <nobr>气价状态</nobr>
129
+ </th>
130
+ <th v-if="$parent.$parent.$parent.config.audit">
131
+ <nobr>操作</nobr>
132
+ </th>
133
+ <th>
134
+ <nobr>历史记录</nobr>
135
+ </th>
136
+ </tr>
137
+ </template>
138
+ <template partial='body'>
139
+ <tr>
140
+ <td style="text-align:center">{{$index + 1}}</td>
141
+ <td style="text-align:center">{{row.f_price_id}}</td>
142
+ <td style="text-align:center" v-show="!$parent.$parent.$parent.$parent.usershow && !($parent.$parent.$parent.$parent.isdetail && !$parent.$parent.$parent.$parent.usershow)"><nobr>{{row.f_price_name}}</nobr></td>
143
+ <td style="text-align:center" v-show="!$parent.$parent.$parent.$parent.usershow && !($parent.$parent.$parent.$parent.isdetail && !$parent.$parent.$parent.$parent.usershow)">{{row.f_user_type}}</td>
144
+ <td style="text-align:center" v-show="!$parent.$parent.$parent.$parent.usershow && !($parent.$parent.$parent.$parent.isdetail && !$parent.$parent.$parent.$parent.usershow)">{{row.f_gasproperties}}</td>
145
+ <td style="text-align:center" v-show="!$parent.$parent.$parent.$parent.usershow && !($parent.$parent.$parent.$parent.isdetail && !$parent.$parent.$parent.$parent.usershow)">{{row.f_price_type}}</td>
146
+ <td style="text-align:center">{{row.new_version}}</td>
147
+ <td style="text-align:center"><nobr>{{row.f_value}}</nobr></td>
148
+ <td style="text-align:center"><nobr>{{row.f_filiale_name}}</nobr></td>
149
+ <td style="text-align:center"><button @click.stop="$parent.$parent.$parent.operate(row.f_price_id,row.f_price_name,row.f_filialeid)" class="btn btn-link"><b>{{row.usercount}}</b></button></td>
150
+ <td style="text-align:center"><b>{{row.usercountnew}}</b></td>
151
+ <td style="text-align:center">{{row.f_price_state}}</td>
152
+ <td style="text-align:center" v-if="$parent.$parent.$parent.config.audit">
153
+ <button :disabled="$login.r.includes('气价审核')" @click.stop="$parent.$parent.$parent.passPrice(row)"
154
+ class="btn btn-link" v-if="row.f_state === '待审核'">通过
155
+ </button>
156
+ </td>
157
+ <td style="text-align: center;">
158
+ <button type="button" name="button" class="button_search-2 button_spacing width-60"
159
+ @click.stop="$parent.$parent.$parent.showhistory(row)">查看</button>
160
+ </td>
161
+ </tr>
162
+ </template>
163
+ <template partial='foot'></template>
164
+ </data-grid>
165
+ </criteria-paged>
166
+ <modal :backdrop="false" :show.sync="show" v-if="show" width="1000px">
167
+ <header class="modal-header" slot="modal-header">
168
+ <button @click="show=!show" class="close" type="button"><span>&times;</span></button>
169
+ <h4 class="modal-title">历史记录</h4>
170
+ </header>
171
+ <article class="modal-body" slot="modal-body" style="height:100%;width:100%" title="历史记录">
172
+ <price-change-history :row="row" :show.sync="show" @select-changed="historySeleted" v-on:toggle="close"></price-change-history>
173
+ </article>
174
+ <footer class="modal-footer" slot="modal-footer">
175
+
176
+ </footer>
177
+ </modal>
178
+ </div>
179
+ </template>
180
+
181
+ <script>
182
+ /**
183
+ *阶梯气价查询列表
184
+ */
185
+ import {PagedList} from 'vue-client'
186
+ import Vue from 'vue'
187
+
188
+ let passGen = async function (self, row) {
189
+ let param = {
190
+ id: row.id,
191
+ userid: self.$login.f.id
192
+ }
193
+ await self.$resetpost('rs/logic/priceNextFlow', param, {
194
+ warnMsg: `确定要通过气价名称为: ${row.f_price_name}的气价吗?`,
195
+ resolveMsg: '审核通过',
196
+ rejectMsg: '流程进行出错!!!'
197
+ })
198
+ self.$dispatch('success')
199
+ }
200
+
201
+ export default {
202
+ data () {
203
+ return {
204
+ model: new PagedList('rs/sql/getGasPriceInfo', 20, {performDate: 'this.model.performDate', orderitem: `'${this.orderitem}'`}),
205
+ show: false,
206
+ criteriaShow: false,
207
+ // 公司下拉
208
+ curorgid: [this.$login.f.orgid],
209
+ row: {},
210
+ f_orgid: '',
211
+ gasproperties: [],
212
+ custom: [{label: '全部', value: ''}, {label: '正常气价', value: '正常气价'}, {label: '自定义气价', value: '自定义气价'}],
213
+ price_states: [{label: '全部', value: ''}, {label: '使用中', value: '使用中'}, {label: '删除', value: '删除'}, {label: '已作废', value: '已作废'}],
214
+ usertypes: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : []
215
+ }
216
+ },
217
+ props: {
218
+ orderitem: {
219
+ type: String,
220
+ default: 'f_price_id'
221
+ },
222
+ row: {},
223
+ config: {},
224
+ ispartial: false,
225
+ f_filialeid: {
226
+ type: String
227
+ }
228
+ },
229
+ ready () {
230
+ this.$refs.paged.$refs.cri.model.performDate = this.$login.toStandardDateString()
231
+ this.$refs.paged.$refs.cri.model.f_price_state = '使用中'
232
+ this.search()
233
+ },
234
+ methods: {
235
+ batchAdjust () {
236
+ this.$parent.usershow = true
237
+ this.$parent.priceid = null
238
+ this.$parent.priceorgid = null
239
+ },
240
+ showhistory (row) {
241
+ this.show = true
242
+ this.row = row
243
+ },
244
+ userTypeChange () {
245
+ this.gasproperties = []
246
+ if (this.$refs.paged.$refs.cri.model !== null) {
247
+ this.$refs.paged.$refs.cri.model.f_gasproperties = ''
248
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
249
+ } else {
250
+ this.gasproperties = [{label: '全部', value: ''}]
251
+ }
252
+ },
253
+ operate (id, pricename, orgid) {
254
+ this.$parent.usershow = true
255
+ this.$parent.priceid = id
256
+ this.$parent.pricename = pricename
257
+ this.$parent.priceorgid = orgid
258
+ },
259
+ search () {
260
+ this.$refs.paged.$refs.cri.search()
261
+ this.$dispatch('search')
262
+ },
263
+ hidden () {
264
+ this.criteriaShow = !this.criteriaShow
265
+ },
266
+ getorg (val) {
267
+ this.f_orgid = this.$login.convertToIn(val)
268
+ this.f_filialeid = val[0]
269
+ },
270
+ selfSearch (args) {
271
+ if (!this.f_orgid) {
272
+ this.getorg([this.$login.f.orgid])
273
+ }
274
+ console.log('查询。。。', this.f_orgid)
275
+ if (this.f_orgid) {
276
+ args.condition = `f_filialeid in ${this.f_orgid} and ${args.condition}`
277
+ }
278
+ this.$refs.paged.$refs.grid.$el.scrollTop = 0
279
+ this.model.search(args.condition, args.model)
280
+ },
281
+ add () {
282
+ this.$dispatch('add')
283
+ },
284
+ passPrice (row) {
285
+ console.log('气价审核通过。。。', row, this.$refs.paged.$refs.grid.selected)
286
+ let selectedRow = this.$refs.paged.$refs.grid.selected
287
+ if (selectedRow) {
288
+ if (row.id !== selectedRow.id && selectedRow.f_state === '待审核') {
289
+ this.$showAlert('您通过的气价信息不是您选中的信息', 'warning', 3000)
290
+ } else {
291
+ passGen(this, row)
292
+ }
293
+ } else {
294
+ passGen(this, row)
295
+ }
296
+ },
297
+ historySeleted () {
298
+
299
+ }
300
+
301
+ },
302
+ watch: {
303
+ 'model.rows.length' (val) {
304
+ if (val === 1) {
305
+ this.$refs.paged.$refs.grid.select(this.model.rows[0])
306
+ this.$parent.usershow = false
307
+ }
308
+ }
309
+ },
310
+ computed: {
311
+ pricetypes () {
312
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
313
+ },
314
+ bookstates () {
315
+ return [ {label: '有效', value: "= '有效'"}, {label: '无效', value: "= '无效'"} ]
316
+ }
317
+ }
318
+ }
319
+ </script>
@@ -36,6 +36,10 @@ let specialComp = {
36
36
  // 使用该抄表册的用户信息(使用户数)
37
37
  'meterbook-user':(resolve) => { require(['./MeterBookUser'], resolve) },
38
38
  // 补费扣费
39
- 'deduction-manage': (resolve) => { require(['./deductionManage'], resolve) }
39
+ 'deduction-manage': (resolve) => { require(['./deductionManage'], resolve) },
40
+ // 气价管理(新增)
41
+ 'gas-price': (resolve) => { require(['./comprehen/StairPrice/GasPrice'], resolve) },
42
+ // 所有气价信息列表
43
+ 'gas-price-list': (resolve) => { require(['./comprehen/StairPrice/GasPriceList'], resolve) }
40
44
  }
41
45
  exports.specialComp = specialComp
@@ -951,7 +951,7 @@ let loadParamGem = async function (self) {
951
951
  }
952
952
  let self = this
953
953
  try {
954
- await axios.post('rs/business/batchRunExcelDefault/filemanage_fileSave/newSettleFileImport',
954
+ await axios.post('rs/business/batchRunExcelDefault/filemanage_fileSave_zhongyi/newSettleFileImport',
955
955
  {data: param}, {timeout: 30000}).then((res) => {
956
956
  if (res.data) {
957
957
  self.$showMessage(`本次上传共上传${res.data.totalsum}条数据, 成功${res.data.successsum}条,失败${res.data.errorsum}条,具体失败数据请在稽查查询错误查询中查看!!`)