no message
parent
9c6e3000d6
commit
0d0005a4df
|
|
@ -85,10 +85,19 @@
|
|||
* 返回值
|
||||
*/
|
||||
function backValue(e) {
|
||||
console.log('backValue', e);
|
||||
let text = e?.target?.value ?? '';
|
||||
if (text && !!props.trim) {
|
||||
text = text.trim();
|
||||
}
|
||||
|
||||
// 添加空值判断,空值直接返回,不进行特殊字符拼接
|
||||
if (!text) {
|
||||
emit('change', text);
|
||||
emit('update:value', text);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (props.type) {
|
||||
case JInputTypeEnum.JINPUT_QUERY_LIKE:
|
||||
text = '*' + text + '*';
|
||||
|
|
@ -110,6 +119,7 @@
|
|||
break;
|
||||
default:
|
||||
}
|
||||
console.log('backValue2', text);
|
||||
emit('change', text);
|
||||
emit('update:value', text);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,29 +8,15 @@ export const columns: BasicColumn[] = [
|
|||
align: 'center',
|
||||
dataIndex: 'areaId_dictText',
|
||||
},
|
||||
{
|
||||
title: '库位编码',
|
||||
align: 'center',
|
||||
dataIndex: 'pointCode',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
dataIndex: 'status_dictText',
|
||||
customRender: ({ text }) => {
|
||||
const color = text == '占用' ? 'red' : text == '空闲' ? 'green' : 'gray';
|
||||
return render.renderTag(text, color);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '巷道编码',
|
||||
align: 'center',
|
||||
dataIndex: 'colNum',
|
||||
},
|
||||
{
|
||||
title: '储位编码',
|
||||
title: '库位编码',
|
||||
align: 'center',
|
||||
dataIndex: 'nodeCode',
|
||||
dataIndex: 'pointCode',
|
||||
},
|
||||
{
|
||||
title: '层',
|
||||
|
|
@ -42,6 +28,16 @@ export const columns: BasicColumn[] = [
|
|||
align: 'center',
|
||||
dataIndex: 'rowNum',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
dataIndex: 'status_dictText',
|
||||
customRender: ({ text }) => {
|
||||
const color = text == '占用' ? 'red' : text == '空闲' ? 'green' : 'gray';
|
||||
return render.renderTag(text, color);
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: '是否启用',
|
||||
align: 'center',
|
||||
|
|
@ -56,6 +52,6 @@ export const columns: BasicColumn[] = [
|
|||
title: '创建日期',
|
||||
align: 'center',
|
||||
dataIndex: 'createTime',
|
||||
sorter: true
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -15,26 +15,19 @@
|
|||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="colNum">
|
||||
<template #label><span title="巷道编码">巷道编码</span></template>
|
||||
<JInput v-model:value="queryParam.colNum" :placeholder="'请输入巷道编码'" :type="JInputTypeEnum.JINPUT_RIGHT_LIKE" allowClear/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="pointCode">
|
||||
<template #label><span title="库位编码">库位编码</span></template>
|
||||
<JInput v-model:value="queryParam.pointCode" :placeholder="'请输入库位编码'" :type="JInputTypeEnum.JINPUT_RIGHT_LIKE" />
|
||||
<JInput v-model:value="queryParam.pointCode" :placeholder="'请输入库位编码'" :type="JInputTypeEnum.JINPUT_RIGHT_LIKE" allowClear/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="status">
|
||||
<template #label><span title="状态">状态</span></template>
|
||||
<JDictSelectTag v-model:value="queryParam.status" placeholder="请选择" dictCode="common_status" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="izActive">
|
||||
<template #label><span title="是否启用">是否启用</span></template>
|
||||
<JSearchSelect dict="dict_item_status" v-model:value="queryParam.izActive" placeholder="请选择" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
|
|
@ -48,6 +41,24 @@
|
|||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="status">
|
||||
<template #label><span title="状态">状态</span></template>
|
||||
<JDictSelectTag v-model:value="queryParam.status" placeholder="请选择" dictCode="common_status" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="izActive">
|
||||
<template #label><span title="是否启用">是否启用</span></template>
|
||||
<JSearchSelect dict="dict_item_status" v-model:value="queryParam.izActive" placeholder="请选择" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="编码" v-bind="validateInfos.pointCode" id="PointForm-pointCode" name="pointCode">
|
||||
<a-input v-model:value="formData.pointCode" placeholder="请输入库位编码" :disabled="isAutoGenerateCode" allow-clear></a-input>
|
||||
<a-input v-model:value="formData.pointCode" placeholder="请输入库位编码" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<a-col :span="12" v-if="showSpecialFields">
|
||||
<a-form-item label="巷道编码" v-bind="validateInfos.colNum" id="PointForm-colNum" name="colNum">
|
||||
<a-input v-model:value="formData.colNum" placeholder="巷道编码" allow-clear @change="generatePointCode"></a-input>
|
||||
<a-input v-model:value="formData.colNum" placeholder="巷道编码" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
|
|
@ -47,7 +47,6 @@
|
|||
:max="2"
|
||||
placeholder="请输入层"
|
||||
allow-clear
|
||||
@change="generatePointCode"
|
||||
style="width: 220px"
|
||||
></a-input-number>
|
||||
</a-form-item>
|
||||
|
|
@ -61,7 +60,6 @@
|
|||
:min="1"
|
||||
:max="7"
|
||||
allow-clear
|
||||
@change="generatePointCode"
|
||||
style="width: 220px"
|
||||
></a-input-number>
|
||||
</a-form-item>
|
||||
|
|
@ -78,11 +76,6 @@
|
|||
<a-input-number v-model:value="formData.positionY" placeholder="请输入坐标Y" allow-clear style="width: 220px"></a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" v-if="showSpecialFields">
|
||||
<a-form-item label="储位编码" v-bind="validateInfos.nodeCode" id="PointForm-nodeCode" name="nodeCode">
|
||||
<a-input-number v-model:value="formData.nodeCode" placeholder="请输入储位编码" allow-clear style="width: 220px"></a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item
|
||||
label="描述"
|
||||
|
|
@ -162,7 +155,6 @@
|
|||
rowNum: null,
|
||||
positionX: 0,
|
||||
positionY: 0,
|
||||
nodeCode:'',
|
||||
izDoubleLane: 1,
|
||||
description: '',
|
||||
delFlag: 0,
|
||||
|
|
@ -183,7 +175,6 @@
|
|||
layerNum: [], // 初始化为空数组,动态添加规则
|
||||
positionX: [], // 初始化为空数组,动态添加规则
|
||||
positionY: [], // 初始化为空数组,动态添加规则
|
||||
nodeCode:[]//初始化为空数组,动态添加规则
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
//日期个性化选择
|
||||
|
|
@ -202,19 +193,13 @@
|
|||
});
|
||||
|
||||
// 库区类型相关变量
|
||||
const isAutoGenerateCode = ref<boolean>(false); // 是否自动生成编码
|
||||
const showSpecialFields = ref<boolean>(false); // 是否显示巷道相关字段
|
||||
const showCoordinateFields = ref<boolean>(false); // 是否显示坐标字段
|
||||
|
||||
// 定义库区ID常量,提高可读性和可维护性
|
||||
const CP_MJ_AREA_IDS = new Set(['1988794761598668802', '1988795017837088770']);
|
||||
//成品存储区、模具存储区、入库工作站、出库工作站
|
||||
const CP_MJ_RK_CK_AREA_IDS = new Set([
|
||||
'1988794761598668802',
|
||||
'1988795017837088770',
|
||||
'1986328561044119554',
|
||||
'1986337742572707841'
|
||||
]);
|
||||
const CP_MJ_RK_CK_AREA_IDS = new Set(['1988794761598668802', '1988795017837088770', '1986328561044119554', '1986337742572707841']);
|
||||
|
||||
/**
|
||||
* 库区选择变化事件
|
||||
|
|
@ -227,7 +212,6 @@
|
|||
const isCoordinateArea = CP_MJ_RK_CK_AREA_IDS.has(option);
|
||||
|
||||
// 更新响应式状态
|
||||
isAutoGenerateCode.value = isSpecialArea;
|
||||
showSpecialFields.value = isSpecialArea;
|
||||
showCoordinateFields.value = isCoordinateArea;
|
||||
|
||||
|
|
@ -238,7 +222,6 @@
|
|||
validatorRules.layerNum.splice(0);
|
||||
validatorRules.positionX.splice(0);
|
||||
validatorRules.positionY.splice(0);
|
||||
validatorRules.nodeCode.splice(0);
|
||||
|
||||
// 根据类型设置新的验证规则
|
||||
if (isSpecialArea) {
|
||||
|
|
@ -246,7 +229,6 @@
|
|||
validatorRules.colNum.push({ required: true, message: '请输入巷道编码!' });
|
||||
validatorRules.rowNum.push({ required: true, message: '请输入深度!' });
|
||||
validatorRules.layerNum.push({ required: true, message: '请输入层!' });
|
||||
validatorRules.nodeCode.push({ required: true, message: '请输入储位编码!' });
|
||||
} else {
|
||||
// 手动编码需要 pointCode 必填
|
||||
validatorRules.pointCode.push({ required: true, message: '请输入编码!' });
|
||||
|
|
@ -256,29 +238,6 @@
|
|||
validatorRules.positionX.push({ required: true, message: '请输入坐标X!' });
|
||||
validatorRules.positionY.push({ required: true, message: '请输入坐标Y!' });
|
||||
}
|
||||
|
||||
// 仅在必要时重新生成编码
|
||||
if (isSpecialArea || isCoordinateArea) {
|
||||
generatePointCode();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动生成库位编码
|
||||
*/
|
||||
function generatePointCode() {
|
||||
if (isAutoGenerateCode.value) {
|
||||
// 格式: 巷道编码-层-深度
|
||||
const colNum = formData.colNum || '';
|
||||
const layerNum = formData.layerNum || '';
|
||||
const rowNum = formData.rowNum || '';
|
||||
|
||||
if (colNum && layerNum && rowNum) {
|
||||
formData.pointCode = `${colNum}-${layerNum}-${rowNum}`;
|
||||
} else {
|
||||
formData.pointCode = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue