修改生产界面

master
夜笙歌 1 year ago
parent 44043419a9
commit 05467aed61

@ -27,6 +27,24 @@
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" @click="getMaterials"></el-button> <el-button type="primary" @click="getMaterials"></el-button>
<el-button :disabled="form.planDetailStatus === '已完成'" type="primary" @click="finish"></el-button> <el-button :disabled="form.planDetailStatus === '已完成'" type="primary" @click="finish"></el-button>
<el-popover
v-if="($route.query && $route.query.id) === '2'"
v-model="assignModel"
placement="top"
style="margin-left: 10px"
trigger="click"
width="400">
<el-table :data="stationData" highlight-current-row
@current-change="stationChange"
>
<el-table-column align="center" label="工位名称" prop="stationName"/>
</el-table>
<div style="float:right;margin-top: 8px">
<el-button type="primary" @click="completeStation"> </el-button>
</div>
<el-button slot="reference" type="success">下发
</el-button>
</el-popover>
</div> </div>
</div> </div>
@ -114,6 +132,15 @@
width="120" width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
v-if="($route.query && $route.query.id) === '2'"
size="small"
style="margin-right: 12px"
type="text"
@click="print(scope.row)"
>
条码打印
</el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- size="small"--> <!-- size="small"-->
<!-- type="text"--> <!-- type="text"-->
@ -159,7 +186,7 @@
<div class="bottom"> <div class="bottom">
<el-row> <el-row>
<el-button type="primary">首页</el-button> <el-button type="primary">首页</el-button>
<el-button type="success" @click="getMaterialsModel = true">条码打印</el-button> <!-- <el-button type="success" @click="getMaterialsModel = true">条码打印</el-button>-->
<el-button type="info">SOP预览</el-button> <el-button type="info">SOP预览</el-button>
<el-button type="danger">退出</el-button> <el-button type="danger">退出</el-button>
</el-row> </el-row>
@ -260,10 +287,53 @@
<el-button type="primary" @click="receiveMaterial"></el-button> <el-button type="primary" @click="receiveMaterial"></el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="printModel" class="dialog" title="条码打印" width="80%">
<div style="height: 50vh;">
<PrintPage :defineData="PrintData"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="printModel = false">关闭</el-button>
</div>
</el-dialog>
<!-- <el-dialog :visible.sync="assignModel" title="工位选择" width="80%">-->
<!-- <el-table :data="stationData" highlight-current-row-->
<!-- @current-change="stationChange"-->
<!-- >-->
<!-- <el-table-column align="center" label="主键标识" prop="planId"/>-->
<!-- <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"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- v-hasPermi="['mes:productplan:remove']"-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="completeStation "> </el-button>-->
<!-- <el-button @click="assignModel = false"> </el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
</div> </div>
</template> </template>
<script> <script>
import PrintPage from '@/views/mes/barcode/endProductIndex'
import Chart from '@/components/board/Chart' import Chart from '@/components/board/Chart'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { import {
@ -291,10 +361,14 @@ const vw = (document.documentElement.clientWidth || document.body.clientWidth) /
export default { export default {
name: 'Board1', name: 'Board1',
components: { components: {
Chart Chart,
PrintPage
}, },
data() { data() {
return { return {
PrintData: {},
printModel: false,
assignModel: false,
nowNum1: 1, nowNum1: 1,
totalNum1: 0, totalNum1: 0,
getMaterialsModel: false, getMaterialsModel: false,
@ -302,6 +376,33 @@ export default {
form: {}, form: {},
form1: {}, form1: {},
tableData: [], tableData: [],
nowStation: {},
stationData: [
{
stationName: '五楼装配工位1',
stationId: 521,
},
{
stationName: '五楼装配工位2',
stationId: 522,
},
{
stationName: '五楼装配工位3',
stationId: 523,
},
{
stationName: '五楼装配工位4',
stationId: 524,
},
{
stationName: '五楼装配工位5',
stationId: 525,
},
{
stationName: '五楼装配工位6',
stationId: 526,
},
],
warehouseList: [], warehouseList: [],
searchMaterialValue: '', searchMaterialValue: '',
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100, vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
@ -506,6 +607,7 @@ export default {
this.getInfo(val) this.getInfo(val)
}, },
async tableClick(val) { async tableClick(val) {
if (!val) return
const {data} = await getNewestProductPlanDetail({planId: val.planId}) const {data} = await getNewestProductPlanDetail({planId: val.planId})
this.form = data || {} this.form = data || {}
this.form.materialId = val.materialId this.form.materialId = val.materialId
@ -513,6 +615,13 @@ export default {
this.form.planDetailStatus = setState(data.planDetailStatus) this.form.planDetailStatus = setState(data.planDetailStatus)
this.getInfo(val) this.getInfo(val)
}, },
stationChange(val) {
this.nowStation = val
},
completeStation() {
console.log(this.nowStation)
this.assignModel = false
},
getInfo(e) { getInfo(e) {
this.$refs.chart1_1.setData({ this.$refs.chart1_1.setData({
series: [ series: [
@ -928,6 +1037,14 @@ export default {
} }
}) })
}, },
print(val) {
this.PrintData = val
this.printModel = true
},
assignClick() {
this.assignModel = true
}
} }
} }
</script> </script>
@ -1089,4 +1206,13 @@ export default {
position: absolute; position: absolute;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
/deep/ .dialog .app-container {
background: none !important;
position: static;
}
/deep/ .dialog .el-dialog__body {
padding: 0 !important;
}
</style> </style>

@ -65,6 +65,7 @@
<el-button <el-button
size="small" size="small"
type="text" type="text"
@click="print(scope.row)"
> >
条码打印 条码打印
</el-button> </el-button>
@ -454,11 +455,21 @@
<el-button type="primary" @click="receiveMaterial"></el-button> <el-button type="primary" @click="receiveMaterial"></el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="printModel" title="条码打印" width="80%" class="dialog">
<div style="height: 50vh;">
<PrintPage :defineData="PrintData" />
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="printModel = false">关闭</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import Chart from '@/components/board/Chart' import Chart from '@/components/board/Chart'
import PrintPage from '@/views/mes/barcode/endProductIndex'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { import {
getStockTotal, getStockTotal,
@ -473,10 +484,13 @@ const vw = (document.documentElement.clientWidth || document.body.clientWidth) /
export default { export default {
name: 'Board1', name: 'Board1',
components: { components: {
Chart Chart,
PrintPage
}, },
data() { data() {
return { return {
PrintData:{},
printModel: false,
nowNum1: 1, nowNum1: 1,
totalNum1: 0, totalNum1: 0,
nowNum2: 1, nowNum2: 1,
@ -875,6 +889,10 @@ export default {
this.form.wmsRawOutstockDetailList =[]; this.form.wmsRawOutstockDetailList =[];
this.form.warehouseId = warehouseId; this.form.warehouseId = warehouseId;
this.getStockTotal(); this.getStockTotal();
},
print(val) {
this.PrintData = val
this.printModel = true
} }
} }
} }
@ -981,4 +999,13 @@ export default {
position: absolute; position: absolute;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
/deep/ .dialog .app-container {
background: none !important;
position: static;
}
/deep/ .dialog .el-dialog__body {
padding: 0 !important;
}
</style> </style>

@ -65,6 +65,7 @@
<el-button <el-button
size="small" size="small"
type="text" type="text"
@click="print(scope.row)"
> >
条码打印 条码打印
</el-button> </el-button>
@ -267,8 +268,8 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number <el-input-number
:min="0"
v-model="scope.row.planAmount" v-model="scope.row.planAmount"
:min="0"
controls-position="right" controls-position="right"
style="width: 100%" style="width: 100%"
> >
@ -292,13 +293,25 @@
<el-button type="primary" @click="receiveMaterial"></el-button> <el-button type="primary" @click="receiveMaterial"></el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="printModel" title="条码打印" width="80%" class="dialog">
<div style="height: 50vh;">
<PrintPage :defineData="PrintData" />
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="printModel = false">关闭</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import Chart from '@/components/board/Chart' import Chart from '@/components/board/Chart'
import PrintPage from '@/views/mes/barcode/endProductIndex'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import {getMaterialBoms, getWarehouses, applyRawOutstock} from '@/api/board/firstFloor' import {getWarehouses, applyRawOutstock} from '@/api/board/firstFloor'
import { import {
completeProductPlanDetail, completeProductPlanDetail,
getProductPlanDetails, getProductPlanDetails,
@ -311,10 +324,13 @@ const vw = (document.documentElement.clientWidth || document.body.clientWidth) /
export default { export default {
name: 'Board1', name: 'Board1',
components: { components: {
Chart Chart,
PrintPage
}, },
data() { data() {
return { return {
PrintData:{},
printModel: false,
nowNum1: 1, nowNum1: 1,
totalNum1: 0, totalNum1: 0,
nowNum2: 1, nowNum2: 1,
@ -636,7 +652,7 @@ export default {
wmsRawOutstockDetailList: [] wmsRawOutstockDetailList: []
} }
// //
getWarehouses({"warehouseFloor":1}).then(e => { getWarehouses({"warehouseFloor": 1}).then(e => {
this.warehouseList = e.data this.warehouseList = e.data
this.form.warehouseId = e.data[0]?.warehouseId this.form.warehouseId = e.data[0]?.warehouseId
this.searchMaterial(""); this.searchMaterial("");
@ -660,7 +676,7 @@ export default {
// //
searchMaterial(val) { searchMaterial(val) {
getStockTotal({ getStockTotal({
warehouseId:this.form.warehouseId, warehouseId: this.form.warehouseId,
materialName: val materialName: val
}).then(e => { }).then(e => {
this.form.wmsRawOutstockDetailList = e.data.map(r => { this.form.wmsRawOutstockDetailList = e.data.map(r => {
@ -668,18 +684,23 @@ export default {
materialId: r.materialId, materialId: r.materialId,
materialCode: r.materialCode, materialCode: r.materialCode,
materialName: r.materialName, materialName: r.materialName,
availableAmount: r.totalAmount-r.occupyAmount-r.frozenAmount, availableAmount: r.totalAmount - r.occupyAmount - r.frozenAmount,
unavailableAmount: r.occupyAmount+r.frozenAmount, unavailableAmount: r.occupyAmount + r.frozenAmount,
planAmount: r.planAmount planAmount: r.planAmount
} }
}) })
}) })
}, },
warehouseChange(warehouseId){ warehouseChange(warehouseId) {
this.form.wmsRawOutstockDetailList =[]; this.form.wmsRawOutstockDetailList = [];
this.form.warehouseId = warehouseId; this.form.warehouseId = warehouseId;
this.getStockTotal(); this.getStockTotal();
},
print(val) {
console.log(val)
this.PrintData = val
this.printModel = true
} }
} }
} }
@ -780,8 +801,19 @@ export default {
bottom: 1.5%; bottom: 1.5%;
left: 2%; left: 2%;
} }
.roundBorder { .roundBorder {
position: absolute; position: absolute;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
/deep/ .dialog .app-container {
background: none !important;
position: static;
}
/deep/ .dialog .el-dialog__body {
padding: 0 !important;
}
</style> </style>

@ -24,7 +24,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" @click="finish()" :disabled="form.planDetailStatus === '已完成'">完成</el-button> <el-button :disabled="form.planDetailStatus === '已完成'" type="primary" @click="finish()"></el-button>
</div> </div>
</div> </div>
@ -401,6 +401,7 @@ export default {
this.getInfo(val) this.getInfo(val)
}, },
async tableClick(val) { async tableClick(val) {
if (!val) return
const {data} = await getNewestProductPlanDetail({planId: val.planId}) const {data} = await getNewestProductPlanDetail({planId: val.planId})
this.form = data || {} this.form = data || {}
this.form.materialId = val.materialId this.form.materialId = val.materialId

@ -136,6 +136,11 @@ export default {
floor: 5, floor: 5,
processId: 51, processId: 51,
route: '/board/fifthFloor' route: '/board/fifthFloor'
},
{
floor: 5,
processId: 52,
route: '/board/fifthFloor?id=2'
} }
] ]
}; };

@ -1,16 +1,16 @@
<template> <template>
<div class="app-container"> <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="batchFlag">--> <!-- <el-form-item label="批次标识" prop="batchFlag">-->
<!-- <el-select v-model="queryParams.batchFlag" placeholder="请选择批次标识" clearable>--> <!-- <el-select v-model="queryParams.batchFlag" placeholder="请选择批次标识" clearable>-->
<!-- <el-option--> <!-- <el-option-->
<!-- v-for="dict in dict.type.active_flag"--> <!-- v-for="dict in dict.type.active_flag"-->
<!-- :key="dict.value"--> <!-- :key="dict.value"-->
<!-- :label="dict.label"--> <!-- :label="dict.label"-->
<!-- :value="dict.value"--> <!-- :value="dict.value"-->
<!-- />--> <!-- />-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- <el-form-item label="条码类型" prop="barcodeType">--> <!-- <el-form-item label="条码类型" prop="barcodeType">-->
<!-- <el-select v-model="queryParams.barcodeType" placeholder="请选择条码类型" clearable>--> <!-- <el-select v-model="queryParams.barcodeType" placeholder="请选择条码类型" clearable>-->
<!-- <el-option--> <!-- <el-option-->
@ -24,15 +24,15 @@
<el-form-item label="销售订单编号" prop="saleorderCode"> <el-form-item label="销售订单编号" prop="saleorderCode">
<el-input <el-input
v-model="queryParams.saleorderCode" v-model="queryParams.saleorderCode"
placeholder="请输入销售订单编号"
clearable clearable
placeholder="请输入销售订单编号"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -40,12 +40,12 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['mes:barcode:add']" v-hasPermi="['mes:barcode:add']"
icon="el-icon-plus"
plain
size="mini"
type="primary"
@click="handleAdd"
>新增 >新增
</el-button> </el-button>
</el-col> </el-col>
@ -63,103 +63,103 @@
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes:barcode:remove']" v-hasPermi="['mes:barcode:remove']"
:disabled="multiple"
icon="el-icon-delete"
plain
size="mini"
type="danger"
@click="handleDelete"
>删除 >删除
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:barcode:export']" v-hasPermi="['mes:barcode:export']"
icon="el-icon-download"
plain
size="mini"
type="warning"
@click="handleExport"
>导出 >导出
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :columns="columns" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="barcodeList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="barcodeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column align="center" type="selection" width="55"/>
<el-table-column label="主键标识" align="center" prop="barcodeId" v-if="columns[0].visible"/> <el-table-column v-if="columns[0].visible" align="center" label="主键标识" prop="barcodeId"/>
<el-table-column label="条码类型" align="center" prop="barcodeType" v-if="columns[4].visible"> <el-table-column v-if="columns[4].visible" align="center" label="条码类型" prop="barcodeType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.barcode_type" :value="scope.row.barcodeType"/> <dict-tag :options="dict.type.barcode_type" :value="scope.row.barcodeType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产计划编号" align="center" prop="planCode" v-if="columns[17].visible" width="110"/> <el-table-column v-if="columns[17].visible" align="center" label="生产计划编号" prop="planCode" width="110"/>
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" v-if="columns[20].visible" width="110"/> <el-table-column v-if="columns[20].visible" align="center" label="销售订单编号" prop="saleorderCode" width="110"/>
<el-table-column label="采购订单号" align="center" prop="poNo" v-if="columns[13].visible" width="100"/> <el-table-column v-if="columns[13].visible" align="center" label="采购订单号" prop="poNo" width="100"/>
<el-table-column label="批次代码" align="center" prop="batchCode" v-if="columns[6].visible" width="100"/> <el-table-column v-if="columns[6].visible" align="center" label="批次代码" prop="batchCode" width="100"/>
<el-table-column label="条码内容" align="center" prop="barcodeInfo" v-if="columns[5].visible" width="100"/> <el-table-column v-if="columns[5].visible" align="center" label="条码内容" prop="barcodeInfo" width="100"/>
<el-table-column label="批次标识" align="center" prop="batchFlag" v-if="columns[3].visible"> <el-table-column v-if="columns[3].visible" align="center" label="批次标识" prop="batchFlag">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.active_flag" :value="scope.row.batchFlag"/> <dict-tag :options="dict.type.active_flag" :value="scope.row.batchFlag"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[8].visible" width="100"/> <el-table-column v-if="columns[8].visible" align="center" label="物料名称" prop="materialName" width="100"/>
<el-table-column label="供应商ID" align="center" prop="manufacturerId" v-if="columns[9].visible"/> <el-table-column v-if="columns[9].visible" align="center" label="供应商ID" prop="manufacturerId"/>
<el-table-column label="数量" align="center" prop="amount" v-if="columns[10].visible"/> <el-table-column v-if="columns[10].visible" align="center" label="数量" prop="amount"/>
<el-table-column label="生产日期" align="center" prop="productionDate" width="180" v-if="columns[14].visible"> <el-table-column v-if="columns[14].visible" align="center" label="生产日期" prop="productionDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.productionDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.productionDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="接受日期" align="center" prop="acceptedDate" width="180" v-if="columns[15].visible"> <el-table-column v-if="columns[15].visible" align="center" label="接受日期" prop="acceptedDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.acceptedDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.acceptedDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最晚出库日期" align="center" prop="lastOutstockDate" width="180" v-if="columns[16].visible"> <el-table-column v-if="columns[16].visible" align="center" label="最晚出库日期" prop="lastOutstockDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.lastOutstockDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.lastOutstockDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="托盘RFID代码" align="center" prop="palletInfoCode" v-if="columns[7].visible" width="110"/> <el-table-column v-if="columns[7].visible" align="center" label="托盘RFID代码" prop="palletInfoCode" width="110"/>
<el-table-column label="打印机台名称" align="center" prop="machineName" v-if="columns[11].visible" width="110"/> <el-table-column v-if="columns[11].visible" align="center" label="打印机台名称" prop="machineName" width="110"/>
<el-table-column label="打印次数" align="center" prop="printNumber" v-if="columns[12].visible"/> <el-table-column v-if="columns[12].visible" align="center" label="打印次数" prop="printNumber"/>
<el-table-column label="打印人" align="center" prop="printPerson" v-if="columns[2].visible"/> <el-table-column v-if="columns[2].visible" align="center" label="打印人" prop="printPerson"/>
<el-table-column label="打印时间" align="center" prop="printTime" width="180" v-if="columns[1].visible"> <el-table-column v-if="columns[1].visible" align="center" label="打印时间" prop="printTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.printTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.printTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产计划明细编号" align="center" prop="planDetailCode" v-if="columns[18].visible"/> <el-table-column v-if="columns[18].visible" align="center" label="生产计划明细编号" prop="planDetailCode"/>
<el-table-column label="销售订单ID" align="center" prop="saleOrderId" v-if="columns[19].visible"/> <el-table-column v-if="columns[19].visible" align="center" label="销售订单ID" prop="saleOrderId"/>
<el-table-column label="项目号" align="center" prop="projectNo" v-if="columns[21].visible"/> <el-table-column v-if="columns[21].visible" align="center" label="项目号" prop="projectNo"/>
<el-table-column label="流水号" align="center" prop="serialNumber" v-if="columns[22].visible"/> <el-table-column v-if="columns[22].visible" align="center" label="流水号" prop="serialNumber"/>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[23].visible"/> <el-table-column v-if="columns[23].visible" align="center" label="备注" prop="remark"/>
<el-table-column label="绑定状态" align="center" prop="bindStatus" v-if="columns[24].visible"> <el-table-column v-if="columns[24].visible" align="center" label="绑定状态" prop="bindStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.bind_status" :value="scope.row.bindStatus"/> <dict-tag :options="dict.type.bind_status" :value="scope.row.bindStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="绑定托盘的人" align="center" prop="bindBy" v-if="columns[25].visible" width="110"/> <el-table-column v-if="columns[25].visible" align="center" label="绑定托盘的人" prop="bindBy" width="110"/>
<el-table-column label="绑定托盘时间" align="center" prop="bindTime" width="180" v-if="columns[26].visible"> <el-table-column v-if="columns[26].visible" align="center" label="绑定托盘时间" prop="bindTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.bindTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.bindTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" v-if="columns[27].visible"/> <el-table-column v-if="columns[27].visible" align="center" label="更新人" prop="updateBy"/>
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" v-if="columns[28].visible"> <el-table-column v-if="columns[28].visible" align="center" label="更新时间" prop="updateTime" width="180">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"> <el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
icon="el-icon-printer"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-printer"
@click="handlePrintBarCode(scope.row)" @click="handlePrintBarCode(scope.row)"
>打印 >打印
</el-button> </el-button>
@ -185,23 +185,23 @@
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
:page.sync="queryParams.pageNum"
:total="total"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改条码信息对话框 --> <!-- 添加或修改条码信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" append-to-body width="500px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="生产计划编号" prop="planCode"> <el-form-item label="生产计划编号" prop="planCode">
<el-input v-model="form.planCode" placeholder="请点击右侧检索生产计划编号" readonly> <el-input v-model="form.planCode" placeholder="请点击右侧检索生产计划编号" readonly>
<el-button slot="append" icon="el-icon-search" @click="handleProductPlanAdd"></el-button> <el-button slot="append" icon="el-icon-search" @click="handleProductPlanAdd"></el-button>
</el-input> </el-input>
</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="请输入销售订单编号" :disabled="true"/> <!-- <el-input v-model="form.saleorderCode" :disabled="true" placeholder="请输入销售订单编号"/>-->
</el-form-item> <!-- </el-form-item>-->
<!-- <el-form-item label="条码类型" prop="barcodeType">--> <!-- <el-form-item label="条码类型" prop="barcodeType">-->
<!-- <el-radio-group v-model="form.barcodeType">--> <!-- <el-radio-group v-model="form.barcodeType">-->
<!-- <el-radio--> <!-- <el-radio-->
@ -220,25 +220,25 @@
<!-- <el-form-item label="托盘RFID代码" prop="palletInfoCode">--> <!-- <el-form-item label="托盘RFID代码" prop="palletInfoCode">-->
<!-- <el-input v-model="form.palletInfoCode" placeholder="请输入托盘RFID代码" />--> <!-- <el-input v-model="form.palletInfoCode" placeholder="请输入托盘RFID代码" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="物料ID" prop="materialId" v-if="false"> <el-form-item v-if="false" label="物料ID" prop="materialId">
<el-input v-model="form.materialId" placeholder="请输入物料ID"/> <el-input v-model="form.materialId" placeholder="请输入物料ID"/>
</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="请输入物料名称" :disabled="true"/> <el-input v-model="form.materialName" :disabled="true" placeholder="请输入物料名称"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="供应商ID" prop="manufacturerId">--> <!-- <el-form-item label="供应商ID" prop="manufacturerId">-->
<!-- <el-input v-model="form.manufacturerId" placeholder="请输入供应商ID" />--> <!-- <el-input v-model="form.manufacturerId" placeholder="请输入供应商ID" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="数量" prop="amount"> <el-form-item label="数量" prop="amount">
<el-input-number v-model="form.amount" placeholder="请输入数量"/> <el-input-number v-model="form.amount" :min="0" placeholder="请输入数量"/>
</el-form-item> </el-form-item>
<el-form-item label="生产日期" prop="productionDate"> <el-form-item label="生产日期" prop="productionDate">
<el-date-picker clearable <el-date-picker v-model="form.productionDate"
v-model="form.productionDate" clearable
placeholder="请选择生产日期"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd">
placeholder="请选择生产日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<!-- <el-form-item label="接受日期" prop="acceptedDate">--> <!-- <el-form-item label="接受日期" prop="acceptedDate">-->
@ -250,15 +250,15 @@
<!-- </el-date-picker>--> <!-- </el-date-picker>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="最晚出库日期" prop="lastOutstockDate"> <el-form-item label="最晚出库日期" prop="lastOutstockDate">
<el-date-picker clearable <el-date-picker v-model="form.lastOutstockDate"
v-model="form.lastOutstockDate" clearable
placeholder="请选择最晚出库日期"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd">
placeholder="请选择最晚出库日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/> <el-input v-model="form.remark" placeholder="请输入内容" type="textarea"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="绑定状态" prop="bindStatus">--> <!-- <el-form-item label="绑定状态" prop="bindStatus">-->
<!-- <el-radio-group v-model="form.bindStatus">--> <!-- <el-radio-group v-model="form.bindStatus">-->
@ -288,8 +288,8 @@
</el-dialog> </el-dialog>
<!-- 添加生产计划编号对话框 --> <!-- 添加生产计划编号对话框 -->
<el-dialog title="选择生产计划编号" :visible.sync="productPlanOpen" append-to-body> <el-dialog :visible.sync="productPlanOpen" append-to-body title="选择生产计划编号">
<add-ProductPlan @selection="handleSelection" ref="productPlanRef"></add-ProductPlan> <add-ProductPlan ref="productPlanRef" :defineData="defineData" @selection="handleSelection"></add-ProductPlan>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitProductPlanForm"> </el-button> <el-button type="primary" @click="submitProductPlanForm"> </el-button>
<el-button @click="productPlanOpen = false"> </el-button> <el-button @click="productPlanOpen = false"> </el-button>
@ -416,6 +416,12 @@ export default {
created() { created() {
this.getList(); this.getList();
}, },
props: {
defineData: {
type: Object,
default: {}
}
},
// watch: { // watch: {
// 'form.batchFlag': function (newVal, oldVal) { // 'form.batchFlag': function (newVal, oldVal) {
// // form.batchFlag // // form.batchFlag
@ -427,6 +433,18 @@ export default {
// }, // },
// }, // },
methods: { methods: {
getData() {
this.form = {
planCode: this.defineData.planCode,
saleorderCode: this.defineData.saleorderCode,
materialId: this.defineData.materialId,
materialName: this.defineData.materialName,
batchFlag:'0',
barcodeType:'3',
saleOrderId:null,
}
},
/** 查询条码信息列表 */ /** 查询条码信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -513,6 +531,9 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
if (this.defineData?.planCode) {
this.getData()
}
this.open = true; this.open = true;
this.title = "添加成品条码信息"; this.title = "添加成品条码信息";
}, },

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

Loading…
Cancel
Save