|
@ -115,6 +115,8 @@ 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' |
|
|
import * as LocationApi from '@/api/wms/location' |
|
|
|
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
|
|
|
import * as ProductionlineitemApi from '@/api/wms/productionlineitem' |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
// 生产退料申请 |
|
|
// 生产退料申请 |
|
|
defineOptions({ name: 'ProductionreturnRequestMain' }) |
|
|
defineOptions({ name: 'ProductionreturnRequestMain' }) |
|
@ -555,21 +557,29 @@ const buttonTableClick = async (val, row) => { |
|
|
by: 'ASC', |
|
|
by: 'ASC', |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
if (res.list.length > 0) { |
|
|
if (res.list.length > 0) { |
|
|
// 判断物料 可采购 可制造 |
|
|
// 判断物料 可采购 |
|
|
if (res.list[0].enableMake == "FALSE") { |
|
|
if (res.list[0].enableBuy == "TRUE") { |
|
|
// 修改 tableform 属性 |
|
|
// 修改 tableform 属性 |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
if(itemColumns.field == 'productionLineCodePackage') { |
|
|
// 修改 tableform 属性 |
|
|
itemColumns.tableForm.isInpuFocusShow = false |
|
|
if(itemColumns.field == 'supplierItemCode') { |
|
|
itemColumns.tableForm.disabled = true |
|
|
itemColumns.tableForm.isInpuFocusShow = true |
|
|
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false |
|
|
itemColumns.tableForm.disabled = false |
|
|
} |
|
|
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true |
|
|
if(itemColumns.field == 'supplierItemCode') { |
|
|
formLabelRef.value.formLoading = true |
|
|
itemColumns.tableForm.isInpuFocusShow = true |
|
|
SupplieritemApi.getSupplieritemPage({ |
|
|
itemColumns.tableForm.disabled = false |
|
|
pageSize: 10, |
|
|
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true |
|
|
pageNo: 1, |
|
|
} |
|
|
code: item.itemCode, |
|
|
}) |
|
|
sort: '', |
|
|
|
|
|
by: 'ASC', |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
item.supplierItemCode = response.list[0].supplierCode |
|
|
|
|
|
formLabelRef.value.formLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
// 修改 tableform 属性 |
|
|
// 修改 tableform 属性 |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
@ -578,11 +588,36 @@ const buttonTableClick = async (val, row) => { |
|
|
itemColumns.tableForm.disabled = true |
|
|
itemColumns.tableForm.disabled = true |
|
|
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false |
|
|
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false |
|
|
} |
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
// 判断物料 可制造 |
|
|
|
|
|
if (res.list[0].enableMake == "TRUE") { |
|
|
|
|
|
// 修改 tableform 属性 |
|
|
|
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
|
|
|
if(itemColumns.field == 'productionLineCodePackage') { |
|
|
|
|
|
item.productionLineCodePackage = item.productionLineCode |
|
|
|
|
|
itemColumns.tableForm.isInpuFocusShow = true |
|
|
|
|
|
itemColumns.tableForm.disabled = true |
|
|
|
|
|
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true |
|
|
|
|
|
formLabelRef.value.formLoading = true |
|
|
|
|
|
ProductionlineitemApi.getProductionlineitemPage({ |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
code: item.itemCode, |
|
|
|
|
|
sort: '', |
|
|
|
|
|
by: 'ASC', |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
item.supplierItemCode = response.list[0].supplierCode |
|
|
|
|
|
formLabelRef.value.formLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
// 修改 tableform 属性 |
|
|
|
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
if(itemColumns.field == 'productionLineCodePackage') { |
|
|
if(itemColumns.field == 'productionLineCodePackage') { |
|
|
item.productionLineCodePackage = item.productionLineCode |
|
|
itemColumns.tableForm.isInpuFocusShow = false |
|
|
itemColumns.tableForm.isInpuFocusShow = true |
|
|
|
|
|
itemColumns.tableForm.disabled = true |
|
|
itemColumns.tableForm.disabled = true |
|
|
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true |
|
|
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -835,10 +870,13 @@ const handlePoint = async (row) => { |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
if(res.list.length > 0) { |
|
|
if(res.list.length > 0) { |
|
|
isCreateLabel.value = true |
|
|
isCreateLabel.value = true |
|
|
if (res.list[0].productionLineCode != null) { |
|
|
if (res.list[0].supplierItemCode != null) { |
|
|
|
|
|
labelType.value = 'cg' |
|
|
|
|
|
} else if(res.list[0].productionLineCode != null){ |
|
|
labelType.value = 'zz' |
|
|
labelType.value = 'zz' |
|
|
} else { |
|
|
} else { |
|
|
labelType.value = 'cg' |
|
|
isCreateLabel.value = false |
|
|
|
|
|
message.warning('不是采购类型也不是制造类型物料不能打印标签!') |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
isCreateLabel.value = false |
|
|
isCreateLabel.value = false |
|
|