Quellcode durchsuchen

重新上传凭证,uploader

theo vor 3 Jahren
Ursprung
Commit
0b1ce6fecb

+ 5 - 3
frontendEle/src/components/Uploader.vue

@@ -13,8 +13,10 @@
         :disabled="uploaderDisabled"
         :style="`width:${width};height:${height};`"
     >
-      <img v-if="uploaderImageUrl" :src="uploaderImageUrl" class="image-preview"
-           :style="`width:${width};height:${height};display: block;`">
+      <i v-if="uploaderImageUrl" class="el-icon-plus uploader-icon" :style="`line-height:${height};background-image: ${uploaderImageUrl}`">
+        <img :src="uploaderImageUrl" class="image-preview"
+             :style="`width:${width};height:${height};display: block;margin-top:-${height}`">
+      </i>
       <i v-else class="el-icon-plus uploader-icon"
          :style="`width:${width};height:${height};line-height:${height};`"></i>
     </el-upload>
@@ -151,4 +153,4 @@
     color: #8c939d;
     text-align: center;
   }
-</style>
+</style>

+ 7 - 3
frontendEle/src/views/finance/recharge.vue

@@ -48,7 +48,7 @@
           </el-alert>
 
           <leo-uploader :requestRoute="'finance/prove-add?id='+auditId" :defaultImageUrl="defaultImageUrl" width="160px" height="160px"
-                        :uploaderSuccessCanChange="false" @on-success="handleSuccess"></leo-uploader>
+                        :uploaderSuccessCanChange="true" @on-success="handleSuccess"></leo-uploader>
         </div>
       </el-dialog>
 
@@ -75,7 +75,7 @@ import LeoUploader from '@/components/Uploader'
 import Pagination from '@/components/Pagination'
 export default {
   name: 'recharge',
-  components: {LeoFilter, LeoUploader,Pagination},
+  components: {LeoFilter, LeoUploader, Pagination},
   mounted () {
     this.getData();
   },
@@ -134,7 +134,8 @@ export default {
       });
     },
     uploadAgain (auditId) {
-      console.log(auditId)
+      this.dialogInvoiceVisible = false
+      // console.log(auditId)
       let row = {
         ID: auditId
       }
@@ -166,6 +167,7 @@ export default {
     handleAddInvoiceShow: function (row) {
       this.dialogAddInvoiceLoading = true
       this.auditId = row.ID
+      this.defaultImageUrl = row.BANK_PROVE
       // console.log(this.auditId)
       // this.requestRoute = 'finance/prove-add/' + this.auditId
       this.dialogAddInvoiceVisible = true
@@ -177,6 +179,7 @@ export default {
         // vueObj.invoiceUrl = response
         vueObj.uploadToken = response;
       })
+      this.getData()
     },
     handleSuccess (response, file) {
       this.getData()
@@ -185,6 +188,7 @@ export default {
         type: 'success'
       })
       // this.form.image = imageUrl;
+      this.getData()
     },
     handleInvoiceShow (row) {
       this.dialogInvoiceLoading = true