| | |
| | | <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" |
| | | :value="dict.value" :disabled="!form.firmId && dict.value === '1'"></el-option> |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="体检类别"> |
| | |
| | | <el-form-item style="margin-left: 149px"> |
| | | <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">选择套餐</el-button> |
| | | <el-button type="primary" @click="resetpackage" size="mini" style="margin-right: 20px">重置套餐</el-button> |
| | | <el-button type="primary" @click="submitPrice" :loading="loadingSubmit" |
| | | :disabled="confirm || loadingSubmit" v-if="showHidden.has_charge == 'N'" size="mini">签到登记</el-button> |
| | | <el-button type="primary" @click="submitPrice" :loading="loadingSubmit" :disabled="loadingSubmit" |
| | | v-if="showHidden.has_charge == 'N'" size="mini">签到登记</el-button> |
| | | <el-button type="primary" @click="submitCheckinfee" :disabled="confirm" |
| | | v-if="showHidden.has_charge == 'Y'" size="mini">登记收费</el-button> |
| | | </el-form-item> |
| | |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | }, |
| | | |
| | | filterage(val) { |
| | | this.$refs.treas.filter(val); |
| | | }, |
| | |
| | | }); |
| | | }, |
| | | numberChangeXianPrice(currentValue, oldValue) { |
| | | // 如果现价没有变化,直接返回 |
| | | if (this.TotalPrice === this.lastXianPrice || !this.TotalPrice) { |
| | | return; |
| | | } |
| | | this.$confirm("确定修改所有子项的折扣吗?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | ); |
| | | } |
| | | } |
| | | this.lastXianPrice = this.TotalPrice; |
| | | }) |
| | | .catch(() => { |
| | | this.discount = oldValue; |
| | |
| | | }); |
| | | } else { |
| | | let configKey = "getInfoFromSqlData"; |
| | | getconfigKey(configKey).then((res) => { |
| | | getconfigKey(configKey).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.msg == "N") { |
| | | var websocket = null; |
| | |
| | | /* 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.DataList = []; // 清空已选项目列表 |
| | | this.checkedkey = []; // 清空树的选中状态 |
| | | this.checkedListkey = []; |
| | | this.TreedataList = []; |
| | | this.$refs.tree.setCheckedKeys([]); // 重置树选中状态 |
| | | this.TreedataList = [] |
| | | |
| | | let data = { |
| | | cusId, |
| | |
| | | handleCurrentChecked(data, checked, checkedNodes) { |
| | | this.dataObj = data; |
| | | if (checked.checkedNodes.length != 0) { |
| | | this.$refs.tree.setCheckedKeys([data.proId]); |
| | | |
| | | let proId = data.proId; |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | |
| | | pacId: _this.pacId, |
| | | proIds: this.proIds, |
| | | }; |
| | | |
| | | // 根据体检类型选择不同的处理方法 |
| | | if (this.form.tjType == 1) { |
| | | if (this.form.firmId) { |
| | | tuantiqueren(data).then((response) => { |
| | | if (response.code == 200) { |
| | | this.processOrderItems(cusId); |
| | |
| | | this.DataLists = []; |
| | | }, |
| | | |
| | | // 处理订单项目 |
| | | processOrderItems(cusId) { |
| | | getTransitionList1(cusId).then((response) => { |
| | | this.tableData1 = response.data; |
| | | if (this.tableData1) { |
| | | let totalOrdPrice = new Big(0); |
| | | let totalNowPrice = new Big(0); |
| | | |
| | | this.tableData1.forEach((item) => { |
| | | if (item.tjCategory != null) { |
| | | this.tjCategory = item.tjCategory; |
| | |
| | | this.treeList.push(item9.proId); |
| | | }); |
| | | } |
| | | this.TotalPrice1 += item.ordPrice || 0; // 累加应收金额 |
| | | this.TotalPrice += item.nowPrice || 0; // 累加实收金额 |
| | | // 使用Big.js进行加法以避免精度丢失 |
| | | totalOrdPrice = totalOrdPrice.plus(new Big(item.ordPrice || 0)); |
| | | totalNowPrice = totalNowPrice.plus(new Big(item.nowPrice || 0)); |
| | | }); |
| | | |
| | | // 将Big数转换回数值并保留两位小数 |
| | | this.TotalPrice1 = totalOrdPrice.toNumber().toFixed(2); |
| | | this.TotalPrice = totalNowPrice.toNumber().toFixed(2); |
| | | |
| | | // 确保TotalPrice是一个字符串,防止后续操作导致精度丢失 |
| | | this.TotalPrice = this.TotalPrice.toString(); |
| | | |
| | | // 计算折扣 |
| | | this.discount = this.TotalPrice1 > 0 ? |
| | | (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10 : 0; |
| | |
| | | cusIdCard: item.cusId, |
| | | })); // 创建新的对象,包含 discount 和 id |
| | | gaibianzhekou(newArray).then((res) => { |
| | | this.loadingSubmit = false; |
| | | if (res.code === 200) { |
| | | this.loadingSubmit = false; |
| | | |
| | | let data; |
| | | |
| | | if (pacId || this.tjOrderList.length > 0) { |
| | |
| | | }; |
| | | this.listgetOrder(data); |
| | | } else { |
| | | this.loadingSubmit = false; |
| | | this.$message({ |
| | | type: "warning ", |
| | | message: "请选择套餐!", |