|
|
@ -270,7 +270,7 @@ |
|
|
|
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762" |
|
|
|
:show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" |
|
|
|
@close="handleClose" @dialogVisibleChange="dialogVisibleChange"> |
|
|
|
<BatchProject v-if="dialogType == '1'" :projectTagData="projectTagData" @getproTag="getProTagData" /> |
|
|
|
<BatchProject ref="channelProject" v-if="dialogType == '1'" :projectTagData="projectTagData" /> |
|
|
|
</GuipDialog> |
|
|
|
<GuipDialog :dialogVisible="dialogVisible1" :title="'新增项目分组'" :show-close-button="true" width="599px" |
|
|
|
type="center" :show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" |
|
|
@ -634,16 +634,6 @@ export default { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
getProTagData() { |
|
|
|
this.$http('POST', '/supernew/ajax_get_type_batch_list', { |
|
|
|
|
|
|
|
}).then(response => { |
|
|
|
this.projectTagData = response.data |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 修改项目价格 |
|
|
|
changePrice(row) { |
|
|
|
if (row.sort) { |
|
|
@ -664,14 +654,14 @@ export default { |
|
|
|
}).then(response => { |
|
|
|
if (response.code == 0) { |
|
|
|
this.$Message.success('修改成功') |
|
|
|
this.getInitData() |
|
|
|
this.fetchProjectData() |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
addNewSetMenu() { |
|
|
|
this.$router.push(`/addNewTreatment?doctor_id=${this.doctor_id}&depart_id${this.depart_id}`) |
|
|
|
this.$router.push(`/addNewTreatment?doctor_id=${this.doctor_id}&depart_id=${this.depart_id}`) |
|
|
|
}, |
|
|
|
addNewGroup(){ |
|
|
|
this.dialogVisible1 = true |
|
|
@ -697,22 +687,50 @@ export default { |
|
|
|
if (this.dialogVisible1) { |
|
|
|
this.$refs['projectNameForm'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
alert('submit!'); |
|
|
|
this.dialogVisible1 = false; |
|
|
|
|
|
|
|
this.$http('POST', '/api/admin/add_project_group', { |
|
|
|
name:this.form1.projectName.trim(), |
|
|
|
depart_id: this.depart_id, |
|
|
|
doctor_id: this.doctor_id, |
|
|
|
}).then(response => { |
|
|
|
if (response.code == 0) { |
|
|
|
this.$Message.success('修改成功') |
|
|
|
this.dialogVisible1 = false; |
|
|
|
this.form1.projectName = '' |
|
|
|
this.fetchProjectData() |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.$Message.error(error || '错误!') |
|
|
|
}) |
|
|
|
} else { |
|
|
|
console.log('error submit!!'); |
|
|
|
this.$Message.info('项目分组名称不可为空') |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
} else if (this.dialogVisible) { |
|
|
|
this.$Message.success('点击了确认按钮'); |
|
|
|
this.dialogVisible = false; |
|
|
|
let data = this.$refs.channelProject.form; |
|
|
|
if(!data.project_contents || (data.groupType == '1' && !data.classify_id) || (data.groupType == '2' && !data.classify_name)){ |
|
|
|
this.$Message.info('请填写完整信息!') |
|
|
|
}else{ |
|
|
|
this.$http('POST', '/api/admin/mitil_add_project', { |
|
|
|
depart_id: this.depart_id, |
|
|
|
doctor_id: this.doctor_id, |
|
|
|
...data |
|
|
|
}).then(response => { |
|
|
|
if (response.code == 0) { |
|
|
|
this.$Message.success('新增项目成功') |
|
|
|
this.$refs.channelProject.formReset() |
|
|
|
this.dialogVisible = false; |
|
|
|
this.fetchProjectData(); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.$Message.error(error || '错误!') |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 取消按钮事件 |
|
|
|
handleCancel() { |
|
|
|
this.$Message.warning('点击了取消按钮'); |
|
|
|
if(this.dialogVisible)this.$refs.channelProject.formReset() |
|
|
|
this.dialogVisible = false; |
|
|
|
this.dialogVisible1 = false; |
|
|
|
}, |
|
|
|