|
@ -211,8 +211,8 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f |
|
|
headerItem.field == 'packUnit' || |
|
|
headerItem.field == 'packUnit' || |
|
|
headerItem.field == 'secondPackUnit' || |
|
|
headerItem.field == 'secondPackUnit' || |
|
|
headerItem.field == 'fromPackUnit' || |
|
|
headerItem.field == 'fromPackUnit' || |
|
|
headerItem.field == 'toPackUnit'|| |
|
|
headerItem.field == 'toPackUnit' || |
|
|
headerItem.field == 'toPackUnit'|| |
|
|
headerItem.field == 'toPackUnit' || |
|
|
headerItem.field == 'supplierItemCode' |
|
|
headerItem.field == 'supplierItemCode' |
|
|
|
|
|
|
|
|
) { |
|
|
) { |
|
@ -239,10 +239,10 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f |
|
|
] |
|
|
] |
|
|
? formRef.formModel[searchCondition1[i].value] |
|
|
? formRef.formModel[searchCondition1[i].value] |
|
|
: detailData |
|
|
: detailData |
|
|
? detailData[searchCondition1[i].value] |
|
|
? detailData[searchCondition1[i].value] |
|
|
: row |
|
|
: row |
|
|
? row[searchCondition1[i].value] |
|
|
? row[searchCondition1[i].value] |
|
|
: '' |
|
|
: '' |
|
|
// 是否含有空参数情况
|
|
|
// 是否含有空参数情况
|
|
|
let isNull = false |
|
|
let isNull = false |
|
|
if ( |
|
|
if ( |
|
@ -354,9 +354,9 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f |
|
|
) { |
|
|
) { |
|
|
// 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请
|
|
|
// 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请
|
|
|
pageApi.value = getProductionLineCodelistByCodes |
|
|
pageApi.value = getProductionLineCodelistByCodes |
|
|
params.value.productionLineCode= |
|
|
params.value.productionLineCode = |
|
|
formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode, |
|
|
formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode, |
|
|
params.value.itemCodes=val?.trim() |
|
|
params.value.itemCodes = val?.trim() |
|
|
} |
|
|
} |
|
|
} else if ( |
|
|
} else if ( |
|
|
headerItem.field == 'packUnit' || |
|
|
headerItem.field == 'packUnit' || |
|
@ -376,8 +376,8 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f |
|
|
routeName == 'UnplannedissueJobMain' || |
|
|
routeName == 'UnplannedissueJobMain' || |
|
|
routeName == 'PackageoverRequestMain' |
|
|
routeName == 'PackageoverRequestMain' |
|
|
) { |
|
|
) { |
|
|
params.value.itemCode= row.itemCode |
|
|
params.value.itemCode = row.itemCode |
|
|
params.value.packUnit= val?.trim() |
|
|
params.value.packUnit = val?.trim() |
|
|
pageApi.value = getItemPackageunitListByCodes |
|
|
pageApi.value = getItemPackageunitListByCodes |
|
|
} |
|
|
} |
|
|
} else if ( |
|
|
} else if ( |
|
@ -388,27 +388,27 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f |
|
|
routeName == 'ProductionreturnRequestMain' || |
|
|
routeName == 'ProductionreturnRequestMain' || |
|
|
routeName == 'ProductionreturnRequestMainNo' |
|
|
routeName == 'ProductionreturnRequestMainNo' |
|
|
) { |
|
|
) { |
|
|
searchField = 'supplierCode' |
|
|
searchField = 'supplierCode' |
|
|
params.value.itemCodes= row.itemCode |
|
|
params.value.itemCodes = row.itemCode |
|
|
params.value.supplierCode= val?.trim() |
|
|
params.value.supplierCode = val?.trim() |
|
|
pageApi.value = getSupplierItemListByCodes |
|
|
pageApi.value = getSupplierItemListByCodes |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
const list = ref() |
|
|
const list = ref() |
|
|
// 调取包装接口
|
|
|
// 调取包装接口
|
|
|
await pageApi.value(params.value).then(async (res) => { |
|
|
await pageApi.value(params.value).then(async (res) => { |
|
|
list.value = res ? res : [] |
|
|
list.value = res ? res : [] |
|
|
// 只查一条数据,多条数据查询默认显示不存在
|
|
|
// 只查一条数据,多条数据查询默认显示不存在
|
|
|
if (res.length == 1) { |
|
|
if (res.length == 1) { |
|
|
callback(list.value) |
|
|
callback(list.value) |
|
|
} else { |
|
|
} else { |
|
|
message.alert('代码' + row[headerItem.field] + '没有找到对应数据') |
|
|
message.alert('代码' + row[headerItem.field] + '没有找到对应数据') |
|
|
row[headerItem.field] = '' |
|
|
row[headerItem.field] = '' |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
export const FormBlur = async (field, val, routeName, formRef, detailData, formSchema, callback) => { |
|
|
export const FormBlur = async (field, val, routeName, formRef, detailData, formSchema, callback) => { |
|
@ -737,13 +737,13 @@ export const FormBlur = async (field, val, routeName, formRef, detailData, formS |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 根据下方输入框失去焦点校验信息
|
|
|
// 根据下方输入框失去焦点校验信息
|
|
|
export const getListByBottonInput = async (headerItem, val, row, routeName, formRef, detailData, tableData, callback) => { |
|
|
export const getListByBottonInput = async (headerItem, val, row, routeName, formRef, detailData, tableData, callback) => { |
|
|
let tableFormSchemaObj = headerItem?.tableForm |
|
|
let tableFormSchemaObj = headerItem?.tableForm |
|
|
console.log(333,tableFormSchemaObj) |
|
|
console.log(333, tableFormSchemaObj) |
|
|
if (tableFormSchemaObj.searchPage && tableFormSchemaObj.verificationParams) { |
|
|
if (tableFormSchemaObj.searchPage && tableFormSchemaObj.verificationParams) { |
|
|
if (!val) return; |
|
|
if (!val) return; |
|
|
let params = ref({}) |
|
|
let params = ref({}) |
|
@ -817,7 +817,7 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form |
|
|
if (verificationParams && verificationParams.length > 0) { |
|
|
if (verificationParams && verificationParams.length > 0) { |
|
|
for (let i = 0; i < verificationParams.length; i++) { |
|
|
for (let i = 0; i < verificationParams.length; i++) { |
|
|
console.log(54565, verificationParams[i].key) |
|
|
console.log(54565, verificationParams[i].key) |
|
|
verificationParams[i].key1 = verificationParams[i].key +'s' |
|
|
verificationParams[i].key1 = verificationParams[i].key + 's' |
|
|
params.value[verificationParams[i].key1] = val |
|
|
params.value[verificationParams[i].key1] = val |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -830,25 +830,29 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form |
|
|
...arr1.filter((item) => !arr2.includes(item)), |
|
|
...arr1.filter((item) => !arr2.includes(item)), |
|
|
...arr2.filter((item) => !arr1.includes(item)) |
|
|
...arr2.filter((item) => !arr1.includes(item)) |
|
|
].join(',') |
|
|
].join(',') |
|
|
message.alert('代码' + str + '没有找到对应数据') |
|
|
console.log(arr1.filter((item) => arr2.includes(item))) |
|
|
return |
|
|
console.log(22, str) |
|
|
} else { |
|
|
if (str) { |
|
|
let repeatCode = [] |
|
|
message.alert('代码' + str + '没有找到对应数据') |
|
|
if (tableData.length > 0) { |
|
|
return |
|
|
tableData.forEach((item) => { |
|
|
|
|
|
const findIndex = arr1.findIndex(valItem => valItem == item[headerItem.field]) |
|
|
|
|
|
if (findIndex > -1) { |
|
|
|
|
|
arr1.splice(findIndex, 1) |
|
|
|
|
|
repeatCode.push(item[headerItem.field]) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if (repeatCode.length > 0) { |
|
|
|
|
|
message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
} |
|
|
callback(list.value) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
let repeatCode = [] |
|
|
|
|
|
if (tableData.length > 0) { |
|
|
|
|
|
tableData.forEach((item) => { |
|
|
|
|
|
const findIndex = arr1.findIndex(valItem => valItem == item[headerItem.field]) |
|
|
|
|
|
if (findIndex > -1) { |
|
|
|
|
|
arr1.splice(findIndex, 1) |
|
|
|
|
|
repeatCode.push(item[headerItem.field]) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if (repeatCode.length > 0) { |
|
|
|
|
|
message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
console.log(list.value) |
|
|
|
|
|
callback(list.value) |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} else { |
|
|
} else { |
|
|