- 加签
- 加签
+ 转交
-
-
关闭
+
+
+ 撤回
+
+
+
+ 编辑许可证
+ @click="itemDetailEdtil">前往编辑
-
+
@@ -363,6 +374,8 @@
dosOption: [],
submitLoading: false,
userId: this.$TOOL.data.get("USER_INFO").id,
+ isOwn: false,
+ isDuty: false
};
},
created() {
@@ -386,10 +399,27 @@
methods: {
itemDetailEdtil(){
let itemDetail = this.itemDetail;
- this.$router.push({
+ if(this.cateType === 'opl'){
+ this.$router.push({
name: itemDetail.cate_code,
query: {oplId:itemDetail.id}
})
+ }else if(this.cateType === 'rpj'){
+ this.$router.push({
+ name: "rpjadd",
+ query: {
+ rpjid: itemDetail.id, //访问项目id
+ },
+ });
+ }else if(this.cateType === 'visit'){
+ this.$router.push({
+ name: "vistoradd",
+ query: {
+ visitid: itemDetail.id, //访问项目id
+ },
+ });
+ }
+
},
handleClose(index) {
if (index === "1") {
@@ -400,7 +430,7 @@
this.handleLabel = "关闭原因";
}
this.limitedRetreat = true;
- this.ticketId = this.itemDetail.id;
+ // this.ticketId = this.itemDetail.id;
},
handleCancel() {
this.limitedRetreat = false;
@@ -413,26 +443,21 @@
cancelButtonText: "取消",
type: "warning",
})
- .then(async () => {
+ .then(() => {
if (that.handleTitle === "撤回工单") {
- res = that.$API.wf.ticket.ticketRetreat.req(
+ that.$API.wf.ticket.ticketRetreat.req(
that.ticketId,
that.handleForm
- );
+ ).then(res=>{that.limitedRetreat=false;window.location.reload()})
} else {
- res = that.$API.wf.ticket.ticketClose.req(
+ that.$API.wf.ticket.ticketClose.req(
that.ticketId,
that.handleForm
- );
- }
- if (res.err_msg) {
- } else {
- that.limitedRetreat = false;
-
+ ).then(res=>{that.limitedRetreat=false;window.location.reload()});
}
})
.catch((err) => {
- console.error(err);
+ that.limitedRetreat=false
});
},
//关闭工作
@@ -464,10 +489,19 @@
this.$API.wf.ticket.ticketItem.req(this.ticketId).then((res) => {
this.mainLoading = false;
this.ticketDetail = res;
+
if(this.ticketDetail.state_.key == 'opl_close'){
// 如果是作业关闭,展示需要提交的表单
this.getCloseDos()
}
+ // 判断是不是我的或该我处理的
+ if(this.ticketDetail.create_by == this.userId){
+ this.isOwn = true
+ }
+ let participant = this.ticketDetail.participant
+ if(participant==this.userId || participant.indexOf(this.userId)>-1){
+ this.isDuty = true
+ }
}).catch(e=>{this.mainLoading = false});
},
//获取应有的流转