qx
2023-12-15 a9fad33a8c498301cead26f1649ef25c5d5370bc
src/views/doctor/examination/index.vue
@@ -25,6 +25,22 @@
          style="width: 110px"
        />
      </el-form-item>
      <el-form-item label="登记时间" prop="createTimeList">
        <el-date-picker
          v-model="createTimeList"
          type="datetimerange"
          align="right"
          :picker-options="pickerOptions"
          style="width: 310px"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          :default-time="['00:00:00', '23:00:00']"
          format="yyyy-MM-dd HH:mm"
          value-format="yyyy-MM-dd HH:mm"
          @change="dateChangebirthday1"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
@@ -91,6 +107,12 @@
            width="120px"
          />
          <el-table-column
            label="登记时间"
            align="center"
            prop="tjTime"
            width="180px"
          />
          <el-table-column
            v-if="checkStatus == '1'"
            label="审核状态"
            align="center"
@@ -116,8 +138,15 @@
              >
            </template>
          </el-table-column>
          <el-table-column label="操作" align="center">
          <el-table-column label="操作" align="center" width="120px">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                v-hasPermi="['reservation:reservation:edit']"
                @click="tongbu(scope.row)"
                >同步</el-button
              >
              <el-button
                size="mini"
                type="text"
@@ -138,8 +167,9 @@
                  scope.row.confirmStatus == 288
                "
                @click="bohui(scope.row)"
                >撤销</el-button
                >驳回</el-button
              >
            </template>
          </el-table-column>
        </el-table>
@@ -170,6 +200,7 @@
            align="center"
            prop="type"
            :show-overflow-tooltip="true"
            width="60"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.type == '0'">未检</span>
@@ -178,17 +209,13 @@
              <span v-if="scope.row.type == '3'">延期</span>
            </template>
          </el-table-column>
          <el-table-column
            label="检查医生"
            align="center"
            prop="doctorName"
            width="120"
          />
          <el-table-column
            label="收费方式"
            align="center"
            prop="sffs"
            :show-overflow-tooltip="true"
            width="80"
          />
          <el-table-column
            label="是否收费"
@@ -196,24 +223,30 @@
            prop="isPay"
            :show-overflow-tooltip="true"
          />
          <el-table-column
          <!-- <el-table-column
            label="签到时间"
            align="center"
            prop="qdcreateTime"
            width="160"
          /> -->
          <el-table-column
            label="检查医生"
            align="center"
            prop="doctorName"
            width="100"
          />
          <el-table-column
            label="保存时间"
            label="检查时间"
            align="center"
            prop="bcupdateTime"
            width="160"
          />
          <el-table-column
          <!-- <el-table-column
            label="保存医生"
            align="center"
            prop="bcdoctorName"
            width="120"
          />
          /> -->
          <el-table-column
            label="最后修改时间"
            align="center"
@@ -223,7 +256,7 @@
        </el-table>
      </div>
    </div>
    <div style="margin-right: 58%">
    <div style="margin-right: 67%">
      <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :pager-count="5" :current-page.sync="currentPage1" :current-page="page"
                :page-sizes="pageSize" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="total">
            </el-pagination> -->
@@ -239,11 +272,12 @@
</template>
<script>
import { getCsList, confirmOrder, cSWebGetPro } from "@/api/doctor/examination";
import { getCsList, confirmOrder, cSWebGetPro,dataSynchronization } from "@/api/doctor/examination";
export default {
  dicts: ["dict_tj_status"],
  data() {
    return {
      createTimeList: "",
      total: 0,
      loading: true,
      // 查询参数
@@ -269,32 +303,102 @@
      selectList: [],
      tg: true,
      bh: true,
      pickerOptions: {
        shortcuts: [
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近三个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
    };
  },
  created() {
    this.getList();
    // this.getNowTime();
  },
  methods: {
    // / 处理默认选中当前日期
    getNowTime() {
      var curDate = new Date().getTime();
      var dayNum = 7 * 24 * 3600 * 1000;
      var threeDays = curDate - dayNum;
      var sDay = this.getLocalTime(threeDays);
      var end = this.getLocalTime(curDate);
      this.createTimeList = [sDay, end];
    },
    add0(m) {
      return m < 10 ? "0" + m : m;
    },
    getLocalTime(nS) {
      var time = new Date(nS);
      var y = time.getFullYear();
      var m = time.getMonth() + 1;
      var d = time.getDate();
      var h = time.getHours();
      var mm = time.getMinutes();
      return (
        y +
        "-" +
        this.add0(m) +
        "-" +
        this.add0(d) +
        " " +
        this.add0(h) +
        ":" +
        this.add0(mm)
      );
    },
    dateChangebirthday1(val) {
      this.startTime = val;
    },
    getList() {
      this.queryParams.checkStatus = "0";
      this.loading = true;
      this.queryParams.checkStatus = this.checkStatus;
      this.queryParams.beginTime = this.createTimeList[0];
      this.queryParams.endTime = this.createTimeList[1];
      getCsList(this.queryParams).then((res) => {
        if (res.data) {
          this.exaList = res.data.customers;
          this.total = res.data.total;
        if (res.code == 200) {
          this.loading = false;
          if (this.exaList.length != 0) {
            this.$nextTick(() => {
              this.$refs.tb.toggleRowSelection(this.exaList[0], true);
            });
          if (res.data) {
            this.exaList = res.data.customers;
            this.total = res.data.total;
            if (this.exaList.length != 0) {
              this.$nextTick(() => {
                this.$refs.tb.toggleRowSelection(this.exaList[0], true);
              });
            } else {
              this.$refs.tb.clearSelection();
            }
            this.total = res.data.total;
          } else {
            this.$refs.tb.clearSelection();
            this.exaList = [];
            this.tableList = [];
          }
          this.total = res.data.total;
          this.loading = false;
        } else {
          this.exaList = [];
          this.tableList = [];
          this.loading = false;
        }
      });
    },
@@ -303,16 +407,19 @@
      this.loading = true;
      this.queryParams.checkStatus = value;
      getCsList(this.queryParams).then((response) => {
        this.exaList = response.data.customers;
        if (this.exaList.length != 0) {
          this.$nextTick(() => {
            this.$refs.tb.toggleRowSelection(this.exaList[0], true);
          });
        } else {
          this.$refs.tb.clearSelection();
        if (response.code == 200) {
          this.exaList = response.data.customers;
          if (this.exaList.length != 0) {
            this.$nextTick(() => {
              this.$refs.tb.toggleRowSelection(this.exaList[0], true);
            });
          } else {
            this.$refs.tb.clearSelection();
            this.xiangmuList = [];
          }
          this.total = response.data.total;
          this.loading = false;
        }
        this.total = response.data.total;
        this.loading = false;
      });
    },
    /** 搜索按钮操作 */
@@ -365,13 +472,24 @@
          status: "0",
        };
        confirmOrder(data).then((res) => {
          console.log(res);
          if (res.code == 200) {
            // this.$forceUpdate();
            this.getList();
            this.$modal.msgSuccess("提交成功!");
          }
        });
      });
    },
    tongbu(row) {
      let tjNumber = row.tjNumber;
      dataSynchronization(tjNumber).then((res) => {
        if (res.code == 200) {
            // this.$forceUpdate();
            this.getList();
            this.$modal.msgSuccess("同步成功!");
          }
        });
    },
    // 驳回按钮
    bohui(row) {
@@ -386,14 +504,12 @@
          status: "1",
        };
        confirmOrder(data).then((res) => {
          console.log(res);
          if (res.code == 200) {
            this.getList();
            this.$modal.msgSuccess("提交成功!");
          }
        });
      });
      console.log(this.tjNumbers);
    },
  },
};