仓储新增成品功能页面

master
maxw@mesnac.com 3 months ago
parent c7b28c9bdc
commit d80812b6fb

@ -0,0 +1,77 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { PsmInLoadVO, PsmInLoadForm, PsmInLoadQuery } from '@/api/wms/psmInLoad/types';
/**
*
* @param query
* @returns {*}
*/
export const listPsmInLoad = (query?: PsmInLoadQuery): AxiosPromise<PsmInLoadVO[]> => {
return request({
url: '/wms/psmInLoad/list',
method: 'get',
params: query
});
};
/**
*
* @param inLoadId
*/
export const getPsmInLoad = (inLoadId: string | number): AxiosPromise<PsmInLoadVO> => {
return request({
url: '/wms/psmInLoad/' + inLoadId,
method: 'get'
});
};
/**
*
* @param data
*/
export const addPsmInLoad = (data: PsmInLoadForm) => {
return request({
url: '/wms/psmInLoad',
method: 'post',
data: data
});
};
/**
*
* @param data
*/
export const updatePsmInLoad = (data: PsmInLoadForm) => {
return request({
url: '/wms/psmInLoad',
method: 'put',
data: data
});
};
/**
*
* @param inLoadId
*/
export const delPsmInLoad = (inLoadId: string | number | Array<string | number>) => {
return request({
url: '/wms/psmInLoad/' + inLoadId,
method: 'delete'
});
};
/**
*
* @param query
* @returns {*}
*/
export function getWmsPsmInLoadList (query) {
return request({
url: '/wms/psmInLoad/getWmsPsmInLoadList',
method: 'get',
params: query
});
};

@ -0,0 +1,166 @@
export interface PsmInLoadVO {
/**
*
*/
inLoadId: string | number;
/**
*
*/
loadShift: number;
/**
*
*/
loadClass: number;
/**
*
*/
toolingBarcode: string;
/**
*
*/
storeName: string;
/**
*
*/
storePlaceCode: string;
/**
* ID
*/
materialId: string | number;
/**
*
*/
materialSpe: string;
/**
*
*/
checkGradeCode: string;
/**
*
*/
loadAmount: number;
}
export interface PsmInLoadForm extends BaseEntity {
/**
*
*/
inLoadId?: string | number;
/**
*
*/
loadShift?: number;
/**
*
*/
loadClass?: number;
/**
*
*/
toolingBarcode?: string;
/**
*
*/
storeName?: string;
/**
*
*/
storePlaceCode?: string;
/**
* ID
*/
materialId?: string | number;
/**
*
*/
materialSpe?: string;
/**
*
*/
checkGradeCode?: string;
/**
*
*/
loadAmount?: number;
}
export interface PsmInLoadQuery extends PageQuery {
/**
*
*/
inLoadId?: string | number;
/**
*
*/
loadShift?: number;
/**
*
*/
loadClass?: number;
/**
*
*/
toolingBarcode?: string;
/**
*
*/
storeName?: string;
/**
*
*/
storePlaceCode?: string;
/**
* ID
*/
materialId?: string | number;
/**
*
*/
materialSpe?: string;
/**
*
*/
checkGradeCode?: string;
/**
*
*/
loadAmount?: number;
/**
*
*/
params?: any;
}

@ -0,0 +1,77 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { PsmInLoadDetailVO, PsmInLoadDetailForm, PsmInLoadDetailQuery } from '@/api/wms/psmInLoadDetail/types';
/**
*
* @param query
* @returns {*}
*/
export const listPsmInLoadDetail = (query?: PsmInLoadDetailQuery): AxiosPromise<PsmInLoadDetailVO[]> => {
return request({
url: '/wms/psmInLoadDetail/list',
method: 'get',
params: query
});
};
/**
*
* @param objid
*/
export const getPsmInLoadDetail = (objid: string | number): AxiosPromise<PsmInLoadDetailVO> => {
return request({
url: '/wms/psmInLoadDetail/' + objid,
method: 'get'
});
};
/**
*
* @param data
*/
export const addPsmInLoadDetail = (data: PsmInLoadDetailForm) => {
return request({
url: '/wms/psmInLoadDetail',
method: 'post',
data: data
});
};
/**
*
* @param data
*/
export const updatePsmInLoadDetail = (data: PsmInLoadDetailForm) => {
return request({
url: '/wms/psmInLoadDetail',
method: 'put',
data: data
});
};
/**
*
* @param objid
*/
export const delPsmInLoadDetail = (objid: string | number | Array<string | number>) => {
return request({
url: '/wms/psmInLoadDetail/' + objid,
method: 'delete'
});
};
/**
*
* @param query
* @returns {*}
*/
export function getWmsPsmInLoadDetailList (query) {
return request({
url: '/wms/psmInLoadDetail/getWmsPsmInLoadDetailList',
method: 'get',
params: query
});
};

@ -0,0 +1,106 @@
export interface PsmInLoadDetailVO {
/**
*
*/
objid: string | number;
/**
*
*/
inLoadId: string | number;
/**
* ID
*/
materialId: string | number;
/**
*
*/
materialSpe: string;
/**
*
*/
tyreNo: string;
/**
*
*/
checkGradeCode: string;
}
export interface PsmInLoadDetailForm extends BaseEntity {
/**
*
*/
objid?: string | number;
/**
*
*/
inLoadId?: string | number;
/**
* ID
*/
materialId?: string | number;
/**
*
*/
materialSpe?: string;
/**
*
*/
tyreNo?: string;
/**
*
*/
checkGradeCode?: string;
}
export interface PsmInLoadDetailQuery extends PageQuery {
/**
*
*/
objid?: string | number;
/**
*
*/
inLoadId?: string | number;
/**
* ID
*/
materialId?: string | number;
/**
*
*/
materialSpe?: string;
/**
*
*/
tyreNo?: string;
/**
*
*/
checkGradeCode?: string;
/**
*
*/
params?: any;
}

@ -0,0 +1,77 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { PsmStorageVO, PsmStorageForm, PsmStorageQuery } from '@/api/wms/psmStorage/types';
/**
*
* @param query
* @returns {*}
*/
export const listPsmStorage = (query?: PsmStorageQuery): AxiosPromise<PsmStorageVO[]> => {
return request({
url: '/wms/psmStorage/list',
method: 'get',
params: query
});
};
/**
*
* @param objid
*/
export const getPsmStorage = (objid: string | number): AxiosPromise<PsmStorageVO> => {
return request({
url: '/wms/psmStorage/' + objid,
method: 'get'
});
};
/**
*
* @param data
*/
export const addPsmStorage = (data: PsmStorageForm) => {
return request({
url: '/wms/psmStorage',
method: 'post',
data: data
});
};
/**
*
* @param data
*/
export const updatePsmStorage = (data: PsmStorageForm) => {
return request({
url: '/wms/psmStorage',
method: 'put',
data: data
});
};
/**
*
* @param objid
*/
export const delPsmStorage = (objid: string | number | Array<string | number>) => {
return request({
url: '/wms/psmStorage/' + objid,
method: 'delete'
});
};
/**
*
* @param query
* @returns {*}
*/
export function getWmsPsmStorageList (query) {
return request({
url: '/wms/psmStorage/getWmsPsmStorageList',
method: 'get',
params: query
});
};

@ -0,0 +1,136 @@
export interface PsmStorageVO {
/**
*
*/
objid: string | number;
/**
* ID
*/
materialId: string | number;
/**
*
*/
materialSpe: string;
/**
*
*/
tyreNo: string;
/**
*
*/
checkGradeCode: string;
/**
*
*/
storeName: string;
/**
*
*/
storePlaceCode: string;
/**
*
*/
toolingBarcode: string;
}
export interface PsmStorageForm extends BaseEntity {
/**
*
*/
objid?: string | number;
/**
* ID
*/
materialId?: string | number;
/**
*
*/
materialSpe?: string;
/**
*
*/
tyreNo?: string;
/**
*
*/
checkGradeCode?: string;
/**
*
*/
storeName?: string;
/**
*
*/
storePlaceCode?: string;
/**
*
*/
toolingBarcode?: string;
}
export interface PsmStorageQuery extends PageQuery {
/**
*
*/
objid?: string | number;
/**
* ID
*/
materialId?: string | number;
/**
*
*/
materialSpe?: string;
/**
*
*/
tyreNo?: string;
/**
*
*/
checkGradeCode?: string;
/**
*
*/
storeName?: string;
/**
*
*/
storePlaceCode?: string;
/**
*
*/
toolingBarcode?: string;
/**
*
*/
params?: any;
}

@ -0,0 +1,77 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { PsmStoreVO, PsmStoreForm, PsmStoreQuery } from '@/api/wms/psmStore/types';
/**
*
* @param query
* @returns {*}
*/
export const listPsmStore = (query?: PsmStoreQuery): AxiosPromise<PsmStoreVO[]> => {
return request({
url: '/wms/psmStore/list',
method: 'get',
params: query
});
};
/**
*
* @param storeId
*/
export const getPsmStore = (storeId: string | number): AxiosPromise<PsmStoreVO> => {
return request({
url: '/wms/psmStore/' + storeId,
method: 'get'
});
};
/**
*
* @param data
*/
export const addPsmStore = (data: PsmStoreForm) => {
return request({
url: '/wms/psmStore',
method: 'post',
data: data
});
};
/**
*
* @param data
*/
export const updatePsmStore = (data: PsmStoreForm) => {
return request({
url: '/wms/psmStore',
method: 'put',
data: data
});
};
/**
*
* @param storeId
*/
export const delPsmStore = (storeId: string | number | Array<string | number>) => {
return request({
url: '/wms/psmStore/' + storeId,
method: 'delete'
});
};
/**
*
* @param query
* @returns {*}
*/
export function getWmsPsmStoreList (query) {
return request({
url: '/wms/psmStore/getWmsPsmStoreList',
method: 'get',
params: query
});
};

@ -0,0 +1,76 @@
export interface PsmStoreVO {
/**
*
*/
storeId: string | number;
/**
*
*/
storeName: string;
/**
*
*/
storeCode: string;
/**
*
*/
storeTypeId: string | number;
}
export interface PsmStoreForm extends BaseEntity {
/**
*
*/
storeId?: string | number;
/**
*
*/
storeName?: string;
/**
*
*/
storeCode?: string;
/**
*
*/
storeTypeId?: string | number;
}
export interface PsmStoreQuery extends PageQuery {
/**
*
*/
storeId?: string | number;
/**
*
*/
storeName?: string;
/**
*
*/
storeCode?: string;
/**
*
*/
storeTypeId?: string | number;
/**
*
*/
params?: any;
}

@ -0,0 +1,77 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { PsmStorePlaceVO, PsmStorePlaceForm, PsmStorePlaceQuery } from '@/api/wms/psmStorePlace/types';
/**
*
* @param query
* @returns {*}
*/
export const listPsmStorePlace = (query?: PsmStorePlaceQuery): AxiosPromise<PsmStorePlaceVO[]> => {
return request({
url: '/wms/psmStorePlace/list',
method: 'get',
params: query
});
};
/**
*
* @param storePlaceId
*/
export const getPsmStorePlace = (storePlaceId: string | number): AxiosPromise<PsmStorePlaceVO> => {
return request({
url: '/wms/psmStorePlace/' + storePlaceId,
method: 'get'
});
};
/**
*
* @param data
*/
export const addPsmStorePlace = (data: PsmStorePlaceForm) => {
return request({
url: '/wms/psmStorePlace',
method: 'post',
data: data
});
};
/**
*
* @param data
*/
export const updatePsmStorePlace = (data: PsmStorePlaceForm) => {
return request({
url: '/wms/psmStorePlace',
method: 'put',
data: data
});
};
/**
*
* @param storePlaceId
*/
export const delPsmStorePlace = (storePlaceId: string | number | Array<string | number>) => {
return request({
url: '/wms/psmStorePlace/' + storePlaceId,
method: 'delete'
});
};
/**
*
* @param query
* @returns {*}
*/
export function getWmsPsmStorePlaceList (query) {
return request({
url: '/wms/psmStorePlace/getWmsPsmStorePlaceList',
method: 'get',
params: query
});
};

@ -0,0 +1,91 @@
export interface PsmStorePlaceVO {
/**
*
*/
storePlaceId: string | number;
/**
*
*/
storePlaceCode: string;
/**
*
*/
storePlaceName: string;
/**
*
*/
storeId: string | number;
/**
* sap
*/
sapCode: string;
}
export interface PsmStorePlaceForm extends BaseEntity {
/**
*
*/
storePlaceId?: string | number;
/**
*
*/
storePlaceCode?: string;
/**
*
*/
storePlaceName?: string;
/**
*
*/
storeId?: string | number;
/**
* sap
*/
sapCode?: string;
}
export interface PsmStorePlaceQuery extends PageQuery {
/**
*
*/
storePlaceId?: string | number;
/**
*
*/
storePlaceCode?: string;
/**
*
*/
storePlaceName?: string;
/**
*
*/
storeId?: string | number;
/**
* sap
*/
sapCode?: string;
/**
*
*/
params?: any;
}

@ -117,6 +117,20 @@ export const constantRoutes: RouteRecordRaw[] = [
}
]
},
{
path: '/wms',
component: Layout,
redirect: '/index',
children: [
{
path: 'psmInLoadDetail',
component: () => import('@/views/wms/psmInLoadDetail/index.vue'),
name: 'psmInLoadDetail',
meta: { title: '装车架子明细', icon: 'dashboard' },
hidden: true
}
]
},
{
path: '/user',
component: Layout,

@ -0,0 +1,352 @@
<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="loadShift">
<el-input v-model="queryParams.loadShift" placeholder="请输入装车班次" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="装车班组" prop="loadClass">
<el-input v-model="queryParams.loadClass" placeholder="请输入装车班组" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="工装条码" prop="toolingBarcode">
<el-input v-model="queryParams.toolingBarcode" placeholder="请输入工装条码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<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="storePlaceCode">
<el-input v-model="queryParams.storePlaceCode" placeholder="请输入库位条码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="物料ID" prop="materialId">
<el-select v-model="form.materialId" placeholder="请选择物料">
<el-option
v-for="item in materialList"
:key="item.materialId"
:label="item.materialCode"
:value="item.materialId"
/>
</el-select>
</el-form-item>
<el-form-item label="品级编号" prop="checkGradeCode">
<el-input v-model="queryParams.checkGradeCode" 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:psmInLoad:add']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:psmInLoad:edit']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:psmInLoad:remove']"></el-button>
</el-col> -->
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:psmInLoad: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="psmInLoadList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="表主键" align="center" prop="inLoadId" v-if="columns[0].visible"/> -->
<el-table-column label="装车班次" align="center" prop="loadShift" v-if="columns[7].visible"/>
<el-table-column label="装车班组" align="center" prop="loadClass" v-if="columns[8].visible"/>
<el-table-column label="工装条码" align="center" prop="toolingBarcode" v-if="columns[9].visible"/>
<el-table-column label="仓库名称" align="center" prop="storeName" v-if="columns[10].visible"/>
<el-table-column label="库位条码" align="center" prop="storePlaceCode" v-if="columns[11].visible"/>
<el-table-column label="物料" align="center" prop="materialCode" v-if="columns[12].visible"/>
<el-table-column label="轮胎规格" align="center" prop="materialSpe" v-if="columns[13].visible"/>
<el-table-column label="品级编号" align="center" prop="checkGradeCode" v-if="columns[14].visible"/>
<el-table-column label="装载数量" align="center" prop="loadAmount" v-if="columns[15].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:psmInLoad:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:psmInLoad:remove']"></el-button>
</el-tooltip> -->
<el-tooltip content="详情" placement="top">
<el-button link type="primary" icon="Star" @click="HandleInfo(scope.row)"></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="psmInLoadFormRef" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="表主键" prop="inLoadId">
<el-input v-model="form.inLoadId" placeholder="请输入表主键" />
</el-form-item> -->
<el-form-item label="装车班次" prop="loadShift">
<el-input v-model="form.loadShift" placeholder="请输入装车班次" />
</el-form-item>
<el-form-item label="装车班组" prop="loadClass">
<el-input v-model="form.loadClass" placeholder="请输入装车班组" />
</el-form-item>
<el-form-item label="工装条码" prop="toolingBarcode">
<el-input v-model="form.toolingBarcode" placeholder="请输入工装条码" />
</el-form-item>
<el-form-item label="仓库名称" prop="storeName">
<el-input v-model="form.storeName" placeholder="请输入仓库名称" />
</el-form-item>
<el-form-item label="库位条码" prop="storePlaceCode">
<el-input v-model="form.storePlaceCode" placeholder="请输入库位条码" />
</el-form-item>
<el-form-item label="物料" prop="materialCode">
<el-input v-model="form.materialId" placeholder="请输入物料ID" />
</el-form-item>
<el-form-item label="轮胎规格" prop="materialSpe">
<el-input v-model="form.materialSpe" placeholder="请输入轮胎规格" />
</el-form-item>
<el-form-item label="品级编号" prop="checkGradeCode">
<el-input v-model="form.checkGradeCode" placeholder="请输入品级编号" />
</el-form-item>
<el-form-item label="装载数量" prop="loadAmount">
<el-input v-model="form.loadAmount" 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="PsmInLoad" lang="ts">
import { listPsmInLoad, getPsmInLoad, delPsmInLoad, addPsmInLoad, updatePsmInLoad } from '@/api/wms/psmInLoad';
import { PsmInLoadVO, PsmInLoadQuery, PsmInLoadForm } from '@/api/wms/psmInLoad/types';
import { getMaterialListVo } from '@/api/wms/instockDetail';
import { useRouter } from 'vue-router';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
let router = useRouter();
const psmInLoadList = ref<PsmInLoadVO[]>([]);
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 psmInLoadFormRef = ref<ElFormInstance>();
const materialList = ref([]);
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: `仓库名称`, visible: true },
{ key: 11, label: `库位条码`, visible: true },
{ key: 12, label: `物料ID`, visible: true },
{ key: 13, label: `轮胎规格`, visible: true },
{ key: 14, label: `品级编号`, visible: true },
{ key: 15, label: `装载数量`, visible: true },
]);
const initFormData: PsmInLoadForm = {
inLoadId: undefined,
loadShift: undefined,
loadClass: undefined,
toolingBarcode: undefined,
storeName: undefined,
storePlaceCode: undefined,
materialId: undefined,
materialSpe: undefined,
checkGradeCode: undefined,
loadAmount: undefined
}
const data = reactive<PageData<PsmInLoadForm, PsmInLoadQuery>>({
form: {...initFormData},
queryParams: {
pageNum: 1,
pageSize: 10,
inLoadId: undefined,
loadShift: undefined,
loadClass: undefined,
toolingBarcode: undefined,
storeName: undefined,
storePlaceCode: undefined,
materialId: undefined,
materialSpe: undefined,
checkGradeCode: undefined,
loadAmount: undefined,
params: {
}
},
rules: {
inLoadId: [
{ required: true, message: "表主键不能为空", trigger: "blur" }
],
loadShift: [
{ required: true, message: "装车班次不能为空", trigger: "blur" }
],
loadClass: [
{ required: true, message: "装车班组不能为空", trigger: "blur" }
],
toolingBarcode: [
{ required: true, message: "工装条码不能为空", trigger: "blur" }
],
storeName: [
{ required: true, message: "仓库名称不能为空", trigger: "blur" }
],
storePlaceCode: [
{ required: true, message: "库位条码不能为空", trigger: "blur" }
],
materialId: [
{ required: true, message: "物料ID不能为空", trigger: "blur" }
],
materialSpe: [
{ required: true, message: "轮胎规格不能为空", trigger: "blur" }
],
checkGradeCode: [
{ required: true, message: "品级编号不能为空", trigger: "blur" }
],
loadAmount: [
{ required: true, message: "装载数量不能为空", trigger: "blur" }
]
}
});
const { queryParams, form, rules } = toRefs(data);
const getMaterialList = async () => {
const res = await getMaterialListVo(null);
console.log(res.data);
materialList.value = res.data;
}
/** 查询装车架子信息列表 */
const getList = async () => {
loading.value = true;
const res = await listPsmInLoad(queryParams.value);
psmInLoadList.value = res.rows;
total.value = res.total;
loading.value = false;
}
const HandleInfo = async (row?: PsmInLoadVO) => {
const inLoadId = row?.inLoadId;
// const materialCategories = row?.materialCategories;
// const outstockCode = row?.outstockCode;
router.push({
path: '/wms/psmInLoadDetail',query: {'inLoadId': inLoadId}
});
}
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
}
/** 表单重置 */
const reset = () => {
form.value = {...initFormData};
psmInLoadFormRef.value?.resetFields();
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
}
/** 多选框选中数据 */
const handleSelectionChange = (selection: PsmInLoadVO[]) => {
ids.value = selection.map(item => item.inLoadId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
const handleAdd = () => {
reset();
dialog.visible = true;
dialog.title = "添加装车架子信息";
}
/** 修改按钮操作 */
const handleUpdate = async (row?: PsmInLoadVO) => {
reset();
const _inLoadId = row?.inLoadId || ids.value[0]
const res = await getPsmInLoad(_inLoadId);
Object.assign(form.value, res.data);
dialog.visible = true;
dialog.title = "修改装车架子信息";
}
/** 提交按钮 */
const submitForm = () => {
psmInLoadFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.inLoadId) {
await updatePsmInLoad(form.value).finally(() => buttonLoading.value = false);
} else {
await addPsmInLoad(form.value).finally(() => buttonLoading.value = false);
}
proxy?.$modal.msgSuccess("操作成功");
dialog.visible = false;
await getList();
}
});
}
/** 删除按钮操作 */
const handleDelete = async (row?: PsmInLoadVO) => {
const _inLoadIds = row?.inLoadId || ids.value;
await proxy?.$modal.confirm('是否确认删除装车架子信息编号为"' + _inLoadIds + '"的数据项?').finally(() => loading.value = false);
await delPsmInLoad(_inLoadIds);
proxy?.$modal.msgSuccess("删除成功");
await getList();
}
/** 导出按钮操作 */
const handleExport = () => {
proxy?.download('wms/psmInLoad/export', {
...queryParams.value
}, `psmInLoad_${new Date().getTime()}.xlsx`)
}
onMounted(() => {
getMaterialList();
getList();
});
</script>

@ -0,0 +1,278 @@
<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="materialSpe">
<el-input v-model="queryParams.materialSpe" placeholder="请输入轮胎规格" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="硫化条码" prop="tyreNo">
<el-input v-model="queryParams.tyreNo" placeholder="请输入硫化条码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="品级编号" prop="checkGradeCode">
<el-input v-model="queryParams.checkGradeCode" 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:psmInLoadDetail:add']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:psmInLoadDetail:edit']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:psmInLoadDetail:remove']"></el-button>
</el-col> -->
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:psmInLoadDetail: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="psmInLoadDetailList" @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="inLoadId" v-if="columns[7].visible"/> -->
<!-- <el-table-column label="物料ID" align="center" prop="materialId" v-if="columns[8].visible"/> -->
<el-table-column label="轮胎规格" align="center" prop="materialSpe" v-if="columns[9].visible"/>
<el-table-column label="硫化条码" align="center" prop="tyreNo" v-if="columns[10].visible"/>
<el-table-column label="品级编号" align="center" prop="checkGradeCode" 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:psmInLoadDetail:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:psmInLoadDetail: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="psmInLoadDetailFormRef" :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="inLoadId">
<el-input v-model="form.inLoadId" placeholder="请输入外键" />
</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="轮胎规格" prop="materialSpe">
<el-input v-model="form.materialSpe" placeholder="请输入轮胎规格" />
</el-form-item>
<el-form-item label="硫化条码" prop="tyreNo">
<el-input v-model="form.tyreNo" placeholder="请输入硫化条码" />
</el-form-item>
<el-form-item label="品级编号" prop="checkGradeCode">
<el-input v-model="form.checkGradeCode" 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="PsmInLoadDetail" lang="ts">
import { listPsmInLoadDetail, getPsmInLoadDetail, delPsmInLoadDetail, addPsmInLoadDetail, updatePsmInLoadDetail } from '@/api/wms/psmInLoadDetail';
import { PsmInLoadDetailVO, PsmInLoadDetailQuery, PsmInLoadDetailForm } from '@/api/wms/psmInLoadDetail/types';
import { useRoute } from 'vue-router';
const router = useRoute();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const psmInLoadDetailList = ref<PsmInLoadDetailVO[]>([]);
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 psmInLoadDetailFormRef = 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: `物料ID`, visible: true },
{ key: 9, label: `轮胎规格`, visible: true },
{ key: 10, label: `硫化条码`, visible: true },
{ key: 11, label: `品级编号`, visible: true },
]);
const initFormData: PsmInLoadDetailForm = {
objid: undefined,
inLoadId: undefined,
materialId: undefined,
materialSpe: undefined,
tyreNo: undefined,
checkGradeCode: undefined
}
const data = reactive<PageData<PsmInLoadDetailForm, PsmInLoadDetailQuery>>({
form: {...initFormData},
queryParams: {
pageNum: 1,
pageSize: 10,
objid: undefined,
inLoadId: undefined,
materialId: undefined,
materialSpe: undefined,
tyreNo: undefined,
checkGradeCode: undefined,
params: {
}
},
rules: {
objid: [
{ required: true, message: "表主键不能为空", trigger: "blur" }
],
inLoadId: [
{ required: true, message: "外键不能为空", trigger: "blur" }
],
materialId: [
{ required: true, message: "物料ID不能为空", trigger: "blur" }
],
materialSpe: [
{ required: true, message: "轮胎规格不能为空", trigger: "blur" }
],
tyreNo: [
{ required: true, message: "硫化条码不能为空", trigger: "blur" }
],
checkGradeCode: [
{ required: true, message: "品级编号不能为空", trigger: "blur" }
]
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询装车架子详细信息列表 */
const getList = async () => {
queryParams.value.inLoadId = router.query.inLoadId;
loading.value = true;
const res = await listPsmInLoadDetail(queryParams.value);
psmInLoadDetailList.value = res.rows;
total.value = res.total;
loading.value = false;
}
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
}
/** 表单重置 */
const reset = () => {
form.value = {...initFormData};
psmInLoadDetailFormRef.value?.resetFields();
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
}
/** 多选框选中数据 */
const handleSelectionChange = (selection: PsmInLoadDetailVO[]) => {
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?: PsmInLoadDetailVO) => {
reset();
const _objid = row?.objid || ids.value[0]
const res = await getPsmInLoadDetail(_objid);
Object.assign(form.value, res.data);
dialog.visible = true;
dialog.title = "修改装车架子详细信息";
}
/** 提交按钮 */
const submitForm = () => {
psmInLoadDetailFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.objid) {
await updatePsmInLoadDetail(form.value).finally(() => buttonLoading.value = false);
} else {
await addPsmInLoadDetail(form.value).finally(() => buttonLoading.value = false);
}
proxy?.$modal.msgSuccess("操作成功");
dialog.visible = false;
await getList();
}
});
}
/** 删除按钮操作 */
const handleDelete = async (row?: PsmInLoadDetailVO) => {
const _objids = row?.objid || ids.value;
await proxy?.$modal.confirm('是否确认删除装车架子详细信息编号为"' + _objids + '"的数据项?').finally(() => loading.value = false);
await delPsmInLoadDetail(_objids);
proxy?.$modal.msgSuccess("删除成功");
await getList();
}
/** 导出按钮操作 */
const handleExport = () => {
proxy?.download('wms/psmInLoadDetail/export', {
...queryParams.value
}, `psmInLoadDetail_${new Date().getTime()}.xlsx`)
}
onMounted(() => {
getList();
});
</script>

@ -0,0 +1,318 @@
<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="materialId">
<el-select v-model="form.materialId" placeholder="请选择物料">
<el-option
v-for="item in materialList"
:key="item.materialId"
:label="item.materialCode"
:value="item.materialId"
/>
</el-select>
</el-form-item>
<el-form-item label="硫化条码" prop="tyreNo">
<el-input v-model="queryParams.tyreNo" placeholder="请输入硫化条码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="品级编号" prop="checkGradeCode">
<el-input v-model="queryParams.checkGradeCode" placeholder="请输入品级编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<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="storePlaceCode">
<el-input v-model="queryParams.storePlaceCode" placeholder="请输入库位条码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="工装条码" prop="toolingBarcode">
<el-input v-model="queryParams.toolingBarcode" 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:psmStorage:add']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:psmStorage:edit']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:psmStorage:remove']"></el-button>
</el-col> -->
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:psmStorage: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="psmStorageList" @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="materialCode" v-if="columns[7].visible"/>
<el-table-column label="轮胎规格" align="center" prop="materialSpe" v-if="columns[8].visible"/>
<el-table-column label="硫化条码" align="center" prop="tyreNo" v-if="columns[9].visible"/>
<el-table-column label="品级编号" align="center" prop="checkGradeCode" v-if="columns[10].visible"/>
<el-table-column label="仓库名称" align="center" prop="storeName" v-if="columns[11].visible"/>
<el-table-column label="库位条码" align="center" prop="storePlaceCode" v-if="columns[12].visible"/>
<el-table-column label="工装条码" align="center" prop="toolingBarcode" v-if="columns[13].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:psmStorage:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:psmStorage: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="psmStorageFormRef" :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="物料ID" prop="materialId">
<el-input v-model="form.materialId" placeholder="请输入物料ID" />
</el-form-item>
<el-form-item label="轮胎规格" prop="materialSpe">
<el-input v-model="form.materialSpe" placeholder="请输入轮胎规格" />
</el-form-item>
<el-form-item label="硫化条码" prop="tyreNo">
<el-input v-model="form.tyreNo" placeholder="请输入硫化条码" />
</el-form-item>
<el-form-item label="品级编号" prop="checkGradeCode">
<el-input v-model="form.checkGradeCode" placeholder="请输入品级编号" />
</el-form-item>
<el-form-item label="仓库名称" prop="storeName">
<el-input v-model="form.storeName" placeholder="请输入仓库名称" />
</el-form-item>
<el-form-item label="库位条码" prop="storePlaceCode">
<el-input v-model="form.storePlaceCode" placeholder="请输入库位条码" />
</el-form-item>
<el-form-item label="工装条码" prop="toolingBarcode">
<el-input v-model="form.toolingBarcode" 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="PsmStorage" lang="ts">
import { listPsmStorage, getPsmStorage, delPsmStorage, addPsmStorage, updatePsmStorage } from '@/api/wms/psmStorage';
import { PsmStorageVO, PsmStorageQuery, PsmStorageForm } from '@/api/wms/psmStorage/types';
import { getMaterialListVo } from '@/api/wms/instockDetail';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const psmStorageList = ref<PsmStorageVO[]>([]);
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 materialList = ref([]);
const queryFormRef = ref<ElFormInstance>();
const psmStorageFormRef = 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: `物料ID`, visible: true },
{ key: 8, label: `轮胎规格`, visible: true },
{ key: 9, label: `硫化条码`, visible: true },
{ key: 10, label: `品级编号`, visible: true },
{ key: 11, label: `仓库名称`, visible: true },
{ key: 12, label: `库位条码`, visible: true },
{ key: 13, label: `工装条码`, visible: true },
]);
const initFormData: PsmStorageForm = {
objid: undefined,
materialId: undefined,
materialSpe: undefined,
tyreNo: undefined,
checkGradeCode: undefined,
storeName: undefined,
storePlaceCode: undefined,
toolingBarcode: undefined
}
const data = reactive<PageData<PsmStorageForm, PsmStorageQuery>>({
form: {...initFormData},
queryParams: {
pageNum: 1,
pageSize: 10,
objid: undefined,
materialId: undefined,
materialSpe: undefined,
tyreNo: undefined,
checkGradeCode: undefined,
storeName: undefined,
storePlaceCode: undefined,
toolingBarcode: undefined,
params: {
}
},
rules: {
objid: [
{ required: true, message: "表主键不能为空", trigger: "blur" }
],
materialId: [
{ required: true, message: "物料ID不能为空", trigger: "blur" }
],
materialSpe: [
{ required: true, message: "轮胎规格不能为空", trigger: "blur" }
],
tyreNo: [
{ required: true, message: "硫化条码不能为空", trigger: "blur" }
],
checkGradeCode: [
{ required: true, message: "品级编号不能为空", trigger: "blur" }
],
storeName: [
{ required: true, message: "仓库名称不能为空", trigger: "blur" }
],
storePlaceCode: [
{ required: true, message: "库位条码不能为空", trigger: "blur" }
],
toolingBarcode: [
{ required: true, message: "工装条码不能为空", trigger: "blur" }
]
}
});
const { queryParams, form, rules } = toRefs(data);
const getMaterialList = async () => {
const res = await getMaterialListVo(null);
console.log(res.data);
materialList.value = res.data;
}
/** 查询成品库存列表 */
const getList = async () => {
loading.value = true;
const res = await listPsmStorage(queryParams.value);
psmStorageList.value = res.rows;
total.value = res.total;
loading.value = false;
}
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
}
/** 表单重置 */
const reset = () => {
form.value = {...initFormData};
psmStorageFormRef.value?.resetFields();
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
}
/** 多选框选中数据 */
const handleSelectionChange = (selection: PsmStorageVO[]) => {
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?: PsmStorageVO) => {
reset();
const _objid = row?.objid || ids.value[0]
const res = await getPsmStorage(_objid);
Object.assign(form.value, res.data);
dialog.visible = true;
dialog.title = "修改成品库存";
}
/** 提交按钮 */
const submitForm = () => {
psmStorageFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.objid) {
await updatePsmStorage(form.value).finally(() => buttonLoading.value = false);
} else {
await addPsmStorage(form.value).finally(() => buttonLoading.value = false);
}
proxy?.$modal.msgSuccess("操作成功");
dialog.visible = false;
await getList();
}
});
}
/** 删除按钮操作 */
const handleDelete = async (row?: PsmStorageVO) => {
const _objids = row?.objid || ids.value;
await proxy?.$modal.confirm('是否确认删除成品库存编号为"' + _objids + '"的数据项?').finally(() => loading.value = false);
await delPsmStorage(_objids);
proxy?.$modal.msgSuccess("删除成功");
await getList();
}
/** 导出按钮操作 */
const handleExport = () => {
proxy?.download('system/psmStorage/export', {
...queryParams.value
}, `psmStorage_${new Date().getTime()}.xlsx`)
}
onMounted(() => {
getMaterialList();
getList();
});
</script>

@ -0,0 +1,272 @@
<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="storeTypeId">
<el-select v-model="queryParams.storeTypeId" placeholder="请选择仓库类型">
<el-option
v-for="item in storeTypeList"
:key="item.storeTypeId"
:label="item.storeTypeCode"
:value="item.storeTypeId"
/>
</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:psmStore:add']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:psmStore:edit']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:psmStore:remove']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:psmStore: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="psmStoreList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="仓库名称" align="center" prop="storeName" v-if="columns[7].visible"/>
<el-table-column label="仓库编码" align="center" prop="storeCode" v-if="columns[8].visible"/>
<el-table-column label="仓库类型" align="center" prop="storeTypeCode" v-if="columns[9].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:psmStore:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:psmStore: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="psmStoreFormRef" :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="storeTypeId">
<el-select v-model="form.storeTypeId" placeholder="请选择仓库类型">
<el-option
v-for="item in storeTypeList"
:key="item.storeTypeId"
:label="item.storeTypeCode"
:value="item.storeTypeId"
/>
</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="PsmStore" lang="ts">
import { listPsmStore, getPsmStore, delPsmStore, addPsmStore, updatePsmStore } from '@/api/wms/psmStore';
import { PsmStoreVO, PsmStoreQuery, PsmStoreForm } from '@/api/wms/psmStore/types';
import { getWmsPsmStoreTypeList } from '@/api/wms/psmStoreType';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const psmStoreList = ref<PsmStoreVO[]>([]);
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);
let storeTypeList = ref([]);
const queryFormRef = ref<ElFormInstance>();
const psmStoreFormRef = 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 },
]);
const initFormData: PsmStoreForm = {
storeId: undefined,
storeName: undefined,
storeCode: undefined,
storeTypeId: undefined
}
const data = reactive<PageData<PsmStoreForm, PsmStoreQuery>>({
form: {...initFormData},
queryParams: {
pageNum: 1,
pageSize: 10,
storeId: undefined,
storeName: undefined,
storeCode: undefined,
storeTypeId: undefined,
params: {
}
},
rules: {
storeId: [
{ required: true, message: "表主键不能为空", trigger: "blur" }
],
storeName: [
{ required: true, message: "仓库名称不能为空", trigger: "blur" }
],
storeCode: [
{ required: true, message: "仓库编码不能为空", trigger: "blur" }
],
storeTypeId: [
{ required: true, message: "仓库类型不能为空", trigger: "blur" }
]
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询成品仓库管理列表 */
const getList = async () => {
loading.value = true;
const res = await listPsmStore(queryParams.value);
psmStoreList.value = res.rows;
total.value = res.total;
loading.value = false;
}
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
}
/** 获取成品仓库类型下拉框 */
const getStoreTypeList = async () => {
let res = await getWmsPsmStoreTypeList(null);
storeTypeList.value = res.data;
}
/** 表单重置 */
const reset = () => {
form.value = {...initFormData};
psmStoreFormRef.value?.resetFields();
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
}
/** 多选框选中数据 */
const handleSelectionChange = (selection: PsmStoreVO[]) => {
ids.value = selection.map(item => item.storeId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
const handleAdd = () => {
reset();
dialog.visible = true;
dialog.title = "添加成品仓库管理";
}
/** 修改按钮操作 */
const handleUpdate = async (row?: PsmStoreVO) => {
reset();
const _storeId = row?.storeId || ids.value[0]
const res = await getPsmStore(_storeId);
Object.assign(form.value, res.data);
dialog.visible = true;
dialog.title = "修改成品仓库管理";
}
/** 提交按钮 */
const submitForm = () => {
psmStoreFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.storeId) {
await updatePsmStore(form.value).finally(() => buttonLoading.value = false);
} else {
await addPsmStore(form.value).finally(() => buttonLoading.value = false);
}
proxy?.$modal.msgSuccess("操作成功");
dialog.visible = false;
await getList();
}
});
}
/** 删除按钮操作 */
const handleDelete = async (row?: PsmStoreVO) => {
const _storeIds = row?.storeId || ids.value;
await proxy?.$modal.confirm('是否确认删除成品仓库管理编号为"' + _storeIds + '"的数据项?').finally(() => loading.value = false);
await delPsmStore(_storeIds);
proxy?.$modal.msgSuccess("删除成功");
await getList();
}
/** 导出按钮操作 */
const handleExport = () => {
proxy?.download('wms/psmStore/export', {
...queryParams.value
}, `psmStore_${new Date().getTime()}.xlsx`)
}
onMounted(() => {
getStoreTypeList();
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="storePlaceCode">
<el-input v-model="queryParams.storePlaceCode" placeholder="请输入库位编码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<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="storeId">
<el-select v-model="queryParams.storeId" placeholder="请选择仓库">
<el-option
v-for="item in storeList"
:key="item.storeId"
:label="item.storeCode"
:value="item.storeId"
/>
</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>
<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:psmStorePlace:add']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:psmStorePlace:edit']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:psmStorePlace:remove']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:psmStorePlace: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="psmStorePlaceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="表主键" align="center" prop="storePlaceId" v-if="columns[0].visible"/> -->
<el-table-column label="库位编码" align="center" prop="storePlaceCode" v-if="columns[7].visible"/>
<el-table-column label="库位名称" align="center" prop="storePlaceName" v-if="columns[8].visible"/>
<el-table-column label="所属仓库" align="center" prop="storeId" v-if="columns[9].visible"/>
<el-table-column label="sap库区代码" align="center" prop="sapCode" v-if="columns[10].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:psmStorePlace:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:psmStorePlace: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="psmStorePlaceFormRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="库位编码" prop="storePlaceCode">
<el-input v-model="form.storePlaceCode" placeholder="请输入库位编码" />
</el-form-item>
<el-form-item label="库位名称" prop="storePlaceName">
<el-input v-model="form.storePlaceName" placeholder="请输入库位名称" />
</el-form-item>
<el-form-item label="所属仓库" prop="storeId">
<el-select v-model="form.storeId" placeholder="请选择仓库">
<el-option
v-for="item in storeList"
:key="item.storeId"
:label="item.storeCode"
:value="item.storeId"
/>
</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>
<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="PsmStorePlace" lang="ts">
import { listPsmStorePlace, getPsmStorePlace, delPsmStorePlace, addPsmStorePlace, updatePsmStorePlace } from '@/api/wms/psmStorePlace';
import { PsmStorePlaceVO, PsmStorePlaceQuery, PsmStorePlaceForm } from '@/api/wms/psmStorePlace/types';
import { getWmsPsmStoreList } from '@/api/wms/psmStore';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const psmStorePlaceList = ref<PsmStorePlaceVO[]>([]);
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);
let storeList = ref([]);
const queryFormRef = ref<ElFormInstance>();
const psmStorePlaceFormRef = 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 },
]);
const initFormData: PsmStorePlaceForm = {
storePlaceId: undefined,
storePlaceCode: undefined,
storePlaceName: undefined,
storeId: undefined,
sapCode: undefined
}
const data = reactive<PageData<PsmStorePlaceForm, PsmStorePlaceQuery>>({
form: {...initFormData},
queryParams: {
pageNum: 1,
pageSize: 10,
storePlaceId: undefined,
storePlaceCode: undefined,
storePlaceName: undefined,
storeId: undefined,
sapCode: undefined,
params: {
}
},
rules: {
storePlaceId: [
{ required: true, message: "表主键不能为空", trigger: "blur" }
],
storePlaceCode: [
{ required: true, message: "库位编码不能为空", trigger: "blur" }
],
storePlaceName: [
{ required: true, message: "库位名称不能为空", trigger: "blur" }
],
storeId: [
{ required: true, message: "所属仓库不能为空", trigger: "blur" }
],
sapCode: [
{ required: true, message: "sap库区代码不能为空", trigger: "blur" }
]
}
});
const { queryParams, form, rules } = toRefs(data);
const getStoreList = async () => {
let res = await getWmsPsmStoreList(null);
storeList.value = res.data;
}
/** 查询成品库位管理列表 */
const getList = async () => {
loading.value = true;
const res = await listPsmStorePlace(queryParams.value);
psmStorePlaceList.value = res.rows;
total.value = res.total;
loading.value = false;
}
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
}
/** 表单重置 */
const reset = () => {
form.value = {...initFormData};
psmStorePlaceFormRef.value?.resetFields();
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
}
/** 多选框选中数据 */
const handleSelectionChange = (selection: PsmStorePlaceVO[]) => {
ids.value = selection.map(item => item.storePlaceId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
const handleAdd = () => {
reset();
dialog.visible = true;
dialog.title = "添加成品库位管理";
}
/** 修改按钮操作 */
const handleUpdate = async (row?: PsmStorePlaceVO) => {
reset();
const _storePlaceId = row?.storePlaceId || ids.value[0]
const res = await getPsmStorePlace(_storePlaceId);
Object.assign(form.value, res.data);
dialog.visible = true;
dialog.title = "修改成品库位管理";
}
/** 提交按钮 */
const submitForm = () => {
psmStorePlaceFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.storePlaceId) {
await updatePsmStorePlace(form.value).finally(() => buttonLoading.value = false);
} else {
await addPsmStorePlace(form.value).finally(() => buttonLoading.value = false);
}
proxy?.$modal.msgSuccess("操作成功");
dialog.visible = false;
await getList();
}
});
}
/** 删除按钮操作 */
const handleDelete = async (row?: PsmStorePlaceVO) => {
const _storePlaceIds = row?.storePlaceId || ids.value;
await proxy?.$modal.confirm('是否确认删除成品库位管理编号为"' + _storePlaceIds + '"的数据项?').finally(() => loading.value = false);
await delPsmStorePlace(_storePlaceIds);
proxy?.$modal.msgSuccess("删除成功");
await getList();
}
/** 导出按钮操作 */
const handleExport = () => {
proxy?.download('wms/psmStorePlace/export', {
...queryParams.value
}, `psmStorePlace_${new Date().getTime()}.xlsx`)
}
onMounted(() => {
getStoreList();
getList();
});
</script>
Loading…
Cancel
Save