huangbin 4 years ago
parent
commit
873e02e777

+ 19 - 2
src/views/manage/finance-review/components/invoiceAudit/index.vue

@@ -71,7 +71,11 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="发票附件">
-              <span class="white">{{ formatValue(selectedRow.invoiceamount) }}</span>
+              <span class="white"
+                    v-if="selectedRow.invoiceamount"></span>
+              <span class="white"
+                    v-else
+                    @click="previewImg">{{ selectedRow.invoiceamount }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -90,6 +94,13 @@
       </fieldset>
     </a-form>
   </a-modal>
+  <a-modal :visible="previewVisible"
+           :footer="null"
+           @cancel="cancelImg">
+    <img alt="预览附件"
+         style="width: 100%"
+         :src="previewImage" />
+  </a-modal>
 </template>
 
 <script lang="ts">
@@ -108,6 +119,7 @@ import Long from 'long';
 import { somePriceControl } from '@/views/manage/business-review/components/setup';
 import { financeControl } from '@/views/manage/finance-review/components/setup';
 import { isShowContractCheck } from '@/views/manage/inventory-review/setup';
+import { handlePreviewImg } from '@/common/setup/upload';
 
 export default defineComponent({
     name: 'finance_review_invoice_audit',
@@ -122,7 +134,8 @@ export default defineComponent({
         const { visible, cancel } = closeModal('finance_review_invoice_audit');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
-
+        // 预览附件
+        const { previewVisible, previewImage, cancelImg, previewImg } = handlePreviewImg();
         function submit() {
             loading.value = true;
             setTimeout(() => {
@@ -188,6 +201,10 @@ export default defineComponent({
             pass,
             refuse,
             isShowContractCheck,
+            previewVisible,
+            previewImage,
+            cancelImg,
+            previewImg,
         };
     },
 });

+ 3 - 5
src/views/manage/finance-review/components/invoiceDetail/index.vue

@@ -96,12 +96,10 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
+import { defineComponent, PropType, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { mergeObj } from '@/utils/objHandle';
 import { getStatusName } from '@/common/constants/enumsName';
-import { formatValue, formatTime } from '@/common/methods';
+import { formatValue } from '@/common/methods';
 import { QryBussinessFpRsp } from '@/services/go/ermcp/finance-review/interface';
 import { invoiceStatusName } from '@/views/manage/finance-review/setup';
 import { getContractTypeName, getPriceTypeName } from '@/common/constants/enumsName';
@@ -121,7 +119,7 @@ export default defineComponent({
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
         // 预览附件
-        const { previewVisible, previewImage, cancelImg, previewImg, getImgName } = handlePreviewImg();
+        const { previewVisible, previewImage, cancelImg, previewImg } = handlePreviewImg();
         function submit() {
             context.emit('refresh');
             cancel();