payCenter.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. <template>
  2. <div class="mobile-pay-center vendor-pay mobile-fix-content mobile-centerfix-content" :class="{'vendor-pay-record': switchType === 'record' && recordList.length}" id="mobileFixContent">
  3. <div class="mp-head">
  4. <span class="inline-block" :class="{'active': switchType === 'record'}" @click="setSwitchType('record')">交易记录</span>
  5. <span class="inline-block" :class="{'active': switchType === 'account'}" @click="setSwitchType('account')">收款账户</span>
  6. </div>
  7. <!-- 账户信息start -->
  8. <div class="mp-content" v-if="switchType == 'account'">
  9. <!--<p class="mp-content-header">已设置的账户信息<span class="fr" @click="openAddAccount"><i class="iconfont icon-xinzeng"></i>新增账户</span></p>-->
  10. <ul class="mp-list">
  11. <li v-for="account in accountList">
  12. <div class="content-line">
  13. <span class="inline-block title">开户银行:</span>
  14. <span class="inline-block content text-ellipse">{{account.bankname}}</span>
  15. </div>
  16. <div class="content-line">
  17. <span class="inline-block title">开户支行:</span>
  18. <span class="inline-block content text-ellipse">{{account.branchname}}</span>
  19. </div>
  20. <div class="content-line">
  21. <span class="inline-block title">银行账户:</span>
  22. <span class="inline-block content text-ellipse">{{account.number}}</span>
  23. </div>
  24. <div class="content-line">
  25. <span class="inline-block title">开户名称:</span>
  26. <span class="inline-block content text-ellipse">{{account.accountname}}</span>
  27. </div>
  28. <div class="content-line">
  29. <span class="inline-block title">状态:</span>
  30. <span class="inline-block content text-ellipse">
  31. {{account.status | bankStatusFilter}}
  32. <i v-if="account.status == 101" class="iconfont icon-tixing"></i>
  33. </span>
  34. </div>
  35. <div class="btn-wrap clearfix">
  36. <a class="inline-block" @click="reuseAccount(account)"><i class="iconfont icon-gouxuan1"></i>重新使用</a><!-- v-if="account.status == 105"-->
  37. <a class="inline-block" @click="deleteAccount(account)"><i class="iconfont icon-lajitong"></i>删除</a>
  38. </div>
  39. </li>
  40. </ul>
  41. <div class="com-btn-wrap mp-btn-wrap">
  42. <button @click.stop="openAddAccount"><i class="iconfont icon-add"></i>新增账户</button>
  43. </div>
  44. </div>
  45. <!-- 账户信息end -->
  46. <!-- 交易记录start -->
  47. <div class="mp-record" v-if="switchType == 'record'">
  48. <div class="search-content">
  49. <input type="text" placeholder="买家名称/订单号" v-model="filterParams.keyword" @keyup.13="filterRecord">
  50. <span @click="filterRecord"><i class="iconfont icon-sousuo"></i></span>
  51. </div>
  52. <div class="filters-wrap">
  53. <base-filter
  54. v-for="filterOption in filterOptions"
  55. :key="filterOption.selectOption"
  56. :selectItems="filterOption.selectItems"
  57. :defaultVal="filterOption.defaultVal"
  58. :selectOption="filterOption.selectOption"
  59. @selectAction="onSelectAction"
  60. :title="filterOption.title"></base-filter>
  61. </div>
  62. <ul class="mp-list record-list mp-list-record" v-if="recordList.length">
  63. <li v-for="record in recordList">
  64. <div class="content-line">
  65. <span class="inline-block title">订单号:</span>
  66. <nuxt-link :to="`/mobile/order/details?uuid=${baseUtils.enidfilter(record.puid)}&type=saler`" class="inline-block content text-ellipse link">{{record.orderid}}</nuxt-link>
  67. </div>
  68. <div class="content-line">
  69. <span class="inline-block title">金额:</span>
  70. <span class="inline-block content text-ellipse">{{record.currencyName | currencyFilter}}{{record.total}}</span>
  71. </div>
  72. <div class="content-line">
  73. <span class="inline-block title">买家:</span>
  74. <span class="inline-block content text-ellipse">{{record.buyerentername || record.buyername}}</span>
  75. </div>
  76. <div class="content-line">
  77. <span class="inline-block title">交易方式:</span>
  78. <span class="inline-block content text-ellipse">{{record.type | payTypeFilter}}</span>
  79. </div>
  80. <div class="content-line">
  81. <span class="inline-block title">时间:</span>
  82. <span class="inline-block content text-ellipse">{{record.transferTime | time}}</span>
  83. </div>
  84. <div class="content-line">
  85. <span class="inline-block title">状态:</span>
  86. <span class="inline-block content text-ellipse">收款成功</span>
  87. </div>
  88. </li>
  89. </ul>
  90. <div class="fix-count-wrap" v-if="recordList.length">
  91. <span class="content">已收总计:<span>{{currencySymbol | currencyFilter}}&nbsp;{{totalRecordPrice}}</span></span>
  92. <!--<span class="content">支出总计:<span>{{currencySymbol | currencyFilter}}&nbsp;0</span></span>
  93. <p>结余:{{currencySymbol | currencyFilter}}&nbsp;{{totalRecordPrice}} (共计{{recordList.length || 0}}笔交易)</p>-->
  94. </div>
  95. </div>
  96. <!-- 交易记录end -->
  97. <!-- 新增账户弹框start -->
  98. <modal-wrapper :noHeader="true" :showModal="showModal" @closeAction="showModal = false">
  99. <div class="add-account-modal in-wrapper">
  100. <div class="account-modal">
  101. <p class="title">新增账户</p>
  102. <div class="modal-content-line">
  103. <span class="inline-block"><i>*</i>开户银行:</span>
  104. <input type="text" readonly placeholder="例如:中国银行" v-model="bankAccountObj.bankname" @click.stop="showSimilar = !showSimilar">
  105. <ul v-if="showSimilar" class="similar">
  106. <li class="text-ellipse" v-for="bank in bankList" @click.stop="setBankName(bank)">{{bank}}</li>
  107. </ul>
  108. </div>
  109. <div class="modal-content-line">
  110. <span class="inline-block"><i>*</i>开户支行:</span>
  111. <input type="text" placeholder="例如:乔香支行" v-model="bankAccountObj.branchname" @blur="checkBranchname">
  112. </div>
  113. <div class="modal-content-line">
  114. <span class="inline-block"><i>*</i>银行账号:</span>
  115. <input type="text" placeholder="请填写银行账号" v-model="bankAccountObj.number" @blur="checkNumber">
  116. </div>
  117. <div class="modal-content-line">
  118. <span class="inline-block"><i>*</i>开户名称:</span>
  119. <input type="text" placeholder="请填写开户人姓名或企业名称" v-model="bankAccountObj.accountname" @blur="checkAccountname">
  120. </div>
  121. <div class="modal-content-line upload">
  122. <span class="inline-block"><i>*</i>上传开户许可证:</span>
  123. <input type="text" v-model="file.name" disabled>
  124. <label class="upload-btn">选择文件
  125. <input type="file" @change="onUpload($event)" accept="image/jpeg,image/jpg,image/png,.pdf">
  126. </label>
  127. </div>
  128. <div class="am-btn-wrap">
  129. <button @click="showModal = false">取消</button>
  130. <button @click="addAccount">确认</button>
  131. </div>
  132. <p class="am-remind-text clearfix">
  133. <i class="fl">*声明:</i>
  134. <span class="fr">
  135. 1. 此账户为卖家收款账户,请仔细核对信息内容,若由信息错误造成的损失,优软商城不承担赔偿责任。
  136. <br/>
  137. 2. 卖家只能有唯一一个“使用中”的收款账户,新增账户审核通过后,原账户将自动失效。
  138. <br/>
  139. 3. 如您的企业名称、开户银行及账号变更,您须在优软商城开展资金结算前进行更正,否则发生转账错误优软商城不承担赔偿责任。
  140. <br/>
  141. 4. 更多的条款请阅读《优软商城代收代付协议》 。
  142. <br/>
  143. 5. 附件仅支持JPG、PNG、PDF格式,大小超过3M。
  144. </span>
  145. </p>
  146. </div>
  147. </div>
  148. </modal-wrapper>
  149. <!-- 新增账户弹框end -->
  150. <!-- 重新使用账户提示框start -->
  151. <div class="mobile-modal reuse-account-modal" v-show="showReuseModal">
  152. <div class="ra-remind">
  153. <div class="header"><i class="iconfont icon-guanbi1" @click="showReuseModal = false"></i></div>
  154. <div class="content"><i class="fa fa-exclamation-circle"></i>
  155. <span>此操作会让使用中的收款账户失效,是否确定重新使用?</span>
  156. </div>
  157. <div class="footer">
  158. <button @click="showReuseModal = false">取消</button>
  159. <button @click="setDefaultAccount()">确认</button>
  160. </div>
  161. </div>
  162. </div>
  163. <!-- 重新使用账户提示框end -->
  164. <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
  165. <pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
  166. <empty-status v-if="isEmpty" :text="switchType == 'record' ? '暂无交易记录' : '暂无账户信息'" :showLink="true"></empty-status>
  167. </div>
  168. </template>
  169. <script>
  170. import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
  171. import { ModalWrapper, BaseFilter } from '~components/mobile/base'
  172. export default {
  173. layout: 'mobile',
  174. middleware: 'authenticated',
  175. data () {
  176. return {
  177. remindText: '',
  178. timeoutCount: '',
  179. page: 1,
  180. count: 10,
  181. accountList: [],
  182. recordList: [],
  183. switchType: 'record',
  184. // 分页重置标志
  185. isChange: false,
  186. showModal: false,
  187. bankList: [],
  188. showSimilar: false,
  189. bankAccountObj: {
  190. bankname: '',
  191. branchname: '',
  192. number: '',
  193. accountname: ''
  194. },
  195. validBankAccountObj: {
  196. bankname: false,
  197. branchname: false,
  198. number: false,
  199. accountname: false
  200. },
  201. filterParams: {
  202. keyword: '',
  203. fromDate: '',
  204. toDate: '',
  205. remitteeType: ''
  206. },
  207. currentId: '',
  208. showReuseModal: false,
  209. totalRecordPrice: 0,
  210. file: '',
  211. dateObj: {
  212. fromDate: '',
  213. toDate: ''
  214. },
  215. filterOptions: [
  216. {
  217. title: '交易方式',
  218. selectOption: 'remitteeType',
  219. selectItems: [{key: '全部',
  220. val: null
  221. }, {
  222. key: '买家付款',
  223. val: 'PAIDTOVENDOR'
  224. }, {
  225. key: '平台代付',
  226. val: 'PAIDTOPLATFORM'
  227. }],
  228. defaultVal: null
  229. },
  230. // {
  231. // title: '交易状态',
  232. // selectOption: 'status',
  233. // selectItems: [{key: '全部',
  234. // val: 0
  235. // }, {
  236. // key: '已收款',
  237. // val: 1
  238. // }, {
  239. // key: '待收款',
  240. // val: 2
  241. // }],
  242. // defaultVal: 0
  243. // },
  244. {
  245. title: '交易时间',
  246. selectOption: 'date',
  247. selectItems: [{key: '全部',
  248. val: null
  249. }, {
  250. key: '一个月',
  251. val: 1
  252. }, {
  253. key: '三个月',
  254. val: 2
  255. }, {
  256. key: '六个月',
  257. val: 3
  258. }, {
  259. key: '自定义',
  260. val: 4
  261. }],
  262. defaultVal: null
  263. }
  264. ]
  265. }
  266. },
  267. components: {
  268. RemindBox,
  269. PullUp,
  270. ModalWrapper,
  271. EmptyStatus,
  272. BaseFilter
  273. },
  274. fetch ({store}) {
  275. return Promise.all([
  276. store.dispatch('payCenter/loadVendorRecord', {count: 10, page: 1, sorting: {'transferTime': 'DESC'}, type: 'sup'})
  277. ])
  278. },
  279. watch: {
  280. 'vendorAccount': {
  281. handler: function (val) {
  282. if (val && val.content) {
  283. if (this.isChange) {
  284. this.accountList = []
  285. this.isChange = false
  286. }
  287. this.accountList = [...this.accountList, ...val.content]
  288. }
  289. }
  290. },
  291. 'vendorRecord': {
  292. handler: function (val) {
  293. if (val && val.content) {
  294. if (this.isChange) {
  295. this.recordList = []
  296. this.isChange = false
  297. this.totalRecordPrice = 0
  298. }
  299. this.totalRecordPrice = this.baseUtils.priceFixed(this.totalRecordPrice + this.recordData.data.data.total)
  300. this.recordList = [...this.recordList, ...val.content]
  301. }
  302. },
  303. immediate: true
  304. }
  305. },
  306. filters: {
  307. bankStatusFilter: function (status) {
  308. let result = '未知状态'
  309. switch (status) {
  310. case 101 :
  311. result = '待审核'
  312. break
  313. case 104:
  314. result = '使用中'
  315. break
  316. case 103:
  317. result = '未通过'
  318. break
  319. case 105:
  320. result = '已失效'
  321. break
  322. case 112:
  323. result = '已删除'
  324. break
  325. }
  326. return result
  327. },
  328. payTypeFilter: function (type) {
  329. if (type === 'PAIDTOVENDOR') {
  330. return '买家付款'
  331. } else if (type === 'PAIDTOPLATFORM') {
  332. return '平台代付'
  333. } else {
  334. return '其他'
  335. }
  336. }
  337. },
  338. computed: {
  339. accountData () {
  340. return this.$store.state.payCenter.data.vendorAccount
  341. },
  342. recordData () {
  343. return this.$store.state.payCenter.data.vendorRecord
  344. },
  345. vendorAccount () {
  346. return this.accountData.data
  347. },
  348. vendorRecord () {
  349. return this.recordData.data.data.data
  350. },
  351. fetching () {
  352. return this.switchType === 'account' ? this.accountData.fetching : this.recordData.fetching
  353. },
  354. allPage () {
  355. return this.switchType === 'account' ? this.vendorAccount.totalPages : this.vendorRecord.totalPages
  356. },
  357. isEmpty () {
  358. return (this.switchType === 'record' && this.recordList.length === 0) || (this.switchType === 'account' && this.accountList.length === 0)
  359. },
  360. currencySymbol () {
  361. return this.recordList[0] ? this.recordList[0].currencyName : 'RMB'
  362. }
  363. },
  364. methods: {
  365. setRemindText: function (str) {
  366. this.remindText = str
  367. this.timeoutCount++
  368. },
  369. reloadList () {
  370. if (this.switchType === 'account') {
  371. this.$store.dispatch('payCenter/loadVendorAccount', {
  372. count: this.count,
  373. page: this.page,
  374. sorting: {num: 'ASC'},
  375. type: 'sup'
  376. })
  377. } else {
  378. this.$store.dispatch('payCenter/loadVendorRecord', {
  379. count: this.count,
  380. page: this.page,
  381. sorting: {'transferTime': 'DESC'},
  382. type: 'sup',
  383. fromDate: this.filterParams.fromDate || null,
  384. toDate: this.filterParams.toDate || null,
  385. keyword: this.filterParams.keyword || null,
  386. remitteeType: this.filterParams.remitteeType || null
  387. })
  388. }
  389. },
  390. initList () {
  391. this.isChange = true
  392. this.page = 1
  393. this.reloadList()
  394. },
  395. onPullUpAction () {
  396. this.page++
  397. this.reloadList()
  398. },
  399. setSwitchType (type) {
  400. this.switchType = type
  401. if (type === 'record') {
  402. this.initFilterParams()
  403. }
  404. this.initList()
  405. },
  406. initFilterParams () {
  407. this.filterParams = {
  408. keyword: '',
  409. fromDate: '',
  410. toDate: '',
  411. currencyName: '',
  412. method: ''
  413. }
  414. },
  415. filterRecord () {
  416. this.isChange = true
  417. this.reloadList()
  418. },
  419. onSelectAction (selectObj) {
  420. this.setSelect(selectObj.key, selectObj.value)
  421. },
  422. setSelect (type, val) {
  423. if (type === 'date') {
  424. if (val) {
  425. this.filterParams.fromDate = val.fromDate
  426. this.filterParams.toDate = val.toDate
  427. } else {
  428. this.filterParams.fromDate = null
  429. this.filterParams.toDate = null
  430. }
  431. } else {
  432. this.filterParams[type] = val
  433. }
  434. this.filterRecord()
  435. },
  436. setDate (type) {
  437. if (this.dateObj[type]) {
  438. this.filterParams[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
  439. if (this.filterParams.fromDate && this.filterParams.toDate && this.filterParams.fromDate > this.filterParams.toDate) {
  440. if (type === 'fromDate') {
  441. this.setRemindText('起始时间不能大于结束时间')
  442. } else {
  443. this.setRemindText('结束时间不能小于起始时间')
  444. }
  445. this.filterParams[type] = null
  446. this.dateObj[type] = null
  447. } else {
  448. if (this.filterParams.fromDate && this.filterParams.toDate && this.filterParams.fromDate === this.filterParams.toDate) {
  449. // 23:59:59
  450. this.filterParams.toDate += 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000
  451. }
  452. this.filterRecord()
  453. }
  454. } else {
  455. this.filterParams[type] = null
  456. this.filterRecord()
  457. }
  458. },
  459. reuseAccount (account) {
  460. if (account.status !== 105) {
  461. this.setRemindText(`该账户${this.$options.filters.bankStatusFilter(account.status)}`)
  462. } else {
  463. this.currentId = account.id
  464. this.showReuseModal = true
  465. }
  466. },
  467. setDefaultAccount () {
  468. this.$http.get(`/trade/bankInfo/setDefaultAccount/${this.currentId}`).then(() => {
  469. this.setRemindText('重新使用完成')
  470. this.initList()
  471. this.showReuseModal = false
  472. })
  473. },
  474. deleteAccount (account) {
  475. this.$http.delete(`/trade/bankInfo/delete/${account.id}`).then(res => {
  476. if (res.data === 'success') {
  477. this.setRemindText('删除成功')
  478. this.initList()
  479. }
  480. })
  481. },
  482. initAccount () {
  483. this.bankAccountObj = {
  484. bankname: '',
  485. branchname: '',
  486. number: '',
  487. accountname: ''
  488. }
  489. this.validBankAccountObj = {
  490. bankname: false,
  491. branchname: false,
  492. number: false,
  493. accountname: false
  494. }
  495. this.file = ''
  496. },
  497. openAddAccount () {
  498. if (!this.bankList || !this.bankList.length) {
  499. this.$http.get('/data/bank.json').then(res => {
  500. this.bankList = res.data.list
  501. this.initAccount()
  502. this.showModal = true
  503. })
  504. } else {
  505. this.initAccount()
  506. this.showModal = true
  507. }
  508. },
  509. setBankName (name) {
  510. this.bankAccountObj.bankname = name
  511. this.showSimilar = false
  512. this.validBankAccountObj.bankname = true
  513. },
  514. checkBranchname () {
  515. this.validBankAccountObj.branchname = true
  516. if (!(this.bankAccountObj.branchname && this.bankAccountObj.branchname.length)) {
  517. this.setRemindText('开户支行不能为空')
  518. this.validBankAccountObj.branchname = false
  519. } else if (this.baseUtils.getRealLen(this.bankAccountObj.branchname) > 40) {
  520. this.setRemindText('开户支行不能大于40字符')
  521. this.validBankAccountObj.branchname = false
  522. } else if (!/^[\u2E80-\u9FFF]+$/.test(this.bankAccountObj.branchname)) {
  523. this.setRemindText('请输入正确的开户支行')
  524. this.validBankAccountObj.branchname = false
  525. }
  526. },
  527. checkNumber () {
  528. this.validBankAccountObj.number = true
  529. if (!(this.bankAccountObj.number && this.bankAccountObj.number.length)) {
  530. this.validBankAccountObj.number = false
  531. this.setRemindText('银行账号不能为空')
  532. } else if (this.baseUtils.getRealLen(this.bankAccountObj.number) > 30) {
  533. this.setRemindText('银行账号不能大于30字符')
  534. this.validBankAccountObj.number = false
  535. } else if (!/^[0-9]+$/.test(this.bankAccountObj.number)) {
  536. this.setRemindText('请输入正确的银行账号')
  537. this.validBankAccountObj.number = false
  538. }
  539. if (this.validBankAccountObj.number) {
  540. this.$http.get('/trade/bankInfo/number/count', {params: {type: 1061, number: this.bankAccountObj.number}}).then(res => {
  541. if (res.data.success) {
  542. if (res.data.data === 0) {
  543. this.validBankAccountObj.number = true
  544. } else {
  545. this.validBankAccountObj.number = false
  546. this.setRemindText('银行账号校验失败')
  547. }
  548. } else {
  549. this.validBankAccountObj.number = false
  550. this.setRemindText(res.data.message || '银行账号校验失败')
  551. }
  552. }, err => {
  553. this.validBankAccountObj.number = false
  554. this.setRemindText(err.response.data || '银行账号校验失败')
  555. console.log(err)
  556. })
  557. }
  558. },
  559. checkAccountname () {
  560. this.validBankAccountObj.accountname = true
  561. if (!(this.bankAccountObj.accountname && this.bankAccountObj.accountname.length)) {
  562. this.validBankAccountObj.accountname = false
  563. this.setRemindText('账户名称不能为空')
  564. } else if (this.baseUtils.getRealLen(this.bankAccountObj.accountname) > 100) {
  565. this.setRemindText('账户名称不能大于100个字符')
  566. this.validBankAccountObj.accountname = false
  567. }
  568. },
  569. addAccount () {
  570. if (!this.validBankAccountObj.bankname) {
  571. this.setRemindText('请选择开户银行')
  572. } else if (!this.validBankAccountObj.branchname) {
  573. this.setRemindText('请填写正确的开户支行')
  574. } else if (!this.validBankAccountObj.number) {
  575. this.setRemindText('请填写正确的银行账号')
  576. } else if (!this.validBankAccountObj.accountname) {
  577. this.setRemindText('请填写正确的开户名称')
  578. } else if (!this.file) {
  579. this.setRemindText('请上传开户许可证')
  580. } else {
  581. let param = new FormData()
  582. param.append('file', this.file, this.file.name)
  583. param.append('bankInfo', JSON.stringify(this.bankAccountObj))
  584. let config = {
  585. headers: {'Content-Type': 'multipart/form-data'}
  586. }
  587. this.$http.post('/trade/bankInfo/save/enterprise?type=sup', param, config).then(res => {
  588. if (res.data.id) {
  589. this.setRemindText('新增账户成功')
  590. this.initList()
  591. this.showModal = false
  592. } else {
  593. this.setRemindText('新增账户失败')
  594. }
  595. }, err => {
  596. this.setRemindText(err.response.data || '新增账户失败')
  597. console.log(err)
  598. })
  599. }
  600. },
  601. onUpload (e) {
  602. let file = e.target.files[0]
  603. let arr = file.name.split('.')
  604. let type = arr[arr.length - 1]
  605. if ('pdf/png/jpg/jpeg'.indexOf(type.toLowerCase()) === -1) {
  606. this.setRemindText('仅支持jpg/jpeg/png/pdf格式的文件')
  607. } else if (file.size > 1024 * 1024 * 3) {
  608. this.setRemindText('请勿大于3M')
  609. } else {
  610. this.file = file
  611. }
  612. }
  613. }
  614. }
  615. </script>
  616. <style lang="scss">
  617. @import '~assets/scss/mobilePayCenter';
  618. .reuse-account-modal {
  619. .ra-remind {
  620. width: 6.3rem;
  621. height: 3.5rem;
  622. position: absolute;
  623. top: 50%;
  624. left: 50%;
  625. margin-top: -1.75rem;
  626. margin-left: -3.15rem;
  627. border-radius: .15rem;
  628. .header {
  629. height: .6rem;
  630. line-height: .6rem;
  631. background: #3976f4;
  632. border-top-left-radius: .15rem;
  633. border-top-right-radius: .15rem;
  634. i {
  635. font-size: .32rem;
  636. color: #fff;
  637. float: right;
  638. margin-right: .28rem;
  639. }
  640. }
  641. .content {
  642. background: #fff;
  643. padding: .53rem .77rem;
  644. span {
  645. font-size: .32rem;
  646. }
  647. i {
  648. font-size: .44rem;
  649. color: #3976f4;
  650. float: left;
  651. margin-right: .2rem;
  652. }
  653. }
  654. .footer {
  655. background: #fff;
  656. padding-bottom: .37rem;
  657. text-align: center;
  658. border-bottom-left-radius: .15rem;
  659. border-bottom-right-radius: .15rem;
  660. margin-top: -0.05rem;
  661. button {
  662. width: 2.22rem;
  663. height: .77rem;
  664. line-height: .77rem;
  665. color: #fff;
  666. font-size: .32rem;
  667. border-radius: .08rem;
  668. background: #bfbfbf;
  669. &:last-child {
  670. background: $base-color;
  671. margin-left: .3rem;
  672. }
  673. }
  674. }
  675. }
  676. }
  677. .record-list {
  678. margin-bottom: 1.26rem
  679. }
  680. .upload {
  681. input[disabled] {
  682. background: #eee;
  683. width: 2.88rem !important;
  684. }
  685. .upload-btn {
  686. display: inline-block;
  687. vertical-align: middle;
  688. width: 1.2rem;
  689. height: .56rem;
  690. line-height: .56rem;
  691. text-align: center;
  692. color: #fff;
  693. background: #fe9d03;
  694. position: relative;
  695. left: .2rem;
  696. border-radius: .04rem;
  697. font-size: .24rem;
  698. font-weight: normal;
  699. margin: 0;
  700. input {
  701. opacity: 0;
  702. width: 1.2rem;
  703. height: .56rem;
  704. position: absolute;
  705. top: 0;
  706. }
  707. }
  708. }
  709. .fix-count-wrap {
  710. position: fixed;
  711. bottom: .98rem;
  712. height: 1.25rem;
  713. text-align: right;
  714. background: #fff;
  715. border-radius: .02rem;
  716. border-top: 1px solid #bfbfbf;
  717. line-height: 1.25rem;
  718. font-size: .28rem;
  719. width: 100%;
  720. padding-right: .3rem;
  721. .content {
  722. margin-left: .39rem;
  723. &:first-child {
  724. span {
  725. color: #fd0303;
  726. }
  727. }
  728. &:nth-of-type(2) {
  729. span {
  730. color: #15b262;
  731. }
  732. }
  733. }
  734. }
  735. .mp-list .content-line .icon-tixing {
  736. font-size: .32rem;
  737. color: $base-color;
  738. margin-left: .05rem;
  739. }
  740. .am-remind-text {
  741. font-size: .26rem;
  742. color: #999;
  743. margin-top: .29rem;
  744. padding: .45rem 0;
  745. border-top: 1px solid #d2d2d2;
  746. i {
  747. color: #fd0303;
  748. width: 12%;
  749. }
  750. .fr {
  751. width: 88%;
  752. }
  753. }
  754. .vendor-pay {
  755. padding-bottom: 1rem;
  756. .mobile-modal .mobile-modal-wrapper {
  757. left: .2rem !important;
  758. right: .2rem !important;
  759. }
  760. }
  761. .vendor-pay-record {
  762. /*bottom: 2.23rem !important;*/
  763. padding-bottom: 1.25rem !important;
  764. }
  765. </style>