修改生产界面

master
夜笙歌 7 months ago
parent 44043419a9
commit 05467aed61

@ -27,6 +27,24 @@
<div style="text-align: center">
<el-button type="primary" @click="getMaterials"></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>
@ -114,6 +132,15 @@
width="120"
>
<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-->
<!-- size="small"-->
<!-- type="text"-->
@ -159,7 +186,7 @@
<div class="bottom">
<el-row>
<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="danger">退出</el-button>
</el-row>
@ -260,10 +287,53 @@
<el-button type="primary" @click="receiveMaterial"></el-button>
</div>
</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>
</template>
<script>
import PrintPage from '@/views/mes/barcode/endProductIndex'
import Chart from '@/components/board/Chart'
import * as echarts from 'echarts'
import {
@ -291,10 +361,14 @@ const vw = (document.documentElement.clientWidth || document.body.clientWidth) /
export default {
name: 'Board1',
components: {
Chart
Chart,
PrintPage
},
data() {
return {
PrintData: {},
printModel: false,
assignModel: false,
nowNum1: 1,
totalNum1: 0,
getMaterialsModel: false,
@ -302,6 +376,33 @@ export default {
form: {},
form1: {},
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: [],
searchMaterialValue: '',
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
@ -506,6 +607,7 @@ export default {
this.getInfo(val)
},
async tableClick(val) {
if (!val) return
const {data} = await getNewestProductPlanDetail({planId: val.planId})
this.form = data || {}
this.form.materialId = val.materialId
@ -513,6 +615,13 @@ export default {
this.form.planDetailStatus = setState(data.planDetailStatus)
this.getInfo(val)
},
stationChange(val) {
this.nowStation = val
},
completeStation() {
console.log(this.nowStation)
this.assignModel = false
},
getInfo(e) {
this.$refs.chart1_1.setData({
series: [
@ -928,6 +1037,14 @@ export default {
}
})
},
print(val) {
this.PrintData = val
this.printModel = true
},
assignClick() {
this.assignModel = true
}
}
}
</script>
@ -1089,4 +1206,13 @@ export default {
position: absolute;
transform: translate(-50%, -50%);
}
/deep/ .dialog .app-container {
background: none !important;
position: static;
}
/deep/ .dialog .el-dialog__body {
padding: 0 !important;
}
</style>

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

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

@ -24,7 +24,7 @@
</el-form-item>
</el-form>
<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>
@ -401,6 +401,7 @@ export default {
this.getInfo(val)
},
async tableClick(val) {
if (!val) return
const {data} = await getNewestProductPlanDetail({planId: val.planId})
this.form = data || {}
this.form.materialId = val.materialId

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

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

@ -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
},
}

Loading…
Cancel
Save