From ac6766c11f8a2b8de903b58c13a8f206fa01dccd Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期五, 15 三月 2024 17:56:32 +0800 Subject: [PATCH] qxtj --- src/views/hosp/order/index.vue | 174 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 127 insertions(+), 47 deletions(-) diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue index 0792d34..8aabe19 100644 --- a/src/views/hosp/order/index.vue +++ b/src/views/hosp/order/index.vue @@ -26,6 +26,7 @@ style="width: 170px" clearable @keyup.enter.native="handleQuery" + @blur="hb" /> </el-form-item> <el-form-item label="鐧昏鏃堕棿" prop="createTimeList"> @@ -37,7 +38,7 @@ style="width: 300px" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" - :default-time="['00:00:00', '23:00:00']" + :default-time="['00:00:00', '23:59:00']" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" @change="dateChangebirthday1" @@ -171,6 +172,7 @@ <template slot-scope="scope"> <span v-if="scope.row.tjCustomerSex == '0'">鐢�</span> <span v-if="scope.row.tjCustomerSex == '1'">濂�</span> + <span v-if="scope.row.tjCustomerSex == '2'">鏈煡</span> </template> </el-table-column> <el-table-column @@ -318,6 +320,15 @@ title="浣撴鎶ュ憡" @click="viewReport(scope.row)" ></el-button> --> + <!-- <el-button + type="text" + size="mini" + class="btn" + icon="el-icon-view" + title="涓汉淇℃伅琛�" + v-if="scope.row.tjCategory == '02'" + @click="viewReport(scope.row)" + ></el-button> --> <el-button type="text" @@ -401,21 +412,30 @@ <el-dialog :title="title" :visible.sync="Projectopen" - width="980px" + width="1200px" style="height: 860px" append-to-body > <el-row type="flex" class="row-bg" justify="space-around"> <el-col :span="6"> - <div style="text-align: center; margin-bottom: 10px;margin-top:10px">椤圭洰鍒楄〃</div> + <div + style="text-align: center; margin-bottom: 10px; margin-top: 10px" + > + 椤圭洰鍒楄〃 + </div> + <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="filterText"> + </el-input> <div class="tab3"> <div class="outside1"> <el-tree + v-loading="loading" :data="Treedata" show-checkbox node-key="proId" :props="defaultProps" @check-change="handleCurrentChecked" + :filter-node-method="filterNode" + ref="tree" > </el-tree> </div> @@ -547,28 +567,38 @@ <el-dialog :title="title" :visible.sync="Projectopen1" - width="980px" + width="1200px" style="height: 860px" append-to-body > <el-row type="flex" class="row-bg" justify="space-around"> - <el-col :span="6"> - <div style="text-align: center; margin-bottom: 10px;margin-top:10px">椤圭洰鍒楄〃</div> + <el-col :span="8"> + <div + style="text-align: center; margin-bottom: 10px; margin-top: 10px" + > + 椤圭洰鍒楄〃 + </div> + <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="filterText"> + </el-input> <div class="tab3"> <div class="outside1"> <el-tree + class="filter-tree" + v-loading="loading" :data="Treedata" show-checkbox node-key="proId" :props="defaultProps" @check-change="handleCurrentChecked" + :filter-node-method="filterNode" + ref="tree" > </el-tree> </div> </div> </el-col> - <el-col :span="18"> + <el-col :span="15"> <div class="grid-content bg-purple"> <template> <el-form :model="form"> @@ -724,14 +754,13 @@ <script> import { - listOrder, getNumber, - hasReportEnd, hasReport, - gettoPdf, getPdf, getOrderList, + getNewDateList, } from "@/api/hosp/order"; +import moment from "moment"; import { getwater } from "@/api/hosp/customer"; import ViewPdf from "@/components/ViewPdf"; import { projectGetList, getaddtTransition } from "@/api/system/tijian"; @@ -743,6 +772,7 @@ name: "Order", data() { return { + filterText: "", orderIds: "", tjnumbers: "", cusIds: "", @@ -851,9 +881,15 @@ }, }; }, + watch: { + filterText(val) { + this.$refs.tree.filter(val); + }, + }, created() { - this.getNowTime(); - this.getList(); + // this.getNowTime(); + + this.getdate(); }, mounted() { this.$nextTick(() => { @@ -861,37 +897,53 @@ }); }, methods: { + getdate() { + getNewDateList().then((res) => { + if(res.data){ + this.createTimeList = [ + moment(res.data).format("YYYY-MM-DD 00:00:00"), + moment(res.data).format("YYYY-MM-DD 23:59:00") + ]; + this.getList(); + } + + }); + }, + filterNode(value, data) { + if (!value) return true; + return data.proName.indexOf(value) !== -1; + }, // / 澶勭悊榛樿閫変腑褰撳墠鏃ユ湡 - getNowTime() { - var curDate = new Date(new Date().setHours(0, 0, 0, 0)).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) - ); - }, + // getNowTime() { + // var curDate = new Date(new Date().setHours(0, 0, 0, 0)).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; }, @@ -900,10 +952,18 @@ }, /** 鏌ヨ浣撴璁板綍鍒楄〃 */ getList() { - this.queryParams.djbeginTime = this.startTime[0]; - this.queryParams.djendTime = this.startTime[1]; - this.queryParams.bgbeginTime = this.startTime1[0]; - this.queryParams.bgendTime = this.startTime1[1]; + 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]; + } + if (this.startTime1) { + this.queryParams.bgbeginTime = this.startTime1[0]; + this.queryParams.bgendTime = this.startTime1[1]; + } + this.loading = true; getOrderList(this.queryParams).then((response) => { this.orderList = response.data.list; @@ -1004,6 +1064,7 @@ }, // 琛ㄥ崟閲嶇疆 reset() { + this.form = { orderId: null, userId: null, @@ -1029,6 +1090,11 @@ }; this.resetForm("form"); }, + hb() { + if (this.queryParams.tjNum != undefined) { + this.handleQuery(); + } + }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { this.queryParams.pageNum = 1; @@ -1036,6 +1102,9 @@ }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { + this.startTime = [] + this.startTime1 = [] + this.createTimeList = [] this.resetForm("queryForm"); this.handleQuery(); }, @@ -1088,6 +1157,7 @@ // 琛ュ綍椤圭洰 handleProject(row) { + this.loading = true; this.orderId = row.orderId; this.cusId = row.tjCusIdCard; this.userId = row.userId; @@ -1105,12 +1175,14 @@ /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */ projectGetList().then((response) => { this.Treedata = response.data.list; + this.loading = false; }); this.Projectopen = true; this.title = "琛ュ綍椤圭洰"; }, // 琛ュ綍椤圭洰 handleProject1(row) { + this.loading = true; this.orderId = this.ids; this.cusId = this.cusIds; this.userId = this.userIds; @@ -1128,6 +1200,7 @@ /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */ projectGetList().then((response) => { this.Treedata = response.data.list; + this.loading = false; }); this.Projectopen1 = true; this.title = "琛ュ綍椤圭洰"; @@ -1163,7 +1236,9 @@ this.list1 = false; this.DataList.forEach((item) => { this.TotalPrice1 = item.proPrice + this.TotalPrice1; - this.proIds.push(item.proId); + item.tjProjectList.forEach((item1) => { + this.proIds.push(item1.proId); + }); }); } }, @@ -1340,6 +1415,11 @@ margin-top: 8px; } +.tab3 { + max-height: 500px; + overflow-y: auto; +} + .outside1 { width: 700px; display: flex; -- Gitblit v1.8.0