huangbin 4 vuotta sitten
vanhempi
commit
c842cd6627
1 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 7 7
      src/views/business/purchase/components/invoice/index.vue

+ 7 - 7
src/views/business/purchase/components/invoice/index.vue

@@ -118,12 +118,8 @@
           <a-col :span="12">
             <a-form-item label="发票附件"
                          class="mb40">
-              <div class="upload">
-                <a-upload action="">
-                  <a-button class="uploadBtn">上传</a-button>
-                </a-upload>
-                <div class="look">查看附件</div>
-              </div>
+              <UploadImg :visible="visible"
+                         @upload="uploadImgAction" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -141,10 +137,12 @@ import { InvoiceReq } from '@/services/proto/contract/interface';
 import { invoiceReq } from '@/views/business/purchase/components/setup';
 import { handleForm } from './setup';
 import { _closeModal } from '@/common/setup/modal/modal';
+import UploadImg from '@/common/components/uploadImg/index.vue';
+import { getUploadImg } from '@/common/setup/upload';
 
 export default defineComponent({
     name: 'purchase_pending_invoice',
-    components: {},
+    components: { UploadImg },
     emits: ['cancel', 'update'],
     props: {
         selectedRow: {
@@ -154,6 +152,7 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
+        const { getFirstImg, uploadImgAction } = getUploadImg();
         const loading = ref<boolean>(false);
         const { rules, formState, formRef } = handleForm();
         function submit() {
@@ -182,6 +181,7 @@ export default defineComponent({
             formatValue,
             rules,
             getPriceTypeName,
+            uploadImgAction,
         };
     },
 });