diff --git a/api/request2.js b/api/request2.js
index 0c4c3b2a..0360896d 100644
--- a/api/request2.js
+++ b/api/request2.js
@@ -1323,7 +1323,7 @@ export function unPlannedReceiptRequestApproveAgree(id) {
*/
export function unPlannedReceiptRequestApproveRefused(id) {
return request({
- url: baseApi + "/wms/unplannedreceipt-request-main/refusedd?id="+id,
+ url: baseApi + "/wms/unplannedreceipt-request-main/refused?id="+id,
method: "put",
data: {},
});
@@ -1426,7 +1426,7 @@ export function unPlannedIssueJobSubmit(params) {
* 计划外出库申请 提交
* @param {*} params
*/
-export function unPlannedIssueRequestSubmit(params) {
+export function unPlannedIssueRequestCreate(params) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/create",
method: "post",
@@ -2587,7 +2587,7 @@ export function unPlannedReceiptRequestSubmit(params) {
/**
- * 报废出库 任务
+ * 报废出库任务
* status 任务状态
* 开始日期
* 结束日期
@@ -2620,7 +2620,7 @@ export function getScrapJobDetail(id) {
*/
export function takeScrapJob(id) {
return request({
- url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id,
+ url: baseApi + "/wms/scrap-job-main/accept?id=" + id,
method: "put",
data: {},
});
@@ -2633,7 +2633,7 @@ export function takeScrapJob(id) {
*/
export function cancleTakeScrapJob(id) {
return request({
- url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
+ url: baseApi + "/wms/scrap-job-main/abandon?id=" + id,
method: "put",
data: {},
});
@@ -2646,7 +2646,7 @@ export function cancleTakeScrapJob(id) {
*/
export function scrapJobSubmit(params) {
return request({
- url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id,
+ url: baseApi + "/wms/scrap-job-main/execute",
method: "put",
data: params,
});
@@ -2682,17 +2682,77 @@ export function getScrapRequestDetail(id) {
}
/**
- * 报废出库申请 提交
+ * 报废出库申请 创建
* @param {*} params
*/
-export function scrapRequestSubmit(params) {
+export function scrapRequestCreate(params) {
return request({
- url: baseApi + "/wms/purchasereturn-request-main/submit",
+ url: baseApi + "/wms/scrap-job-main/create",
method: "put",
data: params,
});
}
+/**
+ * 报废出库申请 提交审批
+ * @param {*} params
+ */
+export function scrapRequestApprove(id) {
+ return request({
+ url: baseApi + "/wms/scrap-request-main/submit?id="+id,
+ method: "put",
+ data: {},
+ });
+}
+
+/**
+ * 报废出库申请 关闭
+ * @param {*} params
+ */
+export function scrapRequestClose(id) {
+ return request({
+ url: baseApi + "/wms/scrap-request-main/close?id="+id,
+ method: "put",
+ data: {},
+ });
+}
+
+/**
+ * 报废出库申请 审批通过
+ * @param {*} params
+ */
+export function scrapRequestApproveAgree(id) {
+ return request({
+ url: baseApi + "/wms/scrap-request-main/agree?id="+id,
+ method: "put",
+ data: {},
+ });
+}
+
+/**
+ * 报废出库申请 审批驳回
+ * @param {*} params
+ */
+export function scrapRequestApproveRefused(id) {
+ return request({
+ url: baseApi + "/wms/scrap-request-main/refused?id="+id,
+ method: "put",
+ data: {},
+ });
+}
+
+/**
+ * 报废出库申请 审批驳回
+ * @param {*} params
+ */
+export function scrapRequestHandle(id) {
+ return request({
+ url: baseApi + "/wms/scrap-request-main/handle?id="+id,
+ method: "put",
+ data: {},
+ });
+}
+
/**
* 报废出库记录 提交
* @param {*} params
diff --git a/pages.json b/pages.json
index 2b344fee..3e2f6fd0 100644
--- a/pages.json
+++ b/pages.json
@@ -1640,6 +1640,14 @@
"enablePullDownRefresh": false
}
},
+ {
+ "path": "pages/scrap/request/scrapRequestCreate",
+ "style": {
+ "navigationBarTitleText": "报废出库申请创建",
+ "enablePullDownRefresh": false
+ }
+ },
+
{
"path": "pages/pallet/record/bindPalletRecord",
"style": {
diff --git a/pages/scrap/coms/comScrapJobCard.vue b/pages/scrap/coms/comScrapJobCard.vue
index 65affce4..037ee32c 100644
--- a/pages/scrap/coms/comScrapJobCard.vue
+++ b/pages/scrap/coms/comScrapJobCard.vue
@@ -3,17 +3,7 @@
- 发货单号 : {{dataContent.asnNumber}}
-
-
-
-
- 要货计划单号 : {{dataContent.ppNumber}}
-
-
-
-
- 供应商名称 : {{dataContent.supplierName}}
+ 申请单号 : {{dataContent.requestNumber}}
diff --git a/pages/scrap/job/scrapJobDetail.vue b/pages/scrap/job/scrapJobDetail.vue
index 9a3cd6bf..6eb893ec 100644
--- a/pages/scrap/job/scrapJobDetail.vue
+++ b/pages/scrap/job/scrapJobDetail.vue
@@ -99,15 +99,14 @@
this.id = option.id;
if (this.id != undefined) {
//新建的任务自动接收
- // if (option.status == "JOB_PENDING") {
- // this.receive((callback => {
- // this.received = true;
- // this.getDetail();
- // }));
- // } else {
- // this.getDetail();
- // }
- this.getDetail();
+ if (option.status == "1") {
+ this.receive((callback => {
+ this.received = true;
+ this.getDetail();
+ }));
+ } else {
+ this.getDetail();
+ }
}
},
//返回首页
@@ -213,11 +212,11 @@
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
- ']不一致,是否继续上架?', res => {
+ ']不一致,是否继续出库?', res => {
if (res) {
itemDetail.scaned = true;
- itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
- .qty) ? Number(result.balance.qty) : Number(result.label.qty);
+ itemDetail.handleQty = Number(result.label.qty);
+ itemDetail.inventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
@@ -229,8 +228,7 @@
});
} else {
itemDetail.scaned = true;
- itemDetail.handleQty = Number(result.label.qty) > Number(result.balance.qty) ? Number(
- result.balance.qty) : Number(result.label.qty);
+ itemDetail.handleQty = Number(result.label.qty);
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
@@ -246,7 +244,6 @@
},
-
//继续扫描
continueScan() {
this.scanCount = getScanCount(this.subList);
@@ -305,17 +302,17 @@
//没有目标库位,不查询管理模式
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
- // scrapJobSubmit(params).then(res => {
- // uni.hideLoading()
- // if (res.data) {
- // this.showCommitSuccessMessage("提交成功
生成计划外出库记录" + res.data )
- // } else {
- // this.showErrorMessage("提交失败"+res.msg)
- // }
- // }).catch(error => {
- // uni.hideLoading()
- // this.showErrorMessage(error)
- // })
+ scrapJobSubmit(params).then(res => {
+ uni.hideLoading()
+ if (res.data) {
+ this.showCommitSuccessMessage("提交成功
生成报废出库记录
" + res.data )
+ } else {
+ this.showErrorMessage("提交失败["+res.msg+"]")
+ }
+ }).catch(error => {
+ uni.hideLoading()
+ this.showErrorMessage(error)
+ })
},
@@ -325,6 +322,11 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
+ detail.toPackingNumber = detail.packingNumber;
+ detail.toContainerNumber = "";
+ detail.toInventoryStatus= "";
+ detail.toLocationCode = "";
+ detail.toBatch = detail.batch;
subList.push(detail)
}
})
diff --git a/pages/scrap/request/scrapRequestCreate.vue b/pages/scrap/request/scrapRequestCreate.vue
new file mode 100644
index 00000000..982d9431
--- /dev/null
+++ b/pages/scrap/request/scrapRequestCreate.vue
@@ -0,0 +1,389 @@
+
+
+
+
+
+
+
+ 报废原因:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/scrap/request/scrapRrequest.vue b/pages/scrap/request/scrapRrequest.vue
index c5a84789..74b31979 100644
--- a/pages/scrap/request/scrapRrequest.vue
+++ b/pages/scrap/request/scrapRrequest.vue
@@ -34,11 +34,13 @@
updateTitle
} from '@/common/basic.js';
- import {
- getBusinessType,
- } from '@/common/record.js';
import {
getScrapRequestList,
+ scrapRequestApprove,
+ scrapRequestClose,
+ scrapRequestApproveAgree,
+ scrapRequestApproveRefused,
+ scrapRequestHandle
} from '@/api/request2.js';
import {
getDetailOption,
@@ -112,7 +114,6 @@
},
methods: {
- requestConfirm(action, item) {},
openRequestInfoPopup(item) {
this.$refs.requestInfoPopup.openPopup(item)
@@ -195,27 +196,45 @@
openScanDetailPopup() {
uni.navigateTo({
- url: "../record/scrapRecord?fromType=" + this.fromType
+ url: "./scrapRequestCreate"
})
},
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.scrapRequestHandle(dataContent.id)
+ })
+ } else if (text == "提交审批") {
+ this.showQuestionMessage("确定要审批当前申请吗?",res=>{
+ this.scrapRequestApprove(dataContent.id)
+ })
+ } else if (text == "审批通过") {
+ this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{
+ this.scrapRequestApproveAgree(dataContent.id)
+ })
+ } else if (text == "审批驳回") {
+ this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{
+ this.scrapRequestApproveRefused(dataContent.id)
+ })
+ } else if (text == "关闭") {
+ this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
+ this.scrapRequestClose(dataContent.id)
+ })
}
},
+ showQuestionMessage(hint,callBack){
+ this.$refs.comMessage.showQuestionMessage(hint,
+ res => {
+ if (res) {
+ callBack()
+ }
+ });
+ },
switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state;
@@ -265,7 +284,83 @@
}
});
},
-
+ scrapRequestApprove(id) {
+ scrapRequestApprove(id).then(res => {
+ if (res.data) {
+ this.getList("refresh")
+ uni.showToast({
+ title: "申请提交审批成功"
+ })
+ } else {
+ this.showMessage("申请提交审批失败")
+ }
+
+ }).catch(error => {
+ this.showMessage(error)
+ })
+
+ },
+
+ scrapRequestClose(id) {
+ scrapRequestClose(id).then(res => {
+ if (res.data) {
+ this.getList("refresh")
+ uni.showToast({
+ title: "申请关闭成功"
+ })
+ } else {
+ this.showMessage("申请关闭失败")
+ }
+
+ }).catch(error => {
+ this.showMessage(error)
+ })
+ },
+ scrapRequestApproveAgree(id) {
+ scrapRequestApproveAgree(id).then(res => {
+ if (res.data) {
+ this.getList("refresh")
+ uni.showToast({
+ title: "申请审批通过成功"
+ })
+ } else {
+ this.showMessage("申请审批通过失败")
+ }
+
+ }).catch(error => {
+ this.showMessage(error)
+ })
+ },
+ scrapRequestApproveRefused(id) {
+ scrapRequestApproveRefused(id).then(res => {
+ if (res.data) {
+ this.getList("refresh")
+ uni.showToast({
+ title: "申请审批驳回成功"
+ })
+ } else {
+ this.showMessage("申请审批驳回失败")
+ }
+
+ }).catch(error => {
+ this.showMessage(error)
+ })
+ },
+ scrapRequestHandle(id) {
+ scrapRequestHandle(id).then(res => {
+ if (res.data) {
+ this.getList("refresh")
+ uni.showToast({
+ title: "申请处理成功"
+ })
+ } else {
+ this.showMessage("申请处理失败")
+ }
+
+ }).catch(error => {
+ this.showMessage(error)
+ })
+ },
}
}
diff --git a/pages/unPlanned/request/issueRequestCreate.vue b/pages/unPlanned/request/issueRequestCreate.vue
index 8f28e1d4..4e96ea9f 100644
--- a/pages/unPlanned/request/issueRequestCreate.vue
+++ b/pages/unPlanned/request/issueRequestCreate.vue
@@ -116,6 +116,11 @@
},
mounted() {
+
+ },
+
+ onLoad(option) {
+ this.reasonList = getUnPlannedIssuseReasonList()
var typeCode = "UnplannedDeliver"
getBusinessType(typeCode, res => {
if (res.success) {
@@ -126,10 +131,7 @@
this.$refs.comMessage.showBreakMessage(res.message);
}
});
- },
-
- onLoad(option) {
- this.reasonList = getUnPlannedIssuseReasonList()
+
},
methods: {
@@ -226,6 +228,10 @@
this.showErrorMessage("请选择出库原因")
return;
}
+ if(this.detailSource.length==0){
+ this.showErrorMessage("请先扫描数据")
+ return;
+ }
uni.showLoading({
title: "提交中....",
diff --git a/pages/unPlanned/request/receiptRequestCreate.vue b/pages/unPlanned/request/receiptRequestCreate.vue
index 14147d85..88f5a974 100644
--- a/pages/unPlanned/request/receiptRequestCreate.vue
+++ b/pages/unPlanned/request/receiptRequestCreate.vue
@@ -189,12 +189,12 @@
console.log("",getBatch())
subList.push(detail)
})
-
- this.detailSource.status = 1;
- this.detailSource.requestTime = getCurrDateTimes();
- this.detailSource.dueTime = getCurrDateOneMonthsTimes();
+ this.dataContent.subList = subList
+ this.dataContent.status = 1;
+ this.dataContent.requestTime = getCurrDateTimes();
+ this.dataContent.dueTime = getCurrDateOneMonthsTimes();
- return this.detailSource;
+ return this.dataContent;
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
diff --git a/static/config.json b/static/config.json
index 471c6bba..4a668deb 100644
--- a/static/config.json
+++ b/static/config.json
@@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
- "value": "http://192.168.0.178:12080/admin-api",
+ "value": "http://192.168.0.106:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.178:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",