|
@@ -52,8 +52,8 @@ export default {
|
|
|
phone: '',
|
|
|
},
|
|
|
appealRules: {
|
|
|
- doctor: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
- reason: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
+ doctor: [{ required: true, message: '请输入' }],
|
|
|
+ reason: [{ required: true, message: '请输入' }],
|
|
|
},
|
|
|
currentId: '',
|
|
|
MEDRECID: '',
|
|
@@ -120,55 +120,65 @@ export default {
|
|
|
this.getBaseInfo()
|
|
|
},
|
|
|
submitAppeal() {
|
|
|
- if (this.dialogType === 'appeal') {
|
|
|
- // 申诉逻辑
|
|
|
- const pramse = {
|
|
|
- id: this.currentId,
|
|
|
- zyh: this.MEDRECID,
|
|
|
- type: 2,
|
|
|
- quality_type: this.qualityType,
|
|
|
- defect_content: this.appealForm.reason, // 使用 appealForm 中的原因
|
|
|
- appeal_docter: this.appealForm.doctor, // 使用 appealForm 中的医师
|
|
|
- };
|
|
|
- console.log(pramse, 'pramse');
|
|
|
+ this.$refs.appealFormRef.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.dialogType === 'appeal') {
|
|
|
+ // 申诉逻辑
|
|
|
+ const pramse = {
|
|
|
+ id: this.currentId,
|
|
|
+ zyh: this.MEDRECID,
|
|
|
+ type: 2,
|
|
|
+ quality_type: this.qualityType,
|
|
|
+ defect_content: this.appealForm.reason, // 使用 appealForm 中的原因
|
|
|
+ appeal_docter: this.appealForm.doctor, // 使用 appealForm 中的医师
|
|
|
+ };
|
|
|
+ console.log(pramse, 'pramse');
|
|
|
|
|
|
- examineAppeal(pramse).then(res => {
|
|
|
- this.$message({
|
|
|
- message: '提交申诉成功',
|
|
|
- type: 'success',
|
|
|
- });
|
|
|
- // 提交后关闭弹框
|
|
|
- this.dialogVisible = false;
|
|
|
- this.$emit('onUpdate')
|
|
|
- });
|
|
|
- }
|
|
|
- // 申诉审核通过和驳回逻辑
|
|
|
- if (this.dialogType === 'appeal_in_yes' || this.dialogType === 'appeal_in_no') {
|
|
|
- const params = {
|
|
|
- id: this.currentId,
|
|
|
- type: this.activeName == 'first' ? 1 : this.activeName == 'second' ? 2 : 3,
|
|
|
- status: this.dialogType === 'appeal_in_yes' ? 1 : 2,
|
|
|
- reject_content: this.appealForm.reason, // 使用 appealForm 中的原因
|
|
|
- case_docter: this.appealForm.doctor, // 使用 appealForm 中的医师
|
|
|
- };
|
|
|
- console.log(params, 'params');
|
|
|
- this.$axios.post('/examineCaseAppeal', params).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: `申诉${this.getDialogTitle()}成功`,
|
|
|
- type: 'success',
|
|
|
- });
|
|
|
- // 提交后关闭弹框
|
|
|
- this.dialogVisible = false;
|
|
|
- this.$emit('onUpdate')
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: 'error',
|
|
|
+ examineAppeal(pramse).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: '提交申诉成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ // 提交后关闭弹框
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.$emit('onUpdate')
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ // 申诉审核通过和驳回逻辑
|
|
|
+ if (this.dialogType === 'appeal_in_yes' || this.dialogType === 'appeal_in_no') {
|
|
|
+ const params = {
|
|
|
+ id: this.currentId,
|
|
|
+ type: this.qualityType,
|
|
|
+ status: this.dialogType === 'appeal_in_yes' ? 1 : 2,
|
|
|
+ reject_content: this.appealForm.reason, // 使用 appealForm 中的原因
|
|
|
+ case_docter: this.appealForm.doctor, // 使用 appealForm 中的医师
|
|
|
+ };
|
|
|
+ console.log(params, 'params');
|
|
|
+ this.$axios.post('/examineCaseAppeal', params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: `申诉${this.getDialogTitle()}成功`,
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ // 提交后关闭弹框
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.$emit('onUpdate')
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
handleIgnore(items, quality_type) {
|
|
|
const pramse = {
|
|
@@ -189,6 +199,13 @@ export default {
|
|
|
},
|
|
|
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ dialogVisible(val) {
|
|
|
+ if(!val) {
|
|
|
+ this.$refs.appealFormRef && this.$refs.appealFormRef.resetFields()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|