sale-client 3.6.58 → 3.6.59

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,5 +1,5 @@
1
1
  var path = require('path')
2
- const [localUrl, serverRul] = ['http://121.36.106.17:8400', 'http://121.36.106.17:8400']
2
+ const [localUrl, serverRul] = ['http://192.168.50.4:8400', 'http://192.168.50.4:8400']
3
3
  var merge = require('webpack-merge')
4
4
  var baseConfig = require('./webpack.dev.conf')
5
5
  var devConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.58",
3
+ "version": "3.6.59",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -27,7 +27,7 @@
27
27
  "yarn": "^1.22.10"
28
28
  },
29
29
  "devDependencies": {
30
- "address-client": "3.2.29",
30
+ "address-client": "3.2.56",
31
31
  "axios": "0.15.3",
32
32
  "babel-core": "^6.0.0",
33
33
  "babel-loader": "^6.0.0",
@@ -269,7 +269,7 @@ export default {
269
269
  builders: this.$appdata.getParam('施工单位'),
270
270
  is_zibifa: this.$appdata.getParam('有无自闭阀'),
271
271
  f_make_date: '',
272
- f_expire_date: '',
272
+ f_expire_date: null,
273
273
  f_service_life: 0,
274
274
  devicesinfoShow: true
275
275
  }
@@ -307,8 +307,9 @@ export default {
307
307
  console.log('表具信息', this.devicesinfo)
308
308
  },
309
309
  expireDate (index) {
310
- if (this.devicesinfo[index].f_make_date === '' || this.devicesinfo[index].f_make_date === undefined || this.devicesinfo[index].f_service_life === 0 || this.devicesinfo[index].f_service_life === undefined) {
311
-
310
+ console.log(this.devicesinfo[index].f_make_date)
311
+ if (!this.devicesinfo[index].f_make_date || this.devicesinfo[index].f_service_life === 0 || this.devicesinfo[index].f_service_life === undefined) {
312
+ this.devicesinfo[index].f_expire_date = null
312
313
  } else {
313
314
  var b = new Date(this.devicesinfo[index].f_make_date)
314
315
  var year = (b.getFullYear() - 0) + (this.devicesinfo[index].f_service_life - 0)
@@ -0,0 +1,662 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <validator name='m'>
4
+ <div class="basic-main" style="margin-left: 1%;" >
5
+
6
+ <criteria-paged :model="model" v-ref:paged @sort="sort" >
7
+ <criteria partial='criteria' v-ref:criteria @condition-changed="$parent.selfSearch">
8
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
+ <div class="row">
10
+ <div class="form-group col-sm-2">
11
+ <label class="font_normal_body">组织机构</label>
12
+ <res-select
13
+ restype='organization'
14
+ @res-select="$parent.$parent.getorg"
15
+ is-mul="false"
16
+ :initresid='$parent.$parent.curorgid'
17
+ >
18
+ </res-select>
19
+ </div>
20
+ <div class="form-group col-sm-2">
21
+ <label class="font_normal_body">客户编号</label>
22
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code"
23
+ @keyup.enter="search()" condition="f_userinfo_code = '{}'" placeholder='客户编号'>
24
+ </div>
25
+ <div class="form-group col-sm-2">
26
+ <label class="font_normal_body">客户名称</label>
27
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_user_name"
28
+ @keyup.enter="search()" condition="f_user_name = '{}'" placeholder='客户姓名'>
29
+ </div>
30
+
31
+ <div style="float:right">
32
+ <button class="button_search" @click="search(), $parent.$parent.clean()">查询</button>
33
+ <button class="button_clear" @click="$parent.$parent.clear()">清空</button>
34
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
35
+ </div>
36
+ </div>
37
+ <div class="row" v-if="$parent.$parent.criteriaShow">
38
+ <div class="form-group col-sm-2" >
39
+ <label class="font_normal_body">旧客户号</label>
40
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_olduserinfo_code" placeholder='客户编号'
41
+ condition="f_olduserinfo_code = '{}'">
42
+ </div>
43
+ <div class="form-group col-sm-2">
44
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
45
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_meternumber" placeholder='表号'
46
+ condition="f_meternumber = '{}'">
47
+ </div>
48
+ <div class="form-group col-sm-2">
49
+ <label class="font_normal_body">卡&emsp;&emsp;号</label>
50
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_card_id" placeholder='卡号'
51
+ condition="f_card_id = '{}'">
52
+ </div>
53
+ <div class="form-group col-sm-2">
54
+ <label class="font_normal_body">用气性质</label>
55
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
56
+ :options='$parent.$parent.gasproperties2' placeholder='用气性质'
57
+ close-on-select condition="f_gasproperties='{}'"></v-select>
58
+ </div>
59
+ <div class="form-group col-sm-2">
60
+ <label class="font_normal_body">客户电话</label>
61
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_user_phone" placeholder='客户电话'
62
+ condition="f_user_phone = '{}'">
63
+ </div>
64
+ <div class="form-group col-sm-2">
65
+ <label class="font_normal_body">客户地址</label>
66
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_address"
67
+ condition="f_address like '%{}%'" placeholder='客户地址'>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </criteria>
72
+ <data-grid :model="model" class="list_area table_sy" v-ref:grid partial='list'>
73
+ <template partial='head'>
74
+ <tr>
75
+ <th>
76
+ <nobr>序号</nobr>
77
+ </th>
78
+ <th>
79
+ <nobr>客户编号</nobr>
80
+ </th>
81
+ <th>
82
+ <nobr>客户信息</nobr>
83
+ </th>
84
+ <th>
85
+ <nobr>表号</nobr>
86
+ </th>
87
+ <th>
88
+ <nobr>卡号</nobr>
89
+ </th>
90
+ <th>
91
+ <nobr>客户地址</nobr>
92
+ </th>
93
+ <th>
94
+ <nobr>气价名称</nobr>
95
+ </th>
96
+ <th>
97
+ <nobr>表具信息</nobr>
98
+ </th>
99
+ <th>
100
+ <nobr>状态</nobr>
101
+ </th>
102
+ <th>
103
+ <nobr>操作</nobr>
104
+ </th>
105
+ <th>
106
+ <nobr>历史操作</nobr>
107
+ </th>
108
+ </tr>
109
+ </template>
110
+ <template partial='body'>
111
+ <td style="text-align: center;">{{$index + 1}}</td>
112
+ <td style="text-align: center;white-space: nowrap;">{{row.f_userinfo_code}}</td>
113
+ <td style="text-align: center;white-space: nowrap;">{{row.f_user_name}}</td>
114
+ <td style="text-align: center;white-space: nowrap;">{{row.f_meternumber}}</td>
115
+ <td style="text-align: center;white-space: nowrap;">{{row.f_card_id}}</td>
116
+ <td style="text-align: center;white-space: nowrap;">{{row.f_address}}</td>
117
+ <td style="text-align: center;white-space: nowrap;">{{row.f_price_name}}</td>
118
+ <td style="text-align: center;white-space: nowrap;">{{row.f_meter_brand}}</td>
119
+ <td style="text-align: center;white-space: nowrap;">{{row.f_user_state}}</td>
120
+ <td style="text-align: center;white-space: nowrap;">
121
+ <button type="button" name="button" class="button_search button_spacing width-60"
122
+ @click.stop="$parent.$parent.$parent.priceshow(row)">调价
123
+ </button>
124
+ </td>
125
+ <td style="text-align: center;white-space: nowrap;">
126
+ <button type="button" name="button" class="button_search button_spacing width-60"
127
+ @click.stop="$parent.$parent.$parent.lookOver(row)">查看
128
+ </button>
129
+ </td>
130
+ </template>
131
+ </data-grid>
132
+ </criteria-paged>
133
+ </div>
134
+
135
+ <modal :show.sync="show" width="50%" backdrop="false" style="overflow: scroll;">
136
+
137
+ <header slot="modal-header" class="modal-header">
138
+ <h4 class="modal-title" style="text-align: center;">气价调整</h4>
139
+ </header>
140
+ <article slot="modal-body" class="modal-body">
141
+ <div class="panel panel-primary datapanel">
142
+ <form class="form-horizontal">
143
+ <div class="form-group">
144
+ <div class="row">
145
+ <div class="col-sm-4 flex-row ">
146
+ <label class="control-label">客户编号</label>
147
+ <p class="form-control-static">{{row.f_userinfo_code}}</p>
148
+ </div>
149
+ <div class="col-sm-4 flex-row ">
150
+ <label class="control-label">客户名称</label>
151
+ <p class="form-control-static">{{row.f_user_name}}</p>
152
+ </div>
153
+ <div class="col-sm-4 flex-row ">
154
+ <label class="control-label">客户电话</label>
155
+ <p class="form-control-static">{{row.f_user_phone}}</p>
156
+ </div>
157
+ </div>
158
+ <div class="row">
159
+ <div class="col-sm-12 flex-row ">
160
+ <label class="control-label">客户地址</label>
161
+ <p class="form-control-static">{{row.f_address}}</p>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ </form>
166
+
167
+ </div>
168
+
169
+ <div class="panel panel-primary datapanel">
170
+ <form class="form-horizontal select-overspread">
171
+ <div class="form-group">
172
+ <div class="row bg-info text-center text-center" style="height:35px">
173
+ <div style="float: left">
174
+ <label class="font_normal_body">旧气价信息</label>
175
+ </div>
176
+ </div>
177
+ <div class="row" style="margin-top: 2%">
178
+ <div class="col-sm-3 flex-row ">
179
+ <label class="control-label">客户类型</label>
180
+ <p class="form-control-static">{{row.f_user_type}}</p>
181
+ </div>
182
+ <div class="col-sm-3 flex-row ">
183
+ <label class="control-label">用气性质</label>
184
+ <p class="form-control-static">{{row.f_gasproperties}}</p>
185
+ </div>
186
+ <div class="col-sm-3 flex-row ">
187
+ <label class="control-label">气价类型</label>
188
+ <p class="form-control-static">{{row.f_price_type}}</p>
189
+ </div>
190
+ <div class="col-sm-3 flex-row ">
191
+ <label class="control-label">气价名称</label>
192
+ <p class="form-control-static">{{row.f_price_name}}</p>
193
+ </div>
194
+ </div>
195
+
196
+ <div class="row bg-info text-center text-center" style="height:35px">
197
+ <div style="float: left">
198
+ <label class="font_normal_body">新气价信息</label>
199
+ </div>
200
+ </div>
201
+
202
+ <div class="row" style="margin-top: 2%">
203
+ <label class="radio-inline col-sm-3">
204
+ <input type="radio" value="系统气价" v-model="model.type" class="magic-radio" checked id="type_two">
205
+ <label for="type_two">系统气价</label>
206
+ <!-- <strong>IC卡丢失或损坏</strong> -->
207
+ </label>
208
+ <label class="radio-inline col-sm-4">
209
+ <input type="radio" value="自定义气价" v-model="model.type" class="magic-radio" id="type_three">
210
+ <label for="type_three">自定义气价</label>
211
+ <!-- <strong>IC卡信息错乱</strong> -->
212
+ </label>
213
+ </div>
214
+ <div class="row" style="margin-top: 2%" v-if="model.type ==='自定义气价'">
215
+
216
+ <div :class="[$m.f_price_type.required ? 'has-error' : '']" class="col-sm-4 form-group">
217
+ <input class="input_search" style="width:60%" type="text" v-model="newinfo.f_price_type" v-show="false"
218
+ v-validate:f_price_type='{required: true }'>
219
+ <label title="参数:气价类型" class="font_normal_body" for="f_price_type">气价类型</label>
220
+ <v-select :disabled='isEdit'
221
+ :options='pricetype'
222
+ :value-single="true"
223
+ :value.sync="newinfo.f_price_type"
224
+ close-on-select
225
+ id="f_price_type"
226
+ placeholder='请选择'
227
+ v-model="newinfo.f_price_type">
228
+ </v-select>
229
+ </div>
230
+ <div class="col-sm-4" :class="[$m.f_price_name.required ? 'has-error' : 'has-success']">
231
+ <label for="f_price_name" class="font_normal_body">气价名称</label>
232
+ <input style="width:60%" class="input_search" type="text" v-model="newinfo.f_price_name"
233
+ v-validate:f_price_name='{required: true }' placeholder="气价名称">
234
+ </div>
235
+ <div :class="[$m.f_stairmonths.required || $v.f_stairmonths.dctest ? 'has-error' : 'has-success']" class="col-sm-4 form-group"v-if="newinfo.f_price_type ==='阶梯气价'">
236
+ <label class="font_normal_body" for="f_stairmonths">阶段月数</label>
237
+ <input class="input_search" style="width:60%" type="number"
238
+ v-model="newinfo.f_stairmonths" v-validate:f_stairmonths='{required: true, dctest: [ 12, "<=" ] }'>
239
+ </div>
240
+ <div :class="[$m.f_stair_start_date.required ? 'has-error' : 'has-success']" class="col-sm-4 form-group" v-if="newinfo.f_price_type ==='阶梯气价'">
241
+ <input class="input_search" style="width:60%" type="text" v-model="newinfo.f_stair_start_date" v-show="false"
242
+ v-validate:f_stair_start_date='{required: true }'>
243
+ <label class="font_normal_body" for="f_stair_start_date">开始日期</label>
244
+ <datepicker :format="'yyyy-MM-dd'"
245
+ :value.sync="newinfo.f_stair_start_date"
246
+ class="datepicker"
247
+ id="f_stair_start_date"
248
+ placeholder="阶梯开始日期"
249
+ style="width: 60%"
250
+ v-model="newinfo.f_stair_start_date">
251
+ </datepicker>
252
+ </div>
253
+
254
+ <div class="col-sm-4" :class="[$m.f_price.required ? 'has-error' : 'has-success']" v-if="newinfo.f_price_type ==='固定气价'">
255
+ <label for="f_price" class="font_normal_body">&nbsp;&nbsp;&nbsp;单价&nbsp;&nbsp;&nbsp;</label>
256
+ <input style="width:60%" class="input_search" type="number" v-model="detailprice[0].f_price"
257
+ v-validate:f_price='{required: true }' placeholder="单价">
258
+ </div>
259
+ <div class='auto' style="margin-top: 10px;">
260
+ <stair-price :isheat.sync="model.f_isheat" :stairmodel.sync='detailprice'
261
+ v-if="newinfo.f_price_type ==='阶梯气价'"></stair-price>
262
+ </div>
263
+ </div>
264
+ <div class="row" style="margin-top: 2%" v-if="model.type ==='系统气价'">
265
+ <div class="col-sm-4 flex-row" >
266
+ <label class="control-label">用户类型</label>
267
+ <v-select :value.sync="newinfo.f_user_type"
268
+ :options='usertypes' placeholder='用户类型'
269
+ @change="userTypeChange()"
270
+ close-on-select></v-select>
271
+ </div>
272
+ <div class="col-sm-4 flex-row"
273
+ :class="[$m.gas.required ? 'has-error' : '']">
274
+ <label class="control-label">用气性质</label>
275
+ <input type="text" v-show="false" v-model="$refs.gas.selectedItems" v-validate:gas='{required: true }'>
276
+ <v-select :value.sync="newinfo.f_gasproperties" v-model="newinfo.f_gasproperties"
277
+ :options='gasproperties' placeholder='用气性质'
278
+ close-on-select v-ref:gas></v-select>
279
+ </div>
280
+ <div class="col-sm-4 flex-row" :class="[$m.type.required ? 'has-error' : '']">
281
+ <label class="control-label">气价类型</label>
282
+ <v-select :value.sync="newinfo.pricetype" v-model="newinfo.pricetype"
283
+ placeholder='气价类型' :options="pricetypes"
284
+ close-on-select v-ref:type>
285
+ </v-select>
286
+ <input type="text" v-show="false" v-model="$refs.type.selectedItems" v-validate:type='{required: true }'>
287
+ </div>
288
+ </div>
289
+ <div class="row" style="margin-top: 2%" v-if="model.type ==='系统气价'">
290
+
291
+ <div class="col-sm-4 flex-row" :class="[$m.name.required ? 'has-error' : '']">
292
+ <label class="control-label">气价名称</label>
293
+ <v-select :value.sync="newinfo.pricename" v-model="newinfo.pricename"
294
+ placeholder='气价名称' :options="getPricenames()" @change="priceChange"
295
+ close-on-select :disabled='newinfo.pricetype.length === 0 ' v-ref:name></v-select>
296
+ <input type="text" v-show="false" v-model="$refs.name.selectedItems" v-validate:name='{required: true }'>
297
+ <span class="col-sm-3" v-if="newinfo.pricetype.length === 1 && gasproperties.length === 0"
298
+ style="color:red;text-align:right">请确定用气性质已选择!!</span>
299
+ </div>
300
+
301
+ <div class="col-sm-4 flex-row">
302
+ <label class="control-label">气价备注</label>
303
+ <input type="text" class="input_search" style="width:60%" v-model="newinfo.f_price_comments" placeholder='气价备注' disabled>
304
+ </div>
305
+
306
+ <div class="col-sm-4 flex-row" >
307
+ <label class="control-label" >生效日期</label>
308
+ <input class="input_search" style="width:60%" type="text" v-model="preformdate"
309
+ :disabled="true">
310
+ </div>
311
+
312
+ </div>
313
+ </div>
314
+ </form>
315
+ </div>
316
+
317
+ <upload :blodid="row.f_userinfo_id" v-if="config.showupload" isremark="true" fusetype="单户调价"></upload>
318
+ </article>
319
+ <footer slot="modal-footer" class="modal-footer">
320
+ <button class="button_search" :disabled='!$m.valid ' @click="modifyUser">确定</button>
321
+ <button type="button" class="button_clear" @click='close'>取消</button>
322
+ </footer>
323
+
324
+ </modal>
325
+
326
+
327
+ <modal :backdrop="false" :show.sync="showPopUps" v-if="showPopUps" width="1000px">
328
+ <header class="modal-header" slot="modal-header">
329
+ <button @click="showPopUps=!showPopUps" class="close" type="button"><span>&times;</span></button>
330
+ <h4 class="modal-title">历史记录</h4>
331
+ </header>
332
+ <article class="modal-body" slot="modal-body" style="height:100%;width:100%" title="历史记录">
333
+ <user-price-change-history :row="row" :show.sync="showPopUps" v-on:toggle="close"></user-price-change-history>
334
+ </article>
335
+ <footer class="modal-footer" slot="modal-footer">
336
+
337
+ </footer>
338
+ </modal>
339
+ </validator>
340
+
341
+ </div>
342
+
343
+ </template>
344
+
345
+ <script>
346
+ import {PagedList} from 'vue-client'
347
+ import Vue from 'vue'
348
+
349
+ let loadParamGem = async function (self) {
350
+ if (!self.f_filialeid) {
351
+ self.f_filialeid = self.$login.f.orgid
352
+ }
353
+ await self.$LoadParams.loadParam(self.f_filialeid)
354
+ }
355
+
356
+ export default {
357
+ title: '单户调价',
358
+ data () {
359
+ return {
360
+ model: new PagedList('rs/sql/sale_getUserPrice', 30, {orderitem: '"f_userinfo_id DESC"'}),
361
+ row: null, // 选择一条客户信息,对其进行修改
362
+ rows: [], // 客户档案选择一条时,将只显示一条信息,rows用来存放整页的数据
363
+ orderDefault: 'f_createfile_date desc',
364
+ orderFields: {
365
+ f_userinfo_id: 'no'
366
+ },
367
+ config: {
368
+ showupload: true
369
+ },
370
+ detailprice: [],
371
+ newinfo: {
372
+ f_user_type: '',
373
+ f_gasproperties: '',
374
+ pricetype: '',
375
+ pricename: '',
376
+ f_perform_date: this.$login.toStandardDateString() + ' 00:00:00' // 操作时间
377
+ },
378
+ preformdate: this.$login.toStandardDateString() + ' 00:00:00',
379
+ showPerformDate: false,
380
+ show: false,
381
+ showPopUps: false,
382
+ curorgid: [this.$login.f.orgid],
383
+ f_filialeid: this.$login.f.orgid,
384
+ criteriaShow: false,
385
+ valid: false,
386
+ pricetype: [{label: '固定气价', value: '固定气价'}, {label: '阶梯气价', value: '阶梯气价'}],
387
+ gasproperties: [],
388
+ gasproperties2: this.$appdata.getParam('用气性质') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')] : [],
389
+ usertypes: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
390
+ pricetypes: this.$appdata.getParam('气价类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')] : []
391
+ // userstates: [{label: '全部', value: ''}, ...this.$appdata.getParam('客户状态')]
392
+ }
393
+ },
394
+ methods: {
395
+ userTypeChange () {
396
+ this.gasproperties = []
397
+ if (this.newinfo.f_user_type.length === 1) {
398
+ this.gasproperties = this.$appdata.getParam(this.newinfo.f_user_type[0])
399
+ }
400
+ },
401
+
402
+ hidden () {
403
+ this.criteriaShow = !this.criteriaShow
404
+ },
405
+ search () {
406
+ this.$refs.paged.$refs.criteria.search()
407
+ },
408
+ priceshow (row) {
409
+ this.show = true
410
+ this.showPerformDate = (row.f_calculation == '表端结算')
411
+ this.row = row
412
+ },
413
+ lookOver (row) {
414
+ this.showPopUps = true
415
+ this.row = row
416
+ },
417
+ getPricenames () {
418
+ console.log('气价。,。。', this.newinfo.pricetype, this.newinfo.f_user_type, this.newinfo.f_gasproperties)
419
+ let rs = []
420
+ if (this.newinfo.f_user_type.length === 1 && this.newinfo.f_gasproperties.length === 1 && this.newinfo.pricetype.length === 1) {
421
+ let params = {
422
+ f_user_type: this.newinfo.f_user_type[0],
423
+ f_gasproperties: this.newinfo.f_gasproperties[0],
424
+ f_price_type: this.newinfo.pricetype[0],
425
+ filter: this.f_filialeid
426
+ }
427
+ rs = this.$GetSaleParam.getPriceAll(params)
428
+ }
429
+ if (rs.length === 0) {
430
+ this.newinfo.f_price_name = ''
431
+ }
432
+ return rs
433
+ },
434
+ priceChange (val) {
435
+ if (val && val.length > 0) {
436
+ // 展示气价备注
437
+ this.$set('newinfo.f_price_comments', val[0].f_comments ? val[0].f_comments : '无')
438
+ }
439
+ },
440
+ close () {
441
+ this.showPerformDate = false
442
+ this.show = false
443
+ this.row = null
444
+ this.newinfo = {
445
+ f_user_type: '',
446
+ f_gasproperties: '',
447
+ pricetype: '',
448
+ pricename: ''
449
+ }
450
+ },
451
+ async modifyUser () {
452
+ if (this.model.type === '系统气价') {
453
+ let param = {
454
+ f_userinfo_id: this.row.f_userinfo_id,
455
+ f_userfiles_id: this.row.f_userfiles_id,
456
+ f_user_id: this.row.f_user_id,
457
+ f_user_name: this.row.f_user_name,
458
+ f_user_type: this.newinfo.f_user_type[0],
459
+ f_gasproperties: this.newinfo.f_gasproperties[0],
460
+ f_price_type: this.newinfo.pricetype[0],
461
+ f_price_id: this.newinfo.pricename[0].f_price_id,
462
+ f_filialeid: this.f_filialeid,
463
+ f_operator: this.$login.f.name,
464
+ f_operatorid: this.$login.f.id,
465
+ f_orgid: this.$login.f.orgid,
466
+ f_orgname: this.$login.f.orgs,
467
+ f_depid: this.$login.f.depids,
468
+ f_depname: this.$login.f.deps,
469
+ f_perform_date: this.row.f_perform_date,
470
+ f_change_reason: ''
471
+ }
472
+
473
+ await this.$resetpost('rs/logic/user_pricechange', {data: param}, {resolveMsg: '更新成功', rejectMsg: '更新失败'})
474
+
475
+ this.criteriaShow = false
476
+ this.close()
477
+ this.search()
478
+ } else if (this.model.type === '自定义气价') {
479
+ let data = {
480
+ f_userinfo_id: this.row.f_userinfo_id,
481
+ f_userfiles_id: this.row.f_userfiles_id,
482
+ f_user_id: this.row.f_user_id,
483
+ f_user_name: this.row.f_user_name,
484
+ f_price_type: this.newinfo.f_price_type,
485
+ f_price_name: this.newinfo.f_price_name,
486
+ f_user_type: this.row.f_user_type,
487
+ f_gasproperties: this.row.f_gasproperties,
488
+ f_perform_date: '2021-01-01 00:00:00',
489
+ f_perform_date_change: this.row.f_perform_date,
490
+ f_end_date: '2099-12-31 23:59:59',
491
+ f_islow_income: 0,
492
+ f_limit_cycle: 0,
493
+ f_limit_gas: 0,
494
+ f_stairmonths: null,
495
+ f_population_base: null,
496
+ f_stair_start_date: null,
497
+ f_isheat: 0,
498
+ f_deduction_way: 'cycle',
499
+ f_heat_start_date: null,
500
+ f_heat_cycle: null,
501
+ f_priority: 100,
502
+ f_comments: '',
503
+ f_state: '有效',
504
+ f_filialeid: this.f_filialeid,
505
+ f_operator: this.$login.f.name,
506
+ f_operatorid: this.$login.f.id,
507
+ f_orgid: this.$login.f.orgid,
508
+ f_orgname: this.$login.f.orgs,
509
+ f_depid: this.$login.f.depids,
510
+ f_depname: this.$login.f.deps,
511
+ userid: this.$login.f.id,
512
+ audit: false,
513
+ type: '添加',
514
+ detailprice: this.detailprice,
515
+ f_custom: '自定义气价'
516
+ }
517
+ if (this.newinfo.f_price_type === '阶梯气价') {
518
+ data.f_stairmonths = this.newinfo.f_stairmonths
519
+ data.f_population_base = 0
520
+ data.f_stair_start_date = this.newinfo.f_stair_start_date
521
+ }
522
+ if (data.f_price_type === '固定气价') {
523
+ if (data.detailprice[0].id) {
524
+ delete data.detailprice[0].id
525
+ }
526
+ data.detailprice[0].f_price_name = 1
527
+ } else if (data.f_price_type === '阶梯气价') {
528
+ data.detailprice.forEach((item, index) => {
529
+ data.detailprice[index].f_price_name = index + 1
530
+ if (data.detailprice[index].id) {
531
+ if (delete data.detailprice[index].id) {
532
+ delete data.detailprice[index].id
533
+ }
534
+ } else if (data.detailprice[index].f_ratio) {
535
+ data.detailprice[index].f_ratio = null
536
+ } else if (!data.detailprice[index].f_add_gas) {
537
+ data.detailprice[index].f_add_gas = 0
538
+ } else if (!data.detailprice[index].f_add_gas_heat) {
539
+ data.detailprice[index].f_add_gas_heat = 0
540
+ }
541
+ })
542
+ }
543
+
544
+ this.$resetpost('rs/logic/customprice', {data: data}, {resolveMsg: '更新成功', rejectMsg: '更新失败'})
545
+
546
+ this.criteriaShow = false
547
+ this.close()
548
+ this.search()
549
+ }
550
+ },
551
+ clean () {
552
+ this.row = null
553
+ this.areainfo = null
554
+ this.$refs.paged.$refs.grid.select(null)
555
+ this.$refs.paged.$refs.grid.model.rows = this.rows
556
+ },
557
+
558
+ selfSearch (args) {
559
+ console.log('开始查询档案', this.f_filialeid)
560
+ if (this.f_filialeid && this.f_filialeid !== '') {
561
+ args.condition = `${args.condition} and f_filialeid = '${this.f_filialeid}'`
562
+ } else {
563
+ args.condition = `${args.condition} and f_filialeid = '${this.$login.f.orgid}'`
564
+ }
565
+ this.criteriaShow = false
566
+ this.$refs.paged.$refs.grid.$el.scrollTop = 0
567
+ this.model.search(args.condition, args.model)
568
+ this.clean()
569
+ },
570
+ sort (field, rule) {
571
+ // 将所有排序方式设为不排序,实现相互排斥
572
+ for (let key in this.orderFields) {
573
+ if (key === field) {
574
+ this.orderFields[key] = rule
575
+ } else {
576
+ this.orderFields[key] = 'no'
577
+ }
578
+ }
579
+ // 如果新规则不排序,还原为默认排序
580
+ if (rule === 'no') {
581
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
582
+ } else {
583
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
584
+ }
585
+
586
+ this.search()
587
+ },
588
+
589
+ clear () {
590
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
591
+ this.$refs.paged.$refs.criteria.model[key] = []
592
+ })
593
+ },
594
+ getorg (val) {
595
+ this.f_filialeid = val[0]
596
+ }
597
+ },
598
+ ready () {
599
+ // this.search()
600
+ },
601
+ watch: {
602
+ // 每次查询将查询到的数据存储起来,供选择操作后的替换
603
+ 'model.state' (val) {
604
+ if (val === '正确') {
605
+ this.rows = this.model.rows
606
+ }
607
+ },
608
+ 'newinfo.f_price_type' (val) {
609
+ if (val === '固定气价') {
610
+ this.detailprice = []
611
+ } else if (val === '阶梯气价') {
612
+ this.detailprice = [{f_gas: '', f_price: '', f_add_gas: 0, f_add_gas_heat: 0}]
613
+ }
614
+ },
615
+ 'show' (val) {
616
+ if (!val) {
617
+ this.newinfo = {
618
+ f_user_type: '',
619
+ f_gasproperties: '',
620
+ pricetype: '',
621
+ pricename: ''
622
+ }
623
+ this.row = null
624
+ } else {
625
+ this.newinfo = {
626
+ f_user_type: [this.row.f_user_type],
627
+ f_gasproperties: [this.row.f_gasproperties],
628
+ pricetype: [this.row.f_price_type],
629
+ pricename: ''
630
+ }
631
+ }
632
+ },
633
+ 'f_filialeid' (val) {
634
+ loadParamGem(this)
635
+ },
636
+ async 'newinfo.pricename' () {
637
+ if (this.newinfo.pricename == null || !(this.newinfo.pricename instanceof Array) || this.newinfo.pricename.length == 0) return
638
+ let qij = await this.$resetpost('rs/sql/saleSingleTable', {
639
+ data: {
640
+ tablename: 't_stairprice',
641
+ condition: ` f_price_id = ${this.newinfo.pricename[0].f_price_id} and getDate()>= f_perform_date and getDate()<f_end_date `
642
+ }
643
+ }, {resolveMsg: null, rejectMsg: null})
644
+ if (qij.data && qij.data.length > 0) {
645
+ this.preformdate = qij.data[0].f_perform_date
646
+ }
647
+ }
648
+ }
649
+ }
650
+ </script>
651
+ <style scoped>
652
+
653
+ .datapanel {
654
+ color: #333;
655
+ background-color: white;
656
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
657
+ padding: 10px 30px 10px 30px;
658
+ height: auto;
659
+ border-radius:15px;
660
+ }
661
+
662
+ </style>
@@ -4,6 +4,8 @@ import Vue from 'vue'
4
4
  export default function () {
5
5
  // 卡表抄表
6
6
  Vue.component('cards-hand', (resolve) => { require(['./cardsHand'], resolve) })
7
+ // 单户调价
8
+ Vue.component('user-pricechange-manage', (resolve) => { require(['./UserPriceChangeManage'], resolve) })
7
9
  // 表具停用
8
10
  Vue.component('disable-manage', (resolve) => { require(['./DisableManage'], resolve) })
9
11
  Vue.component('iot-meter-center', (resolve) => { require(['./IOTMeterCenter'], resolve) })
package/src/main.js CHANGED
@@ -3,7 +3,7 @@ import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
5
  import sale from './sale'
6
- import wenxi from './filiale/yuansheng/sale'
6
+ // import wenxi from './filiale/yuansheng/sale'
7
7
  // import FilialeSale from './filiale/yuansheng/sale'
8
8
  import address from 'address-client/src/address'
9
9
  import ldap from 'ldap-clients/src/ldap'
@@ -15,7 +15,7 @@ Vue.config.silent = true
15
15
  all()
16
16
  system(false)
17
17
  sale()
18
- wenxi()
18
+ // wenxi()
19
19
  // FilialeSale()
20
20
  address()
21
21
  ldap()