lkk
2024-12-16 c7b33db117fd2893d7d1c93bf5d46e87d33e44d0
src/views/system/invoice/index.vue
@@ -2,32 +2,29 @@
  <div class="app-container">
   
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="86px">
      <el-row>
        <el-col :span="5">
          <el-form-item label="姓名" prop="name" style="display: flex;">
          <el-form-item label="姓名" prop="name" >
            <el-input ref="inputName" clearable v-model="queryParams.name" placeholder="请输入姓名" @keyup.enter.native="handleQuery" />
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="体检号" prop="tjNum" style="display: flex;">
            <el-input ref="inputName"  v-model="queryParams.tjNum" placeholder="请输入体检号" @keyup.enter.native="handleQuery" @blur="handleQuery"
          <el-form-item label="体检号" prop="tjNum" >
            <el-input ref="inputName"  v-model="queryParams.tjNum" placeholder="请输入体检号" @keyup.enter.native="handleQuery" @blur="hb"
              clearable />
          </el-form-item>
        </el-col>
        <el-col :span="10">
          <el-form-item label="登记时间" prop="createTimeList" style="display: flex;" label-width="116px">
          <el-form-item label="登记时间" prop="createTimeList" label-width="116px">
            <el-date-picker clearable style="width:100%" v-model="createTimeList" @change="dateChangebirthday1"
              value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期"
               :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="开始日期"
              end-placeholder="结束日期" :picker-options="pickerOptions"></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
          </el-form-item>
        </el-col>
      </el-row>
      <!-- <el-form-item label="报告时间" prop="reportTimeList">
        <el-date-picker clearable v-model="queryParams.reportTimeList" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" value-format="yyyy-MM-dd" placeholder="请选择出报告时间" style="width: 240px">
        </el-date-picker>
@@ -55,9 +52,9 @@
        >
      </el-col> -->
      <el-col :span="1.5">
        <el-button type="primary" size="mini" :disabled="multiple" @click="print">打印发票</el-button>
        <el-button type="primary" size="small" :disabled="multiple" @click="print" style="margin-top: 3px">打印发票</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" style="margin-right: 40px"></right-toolbar>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" style="margin-right: 50px"></right-toolbar>
    </el-row>
    <template>
@@ -199,6 +196,10 @@
</template>
  
<script>
import {
  getNewDateList,
} from "@/api/hosp/order";
import moment from "moment";
import { getPrintOrderList, addOrder } from "@/api/system/invoice";
import { getwater } from "@/api/hosp/customer";
import ViewPdf from "@/components/ViewPdf";
@@ -329,8 +330,9 @@
  },
  created() {
    this.queryParams.name = this.$route.query.paramName
    this.getNowTime();
    // this.getNowTime();
    this.getList();
    this.getdate();
  },
  mounted() {
    this.$nextTick(() => {
@@ -338,6 +340,14 @@
    });
  },
  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")
          ];
      });
    },
    // / 处理默认选中当前日期
    getNowTime() {
      var curDate = new Date().getTime();
@@ -362,8 +372,14 @@
    },
    /** 查询体检记录列表 */
    getList() {
      this.queryParams.djbeginTime = this.startTime[0];
      if (this.startTime) {
        this.queryParams.djbeginTime = this.startTime[0];
      this.queryParams.djendTime = this.startTime[1];
      }else{
         this.queryParams.djbeginTime = this.createTimeList[0];
        this.queryParams.djendTime = this.createTimeList[1];
      }
      this.queryParams.type = 0;
      this.loading = true;
      getPrintOrderList(this.queryParams).then((response) => {
@@ -424,6 +440,12 @@
      };
      this.resetForm("form");
    },
    hb(){
      console.log(this.queryParams.tjNum);
       if (this.queryParams.tjNum != null) {
        this.handleQuery();
      }
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;