From 2e5fdbffc7a581a32368d3bd9a64ecdeb6b463b0 Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期一, 30 十二月 2024 18:13:36 +0800
Subject: [PATCH] 1

---
 src/views/system/tijian/index.vue   |   46 ++++++++---
 src/components/selectName/index.vue |  154 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 188 insertions(+), 12 deletions(-)

diff --git a/src/components/selectName/index.vue b/src/components/selectName/index.vue
new file mode 100644
index 0000000..d180e54
--- /dev/null
+++ b/src/components/selectName/index.vue
@@ -0,0 +1,154 @@
+<template>
+    <div>
+        <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
+            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px" v-if="openone != 2"> 
+                <el-form-item label="濮撳悕" prop="pacCode">
+                    <el-input v-model="queryParams.pacCode" placeholder="璇疯緭鍏ュ鍚�" clearable @keyup.enter.native="handleQuery"
+                        style="width: 120px;" />
+                </el-form-item>
+                <el-form-item label="鎬у埆" prop="pacName">
+                    <el-input v-model="queryParams.pacName" placeholder="璇疯緭鍏ユ�у埆" clearable @keyup.enter.native="handleQuery"
+                        style="width: 130px;" />
+                </el-form-item>
+                <el-form-item label="鐢佃瘽鍙�" prop="pacRemark">
+                    <el-input v-model="queryParams.pacRemark" placeholder="璇疯緭鍏ョ數璇濆彿" clearable
+                        @keyup.enter.native="handleQuery" style="width: 130px;" />
+                </el-form-item>
+                <el-form-item label="韬唤璇佸彿" prop="pacRemark">
+                    <el-input v-model="queryParams.pacRemark" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable
+                        @keyup.enter.native="handleQuery" style="width: 130px;" />
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+                </el-form-item>
+            </el-form>
+            <el-table :data="dataList" ref="elTable" v-loading="loading" @selection-change="handleSelectionChange" border
+                height="320px">
+                <el-table-column type="selection" width="40" align="center" />
+                <el-table-column label="搴忓彿" prop="xh" align="center" />
+                <el-table-column label="缂栫爜" align="center" prop="pacCode" />
+                <el-table-column label="鍚嶇О" align="center" prop="pacName" width="100px" />
+                <el-table-column label="鎷奸煶鐮�" align="center" prop="detail" width="100px" />
+                <el-table-column label="鍐呭" align="center" prop="pacRemark" />
+                <el-table-column label="澶囨敞" align="center" prop="price" />
+            </el-table>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="open = false">鍙� 娑�</el-button>
+                <el-button type="primary" @click="handleOk">纭� 瀹�</el-button>
+            </span>
+        </el-dialog>
+
+    </div>
+</template>
+  
+<script>
+import {
+    Packagestlist, newGetTjPat, getTjYxjcList
+} from "@/api/system/package";
+import { getConfigKey } from "@/api/system/config";
+export default {
+    name: 'Packages',
+    props: {
+        baogao: {
+            type: Array,
+        }
+
+    },
+    data() {
+        return {
+            open: false,
+            openone: 0,
+            // 寮瑰嚭灞傛爣棰�
+            title: "",
+            dataList: [],
+            // 閬僵灞�
+            loading: false,
+            form: {
+                desc: ""
+            },
+            queryParams: {
+                pacCode: "",
+                pacName: "",
+                pacRemark: "",
+            },
+            list: [],
+            fList: {}
+        };
+    },
+    watch: {
+        'baogao'(val, newVla) {
+            this.openone = 2
+            // console.log(val, newVla)
+            this.dataList = val
+            // console.log(this.dataList);
+
+        }
+
+    },
+    mounted() {
+        // this.getList()
+    },
+
+    created() {
+        // this.getList()
+    },
+    methods: {
+        getbaogaoList() {
+
+        },
+        getAllList() {
+            this.loading = true
+            this.openone = 1
+            newGetTjPat(this.queryParams).then(res => {
+                this.dataList = res.data
+                this.loading = false
+            })
+        },
+        getList() {
+            this.openone = 0
+            this.loading = true
+            Packagestlist(this.queryParams).then(res => {
+                this.dataList = res.rows
+                this.loading = false
+            })
+        },
+        handleQuery() {
+            if (this.openone == 0) {
+                this.getList()
+            } else if (this.openone == 1) {
+                this.getAllList()
+            } else if (this.openone == 2) {
+                this.loading = true
+                getTjYxjcList(this.queryParams).then(res => {
+                    this.dataList = res.data
+                    this.loading = false
+                })
+            }
+        },
+        handleSelectionChange(selection) {
+            if (selection.length > 1) {
+                this.$refs.elTable.clearSelection(); // 娓呯┖鎵�鏈夐�夋嫨
+                this.$refs.elTable.toggleRowSelection(selection.pop()); // 璁剧疆閫夋嫨椤�
+            }
+            this.list = selection;
+        },
+        handleOk() {
+            this.open = false
+            if (this.list.length == 1) {
+                if (this.openone == 2) {
+                    let configKey = "pacsUrl";
+                    getConfigKey(configKey).then((res) => {
+                        window.open(res.msg+"?"+"colid0="+"202"+"&colvalue0="+this.list[0].xh+"&colid1="+"903"+"&colvalue1="+"2", "_blank");
+                    });
+                } else {
+                    this.$emit('add', this.list);
+                }
+            }
+
+        }
+    }
+}
+</script>
+  
+<style scoped></style>
+  
\ No newline at end of file
diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index 3a8821d..2b6af1b 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -135,10 +135,11 @@
                 },
               ]"
             >
-            <span
+            <!-- style="display: inline-block; border-bottom: 2px solid blue"
+            @click="openname" -->
+              <span
                 slot="label"
-                style="display: inline-block; border-bottom: 2px solid blue"
-                @click="openname"
+              
               >
                 濮撳悕
               </span>
@@ -1087,13 +1088,30 @@
             </div>
           </el-dialog>
 
-          <div style="display: flex; align-items: flex-end;margin-bottom: 10px">
-            <div style="margin-left: 46px;font-size:16px;">
-              宸查�夐」鐩潯鏁帮細0鏉�
+          <div
+            style="
+              display: flex;
+              align-items: center;
+              justify-content: flex-start;
+              width: 100%;
+            "
+          >
+            <div
+              style="
+                white-space: nowrap;
+                overflow: hidden;
+                text-overflow: ellipsis;
+              margin-left: 46px
+                font-size: 16px;
+                margin-right: 20px;
+              "
+            >
+              {{ this.tableData1[0].pacName || "" }} 宸查�夐」鐩潯鏁帮細<span
+                style="font-weight: 700; color: red; margin-right: 5px"
+                >{{ this.tableData1.length || 0 }}</span
+              >鏉�
             </div>
-            <div style="margin-left: 242px;font-size:26px;font-weight: 700">
-              宸查�夐」鐩垪琛�
-            </div>
+            宸查�夐」鐩垪琛�
           </div>
           <div
             style="
@@ -1115,8 +1133,6 @@
                   <template slot="title">
                     <div style="width: 70%">
                       {{
-                        item.pacName +
-                        ":" +
                         item.parentName +
                         " (搴旀敹閲戦:" +
                         item.ordPrice +
@@ -1488,10 +1504,12 @@
       </span>
     </el-dialog>
     <Packages ref="aaa" @add="handleChanges" />
+    <selectName ref="bbb" />
   </div>
 </template>
 
 <script>
+import selectName from "@/components/selectName";
 import { dataURLtoFile, random } from "./file";
 import { getInfo } from "@/api/login";
 import {
@@ -1545,6 +1563,7 @@
     VTreeTransfer,
     historyTj,
     Packages,
+    selectName,
   },
   data() {
     return {
@@ -1814,7 +1833,10 @@
   mounted() {},
 
   methods: {
-    openname: {},
+    openname() {
+      this.$refs.bbb.open = true;
+      this.$refs.bbb.title = "123";
+    },
     getCompanyList() {
       this.loading = true;
       getconfigKey("team_reservation_default_day").then((res) => {

--
Gitblit v1.8.0