From bad2bc143be3f8ddb93a1c9f984127b3ccf43e8f Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期一, 31 三月 2025 17:47:14 +0800 Subject: [PATCH] 11 --- src/views/mall/checklog/index.vue | 37 +++++++++++++++++++++++++++++++------ 1 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/views/mall/checklog/index.vue b/src/views/mall/checklog/index.vue index 3c13fd5..04bc396 100644 --- a/src/views/mall/checklog/index.vue +++ b/src/views/mall/checklog/index.vue @@ -34,8 +34,10 @@ </el-form-item> <el-form-item label="鏍搁攢鏃堕棿" prop="createTimeList"> <el-date-picker v-model="createTimeList" type="datetimerange" align="right" :picker-options="pickerOptions" - style="width: 300px" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" - value-format="yyyy-MM-dd" @change="dateChangebirthday1"> + style="width: 300px" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" + :default-time="['00:00:00', '23:59: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> @@ -211,7 +213,14 @@ addChecklog, updateChecklog, } from "@/api/mall/checklog"; - +import { + getNumber, + hasReport, + getPdf, + getOrderList, + getNewDateList, +} from "@/api/hosp/order"; +import moment from "moment"; export default { name: "Checklog", data() { @@ -323,10 +332,20 @@ }; }, created() { - this.getNowTime() - this.getList(); + // this.getNowTime() + + 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") + ];; + this.getList(); + }); + }, getNowTime() { const end = new Date(); const start = new Date(new Date().setHours(0, 0, 0, 0)); @@ -340,8 +359,14 @@ /** 鏌ヨ鏍搁攢璁板綍鍒楄〃 */ getList() { this.loading = true; - this.queryParams.startTime = this.createTimeList[0] + if(this.createTimeList){ + this.queryParams.startTime = this.createTimeList[0] this.queryParams.endTime = this.createTimeList[1] + }else if(this.createTimeList == null){ + this.queryParams.startTime = null + this.queryParams.endTime = null + } + listChecklog(this.queryParams).then((response) => { response.rows.forEach((item, index) => { item.newID = -- Gitblit v1.8.0