Browse Source

备件除了盘点其他的代码生成

master
songguoqiang 10 months ago
parent
commit
00b3398b6b
  1. 52
      src/api/eam/item/itemAccounts/index.ts
  2. 57
      src/api/eam/item/itemApplyMain/index.ts
  3. 56
      src/api/eam/item/itemLocationInRecord/index.ts
  4. 56
      src/api/eam/item/itemLocationOutRecord/index.ts
  5. 56
      src/api/eam/item/itemLocationRecord/index.ts
  6. 52
      src/api/eam/item/itemMaintenance/index.ts
  7. 65
      src/api/eam/item/itemOrderMain/index.ts
  8. 244
      src/views/eam/item/itemAccounts/index.vue
  9. 68
      src/views/eam/item/itemAccounts/itemAccounts.data.ts
  10. 244
      src/views/eam/item/itemApplyMain/index.vue
  11. 146
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
  12. 244
      src/views/eam/item/itemLocationInRecord/index.vue
  13. 111
      src/views/eam/item/itemLocationInRecord/itemLocationInRecord.data.ts
  14. 244
      src/views/eam/item/itemLocationOutRecord/index.vue
  15. 111
      src/views/eam/item/itemLocationOutRecord/itemLocationOutRecord.data.ts
  16. 244
      src/views/eam/item/itemLocationRecord/index.vue
  17. 111
      src/views/eam/item/itemLocationRecord/itemLocationRecord.data.ts
  18. 244
      src/views/eam/item/itemMaintenance/index.vue
  19. 80
      src/views/eam/item/itemMaintenance/itemMaintenance.data.ts
  20. 244
      src/views/eam/item/itemOrderMain/index.vue
  21. 153
      src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

52
src/api/eam/item/itemAccounts/index.ts

@ -0,0 +1,52 @@
import request from '@/config/axios'
export interface ItemAccountsVO {
itemNumber: string
qty: number
areaNumber: string
isInAccount: string
siteId: string
available: string
concurrencyStamp: number
}
// 查询备件台账列表
export const getItemAccountsPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/item-accounts/senior', data })
} else {
return await request.get({ url: `/eam/item-accounts/page`, params })
}
}
// 查询备件台账详情
export const getItemAccounts = async (id: number) => {
return await request.get({ url: `/eam/item-accounts/get?id=` + id })
}
// 新增备件台账
export const createItemAccounts = async (data: ItemAccountsVO) => {
return await request.post({ url: `/eam/item-accounts/create`, data })
}
// 修改备件台账
export const updateItemAccounts = async (data: ItemAccountsVO) => {
return await request.put({ url: `/eam/item-accounts/update`, data })
}
// 删除备件台账
export const deleteItemAccounts = async (id: number) => {
return await request.delete({ url: `/eam/item-accounts/delete?id=` + id })
}
// 导出备件台账 Excel
export const exportItemAccounts = async (params) => {
return await request.download({ url: `/eam/item-accounts/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/item-accounts/get-import-template' })
}

57
src/api/eam/item/itemApplyMain/index.ts

@ -0,0 +1,57 @@
import request from '@/config/axios'
export interface ItemApplyMainVO {
number: string
name: string
type: string
applyId: number
applyDeptId: number
approveId: number
approveTime: Date
outId: number
outTime: Date
siteId: string
available: string
concurrencyStamp: number
}
// 查询备件申领记录主列表
export const getItemApplyMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/item-apply-main/senior', data })
} else {
return await request.get({ url: `/eam/item-apply-main/page`, params })
}
}
// 查询备件申领记录主详情
export const getItemApplyMain = async (id: number) => {
return await request.get({ url: `/eam/item-apply-main/get?id=` + id })
}
// 新增备件申领记录主
export const createItemApplyMain = async (data: ItemApplyMainVO) => {
return await request.post({ url: `/eam/item-apply-main/create`, data })
}
// 修改备件申领记录主
export const updateItemApplyMain = async (data: ItemApplyMainVO) => {
return await request.put({ url: `/eam/item-apply-main/update`, data })
}
// 删除备件申领记录主
export const deleteItemApplyMain = async (id: number) => {
return await request.delete({ url: `/eam/item-apply-main/delete?id=` + id })
}
// 导出备件申领记录主 Excel
export const exportItemApplyMain = async (params) => {
return await request.download({ url: `/eam/item-apply-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/item-apply-main/get-import-template' })
}

56
src/api/eam/item/itemLocationInRecord/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface ItemLocationInRecordVO {
itemNumber: string
locationNumber: string
transactionType: string
inventoryAction: string
businessType: string
inventoryStatus: string
uom: string
qty: number
siteId: string
available: string
concurrencyStamp: number
}
// 查询备件库存记录列表
export const getItemLocationInRecordPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/item-location-record/senior', data })
} else {
return await request.get({ url: `/eam/item-location-record/page`, params })
}
}
// 查询备件库存记录详情
export const getItemLocationInRecord = async (id: number) => {
return await request.get({ url: `/eam/item-location-record/get?id=` + id })
}
// 新增备件库存记录
export const createItemLocationInRecord = async (data: ItemLocationInRecordVO) => {
return await request.post({ url: `/eam/item-location-record/create`, data })
}
// 修改备件库存记录
export const updateItemLocationInRecord = async (data: ItemLocationInRecordVO) => {
return await request.put({ url: `/eam/item-location-record/update`, data })
}
// 删除备件库存记录
export const deleteItemLocationInRecord = async (id: number) => {
return await request.delete({ url: `/eam/item-location-record/delete?id=` + id })
}
// 导出备件库存记录 Excel
export const exportItemLocationInRecord = async (params) => {
return await request.download({ url: `/eam/item-location-record/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/item-location-record/get-import-template' })
}

56
src/api/eam/item/itemLocationOutRecord/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface ItemLocationOutRecordVO {
itemNumber: string
locationNumber: string
transactionType: string
inventoryAction: string
businessType: string
inventoryStatus: string
uom: string
qty: number
siteId: string
available: string
concurrencyStamp: number
}
// 查询备件库存记录列表
export const getItemLocationOutRecordPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/item-location-record/senior', data })
} else {
return await request.get({ url: `/eam/item-location-record/page`, params })
}
}
// 查询备件库存记录详情
export const getItemLocationOutRecord = async (id: number) => {
return await request.get({ url: `/eam/item-location-record/get?id=` + id })
}
// 新增备件库存记录
export const createItemLocationOutRecord = async (data: ItemLocationOutRecordVO) => {
return await request.post({ url: `/eam/item-location-record/create`, data })
}
// 修改备件库存记录
export const updateItemLocationOutRecord = async (data: ItemLocationOutRecordVO) => {
return await request.put({ url: `/eam/item-location-record/update`, data })
}
// 删除备件库存记录
export const deleteItemLocationOutRecord = async (id: number) => {
return await request.delete({ url: `/eam/item-location-record/delete?id=` + id })
}
// 导出备件库存记录 Excel
export const exportItemLocationOutRecord = async (params) => {
return await request.download({ url: `/eam/item-location-record/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/item-location-record/get-import-template' })
}

56
src/api/eam/item/itemLocationRecord/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface ItemLocationRecordVO {
itemNumber: string
locationNumber: string
transactionType: string
inventoryAction: string
businessType: string
inventoryStatus: string
uom: string
qty: number
siteId: string
available: string
concurrencyStamp: number
}
// 查询备件库存记录列表
export const getItemLocationRecordPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/item-location-record/senior', data })
} else {
return await request.get({ url: `/eam/item-location-record/page`, params })
}
}
// 查询备件库存记录详情
export const getItemLocationRecord = async (id: number) => {
return await request.get({ url: `/eam/item-location-record/get?id=` + id })
}
// 新增备件库存记录
export const createItemLocationRecord = async (data: ItemLocationRecordVO) => {
return await request.post({ url: `/eam/item-location-record/create`, data })
}
// 修改备件库存记录
export const updateItemLocationRecord = async (data: ItemLocationRecordVO) => {
return await request.put({ url: `/eam/item-location-record/update`, data })
}
// 删除备件库存记录
export const deleteItemLocationRecord = async (id: number) => {
return await request.delete({ url: `/eam/item-location-record/delete?id=` + id })
}
// 导出备件库存记录 Excel
export const exportItemLocationRecord = async (params) => {
return await request.download({ url: `/eam/item-location-record/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/item-location-record/get-import-template' })
}

52
src/api/eam/item/itemMaintenance/index.ts

@ -0,0 +1,52 @@
import request from '@/config/axios'
export interface ItemMaintenanceVO {
number: string
itemNumber: string
qty: number
result: string
siteId: string
available: string
concurrencyStamp: number
}
// 查询备件维修记录列表
export const getItemMaintenancePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/item-maintenance/senior', data })
} else {
return await request.get({ url: `/eam/item-maintenance/page`, params })
}
}
// 查询备件维修记录详情
export const getItemMaintenance = async (id: number) => {
return await request.get({ url: `/eam/item-maintenance/get?id=` + id })
}
// 新增备件维修记录
export const createItemMaintenance = async (data: ItemMaintenanceVO) => {
return await request.post({ url: `/eam/item-maintenance/create`, data })
}
// 修改备件维修记录
export const updateItemMaintenance = async (data: ItemMaintenanceVO) => {
return await request.put({ url: `/eam/item-maintenance/update`, data })
}
// 删除备件维修记录
export const deleteItemMaintenance = async (id: number) => {
return await request.delete({ url: `/eam/item-maintenance/delete?id=` + id })
}
// 导出备件维修记录 Excel
export const exportItemMaintenance = async (params) => {
return await request.download({ url: `/eam/item-maintenance/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/item-maintenance/get-import-template' })
}

65
src/api/eam/item/itemOrderMain/index.ts

@ -0,0 +1,65 @@
import request from '@/config/axios'
export interface ItemOrderMainVO {
number: string
date: string
phone: string
fax: string
purchaser: string
supplierNumber: string
supplierName: string
supplierAddress: string
shipTo: string
invoiceTo: string
contacts: string
contactsPhone: string
paymentType: string
registLocation: string
bank: string
account: string
dutyParagraph: string
siteId: string
available: string
concurrencyStamp: number
}
// 查询备件采购订单主列表
export const getItemOrderMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/item-order-main/senior', data })
} else {
return await request.get({ url: `/eam/item-order-main/page`, params })
}
}
// 查询备件采购订单主详情
export const getItemOrderMain = async (id: number) => {
return await request.get({ url: `/eam/item-order-main/get?id=` + id })
}
// 新增备件采购订单主
export const createItemOrderMain = async (data: ItemOrderMainVO) => {
return await request.post({ url: `/eam/item-order-main/create`, data })
}
// 修改备件采购订单主
export const updateItemOrderMain = async (data: ItemOrderMainVO) => {
return await request.put({ url: `/eam/item-order-main/update`, data })
}
// 删除备件采购订单主
export const deleteItemOrderMain = async (id: number) => {
return await request.delete({ url: `/eam/item-order-main/delete?id=` + id })
}
// 导出备件采购订单主 Excel
export const exportItemOrderMain = async (params) => {
return await request.download({ url: `/eam/item-order-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/item-order-main/get-import-template' })
}

244
src/views/eam/item/itemAccounts/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ItemAccounts.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemAccounts.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="ItemAccountsRules"
:formAllSchemas="ItemAccounts.allSchemas"
:apiUpdate="ItemAccountsApi.updateItemAccounts"
:apiCreate="ItemAccountsApi.createItemAccounts"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/item-accounts/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ItemAccounts,ItemAccountsRules } from './itemAccounts.data'
import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
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: 'ItemAccounts' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ItemAccounts.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ItemAccountsApi.getItemAccountsPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:itemAccounts:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:itemAccounts:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:itemAccounts: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:'eam:itemAccounts:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemAccounts: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) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ItemAccounts.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 ItemAccountsApi.createItemAccounts(data)
message.success(t('common.createSuccess'))
} else {
await ItemAccountsApi.updateItemAccounts(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, 'basicItemAccounts')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ItemAccountsApi.deleteItemAccounts(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 ItemAccountsApi.exportItemAccounts(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 ItemAccountsApi.importTemplate()
})
</script>

68
src/views/eam/item/itemAccounts/itemAccounts.data.ts

@ -0,0 +1,68 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemAccountsRules = reactive({
itemNumber: [required],
areaNumber: [required],
concurrencyStamp: [required],
})
export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '备件编号',
field: 'itemNumber',
sort: 'custom',
isSearch: true,
},
{
label: '库存数量',
field: 'qty',
sort: 'custom',
},
{
label: '库区编号',
field: 'areaNumber',
sort: 'custom',
},
{
label: '是否账内库TRUE账内FALSE账外',
field: 'isInAccount',
sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/eam/item/itemApplyMain/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ItemApplyMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemApplyMain.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="ItemApplyMainRules"
:formAllSchemas="ItemApplyMain.allSchemas"
:apiUpdate="ItemApplyMainApi.updateItemApplyMain"
:apiCreate="ItemApplyMainApi.createItemApplyMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemApplyMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/item-apply-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ItemApplyMain,ItemApplyMainRules } from './itemApplyMain.data'
import * as ItemApplyMainApi from '@/api/eam/item/itemApplyMain'
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: 'ItemApplyMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ItemApplyMain.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ItemApplyMainApi.getItemApplyMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:itemApplyMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:itemApplyMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:itemApplyMain: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:'eam:itemApplyMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemApplyMain: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) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ItemApplyMain.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 ItemApplyMainApi.createItemApplyMain(data)
message.success(t('common.createSuccess'))
} else {
await ItemApplyMainApi.updateItemApplyMain(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, 'basicItemApplyMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ItemApplyMainApi.deleteItemApplyMain(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 ItemApplyMainApi.exportItemApplyMain(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 ItemApplyMainApi.importTemplate()
})
</script>

146
src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

@ -0,0 +1,146 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemApplyMainRules = reactive({
number: [required],
name: [required],
concurrencyStamp: [required],
})
export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '描述',
field: 'name',
sort: 'custom',
},
{
label: '维修申领、以旧换新字典',
field: 'type',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '申领人id',
field: 'applyId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '申领人部门id',
field: 'applyDeptId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '审批人id',
field: 'approveId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '审批时间',
field: 'approveTime',
sort: 'custom',
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '出库人id',
field: 'outId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '出库时间',
field: 'outTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
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,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/eam/item/itemLocationInRecord/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ItemLocationInRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemLocationInRecord.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="ItemLocationInRecordRules"
:formAllSchemas="ItemLocationInRecord.allSchemas"
:apiUpdate="ItemLocationInRecordApi.updateItemLocationInRecord"
:apiCreate="ItemLocationInRecordApi.createItemLocationInRecord"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemLocationInRecord.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/item-location-in-record/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ItemLocationInRecord,ItemLocationInRecordRules } from './itemLocationInRecord.data'
import * as ItemLocationInRecordApi from '@/api/eam/item/itemLocationInRecord'
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: 'ItemLocationInRecord' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ItemLocationInRecord.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ItemLocationInRecordApi.getItemLocationInRecordPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:itemLocationInRecord:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:itemLocationInRecord:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:itemLocationInRecord: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:'eam:itemLocationInRecord:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemLocationInRecord: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) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ItemLocationInRecord.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 ItemLocationInRecordApi.createItemLocationInRecord(data)
message.success(t('common.createSuccess'))
} else {
await ItemLocationInRecordApi.updateItemLocationInRecord(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, 'basicItemLocationInRecord')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ItemLocationInRecordApi.deleteItemLocationInRecord(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 ItemLocationInRecordApi.exportItemLocationInRecord(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 ItemLocationInRecordApi.importTemplate()
})
</script>

111
src/views/eam/item/itemLocationInRecord/itemLocationInRecord.data.ts

@ -0,0 +1,111 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemLocationInRecordRules = reactive({
itemNumber: [required],
locationNumber: [required],
inventoryAction: [required],
businessType: [required],
uom: [required],
concurrencyStamp: [required],
})
export const ItemLocationInRecord = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编号唯一标识',
field: 'itemNumber',
sort: 'custom',
isSearch: true,
},
{
label: '库存编码',
field: 'locationNumber',
sort: 'custom',
},
{
label: '事务类型IN、OUT',
field: 'transactionType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '库存动作',
field: 'inventoryAction',
sort: 'custom',
isSearch: true,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
form: {
component: 'Radio'
},
},
{
label: '计量单位从备件中获取',
field: 'uom',
sort: 'custom',
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
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,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/eam/item/itemLocationOutRecord/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ItemLocationOutRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemLocationOutRecord.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="ItemLocationOutRecordRules"
:formAllSchemas="ItemLocationOutRecord.allSchemas"
:apiUpdate="ItemLocationOutRecordApi.updateItemLocationOutRecord"
:apiCreate="ItemLocationOutRecordApi.createItemLocationOutRecord"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemLocationOutRecord.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/item-location-out-record/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ItemLocationOutRecord,ItemLocationOutRecordRules } from './itemLocationOutRecord.data'
import * as ItemLocationOutRecordApi from '@/api/eam/item/itemLocationOutRecord'
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: 'ItemLocationOutRecord' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ItemLocationOutRecord.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ItemLocationOutRecordApi.getItemLocationOutRecordPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:itemLocationOutRecord:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:itemLocationOutRecord:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:itemLocationOutRecord: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:'eam:itemLocationOutRecord:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemLocationOutRecord: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) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ItemLocationOutRecord.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 ItemLocationOutRecordApi.createItemLocationOutRecord(data)
message.success(t('common.createSuccess'))
} else {
await ItemLocationOutRecordApi.updateItemLocationOutRecord(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, 'basicItemLocationOutRecord')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ItemLocationOutRecordApi.deleteItemLocationOutRecord(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 ItemLocationOutRecordApi.exportItemLocationOutRecord(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 ItemLocationOutRecordApi.importTemplate()
})
</script>

111
src/views/eam/item/itemLocationOutRecord/itemLocationOutRecord.data.ts

@ -0,0 +1,111 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemLocationOutRecordRules = reactive({
itemNumber: [required],
locationNumber: [required],
inventoryAction: [required],
businessType: [required],
uom: [required],
concurrencyStamp: [required],
})
export const ItemLocationOutRecord = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编号唯一标识',
field: 'itemNumber',
sort: 'custom',
isSearch: true,
},
{
label: '库存编码',
field: 'locationNumber',
sort: 'custom',
},
{
label: '事务类型IN、OUT',
field: 'transactionType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '库存动作',
field: 'inventoryAction',
sort: 'custom',
isSearch: true,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
form: {
component: 'Radio'
},
},
{
label: '计量单位从备件中获取',
field: 'uom',
sort: 'custom',
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
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,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/eam/item/itemLocationRecord/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ItemLocationRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemLocationRecord.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="ItemLocationRecordRules"
:formAllSchemas="ItemLocationRecord.allSchemas"
:apiUpdate="ItemLocationRecordApi.updateItemLocationRecord"
:apiCreate="ItemLocationRecordApi.createItemLocationRecord"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemLocationRecord.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/item-location-record/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ItemLocationRecord,ItemLocationRecordRules } from './itemLocationRecord.data'
import * as ItemLocationRecordApi from '@/api/eam/item/itemLocationRecord'
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: 'ItemLocationRecord' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ItemLocationRecord.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ItemLocationRecordApi.getItemLocationRecordPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:itemLocationRecord:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:itemLocationRecord:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:itemLocationRecord: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:'eam:itemLocationRecord:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemLocationRecord: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) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ItemLocationRecord.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 ItemLocationRecordApi.createItemLocationRecord(data)
message.success(t('common.createSuccess'))
} else {
await ItemLocationRecordApi.updateItemLocationRecord(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, 'basicItemLocationRecord')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ItemLocationRecordApi.deleteItemLocationRecord(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 ItemLocationRecordApi.exportItemLocationRecord(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 ItemLocationRecordApi.importTemplate()
})
</script>

111
src/views/eam/item/itemLocationRecord/itemLocationRecord.data.ts

@ -0,0 +1,111 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemLocationRecordRules = reactive({
itemNumber: [required],
locationNumber: [required],
inventoryAction: [required],
businessType: [required],
uom: [required],
concurrencyStamp: [required],
})
export const ItemLocationRecord = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编号唯一标识',
field: 'itemNumber',
sort: 'custom',
isSearch: true,
},
{
label: '库存编码',
field: 'locationNumber',
sort: 'custom',
},
{
label: '事务类型IN、OUT',
field: 'transactionType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '库存动作',
field: 'inventoryAction',
sort: 'custom',
isSearch: true,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
form: {
component: 'Radio'
},
},
{
label: '计量单位从备件中获取',
field: 'uom',
sort: 'custom',
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
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,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/eam/item/itemMaintenance/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ItemMaintenance.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemMaintenance.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="ItemMaintenanceRules"
:formAllSchemas="ItemMaintenance.allSchemas"
:apiUpdate="ItemMaintenanceApi.updateItemMaintenance"
:apiCreate="ItemMaintenanceApi.createItemMaintenance"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemMaintenance.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/item-maintenance/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ItemMaintenance,ItemMaintenanceRules } from './itemMaintenance.data'
import * as ItemMaintenanceApi from '@/api/eam/item/itemMaintenance'
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: 'ItemMaintenance' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ItemMaintenance.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ItemMaintenanceApi.getItemMaintenancePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:itemMaintenance:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:itemMaintenance:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:itemMaintenance: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:'eam:itemMaintenance:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemMaintenance: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) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ItemMaintenance.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 ItemMaintenanceApi.createItemMaintenance(data)
message.success(t('common.createSuccess'))
} else {
await ItemMaintenanceApi.updateItemMaintenance(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, 'basicItemMaintenance')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ItemMaintenanceApi.deleteItemMaintenance(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 ItemMaintenanceApi.exportItemMaintenance(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 ItemMaintenanceApi.importTemplate()
})
</script>

80
src/views/eam/item/itemMaintenance/itemMaintenance.data.ts

@ -0,0 +1,80 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemMaintenanceRules = reactive({
number: [required],
itemNumber: [required],
qty: [required],
concurrencyStamp: [required],
})
export const ItemMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '备件代码',
field: 'itemNumber',
sort: 'custom',
isSearch: true,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
label: '维修结果YES、NO',
field: 'result',
sort: 'custom',
isSearch: true,
},
{
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,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/eam/item/itemOrderMain/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ItemOrderMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemOrderMain.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="ItemOrderMainRules"
:formAllSchemas="ItemOrderMain.allSchemas"
:apiUpdate="ItemOrderMainApi.updateItemOrderMain"
:apiCreate="ItemOrderMainApi.createItemOrderMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemOrderMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/item-order-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ItemOrderMain,ItemOrderMainRules } from './itemOrderMain.data'
import * as ItemOrderMainApi from '@/api/eam/item/itemOrderMain'
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: 'ItemOrderMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ItemOrderMain.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ItemOrderMainApi.getItemOrderMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:itemOrderMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:itemOrderMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:itemOrderMain: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:'eam:itemOrderMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemOrderMain: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) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ItemOrderMain.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 ItemOrderMainApi.createItemOrderMain(data)
message.success(t('common.createSuccess'))
} else {
await ItemOrderMainApi.updateItemOrderMain(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, 'basicItemOrderMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ItemOrderMainApi.deleteItemOrderMain(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 ItemOrderMainApi.exportItemOrderMain(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 ItemOrderMainApi.importTemplate()
})
</script>

153
src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

@ -0,0 +1,153 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemOrderMainRules = reactive({
number: [required],
date: [required],
concurrencyStamp: [required],
})
export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '订单号唯一标识',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '日期',
field: 'date',
sort: 'custom',
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '电话',
field: 'phone',
sort: 'custom',
},
{
label: '传真',
field: 'fax',
sort: 'custom',
},
{
label: '采购员',
field: 'purchaser',
sort: 'custom',
},
{
label: '供应商编号',
field: 'supplierNumber',
sort: 'custom',
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
},
{
label: '供应商地址',
field: 'supplierAddress',
sort: 'custom',
},
{
label: '发货至',
field: 'shipTo',
sort: 'custom',
},
{
label: '开票至',
field: 'invoiceTo',
sort: 'custom',
},
{
label: '联系人',
field: 'contacts',
sort: 'custom',
},
{
label: '联系电话',
field: 'contactsPhone',
sort: 'custom',
},
{
label: '付款方式',
field: 'paymentType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '注册地',
field: 'registLocation',
sort: 'custom',
},
{
label: '开户行',
field: 'bank',
sort: 'custom',
},
{
label: '账号',
field: 'account',
sort: 'custom',
},
{
label: '税号',
field: 'dutyParagraph',
sort: 'custom',
},
{
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,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
Loading…
Cancel
Save