|
@@ -1,7 +1,9 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<common @asynCallBack="asynCallBack"></common>
|
|
<common @asynCallBack="asynCallBack"></common>
|
|
- <top-header :pageTitle="pageTitle"></top-header>
|
|
|
|
|
|
+ <top-header :pageTitle="pageTitle" :rightLink="rightLink" :doRightLink="doRightLink" >
|
|
|
|
+
|
|
|
|
+ </top-header>
|
|
|
|
|
|
<div class="mui-content vongi-qingjiadt margin60">
|
|
<div class="mui-content vongi-qingjiadt margin60">
|
|
<div class="vongi-qingjiadt-head flew-sp" style="" >
|
|
<div class="vongi-qingjiadt-head flew-sp" style="" >
|
|
@@ -40,14 +42,19 @@
|
|
<span v-text="detail.createTime">2020-04-27 12:00:00</span>
|
|
<span v-text="detail.createTime">2020-04-27 12:00:00</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-
|
|
|
|
|
|
+ <div style=" text-align: center; background-color: #fff; " v-if="detail.docStatus==0" >
|
|
|
|
+ <button type="button" class="btn1 mui-btn mui-btn-danger" @click="inforevoke" >撤销审批</button>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
</form>
|
|
</form>
|
|
<div class="vongi-slot">
|
|
<div class="vongi-slot">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="mui-content vongi-wordcard" v-if="list" style=" background-color: #ffffff;margin-top: 10px; padding-top: 0px;">
|
|
<div class="mui-content vongi-wordcard" v-if="list" style=" background-color: #ffffff;margin-top: 10px; padding-top: 0px;">
|
|
<examineDetail :edit="false" :list="list" :view="detail.docStatus==0" ></examineDetail>
|
|
<examineDetail :edit="false" :list="list" :view="detail.docStatus==0" ></examineDetail>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@@ -87,6 +94,13 @@ export default {
|
|
isLoading: false,
|
|
isLoading: false,
|
|
id: this.$route.query.id,
|
|
id: this.$route.query.id,
|
|
detail: {},
|
|
detail: {},
|
|
|
|
+
|
|
|
|
+ rightLink: {
|
|
|
|
+ show: true,
|
|
|
|
+ //icon: 'icon-tongji',
|
|
|
|
+ style: 'font-size:14px',
|
|
|
|
+ title: '设为模板'
|
|
|
|
+ },
|
|
status: ['待审核', '已通过', '未通过', '已撤销'],
|
|
status: ['待审核', '已通过', '未通过', '已撤销'],
|
|
// status: ['待审核', '已批准', '已拒绝','已撤销'],
|
|
// status: ['待审核', '已批准', '已拒绝','已撤销'],
|
|
statusColor: ['mui-btn-warning', 'mui-btn-success', 'mui-btn-danger',''],
|
|
statusColor: ['mui-btn-warning', 'mui-btn-success', 'mui-btn-danger',''],
|
|
@@ -96,6 +110,78 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ inforevoke(){
|
|
|
|
+ var _this=this;
|
|
|
|
+ mui.confirm('是否撤销当前审批','提示', ['取消', '确定'], function(e) {
|
|
|
|
+ if (e.index == 1) {
|
|
|
|
+ _this.detail.templateFlag=0;
|
|
|
|
+ _this.save()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ },
|
|
|
|
+ save(){
|
|
|
|
+ this.isLoading = true;
|
|
|
|
+ this.list.masterFile.docStatus=3;
|
|
|
|
+ //撤销
|
|
|
|
+ API.update(this.list).then(response => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ //this.init();
|
|
|
|
+ mui.toast("操作成功");
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ mui.toast(error);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //右上角点击事件
|
|
|
|
+ doRightLink() {
|
|
|
|
+ // this.$router.push({
|
|
|
|
+ // name: 'CommonHealthCert',
|
|
|
|
+ // query: {
|
|
|
|
+ // personId: this.detail.personId
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ var _this=this;
|
|
|
|
+ if( this.detail.templateFlag=="1"){
|
|
|
|
+ //this.detail.templateFlag=0;
|
|
|
|
+ mui.confirm('是否取消模板','提示', ['取消', '确定'], function(e) {
|
|
|
|
+ if (e.index == 1) {
|
|
|
|
+ _this.detail.templateFlag=0;
|
|
|
|
+ _this.updateTemplateFlag();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ mui.prompt('设置模板备注名称', _this.detail.docTitle,'提示', ['取消', '确定'], function(e) {
|
|
|
|
+ if (e.index == 1) {
|
|
|
|
+ _this.detail.templateFlag=1;
|
|
|
|
+ if(!e.value){
|
|
|
|
+ e.value=_this.detail.docTitle;
|
|
|
|
+ }
|
|
|
|
+ _this.detail.templateTitle=e.value
|
|
|
|
+
|
|
|
|
+ _this.updateTemplateFlag();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ updateTemplateFlag(){
|
|
|
|
+ this.isLoading = true;
|
|
|
|
+ API.updateTemplateFlag(this.detail).then(response => {
|
|
|
|
+ mui.toast("操作成功");
|
|
|
|
+ this.getDetail()
|
|
|
|
+
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ mui.toast(error);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
//获取状态颜色
|
|
//获取状态颜色
|
|
getColor(status) {
|
|
getColor(status) {
|
|
var color = '';
|
|
var color = '';
|
|
@@ -114,7 +200,13 @@ export default {
|
|
API.edit( this.id).then(response => {
|
|
API.edit( this.id).then(response => {
|
|
this.detail = response.masterFile;
|
|
this.detail = response.masterFile;
|
|
this.list=response
|
|
this.list=response
|
|
-
|
|
|
|
|
|
+ if( this.detail.templateFlag=="1"){
|
|
|
|
+ this.rightLink.title="取消模板"
|
|
|
|
+ this.rightLink.style="font-size:14px;color:red"
|
|
|
|
+ }else{
|
|
|
|
+ this.rightLink.title="设为模板"
|
|
|
|
+ this.rightLink.style="font-size:14px;"
|
|
|
|
+ }
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|