yxh
6 小时以前 ad5e7a527167a86ca7969e874df9950a5c4e2ff9
器官收费
已修改1个文件
已添加1个文件
479 ■■■■■ 文件已修改
src/views/project/unitCost/organfee/index.vue 381 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/unitCost/particulars/index.vue 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
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) {