Browse Source

修改扫描错误标签弹出提示

wms3.0_pda
lijuncheng 12 months ago
parent
commit
b2080ff998
  1. 67
      api/request2.js
  2. 14
      common/label.js
  3. 1
      mycomponents/scan/winComScan.vue
  4. 27
      pages/purchaseReturn/request/returnRequest.vue
  5. 7
      pages/putaway/job/putawayDetail.vue
  6. 130
      pages/unPlanned/request/issueRequest.vue
  7. 5
      pages/unPlanned/request/issueRequestCreate.vue
  8. 2
      static/config.json

67
api/request2.js

@ -634,7 +634,7 @@ export function purchaseReturnRequestClose(id) {
* 采购退货申请 提交审批 * 采购退货申请 提交审批
* @param {*} params * @param {*} params
*/ */
export function purchaseReturnRequestSubmitApprove(id) { export function purchaseReturnRequestApprove(id) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/submit?id="+id, url: baseApi + "/wms/purchasereturn-request-main/submit?id="+id,
method: "put", method: "put",
@ -646,7 +646,7 @@ export function purchaseReturnRequestSubmitApprove(id) {
* 采购退货申请 提交审批通过 * 采购退货申请 提交审批通过
* @param {*} params * @param {*} params
*/ */
export function purchaseReturnRequestSubmitApproveAgree(id) { export function purchaseReturnRequestApproveAgree(id) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/agree?id="+id, url: baseApi + "/wms/purchasereturn-request-main/agree?id="+id,
method: "put", method: "put",
@ -658,7 +658,7 @@ export function purchaseReturnRequestSubmitApproveAgree(id) {
* 采购退货申请 审批驳回 * 采购退货申请 审批驳回
* @param {*} params * @param {*} params
*/ */
export function purchaseReturnRequestSubmitApproveRefused(id) { export function purchaseReturnRequestApproveRefused(id) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/refused?id="+id, url: baseApi + "/wms/purchasereturn-request-main/refused?id="+id,
method: "put", method: "put",
@ -1373,6 +1373,67 @@ export function unPlannedIssueRequestSubmit(params) {
}); });
} }
/**
* 计划外出库申请 提交审批
* @param {*} params
*/
export function unPlannedIssueRequestApprove(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/submit?id="+id,
method: "put",
data: {},
});
}
/**
* 计划外出库申请 关闭
* @param {*} params
*/
export function unPlannedIssueRequestClose(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/close?id="+id,
method: "put",
data: {},
});
}
/**
* 计划外出库申请 审批通过
* @param {*} params
*/
export function unPlannedIssueRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/agree?id="+id,
method: "put",
data: {},
});
}
/**
* 计划外出库申请 审批驳回
* @param {*} params
*/
export function unPlannedIssueRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/refused?id="+id,
method: "put",
data: {},
});
}
/**
* 计划外出库申请 处理
* @param {*} params
*/
export function unPlannedIssueRequestHandle(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/handle?id="+id,
method: "put",
data: {},
});
}
/** /**
* 计划外出库记录 提交 * 计划外出库记录 提交
* @param {*} params * @param {*} params

14
common/label.js

@ -14,7 +14,7 @@ export function getLabelInfo(scanMsg, callBack) {
let items = scanMsg.split(';'); let items = scanMsg.split(';');
let header = items[0]; let header = items[0];
let version = items[1]; let version = items[1];
if (header != '' && version != '') { if ((header != undefined) && (version!=undefined)) {
//解析扫描的是一维码还是二维码 //解析扫描的是一维码还是二维码
let type = header.substring(header.length - 1, header.length); let type = header.substring(header.length - 1, header.length);
if (type == 'Q') //qrcode if (type == 'Q') //qrcode
@ -26,6 +26,18 @@ export function getLabelInfo(scanMsg, callBack) {
} else { //直接输入文本 } else { //直接输入文本
getBarCodeInfo('text', 'V1.0', scanMsg, callBack); getBarCodeInfo('text', 'V1.0', scanMsg, callBack);
} }
}else {
let labelResult = {
label: {
labelType: "",
barType: '',
code:""
},
package: null,
sucess: false,
message: '标签格式不正确',
}
callBack(labelResult);
} }
} }

1
mycomponents/scan/winComScan.vue

@ -157,6 +157,7 @@
// that.getfocus();// // that.getfocus();//
that.$emit("getResult", scanResult); that.$emit("getResult", scanResult);
} else { } else {
that.clear();
this.$refs.comMessage.showErrorMessage(scanResult.message, res => { this.$refs.comMessage.showErrorMessage(scanResult.message, res => {
if (res) { if (res) {
that.getfocus(); that.getfocus();

27
pages/purchaseReturn/request/returnRequest.vue

@ -41,9 +41,9 @@
import { import {
getPurchaseReturnRequestList, getPurchaseReturnRequestList,
purchaseReturnRequestClose, purchaseReturnRequestClose,
purchaseReturnRequestSubmitApprove, purchaseReturnRequestApprove,
purchaseReturnRequestSubmitApproveAgree, purchaseReturnRequestApproveAgree,
purchaseReturnRequestSubmitApproveRefused, purchaseReturnRequestApproveRefused,
purchaseReturnRequestHandle purchaseReturnRequestHandle
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -215,15 +215,15 @@
}) })
} else if (text == "提交审批") { } else if (text == "提交审批") {
this.showQuestionMessage("确定要审批当前申请吗?",res=>{ this.showQuestionMessage("确定要审批当前申请吗?",res=>{
this.purchaseReturnRequestSubmitApprove(dataContent.id) this.purchaseReturnRequestApprove(dataContent.id)
}) })
} else if (text=="审批通过") { } else if (text=="审批通过") {
this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{ this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{
this.purchaseReturnRequestSubmitApproveAgree(dataContent.id) this.purchaseReturnRequestApproveAgree(dataContent.id)
}) })
} else if (text == "审批驳回") { } else if (text == "审批驳回") {
this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{ this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{
this.purchaseReturnRequestSubmitApproveRefused(dataContent.id) this.purchaseReturnRequestApproveRefused(dataContent.id)
}) })
} else if (text == "关闭") { } else if (text == "关闭") {
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{ this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
@ -290,9 +290,8 @@
}, },
purchaseReturnRequestApprove(id) {
purchaseReturnRequestSubmitApprove(id) { purchaseReturnRequestApprove(id).then(res => {
purchaseReturnRequestSubmitApprove(id).then(res => {
if (res.data) { if (res.data) {
this.getList("refresh") this.getList("refresh")
uni.showToast({ uni.showToast({
@ -323,8 +322,8 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
purchaseReturnRequestSubmitApproveAgree(id) { purchaseReturnRequestApproveAgree(id) {
purchaseReturnRequestSubmitApproveAgree(id).then(res => { purchaseReturnRequestApproveAgree(id).then(res => {
if (res.data) { if (res.data) {
this.getList("refresh") this.getList("refresh")
uni.showToast({ uni.showToast({
@ -338,8 +337,8 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
purchaseReturnRequestSubmitApproveRefused(id) { purchaseReturnRequestApproveRefused(id) {
purchaseReturnRequestSubmitApproveRefused(id).then(res => { purchaseReturnRequestApproveRefused(id).then(res => {
if (res.data) { if (res.data) {
this.getList("refresh") this.getList("refresh")
uni.showToast({ uni.showToast({
@ -354,7 +353,7 @@
}) })
}, },
purchaseReturnRequestHandle(id) { purchaseReturnRequestHandle(id) {
purchaseReturnRequestSubmitApproveRefused(id).then(res => { purchaseReturnRequestHandle(id).then(res => {
if (res.data) { if (res.data) {
this.getList("refresh") this.getList("refresh")
uni.showToast({ uni.showToast({

7
pages/putaway/job/putawayDetail.vue

@ -301,6 +301,7 @@
if (res) { if (res) {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty) ; itemDetail.handleQty = Number(result.balance.qty) ;
itemDetail.toInventoryStatus =result.balance.inventoryStatus
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty itemDetail.balance.stdPackQty = result.package.stdPackQty
@ -313,6 +314,7 @@
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty) ; itemDetail.handleQty = Number(result.balance.qty) ;
itemDetail.toInventoryStatus =itemDetail.inventoryStatus
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty itemDetail.balance.stdPackQty = result.package.stdPackQty
@ -439,8 +441,6 @@
detail.toPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus;
detail.singlePrice = detail.balance.singlePrice; detail.singlePrice = detail.balance.singlePrice;
detail.amount = detail.balance.singlePrice * detail.handleQty; detail.amount = detail.balance.singlePrice * detail.handleQty;
@ -448,9 +448,6 @@
detail.arriveDate = detail.balance.arriveDate; detail.arriveDate = detail.balance.arriveDate;
detail.produceDate = detail.balance.produceDate; detail.produceDate = detail.balance.produceDate;
detail.expireDate = detail.balance.expireDate; detail.expireDate = detail.balance.expireDate;
// "arriveDate": 1694591614000,
// "produceDate": 1694591615000,
// "expireDate": 1694591617000,
subList.push(detail) subList.push(detail)
} }
}) })

130
pages/unPlanned/request/issueRequest.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 {
getUnPlannedIssueRequestList, getUnPlannedIssueRequestList,
unPlannedIssueRequestApprove,
unPlannedIssueRequestClose,
unPlannedIssueRequestApproveAgree,
unPlannedIssueRequestApproveRefused,
unPlannedIssueRequestHandle
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getDetailOption, getDetailOption,
@ -82,7 +88,7 @@
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailAndApproveOptions = getDetailAndApproveOption() this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(), this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption() this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndCloseOption = getDetailAndCloseOption() this.detailAndCloseOption = getDetailAndCloseOption()
}, },
@ -204,21 +210,39 @@
}, },
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.unPlannedIssueRequestHandle(dataContent.id)
console.log("审批") })
} else if (e.content.text == "审批通过") { } else if (text == "提交审批") {
console.log("审批通过") this.showQuestionMessage("确定要审批当前申请吗?",res=>{
} else if (e.content.text == "审批驳回") { this.unPlannedIssueRequestApprove(dataContent.id)
console.log("审批驳回") })
} else if (e.content.text == "关闭") { } else if (text == "审批通过") {
console.log("关闭") this.showQuestionMessage("确定要审批通过当前申请吗?",res=>{
this.unPlannedIssueRequestApproveAgree(dataContent.id)
})
} else if (text == "审批驳回") {
this.showQuestionMessage("确定要审批驳回当前申请吗?",res=>{
this.unPlannedIssueRequestApproveRefused(dataContent.id)
})
} else if (text == "关闭") {
this.showQuestionMessage("确定要关闭当前申请吗?",res=>{
this.unPlannedIssueRequestClose(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;
this.status = jobStatus; this.status = jobStatus;
@ -267,6 +291,84 @@
} }
}); });
}, },
unPlannedIssueRequestApprove(id) {
unPlannedIssueRequestApprove(id).then(res => {
if (res.data) {
this.getList("refresh")
uni.showToast({
title: "申请提交审批成功"
})
} else {
this.showMessage("申请提交审批失败")
}
}).catch(error => {
this.showMessage(error)
})
},
unPlannedIssueRequestClose(id) {
unPlannedIssueRequestClose(id).then(res => {
if (res.data) {
this.getList("refresh")
uni.showToast({
title: "申请关闭成功"
})
} else {
this.showMessage("申请关闭失败")
}
}).catch(error => {
this.showMessage(error)
})
},
unPlannedIssueRequestApproveAgree(id) {
unPlannedIssueRequestApproveAgree(id).then(res => {
if (res.data) {
this.getList("refresh")
uni.showToast({
title: "申请审批通过成功"
})
} else {
this.showMessage("申请审批通过失败")
}
}).catch(error => {
this.showMessage(error)
})
},
unPlannedIssueRequestApproveRefused(id) {
unPlannedIssueRequestApproveRefused(id).then(res => {
if (res.data) {
this.getList("refresh")
uni.showToast({
title: "申请审批驳回成功"
})
} else {
this.showMessage("申请审批驳回失败")
}
}).catch(error => {
this.showMessage(error)
})
},
unPlannedIssueRequestHandle(id) {
unPlannedIssueRequestHandle(id).then(res => {
if (res.data) {
this.getList("refresh")
uni.showToast({
title: "申请处理成功"
})
} else {
this.showMessage("申请处理失败")
}
}).catch(error => {
this.showMessage(error)
})
},
} }
} }

5
pages/unPlanned/request/issueRequestCreate.vue

@ -57,8 +57,7 @@
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import { import {
unPlannedIssueRequestSubmit, unPlannedIssueRequestCreate,
unPlannedIssueRecordSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -233,7 +232,7 @@
uni.showLoading({ uni.showLoading({
title:"提交中" title:"提交中"
}) })
unPlannedIssueRequestSubmit(params).then(res => { unPlannedIssueRequestCreate(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成计划外出库申请<br>" + res.data) this.showCommitSuccessMessage("提交成功<br>生成计划外出库申请<br>" + res.data)

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.106:12080/admin-api", "value": "http://dev.ccwin-in.com:25100/api/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.178:12080/admin-api", "chefang": "http://192.168.0.178:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save