sale-client 3.5.253 → 3.5.255

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://127.0.0.1:8080', 'http://192.168.50.4:8400']
2
+ const [localUrl, serverRul] = ['http://119.187.112.234:8400/#', 'http://119.187.112.234: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.5.253",
3
+ "version": "3.5.255",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -372,7 +372,6 @@ let meterBookGen = function * (self) {
372
372
  this.oldrow = this.row
373
373
  this.isdecimal = this.row.gasbrand.length > 0 ? this.row.gasbrand.f_isdecimal : '否'
374
374
  this.row.valid = false
375
- this.row.f_aroundmeter = '左表'
376
375
  if (this.row.pricetype === '混合气价') {
377
376
  this.ratioshow = true
378
377
  }
@@ -14,10 +14,28 @@
14
14
  <!-- <input type="text" class="input_search" style="width:60%" v-model="row.f_metertitles" placeholder='表封号'-->
15
15
  <!-- v-next-el="{id: 'meterbase'}">-->
16
16
  <!-- </div>-->
17
- <div class="col-sm-4 form-group">
18
- <label for="f_llj_brand" class="font_normal_body">流量计品牌</label>
19
- <input type="text" class="input_search" style="width:60%" v-model="row.f_llj_brand" placeholder='流量计品牌'
20
- v-next-el="{id: 'meterbase'}">
17
+ <!-- <div class="col-sm-4 form-group">-->
18
+ <!-- <label for="f_llj_brand" class="font_normal_body">流量计品牌</label>-->
19
+ <!-- <input type="text" class="input_search" style="width:60%" v-model="row.f_llj_brand" placeholder='流量计品牌'-->
20
+ <!-- v-next-el="{id: 'meterbase'}">-->
21
+ <!-- </div>-->
22
+ <div class="col-sm-4 form-group" >
23
+ <label for="f_llj_brand" class="font_normal_body" title="参数:流量计品牌">&ensp;流量计品牌</label>
24
+ <v-select :value.sync="row.f_llj_brand" v-model="row.f_llj_brand"
25
+ :options='lljbrand' placeholder='流量计品牌'
26
+ close-on-select></v-select>
27
+ </div>
28
+ <div class="col-sm-4 form-group" >
29
+ <label for="f_llj_type" class="font_normal_body" title="参数:流量计类型">&ensp;流量计类型</label>
30
+ <v-select :value.sync="row.f_llj_type" v-model="row.f_llj_type"
31
+ :options='lljtype' placeholder='流量计类型'
32
+ close-on-select></v-select>
33
+ </div>
34
+ <div class="col-sm-4 form-group" >
35
+ <label for="f_meter_flow" class="font_normal_body" title="参数:气表流量">&ensp;气表流量</label>
36
+ <v-select :value.sync="row.f_meter_flow" v-model="row.f_meter_flow"
37
+ :options='meterflow' placeholder='气表流量'
38
+ close-on-select></v-select>
21
39
  </div>
22
40
  <div class="col-sm-4 form-group">
23
41
  <label for="f_llj_model" class="font_normal_body">流量计型号</label>
@@ -381,6 +399,9 @@ let meterBookGen = function * (self) {
381
399
  showParame: false,
382
400
  selectUserFiles: '', // 选中的 userfiles
383
401
  jurisdiction: this.$login.r,
402
+ lljbrand: this.$appdata.getParam('流量计品牌'),
403
+ lljtype: this.$appdata.getParam('流量计类型'),
404
+ meterflow: this.$appdata.getParam('气表流量'),
384
405
  positions: this.$appdata.getParam('安装位置'),
385
406
  usetype: this.$appdata.getParam('使用类型'),
386
407
  usestate: this.$appdata.getParam('使用状态'),
@@ -610,9 +631,9 @@ let meterBookGen = function * (self) {
610
631
  aroundmeters () {
611
632
  return this.$appdata.getParam('左右表')
612
633
  },
613
- positions () {
614
- return this.$appdata.getParam('安装位置')
615
- },
634
+ // positions () {
635
+ // return this.$appdata.getParam('安装位置')
636
+ // },
616
637
  bqftype(){
617
638
  return this.$appdata.getParam('表前阀型号')
618
639
  },
@@ -0,0 +1,386 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main">
4
+ <div class="flex">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' v-ref:criteria @condition-changed="$parent.selfSearch">
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <div class="form-group col-sm-2" >
10
+ <label class="font_normal_body">客户编号</label>
11
+ <input type="text" class="input_search" style="width:60%"
12
+ v-model="model.f_userinfo_code" placeholder='客户编号'
13
+ condition="f_userinfo_code = '{}'" >
14
+ </div>
15
+ <div class="form-group col-sm-2">
16
+ <label class="font_normal_body">客户名称</label>
17
+ <input type="text" class="input_search" style="width:60%"
18
+ v-model="model.f_user_name" placeholder='客户名称'
19
+ condition="f_user_name like '%{}%'">
20
+ </div>
21
+ <div class="form-group col-sm-2" >
22
+ <label class="font_normal_body">开始日期</label>
23
+ <datepicker placeholder="开始日期"
24
+ style="width:60%"
25
+ v-model="model.startDate"
26
+ :value.sync="model.startDate"
27
+ :format="'yyyy-MM-dd'"
28
+ ></datepicker>
29
+ </div>
30
+ <div class="form-group col-sm-2" >
31
+ <label class="font_normal_body">结束日期</label>
32
+ <datepicker placeholder="结束日期"
33
+ style="width:60%"
34
+ v-model="model.endDate"
35
+ :value.sync="model.endDate"
36
+ :format="'yyyy-MM-dd'"
37
+ ></datepicker>
38
+ </div>
39
+ <div class="span" style="float:right;">&nbsp;&nbsp;
40
+ <button class="button_new" style="width: max-content" v-show="$parent.$parent.pricechange" @click="$parent.$parent.priceshow()">批量调价</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
41
+ <button class="button_search" @click="search()" v-el:cx>查询</button>
42
+ <button class="button_clear" @click="$parent.$parent.clear()">清空</button>
43
+ <div style="float: right" class="button_spacing"
44
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
45
+ @click="$parent.$parent.hidden()"></div>
46
+ </div>
47
+ </div>
48
+ <div class="row" v-show="$parent.$parent.criteriaShow">
49
+ <div class="form-group col-sm-2">
50
+ <label class="font_normal_body">客户地址</label>
51
+ <input type="text" class="input_search" style="width:60%" style="width:60%" v-model="model.f_address" placeholder='客户地址'
52
+ condition="u3.f_address like '%{}%'">
53
+ </div>
54
+ <div class="form-group col-sm-2">
55
+ <label class="font_normal_body">电&emsp;&emsp;话</label>
56
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_user_phone" placeholder='电话'
57
+ condition="f_user_phone like '%{}%'">
58
+ </div>
59
+ <div class="form-group col-sm-2">
60
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
61
+ <input type="text" class="input_search" style="width:60%" style="width:60%" v-model="model.f_meternumber" placeholder='表号'
62
+ condition="f_meternumber like '%{}%'">
63
+ </div>
64
+ <div class="form-group col-sm-2">
65
+ <label class="font_normal_body">状&emsp;&emsp;态</label>
66
+ <v-select id="price_states"
67
+ v-model="model.price_states"
68
+ placeholder='未调价'
69
+ style="width: 60%"
70
+ :value.sync="model.price_states"
71
+ :options='$parent.$parent.price_states'
72
+ condition="f_new_price {}"
73
+ close-on-select></v-select>
74
+ </div>
75
+ <div class="form-group col-sm-2">
76
+ <label class="font_normal_body">用户类型</label>
77
+ <v-select id="f_user_tye"
78
+ v-model="model.f_user_type"
79
+ placeholder='用户类型'
80
+ style="width: 60%"
81
+ @change="$parent.$parent.userTypeChange"
82
+ :value.sync="model.f_user_type"
83
+ :options='$parent.$parent.userTypes'
84
+ condition="u2.f_user_type = '{}'"
85
+ close-on-select></v-select>
86
+ </div>
87
+ <div class="form-group col-sm-2">
88
+ <label class="font_normal_body">气&emsp;&emsp;价</label>
89
+ <v-select id="f_price_name"
90
+ v-model="model.price_name"
91
+ placeholder='气价名称'
92
+ style="width: 60%"
93
+ :value.sync="model.price_name"
94
+ :options='$parent.$parent.price_name'
95
+ condition="sp.id = '{}'"
96
+ close-on-select></v-select>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ </criteria>
101
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid >
102
+ <template partial='head'>
103
+ <tr>
104
+ <th><nobr>序号</nobr></th>
105
+ <th><nobr>客户编号</nobr></th>
106
+ <th><nobr>表号</nobr></th>
107
+ <th><nobr>姓名</nobr></th>
108
+ <th><nobr>客户类型</nobr></th>
109
+ <th><nobr>气表类型</nobr></th>
110
+ <th><nobr>气价名称</nobr></th>
111
+ <!-- <th><nobr>地址</nobr></th>-->
112
+ <th><nobr>系统气价</nobr></th>
113
+ <th><nobr>输入气价</nobr></th>
114
+ <th><nobr>补差单价</nobr></th>
115
+ <th><nobr>上期底数</nobr></th>
116
+ <th><nobr>本期底数</nobr></th>
117
+ <th><nobr>补差气量</nobr></th>
118
+ <th><nobr>补差金额</nobr></th>
119
+ <th><nobr>差价来源</nobr></th>
120
+ <th><nobr>抄表日期</nobr></th>
121
+ <th><nobr>操作</nobr></th>
122
+ </tr>
123
+ </template>
124
+ <template partial='body'>
125
+ <td style="text-align: center;">{{$index+1}}</td>
126
+ <th style="text-align: center;">{{row.f_userinfo_code}}</th>
127
+ <th style="text-align: center;">{{row.f_meternumber}}</th>
128
+ <th style="text-align: center;">{{row.f_user_name}}</th>
129
+ <th style="text-align: center;">{{row.f_user_type}}</th>
130
+ <th style="text-align: center;">{{row.f_meter_type}}</th>
131
+ <th style="text-align: center;">{{row.f_price_name}}</th>
132
+ <!-- <th style="text-align: center;">{{row.f_address}}</th>-->
133
+ <th style="text-align: center;">{{row.f_old_price?row.f_old_price:row.f_price}}</th>
134
+ <th style="text-align: center;">
135
+ <div class="form-group" style="margin-bottom:0px;"
136
+ v-if="!row.f_new_price>0">
137
+ <input type="text" class="form-control" v-model="row.newprice" @blur="$parent.$parent.$parent.enter(row)"
138
+ v-next-el="{id: $index+1}" :id="$index" style="width: 100px;padding: 6px;" :disabled="row.state === '开始'">
139
+ </div>
140
+ <div v-else>{{row.f_new_price}}</div>
141
+ </th>
142
+ <th style="text-align: center;">{{row.f_change_price}}</th>
143
+ <th style="text-align: center;">{{row.f_last_tablebase}}</th>
144
+ <th style="text-align: center;">{{row.f_tablebase}}</th>
145
+ <th style="text-align: center;">
146
+ <div class="form-group" style="margin-bottom:0px;"
147
+ v-if="!row.f_new_price>0">
148
+ <input type="text" class="form-control" v-model="f_new_pregas" @blur="$parent.$parent.$parent.enter(row)"
149
+ v-next-el="{id: $index+1}" :id="$index" style="width: 100px;padding: 6px;" :disabled="row.state === '开始'">
150
+ </div>
151
+ <div v-else>{{row.pregas}}</div>
152
+ </th>
153
+ <th style="text-align: center;">{{row.f_surplus_fee}}</th>
154
+ <th style="text-align: center;">{{row.f_source}}</th>
155
+ <th style="text-align: center;">{{row.f_input_date}}</th>
156
+ <th style="text-align: center;">
157
+ <button type="button" name="button" class="btn btn-link" v-if="row.f_new_price"
158
+ @click.stop="$parent.$parent.$parent.delectHand(row) && row.states === 1">冲正
159
+ </button>
160
+ </th>
161
+ </template>
162
+ </data-grid>
163
+ </criteria-paged>
164
+ <modal :show.sync="show" >
165
+ <header slot="modal-header" class="modal-header">
166
+ <h4 class="modal-title">调 价 补 差</h4>
167
+ </header>
168
+ <article slot="modal-body" class="modal-body">
169
+ <div class="form-group">
170
+ <p>价格:</p>
171
+ <input type="text" class="form-control" v-model="f_new_price" >
172
+ </div>
173
+ </article>
174
+ <footer slot="modal-footer" class="modal-footer">
175
+ <button class="button_search" @click="priceadjustment">生成调价补差表</button>
176
+ <button type="button" class="btn btn-default" @click='close'>取消</button>
177
+ </footer>
178
+ </modal>
179
+ <work-busy :is-busy="locking" v-show="locking"></work-busy>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ </template>
184
+
185
+ <script>
186
+ import { HttpResetClass } from 'vue-client'
187
+ import { PagedList } from 'vue-client'
188
+ import Vue from 'vue'
189
+ let readySomething = async function (self) {
190
+ self.$refs.paged.$refs.criteria.model.startDate = self.$login.toStandardDateString()
191
+ self.$refs.paged.$refs.criteria.model.endDate = self.$login.toStandardDateString()
192
+ self.$resetpost('rs/sql/getpriceid', {data: {f_filialeids: self.$login.f.orgid}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
193
+ console.log(res.data)
194
+ let rs = []
195
+ for (let i = 0; i < res.data.length; i++) {
196
+ if (res.data[i].f_price_type === '固定气价') {
197
+ let temp = {
198
+ label: res.data[i].f_price_name,
199
+ flage: res.data[i].f_user_type,
200
+ value: res.data[i].id
201
+ }
202
+ rs.push(temp)
203
+ }
204
+ }
205
+ console.log(rs)
206
+ self.pricers = [{label: '全部', value: '', flage: ''}, ...rs]
207
+ self.$refs.paged.$refs.criteria.search()
208
+ })
209
+ }
210
+
211
+ export default {
212
+ title: '调价补差',
213
+ data () {
214
+ return {
215
+ pricechange: true,
216
+ criteriaShow: false,
217
+ pricers: [{label: '全部', value: '', flage: ''}],
218
+ price_name: [{label: '全部', value: ''}],
219
+ price_states: [{label: '全部', value: ''}, {label: '已调价', value: ' >0'}, {label: '未调价', value: ' <=0'}],
220
+ source: [{label: '卡表抄表', value: '卡表抄表'}, {label: '机表抄表', value: '机表抄表'}],
221
+ userTypes: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
222
+ condition: '',
223
+ locking: false,
224
+ model: new PagedList('rs/sql/get_UserCharge', 20, {startDate: 'this.model.startDate', endDate: 'this.model.endDate', price_states: 'this.model.price_states[0]', addSelectParam: 'this.model.addSelectParam'}),
225
+ f_new_price: 0.0,
226
+ f_new_pregas:'',
227
+ show: false,
228
+ addSelectParam: ''
229
+ // joinTable:'',
230
+ }
231
+ },
232
+ ready () {
233
+ readySomething(this).then(() => {
234
+ this.$emit('ready')
235
+ }).catch((error) => {
236
+ this.$emit('error', error)
237
+ })
238
+ },
239
+ methods: {
240
+ hidden () {
241
+ this.criteriaShow = !this.criteriaShow
242
+ },
243
+ // 用户类型发生改变
244
+ userTypeChange () {
245
+ this.price_name = []
246
+ if (this.$refs.paged.$refs.criteria.model.f_user_type) {
247
+ if (this.$refs.paged.$refs.criteria.model.f_user_type[0]) {
248
+ for (let i = 0; i < this.pricers.length; i++) {
249
+ if (this.pricers[i].flage === this.$refs.paged.$refs.criteria.model.f_user_type[0]) {
250
+ let rs = {
251
+ label: this.pricers[i].label,
252
+ value: this.pricers[i].value
253
+ }
254
+ this.price_name.push(rs)
255
+ }
256
+ }
257
+ }
258
+ }
259
+ // 选择全部时就放进去所有的气价
260
+ if (this.price_name.length === 0) {
261
+ for (let i = 0; i < this.pricers.length; i++) {
262
+ let rs = {
263
+ label: this.pricers[i].label,
264
+ value: this.pricers[i].value
265
+ }
266
+ this.price_name.push(rs)
267
+ }
268
+ }
269
+ },
270
+ // 冲正
271
+ delectHand (row) {
272
+ this.$showMessage('冲正后不可恢复,确定冲正吗?', ['confirm', 'cancel']).then((res) => {
273
+ if (res === 'confirm') {
274
+ row.f_operator = this.$login.f.name
275
+ row.f_operatorid = this.$login.f.id
276
+ row.f_orgid = this.$login.f.orgid
277
+ row.f_orgname = this.$login.f.orgs
278
+ row.f_depid = this.$login.f.depids
279
+ row.f_depname = this.$login.f.deps
280
+ this.$resetpost('rs/logic/priceAdjustmentOffset', {data: row}).then(() => {
281
+ // this.$dispatch('refresh', '正在处理', row)
282
+ this.selfSearch(this.model)
283
+ })
284
+ }
285
+ })
286
+ },
287
+ priceshow () {
288
+ this.show = true
289
+ },
290
+ close () {
291
+ this.show = false
292
+ this.f_new_price = 0.0
293
+ },
294
+ async priceadjustment () {
295
+ this.$showMessage('确认生成补差记录吗?', ['cancel', 'confirm']).then(
296
+ (response) => {
297
+ if (response === 'confirm') {
298
+ this.show = false
299
+ this.locking = true
300
+ this.getAdjustData()
301
+ }
302
+ })
303
+ },
304
+ async enter (row) {
305
+ row.pregas = this.f_new_pregas
306
+ let http2 = new HttpResetClass()
307
+ let param = {
308
+ f_state: '有效',
309
+ f_new_price: parseFloat(row.newprice),
310
+ f_operator: this.$login.f.name,
311
+ f_operatorid: this.$login.f.id,
312
+ f_orgid: this.$login.f.orgid,
313
+ f_orgname: this.$login.f.orgs,
314
+ f_depid: this.$login.f.depids,
315
+ f_depname: this.$login.f.deps,
316
+ f_start_date: this.model.model.startDate + ' 00:00:00',
317
+ f_end_date: this.model.model.endDate + ' 23:59:59',
318
+ row: row
319
+ }
320
+ await http2.load('POST', 'rs/logic/priceAdjustment', {data: param}, {resolveMsg: null, rejectMsg: null})
321
+ this.selfSearch(this.model)
322
+ },
323
+ async getAdjustData () {
324
+ try {
325
+ let http = new HttpResetClass()
326
+ let detail = await http.load('POST', 'rs/sql/get_UserCharge',
327
+ {data: {condition: this.condition, startDate: this.model.model.startDate, endDate: this.model.model.endDate, addSelectParam: '', price_states: 'not'}}, {resolveMsg: null, rejectMsg: null})
328
+ console.log(detail.data)
329
+ let param = {
330
+ f_state: '有效',
331
+ f_new_price: parseFloat(this.f_new_price),
332
+ f_operator: this.$login.f.name,
333
+ f_operatorid: this.$login.f.id,
334
+ f_orgid: this.$login.f.orgid,
335
+ f_orgname: this.$login.f.orgs,
336
+ f_depid: this.$login.f.depids,
337
+ f_depname: this.$login.f.deps,
338
+ f_start_date: this.model.model.startDate + ' 00:00:00',
339
+ f_end_date: this.model.model.endDate + ' 23:59:59',
340
+ condition: this.condition
341
+ }
342
+ let http2 = new HttpResetClass()
343
+ for (var i = 0; i < detail.data.length; i++) {
344
+ param.row = detail.data[i]
345
+ await http2.load('POST', 'rs/logic/priceAdjustment', {data: param}, {resolveMsg: null, rejectMsg: null})
346
+ }
347
+ this.close()
348
+ this.$showMessage('已生成了' + detail.data.length + '条调价补差记录', ['confirm'])
349
+ this.$refs.paged.$refs.criteria.search()
350
+ this.locking = false
351
+ } catch (error) {
352
+ this.$showAlert('生成调价补差表失败!!!', 'error', 3)
353
+ this.locking = false
354
+ }
355
+ },
356
+ search () {
357
+ this.selfSearch()
358
+ },
359
+ selfSearch (args) {
360
+ args.model.addSelectParam = ''
361
+ // args.model.joinTable =''
362
+ if (args.model.price_states.toString() === '') {
363
+ this.pricechange = false
364
+ // args.model.addSelectParam = 'u5.f_surplus_fee,u5.id,u5.f_state,u5.f_new_price,u5.f_old_price,u5.f_change_price,u5.f_whether_pay,u5.f_sell_id,'
365
+ // args.model.joinTable = 'left join t_surplus_detail u5 on u5.f_handplan_id = u1.f_handplan_id'
366
+ } else {
367
+ this.pricechange = true
368
+ }
369
+ this.condition = `${args.condition} and u2.f_orgid = '${this.$login.f.orgid}'`
370
+ this.model.search(this.condition, args.model)
371
+ },
372
+ clear () {
373
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
374
+ this.$refs.paged.$refs.criteria.model[key] = ''
375
+ })
376
+ }
377
+ },
378
+ computed: {
379
+ },
380
+ watch: {
381
+ }
382
+ }
383
+ </script>
384
+
385
+ <style >
386
+ </style>