|
|
@ -77,6 +77,7 @@ |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
:isShowAddBtn="true" |
|
|
|
:detailButtonIsShowAdd="true" |
|
|
|
:detailButtonIsShowAddStatusArray="['0']" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
@ -124,18 +125,18 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
if(type == 'tableForm'){ |
|
|
|
if (type == 'tableForm') { |
|
|
|
if (formField == 'sparePartsCode') { |
|
|
|
row['sparePartsCode'] = val[0].itemNumber |
|
|
|
row['currentQty'] = val[0].qty |
|
|
|
row['sparePartsCode'] = val[0].itemNumber |
|
|
|
row['currentQty'] = val[0].qty |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (formField == 'locationCode') { |
|
|
|
setV['locationCode'] = val[0].code |
|
|
|
setV['areaCode'] = val[0].areaCode |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if (formField == 'locationCode') { |
|
|
|
setV['locationCode'] = val[0].code |
|
|
|
setV['areaCode'] = val[0].areaCode |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -144,14 +145,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
|
nextTick(async () => { |
|
|
|
const setV = {} |
|
|
|
// if(formField == 'itemCode'){ |
|
|
|
// await ItembasicApi.getItembasicPage({ |
|
|
|
// code: setV['itemCode'] |
|
|
|
// }).then(res => { |
|
|
|
// setV['uom'] = res.list[0].uom |
|
|
|
// setV[formField] = val[0][searchField] |
|
|
|
// }) |
|
|
|
// } |
|
|
|
if (formField == 'sparePartsCode') { |
|
|
|
setV['sparePartsCode'] = val[0].itemNumber |
|
|
|
setV['currentQty'] = val[0].qty |
|
|
|
} |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
} |
|
|
@ -217,8 +214,8 @@ const isShowMainButton = (row, val) => { |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'wms:sparePartsInLocationMain:update' }), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:sparePartsInLocationMain:delete' }) // 删除 |
|
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'wms:sparePartsInLocationMain:update' }) // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:sparePartsInLocationMain:delete' }) // 删除 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
@ -299,7 +296,9 @@ const handleExport = async () => { |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const data = await SparePartsInLocationMainApi.exportSparePartsInLocationMain(tableObject.params) |
|
|
|
const data = await SparePartsInLocationMainApi.exportSparePartsInLocationMain( |
|
|
|
tableObject.params |
|
|
|
) |
|
|
|
download.excel(data, '备件申领记录主.xlsx') |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
@ -328,7 +327,7 @@ const handleDeleteTable = (item, index) => { |
|
|
|
// 主子数据 提交 |
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
console.log( formRef.value) |
|
|
|
console.log(formRef.value) |
|
|
|
formRef.value.formLoading = true |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|