Browse Source

翻包追溯记录

master_hella_20240701
陈薪名 8 months ago
parent
commit
4ec4c57b8e
  1. 83
      src/api/wms/packageoverRetrospect/index.ts
  2. 25
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts
  3. 129
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue
  4. 409
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts

83
src/api/wms/packageoverRetrospect/index.ts

@ -0,0 +1,83 @@
import request from '@/config/axios'
export interface PackageoverRetrospectVO {
id: number
number: string
jobNumber: string
warehouseCode: string
areaCode: string
locationGroupCode: string
locationCode: string
itemCode: string
itemName: string
itemDesc1: string
itemDesc2: string
projectCode: string
qty: number
uom: string
requestTime: Date
dueTime: Date
fromPackingNumber: string
toPackingNumber: string
fromBatch: string
toBatch: string
fromPackUnit: string
toPackUnit: string
fromPackQty: number
toPackQty: number
fromInventoryStatus: string
toInventoryStatus: string
fromContainerNumber: string
toContainerNumber: string
businessType: string
departmentCode: string
outTransactionType: string
inTransactionType: string
executeTime: Date
activeDate: Date
fromOwnerCode: string
toOwnerCode: string
remark: string
available: string
}
// 查询翻包记录主列表
export const getPackageoverRetrospectPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/packageover-retrospect/senior', data })
} else {
return await request.get({ url: `/wms/packageover-retrospect/page`, params })
}
}
// 查询翻包记录主详情
export const getPackageoverRetrospect = async (id: number) => {
return await request.get({ url: `/wms/packageover-retrospect/get?id=` + id })
}
// 新增翻包记录主
export const createPackageoverRetrospect = async (data: PackageoverRetrospectVO) => {
return await request.post({ url: `/wms/packageover-retrospect/create`, data })
}
// 修改翻包记录主
export const updatePackageoverRetrospect = async (data: PackageoverRetrospectVO) => {
return await request.put({ url: `/wms/packageover-retrospect/update`, data })
}
// 删除翻包记录主
export const deletePackageoverRetrospect = async (id: number) => {
return await request.delete({ url: `/wms/packageover-retrospect/delete?id=` + id })
}
// 导出翻包记录主 Excel
export const exportPackageoverRetrospect = async (params) => {
return await request.download({ url: `/wms/packageover-retrospect/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/packageover-retrospect/get-import-template' })
}

25
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts

@ -193,7 +193,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -212,7 +212,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyLocation',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -231,7 +231,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -250,7 +250,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowBiggerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 180
@ -269,7 +269,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowSmallerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 180
@ -288,7 +288,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyInventoryStatus',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 180
@ -307,7 +307,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowContinuousScanning',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -326,7 +326,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowPartialComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -345,7 +345,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyBatch',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -364,7 +364,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyPackingNumber',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -382,6 +382,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '承接人用户名',
field: 'acceptUserId',
sort: 'custom',
isTable: false,
table: {
width: 150
},
@ -394,6 +395,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: false,
table: {
width: 180
},
@ -410,6 +412,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '完成人用户名',
field: 'completeUserId',
sort: 'custom',
isTable: false,
table: {
width: 150
},
@ -422,6 +425,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
isTable: false,
table: {
width: 180
},
@ -438,6 +442,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '业务类型',
field: 'businessType',
sort: 'custom',
isTable: false,
table: {
width: 150
},

129
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue

@ -0,0 +1,129 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="PackageoverRetrospect.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="PackageoverRetrospect.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>
</Table>
</ContentWrap>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="PackageoverRetrospect.allSchemas" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { PackageoverRetrospect } from './packageoverRetrospect.data'
import * as PackageoverRetrospectApi from '@/api/wms/packageoverRetrospect'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'PackageoverRetrospect' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PackageoverRetrospect.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: PackageoverRetrospectApi.getPackageoverRetrospectPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:packageoverRetrospect:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:packageoverRetrospect:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:packageoverRetrospect: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 detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicPackageoverRetrospect')
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PackageoverRetrospectApi.exportPackageoverRetrospect(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>

409
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts

@ -0,0 +1,409 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
// 表单校验
export const PackageoverRetrospectRules = reactive({
})
export const PackageoverRetrospect = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 180
},
},
{
label: '任务单据号',
field: 'jobNumber',
sort: 'custom',
table: {
width: 180
},
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 120
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
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
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
table: {
width: 150
},
},
{
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: 'fromPackingNumber',
sort: 'custom',
isSearch: true,
table: {
width: 200
},
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
isSearch: true,
table: {
width: 200
},
},
{
label: '从批次',
field: 'fromBatch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从包装规格',
field: 'fromPackUnit',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到包装规格',
field: 'toPackUnit',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从标包数量',
field: 'fromPackQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到标包数量',
field: 'toPackQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库存状态',
field: 'fromInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库存状态',
field: 'toInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isTable:false
},
{
label: '接口类型',
field: 'interfaceType',
sort: 'custom',
isTable:false
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isTable:false
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable:false
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable:false
},
{
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: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
isForm: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isTable:false
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '创建者',
field: 'creator',
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: 'update',
sort: 'custom',
table: {
width: 150
},
},
{
label: '最后更新时间',
field: 'updateTime',
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',
}
},
}
]))
Loading…
Cancel
Save