|
@ -33,13 +33,19 @@ |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
goHome, |
|
|
goHome, |
|
|
updateTitle |
|
|
updateTitle, |
|
|
|
|
|
clearTirmAndWrap |
|
|
} from '@/common/basic.js'; |
|
|
} from '@/common/basic.js'; |
|
|
import { |
|
|
import { |
|
|
getBusinessType, |
|
|
getBusinessType, |
|
|
} from '@/common/record.js'; |
|
|
} from '@/common/record.js'; |
|
|
import { |
|
|
import { |
|
|
getProductPutawayRequestList, |
|
|
getProductPutawayRequestList, |
|
|
|
|
|
productPutawayRequestClose, |
|
|
|
|
|
productPutawayRequestApprove, |
|
|
|
|
|
productPutawayRequestApproveAgree, |
|
|
|
|
|
productPutawayRequestApproveRefused, |
|
|
|
|
|
productPutawayRequestHandle |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import { |
|
|
import { |
|
|
getDetailOption, |
|
|
getDetailOption, |
|
@ -72,7 +78,6 @@ |
|
|
detailAndHandleOption: [], |
|
|
detailAndHandleOption: [], |
|
|
detailAndCloseOption: [], |
|
|
detailAndCloseOption: [], |
|
|
showOptions: [], |
|
|
showOptions: [], |
|
|
fromType: "requestType", |
|
|
|
|
|
loadingType: "nomore", |
|
|
loadingType: "nomore", |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
@ -81,7 +86,7 @@ |
|
|
this.detailOptions = getDetailOption(); |
|
|
this.detailOptions = getDetailOption(); |
|
|
this.detailAndApproveOptions = getDetailAndApproveOption() |
|
|
this.detailAndApproveOptions = getDetailAndApproveOption() |
|
|
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), |
|
|
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), |
|
|
this.detailAndHandleOption = getDetailAndHandleOption() |
|
|
this.detailAndHandleOption = getDetailAndHandleOption() |
|
|
this.detailAndCloseOption = getDetailAndCloseOption() |
|
|
this.detailAndCloseOption = getDetailAndCloseOption() |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
@ -202,27 +207,45 @@ |
|
|
|
|
|
|
|
|
openScanDetailPopup() { |
|
|
openScanDetailPopup() { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: "../record/productPutawayRecord?fromType=" + this.fromType |
|
|
url: "./putawayRequestCreate" |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swipeClick(e, dataContent) { |
|
|
swipeClick(e, dataContent) { |
|
|
if (e.content.text == "详情") { |
|
|
var text = clearTirmAndWrap(e.content.text) |
|
|
console.log("详情", dataContent.id) |
|
|
if (text == "详情") { |
|
|
this.openRequestInfoPopup(dataContent); |
|
|
this.openRequestInfoPopup(dataContent); |
|
|
} else if (e.content.text == "处理") { |
|
|
} else if (text == "处理") { |
|
|
console.log("处理") |
|
|
this.showQuestionMessage("确定要处理当前申请吗?",res=>{ |
|
|
} else if (e.content.text == "审批") { |
|
|
this.productPutawayRequestHandle(dataContent.id) |
|
|
console.log("审批") |
|
|
}) |
|
|
} else if (e.content.text == "审批通过") { |
|
|
} else if (text == "提交审批") { |
|
|
console.log("审批通过") |
|
|
this.showQuestionMessage("确定要审批当前申请吗?",res=>{ |
|
|
} else if (e.content.text == "审批驳回") { |
|
|
this.productPutawayRequestApprove(dataContent.id) |
|
|
console.log("审批驳回") |
|
|
}) |
|
|
} else if (e.content.text == "关闭") { |
|
|
} else if (text=="审批通过") { |
|
|
console.log("关闭") |
|
|
this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{ |
|
|
|
|
|
this.productPutawayRequestApproveAgree(dataContent.id) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (text == "审批驳回") { |
|
|
|
|
|
this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{ |
|
|
|
|
|
this.productPutawayRequestApproveRefused(dataContent.id) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (text == "关闭") { |
|
|
|
|
|
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ |
|
|
|
|
|
this.productPutawayRequestClose(dataContent.id) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
showQuestionMessage(hint,callBack){ |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage(hint, |
|
|
|
|
|
res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
callBack() |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
switchChangeWait(state, jobStatus) { |
|
|
switchChangeWait(state, jobStatus) { |
|
|
this.checkedWaitTask = state; |
|
|
this.checkedWaitTask = state; |
|
|
this.status = jobStatus; |
|
|
this.status = jobStatus; |
|
@ -271,6 +294,83 @@ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
productPutawayRequestApprove(id) { |
|
|
|
|
|
productPutawayRequestApprove(id).then(res => { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.getList("refresh") |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: "申请提交审批成功" |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showMessage("申请提交审批失败") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
productPutawayRequestClose(id) { |
|
|
|
|
|
productPutawayRequestClose(id).then(res => { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.getList("refresh") |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: "申请关闭成功" |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showMessage("申请关闭失败") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
productPutawayRequestApproveAgree(id) { |
|
|
|
|
|
productPutawayRequestApproveAgree(id).then(res => { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.getList("refresh") |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: "申请审批通过成功" |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showMessage("申请审批通过失败") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
productPutawayRequestApproveRefused(id) { |
|
|
|
|
|
productPutawayRequestApproveRefused(id).then(res => { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.getList("refresh") |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: "申请审批驳回成功" |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showMessage("申请审批驳回失败") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
productPutawayRequestHandle(id) { |
|
|
|
|
|
productPutawayRequestHandle(id).then(res => { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.getList("refresh") |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: "申请处理成功" |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showMessage("申请处理失败") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|