From 97735dd32d52072e09f00fb6ac62411f8e7913ec Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 4 Dec 2023 16:03:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=96=99=E7=94=B3=E8=AF=B7=E5=AE=A1?= =?UTF-8?q?=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/request2.js | 61 ++++++++ common/array.js | 8 +- pages/customerReturn/job/returnDetail.vue | 4 +- .../coms/comInventoryDetailCard.vue | 2 +- pages/issue/request/issueRequest.vue | 134 ++++++++++++++++-- .../purchaseReturn/request/returnRequest.vue | 12 +- pages/putaway/job/putawayDetail.vue | 1 + 7 files changed, 197 insertions(+), 25 deletions(-) diff --git a/api/request2.js b/api/request2.js index 4a005e5d..7f0d5097 100644 --- a/api/request2.js +++ b/api/request2.js @@ -2107,6 +2107,67 @@ export function issueRequestSubmit(params) { }); } +/** + * 发料申请 处理 + * @param {*} params + */ +export function issueRequestHandle(id) { + return request({ + url: baseApi + "/wms/issue-request-main/handle?id="+id, + method: "put", + data: {}, + }); +} + + +/** + * 发料申请 提交审批 + * @param {*} params + */ +export function issueRequestSubmitApprove(id) { + return request({ + url: baseApi + "/wms/issue-request-main/submit?id="+id, + method: "put", + data: {}, + }); +} + +/** + * 发料申请 审批通过 + * @param {*} params + */ +export function issueRequestSubmitApproveAgree(id) { + return request({ + url: baseApi + "/wms/issue-request-main/agree?id="+id, + method: "put", + data: {}, + }); +} + +/** + * 发料申请 审批驳回 + * @param {*} params + */ +export function issueRequestSubmitApproveRefused(id) { + return request({ + url: baseApi + "/wms/issue-request-main/refused?id="+id, + method: "put", + data: {}, + }); +} + +/** + * 发料申请 申请关闭 + * @param {*} params + */ +export function issueRequestClose(id) { + return request({ + url: baseApi + "/wms/issue-request-main/close?id="+id, + method: "put", + data: {}, + }); +} + /** * 发料记录 提交 * @param {*} params diff --git a/common/array.js b/common/array.js index bb92003e..b570adaf 100644 --- a/common/array.js +++ b/common/array.js @@ -7,10 +7,16 @@ export function getDetailAndApproveOption() { } }, { - text: '审批', + text: '提交\n审批', style: { backgroundColor: '#00CC33' } + }, + { + text: '关闭', + style: { + backgroundColor: '#ff0000' + } } ]; return option_detail; diff --git a/pages/customerReturn/job/returnDetail.vue b/pages/customerReturn/job/returnDetail.vue index 276e46c3..7e9e7725 100644 --- a/pages/customerReturn/job/returnDetail.vue +++ b/pages/customerReturn/job/returnDetail.vue @@ -14,8 +14,6 @@ - - @@ -97,6 +95,8 @@ }; }, onLoad(option) { + console.log("任务id",option.id) + console.log("任务状态",option.status) this.id = option.id; if (this.id != undefined) { //新建的任务自动接收 diff --git a/pages/inventoryMove/coms/comInventoryDetailCard.vue b/pages/inventoryMove/coms/comInventoryDetailCard.vue index 50fd7c56..5742dd5b 100644 --- a/pages/inventoryMove/coms/comInventoryDetailCard.vue +++ b/pages/inventoryMove/coms/comInventoryDetailCard.vue @@ -13,8 +13,8 @@ - + diff --git a/pages/issue/request/issueRequest.vue b/pages/issue/request/issueRequest.vue index 35b582f3..22a09a7e 100644 --- a/pages/issue/request/issueRequest.vue +++ b/pages/issue/request/issueRequest.vue @@ -32,7 +32,8 @@ import requestButton from '@/mycomponents/button/requestButton.vue' import { goHome, - updateTitle + updateTitle, + clearTirmAndWrap } from '@/common/basic.js'; import { @@ -40,6 +41,11 @@ } from '@/common/record.js'; import { getIssueRequestList, + issueRequestClose, + issueRequestSubmitApproveRefused, + issueRequestSubmitApproveAgree, + issueRequestSubmitApprove, + issueRequestHandle } from '@/api/request2.js'; import { getDetailOption, @@ -200,24 +206,42 @@ url: "../record/issueRecord?fromType=" + this.fromType }) }, - - + swipeClick(e, dataContent) { - if (e.content.text == "详情") { - console.log("详情", dataContent.id) + var text = clearTirmAndWrap(e.content.text) + if (text == "详情") { this.openRequestInfoPopup(dataContent); - } else if (e.content.text == "处理") { - console.log("处理") - } else if (e.content.text == "审批") { - console.log("审批") - } else if (e.content.text == "审批通过") { - console.log("审批通过") - } else if (e.content.text == "审批驳回") { - console.log("审批驳回") - } else if (e.content.text == "关闭") { - console.log("关闭") + } else if (text == "处理") { + this.showQuestionMessage("确定要处理当前申请吗?",res=>{ + this.issueRequestHandle(dataContent.id) + }) + } else if (text == "提交审批") { + this.showQuestionMessage("确定要审批当前申请吗?",res=>{ + this.issueRequestSubmitApprove(dataContent.id) + }) + } else if (text.includes("审批通过")) { + this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{ + this.issueRequestSubmitApproveAgree(dataContent.id) + }) + } else if (text == "审批驳回") { + this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{ + this.issueRequestSubmitApproveRefused(dataContent.id) + }) + } else if (text == "关闭") { + this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ + this.issueRequestClose(dataContent.id) + }) } }, + + showQuestionMessage(hint,callBack){ + this.$refs.comMessage.showQuestionMessage(hint, + res => { + if (res) { + callBack() + } + }); + }, switchChangeWait(state, jobStatus) { this.checkedWaitTask = state; this.status = jobStatus; @@ -266,6 +290,86 @@ } }); }, + + issueRequestSubmitApprove(id) { + issueRequestSubmitApprove(id).then(res => { + if (res.data) { + this.getList("refresh") + uni.showToast({ + title: "申请提交审批成功" + }) + } else { + this.showMessage("申请提交审批失败") + } + + }).catch(error => { + this.showMessage(error) + }) + + }, + + issueRequestClose(id) { + issueRequestClose(id).then(res => { + if (res.data) { + this.getList("refresh") + uni.showToast({ + title: "申请关闭成功" + }) + } else { + this.showMessage("申请关闭失败") + } + + }).catch(error => { + this.showMessage(error) + }) + }, + + issueRequestSubmitApproveAgree(id) { + issueRequestSubmitApproveAgree(id).then(res => { + if (res.data) { + this.getList("refresh") + uni.showToast({ + title: "申请审批通过成功" + }) + } else { + this.showMessage("申请审批通过失败") + } + + }).catch(error => { + this.showMessage(error) + }) + }, + + issueRequestSubmitApproveRefused(id) { + issueRequestSubmitApproveRefused(id).then(res => { + if (res.data) { + this.getList("refresh") + uni.showToast({ + title: "申请审批驳回成功" + }) + } else { + this.showMessage("申请审批驳回失败") + } + + }).catch(error => { + this.showMessage(error) + }) + }, + issueRequestHandle(id) { + issueRequestHandle(id).then(res => { + if (res.data) { + this.getList("refresh") + uni.showToast({ + title: "申请处理成功" + }) + } else { + this.showMessage("申请处理失败") + } + + }).catch(error => { + this.showMessage(error) + }) + }, } } diff --git a/pages/purchaseReturn/request/returnRequest.vue b/pages/purchaseReturn/request/returnRequest.vue index 45f1d80e..5893250f 100644 --- a/pages/purchaseReturn/request/returnRequest.vue +++ b/pages/purchaseReturn/request/returnRequest.vue @@ -213,11 +213,11 @@ this.showQuestionMessage("确定要处理当前申请吗?",res=>{ this.purchaseReturnRequestHandle(dataContent.id) }) - } else if (text == "审批") { + } else if (text == "提交审批") { this.showQuestionMessage("确定要审批当前申请吗?",res=>{ this.purchaseReturnRequestSubmitApprove(dataContent.id) }) - } else if (text.includes("审批通过")) { + } else if (text=="审批通过") { this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{ this.purchaseReturnRequestSubmitApproveAgree(dataContent.id) }) @@ -296,10 +296,10 @@ if (res.data) { this.getList("refresh") uni.showToast({ - title: "申请审批成功" + title: "申请提交审批成功" }) } else { - this.showMessage("申请审批失败") + this.showMessage("申请提交审批失败") } }).catch(error => { @@ -358,10 +358,10 @@ if (res.data) { this.getList("refresh") uni.showToast({ - title: "申请审批驳回成功" + title: "申请处理成功" }) } else { - this.showMessage("申请审批驳回失败") + this.showMessage("申请处理失败") } }).catch(error => { diff --git a/pages/putaway/job/putawayDetail.vue b/pages/putaway/job/putawayDetail.vue index 67429008..3e776b2d 100644 --- a/pages/putaway/job/putawayDetail.vue +++ b/pages/putaway/job/putawayDetail.vue @@ -170,6 +170,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + that.jobContent.outInventoryStatuses='INSP' that.subList = res.data.subList; that.detailSource = getDataSource(that.subList)