| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | |
| | | |
| | | <el-row v-show="top"> |
| | | <el-col :span="19"> |
| | |
| | | <el-dialog |
| | | title="选择套餐" |
| | | :visible.sync="taocan" |
| | | width="50%" |
| | | width="70%" |
| | | height="700px" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-tabs |
| | | type="border-card" |
| | | style="height: 560px; margin: 0 10px; width: 100%" |
| | | v-model="activeNames" |
| | | @tab-click="handleClick" |
| | | > |
| | | <el-tab-pane label="套餐"> |
| | | <el-tab-pane label="套餐" name="first"> |
| | | <el-form |
| | | :model="queryParam" |
| | | ref="queryForm" |
| | |
| | | @selection-change="handleSelectionChange" |
| | | height="450px" |
| | | ref="tb" |
| | | style="width: 850px" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | |
| | | ></el-button> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="单项"> |
| | | <el-tab-pane label="组合" name="third"> |
| | | <!-- <div class="tab3"> --> |
| | | <el-row :gutter="20" style="width: 100%"> |
| | | <el-col :span="6"> |
| | | <div |
| | | style=" |
| | | text-align: center; |
| | | margin-bottom: 10px; |
| | | margin-top: 10px; |
| | | " |
| | | > |
| | | 项目列表 |
| | | </div> |
| | | <el-input placeholder="输入关键字进行过滤" v-model="filterage"> |
| | | </el-input> |
| | | <div class="tab3"> |
| | | <el-tree |
| | | class="filter-tree" |
| | | v-loading="loading" |
| | | :data="packageList" |
| | | :props="defaultProp" |
| | | show-checkbox |
| | | node-key="id" |
| | | @check="handlepackage" |
| | | :default-checked-keys="checkedkeys" |
| | | :filter-node-method="filterpackage" |
| | | ref="treas" |
| | | :render-content="renderContents" |
| | | > |
| | | </el-tree> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <div |
| | | style=" |
| | | text-align: center; |
| | | margin-bottom: 10px; |
| | | margin-top: 10px; |
| | | " |
| | | > |
| | | 明细项目列表 |
| | | </div> |
| | | <div class="tab3"> |
| | | <el-tree |
| | | class="filter-tree" |
| | | v-loading="loading" |
| | | :data="packagedataList" |
| | | node-key="proId" |
| | | :props="defaultpackProps" |
| | | :render-content="renderContent" |
| | | > |
| | | </el-tree> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <div class="grid-content bg-purple"> |
| | | <div |
| | | style=" |
| | | text-align: center; |
| | | margin-bottom: 10px; |
| | | margin-top: 10px; |
| | | " |
| | | > |
| | | 已选项目列表 |
| | | </div> |
| | | <el-table |
| | | :data="DataLists" |
| | | border |
| | | style="width: 100%" |
| | | height="400" |
| | | :span-method="objectspanmethod" |
| | | > |
| | | <el-table-column prop="propinName" label="检查项目"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="proName" |
| | | label="明细项目" |
| | | width="260px" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="proPrice" label="原价" width="56px"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | width="50px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDel(scope.row)" |
| | | title="删除" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <h3 style="font-weight: 600">合计:{{ marryalls }}元</h3> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- </div> --> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="单项" name="second"> |
| | | <div class="tab8"> |
| | | <!-- <div class="tab7"> |
| | | <v-tree-transfer |
| | |
| | | > |
| | | 项目列表 |
| | | </div> |
| | | <!-- @input="gaibian" --> |
| | | <el-input placeholder="输入关键字进行过滤" v-model="filterText"> |
| | | </el-input> |
| | | <div class="tab3"> |
| | |
| | | :default-checked-keys="checkedkey" |
| | | :filter-node-method="filterNode" |
| | | ref="tree" |
| | | :render-content="renderContent" |
| | | > |
| | | </el-tree> |
| | | </div> |
| | |
| | | show-checkbox |
| | | @check-change="handleCurrentChecked1" |
| | | :default-checked-keys="checkedListkey" |
| | | :render-content="renderContent" |
| | | > |
| | | </el-tree> |
| | | </div> |
| | |
| | | <el-table-column prop="propinName" label="检查项目"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="proPrice" |
| | | label="原价" |
| | | width="56px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="proName" |
| | | label="明细项目" |
| | | width="260px" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="proPrice" label="原价" width="56px"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-collapse v-model="activeName" accordion v-if="list1"> |
| | | <h3 style="font-weight: 600">合计:{{ marryall }}元</h3> |
| | | <!-- <el-collapse v-model="activeName" accordion v-if="list1"> |
| | | <div> |
| | | <el-collapse-item title="请选择项目"> |
| | | <el-table |
| | |
| | | </el-table> |
| | | </el-collapse-item> |
| | | </div> |
| | | </el-collapse> |
| | | </el-collapse> --> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | > |
| | | <el-collapse-item :name="index"> |
| | | <template slot="title"> |
| | | {{ |
| | | item.pacName + |
| | | ":" + |
| | | item.parentName + |
| | | " (应收金额:" + |
| | | item.ordPrice + |
| | | "元 / 实收金额:" + |
| | | item.nowPrice + |
| | | "元)" |
| | | }} |
| | | <div style="width: 70%"> |
| | | {{ |
| | | item.pacName + |
| | | ":" + |
| | | item.parentName + |
| | | " (应收金额:" + |
| | | item.ordPrice + |
| | | "元 / 实收金额:" + |
| | | item.nowPrice + |
| | | "元)" |
| | | }} |
| | | </div> |
| | | |
| | | <div style="width: 20%"> |
| | | <el-button |
| | | type="primary" |
| | | @click="candelete(item)" |
| | | style="float: right" |
| | | >删 除</el-button |
| | | > |
| | | </div> |
| | | </template> |
| | | <el-table |
| | | :data="item.list" |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-dialog> |
| | | <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> |
| | | <div style="position: absolute; bottom: 100px; width: 360px; display: none"> |
| | | <div |
| | | id="printBill" |
| | |
| | | </span> --> |
| | | <!-- </el-dialog> --> |
| | | <historyTj :cusIdCard="form.cusIdcard" ref="historyTj"></historyTj> |
| | | <el-dialog |
| | | title="提示" |
| | | :visible.sync="dialogVisiblese" |
| | | width="30%" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-dialog title="提示" :visible.sync="dialogVisiblese" width="30%"> |
| | | <span>是否复制最近一次的体检项目?</span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisiblese = false">取 消</el-button> |
| | |
| | | getByTjNum, |
| | | } from "@/api/hosp/customer"; |
| | | import { getPrintSetUp } from "@/api/system/examcharge"; |
| | | |
| | | import axios from "axios"; |
| | | import { getIp } from "@/utils/auth"; |
| | | import { |
| | | deptTreeSelect, |
| | | projectGetList, |
| | |
| | | getaddtTransition, |
| | | getTransitionList, |
| | | getByTeamNo, |
| | | delTbBycusCardIdAndProId, |
| | | getLoadFile, |
| | | getIsRequired, |
| | | getconfigKey, |
| | | getHistryTjOrderProByCusIdCard, |
| | | readCertCardInfos, |
| | | } from "@/api/system/tijian"; |
| | | import Packages from "@/components/Packages"; |
| | | import { MessageBox } from "element-ui"; |
| | | import VTreeTransfer from "./TreeTransfer.vue"; |
| | | import { getZhList, getlistByZhId } from "@/api/system/package"; |
| | | import historyTj from "@/components/historyTj/index"; |
| | | export default { |
| | | dicts: [ |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | filterage: "", |
| | | checkedkeys: [], |
| | | DataLists: [], |
| | | marryalls: 0, |
| | | packagedataList: [], |
| | | packageList: [], |
| | | zhxqList: [], |
| | | zhList: [], |
| | | pname: "", |
| | | filterText: "", |
| | | proIdList: [], |
| | | tableDatas: [], |
| | | dialogVisiblese: false, |
| | | cardreaderradio: 3, |
| | | lishi: false, |
| | | table: false, |
| | | HistoryList: {}, |
| | | index: 0, |
| | | names: "", |
| | | inputSSS: "", |
| | | dictType: [ |
| | | { |
| | | value: 0, |
| | |
| | | }, |
| | | ], |
| | | isNow: 1, |
| | | marryall: 0, |
| | | treeId: [], |
| | | treeList: [], |
| | | defaultKeys: [], |
| | |
| | | hospName: "", |
| | | currentDate: "", |
| | | currentTime: "", |
| | | tjCategory: "", |
| | | tjCategory: "12", |
| | | formIn: { |
| | | tjPro: "体检费", |
| | | }, |
| | |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | cardreader: false, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | nodeobj: {}, |
| | |
| | | proIds: [], |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | activeNames: "first", |
| | | // 树状形状 |
| | | Treedata: [], |
| | | TreedataList: [], |
| | | TreedataLists: [], |
| | | treedataList: [], |
| | | checkedkey: [], |
| | | checkedListkey: [], |
| | | defaultProps: { |
| | | children: [], |
| | | label: "proName", |
| | | }, |
| | | defaultProp: { |
| | | children: [], |
| | | label: "zhmc", |
| | | }, |
| | | defaultpackProps: { |
| | | children: [], |
| | | label: "proName", |
| | | }, |
| | |
| | | pacRemark: null, |
| | | }, |
| | | valueUrl: "ws://127.0.0.1:18890", |
| | | valueUrls: "ws://127.0.0.1:6789/websocket", |
| | | // valueUrls: "ws://"+getIp() +":6789/websocket", |
| | | WebSocket: null, |
| | | // 身份证需要 |
| | | // socket: null, |
| | |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | }, |
| | | filterage(val) { |
| | | this.$refs.treas.filter(val); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getCurrentDateTime(); |
| | | |
| | | this.startTimer(); |
| | | this.getList1(); |
| | | // this.getData(); |
| | | }, |
| | | |
| | | methods: { |
| | | getCurrentDateTime() { |
| | | const currentDate = new Date(); |
| | |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.proName.indexOf(value) !== -1; |
| | | // return data.proName.indexOf(value) !== -1; |
| | | if (data.proName.indexOf(value) !== -1) { |
| | | return data.proName.indexOf(value) !== -1; |
| | | } else { |
| | | return data.proEngName.indexOf(value) !== -1; |
| | | } |
| | | }, |
| | | filterpackage(value, data) { |
| | | if (!value) return true; |
| | | if (data.zhmc.indexOf(value) !== -1) { |
| | | return data.zhmc.indexOf(value) !== -1; |
| | | } else { |
| | | return data.pym.indexOf(value) !== -1; |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.timer); |
| | |
| | | }, |
| | | inputChanges() { |
| | | this.$refs.historyTj.getlist(); |
| | | }, |
| | | |
| | | candelete(item) { |
| | | let data = { |
| | | cusCardId: this.form.cusIdcard, |
| | | proId: item.proPrantId, |
| | | }; |
| | | delTbBycusCardIdAndProId(data).then((res) => { |
| | | getTransitionList(this.form.cusIdcard).then((response) => { |
| | | this.tableData1 = response.data; |
| | | this.TotalPrice1 = 0; |
| | | if (this.tableData1) { |
| | | this.tableData1.forEach((item) => { |
| | | this.TotalPrice1 += item.nowPrice; |
| | | if (item.pacName === null) { |
| | | item.pacName = "单项"; |
| | | } |
| | | if (item.pacName == "单项") { |
| | | item.list.forEach((item9) => { |
| | | this.treeList.push(item9.proId); |
| | | }); |
| | | } |
| | | this.pacName = item.pacName; |
| | | }); |
| | | |
| | | const r = /^\+?[0-9][0-9]*$/; //正整数(可以0打头) |
| | | let TotalPrice = this.TotalPrice1 * (this.discount / 10); |
| | | if (r.test(TotalPrice)) { |
| | | this.TotalPrice = TotalPrice + ".00"; |
| | | } else { |
| | | this.TotalPrice = TotalPrice; |
| | | } |
| | | |
| | | this.list1 = false; |
| | | this.list3 = true; |
| | | } else { |
| | | this.list1 = true; |
| | | |
| | | this.TotalPrice = "0.00"; |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | cope() { |
| | | this.tcShow = true; |
| | |
| | | if (this.tableData1) { |
| | | this.tableData1.forEach((item) => { |
| | | this.TotalPrice1 += item.ysPrice; |
| | | console.log(this.TotalPrice1); |
| | | this.TotalPrice = ( |
| | | this.TotalPrice1 * |
| | | (this.discount / 10) |
| | |
| | | this.TotalPrice1 = 0; |
| | | this.tableData1.forEach((item) => { |
| | | this.TotalPrice1 += item.nowPrice; |
| | | console.log(this.TotalPrice1); |
| | | this.TotalPrice = ( |
| | | this.TotalPrice1 * |
| | | (this.discount / 10) |
| | |
| | | } else { |
| | | _this.tcShow = true; |
| | | this.$message.warning("暂无预约信息"); |
| | | _this.resetpackage(); |
| | | } |
| | | _this.isDisabled = true; |
| | | } else { |
| | |
| | | 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; |
| | | // }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | 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("请检查读卡器连接是否正常"); |
| | | }; |
| | | } |
| | | }, |
| | | |
| | |
| | | this.taocan = false; |
| | | this.malldisble = false; |
| | | this.defaultKeys = []; |
| | | this.DataLists = []; |
| | | }, |
| | | |
| | | cancell() { |
| | |
| | | // } |
| | | // }, |
| | | |
| | | resetpackage(){ |
| | | resetpackage() { |
| | | if (this.form.cusIdcard) { |
| | | var cusId = this.form.cusIdcard; |
| | | } else { |
| | | this.$message.warning("请先填写信息,再选体检内容"); |
| | | } |
| | | let _this = this; |
| | | _this.pacId = ""; |
| | | _this.pacId = ""; |
| | | this.proIds = []; |
| | | this.tjCategory = "12"; |
| | | let data = { |
| | | cusId, |
| | | pacId: _this.pacId, |
| | |
| | | getTransitionList(cusId).then((response) => { |
| | | this.tableData1 = response.data; |
| | | this.TotalPrice1 = 0; |
| | | if (this.tableData1.length>=1) { |
| | | if (this.tableData1.length >= 1) { |
| | | this.list1 = false; |
| | | this.list3 = true; |
| | | } else { |
| | |
| | | |
| | | Package() { |
| | | this.taocan = true; |
| | | this.activeNames = "first"; |
| | | let cusSex = this.form.cusSex; |
| | | this.datekey = Date.now(); |
| | | //全部套餐 |
| | | this.loading = true; |
| | | deptTreeSelect(cusSex).then((response) => { |
| | | this.newpacName = response.rows; |
| | | |
| | | try { |
| | | if (this.tableData1.length >= 1) { |
| | | this.newpacName.forEach((item3) => { |
| | |
| | | } |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | if (this.tableData1.length != 0) { |
| | | this.tableData.forEach((item) => { |
| | | this.tableData1.forEach((item1) => { |
| | | item.tjProjectList.forEach((item2) => { |
| | | console.log(item1); |
| | | if (item2.proId == item1.proPrantId && item1.pacName == "单项") { |
| | | this.$confirm( |
| | | "该套餐包含了已选单项,是否确认选择该套餐?", |
| | | "确认信息", |
| | | { |
| | | distinguishCancelAndClose: true, |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "请注意查看价格", |
| | | }); |
| | | }) |
| | | .catch((action) => { |
| | | if (action === "cancel") { |
| | | let del_row = selection.shift(); |
| | | this.$refs.tb.toggleRowSelection(del_row, false); |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "已取消", |
| | | }); |
| | | } |
| | | }); |
| | | // this.$message.warning("该套餐包含了已选单项,若选择该套餐,请先删除单项"); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | if (selection[0]) { |
| | | // this.DataList = []; |
| | | // this.data = JSON.parse(JSON.stringify(this.dXData)); |
| | | selection[0].tjProjectList.forEach((selectionitem) => { |
| | | this.Treedata.forEach((item) => { |
| | | if (selectionitem.proName == item.proName) { |
| | | item.disabled = true; |
| | | item.tjProjectList = []; |
| | | } |
| | | // if (item.tjProjectList) { |
| | | // item.tjProjectList.forEach((item1) => { |
| | | // if (selectionitem.proName == item1.proName) { |
| | | // item1.disabled = true; |
| | | // item1.tjProjectList = []; |
| | | // } |
| | | // if (item1.tjProjectList) { |
| | | // item1.tjProjectList.forEach((item2) => { |
| | | // if (selectionitem.proName == item2.proName) { |
| | | // item2.disabled = true; |
| | | // item2.tjProjectList = []; |
| | | // } |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | }); |
| | | this.TreedataList.forEach((item3) => { |
| | | if (item3.proParentId == selectionitem.proId) { |
| | | item.disabled = true; |
| | | } |
| | | }); |
| | | }); |
| | | // selection[0].tjProjectList.forEach((selectionitem) => { |
| | | // this.Treedata.forEach((item) => { |
| | | // if (selectionitem.proName == item.proName) { |
| | | // item.disabled = true; |
| | | // item.tjProjectList = []; |
| | | // } |
| | | // if (item.tjProjectList) { |
| | | // item.tjProjectList.forEach((item1) => { |
| | | // if (selectionitem.proName == item1.proName) { |
| | | // item1.disabled = true; |
| | | // item1.tjProjectList = []; |
| | | // } |
| | | // if (item1.tjProjectList) { |
| | | // item1.tjProjectList.forEach((item2) => { |
| | | // if (selectionitem.proName == item2.proName) { |
| | | // item2.disabled = true; |
| | | // item2.tjProjectList = []; |
| | | // } |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | // }); |
| | | // this.TreedataList.forEach((item3) => { |
| | | // if (item3.proParentId == selectionitem.proId) { |
| | | // item.disabled = true; |
| | | // } |
| | | // }); |
| | | // }); |
| | | } else { |
| | | this.treedataList = JSON.parse(JSON.stringify(this.dXData)); |
| | | return; |
| | | } |
| | | }, |
| | | handleClick(tab, event) { |
| | | if (tab.label == "单项") { |
| | | 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.loading = false; |
| | | }); |
| | | } |
| | | }, |
| | | // gaibian(val){ |
| | | // console.log(val); |
| | | // let pname = val; |
| | | // console.log(pname); |
| | | // getProParentIdDxList(pname).then(response=>{ |
| | | // this.Treedata = response.data.list; |
| | | // }) |
| | | // }, |
| | | getDataList() { |
| | | this.loading = true; |
| | | getProParentIdDxList().then((response) => { |
| | |
| | | }); |
| | | }); |
| | | } |
| | | 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; |
| | | |
| | | if (this.DataList.length != 0) { |
| | | this.list1 = false; |
| | | this.DataList.forEach((item) => { |
| | | this.TotalPrice1 = item.proPrice + this.TotalPrice1; |
| | | // if (this.DataLists.length != 0) { |
| | | // this.DataLists.forEach((selectionitem) => { |
| | | // this.Treedata.forEach((item) => { |
| | | // if (selectionitem.propinName == item.proName) { |
| | | // item.disabled = true; |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } |
| | | // 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; |
| | | }); |
| | | }, |
| | | handlepackage(data, checked, checkedNodes) { |
| | | if (checked.checkedNodes.length != 0) { |
| | | this.$refs.treas.setCheckedKeys([data.id]); |
| | | let datas = { |
| | | zhId: data.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; |
| | | }); |
| | | } else if (checked.checkedNodes.length == 0) { |
| | | // for (var i = 0; i < data.tjProjectList.length; i++) { |
| | | // let proId = data.tjProjectList[i].proId; |
| | | // getProSonDxList(proId).then((res) => { |
| | | // this.TreedataList = res.data.list; |
| | | // this.TreedataList.forEach((item) => { |
| | | // this.DataLists.forEach((item1, index) => { |
| | | // if (item.proId == item1.proId) { |
| | | // this.DataLists.splice(index, 1); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // this.marryalls = 0 |
| | | // if(this.DataLists.length != 0){ |
| | | // this.DataLists.forEach((item1, index) => { |
| | | // this.marryalls += item1.proPrice; |
| | | // }) |
| | | // } |
| | | // }); |
| | | // } |
| | | } |
| | | }, |
| | | objectspanmethod({ row, column, rowIndex, columnIndex }) { |
| | | let fields = ["propinName"]; |
| | | let cellValue = row[column.property]; |
| | | if (cellValue && fields.includes(column.property)) { |
| | | let prevRow = this.DataLists[rowIndex - 1]; |
| | | let nextRow = this.DataLists[rowIndex + 1]; |
| | | if (prevRow && prevRow[column.property] === cellValue) { |
| | | return { rowspan: 0, colspan: 0 }; |
| | | } else { |
| | | let countRowspan = 1; |
| | | while (nextRow && nextRow[column.property] === cellValue) { |
| | | nextRow = this.DataLists[++countRowspan + rowIndex]; |
| | | } |
| | | |
| | | if (countRowspan > 1) { |
| | | return { rowspan: countRowspan, colspan: 1 }; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // if (columnIndex == 3) { |
| | | // let rowspan = 0; |
| | | // this.DataLists.forEach((element) => { |
| | | // if (element.propinName === row.propinName) { |
| | | // rowspan++; |
| | | // } |
| | | // }); |
| | | // return [rowspan, 1]; |
| | | // } |
| | | }, |
| | | |
| | | // 点击获取每个树节点 |
| | |
| | | }); |
| | | }); |
| | | 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.TotalPrice1 = item.proPrice + this.TotalPrice1; |
| | | this.marryall += item.proPrice; |
| | | }); |
| | | } |
| | | }); |
| | |
| | | return this.DataList; |
| | | }, |
| | | |
| | | renderContent(h, { node, data, store }) { |
| | | return ( |
| | | <span class="custom-tree-node"> |
| | | <span>{node.label}</span> |
| | | <span>({data.proPrice}元)</span> |
| | | </span> |
| | | ); |
| | | }, |
| | | renderContents(h, { node, data, store }) { |
| | | return ( |
| | | <span class="custom-tree-node"> |
| | | <span>{node.label}</span> |
| | | <span>({data.price}元)</span> |
| | | </span> |
| | | ); |
| | | }, |
| | | // 点击获取每个树节点 |
| | | handleCurrentChecked1(data, checked, checkedNodes) { |
| | | if (checked == false) { |
| | | this.DataList.forEach((item, index) => { |
| | | if (item.proId == data.proId) { |
| | | this.DataList.splice(index, 1); |
| | | this.TotalPrice1 = 0; |
| | | this.marryall = 0; |
| | | this.DataList.forEach((item1) => { |
| | | this.TotalPrice1 = item1.proPrice + this.TotalPrice1; |
| | | this.marryall += item1.proPrice; |
| | | }); |
| | | } |
| | | }); |
| | |
| | | } |
| | | }); |
| | | this.spliceData(); |
| | | this.TotalPrice1 = 0; |
| | | this.marryall = 0; |
| | | this.DataList.forEach((item1) => { |
| | | this.TotalPrice1 = item1.proPrice + this.TotalPrice1; |
| | | this.marryall += item1.proPrice; |
| | | }); |
| | | } |
| | | }, |
| | |
| | | this.DataList.forEach((item, index) => { |
| | | if (item.proId == row.proId) { |
| | | this.DataList.splice(index, 1); |
| | | this.TotalPrice1 = 0; |
| | | this.marryall = 0; |
| | | this.DataList.forEach((item1) => { |
| | | this.TotalPrice1 = item1.proPrice + this.TotalPrice1; |
| | | this.marryall += item1.proPrice; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | handleDel(row) { |
| | | this.DataLists.forEach((item, index) => { |
| | | if (item.proId == row.proId) { |
| | | this.DataLists.splice(index, 1); |
| | | this.marryalls = 0; |
| | | this.DataLists.forEach((item1) => { |
| | | this.marryalls += item1.proPrice; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // // 默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 } |
| | | objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | console.log(row, column, rowIndex, columnIndex); |
| | | let fields = ["propinName"]; |
| | | let cellValue = row[column.property]; |
| | | if (cellValue && fields.includes(column.property)) { |
| | |
| | | this.proIds.push(item.proId); |
| | | }); |
| | | } |
| | | if (this.DataLists.length != 0) { |
| | | this.DataLists.forEach((item) => { |
| | | this.proIds.push(item.proId); |
| | | }); |
| | | } |
| | | let data = { |
| | | cusId, |
| | | pacId: _this.pacId, |
| | | proIds: this.proIds, |
| | | }; |
| | | getaddtTransition(data).then((response) => { |
| | | if (response.code === 200) { |
| | | if (response.code == 200) { |
| | | let cusId = this.form.cusIdcard; |
| | | this.proIds = []; |
| | | getTransitionList(cusId).then((response) => { |
| | |
| | | if (this.tableData1) { |
| | | this.tableData1.forEach((item) => { |
| | | this.TotalPrice1 += item.nowPrice; |
| | | if (item.pacName === null) { |
| | | item.pacName = "单项"; |
| | | if (item.tjCategory != null) { |
| | | this.tjCategory = item.tjCategory; |
| | | } |
| | | if (item.pacName == "单项") { |
| | | item.list.forEach((item9) => { |
| | |
| | | } else { |
| | | this.TotalPrice = TotalPrice; |
| | | } |
| | | |
| | | this.list1 = false; |
| | | this.list3 = true; |
| | | } else { |
| | | this.list1 = true; |
| | | |
| | | this.TotalPrice = "0.00"; |
| | | } |
| | | }); |
| | |
| | | }); |
| | | this.taocan = false; |
| | | this.defaultKeys = []; |
| | | this.DataLists = []; |
| | | }, |
| | | // changeCategoryKeys(val) { |
| | | // this.proIds = []; |
| | |
| | | message: "请选择套餐!", |
| | | }); |
| | | } |
| | | }else { |
| | | } else { |
| | | this.$modal.msgError("请选择体检类别"); |
| | | } |
| | | }, |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | } |
| | | |
| | | .tab3 { |
| | | max-height: 400px; |
| | | border: 1px solid #dcdfe6; |
| | | } |
| | | |
| | | .filter-tree { |
| | | /* max-height: 360px; |
| | | overflow-y: auto; |
| | | border: 1px solid #d9d9d9; |
| | | border: 1px solid #d9d9d9; */ |
| | | overflow: auto; |
| | | flex: 1; |
| | | height: 350px; |
| | | } |
| | | |
| | | .tab2 { |
| | |
| | | .content { |
| | | margin-bottom: 25px; |
| | | } |
| | | .tab8 { |
| | | width: 100%; |
| | | display: flex; |
| | | } |
| | | </style> |