Browse Source

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

hella_online_20240829
zhang_li 4 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 ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic' 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'){ if(formField=='itemCode'){
// row[formField] = val[0][searchField] // row[formField] = val[0][searchField]
val.forEach(item=>{ val.forEach(async item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['id'] = item['id'] 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) tableData.value.push(newRow)
}) })
} else { } 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 ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic' import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
// //
defineOptions({ name: 'ProductionMainAssemble' }) defineOptions({ name: 'ProductionMainAssemble' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{ // }).catch(err =>{
// console.log(err); // console.log(err);
// }) // })
val.forEach(item=>{ val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['uom'] = item['uom'] 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) tableData.value.push(newRow)
}) })
} else { } 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 ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic' import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
// //
defineOptions({ name: 'ProductionMainASparePart' }) defineOptions({ name: 'ProductionMainASparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{ // }).catch(err =>{
// console.log(err); // console.log(err);
// }) // })
val.forEach(item=>{ val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['uom'] = item['uom'] 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) tableData.value.push(newRow)
}) })
} else { } 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 ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic' import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
// //
defineOptions({ name: 'ProductionMainPredictSparePart' }) defineOptions({ name: 'ProductionMainPredictSparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{ // }).catch(err =>{
// console.log(err); // console.log(err);
// }) // })
val.forEach(item=>{ val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['uom'] = item['uom'] 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) tableData.value.push(newRow)
}) })
} else { } 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 { getAccessToken } from '@/utils/auth'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
// //
// //
defineOptions({ name: 'ProductreceiptRequestMain' }) defineOptions({ name: 'ProductreceiptRequestMain' })
@ -212,6 +213,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf() row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField] 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') { }else if (formField == 'workStationCode') {
// //
val.forEach(item=>{ 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 { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
// //
defineOptions({ name: 'ProductreceiptRequestMainA' }) defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -213,6 +214,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf() row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField] 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') { }else if (formField == 'workStationCode') {
// //
val.forEach(item=>{ 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 * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index' import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import * as BomApi from "@/api/wms/bom";
import { import {
SupplierdeliverRequestPackage SupplierdeliverRequestPackage
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' } 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['uom'] = res[0]['uom']
} }
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
// BOM
console.log('获取计量单位',res) 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{ }else{
// //
val.forEach(item=>{ val.forEach(item=>{

Loading…
Cancel
Save