| | |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | <el-input v-model="form.cusPhone" placeholder="请输入联系电话" :disabled="isDisabled" |
| | | <el-input v-model="form.cusPhone" placeholder="请输入联系电话" :disabled="isDisabled" maxlength="11" |
| | | @input="form.cusPhone = $event.replace(/\s/g, '')" /> |
| | | </el-form-item> |
| | | |
| | |
| | | <el-button v-show="lishi" type="primary" @click="cope" size="mini">一键复制</el-button> |
| | | <el-button type="primary" @click="inputChanges" v-show="lishi" size="mini" |
| | | :disabled="confirm">历史体检记录</el-button> |
| | | <el-button :disabled="isDisabled" type="primary" size="mini" @click="submitForm">登记</el-button> |
| | | <el-button :disabled="butopen" type="primary" size="mini" @click="submitForm">登记</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" @queryTable="getList">重置</el-button> |
| | | </div> |
| | | </el-col> |
| | |
| | | <el-dialog title="选择套餐" :visible.sync="taocan" 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="套餐" name="first"> |
| | | <el-tab-pane label="套餐" name="first" :disabled ="form.sftj == 'Y'|| form.sftj == 'y'"> |
| | | <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"> |
| | |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="组合" name="third"> |
| | | <el-tab-pane label="组合" name="third" :disabled ="form.sftj == 'Y'|| form.sftj == 'y'"> |
| | | <el-row :gutter="20" style="width: 100%"> |
| | | <el-col :span="6" style="min-width: 200px"> |
| | | <div style="text-align: center; margin-bottom: 10px; margin-top: 10px;"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="单项" name="second"> |
| | | <el-tab-pane label="单项" name="second" :disabled ="form.sftj == 'Y'|| form.sftj == 'y'"> |
| | | <el-row :gutter="20" style="width: 100%"> |
| | | <el-col :span="6" style="min-width: 200px"> |
| | | <div style="text-align: center; margin-bottom: 10px; margin-top: 10px;"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="亲属套餐" name="four" :disabled ="form.sftj == 'N'|| form.sftj == 'n'"> |
| | | <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> |
| | | <el-form-item label="身份证" prop="pacName"> |
| | | <el-input v-model="queryParam.pacName" placeholder="请输入身份证" clearable @keyup.enter.native="handle" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handle">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="tab4"> |
| | | <div class="grid-content bg-purple" style="margin-left: 5px; width: 98%"> |
| | | <el-table v-loading="loading" element-loading-text="正在加载中..." element-loading-spinner="el-icon-loading" |
| | | border :data="newpacName" @selection-change="handleSelectionChange" height="450px" ref="tb"> |
| | | <el-table-column type="selection" width="40px" align="center" label="选择" /> |
| | | <el-table-column label="套餐名称" align="center" prop="pacName" width="120px" /> |
| | | <el-table-column label="套餐价格" align="center" prop="price" width="120px" /> |
| | | <el-table-column label="套餐明细" align="center" prop="allProName" :show-overflow-tooltip="true" /> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | <el-button type="primary" @click="submit">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- --> |
| | | <el-row v-if="tcShow"> |
| | | <el-col :span="15"> |
| | | <div class="grid-content bg-purple"> |
| | |
| | | :max="10" :min="0" @change="debounceNumberChange" :disabled="isfalse"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="实收金额"> |
| | | <el-input placeholder="实收金额" v-model="TotalPrice" style="width: 206px" @input="changeXianjia" |
| | | <el-input placeholder="实收金额" v-model="TotalPrice" style="width: 205px" @input="changeXianjia" |
| | | @blur="numberChangeXianPrice(discount, discount)" /> |
| | | </el-form-item> |
| | | <el-form-item label="是否替检" v-if="tjtype"> |
| | | <!-- <el-input placeholder="是否替检" v-model="sftj" style="width: 150px"></el-input> --> |
| | | <el-select v-model="form.sftj" placeholder="是否替检" style="width: 150px"> |
| | | <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> |
| | | <br /> |
| | | |
| | |
| | | // 非单个禁用 |
| | | single: true, |
| | | cardreader: false, |
| | | butopen:false, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | nodeobj: {}, |
| | |
| | | proIds: [], |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | tjtype: false, |
| | | sftj: null, |
| | | activeNames: "first", |
| | | // 树状形状 |
| | | Treedata: [], |
| | |
| | | pacName: null, |
| | | pacRemark: null, |
| | | }, |
| | | // valueUrl: "ws://127.0.0.1:18890", |
| | | // 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", |
| | | // valueUrl: "ws://192.168.1.244:6789/websocket", |
| | | // valueUrls: "ws://192.168.1.244:6789/websocket", |
| | | webSocket: null, |
| | | // 身份证需要 |
| | | // socket: null, |
| | |
| | | this.title = "添加体检单位信息维护"; |
| | | }, |
| | | idFn1() { |
| | | this.tjtype = true |
| | | if (this.form.firmName) { |
| | | const originalCompId = this.form.firmId; |
| | | this.CompanyList.forEach((item) => { |
| | |
| | | /** 登记提交按钮 */ |
| | | submitForm() { |
| | | let _this = this; |
| | | _this.butopen = true; |
| | | if (!this.form.cusPhone || !this.form.cusName) { |
| | | this.$message.warning("请填选必填项"); |
| | | } else { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | // 创建表单数据的副本并去除空格 |
| | | const formData = { ...this.form }; |
| | | formData.cusName = formData.cusName ? formData.cusName.replace(/\s/g, '') : ''; |
| | | formData.cusPhone = formData.cusPhone ? formData.cusPhone.replace(/\s/g, '') : ''; |
| | | formData.cusIdcard = formData.cusIdcard ? formData.cusIdcard.replace(/\s/g, '') : ''; |
| | | |
| | | // 处理性别值 |
| | | if (formData.cusSex === "女") { |
| | | formData.cusSex = 1; |
| | | } |
| | | if (formData.cusSex === "男") { |
| | | formData.cusSex = 0; |
| | | } |
| | | if (formData.cusSex === "未知") { |
| | | formData.cusSex = 2; |
| | | } |
| | | if (formData.tjType === "") { |
| | | formData.tjType = this.dict.type.dict_team[0].value; |
| | | |
| | | } |
| | | |
| | | addCustomer(formData).then((response) => { |
| | | this.responseList = response.data; |
| | | this.form.tjType = this.dict.type.dict_team[0].value; |
| | | this.$modal.msgSuccess("新增成功"); |
| | | _this.tcShow = true; |
| | | _this.isDisabled = true; |
| | | _this.top = false; |
| | | }); |
| | | } |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | // 创建表单数据的副本并去除空格 |
| | | const formData = { ...this.form }; |
| | | formData.cusName = formData.cusName ? formData.cusName.replace(/\s/g, '') : ''; |
| | | formData.cusPhone = formData.cusPhone ? formData.cusPhone.replace(/\s/g, '') : ''; |
| | | formData.cusIdcard = formData.cusIdcard ? formData.cusIdcard.replace(/\s/g, '') : ''; |
| | | // 添加 sfzImg 字段 |
| | | formData.sfzImg = this.imageUrl || ''; // 使用 base64 格式的头像数据,若为空则传空字符串 |
| | | |
| | | // 处理性别值 |
| | | if (formData.cusSex === "女") { |
| | | formData.cusSex = 1; |
| | | } |
| | | if (formData.cusSex === "男") { |
| | | formData.cusSex = 0; |
| | | } |
| | | if (formData.cusSex === "未知") { |
| | | formData.cusSex = 2; |
| | | } |
| | | if (formData.tjType === "") { |
| | | formData.tjType = this.dict.type.dict_team[0].value; |
| | | } |
| | | |
| | | // 可选:检查 sfzImg 是否存在 |
| | | // if (!formData.sfzImg) { |
| | | // this.$message.warning("请先获取身份证头像"); |
| | | // return; |
| | | // } |
| | | |
| | | addCustomer(formData).then((response) => { |
| | | _this.butopen = false; |
| | | this.responseList = response.data; |
| | | this.form.tjType = this.dict.type.dict_team[0].value; |
| | | this.$modal.msgSuccess("新增成功"); |
| | | _this.tcShow = true; |
| | | _this.isDisabled = true; |
| | | _this.top = false; |
| | | }).catch((error) => { |
| | | _this.butopen = false; |
| | | this.$modal.msgError("登记失败,请检查数据"); |
| | | console.error("Error in addCustomer:", error); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | getmailType() { |
| | |
| | | if (isChineseChar(resultObj.data.sex)) { |
| | | _this.form.cusSex = resultObj.data.sex == "女" ? 1 : 0 |
| | | } else { |
| | | _this.form.cusSex = resultObj.data.sex; |
| | | _this.form.cusSex = resultObj.data.sex == "1" ? 0 : 1; |
| | | } |
| | | _this.form.cusNational = resultObj.data.mz; |
| | | _this.form.cusBrithday = resultObj.data.csrq; |
| | |
| | | websocket.onmessage = function (event) { |
| | | var resultObj = JSON.parse(event.data); |
| | | _this.form.cusName = resultObj.data.name; |
| | | _this.form.cusSex = resultObj.data.sex; |
| | | const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char) |
| | | // _this.form.cusSex = resultObj.data.sex; |
| | | if (isChineseChar(resultObj.data.sex)) { |
| | | _this.form.cusSex = resultObj.data.sex == "女" ? 1 : 0 |
| | | } else { |
| | | _this.form.cusSex = resultObj.data.sex == "1" ? 0 : 1; |
| | | } |
| | | _this.form.cusNational = resultObj.data.mz; |
| | | _this.form.cusBrithday = resultObj.data.csrq; |
| | | if (_this.form.cusBrithday) { |
| | |
| | | this.form.cusIdcard = params[0].sfzh; |
| | | this.handleQuery(); |
| | | }, |
| | | |
| | | // 上传头像 |
| | | handleAvatarSuccess(res, file) { |
| | | this.imageUrl = URL.createObjectURL(file.raw); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isJPG = file.type === "image/jpeg"; |
| | | const isLt2M = file.size / 1024 / 1024 < 2; |
| | |
| | | }); |
| | | } else if (!this.form.firmId && this.form.firmName) { |
| | | this.taocan = true; |
| | | if(this.form.sftj == "Y" || this.form.sftj == "y"){ |
| | | this.activeNames = "four" |
| | | }else{ |
| | | this.activeNames = "first" |
| | | } |
| | | this.loading = true; |
| | | deptTreeSelect(cusSex).then((response) => { |
| | | this.newpacName = response.rows; |
| | |
| | | |
| | | else { |
| | | this.taocan = true; |
| | | if(this.form.sftj == "Y" || this.form.sftj == "y"){ |
| | | this.activeNames = "four" |
| | | }else{ |
| | | this.activeNames = "first" |
| | | } |
| | | this.loading = true; |
| | | tuantiSelect(param).then((res) => { |
| | | this.newpacName = res.data; |
| | |
| | | } |
| | | } else { |
| | | this.taocan = true; |
| | | if(this.form.sftj == "Y" || this.form.sftj == "y"){ |
| | | this.activeNames = "four" |
| | | }else{ |
| | | this.activeNames = "first" |
| | | } |
| | | this.loading = true; |
| | | deptTreeSelect(cusSex).then((response) => { |
| | | this.newpacName = response.rows; |
| | |
| | | |
| | | // 处理订单项目 |
| | | processOrderItems(cusId) { |
| | | console.log(11222) |
| | | getTransitionList1(cusId).then((response) => { |
| | | this.tableData1 = response.data; |
| | | // if (response.data.tjCategory != null) { |
| | | // this.tjCategory = response.data.tjCategory; |
| | | // } |
| | | let Price = 0; |
| | | if (this.tableData1) { |
| | | this.tableData1.forEach((item) => { |
| | |
| | | let _this = this; |
| | | this.loadingSubmit = true; |
| | | if (_this.tjCategory !== "") { |
| | | let List = _this.tableData1; //单个项目信息 |
| | | let List = _this.tableData1; // 单个项目信息 |
| | | if (this.responseList.cusId) { |
| | | var userId = this.responseList.cusId; |
| | | } else { |
| | |
| | | var pacId = this.tableData[0].pacId; |
| | | } |
| | | |
| | | //tjOrderList//这个是处理完的每一项套餐信息 |
| | | // tjOrderList 处理 |
| | | List.forEach((item) => { |
| | | if (item.list) { |
| | | item.list.forEach((item1) => { |
| | |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | let copeWith = this.TotalPrice1; |
| | | let paidIn = this.TotalPrice.toString(); |
| | | let discount = this.discount; |
| | | this.tjFlowingWater = { copeWith, paidIn, discount }; |
| | | |
| | | const newArray = this.tableData1 |
| | | .filter((item) => item.discount < 10) // 过滤出 discount < 10 的项 |
| | | .filter((item) => item.discount < 10) |
| | | .map((item) => ({ |
| | | discount: item.discount, |
| | | parentProId: item.parentProId, |
| | | cusIdCard: item.cusId, |
| | | yhj: item.nowPrice |
| | | })); // 创建新的对象,包含 discount 和 id |
| | | yhj: item.nowPrice, |
| | | })); |
| | | |
| | | gaibianzhekou(newArray).then((res) => { |
| | | this.loadingSubmit = false; |
| | | if (res.code === 200) { |
| | | |
| | | let data; |
| | | |
| | | if (pacId || this.tjOrderList.length > 0) { |
| | | data = { |
| | | photo: this.srcUrl, |
| | | photo: this.srcUrl, // 保留原有 photo 字段(如果后端仍需要) |
| | | sfzImg: this.imageUrl, // 添加 sfzImg 字段,优先使用服务器URL,若无则使用base64 |
| | | pacId, |
| | | tjOrderList: this.tjOrderList, |
| | | tjFlowingWater: this.tjFlowingWater, |
| | |
| | | }; |
| | | |
| | | this.listgetOrder(data); |
| | | } else if (pacId || this.tjOrderList.length > 0) { |
| | | data = { |
| | | photo: this.srcUrl, |
| | | tjOrderList: this.tjOrderList, |
| | | tjFlowingWater: this.tjFlowingWater, |
| | | userId, |
| | | tjType, |
| | | tjCategory: this.tjCategory, |
| | | firmId: this.form.firmId, |
| | | firmName: this.form.firmName, |
| | | firmDeptName: this.form.firmDeptName, |
| | | }; |
| | | this.listgetOrder(data); |
| | | } else { |
| | | this.loadingSubmit = false; |
| | | this.$message({ |
| | | type: "warning ", |
| | | type: "warning", |
| | | message: "请选择套餐!", |
| | | }); |
| | | } |