From a1663c39cf084d76838d34410af42926f84491a3 Mon Sep 17 00:00:00 2001
From: songguoqiang <765017469@qq.com>
Date: Wed, 15 Nov 2023 10:38:48 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/spc/location/index.ts | 70 +++
src/api/spc/locationcapacity/index.ts | 51 ++
src/api/spc/locationgroup/index.ts | 58 ++
src/api/spc/supplier/index.ts | 67 +++
src/api/spc/supplieritem/index.ts | 62 ++
src/api/spc/warehouse/index.ts | 56 ++
src/views/spc/itembasic/index.vue | 23 +-
src/views/spc/itembasic/itembasic.data.ts | 531 +++++++++++-------
src/views/spc/location/index.vue | 221 ++++++++
src/views/spc/location/location.data.ts | 377 +++++++++++++
src/views/spc/locationgroup/index.vue | 221 ++++++++
.../spc/locationgroup/locationgroup.data.ts | 205 +++++++
src/views/spc/supplier/index.vue | 207 +++++++
src/views/spc/supplier/supplier.data.ts | 261 +++++++++
src/views/spc/supplieritem/index.vue | 221 ++++++++
.../spc/supplieritem/supplieritem.data.ts | 350 ++++++++++++
src/views/spc/warehouse/index.vue | 211 +++++++
src/views/spc/warehouse/warehouse.data.ts | 173 ++++++
18 files changed, 3158 insertions(+), 207 deletions(-)
create mode 100644 src/api/spc/location/index.ts
create mode 100644 src/api/spc/locationcapacity/index.ts
create mode 100644 src/api/spc/locationgroup/index.ts
create mode 100644 src/api/spc/supplier/index.ts
create mode 100644 src/api/spc/supplieritem/index.ts
create mode 100644 src/api/spc/warehouse/index.ts
create mode 100644 src/views/spc/location/index.vue
create mode 100644 src/views/spc/location/location.data.ts
create mode 100644 src/views/spc/locationgroup/index.vue
create mode 100644 src/views/spc/locationgroup/locationgroup.data.ts
create mode 100644 src/views/spc/supplier/index.vue
create mode 100644 src/views/spc/supplier/supplier.data.ts
create mode 100644 src/views/spc/supplieritem/index.vue
create mode 100644 src/views/spc/supplieritem/supplieritem.data.ts
create mode 100644 src/views/spc/warehouse/index.vue
create mode 100644 src/views/spc/warehouse/warehouse.data.ts
diff --git a/src/api/spc/location/index.ts b/src/api/spc/location/index.ts
new file mode 100644
index 0000000..a827647
--- /dev/null
+++ b/src/api/spc/location/index.ts
@@ -0,0 +1,70 @@
+import request from '@/config/axios'
+
+export interface LocationVO {
+ code: string
+ name: string
+ description: string
+ warehouseCode: string
+ areaCode: string
+ locationGroupCode: string
+ erpLocationCode: string
+ type: string
+ aisle: string
+ shelf: string
+ locationRow: number
+ locationColum: number
+ pickPriority: number
+ maxWeight: number
+ maxArea: number
+ maxVolume: number
+ userGroupCode: string
+ available: number
+ activeTime: Date
+ expireTime: Date
+ remark: string
+}
+
+// 查询库位列表
+export const getLocationPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return request.post({ url: '/wms/location/senior', data })
+ } else {
+ return await request.get({ url: `/wms/location/page`, params })
+ }
+}
+// 查询库位所有列表
+export const getLocationList = async (params) => {
+ return await request.get({ url: `/wms/location/list`, params })
+}
+
+// 查询库位详情
+export const getLocation = async (id: number) => {
+ return await request.get({ url: `/wms/location/get?id=` + id })
+}
+
+// 新增库位
+export const createLocation = async (data: LocationVO) => {
+ return await request.post({ url: `/wms/location/create`, data })
+}
+
+// 修改库位
+export const updateLocation = async (data: LocationVO) => {
+ return await request.put({ url: `/wms/location/update`, data })
+}
+
+// 删除库位
+export const deleteLocation = async (id: number) => {
+ return await request.delete({ url: `/wms/location/delete?id=` + id })
+}
+
+// 导出库位 Excel
+export const exportLocation = async (params) => {
+ return await request.download({ url: `/wms/location/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/wms/location/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/api/spc/locationcapacity/index.ts b/src/api/spc/locationcapacity/index.ts
new file mode 100644
index 0000000..40df8ca
--- /dev/null
+++ b/src/api/spc/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' })
+}
\ No newline at end of file
diff --git a/src/api/spc/locationgroup/index.ts b/src/api/spc/locationgroup/index.ts
new file mode 100644
index 0000000..874cadd
--- /dev/null
+++ b/src/api/spc/locationgroup/index.ts
@@ -0,0 +1,58 @@
+import request from '@/config/axios'
+
+export interface LocationgroupVO {
+ code: string
+ name: string
+ description: string
+ warehouseCode: string
+ areaCode: string
+ available: number
+ activeTime: Date
+ expireTime: Date
+ remark: string
+}
+
+// 查询库位组列表
+export const getLocationgroupPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return request.post({ url: '/wms/locationgroup/senior', data })
+ } else {
+ return await request.get({ url: `/wms/locationgroup/page`, params })
+ }
+}
+// 查询库位组列表
+export const getLocationgroupList = async (params) => {
+ return await request.get({ url: `/wms/locationgroup/list`, params })
+}
+
+// 查询库位组详情
+export const getLocationgroup = async (id: number) => {
+ return await request.get({ url: `/wms/locationgroup/get?id=` + id })
+}
+
+// 新增库位组
+export const createLocationgroup = async (data: LocationgroupVO) => {
+ return await request.post({ url: `/wms/locationgroup/create`, data })
+}
+
+// 修改库位组
+export const updateLocationgroup = async (data: LocationgroupVO) => {
+ return await request.put({ url: `/wms/locationgroup/update`, data })
+}
+
+// 删除库位组
+export const deleteLocationgroup = async (id: number) => {
+ return await request.delete({ url: `/wms/locationgroup/delete?id=` + id })
+}
+
+// 导出库位组 Excel
+export const exportLocationgroup = async (params) => {
+ return await request.download({ url: `/wms/locationgroup/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/wms/locationgroup/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/api/spc/supplier/index.ts b/src/api/spc/supplier/index.ts
new file mode 100644
index 0000000..65abb5b
--- /dev/null
+++ b/src/api/spc/supplier/index.ts
@@ -0,0 +1,67 @@
+import request from '@/config/axios'
+
+export interface SupplierVO {
+ code: string
+ name: string
+ shortName: string
+ address: string
+ country: string
+ city: string
+ phone: string
+ fax: string
+ postId: string
+ contacts: string
+ bank: string
+ currency: string
+ taxRate: number
+ type: string
+ available: number
+ activeTime: Date
+ expireTime: Date
+ remark: string
+}
+
+// 查询供应商列表分页
+export const getSupplierPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return request.post({ url: '/spc/supplier/senior', data })
+ } else {
+ return await request.get({ url: `/spc/supplier/page`, params })
+ }
+}
+// 查询供应商列表
+export const getSupplierList = async (params) => {
+ return await request.get({ url: `/spc/supplier/list`, params })
+}
+
+// 查询供应商详情
+export const getSupplier = async (id: number) => {
+ return await request.get({ url: `/spc/supplier/get?id=` + id })
+}
+
+// 新增供应商
+export const createSupplier = async (data: SupplierVO) => {
+ return await request.post({ url: `/spc/supplier/create`, data })
+}
+
+// 修改供应商
+export const updateSupplier = async (data: SupplierVO) => {
+ return await request.put({ url: `/spc/supplier/update`, data })
+}
+
+// 删除供应商
+export const deleteSupplier = async (id: number) => {
+ return await request.delete({ url: `/spc/supplier/delete?id=` + id })
+}
+
+// 导出供应商 Excel
+export const exportSupplier = async (params) => {
+ return await request.download({ url: `/spc/supplier/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/spc/supplier/get-import-template' })
+}
diff --git a/src/api/spc/supplieritem/index.ts b/src/api/spc/supplieritem/index.ts
new file mode 100644
index 0000000..7143f48
--- /dev/null
+++ b/src/api/spc/supplieritem/index.ts
@@ -0,0 +1,62 @@
+import request from '@/config/axios'
+
+export interface SupplieritemVO {
+ supplierCode: string
+ itemCode: string
+ supplierItemCode: string
+ supplierUom: string
+ convertRate: number
+ packUnit: string
+ packQty: number
+ altPackUnit: string
+ altPackQty: number
+ packQtyOfContainer: number
+ defaultWarehouseCode: string
+ defaultLocationCode: string
+ settlementType: string
+ available: number
+ activeTime: Date
+ expireTime: Date
+ remark: string
+}
+
+// 查询供应商物品列表
+export const getSupplieritemPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return request.post({ url: '/spc/supplieritem/senior', data })
+ } else {
+ return await request.get({ url: `/spc/supplieritem/page`, params })
+ }
+}
+
+// 查询供应商物品详情
+export const getSupplieritem = async (id: number) => {
+ return await request.get({ url: `/spc/supplieritem/get?id=` + id })
+}
+
+// 新增供应商物品
+export const createSupplieritem = async (data: SupplieritemVO) => {
+ return await request.post({ url: `/spc/supplieritem/create`, data })
+}
+
+// 修改供应商物品
+export const updateSupplieritem = async (data: SupplieritemVO) => {
+ return await request.put({ url: `/spc/supplieritem/update`, data })
+}
+
+// 删除供应商物品
+export const deleteSupplieritem = async (id: number) => {
+ return await request.delete({ url: `/spc/supplieritem/delete?id=` + id })
+}
+
+// 导出供应商物品 Excel
+export const exportSupplieritem = async (params) => {
+ return await request.download({ url: `/spc/supplieritem/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/spc/supplieritem/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/api/spc/warehouse/index.ts b/src/api/spc/warehouse/index.ts
new file mode 100644
index 0000000..7adcaca
--- /dev/null
+++ b/src/api/spc/warehouse/index.ts
@@ -0,0 +1,56 @@
+import request from '@/config/axios'
+
+export interface WarehouseVO {
+ code: string
+ name: string
+ description: string
+ type: string
+ available: number
+ activeTime: Date
+ expireTime: Date
+ remark: string
+}
+
+// 查询仓库列表
+export const getWarehousePage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return request.post({ url: '/spc/warehouse/senior', data })
+ } else {
+ return await request.get({ url: `/spc/warehouse/page`, params })
+ }
+}
+// 查询仓库所有列表
+export const getWarehouseList = async (params) => {
+ return await request.get({ url: `/spc/warehouse/list`, params })
+}
+// 查询仓库详情
+export const getWarehouse = async (id: number) => {
+ return await request.get({ url: `/spc/warehouse/get?id=` + id })
+}
+
+// 新增仓库
+export const createWarehouse = async (data: WarehouseVO) => {
+ return await request.post({ url: `/spc/warehouse/create`, data })
+}
+
+// 修改仓库
+export const updateWarehouse = async (data: WarehouseVO) => {
+ return await request.put({ url: `/spc/warehouse/update`, data })
+}
+
+// 删除仓库
+export const deleteWarehouse = async (id: number) => {
+ return await request.delete({ url: `/spc/warehouse/delete?id=` + id })
+}
+
+// 导出仓库 Excel
+export const exportWarehouse = async (params) => {
+ return await request.download({ url: `/spc/warehouse/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/spc/warehouse/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/views/spc/itembasic/index.vue b/src/views/spc/itembasic/index.vue
index 1001036..ec46ca6 100644
--- a/src/views/spc/itembasic/index.vue
+++ b/src/views/spc/itembasic/index.vue
@@ -8,6 +8,7 @@
-
+
@@ -60,7 +61,7 @@
diff --git a/src/views/spc/location/location.data.ts b/src/views/spc/location/location.data.ts
new file mode 100644
index 0000000..9e00324
--- /dev/null
+++ b/src/views/spc/location/location.data.ts
@@ -0,0 +1,377 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+// import * as AreaApi from '@/api/wms/areabasic'
+// import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
+
+import * as WarehouseApi from '@/api/spc/warehouse'
+import { Warehouse } from '@/views/spc/warehouse/warehouse.data'
+
+import * as LocationgroupApi from '@/api/spc/locationgroup'
+import { Locationgroup } from '@/views/spc/locationgroup/locationgroup.data'
+const { t } = useI18n() // 国际化
+
+/**
+ * @returns {Array} 库位
+ */
+export const Location = useCrudSchemas(reactive([
+ {
+ label: '代码',
+ field: 'code',
+ sort: 'custom',
+ table: {
+ width: 150,
+ fixed: 'left'
+ },
+ isSearch: true
+ },
+ {
+ label: '名称',
+ field: 'name',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '仓库代码',
+ field: 'warehouseCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '仓库信息', // 查询弹窗标题
+ searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
+ searchPage: WarehouseApi.getWarehousePage // 查询弹窗所需分页方法
+ }
+ }
+ },
+ {
+ label: '库区代码',
+ field: 'areaCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择库区代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库区信息', // 查询弹窗标题
+ // searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
+ // searchPage: AreaApi.getAreaPage // 查询弹窗所需分页方法
+ }
+ }
+ },
+ {
+ label: '库位组代码',
+ field: 'locationGroupCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择库区代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库区信息', // 查询弹窗标题
+ searchAllSchemas: Locationgroup.allSchemas, // 查询弹窗所需类
+ searchPage: LocationgroupApi.getLocationgroupPage // 查询弹窗所需分页方法
+ }
+ }
+ },
+ {
+ label: 'ERP库位代码',
+ field: 'erpLocationCode',
+ dictType: DICT_TYPE.ERP_LOCATION,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '类型',
+ field: 'type',
+ dictType: DICT_TYPE.LOCATION_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '巷道',
+ field: 'aisle',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '货架',
+ field: 'shelf',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '行',
+ field: 'locationRow',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ }
+ },
+ },
+ {
+ label: '列',
+ field: 'locationColum',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ }
+ },
+ },
+ {
+ label: '拣料优先级',
+ field: 'pickPriority',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ }
+ },
+ },
+ {
+ label: '最大承重',
+ field: 'maxWeight',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ }
+ },
+ },
+ {
+ label: '最大面积',
+ field: 'maxArea',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ }
+ },
+ },
+ {
+ label: '最大体积',
+ field: 'maxVolume',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ }
+ },
+ },
+ {
+ label: '用户组代码',
+ field: 'userGroupCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: true,
+ isSearch: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: 'TRUE',
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE'
+ }
+ }
+ },
+ {
+ label: '生效时间',
+ field: 'activeTime',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '失效时间',
+ field: 'expireTime',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false ,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
+
+//表单校验
+export const LocationRules = reactive({
+ code: [
+ { required: true, message: '请输入代码', trigger: 'blur' }
+ ],
+ warehouseCode: [
+ { required: true, message: '请输入仓库代码', trigger: 'change' }
+ ],
+ areaCode: [
+ { required: true, message: '请输入库区代码', trigger: 'change' }
+ ],
+ locationGroupCode: [
+ { required: true, message: '请输入库位组代码', trigger: 'change' }
+ ],
+ erpLocationCode: [
+ { required: true, message: '请选择ERP库位代码', trigger: 'change' }
+ ],
+ type: [
+ { required: true, message: '请选择类型', trigger: 'change' }
+ ],
+ pickPriority: [
+ { required: true, message: '请输入拣料优先级', trigger: 'blur' }
+ ],
+ userGroupCode: [
+ { required: true, message: '请输入用户组代码', trigger: 'blur' }
+ ],
+ available: [
+ { required: true, message: '请选择是否可用', trigger: 'change' }
+ ],
+})
\ No newline at end of file
diff --git a/src/views/spc/locationgroup/index.vue b/src/views/spc/locationgroup/index.vue
new file mode 100644
index 0000000..5ad19b7
--- /dev/null
+++ b/src/views/spc/locationgroup/index.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/spc/locationgroup/locationgroup.data.ts b/src/views/spc/locationgroup/locationgroup.data.ts
new file mode 100644
index 0000000..f66db2b
--- /dev/null
+++ b/src/views/spc/locationgroup/locationgroup.data.ts
@@ -0,0 +1,205 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+// import * as AreaApi from '@/api/wms/areabasic'
+// import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
+
+import * as WarehouseApi from '@/api/spc/warehouse'
+import { Warehouse } from '@/views/spc/warehouse/warehouse.data'
+
+const { t } = useI18n() // 国际化
+
+/**
+ * @returns {Array} 库位组
+ */
+export const Locationgroup = useCrudSchemas(reactive([
+ {
+ label: '代码',
+ field: 'code',
+ sort: 'custom',
+ table: {
+ width: 150,
+ fixed: 'left'
+ },
+ isSearch: true
+ },
+ {
+ label: '名称',
+ field: 'name',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ },
+ {
+ label: '仓库代码',
+ field: 'warehouseCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '仓库信息', // 查询弹窗标题
+ searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
+ searchPage: WarehouseApi.getWarehousePage // 查询弹窗所需分页方法
+ }
+ }
+ },
+ {
+ label: '库区代码',
+ field: 'areaCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择库区代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库区信息', // 查询弹窗标题
+ searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
+ searchPage: AreaApi.getAreaPage // 查询弹窗所需分页方法
+ }
+ }
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: true,
+ isSearch: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: 'TRUE',
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE'
+ }
+ },
+ },
+ {
+ label: '生效时间',
+ field: 'activeTime',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '失效时间',
+ field: 'expireTime',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTable: false
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false ,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
+
+//表单校验
+export const LocationgroupRules = reactive({
+ code: [
+ { required: true, message: '请输入代码', trigger: 'blur' }
+ ],
+ warehouseCode: [
+ { required: true, message: '请输入仓库代码', trigger: 'change' }
+ ],
+ areaCode: [
+ { required: true, message: '请输入库区代码', trigger: 'change' }
+ ],
+ available: [
+ { required: true, message: '请选择是否可用', trigger: 'change' }
+ ],
+})
\ No newline at end of file
diff --git a/src/views/spc/supplier/index.vue b/src/views/spc/supplier/index.vue
new file mode 100644
index 0000000..ca439da
--- /dev/null
+++ b/src/views/spc/supplier/index.vue
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/spc/supplier/supplier.data.ts b/src/views/spc/supplier/supplier.data.ts
new file mode 100644
index 0000000..847e517
--- /dev/null
+++ b/src/views/spc/supplier/supplier.data.ts
@@ -0,0 +1,261 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+const { t } = useI18n() // 国际化
+
+/**
+ * @returns {Array} 供应商
+ */
+export const Supplier = useCrudSchemas(reactive([
+ {
+ label: '代码',
+ field: 'code',
+ sort: 'custom',
+ isSearch: true,
+ table: {
+ width: 150,
+ fixed: 'left'
+ }
+ },
+ {
+ label: '名称',
+ field: 'name',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '简称',
+ field: 'shortName',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '地址',
+ field: 'address',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '国家',
+ field: 'country',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '城市',
+ field: 'city',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '电话',
+ field: 'phone',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '传真',
+ field: 'fax',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '邮编',
+ field: 'postId',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '联系人',
+ field: 'contacts',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label:'银行',
+ field: 'bank',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '币种',
+ field: 'currency',
+ sort: 'custom',
+ dictType: DICT_TYPE.CURRENCY,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '税率',
+ field: 'taxRate',
+ sort: 'custom',
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0
+ }
+ },
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '类型',
+ field: 'type',
+ sort: 'custom',
+ dictType: DICT_TYPE.SUPPLIER_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ sort: 'custom',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ form: {
+ component: 'Switch',
+ value: 'TRUE',
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE'
+ }
+ },
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '生效时间',
+ field: 'activeTime',
+ sort: 'custom',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ table: {
+ width: 180
+ }
+ },
+ {
+ label: '失效时间',
+ field: 'expireTime',
+ sort: 'custom',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ table: {
+ width: 180
+ }
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ isTable: false,
+ isForm: false,
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ sort: 'custom',
+ isTable: false,
+ isForm: false,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ table: {
+ width: 180
+ }
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ isTable: false,
+ isForm: false,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false ,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
+
+//表单校验
+export const SupplierRules = reactive({
+ code: [
+ { required: true, message: '请输入代码', trigger: 'blur' }
+ ],
+ shortName: [
+ { required: true, message: '请输入简称', trigger: 'blur' }
+ ],
+ available: [
+ { required: true, message: '请选择是否可用', trigger: 'change' }
+ ],
+})
\ No newline at end of file
diff --git a/src/views/spc/supplieritem/index.vue b/src/views/spc/supplieritem/index.vue
new file mode 100644
index 0000000..8caa7cd
--- /dev/null
+++ b/src/views/spc/supplieritem/index.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.supplierCode }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/spc/supplieritem/supplieritem.data.ts b/src/views/spc/supplieritem/supplieritem.data.ts
new file mode 100644
index 0000000..b982a9b
--- /dev/null
+++ b/src/views/spc/supplieritem/supplieritem.data.ts
@@ -0,0 +1,350 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+import * as ItembasicApi from '@/api/spc/itembasic'
+import { Itembasic } from '@/views/spc/itembasic/itembasic.data'
+
+import * as SupplierApi from '@/api/spc/supplier'
+import { Supplier } from '@/views/spc/supplier/supplier.data'
+
+// import * as WarehouseApi from '@/api/spc/warehouse'
+// import { Warehouse } from '@/views/spc/warehouse/warehouse.data'
+
+// import * as LocationApi from '@/api/spc/location'
+// import { Location } from '@/views/spc/location/location.data'
+
+const { t } = useI18n() // 国际化
+
+/**
+ * @returns {Array} 供应商物品
+ */
+export const Supplieritem = useCrudSchemas(reactive([
+ {
+ label: '供应商代码',
+ field: 'supplierCode',
+ sort: 'custom',
+ table: {
+ width: 150,
+ fixed: 'left'
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '供应商信息', // 查询弹窗标题
+ searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
+ searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
+ }
+ }
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ isSearch: true,
+ table: {
+ width: 150
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择物品代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '物品基础信息', // 查询弹窗标题
+ searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
+ searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法
+ }
+ }
+ },
+ {
+ label: '供应商物料代码',
+ field: 'supplierItemCode',
+ sort: 'custom',
+ isSearch: true,
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '供应商计量单位',
+ field: 'supplierUom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '转换率',
+ field: 'convertRate',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0
+ }
+ },
+ },
+ {
+ label: '供应商包装单位',
+ field: 'packUnit',
+ dictType: DICT_TYPE.PACK_UNIT,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '供应商包装量',
+ field: 'packQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 1,
+ precision: 6
+ }
+ },
+ },
+ {
+ label: '供应商替代包装单位',
+ field: 'altPackUnit',
+ dictType: DICT_TYPE.PACK_UNIT,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '供应商替代包装量',
+ field: 'altPackQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6
+ }
+ },
+ },
+ {
+ label: '每器具包装数',
+ field: 'packQtyOfContainer',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6
+ }
+ },
+ },
+ // {
+ // label: '默认收货仓库',
+ // field: 'defaultWarehouseCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // // labelMessage: '信息提示说明!!!',
+ // componentProps: {
+ // isSearchList: true, // 开启查询弹窗
+ // searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
+ // searchField: 'code', // 查询弹窗赋值字段
+ // searchTitle: '仓库信息', // 查询弹窗标题
+ // searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
+ // searchPage: WarehouseApi.getWarehousePage // 查询弹窗所需分页方法
+ // }
+ // }
+ // },
+ // {
+ // label: '默认收货库位',
+ // field: 'defaultLocationCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // // labelMessage: '信息提示说明!!!',
+ // componentProps: {
+ // isSearchList: true, // 开启查询弹窗
+ // searchListPlaceholder: '请选择库位代码', // 输入框占位文本
+ // searchField: 'code', // 查询弹窗赋值字段
+ // searchTitle: '库位信息', // 查询弹窗标题
+ // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
+ // searchPage: LocationApi.getLocationPage // 查询弹窗所需分页方法
+ // }
+ // }
+ // },
+ {
+ label: '结算方式',
+ field: 'settlementType',
+ dictType: DICT_TYPE.SETTLEMENT_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ form: {
+ component: 'Switch',
+ value: 'TRUE',
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE'
+ }
+ },
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '生效时间',
+ field: 'activeTime',
+ formatter: dateFormatter,
+ isTable: true,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '失效时间',
+ field: 'expireTime',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ isTable: true,
+ isForm: false,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ isTable: true,
+ isForm: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false ,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
+
+//表单校验
+export const SupplieritemRules = reactive({
+ supplierCode: [
+ { required: true, message: '请输入供应商代码', trigger: 'change' }
+ ],
+ itemCode: [
+ { required: true, message: '请输入物料代码', trigger: 'change' }
+ ],
+ packUnit: [
+ { required: true, message: '请选择供应商包装单位', trigger: 'change' }
+ ],
+ packQty: [
+ { required: true, message: '请输入供应商包装量', trigger: 'blur' }
+ ],
+ packQtyOfContainer: [
+ { required: true, message: '请输入每器具包装数', trigger: 'blur' }
+ ],
+ available: [
+ { required: true, message: '请选择是否可用', trigger: 'change' }
+ ],
+})
\ No newline at end of file
diff --git a/src/views/spc/warehouse/index.vue b/src/views/spc/warehouse/index.vue
new file mode 100644
index 0000000..e17c274
--- /dev/null
+++ b/src/views/spc/warehouse/index.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/spc/warehouse/warehouse.data.ts b/src/views/spc/warehouse/warehouse.data.ts
new file mode 100644
index 0000000..c80ba6d
--- /dev/null
+++ b/src/views/spc/warehouse/warehouse.data.ts
@@ -0,0 +1,173 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+const { t } = useI18n() // 国际化
+
+/**
+ * @returns {Array} 仓库
+ */
+export const Warehouse = useCrudSchemas(reactive([
+ {
+ label: '代码',
+ field: 'code',
+ sort: 'custom',
+ table: {
+ width: 150,
+ fixed: 'left'
+ },
+ isSearch: true
+ },
+ {
+ label: '名称',
+ field: 'name',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '描述',
+ field: 'description',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '类型',
+ field: 'type',
+ dictType: DICT_TYPE.WAREHOUSE_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '是否可用',
+ field: 'available',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: true,
+ isSearch: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: 'TRUE',
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE'
+ }
+ },
+ },
+ {
+ label: '生效时间',
+ field: 'activeTime',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '失效时间',
+ field: 'expireTime',
+ isTable: true,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isTable: false,
+ isForm: false
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false,
+ isForm: false
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false ,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
+
+//表单校验
+export const WarehouseRules = reactive({
+ code: [
+ { required: true, message: '请输入代码', trigger: 'blur' }
+ ],
+ available: [
+ { required: true, message: '请选择是否可用', trigger: 'change' }
+ ],
+})
\ No newline at end of file