change - 生产计划页面

master
yinq 1 year ago
parent 63ae8da92d
commit 5fb6079850

@ -35,6 +35,16 @@ export function updateOrderInfo(data) {
}) })
} }
// 下达工单计划
export function releaseOrderPlan(data) {
return request({
url: '/production/planInfo/releaseOrderPlan',
method: 'post',
data: data
})
}
// 删除工单信息 // 删除工单信息
export function delOrderInfo(objId) { export function delOrderInfo(objId) {
return request({ return request({

@ -87,7 +87,7 @@
<el-table v-loading="loading" :data="orderInfoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="orderInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/> <el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="工单编号" align="center" prop="orderCode" v-if="columns[1].visible"/> <el-table-column label="工单编号" align="center" prop="orderCode" v-if="columns[1].visible" fixed/>
<el-table-column label="销售订单编号" align="center" prop="saleOrderCode" v-if="columns[2].visible"/> <el-table-column label="销售订单编号" align="center" prop="saleOrderCode" v-if="columns[2].visible"/>
<el-table-column label="销售订单行号" align="center" prop="saleOrderLineNumber" v-if="columns[3].visible"/> <el-table-column label="销售订单行号" align="center" prop="saleOrderLineNumber" v-if="columns[3].visible"/>
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[4].visible"/> <el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[4].visible"/>
@ -105,6 +105,11 @@
<dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/> <dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否已下达计划" align="center" prop="isRelease" v-if="columns[20].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_release" :value="scope.row.isRelease"/>
</template>
</el-table-column>
<el-table-column label="开始日期" align="center" prop="beginDate" width="180" v-if="columns[11].visible"> <el-table-column label="开始日期" align="center" prop="beginDate" width="180" v-if="columns[11].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d}') }}</span>
@ -143,17 +148,23 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-bottom"
@click="handleUpdate(scope.row)" @click="handleReleasePlan(scope.row)"
v-hasPermi="['base:orderInfo:edit']" >下达计划</el-button>
>修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-edit"
@click="handleDelete(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['base:orderInfo:remove']" v-hasPermi="['base:orderInfo:edit']"
>删除</el-button> >修改工单</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['base:orderInfo:remove']"-->
<!-- >删除</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -259,11 +270,18 @@
</template> </template>
<script> <script>
import { listOrderInfo, getOrderInfo, delOrderInfo, addOrderInfo, updateOrderInfo } from "@/api/base/orderInfo"; import {
listOrderInfo,
getOrderInfo,
delOrderInfo,
addOrderInfo,
updateOrderInfo,
releaseOrderPlan
} from '@/api/base/orderInfo'
export default { export default {
name: "OrderInfo", name: "OrderInfo",
dicts: ['order_status', 'order_type', 'is_flag'], dicts: ['order_status', 'order_type', 'is_flag', 'is_release'],
data() { data() {
return { return {
// //
@ -302,6 +320,7 @@ export default {
endDate: null, endDate: null,
factoryCode: null, factoryCode: null,
isFlag: null, isFlag: null,
isRelease: null,
createdBy: null, createdBy: null,
createdTime: null, createdTime: null,
updatedBy: null, updatedBy: null,
@ -334,6 +353,7 @@ export default {
{ key: 17, label: `更新人`, visible: false }, { key: 17, label: `更新人`, visible: false },
{ key: 18, label: `更新时间`, visible: false }, { key: 18, label: `更新时间`, visible: false },
{ key: 19, label: `完成日期`, visible: true }, { key: 19, label: `完成日期`, visible: true },
{ key: 20, label: `是否已下达计划`, visible: true },
] ]
}; };
}, },
@ -373,6 +393,7 @@ export default {
endDate: null, endDate: null,
factoryCode: null, factoryCode: null,
isFlag: 0, isFlag: 0,
isRelease: null,
createdBy: null, createdBy: null,
createdTime: null, createdTime: null,
updatedBy: null, updatedBy: null,
@ -413,6 +434,22 @@ export default {
this.title = "修改工单信息"; this.title = "修改工单信息";
}); });
}, },
/** 下达计划 */
handleReleasePlan(row){
if (row.isRelease === 0){
this.$modal.msgWarning("该工单已下达计划!");
return;
}
this.$modal.confirm('是否下达工单编号为:"' + row.orderCode + '"的工单计划?').then(function() {
return releaseOrderPlan(row);
}).then(() => {
this.getList();
this.$modal.msgSuccess("下达工单计划成功");
}).catch((e) => {
console.log("下达计划错误信息:",e);
});
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

@ -133,7 +133,7 @@
<el-input v-model="form.standardAmount" placeholder="请输入标准数量" /> <el-input v-model="form.standardAmount" placeholder="请输入标准数量" />
</el-form-item> </el-form-item>
<el-form-item label="物料类型" prop="materialType"> <el-form-item label="物料类型" prop="materialType">
<el-select v-model="form.materialType" placeholder="请选择物料类型" :disabled="true"> <el-select v-model="form.materialType" placeholder="请选择物料类型">
<el-option <el-option
v-for="dict in dict.type.material_type" v-for="dict in dict.type.material_type"
:key="dict.value" :key="dict.value"

@ -108,7 +108,7 @@
<el-table-column label="销售订单行号" align="center" prop="saleorderLinenumber" v-if="columns[4].visible"/> <el-table-column label="销售订单行号" align="center" prop="saleorderLinenumber" v-if="columns[4].visible"/>
<el-table-column label="物料编号" align="center" prop="materialCode" v-if="columns[5].visible"/> <el-table-column label="物料编号" align="center" prop="materialCode" v-if="columns[5].visible"/>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[6].visible"/> <el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[6].visible"/>
<el-table-column label="计划工位" align="center" prop="productLineCode" v-if="columns[7].visible"/> <el-table-column label="计划工位" align="center" prop="productLineName" v-if="columns[7].visible"/>
<el-table-column label="计划数量" align="center" prop="planAmount" v-if="columns[8].visible"/> <el-table-column label="计划数量" align="center" prop="planAmount" v-if="columns[8].visible"/>
<el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[9].visible"/> <el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[9].visible"/>
<el-table-column label="开始时间" align="center" prop="beginTime" width="180" v-if="columns[10].visible"> <el-table-column label="开始时间" align="center" prop="beginTime" width="180" v-if="columns[10].visible">
@ -168,27 +168,34 @@
<!-- 添加或修改生产计划对话框 --> <!-- 添加或修改生产计划对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="计划编号" prop="planCode"> <el-form-item label="计划编号" prop="planCode">
<el-input v-model="form.planCode" placeholder="请输入计划编号" /> <el-input v-model="form.planCode" placeholder="请输入计划编号" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="工单编号" prop="orderCode"> <el-form-item label="工单编号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入工单编号" /> <el-input v-model="form.orderCode" placeholder="请输入工单编号" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="销售订单编号" prop="saleOrderCode"> <el-form-item label="销售订单编号" prop="saleOrderCode">
<el-input v-model="form.saleOrderCode" placeholder="请输入销售订单编号" /> <el-input v-model="form.saleOrderCode" placeholder="请输入销售订单编号" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="销售订单行号" prop="saleorderLinenumber"> <el-form-item label="销售订单行号" prop="saleorderLinenumber">
<el-input v-model="form.saleorderLinenumber" placeholder="请输入销售订单行号" /> <el-input v-model="form.saleorderLinenumber" placeholder="请输入销售订单行号" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="物料编号" prop="materialCode"> <el-form-item label="物料编号" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料编号" /> <el-input v-model="form.materialCode" placeholder="请输入物料编号" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请输入物料名称" /> <el-input v-model="form.materialName" placeholder="请输入物料名称" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="计划工位" prop="productLineCode"> <el-form-item label="计划工位">
<el-input v-model="form.productLineCode" placeholder="请输入计划工位" /> <el-select v-model="form.productLineCode" placeholder="请选择产线工位">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="计划数量" prop="planAmount"> <el-form-item label="计划数量" prop="planAmount">
<el-input v-model="form.planAmount" placeholder="请输入计划数量" /> <el-input v-model="form.planAmount" placeholder="请输入计划数量" />
@ -223,6 +230,7 @@
<script> <script>
import { listPlanInfo, getPlanInfo, delPlanInfo, addPlanInfo, updatePlanInfo } from "@/api/production/planInfo"; import { listPlanInfo, getPlanInfo, delPlanInfo, addPlanInfo, updatePlanInfo } from "@/api/production/planInfo";
import { findProductLineList } from '@//api/base/productLine'
export default { export default {
name: "PlanInfo", name: "PlanInfo",
@ -295,11 +303,16 @@ export default {
{ key: 14, label: `创建时间`, visible: false }, { key: 14, label: `创建时间`, visible: false },
{ key: 15, label: `更新人`, visible: false }, { key: 15, label: `更新人`, visible: false },
{ key: 16, label: `更新时间`, visible: false }, { key: 16, label: `更新时间`, visible: false },
] ],
// 线
productLineList: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
findProductLineList().then(response => {
this.productLineList = response.data;
});
}, },
methods: { methods: {
/** 查询生产计划列表 */ /** 查询生产计划列表 */

Loading…
Cancel
Save