修改生产界面

master
夜笙歌 8 months ago
parent 1fd4eb9875
commit 4abba9da0a

@ -11,6 +11,15 @@ import ThemePicker from "@/components/ThemePicker";
export default {
name: "App",
components: { ThemePicker },
mounted() {
setInterval(()=>{
this.$notify.info({
title: '通知',
message: '通知公告',
duration: 0
});
},60*1000)
},
metaInfo() {
return {
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,

@ -1,7 +1,5 @@
import request from '@/utils/request'
// 获取计划
export function getProductPlans(query) {
return request({

@ -37,3 +37,12 @@ export function completeProductPlanDetail(query) {
data: query
})
}
// 获取图纸
export function getPlanDrawings(query) {
return request({
url: '/mes/api/getPlanDrawings',
method: 'get',
params: query
})
}

@ -41,7 +41,7 @@ export default {
data() {
return {
//
visibleNumber: 5,
visibleNumber: 9,
// index
currentIndex: undefined
};
@ -119,7 +119,7 @@ export default {
methods: {
//
setVisibleNumber() {
const width = document.body.getBoundingClientRect().width / 3;
const width = document.body.getBoundingClientRect().width / 2;
this.visibleNumber = parseInt(width / 85);
},
//

@ -3,7 +3,7 @@
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu">
<template v-if="device!=='mobile'">

@ -91,16 +91,89 @@
</div>
<div class="chartBox chartBox2">
<div class="title">库存统计</div>
<div class="title">物料安装情况(已完成)</div>
<div class="chart">
<Chart ref="chart2"></Chart>
<div class="whiteTable">
<el-table
:cell-style="{textAlign:'center'}"
:data="tableData"
:header-cell-style="{textAlign:'center'}"
:max-height="19.13 * vw"
style="width: 100%"
>
<el-table-column
label="序号"
type="index"
width="50"
>
</el-table-column>
<el-table-column
label="工单编号"
prop="planCode"
>
</el-table-column>
<el-table-column
label="物料名称"
prop="materialName"
width="100"
>
</el-table-column>
<el-table-column
label="计划"
prop="planAmount"
width="100"
>
</el-table-column>
<el-table-column
label="实际"
prop="completeAmount"
width="100"
>
</el-table-column>
<el-table-column
label="差异"
prop="difference"
width="100"
>
<template slot-scope="scope">
{{ scope.row.planAmount - scope.row.completeAmount }}
</template>
</el-table-column>
<el-table-column
label="交付时间"
prop="planDeliveryDate"
width="150"
>
</el-table-column>
<el-table-column
label="操作"
width="120"
>
<template slot-scope="scope">
<el-button
size="small"
type="text"
>
条码打印
</el-button>
<el-button
size="small"
type="text"
@click="getDetail(scope)"
>
明细
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<div>
<div class="roundBorder" style="top: 72%;left: 1.2%;">
<div class="roundBorder" style="top: 32%;left: 51%;">
<el-button :disabled="nowNum2 <= 1" circle icon="el-icon-back" size="mini" @click="pre2"></el-button>
</div>
<div class="roundBorder" style="top: 72%;left: 49%;">
<div class="roundBorder" style="top: 32%;left: 98.8%;">
<el-button :disabled="nowNum2 >= totalNum2" circle icon="el-icon-right" size="mini" @click="next2"></el-button>
</div>
</div>
@ -195,18 +268,107 @@
</div>
</div>
</div>
<div>
<div class="roundBorder" style="top: 72%;left: 1.2%;">
<el-button :disabled="nowNum2 <= 1" circle icon="el-icon-back" size="mini" @click="pre2"></el-button>
</div>
<div class="roundBorder" style="top: 72%;left: 49%;">
<el-button :disabled="nowNum2 >= totalNum2" circle icon="el-icon-right" size="mini" @click="next2"></el-button>
</div>
</div>
<div class="chartBox chartBox4">
<div class="title">当日产量</div>
<div class="title">物料安装情况(未完成)</div>
<div class="chart">
<Chart ref="chart4"></Chart>
<div class="whiteTable">
<el-table
:cell-style="{textAlign:'center'}"
:data="tableData"
:header-cell-style="{textAlign:'center'}"
:max-height="19.13 * vw"
style="width: 100%"
>
<el-table-column
label="序号"
type="index"
width="50"
>
</el-table-column>
<el-table-column
label="工单编号"
prop="planCode"
>
</el-table-column>
<el-table-column
label="物料名称"
prop="materialName"
width="100"
>
</el-table-column>
<el-table-column
label="计划"
prop="planAmount"
width="100"
>
</el-table-column>
<el-table-column
label="实际"
prop="completeAmount"
width="100"
>
</el-table-column>
<el-table-column
label="差异"
prop="difference"
width="100"
>
<template slot-scope="scope">
{{ scope.row.planAmount - scope.row.completeAmount }}
</template>
</el-table-column>
<el-table-column
label="交付时间"
prop="planDeliveryDate"
width="150"
>
</el-table-column>
<el-table-column
label="操作"
width="120"
>
<template slot-scope="scope">
<el-button
size="small"
type="text"
>
条码打印
</el-button>
<el-button
size="small"
type="text"
@click="getDetail(scope)"
>
明细
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<div>
<div class="roundBorder" style="top: 72%;left: 51%;">
<el-button :disabled="nowNum2 <= 1" circle icon="el-icon-back" size="mini" @click="pre2"></el-button>
</div>
<div class="roundBorder" style="top: 72%;left: 98.8%;">
<el-button :disabled="nowNum2 >= totalNum2" circle icon="el-icon-right" size="mini" @click="next2"></el-button>
</div>
</div>
<div class="bottom">
<el-row>
<el-button type="primary">首页</el-button>
<el-button type="success">键盘</el-button>
<el-button type="success">SOP预览</el-button>
<el-button type="info">最小化</el-button>
<el-button type="danger">退出</el-button>
</el-row>
@ -250,6 +412,16 @@
prop="materialName"
>
</el-table-column>
<el-table-column
label="可用库存数量"
prop="materialName"
>
</el-table-column>
<el-table-column
label="占用库存数量"
prop="materialName"
>
</el-table-column>
<el-table-column
label="领取数量"
prop="planAmount"
@ -317,6 +489,10 @@ export default {
totalNum1: 0,
nowNum2: 1,
totalNum2: 0,
nowNum3: 1,
totalNum3: 0,
nowNum4: 1,
totalNum4: 0,
planId: null,
materialBomId: null,
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
@ -530,6 +706,34 @@ export default {
this.totalNum2 = Math.ceil(res.total / 5)
})
},
next3() {
this.nowNum3 += 1
getProductPlanDetails({pageNum: this.nowNum3, pageSize: 5, planId: this.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum3 = Math.ceil(res.total / 5)
})
},
pre3() {
this.nowNum3 -= 1
getProductPlanDetails({pageNum: this.nowNum3, pageSize: 5, planId: this.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum3 = Math.ceil(res.total / 5)
})
},
next4() {
this.nowNum4 += 1
getProductPlanDetails({pageNum: this.nowNum4, pageSize: 5, planId: this.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum4 = Math.ceil(res.total / 5)
})
},
pre4() {
this.nowNum4 -= 1
getProductPlanDetails({pageNum: this.nowNum4, pageSize: 5, planId: this.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum4 = Math.ceil(res.total / 5)
})
},
// /
planExecute(e) {
if (e.planDetailStatus === '1') {

@ -8,7 +8,7 @@
<div class="form">
<el-form :model="form" label-position="right" label-width="80px" size="mini">
<el-form-item label="明细编号">
<el-input v-model="form.planDetailCode" ></el-input>
<el-input v-model="form.planDetailCode"></el-input>
</el-form-item>
<el-form-item label="工单编号">
<el-input v-model="form.planCode"></el-input>
@ -22,12 +22,12 @@
<el-form-item label="状态">
<el-input v-model="form.planDetailStatus"></el-input>
</el-form-item>
<!-- <el-form-item label="扫码时间">-->
<!-- <el-input v-model="form.materialId1"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品型号">-->
<!-- <el-input v-model="form.materialId1"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="扫码时间">-->
<!-- <el-input v-model="form.materialId1"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品型号">-->
<!-- <el-input v-model="form.materialId1"></el-input>-->
<!-- </el-form-item>-->
</el-form>
<div style="text-align: center">
<el-button type="success">图纸下发</el-button>
@ -66,12 +66,23 @@
:cell-style="{textAlign:'center'}"
:data="tableData"
:header-cell-style="{textAlign:'center'}"
:max-height="19.13 *vw"
highlight-current-row
max-height="19.13vw"
lazy
style="width: 100%"
@current-change="getOrderInfo"
@expand-change="expandChange"
>
<el-table-column type="expand">
<template slot-scope="props">
<div v-for="i in 5">
<div style="display: inline-block;width: 50%;text-align: center">{{ '名称' }}</div>
<div style="display: inline-block;width: 50%;text-align: center">
<el-button type="text">开始</el-button>
</div>
</div>
</template>
</el-table-column>
<el-table-column
label="序号"
type="index"
@ -123,38 +134,40 @@
<template slot-scope="scope">
<el-popconfirm
confirm-button-text='是'
v-if="scope.row.completeAmount === 0"
cancel-button-text='否'
confirm-button-text='是'
icon="el-icon-info"
v-if="scope.row.completeAmount === 0"
icon-color="red"
@confirm="startNextProduction(scope.row)"
title="确定开始计划吗?"
@confirm="startNextProduction(scope.row)"
>
<el-button
slot="reference"
size="small"
type="text"
slot="reference">开始</el-button>
type="text">开始
</el-button>
</el-popconfirm>
<el-popconfirm
confirm-button-text='是'
v-if="scope.row.completeAmount !== 0 && scope.row.completeAmount < scope.row.planAmount"
cancel-button-text='否'
confirm-button-text='是'
icon="el-icon-info"
v-if="scope.row.completeAmount !== 0 && scope.row.completeAmount < scope.row.planAmount"
icon-color="red"
@confirm="startNextProduction(scope.row)"
title="确定继续计划吗?"
@confirm="startNextProduction(scope.row)"
>
<el-button
slot="reference"
size="small"
type="text"
slot="reference">继续</el-button>
type="text">继续
</el-button>
</el-popconfirm>
<el-button
size="small"
type="text"
style="margin-left: 4px"
type="text"
>
退库
</el-button>
@ -190,7 +203,7 @@
</el-row>
</div>
<el-dialog title="板材领料" :visible.sync="getMaterialsModel">
<el-dialog :visible.sync="getMaterialsModel" title="板材领料">
<el-form :model="form">
<el-form-item label="库位码" label-width="120px">
<el-input v-model="form.name" autocomplete="off"></el-input>
@ -214,17 +227,18 @@ import {
completeProductPlanDetail,
getNewestProductPlanDetail,
getProductPlans,
startNextProductPlanDetail
startNextProductPlanDetail,
getPlanDrawings
} from "@/api/board/laserLight";
const setState = (e)=>{
if(e === '1'){
const setState = (e) => {
if (e === '1') {
return '未开始'
}
if(e === '2'){
if (e === '2') {
return '已开始'
}
if(e === '3' || e === '9'){
if (e === '3' || e === '9') {
return '已完成'
}
}
@ -238,8 +252,9 @@ export default {
return {
nowNum1: 1,
totalNum1: 0,
getMaterialsModel:false,
getMaterialsModel: false,
form: {},
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
tableData: [],
}
},
@ -249,7 +264,7 @@ export default {
this.totalNum1 = Math.ceil(e.total / 5)
this.$refs.table1.setCurrentRow(e.rows[0]);
this.getInfo(e.rows[0])
getNewestProductPlanDetail({planId:e.rows[0].planId}).then(val=>{
getNewestProductPlanDetail({planId: e.rows[0].planId}).then(val => {
this.form = val.data
this.form.materialId = e.rows[0].materialId
this.form.materialName = e.rows[0].materialName
@ -434,15 +449,24 @@ export default {
this.totalNum1 = Math.ceil(e.total / 5)
})
},
getOrderInfo(e){
getOrderInfo(e) {
this.getInfo(e)
getNewestProductPlanDetail({planId:e.planId}).then(val=>{
getNewestProductPlanDetail({planId: e.planId}).then(val => {
this.form = val.data
this.form.materialId = e.materialId
this.form.materialName = e.materialName
this.form.planDetailStatus = setState(val.data.planDetailStatus)
})
},
async expandChange(e, rows) {
if (rows.length === 0) return
console.log(e)
if (rows.length > 1) {
this.$refs.table1.toggleRowExpansion(rows[0], false)
}
const data = await getPlanDrawings()
console.log(data)
},
//
getInfo(e) {
this.$refs.chart1_1.setData({
@ -467,7 +491,7 @@ export default {
center: ["50%", "50%"],
data: [
{
value: e.planAmount === 0 ? 0.0001 : e.planAmount ,
value: e.planAmount === 0 ? 0.0001 : e.planAmount,
label: {
normal: {
rich: {
@ -546,7 +570,7 @@ export default {
center: ["50%", "50%"],
data: [
{
value: e.completeAmount === 0 ? 0.0001 : e.completeAmount ,
value: e.completeAmount === 0 ? 0.0001 : e.completeAmount,
label: {
normal: {
rich: {
@ -625,7 +649,7 @@ export default {
center: ["50%", "50%"],
data: [
{
value: (e.planAmount - e.completeAmount) === 0 ? 0.0001 : (e.planAmount - e.completeAmount) ,
value: (e.planAmount - e.completeAmount) === 0 ? 0.0001 : (e.planAmount - e.completeAmount),
label: {
normal: {
rich: {
@ -704,7 +728,7 @@ export default {
center: ["50%", "50%"],
data: [
{
value: ((e.completeAmount / e.planAmount)*100).toFixed(2),
value: ((e.completeAmount / e.planAmount) * 100).toFixed(2),
label: {
normal: {
rich: {
@ -746,7 +770,7 @@ export default {
},
},
{
value: ((1-(e.completeAmount / e.planAmount))*100).toFixed(2),
value: ((1 - (e.completeAmount / e.planAmount)) * 100).toFixed(2),
name: "invisible",
itemStyle: {
normal: {
@ -763,7 +787,7 @@ export default {
})
},
//
async startNextProduction(e){
async startNextProduction(e) {
const data = await startNextProductPlanDetail({planId: e.planId})
this.form = data.data
this.form.materialId = e.materialId
@ -771,7 +795,7 @@ export default {
this.form.planDetailStatus = setState(data.data.planDetailStatus)
},
//
accomplishPlan(){
accomplishPlan() {
this.$confirm('是否完成计划', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -788,9 +812,9 @@ export default {
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5)
let data = e.rows.find(v=>v.planCode === this.form.planCode) || null
let data = e.rows.find(v => v.planCode === this.form.planCode) || null
this.$refs.table1.setCurrentRow(data || e.rows[0]);
this.getInfo(data ||e.rows[0])
this.getInfo(data || e.rows[0])
})
})
})
@ -957,6 +981,7 @@ export default {
border-radius: 0;
}
}
.roundBorder {
position: absolute;
transform: translate(-50%, -50%);

Loading…
Cancel
Save