原材料入库
This commit is contained in:
@@ -22,7 +22,7 @@ export const columns: BasicColumn[] = [
|
||||
{ title: '物料描述', align: 'center', width: 180, ellipsis: true, dataIndex: 'materialDesc' },
|
||||
{ title: '物料别名', align: 'center', width: 120, dataIndex: 'aliasName' },
|
||||
{
|
||||
title: '投管状态',
|
||||
title: '投罐状态',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'feedManageStatus',
|
||||
@@ -113,7 +113,7 @@ export const formSchema: FormSchema[] = [
|
||||
{ label: '物料描述', field: 'materialDesc', component: 'InputTextArea' },
|
||||
{ label: '物料别名', field: 'aliasName', component: 'Input' },
|
||||
{
|
||||
label: '投管状态',
|
||||
label: '投罐状态',
|
||||
field: 'feedManageStatus',
|
||||
component: 'Select',
|
||||
defaultValue: 1,
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
list = '/xslmes/mesXslRawMaterialInventory/list',
|
||||
exportXls = '/xslmes/mesXslRawMaterialInventory/exportXls',
|
||||
}
|
||||
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
@@ -0,0 +1,39 @@
|
||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{ title: '所在仓库', align: 'center', dataIndex: 'warehouseName', width: 180 },
|
||||
{ title: '物料名称', align: 'center', dataIndex: 'materialName', width: 160, ellipsis: true },
|
||||
{ title: '物料编码', align: 'center', dataIndex: 'materialCode', width: 160 },
|
||||
{ title: '状态检验', align: 'center', dataIndex: 'testResult_dictText', width: 100 },
|
||||
{ title: '总包数', align: 'center', dataIndex: 'totalPackages', width: 120 },
|
||||
{ title: '总重量', align: 'center', dataIndex: 'totalWeight', width: 120 },
|
||||
{
|
||||
title: '更新时间',
|
||||
align: 'center',
|
||||
dataIndex: 'updateTime',
|
||||
width: 180,
|
||||
customRender: ({ text }) => (!text ? '' : text.length > 19 ? text.substring(0, 19) : text),
|
||||
},
|
||||
];
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{ label: '所在仓库', field: 'warehouseName', component: 'JInput', colProps: { span: 6 } },
|
||||
{ label: '物料名称', field: 'materialName', component: 'JInput', colProps: { span: 6 } },
|
||||
{ label: '物料编码', field: 'materialCode', component: 'JInput', colProps: { span: 6 } },
|
||||
{
|
||||
label: '状态检验',
|
||||
field: 'testResult',
|
||||
component: 'JDictSelectTag',
|
||||
componentProps: { dictCode: 'xslmes_test_result' },
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
];
|
||||
|
||||
export const superQuerySchema = {
|
||||
warehouseName: { title: '所在仓库', order: 0, view: 'text' },
|
||||
materialName: { title: '物料名称', order: 1, view: 'text' },
|
||||
materialCode: { title: '物料编码', order: 2, view: 'text' },
|
||||
testResult: { title: '状态检验', order: 3, view: 'list', dictCode: 'xslmes_test_result' },
|
||||
totalPackages: { title: '总包数', order: 4, view: 'number' },
|
||||
totalWeight: { title: '总重量', order: 5, view: 'number' },
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'xslmes:mes_xsl_raw_material_inventory:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls">
|
||||
导出
|
||||
</a-button>
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xslmes-mesXslRawMaterialInventory" setup>
|
||||
import { reactive } from 'vue';
|
||||
import { BasicTable } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, searchFormSchema, superQuerySchema } from './MesXslRawMaterialInventory.data';
|
||||
import { list, getExportUrl } from './MesXslRawMaterialInventory.api';
|
||||
|
||||
const queryParam = reactive<any>({});
|
||||
|
||||
const { tableContext, onExportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '原材料库存',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: true,
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
showAdvancedButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: '原材料库存',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
});
|
||||
|
||||
const [registerTable, { reload }] = tableContext;
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).forEach((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
reload();
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user