From 670a83da9506123cbc1730c760ba81e1de9b981b Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期五, 30 十月 2026 13:32:06 +0800
Subject: [PATCH] 发票管理,器官费用

---
 src/views/project/invoice/index.vue              |  810 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/api/project/invoice.js                       |   44 ++
 src/views/project/unitCost/organfee/index.vue    |   19 
 src/views/project/unitCost/particulars/index.vue |   13 
 4 files changed, 872 insertions(+), 14 deletions(-)

diff --git a/src/api/project/invoice.js b/src/api/project/invoice.js
new file mode 100644
index 0000000..5ca1061
--- /dev/null
+++ b/src/api/project/invoice.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 鏌ヨ鍙戠エ鍒楄〃
+export function listInvoice(query) {
+  return request({
+    url: '/project/invoice/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ鍙戠エ璇︾粏
+export function getInvoice(id) {
+  return request({
+    url: '/project/invoice/getInfo/' + id,
+    method: 'get'
+  })
+}
+
+// 鏂板鍙戠エ
+export function addInvoice(data) {
+  return request({
+    url: '/project/invoice/add',
+    method: 'post',
+    data: data
+  })
+}
+
+// 淇敼鍙戠エ
+export function updateInvoice(data) {
+  return request({
+    url: '/project/invoice/edit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 鍒犻櫎鍙戠エ
+export function delInvoice(ids) {
+  return request({
+    url: '/project/invoice/remove/' + ids,
+    method: 'get'
+  })
+}
diff --git a/src/views/project/invoice/index.vue b/src/views/project/invoice/index.vue
new file mode 100644
index 0000000..343b217
--- /dev/null
+++ b/src/views/project/invoice/index.vue
@@ -0,0 +1,810 @@
+<template>
+  <div class="app-container">
+    <el-form
+      class="opo-query-form"
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      v-show="showSearch"
+      label-width="90px"
+    >
+
+      <el-form-item label="鍙戠エ鍚嶇О" prop="invoiceName">
+        <el-input
+          v-model="queryParams.invoiceName"
+          placeholder="璇疯緭鍏ュ彂绁ㄥ悕绉�"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="妗堝垪鍙风爜" prop="caseId">
+        <el-input
+          v-model="queryParams.caseId"
+          placeholder="妗堝垪鍙风爜"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="鎶ラ攢鐘舵��" prop="reimburseState">
+        <el-select
+          v-model="queryParams.reimburseState"
+          placeholder="璇烽�夋嫨鎶ラ攢鐘舵��"
+          clearable
+          size="small"
+          style="width: 140px"
+        >
+          <el-option label="鏈姤閿�" value="0" />
+          <el-option label="宸叉姤閿�" value="1" />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >鎼滅储</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >閲嶇疆</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleUpload"
+          v-hasPermi="['project:invoice:add']"
+          >涓婁紶鍙戠エ</el-button
+        >
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" border :data="invoiceList">
+      <el-table-column type="index" label="搴忓彿" width="55" align="center" />
+      <el-table-column label="妗堜緥" align="center" prop="caseId"  width="100">
+        
+      </el-table-column>
+     
+      <el-table-column
+        prop="invoiceType"
+        label="鍙戠エ绫诲瀷"
+        width="130"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        prop="invoiceName"
+        label="鍙戠エ鍚嶇О"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        prop="invoiceNo"
+        label="鍙戠エ鍙风爜"
+        width="150"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        prop="invoiceAmount"
+        label="鍙戠エ閲戦"
+        width="120"
+        align="center"
+      />
+      <el-table-column label="鍙戠敓鏃ユ湡" width="120" align="center">
+        <template slot-scope="scope">
+          {{ normalizeDate(scope.row.occurDate) || scope.row.occurDate }}
+        </template>
+      </el-table-column>
+      <el-table-column label="鎶ラ攢鐘舵��" width="110" align="center">
+        <template slot-scope="scope">
+          <el-tag
+            size="mini"
+            :type="
+              String(scope.row.reimburseState) === '1' ? 'success' : 'info'
+            "
+          >
+            {{ String(scope.row.reimburseState) === "1" ? "宸叉姤閿�" : "鏈姤閿�" }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="鎿嶄綔"
+        width="200"
+        align="center"
+        fixed="right"
+      >
+        <template slot-scope="scope">
+          <el-button
+            type="text"
+            icon="el-icon-view"
+            @click="openPreview(scope.row.invoiceUrl)"
+            >鏂囦欢棰勮</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>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 涓婁紶鍙戠エ / 鍙戠エ淇℃伅纭 -->
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="760px"
+      append-to-body
+      :close-on-click-modal="false"
+    >
+      <!-- 绗竴姝ワ細閫夋渚嬨�佺敤鎴凤紝涓婁紶鍙戠エ -->
+      <div v-if="mode === 'upload'">
+        <el-form
+          ref="uploadForm"
+          :model="uploadForm"
+          :rules="uploadRules"
+          label-width="100px"
+        >
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="妗堜緥ID" prop="caseId">
+                <el-input
+                  v-model.number="uploadForm.caseId"
+                  placeholder="璇疯緭鍏ユ渚婭D"
+                />
+              </el-form-item>
+            </el-col>
+           
+          </el-row>
+          <el-form-item label="鍙戠エ鏂囦欢">
+            <el-upload
+              class="invoice-upload"
+              drag
+              multiple
+              :action="uploadFileUrl"
+              :headers="headers"
+              :data="uploadData"
+              :show-file-list="false"
+              :before-upload="beforeUpload"
+              :on-success="handleUploadSuccess"
+              :on-error="handleUploadError"
+              accept="image/*,.pdf"
+            >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                灏嗗彂绁ㄦ嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em>
+              </div>
+              <div class="el-upload__tip" slot="tip">
+                鏀寔鍥剧墖銆丳DF锛屽彲澶氶�夋枃浠舵壒閲忎笂浼狅紝鍗曚釜鏂囦欢涓嶈秴杩� 10MB锛涗笂浼犲悗鑷姩璇嗗埆鍙戠エ淇℃伅锛岃瘑鍒粨鏋滃彲鍦ㄤ笅鏂圭紪杈�
+              </div>
+            </el-upload>
+          </el-form-item>
+          <el-form-item
+            v-if="uploadedList.length"
+            label="涓婁紶缁撴灉"
+          >
+            <el-table
+              :data="uploadedList"
+              border
+              size="mini"
+              max-height="260"
+              style="width: 100%"
+            >
+              <el-table-column
+                prop="invoiceNo"
+                label="鍙戠エ鍙风爜"
+                show-overflow-tooltip
+              />
+              <el-table-column
+                prop="invoiceType"
+                label="鍙戠エ绫诲瀷"
+                show-overflow-tooltip
+              />
+              <el-table-column
+                prop="invoiceAmount"
+                label="鍙戠エ閲戦"
+                width="110"
+                align="center"
+              />
+              <el-table-column label="鍙戠敓鏃ユ湡" width="120" align="center">
+                <template slot-scope="scope">
+                  {{
+                    normalizeDate(scope.row.occurDate) || scope.row.occurDate
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column label="鎿嶄綔" width="80" align="center">
+                <template slot-scope="scope">
+                  <el-button
+                    type="text"
+                    @click="openEditForm(scope.row)"
+                    >缂栬緫</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <!-- 绗簩姝ワ細璇嗗埆缁撴灉纭锛屽瓧娈靛潎鍙慨鏀� -->
+      <el-form
+        v-else
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="100px"
+      >
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="妗堜緥ID" prop="caseId">
+              <el-input
+                v-model.number="form.caseId"
+                placeholder="璇疯緭鍏ユ渚婭D"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍙戠エ绫诲瀷" prop="invoiceType">
+              <el-input
+                v-model="form.invoiceType"
+                placeholder="璇疯緭鍏ュ彂绁ㄧ被鍨�"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍙戠エ鍚嶇О" prop="invoiceName">
+              <el-input
+                v-model="form.invoiceName"
+                placeholder="璇疯緭鍏ュ彂绁ㄥ悕绉�"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍙戠エ鍙风爜" prop="invoiceNo">
+              <el-input
+                v-model="form.invoiceNo"
+                placeholder="璇疯緭鍏ュ彂绁ㄥ彿鐮�"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍙戠エ閲戦" prop="invoiceAmount">
+              <el-input
+                v-model="form.invoiceAmount"
+                placeholder="璇疯緭鍏ュ彂绁ㄩ噾棰�"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍙戠敓鏃ユ湡" prop="occurDate">
+              <el-date-picker
+                v-model="form.occurDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="璇烽�夋嫨鍙戠敓鏃ユ湡"
+                style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          
+          <el-col :span="12">
+            <el-form-item label="鍙戠エ寮�濮嬫棩鏈�" prop="invoiceStartDate">
+              <el-date-picker
+                v-model="form.invoiceStartDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="璇烽�夋嫨鍙戠エ寮�濮嬫棩鏈�"
+                style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍙戠エ缁撴潫鏃ユ湡" prop="invoiceEndDate">
+              <el-date-picker
+                v-model="form.invoiceEndDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="璇烽�夋嫨鍙戠エ缁撴潫鏃ユ湡"
+                style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="閿�鍞柟鍚嶇О" prop="sellerName">
+              <el-input
+                v-model="form.sellerName"
+                placeholder="璇疯緭鍏ラ攢鍞柟鍚嶇О"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鎶ラ攢鐘舵��" prop="reimburseState">
+              <el-select
+                v-model="form.reimburseState"
+                placeholder="璇烽�夋嫨鎶ラ攢鐘舵��"
+                style="width: 100%"
+              >
+                <el-option label="鏈姤閿�" value="0" />
+                <el-option label="宸叉姤閿�" value="1" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="澶囨敞" prop="remark">
+              <el-input
+                v-model="form.remark"
+                type="textarea"
+                :rows="2"
+                maxlength="500"
+                show-word-limit
+                placeholder="璇疯緭鍏ュ娉�"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="鍙戠エ棰勮">
+              <el-button
+                type="text"
+                icon="el-icon-view"
+                :disabled="!form.invoiceUrl"
+                @click="openPreview(form.invoiceUrl)"
+                >鏂囦欢棰勮</el-button
+              >
+              <el-image
+                v-if="
+                  form.invoiceUrl && getFileType(form.invoiceUrl) === 'image'
+                "
+                :src="form.invoiceUrl"
+                :preview-src-list="[form.invoiceUrl]"
+                fit="contain"
+                class="invoice-thumb"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button
+          v-if="mode === 'edit' && uploadedList.length > 1"
+          @click="mode = 'upload'"
+          >杩斿洖鍒楄〃</el-button
+        >
+        <el-button @click="open = false">鍙� 娑�</el-button>
+        <el-button
+          v-if="mode === 'edit'"
+          type="primary"
+          :loading="saving"
+          @click="submitForm"
+          >淇� 瀛�</el-button
+        >
+      </span>
+    </el-dialog>
+
+    <!-- 鍙戠エ鏂囦欢棰勮 -->
+    <el-dialog
+      title="鍙戠エ鏂囦欢棰勮"
+      :visible.sync="previewOpen"
+      width="900px"
+      append-to-body
+      :destroy-on-close="true"
+    >
+      <div class="invoice-preview">
+        <img
+          v-if="previewType === 'image'"
+          :src="previewUrl"
+          class="preview-image"
+        />
+        <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>
+</template>
+
+<script>
+import {
+  listInvoice,
+  getInvoice,
+  updateInvoice,
+  delInvoice
+} from "@/api/project/invoice";
+import { getUserProfile } from "@/api/system/user";
+import { getToken } from "@/utils/auth";
+
+
+
+export default {
+  name: "ServiceInvoice",
+  data() {
+    return {
+      // 閬僵灞�
+      loading: false,
+      // 鏄剧ず鎼滅储鏉′欢
+      showSearch: true,
+      // 鎬绘潯鏁�
+      total: 0,
+      // 鍙戠エ鍒楄〃
+      invoiceList: [],
+      // 寮圭獥
+      open: false,
+      // upload锛氫笂浼犲彂绁紱edit锛氳瘑鍒粨鏋滅‘璁�
+      mode: "upload",
+      title: "",
+      saving: false,
+      // 褰撳墠鐧诲綍鐢ㄦ埛ID锛岀敤浣滈粯璁ょ敤鎴稩D
+      currentUserId: null,
+      // 鏂囦欢涓婁紶鍦板潃涓庤姹傚ご
+      uploadFileUrl: process.env.VUE_APP_BASE_API + "/project/invoice/uploadOCR",
+      headers: {
+        Authorization: "Bearer " + getToken()
+      },
+      // 涓婁紶闃舵琛ㄥ崟锛堢敤鎴稩D鍙栧綋鍓嶇櫥褰曠敤鎴凤紝涓嶅湪姝ゅ缂栬緫锛�
+      uploadForm: {
+        caseId: ""
+      },
+      uploadRules: {
+       
+      },
+      // 鏈涓婁紶璇嗗埆鍑虹殑鍙戠エ锛堟敮鎸佷竴娆″寮狅級
+      uploadedList: [],
+      // 姝e湪涓婁紶鐨勬枃浠舵暟锛岀敤浜庡垽鏂竴鎵逛笂浼犳槸鍚︾粨鏉�
+      uploadingCount: 0,
+      // 璇嗗埆缁撴灉 / 淇敼琛ㄥ崟
+      form: {},
+      rules: {
+       
+      },
+      // 鏂囦欢棰勮
+      previewOpen: false,
+      previewUrl: "",
+      // image / pdf / other
+      previewType: "",
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        caseId: "",
+        userId: this.currentUserId,
+        invoiceName: "",
+        reimburseState: ""
+        
+      }
+    };
+  },
+  computed: {
+    // 涓婁紶鏃舵惡甯︾殑鐢ㄦ埛ID锛堝綋鍓嶇櫥褰曠敤鎴凤級銆佹渚婭D锛堝悗绔� uploadOCR 蹇呬紶锛�
+    uploadData() {
+      return {
+        userId: this.currentUserId,
+        caseId: this.uploadForm.caseId
+      };
+    }
+  },
+  async created() {
+    await this.getCurrentUser();
+    this.getList();
+  },
+  methods: {
+    /** 鏌ヨ鍙戠エ鍒楄〃 */
+    getList() {
+      this.loading = true;
+      this.queryParams.userId=this.currentUserId
+      listInvoice(this.queryParams)
+        .then(response => {
+          this.invoiceList = response.rows;
+          this.total = response.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    /** 褰撳墠鐧诲綍鐢ㄦ埛ID锛屽崟鎹殑鐢ㄦ埛ID鐩存帴鍙栬鍊� */
+    async getCurrentUser() {
+      try {
+        const response = await getUserProfile();
+        this.currentUserId = response.data ? response.data.userId : 0;
+      } catch (e) {
+        this.currentUserId = 0;
+      }
+      return this.currentUserId;
+    },
+    /** 妗堜緥涓嬫媺鏄剧ず鏂囨湰 */
+    formatCase(item) {
+      if (!item) {
+        return "";
+      }
+      return [item.donorno, item.name].filter(Boolean).join(" ");
+    },
+
+    /** 鏃ユ湡缁熶竴鎴� yyyy-MM-dd锛屽吋瀹� OCR 鐨勨��2024骞�01鏈�02鏃モ�濈瓑鏍煎紡 */
+    normalizeDate(value) {
+      if (!value) {
+        return null;
+      }
+      const text = String(value)
+        .replace(/[骞存湀]/g, "-")
+        .replace(/鏃�/g, "")
+        .replace(/\//g, "-")
+        .trim();
+      const match = text.match(/^(\d{4})-(\d{1,2})-(\d{1,2})/);
+      if (!match) {
+        return null;
+      }
+      return (
+        match[1] +
+        "-" +
+        String(match[2]).padStart(2, "0") +
+        "-" +
+        String(match[3]).padStart(2, "0")
+      );
+    },
+    /** 鎼滅储鎸夐挳鎿嶄綔 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 閲嶇疆鎸夐挳鎿嶄綔 */
+    resetQuery() {
+      this.queryParams.caseId = "";
+      this.queryParams.invoiceName = "";
+      this.queryParams.reimburseState = "";
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 涓婁紶鍙戠エ鎸夐挳鎿嶄綔 */
+    async handleUpload() {
+      if (!this.currentUserId) {
+        await this.getCurrentUser();
+      }
+      this.uploadForm = {
+        caseId: ""
+      };
+      this.uploadedList = [];
+      this.uploadingCount = 0;
+      this.form = {};
+      this.mode = "upload";
+      this.title = "涓婁紶鍙戠エ";
+      this.open = true;
+    },
+    /** 涓婁紶鍓嶆牎楠� */
+    beforeUpload(file) {
+      if (!this.currentUserId) {
+        this.$modal.msgWarning("鏈幏鍙栧埌褰撳墠鐢ㄦ埛ID锛岃閲嶆柊鐧诲綍鍚庡啀璇�");
+        return false;
+      }
+      const isAllowed = /\.(jpg|jpeg|png|gif|bmp|pdf)$/i.test(file.name);
+      const isLt10M = file.size / 1024 / 1024 < 10;
+      if (!isAllowed) {
+        this.$modal.msgError("浠呮敮鎸佸浘鐗囥�丳DF鏍煎紡鐨勫彂绁ㄦ枃浠�");
+        return false;
+      }
+      if (!isLt10M) {
+        this.$modal.msgError("鍙戠エ鏂囦欢澶у皬涓嶈兘瓒呰繃10MB");
+        return false;
+      }
+      this.uploadingCount++;
+      return true;
+    },
+    /** 涓婁紶鎴愬姛锛氬悗绔凡 OCR 骞朵繚瀛橈紝缁撴灉姹囨�诲埌鏈涓婁紶鍒楄〃 */
+    handleUploadSuccess(response) {
+      this.uploadingCount = Math.max(0, this.uploadingCount - 1);
+      if (!response || response.code !== 200) {
+        this.$modal.msgError((response && response.msg) || "鍙戠エ涓婁紶澶辫触");
+        this.afterUploadBatch();
+        return;
+      }
+      const invoiceList = response.invoiceList || [];
+      this.uploadedList = this.uploadedList.concat(invoiceList);
+      this.getList();
+      if (!invoiceList.length) {
+        this.$modal.msgWarning("璇ユ枃浠舵湭璇嗗埆鍒板彂绁ㄤ俊鎭紝璇风‘璁ゆ枃浠舵竻鏅�");
+      } else {
+        this.$modal.msgSuccess(
+          "鍙戠エ涓婁紶鎴愬姛锛岃瘑鍒埌 " + invoiceList.length + " 寮犲彂绁�"
+        );
+      }
+      this.afterUploadBatch();
+    },
+    /** 涓�鎵逛笂浼犵粨鏉熷悗锛氬彧璇嗗埆鍒颁竴寮犲彂绁ㄦ椂鐩存帴杩涘叆淇℃伅纭 */
+    afterUploadBatch() {
+      if (this.uploadingCount > 0) {
+        return;
+      }
+      if (this.uploadedList.length === 1) {
+        this.openEditForm(this.uploadedList[0]);
+      }
+    },
+    /** 涓婁紶澶辫触 */
+    handleUploadError() {
+      this.uploadingCount = Math.max(0, this.uploadingCount - 1);
+      this.$modal.msgError("鍙戠エ涓婁紶澶辫触锛岃绋嶅悗閲嶈瘯");
+      this.afterUploadBatch();
+    },
+    /** 鎵撳紑鍙戠エ淇℃伅纭寮圭獥 */
+    openEditForm(record) {
+      this.form = {
+        id: record.id,
+        caseId: record.caseId,
+        userId: record.userId,
+        invoiceType: record.invoiceType,
+        invoiceName: record.invoiceName,
+        invoiceNo: record.invoiceNo,
+        invoiceUrl: record.invoiceUrl,
+        invoiceAmount: record.invoiceAmount,
+        occurDate: this.normalizeDate(record.occurDate),
+        invoiceStartDate: this.normalizeDate(record.invoiceStartDate),
+        invoiceEndDate: this.normalizeDate(record.invoiceEndDate),
+        sellerName: record.sellerName,
+        reimburseState: record.reimburseState || "0",
+        remark: record.remark
+      };
+      this.mode = "edit";
+      this.title = "鍙戠エ淇℃伅纭";
+      this.open = true;
+    },
+    /** 淇敼鎸夐挳鎿嶄綔 */
+    handleUpdate(row) {
+      getInvoice(row.id).then(response => {
+        this.openEditForm(response.data);
+      });
+    },
+    /** 鏂囦欢棰勮锛氬浘鐗囥�丳DF 寮圭獥鍐呴瑙堬紝鍏跺畠绫诲瀷鎻愮ず鏂扮獥鍙f墦寮� */
+    openPreview(url) {
+      if (!url) {
+        this.$modal.msgWarning("璇ヨ褰曟殏鏃犲彂绁ㄦ枃浠�");
+        return;
+      }
+      this.previewUrl = url;
+      this.previewType = this.getFileType(url);
+      this.previewOpen = true;
+    },
+    /** 鏍规嵁鏂囦欢鍦板潃鍒ゆ柇棰勮绫诲瀷 */
+    getFileType(url) {
+      const path = String(url || "")
+        .split("?")[0]
+        .toLowerCase();
+      if (/\.(jpg|jpeg|png|gif|bmp|webp)$/.test(path)) {
+        return "image";
+      }
+      if (/\.pdf$/.test(path)) {
+        return "pdf";
+      }
+      return "other";
+    },
+    /** 淇濆瓨淇敼 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (!valid) {
+          return;
+        }
+        this.saving = true;
+        updateInvoice(this.form)
+          .then(() => {
+            this.$modal.msgSuccess("淇濆瓨鎴愬姛");
+            this.open = false;
+            this.getList();
+          })
+          .finally(() => {
+            this.saving = false;
+          });
+      });
+    },
+    /** 鎿嶄綔鍒椻�滃凡鎶ラ攢鈥濓細鎶婃姤閿�鐘舵�佺疆涓� 1 */
+    handleReimburse(row) {
+      this.$modal
+        .confirm('纭鍙戠エ"' + (row.invoiceName || row.invoiceNo) + '"宸叉姤閿�锛�')
+        .then(() => updateInvoice({ id: row.id, reimburseState: "1" }))
+        .then(() => {
+          this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+          this.getList();
+        })
+        .catch(() => {});
+    },
+    /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+    handleDelete(row) {
+      this.$modal
+        .confirm('鏄惁纭鍒犻櫎鍙戠エ"' + (row.invoiceNo || row.id) + '"锛�')
+        .then(() => delInvoice(row.id))
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+        })
+        .catch(() => {});
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.invoice-upload {
+  width: 100%;
+
+  ::v-deep .el-upload {
+    width: 100%;
+  }
+
+  ::v-deep .el-upload-dragger {
+    width: 100%;
+  }
+}
+
+.invoice-thumb {
+  width: 100px;
+  height: 70px;
+  margin-left: 12px;
+  border: 1px solid #ebeef5;
+  vertical-align: middle;
+}
+
+.invoice-preview {
+  min-height: 120px;
+
+  .preview-image {
+    display: block;
+    max-width: 100%;
+    max-height: 70vh;
+    margin: 0 auto;
+  }
+
+  .preview-frame {
+    width: 100%;
+    height: 70vh;
+    border: none;
+  }
+
+  .preview-tip {
+    padding: 40px 0;
+    text-align: center;
+    color: #909399;
+  }
+}
+</style>
diff --git a/src/views/project/unitCost/organfee/index.vue b/src/views/project/unitCost/organfee/index.vue
index 09566e2..d71aa18 100644
--- a/src/views/project/unitCost/organfee/index.vue
+++ b/src/views/project/unitCost/organfee/index.vue
@@ -8,10 +8,10 @@
       v-show="showSearch"
       label-width="90px"
     >
-      <el-form-item label="鎺ユ敹鍖婚櫌" prop="hospitalno">
+      <el-form-item label="浠樻鍖婚櫌" prop="hospitalno">
         <el-select
           v-model="queryParams.hospitalno"
-          placeholder="璇烽�夋嫨鎺ユ敹鍖婚櫌"
+          placeholder="璇烽�夋嫨浠樻鍖婚櫌"
           clearable
           filterable
           size="small"
@@ -80,6 +80,12 @@
           <span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
+       <el-table-column
+        prop="hospitalname"
+        label="浠樻鍖婚櫌"
+        width="200"
+        align="center"
+      />
       <el-table-column
         prop="donorname"
         label="鎹愮尞鑰�"
@@ -231,12 +237,11 @@
       // 鍣ㄥ畼鐘舵�侊紙瀵瑰簲 service_donorchargeorgan.organ_state锛�
       organStateList: [
         { value: "1", label: "绉绘" },
-        { value: "2", label: "澶卞姛" },
+        { value: "2", label: "寮冪敤" },
         { value: "3", label: "搴撳瓨" },
-        { value: "4", label: "宸茬Щ妞�" },
-        { value: "5", label: "寮冪敤" },
-        { value: "6", label: "鐩寸郴鍏嶉櫎" },
-        { value: "7", label: "涓嶈壇浜嬩欢" }
+        { value: "4", label: "澶卞姛" },
+        { value: "5", label: "鐩寸郴鍏嶉櫎" },
+        { value: "6", label: "涓嶈壇浜嬩欢" }
       ],
       // 淇敼寮圭獥
       editOpen: false,
diff --git a/src/views/project/unitCost/particulars/index.vue b/src/views/project/unitCost/particulars/index.vue
index 53306be..8910b17 100644
--- a/src/views/project/unitCost/particulars/index.vue
+++ b/src/views/project/unitCost/particulars/index.vue
@@ -658,13 +658,12 @@
       ],
       // 鏀惰垂椤圭洰涓嬫媺閫夐」
       chargetypelist: [
-      { label: "绉绘", value: "1" },
-      { label: "澶卞姛", value: "2" },
-      { label: "搴撳瓨", value: "3" },
-      { label: "宸茬Щ妞�", value: "4" },
-      { label: "寮冪敤", value: "5" },
-      { label: "鐩寸郴鍏嶉櫎", value: "6" },
-      { label: "涓嶈壇浜嬩欢", value: "7" }
+        { value: "1", label: "绉绘" },
+        { value: "2", label: "寮冪敤" },
+        { value: "3", label: "搴撳瓨" },
+        { value: "4", label: "澶卞姛" },
+        { value: "5", label: "鐩寸郴鍏嶉櫎" },
+        { value: "6", label: "涓嶈壇浜嬩欢" }
       ],
       gatheringlist: [
         { label: "鏂板缓", value: "1" },

--
Gitblit v1.9.3