224 changed files with 9685 additions and 967 deletions
@ -0,0 +1,62 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface BalanceChangeHistoryVO { |
||||
|
beforeItemCode: string |
||||
|
beforeBatch: string |
||||
|
beforePackingNumber: string |
||||
|
beforeInventoryStatus: string |
||||
|
beforeLocationCode: string |
||||
|
beforeQty: number |
||||
|
beforeTransNumber: string |
||||
|
beforeId: number |
||||
|
afterItemCode: string |
||||
|
afterBatch: string |
||||
|
afterPackingNumber: string |
||||
|
afterInventoryStatus: string |
||||
|
afterLocationCode: string |
||||
|
afterQty: number |
||||
|
afterTransNumber: string |
||||
|
afterId: number |
||||
|
remark: string |
||||
|
} |
||||
|
|
||||
|
// 查询库存余额变更记录列表
|
||||
|
export const getBalanceChangeHistoryPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/balance-change-history/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/balance-change-history/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询库存余额变更记录详情
|
||||
|
export const getBalanceChangeHistory = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/balance-change-history/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增库存余额变更记录
|
||||
|
export const createBalanceChangeHistory = async (data: BalanceChangeHistoryVO) => { |
||||
|
return await request.post({ url: `/wms/balance-change-history/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改库存余额变更记录
|
||||
|
export const updateBalanceChangeHistory = async (data: BalanceChangeHistoryVO) => { |
||||
|
return await request.put({ url: `/wms/balance-change-history/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除库存余额变更记录
|
||||
|
export const deleteBalanceChangeHistory = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/balance-change-history/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出库存余额变更记录 Excel
|
||||
|
export const exportBalanceChangeHistory = async (params) => { |
||||
|
return await request.download({ url: `/wms/balance-change-history/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/balance-change-history/get-import-template' }) |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface NotPackageTransactionBalanceVO { |
||||
|
id: number |
||||
|
itemCode: string |
||||
|
locationCode: string |
||||
|
batch: string |
||||
|
cnt: string |
||||
|
sumQtyTransaction: number |
||||
|
sumQtyBalance: number |
||||
|
differenceQty: number |
||||
|
remark: string |
||||
|
} |
||||
|
|
||||
|
// 查询对账_无包装事务余额对数结果列表
|
||||
|
export const getNotPackageTransactionBalancePage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/not-package-transaction-balance/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/not-package-transaction-balance/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询对账_无包装事务余额对数结果详情
|
||||
|
export const getNotPackageTransactionBalance = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/not-package-transaction-balance/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增对账_无包装事务余额对数结果
|
||||
|
export const createNotPackageTransactionBalance = async (data: NotPackageTransactionBalanceVO) => { |
||||
|
return await request.post({ url: `/wms/not-package-transaction-balance/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改对账_无包装事务余额对数结果
|
||||
|
export const updateNotPackageTransactionBalance = async (data: NotPackageTransactionBalanceVO) => { |
||||
|
return await request.put({ url: `/wms/not-package-transaction-balance/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除对账_无包装事务余额对数结果
|
||||
|
export const deleteNotPackageTransactionBalance = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/not-package-transaction-balance/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出对账_无包装事务余额对数结果 Excel
|
||||
|
export const exportNotPackageTransactionBalance = async (params) => { |
||||
|
return await request.download({ url: `/wms/not-package-transaction-balance/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/not-package-transaction-balance/get-import-template' }) |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface SpareitemLocationVO { |
||||
|
itemCode: string |
||||
|
name: string |
||||
|
desc1: string |
||||
|
desc2: string |
||||
|
locationCode: string |
||||
|
locationName: string |
||||
|
available: string |
||||
|
remark: string |
||||
|
} |
||||
|
|
||||
|
// 查询维修备件默认库位列表
|
||||
|
export const getSpareitemLocationPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/spareitem-location/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/spareitem-location/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询维修备件默认库位详情
|
||||
|
export const getSpareitemLocation = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/spareitem-location/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增维修备件默认库位
|
||||
|
export const createSpareitemLocation = async (data: SpareitemLocationVO) => { |
||||
|
return await request.post({ url: `/wms/spareitem-location/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改维修备件默认库位
|
||||
|
export const updateSpareitemLocation = async (data: SpareitemLocationVO) => { |
||||
|
return await request.put({ url: `/wms/spareitem-location/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除维修备件默认库位
|
||||
|
export const deleteSpareitemLocation = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/spareitem-location/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出维修备件默认库位 Excel
|
||||
|
export const exportSpareitemLocation = async (params) => { |
||||
|
return await request.download({ url: `/wms/spareitem-location/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/spareitem-location/get-import-template' }) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// 自动推荐库位
|
||||
|
export const queryItemLocation = async (data) => { |
||||
|
return await request.post({ url: `/wms/spareitem-location/queryItemLocation`, data }) |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface SupplierApbalanceCalendarVO { |
||||
|
id: number |
||||
|
beginMonth: string |
||||
|
beginDay: string |
||||
|
endMonth: string |
||||
|
endDay: string |
||||
|
descriiption: string |
||||
|
available: string |
||||
|
remark: string |
||||
|
extraProperties: string |
||||
|
concurrencyStamp: number |
||||
|
siteId: string |
||||
|
} |
||||
|
|
||||
|
// 查询询证函日历列表
|
||||
|
export const getSupplierApbalanceCalendarPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/supplier-apbalance-calendar/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/supplier-apbalance-calendar/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询询证函日历详情
|
||||
|
export const getSupplierApbalanceCalendar = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/supplier-apbalance-calendar/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增询证函日历
|
||||
|
export const createSupplierApbalanceCalendar = async (data: SupplierApbalanceCalendarVO) => { |
||||
|
return await request.post({ url: `/wms/supplier-apbalance-calendar/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改询证函日历
|
||||
|
export const updateSupplierApbalanceCalendar = async (data: SupplierApbalanceCalendarVO) => { |
||||
|
return await request.put({ url: `/wms/supplier-apbalance-calendar/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除询证函日历
|
||||
|
export const deleteSupplierApbalanceCalendar = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/supplier-apbalance-calendar/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出询证函日历 Excel
|
||||
|
export const exportSupplierApbalanceCalendar = async (params) => { |
||||
|
return await request.download({ url: `/wms/supplier-apbalance-calendar/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/supplier-apbalance-calendar/get-import-template' }) |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface TransactionBalancePackageVO { |
||||
|
id: number |
||||
|
packingNumber: string |
||||
|
itemCode: string |
||||
|
batch: string |
||||
|
locationCode: string |
||||
|
inventoryStatusTransaction: string |
||||
|
inventoryStatusBalance: string |
||||
|
qtyTransaction: number |
||||
|
qtyBalance: number |
||||
|
qtyDiff: number |
||||
|
} |
||||
|
|
||||
|
// 查询对账_包装号的事务汇总与余额的差异列表
|
||||
|
export const getTransactionBalancePackagePage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/transaction-balance-package/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/transaction-balance-package/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询对账_包装号的事务汇总与余额的差异详情
|
||||
|
export const getTransactionBalancePackage = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/transaction-balance-package/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增对账_包装号的事务汇总与余额的差异
|
||||
|
export const createTransactionBalancePackage = async (data: TransactionBalancePackageVO) => { |
||||
|
return await request.post({ url: `/wms/transaction-balance-package/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改对账_包装号的事务汇总与余额的差异
|
||||
|
export const updateTransactionBalancePackage = async (data: TransactionBalancePackageVO) => { |
||||
|
return await request.put({ url: `/wms/transaction-balance-package/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除对账_包装号的事务汇总与余额的差异
|
||||
|
export const deleteTransactionBalancePackage = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/transaction-balance-package/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出对账_包装号的事务汇总与余额的差异 Excel
|
||||
|
export const exportTransactionBalancePackage = async (params) => { |
||||
|
return await request.download({ url: `/wms/transaction-balance-package/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/transaction-balance-package/get-import-template' }) |
||||
|
} |
@ -0,0 +1,276 @@ |
|||||
|
<template> |
||||
|
<ContentWrap> |
||||
|
<!-- 搜索工作栏 --> |
||||
|
<Search :schema="SpareitemLocation.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 列表头部 --> |
||||
|
<TableHead |
||||
|
:HeadButttondata="HeadButttondata" |
||||
|
@button-base-click="buttonBaseClick" |
||||
|
:routeName="routeName" |
||||
|
@updataTableColumns="updataTableColumns" |
||||
|
@searchFormClick="searchFormClick" |
||||
|
:allSchemas="SpareitemLocation.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="formsSuccess" |
||||
|
:rules="SpareitemLocationRules" |
||||
|
:formAllSchemas="SpareitemLocation.allSchemas" |
||||
|
:apiUpdate="SpareitemLocationApi.updateSpareitemLocation" |
||||
|
:apiCreate="SpareitemLocationApi.createSpareitemLocation" |
||||
|
@searchTableSuccess="searchTableSuccess" |
||||
|
@clearSearchInput="clearSearchInput" |
||||
|
:isBusiness="false" |
||||
|
/> |
||||
|
|
||||
|
<!-- 详情 --> |
||||
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="SpareitemLocation.allSchemas" /> |
||||
|
|
||||
|
<!-- 导入 --> |
||||
|
<ImportForm ref="importFormRef" url="/wms/spareitem-location/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import download from '@/utils/download' |
||||
|
import { SpareitemLocation,SpareitemLocationRules } from './spareitemLocation.data' |
||||
|
import * as SpareitemLocationApi from '@/api/wms/spareitemLocation' |
||||
|
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: 'SpareitemLocation' }) |
||||
|
|
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
|
||||
|
const route = useRoute() // 路由信息 |
||||
|
const routeName = ref() |
||||
|
routeName.value = route.name |
||||
|
const tableColumns = ref(SpareitemLocation.allSchemas.tableColumns) |
||||
|
const clearSearchInput = (field)=>{ |
||||
|
console.log('field',field) |
||||
|
if('itemCode' == field){ |
||||
|
//物料代码 |
||||
|
basicFormRef.value.formRef.setValues({ |
||||
|
name: '', |
||||
|
desc1: '', |
||||
|
desc2: '' |
||||
|
}) |
||||
|
}else if('locationCode' == field){ |
||||
|
// 库位代码 |
||||
|
basicFormRef.value.formRef.setValues({ |
||||
|
locationName: '', |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
// 查询页面返回 |
||||
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
||||
|
nextTick(() => { |
||||
|
const setV = {} |
||||
|
setV[formField] = val[0][searchField] |
||||
|
if(formField=='itemCode'){ |
||||
|
//物料代码 |
||||
|
setV['name'] = val[0]['code'] |
||||
|
setV['desc1'] = val[0]['desc1'] |
||||
|
setV['desc2'] = val[0]['desc2'] |
||||
|
}else if(formField=='locationCode'){ |
||||
|
// 库位代码 |
||||
|
setV['locationName'] = val[0]['name'] |
||||
|
} |
||||
|
formRef.setValues(setV) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 字段设置 更新主列表字段 |
||||
|
const updataTableColumns = (val) => { |
||||
|
tableColumns.value = val |
||||
|
} |
||||
|
|
||||
|
const { tableObject, tableMethods } = useTable({ |
||||
|
getListApi: SpareitemLocationApi.getSpareitemLocationPage // 分页接口 |
||||
|
}) |
||||
|
|
||||
|
// 获得表格的各种操作 |
||||
|
const { getList, setSearchParams } = tableMethods |
||||
|
|
||||
|
// 列表头部按钮 |
||||
|
const HeadButttondata = [ |
||||
|
defaultButtons.defaultAddBtn({hasPermi:'wms:spareitemLocation:create'}), // 新增 |
||||
|
defaultButtons.defaultImportBtn({hasPermi:'wms:spareitemLocation:import'}), // 导入 |
||||
|
defaultButtons.defaultExportBtn({hasPermi:'wms:spareitemLocation: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:spareitemLocation:update'}), // 编辑 |
||||
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:spareitemLocation:delete'}), // 删除 |
||||
|
] |
||||
|
|
||||
|
// 列表-操作按钮事件 |
||||
|
const buttonTableClick = async (val, row) => { |
||||
|
if (val == 'edit') { // 编辑 |
||||
|
openForm('update', row) |
||||
|
} else if (val == 'delete') { // 删除 |
||||
|
handleDelete(row.id) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** 添加/修改操作 */ |
||||
|
const basicFormRef = ref() |
||||
|
const openForm = (type: string, row?: any) => { |
||||
|
SpareitemLocation.allSchemas.formSchema.forEach(item=>{ |
||||
|
if(item.field == 'itemCode'){ |
||||
|
item.componentProps.enterSearch = type=='create' |
||||
|
item.componentProps.isSearchList = type=='create' |
||||
|
item.componentProps.disabled = type!='create' |
||||
|
} |
||||
|
}) |
||||
|
basicFormRef.value.open(type, row) |
||||
|
} |
||||
|
|
||||
|
// form表单提交 |
||||
|
const formsSuccess = async (formType,data) => { |
||||
|
var isHave =SpareitemLocation.allSchemas.formSchema.some(function (item) { |
||||
|
return item.field === 'activeTime' || item.field === 'expireTime'; |
||||
|
}); |
||||
|
if(isHave){ |
||||
|
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
||||
|
message.error('失效时间要大于生效时间') |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
if(data.activeTime==0)data.activeTime = null; |
||||
|
if(data.expireTime==0)data.expireTime = null; |
||||
|
if (formType === 'create') { |
||||
|
await SpareitemLocationApi.createSpareitemLocation(data) |
||||
|
message.success(t('common.createSuccess')) |
||||
|
} else { |
||||
|
await SpareitemLocationApi.updateSpareitemLocation(data) |
||||
|
message.success(t('common.updateSuccess')) |
||||
|
} |
||||
|
basicFormRef.value.dialogVisible = false |
||||
|
getList() |
||||
|
} |
||||
|
|
||||
|
/** 详情操作 */ |
||||
|
const detailRef = ref() |
||||
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
||||
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicSpareitemLocation') |
||||
|
} |
||||
|
|
||||
|
/** 删除按钮操作 */ |
||||
|
const handleDelete = async (id: number) => { |
||||
|
try { |
||||
|
// 删除的二次确认 |
||||
|
await message.delConfirm() |
||||
|
// 发起删除 |
||||
|
await SpareitemLocationApi.deleteSpareitemLocation(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 SpareitemLocationApi.exportSpareitemLocation(tableObject.params) |
||||
|
download.excel(data, '维修备件默认库位.xlsx') |
||||
|
} catch { |
||||
|
} finally { |
||||
|
exportLoading.value = false |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** 导入 */ |
||||
|
const importFormRef = ref() |
||||
|
const handleImport = () => { |
||||
|
importFormRef.value.open() |
||||
|
} |
||||
|
// 导入附件弹窗所需的参数 |
||||
|
const importTemplateData = reactive({ |
||||
|
templateUrl: '', |
||||
|
templateTitle: '维修备件默认库位导入模版.xlsx' |
||||
|
}) |
||||
|
// 导入成功之后 |
||||
|
const importSuccess = () => { |
||||
|
getList() |
||||
|
} |
||||
|
|
||||
|
// 筛选提交 |
||||
|
const searchFormClick = (searchData) => { |
||||
|
tableObject.params = { |
||||
|
isSearch: true, |
||||
|
filters: searchData.filters |
||||
|
} |
||||
|
getList() // 刷新当前列表 |
||||
|
} |
||||
|
|
||||
|
/** 初始化 **/ |
||||
|
onMounted(async () => { |
||||
|
getList() |
||||
|
importTemplateData.templateUrl = await SpareitemLocationApi.importTemplate() |
||||
|
}) |
||||
|
|
||||
|
</script> |
@ -0,0 +1,192 @@ |
|||||
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
||||
|
import { dateFormatter } from '@/utils/formatTime' |
||||
|
import { Itembasic } from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; |
||||
|
import * as ItembasicApi from "@/api/wms/itembasic"; |
||||
|
import * as ItemAccountsApi from '@/api/eam/itemAccounts' |
||||
|
import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data' |
||||
|
import * as LocationApi from '@/api/wms/location' |
||||
|
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' |
||||
|
|
||||
|
// 表单校验
|
||||
|
export const SpareitemLocationRules = reactive({ |
||||
|
itemCode: [required], |
||||
|
locationCode: [required], |
||||
|
}) |
||||
|
|
||||
|
export const SpareitemLocation = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '物料代码', |
||||
|
field: 'itemCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
||||
|
searchField: 'code', // 查询弹窗赋值字段
|
||||
|
searchTitle: '物料信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
// {
|
||||
|
// key:'supplierCode',
|
||||
|
// value:'supplierCode',
|
||||
|
// isMainValue: true
|
||||
|
// },
|
||||
|
], |
||||
|
verificationParams: [{ |
||||
|
key: 'code', |
||||
|
action: '==', |
||||
|
value: '', |
||||
|
isMainValue: false, |
||||
|
isSearch: 'true', |
||||
|
isFormModel: true |
||||
|
}], // 失去焦点校验参数
|
||||
|
} |
||||
|
}, |
||||
|
table: { |
||||
|
width: 180 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '名称', |
||||
|
field: 'name', |
||||
|
sort: 'custom', |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
}, |
||||
|
table: { |
||||
|
width: 180 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '描述1', |
||||
|
field: 'desc1', |
||||
|
sort: 'custom', |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
}, |
||||
|
table: { |
||||
|
width: 180 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '描述2', |
||||
|
field: 'desc2', |
||||
|
sort: 'custom', |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
}, |
||||
|
table: { |
||||
|
width: 180 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '库位代码', |
||||
|
field: 'locationCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
|
||||
|
searchField: 'code', // 查询弹窗赋值字段
|
||||
|
searchTitle: '库位信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
}], |
||||
|
verificationParams: [{ |
||||
|
key: 'code', |
||||
|
action: '==', |
||||
|
value: '', |
||||
|
isMainValue: false, |
||||
|
isSearch: true, |
||||
|
isFormModel: true |
||||
|
}], // 失去焦点校验参数
|
||||
|
} |
||||
|
}, |
||||
|
table: { |
||||
|
width: 180 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '库位名称', |
||||
|
field: 'locationName', |
||||
|
sort: 'custom', |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
}, |
||||
|
table: { |
||||
|
width: 180 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '是否可用', |
||||
|
field: 'available', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.TRUE_FALSE, |
||||
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
||||
|
form: { |
||||
|
component: 'Switch', |
||||
|
value: 'TRUE', |
||||
|
componentProps: { |
||||
|
inactiveValue: 'FALSE', |
||||
|
activeValue: 'TRUE' |
||||
|
} |
||||
|
}, |
||||
|
table: { |
||||
|
width: 110 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '备注', |
||||
|
field: 'remark', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 220 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建时间', |
||||
|
field: 'createTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
isSearch: true, |
||||
|
search: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
||||
|
type: 'daterange', |
||||
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
||||
|
} |
||||
|
}, |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 220 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'right' |
||||
|
} |
||||
|
} |
||||
|
])) |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue