From 13ae1a2d7590106fbe3f0bf7ee7ae27abca7ef2b Mon Sep 17 00:00:00 2001 From: th1029 <743242323@qq.com> Date: Thu, 8 Sep 2022 11:35:51 +0800 Subject: [PATCH] =?UTF-8?q?wms=E5=88=9D=E5=A7=8B=E5=8C=96=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/basic/colours.ts | 33 + src/api/wms/basic/customer.ts | 61 ++ src/api/wms/basic/enterprise.ts | 40 + src/api/wms/basic/material.ts | 70 ++ src/api/wms/basic/materialType.ts | 36 + src/api/wms/basic/shelves.ts | 45 ++ src/api/wms/basic/supplier.ts | 53 ++ src/api/wms/basic/units.ts | 32 + src/api/wms/basic/warehouse.ts | 42 + .../routes/modules/wms/basic/wmsBasic.ts | 51 ++ src/views/wms/basic/colours/form.vue | 112 +++ src/views/wms/basic/colours/list.vue | 172 ++++ src/views/wms/basic/customer/form.vue | 275 +++++++ src/views/wms/basic/customer/list.vue | 296 +++++++ src/views/wms/basic/enterprise/form.vue | 185 +++++ src/views/wms/basic/enterprise/list.vue | 225 ++++++ src/views/wms/basic/material/add.vue | 276 +++++++ src/views/wms/basic/material/addOrUpdate.ts | 483 +++++++++++ src/views/wms/basic/material/detail.vue | 513 ++++++++++++ src/views/wms/basic/material/edit.vue | 275 +++++++ src/views/wms/basic/material/form.vue | 758 ++++++++++++++++++ src/views/wms/basic/material/index.vue | 40 + src/views/wms/basic/material/list.vue | 584 ++++++++++++++ .../wms/basic/material/materialDetail.vue | 513 ++++++++++++ src/views/wms/basic/materialType/form.vue | 158 ++++ src/views/wms/basic/materialType/index.vue | 40 + src/views/wms/basic/materialType/list.vue | 199 +++++ src/views/wms/basic/shelves/form.vue | 189 +++++ src/views/wms/basic/shelves/index.vue | 40 + src/views/wms/basic/shelves/list.vue | 236 ++++++ src/views/wms/basic/supplier/form.vue | 271 +++++++ src/views/wms/basic/supplier/list.vue | 291 +++++++ src/views/wms/basic/units/form.vue | 121 +++ src/views/wms/basic/units/list.vue | 176 ++++ src/views/wms/basic/warehouse/form.vue | 141 ++++ src/views/wms/basic/warehouse/list.vue | 226 ++++++ src/views/wms/basic/wmsBasicDetail.vue | 29 + 37 files changed, 7287 insertions(+) create mode 100644 src/api/wms/basic/colours.ts create mode 100644 src/api/wms/basic/customer.ts create mode 100644 src/api/wms/basic/enterprise.ts create mode 100644 src/api/wms/basic/material.ts create mode 100644 src/api/wms/basic/materialType.ts create mode 100644 src/api/wms/basic/shelves.ts create mode 100644 src/api/wms/basic/supplier.ts create mode 100644 src/api/wms/basic/units.ts create mode 100644 src/api/wms/basic/warehouse.ts create mode 100644 src/router/routes/modules/wms/basic/wmsBasic.ts create mode 100644 src/views/wms/basic/colours/form.vue create mode 100644 src/views/wms/basic/colours/list.vue create mode 100644 src/views/wms/basic/customer/form.vue create mode 100644 src/views/wms/basic/customer/list.vue create mode 100644 src/views/wms/basic/enterprise/form.vue create mode 100644 src/views/wms/basic/enterprise/list.vue create mode 100644 src/views/wms/basic/material/add.vue create mode 100644 src/views/wms/basic/material/addOrUpdate.ts create mode 100644 src/views/wms/basic/material/detail.vue create mode 100644 src/views/wms/basic/material/edit.vue create mode 100644 src/views/wms/basic/material/form.vue create mode 100644 src/views/wms/basic/material/index.vue create mode 100644 src/views/wms/basic/material/list.vue create mode 100644 src/views/wms/basic/material/materialDetail.vue create mode 100644 src/views/wms/basic/materialType/form.vue create mode 100644 src/views/wms/basic/materialType/index.vue create mode 100644 src/views/wms/basic/materialType/list.vue create mode 100644 src/views/wms/basic/shelves/form.vue create mode 100644 src/views/wms/basic/shelves/index.vue create mode 100644 src/views/wms/basic/shelves/list.vue create mode 100644 src/views/wms/basic/supplier/form.vue create mode 100644 src/views/wms/basic/supplier/list.vue create mode 100644 src/views/wms/basic/units/form.vue create mode 100644 src/views/wms/basic/units/list.vue create mode 100644 src/views/wms/basic/warehouse/form.vue create mode 100644 src/views/wms/basic/warehouse/list.vue create mode 100644 src/views/wms/basic/wmsBasicDetail.vue diff --git a/src/api/wms/basic/colours.ts b/src/api/wms/basic/colours.ts new file mode 100644 index 0000000..29dab3e --- /dev/null +++ b/src/api/wms/basic/colours.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author tanghan + */ +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { BasicModel, Page } from '../../model/baseModel'; + +const { adminPath } = useGlobSetting(); + +export interface Colours extends BasicModel { + colorCode?: string; // 主键 + colorName?: string; // 颜色名称 + sort?: number; // 顺序 +} +export const coloursAllData = (params?: Colours | any) => + defHttp.get({ url: adminPath + '/wms/basic/colours/coloursAllData', params }); + +export const coloursList = (params?: Colours | any) => + defHttp.get({ url: adminPath + '/wms/basic/colours/list', params }); + +export const coloursListData = (params?: Colours | any) => + defHttp.post>({ url: adminPath + '/wms/basic/colours/listData', params }); + +export const coloursForm = (params?: Colours | any) => + defHttp.get({ url: adminPath + '/wms/basic/colours/form', params }); + +export const coloursSave = (params?: any, data?: Colours | any) => + defHttp.postJson({ url: adminPath + '/wms/basic/colours/save', params, data }); + +export const coloursDelete = (params?: Colours | any) => + defHttp.get({ url: adminPath + '/wms/basic/colours/delete', params }); diff --git a/src/api/wms/basic/customer.ts b/src/api/wms/basic/customer.ts new file mode 100644 index 0000000..ef3bbe8 --- /dev/null +++ b/src/api/wms/basic/customer.ts @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author tanghan + */ +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { Page } from '../../model/baseModel'; +import { User } from '../../sys/user'; + +const { adminPath } = useGlobSetting(); + +/* +export interface Customer extends BasicModel { + cusId?: string; // 客户id + cusCode?: string; // 客户编码 + cusName?: string; // 客户名称 + cusType?: string; // 客户类型 + cusPy?: string; // 拼音 + busLicense?: string; // 营业执照 + responsiblePerson?: string; // 负责人 + responsiblePhone?: string; // 负责人电话 + linker1?: string; // 联系人1 + phone1?: string; // 联系方式1 + linker2?: string; // 联系人2 + phone2?: string; // 联系方式2 + email?: string; // 邮箱 + sort?: number; // 排序(升序) + areaCode?: string; // 区 + areaName?: string; // 区 + address?: string; // 地址 + taxNo?: string; // 税号 +}*/ + +export interface CustomerUser extends User { + customer?: any; +} + +export const customerList = (params?: CustomerUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/customer/list', params }); + +export const customerListData = (params?: CustomerUser | any) => + defHttp.post>({ url: adminPath + '/wms/basic/customer/listData', params }); + +export const customerForm = (params?: CustomerUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/customer/form', params }); + +export const customerSave = (params?: any, data?: CustomerUser | any) => + defHttp.postJson({ url: adminPath + '/wms/basic/customer/save', params, data }); + +export const customerDisable = (params?: CustomerUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/customer/disable', params }); + +export const customerEnable = (params?: CustomerUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/customer/enable', params }); + +export const customerDelete = (params?: CustomerUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/customer/delete', params }); + +export const resetpwd = (params?: CustomerUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/customer/resetpwd', params }); diff --git a/src/api/wms/basic/enterprise.ts b/src/api/wms/basic/enterprise.ts new file mode 100644 index 0000000..5e636b1 --- /dev/null +++ b/src/api/wms/basic/enterprise.ts @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author tanghan + */ +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { BasicModel, Page } from '../../model/baseModel'; + +const { adminPath } = useGlobSetting(); + +export interface Enterprise extends BasicModel { + code?: string; // 编码 + name?: string; // 名称 + linkman?: string; // 联系人 + mobile?: string; // 联系电话 + phone?: string; // 固定电话 + address?: string; // 地址 + kpxxSh?: string; // 开票信息:税号 + kpxxQymc?: string; // 开票信息:企业名称 + kpxxZcdh?: string; // 开票信息:注册电话 + kpxxZcdz?: string; // 开票信息:注册地址 + kpxxYhzh?: string; // kpxx_yhzh + kpxxKhyx?: string; // 开票信息:开户银行 +} + +export const enterpriseList = (params?: Enterprise | any) => + defHttp.get({ url: adminPath + '/wms/basic/enterprise/list', params }); + +export const enterpriseListData = (params?: Enterprise | any) => + defHttp.post>({ url: adminPath + '/wms/basic/enterprise/listData', params }); + +export const enterpriseForm = (params?: Enterprise | any) => + defHttp.get({ url: adminPath + '/wms/basic/enterprise/form', params }); + +export const enterpriseSave = (params?: any, data?: Enterprise | any) => + defHttp.postJson({ url: adminPath + '/wms/basic/enterprise/save', params, data }); + +export const enterpriseDelete = (params?: Enterprise | any) => + defHttp.get({ url: adminPath + '/wms/basic/enterprise/delete', params }); diff --git a/src/api/wms/basic/material.ts b/src/api/wms/basic/material.ts new file mode 100644 index 0000000..5e57466 --- /dev/null +++ b/src/api/wms/basic/material.ts @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author tanghan + */ +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { BasicModel, Page } from '../../model/baseModel'; + +const { adminPath } = useGlobSetting(); + +export interface Material extends BasicModel { + warehouseId?: string; // 所属仓库 + officeId?: any; // 所属部门 + materialTypeCode?: string; // 物料分类编码 + materialBarcode?: string; // 条码 + materialCode?: string; // 编码 + materialName?: string; // 名称 + materialSpecs?: string; // 规格 + materialBrand?: string; // 品牌 + materialMnemonicCode?: string; // 助记码 + expDateMgt?: string; // 是否启用保质期管理 + expirationDate?: number; // 保质期 + expirationDateDict?: string; // 保质期单位 + expirationDateDay?: number; // 保质期换算成天 + expirationPrompting?: number; // 提前X天预警 + colourMgt?: string; // 是否启用颜色管理 + colours?: string; // 颜色 + singleMgt?: string; // 是否启用单件管理 + sequenceMgt?: string; // 是否启用序列号管理 + batchMethod?: string; // 是否启用批次管理 + openMultipleUnits?: string; // 是否支持多单位 + volume?: string; // 体积 + weight?: string; // 净重 + mlength?: string; // 长单品 + mwidth?: string; // 宽单品 + mheight?: string; // 高单品 + msizeDict?: string; // 尺寸单位,字典 + defaultQty?: number; // 默认装箱数量 + taxRate?: number; // 税率 + safetyStockWhMgt?: string; // 是否启用分仓库存预警 + sort?: number; // 顺序 +} + +export const materialList = (params?: Material | any) => + defHttp.get({ url: adminPath + '/wms/basic/material/list', params }); + +export const materialListData = (params?: Material | any) => + defHttp.post>({ url: adminPath + '/wms/basic/material/listData', params }); + +export const materialForm = (params?: Material | any) => + defHttp.get({ url: adminPath + '/wms/basic/material/form', params }); + +export const materialSave = (params?: any, data?: Material | any) => + defHttp.postJson({ url: adminPath + '/wms/basic/material/save', params, data }); + +export const materialDisable = (params?: Material | any) => + defHttp.get({ url: adminPath + '/wms/basic/material/disable', params }); + +export const materialEnable = (params?: Material | any) => + defHttp.get({ url: adminPath + '/wms/basic/material/enable', params }); + +export const materialDelete = (params?: Material | any) => + defHttp.get({ url: adminPath + '/wms/basic/material/delete', params }); + +export const checkMaterialCode = (oldCode: string, newCode: string) => + defHttp.get({ + url: adminPath + '/wms/basic/material/checkMaterialCode', + params: { oldCode, newCode }, + }); diff --git a/src/api/wms/basic/materialType.ts b/src/api/wms/basic/materialType.ts new file mode 100644 index 0000000..3146ab0 --- /dev/null +++ b/src/api/wms/basic/materialType.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author tanghan + */ +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { TreeDataModel, TreeModel } from '../../model/baseModel'; + +const { adminPath } = useGlobSetting(); + +export interface MaterialType extends TreeModel { + materialTypeCode?: string; // 物料分类编码 + materialTypeName?: string; // 分类名称 +} + +export const materialTypeList = (params?: MaterialType | any) => + defHttp.get({ url: adminPath + '/wms/basic/materialType/list', params }); + +export const materialTypeListData = (params?: MaterialType | any) => + defHttp.post({ url: adminPath + '/wms/basic/materialType/listData', params }); + +export const materialTypeForm = (params?: MaterialType | any) => + defHttp.get({ url: adminPath + '/wms/basic/materialType/form', params }); + +export const materialTypeCreateNextNode = (params?: MaterialType | any) => + defHttp.get({ url: adminPath + '/wms/basic/materialType/createNextNode', params }); + +export const materialTypeSave = (params?: any, data?: MaterialType | any) => + defHttp.postJson({ url: adminPath + '/wms/basic/materialType/save', params, data }); + +export const materialTypeDelete = (params?: MaterialType | any) => + defHttp.get({ url: adminPath + '/wms/basic/materialType/delete', params }); + +export const materialTypeTreeData = (params?: any) => + defHttp.get({ url: adminPath + '/wms/basic/materialType/treeData', params }); diff --git a/src/api/wms/basic/shelves.ts b/src/api/wms/basic/shelves.ts new file mode 100644 index 0000000..83ac19e --- /dev/null +++ b/src/api/wms/basic/shelves.ts @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author tanghan + */ +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { TreeDataModel, TreeModel } from '../../model/baseModel'; + +const { adminPath } = useGlobSetting(); + +export interface Shelves extends TreeModel { + shelvesCode?: string; // 主键 + warehouseCode?: string; // 所属仓库 + shelvesNo?: string; // 编码 + name?: string; // 名称 + type?: string; // 类型(1区域2货架3货位) +} + +export const shelvesList = (params?: Shelves | any) => + defHttp.get({ url: adminPath + '/wms/basic/shelves/list', params }); + +export const shelvesListData = (params?: Shelves | any) => + defHttp.post({ url: adminPath + '/wms/basic/shelves/listData', params }); + +export const shelvesForm = (params?: Shelves | any) => + defHttp.get({ url: adminPath + '/wms/basic/shelves/form', params }); + +export const shelvesCreateNextNode = (params?: Shelves | any) => + defHttp.get({ url: adminPath + '/wms/basic/shelves/createNextNode', params }); + +export const shelvesSave = (params?: any, data?: Shelves | any) => + defHttp.postJson({ url: adminPath + '/wms/basic/shelves/save', params, data }); + +export const shelvesDisable = (params?: Shelves | any) => + defHttp.get({ url: adminPath + '/basic/shelves/disable', params }); + +export const shelvesEnable = (params?: Shelves | any) => + defHttp.get({ url: adminPath + '/wms/basic/shelves/enable', params }); + +export const shelvesDelete = (params?: Shelves | any) => + defHttp.get({ url: adminPath + '/wms/basic/shelves/delete', params }); + +export const shelvesTreeData = (params?: any) => + defHttp.get({ url: adminPath + '/wms/basic/shelves/treeData', params }); diff --git a/src/api/wms/basic/supplier.ts b/src/api/wms/basic/supplier.ts new file mode 100644 index 0000000..d342698 --- /dev/null +++ b/src/api/wms/basic/supplier.ts @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author tanghan + */ +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { Page } from '../../model/baseModel'; +import { User } from '../../sys/user'; + +const { adminPath } = useGlobSetting(); + +/* +export interface Supplier extends BasicModel { + supId?: string; // 供应商id + supCode?: string; // 供应编码 + supName?: string; // 供应商名称 + linker?: string; // 联系人 + phone?: string; // 联系方式 + areaCode?: string; // 区 + areaName?: string; // 区 + address?: string; // 地址 + email?: string; // 邮箱 + sort?: number; // 排序(升序) +}*/ + +export interface SupplierUser extends User { + supplier?: any; +} + +export const supplierList = (params?: SupplierUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/supplier/list', params }); + +export const supplierListData = (params?: SupplierUser | any) => + defHttp.post>({ url: adminPath + '/wms/basic/supplier/listData', params }); + +export const supplierForm = (params?: SupplierUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/supplier/form', params }); + +export const supplierSave = (params?: any, data?: SupplierUser | any) => + defHttp.postJson({ url: adminPath + '/wms/basic/supplier/save', params, data }); + +export const supplierDisable = (params?: SupplierUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/supplier/disable', params }); + +export const supplierEnable = (params?: SupplierUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/supplier/enable', params }); + +export const supplierDelete = (params?: SupplierUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/supplier/delete', params }); + +export const resetpwd = (params?: SupplierUser | any) => + defHttp.get({ url: adminPath + '/wms/basic/supplier/resetpwd', params }); diff --git a/src/api/wms/basic/units.ts b/src/api/wms/basic/units.ts new file mode 100644 index 0000000..f4923a3 --- /dev/null +++ b/src/api/wms/basic/units.ts @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author tanghan + */ +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { BasicModel, Page } from '../../model/baseModel'; + +const { adminPath } = useGlobSetting(); + +export interface Units extends BasicModel { + unitCode?: string; // 主键 + unitName?: string; // 单位名称 + allowDecimal?: string; // 是否允许小数 + sort?: number; // 顺序 +} + +export const unitsAllListData = (params?: Units | any) => + defHttp.get({ url: adminPath + '/wms/basic/units/unitsAllListData', params }); + +export const unitsListData = (params?: Units | any) => + defHttp.post>({ url: adminPath + '/wms/basic/units/listData', params }); + +export const unitsForm = (params?: Units | any) => + defHttp.get({ url: adminPath + '/wms/basic/units/form', params }); + +export const unitsSave = (params?: any, data?: Units | any) => + defHttp.postJson({ url: adminPath + '/wms/basic/units/save', params, data }); + +export const unitsDelete = (params?: Units | any) => + defHttp.get({ url: adminPath + '/wms/basic/units/delete', params }); diff --git a/src/api/wms/basic/warehouse.ts b/src/api/wms/basic/warehouse.ts new file mode 100644 index 0000000..69d5ec9 --- /dev/null +++ b/src/api/wms/basic/warehouse.ts @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author tanghan + */ +import { defHttp } from '/@/utils/http/axios'; +import { useGlobSetting } from '/@/hooks/setting'; +import { BasicModel, Page } from '../../model/baseModel'; + +const { adminPath } = useGlobSetting(); + +export interface Warehouse extends BasicModel { + code?: string; // 仓库编码 + name?: string; // 仓库名称 + officeId?: any; // 所属部门 + responsiblePerson?: string; // 负责人 + phone?: string; // 联系电话 +} + +//export const warehouseList = (params?: Warehouse | any) => +// defHttp.get({ url: adminPath + '/wms/basic/warehouse/list', params }); + +export const warehouseAllData = (params?: Warehouse | any) => + defHttp.get({ url: adminPath + '/wms/basic/warehouse/warehouseAllData', params }); + +export const warehouseListData = (params?: Warehouse | any) => + defHttp.post>({ url: adminPath + '/wms/basic/warehouse/listData', params }); + +export const warehouseForm = (params?: Warehouse | any) => + defHttp.get({ url: adminPath + '/wms/basic/warehouse/form', params }); + +export const warehouseSave = (params?: any, data?: Warehouse | any) => + defHttp.postJson({ url: adminPath + '/wms/basic/warehouse/save', params, data }); + +export const warehouseDisable = (params?: Warehouse | any) => + defHttp.get({ url: adminPath + '/wms/basic/warehouse/disable', params }); + +export const warehouseEnable = (params?: Warehouse | any) => + defHttp.get({ url: adminPath + '/wms/basic/warehouse/enable', params }); + +export const warehouseDelete = (params?: Warehouse | any) => + defHttp.get({ url: adminPath + '/wms/basic/warehouse/delete', params }); diff --git a/src/router/routes/modules/wms/basic/wmsBasic.ts b/src/router/routes/modules/wms/basic/wmsBasic.ts new file mode 100644 index 0000000..1630550 --- /dev/null +++ b/src/router/routes/modules/wms/basic/wmsBasic.ts @@ -0,0 +1,51 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { LAYOUT } from '/@/router/constant'; +import { t } from '/@/hooks/web/useI18n'; + +const wmsBasic: AppRouteModule = { + path: '/wms/basic', + name: 'Material', + component: LAYOUT, + redirect: '/wms/basic/', + meta: { + icon: 'ion:person-outline', + title: t('sys.account.center'), + orderNo: 100000, + }, + children: [ + { + path: 'material/detail', + name: 'ViewsBasicMaterialDetail', + component: () => import('/@/views/wms/basic/material/materialDetail.vue'), + meta: { + title: '物料详情', + }, + }, + { + path: 'material/add', + name: 'ViewsBasicMaterialAdd', + component: () => import('/@/views/wms/basic/material/add.vue'), + meta: { + title: '新增物料', + fromTab: 'ViewsBasicMaterialIndex', + }, + beforeEnter: (to, from, next) => { + debugger; + console.log('2 beforeEnter', to, from); + next(); + }, + }, + { + path: 'material/edit', + name: 'ViewsBasicMaterialEdit', + component: () => import('/@/views/wms/basic/material/edit.vue'), + meta: { + title: '编辑物料', + fromTab: 'ViewsBasicMaterialIndex', + }, + }, + ], +}; + +export default wmsBasic; diff --git a/src/views/wms/basic/colours/form.vue b/src/views/wms/basic/colours/form.vue new file mode 100644 index 0000000..9b6abb0 --- /dev/null +++ b/src/views/wms/basic/colours/form.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/views/wms/basic/colours/list.vue b/src/views/wms/basic/colours/list.vue new file mode 100644 index 0000000..e119cec --- /dev/null +++ b/src/views/wms/basic/colours/list.vue @@ -0,0 +1,172 @@ + + + + diff --git a/src/views/wms/basic/customer/form.vue b/src/views/wms/basic/customer/form.vue new file mode 100644 index 0000000..1a19fa3 --- /dev/null +++ b/src/views/wms/basic/customer/form.vue @@ -0,0 +1,275 @@ + + + + diff --git a/src/views/wms/basic/customer/list.vue b/src/views/wms/basic/customer/list.vue new file mode 100644 index 0000000..42366a2 --- /dev/null +++ b/src/views/wms/basic/customer/list.vue @@ -0,0 +1,296 @@ + + + + diff --git a/src/views/wms/basic/enterprise/form.vue b/src/views/wms/basic/enterprise/form.vue new file mode 100644 index 0000000..ffec440 --- /dev/null +++ b/src/views/wms/basic/enterprise/form.vue @@ -0,0 +1,185 @@ + + + + diff --git a/src/views/wms/basic/enterprise/list.vue b/src/views/wms/basic/enterprise/list.vue new file mode 100644 index 0000000..ac1fdbc --- /dev/null +++ b/src/views/wms/basic/enterprise/list.vue @@ -0,0 +1,225 @@ + + + + diff --git a/src/views/wms/basic/material/add.vue b/src/views/wms/basic/material/add.vue new file mode 100644 index 0000000..8166955 --- /dev/null +++ b/src/views/wms/basic/material/add.vue @@ -0,0 +1,276 @@ + + + + diff --git a/src/views/wms/basic/material/addOrUpdate.ts b/src/views/wms/basic/material/addOrUpdate.ts new file mode 100644 index 0000000..307ce9b --- /dev/null +++ b/src/views/wms/basic/material/addOrUpdate.ts @@ -0,0 +1,483 @@ +import { ref, computed, unref } from 'vue'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { FormSchema } from '/@/components/Form/index'; +import { checkMaterialCode, Material } from '/@/api/wms/basic/material'; +import { materialTypeTreeData } from '/@/api/wms/basic/materialType'; +import { warehouseAllData } from '/@/api/wms/basic/warehouse'; +import { coloursAllData } from '/@/api/wms/basic/colours'; +import { officeTreeData } from '/@/api/sys/office'; +import { useMultipleTabStore } from '/@/store/modules/multipleTab'; +import { router } from '/@/router'; +import type { RouteLocationNormalized } from 'vue-router'; + +const { t } = useI18n('basic.material'); +const record = ref({} as Material); +const tabStore = useMultipleTabStore(); + +export const inputFormSchemas: FormSchema[] = [ + { + label: t('基础信息'), + field: 'materialBaseInfo', + component: 'FormGroup', + colProps: { lg: 24, md: 24 }, + }, + { + label: t('编码'), + field: 'materialCode', + component: 'Input', + componentProps: { + maxlength: 20, + }, + rules: [ + { required: true }, + { min: 4, max: 20, message: t('请输入长度在 4 到 20 个字符之间') }, + { + validator(_rule, value) { + return new Promise((resolve, reject) => { + if (!value || value === '') return resolve(); + checkMaterialCode(record.value.materialCode || '', value) + .then((res) => (res ? resolve() : reject(t('物料编码已存在')))) + .catch((err) => reject(err.message || t('验证失败'))); + }); + }, + }, + ], + colProps: { + span: 8, + }, + required: true, + }, + { + label: t('名称'), + field: 'materialName', + component: 'Input', + componentProps: { + maxlength: 100, + }, + colProps: { + span: 8, + }, + required: true, + }, + { + label: t('规格'), + field: 'materialSpecs', + component: 'Input', + componentProps: { + maxlength: 100, + }, + colProps: { + span: 8, + }, + }, + { + label: '物料分类', + field: 'materialType.materialTypeCode', + fieldLabel: 'materialType.materialTypeName', + component: 'TreeSelect', + componentProps: { + api: materialTypeTreeData, + allowClear: true, + }, + colProps: { + span: 8, + }, + required: true, + }, + { + label: t('所属仓库'), + field: 'warehouseId', + component: 'Select', + componentProps: { + api: warehouseAllData, + allowClear: false, + }, + colProps: { + span: 8, + }, + }, + { + label: t('所属部门'), + field: 'officeId.officeCode', + fieldLabel: 'officeId.officeName', + component: 'TreeSelect', + componentProps: { + api: officeTreeData, + canSelectParent: false, + allowClear: true, + }, + colProps: { + span: 8, + }, + }, + { + label: t('助记码'), + field: 'materialMnemonicCode', + component: 'Input', + componentProps: { + maxlength: 50, + }, + colProps: { + span: 8, + }, + }, + { + label: t('条码'), + field: 'materialBarcode', + component: 'Input', + componentProps: { + maxlength: 50, + }, + colProps: { + span: 8, + }, + }, + { + label: t('品牌'), + field: 'materialBrand', + component: 'Select', + componentProps: { + dictType: 'msg_inner_receiver_type', + allowClear: true, + }, + colProps: { + span: 8, + }, + }, + { + label: t('是否支持多单位'), + field: 'openMultipleUnits', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: ({ formModel, formActionType }) => { + return { + dictType: 'sys_yes_no', + onChange: (e: any) => { + console.log(e); + }, + }; + }, + colProps: { + span: 8, + }, + }, + { + label: '', + field: 'addMaterialUnitsBut', + component: 'Input', + colProps: { lg: 24, md: 24 }, + slot: 'addMaterialUnitsBut', + show: ({ values }) => values.openMultipleUnits === '1', + }, + { + label: '', + field: 'materialUnitsList', + component: 'Input', + colProps: { lg: 24, md: 24 }, + slot: 'materialUnitsList', + }, + { + label: t('行业特性'), + field: 'hytx', + component: 'FormGroup', + colProps: { lg: 24, md: 24 }, + }, + { + label: t('是否启用保质期管理'), + labelWidth: 170, + field: 'expDateMgt', + component: 'RadioButtonGroup', + componentProps: { + dictType: 'sys_yes_no', + }, + defaultValue: '0', + colProps: { + span: 8, + }, + }, + { + label: t('保质期'), + field: 'expirationDate', + component: 'Input', + rules: [{ pattern: /^\d+$/, message: t('请输入一个正整数') }], + colProps: { + span: 4, + }, + show: ({ values }) => values.expDateMgt === '1', + }, + { + label: t('保质期单位'), + field: 'expirationDateDict', + component: 'Select', + componentProps: { + dictType: 'sys_area_type', + allowClear: true, + }, + colProps: { + span: 4, + }, + show: ({ values }) => values.expDateMgt === '1', + }, + { + label: t('提前X天预警'), + field: 'expirationPrompting', + component: 'Input', + rules: [{ pattern: /^\d+$/, message: t('请输入一个正整数') }], + colProps: { + span: 8, + }, + suffix: '天', + show: ({ values }) => values.expDateMgt === '1', + }, + { + label: t('是否启用颜色管理'), + labelWidth: 170, + field: 'colourMgt', + component: 'RadioButtonGroup', + componentProps: { + dictType: 'sys_yes_no', + }, + colProps: { + span: 8, + }, + defaultValue: '0', + }, + { + label: t('颜色'), + field: 'colours', + component: 'Select', + componentProps: { + api: coloursAllData, + allowClear: true, + mode: 'multiple', + }, + colProps: { + span: 8, + }, + show: ({ values }) => values.colourMgt === '1', + }, + { + label: t('是否启用单件管理'), + labelWidth: 170, + field: 'singleMgt', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + dictType: 'sys_yes_no', + }, + colProps: { + span: 24, + }, + }, + { + label: t('是否启用序列号管理'), + labelWidth: 170, + field: 'sequenceMgt', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + dictType: 'sys_yes_no', + allowClear: true, + }, + colProps: { + span: 24, + }, + }, + { + label: t('是否启用批次管理'), + labelWidth: 170, + field: 'batchMethod', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + dictType: 'sys_yes_no', + allowClear: true, + }, + colProps: { + span: 24, + }, + }, + { + label: t('库存预警'), + field: 'kcyj', + component: 'FormGroup', + colProps: { lg: 24, md: 24 }, + }, + { + label: t('是否启用分仓库存预警'), + labelWidth: 170, + field: 'safetyStockWhMgt', + component: 'RadioButtonGroup', + defaultValue: '0', + componentProps: { + dictType: 'sys_yes_no', + allowClear: true, + }, + colProps: { + span: 8, + }, + }, + { + label: t('最低库存量'), + field: 'stockQtyMin', + component: 'Input', + rules: [{ pattern: /^\d+$/, message: t('请输入一个正整数') }], + colProps: { + span: 8, + }, + }, + { + label: t('最高库存量'), + field: 'stockQtyMax', + component: 'Input', + rules: [{ pattern: /^\d+$/, message: t('请输入一个正整数') }], + colProps: { + span: 8, + }, + }, + { + label: t('其它信息'), + field: 'qtxx', + component: 'FormGroup', + colProps: { lg: 24, md: 24 }, + }, + { + label: t('体积'), + field: 'volume', + component: 'Input', + componentProps: { + maxlength: 50, + }, + colProps: { + span: 8, + }, + }, + { + label: t('净重'), + field: 'weight', + component: 'Input', + componentProps: { + maxlength: 50, + }, + colProps: { + span: 8, + }, + }, + { + label: t('长单品'), + field: 'mlength', + component: 'Input', + componentProps: { + maxlength: 30, + }, + colProps: { + span: 8, + }, + }, + { + label: t('宽单品'), + field: 'mwidth', + component: 'Input', + componentProps: { + maxlength: 30, + }, + colProps: { + span: 8, + }, + }, + { + label: t('高单品'), + field: 'mheight', + component: 'Input', + componentProps: { + maxlength: 30, + }, + colProps: { + span: 8, + }, + }, + { + label: t('尺寸单位,字典'), + field: 'msizeDict', + component: 'Input', + componentProps: { + maxlength: 64, + }, + colProps: { + span: 8, + }, + }, + { + label: t('默认装箱数量'), + field: 'defaultQty', + component: 'Input', + componentProps: { + maxlength: 19, + }, + rules: [{ pattern: /^\d+$/, message: t('请输入一个正整数') }], + colProps: { + span: 8, + }, + }, + { + label: t('税率'), + field: 'taxRate', + component: 'Input', + rules: [{ pattern: /^\d+$/, message: t('请输入一个正整数') }], + colProps: { + span: 8, + }, + }, + { + label: t('顺序'), + field: 'sort', + component: 'Input', + rules: [{ pattern: /^\d+$/, message: t('请输入一个正整数') }], + colProps: { + span: 8, + }, + }, + { + label: t('备注信息'), + field: 'remarks', + component: 'InputTextArea', + componentProps: { + maxlength: 500, + }, + colProps: { lg: 24, md: 24 }, + }, + { + label: t('图片上传'), + field: 'dataMap', + component: 'Upload', + componentProps: { + loadTime: computed(() => record.value.__t), + bizKey: computed(() => record.value.id), + bizType: 'material_image', + uploadType: 'image', + }, + colProps: { lg: 24, md: 24 }, + }, +]; + +export async function undo() { + //router.go(-1); + debugger; + // eslint-disable-next-line prettier/prettier + const currentTab : RouteLocationNormalized = tabStore.getTabList.find( + (i) => i.path === router.currentRoute.value.path, + ); + tabStore.closeTab(currentTab, router); + // const { close } = useTabs(reloadListPage); + // reloadListPage.query = { dictType: 'sys_job_event' }; + // eslint-disable-next-line prettier/prettier + const fromRouter = tabStore.getTabList.find( + (i) => + i.name === + (router.currentRoute.value.query?.fromTab || router.currentRoute.value.meta?.fromTab), + ); + if (fromRouter) { + router.push({ path: unref(fromRouter).path }); + } + //updateTabPath record.value.parentName +} diff --git a/src/views/wms/basic/material/detail.vue b/src/views/wms/basic/material/detail.vue new file mode 100644 index 0000000..df3044a --- /dev/null +++ b/src/views/wms/basic/material/detail.vue @@ -0,0 +1,513 @@ + + + + \ No newline at end of file diff --git a/src/views/wms/basic/material/edit.vue b/src/views/wms/basic/material/edit.vue new file mode 100644 index 0000000..2482448 --- /dev/null +++ b/src/views/wms/basic/material/edit.vue @@ -0,0 +1,275 @@ + + + + diff --git a/src/views/wms/basic/material/form.vue b/src/views/wms/basic/material/form.vue new file mode 100644 index 0000000..2b29778 --- /dev/null +++ b/src/views/wms/basic/material/form.vue @@ -0,0 +1,758 @@ + + + + diff --git a/src/views/wms/basic/material/index.vue b/src/views/wms/basic/material/index.vue new file mode 100644 index 0000000..4b25815 --- /dev/null +++ b/src/views/wms/basic/material/index.vue @@ -0,0 +1,40 @@ + + + + diff --git a/src/views/wms/basic/material/list.vue b/src/views/wms/basic/material/list.vue new file mode 100644 index 0000000..46342cc --- /dev/null +++ b/src/views/wms/basic/material/list.vue @@ -0,0 +1,584 @@ + + + + diff --git a/src/views/wms/basic/material/materialDetail.vue b/src/views/wms/basic/material/materialDetail.vue new file mode 100644 index 0000000..3d8ed7c --- /dev/null +++ b/src/views/wms/basic/material/materialDetail.vue @@ -0,0 +1,513 @@ + + + + \ No newline at end of file diff --git a/src/views/wms/basic/materialType/form.vue b/src/views/wms/basic/materialType/form.vue new file mode 100644 index 0000000..d15c6e3 --- /dev/null +++ b/src/views/wms/basic/materialType/form.vue @@ -0,0 +1,158 @@ + + + + diff --git a/src/views/wms/basic/materialType/index.vue b/src/views/wms/basic/materialType/index.vue new file mode 100644 index 0000000..4170bd6 --- /dev/null +++ b/src/views/wms/basic/materialType/index.vue @@ -0,0 +1,40 @@ + + + + diff --git a/src/views/wms/basic/materialType/list.vue b/src/views/wms/basic/materialType/list.vue new file mode 100644 index 0000000..3f3549c --- /dev/null +++ b/src/views/wms/basic/materialType/list.vue @@ -0,0 +1,199 @@ + + + + diff --git a/src/views/wms/basic/shelves/form.vue b/src/views/wms/basic/shelves/form.vue new file mode 100644 index 0000000..d3662f3 --- /dev/null +++ b/src/views/wms/basic/shelves/form.vue @@ -0,0 +1,189 @@ + + + + diff --git a/src/views/wms/basic/shelves/index.vue b/src/views/wms/basic/shelves/index.vue new file mode 100644 index 0000000..2f56472 --- /dev/null +++ b/src/views/wms/basic/shelves/index.vue @@ -0,0 +1,40 @@ + + + + diff --git a/src/views/wms/basic/shelves/list.vue b/src/views/wms/basic/shelves/list.vue new file mode 100644 index 0000000..bfb20e0 --- /dev/null +++ b/src/views/wms/basic/shelves/list.vue @@ -0,0 +1,236 @@ + + + + diff --git a/src/views/wms/basic/supplier/form.vue b/src/views/wms/basic/supplier/form.vue new file mode 100644 index 0000000..8e0ec40 --- /dev/null +++ b/src/views/wms/basic/supplier/form.vue @@ -0,0 +1,271 @@ + + + + diff --git a/src/views/wms/basic/supplier/list.vue b/src/views/wms/basic/supplier/list.vue new file mode 100644 index 0000000..9c63061 --- /dev/null +++ b/src/views/wms/basic/supplier/list.vue @@ -0,0 +1,291 @@ + + + + diff --git a/src/views/wms/basic/units/form.vue b/src/views/wms/basic/units/form.vue new file mode 100644 index 0000000..c15273b --- /dev/null +++ b/src/views/wms/basic/units/form.vue @@ -0,0 +1,121 @@ + + + + diff --git a/src/views/wms/basic/units/list.vue b/src/views/wms/basic/units/list.vue new file mode 100644 index 0000000..2bb72e0 --- /dev/null +++ b/src/views/wms/basic/units/list.vue @@ -0,0 +1,176 @@ + + + + diff --git a/src/views/wms/basic/warehouse/form.vue b/src/views/wms/basic/warehouse/form.vue new file mode 100644 index 0000000..6422cfc --- /dev/null +++ b/src/views/wms/basic/warehouse/form.vue @@ -0,0 +1,141 @@ + + + + diff --git a/src/views/wms/basic/warehouse/list.vue b/src/views/wms/basic/warehouse/list.vue new file mode 100644 index 0000000..6f58cc4 --- /dev/null +++ b/src/views/wms/basic/warehouse/list.vue @@ -0,0 +1,226 @@ + + + + diff --git a/src/views/wms/basic/wmsBasicDetail.vue b/src/views/wms/basic/wmsBasicDetail.vue new file mode 100644 index 0000000..aca67ae --- /dev/null +++ b/src/views/wms/basic/wmsBasicDetail.vue @@ -0,0 +1,29 @@ + + + -- Gitee