qinxianzhangyao
2023-10-19 45b297a5943cc7b68b03acde46ec317431402066
src/views/hosp/settlement/index.vue
@@ -2,10 +2,12 @@
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
      <el-form-item label="收费员" prop="tollCollectorName">
        <el-input v-model="queryParams.tollCollectorName" placeholder="请输入收费员" clearable @keyup.enter.native="handleQuery"/>
        <el-input v-model="queryParams.tollCollectorName" placeholder="请输入收费员" clearable @keyup.enter.native="handleQuery"
          style="width: 120px;" />
      </el-form-item>
      <el-form-item label="结账时间" prop="tollCollectorName">
        <el-date-picker v-model="value1" type="datetimerange" start-placeholder="起止日期" end-placeholder="终止日期" :default-time="['12:00:00']">
        <el-date-picker v-model="value1" type="datetimerange" start-placeholder="起止日期" end-placeholder="终止日期"
          :default-time="['12:00:00']">
        </el-date-picker>
      </el-form-item>
    </el-form>
@@ -15,10 +17,11 @@
        <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleUpdate">统计</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-check" size="mini" @click="handlesettle" :disabled="discode === 200 ? true : false"  >结账</el-button>
        <el-button type="primary" icon="el-icon-check" size="mini" @click="handlesettle"
          :disabled="discode === 200 ? true : false">结账</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" size="mini"  @click="handleabout">日结查询</el-button>
        <el-button type="primary" size="mini" @click="handleabout">日结查询</el-button>
      </el-col>
    </el-row>
@@ -30,25 +33,19 @@
      <el-table-column label="实收金额" align="center" prop="paidIn" width="90px" />
      <el-table-column label="付款状态" align="center" prop="payStasus" width="100px" />
      <el-table-column label="付款方式" align="center" prop="payType" width="100px" />
      <el-table-column label="收费员" align="center" prop="updateBy" width="140px"/>
      <el-table-column label="收费时间" align="center" prop="updateTime" width="180px"/>
      <el-table-column label="收费员" align="center" prop="updateBy" width="140px" />
      <el-table-column label="收费时间" align="center" prop="updateTime" width="180px" />
      <el-table-column label="退费时间" align="center" prop="refundTime" width="200px" />
    </el-table>
    <div class="pag">
          <div class="pag1">
            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
              :limit.sync="queryParams.pageSize" @pagination="handleUpdate"  />
          </div>
        </div>
      <div class="pag1">
        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
          @pagination="handleUpdate" />
      </div>
    </div>
    <el-table
      border
      :data="allList"
      style="margin-top: 30px; width: 75%"
      :summary-method="getSummaries"
      show-summary
    >
    <el-table border :data="allList" style="margin-top: 30px; width: 75%" :summary-method="getSummaries" show-summary>
      <el-table-column label="付款方式" align="center" prop="paytpe" />
      <el-table-column label="收费金额" align="center" prop="vo.shoukuan">
      </el-table-column>
@@ -59,7 +56,7 @@
</template>
<script>
import { getLastTime, getList, collector } from "@/api/hosp/water";
import { getLastTime, getList, collector, getNewDate } from "@/api/hosp/water";
import { getInfo } from "@/api/login";
import moment from "moment";
@@ -127,32 +124,25 @@
      getLastTime().then((response) => {
        if (response.code === 200) {
          this.time = response.data;
          this.value1 = [
            moment(this.time).format("YYYY-MM-DD HH:mm:ss"),
            new Date(new Date().getTime() + 8 * 3600 * 1000)
              .toJSON()
              .substr(0, 19)
              .replace("T", " "),
          ];
        } else {
          this.time = response.msg;
          this.value1 = [
            this.time,
            new Date(new Date().getTime() + 8 * 3600 * 1000)
              .toJSON()
              .substr(0, 19)
              .replace("T", " "),
          ];
          getNewDate().then((response) => {
            if (response.code === 200) {
              this.value1 = [
                moment(this.time).format("YYYY-MM-DD HH:mm:ss"),
                moment(response.data).format("YYYY-MM-DD HH:mm:ss")
              ];
            }
          });
        }
      });
    },
    /** 统计 */
    handleUpdate() {
      this.loading = true;
      let data = {
        pageNum:this.queryParams.pageNum,
        pageSize:this.queryParams.pageSize,
        pageNum: this.queryParams.pageNum,
        pageSize: this.queryParams.pageSize,
        userId: this.userId.toString(),
        beginTime: moment(this.time).format("YYYY-MM-DD HH:mm:ss"),
        endTime: new Date(new Date().getTime() + 8 * 3600 * 1000)