Browse Source

库存相关页面添加

master
李胜楠 1 year ago
parent
commit
e76873747a
  1. 73
      src/api/wms/balance/index.ts
  2. 52
      src/api/wms/containerDetail/index.ts
  3. 51
      src/api/wms/containerMain/index.ts
  4. 55
      src/api/wms/expectin/index.ts
  5. 56
      src/api/wms/expectout/index.ts
  6. 51
      src/api/wms/locationcapacity/index.ts
  7. 71
      src/api/wms/transaction/index.ts
  8. 80
      src/api/wms/transferlog/index.ts
  9. 349
      src/views/wms/inventoryManage/balance/balance.data.ts
  10. 211
      src/views/wms/inventoryManage/balance/index.vue
  11. 158
      src/views/wms/inventoryManage/container/containerMain.data.ts
  12. 165
      src/views/wms/inventoryManage/container/index.vue
  13. 134
      src/views/wms/inventoryManage/expectin/expectin.data.ts
  14. 211
      src/views/wms/inventoryManage/expectin/index.vue
  15. 145
      src/views/wms/inventoryManage/expectout/expectout.data.ts
  16. 211
      src/views/wms/inventoryManage/expectout/index.vue
  17. 211
      src/views/wms/inventoryManage/locationcapacity/index.vue
  18. 89
      src/views/wms/inventoryManage/locationcapacity/locationcapacity.data.ts
  19. 211
      src/views/wms/inventoryManage/transaction/index.vue
  20. 313
      src/views/wms/inventoryManage/transaction/transaction.data.ts
  21. 211
      src/views/wms/inventoryManage/transferlog/index.vue
  22. 370
      src/views/wms/inventoryManage/transferlog/transferlog.data.ts

73
src/api/wms/balance/index.ts

@ -0,0 +1,73 @@
import request from '@/config/axios'
export interface BalanceVO {
packingNumber: string
containerNumber: string
itemCode: string
batch: string
altBatch: string
arriveDate: Date
produceDate: Date
expireDate: Date
inventoryStatus: string
locationCode: string
locationGroupCode: string
areaCode: string
warehouseCode: string
erpLocationCode: string
ownerCode: string
uom: string
qty: number
lockedQty: number
usableQty: number
singlePrice: number
amount: number
putInTime: Date
frozen: string
frozenReason: string
lastTransNumber: string
weight: number
area: number
volume: number
}
// 查询库存余额列表
export const getBalancePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/balance/senior', data })
} else {
return await request.get({ url: `/wms/balance/page`, params })
}
}
// 查询库存余额详情
export const getBalance = async (id: number) => {
return await request.get({ url: `/wms/balance/get?id=` + id })
}
// 新增库存余额
export const createBalance = async (data: BalanceVO) => {
return await request.post({ url: `/wms/balance/create`, data })
}
// 修改库存余额
export const updateBalance = async (data: BalanceVO) => {
return await request.put({ url: `/wms/balance/update`, data })
}
// 删除库存余额
export const deleteBalance = async (id: number) => {
return await request.delete({ url: `/wms/balance/delete?id=` + id })
}
// 导出库存余额 Excel
export const exportBalance = async (params) => {
return await request.download({ url: `/wms/balance/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/balance/get-import-template' })
}

52
src/api/wms/containerDetail/index.ts

@ -0,0 +1,52 @@
import request from '@/config/axios'
export interface ContainerDetailVO {
containerContentType: string
contentNumber: string
itemCode: string
batch: string
inventoryStatus: string
uom: string
qty: number
}
// 查询器具子列表
export const getContainerDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/container-detail/senior', data })
} else {
return await request.get({ url: `/wms/container-detail/page`, params })
}
}
// 查询器具子详情
export const getContainerDetail = async (id: number) => {
return await request.get({ url: `/wms/container-detail/get?id=` + id })
}
// 新增器具子
export const createContainerDetail = async (data: ContainerDetailVO) => {
return await request.post({ url: `/wms/container-detail/create`, data })
}
// 修改器具子
export const updateContainerDetail = async (data: ContainerDetailVO) => {
return await request.put({ url: `/wms/container-detail/update`, data })
}
// 删除器具子
export const deleteContainerDetail = async (id: number) => {
return await request.delete({ url: `/wms/container-detail/delete?id=` + id })
}
// 导出器具子 Excel
export const exportContainerDetail = async (params) => {
return await request.download({ url: `/wms/container-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/container-detail/get-import-template' })
}

51
src/api/wms/containerMain/index.ts

@ -0,0 +1,51 @@
import request from '@/config/axios'
export interface ContainerMainVO {
id: string
number: string
type: string
capacity: number
status: string
ownerCode: string
}
// 查询器具主列表
export const getContainerMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/container-main/senior', data })
} else {
return await request.get({ url: `/wms/container-main/page`, params })
}
}
// 查询器具主详情
export const getContainerMain = async (id: number) => {
return await request.get({ url: `/wms/container-main/get?id=` + id })
}
// 新增器具主
export const createContainerMain = async (data: ContainerMainVO) => {
return await request.post({ url: `/wms/container-main/create`, data })
}
// 修改器具主
export const updateContainerMain = async (data: ContainerMainVO) => {
return await request.put({ url: `/wms/container-main/update`, data })
}
// 删除器具主
export const deleteContainerMain = async (id: number) => {
return await request.delete({ url: `/wms/container-main/delete?id=` + id })
}
// 导出器具主 Excel
export const exportContainerMain = async (params) => {
return await request.download({ url: `/wms/container-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/container-main/get-import-template' })
}

55
src/api/wms/expectin/index.ts

@ -0,0 +1,55 @@
import request from '@/config/axios'
export interface ExpectinVO {
jobNumber: string
businessType: string
itemCode: string
batch: string
inventoryStatus: string
uom: string
qty: number
locationCode: string
warehouseCode: string
ownerCode: string
}
// 查询预计入库存列表
export const getExpectinPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/expectin/senior', data })
} else {
return await request.get({ url: `/wms/expectin/page`, params })
}
}
// 查询预计入库存详情
export const getExpectin = async (id: number) => {
return await request.get({ url: `/wms/expectin/get?id=` + id })
}
// 新增预计入库存
export const createExpectin = async (data: ExpectinVO) => {
return await request.post({ url: `/wms/expectin/create`, data })
}
// 修改预计入库存
export const updateExpectin = async (data: ExpectinVO) => {
return await request.put({ url: `/wms/expectin/update`, data })
}
// 删除预计入库存
export const deleteExpectin = async (id: number) => {
return await request.delete({ url: `/wms/expectin/delete?id=` + id })
}
// 导出预计入库存 Excel
export const exportExpectin = async (params) => {
return await request.download({ url: `/wms/expectin/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/expectin/get-import-template' })
}

56
src/api/wms/expectout/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface ExpectoutVO {
jobNumber: string
businessType: string
packingNumber: string
itemCode: string
batch: string
inventoryStatus: string
uom: string
qty: number
locationCode: string
warehouseCode: string
ownerCode: string
}
// 查询预计出库存列表
export const getExpectoutPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/expectout/senior', data })
} else {
return await request.get({ url: `/wms/expectout/page`, params })
}
}
// 查询预计出库存详情
export const getExpectout = async (id: number) => {
return await request.get({ url: `/wms/expectout/get?id=` + id })
}
// 新增预计出库存
export const createExpectout = async (data: ExpectoutVO) => {
return await request.post({ url: `/wms/expectout/create`, data })
}
// 修改预计出库存
export const updateExpectout = async (data: ExpectoutVO) => {
return await request.put({ url: `/wms/expectout/update`, data })
}
// 删除预计出库存
export const deleteExpectout = async (id: number) => {
return await request.delete({ url: `/wms/expectout/delete?id=` + id })
}
// 导出预计出库存 Excel
export const exportExpectout = async (params) => {
return await request.download({ url: `/wms/expectout/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/expectout/get-import-template' })
}

51
src/api/wms/locationcapacity/index.ts

@ -0,0 +1,51 @@
import request from '@/config/axios'
export interface LocationcapacityVO {
locationCode: string
warehouseCode: string
usedCapacity: number
availableCapacity: number
bearableOverloadCapacity: number
isInfinity: string
}
// 查询库位容量列表
export const getLocationcapacityPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/locationcapacity/senior', data })
} else {
return await request.get({ url: `/wms/locationcapacity/page`, params })
}
}
// 查询库位容量详情
export const getLocationcapacity = async (id: number) => {
return await request.get({ url: `/wms/locationcapacity/get?id=` + id })
}
// 新增库位容量
export const createLocationcapacity = async (data: LocationcapacityVO) => {
return await request.post({ url: `/wms/locationcapacity/create`, data })
}
// 修改库位容量
export const updateLocationcapacity = async (data: LocationcapacityVO) => {
return await request.put({ url: `/wms/locationcapacity/update`, data })
}
// 删除库位容量
export const deleteLocationcapacity = async (id: number) => {
return await request.delete({ url: `/wms/locationcapacity/delete?id=` + id })
}
// 导出库位容量 Excel
export const exportLocationcapacity = async (params) => {
return await request.download({ url: `/wms/locationcapacity/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/locationcapacity/get-import-template' })
}

71
src/api/wms/transaction/index.ts

@ -0,0 +1,71 @@
import request from '@/config/axios'
export interface TransactionVO {
number: string
transactionType: string
inventoryAction: string
worker: string
businessType: string
recordNumber: string
activeTime: Date
itemCode: string
batch: string
inventoryStatus: string
uom: string
qty: number
singlePrice: number
amount: number
altBatch: string
arriveDate: Date
produceDate: Date
expireDate: Date
packingNumber: string
containerNumber: string
locationCode: string
warehouseCode: string
areaCode: string
locationGroupCode: string
erpLocationCode: string
ownerCode: string
}
// 查询库存事务列表
export const getTransactionPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/transaction/senior', data })
} else {
return await request.get({ url: `/wms/transaction/page`, params })
}
}
// 查询库存事务详情
export const getTransaction = async (id: number) => {
return await request.get({ url: `/wms/transaction/get?id=` + id })
}
// 新增库存事务
export const createTransaction = async (data: TransactionVO) => {
return await request.post({ url: `/wms/transaction/create`, data })
}
// 修改库存事务
export const updateTransaction = async (data: TransactionVO) => {
return await request.put({ url: `/wms/transaction/update`, data })
}
// 删除库存事务
export const deleteTransaction = async (id: number) => {
return await request.delete({ url: `/wms/transaction/delete?id=` + id })
}
// 导出库存事务 Excel
export const exportTransaction = async (params) => {
return await request.download({ url: `/wms/transaction/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transaction/get-import-template' })
}

80
src/api/wms/transferlog/index.ts

@ -0,0 +1,80 @@
import request from '@/config/axios'
export interface TransferlogVO {
number: string
transactionType: string
worker: string
businessType: string
recordNumber: string
activeTime: Date
itemCode: string
uom: string
qty: number
altBatch: string
arriveDate: Date
produceDate: Date
expireDate: Date
fomTransactionNumber: string
fromPackingNumber: string
fromBatch: string
fromInventoryStatus: string
fromContainerNumber: string
fromLocationCode: string
fromWarehouseCode: string
fromAreaCode: string
fromLocationGroupCode: string
fromErpLocationCode: string
fromOwnerCode: string
toTransactionNumber: string
toPackingNumber: string
toBatch: string
toInventoryStatus: string
toContainerNumber: string
toLocationCode: string
toWarehouseCode: string
toAreaCode: string
toLocationGroupCode: string
toErpLocationCode: string
toOwnerCode: string
}
// 查询库存转移日志列表
export const getTransferlogPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/transferlog/senior', data })
} else {
return await request.get({ url: `/wms/transferlog/page`, params })
}
}
// 查询库存转移日志详情
export const getTransferlog = async (id: number) => {
return await request.get({ url: `/wms/transferlog/get?id=` + id })
}
// 新增库存转移日志
export const createTransferlog = async (data: TransferlogVO) => {
return await request.post({ url: `/wms/transferlog/create`, data })
}
// 修改库存转移日志
export const updateTransferlog = async (data: TransferlogVO) => {
return await request.put({ url: `/wms/transferlog/update`, data })
}
// 删除库存转移日志
export const deleteTransferlog = async (id: number) => {
return await request.delete({ url: `/wms/transferlog/delete?id=` + id })
}
// 导出库存转移日志 Excel
export const exportTransferlog = async (params) => {
return await request.download({ url: `/wms/transferlog/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transferlog/get-import-template' })
}

349
src/views/wms/inventoryManage/balance/balance.data.ts

@ -0,0 +1,349 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
/**
* @returns {Array}
*/
export const Balance = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '器具代码',
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到货日期',
field: 'arriveDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '生产日期',
field: 'produceDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '失效日期',
field: 'expireDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
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: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'ERP库位代码',
field: 'erpLocationCode',
dictType: DICT_TYPE.ERP_LOCATION,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '锁定数量',
field: 'lockedQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '可用数量',
field: 'usableQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '入库时间',
field: 'putInTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '是否冻结',
field: 'frozen',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
isSearch: true,
},
{
label: '冻结原因',
field: 'frozenReason',
dictType: DICT_TYPE.FROZEN_REASON,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '最后事务号',
field: 'lastTransNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
]))
// 表单校验
export const BalanceRules = reactive({
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
containerNumber: [
{ required: true, message: '请选择器具号', trigger: 'change' }
],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
arriveDate: [
{ required: true, message: '请选择到货日期', trigger: 'change' }
],
produceDate: [
{ required: true, message: '请选择生产日期', trigger: 'change' }
],
})

211
src/views/wms/inventoryManage/balance/index.vue

@ -0,0 +1,211 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Balance.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Balance.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 #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="BalanceRules"
:formAllSchemas="Balance.allSchemas"
:apiUpdate="BalanceApi.updateBalance"
:apiCreate="BalanceApi.createBalance"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Balance.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/balance/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as BalanceApi from '@/api/wms/balance'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Balance, BalanceRules } from './balance.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Balance' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Balance.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: BalanceApi.getBalancePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:balance:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:balance:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:balance:export'}), //
defaultButtons.defaultFreshBtn(null),//
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:balance:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:balance:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
// const res = await BalanceApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplier')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await BalanceApi.deleteBalance(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await BalanceApi.exportBalance(setSearchParams)
download.excel(data, '供应商.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async() => {
getList()
importTemplateData.templateUrl = await BalanceApi.importTemplate()
})
</script>

158
src/views/wms/inventoryManage/container/containerMain.data.ts

@ -0,0 +1,158 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
/**
* @returns {Array}
*/
export const ContainerMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '号码',
field: 'number',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '类型',
field: 'type',
dictType: DICT_TYPE.CONTAINER_TYPE,
dictClass: 'string',
isTable: true,
isForm: true,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '总容量',
field: 'capacity',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
},
isSearch: true,
},
{
label: '状态',
field: 'status',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150
},
}
]))
// 表单校验
export const ContainerMainRules = reactive({
number: [
{ required: true, message: '请输入号码', trigger: 'blur' }
],
type: [
{ required: true, message: '请选择类型', trigger: 'change' }
],
status: [
{ required: true, message: '请选择状态', trigger: 'change' }
],
ownerCode: [
{ required: true, message: '请选择货主代码', trigger: 'change' }
],
})
/**
* @returns {Array}
*/
export const ContainerDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '内容物类型',
field: 'containerContentType',
dictType: DICT_TYPE.CONTAINER_CONTENT_TYPE,
dictClass: 'string',
isTable: true,
isForm: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '内容物号',
field: 'contentNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
isForm: true,
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,
isForm: true,
sort: 'custom',
table: {
width: 150
},
},
]))
// 表单校验
export const ContainerDetailRules = reactive({
containerContentType: [
{ required: true, message: '请选择内容物类型', trigger: 'change' }
],
})

165
src/views/wms/inventoryManage/container/index.vue

@ -0,0 +1,165 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ContainerMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ContainerMain.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="ContainerMainRules"
:formAllSchemas="ContainerMain.allSchemas"
:tableAllSchemas="ContainerDetail.allSchemas"
:tableFormRules="ContainerDetailRules"
:isBusiness="true"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="ContainerMain.allSchemas"
:detailAllSchemas="ContainerDetail.allSchemas"
:detailAllSchemasRules="ContainerDetailRules"
:apiPage="ContainerDetailApi.getContainerDetailPage"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ContainerMain,ContainerMainRules,ContainerDetail,ContainerDetailRules } from './containerMain.data'
import * as ContainerMainApi from '@/api/wms/containerMain'
import * as ContainerDetailApi from '@/api/wms/containerDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'ContainerMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ContainerMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ContainerMainApi.getContainerMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:container-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
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 ContainerMainApi.exportContainerMain(setSearchParams)
download.excel(data, '供应商发票记录主.xls')
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

134
src/views/wms/inventoryManage/expectin/expectin.data.ts

@ -0,0 +1,134 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
/**
* @returns {Array}
*/
export const Expectin = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '任务号',
field: 'jobNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150
},
},
]))
// 表单校验
export const ExpectinRules = reactive({
jobNumber: [
{ required: true, message: '请选择任务号', trigger: 'change' }
],
businessType: [
{ required: true, message: '请选择业务类型', trigger: 'change' }
],
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],
qty: [
{ required: true, message: '请输入数量', trigger: 'blur' }
],
locationCode: [
{ required: true, message: '请选择库位代码', trigger: 'change' }
],
warehouseCode: [
{ required: true, message: '请选择仓库代码', trigger: 'change' }
],
ownerCode: [
{ required: true, message: '请选择货主代码', trigger: 'change' }
],
})

211
src/views/wms/inventoryManage/expectin/index.vue

@ -0,0 +1,211 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Expectin.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Expectin.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 #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="ExpectinRules"
:formAllSchemas="Expectin.allSchemas"
:apiUpdate="ExpectinApi.updateExpectin"
:apiCreate="ExpectinApi.createExpectin"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Expectin.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/expectin/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as ExpectinApi from '@/api/wms/expectin'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Expectin, ExpectinRules } from './expectin.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Expectin' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Expectin.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ExpectinApi.getExpectinPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:expectin:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:expectin:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:expectin:export'}), //
defaultButtons.defaultFreshBtn(null),//
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:expectin:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:expectin:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
// const res = await ExpectinApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplier')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ExpectinApi.deleteExpectin(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ExpectinApi.exportExpectin(setSearchParams)
download.excel(data, '供应商.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async() => {
getList()
importTemplateData.templateUrl = await ExpectinApi.importTemplate()
})
</script>

145
src/views/wms/inventoryManage/expectout/expectout.data.ts

@ -0,0 +1,145 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
/**
* @returns {Array}
*/
export const Expectout = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '任务号',
field: 'jobNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150
},
},
]))
// 表单校验
export const ExpectoutRules = reactive({
jobNumber: [
{ required: true, message: '请选择任务号', trigger: 'change' }
],
businessType: [
{ required: true, message: '请选择业务类型', trigger: 'change' }
],
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],
qty: [
{ required: true, message: '请输入数量', trigger: 'blur' }
],
locationCode: [
{ required: true, message: '请选择库位代码', trigger: 'change' }
],
warehouseCode: [
{ required: true, message: '请选择仓库代码', trigger: 'change' }
],
ownerCode: [
{ required: true, message: '请选择货主代码', trigger: 'change' }
],
})

211
src/views/wms/inventoryManage/expectout/index.vue

@ -0,0 +1,211 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Expectout.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Expectout.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 #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="ExpectoutRules"
:formAllSchemas="Expectout.allSchemas"
:apiUpdate="ExpectoutApi.updateExpectout"
:apiCreate="ExpectoutApi.createExpectout"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Expectout.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/expectout/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as ExpectoutApi from '@/api/wms/expectout'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Expectout, ExpectoutRules } from './expectout.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Expectout' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Expectout.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ExpectoutApi.getExpectoutPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:expectout:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:expectout:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:expectout:export'}), //
defaultButtons.defaultFreshBtn(null),//
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:expectout:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:expectout:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
// const res = await ExpectoutApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplier')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ExpectoutApi.deleteExpectout(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ExpectoutApi.exportExpectout(setSearchParams)
download.excel(data, '供应商.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async() => {
getList()
importTemplateData.templateUrl = await ExpectoutApi.importTemplate()
})
</script>

211
src/views/wms/inventoryManage/locationcapacity/index.vue

@ -0,0 +1,211 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Locationcapacity.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Locationcapacity.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 #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="LocationcapacityRules"
:formAllSchemas="Locationcapacity.allSchemas"
:apiUpdate="LocationcapacityApi.updateLocationcapacity"
:apiCreate="LocationcapacityApi.createLocationcapacity"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Locationcapacity.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/locationcapacity/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as LocationcapacityApi from '@/api/wms/locationcapacity'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Locationcapacity, LocationcapacityRules } from './locationcapacity.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Locationcapacity' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Locationcapacity.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: LocationcapacityApi.getLocationcapacityPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:locationcapacity:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:locationcapacity:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:locationcapacity:export'}), //
defaultButtons.defaultFreshBtn(null),//
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:locationcapacity:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:locationcapacity:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
// const res = await LocationcapacityApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplier')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await LocationcapacityApi.deleteLocationcapacity(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await LocationcapacityApi.exportLocationcapacity(setSearchParams)
download.excel(data, '供应商.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async() => {
getList()
importTemplateData.templateUrl = await LocationcapacityApi.importTemplate()
})
</script>

89
src/views/wms/inventoryManage/locationcapacity/locationcapacity.data.ts

@ -0,0 +1,89 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
/**
* @returns {Array}
*/
export const Locationcapacity = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '已用容量百分比',
field: 'usedCapacity',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '可用容量百分比',
field: 'availableCapacity',
sort: 'custom',
table: {
width: 150
},
},
{
label: '可承受过载容量百分比',
field: 'bearableOverloadCapacity',
sort: 'custom',
table: {
width: 150
},
},
{
label: '是否无限容量',
field: 'isInfinity',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
]))
// 表单校验
export const LocationcapacityRules = reactive({
locationCode: [
{ required: true, message: '请选择库位代码', trigger: 'change' }
],
usedCapacity: [
{ required: true, message: '请输入已用容量百分比', trigger: 'blur' }
],
availableCapacity: [
{ required: true, message: '请输入可用容量百分比', trigger: 'blur' }
],
bearableOverloadCapacity: [
{ required: true, message: '请输入可承受过载容量百分比', trigger: 'blur' }
],
isInfinity: [
{ required: true, message: '请选择是否无限容量', trigger: 'change' }
],
})

211
src/views/wms/inventoryManage/transaction/index.vue

@ -0,0 +1,211 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Transaction.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Transaction.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 #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="TransactionRules"
:formAllSchemas="Transaction.allSchemas"
:apiUpdate="TransactionApi.updateTransaction"
:apiCreate="TransactionApi.createTransaction"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Transaction.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/transaction/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as TransactionApi from '@/api/wms/transaction'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Transaction, TransactionRules } from './transaction.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Transaction' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Transaction.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: TransactionApi.getTransactionPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:transaction:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:transaction:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:transaction:export'}), //
defaultButtons.defaultFreshBtn(null),//
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:transaction:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:transaction:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
// const res = await TransactionApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplier')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await TransactionApi.deleteTransaction(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await TransactionApi.exportTransaction(setSearchParams)
download.excel(data, '供应商.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async() => {
getList()
importTemplateData.templateUrl = await TransactionApi.importTemplate()
})
</script>

313
src/views/wms/inventoryManage/transaction/transaction.data.ts

@ -0,0 +1,313 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
/**
* @returns {Array}
*/
export const Transaction = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '事务号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
},
{
label: '事务类型',
field: 'transactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存动作',
field: 'inventoryAction',
dictType: DICT_TYPE.INVENTORY_ACTION,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '操作员',
field: 'worker',
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '记录号',
field: 'recordNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '生效时间',
field: 'activeTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
table: {
width: 150
},
},
{
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到货日期',
field: 'arriveDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '生产日期',
field: 'produceDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '失效日期',
field: 'expireDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '器具号',
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'ERP库位代码',
field: 'erpLocationCode',
dictType: DICT_TYPE.ERP_LOCATION,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150
},
},
]))
// 表单校验
export const TransactionRules = reactive({
number: [
{ required: true, message: '请输入事务号', trigger: 'blur' }
],
transactionType: [
{ required: true, message: '请选择事务类型', trigger: 'change' }
],
inventoryAction: [
{ required: true, message: '请选择库存动作', trigger: 'change' }
],
worker: [
{ required: true, message: '请选择操作员', trigger: 'change' }
],
businessType: [
{ required: true, message: '请选择业务类型', trigger: 'change' }
],
recordNumber: [
{ required: true, message: '请选择记录号', trigger: 'change' }
],
activeTime: [
{ required: true, message: '请选择生效时间', trigger: 'change' }
],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
})

211
src/views/wms/inventoryManage/transferlog/index.vue

@ -0,0 +1,211 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Transferlog.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Transferlog.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 #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="TransferlogRules"
:formAllSchemas="Transferlog.allSchemas"
:apiUpdate="ExpectinApi.updateTransferlog"
:apiCreate="ExpectinApi.createTransferlog"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Transferlog.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/transferlog/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as ExpectinApi from '@/api/wms/transferlog'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Transferlog, TransferlogRules } from './transferlog.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Transferlog' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Transferlog.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ExpectinApi.getTransferlogPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:transferlog:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:transferlog:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:transferlog:export'}), //
defaultButtons.defaultFreshBtn(null),//
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:transferlog:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:transferlog:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
// const res = await ExpectinApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplier')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ExpectinApi.deleteTransferlog(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ExpectinApi.exportTransferlog(setSearchParams)
download.excel(data, '供应商.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async() => {
getList()
importTemplateData.templateUrl = await ExpectinApi.importTemplate()
})
</script>

370
src/views/wms/inventoryManage/transferlog/transferlog.data.ts

@ -0,0 +1,370 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
/**
* @returns {Array}
*/
export const Transferlog = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '日志号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
},
{
label: '事务类型',
field: 'transactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '操作员',
field: 'worker',
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '单据号',
field: 'recordNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '生效时间',
field: 'activeTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到货日期',
field: 'arriveDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '生产日期',
field: 'produceDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '失效日期',
field: 'expireDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
}
}
},
{
label: '从事务号',
field: 'fomTransactionNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从批次',
field: 'fromBatch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库存状态',
field: 'fromInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '从器具号',
field: 'fromContainerNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库区代码',
field: 'fromAreaCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库位组代码',
field: 'fromLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从ERP库位代码',
field: 'fromErpLocationCode',
dictType: DICT_TYPE.ERP_LOCATION,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到事务号',
field: 'toTransactionNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库存状态',
field: 'toInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '到器具号',
field: 'toContainerNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库区代码',
field: 'toAreaCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库位组代码',
field: 'toLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到ERP库位代码',
field: 'toErpLocationCode',
dictType: DICT_TYPE.ERP_LOCATION,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
},
]))
// 表单校验
export const TransferlogRules = reactive({
number: [
{ required: true, message: '请输入日志号', trigger: 'blur' }
],
transactionType: [
{ required: true, message: '请选择事务类型', trigger: 'change' }
],
worker: [
{ required: true, message: '请选择操作员', trigger: 'change' }
],
businessType: [
{ required: true, message: '请选择业务类型', trigger: 'change' }
],
activeTime: [
{ required: true, message: '请选择生效时间', trigger: 'change' }
],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
})
Loading…
Cancel
Save