仓储半成品页面
parent
e937db72ee
commit
2841c2133d
@ -0,0 +1,77 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { HppInStockDetailVO, HppInStockDetailForm, HppInStockDetailQuery } from '@/api/wms/hppInStockDetail/types';
|
||||
|
||||
/**
|
||||
* 查询半制品入库列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listHppInStockDetail = (query?: HppInStockDetailQuery): AxiosPromise<HppInStockDetailVO[]> => {
|
||||
return request({
|
||||
url: '/wms/hppInStockDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询半制品入库详细
|
||||
* @param objId
|
||||
*/
|
||||
export const getHppInStockDetail = (objId: string | number): AxiosPromise<HppInStockDetailVO> => {
|
||||
return request({
|
||||
url: '/wms/hppInStockDetail/' + objId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增半制品入库
|
||||
* @param data
|
||||
*/
|
||||
export const addHppInStockDetail = (data: HppInStockDetailForm) => {
|
||||
return request({
|
||||
url: '/wms/hppInStockDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改半制品入库
|
||||
* @param data
|
||||
*/
|
||||
export const updateHppInStockDetail = (data: HppInStockDetailForm) => {
|
||||
return request({
|
||||
url: '/wms/hppInStockDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除半制品入库
|
||||
* @param objId
|
||||
*/
|
||||
export const delHppInStockDetail = (objId: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/wms/hppInStockDetail/' + objId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询半制品入库列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getWmsHppInStockDetailList (query) {
|
||||
return request({
|
||||
url: '/wms/hppInStockDetail/getWmsHppInStockDetailList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
@ -0,0 +1,77 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { HppOutStockDetailVO, HppOutStockDetailForm, HppOutStockDetailQuery } from '@/api/wms/hppOutStockDetail/types';
|
||||
|
||||
/**
|
||||
* 查询半成品出库列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listHppOutStockDetail = (query?: HppOutStockDetailQuery): AxiosPromise<HppOutStockDetailVO[]> => {
|
||||
return request({
|
||||
url: '/wms/hppOutStockDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询半成品出库详细
|
||||
* @param objId
|
||||
*/
|
||||
export const getHppOutStockDetail = (objId: string | number): AxiosPromise<HppOutStockDetailVO> => {
|
||||
return request({
|
||||
url: '/wms/hppOutStockDetail/' + objId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增半成品出库
|
||||
* @param data
|
||||
*/
|
||||
export const addHppOutStockDetail = (data: HppOutStockDetailForm) => {
|
||||
return request({
|
||||
url: '/wms/hppOutStockDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改半成品出库
|
||||
* @param data
|
||||
*/
|
||||
export const updateHppOutStockDetail = (data: HppOutStockDetailForm) => {
|
||||
return request({
|
||||
url: '/wms/hppOutStockDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除半成品出库
|
||||
* @param objId
|
||||
*/
|
||||
export const delHppOutStockDetail = (objId: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/wms/hppOutStockDetail/' + objId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询半成品出库列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getWmsHppOutStockDetailList (query) {
|
||||
return request({
|
||||
url: '/wms/hppOutStockDetail/getWmsHppOutStockDetailList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
@ -0,0 +1,121 @@
|
||||
export interface HppOutStockDetailVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
objId: string | number;
|
||||
|
||||
/**
|
||||
* 流水卡号
|
||||
*/
|
||||
cardNo: string;
|
||||
|
||||
/**
|
||||
* 工装架子号
|
||||
*/
|
||||
shelfNo: string;
|
||||
|
||||
/**
|
||||
* 库位id
|
||||
*/
|
||||
storePlaceId: string | number;
|
||||
|
||||
/**
|
||||
* 品级编号,0:合格,1:不合格
|
||||
*/
|
||||
gradeCode: string;
|
||||
|
||||
/**
|
||||
* 出库类型
|
||||
*/
|
||||
outType: string;
|
||||
|
||||
/**
|
||||
* 目的库位
|
||||
*/
|
||||
targetStorePlaceId: string | number;
|
||||
|
||||
}
|
||||
|
||||
export interface HppOutStockDetailForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
objId?: string | number;
|
||||
|
||||
/**
|
||||
* 流水卡号
|
||||
*/
|
||||
cardNo?: string;
|
||||
|
||||
/**
|
||||
* 工装架子号
|
||||
*/
|
||||
shelfNo?: string;
|
||||
|
||||
/**
|
||||
* 库位id
|
||||
*/
|
||||
storePlaceId?: string | number;
|
||||
|
||||
/**
|
||||
* 品级编号,0:合格,1:不合格
|
||||
*/
|
||||
gradeCode?: string;
|
||||
|
||||
/**
|
||||
* 出库类型
|
||||
*/
|
||||
outType?: string;
|
||||
|
||||
/**
|
||||
* 目的库位
|
||||
*/
|
||||
targetStorePlaceId?: string | number;
|
||||
|
||||
}
|
||||
|
||||
export interface HppOutStockDetailQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
objId?: string | number;
|
||||
|
||||
/**
|
||||
* 流水卡号
|
||||
*/
|
||||
cardNo?: string;
|
||||
|
||||
/**
|
||||
* 工装架子号
|
||||
*/
|
||||
shelfNo?: string;
|
||||
|
||||
/**
|
||||
* 库位id
|
||||
*/
|
||||
storePlaceId?: string | number;
|
||||
|
||||
/**
|
||||
* 品级编号,0:合格,1:不合格
|
||||
*/
|
||||
gradeCode?: string;
|
||||
|
||||
/**
|
||||
* 出库类型
|
||||
*/
|
||||
outType?: string;
|
||||
|
||||
/**
|
||||
* 目的库位
|
||||
*/
|
||||
targetStorePlaceId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,77 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { HppStorageDetailVO, HppStorageDetailForm, HppStorageDetailQuery } from '@/api/wms/hppStorageDetail/types';
|
||||
|
||||
/**
|
||||
* 查询半成品库存列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listHppStorageDetail = (query?: HppStorageDetailQuery): AxiosPromise<HppStorageDetailVO[]> => {
|
||||
return request({
|
||||
url: '/wms/hppStorageDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询半成品库存详细
|
||||
* @param objId
|
||||
*/
|
||||
export const getHppStorageDetail = (objId: string | number): AxiosPromise<HppStorageDetailVO> => {
|
||||
return request({
|
||||
url: '/wms/hppStorageDetail/' + objId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增半成品库存
|
||||
* @param data
|
||||
*/
|
||||
export const addHppStorageDetail = (data: HppStorageDetailForm) => {
|
||||
return request({
|
||||
url: '/wms/hppStorageDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改半成品库存
|
||||
* @param data
|
||||
*/
|
||||
export const updateHppStorageDetail = (data: HppStorageDetailForm) => {
|
||||
return request({
|
||||
url: '/wms/hppStorageDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除半成品库存
|
||||
* @param objId
|
||||
*/
|
||||
export const delHppStorageDetail = (objId: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/wms/hppStorageDetail/' + objId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询半成品库存列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getWmsHppStorageDetailList (query) {
|
||||
return request({
|
||||
url: '/wms/hppStorageDetail/getWmsHppStorageDetailList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
@ -0,0 +1,136 @@
|
||||
export interface HppStorageDetailVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
objId: string | number;
|
||||
|
||||
/**
|
||||
* 流水卡号
|
||||
*/
|
||||
cardNo: string;
|
||||
|
||||
/**
|
||||
* 工装架子号
|
||||
*/
|
||||
shelfNo: string;
|
||||
|
||||
/**
|
||||
* 入库类型
|
||||
*/
|
||||
instockType: string;
|
||||
|
||||
/**
|
||||
* 物料Id
|
||||
*/
|
||||
materialId: string | number;
|
||||
|
||||
/**
|
||||
* 库位id
|
||||
*/
|
||||
storePlaceId: string | number;
|
||||
|
||||
/**
|
||||
* 密炼来料数量
|
||||
*/
|
||||
sourceNum: number;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
storageNum: number;
|
||||
|
||||
}
|
||||
|
||||
export interface HppStorageDetailForm extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
objId?: string | number;
|
||||
|
||||
/**
|
||||
* 流水卡号
|
||||
*/
|
||||
cardNo?: string;
|
||||
|
||||
/**
|
||||
* 工装架子号
|
||||
*/
|
||||
shelfNo?: string;
|
||||
|
||||
/**
|
||||
* 入库类型
|
||||
*/
|
||||
instockType?: string;
|
||||
|
||||
/**
|
||||
* 物料Id
|
||||
*/
|
||||
materialId?: string | number;
|
||||
|
||||
/**
|
||||
* 库位id
|
||||
*/
|
||||
storePlaceId?: string | number;
|
||||
|
||||
/**
|
||||
* 密炼来料数量
|
||||
*/
|
||||
sourceNum?: number;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
storageNum?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface HppStorageDetailQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
objId?: string | number;
|
||||
|
||||
/**
|
||||
* 流水卡号
|
||||
*/
|
||||
cardNo?: string;
|
||||
|
||||
/**
|
||||
* 工装架子号
|
||||
*/
|
||||
shelfNo?: string;
|
||||
|
||||
/**
|
||||
* 入库类型
|
||||
*/
|
||||
instockType?: string;
|
||||
|
||||
/**
|
||||
* 物料Id
|
||||
*/
|
||||
materialId?: string | number;
|
||||
|
||||
/**
|
||||
* 库位id
|
||||
*/
|
||||
storePlaceId?: string | number;
|
||||
|
||||
/**
|
||||
* 密炼来料数量
|
||||
*/
|
||||
sourceNum?: number;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
storageNum?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,77 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { HppStoreVO, HppStoreForm, HppStoreQuery } from '@/api/wms/hppStore/types';
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listHppStore = (query?: HppStoreQuery): AxiosPromise<HppStoreVO[]> => {
|
||||
return request({
|
||||
url: '/wms/hppStore/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】详细
|
||||
* @param createBy
|
||||
*/
|
||||
export const getHppStore = (objId: string | number): AxiosPromise<HppStoreVO> => {
|
||||
return request({
|
||||
url: '/wms/hppStore/' + objId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
* @param data
|
||||
*/
|
||||
export const addHppStore = (data: HppStoreForm) => {
|
||||
return request({
|
||||
url: '/wms/hppStore',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
* @param data
|
||||
*/
|
||||
export const updateHppStore = (data: HppStoreForm) => {
|
||||
return request({
|
||||
url: '/wms/hppStore',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
* @param createBy
|
||||
*/
|
||||
export const delHppStore = (objId: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/wms/hppStore/' + objId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询【请填写功能名称】列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getWmsHppStoreList (query) {
|
||||
return request({
|
||||
url: '/wms/hppStore/getWmsHppStoreList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
@ -0,0 +1,136 @@
|
||||
export interface HppStoreVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
objId: string | number;
|
||||
|
||||
/**
|
||||
* 仓库名
|
||||
*/
|
||||
storeName: string;
|
||||
|
||||
/**
|
||||
* 仓库代码
|
||||
*/
|
||||
storeCode: string;
|
||||
|
||||
/**
|
||||
* 仓库类型
|
||||
*/
|
||||
storeType: number;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
usedFlag: string;
|
||||
|
||||
/**
|
||||
* sap代码
|
||||
*/
|
||||
sapCode: string;
|
||||
|
||||
/**
|
||||
* 仓库等级
|
||||
*/
|
||||
storeLevel: number;
|
||||
|
||||
/**
|
||||
* 上级目录
|
||||
*/
|
||||
storeHigherLevel: number;
|
||||
|
||||
}
|
||||
|
||||
export interface HppStoreForm extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
objId?: string | number;
|
||||
|
||||
/**
|
||||
* 仓库名
|
||||
*/
|
||||
storeName?: string;
|
||||
|
||||
/**
|
||||
* 仓库代码
|
||||
*/
|
||||
storeCode?: string;
|
||||
|
||||
/**
|
||||
* 仓库类型
|
||||
*/
|
||||
storeType?: number;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
usedFlag?: string;
|
||||
|
||||
/**
|
||||
* sap代码
|
||||
*/
|
||||
sapCode?: string;
|
||||
|
||||
/**
|
||||
* 仓库等级
|
||||
*/
|
||||
storeLevel?: number;
|
||||
|
||||
/**
|
||||
* 上级目录
|
||||
*/
|
||||
storeHigherLevel?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface HppStoreQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
objId?: string | number;
|
||||
|
||||
/**
|
||||
* 仓库名
|
||||
*/
|
||||
storeName?: string;
|
||||
|
||||
/**
|
||||
* 仓库代码
|
||||
*/
|
||||
storeCode?: string;
|
||||
|
||||
/**
|
||||
* 仓库类型
|
||||
*/
|
||||
storeType?: number;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
usedFlag?: string;
|
||||
|
||||
/**
|
||||
* sap代码
|
||||
*/
|
||||
sapCode?: string;
|
||||
|
||||
/**
|
||||
* 仓库等级
|
||||
*/
|
||||
storeLevel?: number;
|
||||
|
||||
/**
|
||||
* 上级目录
|
||||
*/
|
||||
storeHigherLevel?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,77 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { HppStorePlaceVO, HppStorePlaceForm, HppStorePlaceQuery } from '@/api/wms/hppStorePlace/types';
|
||||
|
||||
/**
|
||||
* 查询半成品库位列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listHppStorePlace = (query?: HppStorePlaceQuery): AxiosPromise<HppStorePlaceVO[]> => {
|
||||
return request({
|
||||
url: '/wms/hppStorePlace/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询半成品库位详细
|
||||
* @param objId
|
||||
*/
|
||||
export const getHppStorePlace = (objId: string | number): AxiosPromise<HppStorePlaceVO> => {
|
||||
return request({
|
||||
url: '/wms/hppStorePlace/' + objId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增半成品库位
|
||||
* @param data
|
||||
*/
|
||||
export const addHppStorePlace = (data: HppStorePlaceForm) => {
|
||||
return request({
|
||||
url: '/wms/hppStorePlace',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改半成品库位
|
||||
* @param data
|
||||
*/
|
||||
export const updateHppStorePlace = (data: HppStorePlaceForm) => {
|
||||
return request({
|
||||
url: '/wms/hppStorePlace',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除半成品库位
|
||||
* @param objId
|
||||
*/
|
||||
export const delHppStorePlace = (objId: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/wms/hppStorePlace/' + objId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询半成品库位列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getWmsHppStorePlaceList (query) {
|
||||
return request({
|
||||
url: '/wms/hppStorePlace/getWmsHppStorePlaceList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
@ -0,0 +1,121 @@
|
||||
export interface HppStorePlaceVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
objId: string | number;
|
||||
|
||||
/**
|
||||
* 库位名
|
||||
*/
|
||||
storePlaceName: string;
|
||||
|
||||
/**
|
||||
* 库位代码
|
||||
*/
|
||||
storePlaceCode: string;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
storeId: string | number;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
usedFlag: string;
|
||||
|
||||
/**
|
||||
* 特殊库位
|
||||
*/
|
||||
specitialType: string;
|
||||
|
||||
/**
|
||||
* 位置类型
|
||||
*/
|
||||
positionType: string;
|
||||
|
||||
}
|
||||
|
||||
export interface HppStorePlaceForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
objId?: string | number;
|
||||
|
||||
/**
|
||||
* 库位名
|
||||
*/
|
||||
storePlaceName?: string;
|
||||
|
||||
/**
|
||||
* 库位代码
|
||||
*/
|
||||
storePlaceCode?: string;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
storeId?: string | number;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
usedFlag?: string;
|
||||
|
||||
/**
|
||||
* 特殊库位
|
||||
*/
|
||||
specitialType?: string;
|
||||
|
||||
/**
|
||||
* 位置类型
|
||||
*/
|
||||
positionType?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface HppStorePlaceQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
objId?: string | number;
|
||||
|
||||
/**
|
||||
* 库位名
|
||||
*/
|
||||
storePlaceName?: string;
|
||||
|
||||
/**
|
||||
* 库位代码
|
||||
*/
|
||||
storePlaceCode?: string;
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
storeId?: string | number;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
usedFlag?: string;
|
||||
|
||||
/**
|
||||
* 特殊库位
|
||||
*/
|
||||
specitialType?: string;
|
||||
|
||||
/**
|
||||
* 位置类型
|
||||
*/
|
||||
positionType?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,77 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { HsmToolingVO, HsmToolingForm, HsmToolingQuery } from '@/api/wms/hsmTooling/types';
|
||||
|
||||
/**
|
||||
* 查询半成品工装列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listHsmTooling = (query?: HsmToolingQuery): AxiosPromise<HsmToolingVO[]> => {
|
||||
return request({
|
||||
url: '/wms/hsmTooling/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询半成品工装详细
|
||||
* @param OBJID
|
||||
*/
|
||||
export const getHsmTooling = (OBJID: string | number): AxiosPromise<HsmToolingVO> => {
|
||||
return request({
|
||||
url: '/wms/hsmTooling/' + OBJID,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增半成品工装
|
||||
* @param data
|
||||
*/
|
||||
export const addHsmTooling = (data: HsmToolingForm) => {
|
||||
return request({
|
||||
url: '/wms/hsmTooling',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改半成品工装
|
||||
* @param data
|
||||
*/
|
||||
export const updateHsmTooling = (data: HsmToolingForm) => {
|
||||
return request({
|
||||
url: '/wms/hsmTooling',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除半成品工装
|
||||
* @param OBJID
|
||||
*/
|
||||
export const delHsmTooling = (OBJID: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/wms/hsmTooling/' + OBJID,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询半成品工装列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getWmsHsmToolingList (query) {
|
||||
return request({
|
||||
url: '/wms/hsmTooling/getWmsHsmToolingList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
@ -0,0 +1,166 @@
|
||||
export interface HsmToolingVO {
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
OBJID: number;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
createdBy: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
createdTime: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
updatedBy: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
updatedTime: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
toolingBarcode: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
tenantId: string | number;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
toolingRfidBarcode: string | number;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
toolingType: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
isUsed: string;
|
||||
|
||||
}
|
||||
|
||||
export interface HsmToolingForm extends BaseEntity {
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
OBJID?: number;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
createdBy?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
createdTime?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
updatedBy?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
updatedTime?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
toolingBarcode?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
tenantId?: string | number;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
toolingRfidBarcode?: string | number;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
toolingType?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
isUsed?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface HsmToolingQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
OBJID?: number;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
createdBy?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
createdTime?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
updatedBy?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
updatedTime?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
toolingBarcode?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
tenantId?: string | number;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
toolingRfidBarcode?: string | number;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
toolingType?: string;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
isUsed?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,315 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="流水卡号" prop="cardNo">
|
||||
<el-input v-model="queryParams.cardNo" placeholder="请输入流水卡号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工装架子号" prop="shelfNo">
|
||||
<el-input v-model="queryParams.shelfNo" placeholder="请输入工装架子号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位" prop="storePlaceId">
|
||||
<el-input v-model="queryParams.storePlaceId" placeholder="请输入库位" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="品级编号" prop="gradeCode">
|
||||
<el-select v-model="form.gradeCode" placeholder="请选择品级编号">
|
||||
<el-option
|
||||
v-for="dict in wms_grade_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库类型" prop="outType">
|
||||
<el-select v-model="queryParams.outType" placeholder="请选择出库类型" clearable >
|
||||
<el-option v-for="dict in wms_outstock_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="目的库位" prop="targetStorePlaceId">
|
||||
<el-input v-model="queryParams.targetStorePlaceId" placeholder="请输入目的库位" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:hppOutStockDetail:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:hppOutStockDetail:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:hppOutStockDetail:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:hppOutStockDetail:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" :columns="columns" :search="true" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="hppOutStockDetailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="objId" v-if="columns[0].visible"/> -->
|
||||
<el-table-column label="流水卡号" align="center" prop="cardNo" v-if="columns[6].visible"/>
|
||||
<el-table-column label="工装架子号" align="center" prop="shelfNo" v-if="columns[7].visible"/>
|
||||
<el-table-column label="库位id" align="center" prop="storePlaceId" v-if="columns[8].visible"/>
|
||||
<el-table-column label="品级编号" align="center" prop="gradeCode" v-if="columns[9].visible">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_grade_code" :value="scope.row.gradeCode"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库类型" align="center" prop="outType" v-if="columns[10].visible">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_outstock_type" :value="scope.row.outType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="目的库位" align="center" prop="targetStorePlaceId" v-if="columns[11].visible"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:hppOutStockDetail:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:hppOutStockDetail:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改半成品出库对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="hppOutStockDetailFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="流水卡号" prop="cardNo">
|
||||
<el-input v-model="form.cardNo" placeholder="请输入流水卡号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工装架子号" prop="shelfNo">
|
||||
<el-input v-model="form.shelfNo" placeholder="请输入工装架子号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位id" prop="storePlaceId">
|
||||
<el-input v-model="form.storePlaceId" placeholder="请输入库位id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="品级编号,0:合格,1:不合格" prop="gradeCode">
|
||||
<el-input v-model="form.gradeCode" placeholder="请输入品级编号,0:合格,1:不合格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出库类型" prop="outType">
|
||||
<el-select v-model="form.outType" placeholder="请选择出库类型">
|
||||
<el-option
|
||||
v-for="dict in wms_outstock_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="目的库位" prop="targetStorePlaceId">
|
||||
<el-input v-model="form.targetStorePlaceId" placeholder="请输入目的库位" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="HppOutStockDetail" lang="ts">
|
||||
import { listHppOutStockDetail, getHppOutStockDetail, delHppOutStockDetail, addHppOutStockDetail, updateHppOutStockDetail } from '@/api/wms/hppOutStockDetail';
|
||||
import { HppOutStockDetailVO, HppOutStockDetailQuery, HppOutStockDetailForm } from '@/api/wms/hppOutStockDetail/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { wms_grade_code, wms_product_category, wms_outstock_type } = toRefs<any>(proxy?.useDict('wms_grade_code','wms_product_category','wms_outstock_type'));
|
||||
const hppOutStockDetailList = ref<HppOutStockDetailVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const hppOutStockDetailFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
// 列显隐信息
|
||||
const columns = ref<FieldOption[]>([
|
||||
{ key: 0, label: `主键id`, visible: true },
|
||||
{ key: 1, label: `创建人`, visible: true },
|
||||
{ key: 2, label: `创建时间`, visible: true },
|
||||
{ key: 3, label: `更新人`, visible: true },
|
||||
{ key: 4, label: `更新时间`, visible: true },
|
||||
{ key: 5, label: `租户`, visible: true },
|
||||
{ key: 6, label: `流水卡号`, visible: true },
|
||||
{ key: 7, label: `工装架子号`, visible: true },
|
||||
{ key: 8, label: `库位id`, visible: true },
|
||||
{ key: 9, label: `品级编号,0:合格,1:不合格`, visible: true },
|
||||
{ key: 10, label: `出库类型`, visible: true },
|
||||
{ key: 11, label: `目的库位`, visible: true },
|
||||
]);
|
||||
|
||||
const initFormData: HppOutStockDetailForm = {
|
||||
objId: undefined,
|
||||
cardNo: undefined,
|
||||
shelfNo: undefined,
|
||||
storePlaceId: undefined,
|
||||
gradeCode: undefined,
|
||||
outType: undefined,
|
||||
targetStorePlaceId: undefined
|
||||
}
|
||||
const data = reactive<PageData<HppOutStockDetailForm, HppOutStockDetailQuery>>({
|
||||
form: {...initFormData},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
objId: undefined,
|
||||
cardNo: undefined,
|
||||
shelfNo: undefined,
|
||||
storePlaceId: undefined,
|
||||
gradeCode: undefined,
|
||||
outType: undefined,
|
||||
targetStorePlaceId: undefined,
|
||||
params: {
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
objId: [
|
||||
{ required: true, message: "主键id不能为空", trigger: "blur" }
|
||||
],
|
||||
cardNo: [
|
||||
{ required: true, message: "流水卡号不能为空", trigger: "blur" }
|
||||
],
|
||||
shelfNo: [
|
||||
{ required: true, message: "工装架子号不能为空", trigger: "blur" }
|
||||
],
|
||||
storePlaceId: [
|
||||
{ required: true, message: "库位id不能为空", trigger: "blur" }
|
||||
],
|
||||
gradeCode: [
|
||||
{ required: true, message: "品级编号,0:合格,1:不合格不能为空", trigger: "blur" }
|
||||
],
|
||||
outType: [
|
||||
{ required: true, message: "出库类型不能为空", trigger: "change" }
|
||||
],
|
||||
targetStorePlaceId: [
|
||||
{ required: true, message: "目的库位不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询半成品出库列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listHppOutStockDetail(queryParams.value);
|
||||
hppOutStockDetailList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = {...initFormData};
|
||||
hppOutStockDetailFormRef.value?.resetFields();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: HppOutStockDetailVO[]) => {
|
||||
ids.value = selection.map(item => item.objId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = "添加半成品出库";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: HppOutStockDetailVO) => {
|
||||
reset();
|
||||
const _objId = row?.objId || ids.value[0]
|
||||
const res = await getHppOutStockDetail(_objId);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = "修改半成品出库";
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
hppOutStockDetailFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.objId) {
|
||||
await updateHppOutStockDetail(form.value).finally(() => buttonLoading.value = false);
|
||||
} else {
|
||||
await addHppOutStockDetail(form.value).finally(() => buttonLoading.value = false);
|
||||
}
|
||||
proxy?.$modal.msgSuccess("操作成功");
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: HppOutStockDetailVO) => {
|
||||
const _objIds = row?.objId || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除半成品出库编号为"' + _objIds + '"的数据项?').finally(() => loading.value = false);
|
||||
await delHppOutStockDetail(_objIds);
|
||||
proxy?.$modal.msgSuccess("删除成功");
|
||||
await getList();
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download('system/hppOutStockDetail/export', {
|
||||
...queryParams.value
|
||||
}, `hppOutStockDetail_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="流水卡号" prop="cardNo">
|
||||
<el-input v-model="queryParams.cardNo" placeholder="请输入流水卡号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工装架子号" prop="shelfNo">
|
||||
<el-input v-model="queryParams.shelfNo" placeholder="请输入工装架子号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入库类型" prop="instockType">
|
||||
<el-select v-model="queryParams.instockType" placeholder="请选择入库类型" clearable >
|
||||
<el-option v-for="dict in ${dictType}" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="物料Id" prop="materialId">
|
||||
<el-input v-model="queryParams.materialId" placeholder="请输入物料Id" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位id" prop="storePlaceId">
|
||||
<el-input v-model="queryParams.storePlaceId" placeholder="请输入库位id" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:hppStorageDetail:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:hppStorageDetail:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:hppStorageDetail:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:hppStorageDetail:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" :columns="columns" :search="true" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="hppStorageDetailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="objId" v-if="columns[0].visible"/> -->
|
||||
<el-table-column label="流水卡号" align="center" prop="cardNo" v-if="columns[6].visible"/>
|
||||
<el-table-column label="工装架子号" align="center" prop="shelfNo" v-if="columns[7].visible"/>
|
||||
<el-table-column label="入库类型" align="center" prop="instockType" v-if="columns[8].visible">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_halfproduct_instock_type" :value="scope.row.instockType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料Id" align="center" prop="materialId" v-if="columns[9].visible"/>
|
||||
<el-table-column label="库位id" align="center" prop="storePlaceId" v-if="columns[10].visible"/>
|
||||
<el-table-column label="密炼来料数量" align="center" prop="sourceNum" v-if="columns[11].visible"/>
|
||||
<el-table-column label="库存数量" align="center" prop="storageNum" v-if="columns[12].visible"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:hppStorageDetail:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:hppStorageDetail:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改半成品库存对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="hppStorageDetailFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="主键" prop="objId">
|
||||
<el-input v-model="form.objId" placeholder="请输入主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流水卡号" prop="cardNo">
|
||||
<el-input v-model="form.cardNo" placeholder="请输入流水卡号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工装架子号" prop="shelfNo">
|
||||
<el-input v-model="form.shelfNo" placeholder="请输入工装架子号" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入库类型" prop="instockType">
|
||||
<el-select v-model="form.instockType" placeholder="请选择入库类型">
|
||||
<el-option
|
||||
v-for="dict in ${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="物料Id" prop="materialId">
|
||||
<el-input v-model="form.materialId" placeholder="请输入物料Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位id" prop="storePlaceId">
|
||||
<el-input v-model="form.storePlaceId" placeholder="请输入库位id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="密炼来料数量" prop="sourceNum">
|
||||
<el-input v-model="form.sourceNum" placeholder="请输入密炼来料数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库存数量" prop="storageNum">
|
||||
<el-input v-model="form.storageNum" placeholder="请输入库存数量" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="HppStorageDetail" lang="ts">
|
||||
import { listHppStorageDetail, getHppStorageDetail, delHppStorageDetail, addHppStorageDetail, updateHppStorageDetail } from '@/api/wms/hppStorageDetail';
|
||||
import { HppStorageDetailVO, HppStorageDetailQuery, HppStorageDetailForm } from '@/api/wms/hppStorageDetail/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { wms_halfproduct_instock_type } = toRefs<any>(proxy?.useDict('wms_halfproduct_instock_type'));
|
||||
const hppStorageDetailList = ref<HppStorageDetailVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const hppStorageDetailFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
// 列显隐信息
|
||||
const columns = ref<FieldOption[]>([
|
||||
{ key: 0, label: `主键`, visible: true },
|
||||
{ key: 1, label: `创建人`, visible: true },
|
||||
{ key: 2, label: `创建时间`, visible: true },
|
||||
{ key: 3, label: `更新人`, visible: true },
|
||||
{ key: 4, label: `更新时间`, visible: true },
|
||||
{ key: 5, label: `租户`, visible: true },
|
||||
{ key: 6, label: `流水卡号`, visible: true },
|
||||
{ key: 7, label: `工装架子号`, visible: true },
|
||||
{ key: 8, label: `入库类型`, visible: true },
|
||||
{ key: 9, label: `物料Id`, visible: true },
|
||||
{ key: 10, label: `库位id`, visible: true },
|
||||
{ key: 11, label: `密炼来料数量`, visible: true },
|
||||
{ key: 12, label: `库存数量`, visible: true },
|
||||
]);
|
||||
|
||||
const initFormData: HppStorageDetailForm = {
|
||||
objId: undefined,
|
||||
cardNo: undefined,
|
||||
shelfNo: undefined,
|
||||
instockType: undefined,
|
||||
materialId: undefined,
|
||||
storePlaceId: undefined,
|
||||
sourceNum: undefined,
|
||||
storageNum: undefined
|
||||
}
|
||||
const data = reactive<PageData<HppStorageDetailForm, HppStorageDetailQuery>>({
|
||||
form: {...initFormData},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
objId: undefined,
|
||||
cardNo: undefined,
|
||||
shelfNo: undefined,
|
||||
instockType: undefined,
|
||||
materialId: undefined,
|
||||
storePlaceId: undefined,
|
||||
sourceNum: undefined,
|
||||
storageNum: undefined,
|
||||
params: {
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
objId: [
|
||||
{ required: true, message: "主键不能为空", trigger: "blur" }
|
||||
],
|
||||
cardNo: [
|
||||
{ required: true, message: "流水卡号不能为空", trigger: "blur" }
|
||||
],
|
||||
shelfNo: [
|
||||
{ required: true, message: "工装架子号不能为空", trigger: "blur" }
|
||||
],
|
||||
instockType: [
|
||||
{ required: true, message: "入库类型不能为空", trigger: "change" }
|
||||
],
|
||||
materialId: [
|
||||
{ required: true, message: "物料Id不能为空", trigger: "blur" }
|
||||
],
|
||||
storePlaceId: [
|
||||
{ required: true, message: "库位id不能为空", trigger: "blur" }
|
||||
],
|
||||
sourceNum: [
|
||||
{ required: true, message: "密炼来料数量不能为空", trigger: "blur" }
|
||||
],
|
||||
storageNum: [
|
||||
{ required: true, message: "库存数量不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询半成品库存列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listHppStorageDetail(queryParams.value);
|
||||
hppStorageDetailList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = {...initFormData};
|
||||
hppStorageDetailFormRef.value?.resetFields();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: HppStorageDetailVO[]) => {
|
||||
ids.value = selection.map(item => item.objId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = "添加半成品库存";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: HppStorageDetailVO) => {
|
||||
reset();
|
||||
const _objId = row?.objId || ids.value[0]
|
||||
const res = await getHppStorageDetail(_objId);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = "修改半成品库存";
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
hppStorageDetailFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.objId) {
|
||||
await updateHppStorageDetail(form.value).finally(() => buttonLoading.value = false);
|
||||
} else {
|
||||
await addHppStorageDetail(form.value).finally(() => buttonLoading.value = false);
|
||||
}
|
||||
proxy?.$modal.msgSuccess("操作成功");
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: HppStorageDetailVO) => {
|
||||
const _objIds = row?.objId || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除半成品库存编号为"' + _objIds + '"的数据项?').finally(() => loading.value = false);
|
||||
await delHppStorageDetail(_objIds);
|
||||
proxy?.$modal.msgSuccess("删除成功");
|
||||
await getList();
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download('wms/hppStorageDetail/export', {
|
||||
...queryParams.value
|
||||
}, `hppStorageDetail_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
@ -0,0 +1,320 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="仓库名" prop="storeName">
|
||||
<el-input v-model="queryParams.storeName" placeholder="请输入仓库名" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库代码" prop="storeCode">
|
||||
<el-input v-model="queryParams.storeCode" placeholder="请输入仓库代码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库类型" prop="storeType">
|
||||
<el-select v-model="queryParams.storeType" placeholder="请选择仓库类型" clearable >
|
||||
<el-option v-for="dict in wms_store_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用状态" prop="usedFlag">
|
||||
<el-select v-model="queryParams.usedFlag" placeholder="请选择使用状态" clearable >
|
||||
<el-option v-for="dict in wms_halfproduct_used" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="sap代码" prop="sapCode">
|
||||
<el-input v-model="queryParams.sapCode" placeholder="请输入sap代码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库等级" prop="storeLevel">
|
||||
<el-input v-model="queryParams.storeLevel" placeholder="请输入仓库等级" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上级目录" prop="storeHigherLevel">
|
||||
<el-input v-model="queryParams.storeHigherLevel" placeholder="请输入上级目录" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:hppStore:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:hppStore:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:hppStore:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:hppStore:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" :columns="columns" :search="true" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="hppStoreList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="仓库名" align="center" prop="storeName" v-if="columns[6].visible"/>
|
||||
<el-table-column label="仓库代码" align="center" prop="storeCode" v-if="columns[7].visible"/>
|
||||
<el-table-column label="仓库类型" align="center" prop="storeType" v-if="columns[8].visible">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_store_type" :value="scope.row.storeType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用状态" align="center" prop="usedFlag" v-if="columns[9].visible">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_halfproduct_used" :value="scope.row.usedFlag"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="sap代码" align="center" prop="sapCode" v-if="columns[10].visible"/>
|
||||
<el-table-column label="仓库等级" align="center" prop="storeLevel" v-if="columns[11].visible"/>
|
||||
<el-table-column label="上级目录" align="center" prop="storeHigherLevel" v-if="columns[12].visible"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:hppStore:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:hppStore:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改【请填写功能名称】对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="hppStoreFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="仓库名" prop="storeName">
|
||||
<el-input v-model="form.storeName" placeholder="请输入仓库名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库代码" prop="storeCode">
|
||||
<el-input v-model="form.storeCode" placeholder="请输入仓库代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库类型" prop="storeType">
|
||||
<el-select v-model="form.storeType" placeholder="请选择仓库类型">
|
||||
<el-option
|
||||
v-for="dict in wms_store_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="sap代码" prop="sapCode">
|
||||
<el-input v-model="form.sapCode" placeholder="请输入sap代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库等级" prop="storeLevel">
|
||||
<el-input v-model="form.storeLevel" placeholder="请输入仓库等级" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上级目录" prop="storeHigherLevel">
|
||||
<el-input v-model="form.storeHigherLevel" placeholder="请输入上级目录" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="HppStore" lang="ts">
|
||||
import { listHppStore, getHppStore, delHppStore, addHppStore, updateHppStore } from '@/api/wms/hppStore';
|
||||
import { HppStoreVO, HppStoreQuery, HppStoreForm } from '@/api/wms/hppStore/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { wms_store_type, wms_halfproduct_used } = toRefs<any>(proxy?.useDict('wms_store_type','wms_halfproduct_used'));
|
||||
const hppStoreList = ref<HppStoreVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const hppStoreFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
// 列显隐信息
|
||||
const columns = ref<FieldOption[]>([
|
||||
{ key: 0, label: `创建人`, visible: true },
|
||||
{ key: 1, label: `创建时间`, visible: true },
|
||||
{ key: 2, label: `更新人`, visible: true },
|
||||
{ key: 3, label: `更新时间`, visible: true },
|
||||
{ key: 4, label: `租户`, visible: true },
|
||||
{ key: 5, label: `主键`, visible: true },
|
||||
{ key: 6, label: `仓库名`, visible: true },
|
||||
{ key: 7, label: `仓库代码`, visible: true },
|
||||
{ key: 8, label: `仓库类型`, visible: true },
|
||||
{ key: 9, label: `使用状态`, visible: true },
|
||||
{ key: 10, label: `sap代码`, visible: true },
|
||||
{ key: 11, label: `仓库等级`, visible: true },
|
||||
{ key: 12, label: `上级目录`, visible: true },
|
||||
{ key: 13, label: `创建部门`, visible: true },
|
||||
]);
|
||||
|
||||
const initFormData: HppStoreForm = {
|
||||
objId: undefined,
|
||||
storeName: undefined,
|
||||
storeCode: undefined,
|
||||
storeType: undefined,
|
||||
usedFlag: undefined,
|
||||
sapCode: undefined,
|
||||
storeLevel: undefined,
|
||||
storeHigherLevel: undefined,
|
||||
}
|
||||
const data = reactive<PageData<HppStoreForm, HppStoreQuery>>({
|
||||
form: {...initFormData},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
objId: undefined,
|
||||
storeName: undefined,
|
||||
storeCode: undefined,
|
||||
storeType: undefined,
|
||||
usedFlag: undefined,
|
||||
sapCode: undefined,
|
||||
storeLevel: undefined,
|
||||
storeHigherLevel: undefined,
|
||||
params: {
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
objId: [
|
||||
{ required: true, message: "主键不能为空", trigger: "blur" }
|
||||
],
|
||||
storeName: [
|
||||
{ required: true, message: "仓库名不能为空", trigger: "blur" }
|
||||
],
|
||||
storeCode: [
|
||||
{ required: true, message: "仓库代码不能为空", trigger: "blur" }
|
||||
],
|
||||
storeType: [
|
||||
{ required: true, message: "仓库类型不能为空", trigger: "change" }
|
||||
],
|
||||
usedFlag: [
|
||||
{ required: true, message: "使用状态不能为空", trigger: "blur" }
|
||||
],
|
||||
sapCode: [
|
||||
{ required: true, message: "sap代码不能为空", trigger: "blur" }
|
||||
],
|
||||
storeLevel: [
|
||||
{ required: true, message: "仓库等级不能为空", trigger: "blur" }
|
||||
],
|
||||
storeHigherLevel: [
|
||||
{ required: true, message: "上级目录不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询【请填写功能名称】列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listHppStore(queryParams.value);
|
||||
hppStoreList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = {...initFormData};
|
||||
hppStoreFormRef.value?.resetFields();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: HppStoreVO[]) => {
|
||||
ids.value = selection.map(item => item.createBy);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = "添加【请填写功能名称】";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: HppStoreVO) => {
|
||||
reset();
|
||||
const _createBy = row?.objId || ids.value[0]
|
||||
const res = await getHppStore(_createBy);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = "修改【请填写功能名称】";
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
hppStoreFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.objId) {
|
||||
await updateHppStore(form.value).finally(() => buttonLoading.value = false);
|
||||
} else {
|
||||
await addHppStore(form.value).finally(() => buttonLoading.value = false);
|
||||
}
|
||||
proxy?.$modal.msgSuccess("操作成功");
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: HppStoreVO) => {
|
||||
const _createBys = row?.objId || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + _createBys + '"的数据项?').finally(() => loading.value = false);
|
||||
await delHppStore(_createBys);
|
||||
proxy?.$modal.msgSuccess("删除成功");
|
||||
await getList();
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download('system/hppStore/export', {
|
||||
...queryParams.value
|
||||
}, `hppStore_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
@ -0,0 +1,312 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
|
||||
<el-form-item label="库位名" prop="storePlaceName">
|
||||
<el-input v-model="queryParams.storePlaceName" placeholder="请输入库位名" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位代码" prop="storePlaceCode">
|
||||
<el-input v-model="queryParams.storePlaceCode" placeholder="请输入库位代码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="特殊库位" prop="specitialType">
|
||||
<el-select v-model="queryParams.specitialType" placeholder="请选择特殊库位" clearable >
|
||||
<el-option v-for="dict in wms_specitial_location" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置类型" prop="positionType">
|
||||
<el-select v-model="queryParams.positionType" placeholder="请选择位置类型" clearable >
|
||||
<el-option v-for="dict in wms_position_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:hppStorePlace:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:hppStorePlace:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:hppStorePlace:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:hppStorePlace:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" :columns="columns" :search="true" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="hppStorePlaceList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="库位名" align="center" prop="storePlaceName" v-if="columns[6].visible"/>
|
||||
<el-table-column label="库位代码" align="center" prop="storePlaceCode" v-if="columns[7].visible"/>
|
||||
<el-table-column label="仓库id" align="center" prop="storeId" v-if="columns[8].visible"/>
|
||||
<el-table-column label="使用状态" align="center" prop="usedFlag" v-if="columns[9].visible">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_halfproduct_used" :value="scope.row.usedFlag"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="特殊库位" align="center" prop="specitialType" v-if="columns[10].visible">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_specitial_location" :value="scope.row.specitialType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="位置类型" align="center" prop="positionType" v-if="columns[11].visible">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_position_type" :value="scope.row.positionType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:hppStorePlace:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:hppStorePlace:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改半成品库位对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="hppStorePlaceFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="库位名" prop="storePlaceName">
|
||||
<el-input v-model="form.storePlaceName" placeholder="请输入库位名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位代码" prop="storePlaceCode">
|
||||
<el-input v-model="form.storePlaceCode" placeholder="请输入库位代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库id" prop="storeId">
|
||||
<el-input v-model="form.storeId" placeholder="请输入仓库id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="特殊库位" prop="specitialType">
|
||||
<el-select v-model="form.specitialType" placeholder="请选择特殊库位">
|
||||
<el-option
|
||||
v-for="dict in wms_specitial_location"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置类型" prop="positionType">
|
||||
<el-select v-model="form.positionType" placeholder="请选择位置类型">
|
||||
<el-option
|
||||
v-for="dict in wms_position_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="HppStorePlace" lang="ts">
|
||||
import { listHppStorePlace, getHppStorePlace, delHppStorePlace, addHppStorePlace, updateHppStorePlace } from '@/api/wms/hppStorePlace';
|
||||
import { HppStorePlaceVO, HppStorePlaceQuery, HppStorePlaceForm } from '@/api/wms/hppStorePlace/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { wms_specitial_location, wms_position_type, wms_halfproduct_used } = toRefs<any>(proxy?.useDict('wms_specitial_location','wms_position_type','wms_halfproduct_used'));
|
||||
const hppStorePlaceList = ref<HppStorePlaceVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const hppStorePlaceFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
// 列显隐信息
|
||||
const columns = ref<FieldOption[]>([
|
||||
{ key: 0, label: `主键id`, visible: true },
|
||||
{ key: 1, label: `创建人`, visible: true },
|
||||
{ key: 2, label: `创建时间`, visible: true },
|
||||
{ key: 3, label: `更新人`, visible: true },
|
||||
{ key: 4, label: `更新时间`, visible: true },
|
||||
{ key: 5, label: `租户`, visible: true },
|
||||
{ key: 6, label: `库位名`, visible: true },
|
||||
{ key: 7, label: `库位代码`, visible: true },
|
||||
{ key: 8, label: `仓库id`, visible: true },
|
||||
{ key: 9, label: `使用状态`, visible: true },
|
||||
{ key: 10, label: `特殊库位`, visible: true },
|
||||
{ key: 11, label: `位置类型`, visible: true },
|
||||
]);
|
||||
|
||||
const initFormData: HppStorePlaceForm = {
|
||||
objId: undefined,
|
||||
storePlaceName: undefined,
|
||||
storePlaceCode: undefined,
|
||||
storeId: undefined,
|
||||
usedFlag: undefined,
|
||||
specitialType: undefined,
|
||||
positionType: undefined
|
||||
}
|
||||
const data = reactive<PageData<HppStorePlaceForm, HppStorePlaceQuery>>({
|
||||
form: {...initFormData},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
objId: undefined,
|
||||
storePlaceName: undefined,
|
||||
storePlaceCode: undefined,
|
||||
storeId: undefined,
|
||||
usedFlag: undefined,
|
||||
specitialType: undefined,
|
||||
positionType: undefined,
|
||||
params: {
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
objId: [
|
||||
{ required: true, message: "主键id不能为空", trigger: "blur" }
|
||||
],
|
||||
storePlaceName: [
|
||||
{ required: true, message: "库位名不能为空", trigger: "blur" }
|
||||
],
|
||||
storePlaceCode: [
|
||||
{ required: true, message: "库位代码不能为空", trigger: "blur" }
|
||||
],
|
||||
storeId: [
|
||||
{ required: true, message: "仓库id不能为空", trigger: "blur" }
|
||||
],
|
||||
usedFlag: [
|
||||
{ required: true, message: "使用状态不能为空", trigger: "blur" }
|
||||
],
|
||||
specitialType: [
|
||||
{ required: true, message: "特殊库位不能为空", trigger: "change" }
|
||||
],
|
||||
positionType: [
|
||||
{ required: true, message: "位置类型不能为空", trigger: "change" }
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询半成品库位列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listHppStorePlace(queryParams.value);
|
||||
hppStorePlaceList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = {...initFormData};
|
||||
hppStorePlaceFormRef.value?.resetFields();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: HppStorePlaceVO[]) => {
|
||||
ids.value = selection.map(item => item.objId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = "添加半成品库位";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: HppStorePlaceVO) => {
|
||||
reset();
|
||||
const _objId = row?.objId || ids.value[0]
|
||||
const res = await getHppStorePlace(_objId);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = "修改半成品库位";
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
hppStorePlaceFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.objId) {
|
||||
await updateHppStorePlace(form.value).finally(() => buttonLoading.value = false);
|
||||
} else {
|
||||
await addHppStorePlace(form.value).finally(() => buttonLoading.value = false);
|
||||
}
|
||||
proxy?.$modal.msgSuccess("操作成功");
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: HppStorePlaceVO) => {
|
||||
const _objIds = row?.objId || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除半成品库位编号为"' + _objIds + '"的数据项?').finally(() => loading.value = false);
|
||||
await delHppStorePlace(_objIds);
|
||||
proxy?.$modal.msgSuccess("删除成功");
|
||||
await getList();
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download('system/hppStorePlace/export', {
|
||||
...queryParams.value
|
||||
}, `hppStorePlace_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
@ -0,0 +1,285 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="工装条码" prop="toolingBarcode">
|
||||
<el-input v-model="queryParams.toolingBarcode" placeholder="请输入工装条码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工装RFID条码" prop="toolingRfidBarcode" label-width="120px">
|
||||
<el-input v-model="queryParams.toolingRfidBarcode" placeholder="请输入工装RFID条码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工装类型" prop="toolingType">
|
||||
<el-select v-model="queryParams.toolingType" placeholder="请选择工装类型" clearable >
|
||||
<el-option v-for="dict in wms_tooling_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['wms:hsmTooling:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['wms:hsmTooling:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['wms:hsmTooling:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['wms:hsmTooling:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" :columns="columns" :search="true" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="hsmToolingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="创建人" align="center" prop="createdBy"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createdTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工装条码" align="center" prop="toolingBarcode"/>
|
||||
<el-table-column label="工装RFID条码" align="center" prop="toolingRfidBarcode"/>
|
||||
<el-table-column label="工装类型" align="center" prop="toolingType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_tooling_type" :value="scope.row.toolingType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否使用" align="center" prop="isUsed">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wms_halfproduct_used" :value="scope.row.isUsed"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:hsmTooling:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:hsmTooling:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改半成品工装对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="hsmToolingFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="工装条码" prop="toolingBarcode">
|
||||
<el-input v-model="form.toolingBarcode" placeholder="请输入工装条码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工装RFID条码" prop="toolingRfidBarcode">
|
||||
<el-input v-model="form.toolingRfidBarcode" placeholder="请输入工装RFID条码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工装类型" prop="toolingType">
|
||||
<el-select v-model="form.toolingType" placeholder="请选择工装类型">
|
||||
<el-option
|
||||
v-for="dict in wms_tooling_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="HsmTooling" lang="ts">
|
||||
import { listHsmTooling, getHsmTooling, delHsmTooling, addHsmTooling, updateHsmTooling } from '@/api/wms/hsmTooling';
|
||||
import { HsmToolingVO, HsmToolingQuery, HsmToolingForm } from '@/api/wms/hsmTooling/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { wms_tooling_type, wms_halfproduct_used } = toRefs<any>(proxy?.useDict('wms_tooling_type','wms_halfproduct_used'));
|
||||
const hsmToolingList = ref<HsmToolingVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const hsmToolingFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
// 列显隐信息
|
||||
const columns = ref<FieldOption[]>([
|
||||
// { key: 0, label: `${comment}`, visible: true },
|
||||
// { key: 1, label: `${comment}`, visible: true },
|
||||
// { key: 2, label: `${comment}`, visible: true },
|
||||
// { key: 3, label: `${comment}`, visible: true },
|
||||
// { key: 4, label: `${comment}`, visible: true },
|
||||
// { key: 5, label: `${comment}`, visible: true },
|
||||
// { key: 6, label: `${comment}`, visible: true },
|
||||
// { key: 7, label: `${comment}`, visible: true },
|
||||
// { key: 8, label: `${comment}`, visible: true },
|
||||
// { key: 9, label: `${comment}`, visible: true },
|
||||
]);
|
||||
|
||||
const initFormData: HsmToolingForm = {
|
||||
OBJID: undefined,
|
||||
createdBy: undefined,
|
||||
createdTime: undefined,
|
||||
updatedBy: undefined,
|
||||
updatedTime: undefined,
|
||||
toolingBarcode: undefined,
|
||||
tenantId: undefined,
|
||||
toolingRfidBarcode: undefined,
|
||||
toolingType: undefined,
|
||||
isUsed: undefined
|
||||
}
|
||||
const data = reactive<PageData<HsmToolingForm, HsmToolingQuery>>({
|
||||
form: {...initFormData},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
OBJID: undefined,
|
||||
createdBy: undefined,
|
||||
createdTime: undefined,
|
||||
updatedBy: undefined,
|
||||
updatedTime: undefined,
|
||||
toolingBarcode: undefined,
|
||||
tenantId: undefined,
|
||||
toolingRfidBarcode: undefined,
|
||||
toolingType: undefined,
|
||||
isUsed: undefined,
|
||||
params: {
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
toolingBarcode: [
|
||||
{ required: true, message: "工装条码不能为空", trigger: "blur" }
|
||||
],
|
||||
toolingRfidBarcode: [
|
||||
{ required: true, message: "工装RFID条码不能为空", trigger: "blur" }
|
||||
],
|
||||
toolingType: [
|
||||
{ required: true, message: "工装类型不能为空", trigger: "change" }
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询半成品工装列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listHsmTooling(queryParams.value);
|
||||
hsmToolingList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = {...initFormData};
|
||||
hsmToolingFormRef.value?.resetFields();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: HsmToolingVO[]) => {
|
||||
ids.value = selection.map(item => item.objId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = "添加半成品工装";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: HsmToolingVO) => {
|
||||
reset();
|
||||
const _OBJID = row?.objId || ids.value[0]
|
||||
const res = await getHsmTooling(_OBJID);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = "修改半成品工装";
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
hsmToolingFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.objId) {
|
||||
await updateHsmTooling(form.value).finally(() => buttonLoading.value = false);
|
||||
} else {
|
||||
await addHsmTooling(form.value).finally(() => buttonLoading.value = false);
|
||||
}
|
||||
proxy?.$modal.msgSuccess("操作成功");
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: HsmToolingVO) => {
|
||||
const _OBJIDs = row?.objId || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除半成品工装编号为"' + _OBJIDs + '"的数据项?').finally(() => loading.value = false);
|
||||
await delHsmTooling(_OBJIDs);
|
||||
proxy?.$modal.msgSuccess("删除成功");
|
||||
await getList();
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download('system/hsmTooling/export', {
|
||||
...queryParams.value
|
||||
}, `hsmTooling_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue