credit_upload.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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="/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"
  13. mode="aspectFill">
  14. </image>
  15. <image class="wh-30 delete_iocn" src="/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. // 完成
  56. onSubmit() {
  57. uni.$emit("putCreditData", this.formData);
  58. setTimeout(()=>{
  59. tools.leftClick()
  60. },50)
  61. },
  62. delImg(index){
  63. this.formData.credit_img.splice(index,1)
  64. },
  65. onUpload() {
  66. uni.setStorageSync('creditImg', this.formData.credit_img)
  67. uni.navigateTo({
  68. url: `/page_task/credit_upload/camera`
  69. })
  70. },
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .container {
  76. display: flex;
  77. justify-content: space-between;
  78. flex-wrap: wrap;
  79. gap: 10px;
  80. .item-box {
  81. flex: 0 0 calc(50% - 5px);
  82. box-sizing: border-box;
  83. border: 1rpx dashed #999999;
  84. height: 240rpx;
  85. border-radius: 10rpx;
  86. text-align: center;
  87. background: #F7F9FE;
  88. position: relative;
  89. .delete_iocn {
  90. position: absolute;
  91. right: -12rpx;
  92. top: -12rpx;
  93. }
  94. }
  95. }
  96. </style>