Browse Source

计划外入库可显示供应商和生产线代码

intex_online20241205
张立 2 months ago
parent
commit
22fd925f05
  1. 73
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  2. 51
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

73
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -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']

51
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -24,6 +24,12 @@ import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadPr
import * as QadProjectApi from '@/api/wms/qadProject' import * as QadProjectApi from '@/api/wms/qadProject'
import * as BusinesstypeApi from '@/api/wms/businesstype' import * as BusinesstypeApi from '@/api/wms/businesstype'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
const businessType = 'UnplannedReceipt' const businessType = 'UnplannedReceipt'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -1762,6 +1768,51 @@ export const UnplannedreceiptRequestDetailLabel = useCrudSchemas(reactive<CrudSc
disabled: true, disabled: true,
} }
}, },
{
label: '标签生产线代码',
field: 'productionLineCodePackage',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'productionLineCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'itemCode',
value: 'itemCode',
isMainValue: true
}]
}
},
{
label: '标签供应商代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'itemCode',
value: 'itemCode',
message: '请填写物料代码!',
isMainValue: true
}]
}
},
])) ]))
//表单校验 //表单校验

Loading…
Cancel
Save