From c619aad083ed22c4f591e7d84f6eb5cd0e227b40 Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期五, 22 十二月 2023 15:43:39 +0800
Subject: [PATCH] qxtj

---
 src/views/system/tijian/index.vue  |  202 ++++++++++++++++++++++------------------
 src/views/system/biol/index.vue    |    4 
 src/api/system/tijian.js           |    7 +
 src/components/Packages/index.vue  |   43 +++++---
 src/views/system/package/index.vue |    2 
 src/api/system/package.js          |    9 +
 6 files changed, 158 insertions(+), 109 deletions(-)

diff --git a/src/api/system/package.js b/src/api/system/package.js
index 6347210..17da341 100644
--- a/src/api/system/package.js
+++ b/src/api/system/package.js
@@ -99,3 +99,12 @@
     params: query
   })
 }
+
+
+export function newGetTjPat(query) {
+  return request({
+    url: '/sqlserver/getdata/newGetTjPat',
+    method: 'get',
+    params: query
+  })
+}
diff --git a/src/api/system/tijian.js b/src/api/system/tijian.js
index cbefa47..2581c1a 100644
--- a/src/api/system/tijian.js
+++ b/src/api/system/tijian.js
@@ -141,3 +141,10 @@
    
   })
 }
+
+export function getconfigKey(configKey) {
+  return request({
+    url: '/system/config/configKey/' + configKey,
+    method: 'get'
+  })
+}
diff --git a/src/components/Packages/index.vue b/src/components/Packages/index.vue
index 0d93371..b62490b 100644
--- a/src/components/Packages/index.vue
+++ b/src/components/Packages/index.vue
@@ -2,16 +2,16 @@
     <div>
         <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
             <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
-                <el-form-item label="濂楅缂栫爜" prop="pacCode">
-                    <el-input v-model="queryParams.pacCode" placeholder="璇疯緭鍏ュ椁愮紪鐮�" clearable
+                <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
+                <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
+                <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>
@@ -21,12 +21,12 @@
             <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="搴忓彿" type="index" width="80px" />
-                <el-table-column label="濂楅缂栫爜" align="center" prop="pacCode" />
-                <el-table-column label="濂楅鍚嶇О" align="center" prop="pacName" />
+                <el-table-column label="搴忓彿" width="80px" prop="xh"/>
+                <el-table-column label="缂栫爜" align="center" prop="pacCode" />
+                <el-table-column label="鍚嶇О" align="center" prop="pacName" />
                 <el-table-column label="鎷奸煶鐮�" align="center" prop="detail" />
-                <el-table-column label="濂楅浠锋牸" align="center" prop="price" />
-                <el-table-column label="濂楅鍐呭" align="center" prop="pacRemark" />
+                <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>
@@ -39,7 +39,7 @@
   
 <script>
 import {
-    Packagestlist
+    Packagestlist,newGetTjPat
 } from "@/api/system/package";
 export default {
     name: 'Packages',
@@ -52,6 +52,7 @@
     data() {
         return {
             open: false,
+            openone:false,
             // 寮瑰嚭灞傛爣棰�
             title: "",
             dataList: [],
@@ -79,21 +80,31 @@
 
     },
     mounted() {
-        this.getList()
+        // this.getList()
     },
 
     created() {
-        this.getList()
+        // this.getList()
     },
     methods: {
+        getAllList(){
+            this.openone = true
+            newGetTjPat(this.queryParams).then(res => {
+                this.dataList = res.data
+            })
+        },
         getList() {
+            this.openone = false
             Packagestlist(this.queryParams).then(res => {
                 this.dataList = res.rows
             })
         },
         handleQuery() {
-            this.getList()
-
+            if(this.openone == false){
+                this.getList()
+            }else  if(this.openone == true){
+                this.getAllList()
+            }
         },
         handleSelectionChange(selection) {
             if (selection.length > 1) {
diff --git a/src/views/system/biol/index.vue b/src/views/system/biol/index.vue
index 4942577..3d69df6 100644
--- a/src/views/system/biol/index.vue
+++ b/src/views/system/biol/index.vue
@@ -78,8 +78,8 @@
         <el-table-column label="浣撴绫诲瀷" align="center" prop="tjType" height="10px" width="80px"
           :show-overflow-tooltip="true">
           <template slot-scope="scope">
-            <span v-if="scope.row.tjType == '1'">涓汉</span>
-            <span v-if="scope.row.tjType == '2'">鍥㈤槦</span>
+            <span v-if="scope.row.tjType == '1'">鍥㈤槦</span>
+            <span v-if="scope.row.tjType == '2'">涓汉</span>
           </template>
         </el-table-column>
         <el-table-column label="浣撴鍙�" align="center" prop="tjNumber" :show-overflow-tooltip="true" width="160px" />
diff --git a/src/views/system/package/index.vue b/src/views/system/package/index.vue
index 7e78dcd..3414381 100644
--- a/src/views/system/package/index.vue
+++ b/src/views/system/package/index.vue
@@ -759,7 +759,7 @@
     handlePackage() {
       this.$refs.aaa.open = true;
       this.$refs.aaa.getList();
-      this.$refs.aaa.title = "濂楅鍚嶇О";
+      this.$refs.aaa.title = "濂楅瀛楀吀";
     },
     handleChanges(param1) {
       this.form.pacName = param1[0].pacName;
diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index ce4ede2..95a16bd 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -653,6 +653,7 @@
         <el-button type="primary" @click="copes">纭� 瀹�</el-button>
       </span>
     </el-dialog>
+    <Packages ref="aaa" @add="handleChanges" />
   </div>
 </template>
 
@@ -677,9 +678,10 @@
   getTransitionList,
   getByTeamNo,
   getLoadFile,
-  getIsRequired,
+  getIsRequired, getconfigKey,
   getHistryTjOrderProByCusIdCard,
 } from "@/api/system/tijian";
+import Packages from "@/components/Packages";
 import { MessageBox } from "element-ui";
 import VTreeTransfer from "./TreeTransfer.vue";
 import historyTj from "@/components/historyTj/index";
@@ -701,6 +703,7 @@
   components: {
     VTreeTransfer,
     historyTj,
+    Packages
   },
   data() {
     return {
@@ -1439,104 +1442,123 @@
         //   this.$message.error("姝ょ敤鎴蜂笉瀛樺湪");
         // });
       } else {
-        var websocket = null;
-        var url = this.valueUrl;
-        if ("WebSocket" in window) {
-          websocket = new WebSocket(url);
-        } else if ("MozWebSocket" in window) {
-          websocket = new MozWebSocket(url);
-        } else {
-          // console.log("SockJS");
-        }
-
-        if (websocket == null) {
-          alert("鍒涘缓WebSocket瀵硅薄澶辫触");
-        }
-
-        //杩炴帴鍙戠敓閿欒鐨勫洖璋冩柟娉�
-        websocket.onerror = function () {
-          alert("璇锋鏌ヨ鍗″櫒杩炴帴鏄惁姝e父");
-        };
-
-        //杩炴帴鎴愬姛寤虹珛鐨勫洖璋冩柟娉�
-        websocket.onopen = function () {
-          this.websocket = websocket;
-          // 杩炴帴璁惧
-          var jsonObj = {
-            name: "connect",
-          };
-          var jStr = JSON.stringify(jsonObj);
-          this.websocket.send(jStr);
-          alert("璇锋斁韬唤璇佸啀鐐圭‘璁�");
-          var jsonObj = {
-            name: "readCert",
-          };
-          var jStr = JSON.stringify(jsonObj);
-          this.websocket.send(jStr);
-          this.dialogVisible = false;
-        };
-
-        //鎺ユ敹鍒版秷鎭殑鍥炶皟鏂规硶
-        websocket.onmessage = function (event) {
-          var resultObj = eval("(" + event.data + ")");
-          //resultFlag涓�0浠h〃璇诲崱鎴愬姛
-          if (
-            resultObj.name == "readCard" ||
-            resultObj.name == "readCert" ||
-            resultObj.name == "PushWithImg" ||
-            resultObj.name == "PushWithOutImg"
-          ) {
-            if (resultObj.resultFlag == "0") {
-              //鍥炴樉鐩稿叧鏁版嵁
-              _this.form.cusName = resultObj.resultContent.partyName;
-              _this.form.cusSex =
-                resultObj.resultContent.gender == "0" ? "濂�" : "鐢�";
-              _this.form.cusNational = resultObj.resultContent.nation;
-              _this.form.cusBrithday = resultObj.resultContent.bornDay;
-              if (_this.form.cusBrithday) {
-                _this.form.cusBrithday = _this.form.cusBrithday.replace(
-                  /^(\d{4})(\d{2})(\d{2})$/,
-                  "$1-$2-$3"
-                );
-              }
-              _this.form.cusAddr = resultObj.resultContent.certAddress;
-              _this.form.cusIdcard = resultObj.resultContent.certNumber;
-              _this.imageUrl =
-                "data:image/jpeg;base64," + resultObj.resultContent.identityPic;
-              if (
-                resultObj.name == "readCert" ||
-                resultObj.name == "PushWithImg"
-              ) {
-                this.imageUrl =
-                  "data:image/jpeg;base64," +
-                  resultObj.resultContent.identityPrintPic;
-              }
-            } else if (resultObj.resultFlag == "-1") {
-              if (resultObj.errorMsg == "绔彛鎵撳紑澶辫触") {
-                //alert("璇诲崱鍣ㄦ湭杩炴帴");
+        let configKey = "getInfoFromSqlData"
+        getconfigKey(configKey).then(res => {
+          if (res.code == 200) {
+            if (res.msg == "N") {
+              var websocket = null;
+              var url = this.valueUrl;
+              if ("WebSocket" in window) {
+                websocket = new WebSocket(url);
+              } else if ("MozWebSocket" in window) {
+                websocket = new MozWebSocket(url);
               } else {
-                //alert(resultObj.errorMsg);
+                // console.log("SockJS");
               }
-            } else if (resultObj.resultFlag == "-2") {
-              //alert(resultObj.errorMsg);
-            }
-          } else if (resultObj.name == "getStatus") {
-            if (resultObj.resultFlag == "0") {
-              if (resultObj.status == "0") {
-              } else {
-                alert("璁惧杩炴帴宸叉柇寮�锛岃妫�鏌ヨ鍗″櫒杩炴帴");
+
+              if (websocket == null) {
+                alert("鍒涘缓WebSocket瀵硅薄澶辫触");
               }
+
+              //杩炴帴鍙戠敓閿欒鐨勫洖璋冩柟娉�
+              websocket.onerror = function () {
+                alert("璇锋鏌ヨ鍗″櫒杩炴帴鏄惁姝e父");
+              };
+
+              //杩炴帴鎴愬姛寤虹珛鐨勫洖璋冩柟娉�
+              websocket.onopen = function () {
+                this.websocket = websocket;
+                // 杩炴帴璁惧
+                var jsonObj = {
+                  name: "connect",
+                };
+                var jStr = JSON.stringify(jsonObj);
+                this.websocket.send(jStr);
+                alert("璇锋斁韬唤璇佸啀鐐圭‘璁�");
+                var jsonObj = {
+                  name: "readCert",
+                };
+                var jStr = JSON.stringify(jsonObj);
+                this.websocket.send(jStr);
+                this.dialogVisible = false;
+              };
+
+              //鎺ユ敹鍒版秷鎭殑鍥炶皟鏂规硶
+              websocket.onmessage = function (event) {
+                var resultObj = eval("(" + event.data + ")");
+                //resultFlag涓�0浠h〃璇诲崱鎴愬姛
+                if (
+                  resultObj.name == "readCard" ||
+                  resultObj.name == "readCert" ||
+                  resultObj.name == "PushWithImg" ||
+                  resultObj.name == "PushWithOutImg"
+                ) {
+                  if (resultObj.resultFlag == "0") {
+                    //鍥炴樉鐩稿叧鏁版嵁
+                    _this.form.cusName = resultObj.resultContent.partyName;
+                    _this.form.cusSex =
+                      resultObj.resultContent.gender == "0" ? "濂�" : "鐢�";
+                    _this.form.cusNational = resultObj.resultContent.nation;
+                    _this.form.cusBrithday = resultObj.resultContent.bornDay;
+                    if (_this.form.cusBrithday) {
+                      _this.form.cusBrithday = _this.form.cusBrithday.replace(
+                        /^(\d{4})(\d{2})(\d{2})$/,
+                        "$1-$2-$3"
+                      );
+                    }
+                    _this.form.cusAddr = resultObj.resultContent.certAddress;
+                    _this.form.cusIdcard = resultObj.resultContent.certNumber;
+                    _this.imageUrl =
+                      "data:image/jpeg;base64," + resultObj.resultContent.identityPic;
+                    if (
+                      resultObj.name == "readCert" ||
+                      resultObj.name == "PushWithImg"
+                    ) {
+                      this.imageUrl =
+                        "data:image/jpeg;base64," +
+                        resultObj.resultContent.identityPrintPic;
+                    }
+                  } else if (resultObj.resultFlag == "-1") {
+                    if (resultObj.errorMsg == "绔彛鎵撳紑澶辫触") {
+                      //alert("璇诲崱鍣ㄦ湭杩炴帴");
+                    } else {
+                      //alert(resultObj.errorMsg);
+                    }
+                  } else if (resultObj.resultFlag == "-2") {
+                    //alert(resultObj.errorMsg);
+                  }
+                } else if (resultObj.name == "getStatus") {
+                  if (resultObj.resultFlag == "0") {
+                    if (resultObj.status == "0") {
+                    } else {
+                      alert("璁惧杩炴帴宸叉柇寮�锛岃妫�鏌ヨ鍗″櫒杩炴帴");
+                    }
+                  }
+                }
+              };
+
+              //杩炴帴鍏抽棴鐨勫洖璋冩柟娉�
+              websocket.onclose = function () {
+                alert("璇诲崱鍣ㄨ繛鎺ュ叧闂�");
+              };
+            } else  if (res.msg == "Y"){
+              this.$refs.aaa.open = true;
+              this.$refs.aaa.getAllList();
+              this.$refs.aaa.title = "璇佷欢瀛楀吀";
             }
           }
-        };
+        })
 
-        //杩炴帴鍏抽棴鐨勫洖璋冩柟娉�
-        websocket.onclose = function () {
-          alert("璇诲崱鍣ㄨ繛鎺ュ叧闂�");
-        };
       }
     },
 
+    handleChanges(param1) {
+      this.form.cusIdcard = param1[0].pacCode;
+      // this.form.cusName = param1[0].pacName;
+      // this.form.cusPhone = param1[0].pacRemark;
+     
+    },
+
     // selected(row, index) {
     //   if (this.formPacId !== null) {
     //     if (row.pacId == this.formPacId) {

--
Gitblit v1.8.0