From 47b9d49bf40010d0eba022379ab50ca47d021c62 Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期五, 30 五月 2025 16:42:11 +0800 Subject: [PATCH] qx --- src/views/system/tijian/index.vue | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index 602e058..c72bc23 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -285,7 +285,8 @@ <el-tabs type="border-card" style="height: 560px; margin: 0 10px; width: 100%" v-model="activeNames" @tab-click="handleClick"> <el-tab-pane label="濂楅" name="first"> - <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="auto" @submit.native.prevent="handle"> + <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="auto" + @submit.native.prevent="handle"> <el-form-item label="濂楅鍚嶇О" prop="pacName"> <el-input v-model="queryParam.pacName" placeholder="璇疯緭鍏ュ椁愬悕绉�" clearable @keyup.enter.native="handle" /> </el-form-item> @@ -957,6 +958,7 @@ // valueUrl: "ws://192.168.1.3:6789/websocket", valueUrl: "ws://127.0.0.1:6789/websocket", valueUrls: "ws://127.0.0.1:6789/websocket", + // valueUrls: "ws://"+getIp() +":6789/websocket", webSocket: null, // 韬唤璇侀渶瑕� @@ -1709,7 +1711,7 @@ }, /** 鐧昏鎻愪氦鎸夐挳 */ /** 鐧昏鎻愪氦鎸夐挳 */ - submitForm() { + submitForm() { let _this = this; if (!this.form.cusPhone || !this.form.cusName) { this.$message.warning("璇峰~閫夊繀濉」"); @@ -1734,7 +1736,7 @@ } if (formData.tjType === "") { formData.tjType = this.dict.type.dict_team[0].value; - + } addCustomer(formData).then((response) => { @@ -1926,11 +1928,15 @@ // 鏈�鏂颁娇鐢╳ebSocket閫氫俊 readCardWebSocket(resultObj) { let _this = this; - + const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char) if (resultObj.code === 200 && resultObj.data.name != null) { //鍥炴樉鐩稿叧鏁版嵁 _this.form.cusName = resultObj.data.name; - _this.form.cusSex = resultObj.data.sex == "0" ? "濂�" : "鐢�"; + if (isChineseChar(resultObj.data.sex)) { + _this.form.cusSex = resultObj.data.sex == "濂�" ? 1 : 0 + } else { + _this.form.cusSex = resultObj.data.sex; + } _this.form.cusNational = resultObj.data.mz; _this.form.cusBrithday = resultObj.data.csrq; if (_this.form.cusBrithday) { @@ -1985,7 +1991,7 @@ //鍥炴樉鐩稿叧鏁版嵁 _this.form.cusName = resultObj.resultContent.partyName; _this.form.cusSex = - resultObj.resultContent.gender == "0" ? "濂�" : "鐢�"; + resultObj.resultContent.gender; _this.form.cusNational = resultObj.resultContent.nation; _this.form.cusBrithday = resultObj.resultContent.bornDay; if (_this.form.cusBrithday) { @@ -2282,7 +2288,7 @@ dwId: this.form.firmId, }; if (this.name) { - let name= this.name.toLowerCase() + let name = this.name.toLowerCase() getPackageListName(name).then((response) => { this.newpacName = response.data; this.loading = false; @@ -2940,9 +2946,9 @@ let Price = 0; if (this.tableData1) { this.tableData1.forEach((item) => { - if (typeof item.nowPrice === 'number') { - item.nowPrice = Number(item.nowPrice.toFixed(3)); - } + if (typeof item.nowPrice === 'number') { + item.nowPrice = Number(item.nowPrice.toFixed(3)); + } if (item.tjCategory != null) { this.tjCategory = item.tjCategory; } @@ -2956,7 +2962,7 @@ Price += item.nowPrice || 0; // 绱姞瀹炴敹閲戦 this.TotalPrice = Price.toFixed(2); }); - console.log( this.TotalPrice1,this.TotalPrice) + console.log(this.TotalPrice1, this.TotalPrice) // 璁$畻鎶樻墸 this.discount = this.TotalPrice1 > 0 ? (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10 : 0; -- Gitblit v1.8.0