lkk
2024-12-05 b977b7e4b46d14ee407f4d8f07b4c818b19b87be
lkk-12-05
2个文件已修改
88 ■■■■ 已修改文件
src/views/sampling/sampling/index.vue 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/comp/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sampling/sampling/index.vue
@@ -86,8 +86,12 @@
          @input="radioChange"
          style="margin: 10px 15px"
        >
          <el-radio-button label="1" :disabled="qiehuan && disabledId === 0">未采样</el-radio-button>
          <el-radio-button label="0" :disabled="qiehuan && disabledId === 1">已采样</el-radio-button>
          <el-radio-button label="1" :disabled="qiehuan && disabledId === 0"
            >未采样</el-radio-button
          >
          <el-radio-button label="0" :disabled="qiehuan && disabledId === 1"
            >已采样</el-radio-button
          >
        </el-radio-group>
      </el-col>
      <el-col
@@ -107,7 +111,7 @@
        <el-button type="primary" :disabled="!disabled" @click="Cancellation"
          >撤销合并</el-button
        >
        <el-button type="primary" @click="Confirmreceipt">采样打码</el-button>
        <el-button type="primary" @click="Confirmreceipt" :disabled="!selectList.length">采样打码</el-button>
      </el-col>
      <el-col
        :span="12"
@@ -476,19 +480,14 @@
      );
    },
    qiehuan() {
      return (
        this.selectList.length > 0
      );
      return this.selectList.length > 0;
    },
    disabledId() {
      return (
        this.tjStatus == "1" ? 1 :  0
      );
      return this.tjStatus == "1" ? 1 : 0;
    },
  },
  methods: {
    getTruncatedName(proName) {
      // 去掉所有空格
      const trimmedProName = proName.replace(/\s+/g, "");
@@ -708,7 +707,7 @@
      // 只有一个人被选中时进行操作
      if (selection.length === 1) {
        const selectedPerson = selection[0]; // 获取选中的那个人
        const tjNumber = selectedPerson.tjNumber;
        const tjNumber = selectedPerson.tjNumber;
        console.log(selectedPerson.tjNumber, 6363);
        this.fetchData(tjNumber);
@@ -776,7 +775,7 @@
            this.$message.success("合并成功。");
            // console.log("合并的行:", this.selectedRows);
            // this.getList();
            this.fetchData(this.selectedRows[0].cusId);
            this.fetchData(this.selectedRows[0].tjNumber);
          });
        } else {
          this.$message.error("标本类型不一致,无法合并!");
@@ -805,7 +804,7 @@
            this.$message.success("撤销成功!");
            // 刷新数据列表或进行其他操作
            // this.getList();
            this.fetchData(this.selectedRows[0].cusId);
            this.fetchData(this.selectedRows[0].tjNumber);
          } else {
            this.$message.error(res.msg || "撤销失败,请重试!");
          }
@@ -817,9 +816,9 @@
    /** 点击补打条码按钮 **/
    async Collection() {
      // console.log("selectList:", this.selectList);
      // console.log("selectList:", this.selectList);
      const jyxh = this.selectList.map((item) => item.jyxh);
      console.log("jyxh:", jyxh);
      console.log("jyxh:", jyxh);
      try {
        // 请求接口并获取宽度值
        const widthResponse = await getTxmkd();
@@ -1005,7 +1004,7 @@
          // this.getList();
        })
        .catch((error) => {
          this.$message.error("采样失败");
          // this.$message.error("采样失败");
        })
        .finally(() => {
          loadingInstance.close();
@@ -1014,41 +1013,33 @@
    // 单选按钮
    radioChange(value) {
      if (this.selectList.length > 0) {
        alert("已选中后禁止切换");
      } else {
        console.log("切换");
        this.loading = true;
        this.queryParams.isSignFor = value;
        getList(this.queryParams).then((response) => {
          if (response.data) {
            if (response.data.list == null) {
              this.samplingList = [];
              this.tableList = [];
              this.loading = false;
            } else {
              this.samplingList = response.data.list;
              this.loading = false;
              if (this.samplingList.length != 0) {
                this.$nextTick(() => {
                  this.$refs.tb.toggleRowSelection(this.samplingList[0], true);
                });
              } else {
                this.$refs.tb.clearSelection();
              }
            }
            this.total = response.data.total;
            this.loading = false;
          } else {
      this.loading = true;
      this.queryParams.isSignFor = value;
      getList(this.queryParams).then((response) => {
        if (response.data) {
          if (response.data.list == null) {
            this.samplingList = [];
            this.tableList = [];
            this.loading = false;
          } else {
            this.samplingList = response.data.list;
            this.loading = false;
            if (this.samplingList.length != 0) {
              this.$nextTick(() => {
                this.$refs.tb.toggleRowSelection(this.samplingList[0], true);
              });
            } else {
              this.$refs.tb.clearSelection();
            }
          }
        });
      }
          this.total = response.data.total;
          this.loading = false;
        } else {
          this.samplingList = [];
          this.tableList = [];
          this.loading = false;
        }
      });
    },
    // 默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 }
src/views/system/comp/index.vue
@@ -1185,6 +1185,9 @@
    // 维护部门
    mainDepartment() {
      this.opens = true;
      this.groupingList = [];
      if (this.form.drugManufacturerId) {
        this.beCurrentDept();
      }