change - 通过生成计划添加成品条码

master
yinq 8 months ago
parent 4eb03be936
commit 6322c2fd0a

@ -155,6 +155,32 @@ public class MesProductPlan extends BaseEntity
/** 工单已派工数量 */
private BigDecimal dispatchedAmount;
/**
* ID,mes_sale_orderorder_id;
*/
private Long saleOrderId;
/**
*
*/
private String saleorderCode;
public Long getSaleOrderId() {
return saleOrderId;
}
public void setSaleOrderId(Long saleOrderId) {
this.saleOrderId = saleOrderId;
}
public String getSaleorderCode() {
return saleorderCode;
}
public void setSaleorderCode(String saleorderCode) {
this.saleorderCode = saleorderCode;
}
public String getSopId() {
return sopId;
}

@ -41,6 +41,8 @@
<result property="processName" column="process_name"/>
<result property="stationName" column="station_name"/>
<result property="sopId" column="sop_id"/>
<result property="saleOrderId" column="sale_order_id"/>
<result property="saleorderCode" column="saleorder_code"/>
</resultMap>
<resultMap id="MesProductPlanMesProductPlanDetailResult" type="MesProductPlan" extends="MesProductPlanResult">
@ -93,6 +95,8 @@
mpp.real_end_time,
mpp.attach_id,
mpp.sop_id,
po.sale_order_id,
po.saleorder_code,
mpp.plan_status,
mpp.is_flag,
mpp.remark,

@ -95,6 +95,7 @@
<dict-tag :options="dict.type.barcode_type" :value="scope.row.barcodeType"/>
</template>
</el-table-column>
<el-table-column label="生产计划编号" align="center" prop="planCode" v-if="columns[17].visible" width="110"/>
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" v-if="columns[20].visible" width="110"/>
<el-table-column label="采购订单号" align="center" prop="poNo" v-if="columns[13].visible" width="100"/>
<el-table-column label="批次代码" align="center" prop="batchCode" v-if="columns[6].visible" width="100"/>
@ -131,7 +132,6 @@
<span>{{ parseTime(scope.row.printTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="生产计划编号" align="center" prop="planCode" v-if="columns[17].visible"/>
<el-table-column label="生产计划明细编号" align="center" prop="planDetailCode" v-if="columns[18].visible"/>
<el-table-column label="销售订单ID" align="center" prop="saleOrderId" v-if="columns[19].visible"/>
<el-table-column label="项目号" align="center" prop="projectNo" v-if="columns[21].visible"/>
@ -194,11 +194,14 @@
<!-- 添加或修改条码信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="销售订单编号" prop="saleorderCode">
<el-input v-model="form.saleorderCode" placeholder="请点击右侧检索销售订单编号" readonly>
<el-button slot="append" icon="el-icon-search" @click="handleSaleOrderAdd"></el-button>
<el-form-item label="生产计划编号" prop="planCode">
<el-input v-model="form.planCode" placeholder="请点击右侧检索生产计划编号" readonly>
<el-button slot="append" icon="el-icon-search" @click="handleProductPlanAdd"></el-button>
</el-input>
</el-form-item>
<el-form-item label="销售订单编号" prop="saleorderCode">
<el-input v-model="form.saleorderCode" placeholder="请输入销售订单编号" :disabled="true"/>
</el-form-item>
<!-- <el-form-item label="条码类型" prop="barcodeType">-->
<!-- <el-radio-group v-model="form.barcodeType">-->
<!-- <el-radio-->
@ -284,12 +287,12 @@
</div>
</el-dialog>
<!-- 添加销售订单信息对话框 -->
<el-dialog title="选择销售订单" :visible.sync="saleOrderOpen" append-to-body>
<add-SaleOrder @selection="handleSelection" ref="saleOrderRef"></add-SaleOrder>
<!-- 添加生产计划编号对话框 -->
<el-dialog title="选择生产计划编号" :visible.sync="productPlanOpen" append-to-body>
<add-ProductPlan @selection="handleSelection" ref="productPlanRef"></add-ProductPlan>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitSaleOrderForm"> </el-button>
<el-button @click="saleOrderOpen = false"> </el-button>
<el-button type="primary" @click="submitProductPlanForm"> </el-button>
<el-button @click="productPlanOpen = false"> </el-button>
</div>
</el-dialog>
</div>
@ -297,14 +300,13 @@
<script>
import {listBarcode, getBarcode, delBarcode, addBarcode, updateBarcode, printBarCode} from "@/api/mes/barcode";
import {getMaterialinfo} from "@//api/mes/materialinfo";
import addSaleOrder from '@//views/mes/productOrder/addSaleOrder.vue';
import addProductPlan from '@//views/mes/productplan/addProductPlan.vue';
export default {
name: "Barcode",
dicts: ['bind_status', 'active_flag', 'barcode_type'],
components: {
'add-SaleOrder': addSaleOrder,
'add-ProductPlan': addProductPlan,
},
data() {
return {
@ -323,8 +325,8 @@ export default {
total: 0,
//
barcodeList: [],
//
saleOrderOpen: false,
//
productPlanOpen: false,
//
title: "",
//
@ -365,8 +367,8 @@ export default {
form: {},
//
rules: {
saleorderCode: [
{required: true, message: "销售订单编号不能为空", trigger: "blur"}
orderCode: [
{required: true, message: "单编号不能为空", trigger: "blur"}
],
batchFlag: [
{required: true, message: "批次标识不能为空", trigger: "change"}
@ -396,7 +398,7 @@ export default {
{key: 14, label: `生产日期`, visible: true},
{key: 15, label: `接受日期`, visible: true},
{key: 16, label: `最晚出库日期`, visible: true},
{key: 17, label: `生产计划编号`, visible: false},
{key: 17, label: `生产计划编号`, visible: true},
{key: 18, label: `生产计划明细编号`, visible: false},
{key: 19, label: `销售订单ID`, visible: false},
{key: 20, label: `销售订单编号`, visible: true},
@ -497,15 +499,16 @@ export default {
this.multiple = !selection.length
},
/** 提交采购订单按钮 */
submitSaleOrderForm() {
let selectedRow = this.$refs.saleOrderRef.selectedRow;
submitProductPlanForm() {
let selectedRow = this.$refs.productPlanRef.selectedRow;
this.form.barcodeType = '3';//1,2,3,4
this.form.planCode = selectedRow.planCode;
this.form.materialId = selectedRow.materialId;
this.form.materialName = selectedRow.materialName;
this.form.saleOrderId = selectedRow.saleOrderId;
this.form.saleorderCode = selectedRow.saleorderCode;
this.form.batchFlag = '0';
this.saleOrderOpen = false;
this.productPlanOpen = false;
},
/** 新增按钮操作 */
handleAdd() {
@ -524,8 +527,8 @@ export default {
});
},
/** 新增销售订单按钮操作 */
handleSaleOrderAdd() {
this.saleOrderOpen = true;
handleProductPlanAdd() {
this.productPlanOpen = true;
},
/** 修改按钮操作 */
handleUpdate(row) {

@ -0,0 +1,329 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="工单编号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入工单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="销售订单编号" prop="saleorderCode">
<el-input
v-model="queryParams.saleorderCode"
placeholder="请输入销售订单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单状态" prop="orderStatus">
<el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable>
<el-option
v-for="dict in dict.type.plan_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</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-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="productOrderList" @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="productOrderId" v-if="columns[0].visible"/>
<el-table-column label="销售订单ID" align="center" prop="saleOrderId" v-if="columns[2].visible" width="100"/>
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" v-if="columns[3].visible" width="100"/>
<el-table-column label="销售订单行号" align="center" prop="saleorderLinenumber" v-if="columns[4].visible" width="110"/>
<el-table-column label="项目编号" align="center" prop="projectNo" v-if="columns[5].visible"/>
<el-table-column label="工单编号" align="center" prop="orderCode" v-if="columns[1].visible" width="100"/>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[6].visible" width="100"/>
<el-table-column label="物料BOM" align="center" prop="materialBomDesc" v-if="columns[7].visible" width="120"/>
<el-table-column label="派工类型" align="center" prop="dispatchType" v-if="columns[8].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.dispatch_type" :value="scope.row.dispatchType"/>
</template>
</el-table-column>
<el-table-column label="工艺路线" align="center" prop="dispatchName" v-if="columns[9].visible" width="120"/>
<el-table-column label="单位时间" align="center" prop="productionTime" v-if="columns[27].visible">
<template slot-scope="scope">
<span>{{formatDayHourMinutes(scope.row.productionTime) }}</span>
</template>
</el-table-column>
<el-table-column label="销售数量" align="center" prop="saleAmount" v-if="columns[10].visible"/>
<el-table-column label="计划数量" align="center" prop="planAmount" v-if="columns[11].visible"/>
<el-table-column label="已派工数量" align="center" prop="dispatchAmount" v-if="columns[12].visible" width="100"/>
<el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[13].visible"/>
<el-table-column label="工单状态" align="center" prop="orderStatus" v-if="columns[19].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.plan_status" :value="scope.row.orderStatus"/>
</template>
</el-table-column>
<el-table-column label="发布时间" align="center" prop="releaseTime" width="180" v-if="columns[14].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.releaseTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="计划交货日期" align="center" prop="planDeliveryDate" width="180" v-if="columns[26].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="计划开始时间" align="center" prop="planBeginTime" width="180" v-if="columns[15].visible">
<template slot-scope="scope">
<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[16].visible">
<template slot-scope="scope">
<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[17].visible">
<template slot-scope="scope">
<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[18].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.realEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="库存锁定标识" align="center" prop="stockLockFlag" v-if="columns[20].visible" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.active_flag" :value="scope.row.stockLockFlag"/>
</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">
<template slot-scope="scope">
<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">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
listProductOrder,
getProductOrder,
delProductOrder,
addProductOrder,
updateProductOrder,
getOrderCode, productOrderLockInventory, productOrderPublish, productOrderRecall
} from "@/api/mes/productOrder";
export default {
name: "ProductOrder",
dicts: ['active_flag', 'plan_status', 'dispatch_type'],
data() {
return {
//
loading: true,
//
ids: [],
// orderCode
orderCodes: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
productOrderList: [],
//
title: "",
//
open: false,
//
saleOrderOpen: false,
//
noOrderOpen: false,
//
materialOpen: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
orderCode: null,
saleOrderId: null,
saleorderCode: null,
saleorderLinenumber: null,
projectNo: null,
materialId: null,
materialBomId: null,
dispatchType: null,
dispatchId: null,
saleAmount: null,
planAmount: null,
dispatchAmount: null,
completeAmount: null,
releaseTime: null,
planDeliveryDate: null,
planBeginTime: null,
planEndTime: null,
realBeginTime: null,
realEndTime: null,
orderStatus: null,
stockLockFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
},
//
form: {},
//
columns: [
{key: 0, label: `主键标识`, visible: false},
{key: 1, label: `工单编号`, visible: true},
{key: 2, label: `销售订单ID`, visible: false},
{key: 3, label: `销售订单编号`, visible: true},
{key: 4, label: `销售订单行号`, visible: false},
{key: 5, label: `项目编号`, visible: false},
{key: 6, label: `物料名称`, visible: true},
{key: 7, label: `物料bomID`, visible: true},
{key: 8, label: `派工类型`, visible: false},
{key: 9, label: `工艺路线`, visible: true},
{key: 10, label: `销售数量`, 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: true},
{key: 21, label: `备注`, visible: false},
{key: 22, label: `创建人`, visible: false},
{key: 23, label: `创建时间`, visible: false},
{key: 24, label: `更新人`, visible: false},
{key: 25, label: `更新时间`, visible: false},
{key: 26, label: `计划交货日期`, visible: true},
{key: 27, label: `单位时间`, visible: true},
],
//BOM
materialBomList: [],
//线
routeList: [],
};
},
created() {
this.getList();
findRouteList().then(response => {
this.routeList = response.data;
})
},
methods: {
/** 查询生产工单列表 */
getList() {
this.loading = true;
listProductOrder(this.queryParams).then(response => {
this.productOrderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.noOrderOpen = false;
this.reset();
},
//
handleRowClick(row) {
this.selectedRow = row
},
//
reset() {
this.form = {
productOrderId: null,
orderCode: null,
saleOrderId: null,
saleorderCode: null,
saleorderLinenumber: null,
projectNo: null,
materialId: null,
materialBomId: null,
dispatchType: '2',
dispatchId: null,
saleAmount: null,
planAmount: null,
dispatchAmount: null,
completeAmount: null,
releaseTime: null,
planDeliveryDate: null,
planBeginTime: null,
planEndTime: null,
realBeginTime: null,
realEndTime: null,
orderStatus: null,
stockLockFlag: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.materialBomList = null;
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleSaleOrderAdd() {
this.saleOrderOpen = true;
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.productOrderId)
this.orderCodes = selection.map(item => item.orderCode)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleSelection(selection) {
this.ids = selection.map(item => item.productOrderId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
}
};
</script>

@ -0,0 +1,320 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="生产工单编号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入生产工单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划编号" prop="planCode">
<el-input
v-model="queryParams.planCode"
placeholder="请输入计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="派工单号" prop="dispatchCode">
<el-input
v-model="queryParams.dispatchCode"
placeholder="请输入派工单号"
clearable
@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-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="productplanList" @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">
<template slot-scope="scope">
<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">
<template slot-scope="scope">
<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">
<template slot-scope="scope">
<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">
<template slot-scope="scope">
<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" >
<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" >
<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">
<template slot-scope="scope">
<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">
<template slot-scope="scope">
<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">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['mes:productplan:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:productplan:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listProductplan, getProductplan, delProductplan, addProductplan, updateProductplan } from "@/api/mes/productplan";
export default {
name: "Productplan",
dicts: ['active_flag', 'product_status', 'plan_status', 'dispatch_type'],
data() {
return {
//
loading: true,
//
ids: [],
//
checkedMesProductPlanDetail: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
productplanList: [],
//
mesProductPlanDetailList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
productOrderId: null,
planCode: null,
dispatchCode: null,
materialId: null,
materialBomId: null,
processId: null,
processOrder: null,
lastProcessId: null,
stationId: null,
userId: null,
productionTime: null,
planAmount: null,
completeAmount: null,
planBeginTime: null,
planEndTime: null,
realBeginTime: null,
realEndTime: null,
attachId: null,
planStatus: null,
isFlag: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
},
//
form: {},
//
rules: {
productOrderId: [
{ required: true, message: "生产工单ID不能为空", trigger: "blur" }
],
planCode: [
{ required: true, message: "计划编号不能为空", trigger: "blur" }
],
dispatchCode: [
{ required: true, message: "派工单号不能为空", trigger: "blur" }
],
materialId: [
{ required: true, message: "物料ID不能为空", trigger: "blur" }
],
materialBomId: [
{ required: true, message: "物料bomID不能为空", trigger: "blur" }
],
stationId: [
{ required: true, message: "工位ID不能为空", trigger: "blur" }
],
planStatus: [
{ required: true, message: "计划状态不能为空", trigger: "change" }
],
isFlag: [
{ 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 },
],
};
},
created() {
this.getList();
},
methods: {
/** 查询生产派工列表 */
getList() {
this.loading = true;
listProductplan(this.queryParams).then(response => {
this.productplanList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
handleRowClick(row) {
this.selectedRow = row
},
//
reset() {
this.form = {
planId: null,
productOrderId: null,
planCode: null,
dispatchCode: null,
materialId: null,
materialBomId: null,
processId: null,
processOrder: null,
lastProcessId: null,
stationId: null,
userId: null,
productionTime: null,
planAmount: null,
completeAmount: null,
planBeginTime: null,
planEndTime: null,
realBeginTime: null,
realEndTime: null,
attachId: null,
planStatus: null,
isFlag: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.mesProductPlanDetailList = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.planId)
this.single = selection.length!==1
this.multiple = !selection.length
},
}
};
</script>
Loading…
Cancel
Save