From d719c6f73e32f30715806592828caaa024918c29 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期三, 11 十一月 2026 17:36:58 +0800
Subject: [PATCH] 发票管理修改

---
 src/views/project/invoice/index.vue |  571 ++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 489 insertions(+), 82 deletions(-)

diff --git a/src/views/project/invoice/index.vue b/src/views/project/invoice/index.vue
index 343b217..0cd6317 100644
--- a/src/views/project/invoice/index.vue
+++ b/src/views/project/invoice/index.vue
@@ -27,7 +27,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="鎶ラ攢鐘舵��" prop="reimburseState">
+      <el-form-item v-if="!selectMode" label="鎶ラ攢鐘舵��" prop="reimburseState">
         <el-select
           v-model="queryParams.reimburseState"
           placeholder="璇烽�夋嫨鎶ラ攢鐘舵��"
@@ -54,7 +54,7 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
+      <el-col v-if="!selectMode" :span="1.5">
         <el-button
           type="primary"
           plain
@@ -71,7 +71,101 @@
       ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" border :data="invoiceList">
+    <!-- 鎵嬫満绔細鍗$墖鍒楄〃 -->
+    <div v-if="isMobile && !selectMode" class="invoice-cards" v-loading="loading">
+      <div
+        v-for="row in invoiceList"
+        :key="row.id"
+        class="invoice-card"
+      >
+        <div class="invoice-card__head">
+          <span
+            class="invoice-card__title"
+            @click="handleUpdate(row)"
+            >{{ row.invoiceName || "鏈懡鍚嶅彂绁�" }}</span
+          >
+          <el-tag
+            size="mini"
+            :type="
+              String(row.reimburseState) === '1' ? 'success' : 'info'
+            "
+          >
+            {{ String(row.reimburseState) === "1" ? "宸叉姤閿�" : "鏈姤閿�" }}
+          </el-tag>
+        </div>
+        <div class="invoice-card__row">
+          <span class="label">妗堜緥</span>
+          <span class="value">{{ row.caseId || "-" }}</span>
+        </div>
+        <div class="invoice-card__row">
+          <span class="label">閲戦</span>
+          <span class="value">{{ amountText(row.invoiceAmount) }}</span>
+        </div>
+        <div class="invoice-card__row">
+          <span class="label">鏃ユ湡</span>
+          <span class="value">{{
+            normalizeDate(row.occurDate) || row.occurDate || "-"
+          }}</span>
+        </div>
+        <div class="invoice-card__row">
+          <span class="label">鍙风爜</span>
+          <span class="value">{{ row.invoiceNo || "-" }}</span>
+        </div>
+        <div class="invoice-card__row">
+          <span class="label">鎶ラ攢ID</span>
+          <span class="value">{{ row.reimburseId || "-" }}</span>
+        </div>
+        <div class="invoice-card__actions">
+          <el-button
+            type="text"
+            icon="el-icon-view"
+            @click="openPreview(row.invoiceUrl, row.invoiceName)"
+            >棰勮</el-button
+          >
+          <el-button
+            v-if="String(row.reimburseState) !== '1'"
+            type="text"
+            icon="el-icon-check"
+            @click="handleReimburse(row)"
+            v-hasPermi="['project:invoice:edit']"
+            >宸叉姤閿�</el-button
+          >
+          <el-button
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(row)"
+            v-hasPermi="['project:invoice:edit']"
+            >淇敼</el-button
+          >
+          <el-button
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(row)"
+            v-hasPermi="['project:invoice:remove']"
+            >鍒犻櫎</el-button
+          >
+        </div>
+      </div>
+      <div v-if="!invoiceList.length && !loading" class="invoice-empty">
+        鏆傛棤鏁版嵁
+      </div>
+    </div>
+
+    <el-table
+      v-else
+      v-loading="loading"
+      border
+      row-key="id"
+      :data="invoiceList"
+      @selection-change="handleInvoiceSelectionChange"
+    >
+      <el-table-column
+        v-if="selectMode"
+        type="selection"
+        width="50"
+        align="center"
+        :reserve-selection="true"
+      />
       <el-table-column type="index" label="搴忓彿" width="55" align="center" />
       <el-table-column label="妗堜緥" align="center" prop="caseId"  width="100">
         
@@ -121,40 +215,49 @@
         </template>
       </el-table-column>
       <el-table-column
+        prop="reimburseId"
+        label="鎶ラ攢ID"
+        width="150"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column
         label="鎿嶄綔"
         width="200"
         align="center"
-        fixed="right"
+        :fixed="isMobile ? false : 'right'"
       >
         <template slot-scope="scope">
           <el-button
             type="text"
             icon="el-icon-view"
-            @click="openPreview(scope.row.invoiceUrl)"
+            @click="openPreview(scope.row.invoiceUrl, scope.row.invoiceName)"
             >鏂囦欢棰勮</el-button
           >
-          <el-button
-            v-if="String(scope.row.reimburseState) !== '1'"
-            type="text"
-            icon="el-icon-check"
-            @click="handleReimburse(scope.row)"
-            v-hasPermi="['project:invoice:edit']"
-            >宸叉姤閿�</el-button
-          >
-          <el-button
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['project:invoice:edit']"
-            >淇敼</el-button
-          >
-          <el-button
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['project:invoice:remove']"
-            >鍒犻櫎</el-button
-          >
+          <template v-if="!selectMode">
+            <el-button
+              v-if="String(scope.row.reimburseState) !== '1'"
+              type="text"
+              icon="el-icon-check"
+              @click="handleReimburse(scope.row)"
+              v-hasPermi="['project:invoice:edit']"
+              >宸叉姤閿�</el-button
+            >
+            <el-button
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['project:invoice:edit']"
+              >淇敼</el-button
+            >
+            <el-button
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['project:invoice:remove']"
+              >鍒犻櫎</el-button
+            >
+          </template>
         </template>
       </el-table-column>
     </el-table>
@@ -167,13 +270,29 @@
       @pagination="getList"
     />
 
+    <div v-if="selectMode" class="invoice-select-footer">
+      <span class="invoice-select-footer__tip">
+        宸查�夋嫨 {{ selectedInvoices.length }} 寮犲彂绁�
+      </span>
+      <el-button size="mini" @click="$emit('cancel')">鍙� 娑�</el-button>
+      <el-button
+        type="primary"
+        size="mini"
+        :disabled="!selectedInvoices.length"
+        @click="confirmSelect"
+        >纭畾閫夋嫨</el-button
+      >
+    </div>
+
     <!-- 涓婁紶鍙戠エ / 鍙戠エ淇℃伅纭 -->
     <el-dialog
       :title="title"
       :visible.sync="open"
       width="760px"
       append-to-body
+      :fullscreen="isMobile"
       :close-on-click-modal="false"
+      @closed="revokeThumbObjectUrl"
     >
       <!-- 绗竴姝ワ細閫夋渚嬨�佺敤鎴凤紝涓婁紶鍙戠エ -->
       <div v-if="mode === 'upload'">
@@ -192,7 +311,11 @@
                 />
               </el-form-item>
             </el-col>
-           
+            <el-col :span="12">
+              <el-form-item label="鍑瘉">
+                <el-checkbox v-model="uploadForm.voucher">鍑瘉</el-checkbox>
+              </el-form-item>
+            </el-col>
           </el-row>
           <el-form-item label="鍙戠エ鏂囦欢">
             <el-upload
@@ -284,10 +407,30 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="鍙戠エ绫诲瀷" prop="invoiceType">
-              <el-input
+              <el-select
                 v-model="form.invoiceType"
-                placeholder="璇疯緭鍏ュ彂绁ㄧ被鍨�"
-              />
+                placeholder="璇烽�夋嫨鍙戠エ绫诲瀷"
+                filterable
+                clearable
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in invoiceTypeOptions"
+                  :key="item"
+                  :label="item"
+                  :value="item"
+                />
+                <!-- OCR 璇嗗埆鍑虹殑鍏跺畠绫诲瀷淇濈暀鍥炴樉锛岄伩鍏嶇洿鎺ヤ涪澶� -->
+                <el-option
+                  v-if="
+                    form.invoiceType &&
+                    invoiceTypeOptions.indexOf(form.invoiceType) === -1
+                  "
+                  :key="form.invoiceType"
+                  :label="form.invoiceType"
+                  :value="form.invoiceType"
+                />
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -368,6 +511,15 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="鎶ラ攢ID" prop="reimburseId">
+              <el-input
+                v-model="form.reimburseId"
+                maxlength="20"
+                placeholder="璇疯緭鍏ユ姤閿�ID"
+              />
+            </el-form-item>
+          </el-col>
           <el-col :span="24">
             <el-form-item label="澶囨敞" prop="remark">
               <el-input
@@ -386,17 +538,18 @@
                 type="text"
                 icon="el-icon-view"
                 :disabled="!form.invoiceUrl"
-                @click="openPreview(form.invoiceUrl)"
+                @click="openPreview(form.invoiceUrl, form.invoiceName)"
                 >鏂囦欢棰勮</el-button
               >
-              <el-image
+              <img
                 v-if="
                   form.invoiceUrl && getFileType(form.invoiceUrl) === 'image'
                 "
-                :src="form.invoiceUrl"
-                :preview-src-list="[form.invoiceUrl]"
-                fit="contain"
+                :src="thumbObjectUrl || form.invoiceUrl"
                 class="invoice-thumb"
+                title="鐐瑰嚮棰勮"
+                @click="openPreview(form.invoiceUrl, form.invoiceName)"
+                style="width: 400px;height: 240px;"
               />
             </el-form-item>
           </el-col>
@@ -424,27 +577,18 @@
     <el-dialog
       title="鍙戠エ鏂囦欢棰勮"
       :visible.sync="previewOpen"
-      width="900px"
+      width="1000px"
       append-to-body
+      :fullscreen="isMobile"
       :destroy-on-close="true"
+      @closed="handlePreviewClosed"
     >
-      <div class="invoice-preview">
-        <img
-          v-if="previewType === 'image'"
-          :src="previewUrl"
-          class="preview-image"
+      <div class="invoice-preview-wrap" v-loading="previewLoading">
+        <attachment-preview-pane
+          v-if="invoiceEmbeddedFile"
+          :file="invoiceEmbeddedFile"
+          style="flex: 1; min-width: 0;"
         />
-        <iframe
-          v-else-if="previewType === 'pdf'"
-          :src="previewUrl"
-          class="preview-frame"
-        ></iframe>
-        <div v-else class="preview-tip">
-          璇ユ枃浠剁被鍨嬩笉鏀寔鍦ㄧ嚎棰勮锛岃
-          <el-link type="primary" :href="previewUrl" target="_blank"
-            >鍦ㄦ柊绐楀彛鎵撳紑</el-link
-          >
-        </div>
       </div>
     </el-dialog>
   </div>
@@ -464,6 +608,13 @@
 
 export default {
   name: "ServiceInvoice",
+  props: {
+    // 浣滀负鍏朵粬鍗曟嵁鐨勫彂绁ㄩ�夋嫨鍣ㄥ祵鍏ユ椂浼� true锛氭樉绀哄閫夊垪锛屼粎灞曠ず鏈姤閿�鍙戠エ
+    selectMode: {
+      type: Boolean,
+      default: false
+    }
+  },
   data() {
     return {
       // 閬僵灞�
@@ -474,6 +625,8 @@
       total: 0,
       // 鍙戠エ鍒楄〃
       invoiceList: [],
+      // 閫夋嫨妯″紡涓嬪凡鍕鹃�夌殑鍙戠エ
+      selectedInvoices: [],
       // 寮圭獥
       open: false,
       // upload锛氫笂浼犲彂绁紱edit锛氳瘑鍒粨鏋滅‘璁�
@@ -489,7 +642,9 @@
       },
       // 涓婁紶闃舵琛ㄥ崟锛堢敤鎴稩D鍙栧綋鍓嶇櫥褰曠敤鎴凤紝涓嶅湪姝ゅ缂栬緫锛�
       uploadForm: {
-        caseId: ""
+        caseId: "",
+        // 鍕鹃�夊悗浼� voucher=1锛屽悗绔寜鈥滃嚟璇佲�濆鐞�
+        voucher: false
       },
       uploadRules: {
        
@@ -498,16 +653,34 @@
       uploadedList: [],
       // 姝e湪涓婁紶鐨勬枃浠舵暟锛岀敤浜庡垽鏂竴鎵逛笂浼犳槸鍚︾粨鏉�
       uploadingCount: 0,
+      // 鍙戠エ绫诲瀷涓嬫媺閫夐」
+      invoiceTypeOptions: [
+        "浜ら�氳垂",
+        "甯傚唴浜ら�氳垂",
+        "浣忓璐�",
+        "浼欓琛ュ姪",
+        "鍏潅璐硅ˉ鍔�",
+        "鍏朵粬璐圭敤",
+        "鍖绘姢鍥㈤槦涓撳璐�",
+        "璇勪及涓撳璐�",
+        "杞繍鎶ょ悊鍔冲姟璐�",
+        "鑾峰彇涓撳鍔冲姟璐�",
+        "浼︾悊瀹℃牳涓撳璐�",
+        "鍑瘉"
+      ],
       // 璇嗗埆缁撴灉 / 淇敼琛ㄥ崟
       form: {},
       rules: {
        
       },
-      // 鏂囦欢棰勮
+      // 鏂囦欢棰勮锛圓ttachmentPreviewPane 鎵�闇�鐨� file 瀵硅薄锛�
       previewOpen: false,
-      previewUrl: "",
-      // image / pdf / other
-      previewType: "",
+      previewLoading: false,
+      invoiceEmbeddedFile: null,
+      // 棰勮鐢ㄧ殑 blob 鍦板潃锛屽叧闂椂閲婃斁
+      previewObjectUrl: "",
+      // 缂栬緫寮圭獥缂╃暐鍥剧殑 blob 鍦板潃
+      thumbObjectUrl: "",
       // 鏌ヨ鍙傛暟
       queryParams: {
         pageNum: 1,
@@ -521,11 +694,16 @@
     };
   },
   computed: {
+    // 鏄惁鎵嬫満绔紙寮圭獥鍏ㄥ睆銆佹搷浣滃垪涓嶅浐瀹氱瓑閫傞厤锛�
+    isMobile() {
+      return this.$store.state.app.device === "mobile";
+    },
     // 涓婁紶鏃舵惡甯︾殑鐢ㄦ埛ID锛堝綋鍓嶇櫥褰曠敤鎴凤級銆佹渚婭D锛堝悗绔� uploadOCR 蹇呬紶锛�
     uploadData() {
       return {
         userId: this.currentUserId,
-        caseId: this.uploadForm.caseId
+        caseId: this.uploadForm.caseId,
+        voucher: this.uploadForm.voucher ? "1" : "0"
       };
     }
   },
@@ -537,7 +715,11 @@
     /** 鏌ヨ鍙戠エ鍒楄〃 */
     getList() {
       this.loading = true;
-      this.queryParams.userId=this.currentUserId
+      this.queryParams.userId = this.currentUserId;
+      // 閫夋嫨妯″紡鍙厑璁稿紩鐢ㄦ湭鎶ラ攢鍙戠エ锛岄伩鍏嶅悓涓�寮犲彂绁ㄩ噸澶嶆姤閿�
+      if (this.selectMode) {
+        this.queryParams.reimburseState = "0";
+      }
       listInvoice(this.queryParams)
         .then(response => {
           this.invoiceList = response.rows;
@@ -596,9 +778,24 @@
     resetQuery() {
       this.queryParams.caseId = "";
       this.queryParams.invoiceName = "";
-      this.queryParams.reimburseState = "";
+      this.queryParams.reimburseState = this.selectMode ? "0" : "";
       this.queryParams.pageNum = 1;
       this.getList();
+    },
+    /** 閫夋嫨妯″紡锛氳褰曞嬀閫夌殑鍙戠エ */
+    handleInvoiceSelectionChange(selection) {
+      this.selectedInvoices = selection;
+    },
+    /** 閫夋嫨妯″紡锛氭妸鍕鹃�夌殑鍙戠エ浜ょ粰璋冪敤鏂� */
+    confirmSelect() {
+      if (!this.selectedInvoices.length) {
+        this.$modal.msgWarning("璇峰厛鍕鹃�夐渶瑕佸紩鐢ㄧ殑鍙戠エ");
+        return;
+      }
+      this.$emit(
+        "confirm",
+        this.selectedInvoices.map(row => Object.assign({}, row))
+      );
     },
     /** 涓婁紶鍙戠エ鎸夐挳鎿嶄綔 */
     async handleUpload() {
@@ -606,7 +803,8 @@
         await this.getCurrentUser();
       }
       this.uploadForm = {
-        caseId: ""
+        caseId: "",
+        voucher: false
       };
       this.uploadedList = [];
       this.uploadingCount = 0;
@@ -647,6 +845,8 @@
       this.getList();
       if (!invoiceList.length) {
         this.$modal.msgWarning("璇ユ枃浠舵湭璇嗗埆鍒板彂绁ㄤ俊鎭紝璇风‘璁ゆ枃浠舵竻鏅�");
+      } else if (this.uploadForm.voucher) {
+        this.$modal.msgSuccess("鍑瘉涓婁紶鎴愬姛");
       } else {
         this.$modal.msgSuccess(
           "鍙戠エ涓婁紶鎴愬姛锛岃瘑鍒埌 " + invoiceList.length + " 寮犲彂绁�"
@@ -670,7 +870,7 @@
       this.afterUploadBatch();
     },
     /** 鎵撳紑鍙戠エ淇℃伅纭寮圭獥 */
-    openEditForm(record) {
+    async openEditForm(record) {
       this.form = {
         id: record.id,
         caseId: record.caseId,
@@ -685,11 +885,33 @@
         invoiceEndDate: this.normalizeDate(record.invoiceEndDate),
         sellerName: record.sellerName,
         reimburseState: record.reimburseState || "0",
+        reimburseId: record.reimburseId,
         remark: record.remark
       };
       this.mode = "edit";
-      this.title = "鍙戠エ淇℃伅纭";
+      this.title = record.invoiceType === "鍑瘉" ? "鍑瘉淇℃伅纭" : "鍙戠エ淇℃伅纭";
       this.open = true;
+      this.refreshThumb();
+    },
+    /** 缂╃暐鍥惧悓鏍峰甫 token 鎷夊彇锛岄伩鍏嶇洿鎺ュ紩鐢ㄩ壌鏉冨湴鍧�鏄剧ず涓嶅嚭鏉� */
+    async refreshThumb() {
+      this.revokeThumbObjectUrl();
+      const url = this.form.invoiceUrl;
+      if (!url || this.getFileType(url) !== "image") {
+        return;
+      }
+      const objectUrl = await this.loadPreviewBlob(url);
+      if (objectUrl && this.form.invoiceUrl === url) {
+        this.thumbObjectUrl = objectUrl;
+      } else if (objectUrl) {
+        URL.revokeObjectURL(objectUrl);
+      }
+    },
+    revokeThumbObjectUrl() {
+      if (this.thumbObjectUrl) {
+        URL.revokeObjectURL(this.thumbObjectUrl);
+        this.thumbObjectUrl = "";
+      }
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
@@ -697,15 +919,86 @@
         this.openEditForm(response.data);
       });
     },
-    /** 鏂囦欢棰勮锛氬浘鐗囥�丳DF 寮圭獥鍐呴瑙堬紝鍏跺畠绫诲瀷鎻愮ず鏂扮獥鍙f墦寮� */
-    openPreview(url) {
+    /** 鏂囦欢棰勮锛氬甫 token 鎷夊彇鎴� blob 鍐嶉瑙堬紝鍏煎闇�瑕侀壌鏉冪殑 /profile 璧勬簮 */
+    async openPreview(url, name) {
       if (!url) {
         this.$modal.msgWarning("璇ヨ褰曟殏鏃犲彂绁ㄦ枃浠�");
         return;
       }
-      this.previewUrl = url;
-      this.previewType = this.getFileType(url);
+      const type = this.getFileType(url);
+      const fileName = name || this.getFileName(url);
+      this.revokePreviewObjectUrl();
+      this.invoiceEmbeddedFile = null;
+      this.previewLoading = true;
       this.previewOpen = true;
+      const objectUrl = await this.loadPreviewBlob(url);
+      this.previewLoading = false;
+      if (objectUrl) {
+        this.previewObjectUrl = objectUrl;
+        this.invoiceEmbeddedFile = { name: fileName, url: objectUrl, type };
+      } else {
+        // 鎷夊彇澶辫触鏃堕��鍥炲師濮嬪湴鍧�锛屼氦缁欐祻瑙堝櫒鐩存帴鍔犺浇
+        this.invoiceEmbeddedFile = { name: fileName, url: url, type };
+      }
+    },
+    /** 渚濇灏濊瘯鍘熷鍦板潃銆佹帴鍙e墠缂�鍦板潃锛屽甫 token 鎷夊彇鎴� blob */
+    async loadPreviewBlob(url) {
+      const headers = { Authorization: "Bearer " + getToken() };
+      const candidates = this.buildPreviewCandidates(url);
+      for (let i = 0; i < candidates.length; i++) {
+        try {
+          const response = await fetch(candidates[i], { headers });
+          if (!response.ok) {
+            continue;
+          }
+          const blob = await response.blob();
+          if (blob && blob.size > 0) {
+            return URL.createObjectURL(blob);
+          }
+        } catch (e) {
+          // 璺ㄥ煙/缃戠粶寮傚父锛岀户缁皾璇曚笅涓�涓湴鍧�
+        }
+      }
+      return "";
+    },
+    /** 棰勮鍦板潃鍊欓�夛細鍘熷鍦板潃 + 璧版帴鍙e墠缂�锛�/dev-api銆�/prod-api锛夌殑鍦板潃 */
+    buildPreviewCandidates(url) {
+      const list = [url];
+      if (/^https?:\/\//i.test(url)) {
+        const base = (process.env.VUE_APP_BASE_API || "").replace(/\/$/, "");
+        let path = url.replace(/^https?:\/\/[^/]+/i, "");
+        if (base && (path === base || path.indexOf(base + "/") === 0)) {
+          path = path.slice(base.length);
+        }
+        if (base) {
+          list.push(base + path);
+        }
+      }
+      return list.filter((item, index) => list.indexOf(item) === index);
+    },
+    /** 鍏抽棴棰勮鏃堕噴鏀� blob 鍦板潃 */
+    handlePreviewClosed() {
+      this.revokePreviewObjectUrl();
+      this.invoiceEmbeddedFile = null;
+    },
+    revokePreviewObjectUrl() {
+      if (this.previewObjectUrl) {
+        URL.revokeObjectURL(this.previewObjectUrl);
+        this.previewObjectUrl = "";
+      }
+    },
+    /** 閲戦鏄剧ず锛氫繚鐣欎袱浣嶅皬鏁� */
+    amountText(value) {
+      if (value === null || value === undefined || value === "") {
+        return "0.00";
+      }
+      const num = Number(value);
+      return Number.isFinite(num) ? num.toFixed(2) : value;
+    },
+    /** 浠庡湴鍧�涓彇鏂囦欢鍚嶏紙鏃犲彂绁ㄥ悕绉版椂鍏滃簳锛� */
+    getFileName(url) {
+      const path = String(url || "").split("?")[0];
+      return path.substring(path.lastIndexOf("/") + 1) || "鍙戠エ鏂囦欢";
     },
     /** 鏍规嵁鏂囦欢鍦板潃鍒ゆ柇棰勮绫诲瀷 */
     getFileType(url) {
@@ -783,28 +1076,142 @@
   margin-left: 12px;
   border: 1px solid #ebeef5;
   vertical-align: middle;
+  object-fit: contain;
+  background: #f5f7fa;
+  cursor: pointer;
 }
 
-.invoice-preview {
-  min-height: 120px;
+.invoice-preview-wrap {
+  display: flex;
+  width: 100%;
+  height: 70vh;
+}
 
-  .preview-image {
-    display: block;
-    max-width: 100%;
-    max-height: 70vh;
-    margin: 0 auto;
+/* 鎵嬫満绔崱鐗囧垪琛� */
+.invoice-cards {
+  min-height: 60px;
+}
+
+.invoice-card {
+  padding: 12px;
+  margin-bottom: 10px;
+  background: #fff;
+  border: 1px solid #ebeef5;
+  border-radius: 6px;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
+
+  &__head {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin-bottom: 10px;
   }
 
-  .preview-frame {
+  &__title {
+    flex: 1;
+    min-width: 0;
+    margin-right: 8px;
+    font-size: 15px;
+    font-weight: 600;
+    color: #303133;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+
+  &__row {
+    display: flex;
+    align-items: center;
+    margin-bottom: 6px;
+    font-size: 13px;
+    color: #606266;
+
+    .label {
+      flex: 0 0 40px;
+      color: #909399;
+    }
+
+    .value {
+      flex: 1;
+      min-width: 0;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+  }
+
+  &__actions {
+    display: flex;
+    justify-content: flex-end;
+    margin-top: 8px;
+    padding-top: 6px;
+    border-top: 1px dashed #ebeef5;
+
+    ::v-deep .el-button + .el-button {
+      margin-left: 16px;
+    }
+  }
+}
+
+.invoice-empty {
+  padding: 40px 0;
+  text-align: center;
+  font-size: 14px;
+  color: #909399;
+}
+
+.invoice-select-footer {
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  padding: 12px 0 0;
+
+  &__tip {
+    margin-right: 16px;
+    font-size: 13px;
+    color: #606266;
+  }
+}
+
+/* 鎵嬫満绔�傞厤 */
+@media (max-width: 992px) {
+  .app-container {
+    padding: 8px;
+  }
+
+  .opo-query-form {
+    ::v-deep .el-form-item {
+      display: flex;
+      width: 100%;
+      margin-right: 0;
+      margin-bottom: 10px;
+    }
+
+    ::v-deep .el-form-item__content {
+      flex: 1;
+      min-width: 0;
+    }
+
+    ::v-deep .el-select,
+    ::v-deep .el-input,
+    ::v-deep .el-date-editor {
+      width: 100% !important;
+    }
+  }
+
+  /* 寮圭獥鍐呬袱鍒楄〃鍗曞湪鎵嬫満绔彉鍗曞垪 */
+  .el-col-12 {
     width: 100%;
-    height: 70vh;
-    border: none;
   }
 
-  .preview-tip {
-    padding: 40px 0;
-    text-align: center;
-    color: #909399;
+  /* 鍏ㄥ睆寮圭獥閲岀殑棰勮鍖哄崰婊″墿浣欓珮搴� */
+  .invoice-preview-wrap {
+    height: calc(100vh - 120px);
+  }
+
+  .invoice-thumb {
+    display: block;
+    margin: 8px 0 0;
   }
 }
 </style>

--
Gitblit v1.9.3