Browse Source

修改重新添加

wms3.0_pda
lijuncheng 11 months ago
parent
commit
c7b03dc10a
  1. 378
      api/request2.js
  2. 22
      common/array.js
  3. 156
      pages/customerReturn/request/customerReturnRequest.vue
  4. 153
      pages/deliver/request/deliverRequest.vue
  5. 160
      pages/inspect/request/inspectRequest.vue
  6. 35
      pages/issue/request/issueRequest.vue
  7. 31
      pages/productPutaway/request/putawayRequest.vue
  8. 33
      pages/productionReturn/coms/comReturnCommonRequest.vue
  9. 31
      pages/purchaseReturn/request/returnRequest.vue
  10. 158
      pages/putaway/request/putawayRequest.vue
  11. 4
      pages/repleinsh/request/repleinshRequest.vue
  12. 35
      pages/scrap/request/scrapRrequest.vue
  13. 31
      pages/unPlanned/request/issueRequest.vue
  14. 31
      pages/unPlanned/request/receiptRequest.vue

378
api/request2.js

@ -501,6 +501,79 @@ export function getInspectRequestDetail(id) {
}); });
} }
/**
* 检验单申请 关闭任务
* @param {*} params
*/
export function inspectRequestClose(id) {
return request({
url: baseApi + "/wms/inspect-request-main/close?id=" + id,
method: "put",
data: {},
});
}
/**
* 检验单申请 提交审批
* @param {*} params
*/
export function inspectRequestApprove(id) {
return request({
url: baseApi + "/wms/inspect-request-main/submit?id=" + id,
method: "put",
data: {},
});
}
/**
* 检验单申请 提交审批通过
* @param {*} params
*/
export function inspectRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/inspect-request-main/agree?id=" + id,
method: "put",
data: {},
});
}
/**
* 检验单申请 审批驳回
* @param {*} params
*/
export function inspectRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/inspect-request-main/refused?id=" + id,
method: "put",
data: {},
});
}
/**
* 检验单申请 处理
* @param {*} params
*/
export function inspectRequestHandle(id) {
return request({
url: baseApi + "/wms/inspect-request-main/handle?id=" + id,
method: "put",
data: {},
});
}
/**
* 检验单申请 重新添加
* @param {*} params
*/
export function inspectRequestAddAgain(id) {
return request({
url: baseApi + "/wms/inspect-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 采购收货 任务 * 采购收货 任务
* status 任务状态 * status 任务状态
@ -728,6 +801,19 @@ export function purchaseReturnRequestHandle(id) {
}); });
} }
/**
* 采购退货申请 重新添加
* @param {*} params
*/
export function purchaseReturnRequestAddAgain(id) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 采购退货申请 提交 * 采购退货申请 提交
@ -935,6 +1021,80 @@ export function putawayRequestSubmit(params) {
}); });
} }
/**
* 原料上架申请 关闭任务
* @param {*} params
*/
export function putawayRequestClose(id) {
return request({
url: baseApi + "/wms/putaway-request-main/close?id=" + id,
method: "put",
data: {},
});
}
/**
* 原料上架申请 提交审批
* @param {*} params
*/
export function putawayRequestApprove(id) {
return request({
url: baseApi + "/wms/putaway-request-main/submit?id=" + id,
method: "put",
data: {},
});
}
/**
* 原料上架申请 提交审批通过
* @param {*} params
*/
export function putawayRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/putaway-request-main/agree?id=" + id,
method: "put",
data: {},
});
}
/**
* 原料上架申请 审批驳回
* @param {*} params
*/
export function putawayRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/putaway-request-main/refused?id=" + id,
method: "put",
data: {},
});
}
/**
* 原料上架申请 处理
* @param {*} params
*/
export function putawayRequestHandle(id) {
return request({
url: baseApi + "/wms/putaway-request-main/handle?id=" + id,
method: "put",
data: {},
});
}
/**
* 原料上架申请 重新添加
* @param {*} params
*/
export function putawayRequestAddAgain(id) {
return request({
url: baseApi + "/wms/putaway-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 原料上架记录 提交 * 原料上架记录 提交
* @param {*} params * @param {*} params
@ -1404,6 +1564,18 @@ export function unPlannedReceiptRequestHandle(id) {
}); });
} }
/**
* 计划外入库申请 重新添加
* @param {*} params
*/
export function unPlannedReceiptRequestAddAgain(id) {
return request({
url: baseApi + "/wms/unplannedreceipt-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 计划外入库记录 提交 * 计划外入库记录 提交
@ -1485,6 +1657,7 @@ export function unPlannedIssueJobSubmit(params) {
}); });
} }
/** /**
* 计划外出库申请 提交 * 计划外出库申请 提交
* @param {*} params * @param {*} params
@ -1557,6 +1730,19 @@ export function unPlannedIssueRequestHandle(id) {
}); });
} }
/**
* 计划外出库申请 重新添加
* @param {*} params
*/
export function unPlannedIssueRequestAddAgain(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 计划外出库记录 提交 * 计划外出库记录 提交
@ -1931,6 +2117,78 @@ export function deliverRequestSubmit(params) {
}); });
} }
/**
* 制品发货申请 关闭任务
* @param {*} params
*/
export function deliverRequestClose(id) {
return request({
url: baseApi + "/wms/deliver-request-main/close?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品发货申请 提交审批
* @param {*} params
*/
export function deliverRequestApprove(id) {
return request({
url: baseApi + "/wms/deliver-request-main/submit?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品发货申请 提交审批通过
* @param {*} params
*/
export function deliverRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/deliver-request-main/agree?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品发货申请 审批驳回
* @param {*} params
*/
export function deliverRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/deliver-request-main/refused?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品发货申请 处理
* @param {*} params
*/
export function deliverRequestHandle(id) {
return request({
url: baseApi + "/wms/deliver-request-main/handle?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品发货申请 重新添加
* @param {*} params
*/
export function deliverRequestAddAgain(id) {
return request({
url: baseApi + "/wms/deliver-request-main/reAdd/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 制品发货记录 提交 * 制品发货记录 提交
* @param {*} params * @param {*} params
@ -2056,6 +2314,78 @@ export function customerReturnRequestSubmit(params) {
}); });
} }
/**
* 客户退货申请 关闭任务
* @param {*} params
*/
export function customerReturnRequestClose(id) {
return request({
url: baseApi + "/wms/customerreturn-request-main/close?id=" + id,
method: "put",
data: {},
});
}
/**
* 客户退货申请 提交审批
* @param {*} params
*/
export function customerReturnRequestApprove(id) {
return request({
url: baseApi + "/wms/customerreturn-request-main/submit?id=" + id,
method: "put",
data: {},
});
}
/**
* 客户退货申请 提交审批通过
* @param {*} params
*/
export function customerReturnRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/customerreturn-request-main/agree?id=" + id,
method: "put",
data: {},
});
}
/**
* 客户退货申请 审批驳回
* @param {*} params
*/
export function customerReturnRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/customerreturn-request-main/refused?id=" + id,
method: "put",
data: {},
});
}
/**
* 客户退货申请 处理
* @param {*} params
*/
export function customerReturnRequestHandle(id) {
return request({
url: baseApi + "/wms/customerreturn-request-main/handle?id=" + id,
method: "put",
data: {},
});
}
/**
* 客户退货申请 重新添加
* @param {*} params
*/
export function customerReturnRequestAddAgain(id) {
return request({
url: baseApi + "/wms/customerreturn-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 客户退货 记录提交 * 客户退货 记录提交
* @param {*} params * @param {*} params
@ -2285,6 +2615,18 @@ export function productPutawayRequestHandle(id) {
}); });
} }
/**
* 制品上架申请 重新添加
* @param {*} params
*/
export function productPutawayRequestAddAgain(id) {
return request({
url: baseApi + "/wms/productputaway-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 制品上架申请 提交审批 * 制品上架申请 提交审批
* @param {*} params * @param {*} params
@ -2430,6 +2772,18 @@ export function issueRequestClose(id) {
}); });
} }
/**
* 发料申请 重新添加
* @param {*} params
*/
export function issueRequestAddAgain(id) {
return request({
url: baseApi + "/wms/issue-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 发料记录 提交 * 发料记录 提交
* @param {*} params * @param {*} params
@ -2609,6 +2963,19 @@ export function productionReturnRequestClose(id) {
}); });
} }
/**
* 生产退料申请 重新添加
* @param {*} id
*
*/
export function productionReturnRequestAddAgain(id) {
return request({
url: baseApi + "/wms/productionreturn-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
@ -2876,6 +3243,17 @@ export function scrapRequestHandle(id) {
data: {}, data: {},
}); });
} }
/**
* 报废出库申请 重新添加
* @param {*} params
*/
export function scrapRequestAddAgain(id) {
return request({
url: baseApi + "/wms/scrap-request-main/reAdd?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 报废出库记录 提交 * 报废出库记录 提交

22
common/array.js

@ -40,6 +40,12 @@ export function getDetailAndApprovePassAndApproveNoOption() {
style: { style: {
backgroundColor: '#F56C6C' backgroundColor: '#F56C6C'
} }
},
{
text: '关闭',
style: {
backgroundColor: '#ff0000'
}
} }
]; ];
return option_detail; return option_detail;
@ -57,6 +63,12 @@ export function getDetailAndHandleOption() {
style: { style: {
backgroundColor: '#00CC33' backgroundColor: '#00CC33'
} }
},
{
text: '关闭',
style: {
backgroundColor: '#ff0000'
}
} }
]; ];
return option_detail; return option_detail;
@ -131,6 +143,16 @@ export function getRemoveOption() {
return option_detail_remove; return option_detail_remove;
} }
export function getAddAgainOption() {
let option_detail_remove = [{
text: '重新\n添加',
style: {
backgroundColor: '#E6A23C'
}
}];
return option_detail_remove;
}
export function getEditOption() { export function getEditOption() {

156
pages/customerReturn/request/customerReturnRequest.vue

@ -31,18 +31,26 @@
import { import {
goHome, goHome,
updateTitle updateTitle,
clearTirmAndWrap
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getCustomerReturnRequestList, getCustomerReturnRequestList,
customerReturnRequestClose,
customerReturnRequestApprove,
customerReturnRequestApproveAgree,
customerReturnRequestApproveRefused,
customerReturnRequestHandle,
customerReturnRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -67,6 +75,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
@ -75,6 +84,7 @@
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -185,7 +195,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -199,21 +211,43 @@
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.customerReturnRequestHandle(dataContent.id)
console.log("审批") })
} else if (e.content.text == "审批通过") { } else if (text == "提交审批") {
console.log("审批通过") this.showQuestionMessage("确定要审批当前申请吗?",res=>{
} else if (e.content.text == "审批驳回") { this.customerReturnRequestApprove(dataContent.id)
console.log("审批驳回") })
} else if (e.content.text == "关闭") { } else if (text=="审批通过") {
console.log("关闭") this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{
this.customerReturnRequestApproveAgree(dataContent.id)
})
} else if (text == "审批驳回") {
this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{
this.customerReturnRequestApproveRefused(dataContent.id)
})
} else if (text == "关闭") {
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.customerReturnRequestClose(dataContent.id)
})
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.customerReturnRequestAddAgain(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;
@ -263,6 +297,98 @@
} }
}); });
}, },
customerReturnRequestApprove(id) {
customerReturnRequestApprove(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请提交审批成功"
})
this.getList("refresh")
} else {
this.showMessage("申请提交审批失败")
}
}).catch(error => {
this.showMessage(error)
})
},
customerReturnRequestClose(id) {
customerReturnRequestClose(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请关闭成功"
})
this.getList("refresh")
} else {
this.showMessage("申请关闭失败")
}
}).catch(error => {
this.showMessage(error)
})
},
customerReturnRequestAddAgain(id) {
customerReturnRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
customerReturnRequestApproveAgree(id) {
customerReturnRequestApproveAgree(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请审批通过成功"
})
this.getList("refresh")
} else {
this.showMessage("申请审批通过失败")
}
}).catch(error => {
this.showMessage(error)
})
},
customerReturnRequestApproveRefused(id) {
customerReturnRequestApproveRefused(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请审批驳回成功"
})
this.getList("refresh")
} else {
this.showMessage("申请审批驳回失败")
}
}).catch(error => {
this.showMessage(error)
})
},
customerReturnRequestHandle(id) {
customerReturnRequestHandle(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请处理成功"
})
this.getList("refresh")
} else {
this.showMessage("申请处理失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }

153
pages/deliver/request/deliverRequest.vue

@ -35,13 +35,20 @@
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getDeliverRequestList, getDeliverRequestList,
deliverRequestClose,
deliverRequestApprove,
deliverRequestApproveAgree,
deliverRequestApproveRefused,
deliverRequestHandle,
deliverRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -67,6 +74,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption: [],
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
@ -75,6 +83,7 @@
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -182,7 +191,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -196,21 +207,43 @@
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.deliverRequestHandle(dataContent.id)
console.log("审批") })
} else if (e.content.text == "审批通过") { } else if (text == "提交审批") {
console.log("审批通过") this.showQuestionMessage("确定要审批当前申请吗?",res=>{
} else if (e.content.text == "审批驳回") { this.deliverRequestApprove(dataContent.id)
console.log("审批驳回") })
} else if (e.content.text == "关闭") { } else if (text=="审批通过") {
console.log("关闭") this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{
this.deliverRequestApproveAgree(dataContent.id)
})
} else if (text == "审批驳回") {
this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{
this.deliverRequestApproveRefused(dataContent.id)
})
} else if (text == "关闭") {
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.deliverRequestClose(dataContent.id)
})
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.deliverRequestAddAgain(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;
@ -260,6 +293,98 @@
} }
}); });
}, },
deliverRequestApprove(id) {
deliverRequestApprove(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请提交审批成功"
})
this.getList("refresh")
} else {
this.showMessage("申请提交审批失败")
}
}).catch(error => {
this.showMessage(error)
})
},
deliverRequestClose(id) {
deliverRequestClose(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请关闭成功"
})
this.getList("refresh")
} else {
this.showMessage("申请关闭失败")
}
}).catch(error => {
this.showMessage(error)
})
},
deliverRequestAddAgain(id) {
deliverRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
deliverRequestApproveAgree(id) {
deliverRequestApproveAgree(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请审批通过成功"
})
this.getList("refresh")
} else {
this.showMessage("申请审批通过失败")
}
}).catch(error => {
this.showMessage(error)
})
},
deliverRequestApproveRefused(id) {
deliverRequestApproveRefused(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请审批驳回成功"
})
this.getList("refresh")
} else {
this.showMessage("申请审批驳回失败")
}
}).catch(error => {
this.showMessage(error)
})
},
deliverRequestHandle(id) {
deliverRequestHandle(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请处理成功"
})
this.getList("refresh")
} else {
this.showMessage("申请处理失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }

160
pages/inspect/request/inspectRequest.vue

@ -7,7 +7,7 @@
<view v-if="requestList.length>0"> <view v-if="requestList.length>0">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in requestList" :key="index"> <view v-for="(item, index) in requestList" :key="index">
<uni-swipe-action-item :right-options="detailOptions" @click="swipeClick($event,item)"> <uni-swipe-action-item :right-options="item.options" @click="swipeClick($event,item)">
<comInspectRequestCard :dataContent="item" @click='openRequestDetail(item)'> <comInspectRequestCard :dataContent="item" @click='openRequestDetail(item)'>
</comInspectRequestCard> </comInspectRequestCard>
</uni-swipe-action-item> </uni-swipe-action-item>
@ -28,10 +28,17 @@
import requestInfoPopup from '@/pages/inspect/coms/requestInfoPopup.vue' import requestInfoPopup from '@/pages/inspect/coms/requestInfoPopup.vue'
import { import {
goHome, goHome,
updateTitle updateTitle,
clearTirmAndWrap
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getInspectRequestList, getInspectRequestList,
inspectRequestClose,
inspectRequestApprove,
inspectRequestApproveAgree,
inspectRequestApproveRefused,
inspectRequestHandle,
inspectRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -39,7 +46,8 @@
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
@ -64,14 +72,16 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
}; };
}, },
onReady() { onLoad() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -124,7 +134,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -187,21 +199,43 @@
}, },
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.inspectRequestHandle(dataContent.id)
console.log("审批") })
} else if (e.content.text == "审批通过") { } else if (text == "提交审批") {
console.log("审批通过") this.showQuestionMessage("确定要审批当前申请吗?",res=>{
} else if (e.content.text == "审批驳回") { this.inspectRequestApprove(dataContent.id)
console.log("审批驳回") })
} else if (e.content.text == "关闭") { } else if (text=="审批通过") {
console.log("关闭") this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{
this.inspectRequestApproveAgree(dataContent.id)
})
} else if (text == "审批驳回") {
this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{
this.inspectRequestApproveRefused(dataContent.id)
})
} else if (text == "关闭") {
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.inspectRequestClose(dataContent.id)
})
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.inspectRequestAddAgain(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;
@ -249,6 +283,98 @@
} }
}); });
}, },
inspectRequestApprove(id) {
inspectRequestApprove(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请提交审批成功"
})
this.getList("refresh")
} else {
this.showMessage("申请提交审批失败")
}
}).catch(error => {
this.showMessage(error)
})
},
inspectRequestClose(id) {
inspectRequestClose(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请关闭成功"
})
this.getList("refresh")
} else {
this.showMessage("申请关闭失败")
}
}).catch(error => {
this.showMessage(error)
})
},
inspectRequestAddAgain(id) {
inspectRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
inspectRequestApproveAgree(id) {
inspectRequestApproveAgree(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请审批通过成功"
})
this.getList("refresh")
} else {
this.showMessage("申请审批通过失败")
}
}).catch(error => {
this.showMessage(error)
})
},
inspectRequestApproveRefused(id) {
inspectRequestApproveRefused(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请审批驳回成功"
})
this.getList("refresh")
} else {
this.showMessage("申请审批驳回失败")
}
}).catch(error => {
this.showMessage(error)
})
},
inspectRequestHandle(id) {
inspectRequestHandle(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请处理成功"
})
this.getList("refresh")
} else {
this.showMessage("申请处理失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }

35
pages/issue/request/issueRequest.vue

@ -42,14 +42,16 @@
issueRequestSubmitApproveRefused, issueRequestSubmitApproveRefused,
issueRequestSubmitApproveAgree, issueRequestSubmitApproveAgree,
issueRequestSubmitApprove, issueRequestSubmitApprove,
issueRequestHandle issueRequestHandle,
issueRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -75,6 +77,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
@ -190,7 +193,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -226,6 +231,10 @@
this.showQuestionMessage("确定要关闭当前申请吗?", res => { this.showQuestionMessage("确定要关闭当前申请吗?", res => {
this.issueRequestClose(dataContent.id) this.issueRequestClose(dataContent.id)
}) })
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.issueRequestAddAgain(dataContent.id)
})
} }
}, },
@ -368,12 +377,22 @@
}) })
}, },
}, },
issueRequestAddAgain(id) {
requestConfirmsss(action, item) { issueRequestAddAgain(id).then(res => {
uni.navigateTo({ if (res.data) {
url: './issueRequestDetail?type=add&item=' + item.id uni.showToast({
}); title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
} }
}).catch(error => {
this.showMessage(error)
})
},
} }
</script> </script>

31
pages/productPutaway/request/putawayRequest.vue

@ -43,14 +43,16 @@
productPutawayRequestApprove, productPutawayRequestApprove,
productPutawayRequestApproveAgree, productPutawayRequestApproveAgree,
productPutawayRequestApproveRefused, productPutawayRequestApproveRefused,
productPutawayRequestHandle productPutawayRequestHandle,
productPutawayRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -75,6 +77,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
loadingType: "nomore", loadingType: "nomore",
@ -82,6 +85,7 @@
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -197,7 +201,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else{
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -234,6 +240,10 @@
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.productPutawayRequestClose(dataContent.id) this.productPutawayRequestClose(dataContent.id)
}) })
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.productPutawayRequestAddAgain(dataContent.id)
})
} }
}, },
showQuestionMessage(hint,callBack){ showQuestionMessage(hint,callBack){
@ -369,6 +379,21 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
productPutawayRequestAddAgain(id) {
productPutawayRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }

33
pages/productionReturn/coms/comReturnCommonRequest.vue

@ -36,7 +36,8 @@
productionReturnRequestSubmitApprove, productionReturnRequestSubmitApprove,
productionReturnRequestSubmitApproveAgree, productionReturnRequestSubmitApproveAgree,
productionReturnRequestSubmitApproveRefused, productionReturnRequestSubmitApproveRefused,
productionReturnRequestClose productionReturnRequestClose,
productionReturnRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
@ -49,7 +50,8 @@
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -75,6 +77,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
loadingType: "nomore", loadingType: "nomore",
title:"", title:"",
@ -103,6 +106,7 @@
mounted() { mounted() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -144,7 +148,7 @@
}, },
openRequestDetail(item) { openRequestDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: './requestDetail?id=' + item.id url: './requestDetail?id=' + item.id + '&businessType=' + this.businessType
}); });
}, },
getList(type) { getList(type) {
@ -220,7 +224,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -259,6 +265,10 @@
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.productionReturnRequestClose(dataContent.id) this.productionReturnRequestClose(dataContent.id)
}) })
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.productionReturnRequestAddAgain(dataContent.id)
})
} }
}, },
@ -396,6 +406,21 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
productionReturnRequestAddAgain(id) {
productionReturnRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }

31
pages/purchaseReturn/request/returnRequest.vue

@ -41,14 +41,16 @@
purchaseReturnRequestApprove, purchaseReturnRequestApprove,
purchaseReturnRequestApproveAgree, purchaseReturnRequestApproveAgree,
purchaseReturnRequestApproveRefused, purchaseReturnRequestApproveRefused,
purchaseReturnRequestHandle purchaseReturnRequestHandle,
purchaseReturnRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -74,6 +76,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
@ -82,6 +85,7 @@
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -190,7 +194,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -226,6 +232,10 @@
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.purchaseReturnRequestClose(dataContent.id) this.purchaseReturnRequestClose(dataContent.id)
}) })
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.purchaseReturnRequestAddAgain(dataContent.id)
})
} }
}, },
showQuestionMessage(hint,callBack){ showQuestionMessage(hint,callBack){
@ -319,6 +329,21 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
purchaseReturnRequestAddAgain(id) {
purchaseReturnRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
purchaseReturnRequestApproveAgree(id) { purchaseReturnRequestApproveAgree(id) {
purchaseReturnRequestApproveAgree(id).then(res => { purchaseReturnRequestApproveAgree(id).then(res => {
if (res.data) { if (res.data) {

158
pages/putaway/request/putawayRequest.vue

@ -32,18 +32,26 @@
import { import {
goHome, goHome,
updateTitle updateTitle,
clearTirmAndWrap
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getPutawayRequestList, getPutawayRequestList,
putawayRequestClose,
putawayRequestApprove,
putawayRequestApproveAgree,
putawayRequestApproveRefused,
putawayRequestHandle,
putawayRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -69,6 +77,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
@ -76,6 +85,7 @@
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -185,7 +195,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -203,21 +215,44 @@
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.putawayRequestHandle(dataContent.id)
console.log("审批") })
} else if (e.content.text == "审批通过") { } else if (text == "提交审批") {
console.log("审批通过") this.showQuestionMessage("确定要审批当前申请吗?",res=>{
} else if (e.content.text == "审批驳回") { this.putawayRequestApprove(dataContent.id)
console.log("审批驳回") })
} else if (e.content.text == "关闭") { } else if (text=="审批通过") {
console.log("关闭") this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{
this.putawayRequestApproveAgree(dataContent.id)
})
} else if (text == "审批驳回") {
this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{
this.putawayRequestApproveRefused(dataContent.id)
})
} else if (text == "关闭") {
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.putawayRequestClose(dataContent.id)
})
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.putawayRequestAddAgain(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;
@ -258,7 +293,6 @@
}) })
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
@ -266,6 +300,98 @@
} }
}); });
}, },
putawayRequestApprove(id) {
putawayRequestApprove(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请提交审批成功"
})
this.getList("refresh")
} else {
this.showMessage("申请提交审批失败")
}
}).catch(error => {
this.showMessage(error)
})
},
putawayRequestClose(id) {
putawayRequestClose(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请关闭成功"
})
this.getList("refresh")
} else {
this.showMessage("申请关闭失败")
}
}).catch(error => {
this.showMessage(error)
})
},
putawayRequestAddAgain(id) {
putawayRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
putawayRequestApproveAgree(id) {
putawayRequestApproveAgree(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请审批通过成功"
})
this.getList("refresh")
} else {
this.showMessage("申请审批通过失败")
}
}).catch(error => {
this.showMessage(error)
})
},
putawayRequestApproveRefused(id) {
putawayRequestApproveRefused(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请审批驳回成功"
})
this.getList("refresh")
} else {
this.showMessage("申请审批驳回失败")
}
}).catch(error => {
this.showMessage(error)
})
},
putawayRequestHandle(id) {
putawayRequestHandle(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请处理成功"
})
this.getList("refresh")
} else {
this.showMessage("申请处理失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }

4
pages/repleinsh/request/repleinshRequest.vue

@ -110,10 +110,6 @@
}, },
methods: { methods: {
requestConfirm(action, item) {
console.log("提交", action)
console.log("提交2", item)
},
openRequestDetail(item) { openRequestDetail(item) {
uni.navigateTo({ uni.navigateTo({

35
pages/scrap/request/scrapRrequest.vue

@ -31,7 +31,8 @@
import requestButton from '@/mycomponents/button/requestButton.vue' import requestButton from '@/mycomponents/button/requestButton.vue'
import { import {
goHome, goHome,
updateTitle updateTitle,
clearTirmAndWrap
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -40,14 +41,16 @@
scrapRequestClose, scrapRequestClose,
scrapRequestApproveAgree, scrapRequestApproveAgree,
scrapRequestApproveRefused, scrapRequestApproveRefused,
scrapRequestHandle scrapRequestHandle,
scrapRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -72,6 +75,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
@ -80,6 +84,7 @@
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -188,7 +193,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -200,7 +207,6 @@
}) })
}, },
swipeClick(e, dataContent) { swipeClick(e, dataContent) {
var text = clearTirmAndWrap(e.content.text) var text = clearTirmAndWrap(e.content.text)
if (text == "详情") { if (text == "详情") {
@ -225,6 +231,10 @@
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.scrapRequestClose(dataContent.id) this.scrapRequestClose(dataContent.id)
}) })
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.scrapRequestAddAgain(dataContent.id)
})
} }
}, },
showQuestionMessage(hint,callBack){ showQuestionMessage(hint,callBack){
@ -361,6 +371,21 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
scrapRequestAddAgain(id) {
scrapRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }
</script> </script>

31
pages/unPlanned/request/issueRequest.vue

@ -43,14 +43,16 @@
unPlannedIssueRequestClose, unPlannedIssueRequestClose,
unPlannedIssueRequestApproveAgree, unPlannedIssueRequestApproveAgree,
unPlannedIssueRequestApproveRefused, unPlannedIssueRequestApproveRefused,
unPlannedIssueRequestHandle unPlannedIssueRequestHandle,
unPlannedIssueRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -76,6 +78,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
@ -84,6 +87,7 @@
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -195,7 +199,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -231,6 +237,10 @@
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.unPlannedIssueRequestClose(dataContent.id) this.unPlannedIssueRequestClose(dataContent.id)
}) })
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.unPlannedIssueRequestAddAgain(dataContent.id)
})
} }
}, },
showQuestionMessage(hint,callBack){ showQuestionMessage(hint,callBack){
@ -369,6 +379,21 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
unPlannedIssueRequestAddAgain(id) {
unPlannedIssueRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }

31
pages/unPlanned/request/receiptRequest.vue

@ -42,14 +42,16 @@
unPlannedReceiptRequestClose, unPlannedReceiptRequestClose,
unPlannedReceiptRequestApproveAgree, unPlannedReceiptRequestApproveAgree,
unPlannedReceiptRequestApproveRefused, unPlannedReceiptRequestApproveRefused,
unPlannedReceiptRequestHandle unPlannedReceiptRequestHandle,
unPlannedReceiptRequestAddAgain
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
getDetailAndApproveOption, getDetailAndApproveOption,
getDetailAndApprovePassAndApproveNoOption, getDetailAndApprovePassAndApproveNoOption,
getDetailAndHandleOption, getDetailAndHandleOption,
getDetailAndCloseOption getDetailAndCloseOption,
getAddAgainOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -75,6 +77,7 @@
detailAndApprovePassAndApproveNoOption: [], detailAndApprovePassAndApproveNoOption: [],
detailAndHandleOption: [], detailAndHandleOption: [],
detailAndCloseOption: [], detailAndCloseOption: [],
addAgainOption:[],
showOptions: [], showOptions: [],
fromType: "requestType", fromType: "requestType",
loadingType: "nomore", loadingType: "nomore",
@ -83,6 +86,7 @@
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
@ -192,7 +196,9 @@
this.showOptions = this.detailAndHandleOption; this.showOptions = this.detailAndHandleOption;
} else if (status == "4") { } else if (status == "4") {
this.showOptions = this.detailAndCloseOption; this.showOptions = this.detailAndCloseOption;
} else { } else if(status == "5"){
this.showOptions = this.addAgainOption;
}else {
this.showOptions = this.detailOptions; this.showOptions = this.detailOptions;
} }
return this.showOptions return this.showOptions
@ -228,6 +234,10 @@
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.unPlannedReceiptRequestClose(dataContent.id) this.unPlannedReceiptRequestClose(dataContent.id)
}) })
}else if(text == "重新添加"){
this.showQuestionMessage("确定要重新添加当前申请吗?",res=>{
this.unPlannedReceiptRequestAddAgain(dataContent.id)
})
} }
}, },
showQuestionMessage(hint,callBack){ showQuestionMessage(hint,callBack){
@ -365,6 +375,21 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
unPlannedReceiptRequestAddAgain(id) {
unPlannedReceiptRequestAddAgain(id).then(res => {
if (res.data) {
uni.showToast({
title: "申请重新添加成功"
})
this.getList("refresh")
} else {
this.showMessage("申请重新添加失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }

Loading…
Cancel
Save