From ad5e7a527167a86ca7969e874df9950a5c4e2ff9 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 30 十月 2026 09:57:41 +0800
Subject: [PATCH] 器官收费

---
 src/views/project/unitCost/organfee/index.vue    |  381 +++++++++++++++++++++++++++++++++++++++++++++++
 src/views/project/unitCost/particulars/index.vue |   98 ++++++++++-
 2 files changed, 467 insertions(+), 12 deletions(-)

diff --git a/src/views/project/unitCost/organfee/index.vue b/src/views/project/unitCost/organfee/index.vue
new file mode 100644
index 0000000..09566e2
--- /dev/null
+++ b/src/views/project/unitCost/organfee/index.vue
@@ -0,0 +1,381 @@
+<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="hospitalno">
+        <el-select
+          v-model="queryParams.hospitalno"
+          placeholder="璇烽�夋嫨鎺ユ敹鍖婚櫌"
+          clearable
+          filterable
+          size="small"
+          style="width: 200px"
+        >
+          <el-option
+            v-for="item in organizationList"
+            :key="item.organizationid"
+            :label="item.organizationname"
+            :value="item.organizationid"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="鎹愮尞鑰�" prop="donorname">
+        <el-input
+          v-model="queryParams.donorname"
+          placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="鎶ュ憡鏃ユ湡">
+        <el-date-picker
+          v-model="donatetimeRange"
+          type="daterange"
+          range-separator="鑷�"
+          start-placeholder="寮�濮嬫棩鏈�"
+          end-placeholder="缁撴潫鏃ユ湡"
+          value-format="yyyy-MM-dd"
+          clearable
+          size="small"
+          @change="handleDonatetimeChange"
+        />
+      </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">
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" border :data="organfeeList">
+      <el-table-column type="index" label="搴忓彿" width="55" align="center" />
+      <el-table-column
+        prop="donatetime"
+        label="鎶ュ憡鏃ユ湡"
+        width="120"
+        align="center"
+      >
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="donorname"
+        label="鎹愮尞鑰�"
+        width="120"
+        align="center"
+      />
+      <el-table-column
+        prop="organname"
+        label="鍣ㄥ畼鍚嶇О"
+        width="120"
+        align="center"
+      />
+      <el-table-column
+        prop="caseno"
+        label="鍣ㄥ畼鍒嗛厤缂栧彿"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column prop="name" label="鍙椾綋濮撴皬" width="120" align="center" />
+      <el-table-column label="绉绘鏃ユ湡" width="120" align="center">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.receiveTime, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="鍣ㄥ畼鐘舵��" width="120" align="center">
+        <template slot-scope="scope">
+          <span>{{ selectOrganState(scope.row.organState) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="organcharge"
+        label="搴旀敹閲戦"
+        width="120"
+        align="center"
+      />
+      <el-table-column
+        prop="amount"
+        label="瀹炴敹閲戦"
+        width="120"
+        align="center"
+      />
+      <el-table-column
+        prop="organchargedesc"
+        label="澶囨敞"
+        align="center"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        label="鎿嶄綔"
+        width="160"
+        align="center"
+        fixed="right"
+      >
+        <template slot-scope="scope">
+          <el-button
+            type="text"
+            icon="el-icon-edit"
+            @click="handleEdit(scope.row)"
+            v-hasPermi="['project:donorchargeorgan:edit']"
+            >淇敼</el-button
+          >
+          <el-button
+            v-if="isUncharged(scope.row)"
+            type="text"
+            icon="el-icon-check"
+            @click="handleCharge(scope.row)"
+            v-hasPermi="['project:donorchargeorgan:edit']"
+            >宸叉敹璐�</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="淇敼鍣ㄥ畼淇℃伅"
+      :visible.sync="editOpen"
+      width="500px"
+      append-to-body
+      :close-on-click-modal="false"
+    >
+      <el-form ref="editForm" :model="editForm" label-width="90px">
+        <el-form-item label="鍣ㄥ畼鐘舵��" prop="organState">
+          <el-select
+            v-model="editForm.organState"
+            placeholder="璇烽�夋嫨鍣ㄥ畼鐘舵��"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in organStateList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="澶囨敞" prop="organchargedesc">
+          <el-input
+            v-model="editForm.organchargedesc"
+            type="textarea"
+            :rows="3"
+            maxlength="200"
+            show-word-limit
+            placeholder="璇疯緭鍏ュ娉�"
+          />
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="editOpen = false">鍙� 娑�</el-button>
+        <el-button type="primary" :loading="editLoading" @click="submitEdit"
+          >纭� 瀹�</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listDonorchargeorgan,
+  updateDonorchargeorgan
+} from "@/api/project/donorcharge";
+import { listOrganization } from "@/api/project/organization";
+
+export default {
+  name: "Organfee",
+  data() {
+    return {
+      // 閬僵灞�
+      loading: false,
+      // 鏄剧ず鎼滅储鏉′欢
+      showSearch: true,
+      // 鎬绘潯鏁�
+      total: 0,
+      // 鍣ㄥ畼璐圭敤鍒楄〃
+      organfeeList: [],
+      // 鎺ユ敹鍖婚櫌锛堟満鏋勶級涓嬫媺鏁版嵁
+      organizationList: [],
+      // 鎶ュ憡鏃ユ湡鍖洪棿
+      donatetimeRange: [],
+      // 鍣ㄥ畼鐘舵�侊紙瀵瑰簲 service_donorchargeorgan.organ_state锛�
+      organStateList: [
+        { value: "1", label: "绉绘" },
+        { value: "2", label: "澶卞姛" },
+        { value: "3", label: "搴撳瓨" },
+        { value: "4", label: "宸茬Щ妞�" },
+        { value: "5", label: "寮冪敤" },
+        { value: "6", label: "鐩寸郴鍏嶉櫎" },
+        { value: "7", label: "涓嶈壇浜嬩欢" }
+      ],
+      // 淇敼寮圭獥
+      editOpen: false,
+      editLoading: false,
+      editForm: {
+        id: null,
+        organState: null,
+        organchargedesc: null
+      },
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        hospitalno: null,
+        donorname: null,
+        paymentid: null,
+        // false锛氳蛋 queryListBypaymentidIsNull锛屽嵆鏈敹榻愯垂鐢ㄧ殑鍣ㄥ畼
+        paymentidIsNotNull: false,
+        starttime: null,
+        endtime: null,
+        selectAll: true
+      }
+    };
+  },
+  created() {
+    this.getOrganizationList();
+    this.getList();
+  },
+  methods: {
+    /** 鏌ヨ鍣ㄥ畼璐圭敤鍒楄〃 */
+    getList() {
+      this.loading = true;
+      listDonorchargeorgan(this.queryParams)
+        .then(response => {
+          this.organfeeList = response.rows;
+          this.total = response.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    /** 鏄惁鏈敹璐癸細organ_charge_state 涓� 0 鎴栦负绌� */
+    isUncharged(row) {
+      const state = row.organChargeState;
+      return (
+        state === null || state === undefined || state === "" || String(state) === "0"
+      );
+    },
+    /** 纭宸叉敹璐癸細organ_charge_state 缃负 1 */
+    handleCharge(row) {
+      this.$modal
+        .confirm('纭鈥�' + (row.donorname || "") + "鈥濈殑鍣ㄥ畼璐圭敤宸叉敹鍙栵紵")
+        .then(() => {
+          return updateDonorchargeorgan({
+            id: row.id,
+            organChargeState: "1"
+          });
+        })
+        .then(() => {
+          this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+          this.getList();
+        })
+        .catch(() => {});
+    },
+    /** 鎵撳紑淇敼寮圭獥锛堝櫒瀹樼姸鎬併�佸娉級 */
+    handleEdit(row) {
+      this.editForm = {
+        id: row.id,
+        organState:
+          row.organState === null || row.organState === undefined
+            ? null
+            : String(row.organState),
+        organchargedesc: row.organchargedesc || ""
+      };
+      this.editOpen = true;
+    },
+    /** 鎻愪氦淇敼 */
+    submitEdit() {
+      if (!this.editForm.organState) {
+        this.$modal.msgWarning("璇烽�夋嫨鍣ㄥ畼鐘舵��");
+        return;
+      }
+      this.editLoading = true;
+      updateDonorchargeorgan(this.editForm)
+        .then(() => {
+          this.$modal.msgSuccess("淇敼鎴愬姛");
+          this.editOpen = false;
+          this.getList();
+        })
+        .finally(() => {
+          this.editLoading = false;
+        });
+    },
+    /** 鏌ヨ鎺ユ敹鍖婚櫌锛堟満鏋勶級涓嬫媺鏁版嵁 */
+    getOrganizationList() {
+      listOrganization({ pageNum: 1, pageSize: 100000, organizationtype: 4 })
+        .then(response => {
+          this.organizationList = response.rows || [];
+        })
+        .catch(() => {
+          this.organizationList = [];
+        });
+    },
+    /** 鎼滅储鎸夐挳鎿嶄綔 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 閲嶇疆鎸夐挳鎿嶄綔 */
+    resetQuery() {
+      this.donatetimeRange = [];
+      this.queryParams.hospitalno = null;
+      this.queryParams.donorname = null;
+      this.queryParams.starttime = null;
+      this.queryParams.endtime = null;
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 鎶ュ憡鏃ユ湡鍖洪棿 -> 鏌ヨ鍙傛暟锛屾湭閫夋嫨鏃朵紶 null锛岄伩鍏嶅悗绔嫾鍑� donatetime >= '' */
+    handleDonatetimeChange(val) {
+      if (val && val.length === 2) {
+        this.queryParams.starttime = val[0] + " 00:00:00";
+        this.queryParams.endtime = val[1] + " 23:59:59";
+      } else {
+        this.queryParams.starttime = null;
+        this.queryParams.endtime = null;
+      }
+      this.queryParams.pageNum = 1;
+    },
+    /** 鍣ㄥ畼鐘舵�佸�艰浆鏂囨湰 */
+    selectOrganState(value) {
+      if (value === null || value === undefined || value === "") {
+        return "";
+      }
+      const item = this.organStateList.find(
+        state => String(state.value) === String(value)
+      );
+      return item ? item.label : value;
+    }
+  }
+};
+</script>
diff --git a/src/views/project/unitCost/particulars/index.vue b/src/views/project/unitCost/particulars/index.vue
index 2c237ca..53306be 100644
--- a/src/views/project/unitCost/particulars/index.vue
+++ b/src/views/project/unitCost/particulars/index.vue
@@ -6,7 +6,7 @@
         <el-row>
           <el-col :span="5">
             <el-form-item label="鐢宠鏃ユ湡" prop="createTime">
-              <el-date-picker
+              <el-date-picker style="width: 130px;"
                 v-model="form.createTime"
                 value-format="yyyy-MM-dd "
                 type="date"
@@ -189,7 +189,7 @@
               prop="receiveTime"
               align="center"
               label="鎺ユ敹鏃ユ湡"
-              width="200"
+              width="150"
             >
               <template slot-scope="scope">
                 <el-date-picker
@@ -203,6 +203,28 @@
                   placeholder="鎺ユ敹鏃ユ湡"
                 >
                 </el-date-picker>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="organState"
+              align="center"
+              label="鍣ㄧ鐘舵��"
+              width="120"
+            >
+              <template slot-scope="scope">
+                <el-select
+                  v-model="scope.row.organState"
+                  placeholder="璇烽�夋嫨鍣ㄧ鐘舵��"
+                  clearable
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in chargetypelist"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
               </template>
             </el-table-column>
             <el-table-column
@@ -266,7 +288,7 @@
             <el-table-column
               label="鎿嶄綔"
               fixed="right"
-              width="260"
+              width="200"
               align="center"
             >
               <template slot-scope="scope">
@@ -334,7 +356,7 @@
                 ref="queryForm"
                 size="small"
                 :inline="true"
-                label-width="98px"
+                label-width="70px"
               >
                 <el-form-item label="鎺ユ敹鍖婚櫌" prop="status">
                   <el-input
@@ -344,10 +366,22 @@
                   />
                 </el-form-item>
                 <el-form-item label="鎹愮尞鑰�" prop="status">
-                  <el-input
+                  <el-input style="width: 100px;"
                     v-model="patientqueryParams.donorname"
                     @keyup.enter.native="handleAddpatient"
                     placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
+                  />
+                </el-form-item>
+                <el-form-item label="鎶ュ憡鏃ユ湡" prop="donatetime">
+                  <el-date-picker style="width: 220px;"
+                    v-model="donatetimeRange"
+                    type="daterange"
+                    range-separator="鑷�"
+                    start-placeholder="寮�濮嬫棩鏈�"
+                    end-placeholder="缁撴潫鏃ユ湡"
+                    value-format="yyyy-MM-dd"
+                    clearable
+                    @change="handleDonatetimeChange"
                   />
                 </el-form-item>
                 <!-- <el-form-item label="鎹愮尞鑰�" prop="status">
@@ -382,6 +416,11 @@
                 @selection-change="handleSelectionChange"
               >
                 <el-table-column type="selection" width="55"> </el-table-column>
+                <el-table-column prop="donatetime" label="鎶ュ憡鏃ユ湡" width="120">
+                  <template slot-scope="scope">
+                    <span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span>
+                  </template>
+                </el-table-column>
                 <el-table-column label="鎹愮尞鑰�" width="120">
                   <template slot-scope="scope">{{
                     scope.row.donorname
@@ -393,11 +432,10 @@
                   show-overflow-tooltip
                 >
                 </el-table-column>
-                <el-table-column prop="organno" label="鍣ㄥ畼缂栧彿" width="120">
-                </el-table-column>
+         
                 <el-table-column
                   prop="caseno"
-                  label="鍒嗛厤绯荤粺缂栧彿"
+                  label="鍣ㄥ畼鍒嗛厤缂栧彿"
                   show-overflow-tooltip
                 >
                 </el-table-column>
@@ -408,8 +446,14 @@
                 >
                 </el-table-column>
                 <el-table-column
-                  prop="receiveTime"
-                  label="绉绘鏃ユ湡"
+                  prop="organcharge"
+                  label="搴旀敹璐圭敤"
+                  show-overflow-tooltip
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="amount"
+                  label="瀹炴敹璐圭敤"
                   show-overflow-tooltip
                 >
                 </el-table-column>
@@ -612,17 +656,31 @@
           address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�"
         }
       ],
+      // 鏀惰垂椤圭洰涓嬫媺閫夐」
+      chargetypelist: [
+      { label: "绉绘", value: "1" },
+      { label: "澶卞姛", value: "2" },
+      { label: "搴撳瓨", value: "3" },
+      { label: "宸茬Щ妞�", value: "4" },
+      { label: "寮冪敤", value: "5" },
+      { label: "鐩寸郴鍏嶉櫎", value: "6" },
+      { label: "涓嶈壇浜嬩欢", value: "7" }
+      ],
       gatheringlist: [
         { label: "鏂板缓", value: "1" },
         { label: "寰呮敹娆�", value: "2" },
         { label: "宸叉敹娆�", value: "3" }
       ],
       multipleSelection: [],
+      // 鎶ュ憡鏃ユ湡鍖洪棿锛堝搴斿悗绔� starttime/endtime锛屾寜 donatebaseinfo.donatetime 杩囨护锛�
+      donatetimeRange: [],
       patientqueryParams: {
         pageNum: 1,
         pageSize: 10,
         hospitalno: null,
-        paymentid: null
+        paymentid: null,
+        starttime: null,
+        endtime: null
       },
       // 鎬婚�変腑鏁版嵁
       overallCase: [],
@@ -811,7 +869,21 @@
     resetQuery() {
       this.patientqueryParams.donorname = null;
       this.patientqueryParams.donorchargeid = null;
+      this.patientqueryParams.pageNum = 1;
+      this.donatetimeRange = [];
+      this.handleDonatetimeChange(null);
       this.handleAddpatient();
+    },
+    // 鎶ュ憡鏃ユ湡鍖洪棿 -> 鏌ヨ鍙傛暟锛屾湭閫夋嫨鏃朵紶 null锛岄伩鍏嶅悗绔嫾鍑� donatetime >= ''
+    handleDonatetimeChange(val) {
+      if (val && val.length === 2) {
+        this.patientqueryParams.starttime = val[0] + " 00:00:00";
+        this.patientqueryParams.endtime = val[1] + " 23:59:59";
+      } else {
+        this.patientqueryParams.starttime = null;
+        this.patientqueryParams.endtime = null;
+      }
+      this.patientqueryParams.pageNum = 1;
     },
     handleUploadError() {},
     // 寮规娣诲姞
@@ -987,6 +1059,7 @@
         this.form.hospitalname = this.curCase.organizationname;
         this.form.hospitalno = this.curCase.organizationid;
         this.form.borthdate = this.curCase.birthday;
+        this.form.paymentno = this.$moment().format("YYYYMM") + this.curCase.organizationname ;
       }
     },
 
@@ -1138,7 +1211,8 @@
         "remark",
         "name",
         "caseno",
-        "receiveTime"
+        "receiveTime",
+        "organState"
       ];
       columns.forEach((column, index) => {
         if (index === 0) {

--
Gitblit v1.9.3