| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="LIS编码" prop="lisXmbm"> |
| | | <el-input |
| | | v-model="form.lisXmbm" |
| | | placeholder="请输入his编码" |
| | | style="width: 260px" |
| | | /> |
| | | <el-input v-model="form.lisXmbm" placeholder="请输入his编码" style="width: 260px" /> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="proRemark"> |
| | | <el-input v-model="form.proRemark" placeholder="请输入备注" style="width: 200px" /> |
| | |
| | | }; |
| | | getAllChildListById(data).then((response) => { |
| | | this.projectList = response.data.list; |
| | | console.log("进来了列表并且获取到了值", this.projectList); |
| | | |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | |
| | | proId: this.queryParams.proId, |
| | | }; |
| | | getAllChildListById(data).then((response) => { |
| | | // this.projectList = this.handleTree(response.data.list, "proId"); |
| | | // this.ListId.push(this.projectList[0].proId); |
| | | // this.key = response.data.key; |
| | | |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | handleUpdate1() { |
| | | this.form = this.xiugaiList; |
| | | console.log('调用了handleUpdate1'); |
| | | |
| | | this.form.proStatus = this.form.proStatus.toString(); |
| | | this.proParent = true; |
| | |
| | | // if(){ |
| | | // this.proParent = true |
| | | // } |
| | | // 这个是干啥的 |
| | | // 按理来说此时只需要open为true就好了啊 |
| | | // 压根不理解,你就看我给你说的那个问题,这里面问题多的很 |
| | | getlist().then((response) => { |
| | | if (response.code == 200) { |
| | | this.loading = false; |
| | |
| | | this.projectOptions.push(project); |
| | | } |
| | | }); |
| | | // 用的都是同一个dialog啊 |
| | | |
| | | this.open = true; |
| | | this.title = "体检项目信息维护"; |
| | | }); |
| | |
| | | |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.noclick = true |
| | | if (this.key == "N") { |
| | | console.log('1111'); |
| | | this.noclick = true; |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | const isUpdate = this.form.proId != null; |
| | | |
| | | // 这个是上面修改还是单行修改 |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.proId != null) { |
| | | if (this.form.tjStandardList != null) { |
| | | this.form.tjStandardList.forEach((items) => { |
| | | if (items.tjSex === "男" || items.tjSex === "0") { |
| | | items.tjSex = "0"; |
| | | } else if (items.tjSex === "女" || items.tjSex === "1") { |
| | | items.tjSex = "1"; |
| | | } else { |
| | | items.tjSex = null; |
| | | } |
| | | if (items.tjType === "婴儿") { |
| | | items.tjType = 0; |
| | | } |
| | | if (items.tjType === "幼儿") { |
| | | items.tjType = 1; |
| | | } |
| | | if (items.tjType === "儿童") { |
| | | items.tjType = 2; |
| | | } |
| | | if (items.tjType === "少年") { |
| | | items.tjType = 3; |
| | | } |
| | | if (items.tjType === "青年") { |
| | | items.tjType = 4; |
| | | } |
| | | if (items.tjType === "中年") { |
| | | items.tjType = 5; |
| | | } |
| | | if (items.tjType === "老年") { |
| | | items.tjType = 6; |
| | | } |
| | | }); |
| | | } |
| | | this.form.lisXmbm = this.form.lisXmbm; |
| | | updateProject(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | if (this.proParent == true) { |
| | | console.log('进入了proParent == true') |
| | | this.getDeptTree(); |
| | | this.cancel(); |
| | | } else { |
| | | console.log('进入了proParent == false') |
| | | this.cancel(); |
| | | this.getList(); |
| | | } |
| | | }); |
| | | } else { |
| | | if (this.form.proParentId === 0) { |
| | | this.form.tjStandardList = null; |
| | | } else { |
| | | this.form.consumablesList = null; |
| | | } |
| | | |
| | | if (this.form.deptId === null || this.form.proParentId === null) { |
| | | this.$message.error("请填写父项名称或科室名称"); |
| | | this.open = true; |
| | | } else { |
| | | this.form.lisXmbm = this.form.lisXmbm; |
| | | addProject(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.cancel(); |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | // 处理性别和年龄组的转换 |
| | | if (this.form.tjStandardList) { |
| | | this.form.tjStandardList.forEach(item => { |
| | | item.tjSex = item.tjSex === "男" || item.tjSex === "0" ? "0" : (item.tjSex === "女" || item.tjSex === "1" ? "1" : null); |
| | | item.tjType = { |
| | | "婴儿": 0, "幼儿": 1, "儿童": 2, "少年": 3, "青年": 4, "中年": 5, "老年": 6 |
| | | }[item.tjType] || null; |
| | | }); |
| | | } |
| | | }); |
| | | } else if (this.key == "Y") { |
| | | |
| | | this.form.sfxmId = this.sfxmId; |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | console.log('222'); |
| | | if (this.form.proId != null) { |
| | | console.log('22-11'); |
| | | if (this.form.tjStandardList != null) { |
| | | this.form.tjStandardList.forEach((items) => { |
| | | if (items.tjSex === "男" || items.tjSex === "0") { |
| | | items.tjSex = "0"; |
| | | } else if (items.tjSex === "女" || items.tjSex === "1") { |
| | | items.tjSex = "1"; |
| | | } else { |
| | | items.tjSex = null; |
| | | } |
| | | if (items.tjType === "婴儿") { |
| | | items.tjType = 0; |
| | | } |
| | | if (items.tjType === "幼儿") { |
| | | items.tjType = 1; |
| | | } |
| | | if (items.tjType === "儿童") { |
| | | items.tjType = 2; |
| | | } |
| | | if (items.tjType === "少年") { |
| | | items.tjType = 3; |
| | | } |
| | | if (items.tjType === "青年") { |
| | | items.tjType = 4; |
| | | } |
| | | if (items.tjType === "中年") { |
| | | items.tjType = 5; |
| | | } |
| | | if (items.tjType === "老年") { |
| | | items.tjType = 6; |
| | | } |
| | | }); |
| | | } |
| | | this.form.lisXmbm = this.form.lisXmbm; |
| | | updateProject(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | if (this.proParent == true) { |
| | | this.getDeptTree(); |
| | | this.cancel(); |
| | | } else { |
| | | this.cancel(); |
| | | this.getList(); |
| | | } |
| | | }); |
| | | } else { |
| | | console.log('22-22'); |
| | | // 设置 lisXmbm |
| | | this.form.lisXmbm = this.form.lisXmbm; |
| | | |
| | | if (this.form.proParentId === 0) { |
| | | this.form.tjStandardList = null; |
| | | } else { |
| | | this.form.consumablesList = null; |
| | | } |
| | | |
| | | if (this.form.deptId === null || this.form.proParentId === null) { |
| | | this.$message.error("请填写父项名称或科室名称"); |
| | | this.open = true; |
| | | } else { |
| | | this.form.lisXmbm = this.form.lisXmbm; |
| | | addProject(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.cancel(); |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | // 根据 key 值选择不同的操作流程 |
| | | if (this.key === "N") { |
| | | this.processSubmission(isUpdate, false); |
| | | } else if (this.key === "Y") { |
| | | this.form.sfxmId = this.sfxmId; |
| | | this.processSubmission(isUpdate, true); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | processSubmission(isUpdate, isY) { |
| | | if (isUpdate) { |
| | | updateProject(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.handleSuccess(isY); |
| | | }); |
| | | } else { |
| | | // 新增逻辑 |
| | | if (this.form.proParentId === 0) { |
| | | this.form.tjStandardList = null; |
| | | } else { |
| | | this.form.consumablesList = null; |
| | | } |
| | | |
| | | if (this.form.deptId === null || this.form.proParentId === null) { |
| | | this.$message.error("请填写父项名称或科室名称"); |
| | | this.open = true; |
| | | } else { |
| | | addProject(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.handleSuccess(isY); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | handleSuccess(isY) { |
| | | this.cancel(); |
| | | this.getList(); |
| | | if (this.proParent || isY) { |
| | | this.getDeptTree(); |
| | | } |
| | | }, |
| | | // 收费项目确认 |
| | | submit() { |
| | | this.ChangeList.forEach((item) => { |