|
|
@ -14,10 +14,11 @@ |
|
|
|
</view> |
|
|
|
</uni-swipe-action> |
|
|
|
<uni-load-more :status="loadingType" /> |
|
|
|
|
|
|
|
<request-info-popup ref='requestInfoPopup'></request-info-popup> |
|
|
|
<!-- <request-info-popup ref='requestInfoPopup'></request-info-popup> --> |
|
|
|
</view> |
|
|
|
<requestButton @goScan='openScanDetailPopup'></requestButton> |
|
|
|
<!-- <com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup> --> |
|
|
|
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirmsss'></com-issue-request-popup> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -30,6 +31,8 @@ |
|
|
|
import comIssueRequestCard from '@/pages/issue/coms/comIssueRequestCard.vue' |
|
|
|
import requestInfoPopup from '@/pages/issue/coms/requestInfoPopup.vue' |
|
|
|
import requestButton from '@/mycomponents/button/requestButton.vue' |
|
|
|
import comIssueRequestPopup from '@/pages/issue/coms/comIssueRequestPopup.vue' |
|
|
|
|
|
|
|
import { |
|
|
|
goHome, |
|
|
|
updateTitle, |
|
|
@ -64,6 +67,7 @@ |
|
|
|
comIssueRequestCard, |
|
|
|
requestInfoPopup, |
|
|
|
requestButton, |
|
|
|
comIssueRequestPopup |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -119,16 +123,16 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
requestConfirm(action, item) {}, |
|
|
|
openRequestDetail(item) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: './issueRequestDetail?id=' + item.id |
|
|
|
url: './issueRequestDetail?type=query&id=' + item.id |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
openRequestInfoPopup(item) { |
|
|
|
this.$refs.requestInfoPopup.openPopup(item) |
|
|
|
}, |
|
|
|
|
|
|
|
getList(type) { |
|
|
|
let that = this; |
|
|
|
uni.showLoading({ |
|
|
@ -183,6 +187,7 @@ |
|
|
|
that.showMessage(error.errMsg) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
updateOptions(status) { |
|
|
|
if (status == "1") { |
|
|
|
this.showOptions = this.detailAndApproveOptions; |
|
|
@ -199,42 +204,37 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
openScanDetailPopup() { |
|
|
|
// uni.navigateTo({ |
|
|
|
// url: "../request/issueRequestSubmit?fromType=" + this.fromType |
|
|
|
// }) |
|
|
|
uni.navigateTo({ |
|
|
|
url: "../record/issueRecord?fromType=" + this.fromType |
|
|
|
}) |
|
|
|
this.$refs.comIssueRequestPopup.openRequestPopup(true); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
swipeClick(e, dataContent) { |
|
|
|
var text = clearTirmAndWrap(e.content.text) |
|
|
|
if (text == "详情") { |
|
|
|
this.openRequestInfoPopup(dataContent); |
|
|
|
} else if (text == "处理") { |
|
|
|
this.showQuestionMessage("确定要处理当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要处理当前申请吗?", res => { |
|
|
|
this.issueRequestHandle(dataContent.id) |
|
|
|
}) |
|
|
|
} else if (text == "提交审批") { |
|
|
|
this.showQuestionMessage("确定要审批当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要审批当前申请吗?", res => { |
|
|
|
this.issueRequestSubmitApprove(dataContent.id) |
|
|
|
}) |
|
|
|
} else if (text.includes("审批通过")) { |
|
|
|
this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要审批通过当前申请吗?", res => { |
|
|
|
this.issueRequestSubmitApproveAgree(dataContent.id) |
|
|
|
}) |
|
|
|
} else if (text == "审批驳回") { |
|
|
|
this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要审批驳回当前申请吗?", res => { |
|
|
|
this.issueRequestSubmitApproveRefused(dataContent.id) |
|
|
|
}) |
|
|
|
} else if (text == "关闭") { |
|
|
|
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要关闭当前申请吗?", res => { |
|
|
|
this.issueRequestClose(dataContent.id) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
showQuestionMessage(hint,callBack){ |
|
|
|
|
|
|
|
showQuestionMessage(hint, callBack) { |
|
|
|
this.$refs.comMessage.showQuestionMessage(hint, |
|
|
|
res => { |
|
|
|
if (res) { |
|
|
@ -242,6 +242,7 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
switchChangeWait(state, jobStatus) { |
|
|
|
this.checkedWaitTask = state; |
|
|
|
this.status = jobStatus; |
|
|
@ -290,7 +291,7 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
issueRequestSubmitApprove(id) { |
|
|
|
issueRequestSubmitApprove(id).then(res => { |
|
|
|
if (res.data) { |
|
|
@ -301,13 +302,13 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请提交审批失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
issueRequestClose(id) { |
|
|
|
issueRequestClose(id).then(res => { |
|
|
|
if (res.data) { |
|
|
@ -318,12 +319,12 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请关闭失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
issueRequestSubmitApproveAgree(id) { |
|
|
|
issueRequestSubmitApproveAgree(id).then(res => { |
|
|
|
if (res.data) { |
|
|
@ -334,12 +335,12 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请审批通过失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
issueRequestSubmitApproveRefused(id) { |
|
|
|
issueRequestSubmitApproveRefused(id).then(res => { |
|
|
|
if (res.data) { |
|
|
@ -350,11 +351,12 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请审批驳回失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
issueRequestHandle(id) { |
|
|
|
issueRequestHandle(id).then(res => { |
|
|
|
if (res.data) { |
|
|
@ -365,13 +367,26 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请处理失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
requestConfirmsss(action, item) { |
|
|
|
debugger; |
|
|
|
uni.navigateTo({ |
|
|
|
url: './issueRequestDetail?type=add&item=' + item.id |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// requestConfirm(action, item) { |
|
|
|
// debugger; |
|
|
|
// uni.navigateTo({ |
|
|
|
// url: './issueRequestDetail?type=add&item=' + item.id |
|
|
|
// }); |
|
|
|
// } |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|