Browse Source

缺陷:HL-5048,HL-5049 优化:将装配收货明细中mes,bom单独提出一个菜单展示,并配有主要字段搜索功能

hella_online_20240816
ljlong_2630 4 months ago
parent
commit
880f97f1b0
  1. 46
      src/api/wms/mesRawMaterialConsumptionInfo/index.ts
  2. 46
      src/api/wms/rawMaterialConsumptionInfo/index.ts
  3. 112
      src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue
  4. 173
      src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/mesRawMaterialConsumptionInfo.data.ts
  5. 111
      src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue
  6. 260
      src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/rawMaterialConsumptionInfo.data.ts

46
src/api/wms/mesRawMaterialConsumptionInfo/index.ts

@ -0,0 +1,46 @@
import request from '@/config/axios'
export const AssemblyFinishedMaterialConsumptionMesRespVO = {
finishPackingNumber: '',
finishBatch: '',
finishItemCode: '',
finishCreateTime: new Date(),
id: 0,
processCode: '',
bomVersion: '',
packingNumber: '',
batch: '',
inventoryStatus: '',
fromLocationCode: '',
fromLocationGroupCode: '',
fromAreaCode: '',
itemName: '',
itemDesc1: '',
itemDesc2: '',
projectCode: '',
qty: '',
uom: '',
number: '',
itemCode: '',
remark: '',
createTime: new Date(),
creator: '',
code: '',
interfaceType: '',
jobDetailId: ''
};
// 查询QAD项目信息列表
export const getMesRawMaterialConsumptionInfoPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productreceipt-detailb/getAssemblyMaterialUsageMesSenior', data })
} else {
return await request.get({ url: `/wms/productreceipt-detailb/getAssemblyMaterialUsageMes`, params })
}
}

46
src/api/wms/rawMaterialConsumptionInfo/index.ts

@ -0,0 +1,46 @@
import request from '@/config/axios'
export const AssemblyFinishedMaterialConsumptionRespVO = {
finishPackingNumber: '',
finishBatch: '',
finishItemCode: '',
finishCreateTime: new Date(),
id: 0,
processCode: '',
bomVersion: '',
packingNumber: '',
batch: '',
inventoryStatus: '',
fromLocationCode: '',
fromLocationGroupCode: '',
fromAreaCode: '',
itemName: '',
itemDesc1: '',
itemDesc2: '',
projectCode: '',
qty: '',
uom: '',
number: '',
itemCode: '',
remark: '',
createTime: new Date(),
creator: '',
code: '',
interfaceType: '',
jobDetailId: ''
};
// 查询QAD项目信息列表
export const getRawMaterialConsumptionInfoPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/backflush-record-detailb/getAssemblyMaterialUsageSenior', data })
} else {
return await request.get({ url: `/wms/backflush-record-detailb/getAssemblyMaterialUsage`, params })
}
}

112
src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue

@ -0,0 +1,112 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...MesRawMaterialConsumptionInfo.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="MesRawMaterialConsumptionInfo.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as MesRawMaterialConsumptionInfoApi from '@/api/wms/mesRawMaterialConsumptionInfo'
import { getAccessToken } from '@/utils/auth'
import {
MesRawMaterialConsumptionInfo
} from './mesRawMaterialConsumptionInfo.data'
import { getJmreportBaseUrl } from '@/utils/systemParam'
//
defineOptions({ name: 'RawMaterialConsumptionInfo' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...MesRawMaterialConsumptionInfo.allSchemas.tableColumns])
const mesModelVisible = ref(false)
const { tableObject: tableObject, tableMethods: tableMethods } =useTable({
getListApi: MesRawMaterialConsumptionInfoApi.getMesRawMaterialConsumptionInfoPage
})
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-record-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
// handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

173
src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/mesRawMaterialConsumptionInfo.data.ts

@ -0,0 +1,173 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
export const MesRawMaterialConsumptionInfo = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '成品包装号',
field: 'finishedPackingNumber',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '成品批次',
field: 'finishedBatch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '成品物料代码',
field: 'finishedItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '成品创建时间',
field: 'finishedCreateTime',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '成品创建人',
field: 'finishedCreator',
sort: 'custom',
isTable: true,
table: {
width: 150
},
},
{
label: '唯一码',
field: 'remark',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '客户物料号',
field: 'customerItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '原料包装号',
field: 'packingNumber',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '原料旧包装号',
field: 'oldPackingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '原料批次',
field: 'batch',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '原料主表ID',
field: 'masterId',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料外部零件号',
field: 'outsideItemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料外部生产日期',
field: 'outsideProduceDate',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料外部流水号',
field: 'outsideSerialNumber',
sort: 'custom',
table: {
width: 150
},
},
]))

111
src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue

@ -0,0 +1,111 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...RawMaterialConsumptionInfo.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RawMaterialConsumptionInfo.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as RawMaterialConsumptionInfoApi from '@/api/wms/rawMaterialConsumptionInfo'
import { getAccessToken } from '@/utils/auth'
import {
RawMaterialConsumptionInfo
} from './rawMaterialConsumptionInfo.data'
import { getJmreportBaseUrl } from '@/utils/systemParam'
//
defineOptions({ name: 'RawMaterialConsumptionInfo' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...RawMaterialConsumptionInfo.allSchemas.tableColumns])
const mesModelVisible = ref(false)
const { tableObject: tableObject, tableMethods: tableMethods } =useTable({
getListApi: RawMaterialConsumptionInfoApi.getRawMaterialConsumptionInfoPage
})
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-record-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
// handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

260
src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/rawMaterialConsumptionInfo.data.ts

@ -0,0 +1,260 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
/**
* @returns {Array}
*/
export const RawMaterialConsumptionInfo = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '成品包装号',
field: 'finishedPackingNumber',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '成品批次',
field: 'finishedBatch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '成品物料代码',
field: 'finishedItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '成品创建时间',
field: 'finishedCreateTime',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '成品创建人',
field: 'finishedCreator',
sort: 'custom',
isTable: true,
table: {
width: 150
},
},
{
label: '原料工序代码',
field: 'processCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料BOM版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '原料库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料从库位组代码',
field: 'fromLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料从库区代码',
field: 'fromAreaCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
},
{
label: '原料物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '原料备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '原料创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '原料计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
]))
Loading…
Cancel
Save