修改生产界面

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

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

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

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

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

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

@ -91,16 +91,89 @@
</div> </div>
<div class="chartBox chartBox2"> <div class="chartBox chartBox2">
<div class="title">库存统计</div> <div class="title">物料安装情况(已完成)</div>
<div class="chart"> <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>
<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> <el-button :disabled="nowNum2 <= 1" circle icon="el-icon-back" size="mini" @click="pre2"></el-button>
</div> </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> <el-button :disabled="nowNum2 >= totalNum2" circle icon="el-icon-right" size="mini" @click="next2"></el-button>
</div> </div>
</div> </div>
@ -195,18 +268,107 @@
</div> </div>
</div> </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="chartBox chartBox4">
<div class="title">当日产量</div> <div class="title">物料安装情况(未完成)</div>
<div class="chart"> <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> </div>
<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">键盘</el-button> <el-button type="success">SOP预览</el-button>
<el-button type="info">最小化</el-button> <el-button type="info">最小化</el-button>
<el-button type="danger">退出</el-button> <el-button type="danger">退出</el-button>
</el-row> </el-row>
@ -250,6 +412,16 @@
prop="materialName" prop="materialName"
> >
</el-table-column> </el-table-column>
<el-table-column
label="可用库存数量"
prop="materialName"
>
</el-table-column>
<el-table-column
label="占用库存数量"
prop="materialName"
>
</el-table-column>
<el-table-column <el-table-column
label="领取数量" label="领取数量"
prop="planAmount" prop="planAmount"
@ -317,6 +489,10 @@ export default {
totalNum1: 0, totalNum1: 0,
nowNum2: 1, nowNum2: 1,
totalNum2: 0, totalNum2: 0,
nowNum3: 1,
totalNum3: 0,
nowNum4: 1,
totalNum4: 0,
planId: null, planId: null,
materialBomId: null, materialBomId: null,
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100, vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
@ -530,6 +706,34 @@ export default {
this.totalNum2 = Math.ceil(res.total / 5) 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) { planExecute(e) {
if (e.planDetailStatus === '1') { if (e.planDetailStatus === '1') {

@ -66,12 +66,23 @@
:cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}"
:data="tableData" :data="tableData"
:header-cell-style="{textAlign:'center'}" :header-cell-style="{textAlign:'center'}"
:max-height="19.13 *vw"
highlight-current-row highlight-current-row
max-height="19.13vw" lazy
style="width: 100%" style="width: 100%"
@current-change="getOrderInfo" @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 <el-table-column
label="序号" label="序号"
type="index" type="index"
@ -123,38 +134,40 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-popconfirm <el-popconfirm
confirm-button-text='是' v-if="scope.row.completeAmount === 0"
cancel-button-text='否' cancel-button-text='否'
confirm-button-text='是'
icon="el-icon-info" icon="el-icon-info"
v-if="scope.row.completeAmount === 0"
icon-color="red" icon-color="red"
@confirm="startNextProduction(scope.row)"
title="确定开始计划吗?" title="确定开始计划吗?"
@confirm="startNextProduction(scope.row)"
> >
<el-button <el-button
slot="reference"
size="small" size="small"
type="text" type="text">开始
slot="reference">开始</el-button> </el-button>
</el-popconfirm> </el-popconfirm>
<el-popconfirm <el-popconfirm
confirm-button-text='是' v-if="scope.row.completeAmount !== 0 && scope.row.completeAmount < scope.row.planAmount"
cancel-button-text='否' cancel-button-text='否'
confirm-button-text='是'
icon="el-icon-info" icon="el-icon-info"
v-if="scope.row.completeAmount !== 0 && scope.row.completeAmount < scope.row.planAmount"
icon-color="red" icon-color="red"
@confirm="startNextProduction(scope.row)"
title="确定继续计划吗?" title="确定继续计划吗?"
@confirm="startNextProduction(scope.row)"
> >
<el-button <el-button
slot="reference"
size="small" size="small"
type="text" type="text">继续
slot="reference">继续</el-button> </el-button>
</el-popconfirm> </el-popconfirm>
<el-button <el-button
size="small" size="small"
type="text"
style="margin-left: 4px" style="margin-left: 4px"
type="text"
> >
退库 退库
</el-button> </el-button>
@ -190,7 +203,7 @@
</el-row> </el-row>
</div> </div>
<el-dialog title="板材领料" :visible.sync="getMaterialsModel"> <el-dialog :visible.sync="getMaterialsModel" title="板材领料">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="库位码" label-width="120px"> <el-form-item label="库位码" label-width="120px">
<el-input v-model="form.name" autocomplete="off"></el-input> <el-input v-model="form.name" autocomplete="off"></el-input>
@ -214,7 +227,8 @@ import {
completeProductPlanDetail, completeProductPlanDetail,
getNewestProductPlanDetail, getNewestProductPlanDetail,
getProductPlans, getProductPlans,
startNextProductPlanDetail startNextProductPlanDetail,
getPlanDrawings
} from "@/api/board/laserLight"; } from "@/api/board/laserLight";
const setState = (e) => { const setState = (e) => {
@ -240,6 +254,7 @@ export default {
totalNum1: 0, totalNum1: 0,
getMaterialsModel: false, getMaterialsModel: false,
form: {}, form: {},
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
tableData: [], tableData: [],
} }
}, },
@ -443,6 +458,15 @@ export default {
this.form.planDetailStatus = setState(val.data.planDetailStatus) 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) { getInfo(e) {
this.$refs.chart1_1.setData({ this.$refs.chart1_1.setData({
@ -957,6 +981,7 @@ export default {
border-radius: 0; border-radius: 0;
} }
} }
.roundBorder { .roundBorder {
position: absolute; position: absolute;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);

Loading…
Cancel
Save