update 生产计划页面添加优化

master
yinq 5 days ago
parent 736df1a77b
commit 09124bbd94

@ -58,7 +58,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="激活标识" align="center" prop="activeFlag" v-if="columns[7].visible"> <el-table-column label="激活标识" align="center" prop="activeFlag" v-if="columns[7].visible">
<template #default="scope"> <template #default="scope">1111
<dict-tag :options="active_flag" :value="scope.row.activeFlag"/> <dict-tag :options="active_flag" :value="scope.row.activeFlag"/>
</template> </template>
</el-table-column> </el-table-column>

@ -52,8 +52,8 @@
> >
<!-- <el-table-column label='主键标识' align='center' prop='materialBomId' />--> <!-- <el-table-column label='主键标识' align='center' prop='materialBomId' />-->
<!-- <el-table-column label='父级标识' align='center' prop='parentId' />--> <!-- <el-table-column label='父级标识' align='center' prop='parentId' />-->
<el-table-column label='物料ID' align='center' prop='materialId' /> <!-- <el-table-column label='物料ID' align='center' prop='materialId' />-->
<el-table-column label='物料名称' align='center' prop='materialName' /> <el-table-column label='物料名称' align='center' prop='materialName' width='180'/>
<el-table-column label='bom说明' align='center' prop='materialBomDesc' /> <el-table-column label='bom说明' align='center' prop='materialBomDesc' />
<el-table-column label='bom版本' align='center' prop='materialBomVersion' /> <el-table-column label='bom版本' align='center' prop='materialBomVersion' />
<!-- <el-table-column label='祖级列表' align='center' prop='ancestors' />--> <!-- <el-table-column label='祖级列表' align='center' prop='ancestors' />-->
@ -157,7 +157,7 @@ const data = reactive<PageData<MaterialBomForm, MaterialBomQuery>>({
materialBomVersion: undefined, materialBomVersion: undefined,
ancestors: undefined, ancestors: undefined,
standardAmount: undefined, standardAmount: undefined,
topFlag: undefined, topFlag: '1',
checkType: undefined, checkType: undefined,
projectId: undefined, projectId: undefined,
assembleTime: undefined, assembleTime: undefined,

@ -17,9 +17,9 @@
<!-- <el-option v-for='dict in mes_check_type' :key='dict.value' :label='dict.label' :value='dict.value' />--> <!-- <el-option v-for='dict in mes_check_type' :key='dict.value' :label='dict.label' :value='dict.value' />-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label='激活标识' prop='activeFlag'> <!-- <el-form-item label='激活标识' prop='activeFlag'>-->
<el-input v-model='queryParams.activeFlag' placeholder='请输入激活标识' clearable @keyup.enter='handleQuery' /> <!-- <el-input v-model='queryParams.activeFlag' placeholder='请输入激活标识' clearable @keyup.enter='handleQuery' />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type='primary' icon='Search' @click='handleQuery'>搜索</el-button> <el-button type='primary' icon='Search' @click='handleQuery'>搜索</el-button>
<el-button icon='Refresh' @click='resetQuery'>重置</el-button> <el-button icon='Refresh' @click='resetQuery'>重置</el-button>
@ -53,7 +53,7 @@
<!-- <el-table-column label='主键标识' align='center' prop='materialBomId' />--> <!-- <el-table-column label='主键标识' align='center' prop='materialBomId' />-->
<!-- <el-table-column label='父级标识' align='center' prop='parentId' />--> <!-- <el-table-column label='父级标识' align='center' prop='parentId' />-->
<!-- <el-table-column label='物料ID' align='center' prop='materialId' />--> <!-- <el-table-column label='物料ID' align='center' prop='materialId' />-->
<el-table-column label='物料名称' align='center' prop='materialName' /> <el-table-column label='物料名称' align='left' prop='materialName' width='300'/>
<el-table-column label='bom说明' align='center' prop='materialBomDesc' /> <el-table-column label='bom说明' align='center' prop='materialBomDesc' />
<el-table-column label='bom版本' align='center' prop='materialBomVersion' /> <el-table-column label='bom版本' align='center' prop='materialBomVersion' />
<!-- <el-table-column label='祖级列表' align='center' prop='ancestors' />--> <!-- <el-table-column label='祖级列表' align='center' prop='ancestors' />-->

@ -80,10 +80,10 @@
<el-table-column label="生产订单ID" align="center" prop="productOrderId" v-if="columns[2].visible" width="100"/> <el-table-column label="生产订单ID" align="center" prop="productOrderId" v-if="columns[2].visible" width="100"/>
<el-table-column label="销售订单ID" align="center" prop="saleOrderId" v-if="columns[3].visible"/> <el-table-column label="销售订单ID" align="center" prop="saleOrderId" v-if="columns[3].visible"/>
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" v-if="columns[4].visible"/> <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="planCode" v-if="columns[5].visible" width="120"/>
<el-table-column label="派工单号" align="center" prop="dispatchCode" v-if="columns[6].visible"/> <el-table-column label="派工单号" align="center" prop="dispatchCode" v-if="columns[6].visible"/>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[7].visible" width="160"/> <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="物料BOM" align="center" prop="materialBomName" v-if="columns[8].visible" width="160"/>
<el-table-column label="工序名称" align="center" prop="processName" 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="顺序" 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="上一工序ID" align="center" prop="lastProcessId" v-if="columns[11].visible" width="100"/>
@ -97,7 +97,7 @@
<dict-tag :options="mes_release_type" :value="scope.row.releaseType"/> <dict-tag :options="mes_release_type" :value="scope.row.releaseType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下达ID" align="center" prop="releaseId" v-if="columns[14].visible"/> <el-table-column label="下达机台" align="center" prop="releaseName" v-if="columns[14].visible"/>
<el-table-column label="单位生产时间(秒)" align="center" prop="productionTime" v-if="columns[15].visible"/> <el-table-column label="单位生产时间(秒)" align="center" prop="productionTime" v-if="columns[15].visible"/>
<el-table-column label="计划数量" align="center" prop="planAmount" v-if="columns[16].visible"/> <el-table-column label="计划数量" align="center" prop="planAmount" v-if="columns[16].visible"/>
<el-table-column label="派工数量" align="center" prop="dispatchAmount" v-if="columns[17].visible"/> <el-table-column label="派工数量" align="center" prop="dispatchAmount" v-if="columns[17].visible"/>
@ -180,10 +180,14 @@
<!-- <el-input v-model="form.dispatchCode" placeholder="请输入派工单号" />--> <!-- <el-input v-model="form.dispatchCode" placeholder="请输入派工单号" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="物料名称" prop="materialId"> <el-form-item label="物料名称" prop="materialId">
<el-input v-model="form.materialId" placeholder="请输入物料名称" /> <el-input v-model="form.materialName" placeholder="请点击检索物料" @click="handleMaterialAdd" readonly>
<template #append>
<el-icon class="el-input__icon" ><search/></el-icon>
</template>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="物料BOM" prop="materialName"> <el-form-item label="物料BOM" prop="materialBoMName">
<el-input v-model="form.materialName" placeholder="请点击检索物料BOM" @click="handleMaterialBomAdd" readonly> <el-input v-model="form.materialBoMName" placeholder="请点击检索物料BOM" @click="handleMaterialBomAdd" readonly>
<template #append> <template #append>
<el-icon class="el-input__icon" ><search/></el-icon> <el-icon class="el-input__icon" ><search/></el-icon>
</template> </template>
@ -313,6 +317,15 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 添加物料信息对话框 -->
<el-dialog title="选择物料信息" v-model="materialOpen" width='1200px' append-to-body>
<MaterialSelect @selection="handleSelection" ref="materialSelectRef" v-if="materialOpen"></MaterialSelect>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitMaterialForm"> </el-button>
<el-button @click="materialOpen = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -322,6 +335,7 @@ import { PlanInfoVO, PlanInfoQuery, PlanInfoForm } from '@/api/mes/planInfo/type
import { getBaseShiftInfoList } from '@/api/mes/baseShiftInfo'; import { getBaseShiftInfoList } from '@/api/mes/baseShiftInfo';
import { getBaseClassTeamInfoList } from '@/api/mes/baseClassTeamInfo'; import { getBaseClassTeamInfoList } from '@/api/mes/baseClassTeamInfo';
import BomSelect from '@/views/mes/materialBom/addBom.vue'; import BomSelect from '@/views/mes/materialBom/addBom.vue';
import MaterialSelect from '@/views/mes/baseMaterialInfo/addMaterial.vue';
import { getProcessInfoList } from '@/api/mes/baseProcessInfo'; import { getProcessInfoList } from '@/api/mes/baseProcessInfo';
import { getStationInfoList } from '@/api/mes/baseStationInfo'; import { getStationInfoList } from '@/api/mes/baseStationInfo';
@ -351,6 +365,8 @@ const processList = ref([]);
let stationList = ref([]); let stationList = ref([]);
const materialBomOpen = ref(false); const materialBomOpen = ref(false);
const bomSelectRef = ref(); const bomSelectRef = ref();
const materialOpen = ref(false);
const materialSelectRef = ref();
/*获取班次下拉框*/ /*获取班次下拉框*/
const getShiftSelect = async () => { const getShiftSelect = async () => {
@ -388,9 +404,9 @@ const columns = ref<FieldOption[]>([
{ key: 7, label: `物料名称`, visible: true }, { key: 7, label: `物料名称`, visible: true },
{ key: 8, label: `物料BOM`, visible: true }, { key: 8, label: `物料BOM`, visible: true },
{ key: 9, label: `工序名称`, visible: true }, { key: 9, label: `工序名称`, visible: true },
{ key: 10, label: `顺序`, visible: true }, { key: 10, label: `顺序`, visible: false },
{ key: 11, label: `上一工序ID`, visible: true }, { key: 11, label: `上一工序ID`, visible: false },
{ key: 12, label: `最后工序标识`, visible: true }, { key: 12, label: `最后工序标识`, visible: false },
{ key: 13, label: `下达类型`, visible: true }, { key: 13, label: `下达类型`, visible: true },
{ key: 14, label: `下达ID`, visible: true }, { key: 14, label: `下达ID`, visible: true },
{ key: 15, label: `单位生产时间(秒)`, visible: false }, { key: 15, label: `单位生产时间(秒)`, visible: false },
@ -449,6 +465,7 @@ const initFormData: PlanInfoForm = {
classTeamId: undefined, classTeamId: undefined,
modelCode: undefined, modelCode: undefined,
remark: undefined, remark: undefined,
materialBoMName: undefined,
} }
const data = reactive<PageData<PlanInfoForm, PlanInfoQuery>>({ const data = reactive<PageData<PlanInfoForm, PlanInfoQuery>>({
form: {...initFormData}, form: {...initFormData},
@ -607,10 +624,23 @@ const handleMaterialBomAdd = () => {
const submitMaterialBomForm = () => { const submitMaterialBomForm = () => {
let selectedRow = bomSelectRef.value.tableRef.store.states.currentRow.value; let selectedRow = bomSelectRef.value.tableRef.store.states.currentRow.value;
form.value.materialBomId = selectedRow.materialBomId form.value.materialBomId = selectedRow.materialBomId
form.value.materialName = selectedRow.materialName form.value.materialBoMName = selectedRow.materialName
materialBomOpen.value = false; materialBomOpen.value = false;
} }
/** 新增按钮操作 */
const handleMaterialAdd = () => {
materialOpen.value = true;
}
/** 提交物料BOM信息按钮 */
const submitMaterialForm = () => {
let selectedRow = materialSelectRef.value.tableRef.store.states.currentRow.value;
form.value.materialId = selectedRow.materialId
form.value.materialName = selectedRow.materialName
materialOpen.value = false;
}
onMounted(() => { onMounted(() => {
getShiftSelect(); getShiftSelect();
getClassTeamSelect(); getClassTeamSelect();

Loading…
Cancel
Save