1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <div style="display: inline-block">
- <p v-if="buttonData.type == '0'" class="button-p reset-button-one" style="width:100px;margin-right:20px;" @click="auditClick(1)">驳回</p>
- <p v-if="buttonData.type == '1'" class="inquire-button-one" style="width:100px;" @click="auditClick(2)">通过</p>
- <el-button v-if="buttonData.type == '2'" type="primary" @click="laboratoryApply(1)">确 定</el-button>
- </div>
- </template>
- <script>
- import { laboratoryApply } from "@/api/laboratory/approval";
- export default {
- name: 'addPageSubPagePublic',
- props:{
- buttonData: {},
- },
- methods:{
- //审核按钮
- auditClick(type){
- let self = this;
- if(type == 1){
- self.$parent.open = true;
- }else if(type == 2){
- self.$confirm('是否确认审核?', "", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- self.laboratoryApply(type);
- }).then(() => {}).catch(() => {});
- }
- },
- laboratoryApply(type){
- let self = this;
- let obj = {
- id:type==1?self.$parent.$parent.infoData.list.id:self.$parent.infoData.list.id,
- auditStatus:type,
- rejectCause:type==1?self.$parent.$parent.rejectCause:self.$parent.rejectCause
- };
- if(type == 1){
- obj.rejectCause = self.$parent.$parent.form.rejectCause;
- obj.rejectMaterial = self.$parent.$parent.checkList + '';
- }
- laboratoryApply(obj).then(response => {
- if(response.code==200){
- self.msgSuccess("操作成功");
- if(type == 1){
- self.$parent.$parent.$parent.tableClick(1);
- }else{
- self.$parent.$parent.tableClick(1);
- }
- }else if(response.code==205){
- self.$confirm(response.msg, "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- // 确定
- self.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
- }).catch(function() {
- // 取消
- if(type == 1){
- self.$parent.$parent.$parent.tableClick(1);
- }else{
- self.$parent.$parent.tableClick(1);
- }
- });
- }
- })
- },
- }
- }
- </script>
- <style scoped>
- </style>
|