qinxianzhangyao
2024-03-15 ac6766c11f8a2b8de903b58c13a8f206fa01dccd
src/views/team/reporting/index.vue
@@ -58,8 +58,9 @@
              clearable
              v-model="createTimeList"
              @change="dateChangebirthday1"
              style="width: 240px"
              value-format="yyyy-MM-dd"
             :default-time="['00:00:00', '23:00:00']"
              format="yyyy-MM-dd HH:mm:ss"
              value-format="yyyy-MM-dd HH:mm:ss"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
@@ -212,8 +213,21 @@
  getDeptAndDwDeptByComp,
} from "@/api/team/disease";
import { listComp } from "@/api/system/comp";
import { getNewDateList } from "@/api/hosp/order";
import moment from "moment";
export default {
  data() {
    let checkPhoneNum = (rule, value, callback) => {
      console.log(value);
      let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
      if (value == "" && value == undefined && !value) {
        return callback("");
      } else if (value != undefined && value != "") {
        return callback();
      } else if (!patter.test(value)) {
        return callback("");
      }
    };
    return {
      firmId: "",
      firmDeptId: "",
@@ -279,14 +293,14 @@
        compId: [
          {
            required: true,
            message: "",
            validator: checkPhoneNum,
            trigger: "blur",
          },
        ],
        dwDeptId: [
          {
            required: true,
            message: "",
            validator: checkPhoneNum,
            trigger: "blur",
          },
        ],
@@ -295,10 +309,19 @@
  },
  created() {
    this.getDeptTree();
    this.getNowTime();
    // this.getNowTime();
    this.getcomp();
    this.getdate();
  },
  methods: {
    getdate() {
      getNewDateList().then((res) => {
        this.createTimeList = [
          moment(res.data).format("YYYY-MM-DD 00:00:00"),
          moment(res.data).format("YYYY-MM-DD 23:59:00"),
        ];
      });
    },
    /** 查询体检单位信息维护列表 */
    getcomp() {
      listComp().then((response) => {
@@ -357,7 +380,7 @@
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.page = 1;
      this.getList();
      // this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
@@ -370,9 +393,9 @@
    },
    baogao() {
      console.log(this.firmId);
        console.log(this.firmDeptId);
        this.firmId = this.compId;
        this.firmDeptId = this.dwDeptId;
      console.log(this.firmDeptId);
      this.firmId = this.compId;
      this.firmDeptId = this.dwDeptId;
      if (this.firmId === "" || this.firmDeptId === "") {
        this.$message.warning("请选择单位和单位部门!");
      } else {