sale-client 4.1.230 → 4.2.1-ronghao

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 (171) hide show
  1. package/build/dev-server.js +29 -46
  2. package/package.json +2 -2
  3. package/src/App.vue +3 -3
  4. package/src/components/FilesManage/UserGeneralInfoTest.vue +4 -4
  5. package/src/components/FilesManageNew/FileUserFiles.vue +2 -4
  6. package/src/components/FilesManageNew/MeterinfoTest.vue +9 -9
  7. package/src/components/FilesManageNew/UserEssentialInfoTest.vue +201 -227
  8. package/src/components/FilesManageNew/UserGeneralInfoTest.vue +0 -2
  9. package/src/components/charge/business/CardMeterCenter.vue +1 -1
  10. package/src/components/charge/business/FilesComplete.vue +3 -3
  11. package/src/components/charge/business/IOTMeterCenter.vue +1 -1
  12. package/src/components/charge/business/OtherChargeNew.vue +68 -48
  13. package/src/components/common/userinfo_detail/UserInfoDetailManageNew.vue +10 -1
  14. package/src/components/common/userinfo_detail/ic_detail/CardHandRecord.vue +1 -1
  15. package/src/components/common/userinfo_detail/ic_detail/ChangeMeterQueryUser.vue +1 -1
  16. package/src/components/common/userinfo_detail/ic_detail/GarbageRecordList.vue +69 -0
  17. package/src/components/common/userinfo_detail/ic_detail/InsuranceChargesRecord.vue +384 -0
  18. package/src/components/common/userinfo_detail/ic_detail/WebHandQueryUser.vue +1 -1
  19. package/src/components/revenue/Common/MeterMessage.vue +1 -1
  20. package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
  21. package/src/components/revenue/HandManager/WebHand.vue +7 -4
  22. package/src/components/revenue/base/leftview/SafeCheck.vue +41 -3
  23. package/src/components/revenue/base/leftview/UserFeeInfo.vue +76 -0
  24. package/src/components/revenue/base/leftview/otherinfo.vue +1 -0
  25. package/src/components/revenue/base/rightview/CardList.vue +7 -3
  26. package/src/components/revenue/batchDeduction/batchDeductionList.vue +1 -1
  27. package/src/components/revenue/cardHandManage/cardDown.vue +18 -0
  28. package/src/components/revenue/changeInsurance/InsuranceAdd.vue +1 -0
  29. package/src/components/revenue/changeInsurance/InsuranceRecord.vue +2 -1
  30. package/src/components/revenue/comprehen/ComprehenOperation/BankPayment/BankPayment.vue +1 -1
  31. package/src/components/revenue/comprehen/ComprehenOperation/GiftFee/icTable.vue +4 -2
  32. package/src/components/revenue/comprehen/ComprehenOperation/QrPay/QrPaymentDetailed.vue +423 -423
  33. package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
  34. package/src/components/revenue/comprehen/Maintenance/revenue/MeterOperatemain.vue +2 -2
  35. package/src/components/revenue/machineHandManage/ArrearsQuery.vue +938 -938
  36. package/src/components/revenue/machineHandManage/HandplanQuery.vue +1 -1
  37. package/src/components/revenue/machineHandManage/machineHand.vue +3 -2
  38. package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +970 -970
  39. package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
  40. package/src/filiale/bayan/ChargeList.vue +1010 -1010
  41. package/src/filiale/bayan/StockListmain.vue +543 -543
  42. package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
  43. package/src/filiale/dexin/MeterinfoTest.vue +1239 -0
  44. package/src/filiale/dexin/UserEssentialInfoTest.vue +602 -0
  45. package/src/filiale/dexin/sale.js +5 -0
  46. package/src/filiale/fugou/MeterinfoTest.vue +1 -1
  47. package/src/filiale/jiaxian/AutomaticPurse.vue +349 -0
  48. package/src/filiale/jiaxian/ChangeMeterQueryUser.vue +303 -0
  49. package/src/filiale/jiaxian/ChangeRecord.vue +44 -2
  50. package/src/filiale/jiaxian/FillCardQueryUser.vue +250 -0
  51. package/src/filiale/jiaxian/FillGasQueryUser.vue +270 -0
  52. package/src/filiale/jiaxian/OtherChargeQueryUser.vue +305 -0
  53. package/src/filiale/jiaxian/PriceAdjustmentQueryUser.vue +368 -0
  54. package/src/filiale/jiaxian/PriceChangeQueryUser.vue +243 -0
  55. package/src/filiale/jiaxian/QueryInstruct.vue +436 -0
  56. package/src/filiale/jiaxian/RecordQueryUser.vue +321 -0
  57. package/src/filiale/jiaxian/Repurchase.vue +181 -0
  58. package/src/filiale/jiaxian/TransferQueryUser.vue +274 -0
  59. package/src/filiale/jiaxian/UserInfoDetailManageNew.vue +11 -11
  60. package/src/filiale/jiaxian/Userinfo.vue +426 -0
  61. package/src/filiale/jiaxian/WatchCollection.vue +54 -1
  62. package/src/filiale/jiaxian/WebAutomaticPurse.vue +348 -0
  63. package/src/filiale/jiaxian/contractSigningList.vue +149 -0
  64. package/src/filiale/jiaxian/sale.js +5 -0
  65. package/src/filiale/jinhong/AutoAccountsDetail.vue +63 -0
  66. package/src/filiale/jinhong/CardList.vue +572 -0
  67. package/src/filiale/jinhong/CardMeterCenter.vue +1 -1
  68. package/src/filiale/jinhong/CardMeterCenterInner.vue +61 -22
  69. package/src/filiale/jinhong/GarbageCharge.vue +1 -1
  70. package/src/filiale/jinhong/HandplanQuery.vue +1430 -0
  71. package/src/filiale/jinhong/IOTMeterCenterInner.vue +42 -14
  72. package/src/filiale/jinhong/InsuranceAdd.vue +27 -5
  73. package/src/filiale/jinhong/InsuranceChargesDetails.vue +11 -5
  74. package/src/filiale/jinhong/InsuranceRecord.vue +4 -5
  75. package/src/filiale/jinhong/InsuranceTemp.vue +33 -5
  76. package/src/filiale/jinhong/MachineChargeService.js +8 -0
  77. package/src/filiale/jinhong/MachineMeterCenter.vue +38 -11
  78. package/src/filiale/jinhong/ShowCardSellGasInner.vue +46 -14
  79. package/src/filiale/jinhong/Userinfo.vue +75 -1
  80. package/src/filiale/jinhong/insuranceGuanL.vue +349 -0
  81. package/src/filiale/jinhong/machineDown.vue +1205 -0
  82. package/src/filiale/jinhong/sale.js +9 -0
  83. package/src/filiale/jinhuang/UserInfoDetailManageNew.vue +259 -0
  84. package/src/filiale/jinhuang/WebHand.vue +1026 -0
  85. package/src/filiale/jinhuang/WebHandQueryUser.vue +413 -0
  86. package/src/filiale/jinhuang/cardsHand.vue +911 -0
  87. package/src/filiale/jinhuang/sale.js +8 -0
  88. package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
  89. package/src/filiale/lixianV3/InsuranceAdd.vue +1 -0
  90. package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
  91. package/src/filiale/meihekou/CardMeterCenter.vue +991 -0
  92. package/src/filiale/meihekou/ChargeManage.vue +3 -2
  93. package/src/filiale/meihekou/ChargeOper.vue +279 -169
  94. package/src/filiale/meihekou/HandManager.vue +57 -2
  95. package/src/filiale/meihekou/NoCardMeterCenter.vue +542 -0
  96. package/src/filiale/meihekou/OverUseCharge.vue +1 -1
  97. package/src/filiale/meihekou/PrintBill.vue +48 -41
  98. package/src/filiale/meihekou/ReissueBill.vue +4 -1
  99. package/src/filiale/meihekou/ShowCardSellGas.vue +935 -0
  100. package/src/filiale/meihekou/TransferManage.vue +704 -0
  101. package/src/filiale/meihekou/Userinfo.vue +233 -5
  102. package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
  103. package/src/filiale/meihekou/icTable.vue +233 -0
  104. package/src/filiale/meihekou/machineHand.vue +2158 -0
  105. package/src/filiale/meihekou/manualChargeCenter.vue +394 -0
  106. package/src/filiale/meihekou/meterTable.vue +220 -0
  107. package/src/filiale/meihekou/sale.js +15 -0
  108. package/src/filiale/qianneng/MeterMessage.vue +1 -1
  109. package/src/filiale/qianneng/revenue/sms/AccountMessageList.vue +508 -508
  110. package/src/filiale/rizhao/InsuranceAdd.vue +1 -0
  111. package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
  112. package/src/filiale/ronghao/CardList.vue +19 -17
  113. package/src/filiale/ronghao/CardMeterChargeCancel.vue +5 -0
  114. package/src/filiale/ronghao/CardService.js +2144 -2144
  115. package/src/filiale/ronghao/ChangeMeterService.js +1 -1
  116. package/src/filiale/ronghao/ChargeList.vue +17 -17
  117. package/src/filiale/ronghao/ChargeManage.vue +325 -0
  118. package/src/filiale/ronghao/ChargeOper.vue +330 -0
  119. package/src/filiale/ronghao/FilesManageNew/UserEssentialInfoTest.vue +457 -0
  120. package/src/filiale/ronghao/FilesManageNew/UserGeneralInfoTest.vue +690 -0
  121. package/src/filiale/ronghao/HandplanQuery.vue +13 -14
  122. package/src/filiale/ronghao/IOTMeterCenter.vue +15 -6
  123. package/src/filiale/ronghao/InsuranceAdd.vue +1 -0
  124. package/src/filiale/ronghao/InsuranceManage.vue +58 -58
  125. package/src/filiale/ronghao/MachineChargeService.js +149 -149
  126. package/src/filiale/ronghao/NoCardMeterCenter.vue +534 -534
  127. package/src/filiale/ronghao/PaymentCode.vue +174 -174
  128. package/src/filiale/ronghao/PriceChangeCompensation/CompensationManage.vue +26 -26
  129. package/src/filiale/ronghao/PriceChangeCompensation/IotCompensation.vue +318 -318
  130. package/src/filiale/ronghao/PriceChangeCompensation/JbCompensation.vue +343 -343
  131. package/src/filiale/ronghao/PriceChangeCompensation/SurplusRecordDetail.vue +74 -74
  132. package/src/filiale/ronghao/ReplaceCardManage.vue +415 -415
  133. package/src/filiale/ronghao/Upload.vue +654 -654
  134. package/src/filiale/ronghao/Userinfo.vue +18 -18
  135. package/src/filiale/ronghao/cardDown.vue +1141 -1141
  136. package/src/filiale/ronghao/changemeterOperate.vue +315 -315
  137. package/src/filiale/ronghao/fillgasSpecific.vue +313 -313
  138. package/src/filiale/ronghao/ic_detail/ChargeRecordQuery.vue +106 -106
  139. package/src/filiale/ronghao/ic_detail/WatchCollection.vue +115 -115
  140. package/src/filiale/ronghao/ic_detail/WebHandQueryUser.vue +411 -411
  141. package/src/filiale/ronghao/machineDown.vue +1176 -1176
  142. package/src/filiale/ronghao/machineRefund.vue +3 -1
  143. package/src/filiale/ronghao/replacementSingleInfoOperation.vue +315 -315
  144. package/src/filiale/ronghao/sale.js +11 -0
  145. package/src/filiale/ronghao/specificInformation.vue +537 -537
  146. package/src/filiale/ronghao/uploadFilesHistory.vue +214 -0
  147. package/src/filiale/ruihua/FilesManage/MeterinfoTest.vue +10 -0
  148. package/src/filiale/shanxian/components/revenue/InsuranceAdd.vue +1 -0
  149. package/src/filiale/wuan/MeterMessage.vue +1 -1
  150. package/src/filiale/yangchun/BasicLivingList.vue +281 -0
  151. package/src/filiale/yangchun/BlackList/BlackRecordQuery.vue +1 -0
  152. package/src/filiale/yangchun/CardChangeFill.vue +1 -1
  153. package/src/filiale/yangchun/ChargeList.vue +954 -954
  154. package/src/filiale/yangchun/FilesManage/UserPaperInfoTest.vue +3 -3
  155. package/src/filiale/yangchun/NewMeterList.vue +742 -0
  156. package/src/filiale/yangchun/sale.js +3 -0
  157. package/src/filiale/yuncheng/CardList.vue +1 -1
  158. package/src/filiale/yuncheng/IndustryCommerceHand.vue +1145 -0
  159. package/src/filiale/yuncheng/IndustryCommerceHandAudit.vue +794 -0
  160. package/src/filiale/yuncheng/IndustryCommerceHandManager.vue +64 -0
  161. package/src/filiale/yuncheng/InsuranceAdd.vue +1 -0
  162. package/src/filiale/yuncheng/MeterBookUser.vue +781 -0
  163. package/src/filiale/yuncheng/UserDeviceInfoTest.vue +2 -2
  164. package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
  165. package/src/filiale/yuncheng/industryDown.vue +1118 -0
  166. package/src/filiale/yuncheng/sale.js +11 -0
  167. package/src/filiale/yuncheng/uploadFilesHistory.vue +185 -0
  168. package/src/filiale/zhongsheng/BlackListList.vue +293 -293
  169. package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
  170. package/src/plugins/CardService.js +2217 -2217
  171. package/src/sale.js +3 -1
@@ -1,654 +1,654 @@
1
- <template>
2
- <div style="background-color: #FFFFFF;" id="fileupload">
3
- <div class="row" style="background-color: #FFFFFF;height: auto;border-radius: 8px">
4
- <div style="width:75%;margin: 30px auto 10px auto;padding-bottom: 10px">
5
- <div class="inpGroup col-sm-7">
6
- <div class="col-sm-10 form-input-group">
7
- <label class="font_normal_body col-sm-6" style="text-align: center">文件说明</label>
8
- <input v-model="headers.fremarks" class="input_search" placeholder="文件说明"
9
- style="vertical-align:middle;width: 60%"/>
10
- </div>
11
- <div class="col-sm-10 form-input-group" style="margin-top:10px;" title="参数管理:附件使用类型">
12
- <label class="font_normal_body col-sm-6" style="text-align: center">使用类型</label>
13
- <v-select type="button" placeholder="使用类型" :options="foptions"
14
- close-on-select
15
- direction="up"
16
- :value.sync="fusetype" v-model="fusetype" style="vertical-align:middle;width: 60%">
17
- </v-select>
18
- </div>
19
- </div>
20
- <div class="col-sm-5 resBtn">
21
- <button class="button_search btn-gn" @click="upload()" v-show="!takeimg">拍照</button>
22
- <button class="button_search btn-gn" @click="fileUpload()" v-show="!isupload">审核资料上传</button>
23
- </div>
24
- </div>
25
- <div class="showList col-sm-12"
26
- style="padding: 10px;margin-top: 20px;">
27
- <hr style="width: 90%;border: #ccc 1px solid;margin:0 auto"/>
28
- <div :class="cols ? cols : 'col-sm-6'" style="padding:10px 10px 0px 10px;height: auto;box-sizing: border-box"
29
- v-for="row in fileInfoData">
30
- <div class="showData">
31
- <div class="left">
32
- <a href="#" class="thumbnail" style="width:100%;height:100%">
33
- <img
34
- v-if="(row.f_filetype.toLowerCase()==='jpg'||row.f_filetype.toLowerCase()==='png'||row.f_filetype.toLowerCase()==='gif'||row.f_filetype.toLowerCase()==='bmp')&&!rotating"
35
- :src="row.f_downloadURL" alt="..."/>
36
- <img-self
37
- v-if="(row.f_filetype.toLowerCase()==='jpg'||row.f_filetype.toLowerCase()==='png'||row.f_filetype.toLowerCase()==='gif'||row.f_filetype.toLowerCase()==='bmp')&&rotating"
38
- :width="width?width:60" :height="height?height:60" :src="row.f_downloadURL" alt="..."></img-self>
39
- <img v-if="row.f_filetype.toLowerCase()==='pdf'" src="../../../static/mainicon/pdf.jpg" alt="" style="width:66%"/>
40
- <img-self v-if="row.f_filetype.toLowerCase()==='pdf'&&rotating" :width="width?width:60"
41
- :height="height?height:60" src="../../../static/mainicon/pdf.jpg" alt="..."></img-self>
42
- <img v-if="row.f_filetype.toLowerCase().match('/wav|mp3|amr/')" src="../../../static/mainicon/sound.png" alt=""
43
- style="width:66%"/>
44
- <img v-if="row.f_filetype.toLowerCase()==='xls'||row.f_filetype.toLowerCase()==='xlsx'"
45
- src="../../../static/mainicon/excel.jpg" alt="" style="width:66%"/>
46
- <img-self v-if="row.f_filetype.toLowerCase()==='xls'||row.f_filetype.toLowerCase()==='xlsx'&&rotating"
47
- :width="width?width:60" :height="height?height:60" src="../../../static/mainicon/excel.jpg"
48
- alt="..."></img-self>
49
- <img v-if="row.f_filetype.toLowerCase()==='doc'||row.f_filetype.toLowerCase()==='docx'"
50
- src="../../../static/mainicon/doc.jpg" alt="" style="width:66%"/>
51
- <img-self v-if="row.f_filetype.toLowerCase()==='doc'||row.f_filetype.toLowerCase()==='docx'&&rotating"
52
- :width="width?width:60" :height="height?height:60" src="../../../static/mainicon/doc.jpg" alt="..."></img-self>
53
- </a>
54
- </div>
55
- <div class="right">
56
- <p :title="row.f_uploaddate" class="top clears">
57
- <strong>上传时间</strong>:&nbsp;<span>{{ row.f_uploaddate }}</span></p>
58
- <p :title="row.f_username" class="top clears">
59
- <strong>操作员</strong>:&nbsp;<span>{{ row.f_username }}</span></p>
60
- <p :title="row.f_filename" class="top clears"><strong>文件名</strong>:&nbsp;{{ row.f_filename }}</p>
61
- <p :title="row.fremarks" class="top clears"><strong>文件说明</strong>:&nbsp;{{ row.fremarks }}</p>
62
- <p>
63
- <a
64
- v-if="row.f_filetype.toLowerCase()==='jpg'||row.f_filetype.toLowerCase()==='png'||row.f_filetype.toLowerCase()==='gif'||row.f_filetype.toLowerCase()==='bmp'"
65
- :href="row.f_downloadURL" style="background:#6aa6e2" class="btn btn-primary" target="_blank"
66
- role="button">预览</a>
67
- <button class="button_search btn-gn"
68
- v-if="row.f_filetype.toLowerCase().match('/wav|mp3|amr/')||row.f_filetype.toLowerCase()==='pdf'||row.f_filetype.toLowerCase()==='xls'||row.f_filetype.toLowerCase()==='xlsx'||row.f_filetype.toLowerCase()==='doc'||row.f_filetype.toLowerCase()==='docx'"
69
- @click="downloadfile(row.f_downloadURL)">下载
70
- </button>
71
- <a v-if="isDelete == '1'" @click="delet($index,row)" href="#" class="btn btn-default"
72
- role="button">删除</a>
73
- </p>
74
- </div>
75
- </div>
76
- </div>
77
- </div>
78
- </div>
79
- <modal :show.sync="showUpload" styles="border-radius:20px;margin-top:300px" v-ref:modal backdrop="false"
80
- :width="700">
81
- <header slot="modal-header" class="modal-header">
82
- <button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
83
- <h4 class="modal-title" style="text-align: center">文件上传</h4>
84
- </header>
85
- <article slot="modal-body" class="modal-body" style="height: 70px">
86
- <div class="form-group">
87
- <file-upload style="margin-left:100px;padding-top:20px" class="my-file-uploader" :name="'myFile' + blodid"
88
- action="api/af-revenue/file/uploadFile" tagname="文件上传" :headers="headers" multiple
89
- v-ref:file></file-upload>
90
- </div>
91
- </article>
92
- <footer slot="modal-footer" class="modal-footer">
93
- </footer>
94
- </modal>
95
- </div>
96
-
97
- <high-meter :show.sync="showhighmeter" @photo-finish="newPhoto" v-if="showhighmeter"
98
- v-on:confirminfo="confirmIdCard"></high-meter>
99
- </template>
100
- <script>
101
- import { HttpResetClass } from 'vue-client'
102
- import Vue from 'vue'
103
- export default {
104
- title: '附件',
105
- props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'fusetype', 'cols', 'width', 'height'],
106
- data () {
107
- return {
108
- isDelete: '0', // 删除按钮,可以进行控制(权限等)
109
- fileInfoData: [], // 数据库存储的文件记录对象数组
110
- headers: {
111
- 'username': this.$login.f.name,
112
- 'blodid': '',
113
- 'businessid': '',
114
- 'fremarks': '',
115
- 'defname': '',
116
- 'fusetype': this.fusetype ? this.fusetype : ''
117
- }, // 调用api/af-revenue/file/uploadFile 的参数
118
- showUpload: false, // 上传模态框控制
119
- showhighmeter: false, // 高拍仪组件控制
120
- fileRemark: '', // 文件说明
121
- rotating: this.$appdata.getSingleValue('图片附加功能') // 文件是否旋转
122
- }
123
- },
124
- methods: {
125
- confirmIdCard (IdCardInfo) {
126
- this.showhighmeter = !this.showhighmeter
127
- },
128
- // 查询按钮事件
129
- delet (index, row) {
130
- this.$resetdelete('api/af-revenue/entity/t_files', {id: row.id}, {
131
- resolveMsg: '删除成功',
132
- rejectMsg: '删除失败'
133
- }).then((res) => {
134
- this.$dispatch('delResid', row.id)
135
- this.fileInfoData.splice(index, 1)
136
- })
137
- },
138
- downloadfile (filepath) {
139
- var link = document.createElement('a')
140
- // let pathName = "http://" + location.host + filepath;
141
- link.href = filepath
142
- link.target = '_blank'
143
- link.dispatchEvent(new MouseEvent('click'))
144
- },
145
- GetRequest () {
146
- var url = location.search
147
- var theRequest = new Object()
148
- if (url.indexOf('?') != -1) {
149
- var str = url.substr(1)
150
- let strs = str.split('&')
151
- for (var i = 0; i < strs.length; i++) {
152
- theRequest[strs[i].split('=')[0]] = decodeURIComponent(strs[i].split('=')[1])
153
- }
154
- }
155
- return theRequest
156
- },
157
- upload () {
158
- if (this.showhighmeter) {
159
- console.log(this, '测试')
160
- this.$refs.ltgao.closeVideo()
161
- }
162
- console.log('测试1')
163
- this.showhighmeter = !this.showhighmeter
164
- },
165
- async load (self) {
166
- let condition = ''
167
- if (this.businessid) {
168
- condition = `f_businessid= '${self.headers.businessid}' `
169
- } else {
170
- condition = `f_blobid= '${self.headers.blodid}' `
171
- }
172
- if (this.fusetype) {
173
- condition += ` and fusetype like '%${this.fusetype}%'`
174
- }
175
- var http = new HttpResetClass()
176
- let data = {
177
- condition: condition
178
- }
179
- let getFile = []
180
- try {
181
- getFile = await http.load('POST', 'api/af-revenue/sql/getFiles', {data: data}, {
182
- warnMsg: null,
183
- resolveMsg: null
184
- })
185
- } catch (e) {
186
- console.log(e)
187
- }
188
- for (var i = 0; i < getFile.data.length; i++) {
189
- // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
190
- if (getFile.data[i].fusetype && (getFile.data[i].fusetype.includes('execl导入'))) {
191
- getFile.data.splice(i, 1)
192
- i--
193
- continue
194
- }
195
- let temp = getFile.data[i].f_downloadpath
196
- let URL = ''
197
- if (temp.lastIndexOf(':\\') > -1) {
198
- URL = temp.substring(temp.lastIndexOf(':\\') + 2)
199
- } else {
200
- URL = temp.substring(temp.lastIndexOf('://') + 2)
201
- }
202
-
203
- var xy = this.$appdata.getSingleValue('协议') ? this.$appdata.getSingleValue('协议') : 'http://'
204
- getFile.data[i].f_downloadURL = xy + location.host + '/' + URL
205
- }
206
- self.fileInfoData = []
207
- self.fileInfoData = getFile.data
208
- },
209
- // 数据库时间格式化
210
- formatdate (val) {
211
- // 20180914151603 : 2018-09-14 15:16:03
212
- if (val.length != 14) { return }
213
- let year = val.substr(0, 4)
214
- let month = val.substr(4, 2)
215
- let day = val.substr(6, 2)
216
- let hour = val.substr(8, 2)
217
- let min = val.substr(10, 2)
218
- let second = val.substr(12, 2)
219
- return year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + second
220
- },
221
- // 打开文件上传对话框
222
- fileUpload () {
223
- this.showUpload = true
224
- },
225
- // 关闭文件上传对话框
226
- close () {
227
- this.showUpload = false
228
- // 将选的文件清空
229
- this.$refs.file.$el.querySelector('input').value = ''
230
- this.load(this)
231
- },
232
- convertBase64ToBlob (base64String) {
233
- // 将base64解码
234
- var bytes = atob(base64String)
235
- // var bytes = base64;
236
- var bytesCode = new ArrayBuffer(bytes.length)
237
- // 转换为类型化数组
238
- var byteArray = new Uint8Array(bytesCode)
239
-
240
- // 将base64转换为ascii码
241
- for (var i = 0; i < bytes.length; i++) {
242
- byteArray[i] = bytes.charCodeAt(i)
243
- }
244
- // 生成Blob对象(文件对象)
245
- return new Blob([bytesCode], {type: 'image/jpeg'})
246
- },
247
- newPhoto (data) {
248
- console.log(data.img)
249
- data.name = 'GaoPaiYi'
250
- let form = new FormData()
251
- let xhr = new XMLHttpRequest()
252
- let formDataBoundary = '----WebkitFormBoundary' + 'GaoPaiYi'
253
- form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
254
- form.append('file', this.convertBase64ToBlob(data.img), `${data.name}.png`)
255
-
256
- xhr.open('POST', 'api/af-revenue/file/uploadFile')
257
- if (this.headers) {
258
- this.headers.blodid = this.blodid
259
- for (var header in this.headers) {
260
- xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
261
- }
262
- }
263
- if (Vue.$login && Vue.$login.jwt) {
264
- xhr.setRequestHeader('Authorization', 'Bearer ' + Vue.$login.jwtNew)
265
- xhr.setRequestHeader('Token', Vue.$login.jwt)
266
- }
267
- xhr.send(form)
268
- setTimeout(() => {
269
- this.load(this)
270
- }, 5000)
271
- }
272
- },
273
- ready () {
274
- if (this.$login.r.find(value => value == '上传附件删除')) {
275
- // 有删除权限
276
- this.isDelete = '1'
277
- }
278
- this.headers.blodid = this.blodid
279
- this.headers.businessid = this.businessid
280
- console.log('123222', this.businessid)
281
- if (this.blodid || this.businessid) {
282
- this.load(this)
283
- }
284
- },
285
- watch: {
286
- 'blodid' (val) {
287
- if (val) {
288
- console.log('观察blodid', val)
289
- this.headers.blodid = this.blodid
290
- this.load(this)
291
- }
292
- },
293
- 'businessid' (val) {
294
- console.log('观察businessid')
295
- if (val) {
296
- console.log('观察businessid', val)
297
- this.headers.businessid = this.businessid
298
- this.load(this)
299
- }
300
- },
301
- 'defname' () {
302
- this.headers.defname = this.defname
303
- }
304
- },
305
- computed: {
306
- foptions () {
307
- let default_type = ['档案信息', '发卡售气', '卡表收费', '物联网表收费',
308
- '机表收费', '表具停用', '换表&清零', '其他补气', '补气购气',
309
- '预存收费', '调价补差', '黑名单', '补卡', '限购', '销户', '过户', '签约信息']
310
- return !this.$appdata.getParam('附件使用类型') || !this.$appdata.getParam('附件使用类型').length
311
- ? default_type.map((item) => {
312
- return {label: item, value: item}
313
- }) : this.$appdata.getParam('附件使用类型')
314
- }
315
- },
316
- events: {
317
- onFileUpload: function (file, res) {
318
- console.log('上传完毕', res)
319
- this.$dispatch('resid', res.id)
320
- this.headers.fremarks = ''
321
- this.close()
322
- }
323
- }
324
- }
325
- </script>
326
- <style scoped>
327
-
328
- * {
329
- padding: 0px;
330
- margin: 0px;
331
- }
332
-
333
- .inpGroup {
334
- font-family: "微软雅黑";
335
- }
336
-
337
- .navWin {
338
- position: relative;
339
- }
340
-
341
- .navWin .navShow {
342
- margin-top: 5px;
343
- height: 34px;
344
- font-size: 20px;
345
- line-height: 34px;
346
- color: rgb(180, 180, 180);
347
- }
348
-
349
- .navWin .navShow span {
350
- display: inline-block;
351
- height: 34px;
352
- }
353
-
354
- .navWin .navShow .icon {
355
- height: 34px;
356
- margin-right: 10px;
357
- color: rgb(200, 200, 200);
358
- }
359
-
360
- .navWin .navList {
361
- position: absolute;
362
- width: 100%;
363
- z-index: 99;
364
- list-style: none;
365
- background-color: rgba(241, 241, 241, 0.9);
366
- line-height: 34px;
367
- color: #8d8d8d;
368
- visibility: hidden;
369
- }
370
-
371
- .navWin:hover .navList {
372
- visibility: visible;
373
- }
374
-
375
- .navWin .navList li {
376
- font-size: 18px;
377
- padding-left: 30px;
378
- }
379
-
380
- .navWin .navList li:hover {
381
- background-color: rgba(220, 220, 220, 0.9);
382
- }
383
-
384
- .inp {
385
- box-sizing: border-box;
386
- width: 79%;
387
- padding: 0px 10px;
388
- height: 34px;
389
- font-size: 14px;
390
- line-height: 36px;
391
- color: #999999;
392
- border: solid 1px #c1c1c1;
393
- border-radius: 2px;
394
- background: none;
395
- outline: none;
396
- }
397
-
398
- .inp::-webkit-input-placeholder {
399
- color: #999999;
400
- }
401
-
402
- .inp_button {
403
- float: right;
404
- margin-left: 10px;
405
- /* position: absolute;
406
- right: 35px;
407
- height: 40px;*/
408
- width: 100px;
409
- font-size: 14px;
410
- line-height: 34px;
411
- color: #ffffff;
412
- text-align: center;
413
- background-color: rgb(90, 180, 90);
414
- border-radius: 4px;
415
- cursor: pointer;
416
- }
417
-
418
- .btn-group {
419
- height: 34px;
420
- }
421
-
422
- .inp_button2 {
423
- float: right;
424
- margin-left: 10px;
425
- /* position: absolute;
426
- right: 35px;
427
- height: 40px;*/
428
- width: auto;
429
- font-size: 16px;
430
- line-height: 34px;
431
- color: #ffffff;
432
- text-align: center;
433
- border-radius: 4px;
434
- cursor: pointer;
435
- }
436
-
437
- .inp_button:hover {
438
- /*background-color: rgb(80, 150, 80);*/
439
- }
440
-
441
- .inp_button:active {
442
- font-size: 20px;
443
- /*background-color: rgb(150, 200, 150);*/
444
- }
445
-
446
- .showData {
447
- height: auto;
448
- position: relative;
449
- padding-bottom: 7px;
450
- border-bottom: solid 1px #c1c1c1;
451
- font-family: "微软雅黑";
452
- }
453
-
454
- .showData .left {
455
- height: 180px;
456
- width: 210px;
457
- background-color: rgb(240, 240, 240);
458
- overflow: hidden;
459
- line-height: 180px;
460
- }
461
-
462
- .showData .left img {
463
- width: 100%;
464
- height: auto;
465
- }
466
-
467
- .showData .right {
468
- position: absolute;
469
- top: 0px;
470
- left: 220px;
471
- right: 0px;
472
- height: 180px;
473
- }
474
-
475
- .showData .right .top {
476
- height: 30px;
477
- line-height: 30px;
478
- color: rgb(98, 98, 98);
479
- }
480
-
481
- .showData .right .top .topleft {
482
- float: left;
483
- font-size: 16px;
484
- margin-right: 20px;
485
- }
486
-
487
- .showData .right .top .topright {
488
- float: right;
489
- margin-left: 20px;
490
- }
491
-
492
- .showData .right .text {
493
- word-wrap: break-word;
494
- overflow: hidden;
495
- /*height: 100px;*/
496
- color: #999999;
497
- /*padding: 8px 0px;*/
498
- }
499
-
500
- .showData .right ul {
501
- height: 20px;
502
- padding: 0px;
503
- margin: 0px;
504
- font-size: 0px;
505
- }
506
-
507
- .showData .right ul li {
508
- display: inline-block;
509
- height: 20px;
510
- list-style: none;
511
- font-size: 16px;
512
- line-height: 20px;
513
- padding: 0px 7px;
514
- margin-right: 10px;
515
- cursor: pointer;
516
- background-color: none;
517
- font-weight: bold;
518
- color: #006fa3;
519
- }
520
-
521
- .showData .right ul li:hover {
522
- color: #006fb3;
523
- }
524
-
525
- .showData .right ul li:active {
526
- color: #006fb3;
527
- }
528
-
529
- .showData .right ul li a {
530
- width: 100%;
531
- height: 100%;
532
- text-decoration: none;
533
- color: #FFFFFF;
534
- }
535
-
536
- body {
537
- color: black;
538
- }
539
-
540
- .search {
541
- width: 75%;
542
- margin: 10px auto 30px auto;
543
- }
544
-
545
- .search .searchAll {
546
- height: 34px;
547
- font-size: 18px;
548
- color: #999999;
549
- line-height: 34px;
550
- }
551
-
552
- .search .searchAll span {
553
- display: inline-block;
554
- width: 15px;
555
- height: 15px;
556
- border: #999999 1px solid;
557
- position: relative;
558
- top: 2px;
559
- }
560
-
561
- .search .searchAll .spanAll {
562
- background-color: rgb(90, 180, 90);
563
- }
564
-
565
- .search .itemList {
566
- font-size: 16px;
567
- color: #999999;
568
- line-height: 34px;
569
- }
570
-
571
- .search .itemList .item {
572
- height: 34px;
573
- position: relative;
574
- }
575
-
576
- .search .itemList .item .descript {
577
- display: inline-block;
578
- width: 80px;
579
- }
580
-
581
- .search .itemList .item .inputBox {
582
- height: 30px;
583
- position: absolute;
584
- top: 0px;
585
- left: 80px;
586
- right: 20px;
587
- }
588
-
589
- .search .itemList .item .inputBox input {
590
- width: 100%;
591
- height: 100%;
592
- outline: none;
593
- padding: 0px 5px;
594
- }
595
-
596
- .search .itemList .item .inputBox input::-webkit-input-placeholder {
597
- color: #999999;
598
- }
599
-
600
- .searchItem {
601
- height: 30px;
602
- position: absolute;
603
- top: 0px;
604
- left: 80px;
605
- right: 20px;
606
- }
607
-
608
- .searchItem .show {
609
- padding-left: 10px;
610
- }
611
-
612
- .searchItem ul {
613
- position: relative;
614
- list-style: none;
615
- background-color: none;
616
- font-weight: bold;
617
- color: #006fa3;
618
-
619
- z-index: 99;
620
- visibility: hidden;
621
- }
622
-
623
- .searchItem ul li {
624
- padding-left: 10px;
625
- }
626
-
627
- .searchItem:hover ul {
628
- visibility: visible;
629
- }
630
-
631
- .searchItem ul li:hover {
632
- color: #006fb1;
633
- }
634
-
635
- .clears {
636
- overflow: hidden;
637
- text-overflow: ellipsis;
638
- white-space: nowrap;
639
- }
640
-
641
- #fileupload {
642
- .resBtn {
643
- display: flex;
644
- align-items: center;
645
- justify-content: center;
646
- margin-top: 2%;
647
-
648
- button {
649
- white-space: nowrap;
650
- margin-right: 10px;
651
- }
652
- }
653
- }
654
- </style>
1
+ <template>
2
+ <div style="background-color: #FFFFFF;" id="fileupload">
3
+ <div class="row" style="background-color: #FFFFFF;height: auto;border-radius: 8px">
4
+ <div style="width:75%;margin: 30px auto 10px auto;padding-bottom: 10px">
5
+ <div class="inpGroup col-sm-7">
6
+ <div class="col-sm-10 form-input-group">
7
+ <label class="font_normal_body col-sm-6" style="text-align: center">文件说明</label>
8
+ <input v-model="headers.fremarks" class="input_search" placeholder="文件说明"
9
+ style="vertical-align:middle;width: 60%"/>
10
+ </div>
11
+ <div class="col-sm-10 form-input-group" style="margin-top:10px;" title="参数管理:附件使用类型">
12
+ <label class="font_normal_body col-sm-6" style="text-align: center">使用类型</label>
13
+ <v-select type="button" placeholder="使用类型" :options="foptions"
14
+ close-on-select
15
+ direction="up"
16
+ :value.sync="fusetype" v-model="fusetype" style="vertical-align:middle;width: 60%">
17
+ </v-select>
18
+ </div>
19
+ </div>
20
+ <div class="col-sm-5 resBtn">
21
+ <button class="button_search btn-gn" @click="upload()" v-show="!takeimg">拍照</button>
22
+ <button class="button_search btn-gn" @click="fileUpload()" v-show="!isupload">审核资料上传</button>
23
+ </div>
24
+ </div>
25
+ <div class="showList col-sm-12"
26
+ style="padding: 10px;margin-top: 20px;">
27
+ <hr style="width: 90%;border: #ccc 1px solid;margin:0 auto"/>
28
+ <div :class="cols ? cols : 'col-sm-6'" style="padding:10px 10px 0px 10px;height: auto;box-sizing: border-box"
29
+ v-for="row in fileInfoData">
30
+ <div class="showData">
31
+ <div class="left">
32
+ <a href="#" class="thumbnail" style="width:100%;height:100%">
33
+ <img
34
+ v-if="(row.f_filetype.toLowerCase()==='jpg'||row.f_filetype.toLowerCase()==='png'||row.f_filetype.toLowerCase()==='gif'||row.f_filetype.toLowerCase()==='bmp')&&!rotating"
35
+ :src="row.f_downloadURL" alt="..."/>
36
+ <img-self
37
+ v-if="(row.f_filetype.toLowerCase()==='jpg'||row.f_filetype.toLowerCase()==='png'||row.f_filetype.toLowerCase()==='gif'||row.f_filetype.toLowerCase()==='bmp')&&rotating"
38
+ :width="width?width:60" :height="height?height:60" :src="row.f_downloadURL" alt="..."></img-self>
39
+ <img v-if="row.f_filetype.toLowerCase()==='pdf'" src="../../../static/mainicon/pdf.jpg" alt="" style="width:66%"/>
40
+ <img-self v-if="row.f_filetype.toLowerCase()==='pdf'&&rotating" :width="width?width:60"
41
+ :height="height?height:60" src="../../../static/mainicon/pdf.jpg" alt="..."></img-self>
42
+ <img v-if="row.f_filetype.toLowerCase().match('/wav|mp3|amr/')" src="../../../static/mainicon/sound.png" alt=""
43
+ style="width:66%"/>
44
+ <img v-if="row.f_filetype.toLowerCase()==='xls'||row.f_filetype.toLowerCase()==='xlsx'"
45
+ src="../../../static/mainicon/excel.jpg" alt="" style="width:66%"/>
46
+ <img-self v-if="row.f_filetype.toLowerCase()==='xls'||row.f_filetype.toLowerCase()==='xlsx'&&rotating"
47
+ :width="width?width:60" :height="height?height:60" src="../../../static/mainicon/excel.jpg"
48
+ alt="..."></img-self>
49
+ <img v-if="row.f_filetype.toLowerCase()==='doc'||row.f_filetype.toLowerCase()==='docx'"
50
+ src="../../../static/mainicon/doc.jpg" alt="" style="width:66%"/>
51
+ <img-self v-if="row.f_filetype.toLowerCase()==='doc'||row.f_filetype.toLowerCase()==='docx'&&rotating"
52
+ :width="width?width:60" :height="height?height:60" src="../../../static/mainicon/doc.jpg" alt="..."></img-self>
53
+ </a>
54
+ </div>
55
+ <div class="right">
56
+ <p :title="row.f_uploaddate" class="top clears">
57
+ <strong>上传时间</strong>:&nbsp;<span>{{ row.f_uploaddate }}</span></p>
58
+ <p :title="row.f_username" class="top clears">
59
+ <strong>操作员</strong>:&nbsp;<span>{{ row.f_username }}</span></p>
60
+ <p :title="row.f_filename" class="top clears"><strong>文件名</strong>:&nbsp;{{ row.f_filename }}</p>
61
+ <p :title="row.fremarks" class="top clears"><strong>文件说明</strong>:&nbsp;{{ row.fremarks }}</p>
62
+ <p>
63
+ <a
64
+ v-if="row.f_filetype.toLowerCase()==='jpg'||row.f_filetype.toLowerCase()==='png'||row.f_filetype.toLowerCase()==='gif'||row.f_filetype.toLowerCase()==='bmp'"
65
+ :href="row.f_downloadURL" style="background:#6aa6e2" class="btn btn-primary" target="_blank"
66
+ role="button">预览</a>
67
+ <button class="button_search btn-gn"
68
+ v-if="row.f_filetype.toLowerCase().match('/wav|mp3|amr/')||row.f_filetype.toLowerCase()==='pdf'||row.f_filetype.toLowerCase()==='xls'||row.f_filetype.toLowerCase()==='xlsx'||row.f_filetype.toLowerCase()==='doc'||row.f_filetype.toLowerCase()==='docx'"
69
+ @click="downloadfile(row.f_downloadURL)">下载
70
+ </button>
71
+ <a v-if="isDelete == '1'" @click="delet($index,row)" href="#" class="btn btn-default"
72
+ role="button">删除</a>
73
+ </p>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ <modal :show.sync="showUpload" styles="border-radius:20px;margin-top:300px" v-ref:modal backdrop="false"
80
+ :width="700">
81
+ <header slot="modal-header" class="modal-header">
82
+ <button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
83
+ <h4 class="modal-title" style="text-align: center">文件上传</h4>
84
+ </header>
85
+ <article slot="modal-body" class="modal-body" style="height: 70px">
86
+ <div class="form-group">
87
+ <file-upload style="margin-left:100px;padding-top:20px" class="my-file-uploader" :name="'myFile' + blodid"
88
+ action="api/af-revenue/file/uploadFile" tagname="文件上传" :headers="headers" multiple
89
+ v-ref:file></file-upload>
90
+ </div>
91
+ </article>
92
+ <footer slot="modal-footer" class="modal-footer">
93
+ </footer>
94
+ </modal>
95
+ </div>
96
+
97
+ <high-meter :show.sync="showhighmeter" @photo-finish="newPhoto" v-if="showhighmeter"
98
+ v-on:confirminfo="confirmIdCard"></high-meter>
99
+ </template>
100
+ <script>
101
+ import { HttpResetClass } from 'vue-client'
102
+ import Vue from 'vue'
103
+ export default {
104
+ title: '附件',
105
+ props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'fusetype', 'cols', 'width', 'height'],
106
+ data () {
107
+ return {
108
+ isDelete: '0', // 删除按钮,可以进行控制(权限等)
109
+ fileInfoData: [], // 数据库存储的文件记录对象数组
110
+ headers: {
111
+ 'username': this.$login.f.name,
112
+ 'blodid': '',
113
+ 'businessid': '',
114
+ 'fremarks': '',
115
+ 'defname': '',
116
+ 'fusetype': this.fusetype ? this.fusetype : ''
117
+ }, // 调用api/af-revenue/file/uploadFile 的参数
118
+ showUpload: false, // 上传模态框控制
119
+ showhighmeter: false, // 高拍仪组件控制
120
+ fileRemark: '', // 文件说明
121
+ rotating: this.$appdata.getSingleValue('图片附加功能') // 文件是否旋转
122
+ }
123
+ },
124
+ methods: {
125
+ confirmIdCard (IdCardInfo) {
126
+ this.showhighmeter = !this.showhighmeter
127
+ },
128
+ // 查询按钮事件
129
+ delet (index, row) {
130
+ this.$resetdelete('api/af-revenue/entity/t_files', {id: row.id}, {
131
+ resolveMsg: '删除成功',
132
+ rejectMsg: '删除失败'
133
+ }).then((res) => {
134
+ this.$dispatch('delResid', row.id)
135
+ this.fileInfoData.splice(index, 1)
136
+ })
137
+ },
138
+ downloadfile (filepath) {
139
+ var link = document.createElement('a')
140
+ // let pathName = "http://" + location.host + filepath;
141
+ link.href = filepath
142
+ link.target = '_blank'
143
+ link.dispatchEvent(new MouseEvent('click'))
144
+ },
145
+ GetRequest () {
146
+ var url = location.search
147
+ var theRequest = new Object()
148
+ if (url.indexOf('?') != -1) {
149
+ var str = url.substr(1)
150
+ let strs = str.split('&')
151
+ for (var i = 0; i < strs.length; i++) {
152
+ theRequest[strs[i].split('=')[0]] = decodeURIComponent(strs[i].split('=')[1])
153
+ }
154
+ }
155
+ return theRequest
156
+ },
157
+ upload () {
158
+ if (this.showhighmeter) {
159
+ console.log(this, '测试')
160
+ this.$refs.ltgao.closeVideo()
161
+ }
162
+ console.log('测试1')
163
+ this.showhighmeter = !this.showhighmeter
164
+ },
165
+ async load (self) {
166
+ let condition = ''
167
+ if (this.businessid) {
168
+ condition = `f_businessid= '${self.headers.businessid}' `
169
+ } else {
170
+ condition = `f_blobid= '${self.headers.blodid}' `
171
+ }
172
+ if (this.fusetype) {
173
+ condition += ` and fusetype like '%${this.fusetype}%'`
174
+ }
175
+ var http = new HttpResetClass()
176
+ let data = {
177
+ condition: condition
178
+ }
179
+ let getFile = []
180
+ try {
181
+ getFile = await http.load('POST', 'api/af-revenue/sql/getFiles', {data: data}, {
182
+ warnMsg: null,
183
+ resolveMsg: null
184
+ })
185
+ } catch (e) {
186
+ console.log(e)
187
+ }
188
+ for (var i = 0; i < getFile.data.length; i++) {
189
+ // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
190
+ if (getFile.data[i].fusetype && (getFile.data[i].fusetype.includes('execl导入'))) {
191
+ getFile.data.splice(i, 1)
192
+ i--
193
+ continue
194
+ }
195
+ let temp = getFile.data[i].f_downloadpath
196
+ let URL = ''
197
+ if (temp.lastIndexOf(':\\') > -1) {
198
+ URL = temp.substring(temp.lastIndexOf(':\\') + 2)
199
+ } else {
200
+ URL = temp.substring(temp.lastIndexOf('://') + 2)
201
+ }
202
+
203
+ var xy = this.$appdata.getSingleValue('协议') ? this.$appdata.getSingleValue('协议') : 'http://'
204
+ getFile.data[i].f_downloadURL = xy + location.host + '/' + URL
205
+ }
206
+ self.fileInfoData = []
207
+ self.fileInfoData = getFile.data
208
+ },
209
+ // 数据库时间格式化
210
+ formatdate (val) {
211
+ // 20180914151603 : 2018-09-14 15:16:03
212
+ if (val.length != 14) { return }
213
+ let year = val.substr(0, 4)
214
+ let month = val.substr(4, 2)
215
+ let day = val.substr(6, 2)
216
+ let hour = val.substr(8, 2)
217
+ let min = val.substr(10, 2)
218
+ let second = val.substr(12, 2)
219
+ return year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + second
220
+ },
221
+ // 打开文件上传对话框
222
+ fileUpload () {
223
+ this.showUpload = true
224
+ },
225
+ // 关闭文件上传对话框
226
+ close () {
227
+ this.showUpload = false
228
+ // 将选的文件清空
229
+ this.$refs.file.$el.querySelector('input').value = ''
230
+ this.load(this)
231
+ },
232
+ convertBase64ToBlob (base64String) {
233
+ // 将base64解码
234
+ var bytes = atob(base64String)
235
+ // var bytes = base64;
236
+ var bytesCode = new ArrayBuffer(bytes.length)
237
+ // 转换为类型化数组
238
+ var byteArray = new Uint8Array(bytesCode)
239
+
240
+ // 将base64转换为ascii码
241
+ for (var i = 0; i < bytes.length; i++) {
242
+ byteArray[i] = bytes.charCodeAt(i)
243
+ }
244
+ // 生成Blob对象(文件对象)
245
+ return new Blob([bytesCode], {type: 'image/jpeg'})
246
+ },
247
+ newPhoto (data) {
248
+ console.log(data.img)
249
+ data.name = 'GaoPaiYi'
250
+ let form = new FormData()
251
+ let xhr = new XMLHttpRequest()
252
+ let formDataBoundary = '----WebkitFormBoundary' + 'GaoPaiYi'
253
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
254
+ form.append('file', this.convertBase64ToBlob(data.img), `${data.name}.png`)
255
+
256
+ xhr.open('POST', 'api/af-revenue/file/uploadFile')
257
+ if (this.headers) {
258
+ this.headers.blodid = this.blodid
259
+ for (var header in this.headers) {
260
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
261
+ }
262
+ }
263
+ if (Vue.$login && Vue.$login.jwt) {
264
+ xhr.setRequestHeader('Authorization', 'Bearer ' + Vue.$login.jwtNew)
265
+ xhr.setRequestHeader('Token', Vue.$login.jwt)
266
+ }
267
+ xhr.send(form)
268
+ setTimeout(() => {
269
+ this.load(this)
270
+ }, 5000)
271
+ }
272
+ },
273
+ ready () {
274
+ if (this.$login.r.find(value => value == '上传附件删除')) {
275
+ // 有删除权限
276
+ this.isDelete = '1'
277
+ }
278
+ this.headers.blodid = this.blodid
279
+ this.headers.businessid = this.businessid
280
+ console.log('123222', this.businessid)
281
+ if (this.blodid || this.businessid) {
282
+ this.load(this)
283
+ }
284
+ },
285
+ watch: {
286
+ 'blodid' (val) {
287
+ if (val) {
288
+ console.log('观察blodid', val)
289
+ this.headers.blodid = this.blodid
290
+ this.load(this)
291
+ }
292
+ },
293
+ 'businessid' (val) {
294
+ console.log('观察businessid')
295
+ if (val) {
296
+ console.log('观察businessid', val)
297
+ this.headers.businessid = this.businessid
298
+ this.load(this)
299
+ }
300
+ },
301
+ 'defname' () {
302
+ this.headers.defname = this.defname
303
+ }
304
+ },
305
+ computed: {
306
+ foptions () {
307
+ let default_type = ['档案信息', '发卡售气', '卡表收费', '物联网表收费',
308
+ '机表收费', '表具停用', '换表&清零', '其他补气', '补气购气',
309
+ '预存收费', '调价补差', '黑名单', '补卡', '限购', '销户', '过户', '签约信息']
310
+ return !this.$appdata.getParam('附件使用类型') || !this.$appdata.getParam('附件使用类型').length
311
+ ? default_type.map((item) => {
312
+ return {label: item, value: item}
313
+ }) : this.$appdata.getParam('附件使用类型')
314
+ }
315
+ },
316
+ events: {
317
+ onFileUpload: function (file, res) {
318
+ console.log('上传完毕', res)
319
+ this.$dispatch('resid', res.id)
320
+ this.headers.fremarks = ''
321
+ this.close()
322
+ }
323
+ }
324
+ }
325
+ </script>
326
+ <style scoped>
327
+
328
+ * {
329
+ padding: 0px;
330
+ margin: 0px;
331
+ }
332
+
333
+ .inpGroup {
334
+ font-family: "微软雅黑";
335
+ }
336
+
337
+ .navWin {
338
+ position: relative;
339
+ }
340
+
341
+ .navWin .navShow {
342
+ margin-top: 5px;
343
+ height: 34px;
344
+ font-size: 20px;
345
+ line-height: 34px;
346
+ color: rgb(180, 180, 180);
347
+ }
348
+
349
+ .navWin .navShow span {
350
+ display: inline-block;
351
+ height: 34px;
352
+ }
353
+
354
+ .navWin .navShow .icon {
355
+ height: 34px;
356
+ margin-right: 10px;
357
+ color: rgb(200, 200, 200);
358
+ }
359
+
360
+ .navWin .navList {
361
+ position: absolute;
362
+ width: 100%;
363
+ z-index: 99;
364
+ list-style: none;
365
+ background-color: rgba(241, 241, 241, 0.9);
366
+ line-height: 34px;
367
+ color: #8d8d8d;
368
+ visibility: hidden;
369
+ }
370
+
371
+ .navWin:hover .navList {
372
+ visibility: visible;
373
+ }
374
+
375
+ .navWin .navList li {
376
+ font-size: 18px;
377
+ padding-left: 30px;
378
+ }
379
+
380
+ .navWin .navList li:hover {
381
+ background-color: rgba(220, 220, 220, 0.9);
382
+ }
383
+
384
+ .inp {
385
+ box-sizing: border-box;
386
+ width: 79%;
387
+ padding: 0px 10px;
388
+ height: 34px;
389
+ font-size: 14px;
390
+ line-height: 36px;
391
+ color: #999999;
392
+ border: solid 1px #c1c1c1;
393
+ border-radius: 2px;
394
+ background: none;
395
+ outline: none;
396
+ }
397
+
398
+ .inp::-webkit-input-placeholder {
399
+ color: #999999;
400
+ }
401
+
402
+ .inp_button {
403
+ float: right;
404
+ margin-left: 10px;
405
+ /* position: absolute;
406
+ right: 35px;
407
+ height: 40px;*/
408
+ width: 100px;
409
+ font-size: 14px;
410
+ line-height: 34px;
411
+ color: #ffffff;
412
+ text-align: center;
413
+ background-color: rgb(90, 180, 90);
414
+ border-radius: 4px;
415
+ cursor: pointer;
416
+ }
417
+
418
+ .btn-group {
419
+ height: 34px;
420
+ }
421
+
422
+ .inp_button2 {
423
+ float: right;
424
+ margin-left: 10px;
425
+ /* position: absolute;
426
+ right: 35px;
427
+ height: 40px;*/
428
+ width: auto;
429
+ font-size: 16px;
430
+ line-height: 34px;
431
+ color: #ffffff;
432
+ text-align: center;
433
+ border-radius: 4px;
434
+ cursor: pointer;
435
+ }
436
+
437
+ .inp_button:hover {
438
+ /*background-color: rgb(80, 150, 80);*/
439
+ }
440
+
441
+ .inp_button:active {
442
+ font-size: 20px;
443
+ /*background-color: rgb(150, 200, 150);*/
444
+ }
445
+
446
+ .showData {
447
+ height: auto;
448
+ position: relative;
449
+ padding-bottom: 7px;
450
+ border-bottom: solid 1px #c1c1c1;
451
+ font-family: "微软雅黑";
452
+ }
453
+
454
+ .showData .left {
455
+ height: 180px;
456
+ width: 210px;
457
+ background-color: rgb(240, 240, 240);
458
+ overflow: hidden;
459
+ line-height: 180px;
460
+ }
461
+
462
+ .showData .left img {
463
+ width: 100%;
464
+ height: auto;
465
+ }
466
+
467
+ .showData .right {
468
+ position: absolute;
469
+ top: 0px;
470
+ left: 220px;
471
+ right: 0px;
472
+ height: 180px;
473
+ }
474
+
475
+ .showData .right .top {
476
+ height: 30px;
477
+ line-height: 30px;
478
+ color: rgb(98, 98, 98);
479
+ }
480
+
481
+ .showData .right .top .topleft {
482
+ float: left;
483
+ font-size: 16px;
484
+ margin-right: 20px;
485
+ }
486
+
487
+ .showData .right .top .topright {
488
+ float: right;
489
+ margin-left: 20px;
490
+ }
491
+
492
+ .showData .right .text {
493
+ word-wrap: break-word;
494
+ overflow: hidden;
495
+ /*height: 100px;*/
496
+ color: #999999;
497
+ /*padding: 8px 0px;*/
498
+ }
499
+
500
+ .showData .right ul {
501
+ height: 20px;
502
+ padding: 0px;
503
+ margin: 0px;
504
+ font-size: 0px;
505
+ }
506
+
507
+ .showData .right ul li {
508
+ display: inline-block;
509
+ height: 20px;
510
+ list-style: none;
511
+ font-size: 16px;
512
+ line-height: 20px;
513
+ padding: 0px 7px;
514
+ margin-right: 10px;
515
+ cursor: pointer;
516
+ background-color: none;
517
+ font-weight: bold;
518
+ color: #006fa3;
519
+ }
520
+
521
+ .showData .right ul li:hover {
522
+ color: #006fb3;
523
+ }
524
+
525
+ .showData .right ul li:active {
526
+ color: #006fb3;
527
+ }
528
+
529
+ .showData .right ul li a {
530
+ width: 100%;
531
+ height: 100%;
532
+ text-decoration: none;
533
+ color: #FFFFFF;
534
+ }
535
+
536
+ body {
537
+ color: black;
538
+ }
539
+
540
+ .search {
541
+ width: 75%;
542
+ margin: 10px auto 30px auto;
543
+ }
544
+
545
+ .search .searchAll {
546
+ height: 34px;
547
+ font-size: 18px;
548
+ color: #999999;
549
+ line-height: 34px;
550
+ }
551
+
552
+ .search .searchAll span {
553
+ display: inline-block;
554
+ width: 15px;
555
+ height: 15px;
556
+ border: #999999 1px solid;
557
+ position: relative;
558
+ top: 2px;
559
+ }
560
+
561
+ .search .searchAll .spanAll {
562
+ background-color: rgb(90, 180, 90);
563
+ }
564
+
565
+ .search .itemList {
566
+ font-size: 16px;
567
+ color: #999999;
568
+ line-height: 34px;
569
+ }
570
+
571
+ .search .itemList .item {
572
+ height: 34px;
573
+ position: relative;
574
+ }
575
+
576
+ .search .itemList .item .descript {
577
+ display: inline-block;
578
+ width: 80px;
579
+ }
580
+
581
+ .search .itemList .item .inputBox {
582
+ height: 30px;
583
+ position: absolute;
584
+ top: 0px;
585
+ left: 80px;
586
+ right: 20px;
587
+ }
588
+
589
+ .search .itemList .item .inputBox input {
590
+ width: 100%;
591
+ height: 100%;
592
+ outline: none;
593
+ padding: 0px 5px;
594
+ }
595
+
596
+ .search .itemList .item .inputBox input::-webkit-input-placeholder {
597
+ color: #999999;
598
+ }
599
+
600
+ .searchItem {
601
+ height: 30px;
602
+ position: absolute;
603
+ top: 0px;
604
+ left: 80px;
605
+ right: 20px;
606
+ }
607
+
608
+ .searchItem .show {
609
+ padding-left: 10px;
610
+ }
611
+
612
+ .searchItem ul {
613
+ position: relative;
614
+ list-style: none;
615
+ background-color: none;
616
+ font-weight: bold;
617
+ color: #006fa3;
618
+
619
+ z-index: 99;
620
+ visibility: hidden;
621
+ }
622
+
623
+ .searchItem ul li {
624
+ padding-left: 10px;
625
+ }
626
+
627
+ .searchItem:hover ul {
628
+ visibility: visible;
629
+ }
630
+
631
+ .searchItem ul li:hover {
632
+ color: #006fb1;
633
+ }
634
+
635
+ .clears {
636
+ overflow: hidden;
637
+ text-overflow: ellipsis;
638
+ white-space: nowrap;
639
+ }
640
+
641
+ #fileupload {
642
+ .resBtn {
643
+ display: flex;
644
+ align-items: center;
645
+ justify-content: center;
646
+ margin-top: 2%;
647
+
648
+ button {
649
+ white-space: nowrap;
650
+ margin-right: 10px;
651
+ }
652
+ }
653
+ }
654
+ </style>