su
su1124
2023-12-05 872aed0fd757885e3a77f71f4fdfbc38de70a3a3
src/views/system/tijian/index.vue
@@ -150,16 +150,34 @@
        <el-form :inline="true" ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="98px"
          v-show="top">
          <el-row>
            <el-col :span="9">
            <el-col :span="7">
              <el-form-item label="介绍人" prop="cusIntroduce" style="display: flex;">
                <el-input :disabled="isDisabled" v-model="form.cusIntroduce" placeholder="请输入介绍人" />
              </el-form-item>
            </el-col>
            <el-col :span="11">
            <el-col :span="7">
              <el-form-item label="工作单位" prop="company" style="display: flex;">
                <el-input style="width: 100%;" :disabled="isDisabled" v-model="form.company" placeholder="请输入工作单位" />
              </el-form-item>
            </el-col>
            <el-col :span="7">
               <el-button
                 v-show="lishi"
                  type="primary"
                  @click="cope"
                  size="mini"
                  >一键复制</el-button
                >
                <el-button
                  type="primary"
                  @click="inputChange"
                  v-show="lishi"
                  size="mini"
                  :disabled="confirm"
                  >历史体检记录</el-button
                >
            </el-col>
          </el-row>
        </el-form>
@@ -615,6 +633,53 @@
        <el-button type="primary" @click="beat = false">确 定</el-button>
      </span> -->
    <!-- </el-dialog> -->
    <el-drawer
      title="历史体检记录"
      :visible.sync="table"
      direction="rtl"
      size="50%"
    >
      <el-table :data="HistoryList" style="width: 95%; margin-left: 20px">
        <el-table-column
          property="tjNum"
          label="体检号"
          align="center"
          :show-overflow-tooltip="true"
        ></el-table-column>
        <el-table-column
          property="userName"
          label="姓名"
          align="center"
          :show-overflow-tooltip="true"
        ></el-table-column>
        <el-table-column
          property="tjTime"
          label="体检时间"
          align="center"
          :show-overflow-tooltip="true"
        ></el-table-column>
        <el-table-column
          property="tjProName"
          label="体检项目"
          align="center"
          :show-overflow-tooltip="true"
        ></el-table-column>
      </el-table>
    </el-drawer>
    <el-dialog
      title="提示"
      :visible.sync="dialogVisiblese"
      width="30%"
      :before-close="handleClose"
    >
      <span>需要复制最近一次的体检项目吗?</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisiblese = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisiblese = false"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>
@@ -634,7 +699,8 @@
  getTransitionList,
  getByTeamNo,
  getLoadFile,
  getIsRequired
  getIsRequired,
  getHistryTjOrderByCusIdCard
} from "@/api/system/tijian";
import { MessageBox } from "element-ui";
import VTreeTransfer from './TreeTransfer.vue'
@@ -658,6 +724,10 @@
  },
  data() {
    return {
      dialogVisiblese:false,
      lishi: false,
      table: false,
      HistoryList: {},
      index: 0,
      dictType: [
        {
@@ -951,10 +1021,35 @@
          this.form.cusBrithday = birthday;
          this.form.age = age;
        }
        let cusIdCard = this.form.cusIdcard;
        getHistryTjOrderByCusIdCard(cusIdCard).then((res) => {
          if (res.code == 200) {
            this.table = true;
            this.lishi = true;
            this.HistoryList = res.data;
          }
        });
      } else {
        return false;
      }
    },
    cope(){
      let cusIdCard = this.form.cusIdcard;
      getHistryTjOrderByCusIdCard(cusIdCard).then((res) => {
            if(res.data.length != 0){
              this.dialogVisiblese = true;
            }else{
              this.$message.warning('暂无历史体检记录!');
            }
        });
    },
     handleClose(done) {
        this.$confirm('确认关闭?')
          .then(_ => {
            done();
          })
          .catch(_ => {});
      },
    getCompetence() {
      var _this = this;
      _this.hide = false;