Browse Source

制品上架申请

wms3.0_pda
lijuncheng 12 months ago
parent
commit
3ca00436e0
  1. 59
      api/request2.js
  2. 8
      pages.json
  3. 56
      pages/productPutaway/record/productPutawayRecord.vue
  4. 130
      pages/productPutaway/request/putawayRequest.vue
  5. 8
      pages/productPutaway/request/putawayRequestCreate.vue

59
api/request2.js

@ -2209,6 +2209,65 @@ export function productPutawayRequestSubmit(params) {
data: params, data: params,
}); });
} }
/**
* 制品上架申请 处理
* @param {*} params
*/
export function productPutawayRequestHandle(id) {
return request({
url: baseApi + "/wms/productputaway-request-main/handle?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品上架申请 提交审批
* @param {*} params
*/
export function productPutawayRequestApprove(id) {
return request({
url: baseApi + "/wms/productputaway-request-main/submit?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品上架申请 提交审批通过
* @param {*} params
*/
export function productPutawayRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/productputaway-request-main/agree?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品上架申请 审批驳回
* @param {*} params
*/
export function productPutawayRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/productputaway-request-main/refused?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品上架申请 关闭任务
* @param {*} params
*/
export function productPutawayRequestClose(id) {
return request({
url: baseApi + "/wms/productputaway-request-main/close?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 发料申请列表 * 发料申请列表

8
pages.json

@ -1202,6 +1202,14 @@
} }
}, },
{
"path": "pages/productPutaway/request/putawayRequestCreate",
"style": {
"navigationBarTitleText": "制品上架申请创建",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/productDismantle/job/productDismantleJob", "path": "pages/productDismantle/job/productDismantleJob",

56
pages/productPutaway/record/productPutawayRecord.vue

@ -49,7 +49,6 @@
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
updateTitle,
getPackingNumberAndBatch getPackingNumberAndBatch
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -119,8 +118,6 @@
}; };
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType;
this.updateTitle();
var typeCode = "ProductPutaway" var typeCode = "ProductPutaway"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -148,16 +145,6 @@
mounted() { mounted() {
}, },
methods: { methods: {
updateTitle(){
if(this.fromType=="requestType"){
this.showToLoaction=false
updateTitle("制品上架申请")
}else {
updateTitle("制品上架记录")
this.showToLoaction=true
}
},
getScanResult(result) { getScanResult(result) {
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
@ -266,22 +253,6 @@
mask: true mask: true
}); });
if(this.fromType=="requestType"){
var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params))
// productPutawayRequestSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
}else {
// //
var itemCodes = [] var itemCodes = []
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
@ -310,36 +281,9 @@
this.showErrorMessage(res.message); this.showErrorMessage(res.message);
} }
}); });
}
}, },
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},
setRecordParams(queryModel) { setRecordParams(queryModel) {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id

130
pages/productPutaway/request/putawayRequest.vue

@ -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",
}; };
@ -202,26 +207,44 @@
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;
@ -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)
})
},
} }
} }

8
pages/productPutaway/request/putawayRequestCreate.vue

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>
Loading…
Cancel
Save