|
|
@ -50,7 +50,7 @@ |
|
|
|
getDetailAndApproveOption, |
|
|
|
getDetailAndApprovePassAndApproveNoOption, |
|
|
|
getDetailAndHandleOption, |
|
|
|
getDetailAndCloseOption, |
|
|
|
getDetailAndAddAndCloseOption, |
|
|
|
getAddAgainOption |
|
|
|
} from '@/common/array.js'; |
|
|
|
|
|
|
@ -69,31 +69,31 @@ |
|
|
|
requestList: [], |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
status: "", |
|
|
|
status: "1,2,3,4,5,6", |
|
|
|
totalCount: 0, |
|
|
|
checkedWaitTask: false, |
|
|
|
detailOptions: [], |
|
|
|
detailAndApproveOptions: [], |
|
|
|
detailAndApprovePassAndApproveNoOption: [], |
|
|
|
detailAndHandleOption: [], |
|
|
|
detailAndCloseOption: [], |
|
|
|
addAgainOption:[], |
|
|
|
detailAndAddAndCloseOption: [], |
|
|
|
addAgainOption: [], |
|
|
|
showOptions: [], |
|
|
|
loadingType: "nomore", |
|
|
|
title:"", |
|
|
|
fromType:"" |
|
|
|
title: "", |
|
|
|
fromType: "" |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
businessType: { |
|
|
|
type: String, |
|
|
|
default: '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//返回首页 |
|
|
|
onNavigationBarButtonTap(e) { |
|
|
|
if (e.index === 0) { |
|
|
@ -109,26 +109,26 @@ |
|
|
|
this.addAgainOption = getAddAgainOption(); |
|
|
|
this.detailAndApproveOptions = getDetailAndApproveOption() |
|
|
|
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), |
|
|
|
this.detailAndHandleOption = getDetailAndHandleOption() |
|
|
|
this.detailAndCloseOption = getDetailAndCloseOption() |
|
|
|
this.detailAndHandleOption = getDetailAndHandleOption() |
|
|
|
this.detailAndAddAndCloseOption = getDetailAndAddAndCloseOption() |
|
|
|
this.updateTitle(); |
|
|
|
this.getList('refresh'); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
updateTitle() { |
|
|
|
if (this.businessType == 'ReturnToStore') { |
|
|
|
this.title = "生产合格退料申请" |
|
|
|
this.fromType ="ReturnToStore" |
|
|
|
this.fromType = "ReturnToStore" |
|
|
|
} else if (this.businessType == 'ReturnToHold') { |
|
|
|
this.title = "生产隔离退料申请" |
|
|
|
this.fromType ="ReturnToHold" |
|
|
|
this.fromType = "ReturnToHold" |
|
|
|
} |
|
|
|
updateTitle(this.title) |
|
|
|
}, |
|
|
|
|
|
|
|
onShow(){ |
|
|
|
|
|
|
|
onShow() { |
|
|
|
this.getList('refresh'); |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
@ -138,7 +138,7 @@ |
|
|
|
} |
|
|
|
this.getList("more"); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onPullDownRefresh() { |
|
|
|
this.getList('refresh'); |
|
|
|
}, |
|
|
@ -163,13 +163,11 @@ |
|
|
|
this.requestList = []; |
|
|
|
} |
|
|
|
var filters = [] |
|
|
|
if (this.checkedWaitTask) { |
|
|
|
filters.push({ |
|
|
|
column: "status", |
|
|
|
action: "==", |
|
|
|
value: this.status |
|
|
|
}) |
|
|
|
} |
|
|
|
filters.push({ |
|
|
|
column: "status", |
|
|
|
action: "in", |
|
|
|
value: this.status |
|
|
|
}) |
|
|
|
filters.push({ |
|
|
|
column: "business_type", |
|
|
|
action: "==", |
|
|
@ -201,7 +199,7 @@ |
|
|
|
this.requestList = type === "refresh" ? list : this.requestList.concat(list); |
|
|
|
|
|
|
|
this.pageNo++; |
|
|
|
updateTitle(this.title+"("+this.totalCount + ")") |
|
|
|
updateTitle(this.title + "(" + this.totalCount + ")") |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
if (type === "refresh") { |
|
|
@ -223,10 +221,10 @@ |
|
|
|
} else if (status == "3") { |
|
|
|
this.showOptions = this.detailAndHandleOption; |
|
|
|
} else if (status == "4") { |
|
|
|
this.showOptions = this.detailAndCloseOption; |
|
|
|
} else if(status == "5"){ |
|
|
|
this.showOptions = this.detailAndAddAndCloseOption; |
|
|
|
} else if (status == "5") { |
|
|
|
this.showOptions = this.addAgainOption; |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.showOptions = this.detailOptions; |
|
|
|
} |
|
|
|
return this.showOptions |
|
|
@ -237,42 +235,42 @@ |
|
|
|
url: "./returnRequestCreate?fromType=" + this.fromType |
|
|
|
}) |
|
|
|
}, |
|
|
|
openFilter(){ |
|
|
|
openFilter() { |
|
|
|
this.$refs.filter.openFilter(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
swipeClick(e, dataContent) { |
|
|
|
var text = clearTirmAndWrap(e.content.text) |
|
|
|
if (e.content.text == "详情") { |
|
|
|
this.openRequestInfoPopup(dataContent); |
|
|
|
} else if (e.content.text == "处理") { |
|
|
|
this.showQuestionMessage("确定要处理当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要处理当前申请吗?", res => { |
|
|
|
this.productionReturnRequestHandle(dataContent.id) |
|
|
|
}) |
|
|
|
} else if (e.content.text == "审批") { |
|
|
|
this.showQuestionMessage("确定要审批当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要审批当前申请吗?", res => { |
|
|
|
this.productionReturnRequestSubmitApprove(dataContent.id) |
|
|
|
}) |
|
|
|
} else if (e.content.text == "审批通过") { |
|
|
|
this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要审批通过当前申请吗?", res => { |
|
|
|
this.productionReturnRequestSubmitApproveAgree(dataContent.id) |
|
|
|
}) |
|
|
|
} else if (e.content.text == "审批驳回") { |
|
|
|
this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要审批驳回当前申请吗?", res => { |
|
|
|
this.productionReturnRequestSubmitApproveRefused(dataContent.id) |
|
|
|
}) |
|
|
|
} else if (e.content.text == "关闭") { |
|
|
|
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ |
|
|
|
this.showQuestionMessage("确定要关闭当前申请吗?", res => { |
|
|
|
this.productionReturnRequestClose(dataContent.id) |
|
|
|
}) |
|
|
|
}else if(text == "重新添加"){ |
|
|
|
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{ |
|
|
|
} else if (text == "重新添加") { |
|
|
|
this.showQuestionMessage("确定要重新添加当前申请吗?", res => { |
|
|
|
this.productionReturnRequestAddAgain(dataContent.id) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
showQuestionMessage(hint,callBack){ |
|
|
|
|
|
|
|
showQuestionMessage(hint, callBack) { |
|
|
|
this.$refs.comMessage.showQuestionMessage(hint, |
|
|
|
res => { |
|
|
|
if (res) { |
|
|
@ -280,8 +278,8 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switchChangeWait(state, jobStatus) { |
|
|
|
this.checkedWaitTask = state; |
|
|
|
this.status = jobStatus; |
|
|
@ -340,11 +338,11 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请提交审批失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
productionReturnRequestClose(id) { |
|
|
|
productionReturnRequestClose(id).then(res => { |
|
|
@ -356,7 +354,7 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请关闭失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
@ -371,7 +369,7 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请审批通过失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
@ -386,7 +384,7 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请审批驳回失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
@ -401,7 +399,7 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请处理失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
@ -416,7 +414,7 @@ |
|
|
|
} else { |
|
|
|
this.showMessage("申请重新添加失败") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|