Browse Source

检验任务执行时创建上架申请

hella_vue3
niexiting 9 months ago
parent
commit
3c5dd670b2
  1. 30
      src/api/request2.js
  2. 18
      src/pages/inspect/job/inspectDetail.vue
  3. 34
      src/pages/inspect/job/inspectFullDetail.vue
  4. 18
      src/pages/inspect/job/inspectResult.vue
  5. 2
      src/static/config.js

30
src/api/request2.js

@ -102,19 +102,19 @@ export function updateUserPwd(oldPassword, newPassword) {
* @param {*} * @param {*}
* *
*/ */
export function getWarehouseCodeList(pageNo,pageSize) { export function getWarehouseCodeList(pageNo, pageSize) {
return request({ return request({
url: baseApi + "/wms/warehouse/page?pageNo="+pageNo+"&pageSize="+pageSize, url: baseApi + "/wms/warehouse/page?pageNo=" + pageNo + "&pageSize=" + pageSize,
method: "get", method: "get",
data: {}, data: {},
}); });
} }
//获取产品标签信息inventorylabel //获取产品标签信息inventorylabel
export function getInventoryLabel (code){ export function getInventoryLabel(code) {
return request({ return request({
url: baseApi + "/api/pda/label/inventorylabel/by-code?code="+code, url: baseApi + "/api/pda/label/inventorylabel/by-code?code=" + code,
method: "get", method: "get",
data: {}, data: {},
}); });
@ -125,9 +125,9 @@ export function getInventoryLabel (code){
* @param {*} * @param {*}
* *
*/ */
export function getMessageList(pageNo,pageSize) { export function getMessageList(pageNo, pageSize) {
return request({ 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", method: "get",
data: {}, data: {},
}); });
@ -140,7 +140,7 @@ export function getMessageList(pageNo,pageSize) {
*/ */
export function setMessageUpdateRead(ids) { export function setMessageUpdateRead(ids) {
return request({ return request({
url: baseApi + "/system/notify-message/update-read?ids="+ids, url: baseApi + "/system/notify-message/update-read?ids=" + ids,
method: "put", method: "put",
data: {}, 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 任务状态 * status 任务状态
@ -1984,7 +1993,7 @@ export function productPutawayJobSubmit(params) {
}); });
} }
@ -3625,5 +3634,4 @@ export function getMainMessage() {
method: "get", method: "get",
data: {}, data: {},
}); });
} }

18
src/pages/inspect/job/inspectDetail.vue

@ -41,7 +41,8 @@
getInspectJobDetail, getInspectJobDetail,
inspectJobSubmit, inspectJobSubmit,
getFileList, getFileList,
deleteFileByTable deleteFileByTable,
createPutAwayRequest
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
@ -147,8 +148,7 @@
methods: { methods: {
deleteFileByTable(id) { deleteFileByTable(id) {
debugger debugger
deleteFileByTable("jobInspectDetail", id).then(res=>{ deleteFileByTable("jobInspectDetail", id).then(res => {})
})
}, },
clearPicList(subList) { clearPicList(subList) {
@ -374,6 +374,12 @@
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录<br>" + res.data) this.showCommitSuccessMessage("提交成功<br>生成到货检验记录<br>" + res.data)
createPutAwayRequest(res.data).then(putawayres => {
this.showCommitSuccessMessage("生成上架申请单号<br>" + putawayres.data)
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error);
})
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
@ -454,8 +460,8 @@
detail.toInventoryStatus = "NOK" detail.toInventoryStatus = "NOK"
} }
} }
} }
// else { // else {
// detail.sampleQty = detail.qty; // detail.sampleQty = detail.qty;
// detail.failedQty = 0; // detail.failedQty = 0;
@ -524,4 +530,4 @@
background: #e0e0e0; background: #e0e0e0;
} }
</style> </style>

34
src/pages/inspect/job/inspectFullDetail.vue

@ -42,7 +42,8 @@
inspectJobSubmit, inspectJobSubmit,
deleteFileById, deleteFileById,
getFileList, getFileList,
deleteFileByTable deleteFileByTable,
createPutAwayRequest
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
@ -98,7 +99,7 @@
fromInventoryStatuses: "", fromInventoryStatuses: "",
managementList: [], managementList: [],
selectedItem: {}, selectedItem: {},
jobStatus:"" jobStatus: ""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -125,7 +126,7 @@
onBackPress(e) { onBackPress(e) {
// //
if (e.from == 'backbutton') { if (e.from == 'backbutton') {
if (this.jobStatus=="2") { if (this.jobStatus == "2") {
// //
cancleTakeInspectJob(this.id).then(res => { cancleTakeInspectJob(this.id).then(res => {
uni.navigateBack(); uni.navigateBack();
@ -151,10 +152,9 @@
}, },
methods: { methods: {
deleteFileByTable(id) { deleteFileByTable(id) {
deleteFileByTable("jobInspectDetail", id).then(res=>{ deleteFileByTable("jobInspectDetail", id).then(res => {})
})
}, },
clearPicList(subList) { clearPicList(subList) {
subList.forEach(item => { subList.forEach(item => {
this.deleteFileByTable(item.id) this.deleteFileByTable(item.id)
@ -247,8 +247,8 @@
for (let item of this.detailSource) { for (let item of this.detailSource) {
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail != undefined && detail.scaned) {
failedQty= calc.add(failedQty,detail.failedQty) failedQty = calc.add(failedQty, detail.failedQty)
crackQty= calc.add(crackQty,detail.crackQty) crackQty = calc.add(crackQty, detail.crackQty)
} }
} }
} }
@ -379,10 +379,6 @@
} }
} }
} }
}, },
submitJob() { submitJob() {
@ -397,6 +393,13 @@
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data) this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data)
//
createPutAwayRequest(res.data).then(putawayres => {
this.showCommitSuccessMessage("生成上架申请单号<br>" + putawayres.data)
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error);
})
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
@ -462,8 +465,8 @@
detail.failedQty = detail.failedQty; detail.failedQty = detail.failedQty;
detail.crackQty = detail.crackQty; detail.crackQty = detail.crackQty;
detail.notPassedQty = detail.failedQty; detail.notPassedQty = detail.failedQty;
var tempQty = calc.sub(detail.handleQt,detail.failedQty) var tempQty = calc.sub(detail.handleQty, detail.failedQty)
detail.goodQty = calc.sub(tempQty,detail.crackQty) ; detail.goodQty = calc.sub(tempQty, detail.crackQty);
detail.inspectUser = this.$store.state.user.id detail.inspectUser = this.$store.state.user.id
//== //==
@ -518,6 +521,7 @@
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
} }
.page-wraper { .page-wraper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -546,4 +550,4 @@
background: #e0e0e0; background: #e0e0e0;
} }
</style> </style>

18
src/pages/inspect/job/inspectResult.vue

@ -143,7 +143,8 @@
getInspectJobDetail, getInspectJobDetail,
takeInspectJob, takeInspectJob,
cancleTakeInspectJob, cancleTakeInspectJob,
inspectJobSubmit inspectJobSubmit,
createPutAwayRequest
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -159,8 +160,7 @@
} from '@/common/basic.js'; } from '@/common/basic.js';
export default { export default {
components: { components: {},
},
data() { data() {
return { return {
id: '', id: '',
@ -178,7 +178,7 @@
detailSource: [], // detailSource: [], //
nextActionList: [], nextActionList: [],
nextAction: null, nextAction: null,
jobStatus:"" jobStatus: ""
} }
}, },
@ -207,7 +207,7 @@
onBackPress(e) { onBackPress(e) {
// //
if (e.from == 'backbutton') { if (e.from == 'backbutton') {
if (this.jobStatus=="2") { if (this.jobStatus == "2") {
// //
cancleTakeInspectJob(this.id).then(res => { cancleTakeInspectJob(this.id).then(res => {
uni.navigateBack(); uni.navigateBack();
@ -546,6 +546,12 @@
hint = "提交成功<br>生成到货检验任务<br>" + res.data hint = "提交成功<br>生成到货检验任务<br>" + res.data
} else { } else {
hint = "提交成功<br>生成到货检验记录<br>" + res.data hint = "提交成功<br>生成到货检验记录<br>" + res.data
createPutAwayRequest(res.data).then(putawayres => {
this.showCommitSuccessMessage("生成上架申请单号<br>" + putawayres.data)
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error);
})
} }
this.showCommitSuccessMessage(hint) this.showCommitSuccessMessage(hint)
} else { } else {
@ -573,4 +579,4 @@
</script> </script>
<style> <style>
</style> </style>

2
src/static/config.js

@ -1,6 +1,6 @@
let request_url = "http://dev.ccwin-in.com:25100/api/admin-api" let request_url = "http://dev.ccwin-in.com:25100/api/admin-api"
let isDevelopment = false let isDevelopment = true
export default { export default {
request_url, request_url,

Loading…
Cancel
Save