ljlong_2630
3 months ago
6 changed files with 748 additions and 0 deletions
@ -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 }) |
|||
} |
|||
} |
|||
|
|||
|
@ -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 }) |
|||
} |
|||
} |
|||
|
|||
|
@ -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> |
@ -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 |
|||
}, |
|||
}, |
|||
])) |
@ -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> |
@ -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…
Reference in new issue