sale-client 3.6.365 → 3.6.366

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.
@@ -29,12 +29,12 @@ var devConfig = {
29
29
  '/invoice/rs/logic/getInvoice': {
30
30
  target: serverRul
31
31
  },
32
- '/rs/sql/filemanage_getUserfies':{
33
- target: 'http://127.0.0.1:8080/'
34
- },
35
- '/rs/logic/importNetworkValve':{
36
- target: 'http://127.0.0.1:8080/'
37
- },
32
+ // '/rs/sql/filemanage_getUserfies':{
33
+ // target: 'http://127.0.0.1:8080/'
34
+ // },
35
+ // '/rs/logic/importNetworkValve':{
36
+ // target: 'http://127.0.0.1:8080/'
37
+ // },
38
38
  '/rs/file': {
39
39
  target: localUrl
40
40
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.365",
3
+ "version": "3.6.366",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -7,11 +7,11 @@
7
7
  </template>
8
8
 
9
9
  <script>
10
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
10
+ import HttpResetClass from 'vue-client/src/plugins/HttpResetClass'
11
11
 
12
12
  export default {
13
13
  title: 'App',
14
- data() {
14
+ data () {
15
15
  return {
16
16
  inputText: '',
17
17
  showSketchPage: false,
@@ -19,28 +19,50 @@ export default {
19
19
  sketchId: '',
20
20
  title: '',
21
21
  paperMessage: ''
22
- };
22
+ }
23
23
  },
24
24
  props: {
25
25
  row: ''
26
26
  },
27
- async ready() {
27
+ ready () {
28
28
  if (this.row) {
29
- await new HttpResetClass().load('POST', 'rs/sql/tel_singleTable_OrderBy', {
29
+ new HttpResetClass().load('POST', 'rs/sql/tel_singleTable_OrderBy', {
30
30
  data: {
31
31
  items: 'blob', tablename: 't_blob_sketch', condition: `id = '${this.row}'`, orderitem: 'id'
32
32
  }
33
- }).then(res => {
33
+ }).then(async res => {
34
34
  if (res.data.length === 0) {
35
35
  this.handleClick()
36
36
  return
37
37
  }
38
+ let resDataUserfiles = await new HttpResetClass().load('POST', 'rs/sql/tel_singleTable_OrderBy', {
39
+ data: {
40
+ items: '*', tablename: 't_userfiles', condition: `f_userinfo_id = '${this.row}'`, orderitem: ' f_userfiles_id desc '
41
+ }
42
+ })
43
+ var userfilesJson = {}
44
+ if (resDataUserfiles.data.length > 0) {
45
+ resDataUserfiles.data.forEach(v => {
46
+ userfilesJson[v.f_meternumber] = {
47
+ cardNo: v.f_card_id,
48
+ meterType: v.f_meter_classify,
49
+ meterGasnums: v.f_total_gas,
50
+ meterBalance: v.f_balance == 0 ? v.f_balance_amount : v.f_balance,
51
+ meterTolal: v.f_total_fee
52
+ }
53
+ })
54
+ }
38
55
  try {
39
- let hex = Buffer.from(res.data[0].blob, 'hex').toString('utf8');
56
+ let hex = Buffer.from(res.data[0].blob, 'hex').toString('utf8')
40
57
  if (!hex.includes('{')) {
41
- this.inputText = Buffer.from(hex, 'hex').toString('utf8');
58
+ let jsonstr = Buffer.from(hex, 'hex').toString('utf8')
59
+ let json = JSON.parse(jsonstr)
60
+ json['AddParams4NewSys'] = userfilesJson
61
+ this.inputText = json
42
62
  } else {
43
- this.inputText = hex;
63
+ let json = JSON.parse(hex)
64
+ json['AddParams4NewSys'] = userfilesJson
65
+ this.inputText = json
44
66
  }
45
67
  } catch (e) {
46
68
  this.$showMessage('网络异常请联系管理员')
@@ -51,17 +73,17 @@ export default {
51
73
  },
52
74
  methods: {
53
75
  handleClick() {
54
- this.showSketchPage = true;
76
+ this.showSketchPage = true
55
77
  this.$nextTick(() => {
56
- const sketchIframe = document.getElementById('aaaa2');
78
+ const sketchIframe = document.getElementById('aaaa2')
57
79
 
58
80
  window.addEventListener('message', (event) => {
59
81
  if (JSON.parse(event.data.param).gadgets.length > 0) {
60
- this.paperMessage = event.data.param;
82
+ this.paperMessage = event.data.param
61
83
  }
62
- });
63
-
64
- sketchIframe.contentWindow.postMessage(this.inputText, '*');
84
+ })
85
+ console.log(JSON.stringify(this.inputText))
86
+ sketchIframe.contentWindow.postMessage(JSON.stringify(this.inputText), '*')
65
87
  })
66
88
  },
67
89
  savePaper() {
@@ -76,7 +98,7 @@ export default {
76
98
  }
77
99
  let gadgets = param.gadgets
78
100
  if (gadgets.length > 0) {
79
- var jsonString = JSON.stringify(param);
101
+ var jsonString = JSON.stringify(param)
80
102
  var reqdata = {
81
103
  blob: Buffer.from(jsonString, 'utf8').toString('hex'),
82
104
  orgid: this.$login.f.orgid,
@@ -94,33 +116,34 @@ export default {
94
116
  }
95
117
  },
96
118
  hexToBytes(hex) {
97
- for (var bytes = [], c = 0; c < hex.length; c += 2)
98
- bytes.push(parseInt(hex.substring(c, 2), 16));
99
- return new Uint8Array(bytes);
119
+ for (var bytes = [], c = 0; c < hex.length; c += 2) {
120
+ bytes.push(parseInt(hex.substring(c, 2), 16))
121
+ }
122
+ return new Uint8Array(bytes)
100
123
  },
101
124
  decodeHexStringToJSON(hexString) {
102
125
  // 去除前缀 "0x"
103
- var cleanHexString = hexString.slice(2);
126
+ var cleanHexString = hexString.slice(2)
104
127
 
105
128
  // 将十六进制字符串转换为字节数组
106
- var byteArray = this.hexToBytes(cleanHexString);
129
+ var byteArray = this.hexToBytes(cleanHexString)
107
130
 
108
131
  // 创建 Blob 对象
109
- var blob = new Blob([byteArray], {type: 'application/json'});
132
+ var blob = new Blob([byteArray], {type: 'application/json'})
110
133
 
111
134
  // 读取 Blob 为文本
112
135
  return new Promise(function (resolve, reject) {
113
- var reader = new FileReader();
136
+ var reader = new FileReader()
114
137
  reader.onloadend = function () {
115
- resolve(reader.result);
116
- };
138
+ resolve(reader.result)
139
+ }
117
140
  reader.onerror = function () {
118
- reject(reader.error);
119
- };
120
- reader.readAsText(blob, 'UTF-8');
121
- });
141
+ reject(reader.error)
142
+ }
143
+ reader.readAsText(blob, 'UTF-8')
144
+ })
122
145
  }
123
- },
146
+ }
124
147
  // beforeDestroy() {
125
148
  // this.savePaper()
126
149
  // }
@@ -330,7 +330,6 @@ export default {
330
330
  // 将小区信息转化为综合信息的格式
331
331
  await this.areainfoInUser(this.areainfo)
332
332
  }
333
- console.log('this.blodid------------>', this.blodid)
334
333
  },
335
334
  watch: {
336
335
  async 'row' (val) {
File without changes