|
@ -134,6 +134,8 @@ 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 SubjectAccountApi from '@/api/wms/subjectAccount' |
|
|
import * as SubjectAccountApi from '@/api/wms/subjectAccount' |
|
|
|
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
|
|
|
import * as ProductionlineitemApi from '@/api/wms/productionlineitem' |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
import * as ruleApi from '@/api/wms/rule/index' |
|
|
import * as ruleApi from '@/api/wms/rule/index' |
|
|
// 计划外入库申请 |
|
|
// 计划外入库申请 |
|
@ -443,6 +445,10 @@ const butttondata = (row,$index) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
|
|
|
|
|
|
|
|
|
const enableBuyOrenableMake = ref()//是可制造还是可采购 |
|
|
|
|
|
const enableMake = ref('')//可制造 |
|
|
|
|
|
const enableBuy = ref('')//可采购 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
console.log("val",val) |
|
|
console.log("val",val) |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
if (val == 'mainClose') { // 关闭 |
|
@ -498,50 +504,37 @@ const buttonTableClick = async (val, row) => { |
|
|
// dialogVisible.value = true |
|
|
// dialogVisible.value = true |
|
|
formLabelRef.value.open('create', row) |
|
|
formLabelRef.value.open('create', row) |
|
|
detatableData.tableList.map((item) => { |
|
|
detatableData.tableList.map((item) => { |
|
|
// 查询物料类型 原料 只能选择 供应商代码 半成品成品其他 只能选择 生产线 |
|
|
if (item.itemType=='可采购') { |
|
|
ItembasicApi.getItembasicPage({ |
|
|
detailListTableColumns.tableFormColumns = UnplannedreceiptRequestDetailLabel.allSchemas.tableFormColumns.filter(item=>item.field != 'productionLineCodePackage') |
|
|
pageSize: 10, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
code: item.itemCode, |
|
|
|
|
|
sort: '', |
|
|
|
|
|
by: 'ASC', |
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
if (res.list.length > 0) { |
|
|
|
|
|
// 判断物料 可采购 可制造 |
|
|
|
|
|
if (res.list[0].enableMake == "FALSE") { |
|
|
|
|
|
// 修改 tableform 属性 |
|
|
// 修改 tableform 属性 |
|
|
detailListTableColumns.tableFormColumns.map(item => { |
|
|
SupplieritemApi.getSupplieritemPage({ |
|
|
if(item.field == 'productionLineCodePackage') { |
|
|
pageSize: 10, |
|
|
item.tableForm.isInpuFocusShow = false |
|
|
pageNo: 1, |
|
|
item.tableForm.disabled = true |
|
|
itemCode: item.itemCode, |
|
|
UnplannedreceiptRequestDetailLabelRules.productionLineCodePackage[0].required = false |
|
|
sort: '', |
|
|
} |
|
|
by: 'ASC', |
|
|
if(item.field == 'supplierItemCode') { |
|
|
}).then(response => { |
|
|
item.tableForm.isInpuFocusShow = true |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
item.tableForm.disabled = false |
|
|
if(itemColumns.field == 'supplierItemCode') { |
|
|
UnplannedreceiptRequestDetailLabelRules.supplierItemCode[0].required = true |
|
|
item.supplierItemCode = response?.list[0]?.supplierCode |
|
|
} |
|
|
} |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
}else if (item.itemType=='可制造') { |
|
|
// 修改 tableform 属性 |
|
|
detailListTableColumns.tableFormColumns = UnplannedreceiptRequestDetailLabel.allSchemas.tableFormColumns.filter(item => item.field != 'supplierItemCode') |
|
|
detailListTableColumns.tableFormColumns.map(item => { |
|
|
ProductionlineitemApi.getProductionlineitemPage({ |
|
|
if(item.field == 'supplierItemCode') { |
|
|
pageNo: 1, |
|
|
item.tableForm.isInpuFocusShow = false |
|
|
itemCode: item.itemCode, |
|
|
item.tableForm.disabled = true |
|
|
sort: '', |
|
|
UnplannedreceiptRequestDetailLabelRules.supplierItemCode[0].required = false |
|
|
by: 'ASC', |
|
|
} |
|
|
}).then(response => { |
|
|
if(item.field == 'productionLineCodePackage') { |
|
|
detailListTableColumns.tableFormColumns.map(itemColumns => { |
|
|
item.tableForm.isInpuFocusShow = true |
|
|
if(itemColumns.field == 'productionLineCodePackage') { |
|
|
item.tableForm.disabled = false |
|
|
item.productionLineCodePackage = response?.list[0]?.productionLineCode |
|
|
UnplannedreceiptRequestDetailLabelRules.productionLineCodePackage[0].required = true |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
}) |
|
|
} else { |
|
|
} |
|
|
message.warning('没有查询到物料代码:【' + item.itemCode + '】') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
ruleApi.getManagementPrecision({ |
|
|
ruleApi.getManagementPrecision({ |
|
|
itemCodes: [item['itemCode']], |
|
|
itemCodes: [item['itemCode']], |
|
|
locationCode:item['toLocationCode'] |
|
|
locationCode:item['toLocationCode'] |
|
|