|
|
|
@ -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%);
|
|
|
|
|