manage-client 3.3.17 → 3.3.18-1

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.
Files changed (41) hide show
  1. package/.gradle/7.5.1/checksums/checksums.lock +0 -0
  2. package/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  3. package/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  4. package/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
  5. package/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  6. package/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  7. package/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  8. package/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  9. package/.gradle/7.5.1/gc.properties +0 -0
  10. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  11. package/.gradle/file-system.probe +0 -0
  12. package/build/dev-server.js +180 -180
  13. package/package.json +1 -1
  14. package/src/components/sale/businessquery/ChangeMeterQuery.vue +2 -2
  15. package/src/components/sale/businessquery/InspectListGas.vue +2 -2
  16. package/src/components/sale/businessquery/InspectListUser.vue +2 -2
  17. package/src/components/sale/config/exportConfig.js +1110 -1110
  18. package/src/components/webmeter/gasStatistics/NewGasStatistics.vue +511 -511
  19. package/src/filiale/qingtongxia/config/exportConfig.js +712 -712
  20. package/src/filiale/shanxian/ChargeQuery.vue +2 -2
  21. package/src/filiale/shanxian/RecordInfoQuery.vue +1384 -1384
  22. package/src/filiale/shanxian/UserQuery.vue +2 -2
  23. package/src/filiale/shanxian/config/exportConfig.js +1088 -1088
  24. package/src/filiale/shanxian/sale.js +1 -1
  25. package/src/filiale/tongchuan/ChargeQuery.vue +2 -2
  26. package/src/filiale/tongchuan/DeviceQuery.vue +2 -2
  27. package/src/filiale/tongchuan/FillGasQuery.vue +2 -2
  28. package/src/filiale/tongchuan/HandplanQuery.vue +1 -1
  29. package/src/filiale/tongchuan/MeterQuery.vue +2 -2
  30. package/src/filiale/tongchuan/PriceChangeQuery.vue +2 -2
  31. package/src/filiale/tongchuan/UserQuery.vue +2 -2
  32. package/src/filiale/wenxi/ChangeMeterQuery.vue +710 -710
  33. package/src/filiale/xiangyun/ReportDataQuery.vue +314 -314
  34. package/src/filiale/xiangyun/exportConfig.js +1116 -1116
  35. package/src/filiale/xiangyun/sale.js +6 -6
  36. package/src/filiale/xiangyun/tableConfig.js +60 -60
  37. package/src/filiale/xiangyun/webmeterManage.js +7 -7
  38. package/src/main.js +68 -68
  39. package/src/plugins/getAllInputtor.js +29 -29
  40. package/src/stores/MagGetSaleParams.js +156 -156
  41. package/manage_lib2022-12-01-14-30-50.zip +0 -0
@@ -1,6 +1,6 @@
1
- // 分公司特殊组件页面注册
2
- import Vue from 'vue'
3
- export default function () {
4
- // 收费查询
5
- Vue.component('charge-query', (resolve) => { require(['./ChargeQuery'], resolve) })
6
- }
1
+ // 分公司特殊组件页面注册
2
+ import Vue from 'vue'
3
+ export default function () {
4
+ // 收费查询
5
+ Vue.component('charge-query', (resolve) => { require(['./ChargeQuery'], resolve) })
6
+ }
@@ -1,60 +1,60 @@
1
- export default{
2
- //查询页面的字段名和中文对应
3
- ReportDataQuery:
4
- {
5
- "用户编号":"f_userinfo_code",
6
- "用户名称":"f_user_name",
7
- "表号":"f_meternumber",
8
- "本次抄表底数":"f_tablebase",
9
- "上次抄表底数":"f_last_tablebase",
10
- "表上余额":"f_jval",
11
- "抄表日期":"f_hand_date",
12
-
13
- "用气量":"f_oughtamount",
14
- "用气金额":"f_oughtfee",
15
- "用气性质":"f_gasproperties",
16
- "客户类型":"f_user_type",
17
- "用户地址":"f_address",
18
-
19
- "上次抄表日期":"f_last_hand_date",
20
- "开户日期":"f_gas_date",
21
- "软件版本号":"f_software_version",
22
- "表状态信息":"f_table_msg",
23
- "上次表状态信息":"f_last_meter_state_msg",
24
-
25
- "插入日期":"f_insert_date",
26
- "上次插入日期":"f_last_insertdate",
27
- "是否结算":"f_whether_clear",
28
- "超用气量":"f_super_gas",
29
- "电量等级":"f_electricity",
30
-
31
- "购气次数":"f_times",
32
- "单价":"f_price",
33
- "信号强度":"f_signal",
34
- "信噪比":"f_snr",
35
- "电压":"f_batterylevel",
36
-
37
- "阀门强制状态":"f_networkshutvalve",
38
- "阀门状态":"f_valvestate",
39
- "计量类型":"f_wmprepaytype",
40
- "上报类型":"f_upload_type",
41
- "金额状态":"f_moneystate",
42
-
43
- "增加工况瞬时":"operatingModeFlow",
44
- "标况瞬时":"standardConditionFlow",
45
- "开盖状态" :"f_SplitAlarm",
46
- "液晶状态" : "f_XTIpllStopFlag",
47
- "声速" :"soundVelocity",
48
-
49
- "外电低电":"f_lowlithiumbattery",
50
- "磁干扰异常":"f_magneticinterference",
51
- "表内剩余金额":"f_meterbalanceamt",
52
- "表内累计充值金额":"f_meterdebitamt",
53
- "补偿状态":"f_compensatestate",
54
- "气表品牌":"f_meter_brand",
55
- "气表型号":"f_meter_style",
56
- "分公司":"f_orgname"
57
-
58
- }
59
-
60
- }
1
+ export default{
2
+ //查询页面的字段名和中文对应
3
+ ReportDataQuery:
4
+ {
5
+ "用户编号":"f_userinfo_code",
6
+ "用户名称":"f_user_name",
7
+ "表号":"f_meternumber",
8
+ "本次抄表底数":"f_tablebase",
9
+ "上次抄表底数":"f_last_tablebase",
10
+ "表上余额":"f_jval",
11
+ "抄表日期":"f_hand_date",
12
+
13
+ "用气量":"f_oughtamount",
14
+ "用气金额":"f_oughtfee",
15
+ "用气性质":"f_gasproperties",
16
+ "客户类型":"f_user_type",
17
+ "用户地址":"f_address",
18
+
19
+ "上次抄表日期":"f_last_hand_date",
20
+ "开户日期":"f_gas_date",
21
+ "软件版本号":"f_software_version",
22
+ "表状态信息":"f_table_msg",
23
+ "上次表状态信息":"f_last_meter_state_msg",
24
+
25
+ "插入日期":"f_insert_date",
26
+ "上次插入日期":"f_last_insertdate",
27
+ "是否结算":"f_whether_clear",
28
+ "超用气量":"f_super_gas",
29
+ "电量等级":"f_electricity",
30
+
31
+ "购气次数":"f_times",
32
+ "单价":"f_price",
33
+ "信号强度":"f_signal",
34
+ "信噪比":"f_snr",
35
+ "电压":"f_batterylevel",
36
+
37
+ "阀门强制状态":"f_networkshutvalve",
38
+ "阀门状态":"f_valvestate",
39
+ "计量类型":"f_wmprepaytype",
40
+ "上报类型":"f_upload_type",
41
+ "金额状态":"f_moneystate",
42
+
43
+ "增加工况瞬时":"operatingModeFlow",
44
+ "标况瞬时":"standardConditionFlow",
45
+ "开盖状态" :"f_SplitAlarm",
46
+ "液晶状态" : "f_XTIpllStopFlag",
47
+ "声速" :"soundVelocity",
48
+
49
+ "外电低电":"f_lowlithiumbattery",
50
+ "磁干扰异常":"f_magneticinterference",
51
+ "表内剩余金额":"f_meterbalanceamt",
52
+ "表内累计充值金额":"f_meterdebitamt",
53
+ "补偿状态":"f_compensatestate",
54
+ "气表品牌":"f_meter_brand",
55
+ "气表型号":"f_meter_style",
56
+ "分公司":"f_orgname"
57
+
58
+ }
59
+
60
+ }
@@ -1,7 +1,7 @@
1
- import Vue from 'vue'
2
-
3
- export default function () {
4
- // 物联网表结算查询
5
- Vue.component('report-data-query', (resolve) => { require(['./ReportDataQuery'], resolve) })
6
- }
7
-
1
+ import Vue from 'vue'
2
+
3
+ export default function () {
4
+ // 物联网表结算查询
5
+ Vue.component('report-data-query', (resolve) => { require(['./ReportDataQuery'], resolve) })
6
+ }
7
+
package/src/main.js CHANGED
@@ -1,68 +1,68 @@
1
- import Vue from 'vue'
2
- import App from './App'
3
- import { all } from 'vue-client'
4
-
5
- // import { sale } from 'sale-client'
6
- import { system } from 'system-clients'
7
- import { ldap } from 'ldap-clients'
8
- import saleManage from './saleManage'
9
- import ShanXianSaleManage from './filiale/shanxian/sale'
10
- import webmeterManage from './webmeterManage'
11
- import reportManage from './reportManage'
12
- import newmanage from './newmanage'
13
- import ManageHome from './ManageHome'
14
- import echarts from 'echarts'
15
- import AMap from 'vue-amap'
16
-
17
- Vue.config.silent = true
18
- // Vue.mmType = 'AES'
19
-
20
- Vue.use(AMap);
21
-
22
- // 初始化vue-amap
23
- AMap.initAMapApiLoader({
24
- // 高德key
25
- key: '3cec9ae8e2349207f7ac29279e3f4abe',
26
- // 插件集合 (插件按需引入)
27
- plugin: [
28
- "AMap.Autocomplete", //输入提示插件
29
- "AMap.PlaceSearch", //POI搜索插件
30
- "AMap.Scale", //右下角缩略图插件 比例尺
31
- "AMap.OverView", //地图鹰眼插件
32
- "AMap.ToolBar", //地图工具条0
33
- "AMap.MapType", //类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
34
- "AMap.PolyEditor", //编辑 折线多,边形
35
- "AMap.CircleEditor", //圆形编辑器插件
36
- "AMap.Geolocation" //定位控件,用来获取和展示用户主机所在的经纬度位置
37
- ],
38
- uiVersion: "1.0"
39
- });
40
- /** **************************通用组件******************************/
41
-
42
- Vue.prototype.$echarts = echarts
43
- all()
44
- // sale()
45
- ldap()
46
- system(false)
47
-
48
- saleManage()
49
- ShanXianSaleManage()
50
- webmeterManage()
51
- ManageHome()
52
- newmanage()
53
- reportManage()
54
- require('system-clients/src/styles/less/bootstrap.less')
55
- require('./components/qinhua/Style/qinhuaStyle.less')
56
- // require('./bootstrap/less/manageStyle/manageChile.less')
57
- // require('./bootstrap/less/manageStyle/safeStyle.less')
58
-
59
- //大屏展示要放开的样式
60
- // require('system-clients/src/styles/less/manageStyle/manageChile.less')
61
- // require('system-clients/src/styles/less/manageStyle/safeStyle.less')
62
- // require('system-clients/src/styles/less/manageStyle/manageStyle.less')
63
-
64
- new Vue({
65
- el: 'body',
66
- components: { App }
67
- })
68
-
1
+ import Vue from 'vue'
2
+ import App from './App'
3
+ import { all } from 'vue-client'
4
+
5
+ // import { sale } from 'sale-client'
6
+ import { system } from 'system-clients'
7
+ import { ldap } from 'ldap-clients'
8
+ import saleManage from './saleManage'
9
+ import ShanXianSaleManage from './filiale/shanxian/sale'
10
+ import webmeterManage from './webmeterManage'
11
+ import reportManage from './reportManage'
12
+ import newmanage from './newmanage'
13
+ import ManageHome from './ManageHome'
14
+ import echarts from 'echarts'
15
+ import AMap from 'vue-amap'
16
+
17
+ Vue.config.silent = true
18
+ // Vue.mmType = 'AES'
19
+
20
+ Vue.use(AMap);
21
+
22
+ // 初始化vue-amap
23
+ AMap.initAMapApiLoader({
24
+ // 高德key
25
+ key: '3cec9ae8e2349207f7ac29279e3f4abe',
26
+ // 插件集合 (插件按需引入)
27
+ plugin: [
28
+ "AMap.Autocomplete", //输入提示插件
29
+ "AMap.PlaceSearch", //POI搜索插件
30
+ "AMap.Scale", //右下角缩略图插件 比例尺
31
+ "AMap.OverView", //地图鹰眼插件
32
+ "AMap.ToolBar", //地图工具条0
33
+ "AMap.MapType", //类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
34
+ "AMap.PolyEditor", //编辑 折线多,边形
35
+ "AMap.CircleEditor", //圆形编辑器插件
36
+ "AMap.Geolocation" //定位控件,用来获取和展示用户主机所在的经纬度位置
37
+ ],
38
+ uiVersion: "1.0"
39
+ });
40
+ /** **************************通用组件******************************/
41
+
42
+ Vue.prototype.$echarts = echarts
43
+ all()
44
+ // sale()
45
+ ldap()
46
+ system(false)
47
+
48
+ saleManage()
49
+ ShanXianSaleManage()
50
+ webmeterManage()
51
+ ManageHome()
52
+ newmanage()
53
+ reportManage()
54
+ require('system-clients/src/styles/less/bootstrap.less')
55
+ require('./components/qinhua/Style/qinhuaStyle.less')
56
+ // require('./bootstrap/less/manageStyle/manageChile.less')
57
+ // require('./bootstrap/less/manageStyle/safeStyle.less')
58
+
59
+ //大屏展示要放开的样式
60
+ // require('system-clients/src/styles/less/manageStyle/manageChile.less')
61
+ // require('system-clients/src/styles/less/manageStyle/safeStyle.less')
62
+ // require('system-clients/src/styles/less/manageStyle/manageStyle.less')
63
+
64
+ new Vue({
65
+ el: 'body',
66
+ components: { App }
67
+ })
68
+
@@ -1,29 +1,29 @@
1
- import Vue from 'vue'
2
-
3
- let getAllInputtor ={
4
- inputtors : [],
5
- async init(){
6
- let res = await Vue.resetpost('rs/sql/getAlluserRes', {
7
- condition:" 1=1"
8
- }, {resolveMsg: null, rejectMsg: '获取用户出错!!!'})
9
- if(res.data){
10
- getAllInputtor.inputtors = res.data;
11
- }
12
- },
13
- getresinputtor(orgid){
14
- let inputtors = []
15
- if(getAllInputtor.inputtors.length>0){
16
- let arr = getAllbatch.data.filter((res) => {
17
- return res.rolestr.indexOf("抄表员")>-1 && res.f_orgid == 'orgid'
18
- })
19
- inputtors.push({label: "全部", value: ""})
20
- arr.forEach((res) => {
21
- inputtors.push({label: res.name, value: res.name})
22
- })
23
- getAllInputtor.inputtors = inputtors;
24
- }
25
- return getAllInputtor;
26
- }
27
-
28
- }
29
- export default getAllInputtor
1
+ import Vue from 'vue'
2
+
3
+ let getAllInputtor ={
4
+ inputtors : [],
5
+ async init(){
6
+ let res = await Vue.resetpost('rs/sql/getAlluserRes', {
7
+ condition:"1=1"
8
+ }, {resolveMsg: null, rejectMsg: '获取用户出错!!!'})
9
+ if(res.data){
10
+ getAllInputtor.inputtors = res.data;
11
+ }
12
+ },
13
+ getresinputtor(orgid){
14
+ let inputtors = []
15
+ if(getAllInputtor.inputtors.length>0){
16
+ let arr = getAllbatch.data.filter((res) => {
17
+ return res.rolestr.indexOf("抄表员")>-1 && res.f_orgid == 'orgid'
18
+ })
19
+ inputtors.push({label: "全部", value: ""})
20
+ arr.forEach((res) => {
21
+ inputtors.push({label: res.name, value: res.name})
22
+ })
23
+ getAllInputtor.inputtors = inputtors;
24
+ }
25
+ return getAllInputtor;
26
+ }
27
+
28
+ }
29
+ export default getAllInputtor
@@ -1,156 +1,156 @@
1
- import Vue from 'vue'
2
-
3
- let MagGetSaleParam = {
4
- install (Vue, options) {
5
- // 给vue增添对话框显示方法
6
- Vue.MagGetSaleParam = Vue.prototype.$MagGetSaleParam = MagGetSaleParam
7
- },
8
- gasbrands: [],
9
- prices: [],
10
- adjustables: [],
11
- inputtors : [],
12
- smallareas:[],
13
- async initinputtor(){
14
- let res = await Vue.resetpost('rs/sql/getAlluserRes', {data:{
15
- condition:" 1=1"
16
- }}, {newly:true, resolveMsg: null, rejectMsg: '获取用户出错!!!'})
17
- if(res.data){
18
- MagGetSaleParam.inputtors = res.data;
19
- }
20
- },
21
- async getsmallarea(filiale){
22
- let smallareas=[]
23
- let condition=`f_small_area is not null and f_small_area <>'' group by f_small_area`
24
- if(filiale){
25
- condition=`f_filialeid='${filiale}' and f_small_area is not null and f_small_area <>'' group by f_small_area`
26
- }
27
- let res = await Vue.resetpost('rs/sql/manage_singleTable', {data:{
28
- items: 'f_small_area', tablename: 't_user_address', orderitem: 'f_small_area DESC',condition:condition
29
- }}, {newly:true,resolveMsg: null, rejectMsg: '获取区域出错!!!'})
30
- if(res.data){
31
- res.data.forEach((item) => {
32
- var param={
33
- label:item.f_small_area,
34
- value:item.f_small_area
35
- }
36
- smallareas.push(param)
37
- })
38
- }
39
- return smallareas
40
- },
41
- getresinputtor(orgid){
42
- let inputtors = []
43
- if(MagGetSaleParam.inputtors.length>0){
44
- let arr = MagGetSaleParam.inputtors.filter((res) => {
45
- if(res.rolestr != null && res.rolestr!='' ){
46
- return res.rolestr.indexOf("抄表员")>-1 && res.f_orgid == orgid
47
- }
48
- })
49
-
50
- arr.forEach((res) => {
51
- inputtors.push({label: res.name, value: res.name})
52
- })
53
- }
54
- return inputtors;
55
- },
56
- // 开启卡监听
57
- organizeData (fromSystem) {
58
- if(Vue.android){
59
- console.log('接受System中返回的参数进行组织', fromSystem)
60
- fromSystem.gasbrands.forEach((item, index) => {
61
- MagGetSaleParam.gasbrands[index] = {}
62
- MagGetSaleParam.gasbrands[index].label = item.f_meter_brand
63
- let gasmodel = []
64
- item.gasmodel.forEach((item, index) => {
65
- gasmodel[index] = {}
66
- gasmodel[index].label = item.f_meter_style + item.f_type
67
- gasmodel[index].value = item
68
- })
69
- item.gasmodel = gasmodel
70
- MagGetSaleParam.gasbrands[index].value = item
71
- })
72
- fromSystem.adjustable.forEach((item, index) => {
73
- MagGetSaleParam.adjustables[index] = {}
74
- MagGetSaleParam.adjustables[index].label = item.f_adjustable_name
75
- MagGetSaleParam.adjustables[index].value = item
76
- })
77
- MagGetSaleParam.prices = [...MagGetSaleParam.prices, ...fromSystem.price]
78
- console.log('参数组织完毕', MagGetSaleParam)
79
- }
80
- },
81
- getAdjustable (val) {
82
- // 数组去重
83
- let arr = []
84
- console.log("调压箱调压箱调压箱调压箱调压箱调压箱调压箱调压箱调压箱")
85
- console.log(Vue.$appdata.saleParams)
86
- console.log(MagGetSaleParam.adjustables)
87
- if (val) {
88
- MagGetSaleParam.adjustables.forEach((item, next) => {
89
- if (item.value.f_orgid === val) {
90
- arr.push(item)
91
- }
92
- })
93
- } else {
94
- MagGetSaleParam.adjustables.forEach((item, next) => {
95
- arr.push(item)
96
- })
97
- }
98
- let hash = {}
99
- let result = arr.reduce((item, next) => {
100
- hash[next.label] ? '' : hash[next.label] = true && item.push(next)
101
- return item
102
- }, [])
103
- return Array.from(new Set(result))
104
- },
105
- getGasbrand () {
106
- if (MagGetSaleParam.gasbrands.length === 0) {
107
- MagGetSaleParam.organizeData(Vue.$appdata.saleParams)
108
- }
109
- return MagGetSaleParam.gasbrands
110
- },
111
- getPrices() {
112
- return MagGetSaleParam.prices
113
- },
114
- getPrice (object) {
115
- if (MagGetSaleParam.prices.length === 0) {
116
- MagGetSaleParam.organizeData(Vue.$appdata.saleParams)
117
- }
118
- let result = []
119
- console.log('获取价格。。。', MagGetSaleParam.prices)
120
- if (object){
121
- // 做筛选
122
- MagGetSaleParam.prices.forEach((item) => {
123
- if (item.f_state === '有效' &&
124
- item.f_price_type === object.f_price_type &&
125
- item.f_filialeid === object.filter) {
126
- let value = {
127
- label: item.f_price_name,
128
- value: item
129
- }
130
- result.push(value)
131
- }
132
- })
133
- }else{
134
- // 做筛选
135
- MagGetSaleParam.prices.forEach((item) => {
136
- if (item.f_state === '有效' &&
137
- item.f_price_type === object.f_price_type) {
138
- let value = {
139
- label: item.f_price_name,
140
- value: item
141
- }
142
- result.push(value)
143
- }
144
- })
145
- }
146
- // 数组去重
147
- let hash = {}
148
- result = result.reduce((item, next) => {
149
- hash[next.label] ? '' : hash[next.label] = true && item.push(next)
150
- return item
151
- }, [])
152
- return Array.from(new Set(result))
153
- }
154
- }
155
-
156
- export default MagGetSaleParam
1
+ import Vue from 'vue'
2
+
3
+ let MagGetSaleParam = {
4
+ install (Vue, options) {
5
+ // 给vue增添对话框显示方法
6
+ Vue.MagGetSaleParam = Vue.prototype.$MagGetSaleParam = MagGetSaleParam
7
+ },
8
+ gasbrands: [],
9
+ prices: [],
10
+ adjustables: [],
11
+ inputtors : [],
12
+ smallareas:[],
13
+ async initinputtor(){
14
+ let res = await Vue.resetpost('rs/sql/getAlluserRes', {data:{
15
+ condition:"1=1"
16
+ }}, {newly:true, resolveMsg: null, rejectMsg: '获取用户出错!!!'})
17
+ if(res.data){
18
+ MagGetSaleParam.inputtors = res.data;
19
+ }
20
+ },
21
+ async getsmallarea(filiale){
22
+ let smallareas=[]
23
+ let condition=`f_small_area is not null and f_small_area <>'' group by f_small_area`
24
+ if(filiale){
25
+ condition=`f_filialeid='${filiale}' and f_small_area is not null and f_small_area <>'' group by f_small_area`
26
+ }
27
+ let res = await Vue.resetpost('rs/sql/manage_singleTable', {data:{
28
+ items: 'f_small_area', tablename: 't_user_address', orderitem: 'f_small_area DESC',condition:condition
29
+ }}, {newly:true,resolveMsg: null, rejectMsg: '获取区域出错!!!'})
30
+ if(res.data){
31
+ res.data.forEach((item) => {
32
+ var param={
33
+ label:item.f_small_area,
34
+ value:item.f_small_area
35
+ }
36
+ smallareas.push(param)
37
+ })
38
+ }
39
+ return smallareas
40
+ },
41
+ getresinputtor(orgid){
42
+ let inputtors = []
43
+ if(MagGetSaleParam.inputtors.length>0){
44
+ let arr = MagGetSaleParam.inputtors.filter((res) => {
45
+ if(res.rolestr != null && res.rolestr!='' ){
46
+ return res.rolestr.indexOf("抄表员")>-1 && res.f_orgid == orgid
47
+ }
48
+ })
49
+
50
+ arr.forEach((res) => {
51
+ inputtors.push({label: res.name, value: res.name})
52
+ })
53
+ }
54
+ return inputtors;
55
+ },
56
+ // 开启卡监听
57
+ organizeData (fromSystem) {
58
+ if(Vue.android){
59
+ console.log('接受System中返回的参数进行组织', fromSystem)
60
+ fromSystem.gasbrands.forEach((item, index) => {
61
+ MagGetSaleParam.gasbrands[index] = {}
62
+ MagGetSaleParam.gasbrands[index].label = item.f_meter_brand
63
+ let gasmodel = []
64
+ item.gasmodel.forEach((item, index) => {
65
+ gasmodel[index] = {}
66
+ gasmodel[index].label = item.f_meter_style + item.f_type
67
+ gasmodel[index].value = item
68
+ })
69
+ item.gasmodel = gasmodel
70
+ MagGetSaleParam.gasbrands[index].value = item
71
+ })
72
+ fromSystem.adjustable.forEach((item, index) => {
73
+ MagGetSaleParam.adjustables[index] = {}
74
+ MagGetSaleParam.adjustables[index].label = item.f_adjustable_name
75
+ MagGetSaleParam.adjustables[index].value = item
76
+ })
77
+ MagGetSaleParam.prices = [...MagGetSaleParam.prices, ...fromSystem.price]
78
+ console.log('参数组织完毕', MagGetSaleParam)
79
+ }
80
+ },
81
+ getAdjustable (val) {
82
+ // 数组去重
83
+ let arr = []
84
+ console.log("调压箱调压箱调压箱调压箱调压箱调压箱调压箱调压箱调压箱")
85
+ console.log(Vue.$appdata.saleParams)
86
+ console.log(MagGetSaleParam.adjustables)
87
+ if (val) {
88
+ MagGetSaleParam.adjustables.forEach((item, next) => {
89
+ if (item.value.f_orgid === val) {
90
+ arr.push(item)
91
+ }
92
+ })
93
+ } else {
94
+ MagGetSaleParam.adjustables.forEach((item, next) => {
95
+ arr.push(item)
96
+ })
97
+ }
98
+ let hash = {}
99
+ let result = arr.reduce((item, next) => {
100
+ hash[next.label] ? '' : hash[next.label] = true && item.push(next)
101
+ return item
102
+ }, [])
103
+ return Array.from(new Set(result))
104
+ },
105
+ getGasbrand () {
106
+ if (MagGetSaleParam.gasbrands.length === 0) {
107
+ MagGetSaleParam.organizeData(Vue.$appdata.saleParams)
108
+ }
109
+ return MagGetSaleParam.gasbrands
110
+ },
111
+ getPrices() {
112
+ return MagGetSaleParam.prices
113
+ },
114
+ getPrice (object) {
115
+ if (MagGetSaleParam.prices.length === 0) {
116
+ MagGetSaleParam.organizeData(Vue.$appdata.saleParams)
117
+ }
118
+ let result = []
119
+ console.log('获取价格。。。', MagGetSaleParam.prices)
120
+ if (object){
121
+ // 做筛选
122
+ MagGetSaleParam.prices.forEach((item) => {
123
+ if (item.f_state === '有效' &&
124
+ item.f_price_type === object.f_price_type &&
125
+ item.f_filialeid === object.filter) {
126
+ let value = {
127
+ label: item.f_price_name,
128
+ value: item
129
+ }
130
+ result.push(value)
131
+ }
132
+ })
133
+ }else{
134
+ // 做筛选
135
+ MagGetSaleParam.prices.forEach((item) => {
136
+ if (item.f_state === '有效' &&
137
+ item.f_price_type === object.f_price_type) {
138
+ let value = {
139
+ label: item.f_price_name,
140
+ value: item
141
+ }
142
+ result.push(value)
143
+ }
144
+ })
145
+ }
146
+ // 数组去重
147
+ let hash = {}
148
+ result = result.reduce((item, next) => {
149
+ hash[next.label] ? '' : hash[next.label] = true && item.push(next)
150
+ return item
151
+ }, [])
152
+ return Array.from(new Set(result))
153
+ }
154
+ }
155
+
156
+ export default MagGetSaleParam
Binary file