Browse Source

调整WMS系统中所有BOM版本字段默认值

hella_online_20240829
zhang_li 5 months ago
parent
commit
85ebc8de49
  1. 19
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  2. 18
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  3. 18
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  4. 18
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
  5. 16
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  6. 16
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  7. 18
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

19
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
//
@ -119,10 +120,26 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// })
if(formField=='itemCode'){
// row[formField] = val[0][searchField]
val.forEach(item=>{
val.forEach(async item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['id'] = item['id']
// BOM
console.log(22,item)
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

18
src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductionMainAssemble' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
// BOM
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

18
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductionMainASparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
// BOM
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

18
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductionMainPredictSparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
// BOM
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

16
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -149,6 +149,7 @@ import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
import dayjs from 'dayjs'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
//
//
defineOptions({ name: 'ProductreceiptRequestMain' })
@ -212,6 +213,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField]
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{

16
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -149,6 +149,7 @@ import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -213,6 +214,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField]
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{

18
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -136,6 +136,7 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
import * as BomApi from "@/api/wms/bom";
import {
SupplierdeliverRequestPackage
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
@ -204,8 +205,21 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['uom'] = res[0]['uom']
}
row[formField] = val[0][searchField]
console.log('获取计量单位',res)
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else{
//
val.forEach(item=>{

Loading…
Cancel
Save