|
|
|
@ -1,124 +1,126 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
|
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="100px" size="small">
|
|
|
|
|
<el-form-item label="生产工单编号" prop="orderCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.orderCode"
|
|
|
|
|
placeholder="请输入生产工单编号"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入生产工单编号"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="计划编号" prop="planCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.planCode"
|
|
|
|
|
placeholder="请输入计划编号"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入计划编号"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="派工单号" prop="dispatchCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.dispatchCode"
|
|
|
|
|
placeholder="请输入派工单号"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入派工单号"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
|
<el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery">搜索</el-button>
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="productplanList" @selection-change="handleSelectionChange"
|
|
|
|
|
<el-table v-loading="loading" :data="productplanList" highlight-current-row
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
@row-click="handleRowClick"
|
|
|
|
|
highlight-current-row
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" v-if="false" />
|
|
|
|
|
<el-table-column label="主键标识" align="center" prop="planId" v-if="columns[0].visible"/>
|
|
|
|
|
<el-table-column label="生产工单编号" align="center" prop="orderCode" v-if="columns[1].visible" width="100"/>
|
|
|
|
|
<el-table-column label="计划编号" align="center" prop="planCode" v-if="columns[2].visible" width="110"/>
|
|
|
|
|
<el-table-column label="派工单号" align="center" prop="dispatchCode" v-if="columns[3].visible" width="110"/>
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[4].visible"/>
|
|
|
|
|
<el-table-column label="物料BOM名称" align="center" prop="materialBomName" v-if="columns[5].visible" width="110"/>
|
|
|
|
|
<el-table-column label="工序名称" align="center" prop="processName" v-if="columns[6].visible"/>
|
|
|
|
|
<el-table-column label="顺序" align="center" prop="processOrder" v-if="columns[7].visible"/>
|
|
|
|
|
<el-table-column label="上一工序名称" align="center" prop="lastProcessName" v-if="columns[8].visible" width="100"/>
|
|
|
|
|
<el-table-column label="工位名称" align="center" prop="stationName" v-if="columns[9].visible"/>
|
|
|
|
|
<el-table-column label="用户ID" align="center" prop="userId" v-if="columns[10].visible"/>
|
|
|
|
|
<el-table-column label="标准工时" align="center" prop="productionTime" v-if="columns[11].visible"/>
|
|
|
|
|
<el-table-column label="计划数量" align="center" prop="planAmount" v-if="columns[12].visible"/>
|
|
|
|
|
<el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[13].visible"/>
|
|
|
|
|
<el-table-column label="计划开始时间" align="center" prop="planBeginTime" width="180" v-if="columns[14].visible">
|
|
|
|
|
<el-table-column v-if="false" align="center" type="selection" width="55"/>
|
|
|
|
|
<el-table-column v-if="columns[0].visible" align="center" label="主键标识" prop="planId"/>
|
|
|
|
|
<el-table-column v-if="columns[1].visible" align="center" label="生产工单编号" prop="orderCode" width="100"/>
|
|
|
|
|
<el-table-column v-if="columns[2].visible" align="center" label="计划编号" prop="planCode" width="110"/>
|
|
|
|
|
<el-table-column v-if="columns[3].visible" align="center" label="派工单号" prop="dispatchCode" width="110"/>
|
|
|
|
|
<el-table-column v-if="columns[4].visible" align="center" label="物料名称" prop="materialName"/>
|
|
|
|
|
<el-table-column v-if="columns[5].visible" align="center" label="物料BOM名称" prop="materialBomName" width="110"/>
|
|
|
|
|
<el-table-column v-if="columns[6].visible" align="center" label="工序名称" prop="processName"/>
|
|
|
|
|
<el-table-column v-if="columns[7].visible" align="center" label="顺序" prop="processOrder"/>
|
|
|
|
|
<el-table-column v-if="columns[8].visible" align="center" label="上一工序名称" prop="lastProcessName" width="100"/>
|
|
|
|
|
<el-table-column v-if="columns[9].visible" align="center" label="工位名称" prop="stationName"/>
|
|
|
|
|
<el-table-column v-if="columns[10].visible" align="center" label="用户ID" prop="userId"/>
|
|
|
|
|
<el-table-column v-if="columns[11].visible" align="center" label="标准工时" prop="productionTime"/>
|
|
|
|
|
<el-table-column v-if="columns[12].visible" align="center" label="计划数量" prop="planAmount"/>
|
|
|
|
|
<el-table-column v-if="columns[13].visible" align="center" label="完成数量" prop="completeAmount"/>
|
|
|
|
|
<el-table-column v-if="columns[14].visible" align="center" label="计划开始时间" prop="planBeginTime" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.planBeginTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
<span>{{ parseTime(scope.row.planBeginTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="计划结束时间" align="center" prop="planEndTime" width="180" v-if="columns[15].visible">
|
|
|
|
|
<el-table-column v-if="columns[15].visible" align="center" label="计划结束时间" prop="planEndTime" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.planEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
<span>{{ parseTime(scope.row.planEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="实际开始时间" align="center" prop="realBeginTime" width="180" v-if="columns[16].visible">
|
|
|
|
|
<el-table-column v-if="columns[16].visible" align="center" label="实际开始时间" prop="realBeginTime" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.realBeginTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
<span>{{ parseTime(scope.row.realBeginTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="实际完成时间" align="center" prop="realEndTime" width="180" v-if="columns[17].visible">
|
|
|
|
|
<el-table-column v-if="columns[17].visible" align="center" label="实际完成时间" prop="realEndTime" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.realEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
<span>{{ parseTime(scope.row.realEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="附件信息" align="center" prop="attachId" v-if="columns[18].visible"/>
|
|
|
|
|
<el-table-column label="计划状态" align="center" prop="planStatus" v-if="columns[19].visible" >
|
|
|
|
|
<el-table-column v-if="columns[18].visible" align="center" label="附件信息" prop="attachId"/>
|
|
|
|
|
<el-table-column v-if="columns[19].visible" align="center" label="计划状态" prop="planStatus">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.product_status" :value="scope.row.planStatus"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[20].visible" >
|
|
|
|
|
<el-table-column v-if="columns[20].visible" align="center" label="是否标识" prop="isFlag">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.active_flag" :value="scope.row.isFlag"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[21].visible"/>
|
|
|
|
|
<el-table-column label="创建人" align="center" prop="createBy" v-if="columns[22].visible"/>
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[23].visible">
|
|
|
|
|
<el-table-column v-if="columns[21].visible" align="center" label="备注" prop="remark"/>
|
|
|
|
|
<el-table-column v-if="columns[22].visible" align="center" label="创建人" prop="createBy"/>
|
|
|
|
|
<el-table-column v-if="columns[23].visible" align="center" label="创建时间" prop="createTime" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="更新人" align="center" prop="updateBy" v-if="columns[24].visible"/>
|
|
|
|
|
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" v-if="columns[25].visible">
|
|
|
|
|
<el-table-column v-if="columns[24].visible" align="center" label="更新人" prop="updateBy"/>
|
|
|
|
|
<el-table-column v-if="columns[25].visible" align="center" label="更新时间" prop="updateTime" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['mes:productplan:edit']"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['mes:productplan:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
>修改
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['mes:productplan:remove']"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
v-hasPermi="['mes:productplan:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total>0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:total="total"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
@ -126,7 +128,13 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listProductplan, getProductplan, delProductplan, addProductplan, updateProductplan } from "@/api/mes/productplan";
|
|
|
|
|
import {
|
|
|
|
|
listProductplan,
|
|
|
|
|
getProductplan,
|
|
|
|
|
delProductplan,
|
|
|
|
|
addProductplan,
|
|
|
|
|
updateProductplan
|
|
|
|
|
} from "@/api/mes/productplan";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Productplan",
|
|
|
|
@ -190,64 +198,80 @@ export default {
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
productOrderId: [
|
|
|
|
|
{ required: true, message: "生产工单ID不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "生产工单ID不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
planCode: [
|
|
|
|
|
{ required: true, message: "计划编号不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "计划编号不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
dispatchCode: [
|
|
|
|
|
{ required: true, message: "派工单号不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "派工单号不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
materialId: [
|
|
|
|
|
{ required: true, message: "物料ID不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "物料ID不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
materialBomId: [
|
|
|
|
|
{ required: true, message: "物料bomID不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "物料bomID不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
stationId: [
|
|
|
|
|
{ required: true, message: "工位ID不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "工位ID不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
planStatus: [
|
|
|
|
|
{ required: true, message: "计划状态不能为空", trigger: "change" }
|
|
|
|
|
{required: true, message: "计划状态不能为空", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
isFlag: [
|
|
|
|
|
{ required: true, message: "是否标识不能为空", trigger: "change" }
|
|
|
|
|
{required: true, message: "是否标识不能为空", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
columns: [
|
|
|
|
|
{ key: 0, label: `主键标识`, visible: false },
|
|
|
|
|
{ key: 1, label: `生产工单编号`, visible: true },
|
|
|
|
|
{ key: 2, label: `计划编号`, visible: true },
|
|
|
|
|
{ key: 3, label: `派工单号`, visible: true },
|
|
|
|
|
{ key: 4, label: `物料名称`, visible: true },
|
|
|
|
|
{ key: 5, label: `物料BOM名称`, visible: true },
|
|
|
|
|
{ key: 6, label: `工序名称`, visible: true },
|
|
|
|
|
{ key: 7, label: `顺序`, visible: true },
|
|
|
|
|
{ key: 8, label: `上一工序名称`, visible: true },
|
|
|
|
|
{ key: 9, label: `工位名称`, visible: true },
|
|
|
|
|
{ key: 10, label: `用户ID`, visible: true },
|
|
|
|
|
{ key: 11, label: `标准工时`, visible: true },
|
|
|
|
|
{ key: 12, label: `计划数量`, visible: true },
|
|
|
|
|
{ key: 13, label: `完成数量`, visible: true },
|
|
|
|
|
{ key: 14, label: `计划开始时间`, visible: true },
|
|
|
|
|
{ key: 15, label: `计划结束时间`, visible: true },
|
|
|
|
|
{ key: 16, label: `实际开始时间`, visible: true },
|
|
|
|
|
{ key: 17, label: `实际完成时间`, visible: true },
|
|
|
|
|
{ key: 18, label: `附件信息`, visible: true },
|
|
|
|
|
{ key: 19, label: `计划状态`, visible: true },
|
|
|
|
|
{ key: 20, label: `是否标识`, visible: false },
|
|
|
|
|
{ key: 21, label: `备注`, visible: false },
|
|
|
|
|
{ key: 22, label: `创建人`, visible: false },
|
|
|
|
|
{ key: 23, label: `创建时间`, visible: true },
|
|
|
|
|
{ key: 24, label: `更新人`, visible: false },
|
|
|
|
|
{ key: 25, label: `更新时间`, visible: false },
|
|
|
|
|
{key: 0, label: `主键标识`, visible: false},
|
|
|
|
|
{key: 1, label: `生产工单编号`, visible: true},
|
|
|
|
|
{key: 2, label: `计划编号`, visible: true},
|
|
|
|
|
{key: 3, label: `派工单号`, visible: true},
|
|
|
|
|
{key: 4, label: `物料名称`, visible: true},
|
|
|
|
|
{key: 5, label: `物料BOM名称`, visible: true},
|
|
|
|
|
{key: 6, label: `工序名称`, visible: true},
|
|
|
|
|
{key: 7, label: `顺序`, visible: true},
|
|
|
|
|
{key: 8, label: `上一工序名称`, visible: true},
|
|
|
|
|
{key: 9, label: `工位名称`, visible: true},
|
|
|
|
|
{key: 10, label: `用户ID`, visible: true},
|
|
|
|
|
{key: 11, label: `标准工时`, visible: true},
|
|
|
|
|
{key: 12, label: `计划数量`, visible: true},
|
|
|
|
|
{key: 13, label: `完成数量`, visible: true},
|
|
|
|
|
{key: 14, label: `计划开始时间`, visible: true},
|
|
|
|
|
{key: 15, label: `计划结束时间`, visible: true},
|
|
|
|
|
{key: 16, label: `实际开始时间`, visible: true},
|
|
|
|
|
{key: 17, label: `实际完成时间`, visible: true},
|
|
|
|
|
{key: 18, label: `附件信息`, visible: true},
|
|
|
|
|
{key: 19, label: `计划状态`, visible: true},
|
|
|
|
|
{key: 20, label: `是否标识`, visible: false},
|
|
|
|
|
{key: 21, label: `备注`, visible: false},
|
|
|
|
|
{key: 22, label: `创建人`, visible: false},
|
|
|
|
|
{key: 23, label: `创建时间`, visible: true},
|
|
|
|
|
{key: 24, label: `更新人`, visible: false},
|
|
|
|
|
{key: 25, label: `更新时间`, visible: false},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
if(this.defineData?.planCode){
|
|
|
|
|
this.getData()
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
defineData: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getData() {
|
|
|
|
|
this.queryParams = {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
planCode: this.defineData.planCode,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/** 查询生产派工列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -312,7 +336,7 @@ export default {
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.planId)
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|