update update 生产订单、生产计划优化查询

master
yinq 1 week ago
parent e1d0d022ec
commit 9e72087a76

@ -61,3 +61,16 @@ export const delBaseClassTeamInfo = (classTeamId: string | number | Array<string
method: 'delete'
});
};
/**
*
* @param query
* @returns {*}
*/
export function getBaseClassTeamInfoList (query) {
return request({
url: '/mes/baseClassTeamInfo/getBaseClassTeamInfoList',
method: 'get',
params: query
});
};

@ -16,9 +16,9 @@
<!-- <el-form-item label="物料BOM" prop="materialBomId">-->
<!-- <el-input v-model="queryParams.materialBomId" placeholder="请输入物料BOM" clearable @keyup.enter="handleQuery" />-->
<!-- </el-form-item>-->
<el-form-item label="工序ID" prop="processId">
<el-input v-model="queryParams.processId" placeholder="请输入工序ID" clearable @keyup.enter="handleQuery" />
</el-form-item>
<!-- <el-form-item label="工序ID" prop="processId">-->
<!-- <el-input v-model="queryParams.processId" placeholder="请输入工序ID" clearable @keyup.enter="handleQuery" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="下达ID" prop="releaseId">-->
<!-- <el-input v-model="queryParams.releaseId" placeholder="请输入下达ID" clearable @keyup.enter="handleQuery" />-->
<!-- </el-form-item>-->
@ -35,11 +35,11 @@
<el-option v-for="dict in mes_plan_status" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<!-- <el-form-item label="班次ID" prop="shiftId">-->
<!-- <el-input v-model="queryParams.shiftId" placeholder="请输入班次ID" clearable @keyup.enter="handleQuery" />-->
<!-- <el-form-item label="班次" prop="shiftId">-->
<!-- <el-input v-model="queryParams.shiftId" placeholder="请输入班次" clearable @keyup.enter="handleQuery" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="班组ID" prop="classTeamId">-->
<!-- <el-input v-model="queryParams.classTeamId" placeholder="请输入班组ID" clearable @keyup.enter="handleQuery" />-->
<!-- <el-form-item label="班组" prop="classTeamId">-->
<!-- <el-input v-model="queryParams.classTeamId" placeholder="请输入班组" clearable @keyup.enter="handleQuery" />-->
<!-- </el-form-item>-->
<el-form-item label="模号" prop="modelCode">
<el-select v-model="queryParams.modelCode" placeholder="请选择模号" clearable >
@ -82,9 +82,9 @@
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" v-if="columns[4].visible"/>
<el-table-column label="计划编号" align="center" prop="planCode" v-if="columns[5].visible" width="100"/>
<el-table-column label="派工单号" align="center" prop="dispatchCode" v-if="columns[6].visible"/>
<el-table-column label="物料ID" align="center" prop="materialId" v-if="columns[7].visible"/>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[7].visible" width="160"/>
<el-table-column label="物料BOM" align="center" prop="materialBomId" v-if="columns[8].visible" width="100"/>
<el-table-column label="工序ID" align="center" prop="processId" v-if="columns[9].visible"/>
<el-table-column label="工序名称" align="center" prop="processName" v-if="columns[9].visible"/>
<el-table-column label="顺序" align="center" prop="processOrder" v-if="columns[10].visible"/>
<el-table-column label="上一工序ID" align="center" prop="lastProcessId" v-if="columns[11].visible" width="100"/>
<el-table-column label="最后工序标识" align="center" prop="finalProcessFlag" v-if="columns[12].visible" width="110">
@ -139,8 +139,8 @@
</template>
</el-table-column>
<el-table-column label="优先级" align="center" prop="priority" v-if="columns[27].visible"/>
<el-table-column label="班次ID" align="center" prop="shiftId" v-if="columns[28].visible"/>
<el-table-column label="班组ID" align="center" prop="classTeamId" v-if="columns[29].visible"/>
<el-table-column label="班次" align="center" prop="shiftName" v-if="columns[28].visible"/>
<el-table-column label="班组" align="center" prop="teamName" v-if="columns[29].visible"/>
<el-table-column label="模号" align="center" prop="modelCode" v-if="columns[30].visible">
<template #default="scope">
<dict-tag :options="mes_model_code" :value="scope.row.modelCode"/>
@ -179,18 +179,18 @@
<el-form-item label="派工单号" prop="dispatchCode">
<el-input v-model="form.dispatchCode" placeholder="请输入派工单号" />
</el-form-item>
<el-form-item label="物料ID" prop="materialId">
<el-input v-model="form.materialId" placeholder="请输入物料ID" />
<el-form-item label="物料名称" prop="materialId">
<el-input v-model="form.materialId" placeholder="请输入物料名称" />
</el-form-item>
<el-form-item label="物料BOM" prop="materialBomId">
<el-input v-model="form.materialBomId" placeholder="请输入物料BOM" />
</el-form-item>
<el-form-item label="工序ID" prop="processId">
<el-input v-model="form.processId" placeholder="请输入工序ID" />
</el-form-item>
<el-form-item label="顺序" prop="processOrder">
<el-input-number v-model="form.processOrder" placeholder="请输入顺序" style="width: 200px;"/>
<el-form-item label="工序名称" prop="processId">
<el-input v-model="form.processId" placeholder="请输入工序名称" />
</el-form-item>
<!-- <el-form-item label="顺序" prop="processOrder">-->
<!-- <el-input-number v-model="form.processOrder" placeholder="请输入顺序" style="width: 200px;"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="上一工序ID" prop="lastProcessId">-->
<!-- <el-input v-model="form.lastProcessId" placeholder="请输入上一工序ID" />-->
<!-- </el-form-item>-->
@ -246,11 +246,24 @@
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="form.priority" placeholder="请输入优先级" style="width: 200px;" />
</el-form-item>
<el-form-item label="班次ID" prop="shiftId">
<el-input v-model="form.shiftId" placeholder="请输入班次ID" />
<el-form-item label="班次" prop="shiftId">
<el-radio-group v-model="form.shiftId">
<el-radio
v-for="dict in shiftList"
:key="dict.shiftId"
:value="dict.shiftId"
>{{dict.shiftName}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="班组ID" prop="classTeamId">
<el-input v-model="form.classTeamId" placeholder="请输入班组ID" />
<el-form-item label="班组" prop="classTeamId">
<el-select v-model="form.classTeamId" placeholder="请选择班组">
<el-option
v-for="item in classTeamList"
:key="item.classTeamId"
:label="item.teamName"
:value="item.classTeamId"
/>
</el-select>
</el-form-item>
<el-form-item label="模号" prop="modelCode">
<el-radio-group v-model="form.modelCode">
@ -278,6 +291,8 @@
<script setup name="PlanInfo" lang="ts">
import { listPlanInfo, getPlanInfo, delPlanInfo, addPlanInfo, updatePlanInfo } from '@/api/mes/planInfo';
import { PlanInfoVO, PlanInfoQuery, PlanInfoForm } from '@/api/mes/planInfo/types';
import { getBaseShiftInfoList } from '@/api/mes/baseShiftInfo';
import { getBaseClassTeamInfoList } from '@/api/mes/baseClassTeamInfo';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { mes_import_flag, active_flag, mes_plan_status, mes_release_type, mes_finish_flag, mes_model_code } = toRefs<any>(proxy?.useDict('mes_import_flag', 'active_flag', 'mes_plan_status', 'mes_release_type', 'mes_finish_flag', 'mes_model_code'));
@ -299,6 +314,22 @@ const dialog = reactive<DialogOption>({
title: ''
});
const shiftList = ref([]);
const classTeamList = ref([]);
/*获取班次下拉框*/
const getShiftSelect = async () => {
let res = await getBaseShiftInfoList(null);
shiftList.value = res.data;
};
/*获取班组下拉框*/
const getClassTeamSelect = async () => {
let res = await getBaseClassTeamInfoList(null);
classTeamList.value = res.data;
};
//
const columns = ref<FieldOption[]>([
{ key: 0, label: `主键标识`, visible: false },
@ -308,9 +339,9 @@ const columns = ref<FieldOption[]>([
{ key: 4, label: `销售订单编号`, visible: false },
{ key: 5, label: `计划编号`, visible: true },
{ key: 6, label: `派工单号`, visible: true },
{ key: 7, label: `物料ID`, visible: true },
{ key: 7, label: `物料名称`, visible: true },
{ key: 8, label: `物料BOM`, visible: true },
{ key: 9, label: `工序ID`, visible: true },
{ key: 9, label: `工序名称`, visible: true },
{ key: 10, label: `顺序`, visible: true },
{ key: 11, label: `上一工序ID`, visible: true },
{ key: 12, label: `最后工序标识`, visible: true },
@ -326,11 +357,11 @@ const columns = ref<FieldOption[]>([
{ key: 22, label: `实际完成时间`, visible: true },
{ key: 23, label: `附件信息`, visible: true },
{ key: 24, label: `计划状态`, visible: true },
{ key: 25, label: `导入类型`, visible: true },
{ key: 25, label: `导入类型`, visible: false },
{ key: 26, label: `完成标识`, visible: true },
{ key: 27, label: `优先级`, visible: true },
{ key: 28, label: `班次ID`, visible: true },
{ key: 29, label: `班组ID`, visible: true },
{ key: 28, label: `班次`, visible: true },
{ key: 29, label: `班组`, visible: true },
{ key: 30, label: `模号`, visible: true },
{ key: 31, label: `备注`, visible: false },
{ key: 32, label: `创建部门`, visible: false },
@ -367,7 +398,7 @@ const initFormData: PlanInfoForm = {
planStatus: undefined,
importFlag: undefined,
finishFlag: [],
priority: undefined,
priority: 1,
shiftId: undefined,
classTeamId: undefined,
modelCode: undefined,
@ -416,7 +447,7 @@ const data = reactive<PageData<PlanInfoForm, PlanInfoQuery>>({
{ required: true, message: "计划编号不能为空", trigger: "blur" }
],
materialId: [
{ required: true, message: "物料ID不能为空", trigger: "blur" }
{ required: true, message: "物料名称不能为空", trigger: "blur" }
],
materialBomId: [
{ required: true, message: "物料BOM不能为空", trigger: "blur" }
@ -525,6 +556,8 @@ const handleExport = () => {
}
onMounted(() => {
getShiftSelect();
getClassTeamSelect();
getList();
});
</script>

Loading…
Cancel
Save