| | |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleGroup" |
| | | v-hasPermi="['system:comp:add']" |
| | | >保存</el-button |
| | | > |
| | | </el-col> |
| | |
| | | size="mini" |
| | | :disabled="singlegg" |
| | | @click="GroupUpdate" |
| | | v-hasPermi="['system:comp:edit']" |
| | | >重置</el-button |
| | | > |
| | | <el-button |
| | |
| | | size="mini" |
| | | :disabled="singlegg" |
| | | @click="deleteGroup" |
| | | v-hasPermi="['system:comp:edit']" |
| | | >删除</el-button |
| | | > |
| | | </el-col> |
| | |
| | | style="width: 140px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="color: red; font-size: 8px"> |
| | | <!-- <div style="color: red; font-size: 8px"> |
| | | 注释:鼠标左键双击选中行可删除 |
| | | </div> |
| | | </div> --> |
| | | <!-- @row-dblclick="dbclick" --> |
| | | <el-table |
| | | border |
| | | v-loading="loading" |
| | | :data="OnenewpacName" |
| | | :row-class-name="tableRowClassName" |
| | | @row-dblclick="dbclick" |
| | | height="478" |
| | | > |
| | | <el-table-column |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.proName + "/" + scope.row.proPrice }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" width="68"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handledbelete(scope.row)" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | contactPhone: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | taxNumber: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | legalPerson: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | registerAddress: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | bankAccount: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | countNum: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | principal: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | faxNumber: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | mailingAddress: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | email: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], |
| | | // taxNumber: [ |
| | | // { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | // ], |
| | | // legalPerson: [ |
| | | // { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | // ], |
| | | // registerAddress: [ |
| | | // { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | // ], |
| | | // bankAccount: [ |
| | | // { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | // ], |
| | | // countNum: [ |
| | | // { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | // ], |
| | | // principal: [ |
| | | // { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | // ], |
| | | // faxNumber: [ |
| | | // { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | // ], |
| | | // mailingAddress: [ |
| | | // { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | // ], |
| | | // email: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | resetQuerys(){ |
| | | this.OnenewpacName = [], |
| | | this.queryParams.price = 0, |
| | | this.$refs.tbone.toggleRowSelection(this.pacList[0], false); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | selection.forEach((item) => { |
| | |
| | | index + |
| | | 1; |
| | | }); |
| | | if (this.groupList.length >= 1) { |
| | | if (this.groupList[0].id) { |
| | | getfzgrouping(this.groupList[0].id).then((response) => { |
| | | this.OnenewpacName = response.data.groupingProList; |
| | | this.queryParams.price = 0; |
| | | this.OnenewpacName.forEach((item) => { |
| | | this.queryParams.price += item.proPrice; |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | // if (this.groupList.length >= 1) { |
| | | // if (this.groupList[0].id) { |
| | | // getfzgrouping(this.groupList[0].id).then((response) => { |
| | | // this.OnenewpacName = response.data.groupingProList; |
| | | // this.queryParams.price = 0; |
| | | // this.OnenewpacName.forEach((item) => { |
| | | // this.queryParams.price += item.proPrice; |
| | | // }); |
| | | // }); |
| | | // } |
| | | // } |
| | | |
| | | if (this.newpacName.length != 0) { |
| | | this.$nextTick(() => { |
| | | if (this.forms.pacName) { |
| | | this.newpacName.forEach((item, index) => { |
| | | if (this.forms.pacName == item.pacName) { |
| | | this.$refs.tbone.toggleRowSelection( |
| | | this.newpacName[index], |
| | | true |
| | | ); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$refs.tbone.clearSelection(); |
| | | } |
| | | // if (this.newpacName.length != 0) { |
| | | // this.$nextTick(() => { |
| | | // if (this.forms.pacName) { |
| | | // this.newpacName.forEach((item, index) => { |
| | | // if (this.forms.pacName == item.pacName) { |
| | | // this.$refs.tbone.toggleRowSelection( |
| | | // this.newpacName[index], |
| | | // true |
| | | // ); |
| | | // } |
| | | // }); |
| | | // } else { |
| | | // this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); |
| | | // } |
| | | // }); |
| | | // } else { |
| | | // this.$refs.tbone.clearSelection(); |
| | | // } |
| | | }); |
| | | } else { |
| | | deptTreeSelect().then((response) => { |
| | |
| | | index + |
| | | 1; |
| | | }); |
| | | if (this.groupList.length >= 1) { |
| | | if (this.groupList[0].id) { |
| | | getfzgrouping(this.groupList[0].id).then((response) => { |
| | | this.OnenewpacName = response.data.groupingProList; |
| | | this.queryParams.price = 0; |
| | | this.OnenewpacName.forEach((item) => { |
| | | this.queryParams.price += item.proPrice; |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | if (this.newpacName.length != 0) { |
| | | this.$nextTick(() => { |
| | | if (this.forms.pacName) { |
| | | this.newpacName.forEach((item, index) => { |
| | | if (this.forms.pacName == item.pacName) { |
| | | this.$refs.tbone.toggleRowSelection( |
| | | this.newpacName[index], |
| | | true |
| | | ); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$refs.tbone.clearSelection(); |
| | | } |
| | | // if (this.groupList.length >= 1) { |
| | | // if (this.groupList[0].id) { |
| | | // getfzgrouping(this.groupList[0].id).then((response) => { |
| | | // this.OnenewpacName = response.data.groupingProList; |
| | | // this.queryParams.price = 0; |
| | | // this.OnenewpacName.forEach((item) => { |
| | | // this.queryParams.price += item.proPrice; |
| | | // }); |
| | | // }); |
| | | // } |
| | | // } |
| | | // if (this.newpacName.length != 0) { |
| | | // this.$nextTick(() => { |
| | | // if (this.forms.pacName) { |
| | | // this.newpacName.forEach((item, index) => { |
| | | // if (this.forms.pacName == item.pacName) { |
| | | // this.$refs.tbone.toggleRowSelection( |
| | | // this.newpacName[index], |
| | | // true |
| | | // ); |
| | | // } |
| | | // }); |
| | | // } else { |
| | | // this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); |
| | | // } |
| | | // }); |
| | | // } else { |
| | | // this.$refs.tbone.clearSelection(); |
| | | // } |
| | | }); |
| | | } |
| | | getProjectList().then((response) => { |
| | |
| | | this.queryParams.price += item.proPrice; |
| | | }); |
| | | }, |
| | | handledbelete(row){ |
| | | this.queryParams.price = 0; |
| | | this.OnenewpacName.forEach((item,index) => { |
| | | if(item.proId == row.proId){ |
| | | this.OnenewpacName.splice(index, 1); |
| | | } |
| | | }); |
| | | return this.OnenewpacName.forEach((item) => { |
| | | this.queryParams.price += item.proPrice; |
| | | }); |
| | | }, |
| | | submitrighr() { |
| | | if (this.pacList.length >= 1) { |
| | | this.openss = false; |
| | |
| | | }, |
| | | // 套餐单项获取 |
| | | handleChangeOne(selection) { |
| | | this.pacList = selection; |
| | | this.OnenewpacName.forEach((item,index) => { |
| | | this.dataLists.forEach(item1 => { |
| | | if(item.proId == item1.proId){ |
| | | this.OnenewpacName.splice(index,1) |
| | | } |
| | | }) |
| | | }) |
| | | this.dataLists = []; |
| | | this.queryParams.price = 0; |
| | | this.pacList.forEach((item) => { |
| | | this.dataLists = item.tjProjectList; |
| | | }); |
| | | this.dataLists.forEach((item2) => { |
| | | this.OnenewpacName.push(item2); |
| | | }); |
| | | this.OnenewpacName.forEach((item) => { |
| | | this.queryParams.price += item.proPrice; |
| | | }); |
| | | |
| | | if (selection.length > 1) { |
| | | let del_row = selection.shift(); |
| | | this.$refs.tbone.toggleRowSelection(del_row, false); //设置这一行取消选中 |
| | | } |
| | | this.pacList = selection; |
| | | this.dataLists = []; |
| | | this.queryParams.price = 0; |
| | | this.pacList.forEach((item) => { |
| | | this.OnenewpacName = item.tjProjectList; |
| | | }); |
| | | // this.dataLists.forEach((item2) => { |
| | | // this.OnenewpacName.push(item2); |
| | | // }); |
| | | this.OnenewpacName.forEach((item) => { |
| | | this.queryParams.price += item.proPrice; |
| | | }); |
| | | }, |
| | | beCurrentDept() { |
| | | Deptlist(this.form.drugManufacturerId).then((response) => { |
| | |
| | | |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.drugManufacturerId != null) { |
| | |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addComp(this.form).then((response) => { |
| | | if(this.form.cnName && this.form.contactPerson && this.form.contactPhone){ |
| | | addComp(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | }else{ |
| | | this.$modal.msgError("请填写必传项"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | }); |