From 1fc3fe586a17f5ddf6717f58d1fb1e5a0a9c48f7 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期五, 08 三月 2024 14:19:44 +0800 Subject: [PATCH] qxtj --- src/views/hosp/order/index.vue | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 39 insertions(+), 10 deletions(-) diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue index d44f9b4..6dc1de9 100644 --- a/src/views/hosp/order/index.vue +++ b/src/views/hosp/order/index.vue @@ -7,7 +7,7 @@ </el-form-item> <el-form-item label="浣撴鍙�" prop="tjNum"> <el-input ref="inputName" v-model="queryParams.tjNum" placeholder="璇疯緭鍏ヤ綋妫�鍙�" style="width: 170px" clearable - @keyup.enter.native="handleQuery" /> + @keyup.enter.native="handleQuery" @blur="hb" /> </el-form-item> <el-form-item label="鐧昏鏃堕棿" prop="createTimeList"> <el-date-picker v-model="createTimeList" type="datetimerange" align="right" :picker-options="pickerOptions" @@ -69,6 +69,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 label="骞撮緞" align="center" prop="tjCustomerAge" width="55px" :show-overflow-tooltip="true" /> @@ -202,10 +203,12 @@ <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-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="filterText"> + </el-input> <div class="tab3"> <div class="outside1"> - <el-tree :data="Treedata" show-checkbox node-key="proId" :props="defaultProps" - @check-change="handleCurrentChecked"> + <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> </div> @@ -291,20 +294,23 @@ </el-dialog> <!-- 娣诲姞琛ュ綍椤圭洰 --> - <el-dialog :title="title" :visible.sync="Projectopen1" width="980px" style="height: 860px" append-to-body> + <el-dialog :title="title" :visible.sync="Projectopen1" width="1200px" style="height: 860px" append-to-body> <el-row type="flex" class="row-bg" justify="space-around"> - <el-col :span="6"> + <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 :data="Treedata" show-checkbox node-key="proId" :props="defaultProps" - @check-change="handleCurrentChecked"> + + <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"> @@ -445,6 +451,7 @@ name: "Order", data() { return { + filterText: '', orderIds: "", tjnumbers: "", cusIds: "", @@ -553,6 +560,11 @@ }, }; }, + watch: { + filterText(val) { + this.$refs.tree.filter(val); + } + }, created() { this.getNowTime(); this.getList(); @@ -563,6 +575,10 @@ }); }, methods: { + 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(); @@ -736,6 +752,11 @@ }; this.resetForm("form"); }, + hb() { + if (this.queryParams.tjNum != undefined) { + this.handleQuery(); + } + }, /** 鎼滅储鎸夐挳鎿嶄綔 */ handleQuery() { this.queryParams.pageNum = 1; @@ -795,6 +816,7 @@ // 琛ュ綍椤圭洰 handleProject(row) { + this.loading = true; this.orderId = row.orderId; this.cusId = row.tjCusIdCard; this.userId = row.userId; @@ -812,12 +834,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; @@ -835,6 +859,7 @@ /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */ projectGetList().then((response) => { this.Treedata = response.data.list; + this.loading = false; }); this.Projectopen1 = true; this.title = "琛ュ綍椤圭洰"; @@ -866,7 +891,6 @@ // } this.TotalPrice1 = 0; this.proIds = []; - console.log(this.DataList) if (this.DataList.length != 0) { this.list1 = false; this.DataList.forEach((item) => { @@ -874,7 +898,7 @@ item.tjProjectList.forEach(item1 => { this.proIds.push(item1.proId); }) - + }); } }, @@ -1051,6 +1075,11 @@ margin-top: 8px; } +.tab3 { + max-height: 500px; + overflow-y: auto; +} + .outside1 { width: 700px; display: flex; -- Gitblit v1.8.0