sale-client 4.2.40 → 4.2.42

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,302 +1,302 @@
1
- import Vue from 'vue'
2
- let GetSaleParam = {
3
-
4
- install (Vue, options) {
5
- // 给vue增添对话框显示方法
6
- Vue.GetSaleParam = Vue.prototype.$GetSaleParam = GetSaleParam
7
- },
8
-
9
- // 气表
10
- gasbrands: [],
11
-
12
- // 气价
13
- prices: [],
14
-
15
- // 调压箱
16
- adjustables: [],
17
- meterNumber: [],
18
- // 抄表册
19
- meterbooks: [],
20
- bookcodes: [],
21
- inputtors: [],
22
- auditor: [],
23
- saleMan: [],
24
- async initinputtor () {
25
- let res = await Vue.resetpost('api/af-revenue/sql/sale_getAlluserRes?pageNo=1&pageSize=999999', {data: {
26
- condition: ' 1=1'
27
- }}, {resolveMsg: null, rejectMsg: '获取用户出错!!!', newly: true})
28
- console.log('resdata:', res.data)
29
- if (res.data) {
30
- GetSaleParam.inputtors = res.data
31
- }
32
- },
33
- getresinputtor (orgid) {
34
- console.log('11111111111-------,', orgid)
35
- let inputtors = []
36
- console.log('1GetSaleParam.inputtors-------,', GetSaleParam.inputtors)
37
- if (GetSaleParam.inputtors.length > 0) {
38
- let arr = GetSaleParam.inputtors.filter((res) => {
39
- if (res.rolestr != null && res.rolestr != '') {
40
- return res.rolestr.indexOf('抄表员') > -1 && res.f_orgid == orgid
41
- }
42
- })
43
-
44
- arr.forEach((res) => {
45
- inputtors.push({label: res.name, value: res.name})
46
- })
47
- }
48
- return inputtors
49
- },
50
- getAllMeterNumber () {
51
- let param = {
52
- f_orgid: this.$login.f.orgid
53
- }
54
- this.$resetpost('api/af-revenue/logic/getAllMeterNumber', param, {
55
- resolveMsg: null,
56
- rejectMsg: '获取表号失败!!'
57
- }).then(res => {
58
- this.meterNumber = []
59
- if (res.data.length > 0) {
60
- res.data.forEach(item => {
61
- this.meterNumber.push({label: item.label, value: item.value})
62
- })
63
- }
64
- })
65
- return this.meterNumber
66
- },
67
- getAudit (orgid) {
68
- console.log('11111111111-------,', orgid)
69
- let auditor = []
70
- console.log('1GetSaleParam.inputtors-------,', GetSaleParam.inputtors)
71
- if (GetSaleParam.inputtors.length > 0) {
72
- let arr = GetSaleParam.inputtors.filter((res) => {
73
- if (res.rolestr != null && res.rolestr != '') {
74
- return res.rolestr.indexOf('审核人员') > -1 && res.f_orgid == orgid
75
- }
76
- })
77
- arr.forEach((res) => {
78
- auditor.push({label: res.name, value: res.name})
79
- })
80
- }
81
- return auditor
82
- },
83
- getSaleMan (orgid) {
84
- let saleMan = []
85
- if (GetSaleParam.inputtors.length > 0) {
86
- let arr = GetSaleParam.inputtors.filter((res) => {
87
- if (res.rolestr != null && res.rolestr != '') {
88
- return res.rolestr && res.f_orgid == orgid
89
- }
90
- })
91
- arr.forEach((res) => {
92
- saleMan.push({label: res.name, value: res.name})
93
- })
94
- }
95
- return saleMan
96
- },
97
- getGasstyle (key) {
98
- return GetSaleParam.gasbrands.key
99
- },
100
- getGasbrand () {
101
- return GetSaleParam.gasbrands
102
- },
103
- getAdjustable () {
104
- return GetSaleParam.adjustables
105
- },
106
- getMeterBooks () {
107
- return GetSaleParam.meterbooks
108
- },
109
- getBookCodes () {
110
- return GetSaleParam.bookcodes
111
- },
112
- getAdjustable (val) {
113
- // 数组去重
114
- let arr = []
115
- if (val) {
116
- GetSaleParam.adjustables.forEach((item, next) => {
117
- if (item.value.f_orgid == val) {
118
- item.value.risers=[]
119
- var params=[]
120
- if(item.value.f_riser_codes){
121
- var param=(item.value.f_riser_codes||'').split(' , ')
122
- param.forEach((item)=>{
123
- params.push({label:item,value:item})
124
- })
125
- item.value.risers=params
126
- }else{
127
- item.value.risers=[]
128
- }
129
-
130
- arr.push(item)
131
- }
132
- })
133
- } else {
134
- GetSaleParam.adjustables.forEach((item, next) => {
135
- arr.push(item)
136
- })
137
- }
138
- let hash = {}
139
- let result = arr.reduce((item, next) => {
140
- hash[next.label] ? '' : hash[next.label] = true && item.push(next)
141
- return item
142
- }, [])
143
- return Array.from(new Set(result))
144
- },
145
- getPriceByOrg (filialeid) {
146
- let result = []
147
- GetSaleParam.prices.forEach((item) => {
148
- if (item.f_state === '有效' && filialeid == item.f_filialeid) {
149
- let value = {
150
- label: item.f_price_name,
151
- value: item
152
- }
153
- result.push(value)
154
- }
155
- })
156
- let hash = {}
157
- result = result.reduce((item, next) => {
158
- hash[next.label] ? '' : hash[next.label] = true && item.push(next)
159
- return item
160
- }, [])
161
- return Array.from(new Set(result))
162
- },
163
- getOnlyPrice () {
164
- // 数组去重
165
- let arr = []
166
- GetSaleParam.prices.forEach((item, next) => {
167
- if (item.f_state === '有效') {
168
- let value = {
169
- label: item.f_price_name,
170
- value: item
171
- }
172
- arr.push(value)
173
- }
174
- })
175
- let hash = {}
176
- let result = arr.reduce((item, next) => {
177
- hash[next.label] ? '' : hash[next.label] = true && item.push(next)
178
- return item
179
- }, [])
180
- return Array.from(new Set(result))
181
- },
182
- getPrice (object) {
183
- console.log('参数。。。', object)
184
- // 目前支持三个字段并都有值 f_user_type,f_gasproperties,f_price_type
185
- if (!object.f_user_type || !object.f_gasproperties || !object.f_price_type) {
186
- return
187
- }
188
- let result = []
189
-
190
- console.log('获取价格。。。', object.filter, GetSaleParam.prices)
191
-
192
- // 做筛选
193
- if (object.filter) {
194
- GetSaleParam.prices.forEach((item) => {
195
- if (item.f_state === '有效' && object.f_user_type === item.f_user_type &&
196
- object.f_gasproperties === item.f_gasproperties &&
197
- object.f_price_type === item.f_price_type &&
198
- object.filter == item.f_filialeid) {
199
- let value = {
200
- label: item.f_price_name,
201
- value: item
202
- }
203
- result.push(value)
204
- }
205
- })
206
- } else {
207
- GetSaleParam.prices.forEach((item) => {
208
- if (item.f_state === '有效' && object.f_user_type === item.f_user_type && object.f_gasproperties === item.f_gasproperties && object.f_price_type === item.f_price_type) {
209
- let value = {
210
- label: item.f_price_name,
211
- value: item
212
- }
213
- console.log('进来了1111')
214
- result.push(value)
215
- }
216
- })
217
- }
218
- // 数组去重
219
- let hash = {}
220
- result = result.reduce((item, next) => {
221
- hash[next.label] ? '' : hash[next.label] = true && item.push(next)
222
- return item
223
- }, [])
224
- return Array.from(new Set(result))
225
- },
226
- getPriceAll (object) {
227
- console.log('参数。。。', object)
228
- // 目前支持三个字段并都有值 f_user_type,f_gasproperties,f_price_type
229
- if (!object.f_user_type || !object.f_gasproperties || !object.f_price_type) {
230
- return
231
- }
232
- let result = []
233
-
234
- console.log('获取价格。。。', object.filter, GetSaleParam.prices)
235
-
236
- // 做筛选
237
- if (object.filter) {
238
- GetSaleParam.prices.forEach((item) => {
239
- if (item.f_state === '有效' && object.f_user_type === item.f_user_type &&
240
- object.f_gasproperties === item.f_gasproperties &&
241
- object.f_price_type === item.f_price_type &&
242
- object.filter == item.f_filialeid) {
243
- let value = {
244
- label: item.f_price_name,
245
- value: item
246
- }
247
- result.push(value)
248
- }
249
- })
250
- } else {
251
- GetSaleParam.prices.forEach((item) => {
252
- if (item.f_state === '有效' && object.f_user_type === item.f_user_type && object.f_gasproperties === item.f_gasproperties && object.f_price_type === item.f_price_type) {
253
- let value = {
254
- label: item.f_price_name,
255
- value: item
256
- }
257
- console.log('进来了1111')
258
- result.push(value)
259
- }
260
- })
261
- }
262
- return Array.from(new Set(result))
263
- },
264
- getPriceAllOther (object) {
265
- console.log('参数。。。', object)
266
- // 目前支持三个字段并都有值 f_user_type,f_gasproperties,f_price_type
267
- if (!object.f_price_type) {
268
- return
269
- }
270
- let result = []
271
-
272
- console.log('获取价格。。。', object.filter, GetSaleParam.prices)
273
-
274
- // 做筛选
275
- if (object.filter) {
276
- GetSaleParam.prices.forEach((item) => {
277
- if (item.f_state === '有效' && object.f_price_type === item.f_price_type &&
278
- object.filter == item.f_filialeid) {
279
- let value = {
280
- label: item.f_price_name,
281
- value: item
282
- }
283
- result.push(value)
284
- }
285
- })
286
- } else {
287
- GetSaleParam.prices.forEach((item) => {
288
- if (item.f_state === '有效' && object.f_price_type === item.f_price_type) {
289
- let value = {
290
- label: item.f_price_name,
291
- value: item
292
- }
293
- console.log('进来了1111')
294
- result.push(value)
295
- }
296
- })
297
- }
298
- return Array.from(new Set(result))
299
- }
300
- }
301
-
302
- export default GetSaleParam
1
+ import Vue from 'vue'
2
+ let GetSaleParam = {
3
+
4
+ install (Vue, options) {
5
+ // 给vue增添对话框显示方法
6
+ Vue.GetSaleParam = Vue.prototype.$GetSaleParam = GetSaleParam
7
+ },
8
+
9
+ // 气表
10
+ gasbrands: [],
11
+
12
+ // 气价
13
+ prices: [],
14
+
15
+ // 调压箱
16
+ adjustables: [],
17
+ meterNumber: [],
18
+ // 抄表册
19
+ meterbooks: [],
20
+ bookcodes: [],
21
+ inputtors: [],
22
+ auditor: [],
23
+ saleMan: [],
24
+ async initinputtor () {
25
+ let res = await Vue.resetpost('api/af-revenue/sql/sale_getAlluserRes?pageNo=1&pageSize=999999', {data: {
26
+ condition: ' 1=1'
27
+ }}, {resolveMsg: null, rejectMsg: '获取用户出错!!!', newly: true})
28
+ console.log('resdata:', res.data)
29
+ if (res.data) {
30
+ GetSaleParam.inputtors = res.data
31
+ }
32
+ },
33
+ getresinputtor (orgid) {
34
+ console.log('11111111111-------,', orgid)
35
+ let inputtors = []
36
+ console.log('1GetSaleParam.inputtors-------,', GetSaleParam.inputtors)
37
+ if (GetSaleParam.inputtors.length > 0) {
38
+ let arr = GetSaleParam.inputtors.filter((res) => {
39
+ if (res.rolestr != null && res.rolestr != '') {
40
+ return res.rolestr.indexOf('抄表员') > -1 && res.f_orgid == orgid
41
+ }
42
+ })
43
+
44
+ arr.forEach((res) => {
45
+ inputtors.push({label: res.name, value: res.name})
46
+ })
47
+ }
48
+ return inputtors
49
+ },
50
+ getAllMeterNumber () {
51
+ let param = {
52
+ f_orgid: this.$login.f.orgid
53
+ }
54
+ this.$resetpost('api/af-revenue/logic/getAllMeterNumber', param, {
55
+ resolveMsg: null,
56
+ rejectMsg: '获取表号失败!!'
57
+ }).then(res => {
58
+ this.meterNumber = []
59
+ if (res.data.length > 0) {
60
+ res.data.forEach(item => {
61
+ this.meterNumber.push({label: item.label, value: item.value})
62
+ })
63
+ }
64
+ })
65
+ return this.meterNumber
66
+ },
67
+ getAudit (orgid) {
68
+ console.log('11111111111-------,', orgid)
69
+ let auditor = []
70
+ console.log('1GetSaleParam.inputtors-------,', GetSaleParam.inputtors)
71
+ if (GetSaleParam.inputtors.length > 0) {
72
+ let arr = GetSaleParam.inputtors.filter((res) => {
73
+ if (res.rolestr != null && res.rolestr != '') {
74
+ return res.rolestr.indexOf('审核人员') > -1 && res.f_orgid == orgid
75
+ }
76
+ })
77
+ arr.forEach((res) => {
78
+ auditor.push({label: res.name, value: res.name})
79
+ })
80
+ }
81
+ return auditor
82
+ },
83
+ getSaleMan (orgid) {
84
+ let saleMan = []
85
+ if (GetSaleParam.inputtors.length > 0) {
86
+ let arr = GetSaleParam.inputtors.filter((res) => {
87
+ if (res.rolestr != null && res.rolestr != '') {
88
+ return res.rolestr && res.f_orgid == orgid
89
+ }
90
+ })
91
+ arr.forEach((res) => {
92
+ saleMan.push({label: res.name, value: res.name})
93
+ })
94
+ }
95
+ return saleMan
96
+ },
97
+ getGasstyle (key) {
98
+ return GetSaleParam.gasbrands.key
99
+ },
100
+ getGasbrand () {
101
+ return GetSaleParam.gasbrands
102
+ },
103
+ getAdjustable () {
104
+ return GetSaleParam.adjustables
105
+ },
106
+ getMeterBooks () {
107
+ return GetSaleParam.meterbooks
108
+ },
109
+ getBookCodes () {
110
+ return GetSaleParam.bookcodes
111
+ },
112
+ getAdjustable (val) {
113
+ // 数组去重
114
+ let arr = []
115
+ if (val) {
116
+ GetSaleParam.adjustables.forEach((item, next) => {
117
+ if (item.value.f_orgid == val) {
118
+ item.value.risers=[]
119
+ var params=[]
120
+ if(item.value.f_riser_codes){
121
+ var param=(item.value.f_riser_codes||'').split(' , ')
122
+ param.forEach((item)=>{
123
+ params.push({label:item,value:item})
124
+ })
125
+ item.value.risers=params
126
+ }else{
127
+ item.value.risers=[]
128
+ }
129
+
130
+ arr.push(item)
131
+ }
132
+ })
133
+ } else {
134
+ GetSaleParam.adjustables.forEach((item, next) => {
135
+ arr.push(item)
136
+ })
137
+ }
138
+ let hash = {}
139
+ let result = arr.reduce((item, next) => {
140
+ hash[next.label] ? '' : hash[next.label] = true && item.push(next)
141
+ return item
142
+ }, [])
143
+ return Array.from(new Set(result))
144
+ },
145
+ getPriceByOrg (filialeid) {
146
+ let result = []
147
+ GetSaleParam.prices.forEach((item) => {
148
+ if (item.f_state === '有效' && filialeid == item.f_filialeid) {
149
+ let value = {
150
+ label: item.f_price_name,
151
+ value: item
152
+ }
153
+ result.push(value)
154
+ }
155
+ })
156
+ let hash = {}
157
+ result = result.reduce((item, next) => {
158
+ hash[next.label] ? '' : hash[next.label] = true && item.push(next)
159
+ return item
160
+ }, [])
161
+ return Array.from(new Set(result))
162
+ },
163
+ getOnlyPrice () {
164
+ // 数组去重
165
+ let arr = []
166
+ GetSaleParam.prices.forEach((item, next) => {
167
+ if (item.f_state === '有效') {
168
+ let value = {
169
+ label: item.f_price_name,
170
+ value: item
171
+ }
172
+ arr.push(value)
173
+ }
174
+ })
175
+ let hash = {}
176
+ let result = arr.reduce((item, next) => {
177
+ hash[next.label] ? '' : hash[next.label] = true && item.push(next)
178
+ return item
179
+ }, [])
180
+ return Array.from(new Set(result))
181
+ },
182
+ getPrice (object) {
183
+ console.log('参数。。。', object)
184
+ // 目前支持三个字段并都有值 f_user_type,f_gasproperties,f_price_type
185
+ if (!object.f_user_type || !object.f_gasproperties || !object.f_price_type) {
186
+ return
187
+ }
188
+ let result = []
189
+
190
+ console.log('获取价格。。。', object.filter, GetSaleParam.prices)
191
+
192
+ // 做筛选
193
+ if (object.filter) {
194
+ GetSaleParam.prices.forEach((item) => {
195
+ if (item.f_state === '有效' && object.f_user_type === item.f_user_type &&
196
+ object.f_gasproperties === item.f_gasproperties &&
197
+ object.f_price_type === item.f_price_type &&
198
+ object.filter == item.f_filialeid) {
199
+ let value = {
200
+ label: item.f_price_name,
201
+ value: item
202
+ }
203
+ result.push(value)
204
+ }
205
+ })
206
+ } else {
207
+ GetSaleParam.prices.forEach((item) => {
208
+ if (item.f_state === '有效' && object.f_user_type === item.f_user_type && object.f_gasproperties === item.f_gasproperties && object.f_price_type === item.f_price_type) {
209
+ let value = {
210
+ label: item.f_price_name,
211
+ value: item
212
+ }
213
+ console.log('进来了1111')
214
+ result.push(value)
215
+ }
216
+ })
217
+ }
218
+ // 数组去重
219
+ let hash = {}
220
+ result = result.reduce((item, next) => {
221
+ hash[next.label] ? '' : hash[next.label] = true && item.push(next)
222
+ return item
223
+ }, [])
224
+ return Array.from(new Set(result))
225
+ },
226
+ getPriceAll (object) {
227
+ console.log('参数。。。', object)
228
+ // 目前支持三个字段并都有值 f_user_type,f_gasproperties,f_price_type
229
+ if (!object.f_user_type || !object.f_gasproperties || !object.f_price_type) {
230
+ return
231
+ }
232
+ let result = []
233
+
234
+ console.log('获取价格。。。', object.filter, GetSaleParam.prices)
235
+
236
+ // 做筛选
237
+ if (object.filter) {
238
+ GetSaleParam.prices.forEach((item) => {
239
+ if (item.f_state === '有效' && object.f_user_type === item.f_user_type &&
240
+ object.f_gasproperties === item.f_gasproperties &&
241
+ object.f_price_type === item.f_price_type &&
242
+ object.filter == item.f_filialeid) {
243
+ let value = {
244
+ label: item.f_price_name,
245
+ value: item
246
+ }
247
+ result.push(value)
248
+ }
249
+ })
250
+ } else {
251
+ GetSaleParam.prices.forEach((item) => {
252
+ if (item.f_state === '有效' && object.f_user_type === item.f_user_type && object.f_gasproperties === item.f_gasproperties && object.f_price_type === item.f_price_type) {
253
+ let value = {
254
+ label: item.f_price_name,
255
+ value: item
256
+ }
257
+ console.log('进来了1111')
258
+ result.push(value)
259
+ }
260
+ })
261
+ }
262
+ return Array.from(new Set(result))
263
+ },
264
+ getPriceAllOther (object) {
265
+ console.log('参数。。。', object)
266
+ // 目前支持三个字段并都有值 f_user_type,f_gasproperties,f_price_type
267
+ if (!object.f_price_type) {
268
+ return
269
+ }
270
+ let result = []
271
+
272
+ console.log('获取价格。。。', object.filter, GetSaleParam.prices)
273
+
274
+ // 做筛选
275
+ if (object.filter) {
276
+ GetSaleParam.prices.forEach((item) => {
277
+ if (item.f_state === '有效' && object.f_price_type === item.f_price_type &&
278
+ object.filter == item.f_filialeid) {
279
+ let value = {
280
+ label: item.f_price_name,
281
+ value: item
282
+ }
283
+ result.push(value)
284
+ }
285
+ })
286
+ } else {
287
+ GetSaleParam.prices.forEach((item) => {
288
+ if (item.f_state === '有效' && object.f_price_type === item.f_price_type) {
289
+ let value = {
290
+ label: item.f_price_name,
291
+ value: item
292
+ }
293
+ console.log('进来了1111')
294
+ result.push(value)
295
+ }
296
+ })
297
+ }
298
+ return Array.from(new Set(result))
299
+ }
300
+ }
301
+
302
+ export default GetSaleParam
@@ -654,12 +654,22 @@ let loadParamGem = async function (self) {
654
654
  }
655
655
  },
656
656
  methods: {
657
- openBatchModal () {
657
+ async openBatchModal() {
658
658
  let rowdata = this.$refs.paged.$refs.grid.getRowData()
659
659
  if (rowdata.length <= 0) {
660
660
  this.$showMessage('请至少选择一个表具!')
661
661
  return
662
662
  }
663
+ const getAdjustables = await this.$resetpost('api/af-revenue/sql/singleTable_OrderBy',{
664
+ data: {
665
+ tablename: 't_adjustablebox',
666
+ items: 'f_adjustable_name as label, id as value',
667
+ condition: `f_filialeid = '${this.f_filialeid}'`,
668
+ orderitem: 'id desc'
669
+ }
670
+ })
671
+ console.log('调压箱数据', getAdjustables)
672
+ this.adjustablesNew = getAdjustables.data
663
673
  this.showModifyAdjustables = true
664
674
  },
665
675
  async batchModifyAdjustables() {
@@ -100,15 +100,15 @@
100
100
  <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">上次安检结果:</td>
101
101
  <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{ lastDefectResult }}</td>
102
102
  </tr>
103
- <tr>
103
+ <tr v-show="lastDefectResult !== '正常'">
104
104
  <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">上次是否有隐患:</td>
105
105
  <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{ lastDefectResult === '有隐患' ? '是' : '否' }}</td>
106
106
  </tr>
107
- <tr>
107
+ <tr v-show="lastDefectResult !== '正常'">
108
108
  <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">上次隐患名称:</td>
109
109
  <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{ model.f_last_defect_text }}</td>
110
110
  </tr>
111
- <tr>
111
+ <tr v-show="lastDefectResult !== '正常'">
112
112
  <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">上次处理结果:</td>
113
113
  <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{ model.f_last_repaired === '已修' ? '已处理' : '未处理' }}</td>
114
114
  </tr>
package/src/main.js CHANGED
@@ -2,7 +2,7 @@ import Vue from 'vue'
2
2
  import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
- import FilialeSale from './filiale/yuncheng/sale'
5
+ import FilialeSale from './filiale/qingjian/sale'
6
6
  import sale from './sale'
7
7
  import address from 'address-client/src/address'
8
8
  import ldap from 'ldap-clients/src/ldap'