|
|
@ -8,7 +8,7 @@
|
|
|
|
<div class="form">
|
|
|
|
<div class="form">
|
|
|
|
<el-form :model="form" label-position="right" label-width="80px" size="mini">
|
|
|
|
<el-form :model="form" label-position="right" label-width="80px" size="mini">
|
|
|
|
<el-form-item label="明细编号">
|
|
|
|
<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>
|
|
|
|
<el-form-item label="工单编号">
|
|
|
|
<el-form-item label="工单编号">
|
|
|
|
<el-input v-model="form.planCode"></el-input>
|
|
|
|
<el-input v-model="form.planCode"></el-input>
|
|
|
@ -22,12 +22,12 @@
|
|
|
|
<el-form-item label="状态">
|
|
|
|
<el-form-item label="状态">
|
|
|
|
<el-input v-model="form.planDetailStatus"></el-input>
|
|
|
|
<el-input v-model="form.planDetailStatus"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<!-- <el-form-item label="扫码时间">-->
|
|
|
|
<!-- <el-form-item label="扫码时间">-->
|
|
|
|
<!-- <el-input v-model="form.materialId1"></el-input>-->
|
|
|
|
<!-- <el-input v-model="form.materialId1"></el-input>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- <el-form-item label="产品型号">-->
|
|
|
|
<!-- <el-form-item label="产品型号">-->
|
|
|
|
<!-- <el-input v-model="form.materialId1"></el-input>-->
|
|
|
|
<!-- <el-input v-model="form.materialId1"></el-input>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div style="text-align: center">
|
|
|
|
<div style="text-align: center">
|
|
|
|
<el-button type="success">图纸下发</el-button>
|
|
|
|
<el-button type="success">图纸下发</el-button>
|
|
|
@ -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,17 +227,18 @@ import {
|
|
|
|
completeProductPlanDetail,
|
|
|
|
completeProductPlanDetail,
|
|
|
|
getNewestProductPlanDetail,
|
|
|
|
getNewestProductPlanDetail,
|
|
|
|
getProductPlans,
|
|
|
|
getProductPlans,
|
|
|
|
startNextProductPlanDetail
|
|
|
|
startNextProductPlanDetail,
|
|
|
|
|
|
|
|
getPlanDrawings
|
|
|
|
} from "@/api/board/laserLight";
|
|
|
|
} from "@/api/board/laserLight";
|
|
|
|
|
|
|
|
|
|
|
|
const setState = (e)=>{
|
|
|
|
const setState = (e) => {
|
|
|
|
if(e === '1'){
|
|
|
|
if (e === '1') {
|
|
|
|
return '未开始'
|
|
|
|
return '未开始'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(e === '2'){
|
|
|
|
if (e === '2') {
|
|
|
|
return '已开始'
|
|
|
|
return '已开始'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(e === '3' || e === '9'){
|
|
|
|
if (e === '3' || e === '9') {
|
|
|
|
return '已完成'
|
|
|
|
return '已完成'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -238,8 +252,9 @@ export default {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
nowNum1: 1,
|
|
|
|
nowNum1: 1,
|
|
|
|
totalNum1: 0,
|
|
|
|
totalNum1: 0,
|
|
|
|
getMaterialsModel:false,
|
|
|
|
getMaterialsModel: false,
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
|
|
|
|
|
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
|
|
|
|
tableData: [],
|
|
|
|
tableData: [],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -249,7 +264,7 @@ export default {
|
|
|
|
this.totalNum1 = Math.ceil(e.total / 5)
|
|
|
|
this.totalNum1 = Math.ceil(e.total / 5)
|
|
|
|
this.$refs.table1.setCurrentRow(e.rows[0]);
|
|
|
|
this.$refs.table1.setCurrentRow(e.rows[0]);
|
|
|
|
this.getInfo(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 = val.data
|
|
|
|
this.form.materialId = e.rows[0].materialId
|
|
|
|
this.form.materialId = e.rows[0].materialId
|
|
|
|
this.form.materialName = e.rows[0].materialName
|
|
|
|
this.form.materialName = e.rows[0].materialName
|
|
|
@ -434,15 +449,24 @@ export default {
|
|
|
|
this.totalNum1 = Math.ceil(e.total / 5)
|
|
|
|
this.totalNum1 = Math.ceil(e.total / 5)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getOrderInfo(e){
|
|
|
|
getOrderInfo(e) {
|
|
|
|
this.getInfo(e)
|
|
|
|
this.getInfo(e)
|
|
|
|
getNewestProductPlanDetail({planId:e.planId}).then(val=>{
|
|
|
|
getNewestProductPlanDetail({planId: e.planId}).then(val => {
|
|
|
|
this.form = val.data
|
|
|
|
this.form = val.data
|
|
|
|
this.form.materialId = e.materialId
|
|
|
|
this.form.materialId = e.materialId
|
|
|
|
this.form.materialName = e.materialName
|
|
|
|
this.form.materialName = e.materialName
|
|
|
|
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({
|
|
|
@ -467,7 +491,7 @@ export default {
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: e.planAmount === 0 ? 0.0001 : e.planAmount ,
|
|
|
|
value: e.planAmount === 0 ? 0.0001 : e.planAmount,
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
rich: {
|
|
|
|
rich: {
|
|
|
@ -546,7 +570,7 @@ export default {
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: e.completeAmount === 0 ? 0.0001 : e.completeAmount ,
|
|
|
|
value: e.completeAmount === 0 ? 0.0001 : e.completeAmount,
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
rich: {
|
|
|
|
rich: {
|
|
|
@ -625,7 +649,7 @@ export default {
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
data: [
|
|
|
|
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: {
|
|
|
|
label: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
rich: {
|
|
|
|
rich: {
|
|
|
@ -704,7 +728,7 @@ export default {
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: ((e.completeAmount / e.planAmount)*100).toFixed(2),
|
|
|
|
value: ((e.completeAmount / e.planAmount) * 100).toFixed(2),
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
rich: {
|
|
|
|
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",
|
|
|
|
name: "invisible",
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
@ -763,7 +787,7 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 开始继续
|
|
|
|
// 开始继续
|
|
|
|
async startNextProduction(e){
|
|
|
|
async startNextProduction(e) {
|
|
|
|
const data = await startNextProductPlanDetail({planId: e.planId})
|
|
|
|
const data = await startNextProductPlanDetail({planId: e.planId})
|
|
|
|
this.form = data.data
|
|
|
|
this.form = data.data
|
|
|
|
this.form.materialId = e.materialId
|
|
|
|
this.form.materialId = e.materialId
|
|
|
@ -771,7 +795,7 @@ export default {
|
|
|
|
this.form.planDetailStatus = setState(data.data.planDetailStatus)
|
|
|
|
this.form.planDetailStatus = setState(data.data.planDetailStatus)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 完成
|
|
|
|
// 完成
|
|
|
|
accomplishPlan(){
|
|
|
|
accomplishPlan() {
|
|
|
|
this.$confirm('是否完成计划', '确认', {
|
|
|
|
this.$confirm('是否完成计划', '确认', {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
cancelButtonText: '取消',
|
|
|
@ -788,9 +812,9 @@ export default {
|
|
|
|
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
|
|
|
|
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
|
|
|
|
this.tableData = e.rows
|
|
|
|
this.tableData = e.rows
|
|
|
|
this.totalNum1 = Math.ceil(e.total / 5)
|
|
|
|
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.$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;
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.roundBorder {
|
|
|
|
.roundBorder {
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|