| | |
| | | <el-form-item label="查体分类" prop="examCategory" label-width="99px"> |
| | | <el-input :disabled="isDisabled" v-model="form.examCategory" placeholder="请输入查体分类" /> |
| | | </el-form-item> |
| | | <el-form-item label="接害工龄年" prop="hazardYears" label-width="104px"> |
| | | <el-input :disabled="isDisabled" v-model="form.hazardYears" placeholder="请输入接害工龄年" type="number" /> |
| | | </el-form-item> |
| | | <el-form-item label="接害工龄月" prop="hazardMonths" label-width="106px"> |
| | | <el-input :disabled="isDisabled" v-model="form.hazardMonths" placeholder="请输入接害工龄月" type="number" /> |
| | | </el-form-item> |
| | | <el-form-item label="开始接害日期" prop="hazardStartDate" label-width="100px"> |
| | | <el-date-picker :disabled="isDisabled" clearable v-model="form.hazardStartDate" type="date" |
| | | value-format="yyyy-MM-dd" placeholder="请选择开始接害日期" style="width: 93%" /> |
| | | </el-form-item> |
| | | <el-form-item label="工号" label-width="103px"> |
| | | <el-input :disabled="isDisabled" v-model="form.wenHua" placeholder="请输入工号" /> |
| | | </el-form-item> |
| | | <el-form-item label="车间" label-width="106px"> |
| | | <el-input :disabled="isDisabled" v-model="form.wenHua" placeholder="请输入车间" /> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="106px" |
| | | v-show="top"> |
| | |
| | | <span slot="label"> 证件号码 </span> |
| | | <el-input :disabled="isDisabled" v-model="form.cusIdcard" placeholder="请输入身份证号" @input="inputChange" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="单位名称" prop="firmName"> |
| | | <el-select v-model="form.firmName" remote default-first-option allow-create filterable |
| | | style="width: 200px" placeholder="请选择单位名称" clearable @change="idFn1" @clear="clear"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="体检类型"> |
| | | <el-select v-model="form.tjType" placeholder="请选择体检类型"> |
| | | <el-option v-for="dict in dict.type.dict_team" :key="dict.value" :label="dict.label" |
| | | <el-option v-for="dict in filteredDictTeam" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="实收金额"> |
| | | <el-input placeholder="实收金额" v-model="TotalPrice" style="width: 206px" @input="changeXianjia" |
| | | @blur="numberChangeXianPrice(discount, discount)" /> |
| | | </el-form-item> |
| | | <el-form-item label="接害工龄年" prop="zhiyeJhgln" label-width="84px"> |
| | | <el-input v-model="form.zhiyeJhgln" type="number" style="width: 140px" /> |
| | | </el-form-item> |
| | | <el-form-item label="接害工龄月" prop="zhiyeJhgln" label-width="84px"> |
| | | <el-input v-model="form.zhiyeJhgly" style="width: 140px" type="number" /> |
| | | </el-form-item> |
| | | <el-form-item label="开始接害日期" prop="zhiyeKsjhrq" label-width="100px"> |
| | | <el-date-picker clearable v-model="form.zhiyeKsjhrq" type="date" value-format="yyyy-MM-dd" |
| | | style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工号" label-width="50px"> |
| | | <el-input v-model="form.zhiyeGh" /> |
| | | </el-form-item> |
| | | <el-form-item label="车间" label-width="106px"> |
| | | <el-input v-model="form.zhiyeCj" /> |
| | | </el-form-item> |
| | | <br /> |
| | | |
| | |
| | | font-size: 16px; |
| | | margin-right: 20px; |
| | | "> |
| | | <span v-if="this.tableData1[0]">{{ |
| | | this.tableData1[0].pacName || "" |
| | | }}</span> |
| | | 已选项目条数:<span style="font-weight: 700; color: red; margin-right: 5px">{{ this.tableData1.length || 0 |
| | | }}</span>条 |
| | | </div> |
| | |
| | | getfindTj, |
| | | getByTjNum, |
| | | } from "@/api/hosp/customer"; |
| | | |
| | | import { getPrintSetUp } from "@/api/system/examcharge"; |
| | | import cnchar from 'cnchar'; |
| | | import { |
| | | tuantiSelect, |
| | | deptTreeSelect, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | tjLei: [], |
| | | isSubmitting: false, |
| | | open1: false, |
| | | filterage: "", |
| | |
| | | form: { |
| | | educationLevel: "", // 文化程度 |
| | | examCategory: "", // 查体分类 |
| | | hazardYears: "", // 接害工龄年 |
| | | hazardMonths: "", // 接害工龄月 |
| | | hazardStartDate: "", // 开始接害日期 |
| | | zhiyeJhgln: "", // 接害工龄年 |
| | | zhiyeJhgly: "", // 接害工龄月 |
| | | zhiyeKsjhrq: "", // 开始接害日期 |
| | | zhiyeGh: "", // 工号 |
| | | zhiyeCj: "", // 车间 |
| | | cusIdcard: "", |
| | | tjType: "", |
| | | cusSex: 1, |
| | |
| | | this.$refs.treas.filter(val); |
| | | }, |
| | | }, |
| | | computed: { |
| | | filteredDictTeam() { |
| | | // 过滤 dict.type.dict_team,只保留 value 在 tjLei 中的项 |
| | | return this.dict.type.dict_team.filter(dict => |
| | | this.tjLei.includes(dict.value.toString()) |
| | | ); |
| | | } |
| | | }, |
| | | created() { |
| | | this.getCompanyList(); |
| | | |
| | |
| | | this.TreedataList = []; |
| | | this.DataList = []; |
| | | this.marryall = 0; |
| | | getconfigKey("zhiye_tj_type").then((res) => { |
| | | if (res.code === 200) { |
| | | const values = res.msg.split(","); |
| | | this.tjLei.push(...values); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | methods: { |
| | | handleIdCardInput(value) { |
| | |
| | | } |
| | | |
| | | if (this.form.firmName) { |
| | | this.form.tjType = this.dict.type.dict_team[1].value; |
| | | this.form.tjType = "6"; |
| | | } else { |
| | | this.form.tjType = this.dict.type.dict_team[0].value; |
| | | this.form.tjType = "5"; |
| | | } |
| | | |
| | | }, |
| | |
| | | deleted: null, |
| | | firmid: "", |
| | | firmDeptName: "", |
| | | examCategory: "", // 查体分类 |
| | | zhiyeJhgln: "", // 接害工龄年 |
| | | zhiyeJhgly: "", // 接害工龄月 |
| | | zhiyeKsjhrq: "", // 开始接害日期 |
| | | zhiyeGh: "", // 工号 |
| | | zhiyeCj: "", // 车间 |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | |
| | | 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.form.tjType = ''; |
| | | this.$modal.msgSuccess("新增成功"); |
| | | _this.tcShow = true; |
| | | _this.isDisabled = true; |
| | |
| | | this.discount = this.form.discount; |
| | | } |
| | | if (this.form.tjType === null) { |
| | | this.form.tjType = this.dict.type.dict_team[0].value; |
| | | this.form.tjType = null; |
| | | } |
| | | if (this.form.cusMarryStatus === "null") { |
| | | this.form.cusMarryStatus = "5"; |
| | |
| | | if (this.form.reservationId != null) { |
| | | if (this.form.groupingId) { |
| | | this.form.firmName = this.form.compName; |
| | | this.dict.type.dict_team.forEach((item) => { |
| | | if (item.label == "团队") { |
| | | this.form.tjType = item.value; |
| | | } |
| | | }) |
| | | // this.form.tjType = this.dict.type.dict_team[1].value; |
| | | |
| | | this.CompanyList.forEach((item) => { |
| | | if (item.cnName == this.form.firmName) { |
| | | this.form.firmId = item.drugManufacturerId; |
| | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | Package() { |
| | | Package() { |
| | | this.activeNames = "first"; |
| | | if (this.form.cusSex == "男") { |
| | | this.form.cusSex = 0; |
| | |
| | | sex: cusSex, |
| | | dwId: this.form.firmId || "", |
| | | }; |
| | | if (this.form.tjType == 1) { |
| | | if (this.form.tjType == 6) { |
| | | if (!this.form.firmId && !this.form.firmName) { |
| | | this.$message({ |
| | | type: "warning", |
| | |
| | | } catch (error) { } |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | |
| | | else { |
| | | } else { |
| | | this.taocan = true; |
| | | this.loading = true; |
| | | tuantiSelect(param).then((res) => { |
| | |
| | | |
| | | // 点击多选框获取选中数据 |
| | | handleSelectionChange(selection, row) { |
| | | console.log(selection) |
| | | this.tableData = selection; |
| | | if (selection.length > 1) { |
| | | let del_row = selection.shift(); |
| | |
| | | }); |
| | | } |
| | | 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; |
| | | // } |
| | | // }); |
| | | // }); |
| | | } else { |
| | | this.treedataList = JSON.parse(JSON.stringify(this.dXData)); |
| | | return; |
| | |
| | | |
| | | // 项目提交 |
| | | submit() { |
| | | |
| | | if (this.form.cusIdcard) { |
| | | var cusId = this.form.cusIdcard; |
| | | } else { |
| | |
| | | this.isSubmitting = false; // 提交完成后重置标志 |
| | | }).catch(() => { |
| | | this.isSubmitting = false; // 确保在错误情况下也重置标志 |
| | | }); |
| | | } |
| | | |
| | | // 如果 tjCategory 为 "02",确保选中的套餐被添加到 tableData1 |
| | | if (this.tjCategory === "02" && this.tableData.length > 0) { |
| | | this.tableData.forEach((item) => { |
| | | if (!this.tableData1.some((existingItem) => existingItem.pacId === item.pacId)) { |
| | | this.tableData1.push(item); |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | cusPhone: item.tjPhone, |
| | | cusSex: item.sex === "男" ? "0" : "1", |
| | | }; |
| | | // 动态从filteredDictTeam获取tjType |
| | | const dictItem = this.filteredDictTeam.find(dict => dict.label === item.tjType); |
| | | const tjTypeValue = dictItem ? dictItem.value : (this.filteredDictTeam.length > 0 ? this.filteredDictTeam[0].value : "0"); // 回退到第一个值或默认"0" |
| | | if (item.tjComp != null) { |
| | | this.standard = { |
| | | company: item.tjComp, |
| | | tjType: item.tjType === "团队" ? "1" : "2", |
| | | tjType: tjTypeValue, |
| | | }; |
| | | } else { |
| | | this.standard = { |
| | | tjType: item.tjType === "团队" ? "1" : "2", |
| | | tjType: tjTypeValue, |
| | | }; |
| | | } |
| | | }); |
| | |
| | | this.formInline.paidIn = item.proPrice; |
| | | } |
| | | }); |
| | | const r = /^\+?[0-9][0-9]*$/; //正整数(可以以打头) |
| | | //const r=/^\+?[1-9][0-9]*$/;//正整数 |
| | | const r = /^\+?[0-9][0-9]*$/; // 正整数 |
| | | if (r.test(this.formInline.paidIn)) { |
| | | this.formInline.paidIn = this.formInline.paidIn + ".00"; |
| | | } |
| | | this.discount = |
| | | (this.formInline.paidIn / this.formInline.price) * 10; |
| | | |
| | | this.discount = (this.formInline.paidIn / this.formInline.price) * 10; |
| | | } else { |
| | | this.discount = 10; |
| | | this.formInline.paidIn = "0.00"; |
| | | } |
| | | |
| | | this.total = response.data.total; |
| | | } else { |
| | | this.tableList = []; |
| | |
| | | }, |
| | | |
| | | listgetOrder(data) { |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: '正在加载中,请稍等!', |
| | | spinner: 'el-icon-loading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }); |
| | | getOrder(data).then((res) => { |
| | | loading.close(); |
| | | this.$modal.msgSuccess("提交成功"); |
| | | //调接口显示导检单 |
| | | const tjNumber = res.msg; |
| | |
| | | this.$tab.refreshPage(); |
| | | }, |
| | | |
| | | // 最后提交按钮 |
| | | submitPrice() { |
| | | submitPrice() { |
| | | let _this = this; |
| | | this.loadingSubmit = true; |
| | | if (_this.tjCategory !== "") { |
| | |
| | | discount: item.discount, |
| | | parentProId: item.parentProId, |
| | | cusIdCard: item.cusId, |
| | | yhj: item.nowPrice |
| | | yhj: item.nowPrice, |
| | | })); // 创建新的对象,包含 discount 和 id |
| | | gaibianzhekou(newArray).then((res) => { |
| | | this.loadingSubmit = false; |
| | | if (res.code === 200) { |
| | | |
| | | let data; |
| | | |
| | | if (pacId || this.tjOrderList.length > 0) { |