|
|
@@ -102,6 +102,9 @@
|
|
|
<el-button v-if="scope.row.doctorConfirm == 0" size="mini" type="text" icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)">开方
|
|
|
</el-button>
|
|
|
+ <el-button v-if="scope.row.doctorConfirm == 0" size="mini" type="text" icon="el-icon-delete"
|
|
|
+ @click="handleReject(scope.row)">拒方
|
|
|
+ </el-button>
|
|
|
<el-button v-if="scope.row.doctorConfirm == 1" size="mini" type="text"
|
|
|
@click="handleUpdate(scope.row)">查看
|
|
|
</el-button>
|
|
|
@@ -496,6 +499,7 @@ import {
|
|
|
} from '@/api/his/prescribe'
|
|
|
import {listPrescribeDrug, addPrescribeDrug, updatePrescribeDrug, deletePrescribeDrug} from "@/api/his/prescribeDrug";
|
|
|
import {getCollectionByUserId} from "@/api/collection";
|
|
|
+import {handleReject} from '@/api/his/prescribe'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -930,6 +934,29 @@ export default {
|
|
|
this.title = "新增处方";
|
|
|
this.activeTab = 'basic';
|
|
|
},
|
|
|
+ /** 拒方弹窗 */
|
|
|
+ handleReject(row) {
|
|
|
+ this.$prompt('请输入拒方原因', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPlaceholder: '请输入备注(不可为空)',
|
|
|
+ // 至少输入1个非空白字符
|
|
|
+ inputPattern: /\S+/,
|
|
|
+ inputErrorMessage: '拒方原因不能为空'
|
|
|
+ }).then(({ value }) => {
|
|
|
+ const remark = value.trim();
|
|
|
+ handleReject({
|
|
|
+ prescribeId: row.prescribeId,
|
|
|
+ remark: remark
|
|
|
+ }).then(() => {
|
|
|
+ this.$message.success('拒方成功');
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message.error('拒方失败');
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message.info('已取消拒方');
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|