Browse Source

fix: productionReturn\job 文件修改 Vue2升级Vue3 11/12

syhx_app_vue3
王志国 2 weeks ago
parent
commit
75eae23282
  1. 2
      src/api/request2.js
  2. 2
      src/pages/index/index.vue
  3. 78
      src/pages/productionReturn/job/okToReturnDetail.vue
  4. 3
      src/pages/setter/index.vue

2
src/api/request2.js

@ -2907,7 +2907,7 @@ export function getBalanceByParams(data) {
*/ */
export function getBusinessType() { export function getBusinessType() {
return http.get("/wms/businesstype/page?pageSize=1000&pageNo=1") return http.get("/wms/businesstype/page?pageSize=100&pageNo=1")
} }
/** /**
* 获取生产计划信息通过生产线和日期 * 获取生产计划信息通过生产线和日期

2
src/pages/index/index.vue

@ -346,7 +346,7 @@ const getDictory = () => {
const unitparams = { const unitparams = {
filters: [], filters: [],
pageNo: 1, pageNo: 1,
pageSize: 1000 pageSize: 100
} }
getPackageUnitList(unitparams) getPackageUnitList(unitparams)
.then((unitres) => { .then((unitres) => {

78
src/pages/productionReturn/job/okToReturnDetail.vue

@ -66,7 +66,9 @@ import {
getManagementPrecisions getManagementPrecisions
} from '@/common/balance.js'; } from '@/common/balance.js';
import {
calc
} from '@/common/calc'
import { import {
getDataSource, getDataSource,
createRecordInfo, createRecordInfo,
@ -238,10 +240,80 @@ const openDetail = (item) => {
}; };
const openScanPopup = () => { const openScanPopup = () => {
scanPopup.value.openScanPopup(); scanPopup.value.openScanPopup(fromLocationCode.value);
}; };
const getScanResult = (result)=> { const getScanResult = (result)=> {
managementType.value = result.managementType
if (managementType.value == 'BY_BATCH' || managementType.value == 'BY_QUANTITY') {
setDataBatch(result)
} else {
setData(result)
}
}
const setDataBatch = (result)=>{
try {
const packingNumber = result.label.packingNumber;
const batch = result.label.batch;
const qty = result.label.qty;
const itemCode = result.label.itemCode;
const detail = detailSource.value.find(r => r.itemCode == itemCode);
if (detail == undefined) {
showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
let itemDetail = detail.subList.find(r => {
return r.batch == batch
})
if (itemDetail == undefined) {
showErrorMessage("批次[" + batch + "]不在列表中")
} else {
if (itemDetail.scaned) {
// this.showErrorMessage("[" + batch + "]")
itemDetail.handleQty = calc.add(itemDetail.handleQty,Number(result.package.qty))
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.package.qty)
itemDetail.inventoryStatus = "OK"
itemDetail.packQty = result.package.packQty
itemDetail.packUnit = result.package.packUnit
//退,退000000 --nxt
// let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
// let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
// if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
// this.showQuestionMessage('[' + balanceStatus + '][' + itemStatus +
// '],?', res => {
// if (res) {
// itemDetail.scaned = true;
// itemDetail.handleQty = Number(result.balance.qty)
// itemDetail.balance = result.balance;
// itemDetail.balance.balanceQty = result.balance.qty;
// itemDetail.balance.packQty = result.package.packQty
// itemDetail.balance.packUnit = result.package.packUnit
// this.calcHandleQty();
// } else {
// this.scanPopupGetFocus();
// }
// });
// } else {
// itemDetail.scaned = true;
// itemDetail.handleQty = Number(result.balance.qty)
// itemDetail.balance = result.balance;
// itemDetail.balance.balanceQty = result.balance.qty;
// itemDetail.balance.packQty = result.package.packQty
// itemDetail.balance.packUnit = result.package.packUnit
// this.calcHandleQty();
// }
}
calcHandleQty();
}
}
scanPopupGetFocus();
} catch (e) {
showErrorMessage(e.message);
}
}
const setData = (result) => {
try { try {
const packingNumber = result.label.packingNumber; const packingNumber = result.label.packingNumber;
const batch = result.label.batch; const batch = result.label.batch;

3
src/pages/setter/index.vue

@ -54,7 +54,8 @@ const userInfo = ref(null)
onLoad(() => { onLoad(() => {
getAppVersion() getAppVersion()
getUserProfile().then((res) => { getUserProfile().then((res) => {
userInfo.value = res.data console.log(res);
userInfo.value = res.data || null
// nextTick(()=>{ // nextTick(()=>{
// const userInfo = res.data.nickname // const userInfo = res.data.nickname
// console.log("",userInfo) // console.log("",userInfo)

Loading…
Cancel
Save