|
@ -93,6 +93,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import { ProductreceiptRequestLabel,ProductreceiptRequestLabelRules } from '../../../../productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data' |
|
|
import { ProductreceiptRequestLabel,ProductreceiptRequestLabelRules } from '../../../../productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data' |
|
|
|
|
|
import * as ProductionitemcodeSpareitemcodeApi from '@/api/wms/productionitemcodeSpareitemcode' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'RelegateRequestMain' }) |
|
|
defineOptions({ name: 'RelegateRequestMain' }) |
|
|
|
|
|
|
|
@ -116,6 +117,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
if(val.length==0) return |
|
|
if(val.length==0) return |
|
|
val.forEach(item=>{ |
|
|
val.forEach(item=>{ |
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
|
|
newRow['id'] = item['id'] |
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
newRow['uom'] = item['uom'] |
|
|
newRow['uom'] = item['uom'] |
|
|
newRow['qty'] = item['qty'] |
|
|
newRow['qty'] = item['qty'] |
|
@ -127,6 +129,31 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
newRow['inventoryStatus'] = item['inventoryStatus'] |
|
|
newRow['inventoryStatus'] = item['inventoryStatus'] |
|
|
tableData.value.push(newRow) |
|
|
tableData.value.push(newRow) |
|
|
}) |
|
|
}) |
|
|
|
|
|
let itemCodes = [] |
|
|
|
|
|
val.forEach(item=>{ |
|
|
|
|
|
if(!itemCodes.find(item1=>item1==item['itemCode'])){ |
|
|
|
|
|
itemCodes.push(item['itemCode']) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
console.log('过滤之后的物料代码',itemCodes) |
|
|
|
|
|
itemCodes.forEach(async (item)=>{ |
|
|
|
|
|
let res = await ProductionitemcodeSpareitemcodeApi.getProductionitemcodeSpareitemcodeRelation({ |
|
|
|
|
|
code:item, |
|
|
|
|
|
available: 'TRUE', |
|
|
|
|
|
pageSize: 20, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
by: 'ASC' |
|
|
|
|
|
}) |
|
|
|
|
|
if(res.list&&res.list.length>0){ |
|
|
|
|
|
tableData.value.forEach(item1=>{ |
|
|
|
|
|
if(item1['itemCode']==item){ |
|
|
|
|
|
item1['downItemCode'] = res.list[0]['code'] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
} else if (formField == 'downItemCode') { |
|
|
} else if (formField == 'downItemCode') { |
|
|
// if(row['itemCode'] == val[0]['spareItemCode']){ |
|
|
// if(row['itemCode'] == val[0]['spareItemCode']){ |
|
|
// row['downItemCode'] = val[0]['productionItemCode'] //量产件 |
|
|
// row['downItemCode'] = val[0]['productionItemCode'] //量产件 |
|
@ -292,9 +319,9 @@ const isShowMainButton = (row, val) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row, $index) => { |
|
|
const butttondata = (row,$index) => { |
|
|
const findIndex = row['masterId'] ? tableObject.tableList.findIndex(item => item['masterId'] == row['masterId']) : -1 |
|
|
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
if (findIndex > 0 && findIndex < $index) { |
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
return [] |
|
|
return [] |
|
|
} |
|
|
} |
|
|
return [ |
|
|
return [ |
|
@ -387,6 +414,7 @@ const buttonTableClick = async (val, row) => { |
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
const basicFormRef = ref() |
|
|
const basicFormRef = ref() |
|
|
const openForm = (type: string, row?: any) => { |
|
|
const openForm = (type: string, row?: any) => { |
|
|
|
|
|
tableData.value = [] |
|
|
basicFormRef.value.open(type, row) |
|
|
basicFormRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
//为true表示子表数据中存在数量为0的数据 |
|
|
//为true表示子表数据中存在数量为0的数据 |
|
|