配合示方生成混炼示方完善

This commit is contained in:
2026-07-30 11:28:26 +08:00
parent 2310f79f43
commit 5c27bacd11
231 changed files with 33361 additions and 184 deletions

View File

@@ -10,6 +10,8 @@ enum Api {
importExcel = '/mes/material/material/importExcel',
exportXls = '/mes/material/material/exportXls',
queryById = '/mes/material/material/queryById',
checkMaterialCode = '/mes/material/material/checkMaterialCode',
checkMaterialName = '/mes/material/material/checkMaterialName',
}
export const getExportUrl = Api.exportXls;
@@ -17,6 +19,12 @@ export const getImportUrl = Api.importExcel;
export const list = (params) => defHttp.get({ url: Api.list, params });
export const queryById = (params) => defHttp.get({ url: Api.queryById, params }, { successMessageMode: 'none' });
export const checkMaterialCode = (params: { materialCode: string; dataId?: string }) =>
defHttp.get({ url: Api.checkMaterialCode, params }, { successMessageMode: 'none', errorMessageMode: 'none' });
export const checkMaterialName = (params: { materialName: string; dataId?: string }) =>
defHttp.get({ url: Api.checkMaterialName, params }, { successMessageMode: 'none', errorMessageMode: 'none' });
export const deleteOne = (params, handleSuccess) =>
defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => handleSuccess());

View File

@@ -1,5 +1,6 @@
import { BasicColumn, FormSchema } from '/@/components/Table';
import { loadTreeData } from '/@/api/common/api';
import { checkMaterialName } from './MesMaterial.api';
function useStatusText(v: unknown) {
if (v === 1) return '使用中';
@@ -32,6 +33,7 @@ const glueCategoryProps = {
placeholder: '请选择胶料类别',
};
//update-begin---author:jiangxh ---date:20260729 for【胶料】列表/表单去掉胶料编码展示-----------
export const columns: BasicColumn[] = [
{ title: '胶料名称', align: 'center', width: 160, dataIndex: 'materialName' },
{ title: '胶料类别', align: 'center', width: 140, dataIndex: 'categoryId_dictText' },
@@ -92,7 +94,32 @@ export const searchFormSchema: FormSchema[] = [
export const formSchema: FormSchema[] = [
{ label: '', field: 'id', component: 'Input', show: false },
{ label: '胶料名称', field: 'materialName', component: 'Input', required: true },
//update-begin---author:jiangxh ---date:20260730 for【胶料】编号隐藏保存由后端按名称回填-----------
// 列表/表单均不展示;新增编辑保存后后端将 materialCode = materialName
{ label: '', field: 'materialCode', component: 'Input', show: false },
//update-end---author:jiangxh ---date:20260730 for【胶料】编号隐藏保存由后端按名称回填-----------
{
label: '胶料名称',
field: 'materialName',
component: 'Input',
required: true,
dynamicRules: ({ model }) => [
{ required: true, message: '请输入胶料名称' },
{
validator: async (_rule, value) => {
const v = value == null ? '' : String(value).trim();
if (!v) return Promise.resolve();
try {
await checkMaterialName({ materialName: v, dataId: model?.id });
return Promise.resolve();
} catch (e: any) {
return Promise.reject(e?.response?.data?.message || e?.message || '胶料名称不能重复');
}
},
trigger: 'blur',
},
],
},
{
label: '胶料类别',
field: 'categoryId',
@@ -141,3 +168,4 @@ export const formSchema: FormSchema[] = [
componentProps: { options: specialRubberOptions },
},
];
//update-end---author:jiangxh ---date:20260729 for【胶料】列表/表单去掉胶料编码展示-----------

View File

@@ -29,6 +29,7 @@ import { useListPage } from '/@/hooks/system/useListPage';
import MesMaterialModal from './modules/MesMaterialModal.vue';
import { columns, searchFormSchema } from './MesMaterial.data';
import { batchDelete, deleteOne, getExportUrl, getImportUrl, list } from './MesMaterial.api';
import { applyJeecgLikeQuery, RUBBER_MATERIAL_LIKE_FIELDS } from './materialQuery.util';
const [registerModal, { openModal }] = useModal();
const { tableContext, onExportXls, onImportXls } = useListPage({
@@ -39,6 +40,7 @@ const { tableContext, onExportXls, onImportXls } = useListPage({
canResize: true,
formConfig: { labelWidth: 120, schemas: searchFormSchema, autoSubmitOnEnter: true, showAdvancedButton: true },
actionColumn: { width: 120 },
beforeFetch: (params) => applyJeecgLikeQuery(params, RUBBER_MATERIAL_LIKE_FIELDS),
},
exportConfig: { name: '胶料信息', url: getExportUrl },
importConfig: { url: getImportUrl, success: handleSuccess },

View File

@@ -4,6 +4,8 @@ import { Modal } from 'ant-design-vue';
enum Api {
list = '/mes/material/mixerMaterial/list',
queryById = '/mes/material/mixerMaterial/queryById',
checkMaterialCode = '/mes/material/mixerMaterial/checkMaterialCode',
checkMaterialName = '/mes/material/mixerMaterial/checkMaterialName',
save = '/mes/material/mixerMaterial/add',
edit = '/mes/material/mixerMaterial/edit',
deleteOne = '/mes/material/mixerMaterial/delete',
@@ -17,6 +19,12 @@ export const getImportUrl = Api.importExcel;
export const list = (params) => defHttp.get({ url: Api.list, params });
export const queryById = (params) => defHttp.get({ url: Api.queryById, params });
export const checkMaterialCode = (params: { materialCode: string; dataId?: string }) =>
defHttp.get({ url: Api.checkMaterialCode, params }, { successMessageMode: 'none', errorMessageMode: 'none' });
export const checkMaterialName = (params: { materialName: string; dataId?: string }) =>
defHttp.get({ url: Api.checkMaterialName, params }, { successMessageMode: 'none', errorMessageMode: 'none' });
export const deleteOne = (params, handleSuccess) =>
defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => handleSuccess());

View File

@@ -1,5 +1,6 @@
import { BasicColumn, FormSchema } from '/@/components/Table';
import { loadTreeData } from '/@/api/common/api';
import { checkMaterialCode, checkMaterialName } from './MesMixerMaterial.api';
function feedManageStatusText(v: unknown) {
if (v === 1) return '在投管';
@@ -93,8 +94,50 @@ const useStatusOptions = [
export const formSchema: FormSchema[] = [
{ label: '', field: 'id', component: 'Input', show: false },
{ label: '物料编码', field: 'materialCode', component: 'Input', required: true },
{ label: '物料名称', field: 'materialName', component: 'Input', required: true },
{
label: '物料编码',
field: 'materialCode',
component: 'Input',
required: true,
dynamicRules: ({ model }) => [
{ required: true, message: '请输入物料编码' },
{
validator: async (_rule, value) => {
const v = value == null ? '' : String(value).trim();
if (!v) return Promise.resolve();
try {
await checkMaterialCode({ materialCode: v, dataId: model?.id });
return Promise.resolve();
} catch (e: any) {
return Promise.reject(e?.response?.data?.message || e?.message || '物料编码不能重复');
}
},
trigger: 'blur',
},
],
},
{
label: '物料名称',
field: 'materialName',
component: 'Input',
required: true,
dynamicRules: ({ model }) => [
{ required: true, message: '请输入物料名称' },
{
validator: async (_rule, value) => {
const v = value == null ? '' : String(value).trim();
if (!v) return Promise.resolve();
try {
await checkMaterialName({ materialName: v, dataId: model?.id });
return Promise.resolve();
} catch (e: any) {
return Promise.reject(e?.response?.data?.message || e?.message || '物料名称不能重复');
}
},
trigger: 'blur',
},
],
},
{ label: 'ERP编号', field: 'erpCode', component: 'Input' },
{
label: '物料大类',
@@ -127,7 +170,9 @@ export const formSchema: FormSchema[] = [
componentProps: { options: useStatusOptions },
},
{ label: '比重', field: 'specificGravity', component: 'InputNumber', componentProps: { min: 0, step: 0.001, precision: 6 } },
{ label: '保质期(天)', field: 'shelfLifeDays', component: 'InputNumber', componentProps: { min: 0, precision: 0 } },
//update-begin---author:jiangxh ---date:20260729 for【密炼物料】新增默认保质期365天-----------
{ label: '保质期(天)', field: 'shelfLifeDays', component: 'InputNumber', defaultValue: 365, componentProps: { min: 0, precision: 0 } },
//update-end---author:jiangxh ---date:20260729 for【密炼物料】新增默认保质期365天-----------
{ label: '最短烘胶时间(分钟)', field: 'minBakeMinutes', component: 'InputNumber', componentProps: { min: 0, precision: 0 } },
{
label: '总安全库存KG',

View File

@@ -77,6 +77,7 @@ import MesMixerMaterialModal from './modules/MesMixerMaterialModal.vue';
import MesMixerMaterialSysCategoryModal from './modules/MesMixerMaterialSysCategoryModal.vue';
import { columns, searchFormSchema } from './MesMixerMaterial.data';
import { batchDelete, deleteOne, getExportUrl, getImportUrl, list } from './MesMixerMaterial.api';
import { applyJeecgLikeQuery, MIXER_MATERIAL_LIKE_FIELDS } from './materialQuery.util';
import { loadTreeData as loadCategoryTreeRoot } from '/@/views/system/category/category.api';
import type { KeyType } from '/@/components/Tree/src/types/tree';
import { deleteMaterialSysCategory, fetchMaterialCategoryRoot } from './MesMixerMaterialSysCategory.api';
@@ -119,7 +120,10 @@ const { tableContext, onExportXls, onImportXls } = useListPage({
canResize: true,
formConfig: { labelWidth: 120, schemas: searchFormSchema, autoSubmitOnEnter: true, showAdvancedButton: true },
actionColumn: { width: 120 },
beforeFetch: (params) => Object.assign(params, queryParam),
beforeFetch: (params) => {
Object.assign(params, queryParam);
return applyJeecgLikeQuery(params, MIXER_MATERIAL_LIKE_FIELDS);
},
},
exportConfig: { name: '密炼物料信息', url: getExportUrl, params: queryParam },
importConfig: { url: getImportUrl, success: handleSuccess },

View File

@@ -0,0 +1,52 @@
/**
* Jeecg QueryGenerator 模糊查询工具:
* - 普通字段:值两侧加 * 转为 LIKE
* - 关键字多字段 OR走 superQueryParams
*/
/** 给指定字符串查询字段追加 *value*(已含 * 则不重复处理) */
export function applyJeecgLikeQuery(params: Recordable, fields: string[]): Recordable {
if (!params || !fields?.length) {
return params;
}
for (const field of fields) {
const raw = params[field];
if (raw == null || raw === '') {
continue;
}
const text = String(raw).trim();
if (!text || text.includes('*')) {
continue;
}
params[field] = `*${text}*`;
}
return params;
}
/** 构造多字段 OR 模糊高级查询参数 */
export function buildOrLikeSuperQuery(fields: string[], keyword: string): {
superQueryMatchType: string;
superQueryParams: string;
} | null {
const kw = keyword?.trim();
if (!kw || !fields?.length) {
return null;
}
const conditions = fields.map((field) => ({
field,
rule: 'like',
val: kw,
}));
return {
superQueryMatchType: 'or',
superQueryParams: encodeURI(JSON.stringify(conditions)),
};
}
/** 密炼物料文本查询字段 */
export const MIXER_MATERIAL_LIKE_FIELDS = ['materialCode', 'materialName', 'erpCode', 'materialDesc', 'aliasName'];
/** 胶料文本查询字段(已去掉胶料编码) */
//update-begin---author:jiangxh ---date:20260729 for【选料弹窗】胶料关键字查询去掉编码-----------
export const RUBBER_MATERIAL_LIKE_FIELDS = ['materialName', 'erpCode', 'aliasName', 'shortName'];
//update-end---author:jiangxh ---date:20260729 for【选料弹窗】胶料关键字查询去掉编码-----------

View File

@@ -10,6 +10,7 @@
import { BasicTable, useTable } from '/@/components/Table';
import { list as materialList, queryById as queryMaterialById } from '../MesMaterial.api';
import { columns as materialColumns, searchFormSchema as materialSearch } from '../MesMaterial.data';
import { applyJeecgLikeQuery, RUBBER_MATERIAL_LIKE_FIELDS } from '../materialQuery.util';
import { useMessage } from '/@/hooks/web/useMessage';
const emit = defineEmits(['register', 'select']);
@@ -21,7 +22,9 @@
const [registerTable, { reload, getSelectRowKeys, getSelectRows, setSelectedRowKeys, clearSelectedRowKeys }] = useTable({
api: materialList,
columns: materialColumns.slice(0, 6),
//update-begin---author:jiangxh ---date:20260729 for【选料弹窗】配合示方选胶料不展示胶料编码-----------
columns: materialColumns.filter((col) => col.dataIndex !== 'materialCode').slice(0, 6),
//update-end---author:jiangxh ---date:20260729 for【选料弹窗】配合示方选胶料不展示胶料编码-----------
rowKey: 'id',
useSearchForm: true,
formConfig: {
@@ -32,12 +35,15 @@
canResize: false,
showIndexColumn: false,
immediate: true,
beforeFetch: (params) => ({
...params,
enableFlag: params.enableFlag ?? 1,
onlySales: onlySales.value ? 1 : undefined,
excludeProductionFB1: excludeProductionFB1.value ? 1 : undefined,
}),
beforeFetch: (params) => {
const next = {
...params,
enableFlag: params.enableFlag ?? 1,
onlySales: onlySales.value ? 1 : undefined,
excludeProductionFB1: excludeProductionFB1.value ? 1 : undefined,
};
return applyJeecgLikeQuery(next, RUBBER_MATERIAL_LIKE_FIELDS);
},
rowSelection: {
type: 'radio',
columnWidth: 48,

View File

@@ -10,6 +10,7 @@
import { BasicTable, useTable } from '/@/components/Table';
import { list as mixerList, queryById as queryMixerById } from '../MesMixerMaterial.api';
import { columns as mixerColumns, searchFormSchema as mixerSearch } from '../MesMixerMaterial.data';
import { applyJeecgLikeQuery, MIXER_MATERIAL_LIKE_FIELDS } from '../materialQuery.util';
import { useMessage } from '/@/hooks/web/useMessage';
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A53】通用密炼物料选料弹窗种类改读配置表-----------
import {
@@ -40,6 +41,7 @@
canResize: false,
showIndexColumn: false,
immediate: true,
beforeFetch: (params) => applyJeecgLikeQuery(params, MIXER_MATERIAL_LIKE_FIELDS),
rowSelection: {
type: 'radio',
columnWidth: 48,

View File

@@ -42,7 +42,10 @@ export const batchDelete = (params, handleSuccess) => {
});
};
export const saveOrUpdate = (params, isUpdate) => defHttp.post({ url: isUpdate ? Api.edit : Api.save, params });
export const saveOrUpdate = (params, isUpdate) =>
//update-begin---author:jiangxh ---date:20260729 for【配合示方】保存延长超时避免远程库慢导致误报超时-----------
defHttp.post({ url: isUpdate ? Api.edit : Api.save, params, timeout: 120 * 1000 });
//update-end---author:jiangxh ---date:20260729 for【配合示方】保存延长超时避免远程库慢导致误报超时-----------
//update-begin---author:cursor ---date:20260522 for【XSLMES-20260522-A38】配合示方生成混炼示方-----------
export const buildMixingGeneratePreview = (params) =>

View File

@@ -111,7 +111,7 @@ export function applyWeightPercentToLines(lines: Recordable[]): void {
row.weightPercent = null;
return;
}
row.weightPercent = Number(((phr / totalPhr) * 100).toFixed(1));
row.weightPercent = Number(((phr / totalPhr) * 100).toFixed(3));
});
}
@@ -429,9 +429,25 @@ export function createEmptyLineRows(count = DEFAULT_LINE_ROW_COUNT): Recordable[
return Array.from({ length: count }, () => ({ id: buildUUID() }));
}
/** 明细数值保留三位小数 */
export function roundFormulaLineDecimal3(value: unknown): number | null {
if (value == null || value === '') {
return null;
}
const n = Number(value);
return Number.isFinite(n) ? Number(n.toFixed(3)) : null;
}
/** 确保每行有唯一 idJVxeTable rowKey 依赖 id否则单元格无法渲染 */
export function normalizeLineRows(rows: Recordable[]): Recordable[] {
return (rows || []).map((r) => ({ ...r, id: r?.id || buildUUID() }));
//update-begin---author:jiangxh ---date:20260729 for【配合示方】明细重量%/体积保留三位小数-----------
return (rows || []).map((r) => ({
...r,
id: r?.id || buildUUID(),
weightPercent: roundFormulaLineDecimal3(r?.weightPercent),
volume: roundFormulaLineDecimal3(r?.volume),
}));
//update-end---author:jiangxh ---date:20260729 for【配合示方】明细重量%/体积保留三位小数-----------
}
function sectionTitle(label: string, field: string): FormSchema {
@@ -931,6 +947,7 @@ export function buildLineJVxeColumns(mixingStages?: number | null, tableDisabled
type: JVxeTypes.inputNumber,
minWidth: 90,
align: 'center',
props: { precision: 3 },
},
{
title: '体积',
@@ -939,6 +956,7 @@ export function buildLineJVxeColumns(mixingStages?: number | null, tableDisabled
minWidth: 90,
align: 'center',
placeholder: '自动计算',
props: { precision: 3 },
},
{
title: '备注',

View File

@@ -92,6 +92,7 @@
}
loading.value = true;
try {
//update-begin---author:jiangxh ---date:20260730 for【混炼示方生成】打开预览即匹配胶料失败则关闭弹窗-----------
const preview = await buildMixingGeneratePreview({ formulaSpecId: formulaSpecId.value });
rubberName.value = preview?.rubberName || '';
mixingStages.value = preview?.mixingStages || 0;
@@ -106,9 +107,13 @@
if (!tableRows.value.length) {
createMessage.warning('无可生成的混炼段,请检查混合段数');
}
} catch (_e) {
// 预览阶段胶料匹配失败等错误由全局提示,关闭弹窗避免空表继续操作
closeModal();
} finally {
loading.value = false;
}
//update-end---author:jiangxh ---date:20260730 for【混炼示方生成】打开预览即匹配胶料失败则关闭弹窗-----------
});
function formatMachineNames(machines: Recordable[] = []) {

View File

@@ -441,6 +441,7 @@
createEmptyLineRows,
getActiveStageCount,
normalizeLineRows,
roundFormulaLineDecimal3,
stageTotalNumberProps,
SUMMARY_FOOTER_FIELD_KEYS,
SUMMARY_METRICS_FIELD_KEYS,
@@ -1464,7 +1465,7 @@
const material = (raw as Recordable)?.id != null ? raw : (raw as Recordable)?.result;
const sg = Number(material?.specificGravity);
if (sg > 0) {
row.volume = Number((Number(row.phr) / sg).toFixed(6));
row.volume = Number((Number(row.phr) / sg).toFixed(3));
} else {
row.volume = null;
}
@@ -1505,6 +1506,10 @@
.filter((r) => r && (r.mixerMaterialId || r.phr != null))
.map((r, index) => ({
...stripFormulaLineDisplayFields(r),
//update-begin---author:jiangxh ---date:20260729 for【配合示方】明细重量%/体积提交保留三位小数-----------
weightPercent: roundFormulaLineDecimal3(r.weightPercent),
volume: roundFormulaLineDecimal3(r.volume),
//update-end---author:jiangxh ---date:20260729 for【配合示方】明细重量%/体积提交保留三位小数-----------
sortNo: index,
}));

View File

@@ -79,11 +79,11 @@ export const mainSchema: FormSchema[] = [
rules: [{ required: true, message: '请选择发行编号' }],
},
//update-end---author:cursor ---date:20260522 for【XSLMES-20260522-A33】混炼示方基本信息字段优化-----------
{ label: '换算系数', field: 'convertFactor', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 2, style: { width: '100%' } } },
{ label: '填充体积', field: 'fillVolume', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 6, style: { width: '100%' } } },
{ label: '换算系数', field: 'convertFactor', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 3, style: { width: '100%' } } },
{ label: '填充体积', field: 'fillVolume', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 2, style: { width: '100%' } } },
{ label: '回收炭黑(秒)', field: 'recycleCarbonSec', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 0, style: { width: '100%' } } },
{ label: '母胶比重', field: 'motherRubberSg', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 6, style: { width: '100%' } } },
{ label: '终炼胶比重', field: 'finalRubberSg', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 6, style: { width: '100%' } } },
{ label: '母胶比重', field: 'motherRubberSg', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 3, style: { width: '100%' } } },
{ label: '终炼胶比重', field: 'finalRubberSg', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 3, style: { width: '100%' } } },
{ label: '适用工厂', field: 'applyFactory', component: 'Input', colProps: { span: 8 } },
{ label: '段数', field: 'stageCount', component: 'Input', colProps: { span: 8 }, componentProps: { placeholder: '如 2/3' } },
{ label: '纯混炼时间(秒)', field: 'pureMixSec', component: 'InputNumber', colProps: { span: 8 }, componentProps: { precision: 0, style: { width: '100%' } } },
@@ -319,7 +319,13 @@ const MIXING_MATERIAL_WEIGHT_SCALE = 6;
//update-begin---author:cursor ---date:20260526 for【XSLMES-20260526-A60】换算系数/配方参数数值展示优化-----------
/** 换算系数展示小数位 */
export const MIXING_CONVERT_FACTOR_SCALE = 2;
export const MIXING_CONVERT_FACTOR_SCALE = 3;
/** 母胶比重展示小数位 */
export const MIXING_MOTHER_RUBBER_SG_SCALE = 3;
/** 填充体积展示小数位 */
export const MIXING_FILL_VOLUME_SCALE = 2;
/** 配方参数设定允许的小数精度 */
export const MIXING_RECIPE_PARAM_DECIMAL_SCALE = 6;
@@ -333,7 +339,7 @@ export const MIXING_RECIPE_PARAM_DECIMAL_FIELDS = [
'maxFeedTemp',
] as const;
/** 换算系数展示:固定保留位小数 */
/** 换算系数展示:固定保留位小数 */
export function formatMixingConvertFactorDisplay(value: unknown): string {
if (value === null || value === undefined || value === '') {
return '';
@@ -536,7 +542,7 @@ export function calcMixingFillVolume(totalWeight: unknown, specificGravity: unkn
return null;
}
const materialVolume = weight / sg;
return Number(((materialVolume / volume) * 100).toFixed(6));
return Number(((materialVolume / volume) * 100).toFixed(MIXING_FILL_VOLUME_SCALE));
}
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A46】填充体积按单重/比重/机台有效体积自动计算-----------
@@ -1311,8 +1317,9 @@ export function applyMixingMaterialFromSelection(row: Recordable, material: Reco
//update-begin---author:cursor ---date:20260601 for【XSLMES-20260601-A62】选料弹窗新增胶料页签查询胶料信息-----------
/** 选料弹窗「胶料」页签表格列(数据源为胶料信息 mes_material */
export const mixingRubberPickerTableColumns: BasicColumn[] = [
{ title: '胶料编码', align: 'center', width: 140, dataIndex: 'materialCode' },
//update-begin---author:jiangxh ---date:20260729 for【选料弹窗】胶料页签去掉胶料编码-----------
{ title: '胶料名称', align: 'center', width: 180, dataIndex: 'materialName' },
//update-end---author:jiangxh ---date:20260729 for【选料弹窗】胶料页签去掉胶料编码-----------
//update-begin---author:cursor ---date:20260601 for【XSLMES-20260601-A62】胶料页签补齐自动/人工称量列-----------
{ title: '自动/人工称量', align: 'center', width: 132, dataIndex: 'pickerWeighMode' },
//update-end---author:cursor ---date:20260601 for【XSLMES-20260601-A62】胶料页签补齐自动/人工称量列-----------

View File

@@ -13,7 +13,7 @@
<a-input
v-model:value="keyword"
allow-clear
placeholder="关键字(编码/名称/描述)"
:placeholder="keywordPlaceholder"
style="width: 280px"
@pressEnter="reloadTable"
/>
@@ -105,6 +105,11 @@
import { list as rubberList, queryById as queryRubberById } from '/@/views/mes/material/MesMaterial.api';
import { loadTreeData } from '/@/api/common/api';
//update-end---author:cursor ---date:20260601 for【XSLMES-20260601-A62】胶料页签查询胶料信息(mes_material)------------->
import {
buildOrLikeSuperQuery,
MIXER_MATERIAL_LIKE_FIELDS,
RUBBER_MATERIAL_LIKE_FIELDS,
} from '/@/views/mes/material/materialQuery.util';
import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import MesXslMixingMaterialCategorySetting from './MesXslMixingMaterialCategorySetting.vue';
@@ -133,6 +138,11 @@
const RUBBER_TREE_ALL = 'ALL';
const RUBBER_CATEGORY_PCODE = 'XSLMES_RUBBER';
const pickerType = ref<'mixer' | 'rubber'>('mixer');
//update-begin---author:jiangxh ---date:20260729 for【选料弹窗】胶料页签关键字提示去掉编码-----------
const keywordPlaceholder = computed(() =>
pickerType.value === 'rubber' ? '关键字(名称/别名/ERP' : '关键字(编码/名称/描述)',
);
//update-end---author:jiangxh ---date:20260729 for【选料弹窗】胶料页签关键字提示去掉编码-----------
const rubberTreeLoading = ref(false);
const rubberCategoryTree = ref<Recordable[]>([]);
/** 胶料类别 id -> { code, title },用于按种类配置编码匹配 */
@@ -256,14 +266,20 @@
const kw = keyword.value?.trim();
if (pickerType.value === 'rubber') {
const rubberParams = { ...params, ...selectedRubberCategoryFilter.value };
if (kw) {
rubberParams.materialName = `*${kw}*`;
//update-begin---author:jiangxh ---date:20260729 for【选料弹窗】胶料关键字按名称/ERP/别名模糊查询-----------
// 关键字按名称/ERP/别名模糊 OR 查询(不含编码)
const orQuery = buildOrLikeSuperQuery(RUBBER_MATERIAL_LIKE_FIELDS, kw || '');
//update-end---author:jiangxh ---date:20260729 for【选料弹窗】胶料关键字按名称/ERP/别名模糊查询-----------
if (orQuery) {
Object.assign(rubberParams, orQuery);
}
return rubberParams;
}
const next = { ...params, ...selectedCategoryFilter.value };
if (kw) {
next.materialName = `*${kw}*`;
// 关键字按编码/名称/描述/ERP/别名模糊 OR 查询
const orQuery = buildOrLikeSuperQuery(MIXER_MATERIAL_LIKE_FIELDS, kw || '');
if (orQuery) {
Object.assign(next, orQuery);
}
return next;
},

View File

@@ -67,7 +67,7 @@
<a-input-number
v-model:value="sheetForm.convertFactor"
:disabled="!showFooter"
:precision="2"
:precision="3"
:formatter="formatConvertFactorInput"
:parser="parseConvertFactorInput"
:bordered="false"
@@ -78,7 +78,7 @@
</td>
<th class="formTitle" colspan="1">填充体积</th>
<td class="formValue" colspan="1">
<a-input-number v-model:value="sheetForm.fillVolume" :disabled="!showFooter" :precision="6" :bordered="false" class="form-input" style="width: 100%" />
<a-input-number v-model:value="sheetForm.fillVolume" :disabled="!showFooter" :precision="2" :bordered="false" class="form-input" style="width: 100%" />
</td>
<th class="formTitle" colspan="1">回收炭黑()</th>
<td class="formValue">
@@ -99,7 +99,7 @@
</td>
<th class="formTitle" colspan="1">母胶比重</th>
<td class="formValue">
<a-input-number v-model:value="sheetForm.motherRubberSg" :disabled="!showFooter" :precision="6" :bordered="false" class="form-input" style="width: 100%" @update:value="recalcFillVolume" />
<a-input-number v-model:value="sheetForm.motherRubberSg" :disabled="!showFooter" :precision="3" :bordered="false" class="form-input" style="width: 100%" @update:value="recalcFillVolume" />
</td>
<th class="formTitle">段数</th>
<td class="formValue" colspan="2">
@@ -123,7 +123,7 @@
<tr>
<th class="formTitle" colspan="1">终炼胶比重</th>
<td class="formValue">
<a-input-number v-model:value="sheetForm.finalRubberSg" :disabled="!showFooter" :precision="6" :bordered="false" class="form-input" style="width: 100%" @update:value="recalcFillVolume" />
<a-input-number v-model:value="sheetForm.finalRubberSg" :disabled="!showFooter" :precision="3" :bordered="false" class="form-input" style="width: 100%" @update:value="recalcFillVolume" />
</td>
<th class="formTitle" colspan="1">适用工厂</th>
<td class="formValue" colspan="2">