| | |
| | | type="primary" |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="singlegg" |
| | | @click="xiangmuWh" |
| | | >项目维护</el-button |
| | | > |
| | |
| | | }, |
| | | // 折扣 |
| | | numberChange(currentValue) { |
| | | console.log(this.forms.limits, 888); |
| | | console.log(currentValue, 666); |
| | | |
| | | this.forms.limits = currentValue; |
| | | /* if (this.forms.limits > this.getInfodis) { |
| | | this.forms.limits = this.getInfodis; |
| | |
| | | ).toFixed(2); |
| | | // console.log(this.groupingList, 555); |
| | | |
| | | this.handleGroup(); |
| | | let mapList = []; |
| | | this.OnenewpacName.forEach((item) => { |
| | | mapList.push({ |
| | | proName: item.proName, |
| | | proId: item.proId, |
| | | proPrice: item.proPrice, |
| | | }); |
| | | }); |
| | | |
| | | // 如果 selectionList 为空,使用 mapList 继续保存 |
| | | if (this.OnenewpacName.length === 0) { |
| | | this.$modal.msgError("请先选中项目"); |
| | | return; // 提示用户选中项目 |
| | | } |
| | | |
| | | let data = { |
| | | groupingName: this.forms.groupingName, |
| | | gtAge: this.forms.gtAge, |
| | | limits: this.forms.limits, |
| | | ltAge: this.forms.ltAge, |
| | | pacName: this.forms.pacName, |
| | | payType: this.forms.payType, |
| | | sex: this.forms.sex, |
| | | dwDeptId: this.selectionList.length > 0 ? this.selectionList[0].id : "", // 如果没有选中部门,设置为空 |
| | | dwId: this.selectionList.length > 0 ? this.selectionList[0].dwId : "", |
| | | mapList: mapList, |
| | | price: this.forms.price, |
| | | ysPrice: this.forms.ysPrice, |
| | | id: this.groupList[0].id, |
| | | }; |
| | | |
| | | // 发送请求保存数据 |
| | | dwgrouping(data).then((res) => { |
| | | if (res.code == 200) { |
| | | this.beCurrent(); |
| | | this.forms.groupingName = ""; |
| | | this.forms.sex = ""; |
| | | this.forms.pacName = ""; |
| | | this.forms.price = ""; |
| | | this.forms.ysPrice = ""; |
| | | this.forms.payType = ""; |
| | | } |
| | | }); |
| | | |
| | | // this.handleGroup(); |
| | | }, |
| | | // 套餐单项获取 |
| | | handleChangeOne(selection) { |
| | |
| | | |
| | | getDetails(id).then((res) => { |
| | | this.OnenewpacName = res.data.groupingProList; |
| | | this.OnenewpacName.forEach((item, index) => { |
| | | this.queryParams.price += item.proPrice; |
| | | }); |
| | | // return this.OnenewpacName.forEach((item) => { |
| | | // this.queryParams.price += item.proPrice; |
| | | // }); |
| | | }); |
| | | if (this.forms.sex) { |
| | | deptTreeSelect(this.forms.sex).then((response) => { |
| | |
| | | }, */ |
| | | handleGroup() { |
| | | // 如果没有选中任何部门(即没有 selectionList),可以直接从 OnenewpacName 获取数据 |
| | | // let mapList = []; |
| | | /* this.OnenewpacName.forEach((item) => { |
| | | let mapList = []; |
| | | this.OnenewpacName.forEach((item) => { |
| | | mapList.push({ |
| | | proName: item.proName, |
| | | proId: item.proId, |
| | | proPrice: item.proPrice, |
| | | }); |
| | | }); */ |
| | | }); |
| | | |
| | | // 如果 selectionList 为空,使用 mapList 继续保存 |
| | | /* if (this.OnenewpacName.length === 0) { |
| | |
| | | sex: this.forms.sex, |
| | | dwDeptId: this.selectionList.length > 0 ? this.selectionList[0].id : "", // 如果没有选中部门,设置为空 |
| | | dwId: this.selectionList.length > 0 ? this.selectionList[0].dwId : "", |
| | | // mapList: mapList, |
| | | mapList: mapList, |
| | | price: this.forms.price, |
| | | ysPrice: this.forms.ysPrice, |
| | | id: this.groupList[0].id, |