|
@ -114,6 +114,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import * as ruleApi from '@/api/wms/rule/index' |
|
|
import * as ruleApi from '@/api/wms/rule/index' |
|
|
|
|
|
import * as LocationApi from '@/api/wms/location' |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
// 生产退料申请 |
|
|
// 生产退料申请 |
|
|
defineOptions({ name: 'ProductionreturnRequestMain' }) |
|
|
defineOptions({ name: 'ProductionreturnRequestMain' }) |
|
@ -238,11 +239,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
newRow['inventoryStatus'] = item['inventoryStatus'] |
|
|
newRow['inventoryStatus'] = item['inventoryStatus'] |
|
|
newRow['qty'] = item['qty'] |
|
|
newRow['qty'] = item['qty'] |
|
|
// 如果有批次 赋值库存余额批次 无批次 赋值 000000 |
|
|
// 如果有批次 赋值库存余额批次 无批次 赋值 000000 |
|
|
if (item['batch'] != '') { |
|
|
// if (item['batch'] != '') { |
|
|
newRow['batch'] = item['batch'] |
|
|
newRow['batch'] = item['batch'] |
|
|
}else{ |
|
|
// }else{ |
|
|
newRow['batch'] = getFormattedDate(); // 获取 YYYYMMDD 格式的日期 |
|
|
// newRow['batch'] = getFormattedDate(); // 获取 YYYYMMDD 格式的日期 |
|
|
} |
|
|
// } |
|
|
|
|
|
|
|
|
// else { |
|
|
// else { |
|
|
// newRow['batch'] = '000000' |
|
|
// newRow['batch'] = '000000' |
|
@ -324,6 +325,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
// 来源工位代码 |
|
|
// 来源工位代码 |
|
|
setV['workStationCode'] = val[0]['code'] |
|
|
setV['workStationCode'] = val[0]['code'] |
|
|
setV['fromLocationCode'] = val[0]['rawLocationCode'] |
|
|
setV['fromLocationCode'] = val[0]['rawLocationCode'] |
|
|
|
|
|
let locationInfo = await LocationApi.getFromWarehouseCode(val[0]['rawLocationCode']) |
|
|
|
|
|
setV['toWarehouseCode'] = locationInfo.warehouseCode |
|
|
tableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
} |
|
|
} |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
@ -556,32 +559,32 @@ const buttonTableClick = async (val, row) => { |
|
|
if (res.list[0].enableMake == "FALSE") { |
|
|
if (res.list[0].enableMake == "FALSE") { |
|
|
// 修改 tableform 属性 |
|
|
// 修改 tableform 属性 |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
if(itemColumns.field == 'productionLineCodePackage') { |
|
|
if(itemColumns.field == 'productionLineCodePackage') { |
|
|
itemColumns.tableForm.isInpuFocusShow = false |
|
|
itemColumns.tableForm.isInpuFocusShow = false |
|
|
itemColumns.tableForm.disabled = true |
|
|
itemColumns.tableForm.disabled = true |
|
|
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false |
|
|
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false |
|
|
} |
|
|
} |
|
|
if(itemColumns.field == 'supplierItemCode') { |
|
|
if(itemColumns.field == 'supplierItemCode') { |
|
|
itemColumns.tableForm.isInpuFocusShow = true |
|
|
itemColumns.tableForm.isInpuFocusShow = true |
|
|
itemColumns.tableForm.disabled = false |
|
|
itemColumns.tableForm.disabled = false |
|
|
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true |
|
|
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
// 修改 tableform 属性 |
|
|
// 修改 tableform 属性 |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
if(itemColumns.field == 'supplierItemCode') { |
|
|
if(itemColumns.field == 'supplierItemCode') { |
|
|
itemColumns.tableForm.isInpuFocusShow = false |
|
|
itemColumns.tableForm.isInpuFocusShow = false |
|
|
itemColumns.tableForm.disabled = true |
|
|
itemColumns.tableForm.disabled = true |
|
|
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false |
|
|
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false |
|
|
} |
|
|
} |
|
|
if(itemColumns.field == 'productionLineCodePackage') { |
|
|
if(itemColumns.field == 'productionLineCodePackage') { |
|
|
item.productionLineCodePackage = item.productionLineCode |
|
|
item.productionLineCodePackage = item.productionLineCode |
|
|
itemColumns.tableForm.isInpuFocusShow = true |
|
|
itemColumns.tableForm.isInpuFocusShow = true |
|
|
itemColumns.tableForm.disabled = true |
|
|
itemColumns.tableForm.disabled = true |
|
|
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true |
|
|
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
message.warning('没有查询到物料代码:【' + item.itemCode + '】') |
|
|
message.warning('没有查询到物料代码:【' + item.itemCode + '】') |
|
|