| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="姓名" prop="cusName" :rules="[ |
| | | { |
| | | required: true, |
| | | validator: (rule, value, callback) => { |
| | | if (!form.cusName) { |
| | | callback(''); |
| | | } else if (form.cusName) { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | { |
| | | required: true, |
| | | validator: (rule, value, callback) => { |
| | | if (!form.cusName) { |
| | | callback(''); |
| | | } else if (form.cusName) { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | |
| | | <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="openname"> |
| | | 姓名 |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="性别" prop="cusSex" :rules="[ |
| | | { |
| | | required: true, |
| | | validator: (rule, value, callback) => { |
| | | if (!form.cusSex && showHidden.has_sex === 'Y') { |
| | | callback(''); |
| | | } else if (showHidden.has_sex === 'N') { |
| | | callback(); |
| | | } else if (form.cusSex && showHidden.has_sex === 'Y') { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | { |
| | | required: true, |
| | | validator: (rule, value, callback) => { |
| | | if (!form.cusSex && showHidden.has_sex === 'Y') { |
| | | callback(''); |
| | | } else if (showHidden.has_sex === 'N') { |
| | | callback(); |
| | | } else if (form.cusSex && showHidden.has_sex === 'Y') { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | <el-select :disabled="isDisabled" v-model="form.cusSex" placeholder="性别"> |
| | | <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label" |
| | | :value="parseInt(dict.value)"></el-option> |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="证件号码" prop="cusIdcard" :rules="[ |
| | | { |
| | | required: true, |
| | | validator: (rule, value, callback) => { |
| | | if (!form.cusIdcard && showHidden.has_idcard === 'Y') { |
| | | callback(''); |
| | | } else if (showHidden.has_idcard === 'N') { |
| | | callback(); |
| | | } else if ( |
| | | form.cusIdcard && |
| | | showHidden.has_idcard === 'Y' |
| | | ) { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | { |
| | | required: true, |
| | | validator: (rule, value, callback) => { |
| | | if (!form.cusIdcard && showHidden.has_idcard === 'Y') { |
| | | callback(''); |
| | | } else if (showHidden.has_idcard === 'N') { |
| | | callback(); |
| | | } else if ( |
| | | form.cusIdcard && |
| | | showHidden.has_idcard === 'Y' |
| | | ) { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="handleQuery"> |
| | | 证件号码 |
| | | </span> |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="电话" prop="cusPhone" :rules="[ |
| | | { |
| | | required: true, |
| | | validator: (rule, value, callback) => { |
| | | if (!form.cusPhone && showHidden.is_phone === 'Y') { |
| | | callback(''); |
| | | } else if (showHidden.is_phone === 'N') { |
| | | callback(); |
| | | } else if (form.cusPhone && showHidden.is_phone === 'Y') { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | { |
| | | required: true, |
| | | validator: (rule, value, callback) => { |
| | | if (!form.cusPhone && showHidden.is_phone === 'Y') { |
| | | callback(''); |
| | | } else if (showHidden.is_phone === 'N') { |
| | | callback(); |
| | | } else if (form.cusPhone && showHidden.is_phone === 'Y') { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | <el-input v-model="form.cusPhone" placeholder="请输入联系电话" :disabled="isDisabled" /> |
| | | </el-form-item> |
| | | |
| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handle">查询</el-button> |
| | | <!-- <el-button type="primary" size="mini" @click="submit">确认</el-button> --> |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="tab4"> |
| | |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | <!-- <el-button |
| | | style=" |
| | | width: 20px; |
| | | height: 100px; |
| | | margin-top: 20%; |
| | | font-size: 10px; |
| | | padding-right: 20px; |
| | | " |
| | | type="primary" |
| | | size="mini" |
| | | @click="submit" |
| | | ><i style="font-size: 18px" class="el-icon-d-arrow-right"></i |
| | | ></el-button> --> |
| | | |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="组合" name="third"> |
| | |
| | | <el-input placeholder="应收金额" v-model="TotalPrice1" disabled style="width: 150px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="优惠"> |
| | | |
| | | <!-- {{ discount }} --> |
| | | <el-input-number ref="inputNumber" style="width: 150px" v-model="discount" :precision="2" :step="0.1" |
| | | :max="10" :min="1" @change="numberChange" :disabled="isfalse"></el-input-number> |
| | | :max="10" :min="0" @change="numberChange" :disabled="isfalse"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="实收金额"> |
| | | <el-input placeholder="实收金额" v-model="TotalPrice" style="width: 150px"></el-input> |
| | |
| | | <div style=" |
| | | padding: 0px 6px; |
| | | border: 1px solid #e6ebf5; |
| | | max-height: 420px; |
| | | max-height: 650%; |
| | | overflow: auto; |
| | | width: 916px; |
| | | margin-left: 35px; |
| | | "> |
| | | |
| | | <el-table :data="tableData1" border style="width: 100%" height="250"> |
| | | <el-table :data="tableData1" border style="width: 100%;"> |
| | | <el-table-column prop="proName" label="项目" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="proType" label="性别" width="50"> |
| | |
| | | <el-table-column prop="proCheckMethod" label="是否空腹"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.proCheckMethod" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" width="80px"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete1(scope.row)" title="删除"> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | :disabled="true"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="优惠"> |
| | | <el-input-number style="width: 140px" v-model="discount" :precision="2" :step="0.1" :max="10" :min="1" |
| | | <el-input-number style="width: 140px" v-model="discount" :precision="2" :step="0.1" :max="10" :min="0" |
| | | @change="numberChange" :disabled="isfalse"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="实收金额"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import Big from 'big.js'; |
| | | import selectName from "@/components/selectName"; |
| | | import { dataURLtoFile, random } from "./file"; |
| | | import { getInfo } from "@/api/login"; |
| | |
| | | getconfigKey, |
| | | getHistryTjOrderProByCusIdCard, |
| | | readCertCardInfos, |
| | | gaibianzhekou |
| | | } from "@/api/system/tijian"; |
| | | import { addComp } from "@/api/system/comp"; |
| | | import { getCompany, queryCompany } from "@/api/team/tuanti"; |
| | |
| | | mounted() { }, |
| | | |
| | | methods: { |
| | | /** 删除按钮操作 */ |
| | | handleDelete1(row) { |
| | | console.log(row); |
| | | let data = { |
| | | cusCardId: row.cusId, |
| | | proId: row.parentProId, |
| | | }; |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | return delTbBycusCardIdAndProId(data); |
| | | }).then(() => { |
| | | this.TotalPrice1 = 0 |
| | | getTransitionList1(row.cusId).then((response) => { |
| | | this.tableData1 = response.data; |
| | | this.tableData1.forEach((item) => { |
| | | this.TotalPrice1 += item.ordPrice; |
| | | this.TotalPrice += item.nowPrice; |
| | | }); |
| | | this.TotalPrice = this.tableData1.reduce((sum, item) => { |
| | | return sum.plus(new Big(item.nowPrice || '0')); |
| | | }, new Big(0)); |
| | | this.discount = (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10 |
| | | }); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => { }); |
| | | }, |
| | | validateDiscount(row) { |
| | | if (row.discount > 10) { |
| | | row.discount = 10; // 强制将值设置为最大值 |
| | |
| | | isAll(value) { |
| | | return value === '' || value === null; |
| | | }, |
| | | // 更新实收金额 |
| | | updateProPrice(row) { |
| | | row.nowPrice = Number(row.ordPrice) * (Number(row.discount) / 10); |
| | | const ordPrice = new Big(row.ordPrice); |
| | | |
| | | const discount = new Big(row.discount); |
| | | const result = ordPrice.times(discount.div(10)); // ordPrice * (discount / 10) |
| | | row.nowPrice = result.toNumber(); |
| | | this.TotalPrice = this.tableData1.reduce((sum, item) => { |
| | | return sum.plus(new Big(item.nowPrice || '0')); |
| | | }, new Big(0)); |
| | | |
| | | this.discount = (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10 |
| | | }, |
| | | |
| | | |
| | | openname() { |
| | | |
| | | this.$refs.bbb.open = true; |
| | |
| | | this.$refs.historyTj.getlist(); |
| | | }, |
| | | |
| | | candelete(item) { |
| | | let data = { |
| | | cusCardId: this.form.cusIdcard, |
| | | proId: item.proPrantId, |
| | | }; |
| | | delTbBycusCardIdAndProId(data).then((res) => { |
| | | getTransitionList1(this.form.cusIdcard).then((response) => { |
| | | this.tableData1 = response.data; |
| | | this.TotalPrice1 = 0; |
| | | if (this.tableData1) { |
| | | this.tableData1.forEach((item) => { |
| | | this.TotalPrice1 += item.ordPrice; |
| | | this.TotalPrice += item.nowPrice; |
| | | if (item.pacName === null) { |
| | | item.pacName = "单项"; |
| | | } |
| | | if (item.pacName == "单项") { |
| | | item.list.forEach((item9) => { |
| | | this.treeList.push(item9.proId); |
| | | }); |
| | | } |
| | | this.pacName = item.pacName; |
| | | }); |
| | | |
| | | |
| | | |
| | | this.list1 = false; |
| | | this.list3 = true; |
| | | } else { |
| | | this.list1 = true; |
| | | |
| | | this.TotalPrice = 0; |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | cope() { |
| | | this.tcShow = true; |
| | | let cusIdCard = this.form.cusIdcard; |
| | |
| | | this.pacName = item.pacName; |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | this.list1 = false; |
| | | this.list3 = true; |
| | |
| | | if (this.discount <= this.getInfodis) { |
| | | this.discount = this.getInfodis; |
| | | } |
| | | this.TotalPrice = (this.TotalPrice1 * (this.discount / 10)).toFixed(2); |
| | | // this.TotalPrice = (this.TotalPrice1 * (this.discount / 10)).toFixed(2); |
| | | }, |
| | | |
| | | /** 登记提交按钮 */ |
| | |
| | | this.top = false; |
| | | } else { |
| | | this.list1 = true; |
| | | this.TotalPrice =0; |
| | | this.TotalPrice = 0; |
| | | this.top = false; |
| | | } |
| | | }); |
| | |
| | | // }, |
| | | |
| | | resetpackage() { |
| | | this.discount = 10 |
| | | if (this.form.cusIdcard) { |
| | | var cusId = this.form.cusIdcard; |
| | | } else { |
| | |
| | | if (this.DataList.length != 0) { |
| | | this.list1 = false; |
| | | this.DataList.forEach((item) => { |
| | | |
| | | |
| | | this.marryall += item.proPrice; |
| | | }); |
| | | } |
| | |
| | | } else { |
| | | this.$message.warning("请先填写信息,再选体检内容"); |
| | | } |
| | | |
| | | let _this = this; |
| | | if (this.tableData.length != 0) { |
| | | this.tableData.forEach((item) => { |
| | |
| | | this.pacName = item.pacName; |
| | | }); |
| | | |
| | | |
| | | |
| | | this.list1 = false; |
| | | this.list3 = true; |
| | | this.list2 = false; |
| | |
| | | } |
| | | }); |
| | | } else { |
| | | console.log(失败了); |
| | | |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | this.pacName = item.pacName; |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | this.list1 = false; |
| | | this.list3 = true; |
| | | this.list2 = false; |
| | |
| | | } |
| | | }); |
| | | } else { |
| | | console.log(失败了); |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | 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 的项 |
| | | .map(item => ({ discount: item.discount, parentProId: item.parentProId, cusIdCard: item.cusId })); // 创建新的对象,包含 discount 和 id |
| | | gaibianzhekou(newArray).then((res) => { |
| | | if (res.code === 200) { |
| | | let data; |
| | | |
| | | let data; |
| | | if (pacId || this.tjOrderList.length > 0) { |
| | | data = { |
| | | photo: this.srcUrl, |
| | | pacId, |
| | | tjOrderList: this.tjOrderList, |
| | | tjFlowingWater: this.tjFlowingWater, |
| | | userId, |
| | | tjType, |
| | | tjCategory: this.tjCategory, |
| | | }; |
| | | 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, |
| | | }; |
| | | this.listgetOrder(data); |
| | | } else { |
| | | this.$message({ |
| | | type: "warning ", |
| | | message: "请选择套餐!", |
| | | }); |
| | | } |
| | | if (pacId || this.tjOrderList.length > 0) { |
| | | data = { |
| | | photo: this.srcUrl, |
| | | pacId, |
| | | tjOrderList: this.tjOrderList, |
| | | tjFlowingWater: this.tjFlowingWater, |
| | | userId, |
| | | tjType, |
| | | tjCategory: this.tjCategory, |
| | | }; |
| | | |
| | | 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, |
| | | }; |
| | | this.listgetOrder(data); |
| | | } else { |
| | | this.$message({ |
| | | type: "warning ", |
| | | message: "请选择套餐!", |
| | | }); |
| | | } |
| | | } else { |
| | | this.$modal.msgError("改变折扣错误"); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | this.$modal.msgError("请选择体检类别"); |
| | | } |