diff --git a/src/api/wms/allocateOrder/types.ts b/src/api/wms/allocateOrder/types.ts index 5356fa9..745f7dc 100644 --- a/src/api/wms/allocateOrder/types.ts +++ b/src/api/wms/allocateOrder/types.ts @@ -76,6 +76,11 @@ export interface AllocateOrderVO { */ inMethod: string; + /** + * 调拨原因 + */ + allocateReason: string; + } export interface AllocateOrderForm extends BaseEntity { @@ -156,6 +161,11 @@ export interface AllocateOrderForm extends BaseEntity { */ inMethod?: string; + /** + * 调拨原因 + */ + allocateReason?: string; + } export interface AllocateOrderQuery extends PageQuery { @@ -237,6 +247,11 @@ export interface AllocateOrderQuery extends PageQuery { */ inMethod?: string; + /** + * 调拨原因 + */ + allocateReason?: string; + /** * 日期范围参数 */ diff --git a/src/api/wms/baseMaterialInfo/types.ts b/src/api/wms/baseMaterialInfo/types.ts index 56a69cd..7c29d20 100644 --- a/src/api/wms/baseMaterialInfo/types.ts +++ b/src/api/wms/baseMaterialInfo/types.ts @@ -293,6 +293,17 @@ export interface BaseMaterialInfoVO { */ materialCategoryName: string; + + /** + * 质检要求(0必检,1免检) + */ + inspectionRequest: string; + + /** + * 是否高价值物料(0否,1是) + */ + isHighValue: string; + } export interface BaseMaterialInfoForm extends BaseEntity { @@ -550,6 +561,16 @@ export interface BaseMaterialInfoForm extends BaseEntity { */ materialCategoryName: string; + /** + * 质检要求(0必检,1免检) + */ + inspectionRequest?: string; + + /** + * 是否高价值物料(0否,1是) + */ + isHighValue?: string; + } export interface BaseMaterialInfoQuery extends PageQuery { @@ -790,6 +811,17 @@ export interface BaseMaterialInfoQuery extends PageQuery { */ saleType?: string; + /** + * 质检要求(0必检,1免检) + */ + inspectionRequest?: string; + + /** + * 是否高价值物料(0否,1是) + */ + isHighValue?: string; + + /** * 日期范围参数 */ diff --git a/src/api/wms/baseMaterialType/index.ts b/src/api/wms/baseMaterialType/index.ts new file mode 100644 index 0000000..278ca89 --- /dev/null +++ b/src/api/wms/baseMaterialType/index.ts @@ -0,0 +1,77 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { BaseMaterialTypeVO, BaseMaterialTypeForm, BaseMaterialTypeQuery } from '@/api/wms/baseMaterialType/types'; + +/** + * 查询物料类型信息列表 + * @param query + * @returns {*} + */ + +export const listBaseMaterialType = (query?: BaseMaterialTypeQuery): AxiosPromise => { + return request({ + url: '/wms/baseMaterialType/list', + method: 'get', + params: query + }); +}; + +/** + * 查询物料类型信息详细 + * @param matrialTypeId + */ +export const getBaseMaterialType = (matrialTypeId: string | number): AxiosPromise => { + return request({ + url: '/wms/baseMaterialType/' + matrialTypeId, + method: 'get' + }); +}; + +/** + * 新增物料类型信息 + * @param data + */ +export const addBaseMaterialType = (data: BaseMaterialTypeForm) => { + return request({ + url: '/wms/baseMaterialType', + method: 'post', + data: data + }); +}; + +/** + * 修改物料类型信息 + * @param data + */ +export const updateBaseMaterialType = (data: BaseMaterialTypeForm) => { + return request({ + url: '/wms/baseMaterialType', + method: 'put', + data: data + }); +}; + +/** + * 删除物料类型信息 + * @param matrialTypeId + */ +export const delBaseMaterialType = (matrialTypeId: string | number | Array) => { + return request({ + url: '/wms/baseMaterialType/' + matrialTypeId, + method: 'delete' + }); +}; + + +/** + * 下拉框查询物料类型信息列表 + * @param query + * @returns {*} + */ +export function getBaseMaterialTypeList (query) { + return request({ + url: '/wms/baseMaterialType/getBaseMaterialTypeList', + method: 'get', + params: query + }); +}; diff --git a/src/api/wms/baseMaterialType/types.ts b/src/api/wms/baseMaterialType/types.ts new file mode 100644 index 0000000..687a04d --- /dev/null +++ b/src/api/wms/baseMaterialType/types.ts @@ -0,0 +1,210 @@ +export interface BaseMaterialTypeVO { + /** + * 物料类型ID + */ + matrialTypeId: string | number; + + /** + * 租户编号 + */ + tenantId: string | number; + + /** + * 父级标识 + */ + parentId: string | number; + + /** + * 物料类型编号 + */ + matrialTypeCode: string; + + /** + * 物料类型名称 + */ + matrialTypeName: string; + + /** + * 祖级列表 + */ + ancestors: string; + + /** + * 物料大类 + */ + materialCategoryId: string; + + /** + * 物料小类 + */ + materialSubclass: string; + + /** + * 工序ID + */ + processId: string | number; + + /** + * 激活标识(1是 0否) + */ + activeFlag: string; + + /** + * 备注 + */ + remark: string; + + /** + * 创建部门 + */ + createDept: number; + + /** + * 创建人 + */ + createBy: number; + + /** + * 创建时间 + */ + createTime: string; + + /** + * 更新人 + */ + updateBy: number; + + /** + * 更新时间 + */ + updateTime: string; + + /** + * 子对象 + */ + children: BaseMaterialTypeVO[]; + + /** + * 物料大类名称 + */ + materialCategoryName?: string; +} + +export interface BaseMaterialTypeForm extends BaseEntity { + /** + * 物料类型ID + */ + matrialTypeId?: string | number; + + /** + * 父级标识 + */ + parentId?: string | number; + + /** + * 物料类型编号 + */ + matrialTypeCode?: string; + + /** + * 物料类型名称 + */ + matrialTypeName?: string; + + /** + * 祖级列表 + */ + ancestors?: string; + + /** + * 物料大类 + */ + materialCategoryId?: string; + + /** + * 物料小类 + */ + materialSubclass?: string; + + /** + * 工序ID + */ + processId?: string | number; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 物料大类名称 + */ + materialCategoryName?: string; + +} + +export interface BaseMaterialTypeQuery { + + /** + * 物料类型ID + */ + matrialTypeId?: string | number; + + /** + * 父级标识 + */ + parentId?: string | number; + + /** + * 物料类型编号 + */ + matrialTypeCode?: string; + + /** + * 物料类型名称 + */ + matrialTypeName?: string; + + /** + * 祖级列表 + */ + ancestors?: string; + + /** + * 物料大类 + */ + materialCategoryId?: string; + + /** + * 物料小类 + */ + materialSubclass?: string; + + /** + * 工序ID + */ + processId?: string | number; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + + /** + * 日期范围参数 + */ + params?: any; + + /** + * 物料大类名称 + */ + materialCategoryName?: string; +} + + + diff --git a/src/api/wms/baseMeasurementUnitInfo/index.ts b/src/api/wms/baseMeasurementUnitInfo/index.ts new file mode 100644 index 0000000..b97f9fd --- /dev/null +++ b/src/api/wms/baseMeasurementUnitInfo/index.ts @@ -0,0 +1,77 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { BaseMeasurementUnitInfoVO, BaseMeasurementUnitInfoForm, BaseMeasurementUnitInfoQuery } from '@/api/wms/baseMeasurementUnitInfo/types'; + +/** + * 查询计量单位信息列表 + * @param query + * @returns {*} + */ + +export const listBaseMeasurementUnitInfo = (query?: BaseMeasurementUnitInfoQuery): AxiosPromise => { + return request({ + url: '/wms/baseMeasurementUnitInfo/list', + method: 'get', + params: query + }); +}; + +/** + * 查询计量单位信息详细 + * @param unitId + */ +export const getBaseMeasurementUnitInfo = (unitId: string | number): AxiosPromise => { + return request({ + url: '/wms/baseMeasurementUnitInfo/' + unitId, + method: 'get' + }); +}; + +/** + * 新增计量单位信息 + * @param data + */ +export const addBaseMeasurementUnitInfo = (data: BaseMeasurementUnitInfoForm) => { + return request({ + url: '/wms/baseMeasurementUnitInfo', + method: 'post', + data: data + }); +}; + +/** + * 修改计量单位信息 + * @param data + */ +export const updateBaseMeasurementUnitInfo = (data: BaseMeasurementUnitInfoForm) => { + return request({ + url: '/wms/baseMeasurementUnitInfo', + method: 'put', + data: data + }); +}; + +/** + * 删除计量单位信息 + * @param unitId + */ +export const delBaseMeasurementUnitInfo = (unitId: string | number | Array) => { + return request({ + url: '/wms/baseMeasurementUnitInfo/' + unitId, + method: 'delete' + }); +}; + + +/** + * 下拉框查询计量单位信息列表 + * @param query + * @returns {*} + */ +export function getBaseMeasurementUnitInfoList (query) { + return request({ + url: '/wms/baseMeasurementUnitInfo/getBaseMeasurementUnitInfoList', + method: 'get', + params: query + }); +}; diff --git a/src/api/wms/baseMeasurementUnitInfo/types.ts b/src/api/wms/baseMeasurementUnitInfo/types.ts new file mode 100644 index 0000000..504b23d --- /dev/null +++ b/src/api/wms/baseMeasurementUnitInfo/types.ts @@ -0,0 +1,175 @@ +export interface BaseMeasurementUnitInfoVO { + /** + * 主键标识 + */ + unitId: string | number; + + /** + * 父级标识 + */ + parentId: string | number; + + /** + * 计量单位编号 + */ + unitCode: string; + + /** + * 计量单位名称 + */ + unitName: string; + + /** + * 计量单位转换(与最顶级转换关系,最顶级是1) + */ + unitConversion: number; + + /** + * 祖级列表 + */ + ancestors: string; + + /** + * 单位类型(1长度 2质量 3时间 4面积 5体积) + */ + unitType: string; + + /** + * 备注 + */ + remark: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag: string; + + /** + * 创建部门 + */ + createDept: number; + + /** + * 创建人 + */ + createBy: number; + + /** + * 创建时间 + */ + createTime: string; + + /** + * 更新人 + */ + updateBy: number; + + /** + * 更新时间 + */ + updateTime: string; + + /** + * 子对象 + */ + children: BaseMeasurementUnitInfoVO[]; +} + +export interface BaseMeasurementUnitInfoForm extends BaseEntity { + /** + * 主键标识 + */ + unitId?: string | number; + + /** + * 父级标识 + */ + parentId?: string | number; + + /** + * 计量单位编号 + */ + unitCode?: string; + + /** + * 计量单位名称 + */ + unitName?: string; + + /** + * 计量单位转换(与最顶级转换关系,最顶级是1) + */ + unitConversion?: number; + + /** + * 祖级列表 + */ + ancestors?: string; + + /** + * 单位类型(1长度 2质量 3时间 4面积 5体积) + */ + unitType?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + +} + +export interface BaseMeasurementUnitInfoQuery { + + /** + * 主键标识 + */ + unitId?: string | number; + + /** + * 父级标识 + */ + parentId?: string | number; + + /** + * 计量单位编号 + */ + unitCode?: string; + + /** + * 计量单位名称 + */ + unitName?: string; + + /** + * 计量单位转换(与最顶级转换关系,最顶级是1) + */ + unitConversion?: number; + + /** + * 祖级列表 + */ + ancestors?: string; + + /** + * 单位类型(1长度 2质量 3时间 4面积 5体积) + */ + unitType?: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/wms/instockOrder/types.ts b/src/api/wms/instockOrder/types.ts index 46c932c..a9dea86 100644 --- a/src/api/wms/instockOrder/types.ts +++ b/src/api/wms/instockOrder/types.ts @@ -1,3 +1,5 @@ +import { InstockDetailForm } from '@/api/wms/instockDetail/types'; + export interface InstockOrderVO { /** * 入库单 主键 @@ -116,6 +118,11 @@ export interface InstockOrderForm extends BaseEntity { */ instockMethond?: string; + /** + * 入库单子表(与后端 WmsInstockOrderBo.detailListBo 对齐) + */ + detailListBo?: InstockDetailForm[]; + } export interface InstockOrderQuery extends PageQuery { diff --git a/src/api/wms/instockPrint/types.ts b/src/api/wms/instockPrint/types.ts index f182ff1..cc9239d 100644 --- a/src/api/wms/instockPrint/types.ts +++ b/src/api/wms/instockPrint/types.ts @@ -61,6 +61,22 @@ export interface InstockPrintVO { materialCategoryName: string; + /** + * 推荐库位id + */ + locationId: string | number; + + /** + * 入库状态(0-待入库,1-已入库,2-入库中) + */ + inboundStatus: string; + + /** + * 实际入库时间 + */ + actualInboundTime: string; + + } export interface InstockPrintForm extends BaseEntity { @@ -126,6 +142,21 @@ export interface InstockPrintForm extends BaseEntity { materialCategoryName?: string; + /** + * 推荐库位id + */ + locationId?: string | number; + + /** + * 入库状态(0-待入库,1-已入库,2-入库中) + */ + inboundStatus?: string; + + /** + * 实际入库时间 + */ + actualInboundTime?: string; + } export interface InstockPrintQuery extends PageQuery { @@ -192,6 +223,23 @@ export interface InstockPrintQuery extends PageQuery { materialCategoryName?: string; + + /** + * 推荐库位id + */ + locationId?: string | number; + + /** + * 入库状态(0-待入库,1-已入库,2-入库中) + */ + inboundStatus?: string; + + /** + * 实际入库时间 + */ + actualInboundTime?: string; + + /** * 日期范围参数 */ diff --git a/src/api/wms/outstockDetail/types.ts b/src/api/wms/outstockDetail/types.ts index 124beed..54556e4 100644 --- a/src/api/wms/outstockDetail/types.ts +++ b/src/api/wms/outstockDetail/types.ts @@ -37,6 +37,22 @@ export interface OutstockDetailVO { */ materialCode: string; + + /** + * 是否为AGV任务(0是,1否) + */ + isAgv: string ; + + /** + * 完成数量 + */ + completeQty: number | string; + + /** + * AGV状态(0待拾取 / 1运输中 / 2完成) + */ + agvStatus: string; + } export interface OutstockDetailForm extends BaseEntity { @@ -72,6 +88,22 @@ export interface OutstockDetailForm extends BaseEntity { materialCategoryName?: string; + + /** + * 是否为AGV任务(0是,1否) + */ + isAgv?: string ; + + /** + * 完成数量 + */ + completeQty?: number | string; + + /** + * AGV状态(0待拾取 / 1运输中 / 2完成) + */ + agvStatus?: string; + } export interface OutstockDetailQuery extends PageQuery { @@ -108,6 +140,23 @@ export interface OutstockDetailQuery extends PageQuery { materialCategoryName?: string; + + /** + * 是否为AGV任务(0是,1否) + */ + isAgv?: string ; + + /** + * 完成数量 + */ + completeQty?: number | string; + + /** + * AGV状态(0待拾取 / 1运输中 / 2完成) + */ + agvStatus?: string; + + /** * 日期范围参数 */ diff --git a/src/api/wms/outstockOrder/index.ts b/src/api/wms/outstockOrder/index.ts index c33c962..95b5c33 100644 --- a/src/api/wms/outstockOrder/index.ts +++ b/src/api/wms/outstockOrder/index.ts @@ -61,3 +61,15 @@ export const delOutstockOrder = (outstockId: string | number | Array) => { + return request({ + url: '/wms/outstockOrder/approve', + method: 'put', + data: data + }); +}; \ No newline at end of file diff --git a/src/utils/request.ts b/src/utils/request.ts index c2c9674..ba2e479 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -25,6 +25,21 @@ export const globalHeaders = () => { axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'; axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID; + +//请求地址处理,兼容使用模块化,wms分为wms1\2\3多个微服务端口 +const getUrl = () =>{ + let routeType = router.currentRoute.value.query.routeType + if(!routeType) return "/wms/" + if(routeType == '1'){ + return "/wms1/" + } + if(routeType == '2'){ + return "/wms2/" + } + if(routeType == '3'){ + return "/wms3/" + } +} // 创建 axios 实例 const service = axios.create({ baseURL: import.meta.env.VITE_APP_BASE_API, @@ -34,6 +49,12 @@ const service = axios.create({ // 请求拦截器 service.interceptors.request.use( (config: InternalAxiosRequestConfig) => { + + // 请求地址处理,兼容使用模块化,wms分为wms1\2\3多个微服务端口 + config.url = config.url.replaceAll('/wms/',getUrl()) + console.log(config.url); + + // 对应国际化资源文件后缀 config.headers['Content-Language'] = getLanguage(); diff --git a/src/views/wms/baseMaterialCategory/index.vue b/src/views/wms/baseMaterialCategory/index.vue new file mode 100644 index 0000000..2fd857d --- /dev/null +++ b/src/views/wms/baseMaterialCategory/index.vue @@ -0,0 +1,285 @@ + + + diff --git a/src/views/wms/baseMaterialInfo/addMaterialInWMS.vue b/src/views/wms/baseMaterialInfo/addMaterialInWMS.vue new file mode 100644 index 0000000..670b109 --- /dev/null +++ b/src/views/wms/baseMaterialInfo/addMaterialInWMS.vue @@ -0,0 +1,476 @@ + + + diff --git a/src/views/wms/baseMaterialInfo/index.vue b/src/views/wms/baseMaterialInfo/index.vue new file mode 100644 index 0000000..e1743af --- /dev/null +++ b/src/views/wms/baseMaterialInfo/index.vue @@ -0,0 +1,753 @@ + + + diff --git a/src/views/wms/baseMaterialType/index.vue b/src/views/wms/baseMaterialType/index.vue new file mode 100644 index 0000000..8466953 --- /dev/null +++ b/src/views/wms/baseMaterialType/index.vue @@ -0,0 +1,420 @@ + + + diff --git a/src/views/wms/baseMeasurementUnitInfo/index.vue b/src/views/wms/baseMeasurementUnitInfo/index.vue new file mode 100644 index 0000000..bb2b6cd --- /dev/null +++ b/src/views/wms/baseMeasurementUnitInfo/index.vue @@ -0,0 +1,351 @@ + + + diff --git a/src/views/wms/instockOrderCopy/backup.vue b/src/views/wms/instockOrderCopy/backup.vue index 5efedb1..a05f4f1 100644 --- a/src/views/wms/instockOrderCopy/backup.vue +++ b/src/views/wms/instockOrderCopy/backup.vue @@ -583,7 +583,7 @@ import { getMaterialList, getInstockMaterialList } from '@/api/wms/linkage' -import MaterialSelectInWMS from "@/views/mes/baseMaterialInfo/addMaterialInWMS.vue"; +import MaterialSelectInWMS from "@/views/wms/baseMaterialInfo/addMaterialInWMS.vue"; import { getBaseMaterialCategoryListInWMS } from '@/api/wms/baseMaterialCategory'; diff --git a/src/views/wms/instockOrderCopy/index.vue b/src/views/wms/instockOrderCopy/index.vue index c575926..33fe20a 100644 --- a/src/views/wms/instockOrderCopy/index.vue +++ b/src/views/wms/instockOrderCopy/index.vue @@ -6,15 +6,15 @@ - + - - - - - + + + + + @@ -426,7 +426,7 @@ - + - + { } const reset = () => { queryForm.value = { - instockId: '' + instockId: '', + instockMethond: routeInstockMethondValue, // 使用保存的路由参数值 } getParentTable() } @@ -870,18 +887,35 @@ const addDialogTableCell = () => { // 新增提交 const dialogSubmit = () => { + // 将前端行映射为后端明细字段,并进行基本校验与过滤 + const detailList = (dialogtable.value || []) + .map((item: any) => ({ + materialId: item.materialId, + materialCode: item.materialCode, + materialName: item.materialName, + materialSpe: item.materialSpec, // 前端 materialSpec -> 后端 materialSpe + unitName: item.materialUnit, // 前端 materialUnit -> 后端 unitName + instockQty: item.instockQty, + codeYesNo: item.codeYesNo || '0', + materialCategoryId: dialogForm.value.materialCategoryId + })) + .filter(d => d.materialId && d.materialCode && Number(d.instockQty) > 0); - addInstockOrder(dialogForm.value).then(e => { - addInstockDetail(dialogtable.value.map(item => { - return {...item, instockCode: e.data.instockCode,instockId: e.data.instockId, materialCategoryId: e.data.materialCategoryId} - } - ) - ).then(v => { - dialogVisible.value = false - getParentTable() - }) + if (!detailList.length) { + ElMessage.error('请添加至少一条入库明细且数量>0'); + return; + } - }) + const payload: InstockOrderForm = { + ...dialogForm.value, + detailListBo: detailList + }; + + addInstockOrder(payload).then(() => { + ElMessage.success('保存成功'); + dialogVisible.value = false; + getParentTable(); + }); } /** * 入库单审批 @@ -1000,8 +1034,8 @@ const submitMaterialForm = () => { dialogtable.value[currentRowIndex.value].materialId = selectedMaterial.value.materialId; dialogtable.value[currentRowIndex.value].materialName = selectedMaterial.value.materialName; dialogtable.value[currentRowIndex.value].materialCode = selectedMaterial.value.materialCode; - dialogtable.value[currentRowIndex.value].materialUnit = selectedMaterial.value.materialUnit; - dialogtable.value[currentRowIndex.value].materialSpec = selectedMaterial.value.materialSpec; + dialogtable.value[currentRowIndex.value].unitName = selectedMaterial.value.materialUnit; + dialogtable.value[currentRowIndex.value].materialSpe = selectedMaterial.value.materialSpec; // 可以根据需要添加更多字段 } } diff --git a/src/views/wms/instockPrint/index.vue b/src/views/wms/instockPrint/index.vue index ec2ad21..db271e9 100644 --- a/src/views/wms/instockPrint/index.vue +++ b/src/views/wms/instockPrint/index.vue @@ -38,10 +38,10 @@ - + - + - + + + + + + + + + + + + + + + + + + + + + 搜索 重置 @@ -55,11 +55,17 @@ - + - + + + + +