no message

main
HUOJIN\92525 2025-12-27 20:57:37 +08:00
parent 9c6e3000d6
commit 0d0005a4df
4 changed files with 51 additions and 75 deletions

View File

@ -85,10 +85,19 @@
* 返回值 * 返回值
*/ */
function backValue(e) { function backValue(e) {
console.log('backValue', e);
let text = e?.target?.value ?? ''; let text = e?.target?.value ?? '';
if (text && !!props.trim) { if (text && !!props.trim) {
text = text.trim(); text = text.trim();
} }
//
if (!text) {
emit('change', text);
emit('update:value', text);
return;
}
switch (props.type) { switch (props.type) {
case JInputTypeEnum.JINPUT_QUERY_LIKE: case JInputTypeEnum.JINPUT_QUERY_LIKE:
text = '*' + text + '*'; text = '*' + text + '*';
@ -110,6 +119,7 @@
break; break;
default: default:
} }
console.log('backValue2', text);
emit('change', text); emit('change', text);
emit('update:value', text); emit('update:value', text);
} }

View File

@ -8,29 +8,15 @@ export const columns: BasicColumn[] = [
align: 'center', align: 'center',
dataIndex: 'areaId_dictText', 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: '巷道编码', title: '巷道编码',
align: 'center', align: 'center',
dataIndex: 'colNum', dataIndex: 'colNum',
}, },
{ {
title: '位编码', title: '库位编码',
align: 'center', align: 'center',
dataIndex: 'nodeCode', dataIndex: 'pointCode',
}, },
{ {
title: '层', title: '层',
@ -42,6 +28,16 @@ export const columns: BasicColumn[] = [
align: 'center', align: 'center',
dataIndex: 'rowNum', dataIndex: 'rowNum',
}, },
{
title: '状态',
align: 'center',
dataIndex: 'status_dictText',
customRender: ({ text }) => {
const color = text == '占用' ? 'red' : text == '空闲' ? 'green' : 'gray';
return render.renderTag(text, color);
},
},
{ {
title: '是否启用', title: '是否启用',
align: 'center', align: 'center',
@ -56,6 +52,6 @@ export const columns: BasicColumn[] = [
title: '创建日期', title: '创建日期',
align: 'center', align: 'center',
dataIndex: 'createTime', dataIndex: 'createTime',
sorter: true sorter: true,
}, },
]; ];

View File

@ -15,26 +15,19 @@
/> />
</a-form-item> </a-form-item>
</a-col> </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-col :lg="6">
<a-form-item name="pointCode"> <a-form-item name="pointCode">
<template #label><span title="库位编码">库位编码</span></template> <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-form-item>
</a-col> </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"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6"> <a-col :lg="6">
@ -48,6 +41,24 @@
</span> </span>
</a-col> </a-col>
</a-row> </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> </a-form>
</div> </div>
<!--引用表格--> <!--引用表格-->

View File

@ -17,7 +17,7 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="编码" v-bind="validateInfos.pointCode" id="PointForm-pointCode" name="pointCode"> <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-form-item>
</a-col> </a-col>
@ -35,7 +35,7 @@
<a-col :span="12" v-if="showSpecialFields"> <a-col :span="12" v-if="showSpecialFields">
<a-form-item label="巷道编码" v-bind="validateInfos.colNum" id="PointForm-colNum" name="colNum"> <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-form-item>
</a-col> </a-col>
@ -47,7 +47,6 @@
:max="2" :max="2"
placeholder="请输入层" placeholder="请输入层"
allow-clear allow-clear
@change="generatePointCode"
style="width: 220px" style="width: 220px"
></a-input-number> ></a-input-number>
</a-form-item> </a-form-item>
@ -61,7 +60,6 @@
:min="1" :min="1"
:max="7" :max="7"
allow-clear allow-clear
@change="generatePointCode"
style="width: 220px" style="width: 220px"
></a-input-number> ></a-input-number>
</a-form-item> </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-input-number v-model:value="formData.positionY" placeholder="请输入坐标Y" allow-clear style="width: 220px"></a-input-number>
</a-form-item> </a-form-item>
</a-col> </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-col :span="24">
<a-form-item <a-form-item
label="描述" label="描述"
@ -162,7 +155,6 @@
rowNum: null, rowNum: null,
positionX: 0, positionX: 0,
positionY: 0, positionY: 0,
nodeCode:'',
izDoubleLane: 1, izDoubleLane: 1,
description: '', description: '',
delFlag: 0, delFlag: 0,
@ -183,7 +175,6 @@
layerNum: [], // layerNum: [], //
positionX: [], // positionX: [], //
positionY: [], // positionY: [], //
nodeCode:[]//
}); });
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false }); const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
// //
@ -202,19 +193,13 @@
}); });
// //
const isAutoGenerateCode = ref<boolean>(false); //
const showSpecialFields = ref<boolean>(false); // const showSpecialFields = ref<boolean>(false); //
const showCoordinateFields = ref<boolean>(false); // const showCoordinateFields = ref<boolean>(false); //
// ID // ID
const CP_MJ_AREA_IDS = new Set(['1988794761598668802', '1988795017837088770']); const CP_MJ_AREA_IDS = new Set(['1988794761598668802', '1988795017837088770']);
// //
const CP_MJ_RK_CK_AREA_IDS = new Set([ const CP_MJ_RK_CK_AREA_IDS = new Set(['1988794761598668802', '1988795017837088770', '1986328561044119554', '1986337742572707841']);
'1988794761598668802',
'1988795017837088770',
'1986328561044119554',
'1986337742572707841'
]);
/** /**
* 库区选择变化事件 * 库区选择变化事件
@ -227,7 +212,6 @@
const isCoordinateArea = CP_MJ_RK_CK_AREA_IDS.has(option); const isCoordinateArea = CP_MJ_RK_CK_AREA_IDS.has(option);
// //
isAutoGenerateCode.value = isSpecialArea;
showSpecialFields.value = isSpecialArea; showSpecialFields.value = isSpecialArea;
showCoordinateFields.value = isCoordinateArea; showCoordinateFields.value = isCoordinateArea;
@ -238,7 +222,6 @@
validatorRules.layerNum.splice(0); validatorRules.layerNum.splice(0);
validatorRules.positionX.splice(0); validatorRules.positionX.splice(0);
validatorRules.positionY.splice(0); validatorRules.positionY.splice(0);
validatorRules.nodeCode.splice(0);
// //
if (isSpecialArea) { if (isSpecialArea) {
@ -246,7 +229,6 @@
validatorRules.colNum.push({ required: true, message: '请输入巷道编码!' }); validatorRules.colNum.push({ required: true, message: '请输入巷道编码!' });
validatorRules.rowNum.push({ required: true, message: '请输入深度!' }); validatorRules.rowNum.push({ required: true, message: '请输入深度!' });
validatorRules.layerNum.push({ required: true, message: '请输入层!' }); validatorRules.layerNum.push({ required: true, message: '请输入层!' });
validatorRules.nodeCode.push({ required: true, message: '请输入储位编码!' });
} else { } else {
// pointCode // pointCode
validatorRules.pointCode.push({ required: true, message: '请输入编码!' }); validatorRules.pointCode.push({ required: true, message: '请输入编码!' });
@ -256,29 +238,6 @@
validatorRules.positionX.push({ required: true, message: '请输入坐标X!' }); validatorRules.positionX.push({ required: true, message: '请输入坐标X!' });
validatorRules.positionY.push({ required: true, message: '请输入坐标Y!' }); 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 = '';
}
}
} }
/** /**