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 { usePageLoading } from '@/hooks/web/usePageLoading'
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()
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) => {
console.log("val",val)
if (val == 'mainClose') { //
@ -498,50 +504,37 @@ const buttonTableClick = async (val, row) => {
// dialogVisible.value = true
formLabelRef.value.open('create', row)
detatableData.tableList.map((item) => {
// 线
ItembasicApi.getItembasicPage({
pageSize: 10,
pageNo: 1,
code: item.itemCode,
sort: '',
by: 'ASC',
}).then(res => {
if (res.list.length > 0) {
//
if (res.list[0].enableMake == "FALSE") {
if (item.itemType=='可采购') {
detailListTableColumns.tableFormColumns = UnplannedreceiptRequestDetailLabel.allSchemas.tableFormColumns.filter(item=>item.field != 'productionLineCodePackage')
// tableform
detailListTableColumns.tableFormColumns.map(item => {
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
UnplannedreceiptRequestDetailLabelRules.productionLineCodePackage[0].required = false
}
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false
UnplannedreceiptRequestDetailLabelRules.supplierItemCode[0].required = true
}
SupplieritemApi.getSupplieritemPage({
pageSize: 10,
pageNo: 1,
itemCode: item.itemCode,
sort: '',
by: 'ASC',
}).then(response => {
detailListTableColumns.tableFormColumns.map(itemColumns => {
if(itemColumns.field == 'supplierItemCode') {
item.supplierItemCode = response?.list[0]?.supplierCode
}
})
})
} else {
// tableform
detailListTableColumns.tableFormColumns.map(item => {
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
UnplannedreceiptRequestDetailLabelRules.supplierItemCode[0].required = false
}
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false
UnplannedreceiptRequestDetailLabelRules.productionLineCodePackage[0].required = true
}else if (item.itemType=='可制造') {
detailListTableColumns.tableFormColumns = UnplannedreceiptRequestDetailLabel.allSchemas.tableFormColumns.filter(item => item.field != 'supplierItemCode')
ProductionlineitemApi.getProductionlineitemPage({
pageNo: 1,
itemCode: item.itemCode,
sort: '',
by: 'ASC',
}).then(response => {
detailListTableColumns.tableFormColumns.map(itemColumns => {
if(itemColumns.field == 'productionLineCodePackage') {
item.productionLineCodePackage = response?.list[0]?.productionLineCode
}
})
}
} else {
message.warning('没有查询到物料代码:【' + item.itemCode + '】')
return
}
})
})
}
ruleApi.getManagementPrecision({
itemCodes: [item['itemCode']],
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 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 { t } = useI18n() // 国际化
@ -1762,6 +1768,51 @@ export const UnplannedreceiptRequestDetailLabel = useCrudSchemas(reactive<CrudSc
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