sale-client 3.6.414 → 3.6.415

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,7 +1,7 @@
1
1
  var path = require('path')
2
2
  var checkVersion = require('./versionCheck.js')
3
3
  checkVersion()
4
- const [ serverRul, localUrl, v4Url ] = ['http://192.168.50.67:30785/', 'http://192.168.50.67:30785/', 'http://192.168.50.67:30785']
4
+ const [ serverRul, localUrl, v4Url ] = ['http://192.168.50.67:30785/', 'http://localhost:8080/', 'http://192.168.50.67:30785']
5
5
  var merge = require('webpack-merge')
6
6
  var baseConfig = require('./webpack.dev.conf')
7
7
  var devConfig = {
@@ -60,7 +60,7 @@ var devConfig = {
60
60
  target: serverRul
61
61
  },
62
62
  '/rs/logic/getSaleInitData': {
63
- target: serverRul
63
+ target: localUrl
64
64
  },
65
65
  // 用户登录服务地址
66
66
  '/rs/user': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.414",
3
+ "version": "3.6.415",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -76,20 +76,18 @@ let getBtnsGen = async function (self) {
76
76
  })
77
77
  }
78
78
  } else {
79
- if (getBtns[i].name !== '限制购气' || self.$login.r.includes('限制购气')) {
80
- self.temp.push(getBtns[i])
81
- }
79
+ self.temp.push(getBtns[i])
82
80
  }
83
81
  console.log(self.temp[i])
84
82
  }
85
83
  }
86
- // 检查是否需要展示限制购气按钮
87
- if (self.$login.r.includes('限制购气')) {
88
- let limitGasButton = getBtns.find(btn => btn.name === '限制购气')
89
- if (limitGasButton) {
90
- self.temp.push(limitGasButton)
91
- }
92
- }
84
+ // // 检查是否需要展示限制购气按钮
85
+ // if (self.$login.r.includes('限制购气')) {
86
+ // let limitGasButton = getBtns.find(btn => btn.name === '限制购气')
87
+ // if (limitGasButton) {
88
+ // self.temp.push(limitGasButton)
89
+ // }
90
+ // }
93
91
  // 如果有未写卡记录,添加线下写卡按钮
94
92
  if (self.data.unWriteSell) {
95
93
  if (self.data.unWriteSell.length > 0) {
@@ -90,7 +90,7 @@ let meterEnable = async function (self, model, row) {
90
90
  f_zones: self.$login.f.zones
91
91
  }
92
92
  await self.$resetpost('rs/entity/t_enable', data, {resolveMsg: '表具启用成功', rejectMsg: '表具启用失败'})
93
- if(self.kaifa){
93
+ if (self.kaifa) {
94
94
  let array = [{
95
95
  f_user_id: self.row.f_userfiles_id,
96
96
  f_alias: self.row.f_alias,
@@ -119,6 +119,10 @@ let meterEnable = async function (self, model, row) {
119
119
  inputtor: self.$login.f.name
120
120
  }
121
121
  }
122
+ }).then(res => {
123
+ console.log(res)
124
+ let sql = `update t_userfiles set f_network_valve = 0 where f_userfiles_id = '${self.row.f_userfiles_id}'`
125
+ self.$resetpost('rs/logic/runSQL', {sql: sql}, {resolveMsg: '操作成功', rejectMsg: '操作失败'})
122
126
  })
123
127
  }
124
128
  self.$dispatch('success')
@@ -137,17 +141,17 @@ export default {
137
141
  },
138
142
  reason: this.$appdata.getParam('启用原因'),
139
143
  disable: {},
140
- kaifa:false
144
+ kaifa: false
141
145
  }
142
146
  },
143
147
  ready () {
144
148
  this.deactivatedReason()
145
149
  },
146
150
  methods: {
147
- changeisuse(val){
148
- if(val){
151
+ changeisuse (val) {
152
+ if (val) {
149
153
  this.kaifa = true
150
- }else{
154
+ } else {
151
155
  this.kaifa = false
152
156
  }
153
157
  },
@@ -0,0 +1,180 @@
1
+ <template>
2
+ <div class="flex" style="overflow-y: auto!important;">
3
+ <div class="auto" style="height: 50%; overflow: auto">
4
+ <div v-for="owe of list" >
5
+ <owe-list :row='owe' :floor="config.floor" :charge="config.charge" @refresh-center="refreshCenter"></owe-list>
6
+ </div>
7
+ </div>
8
+ <div class="span" v-if="chargeView">
9
+ <p v-if="row.f_totalsplit_type === '总表'"><strong>分表承担总量 (单位: 方): {{splitAllgas}}</strong></p>
10
+ <machine-meter-center :data='model' :owelist="list[0].rows" :charge="config.charge" :row='row' :floor="config.floor" :ceil="config.ceil" v-ref:mainche></machine-meter-center>
11
+ </div>
12
+ <div class="span" v-if="!chargeView">
13
+ <work-busy-small :is-busy="!chargeView"></work-busy-small>
14
+ </div>
15
+ </div>
16
+ <upload :blodid="blodid" v-if="config.showupload" isremark="true" fusetype="机表收费"></upload>
17
+ </template>
18
+ <script>
19
+ import OweList from './OweList'
20
+ import WorkBusySmall from '../../components/charge/business/machine/WorkBusySmall'
21
+ import {HttpResetClass} from 'vue-client'
22
+
23
+ let loadGen = async function (self) {
24
+ await self.$getConfig(self, 'MachineCharge')
25
+ let http = new HttpResetClass()
26
+ let res = await http.load('POST', 'rs/logic/sale_getOwe', {data: {f_userinfo_id: self.row.f_userinfo_id}}, {resolveMsg: null, rejectMsg: '获取欠费出错!!', newly: true})
27
+ self.list = res.data
28
+
29
+ let owes = []
30
+ for (let i = 0; i < res.data.length; i++) {
31
+ for (let j = 0; j < res.data[i].rows.length; j++) {
32
+ owes.push(res.data[i].rows[j])
33
+ }
34
+ }
35
+ self.refreshCenter(owes)
36
+ // let res = await self.$refs.pv.load('rs/sql/getOverdue', {data: {f_user_id: self.row.f_user_id}})
37
+ // if (res.data) {
38
+ // for (let i = 0; i < res.data.length; i++) {
39
+ // res.data[i].f_totalsplit_type = self.row.f_totalsplit_type
40
+ // res.data[i].f_user_id = res.data[i].f_user_id + ''
41
+ // let getSplit = await self.$resetpost('rs/logic/splitInfo', {data: {totalInfo: res.data[i]}}, {resolveMsg: null, rejectMsg: '获取分表抄表信息出错!!!'})
42
+ // if (getSplit.data.length > 0) {
43
+ // for (let j = 0; j < getSplit.data.length; j++) {
44
+ // self.splitAllgas = self.splitAllgas + (getSplit.data[j].f_oughtamount - 0)
45
+ // }
46
+ // }
47
+ // }
48
+ // self.list.metertitle = self.row.f_user_id
49
+ // self.list.rows = self.model.rows = [...self.model.rows, ...res.data]
50
+ // // 控制欠费列表承担量的显示
51
+ // self.model.f_totalsplit_type = self.row.f_totalsplit_type
52
+ // }
53
+ self.chargeView = true
54
+ }
55
+
56
+ /**
57
+ *售气收费
58
+ *机表收费组合组件,包括抄表列表以及机表收费主组件
59
+ */
60
+ export default {
61
+ title: '收费',
62
+ components: {OweList,WorkBusySmall},
63
+ data () {
64
+ return {
65
+ config: {
66
+ showupload: false, // 控制附件显示
67
+ floor: false, // 向下取整
68
+ ceil: false, // 向上取整
69
+ charge: true // 是否需要缴清欠费
70
+ },
71
+ blodid: '',
72
+
73
+ model: {},
74
+ list: [],
75
+ oweArr: {},
76
+ splitAllgas: 0,
77
+ chargeView: false
78
+ }
79
+ },
80
+ props: ['row'],
81
+ ready () {
82
+ this.blodid = this.row.f_userinfo_id
83
+ loadGen(this)
84
+ },
85
+ methods: {
86
+ refreshCenter (val, rows, f_userfiles_id) {
87
+ console.log(f_userfiles_id)
88
+ if (f_userfiles_id) {
89
+ console.log(f_userfiles_id)
90
+ this.oweArr[f_userfiles_id] = val
91
+ }
92
+ this.initData(this.row)
93
+ let arr = Object.values(this.oweArr).flat()
94
+ this.getRows(arr)
95
+ },
96
+ initData (row) {
97
+ let temp = {
98
+ f_payment: ['现金缴费'],
99
+ f_user_id: row.f_user_id,
100
+ f_userinfo_id: row.f_userinfo_id,
101
+ f_userfiles_id: row.f_userfiles_id,
102
+ f_balance: row.f_balance,
103
+ otherprice: '',
104
+ f_pregas: 0,
105
+ f_preamount: 0,
106
+ f_totalcost: 0,
107
+ f_curbalance: 0,
108
+ f_collection: '',
109
+ f_garbage_fee: 0,
110
+ f_overdue: 0,
111
+ f_lowest: 0,
112
+ f_print: ['普通收据'],
113
+ f_privilege_id: 0,
114
+ f_privilege_money: 0,
115
+ f_privilege_gas: 0,
116
+ f_after_discount: 0
117
+ }
118
+ this.model = Object.assign({}, this.model, temp)
119
+ },
120
+ getRows (val) {
121
+ this.model.selectedids = []
122
+ for (let i = 0; i < val.length; i++) {
123
+ if (val[i]) {
124
+ this.model.f_pregas = this.model.f_pregas + val[i].f_oughtamount
125
+ this.model.f_preamount = this.model.f_preamount + val[i].f_oughtfee
126
+ this.model.f_overdue = this.model.f_overdue + val[i].overdue
127
+ this.model.f_garbage_fee = this.model.f_garbage_fee + val[i].f_garbage_fee
128
+ this.model.selectedids.push({id: val[i].handplan_id})
129
+ }
130
+ }
131
+ if (val.length == 0) {
132
+ this.model.f_overdue = 0
133
+ this.model.f_totalcost = 0
134
+ this.model.f_collection = 0
135
+ this.model.f_pregas = 0
136
+ this.model.f_preamount = 0
137
+ this.model.f_garbage_fee = 0
138
+ }
139
+ this.model.f_overdue = this.model.f_overdue.toFixed(2)
140
+ this.model.f_totalcost = (this.model.f_preamount - 0) + (this.model.f_overdue - 0)
141
+ /* if (this.model.f_totalcost === 0) {
142
+ this.model.f_totalcost = this.row.f_balance < 0 ? (0 - this.row.f_balance) : 0
143
+ } */
144
+ this.model.f_totalcost += this.model.f_garbage_fee
145
+ if (this.config.floor) {
146
+ this.model.f_collection = Math.floor((this.model.f_totalcost - 0) - (this.model.f_balance - 0))
147
+ } else if (this.config.ceil) {
148
+ this.model.f_collection = Math.ceil((this.model.f_totalcost - 0) - (this.model.f_balance - 0))
149
+ } else {
150
+ this.model.f_collection = (this.model.f_totalcost - 0) - (this.model.f_balance - 0)
151
+ }
152
+ this.model.f_collection = this.model.f_collection < 0 ? 0 : this.model.f_collection
153
+ },
154
+ // 获取欠费里面有违约金的最大的一笔欠费的角标
155
+ getMaxIndex (val) {
156
+ if (val.findIndex((item) => { return item.f_oughtfee < 0 }) !== -1) {
157
+ return val.findIndex((item) => { return item.f_oughtfee < 0 })
158
+ } else {
159
+ let firstOverdue = val.findIndex((item) => { return item.overdue > 0 })
160
+ if (firstOverdue === -1) {
161
+ return 0
162
+ } else {
163
+ let lastOverdue = val.slice(firstOverdue).findIndex((item) => { return item.overdue === 0 }) - 1
164
+ return lastOverdue < 0 ? val.length - 1 : firstOverdue + lastOverdue
165
+ }
166
+ }
167
+ }
168
+ },
169
+ watch: {
170
+ chargeView () {
171
+ // this.$refs.mainche && this.$refs.mainche.checkOverdue()
172
+ }
173
+ }
174
+ }
175
+ </script>
176
+ <style lang="less">
177
+ #tooltip div {
178
+ height: auto;
179
+ }
180
+ </style>
@@ -150,7 +150,7 @@
150
150
  'selecteds' () {
151
151
  // 获取选中的行数
152
152
  this.selectedRows = this.selecteds.length
153
- this.$dispatch('refresh-center', this.selecteds, this.selectedRows)
153
+ this.$dispatch('refresh-center', this.selecteds, this.selectedRows,this.row.f_userfiles_id)
154
154
  }
155
155
  }
156
156
  }
@@ -150,8 +150,8 @@
150
150
  <span class = "col-sm-7">{{data?data.f_gas_date.substring(0,7):dafault.f_hand_date}}</span>
151
151
  </div>
152
152
  <div class="row">
153
- <label class = "col-sm-5 " >抄表员</label>
154
- <span class = "col-sm-7">{{data?data.f_inputtor:dafault.f_inputtor}}</span>
153
+ <label class = "col-sm-5 " >片区</label>
154
+ <span class = "col-sm-7">{{data?data.f_slice_area:dafault.f_slice_area}}</span>
155
155
  </div>
156
156
  <div class="row">
157
157
  <label class = "col-sm-5 " >上次抄表日</label>
@@ -22,4 +22,6 @@ export default function () {
22
22
  Vue.component('user-meterinfodetail', (resolve) => { require(['./meterinfodetail'], resolve) })
23
23
  // 保险收费明细
24
24
  Vue.component('insurance-harges-details', (resolve) => { require(['./InsuranceChargesDetails'], resolve) })
25
+ // 机表收费引导
26
+ Vue.component('machine-charge', (resolve) => { require(['./MachineCharge'], resolve) })
25
27
  }
@@ -70,6 +70,7 @@ let LogicService = {
70
70
  f_userfile_id: row.f_userfiles_id,
71
71
  f_user_id: row.f_user_id,
72
72
  f_userinfo_id: row.f_userinfo_id,
73
+ f_user_phone: row.f_user_phone,
73
74
  f_user_name: row.f_user_name,
74
75
  f_comments: model.f_reason[0],
75
76
  f_othereason: model.f_othereason,
package/.npmignore DELETED
@@ -1,12 +0,0 @@
1
- src/bootstrap
2
- .idea/
3
- .DS_Store
4
- node_modules/
5
- dist/
6
- examples/
7
- gradle/
8
- npm-debug.log
9
- selenium-debug.log
10
- test/unit/coverage
11
- test/e2e/reports
12
- lib/**/lib