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. 80
      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() {
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 = {
filters: [],
pageNo: 1,
pageSize: 1000
pageSize: 100
}
getPackageUnitList(unitparams)
.then((unitres) => {

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

@ -66,7 +66,9 @@ import {
getManagementPrecisions
} from '@/common/balance.js';
import {
calc
} from '@/common/calc'
import {
getDataSource,
createRecordInfo,
@ -238,10 +240,80 @@ const openDetail = (item) => {
};
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 {
const packingNumber = result.label.packingNumber;
const batch = result.label.batch;

3
src/pages/setter/index.vue

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

Loading…
Cancel
Save