WXL
2026-05-15 68daed8ac76b42542e6ed3fbcac19a057c1dedf0
src/views/business/transfer/index.vue
@@ -8,7 +8,7 @@
        :inline="true"
        label-width="80px"
      >
        <el-form-item label="案例编号" prop="caseNo">
        <el-form-item label="上报医院" prop="caseNo">
          <el-input
            v-model="queryParams.caseNo"
            placeholder="请输入案例编号"
@@ -17,7 +17,7 @@
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="患者姓名" prop="patName">
        <el-form-item label="姓名" prop="patName">
          <el-input
            v-model="queryParams.patName"
            placeholder="请输入患者姓名"
@@ -41,7 +41,7 @@
            <el-option label="暂存" :value="5" />
          </el-select>
        </el-form-item>
        <el-form-item label="创建时间">
        <el-form-item label="转运时间">
          <el-date-picker
            v-model="dateRange"
            style="width: 240px"
@@ -149,12 +149,7 @@
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="序号" type="index" width="60" align="center" />
      <el-table-column
        label="案例编号"
        align="center"
        prop="caseNo"
        width="140"
      />
      <el-table-column label="编号" align="center" prop="caseNo" width="140" />
      <el-table-column label="患者信息" align="center" width="260">
        <template slot-scope="scope">
          <div class="donor-info">
@@ -177,24 +172,6 @@
        show-overflow-tooltip
      />
      <el-table-column
        label="治疗医院"
        align="center"
        prop="treatmentHospitalName"
        width="150"
      />
      <el-table-column
        label="计划转运时间"
        align="center"
        prop="transportStartTime"
        width="160"
      />
      <el-table-column
        label="负责协调员"
        align="center"
        prop="contactPerson"
        width="100"
      />
      <el-table-column
        label="转运状态"
        align="center"
        prop="transitStatus"
@@ -206,6 +183,25 @@
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column
        label="计划转运时间"
        align="center"
        prop="transportStartTime"
        width="160"
      />
      <el-table-column
        label="协调员"
        align="center"
        prop="contactPerson"
        width="100"
      />
      <el-table-column
        label="上报医院"
        align="center"
        prop="treatmentHospitalName"
        width="150"
      />
      <el-table-column
        label="创建时间"
        align="center"
@@ -430,9 +426,7 @@
    >
      <div class="action-confirm">
        <p>
          确定要{{ actionText }}转运单 "{{
             currentTransport.id
          }}" 吗?
          确定要{{ actionText }}转运单 "{{ currentTransport.patName }}" 吗?
        </p>
      </div>
      <div slot="footer" class="dialog-footer">
@@ -450,7 +444,9 @@
  transportEdit,
  transportDel,
  transportInfo,
  donateList
  donateInfo,
  donateList,
  donateEdit
} from "@/api/businessApi/index";
import TransportDetail from "./transportDetail";
import TransportEdit from "./TransportEdit";
@@ -519,15 +515,15 @@
        pageNum: 1,
        pageSize: 10,
        caseNo: undefined,
        patName: undefined,
        patName: undefined
        // 只查询已同意且需要转运的案例
        // reportStatus: "3", // 已同意
        isTransport: "2" // 需要转运
        // isTransport: "2" // 需要转运
      }
    };
  },
  created() {
    this.getList();
    // this.getList();
    this.checkAutoCreate();
  },
  methods: {
@@ -567,26 +563,31 @@
    },
    checkAutoCreate() {
      const query = this.$route.query;
      // 上报跳转过来进行处理
      if (query.autoCreate === "true") {
        // 自动打开案例选择弹框
        this.selectCaseOpen = true;
        this.resetCaseSearch();
        // 如果有特定的案例编号,可以预先搜索
        if (query.caseNo) {
          // this.selectCaseOpen = true;
          this.resetCaseSearch(1);
          this.caseQueryParams.caseNo = query.caseNo;
          this.searchCaseList();
          this.searchCaseList(1);
        } else {
          this.queryParams.patName = query.patName;
        }
      }
      this.getList();
    },
    /** 搜索可用案例 */
    async searchCaseList() {
    async searchCaseList(type) {
      this.caseLoading = true;
      try {
        const response = await donateList(this.caseQueryParams);
        if (response.code === 200) {
          this.availableCaseList = response.rows || response.data || [];
          this.caseTotal = response.total || 0;
          if (type == 1 && response.data[0]) {
            this.selectCase(response.data[0]);
          }
        } else {
          this.$modal.msgError(response.msg || "获取案例列表失败");
        }
@@ -599,7 +600,7 @@
    },
    /** 重置案例搜索 */
    resetCaseSearch() {
    resetCaseSearch(type) {
      this.caseQueryParams = {
        pageNum: 1,
        pageSize: 10,
@@ -608,7 +609,12 @@
        // reportStatus: "3",
        isTransport: "2"
      };
      this.searchCaseList();
      if (!type) {
        this.searchCaseList();
      } else {
        // 跨页面新增取消限制
        this.caseQueryParams.isTransport = null;
      }
    },
    /** 判断案例是否已有转运单 */
@@ -636,7 +642,7 @@
      // 打开转运单编辑页面,并传入选中的案例
      this.currentTransport = this.convertCaseToTransport(caseData);
      console.log(this.currentTransport,'currentTransport');
      console.log(this.currentTransport, "currentTransport");
      this.isEditing = false;
      this.editOpen = true;
@@ -644,7 +650,7 @@
    /** 将案例信息转换为转运单格式 */
    convertCaseToTransport(caseData) {
      console.log(caseData,'2');
      console.log(caseData, "2");
      return {
        caseNo: caseData.caseNo,
@@ -712,7 +718,7 @@
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item =>  item.id);
      this.ids = selection.map(item => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
@@ -740,7 +746,7 @@
    /** 详情按钮操作 */
    handleDetail(row) {
      this.currentTransport = row;
      this.detailTitle = `转运单详情 - ${ row.id}`;
      this.detailTitle = `转运单详情 - ${row.id}`;
      this.detailOpen = true;
    },
@@ -793,7 +799,7 @@
    async confirmAction() {
      try {
        let requestData = {
          id: this.currentTransport.id
          ...this.currentTransport
        };
        if (this.actionText === "开始") {
@@ -804,8 +810,17 @@
        const response = await transportEdit(requestData);
        if (response.code === 200) {
        if (response.code == 200) {
          this.$modal.msgSuccess(`${this.actionText}转运成功`);
          if (requestData.transitStatus==3) {
            const resappear = await donateInfo(requestData.reportId);
            if (resappear.code) {
              let obj = resappear.data;
              obj.isDonate = 1;
              await donateEdit(obj);
              this.$modal.msgSuccess(`对应上报案例已进入正式案例流程`);
            }
          }
          this.getList();
        } else {
          this.$modal.msgError(response.msg || `${this.actionText}转运失败`);