src/api/hosp/project.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/hosp/project/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/reservation/resercopy/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/reservation/reservations/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/comp/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/tijian/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/tijianall/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/hosp/project.js
@@ -129,4 +129,12 @@ method: 'get', params: data }) } export function tbhisproprice() { return request({ url: '/system/config/tbhisproprice', method: 'get', }) } src/views/hosp/project/index.vue
@@ -108,6 +108,15 @@ <el-col :span="1.5"> <el-button type="primary" icon="el-icon-download" size="mini" @click="Synchronizationfees" >批量同步费用</el-button > </el-col> <el-col :span="1.5"> <el-button type="primary" icon="el-icon-sort" size="mini" @click="toggleExpandAll" @@ -506,6 +515,49 @@ <el-input v-model="form.lisXmmc" placeholder="请输入LIS项目"> </el-input> </el-form-item> <el-form-item label="his编码" prop="hisXmbm"> <el-input v-model="form.hisXmbm" placeholder="请输入his编码" style="width: 200px" /> </el-form-item> <el-form-item label="his项目名称" prop="hisXmmc"> <el-input v-model="form.hisXmmc" placeholder="请输入his项目名称" style="width: 260px" /> </el-form-item> <el-form-item label="组合标志" prop="sfzhfy"> <el-select v-model="form.sfzhfy" placeholder="请选择是否组合标志" style="width: 200px" > <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" ></el-option> </el-select> </el-form-item> <el-form-item label="his单价" prop="hisdj"> <el-input v-model="form.hisdj" placeholder="请输入his单价" style="width: 200px" /> </el-form-item> <el-form-item label="数量" prop="sl"> <el-input v-model="form.sl" placeholder="请输入数量" style="width: 260px" /> </el-form-item> <el-form-item label="备注" prop="proRemark"> <el-input v-model="form.proRemark" @@ -822,7 +874,7 @@ deptTree, deptTree111, getAllChildListById, getInfoByProId, getInfoByProId,tbhisproprice } from "@/api/hosp/project"; import { listDept } from "@/api/system/dept"; import Treeselect from "@riophae/vue-treeselect"; @@ -953,6 +1005,11 @@ proParentId: "", deptId: "", needReport: "Y", hisXmbm:"", hisXmmc:"", sfzhfy: "Y", hisdj:"", sl:"", proStatus: "0", proName: "", proPrice: "", @@ -1197,6 +1254,12 @@ this.loading = false; }); }, Synchronizationfees(){ tbhisproprice().then((response) => { this.$modal.msgSuccess("批量同步费用成功"); }); }, // input弹框搜索 handlecharge() { this.querycharge.pageNum = 1; src/views/reservation/resercopy/index.vue
@@ -124,7 +124,7 @@ prop="company" width="200" /> <el-table-column label="工号" align="center" prop="jobNo" width="80" /> <!-- <el-table-column label="工号" align="center" prop="jobNo" width="80" /> --> <el-table-column label="姓名" align="center" prop="name" width="75" /> <el-table-column label="性别" align="center" prop="sex" width="75"> <template slot-scope="scope"> @@ -147,14 +147,14 @@ prop="birthday" width="100" /> <el-table-column label="职位" align="center" prop="position" /> <el-table-column label="部门" align="center" prop="department" /> <el-table-column label="部门编号" align="center" prop="departmentId" /> <!-- <el-table-column label="职位" align="center" prop="position" /> --> <!-- <el-table-column label="部门" align="center" prop="department" /> --> <!-- <el-table-column label="部门编号" align="center" prop="departmentId" /> --> <el-table-column label="联系电话" align="center" prop="phoe" width="120" width="140" /> <el-table-column label="地址" align="center" prop="address" /> <el-table-column @@ -178,7 +178,7 @@ /> </template> </el-table-column> <el-table-column label="联系邮箱" align="center" prop="email" /> <!-- <el-table-column label="联系邮箱" align="center" prop="email" /> --> <!-- <el-table-column label="体检类别" align="center" prop="tjCategory" /> --> <el-table-column label="分组" align="center" prop="groupingName" /> <el-table-column label="项目收费" align="center" prop="ysPrice" /> @@ -704,55 +704,55 @@ const { columns, data } = param; const sums = []; columns.forEach((column, index) => { // if (index === 0) { // sums[index] = "合计"; // return; // } if (index === 0) { sums[index] = "合计"; return; } if (index === 1) { sums[index] = "总计人数"; return; } if (index === 2) { if (index === 1) { sums[index] = this.ListObj.count; return; } if (index === 6) { if (index === 2) { sums[index] = "男组人数"; return; } if (index === 7) { if (index === 3) { sums[index] = this.ListObj.manCount; return; } if (index === 8) { if (index === 4) { sums[index] = "男组金额"; return; } if (index === 9) { if (index === 5) { sums[index] = this.ListObj.manMoney; return; } if (index === 11) { if (index === 6) { sums[index] = "女组人数"; return; } if (index === 12) { if (index === 7) { sums[index] = this.ListObj.woManCount; return; } if (index === 13) { if (index === 8) { sums[index] = "女组金额"; return; } if (index === 14) { if (index === 9) { sums[index] = this.ListObj.woManMoney; return; } if (index === 15) { if (index === 10) { sums[index] = "合计金额"; return; } if (index === 16) { if (index === 11) { sums[index] = this.ListObj.hjMoney; return; } src/views/reservation/reservations/index.vue
@@ -60,8 +60,7 @@ </template> </el-table-column> <el-table-column label="联系电话" align="center" prop="phoe" width="110px" :show-overflow-tooltip="true" /> <el-table-column label="邮箱" align="center" prop="email" :show-overflow-tooltip="true" width="160px" /> <el-table-column label="地址" align="center" prop="address" :show-overflow-tooltip="true" width="160px" /> <el-table-column label="预约时间" align="center" prop="reservationTime" width="100px" :show-overflow-tooltip="true" sortable> <template slot-scope="scope"> @@ -92,6 +91,8 @@ </template> </el-table-column> <el-table-column label="单位名称" align="center" prop="company" :show-overflow-tooltip="true" /> <el-table-column label="邮箱" align="center" prop="email" :show-overflow-tooltip="true" width="160px" /> <el-table-column label="地址" align="center" prop="address" :show-overflow-tooltip="true" width="160px" /> <el-table-column label="操作" align="center" width="90px" fixed="right"> <template slot-scope="scope"> <el-button size="mini" type="text" icon="el-icon-s-order" @click="handleUpdate1(scope.row)" @@ -1091,6 +1092,7 @@ /** 修改按钮操作 */ handleUpdate(row) { console.log(row) this.title = "修改体检预约"; this.formIn = row; this.form.tjType = this.formIn.tjType @@ -1158,6 +1160,7 @@ this.TotalPrice1 = 0; this.tableData1.forEach((item) => { this.TotalPrice1 += item.nowPrice; console.log(this.discount) this.TotalPrice = ( this.TotalPrice1 * (this.discount / 10) src/views/system/comp/index.vue
@@ -453,7 +453,6 @@ icon="el-icon-plus" size="mini" @click="handleGroup" v-hasPermi="['system:comp:add']" >保存</el-button > </el-col> @@ -464,7 +463,6 @@ size="mini" :disabled="singlegg" @click="GroupUpdate" v-hasPermi="['system:comp:edit']" >重置</el-button > <el-button @@ -473,7 +471,6 @@ size="mini" :disabled="singlegg" @click="deleteGroup" v-hasPermi="['system:comp:edit']" >删除</el-button > </el-col> @@ -606,16 +603,19 @@ style="width: 140px" /> </el-form-item> <el-form-item> <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">重置</el-button> </el-form-item> </el-form> <div style="color: red; font-size: 8px"> <!-- <div style="color: red; font-size: 8px"> 注释:鼠标左键双击选中行可删除 </div> </div> --> <!-- @row-dblclick="dbclick" --> <el-table border v-loading="loading" :data="OnenewpacName" :row-class-name="tableRowClassName" @row-dblclick="dbclick" height="478" > <el-table-column @@ -625,6 +625,17 @@ > <template slot-scope="scope"> {{ scope.row.proName + "/" + scope.row.proPrice }} </template> </el-table-column> <el-table-column label="操作" align="center" width="68"> <template slot-scope="scope"> <el-button size="mini" type="text" icon="el-icon-delete" @click="handledbelete(scope.row)" >删除</el-button > </template> </el-table-column> </el-table> @@ -1011,31 +1022,31 @@ contactPhone: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], taxNumber: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], legalPerson: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], registerAddress: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], bankAccount: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], countNum: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], principal: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], faxNumber: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], mailingAddress: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], email: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], // taxNumber: [ // { required: true, validator: checkPhoneNum, trigger: "blur" }, // ], // legalPerson: [ // { required: true, validator: checkPhoneNum, trigger: "blur" }, // ], // registerAddress: [ // { required: true, validator: checkPhoneNum, trigger: "blur" }, // ], // bankAccount: [ // { required: true, validator: checkPhoneNum, trigger: "blur" }, // ], // countNum: [ // { required: true, validator: checkPhoneNum, trigger: "blur" }, // ], // principal: [ // { required: true, validator: checkPhoneNum, trigger: "blur" }, // ], // faxNumber: [ // { required: true, validator: checkPhoneNum, trigger: "blur" }, // ], // mailingAddress: [ // { required: true, validator: checkPhoneNum, trigger: "blur" }, // ], // email: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], }, }; }, @@ -1126,6 +1137,11 @@ this.resetForm("queryForm"); this.handleQuery(); }, resetQuerys(){ this.OnenewpacName = [], this.queryParams.price = 0, this.$refs.tbone.toggleRowSelection(this.pacList[0], false); }, // 多选框选中数据 handleSelectionChange(selection) { selection.forEach((item) => { @@ -1212,36 +1228,36 @@ index + 1; }); if (this.groupList.length >= 1) { if (this.groupList[0].id) { getfzgrouping(this.groupList[0].id).then((response) => { this.OnenewpacName = response.data.groupingProList; this.queryParams.price = 0; this.OnenewpacName.forEach((item) => { this.queryParams.price += item.proPrice; }); }); } } // if (this.groupList.length >= 1) { // if (this.groupList[0].id) { // getfzgrouping(this.groupList[0].id).then((response) => { // this.OnenewpacName = response.data.groupingProList; // this.queryParams.price = 0; // this.OnenewpacName.forEach((item) => { // this.queryParams.price += item.proPrice; // }); // }); // } // } if (this.newpacName.length != 0) { this.$nextTick(() => { if (this.forms.pacName) { this.newpacName.forEach((item, index) => { if (this.forms.pacName == item.pacName) { this.$refs.tbone.toggleRowSelection( this.newpacName[index], true ); } }); } else { this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); } }); } else { this.$refs.tbone.clearSelection(); } // if (this.newpacName.length != 0) { // this.$nextTick(() => { // if (this.forms.pacName) { // this.newpacName.forEach((item, index) => { // if (this.forms.pacName == item.pacName) { // this.$refs.tbone.toggleRowSelection( // this.newpacName[index], // true // ); // } // }); // } else { // this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); // } // }); // } else { // this.$refs.tbone.clearSelection(); // } }); } else { deptTreeSelect().then((response) => { @@ -1253,35 +1269,35 @@ index + 1; }); if (this.groupList.length >= 1) { if (this.groupList[0].id) { getfzgrouping(this.groupList[0].id).then((response) => { this.OnenewpacName = response.data.groupingProList; this.queryParams.price = 0; this.OnenewpacName.forEach((item) => { this.queryParams.price += item.proPrice; }); }); } } if (this.newpacName.length != 0) { this.$nextTick(() => { if (this.forms.pacName) { this.newpacName.forEach((item, index) => { if (this.forms.pacName == item.pacName) { this.$refs.tbone.toggleRowSelection( this.newpacName[index], true ); } }); } else { this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); } }); } else { this.$refs.tbone.clearSelection(); } // if (this.groupList.length >= 1) { // if (this.groupList[0].id) { // getfzgrouping(this.groupList[0].id).then((response) => { // this.OnenewpacName = response.data.groupingProList; // this.queryParams.price = 0; // this.OnenewpacName.forEach((item) => { // this.queryParams.price += item.proPrice; // }); // }); // } // } // if (this.newpacName.length != 0) { // this.$nextTick(() => { // if (this.forms.pacName) { // this.newpacName.forEach((item, index) => { // if (this.forms.pacName == item.pacName) { // this.$refs.tbone.toggleRowSelection( // this.newpacName[index], // true // ); // } // }); // } else { // this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); // } // }); // } else { // this.$refs.tbone.clearSelection(); // } }); } getProjectList().then((response) => { @@ -1357,6 +1373,17 @@ this.queryParams.price += item.proPrice; }); }, handledbelete(row){ this.queryParams.price = 0; this.OnenewpacName.forEach((item,index) => { if(item.proId == row.proId){ this.OnenewpacName.splice(index, 1); } }); return this.OnenewpacName.forEach((item) => { this.queryParams.price += item.proPrice; }); }, submitrighr() { if (this.pacList.length >= 1) { this.openss = false; @@ -1372,30 +1399,22 @@ }, // 套餐单项获取 handleChangeOne(selection) { this.pacList = selection; this.OnenewpacName.forEach((item,index) => { this.dataLists.forEach(item1 => { if(item.proId == item1.proId){ this.OnenewpacName.splice(index,1) } }) }) this.dataLists = []; this.queryParams.price = 0; this.pacList.forEach((item) => { this.dataLists = item.tjProjectList; }); this.dataLists.forEach((item2) => { this.OnenewpacName.push(item2); }); this.OnenewpacName.forEach((item) => { this.queryParams.price += item.proPrice; }); if (selection.length > 1) { let del_row = selection.shift(); this.$refs.tbone.toggleRowSelection(del_row, false); //设置这一行取消选中 } this.pacList = selection; this.dataLists = []; this.queryParams.price = 0; this.pacList.forEach((item) => { this.OnenewpacName = item.tjProjectList; }); // this.dataLists.forEach((item2) => { // this.OnenewpacName.push(item2); // }); this.OnenewpacName.forEach((item) => { this.queryParams.price += item.proPrice; }); }, beCurrentDept() { Deptlist(this.form.drugManufacturerId).then((response) => { @@ -1582,6 +1601,7 @@ /** 提交按钮 */ submitForm() { this.$refs["form"].validate((valid) => { if (valid) { if (this.form.drugManufacturerId != null) { @@ -1591,11 +1611,16 @@ this.getList(); }); } else { addComp(this.form).then((response) => { if(this.form.cnName && this.form.contactPerson && this.form.contactPhone){ addComp(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); }else{ this.$modal.msgError("请填写必传项"); } } } }); src/views/system/tijian/index.vue
@@ -2478,8 +2478,34 @@ "$1-$2-$3" ); } _this.form.cusAddr = resultObj.data.addres; _this.form.cusIdcard = resultObj.data.card; if (_this.form.cusIdcard) { const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; if (reg.test(_this.form.cusIdcard)) { var org_birthday = _this.form.cusIdcard.substring(6, 14); var birthday = org_birthday.substring(0, 4) + "-" + org_birthday.substring(4, 6) + "-" + org_birthday.substring(6, 8); var birthdays = new Date(birthday.replace(/-/g, "-")); let d = new Date(); let age = d.getFullYear() - birthdays.getFullYear() - (d.getMonth() < birthdays.getMonth() || (d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate()) ? 1 : 0); _this.form.age = age; } } _this.form.cusAddr = resultObj.data.addres; _this.cardreader = false; }; @@ -2489,7 +2515,7 @@ }; } else { // if (_this.inputSSS.indexOf(":1") != -1) { // var str1 = _this.inputSSS.indexOf(":1"); // var result1 = _this.inputSSS.substring(0, str1); @@ -2501,7 +2527,7 @@ // _this.inputSSS = result1 + result2; // } _this.inputSSS = _this.inputSSS.replace(":1",""); _this.inputSSS = _this.inputSSS.replace(":1", ""); var websocket = null; var url = this.valueUrls; // var url = 'ws://'+ getIp() +':6789/websocket' @@ -2552,17 +2578,49 @@ websocket.onmessage = function (event) { var resultObj = JSON.parse(event.data); _this.form.cusName = resultObj.data.name; _this.form.cusSex = resultObj.data.gender; _this.form.cusNational = resultObj.data.nation; // _this.form.cusBrithday = resultObj.data.csrq; // if (_this.form.cusBrithday) { // _this.form.cusBrithday = _this.form.cusBrithday.replace( // /^(\d{4})(\d{2})(\d{2})$/, // "$1-$2-$3" // ); // } if( resultObj.data.nation == "汉族"){ _this.form.cusNational ="1"; } if(resultObj.data.gender == "男"){ _this.form.cusSex = 0; }else{ _this.form.cusSex = 1; } _this.form.cusBrithday = resultObj.data.birthday; if (_this.form.cusBrithday) { _this.form.cusBrithday = _this.form.cusBrithday.replace( /^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3" ); } _this.form.cusPhone = resultObj.data.phone; _this.form.cusIdcard = resultObj.data.idenno; if (_this.form.cusIdcard) { const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; if (reg.test(_this.form.cusIdcard)) { var org_birthday = _this.form.cusIdcard.substring(6, 14); var birthday = org_birthday.substring(0, 4) + "-" + org_birthday.substring(4, 6) + "-" + org_birthday.substring(6, 8); var birthdays = new Date(birthday.replace(/-/g, "-")); let d = new Date(); let age = d.getFullYear() - birthdays.getFullYear() - (d.getMonth() < birthdays.getMonth() || (d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate()) ? 1 : 0); _this.form.age = age; } } _this.cardreader = false; }; src/views/system/tijianall/index.vue
@@ -920,6 +920,32 @@ </el-row> <el-dialog title="提示" :visible.sync="cardreader" width="30%" :close-on-press-escape="false" :close-on-click-modal="false" > <template> <el-radio-group v-model="cardreaderradio" @input="changeradio"> <el-radio :label="3">身份证</el-radio> <el-radio :label="6">健康码</el-radio> </el-radio-group> <div style="margin-top: 10px" v-show="cardreaderradio == 6"> <el-input v-model="inputSSS" ref="tableHeadFilterInp" placeholder="请输入内容" ></el-input> </div> </template> <span slot="footer" class="dialog-footer"> <el-button @click="cardreader = false">取 消</el-button> <el-button type="primary" @click="cardreadercopes">确 定</el-button> </span> </el-dialog> <el-dialog title="导检单预览" :visible.sync="dialogVisibles" :close-on-click-modal="false" @@ -946,12 +972,14 @@ </span> </el-dialog> <historyTj :cusIdCard="form.cusIdcard" ref="historyTj"></historyTj> <Packages ref="aaa" @add="handleChanges" /> </div> </template> <script> import printJS from "print-js"; import { getInfo } from "@/api/login"; import Packages from "@/components/Packages"; import { getZhList, getlistByZhId } from "@/api/system/package"; import { deptTreeSelect, @@ -962,7 +990,7 @@ getTransitionList, getProParentIdDxList, getProSonDxList, getaddTj, getaddTj,getconfigKey, getHistryTjOrderProByCusIdCard, delTbBycusCardIdAndProId, } from "@/api/system/tijian"; @@ -971,7 +999,7 @@ export default { components: { VTreeTransfer, historyTj, historyTj,Packages }, dicts: [ "dict_user_national", @@ -1031,7 +1059,12 @@ tableDatas: [], packageList: [], checkedkeys: [], valueUrl: "ws://127.0.0.1:18890", valueUrls: "ws://127.0.0.1:6789/websocket", dialogVisiblese: false, cardreader: false, cardreaderradio:3, inputSSS: "", lishi: false, table: false, HistoryList: {}, @@ -1590,30 +1623,377 @@ this.$message.error("此用户不存在"); }); } else { var host = "ws://127.0.0.1:5001/YckjCard"; if (this.socket == null) { this.socket = new WebSocket(host); if (this.socket != null) { 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 { // console.log("SockJS"); } if (websocket == null) { alert("创建WebSocket对象失败"); } //连接发生错误的回调方法 websocket.onerror = function () { alert("请检查读卡器连接是否正常"); }; //连接成功建立的回调方法 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代表读卡成功 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 = "证件字典"; } else if (res.msg == "S") { this.cardreader = true; _this.cardreaderradio = 3; _this.inputSSS = ""; // let url = window.location.protocol + "//" + window.location.host; // console.log(url); // axios // .get("http://localhost:81/dev-api/readCertCardInfos") // .then((res) => { // console.log(res); // }) // .catch((err) => { // console.log(err); // }); // readCertCardInfos().then((res) => { // _this.form.cusName = res.data.name; // _this.form.cusSex = // res.data.sex; // _this.form.cusNational = res.data.mz; // _this.form.cusBrithday = res.data.csrq; // if (_this.form.cusBrithday) { // _this.form.cusBrithday = _this.form.cusBrithday.replace( // /^(\d{4})(\d{2})(\d{2})$/, // "$1-$2-$3" // ); // } // _this.form.cusAddr = res.data.addres; // _this.form.cusIdcard = res.data.card; // }); } } } else { alert("设备已打开."); } try { this.socket.onmessage = function (msg) { // if (typeof msg.data == "string") { // var msgM = msg.data + ""; // resultMsg("读卡返回信息:" + msg.data); // } // else { // alert("连接异常,请检查驱动."); // } }; } catch (ex) { alert("连接异常,请检查驱动."); } }); } }, handleChanges(param1) { if (this.form.pacCode == "不详") { this.form.cusIdcard = param1[0].xh; } else { this.form.cusIdcard = param1[0].pacCode; } // this.form.cusName = param1[0].pacName; // this.form.cusPhone = param1[0].pacRemark; }, changeradio() { if (this.cardreaderradio != 3) { this.$nextTick(() => { this.$refs.tableHeadFilterInp.focus(); }); } }, cardreadercopes() { let _this = this; if (this.cardreaderradio == 3) { var websocket = null; var url = this.valueUrls; // var url = 'ws://'+ getIp() +':6789/websocket' 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("11111"); } websocket.onopen = function () { try { // 连接设备 var jsonObjs = { type: 1, data: {}, }; var jStrs = JSON.stringify(jsonObjs); websocket.send(jStrs); } catch (err) { var tryTime = 0; // 重试10次,每次之间间隔3秒 if (tryTime < 1) { var t1 = setTimeout(function () { tryTime++; var jsonObjs = { type: 1, data: {}, }; var jStrs = JSON.stringify(jsonObjs); websocket.send(jStrs); }, 1 * 1000); } else { console.error("重连失败."); } } }; websocket.onclose = function () { alert("读卡器连接关闭"); }; websocket.onmessage = function (event) { var resultObj = JSON.parse(event.data); _this.form.cusName = resultObj.data.name; _this.form.cusSex = resultObj.data.sex; _this.form.cusNational = resultObj.data.mz; _this.form.cusBrithday = resultObj.data.csrq; if (_this.form.cusBrithday) { _this.form.cusBrithday = _this.form.cusBrithday.replace( /^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3" ); } _this.form.cusIdcard = resultObj.data.card; if (_this.form.cusIdcard) { const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; if (reg.test(_this.form.cusIdcard)) { var org_birthday = _this.form.cusIdcard.substring(6, 14); var birthday = org_birthday.substring(0, 4) + "-" + org_birthday.substring(4, 6) + "-" + org_birthday.substring(6, 8); var birthdays = new Date(birthday.replace(/-/g, "-")); let d = new Date(); let age = d.getFullYear() - birthdays.getFullYear() - (d.getMonth() < birthdays.getMonth() || (d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate()) ? 1 : 0); _this.form.age = age; } } _this.form.cusAddr = resultObj.data.addres; _this.cardreader = false; }; //连接发生错误的回调方法 websocket.onerror = function () { alert("请检查读卡器连接是否正常"); }; } else { // if (_this.inputSSS.indexOf(":1") != -1) { // var str1 = _this.inputSSS.indexOf(":1"); // var result1 = _this.inputSSS.substring(0, str1); // var str2 = _this.inputSSS.indexOf(":1"); // var result2 = _this.inputSSS.substring( // str2 + 2, // _this.inputSSS.length // ); // _this.inputSSS = result1 + result2; // } _this.inputSSS = _this.inputSSS.replace(":1", ""); var websocket = null; var url = this.valueUrls; // var url = 'ws://'+ getIp() +':6789/websocket' 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("11111"); } websocket.onopen = function () { try { // 连接设备 var jsonObjs = { type: 2, data: { qrcode: _this.inputSSS, }, }; var jStrs = JSON.stringify(jsonObjs); websocket.send(jStrs); } catch (err) { var tryTime = 0; // 重试10次,每次之间间隔3秒 if (tryTime < 1) { var t1 = setTimeout(function () { tryTime++; var jsonObjs = { type: 2, data: { qrcode: _this.inputSSS, }, }; var jStrs = JSON.stringify(jsonObjs); websocket.send(jStrs); }, 1 * 1000); } else { console.error("重连失败."); } } }; websocket.onclose = function () { alert("读卡器连接关闭"); }; websocket.onmessage = function (event) { var resultObj = JSON.parse(event.data); _this.form.cusName = resultObj.data.name; if( resultObj.data.nation == "汉族"){ _this.form.cusNational ="1"; } if(resultObj.data.gender == "男"){ _this.form.cusSex = 0; }else{ _this.form.cusSex = 1; } _this.form.cusBrithday = resultObj.data.birthday; if (_this.form.cusBrithday) { _this.form.cusBrithday = _this.form.cusBrithday.replace( /^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3" ); } _this.form.cusPhone = resultObj.data.phone; _this.form.cusIdcard = resultObj.data.idenno; if (_this.form.cusIdcard) { const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; if (reg.test(_this.form.cusIdcard)) { var org_birthday = _this.form.cusIdcard.substring(6, 14); var birthday = org_birthday.substring(0, 4) + "-" + org_birthday.substring(4, 6) + "-" + org_birthday.substring(6, 8); var birthdays = new Date(birthday.replace(/-/g, "-")); let d = new Date(); let age = d.getFullYear() - birthdays.getFullYear() - (d.getMonth() < birthdays.getMonth() || (d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate()) ? 1 : 0); _this.form.age = age; } } _this.cardreader = false; }; //连接发生错误的回调方法 websocket.onerror = function () { alert("请检查读卡器连接是否正常"); }; } }, // checkSelectable(row, index) { // if (!row) { @@ -1669,33 +2049,34 @@ } }); }, Package() { this.taocan = true; let cusSex = this.form.cusSex; this.activeNames = "first"; let cusSex = this.form.cusSex; this.datekey = Date.now(); //全部套餐 this.loading = true; deptTreeSelect(cusSex).then((response) => { this.newpacName = response.rows; try { this.newpacName.forEach((item3) => { this.tableData1.forEach((item4) => { item4.list.forEach((item6) => { if (item6.pacName === item3.pacName) { this.$nextTick(() => { this.$refs.tb.toggleRowSelection(item3, true); }); throw Error(); } if (this.tableData1.length >= 1) { this.newpacName.forEach((item3) => { this.tableData1.forEach((item4) => { item4.list.forEach((item6) => { if (item6.pacName === item3.pacName) { this.$nextTick(() => { this.$refs.tb.toggleRowSelection(item3, true); }); throw Error(); } }); }); }); }); } } catch (error) {} this.loading = false; }); // this.getDataList(); // this.getData(); }, // 折扣 @@ -1793,39 +2174,41 @@ handleClick(tab, event) { if (this.activeNames == "second") { this.DataList = []; this.checkedkey = []; this.getDataList(); } else if (this.activeNames == "third") { this.DataLists = []; this.checkedkeys = []; getZhList().then((response) => { if (response.data) { this.packageList = response.data; this.checkedkeys.push(this.packageList[0].id); let datas = { zhId: this.packageList[0].id, }; getlistByZhId(datas).then((res) => { this.packagedataList = res.data.tjProjectList; for (var i = 0; i < this.packagedataList.length; i++) { let proId = this.packagedataList[i].proId; getProSonDxList(proId).then((res) => { this.TreedataList = res.data.list; this.TreedataList.forEach((item) => { this.DataLists.push(item); if (this.DataLists.length >= 1) { this.marryalls = 0; this.DataLists.forEach((item1) => { this.marryalls += item1.proPrice; this.packagedataList.forEach((item3) => { if (item1.proParentId == item3.proId) { item1.propinName = item3.proName; } }); }); } }); }); } }); // this.checkedkeys.push(this.packageList[0].id); // let datas = { // zhId: this.packageList[0].id, // }; // getlistByZhId(datas).then((res) => { // this.packagedataList = res.data.tjProjectList; // for (var i = 0; i < this.packagedataList.length; i++) { // let proId = this.packagedataList[i].proId; // getProSonDxList(proId).then((res) => { // this.TreedataList = res.data.list; // this.TreedataList.forEach((item) => { // this.DataLists.push(item); // if (this.DataLists.length >= 1) { // this.marryalls = 0; // this.DataLists.forEach((item1) => { // this.marryalls += item1.proPrice; // this.packagedataList.forEach((item3) => { // if (item1.proParentId == item3.proId) { // item1.propinName = item3.proName; // } // }); // }); // } // }); // }); // } // }); } this.loading = false; }); @@ -1869,27 +2252,27 @@ // }); // }); // } this.checkedkey.push(this.Treedata[0].proId); let proId = this.Treedata[0].proId; getProSonDxList(proId).then((res) => { this.TreedataList = res.data.list; this.TreedataList.forEach((item) => { this.checkedListkey.push(item.proId); this.DataList.push(item); this.DataList.forEach((item) => { item.propinName = this.Treedata[0].proName; }); }); this.TotalPrice1 = 0; this.marryall = 0; if (this.DataList.length != 0) { this.list1 = false; this.DataList.forEach((item) => { this.TotalPrice1 = item.proPrice + this.TotalPrice1; this.marryall += item.proPrice; }); } }); // this.checkedkey.push(this.Treedata[0].proId); // let proId = this.Treedata[0].proId; // getProSonDxList(proId).then((res) => { // this.TreedataList = res.data.list; // this.TreedataList.forEach((item) => { // this.checkedListkey.push(item.proId); // this.DataList.push(item); // this.DataList.forEach((item) => { // item.propinName = this.Treedata[0].proName; // }); // }); // this.TotalPrice1 = 0; // this.marryall = 0; // if (this.DataList.length != 0) { // this.list1 = false; // this.DataList.forEach((item) => { // this.TotalPrice1 = item.proPrice + this.TotalPrice1; // this.marryall += item.proPrice; // }); // } // }); this.loading = false; }); }, @@ -1932,7 +2315,6 @@ // this.DataLists.forEach((item1, index) => { // if (item.proId == item1.proId) { // this.DataLists.splice(index, 1); // } // }); // }); @@ -2170,6 +2552,9 @@ this.tableData1.forEach((item) => { this.TotalPrice1 += item.nowPrice; this.TotalPrice = this.TotalPrice1 + ".00"; if (item.tjCategory != null) { this.form.category = item.tjCategory; } if (item.pacName === null) { item.pacName = "单项"; } @@ -2185,6 +2570,8 @@ } }); this.taocan = false; this.defaultKeys = []; this.DataLists = []; }, // 最后提交按钮