|
@ -106,6 +106,8 @@ import * as ProductrepairRequestMainApi from '@/api/wms/productrepairRequestMain |
|
|
import * as ProductrepairRequestDetailApi from '@/api/wms/productrepairRequestDetaila' |
|
|
import * as ProductrepairRequestDetailApi from '@/api/wms/productrepairRequestDetaila' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as BomDismantleApi from '@/api/wms/bomDismantle' |
|
|
import * as BomDismantleApi from '@/api/wms/bomDismantle' |
|
|
|
|
|
import * as dismantleRequestDetailbApi from "@/api/wms/dismantleRequestDetailb"; |
|
|
|
|
|
import {updateProductscrapDetailRequestBom} from "@/api/wms/productrepairRequestMain"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 制品返修申请 |
|
|
// 制品返修申请 |
|
@ -135,6 +137,8 @@ const buttondataTable = ref([{ |
|
|
const DialogTitle = ref('Bom信息') |
|
|
const DialogTitle = ref('Bom信息') |
|
|
const bomModelVisible = ref(false) |
|
|
const bomModelVisible = ref(false) |
|
|
const tableListBom = ref() |
|
|
const tableListBom = ref() |
|
|
|
|
|
const lsBomSave = ref() |
|
|
|
|
|
const rowId = ref() |
|
|
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({ |
|
|
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({ |
|
|
getListApi: BomDismantleApi.getBomDismantlePage |
|
|
getListApi: BomDismantleApi.getBomDismantlePage |
|
|
}) |
|
|
}) |
|
@ -150,12 +154,17 @@ const buttonBaseClickBom = (val) => { |
|
|
if (val == 'save') { |
|
|
if (val == 'save') { |
|
|
// 根据 填写的数量 为基准 不填写数量的忽略 |
|
|
// 根据 填写的数量 为基准 不填写数量的忽略 |
|
|
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0)) |
|
|
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0)) |
|
|
|
|
|
if(lsBomSave.value){ |
|
|
tableData.value.forEach((item, index) => { |
|
|
tableData.value.forEach((item, index) => { |
|
|
if(tableListBom.value[0].rowId == index) { |
|
|
if(tableListBom.value[0].rowId == index) { |
|
|
item.childList = tableListBom.value |
|
|
item.childList = tableListBom.value |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
console.log(157, tableData.value) |
|
|
}else { |
|
|
|
|
|
// 详情下的 bom编辑功能 调用接口 保存数据 |
|
|
|
|
|
ProductrepairRequestMainApi.updateProductscrapDetailRequestBom(rowId.value, tableListBom.value) |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
} |
|
|
bomModelVisible.value = false |
|
|
bomModelVisible.value = false |
|
|
} |
|
|
} |
|
|
// 关闭 |
|
|
// 关闭 |
|
@ -209,6 +218,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
row['workStationCode'] = val[0]['code'] |
|
|
row['workStationCode'] = val[0]['code'] |
|
|
} else if(formField == 'formField'){ |
|
|
} else if(formField == 'formField'){ |
|
|
row['workStationCode'] = val[0]['code'] |
|
|
row['workStationCode'] = val[0]['code'] |
|
|
|
|
|
} else if(formField == 'bomVersion'){ |
|
|
|
|
|
row['bomVersion'] = val[0]['version'] |
|
|
} else { |
|
|
} else { |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
|
} |
|
|
} |
|
@ -224,6 +235,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
|
|
|
if(formField == 'packingNumber'){ |
|
|
setV['containerNumber'] = val[0]['containerNumber'] |
|
|
setV['containerNumber'] = val[0]['containerNumber'] |
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
setV['packingNumber'] = val[0]['packingNumber'] |
|
|
setV['packingNumber'] = val[0]['packingNumber'] |
|
@ -231,6 +243,15 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
setV['uom'] = val[0]['uom'] |
|
|
setV['uom'] = val[0]['uom'] |
|
|
setV['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
setV['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
setV['fromLocationCode'] = val[0]['locationCode'] |
|
|
setV['fromLocationCode'] = val[0]['locationCode'] |
|
|
|
|
|
} else if(formField == 'productionLineCode'){ |
|
|
|
|
|
setV['productionLineCode'] = val[0]['code'] |
|
|
|
|
|
} else if(formField == 'workStationCode'){ |
|
|
|
|
|
setV['workStationCode'] = val[0]['code'] |
|
|
|
|
|
} else if(formField == 'formField'){ |
|
|
|
|
|
setV['workStationCode'] = val[0]['code'] |
|
|
|
|
|
} else if(formField == 'bomVersion'){ |
|
|
|
|
|
setV['bomVersion'] = val[0]['version'] |
|
|
|
|
|
} |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -390,12 +411,14 @@ const handleHandle = async (id: number) => { |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm =async (type: string, row?: number) => { |
|
|
const openForm =async (type: string, row?: number) => { |
|
|
tableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
|
|
lsBomSave.value = true |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|
const detailRef = ref() |
|
|
const detailRef = ref() |
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
|
|
lsBomSave.value = false |
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -501,6 +524,7 @@ const tableFormButton = async (val , row) => { |
|
|
bomVersion: row.bomVersion, |
|
|
bomVersion: row.bomVersion, |
|
|
masterId: row.id |
|
|
masterId: row.id |
|
|
} |
|
|
} |
|
|
|
|
|
rowId.value = row.id |
|
|
await getDetailListBom() |
|
|
await getDetailListBom() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|