From 3c5dd670b27e18c7a54b7a1a3a8cedb398b80b52 Mon Sep 17 00:00:00 2001
From: niexiting <85552560@qq.com>
Date: Wed, 21 Feb 2024 13:57:46 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1=E6=89=A7?=
=?UTF-8?q?=E8=A1=8C=E6=97=B6=E5=88=9B=E5=BB=BA=E4=B8=8A=E6=9E=B6=E7=94=B3?=
=?UTF-8?q?=E8=AF=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/request2.js | 30 +++++++++++-------
src/pages/inspect/job/inspectDetail.vue | 18 +++++++----
src/pages/inspect/job/inspectFullDetail.vue | 34 ++++++++++++---------
src/pages/inspect/job/inspectResult.vue | 18 +++++++----
src/static/config.js | 2 +-
5 files changed, 63 insertions(+), 39 deletions(-)
diff --git a/src/api/request2.js b/src/api/request2.js
index 79649247..d6445a01 100644
--- a/src/api/request2.js
+++ b/src/api/request2.js
@@ -102,19 +102,19 @@ export function updateUserPwd(oldPassword, newPassword) {
* @param {*}
*
*/
-export function getWarehouseCodeList(pageNo,pageSize) {
+export function getWarehouseCodeList(pageNo, pageSize) {
return request({
- url: baseApi + "/wms/warehouse/page?pageNo="+pageNo+"&pageSize="+pageSize,
+ url: baseApi + "/wms/warehouse/page?pageNo=" + pageNo + "&pageSize=" + pageSize,
method: "get",
data: {},
});
}
//获取产品标签信息inventorylabel
-export function getInventoryLabel (code){
-
+export function getInventoryLabel(code) {
+
return request({
- url: baseApi + "/api/pda/label/inventorylabel/by-code?code="+code,
+ url: baseApi + "/api/pda/label/inventorylabel/by-code?code=" + code,
method: "get",
data: {},
});
@@ -125,9 +125,9 @@ export function getInventoryLabel (code){
* @param {*}
*
*/
-export function getMessageList(pageNo,pageSize) {
+export function getMessageList(pageNo, pageSize) {
return request({
- url: baseApi + "/system/notify-message/my-page?pageNo="+pageNo+"&pageSize="+pageSize,
+ url: baseApi + "/system/notify-message/my-page?pageNo=" + pageNo + "&pageSize=" + pageSize,
method: "get",
data: {},
});
@@ -140,7 +140,7 @@ export function getMessageList(pageNo,pageSize) {
*/
export function setMessageUpdateRead(ids) {
return request({
- url: baseApi + "/system/notify-message/update-read?ids="+ids,
+ url: baseApi + "/system/notify-message/update-read?ids=" + ids,
method: "put",
data: {},
});
@@ -990,7 +990,16 @@ export function inspectJobSubmit(params) {
});
}
+//根据检验记录单号创建上架申请
+export function createPutAwayRequest(number) {
+ return request({
+ url: baseApi + "/wms/inspect-record-main/createPutAwayRequest?number=" + number,
+ method: "post",
+ data: {},
+ });
+}
+
/**
* 采购上架 任务
* status 任务状态
@@ -1984,7 +1993,7 @@ export function productPutawayJobSubmit(params) {
});
}
-
+
@@ -3625,5 +3634,4 @@ export function getMainMessage() {
method: "get",
data: {},
});
-}
-
+}
\ No newline at end of file
diff --git a/src/pages/inspect/job/inspectDetail.vue b/src/pages/inspect/job/inspectDetail.vue
index eafd2045..7be5a0f8 100644
--- a/src/pages/inspect/job/inspectDetail.vue
+++ b/src/pages/inspect/job/inspectDetail.vue
@@ -41,7 +41,8 @@
getInspectJobDetail,
inspectJobSubmit,
getFileList,
- deleteFileByTable
+ deleteFileByTable,
+ createPutAwayRequest
} from '@/api/request2.js';
import {
goHome,
@@ -147,8 +148,7 @@
methods: {
deleteFileByTable(id) {
debugger
- deleteFileByTable("jobInspectDetail", id).then(res=>{
- })
+ deleteFileByTable("jobInspectDetail", id).then(res => {})
},
clearPicList(subList) {
@@ -374,6 +374,12 @@
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功
生成到货检验记录
" + res.data)
+ createPutAwayRequest(res.data).then(putawayres => {
+ this.showCommitSuccessMessage("生成上架申请单号
" + putawayres.data)
+ }).catch(error => {
+ uni.hideLoading();
+ this.showErrorMessage(error);
+ })
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@@ -454,8 +460,8 @@
detail.toInventoryStatus = "NOK"
}
}
- }
-
+ }
+
// else {
// detail.sampleQty = detail.qty;
// detail.failedQty = 0;
@@ -524,4 +530,4 @@
background: #e0e0e0;
}
-
+
\ No newline at end of file
diff --git a/src/pages/inspect/job/inspectFullDetail.vue b/src/pages/inspect/job/inspectFullDetail.vue
index 4d17ce0f..2373ccfa 100644
--- a/src/pages/inspect/job/inspectFullDetail.vue
+++ b/src/pages/inspect/job/inspectFullDetail.vue
@@ -42,7 +42,8 @@
inspectJobSubmit,
deleteFileById,
getFileList,
- deleteFileByTable
+ deleteFileByTable,
+ createPutAwayRequest
} from '@/api/request2.js';
import {
goHome,
@@ -98,7 +99,7 @@
fromInventoryStatuses: "",
managementList: [],
selectedItem: {},
- jobStatus:""
+ jobStatus: ""
};
},
onLoad(option) {
@@ -125,7 +126,7 @@
onBackPress(e) {
//已经接收但是没提交任务
if (e.from == 'backbutton') {
- if (this.jobStatus=="2") {
+ if (this.jobStatus == "2") {
//取消承接任务
cancleTakeInspectJob(this.id).then(res => {
uni.navigateBack();
@@ -151,10 +152,9 @@
},
methods: {
deleteFileByTable(id) {
- deleteFileByTable("jobInspectDetail", id).then(res=>{
- })
+ deleteFileByTable("jobInspectDetail", id).then(res => {})
},
-
+
clearPicList(subList) {
subList.forEach(item => {
this.deleteFileByTable(item.id)
@@ -247,8 +247,8 @@
for (let item of this.detailSource) {
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
- failedQty= calc.add(failedQty,detail.failedQty)
- crackQty= calc.add(crackQty,detail.crackQty)
+ failedQty = calc.add(failedQty, detail.failedQty)
+ crackQty = calc.add(crackQty, detail.crackQty)
}
}
}
@@ -379,10 +379,6 @@
}
}
}
-
-
-
-
},
submitJob() {
@@ -397,6 +393,13 @@
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功
生成到货检验记录" + res.data)
+ //创建完检验记录后创建上架申请
+ createPutAwayRequest(res.data).then(putawayres => {
+ this.showCommitSuccessMessage("生成上架申请单号
" + putawayres.data)
+ }).catch(error => {
+ uni.hideLoading();
+ this.showErrorMessage(error);
+ })
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@@ -462,8 +465,8 @@
detail.failedQty = detail.failedQty;
detail.crackQty = detail.crackQty;
detail.notPassedQty = detail.failedQty;
- var tempQty = calc.sub(detail.handleQt,detail.failedQty)
- detail.goodQty = calc.sub(tempQty,detail.crackQty) ;
+ var tempQty = calc.sub(detail.handleQty, detail.failedQty)
+ detail.goodQty = calc.sub(tempQty, detail.crackQty);
detail.inspectUser = this.$store.state.user.id
//合格数==样品数,全部合格
@@ -518,6 +521,7 @@
height: 100%;
background-color: #fff;
}
+
.page-wraper {
display: flex;
flex-direction: column;
@@ -546,4 +550,4 @@
background: #e0e0e0;
}
-
+
\ No newline at end of file
diff --git a/src/pages/inspect/job/inspectResult.vue b/src/pages/inspect/job/inspectResult.vue
index 11c31c83..ff2988bb 100644
--- a/src/pages/inspect/job/inspectResult.vue
+++ b/src/pages/inspect/job/inspectResult.vue
@@ -143,7 +143,8 @@
getInspectJobDetail,
takeInspectJob,
cancleTakeInspectJob,
- inspectJobSubmit
+ inspectJobSubmit,
+ createPutAwayRequest
} from '@/api/request2.js';
import {
@@ -159,8 +160,7 @@
} from '@/common/basic.js';
export default {
- components: {
- },
+ components: {},
data() {
return {
id: '',
@@ -178,7 +178,7 @@
detailSource: [], //绑定在页面上的数据源
nextActionList: [],
nextAction: null,
- jobStatus:""
+ jobStatus: ""
}
},
@@ -207,7 +207,7 @@
onBackPress(e) {
//已经接收但是没提交任务
if (e.from == 'backbutton') {
- if (this.jobStatus=="2") {
+ if (this.jobStatus == "2") {
//取消承接任务
cancleTakeInspectJob(this.id).then(res => {
uni.navigateBack();
@@ -546,6 +546,12 @@
hint = "提交成功
生成到货检验任务
" + res.data
} else {
hint = "提交成功
生成到货检验记录
" + res.data
+ createPutAwayRequest(res.data).then(putawayres => {
+ this.showCommitSuccessMessage("生成上架申请单号
" + putawayres.data)
+ }).catch(error => {
+ uni.hideLoading();
+ this.showErrorMessage(error);
+ })
}
this.showCommitSuccessMessage(hint)
} else {
@@ -573,4 +579,4 @@
+
\ No newline at end of file
diff --git a/src/static/config.js b/src/static/config.js
index 09558eba..d2bc8acf 100644
--- a/src/static/config.js
+++ b/src/static/config.js
@@ -1,6 +1,6 @@
let request_url = "http://dev.ccwin-in.com:25100/api/admin-api"
-let isDevelopment = false
+let isDevelopment = true
export default {
request_url,