Merge branch 'main' into 生产基础资料
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,
|
||||
|
||||
@@ -114,6 +114,8 @@ const { tableContext, onExportXls, onImportXls } = useListPage({
|
||||
title: '密炼物料信息',
|
||||
api: list,
|
||||
columns,
|
||||
// 避免:表格默认 immediate 请求一次 + onMounted 末尾 reload 再请求一次(进入页列表闪两次)
|
||||
immediate: false,
|
||||
canResize: true,
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema, autoSubmitOnEnter: true, showAdvancedButton: true },
|
||||
actionColumn: { width: 120 },
|
||||
@@ -227,9 +229,8 @@ function findNodeByKey(nodes: Recordable[], key: string): Recordable | null {
|
||||
async function loadCategoryTree() {
|
||||
treeLoading.value = true;
|
||||
try {
|
||||
const root = await fetchMaterialCategoryRoot();
|
||||
const [root, res] = await Promise.all([fetchMaterialCategoryRoot(), loadCategoryTreeRoot({ async: false, pcode: 'XSLMES_MATERIAL' })]);
|
||||
materialCategoryRootId.value = root?.id != null ? String(root.id) : '';
|
||||
const res = await loadCategoryTreeRoot({ async: false, pcode: 'XSLMES_MATERIAL' });
|
||||
rawCategoryTree.value = Array.isArray(res) ? res : [];
|
||||
if (!materialCategoryRootId.value || !rawCategoryTree.value.length) {
|
||||
createMessage.warning('未加载到物料分类树,请确认分类字典根编码 XSLMES_MATERIAL 已存在。');
|
||||
|
||||
Reference in New Issue
Block a user