diff --git a/api/request2.js b/api/request2.js
index c6637605..ec1504c5 100644
--- a/api/request2.js
+++ b/api/request2.js
@@ -2209,6 +2209,65 @@ export function productPutawayRequestSubmit(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: {},
+ });
+}
/**
* 发料申请列表
diff --git a/pages.json b/pages.json
index 86f38c31..b90aa8e0 100644
--- a/pages.json
+++ b/pages.json
@@ -1202,6 +1202,14 @@
}
},
+ {
+ "path": "pages/productPutaway/request/putawayRequestCreate",
+ "style": {
+ "navigationBarTitleText": "制品上架申请创建",
+ "enablePullDownRefresh": false
+
+ }
+ },
{
"path": "pages/productDismantle/job/productDismantleJob",
diff --git a/pages/productPutaway/record/productPutawayRecord.vue b/pages/productPutaway/record/productPutawayRecord.vue
index 5cf9cdfe..d26fbd19 100644
--- a/pages/productPutaway/record/productPutawayRecord.vue
+++ b/pages/productPutaway/record/productPutawayRecord.vue
@@ -49,7 +49,6 @@
} from '@/api/request2.js';
import {
goHome,
- updateTitle,
getPackingNumberAndBatch
} from '@/common/basic.js';
import {
@@ -119,8 +118,6 @@
};
},
onLoad(option) {
- this.fromType = option.fromType;
- this.updateTitle();
var typeCode = "ProductPutaway"
getBusinessType(typeCode, res => {
if (res.success) {
@@ -148,16 +145,6 @@
mounted() {
},
methods: {
- updateTitle(){
- if(this.fromType=="requestType"){
- this.showToLoaction=false
- updateTitle("制品上架申请")
- }else {
- updateTitle("制品上架记录")
- this.showToLoaction=true
- }
- },
-
getScanResult(result) {
let balance = result.balance;
let label = result.label;
@@ -266,22 +253,6 @@
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("提交成功
生成采购收货记录" + res.data, )
- // } else {
- // this.showErrorMessage("提交失败[" + res.msg + "]")
- // }
- // }).catch(error => {
- // uni.hideLoading()
- // this.showErrorMessage(error)
- // })
- }else {
//记录有目标库位,需要查询管理模式
var itemCodes = []
this.detailSource.forEach(item => {
@@ -310,36 +281,9 @@
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) {
var subList = []
var creator = this.$store.state.user.id
diff --git a/pages/productPutaway/request/putawayRequest.vue b/pages/productPutaway/request/putawayRequest.vue
index 492d5839..964a3725 100644
--- a/pages/productPutaway/request/putawayRequest.vue
+++ b/pages/productPutaway/request/putawayRequest.vue
@@ -33,13 +33,19 @@
import {
goHome,
- updateTitle
+ updateTitle,
+ clearTirmAndWrap
} from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
getProductPutawayRequestList,
+ productPutawayRequestClose,
+ productPutawayRequestApprove,
+ productPutawayRequestApproveAgree,
+ productPutawayRequestApproveRefused,
+ productPutawayRequestHandle
} from '@/api/request2.js';
import {
getDetailOption,
@@ -72,7 +78,6 @@
detailAndHandleOption: [],
detailAndCloseOption: [],
showOptions: [],
- fromType: "requestType",
loadingType: "nomore",
};
@@ -81,7 +86,7 @@
this.detailOptions = getDetailOption();
this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
- this.detailAndHandleOption = getDetailAndHandleOption()
+ this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndCloseOption = getDetailAndCloseOption()
},
@@ -202,27 +207,45 @@
openScanDetailPopup() {
uni.navigateTo({
- url: "../record/productPutawayRecord?fromType=" + this.fromType
+ url: "./putawayRequestCreate"
})
},
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.productPutawayRequestHandle(dataContent.id)
+ })
+ } else if (text == "提交审批") {
+ this.showQuestionMessage("确定要审批当前申请吗?",res=>{
+ this.productPutawayRequestApprove(dataContent.id)
+ })
+ } else if (text=="审批通过") {
+ 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) {
this.checkedWaitTask = state;
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)
+ })
+ },
}
}
diff --git a/pages/productPutaway/request/putawayRequestCreate.vue b/pages/productPutaway/request/putawayRequestCreate.vue
new file mode 100644
index 00000000..02409e35
--- /dev/null
+++ b/pages/productPutaway/request/putawayRequestCreate.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file