credit_upload.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="total-page page-box task-bg page-env-20">
  3. <Nav title="上传征信" :genre="1" is_fixed></Nav>
  4. <view class="p-lr30 p-t10 container-box">
  5. <view><text>已上传({{formData.credit_img.length}}页)</text></view>
  6. <view class=" container m-t20">
  7. <view class="column-c justify-center item-box" @click="onUpload">
  8. <image class="wh-45 m-b10" src="/page_task/static/img/information/credit.png" mode="aspectFill"></image>
  9. <text class="text-color-666 size-26">上传征信</text>
  10. </view>
  11. <view class="item-box" v-for="(item,index) in formData.credit_img">
  12. <image style="width: 100%;height: 240rpx;" :src="item" @click.stop="previewImage(index)"
  13. mode="aspectFill">
  14. </image>
  15. <image class="wh-30 delete_iocn" src="/page_task/static/img/information/blank_delete.png" @click.stop="delImg(index)" mode=""></image>
  16. </view>
  17. </view>
  18. </view>
  19. <EnButton :text="'完成'" @onSubmit="onSubmit" ></EnButton>
  20. </view>
  21. </template>
  22. <script>
  23. import tools from "@/service/tools";
  24. export default {
  25. data() {
  26. return {
  27. formData:{
  28. 'credit_img': [ ],
  29. 'deal_data': [],
  30. 'overdue_data': [],
  31. 'query_data': [],
  32. },
  33. srcList:[],
  34. isStart:false,
  35. creditKey:[]
  36. }
  37. },
  38. onLoad() {
  39. let creditData = uni.getStorageSync('creditData')
  40. let creditKey = uni.getStorageSync('clientInfoKey')
  41. this.formData = creditData
  42. this.creditKey = creditKey
  43. setTimeout(()=>{
  44. this.isStart=true
  45. },500)
  46. },
  47. onShow() {
  48. if(this.isStart){
  49. this.formData.credit_img = uni.getStorageSync('creditImg');
  50. }
  51. },
  52. mounted() {
  53. },
  54. methods: {
  55. previewImage(index){
  56. uni.previewImage({
  57. urls: this.formData.credit_img,
  58. current: index,
  59. success: () => {
  60. }
  61. })
  62. },
  63. // 完成
  64. onSubmit() {
  65. uni.$emit("putCreditData", this.formData);
  66. setTimeout(()=>{
  67. tools.leftClick()
  68. },50)
  69. },
  70. delImg(index){
  71. this.formData.credit_img.splice(index,1)
  72. },
  73. onUpload() {
  74. uni.setStorageSync('creditImg', this.formData.credit_img)
  75. uni.navigateTo({
  76. url: `/page_task/credit_upload/camera`
  77. })
  78. },
  79. }
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .container {
  84. display: flex;
  85. justify-content: space-between;
  86. flex-wrap: wrap;
  87. gap: 10px;
  88. .item-box {
  89. flex: 0 0 calc(50% - 5px);
  90. box-sizing: border-box;
  91. border: 1rpx dashed #999999;
  92. height: 240rpx;
  93. border-radius: 10rpx;
  94. text-align: center;
  95. background: #F7F9FE;
  96. position: relative;
  97. .delete_iocn {
  98. position: absolute;
  99. right: -12rpx;
  100. top: -12rpx;
  101. }
  102. }
  103. }
  104. </style>