sale-client 3.6.471 → 3.6.473

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.471",
3
+ "version": "3.6.473",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  </div>
27
27
  </validator>
28
28
  </div>
29
- <upload :blodid="blodid" v-if="false" isremark="true" fusetype="表具停用"></upload>
29
+ <upload :blodid="blodid" :businessid="randomBusinessId" isremark="true" :deleteimg="true" fusetype="停用"></upload>
30
30
  </template>
31
31
  <script>
32
32
  /**
@@ -41,13 +41,22 @@
41
41
  blodid: '',
42
42
  showupload: true,
43
43
  model: {},
44
+ randomBusinessId: '',
44
45
  reason: this.$appdata.getParam('停用原因')
45
46
  }
46
47
  },
47
48
  ready () {
48
49
  this.blodid = this.row.f_userinfo_id
50
+ this.getRandomId()
49
51
  },
50
52
  methods: {
53
+ getRandomId () {
54
+ this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
55
+ let res = Math.random() * 16 | 0
56
+ let v = c == 'x' ? res : (res & 0x3 | 0x8)
57
+ return v.toString(16)
58
+ })
59
+ },
51
60
  async confirm () {
52
61
  await this.$LogicService.meterDisable(this.model, this.row)
53
62
  let array = [{
@@ -48,7 +48,7 @@
48
48
  </div>
49
49
  </div>
50
50
  </div>
51
- <modal :show.sync="showUpload" styles="border-radius:20px;margin-top:300px" v-ref:modal backdrop="false" :width="700" >
51
+ <modal :show.sync="showUpload" styles="border-radius:5px;margin-top:300px" v-ref:modal backdrop="false" :width="600" >
52
52
  <header slot="modal-header" class="modal-header">
53
53
  <button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
54
54
  <h4 class="modal-title" style="text-align: center">文件上传</h4>
@@ -66,227 +66,224 @@
66
66
  </template>
67
67
  <script>
68
68
  import { HttpResetClass } from 'vue-client'
69
- //import HttpResetClass from '../plugins/HttpResetClass'
70
- import Vue from "vue";
71
-
72
- export default {
73
- title: "附件",
74
- props: ['blodid','businessid','isremark', 'isusetype','takeimg','defname','isupload','fusetype','cols','width','height','deleteimg'],
75
- data() {
76
- return {
77
- isDelete: '0', // 删除按钮,可以进行控制(权限等)
78
- delimg: true, // 删除按钮,可以进行控制(权限等)
79
- fileInfoData: [], // 数据库存储的文件记录对象数组
80
- headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':this.fusetype?this.fusetype:''}, // 调用rs/file/uploadFile 的参数
81
- showUpload: false, // 上传模态框控制
82
- showhighmeter: false, // 高拍仪组件控制
83
- useType: '', // 使用类型
84
- fileRemark: '', // 文件说明
85
- rotating: this.$appdata.getSingleValue('图片附加功能') // 文件是否旋转
69
+ // import HttpResetClass from '../plugins/HttpResetClass'
70
+ import Vue from 'vue'
71
+
72
+ export default {
73
+ title: '附件',
74
+ props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'fusetype', 'cols', 'width', 'height', 'deleteimg'],
75
+ data () {
76
+ return {
77
+ isDelete: '0', // 删除按钮,可以进行控制(权限等)
78
+ delimg: true, // 删除按钮,可以进行控制(权限等)
79
+ fileInfoData: [], // 数据库存储的文件记录对象数组
80
+ headers: {'username': this.$login.f.name, 'blodid': '', 'businessid': '', 'fremarks': '', 'defname': '', 'fusetype': this.fusetype ? this.fusetype : ''}, // 调用rs/file/uploadFile 的参数
81
+ showUpload: false, // 上传模态框控制
82
+ showhighmeter: false, // 高拍仪组件控制
83
+ useType: '', // 使用类型
84
+ fileRemark: '', // 文件说明
85
+ rotating: this.$appdata.getSingleValue('图片附加功能') // 文件是否旋转
86
+ }
87
+ },
88
+ methods: {
89
+ confirmIdCard (IdCardInfo) {
90
+ this.showhighmeter = !this.showhighmeter
91
+ console.log(IdCardInfo)
92
+ if (IdCardInfo && IdCardInfo.strID) {
93
+ this.$emit('confirminfo', IdCardInfo)
86
94
  }
87
95
  },
88
- methods: {
89
- confirmIdCard (IdCardInfo) {
90
- this.showhighmeter = !this.showhighmeter
91
- console.log(IdCardInfo)
92
- if(IdCardInfo && IdCardInfo.strID){
93
- this.$emit('confirminfo', IdCardInfo)
94
- }
95
- },
96
96
  // 查询按钮事件
97
- delet(index, row) {
98
- this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
99
- this.$dispatch("delResid",row.id)
100
- this.fileInfoData.splice(index, 1)
101
- })
102
- },
103
- downloadfile(filepath){
104
-
105
- var link = document.createElement('a');
97
+ delet (index, row) {
98
+ this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
99
+ this.$dispatch('delResid', row.id)
100
+ this.fileInfoData.splice(index, 1)
101
+ })
102
+ },
103
+ downloadfile (filepath) {
104
+ var link = document.createElement('a')
106
105
  // let pathName = "http://" + location.host + filepath;
107
- link.href = filepath;
108
- link.target='_blank'
109
- link.dispatchEvent(new MouseEvent('click'));
110
- },
111
- GetRequest() {
112
- var url = location.search;
113
- var theRequest = new Object();
114
- if (url.indexOf("?") != -1) {
115
- var str = url.substr(1);
116
- let strs = str.split("&");
117
- for (var i = 0; i < strs.length; i++) {
118
- theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
119
- }
120
- }
121
- return theRequest;
122
- },
123
- upload() {
124
-
125
- if(this.showhighmeter){
126
- console.log(this,'测试')
127
- this.$refs.ltgao.closeVideo()
128
- }
129
- console.log('测试1')
130
- this.showhighmeter = !this.showhighmeter
131
- },
132
- async load(self) {
133
- let condition=''
134
- if(this.businessid){
135
- condition = `f_businessid= '${self.headers.businessid}' `
136
- }else{
137
- condition = `f_blobid= '${self.headers.blodid}' `
138
- }
139
- if(this.fusetype){
140
- condition += ` and fusetype like '%${this.fusetype}%'`
141
- }
142
- var http = new HttpResetClass()
143
- let data = {
144
- condition: condition
145
- }
146
- let getFile = []
147
- try {
148
- getFile = await http.load('POST', 'rs/sql/getFiles', {data: data}, {
149
- warnMsg: null,
150
- resolveMsg: null
151
- })
152
- } catch (e) {
153
- console.log(e)
106
+ link.href = filepath
107
+ link.target = '_blank'
108
+ link.dispatchEvent(new MouseEvent('click'))
109
+ },
110
+ GetRequest () {
111
+ var url = location.search
112
+ var theRequest = new Object()
113
+ if (url.indexOf('?') != -1) {
114
+ var str = url.substr(1)
115
+ let strs = str.split('&')
116
+ for (var i = 0; i < strs.length; i++) {
117
+ theRequest[strs[i].split('=')[0]] = decodeURIComponent(strs[i].split('=')[1])
154
118
  }
155
- for (var i = 0; i < getFile.data.length; i++) {
119
+ }
120
+ return theRequest
121
+ },
122
+ upload () {
123
+ if (this.showhighmeter) {
124
+ console.log(this, '测试')
125
+ this.$refs.ltgao.closeVideo()
126
+ }
127
+ console.log('测试1')
128
+ this.showhighmeter = !this.showhighmeter
129
+ },
130
+ async load (self) {
131
+ let condition = ''
132
+ if (this.businessid) {
133
+ condition = `f_businessid= '${self.headers.businessid}' `
134
+ } else {
135
+ condition = `f_blobid= '${self.headers.blodid}' `
136
+ }
137
+ if (this.fusetype) {
138
+ condition += ` and fusetype like '%${this.fusetype}%'`
139
+ }
140
+ var http = new HttpResetClass()
141
+ let data = {
142
+ condition: condition
143
+ }
144
+ let getFile = []
145
+ try {
146
+ getFile = await http.load('POST', 'rs/sql/getFiles', {data: data}, {
147
+ warnMsg: null,
148
+ resolveMsg: null
149
+ })
150
+ } catch (e) {
151
+ console.log(e)
152
+ }
153
+ for (var i = 0; i < getFile.data.length; i++) {
156
154
  // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
157
- if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
158
- getFile.data.splice(i,1)
159
- i--
160
- continue
161
- }
162
- let temp = getFile.data[i].f_downloadpath
163
- let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
164
- var xy=this.$appdata.getSingleValue('协议')?this.$appdata.getSingleValue('协议'):"http://"
165
- getFile.data[i].f_downloadURL = xy+ location.host + "/" + URL
155
+ if (getFile.data[i].fusetype && (getFile.data[i].fusetype.includes('execl导入'))) {
156
+ getFile.data.splice(i, 1)
157
+ i--
158
+ continue
166
159
  }
167
- self.fileInfoData = []
168
- self.fileInfoData = getFile.data
169
- },
160
+ let temp = getFile.data[i].f_downloadpath
161
+ let URL = temp.substring(temp.lastIndexOf(':\\') + 2)
162
+ var xy = this.$appdata.getSingleValue('协议') ? this.$appdata.getSingleValue('协议') : 'http://'
163
+ getFile.data[i].f_downloadURL = xy + location.host + '/' + URL
164
+ }
165
+ self.fileInfoData = []
166
+ self.fileInfoData = getFile.data
167
+ },
170
168
  // 数据库时间格式化
171
- formatdate(val) {
172
- //20180914151603 : 2018-09-14 15:16:03
173
- if (val.length != 14)
174
- return
175
- let year = val.substr(0, 4)
176
- let month = val.substr(4, 2)
177
- let day = val.substr(6, 2)
178
- let hour = val.substr(8, 2)
179
- let min = val.substr(10, 2)
180
- let second = val.substr(12, 2)
181
- return year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + second
182
- },
169
+ formatdate (val) {
170
+ // 20180914151603 : 2018-09-14 15:16:03
171
+ if (val.length != 14) { return }
172
+ let year = val.substr(0, 4)
173
+ let month = val.substr(4, 2)
174
+ let day = val.substr(6, 2)
175
+ let hour = val.substr(8, 2)
176
+ let min = val.substr(10, 2)
177
+ let second = val.substr(12, 2)
178
+ return year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + second
179
+ },
183
180
  // 打开文件上传对话框
184
- fileUpload() {
185
- this.showUpload = true
186
- },
181
+ fileUpload () {
182
+ this.showUpload = true
183
+ },
187
184
  // 关闭文件上传对话框
188
- close() {
189
- this.showUpload = false
185
+ close () {
186
+ this.showUpload = false
190
187
  // 将选的文件清空
191
- this.$refs.file.$el.querySelector('input').value = ''
192
- this.load(this)
193
- },
194
- convertBase64ToBlob(base64String) {
188
+ this.$refs.file.$el.querySelector('input').value = ''
189
+ this.load(this)
190
+ },
191
+ convertBase64ToBlob (base64String) {
195
192
  // 将base64解码
196
- var bytes = atob(base64String);
197
- //var bytes = base64;
198
- var bytesCode = new ArrayBuffer(bytes.length);
193
+ var bytes = atob(base64String)
194
+ // var bytes = base64;
195
+ var bytesCode = new ArrayBuffer(bytes.length)
199
196
  // 转换为类型化数组
200
- var byteArray = new Uint8Array(bytesCode);
197
+ var byteArray = new Uint8Array(bytesCode)
201
198
 
202
199
  // 将base64转换为ascii码
203
- for (var i = 0; i < bytes.length; i++) {
204
- byteArray[i] = bytes.charCodeAt(i);
205
- }
206
- // 生成Blob对象(文件对象)
207
- return new Blob([bytesCode], {type: 'image/jpeg'});
208
- },
209
- newPhoto(Imgbase64) {
210
- let form = new FormData()
211
- let xhr = new XMLHttpRequest()
212
- let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
213
- form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
214
- form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
215
- xhr.open("POST", "rs/file/uploadFile")
216
-
217
- if (this.headers) {
218
- for (var header in this.headers) {
219
- xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
220
- }
221
- }
222
- if (Vue.$login && Vue.$login.jwt) {
223
- xhr.setRequestHeader('Authorization', 'Bearer ' + Vue.$login.jwtNew)
224
- xhr.setRequestHeader('Token', Vue.$login.jwt)
225
- }
226
- xhr.send(form)
227
- setTimeout(() => {
228
- this.load(this)
229
- }, 5000)
200
+ for (var i = 0; i < bytes.length; i++) {
201
+ byteArray[i] = bytes.charCodeAt(i)
230
202
  }
203
+ // 生成Blob对象(文件对象)
204
+ return new Blob([bytesCode], {type: 'image/jpeg'})
231
205
  },
232
- ready() {
233
- if (this.$login.r.find(value => value == '上传附件删除')) {
234
- // 有删除权限
235
- this.isDelete = '1'
206
+ newPhoto (Imgbase64) {
207
+ let form = new FormData()
208
+ let xhr = new XMLHttpRequest()
209
+ let formDataBoundary = '----WebkitFormBoundary' + 'GaoPaiYi'
210
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
211
+ form.append('file', this.convertBase64ToBlob(Imgbase64), 'GaoPaiYi.jpg')
212
+ xhr.open('POST', 'rs/file/uploadFile')
213
+
214
+ if (this.headers) {
215
+ for (var header in this.headers) {
216
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
217
+ }
236
218
  }
237
- if (this.deleteimg) {
238
- this.delimg = false
219
+ if (Vue.$login && Vue.$login.jwt) {
220
+ xhr.setRequestHeader('Authorization', 'Bearer ' + Vue.$login.jwtNew)
221
+ xhr.setRequestHeader('Token', Vue.$login.jwt)
239
222
  }
240
- this.headers.blodid = this.blodid
241
- this.headers.businessid = this.businessid
242
- console.log('123222', this.businessid)
243
- if (this.blodid||this.businessid) {
223
+ xhr.send(form)
224
+ setTimeout(() => {
225
+ this.load(this)
226
+ }, 5000)
227
+ }
228
+ },
229
+ ready () {
230
+ if (this.$login.r.find(value => value == '上传附件删除')) {
231
+ // 有删除权限
232
+ this.isDelete = '1'
233
+ }
234
+ if (this.deleteimg) {
235
+ this.delimg = false
236
+ }
237
+ this.headers.blodid = this.blodid
238
+ this.headers.businessid = this.businessid
239
+ console.log('123222', this.businessid)
240
+ if (this.blodid || this.businessid) {
241
+ this.load(this)
242
+ }
243
+ },
244
+ watch: {
245
+ 'blodid' (val) {
246
+ if (val) {
247
+ console.log('观察blodid', val)
248
+ this.headers.blodid = this.blodid
244
249
  this.load(this)
245
250
  }
246
251
  },
247
- watch: {
248
- 'blodid'(val) {
249
- if (val) {
250
- console.log('观察blodid', val)
251
- this.headers.blodid = this.blodid
252
- this.load(this)
253
- }
254
- },
255
- 'businessid'(val) {
256
- console.log('观察businessid')
257
- if (val) {
258
- console.log('观察businessid', val)
259
- this.headers.businessid = this.businessid
260
- this.load(this)
261
- }
262
- },
263
- 'useType'() {
264
- this.headers.fusetype = this.useType[0] ? this.useType[0] : ''
265
- },
266
- 'defname'() {
267
- this.headers.defname=this.defname
252
+ 'businessid' (val) {
253
+ console.log('观察businessid')
254
+ if (val) {
255
+ console.log('观察businessid', val)
256
+ this.headers.businessid = this.businessid
257
+ this.load(this)
268
258
  }
269
259
  },
270
- computed: {
271
- foptions() {
272
- let default_type = ['档案信息', '发卡售气', '卡表收费', '物联网表收费',
273
- '机表收费', '表具停用', '表具启用', '换表&清零', '其他补气', '补气购气',
274
- '预存收费', '调价补差', '黑名单', '补卡', '限购', '销户', '过户']
275
- return !this.$appdata.getParam('附件使用类型') || !this.$appdata.getParam('附件使用类型').length ?
276
- default_type.map((item) => {
260
+ 'useType' () {
261
+ this.headers.fusetype = this.useType[0] ? this.useType[0] : ''
262
+ },
263
+ 'defname' () {
264
+ this.headers.defname = this.defname
265
+ }
266
+ },
267
+ computed: {
268
+ foptions () {
269
+ let default_type = ['档案信息', '发卡售气', '卡表收费', '物联网表收费',
270
+ '机表收费', '表具停用', '表具启用', '换表&清零', '其他补气', '补气购气',
271
+ '预存收费', '调价补差', '黑名单', '补卡', '限购', '销户', '过户']
272
+ return !this.$appdata.getParam('附件使用类型') || !this.$appdata.getParam('附件使用类型').length
273
+ ? default_type.map((item) => {
277
274
  return {label: item, value: item}
278
275
  }) : this.$appdata.getParam('附件使用类型')
279
- },
280
- },
281
- events: {
282
- onFileUpload: function (file, res) {
283
- console.log("上传完毕",res)
284
- this.$dispatch("resid",res.id)
285
- this.headers.fremarks=''
286
- this.close()
287
- }
276
+ }
277
+ },
278
+ events: {
279
+ onFileUpload: function (file, res) {
280
+ console.log('上传完毕', res)
281
+ this.$dispatch('resid', res.id)
282
+ this.headers.fremarks = ''
283
+ this.close()
288
284
  }
289
285
  }
286
+ }
290
287
  </script>
291
288
  <style scoped>
292
289
 
@@ -60,227 +60,224 @@
60
60
  </template>
61
61
  <script>
62
62
  import { HttpResetClass } from 'vue-client'
63
- //import HttpResetClass from '../plugins/HttpResetClass'
64
- import Vue from "vue";
65
-
66
- export default {
67
- title: "附件",
68
- props: ['blodid','businessid','isremark', 'isusetype','takeimg','defname','isupload','fusetype','cols','width','height','deleteimg'],
69
- data() {
70
- return {
71
- isDelete: '0', // 删除按钮,可以进行控制(权限等)
72
- delimg: true, // 删除按钮,可以进行控制(权限等)
73
- fileInfoData: [], // 数据库存储的文件记录对象数组
74
- headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':this.fusetype?this.fusetype:''}, // 调用rs/file/uploadFile 的参数
75
- showUpload: false, // 上传模态框控制
76
- showhighmeter: false, // 高拍仪组件控制
77
- useType: '', // 使用类型
78
- fileRemark: '', // 文件说明
79
- rotating: this.$appdata.getSingleValue('图片附加功能') // 文件是否旋转
63
+ // import HttpResetClass from '../plugins/HttpResetClass'
64
+ import Vue from 'vue'
65
+
66
+ export default {
67
+ title: '附件',
68
+ props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'fusetype', 'cols', 'width', 'height', 'deleteimg'],
69
+ data () {
70
+ return {
71
+ isDelete: '0', // 删除按钮,可以进行控制(权限等)
72
+ delimg: true, // 删除按钮,可以进行控制(权限等)
73
+ fileInfoData: [], // 数据库存储的文件记录对象数组
74
+ headers: {'username': this.$login.f.name, 'blodid': '', 'businessid': '', 'fremarks': '', 'defname': '', 'fusetype': this.fusetype ? this.fusetype : ''}, // 调用rs/file/uploadFile 的参数
75
+ showUpload: false, // 上传模态框控制
76
+ showhighmeter: false, // 高拍仪组件控制
77
+ useType: '', // 使用类型
78
+ fileRemark: '', // 文件说明
79
+ rotating: this.$appdata.getSingleValue('图片附加功能') // 文件是否旋转
80
+ }
81
+ },
82
+ methods: {
83
+ confirmIdCard (IdCardInfo) {
84
+ this.showhighmeter = !this.showhighmeter
85
+ console.log(IdCardInfo)
86
+ if (IdCardInfo && IdCardInfo.strID) {
87
+ this.$emit('confirminfo', IdCardInfo)
80
88
  }
81
89
  },
82
- methods: {
83
- confirmIdCard (IdCardInfo) {
84
- this.showhighmeter = !this.showhighmeter
85
- console.log(IdCardInfo)
86
- if(IdCardInfo && IdCardInfo.strID){
87
- this.$emit('confirminfo', IdCardInfo)
88
- }
89
- },
90
90
  // 查询按钮事件
91
- delet(index, row) {
92
- this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
93
- this.$dispatch("delResid",row.id)
94
- this.fileInfoData.splice(index, 1)
95
- })
96
- },
97
- downloadfile(filepath){
98
-
99
- var link = document.createElement('a');
91
+ delet (index, row) {
92
+ this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
93
+ this.$dispatch('delResid', row.id)
94
+ this.fileInfoData.splice(index, 1)
95
+ })
96
+ },
97
+ downloadfile (filepath) {
98
+ var link = document.createElement('a')
100
99
  // let pathName = "http://" + location.host + filepath;
101
- link.href = filepath;
102
- link.target='_blank'
103
- link.dispatchEvent(new MouseEvent('click'));
104
- },
105
- GetRequest() {
106
- var url = location.search;
107
- var theRequest = new Object();
108
- if (url.indexOf("?") != -1) {
109
- var str = url.substr(1);
110
- let strs = str.split("&");
111
- for (var i = 0; i < strs.length; i++) {
112
- theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
113
- }
114
- }
115
- return theRequest;
116
- },
117
- upload() {
118
-
119
- if(this.showhighmeter){
120
- console.log(this,'测试')
121
- this.$refs.ltgao.closeVideo()
122
- }
123
- console.log('测试1')
124
- this.showhighmeter = !this.showhighmeter
125
- },
126
- async load(self) {
127
- let condition=''
128
- if(this.businessid){
129
- condition = `f_businessid= '${self.headers.businessid}' `
130
- }else{
131
- condition = `f_blobid= '${self.headers.blodid}' `
132
- }
133
- if(this.fusetype){
134
- condition += ` and fusetype like '%${this.fusetype}%'`
135
- }
136
- var http = new HttpResetClass()
137
- let data = {
138
- condition: condition
139
- }
140
- let getFile = []
141
- try {
142
- getFile = await http.load('POST', 'rs/sql/getFiles', {data: data}, {
143
- warnMsg: null,
144
- resolveMsg: null
145
- })
146
- } catch (e) {
147
- console.log(e)
100
+ link.href = filepath
101
+ link.target = '_blank'
102
+ link.dispatchEvent(new MouseEvent('click'))
103
+ },
104
+ GetRequest () {
105
+ var url = location.search
106
+ var theRequest = new Object()
107
+ if (url.indexOf('?') != -1) {
108
+ var str = url.substr(1)
109
+ let strs = str.split('&')
110
+ for (var i = 0; i < strs.length; i++) {
111
+ theRequest[strs[i].split('=')[0]] = decodeURIComponent(strs[i].split('=')[1])
148
112
  }
149
- for (var i = 0; i < getFile.data.length; i++) {
113
+ }
114
+ return theRequest
115
+ },
116
+ upload () {
117
+ if (this.showhighmeter) {
118
+ console.log(this, '测试')
119
+ this.$refs.ltgao.closeVideo()
120
+ }
121
+ console.log('测试1')
122
+ this.showhighmeter = !this.showhighmeter
123
+ },
124
+ async load (self) {
125
+ let condition = ''
126
+ if (this.businessid) {
127
+ condition = `f_businessid= '${self.headers.businessid}' `
128
+ } else {
129
+ condition = `f_blobid= '${self.headers.blodid}' `
130
+ }
131
+ if (this.fusetype) {
132
+ condition += ` and fusetype like '%${this.fusetype}%'`
133
+ }
134
+ var http = new HttpResetClass()
135
+ let data = {
136
+ condition: condition
137
+ }
138
+ let getFile = []
139
+ try {
140
+ getFile = await http.load('POST', 'rs/sql/getFiles', {data: data}, {
141
+ warnMsg: null,
142
+ resolveMsg: null
143
+ })
144
+ } catch (e) {
145
+ console.log(e)
146
+ }
147
+ for (var i = 0; i < getFile.data.length; i++) {
150
148
  // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
151
- if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
152
- getFile.data.splice(i,1)
153
- i--
154
- continue
155
- }
156
- let temp = getFile.data[i].f_downloadpath
157
- let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
158
- var xy=this.$appdata.getSingleValue('协议')?this.$appdata.getSingleValue('协议'):"http://"
159
- getFile.data[i].f_downloadURL = xy+ location.host + "/" + URL
149
+ if (getFile.data[i].fusetype && (getFile.data[i].fusetype.includes('execl导入'))) {
150
+ getFile.data.splice(i, 1)
151
+ i--
152
+ continue
160
153
  }
161
- self.fileInfoData = []
162
- self.fileInfoData = getFile.data
163
- },
154
+ let temp = getFile.data[i].f_downloadpath
155
+ let URL = temp.substring(temp.lastIndexOf(':\\') + 2)
156
+ var xy = this.$appdata.getSingleValue('协议') ? this.$appdata.getSingleValue('协议') : 'http://'
157
+ getFile.data[i].f_downloadURL = xy + location.host + '/' + URL
158
+ }
159
+ self.fileInfoData = []
160
+ self.fileInfoData = getFile.data
161
+ },
164
162
  // 数据库时间格式化
165
- formatdate(val) {
166
- //20180914151603 : 2018-09-14 15:16:03
167
- if (val.length != 14)
168
- return
169
- let year = val.substr(0, 4)
170
- let month = val.substr(4, 2)
171
- let day = val.substr(6, 2)
172
- let hour = val.substr(8, 2)
173
- let min = val.substr(10, 2)
174
- let second = val.substr(12, 2)
175
- return year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + second
176
- },
163
+ formatdate (val) {
164
+ // 20180914151603 : 2018-09-14 15:16:03
165
+ if (val.length != 14) { return }
166
+ let year = val.substr(0, 4)
167
+ let month = val.substr(4, 2)
168
+ let day = val.substr(6, 2)
169
+ let hour = val.substr(8, 2)
170
+ let min = val.substr(10, 2)
171
+ let second = val.substr(12, 2)
172
+ return year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + second
173
+ },
177
174
  // 打开文件上传对话框
178
- fileUpload() {
179
- this.showUpload = true
180
- },
175
+ fileUpload () {
176
+ this.showUpload = true
177
+ },
181
178
  // 关闭文件上传对话框
182
- close() {
183
- this.showUpload = false
179
+ close () {
180
+ this.showUpload = false
184
181
  // 将选的文件清空
185
- this.$refs.file.$el.querySelector('input').value = ''
186
- this.load(this)
187
- },
188
- convertBase64ToBlob(base64String) {
182
+ this.$refs.file.$el.querySelector('input').value = ''
183
+ this.load(this)
184
+ },
185
+ convertBase64ToBlob (base64String) {
189
186
  // 将base64解码
190
- var bytes = atob(base64String);
191
- //var bytes = base64;
192
- var bytesCode = new ArrayBuffer(bytes.length);
187
+ var bytes = atob(base64String)
188
+ // var bytes = base64;
189
+ var bytesCode = new ArrayBuffer(bytes.length)
193
190
  // 转换为类型化数组
194
- var byteArray = new Uint8Array(bytesCode);
191
+ var byteArray = new Uint8Array(bytesCode)
195
192
 
196
193
  // 将base64转换为ascii码
197
- for (var i = 0; i < bytes.length; i++) {
198
- byteArray[i] = bytes.charCodeAt(i);
199
- }
200
- // 生成Blob对象(文件对象)
201
- return new Blob([bytesCode], {type: 'image/jpeg'});
202
- },
203
- newPhoto(Imgbase64) {
204
- let form = new FormData()
205
- let xhr = new XMLHttpRequest()
206
- let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
207
- form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
208
- form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
209
- xhr.open("POST", "rs/file/uploadFile")
210
-
211
- if (this.headers) {
212
- for (var header in this.headers) {
213
- xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
214
- }
215
- }
216
- if (Vue.$login && Vue.$login.jwt) {
217
- xhr.setRequestHeader('Authorization', 'Bearer ' + Vue.$login.jwtNew)
218
- xhr.setRequestHeader('Token', Vue.$login.jwt)
219
- }
220
- xhr.send(form)
221
- setTimeout(() => {
222
- this.load(this)
223
- }, 5000)
194
+ for (var i = 0; i < bytes.length; i++) {
195
+ byteArray[i] = bytes.charCodeAt(i)
224
196
  }
197
+ // 生成Blob对象(文件对象)
198
+ return new Blob([bytesCode], {type: 'image/jpeg'})
225
199
  },
226
- ready() {
227
- if (this.$login.r.find(value => value == '上传附件删除')) {
228
- // 有删除权限
229
- this.isDelete = '1'
200
+ newPhoto (Imgbase64) {
201
+ let form = new FormData()
202
+ let xhr = new XMLHttpRequest()
203
+ let formDataBoundary = '----WebkitFormBoundary' + 'GaoPaiYi'
204
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
205
+ form.append('file', this.convertBase64ToBlob(Imgbase64), 'GaoPaiYi.jpg')
206
+ xhr.open('POST', 'rs/file/uploadFile')
207
+
208
+ if (this.headers) {
209
+ for (var header in this.headers) {
210
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
211
+ }
230
212
  }
231
- if (this.deleteimg) {
232
- this.delimg = false
213
+ if (Vue.$login && Vue.$login.jwt) {
214
+ xhr.setRequestHeader('Authorization', 'Bearer ' + Vue.$login.jwtNew)
215
+ xhr.setRequestHeader('Token', Vue.$login.jwt)
233
216
  }
234
- this.headers.blodid = this.blodid
235
- this.headers.businessid = this.businessid
236
- console.log('123222', this.businessid)
237
- if (this.blodid||this.businessid) {
217
+ xhr.send(form)
218
+ setTimeout(() => {
219
+ this.load(this)
220
+ }, 5000)
221
+ }
222
+ },
223
+ ready () {
224
+ if (this.$login.r.find(value => value == '上传附件删除')) {
225
+ // 有删除权限
226
+ this.isDelete = '1'
227
+ }
228
+ if (this.deleteimg) {
229
+ this.delimg = false
230
+ }
231
+ this.headers.blodid = this.blodid
232
+ this.headers.businessid = this.businessid
233
+ console.log('123222', this.businessid)
234
+ if (this.blodid || this.businessid) {
235
+ this.load(this)
236
+ }
237
+ },
238
+ watch: {
239
+ 'blodid' (val) {
240
+ if (val) {
241
+ console.log('观察blodid', val)
242
+ this.headers.blodid = this.blodid
238
243
  this.load(this)
239
244
  }
240
245
  },
241
- watch: {
242
- 'blodid'(val) {
243
- if (val) {
244
- console.log('观察blodid', val)
245
- this.headers.blodid = this.blodid
246
- this.load(this)
247
- }
248
- },
249
- 'businessid'(val) {
250
- console.log('观察businessid')
251
- if (val) {
252
- console.log('观察businessid', val)
253
- this.headers.businessid = this.businessid
254
- this.load(this)
255
- }
256
- },
257
- 'useType'() {
258
- this.headers.fusetype = this.useType[0] ? this.useType[0] : ''
259
- },
260
- 'defname'() {
261
- this.headers.defname=this.defname
246
+ 'businessid' (val) {
247
+ console.log('观察businessid')
248
+ if (val) {
249
+ console.log('观察businessid', val)
250
+ this.headers.businessid = this.businessid
251
+ this.load(this)
262
252
  }
263
253
  },
264
- computed: {
265
- foptions() {
266
- let default_type = ['档案信息', '发卡售气', '卡表收费', '物联网表收费',
267
- '机表收费', '表具停用', '表具启用', '换表&清零', '其他补气', '补气购气',
268
- '预存收费', '调价补差', '黑名单', '补卡', '限购', '销户', '过户']
269
- return !this.$appdata.getParam('附件使用类型') || !this.$appdata.getParam('附件使用类型').length ?
270
- default_type.map((item) => {
254
+ 'useType' () {
255
+ this.headers.fusetype = this.useType[0] ? this.useType[0] : ''
256
+ },
257
+ 'defname' () {
258
+ this.headers.defname = this.defname
259
+ }
260
+ },
261
+ computed: {
262
+ foptions () {
263
+ let default_type = ['档案信息', '发卡售气', '卡表收费', '物联网表收费',
264
+ '机表收费', '表具停用', '表具启用', '换表&清零', '其他补气', '补气购气',
265
+ '预存收费', '调价补差', '黑名单', '补卡', '限购', '销户', '过户']
266
+ return !this.$appdata.getParam('附件使用类型') || !this.$appdata.getParam('附件使用类型').length
267
+ ? default_type.map((item) => {
271
268
  return {label: item, value: item}
272
269
  }) : this.$appdata.getParam('附件使用类型')
273
- },
274
- },
275
- events: {
276
- onFileUpload: function (file, res) {
277
- console.log("上传完毕",res)
278
- this.$dispatch("resid",res.id)
279
- this.headers.fremarks=''
280
- this.close()
281
- }
270
+ }
271
+ },
272
+ events: {
273
+ onFileUpload: function (file, res) {
274
+ console.log('上传完毕', res)
275
+ this.$dispatch('resid', res.id)
276
+ this.headers.fremarks = ''
277
+ this.close()
282
278
  }
283
279
  }
280
+ }
284
281
  </script>
285
282
  <style scoped>
286
283
 
@@ -694,7 +694,7 @@ let sendCardSaleGasGenremanent = async function (model, row) {
694
694
  let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
695
695
  resolveMsg: null,
696
696
  rejectMsg: '开户卡服务错误'
697
- },80000)
697
+ }, 80000)
698
698
  if (!cardParams || ((model.f_pregas > model.f_remanent_gas) && !result) || cardRes.data.Err || cardRes.data.Exception) {
699
699
  // 写卡异常
700
700
  // 数据回滚操作
@@ -801,7 +801,7 @@ let resetsendCardSaleGasGen = async function (model, row) {
801
801
  let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
802
802
  resolveMsg: null,
803
803
  rejectMsg: '重开户卡服务错误'
804
- },80000)
804
+ }, 80000)
805
805
  if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
806
806
  // 写卡异常
807
807
  // 数据回滚操作
@@ -910,7 +910,7 @@ let sendCardSaleGasGen = async function (model, row) {
910
910
  let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
911
911
  resolveMsg: null,
912
912
  rejectMsg: '开户卡服务错误'
913
- },80000)
913
+ }, 80000)
914
914
  if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
915
915
  // 写卡异常
916
916
  // 数据回滚操作
@@ -1119,7 +1119,7 @@ let replaceCardGenJB = function * (model, row) {
1119
1119
  let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
1120
1120
  resolveMsg: null,
1121
1121
  rejectMsg: '补卡卡服务错误'
1122
- },80000))
1122
+ }, 80000))
1123
1123
  // 卡服务写卡异常,业务逻辑回滚
1124
1124
  if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
1125
1125
  Vue.$showAlert('机表补卡失败!!', 'danger', 0)
@@ -1207,7 +1207,7 @@ let replaceXq = function * (model, row) {
1207
1207
  let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
1208
1208
  resolveMsg: null,
1209
1209
  rejectMsg: '擦虚气服务错误'
1210
- },80000))
1210
+ }, 80000))
1211
1211
  if (cardRes.data.Err || cardRes.data.Exception) {
1212
1212
  return {status: 1}
1213
1213
  } else {
@@ -1293,7 +1293,7 @@ let replaceCardGen = function * (model, row, allot) {
1293
1293
  let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
1294
1294
  resolveMsg: null,
1295
1295
  rejectMsg: '补卡卡服务错误'
1296
- },80000))
1296
+ }, 80000))
1297
1297
  // 卡服务写卡异常,业务逻辑回滚
1298
1298
  if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
1299
1299
  Vue.$showAlert('补卡失败!!', 'danger', 0)
@@ -1427,14 +1427,14 @@ let offlineWriteGen = async function (row) {
1427
1427
  param.kzt = result.data.ispick === '未过表' && result.data.lastsell_oper === '发卡售气' ? '0' : '1'
1428
1428
  param.cs = row.cardInfo.Times + 1
1429
1429
  param.bkcs = param.bkcs + 1
1430
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', param, {resolveMsg: null, rejectMsg: '写卡失败'},80000)
1430
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', param, {resolveMsg: null, rejectMsg: '写卡失败'}, 80000)
1431
1431
  } else if (row.states === '换表') {
1432
1432
  param.kzt = '0'
1433
1433
  param.bkcs = param.bkcs + 1
1434
1434
  param.cs = 1
1435
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', param, {resolveMsg: null, rejectMsg: '写卡失败'},80000)
1435
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', param, {resolveMsg: null, rejectMsg: '写卡失败'}, 80000)
1436
1436
  } else {
1437
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', param, {resolveMsg: null, rejectMsg: '写卡失败'},80000)
1437
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', param, {resolveMsg: null, rejectMsg: '写卡失败'}, 80000)
1438
1438
  }
1439
1439
  if (!cardParams || cardRes.data.Err || cardRes.data.Exception) {
1440
1440
  let sql = `update t_sellinggas set
@@ -1710,23 +1710,23 @@ let marginGen = async function (model, row) {
1710
1710
  params2.kzt = result.data.ispick === '未过表' && result.data.lastsell_oper === '发卡售气' ? '0' : '1'
1711
1711
  cardparam = JSON.stringify(params2)
1712
1712
  cardpost = 'WriteNewCard'
1713
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params2, {resolveMsg: null, rejectMsg: '卡表收费失败'},80000)
1713
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params2, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
1714
1714
  } else if (result.data.last_oper === '换表') {
1715
1715
  console.log('我走的是写新卡换表')
1716
1716
  cardparam = JSON.stringify(params3)
1717
1717
  cardpost = 'WriteNewCard'
1718
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params3, {resolveMsg: null, rejectMsg: '卡表收费失败'},80000)
1718
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params3, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
1719
1719
  } else if (result.data.last_oper === '换表补气') {
1720
1720
  // 累购金额需要将上次购气金额加上
1721
1721
  console.log('我走的是正常的收费', params)
1722
1722
  cardparam = JSON.stringify(params)
1723
1723
  cardpost = 'WriteGasCard'
1724
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'},80000)
1724
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
1725
1725
  } else {
1726
1726
  console.log('我走的是正常的收费', params)
1727
1727
  cardparam = JSON.stringify(params)
1728
1728
  cardpost = 'WriteGasCard'
1729
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'},80000)
1729
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
1730
1730
  }
1731
1731
  console.log('卡表收费返回写卡参数值', cardRes)
1732
1732
  // 卡服务写卡异常,业务逻辑回滚
@@ -1801,7 +1801,7 @@ let sellgasGen = async function (model, row) {
1801
1801
  if (JSON.parse(cardState.data).state === 1) {
1802
1802
  // 将卡上次数写入数据库
1803
1803
  if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_hascard === '是' && row.f_share_times === '是') {
1804
- row.cardInfo.Times = row.cardInfo.Times ? row.cardInfo.Times : row.f_times
1804
+ row.cardInfo.Times = row.f_times
1805
1805
  model.f_times = row.f_times + 1
1806
1806
  } else {
1807
1807
  model.f_times = row.cardInfo.Times + 1
@@ -1907,23 +1907,23 @@ let sellgasGen = async function (model, row) {
1907
1907
  params2.kzt = result.data.ispick === '未过表' && result.data.lastsell_oper === '发卡售气' ? '0' : '1'
1908
1908
  cardparam = JSON.stringify(params2)
1909
1909
  cardpost = 'WriteNewCard'
1910
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params2, {resolveMsg: null, rejectMsg: '卡表收费失败'},80000)
1910
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params2, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
1911
1911
  } else if (result.data.last_oper === '换表') {
1912
1912
  console.log('我走的是写新卡换表')
1913
1913
  cardparam = JSON.stringify(params3)
1914
1914
  cardpost = 'WriteNewCard'
1915
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params3, {resolveMsg: null, rejectMsg: '卡表收费失败'},80000)
1915
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params3, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
1916
1916
  } else if (result.data.last_oper === '换表补气') {
1917
1917
  // 累购金额需要将上次购气金额加上
1918
1918
  console.log('我走的是正常的收费', params)
1919
1919
  cardparam = JSON.stringify(params)
1920
1920
  cardpost = 'WriteGasCard'
1921
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'},80000)
1921
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
1922
1922
  } else {
1923
1923
  console.log('我走的是正常的收费', params)
1924
1924
  cardparam = JSON.stringify(params)
1925
1925
  cardpost = 'WriteGasCard'
1926
- cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'},80000)
1926
+ cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
1927
1927
  }
1928
1928
  console.log('卡表收费返回写卡参数值', cardRes)
1929
1929
  // 卡服务写卡异常,业务逻辑回滚
File without changes
@@ -1,2 +0,0 @@
1
- #Mon Dec 30 14:38:17 CST 2024
2
- gradle.version=5.2.1
File without changes