diff --git a/src/views/wms/basicDataManage/customerManage/customer/customer.data.ts b/src/views/wms/basicDataManage/customerManage/customer/customer.data.ts new file mode 100644 index 000000000..a14dc27ce --- /dev/null +++ b/src/views/wms/basicDataManage/customerManage/customer/customer.data.ts @@ -0,0 +1,259 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 客户 + */ +export const Customer = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + isSearch: true, + sort: 'custom', + 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', + dictType: DICT_TYPE.CURRENCY, + dictClass: 'string', + isTable: true, + isSearch: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '税率', + field: 'taxRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '类型', + field: 'type', + dictType: DICT_TYPE.CUSTOMER_TYPE, + dictClass: 'string', + isTable: true, + isSearch: 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: { + 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: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建时间', + field: 'createTime', + isTable: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: 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 CustomerRules = 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/wms/basicDataManage/customerManage/customer/index.vue b/src/views/wms/basicDataManage/customerManage/customer/index.vue index 494069734..ab2e9eeb3 100644 --- a/src/views/wms/basicDataManage/customerManage/customer/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customer/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Customer.allSchemas" /> @@ -60,7 +61,8 @@ import download from '@/utils/download' import * as CustomerApi from '@/api/wms/customer' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Customer, CustomerRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Customer, CustomerRules } from './customer.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts b/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts new file mode 100644 index 000000000..f61a677ef --- /dev/null +++ b/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts @@ -0,0 +1,222 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 客户月台 + */ +export const Customerdock = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true + }, + { + label: '名称', + field: 'name', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '城市', + field: 'city', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '地址', + field: 'address', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '联系人姓名', + field: 'contactPerson', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '联系人电话', + field: 'contactPhone', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '仓库', + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '默认库位', + field: 'defaultLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + 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: { + 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: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建时间', + field: 'createTime', + isTable: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isSearch: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + }, + { + label: '创建者', + field: 'creator', + isSearch: false, + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const CustomerdockRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + customerCode: [ + { required: true, message: '请输入客户代码', trigger: 'blur' } + ], + defaultLocationCode: [ + { required: true, message: '请输入默认库位', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue index 57f2693c7..58e65a10e 100644 --- a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Customerdock.allSchemas" /> @@ -64,7 +65,10 @@ import * as CustomerApi from '@/api/wms/customer' import * as WarehouseApi from '@/api/wms/warehouse' import * as LocationApi from '@/api/wms/location' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Customer, Customerdock, CustomerdockRules, Location, Warehouse ,} from '@/utils/disposition/tableColumns' +import { Warehouse } from '../../factoryModeling/warehouse/warehouse.data' +import { Location } from '../../factoryModeling/location/location.data' +import { Customer } from '../customer/customer.data' +import { Customerdock, CustomerdockRules } from './customerdock.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts b/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts new file mode 100644 index 000000000..2065e70f9 --- /dev/null +++ b/src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts @@ -0,0 +1,248 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 客户物品 + */ +export const Customeritem = useCrudSchemas(reactive([ + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '客户物料代码', + field: 'customerItemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '客户计量单位', + field: 'cusotmerUom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + 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', + }, + }, + { + 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', + }, + }, + { + label: '每器具包装数', + field: 'packQtyOfContainer', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + isSearch: true + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + 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: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + 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: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + 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 CustomeritemRules = reactive({ + customerCode: [ + { required: true, message: '请输入客户代码', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + 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/wms/basicDataManage/customerManage/customeritem/index.vue b/src/views/wms/basicDataManage/customerManage/customeritem/index.vue index c1c6dc1a9..1d9430ca7 100644 --- a/src/views/wms/basicDataManage/customerManage/customeritem/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customeritem/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Customeritem.allSchemas" /> @@ -63,7 +64,9 @@ import * as CustomeritemApi from '@/api/wms/customeritem' import * as ItembasicApi from '@/api/wms/itembasic' import * as CustomerApi from '@/api/wms/customer' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Customer, Customeritem, CustomeritemRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Customeritem, CustomeritemRules } from './customeritem.data' +import { Customer } from '../customer/customer.data' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/customerManage/project/index.vue b/src/views/wms/basicDataManage/customerManage/project/index.vue index c601e37b0..5771995f5 100644 --- a/src/views/wms/basicDataManage/customerManage/project/index.vue +++ b/src/views/wms/basicDataManage/customerManage/project/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Project.allSchemas" /> @@ -62,7 +63,8 @@ import download from '@/utils/download' import * as ProjectApi from '@/api/wms/project' import * as CustomerApi from '@/api/wms/customer' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Project, ProjectRules, Customer } from '@/utils/disposition/tableColumns' +import { Project, ProjectRules } from './project.data' +import { Customer } from '../customer/customer.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/customerManage/project/project.data.ts b/src/views/wms/basicDataManage/customerManage/project/project.data.ts new file mode 100644 index 000000000..633abe1f2 --- /dev/null +++ b/src/views/wms/basicDataManage/customerManage/project/project.data.ts @@ -0,0 +1,159 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 项目 + */ +export const Project = 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: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + 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: { + 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: { + 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: { + 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 ProjectRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/customerManage/saleprice/index.vue b/src/views/wms/basicDataManage/customerManage/saleprice/index.vue index dfe7aaec5..c7737fc69 100644 --- a/src/views/wms/basicDataManage/customerManage/saleprice/index.vue +++ b/src/views/wms/basicDataManage/customerManage/saleprice/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Saleprice.allSchemas" /> @@ -63,7 +64,9 @@ import * as SalepriceApi from '@/api/wms/saleprice' import * as ItembasicApi from '@/api/wms/itembasic' import * as CustomerApi from '@/api/wms/customer' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Saleprice, SalepriceRules, Itembasic, Customer } from '@/utils/disposition/tableColumns' +import { Saleprice, SalepriceRules } from './saleprice.data' +import { Customer } from '../customer/customer.data' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts b/src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts new file mode 100644 index 000000000..b2f83cd73 --- /dev/null +++ b/src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts @@ -0,0 +1,182 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 销售价格单 + */ +export const Saleprice = useCrudSchemas(reactive([ + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '货币', + field: 'currency', + dictType: DICT_TYPE.CURRENCY, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '价格', + field: 'price', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + 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: { + 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: { + 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: { + 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 SalepriceRules = reactive({ + customercode: [ + { required: true, message: '请输入客户代码', trigger: 'blur' } + ], + itemcode: [ + { required: true, message: '请输入物料代码', trigger: 'blur' } + ], + currency: [ + { required: true, message: '请选择货币', trigger: 'change' } + ], + price: [ + { required: true, message: '请输入价格', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts b/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts new file mode 100644 index 000000000..b57ec38e5 --- /dev/null +++ b/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts @@ -0,0 +1,297 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 业务类型 + */ +export const Businesstype = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '可用物品类型范围', + field: 'itemTypes', + dictType: DICT_TYPE.ITEM_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '可用物品状态范围', + field: 'itemStatuses', + dictType: DICT_TYPE.ITEM_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '出库库位类型范围', + field: 'outLocationTypes', + dictType: DICT_TYPE.LOCATION_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '入库库位类型范围', + field: 'inLocationTypes', + dictType: DICT_TYPE.LOCATION_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '出库库区范围', + field: 'outAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '入库库区范围', + field: 'inAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '出库库存状态范围', + field: 'outInventoryStatuses', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '入库库存状态范围', + field: 'inInventoryStatuses', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否使用在途库', + field: 'useOnTheWay', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '在途库区', + field: 'onTheWayArea', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTable: false, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + isTable: false, + isForm: false, + 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: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const BusinesstypeRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + name: [ + { required: true, message: '请输入名称', trigger: 'blur' } + ], + itemTypes: [ + { required: true, message: '请选择可用物品类型范围', trigger: 'change' } + ], + itemStatuses: [ + { required: true, message: '请选择可用物品状态范围', trigger: 'change' } + ], + outTransactionType: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransactionType: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + useOnTheWay: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue b/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue index 5e86ab088..7bffe16ad 100644 --- a/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Businesstype.allSchemas" /> @@ -62,7 +63,8 @@ import download from '@/utils/download' import * as BusinesstypeApi from '@/api/wms/businesstype' import * as AreaApi from '@/api/wms/areabasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Businesstype, BusinesstypeRules, Area } from '@/utils/disposition/tableColumns' +import { Area } from '../../factoryModeling/areabasic/areabasic.data' +import { Businesstype, BusinesstypeRules } from './businesstype.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts b/src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts new file mode 100644 index 000000000..28f839a3e --- /dev/null +++ b/src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts @@ -0,0 +1,238 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 单据设置 + */ +export const Documentsetting = 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.DOCUMENT_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '号码前缀', + field: 'numberPrefix', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '号码时间格式', + field: 'dateFormat', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '号码流水长度', + field: 'serialLength', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '号码分隔符', + field: 'separatorStr', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '流水重置周期', + field: 'resetPeriod', + dictType: DICT_TYPE.RESET_PERIOD, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + isTable: true, + formatter: dateFormatter, + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + isTable: false, + isForm: false, + 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: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const DocumentsettingRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + name: [ + { required: true, message: '请输入名称', trigger: 'blur' } + ], + type: [ + { required: true, message: '请选择单据类型', trigger: 'change' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + numberPrefix: [ + { required: true, message: '请输入号码前缀', trigger: 'blur' } + ], + dateFormat: [ + { required: true, message: '请输入号码时间格式', trigger: 'blur' } + ], + serialLength: [ + { required: true, message: '请输入号码流水长度', trigger: 'blur' } + ], + resetPeriod: [ + { required: true, message: '请选择流水重置周期', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue index ca9be3862..222833a25 100644 --- a/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Documentsetting.allSchemas" /> @@ -63,7 +64,8 @@ import download from '@/utils/download' import * as DocumentsettingApi from '@/api/wms/documentsetting' import * as ItembasicApi from '@/api/wms/itembasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Documentsetting, DocumentsettingRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Documentsetting, DocumentsettingRules } from './documentsetting.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue index 380c7bf83..f0ffb816d 100644 --- a/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Jobsetting.allSchemas" /> @@ -59,7 +60,7 @@ import download from '@/utils/download' import * as JobsettingApi from '@/api/wms/jobsetting' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Jobsetting, JobsettingRules } from '@/utils/disposition/tableColumns' +import { Jobsetting, JobsettingRules } from './jobsetting.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts b/src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts new file mode 100644 index 000000000..4a7030155 --- /dev/null +++ b/src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts @@ -0,0 +1,391 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 任务设置 + */ +export const Jobsetting = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '有效分钟', + field: 'validMinutes', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '自动完成', + field: 'autoComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '允许修改库位', + field: 'allowModifyLocation', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '允许修改数量', + field: 'allowModifyQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '允许大于推荐数量', + field: 'allowBiggerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '允许小于推荐数量', + field: 'allowSmallerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '允许修改库存状态', + field: 'allowModifyInventoryStatus', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '允许连续扫描', + field: 'allowContinuousScanning', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '允许部分完成', + field: 'allowPartialComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '允许修改批次', + field: 'allowModifyBach', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '允许修改包装号', + field: 'allowModifyPackingNumber', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '是否软删除', + field: 'isSoftDeleted', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + isForm: false, + isTable: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const JobsettingRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + validMinutes: [ + { required: true, message: '请输入有效分钟', trigger: 'blur' } + ], + autoComplete: [ + { required: true, message: '请选择是否自动完成', trigger: 'change' } + ], + allowModifyLocation: [ + { required: true, message: '请选择是否允许修改库位', trigger: 'change' } + ], + allowModifyQty: [ + { required: true, message: '请选择是否允许修改数量', trigger: 'change' } + ], + allowBiggerQty: [ + { required: true, message: '请选择是否允许大于推荐数量', trigger: 'change' } + ], + allowSmallerQty: [ + { required: true, message: '请选择是否允许小于推荐数量', trigger: 'change' } + ], + allowModifyInventoryStatus: [ + { required: true, message: '请选择是否允许修改库存状态', trigger: 'change' } + ], + allowContinuousScanning: [ + { required: true, message: '请选择是否允许连续扫描', trigger: 'change' } + ], + allowPartialComplete: [ + { required: true, message: '请选择是否允许部分完成', trigger: 'change' } + ], + allowModifyBach: [ + { required: true, message: '请选择是否允许修改批次', trigger: 'change' } + ], + allowModifyPackingNumber: [ + { required: true, message: '请选择是否允许修改包装号', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue index d92b67000..7f7762932 100644 --- a/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Recordsetting.allSchemas" /> @@ -63,7 +64,8 @@ import download from '@/utils/download' import * as RecordsettingApi from '@/api/wms/recordsetting' import * as ItembasicApi from '@/api/wms/itembasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Recordsetting, RecordsettingRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Recordsetting, RecordsettingRules } from './recordsetting.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts b/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts new file mode 100644 index 000000000..fe8743f26 --- /dev/null +++ b/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts @@ -0,0 +1,153 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 记录设置 + */ +export const Recordsetting = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 200, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + isTable: false, + formatter: dateFormatter, + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + isTable: false, + isForm: false, + 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: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const RecordsettingRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue index c8c9d198c..fab51bf0b 100644 --- a/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Requestsetting.allSchemas" /> @@ -63,7 +64,8 @@ import download from '@/utils/download' import * as RequestsettingApi from '@/api/wms/requestsetting' import * as ItembasicApi from '@/api/wms/itembasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Requestsetting, RequestsettingRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Requestsetting, RequestsettingRules } from './requestsetting.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts b/src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts new file mode 100644 index 000000000..7d436a986 --- /dev/null +++ b/src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts @@ -0,0 +1,242 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 申请设置 + */ +export const Requestsetting = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '申请模式', + field: 'requestMode', + dictType: DICT_TYPE.REQEUST_MODE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '跳过任务直接删生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + isTable: false, + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + label: '创建者', + field: 'creator', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const RequestsettingRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + requestMode: [ + { required: true, message: '请选择申请模式', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue b/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue index 92116062b..7e8aefd98 100644 --- a/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Transactiontype.allSchemas" /> @@ -63,7 +64,8 @@ import download from '@/utils/download' import * as TransactiontypeApi from '@/api/wms/transactiontype' import * as ItembasicApi from '@/api/wms/itembasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Transactiontype, TransactiontypeRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Transactiontype, TransactiontypeRules } from './transactiontype.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts b/src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts new file mode 100644 index 000000000..a41d3338d --- /dev/null +++ b/src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts @@ -0,0 +1,214 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 事务类型 + */ +export const Transactiontype = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库存动作', + field: 'inventoryAction', + dictType: DICT_TYPE.INVENTORY_ACTION, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '允许负数', + field: 'allowNegative', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '是否软删除', + field: 'isSoftDeleted', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + 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: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const TransactiontypeRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + name: [ + { required: true, message: '请输入名称', trigger: 'blur' } + ], + inventoryAction: [ + { required: true, message: '请选择库存动作', trigger: 'change' } + ], + allowNegative: [ + { required: true, message: '请选择允许复数', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts b/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts new file mode 100644 index 000000000..d70b58e2c --- /dev/null +++ b/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts @@ -0,0 +1,195 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 库区 + */ +export const Area = 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 + }, + }, + { + label: '类型', + field: 'type', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否是功能区', + field: 'isFunctional', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + 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: { + 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: { + 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: { + 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 AreaRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + warehouseCode: [ + { required: true, message: '请输入仓库代码', trigger: 'blur' } + ], + isFunctional: [ + { required: true, message: '请选择是否是功能区', trigger: 'change' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue b/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue index e083ae197..b977fa9d2 100644 --- a/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Area.allSchemas" /> @@ -62,7 +63,8 @@ import download from '@/utils/download' import * as AreaApi from '@/api/wms/areabasic' import * as WarehouseApi from '@/api/wms/warehouse' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Area, AreaRules, Warehouse } from '@/utils/disposition/tableColumns' +import { Area, AreaRules } from './areabasic.data' +import { Warehouse } from '../warehouse/warehouse.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts b/src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts new file mode 100644 index 000000000..bbd9dca14 --- /dev/null +++ b/src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts @@ -0,0 +1,219 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 月台 + */ +export const Dock = 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: 'city', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '地址', + field: 'address', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '类型', + field: 'type', + dictType: DICT_TYPE.DOCK_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '仓库代码', + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '默认库位代码', + field: 'defaultLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '联系人姓名', + field: 'contactPerson', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '联系人电话', + field: 'contactPhone', + 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: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + 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: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + 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: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + 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 DockRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + type: [ + { required: true, message: '请输入类型', trigger: 'change' } + ], + warehouseCode: [ + { required: true, message: '请输入仓库代码', trigger: 'blur' } + ], + defaultLocationCode: [ + { required: true, message: '请输入默认库位代码', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/dock/index.vue b/src/views/wms/basicDataManage/factoryModeling/dock/index.vue index cf9da4173..812c8b89f 100644 --- a/src/views/wms/basicDataManage/factoryModeling/dock/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/dock/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Dock.allSchemas" /> @@ -63,7 +64,9 @@ import * as DockApi from '@/api/wms/dock' import * as WarehouseApi from '@/api/wms/warehouse' import * as LocationApi from '@/api/wms/location' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Dock, DockRules, Location, Warehouse } from '@/utils/disposition/tableColumns' +import { Dock, DockRules } from './dock.data' +import { Location } from '../location/location.data' +import { Warehouse } from '../warehouse/warehouse.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/factoryModeling/location/index.vue b/src/views/wms/basicDataManage/factoryModeling/location/index.vue index 6ddd5971c..d6077d27b 100644 --- a/src/views/wms/basicDataManage/factoryModeling/location/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/location/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Location.allSchemas" /> @@ -64,7 +65,10 @@ import * as WarehouseApi from '@/api/wms/warehouse' import * as AreaApi from '@/api/wms/areabasic' import * as LocationgroupApi from '@/api/wms/locationgroup' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Location, LocationRules, Locationgroup, Area, Warehouse } from '@/utils/disposition/tableColumns' +import { Location, LocationRules } from './location.data' +import { Locationgroup } from '../locationgroup/locationgroup.data' +import { Area } from '../areabasic/areabasic.data' +import { Warehouse } from '../warehouse/warehouse.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/factoryModeling/location/location.data.ts b/src/views/wms/basicDataManage/factoryModeling/location/location.data.ts new file mode 100644 index 000000000..bed4c478f --- /dev/null +++ b/src/views/wms/basicDataManage/factoryModeling/location/location.data.ts @@ -0,0 +1,308 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +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 + }, + }, + { + label: '区域代码', + field: 'areaCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库位组代码', + field: 'locationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: 'ERP库位代码', + field: 'erpLocationCode', + dictType: DICT_TYPE.ERP_LOCATION, + dictClass: 'string', + 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', + }, + }, + { + label: '列', + field: 'locationColum', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '拣料优先级', + field: 'pickPriority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '最大承重', + field: 'maxWeight', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '最大面积', + field: 'maxArea', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '最大体积', + field: 'maxVolume', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + 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: { + 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: { + 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: { + 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: 'blur' } + ], + areaCode: [ + { required: true, message: '请输入库区代码', trigger: 'blur' } + ], + locationGroupCode: [ + { required: true, message: '请输入库位组代码', trigger: 'blur' } + ], + 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/wms/basicDataManage/factoryModeling/locationgroup/index.vue b/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue index 821dc1044..6c5cfe667 100644 --- a/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Locationgroup.allSchemas" /> @@ -63,7 +64,9 @@ import * as LocationgroupApi from '@/api/wms/locationgroup' import * as WarehouseApi from '@/api/wms/warehouse' import * as AreaApi from '@/api/wms/areabasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Area, Locationgroup, LocationgroupRules, Warehouse } from '@/utils/disposition/tableColumns' +import { Locationgroup, LocationgroupRules } from './locationgroup.data' +import { Area } from '../areabasic/areabasic.data' +import { Warehouse } from '../warehouse/warehouse.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts b/src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts new file mode 100644 index 000000000..3b243c83d --- /dev/null +++ b/src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.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 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, + }, + { + label: '区域代码', + field: 'areaCode', + 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: { + 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: { + 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: { + 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: 'blur' } + ], + areaCode: [ + { required: true, message: '请输入区域代码', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/process/index.vue b/src/views/wms/basicDataManage/factoryModeling/process/index.vue index f37890c15..85fb1ff2c 100644 --- a/src/views/wms/basicDataManage/factoryModeling/process/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/process/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Process.allSchemas" /> @@ -63,7 +64,9 @@ import * as ProcessApi from '@/api/wms/process' import * as WorkshopApi from '@/api/wms/workshop' import * as ProductionlineApi from '@/api/wms/productionline' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Process, ProcessRules, Productionline, Workshop } from '@/utils/disposition/tableColumns' +import { Process, ProcessRules } from './process.data' +import { Productionline } from '../productionline/productionline.data' +import { Workshop } from '../workshop/workshop.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/factoryModeling/process/process.data.ts b/src/views/wms/basicDataManage/factoryModeling/process/process.data.ts new file mode 100644 index 000000000..f29237c2d --- /dev/null +++ b/src/views/wms/basicDataManage/factoryModeling/process/process.data.ts @@ -0,0 +1,184 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 工序 + */ +export const Process = 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: 'type', + dictType: DICT_TYPE.PROCESS_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTable: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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 ProcessRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + workshopCode: [ + { required: true, message: '请输入车间代码', trigger: 'blur' } + ], + productionLineCode: [ + { required: true, message: '请输入生产线代码', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue b/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue index 17b95806f..6829fa71f 100644 --- a/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Productionline.allSchemas" /> @@ -63,7 +64,9 @@ import * as ProductionlineApi from '@/api/wms/productionline' import * as WorkshopApi from '@/api/wms/workshop' import * as LocationApi from '@/api/wms/location' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Productionline, ProductionlineRules, Location, Workshop } from '@/utils/disposition/tableColumns' +import { Productionline, ProductionlineRules } from './productionline.data' +import { Location } from '../location/location.data' +import { Workshop } from '../workshop/workshop.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts b/src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts new file mode 100644 index 000000000..4fbbe73b4 --- /dev/null +++ b/src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts @@ -0,0 +1,189 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 生产线 + */ +export const Productionline = 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: 'type', + dictType: DICT_TYPE.PRODUCTION_LINE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '原料库位', + field: 'rawLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '成品库位', + field: 'fgLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTable: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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 ProductionlineRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + workshopCode: [ + { required: true, message: '请输入车间代码', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue b/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue index 64d6d40f6..11a52e128 100644 --- a/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Warehouse.allSchemas" /> @@ -59,7 +60,7 @@ import download from '@/utils/download' import * as WarehouseApi from '@/api/wms/warehouse' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Warehouse, WarehouseRules } from '@/utils/disposition/tableColumns' +import { Warehouse, WarehouseRules } from './warehouse.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts b/src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts new file mode 100644 index 000000000..0427b5d1b --- /dev/null +++ b/src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts @@ -0,0 +1,170 @@ +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: { + 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: { + 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: { + 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 diff --git a/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue b/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue index fb9b6a4cc..edae21a74 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Workshop.allSchemas" /> @@ -59,7 +60,7 @@ import download from '@/utils/download' import * as WorkshopApi from '@/api/wms/workshop' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Workshop, WorkshopRules } from '@/utils/disposition/tableColumns' +import { Workshop, WorkshopRules } from './workshop.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts b/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts new file mode 100644 index 000000000..2df56929b --- /dev/null +++ b/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts @@ -0,0 +1,162 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 车间 + */ +export const Workshop = 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: 'type', + dictType: DICT_TYPE.WORKSHOP_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', + 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: { + 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: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + isTable: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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 WorkshopRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue b/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue index 6c096741e..1070a8a95 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Workstation.allSchemas" /> @@ -64,7 +65,10 @@ import * as LocationApi from '@/api/wms/location' import * as WorkshopApi from '@/api/wms/workshop' import * as ProductionlineApi from '@/api/wms/productionline' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Workstation, WorkstationRules, Location, Productionline, Workshop } from '@/utils/disposition/tableColumns' +import { Location } from '../location/location.data' +import { Productionline } from '../productionline/productionline.data' +import { Workshop } from '../workshop/workshop.data' +import { Workstation, WorkstationRules } from './workstation.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts new file mode 100644 index 000000000..0502a8191 --- /dev/null +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts @@ -0,0 +1,200 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 工位 + */ +export const Workstation = 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: 'type', + dictType: DICT_TYPE.WORK_STATION_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '原料库位', + field: 'rawLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '成品库位', + field: 'fgLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + isTable: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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 WorkstationRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + workshopCode: [ + { required: true, message: '请输入车间代码', trigger: 'blur' } + ], + productionLineCode: [ + { required: true, message: '请输入生产线代码', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts b/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts index 11757ec81..d43696f6a 100644 --- a/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts +++ b/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts @@ -90,6 +90,8 @@ export const Bom = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } } }, @@ -109,6 +111,8 @@ export const Bom = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } } }, diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts index 5a9efb432..ff6888f58 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts @@ -340,6 +340,8 @@ export const Itembasic = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } }, // tableForm:{ @@ -363,6 +365,8 @@ export const Itembasic = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } }, }, diff --git a/src/views/wms/basicDataManage/itemManage/itempackaging/itempackaging.data.ts b/src/views/wms/basicDataManage/itemManage/itempackaging/itempackaging.data.ts index aa0d624b3..654871653 100644 --- a/src/views/wms/basicDataManage/itemManage/itempackaging/itempackaging.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itempackaging/itempackaging.data.ts @@ -162,6 +162,8 @@ export const Itempackaging = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } } }, @@ -181,6 +183,8 @@ export const Itempackaging = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } } }, diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts index 32bba1525..2e917181e 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts @@ -69,6 +69,8 @@ export const Productionlineitem = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } } }, @@ -87,6 +89,8 @@ export const Productionlineitem = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } } }, diff --git a/src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts b/src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts index 3876e6713..83d102c96 100644 --- a/src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts +++ b/src/views/wms/basicDataManage/itemManage/stdcostprice/stdcostprice.data.ts @@ -75,8 +75,10 @@ export const Stdcostprice = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '失效时间', @@ -94,6 +96,8 @@ export const Stdcostprice = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } } }, diff --git a/src/views/wms/basicDataManage/orderManage/carrier/carrier.data.ts b/src/views/wms/basicDataManage/orderManage/carrier/carrier.data.ts new file mode 100644 index 000000000..b8ff6de91 --- /dev/null +++ b/src/views/wms/basicDataManage/orderManage/carrier/carrier.data.ts @@ -0,0 +1,260 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 承运商 + */ +export const Carrier = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '简称', + field: 'shortName', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + 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', + dictType: DICT_TYPE.CURRENCY, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '税率', + field: 'taxRate', + form: { + component: 'InputNumber', + }, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '类型', + field: 'type', + dictType: DICT_TYPE.CARRIER_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: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + 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: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + 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: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + 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 CarrierRules = 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/wms/basicDataManage/orderManage/carrier/index.vue b/src/views/wms/basicDataManage/orderManage/carrier/index.vue index b200902c3..bf7cac1ea 100644 --- a/src/views/wms/basicDataManage/orderManage/carrier/index.vue +++ b/src/views/wms/basicDataManage/orderManage/carrier/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Carrier.allSchemas" /> @@ -60,7 +61,8 @@ import download from '@/utils/download' import * as CarrierApi from '@/api/wms/carrier' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Carrier, CarrierRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Carrier, CarrierRules } from './carrier.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/orderManage/owner/index.vue b/src/views/wms/basicDataManage/orderManage/owner/index.vue index 540fa8d94..e360878e4 100644 --- a/src/views/wms/basicDataManage/orderManage/owner/index.vue +++ b/src/views/wms/basicDataManage/orderManage/owner/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Owner.allSchemas" /> @@ -60,7 +61,8 @@ import download from '@/utils/download' import * as OwnerApi from '@/api/wms/owner' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Owner, OwnerRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Owner, OwnerRules } from './owner.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/orderManage/owner/owner.data.ts b/src/views/wms/basicDataManage/orderManage/owner/owner.data.ts new file mode 100644 index 000000000..b12d27b5d --- /dev/null +++ b/src/views/wms/basicDataManage/orderManage/owner/owner.data.ts @@ -0,0 +1,258 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 货主 + */ +export const Owner = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true + }, + { + 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', + dictType: DICT_TYPE.CURRENCY, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '税率', + field: 'taxRate', + form: { + component: 'InputNumber', + }, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '类型', + field: 'type', + dictType: DICT_TYPE.OWNER_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: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: '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: { + 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 OwnerRules = 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/wms/basicDataManage/orderManage/shift/index.vue b/src/views/wms/basicDataManage/orderManage/shift/index.vue index f7f4ca291..0033f48c8 100644 --- a/src/views/wms/basicDataManage/orderManage/shift/index.vue +++ b/src/views/wms/basicDataManage/orderManage/shift/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Shift.allSchemas" /> @@ -60,7 +61,8 @@ import download from '@/utils/download' import * as ShiftApi from '@/api/wms/shift' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Shift, ShiftRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Shift, ShiftRules } from './shift.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/orderManage/shift/shift.data.ts b/src/views/wms/basicDataManage/orderManage/shift/shift.data.ts new file mode 100644 index 000000000..e7b5fb272 --- /dev/null +++ b/src/views/wms/basicDataManage/orderManage/shift/shift.data.ts @@ -0,0 +1,221 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 班次 + */ +export const Shift = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '开始时间', + field: 'beginTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '结束时间', + field: 'entTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true, + }, + { + label: '是否跨天', + field: 'endAtNextDay', + 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: '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: { + 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: { + 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: { + 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 ShiftRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + beginTime: [ + { required: true, message: '请输入开始时间', trigger: 'blur' } + ], + entTime: [ + { required: true, message: '请输入结束时间', trigger: 'blur' } + ], + endAtNextDay: [ + { required: true, message: '请选择是否跨天', trigger: 'change' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/orderManage/team/index.vue b/src/views/wms/basicDataManage/orderManage/team/index.vue index f28746296..9e2cbaa63 100644 --- a/src/views/wms/basicDataManage/orderManage/team/index.vue +++ b/src/views/wms/basicDataManage/orderManage/team/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Team.allSchemas" /> @@ -60,7 +61,8 @@ import download from '@/utils/download' import * as TeamApi from '@/api/wms/team' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Team, TeamRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Team, TeamRules } from './team.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/orderManage/team/team.data.ts b/src/views/wms/basicDataManage/orderManage/team/team.data.ts new file mode 100644 index 000000000..a42042bef --- /dev/null +++ b/src/views/wms/basicDataManage/orderManage/team/team.data.ts @@ -0,0 +1,159 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 班组 + */ +export const Team = 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: 'members', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + 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: { + 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: { + 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: { + 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 TeamRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/strategySetting/condition/condition.data.ts b/src/views/wms/basicDataManage/strategySetting/condition/condition.data.ts new file mode 100644 index 000000000..bf8a26734 --- /dev/null +++ b/src/views/wms/basicDataManage/strategySetting/condition/condition.data.ts @@ -0,0 +1,91 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 条件 + */ +export const Condition = useCrudSchemas(reactive([ + { + label: '策略代码', + field: 'strategyCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + }, + { + label: '规则代码', + field: 'ruleCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '参数', + field: 'paramCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作符', + field: 'operator', + dictType: DICT_TYPE.STRATEGY_PARAM_OPEARTOR, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '值', + field: 'value', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '条件分组', + field: 'groupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const ConditionRules = reactive({ + strategyCode: [ + { required: true, message: '请输入策略代码', trigger: 'blur' } + ], + ruleCode: [ + { required: true, message: '请输入规则代码', trigger: 'blur' } + ], + paramCode: [ + { required: true, message: '请输入参数', trigger: 'blur' } + ], + operator: [ + { required: true, message: '请选择操作符', trigger: 'change' } + ], + value: [ + { required: true, message: '请输入值', trigger: 'blur' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/strategySetting/condition/index.vue b/src/views/wms/basicDataManage/strategySetting/condition/index.vue index 15bae0c08..c1c129739 100644 --- a/src/views/wms/basicDataManage/strategySetting/condition/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/condition/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Condition.allSchemas" /> @@ -63,7 +64,8 @@ import download from '@/utils/download' import * as ConditionApi from '@/api/wms/condition' import * as ItembasicApi from '@/api/wms/itembasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Condition, ConditionRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Condition, ConditionRules } from './condition.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/strategySetting/configuration/configuration.data.ts b/src/views/wms/basicDataManage/strategySetting/configuration/configuration.data.ts new file mode 100644 index 000000000..b5d4938cd --- /dev/null +++ b/src/views/wms/basicDataManage/strategySetting/configuration/configuration.data.ts @@ -0,0 +1,84 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 配置 + */ +export const Configuration = useCrudSchemas(reactive([ + { + label: '策略代码', + field: 'strategyCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + }, + { + label: '规则代码', + field: 'ruleCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '配置名称', + field: 'configurationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '配置值', + field: 'configurationValue', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '配置分组', + field: 'groupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const ConfigurationRules = reactive({ + strategyCode: [ + { required: true, message: '请输入策略代码', trigger: 'blur' } + ], + ruleCode: [ + { required: true, message: '请输入规则代码', trigger: 'blur' } + ], + configurationCode: [ + { required: true, message: '请输入配置名称', trigger: 'blur' } + ], + configurationValue: [ + { required: true, message: '请输入配置值', trigger: 'blur' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/strategySetting/configuration/index.vue b/src/views/wms/basicDataManage/strategySetting/configuration/index.vue index 37e7bb66a..14d65e14f 100644 --- a/src/views/wms/basicDataManage/strategySetting/configuration/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/configuration/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Configuration.allSchemas" /> @@ -63,7 +64,8 @@ import download from '@/utils/download' import * as ConfigurationApi from '@/api/wms/configuration' import * as ItembasicApi from '@/api/wms/itembasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Configuration, ConfigurationRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Configuration, ConfigurationRules } from './configuration.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/strategySetting/configurationsetting/configurationsetting.data.ts b/src/views/wms/basicDataManage/strategySetting/configurationsetting/configurationsetting.data.ts new file mode 100644 index 000000000..2396c415b --- /dev/null +++ b/src/views/wms/basicDataManage/strategySetting/configurationsetting/configurationsetting.data.ts @@ -0,0 +1,126 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 配置设置 + */ +export const Configurationsetting = useCrudSchemas(reactive([ + { + label: '策略类型', + field: 'strategyType', + dictType: DICT_TYPE.STRATEGY_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + }, + { + label: '配置代码', + field: 'configurationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '配置名称', + field: 'configurationName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数据类型', + field: 'dataType', + dictType: DICT_TYPE.DATA_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '值范围', + field: 'valueScope', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '关联到', + field: 'relatedTo', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '必填', + field: 'isRequired', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const ConfigurationsettingRules = reactive({ + strategyType: [ + { required: true, message: '请选择策略类型', trigger: 'change' } + ], + configurationCode: [ + { required: true, message: '请输入配置代码', trigger: 'blur' } + ], + configurationName: [ + { required: true, message: '请输入配置名称', trigger: 'blur' } + ], + isRequired: [ + { required: true, message: '请选择必填', trigger: 'change' } + ], + dataType: [ + { required: true, message: '请选择数据类型', trigger: 'change' } + ], + valueScope: [ + { required: true, message: '请输入值范围', trigger: 'blur' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue b/src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue index 52306eabd..ee24c3c55 100644 --- a/src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Configurationsetting.allSchemas" /> @@ -63,7 +64,8 @@ import download from '@/utils/download' import * as ConfigurationsettingApi from '@/api/wms/configurationsetting' import * as ItembasicApi from '@/api/wms/itembasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Configurationsetting, ConfigurationsettingRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Configurationsetting, ConfigurationsettingRules } from './configurationsetting.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue b/src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue index 6aa309cc6..963150a0b 100644 --- a/src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Paramsetting.allSchemas" /> @@ -63,7 +64,8 @@ import download from '@/utils/download' import * as ParamsettingApi from '@/api/wms/paramsetting' import * as ItembasicApi from '@/api/wms/itembasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Paramsetting, ParamsettingRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Paramsetting, ParamsettingRules } from './paramsetting.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/strategySetting/paramsetting/paramsetting.data.ts b/src/views/wms/basicDataManage/strategySetting/paramsetting/paramsetting.data.ts new file mode 100644 index 000000000..e9cff4709 --- /dev/null +++ b/src/views/wms/basicDataManage/strategySetting/paramsetting/paramsetting.data.ts @@ -0,0 +1,138 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 参数设置 + */ +export const Paramsetting = useCrudSchemas(reactive([ + { + label: '策略类型', + field: 'strategyType', + dictType: DICT_TYPE.STRATEGY_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + }, + { + label: '参数代码', + field: 'paramCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '参数名称', + field: 'paramName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '可用操作符', + field: 'usableOpeartors', + dictType: DICT_TYPE.STRATEGY_PARAM_OPEARTOR, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数据类型', + field: 'dataType', + dictType: DICT_TYPE.DATA_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '值范围', + field: 'valueScope', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '关联到', + field: 'relatedTo', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '必填', + field: 'isRequired', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const ParamsettingRules = reactive({ + strategyType: [ + { required: true, message: '请选择策略类型', trigger: 'change' } + ], + paramCode: [ + { required: true, message: '请输入参数代码', trigger: 'blur' } + ], + usableOpeartors: [ + { required: true, message: '请选择可用操作符', trigger: 'change' } + ], + isRequired: [ + { required: true, message: '请选择必填', trigger: 'change' } + ], + dataType: [ + { required: true, message: '请选择数据类型', trigger: 'change' } + ], + valueScope: [ + { required: true, message: '请输入值范围', trigger: 'blur' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/strategySetting/rule/index.vue b/src/views/wms/basicDataManage/strategySetting/rule/index.vue index 364d81c6e..035a25354 100644 --- a/src/views/wms/basicDataManage/strategySetting/rule/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/rule/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Rule.allSchemas" /> @@ -63,7 +64,8 @@ import download from '@/utils/download' import * as RuleApi from '@/api/wms/rule' import * as ItembasicApi from '@/api/wms/itembasic' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Rule, RuleRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Rule, RuleRules } from './rule.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts b/src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts new file mode 100644 index 000000000..7fa21c823 --- /dev/null +++ b/src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts @@ -0,0 +1,87 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 规则 + */ +export const Rule = useCrudSchemas(reactive([ + { + label: '策略代码', + field: 'strategyCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '条件', + field: 'condition', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '配置', + field: 'configuration', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const RuleRules = reactive({ + strategyCode: [ + { required: true, message: '请输入策略代码', trigger: 'blur' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + code: [ + { required: true, message: '请输入代码', trigger: 'blur' } + ], + configuration: [ + { required: true, message: '请输入配置', trigger: 'blur' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue index e4025749b..78d613030 100644 --- a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Purchaseprice.allSchemas" /> @@ -63,7 +64,9 @@ import * as PurchasepriceApi from '@/api/wms/purchaseprice' import * as ItembasicApi from '@/api/wms/itembasic' import * as SupplierApi from '@/api/wms/supplier' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Purchaseprice, PurchasepriceRules, Itembasic, Supplier } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Supplier } from '../supplier/supplier.data' +import { Purchaseprice, PurchasepriceRules } from './purchaseprice.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts b/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts new file mode 100644 index 000000000..fea8cf762 --- /dev/null +++ b/src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts @@ -0,0 +1,182 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 采购价格单 + */ +export const Purchaseprice = useCrudSchemas(reactive([ + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + } + }, + { + label: '货币', + field: 'currency', + dictType: DICT_TYPE.CURRENCY, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '价格', + field: 'price', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + details: { + dateFormatter: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + details: { + dateFormatter: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建时间', + field: 'createTime', + isTable: false, + isForm:false, + formatter: dateFormatter, + details: { + dateFormatter: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建者', + field: 'creator', + isTable: false, + isForm:false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const PurchasepriceRules = reactive({ + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + currency: [ + { required: true, message: '请选择货币', trigger: 'change' } + ], + price: [ + { required: true, message: '请输入价格', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/supplierManage/supplier/index.vue b/src/views/wms/basicDataManage/supplierManage/supplier/index.vue index 916321d34..11e50871e 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplier/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/supplier/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Supplier.allSchemas" /> @@ -60,7 +61,8 @@ import download from '@/utils/download' import * as SupplierApi from '@/api/wms/supplier' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Supplier, SupplierRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Supplier, SupplierRules } from './supplier.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts b/src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts new file mode 100644 index 000000000..a8f50653c --- /dev/null +++ b/src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts @@ -0,0 +1,255 @@ +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', + }, + 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: { + 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: { + 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: { + 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/wms/basicDataManage/supplierManage/supplieritem/index.vue b/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue index f8a89aa7b..2ce446f02 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Supplieritem.allSchemas" /> @@ -65,7 +66,11 @@ import * as SupplierApi from '@/api/wms/supplier' import * as LocationApi from '@/api/wms/location' import * as WarehouseApi from '@/api/wms/warehouse' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Supplieritem, SupplieritemRules, Itembasic, Supplier, Warehouse ,Location} from '@/utils/disposition/tableColumns' +import { Supplieritem, SupplieritemRules } from './supplieritem.data' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Supplier } from '../supplier/supplier.data' +import { Warehouse } from '../../factoryModeling/warehouse/warehouse.data' +import { Location } from '../../factoryModeling/location/location.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts new file mode 100644 index 000000000..78dd9980c --- /dev/null +++ b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts @@ -0,0 +1,275 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 供应商物品 + */ +export const Supplieritem = useCrudSchemas(reactive([ + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + } + }, + { + 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', + }, + }, + { + 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', + }, + }, + { + 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', + }, + }, + { + label: '每器具包装数', + field: 'packQtyOfContainer', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '默认收货仓库', + field: 'defaultWarehouseCode', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '默认收货库位', + field: 'defaultLocationCode', + sort: 'custom', + table: { + width: 150 + } + }, + { + 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: { + 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: { + 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: { + 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: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物料代码', trigger: 'blur' } + ], + 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/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts b/src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts new file mode 100644 index 000000000..3a2ba5940 --- /dev/null +++ b/src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts @@ -0,0 +1,234 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 账期日历 + */ +export const Accountcalendar = useCrudSchemas(reactive([ + { + label: '年', + field: 'year', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + }, + { + label: '月', + field: 'month', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '描述', + field: 'descriiption', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '开始时间', + field: 'beginTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true, + }, + { + label: '结束时间', + field: 'endTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true, + }, + { + label: '转换生效时间', + field: 'converttotime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTable: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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 AccountcalendarRules = reactive({ + year: [ + { required: true, message: '请输入年', trigger: 'blur' } + ], + month: [ + { required: true, message: '请输入月', trigger: 'blur' } + ], + beginTime: [ + { required: true, message: '请输入开始时间', trigger: 'blur' } + ], + endTime: [ + { required: true, message: '请输入结束时间', trigger: 'blur' } + ], + converttotime: [ + { required: true, message: '请输入转换生效时间', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue b/src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue index 1fa327785..d42415ea5 100644 --- a/src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue +++ b/src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Accountcalendar.allSchemas" /> @@ -60,7 +61,8 @@ import download from '@/utils/download' import * as AccountcalendarApi from '@/api/wms/accountcalendar' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Accountcalendar, AccountcalendarRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Accountcalendar, AccountcalendarRules } from './accountcalendar.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts b/src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts new file mode 100644 index 000000000..fb545ae4f --- /dev/null +++ b/src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts @@ -0,0 +1,174 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 货币转换 + */ +export const Currencyexchange = useCrudSchemas(reactive([ + { + label: '货币', + field: 'currency', + dictType: DICT_TYPE.CURRENCY, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + }, + { + label: '基础货币', + field: 'basiccurrency', + dictType: DICT_TYPE.CURRENCY, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '比率', + field: 'rate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + isTable: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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 CurrencyexchangeRules = reactive({ + currency: [ + { required: true, message: '请选择货币', trigger: 'change' } + ], + basiccurrency: [ + { required: true, message: '请选择基础货币', trigger: 'change' } + ], + rate: [ + { required: true, message: '请输入比率', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue b/src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue index a5811838a..6a043ad05 100644 --- a/src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue +++ b/src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Currencyexchange.allSchemas" /> @@ -60,7 +61,8 @@ import download from '@/utils/download' import * as CurrencyexchangeApi from '@/api/wms/currencyexchange' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Currencyexchange, CurrencyexchangeRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Currencyexchange, CurrencyexchangeRules } from './currencyexchange.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue b/src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue index beebfd96f..1e2ef5d9e 100644 --- a/src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue +++ b/src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue @@ -11,6 +11,7 @@ :route-name="routeName" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" + :allSchemas="Systemcalendar.allSchemas" /> @@ -60,7 +61,8 @@ import download from '@/utils/download' import * as SystemcalendarApi from '@/api/wms/systemcalendar' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' -import { Systemcalendar, SystemcalendarRules, Itembasic } from '@/utils/disposition/tableColumns' +import { Itembasic } from '../../itemManage/itembasic/itembasic.data' +import { Systemcalendar, SystemcalendarRules } from './systemcalendar.data' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' diff --git a/src/views/wms/basicDataManage/systemSetting/systemcalendar/systemcalendar.data.ts b/src/views/wms/basicDataManage/systemSetting/systemcalendar/systemcalendar.data.ts new file mode 100644 index 000000000..2641703c6 --- /dev/null +++ b/src/views/wms/basicDataManage/systemSetting/systemcalendar/systemcalendar.data.ts @@ -0,0 +1,185 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 系统日历 + */ +export const Systemcalendar = useCrudSchemas(reactive([ + { + label: '模块', + field: 'module', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '开始时间', + field: 'startTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true, + }, + { + label: '结束时间', + field: 'stopTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTable: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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 SystemcalendarRules = reactive({ + module: [ + { required: true, message: '请输入模块', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) \ No newline at end of file