zhaoxuebing
11 months ago
15 changed files with 2157 additions and 25 deletions
@ -0,0 +1,61 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface PackagemergeDetailVO { |
|||
id: number |
|||
locationCode: string |
|||
locationGroupCode: string |
|||
areaCode: string |
|||
fromPackingNumber: string |
|||
toPackingNumber: string |
|||
fromBatch: string |
|||
toBatch: string |
|||
fromInventoryStatus: string |
|||
toInventoryStatus: string |
|||
fromContainerNumber: string |
|||
toContainerNumber: string |
|||
fromOwnerCode: string |
|||
toOwnerCode: string |
|||
masterId: number |
|||
number: string |
|||
itemCode: string |
|||
remark: string |
|||
siteId: string |
|||
itemName: string |
|||
itemDesc1: string |
|||
itemDesc2: string |
|||
projectCode: string |
|||
toQty: number |
|||
fromQty: number |
|||
uom: string |
|||
interfaceType: string |
|||
} |
|||
|
|||
// 查询合包记录子列表
|
|||
export const getPackagemergeDetailPage = async (params) => { |
|||
return await request.get({ url: '/wms/packagemerge-detail/page', params }) |
|||
} |
|||
|
|||
// 查询合包记录子详情
|
|||
export const getPackagemergeDetail = async (id: number) => { |
|||
return await request.get({ url: '/wms/packagemerge-detail/get?id=' + id }) |
|||
} |
|||
|
|||
// 新增合包记录子
|
|||
export const createPackagemergeDetail = async (data: PackagemergeDetailVO) => { |
|||
return await request.post({ url: '/wms/packagemerge-detail/create', data }) |
|||
} |
|||
|
|||
// 修改合包记录子
|
|||
export const updatePackagemergeDetail = async (data: PackagemergeDetailVO) => { |
|||
return await request.put({ url: '/wms/packagemerge-detail/update', data }) |
|||
} |
|||
|
|||
// 删除合包记录子
|
|||
export const deletePackagemergeDetail = async (id: number) => { |
|||
return await request.delete({ url: '/wms/packagemerge-detail/delete?id=' + id }) |
|||
} |
|||
|
|||
// 导出合包记录子 Excel
|
|||
export const exportPackagemergeDetailApi = async (params) => { |
|||
return await request.download({ url: '/wms/packagemerge-detail/export-excel', params }) |
|||
} |
@ -0,0 +1,68 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface PackagemergeMainVO { |
|||
id: number |
|||
warehouseCode: string |
|||
details: string |
|||
outTransactionType: string |
|||
inTransactionType: string |
|||
executeTime: Date |
|||
activeDate: Date |
|||
available: string |
|||
requestTime: Date |
|||
dueTime: Date |
|||
departmentCode: string |
|||
userGroupCode: string |
|||
interfaceType: string |
|||
number: string |
|||
businessType: string |
|||
remark: string |
|||
extraProperties: string |
|||
siteId: string |
|||
} |
|||
|
|||
// 查询合包记录主列表
|
|||
export const getPackagemergeMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/packagemerge-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/packagemerge-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询合包记录主详情
|
|||
export const getPackagemergeMain = async (id: number) => { |
|||
return await request.get({ url: `/wms/packagemerge-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增合包记录主
|
|||
export const createPackagemergeMain = async (data: PackagemergeMainVO) => { |
|||
return await request.post({ url: `/wms/packagemerge-main/create`, data }) |
|||
} |
|||
|
|||
// 修改合包记录主
|
|||
export const updatePackagemergeMain = async (data: PackagemergeMainVO) => { |
|||
return await request.put({ url: `/wms/packagemerge-main/update`, data }) |
|||
} |
|||
|
|||
// 删除合包记录主
|
|||
export const deletePackagemergeMain = async (id: number) => { |
|||
return await request.delete({ url: `/wms/packagemerge-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出合包记录主 Excel
|
|||
export const exportPackagemergeMain = async (params) => { |
|||
if (params.isSearch) { |
|||
const data = {...params} |
|||
return await request.downloadPost({ url: `/wms/packagemerge-main/export-excel-senior`, data }) |
|||
} else { |
|||
return await request.download({ url: `/wms/packagemerge-main/export-excel`, params }) |
|||
} |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/packagemerge-main/get-import-template' }) |
|||
} |
@ -0,0 +1,61 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface PackageoverDetailVO { |
|||
id: number |
|||
locationCode: string |
|||
locationGroupCode: string |
|||
areaCode: string |
|||
fromPackingNumber: string |
|||
toPackingNumber: string |
|||
fromBatch: string |
|||
toBatch: string |
|||
fromInventoryStatus: string |
|||
toInventoryStatus: string |
|||
fromContainerNumber: string |
|||
toContainerNumber: string |
|||
fromOwnerCode: string |
|||
toOwnerCode: string |
|||
masterId: number |
|||
number: string |
|||
itemCode: string |
|||
remark: string |
|||
siteId: string |
|||
itemName: string |
|||
itemDesc1: string |
|||
itemDesc2: string |
|||
projectCode: string |
|||
toQty: number |
|||
fromQty: number |
|||
uom: string |
|||
interfaceType: string |
|||
} |
|||
|
|||
// 查询翻包记录子列表
|
|||
export const getPackageoverDetailPage = async (params) => { |
|||
return await request.get({ url: '/wms/packageover-detail/page', params }) |
|||
} |
|||
|
|||
// 查询翻包记录子详情
|
|||
export const getPackageoverDetail = async (id: number) => { |
|||
return await request.get({ url: '/wms/packageover-detail/get?id=' + id }) |
|||
} |
|||
|
|||
// 新增翻包记录子
|
|||
export const createPackageoverDetail = async (data: PackageoverDetailVO) => { |
|||
return await request.post({ url: '/wms/packageover-detail/create', data }) |
|||
} |
|||
|
|||
// 修改翻包记录子
|
|||
export const updatePackageoverDetail = async (data: PackageoverDetailVO) => { |
|||
return await request.put({ url: '/wms/packageover-detail/update', data }) |
|||
} |
|||
|
|||
// 删除翻包记录子
|
|||
export const deletePackageoverDetail = async (id: number) => { |
|||
return await request.delete({ url: '/wms/packageover-detail/delete?id=' + id }) |
|||
} |
|||
|
|||
// 导出翻包记录子 Excel
|
|||
export const exportPackageoverDetailApi = async (params) => { |
|||
return await request.download({ url: '/wms/packageover-detail/export-excel', params }) |
|||
} |
@ -0,0 +1,63 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface PackageoverMainVO { |
|||
id: number |
|||
warehouseCode: string |
|||
details: string |
|||
outTransactionType: string |
|||
inTransactionType: string |
|||
executeTime: Date |
|||
activeDate: Date |
|||
available: string |
|||
requestTime: Date |
|||
dueTime: Date |
|||
departmentCode: string |
|||
userGroupCode: string |
|||
interfaceType: string |
|||
number: string |
|||
businessType: string |
|||
remark: string |
|||
extraProperties: string |
|||
siteId: string |
|||
} |
|||
|
|||
// 查询翻包记录主列表
|
|||
export const getPackageoverMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/packageover-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/packageover-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询翻包记录主详情
|
|||
export const getPackageoverMain = async (id: number) => { |
|||
return await request.get({ url: '/wms/packageover-main/get?id=' + id }) |
|||
} |
|||
|
|||
// 新增翻包记录主
|
|||
export const createPackageoverMain = async (data: PackageoverMainVO) => { |
|||
return await request.post({ url: '/wms/packageover-main/create', data }) |
|||
} |
|||
|
|||
// 修改翻包记录主
|
|||
export const updatePackageoverMain = async (data: PackageoverMainVO) => { |
|||
return await request.put({ url: '/wms/packageover-main/update', data }) |
|||
} |
|||
|
|||
// 删除翻包记录主
|
|||
export const deletePackageoverMain = async (id: number) => { |
|||
return await request.delete({ url: '/wms/packageover-main/delete?id=' + id }) |
|||
} |
|||
|
|||
// 导出翻包记录主 Excel
|
|||
export const exportPackageoverMainApi = async (params) => { |
|||
if (params.isSearch) { |
|||
const data = {...params} |
|||
return await request.downloadPost({ url: `/wms/packageover-main/export-excel-senior`, data }) |
|||
} else { |
|||
return await request.download({ url: `/wms/packageover-main/export-excel`, params }) |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface PackagesplitDetailVO { |
|||
id: number |
|||
locationCode: string |
|||
locationGroupCode: string |
|||
areaCode: string |
|||
fromPackingNumber: string |
|||
toPackingNumber: string |
|||
fromBatch: string |
|||
toBatch: string |
|||
fromInventoryStatus: string |
|||
toInventoryStatus: string |
|||
fromContainerNumber: string |
|||
toContainerNumber: string |
|||
fromOwnerCode: string |
|||
toOwnerCode: string |
|||
masterId: number |
|||
number: string |
|||
itemCode: string |
|||
remark: string |
|||
siteId: string |
|||
itemName: string |
|||
itemDesc1: string |
|||
itemDesc2: string |
|||
projectCode: string |
|||
toQty: number |
|||
fromQty: number |
|||
uom: string |
|||
interfaceType: string |
|||
} |
|||
|
|||
// 查询拆包记录子列表
|
|||
export const getPackagesplitDetailPage = async (params) => { |
|||
return await request.get({ url: '/wms/packagesplit-detail/page', params }) |
|||
} |
|||
|
|||
// 查询拆包记录子详情
|
|||
export const getPackagesplitDetail = async (id: number) => { |
|||
return await request.get({ url: '/wms/packagesplit-detail/get?id=' + id }) |
|||
} |
|||
|
|||
// 新增拆包记录子
|
|||
export const createPackagesplitDetail = async (data: PackagesplitDetailVO) => { |
|||
return await request.post({ url: '/wms/packagesplit-detail/create', data }) |
|||
} |
|||
|
|||
// 修改拆包记录子
|
|||
export const updatePackagesplitDetail = async (data: PackagesplitDetailVO) => { |
|||
return await request.put({ url: '/wms/packagesplit-detail/update', data }) |
|||
} |
|||
|
|||
// 删除拆包记录子
|
|||
export const deletePackagesplitDetail = async (id: number) => { |
|||
return await request.delete({ url: '/wms/packagesplit-detail/delete?id=' + id }) |
|||
} |
|||
|
|||
// 导出拆包记录子 Excel
|
|||
export const exportPackagesplitDetailApi = async (params) => { |
|||
return await request.download({ url: '/wms/packagesplit-detail/export-excel', params }) |
|||
} |
@ -0,0 +1,63 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface PackagesplitMainVO { |
|||
id: number |
|||
warehouseCode: string |
|||
details: string |
|||
outTransactionType: string |
|||
inTransactionType: string |
|||
executeTime: Date |
|||
activeDate: Date |
|||
available: string |
|||
requestTime: Date |
|||
dueTime: Date |
|||
departmentCode: string |
|||
userGroupCode: string |
|||
interfaceType: string |
|||
number: string |
|||
businessType: string |
|||
remark: string |
|||
extraProperties: string |
|||
siteId: string |
|||
} |
|||
|
|||
// 查询拆包记录主列表
|
|||
export const getPackagesplitMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/packagesplit-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/packagesplit-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询拆包记录主详情
|
|||
export const getPackagesplitMain = async (id: number) => { |
|||
return await request.get({ url: '/wms/packagesplit-main/get?id=' + id }) |
|||
} |
|||
|
|||
// 新增拆包记录主
|
|||
export const createPackagesplitMain = async (data: PackagesplitMainVO) => { |
|||
return await request.post({ url: '/wms/packagesplit-main/create', data }) |
|||
} |
|||
|
|||
// 修改拆包记录主
|
|||
export const updatePackagesplitMain = async (data: PackagesplitMainVO) => { |
|||
return await request.put({ url: '/wms/packagesplit-main/update', data }) |
|||
} |
|||
|
|||
// 删除拆包记录主
|
|||
export const deletePackagesplitMain = async (id: number) => { |
|||
return await request.delete({ url: '/wms/packagesplit-main/delete?id=' + id }) |
|||
} |
|||
|
|||
// 导出拆包记录主 Excel
|
|||
export const exportPackagesplitMainApi = async (params) => { |
|||
if (params.isSearch) { |
|||
const data = {...params} |
|||
return await request.downloadPost({ url: `/wms/packagesplit-main/export-excel-senior`, data }) |
|||
} else { |
|||
return await request.download({ url: `/wms/packagesplit-main/export-excel`, params }) |
|||
} |
|||
} |
@ -0,0 +1,157 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="PackagemergeMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="PackagemergeMain.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
: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 #number="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|||
<span>{{ row.number }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="formRef" |
|||
@success="getList" |
|||
:rules="PackagemergeMainRules" |
|||
:formAllSchemas="PackagemergeMain.allSchemas" |
|||
:tableAllSchemas="PackagemergeDetail.allSchemas" |
|||
:tableFormRules="PackagemergeDetailRules" |
|||
:isBusiness="true" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail |
|||
ref="detailRef" |
|||
:isBasic="false" |
|||
:allSchemas="PackagemergeMain.allSchemas" |
|||
:detailAllSchemas="PackagemergeDetail.allSchemas" |
|||
:detailAllSchemasRules="PackagemergeDetailRules" |
|||
:apiPage="PackagemergeDetailApi.getPackagemergeDetailPage" |
|||
/> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { PackagemergeMain,PackagemergeMainRules, PackagemergeDetail, PackagemergeDetailRules } from './packagemergeMain.data' |
|||
import * as PackagemergeMainApi from '@/api/wms/packagemergeMain' |
|||
import * as PackagemergeDetailApi from '@/api/wms/packagemergeDetail' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
// 合包记录 |
|||
defineOptions({ name: 'PackagemergeMain' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(PackagemergeMain.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: PackagemergeMainApi.getPackagemergeMainPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:packagemerge-main:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = (row) => { |
|||
return [] |
|||
} |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue) |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await PackagemergeMainApi.exportPackagemergeMain(tableObject.params) |
|||
download.excel(data, '合包记录.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
</script> |
@ -0,0 +1,415 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
export const PackagemergeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '仓库代码', |
|||
field: 'warehouseCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 120 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '出库事务类型', |
|||
field: 'outTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '入库事务类型', |
|||
field: 'inTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '执行时间', |
|||
field: 'executeTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '生效日期', |
|||
field: 'activeDate', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '申请时间', |
|||
field: 'requestTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '截止时间', |
|||
field: 'dueTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '用户组', |
|||
field: 'userGroupCode', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '接口类型', |
|||
field: 'interfaceType', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
|
|||
{ |
|||
label: '业务类型', |
|||
field: 'businessType', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
isSearch: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Switch', |
|||
value: 'TRUE', |
|||
componentProps: { |
|||
inactiveValue: 'FALSE', |
|||
activeValue: 'TRUE' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
} |
|||
])) |
|||
|
|||
// 表单校验
|
|||
export const PackagemergeMainRules = reactive({ |
|||
}) |
|||
|
|||
export const PackagemergeDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库位代码', |
|||
field: 'locationCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库位组代码', |
|||
field: 'locationGroupCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库区代码', |
|||
field: 'areaCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从包装号', |
|||
field: 'fromPackingNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到包装号', |
|||
field: 'toPackingNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从批次', |
|||
field: 'fromBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到批次', |
|||
field: 'toBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从库存状态', |
|||
field: 'fromInventoryStatus', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到库存状态', |
|||
field: 'toInventoryStatus', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从器具号', |
|||
field: 'fromContainerNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到器具号', |
|||
field: 'toContainerNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从货主代码', |
|||
field: 'fromOwnerCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到货主代码', |
|||
field: 'toOwnerCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物品代码', |
|||
field: 'itemCode', |
|||
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: 'toQty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从数量', |
|||
field: 'fromQty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
])) |
|||
|
|||
// 表单校验
|
|||
export const PackagemergeDetailRules = reactive({ |
|||
}) |
@ -0,0 +1,157 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="PackageoverMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="PackageoverMain.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
: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 #number="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|||
<span>{{ row.number }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="formRef" |
|||
@success="getList" |
|||
:rules="PackageoverMainRules" |
|||
:formAllSchemas="PackageoverMain.allSchemas" |
|||
:tableAllSchemas="PackageoverDetail.allSchemas" |
|||
:tableFormRules="PackageoverDetailRules" |
|||
:isBusiness="true" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail |
|||
ref="detailRef" |
|||
:isBasic="false" |
|||
:allSchemas="PackageoverMain.allSchemas" |
|||
:detailAllSchemas="PackageoverDetail.allSchemas" |
|||
:detailAllSchemasRules="PackageoverDetailRules" |
|||
:apiPage="PackageoverDetailApi.getPackageoverDetailPage" |
|||
/> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { PackageoverMain,PackageoverMainRules, PackageoverDetail, PackageoverDetailRules } from './packageoverMain.data' |
|||
import * as PackageoverMainApi from '@/api/wms/packageoverMain' |
|||
import * as PackageoverDetailApi from '@/api/wms/packageoverDetail' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
// 翻包记录 |
|||
defineOptions({ name: 'PackageoverMain' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(PackageoverMain.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: PackageoverMainApi.getPackageoverMainPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:packageover-main:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = (row) => { |
|||
return [] |
|||
} |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue) |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await PackageoverMainApi.exportPackageoverMainApi(tableObject.params) |
|||
download.excel(data, '翻包记录.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
</script> |
@ -0,0 +1,417 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
export const PackageoverMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '仓库代码', |
|||
field: 'warehouseCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 120 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '出库事务类型', |
|||
field: 'outTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '入库事务类型', |
|||
field: 'inTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '执行时间', |
|||
field: 'executeTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '生效日期', |
|||
field: 'activeDate', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '申请时间', |
|||
field: 'requestTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '截止时间', |
|||
field: 'dueTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '用户组', |
|||
field: 'userGroupCode', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '接口类型', |
|||
field: 'interfaceType', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
|
|||
{ |
|||
label: '业务类型', |
|||
field: 'businessType', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
isSearch: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Switch', |
|||
value: 'TRUE', |
|||
componentProps: { |
|||
inactiveValue: 'FALSE', |
|||
activeValue: 'TRUE' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
} |
|||
])) |
|||
|
|||
|
|||
// 表单校验
|
|||
export const PackageoverMainRules = reactive({ |
|||
}) |
|||
|
|||
// 翻包子
|
|||
export const PackageoverDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库位代码', |
|||
field: 'locationCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库位组代码', |
|||
field: 'locationGroupCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库区代码', |
|||
field: 'areaCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从包装号', |
|||
field: 'fromPackingNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到包装号', |
|||
field: 'toPackingNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从批次', |
|||
field: 'fromBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到批次', |
|||
field: 'toBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从库存状态', |
|||
field: 'fromInventoryStatus', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到库存状态', |
|||
field: 'toInventoryStatus', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从器具号', |
|||
field: 'fromContainerNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到器具号', |
|||
field: 'toContainerNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从货主代码', |
|||
field: 'fromOwnerCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到货主代码', |
|||
field: 'toOwnerCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物品代码', |
|||
field: 'itemCode', |
|||
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: 'toQty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从数量', |
|||
field: 'fromQty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
])) |
|||
|
|||
// 表单校验
|
|||
export const PackageoverDetailRules = reactive({ |
|||
}) |
@ -0,0 +1,157 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="PackagesplitMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="PackagesplitMain.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
: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 #number="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|||
<span>{{ row.number }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="formRef" |
|||
@success="getList" |
|||
:rules="PackagesplitMainRules" |
|||
:formAllSchemas="PackagesplitMain.allSchemas" |
|||
:tableAllSchemas="PackagesplitDetail.allSchemas" |
|||
:tableFormRules="PackagesplitDetailRules" |
|||
:isBusiness="true" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail |
|||
ref="detailRef" |
|||
:isBasic="false" |
|||
:allSchemas="PackagesplitMain.allSchemas" |
|||
:detailAllSchemas="PackagesplitDetail.allSchemas" |
|||
:detailAllSchemasRules="PackagesplitDetailRules" |
|||
:apiPage="PackagesplitDetailApi.getPackagesplitDetailPage" |
|||
/> |
|||
</template> |
|||
|
|||
<script setup lang="ts" > |
|||
import download from '@/utils/download' |
|||
import { PackagesplitMain,PackagesplitMainRules, PackagesplitDetail, PackagesplitDetailRules } from './packagesplitMain.data' |
|||
import * as PackagesplitMainApi from '@/api/wms/packagesplitMain' |
|||
import * as PackagesplitDetailApi from '@/api/wms/packagesplitDetail' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
// 拆包记录 |
|||
defineOptions({ name: 'PackagesplitMain' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(PackagesplitMain.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: PackagesplitMainApi.getPackagesplitMainPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:packagesplit-main:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = (row) => { |
|||
return [] |
|||
} |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue) |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await PackagesplitMainApi.exportPackagesplitMainApi(tableObject.params) |
|||
download.excel(data, '拆包记录.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
</script> |
@ -0,0 +1,417 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
|
|||
export const PackagesplitMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '仓库代码', |
|||
field: 'warehouseCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 120 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '出库事务类型', |
|||
field: 'outTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '入库事务类型', |
|||
field: 'inTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '执行时间', |
|||
field: 'executeTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '生效日期', |
|||
field: 'activeDate', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '申请时间', |
|||
field: 'requestTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '截止时间', |
|||
field: 'dueTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '用户组', |
|||
field: 'userGroupCode', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '接口类型', |
|||
field: 'interfaceType', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
|
|||
{ |
|||
label: '业务类型', |
|||
field: 'businessType', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
isSearch: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Switch', |
|||
value: 'TRUE', |
|||
componentProps: { |
|||
inactiveValue: 'FALSE', |
|||
activeValue: 'TRUE' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
} |
|||
])) |
|||
|
|||
|
|||
// 表单校验
|
|||
export const PackagesplitMainRules = reactive({ |
|||
}) |
|||
|
|||
export const PackagesplitDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库位代码', |
|||
field: 'locationCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库位组代码', |
|||
field: 'locationGroupCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库区代码', |
|||
field: 'areaCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从包装号', |
|||
field: 'fromPackingNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到包装号', |
|||
field: 'toPackingNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从批次', |
|||
field: 'fromBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到批次', |
|||
field: 'toBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从库存状态', |
|||
field: 'fromInventoryStatus', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到库存状态', |
|||
field: 'toInventoryStatus', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从器具号', |
|||
field: 'fromContainerNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到器具号', |
|||
field: 'toContainerNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从货主代码', |
|||
field: 'fromOwnerCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到货主代码', |
|||
field: 'toOwnerCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物品代码', |
|||
field: 'itemCode', |
|||
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: 'toQty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从数量', |
|||
field: 'fromQty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
])) |
|||
// 表单校验
|
|||
export const PackagesplitDetailRules = reactive({ |
|||
}) |
|||
|
Loading…
Reference in new issue