修改生产界面

master
夜笙歌 10 months ago
parent ce46af16e0
commit c3a182e723

@ -234,7 +234,7 @@ export function assignTask(data) {
// 查询物料安装情况 // 查询物料安装情况
export function selectMaterialInstallationCircumstance(query) { export function selectMaterialInstallationCircumstance(query) {
return request({ return request({
url: '/api/selectMaterialInstallationCircumstance', url: '/mes/api/selectMaterialInstallationCircumstance',
method: 'get', method: 'get',
params: query params: query
}) })

@ -89,7 +89,6 @@
</div> </div>
</div> </div>
</div> </div>
<div> <div>
<div class="roundBorder" style="top: 32%;left: 1.2%;"> <div class="roundBorder" style="top: 32%;left: 1.2%;">
<el-button :disabled="nowNum1 <= 1" circle icon="el-icon-back" size="mini" @click="pre1"></el-button> <el-button :disabled="nowNum1 <= 1" circle icon="el-icon-back" size="mini" @click="pre1"></el-button>
@ -105,7 +104,7 @@
<div class="whiteTable"> <div class="whiteTable">
<el-table <el-table
:cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}"
:data="tableData" :data="tableData2"
:header-cell-style="{textAlign:'center'}" :header-cell-style="{textAlign:'center'}"
:max-height="19.13 * vw" :max-height="19.13 * vw"
style="width: 100%" style="width: 100%"
@ -117,62 +116,20 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="工单编号" label="物料编码"
prop="planCode" prop="materialCode"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="物料名称" label="物料名称"
prop="materialName" prop="materialName"
width="100"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="计划" label="完成数量"
prop="planAmount" prop="checkAmount"
width="100"
>
</el-table-column>
<el-table-column
label="实际"
prop="completeAmount"
width="100"
>
</el-table-column>
<el-table-column
label="差异"
prop="difference"
width="100" 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-column>
</el-table> </el-table>
</div> </div>
@ -192,11 +149,14 @@
<div class="chart"> <div class="chart">
<div class="whiteTable"> <div class="whiteTable">
<el-table <el-table
highlight-current-row
@current-change="getMaterialInstall"
:cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}"
:data="tableData1" :data="tableData1"
:header-cell-style="{textAlign:'center'}" :header-cell-style="{textAlign:'center'}"
:max-height="19.13 * vw" :max-height="19.13 * vw"
style="width: 100%" style="width: 100%"
ref="table"
> >
<el-table-column <el-table-column
@ -282,10 +242,10 @@
</div> </div>
<div> <div>
<div class="roundBorder" style="top: 72%;left: 1.2%;"> <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> <el-button :disabled="nowNum3 <= 1" circle icon="el-icon-back" size="mini" @click="pre3"></el-button>
</div> </div>
<div class="roundBorder" style="top: 72%;left: 49%;"> <div class="roundBorder" style="top: 72%;left: 49%;">
<el-button :disabled="nowNum2 >= totalNum2" circle icon="el-icon-right" size="mini" @click="next2"></el-button> <el-button :disabled="nowNum3 >= totalNum3" circle icon="el-icon-right" size="mini" @click="next3"></el-button>
</div> </div>
</div> </div>
@ -295,7 +255,7 @@
<div class="whiteTable"> <div class="whiteTable">
<el-table <el-table
:cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}"
:data="tableData" :data="tableData3"
:header-cell-style="{textAlign:'center'}" :header-cell-style="{textAlign:'center'}"
:max-height="19.13 * vw" :max-height="19.13 * vw"
style="width: 100%" style="width: 100%"
@ -307,73 +267,31 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="工单编号" label="物料编码"
prop="planCode" prop="materialCode"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="物料名称" label="物料名称"
prop="materialName" prop="materialName"
width="100"
>
</el-table-column>
<el-table-column
label="计划"
prop="planAmount"
width="100"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="实际" label="差异值"
prop="completeAmount" prop="needAmount"
width="100" width="100"
> >
</el-table-column> </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> </el-table>
</div> </div>
</div> </div>
</div> </div>
<div> <div>
<div class="roundBorder" style="top: 72%;left: 51%;"> <div class="roundBorder" style="top: 72%;left: 51%;">
<el-button :disabled="nowNum2 <= 1" circle icon="el-icon-back" size="mini" @click="pre2"></el-button> <el-button :disabled="nowNum4 <= 1" circle icon="el-icon-back" size="mini" @click="pre4"></el-button>
</div> </div>
<div class="roundBorder" style="top: 72%;left: 98.8%;"> <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> <el-button :disabled="nowNum4 >= totalNum4" circle icon="el-icon-right" size="mini" @click="next4"></el-button>
</div> </div>
</div> </div>
@ -648,6 +566,7 @@ export default {
}, },
data() { data() {
return { return {
info: {},
fileList: [], fileList: [],
SOPModel: false, SOPModel: false,
pictureDetailModel: false, pictureDetailModel: false,
@ -665,6 +584,7 @@ export default {
totalNum3: 0, totalNum3: 0,
nowNum4: 1, nowNum4: 1,
totalNum4: 0, totalNum4: 0,
materialBomId:null,
planId: null, planId: null,
nowMaterial: null, nowMaterial: null,
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100, vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
@ -674,6 +594,8 @@ export default {
dialogVisible: false, dialogVisible: false,
tableData: [], tableData: [],
tableData1: [], tableData1: [],
tableData2: [],
tableData3: [],
productInstockVisible: false, productInstockVisible: false,
productInstockForm: { productInstockForm: {
@ -712,185 +634,25 @@ export default {
} }
}, },
mounted() { mounted() {
setInterval(() => { // setInterval(() => {
this.$notify.info({ // this.$notify.info({
title: '通知', // title: '',
message: '通知公告', // message: '',
position: 'bottom-right', // position: 'bottom-right',
duration: 0 // duration: 0
}); // });
}, 60 * 1000) // }, 60 * 1000)
getProductPlans({pageNum: 1, pageSize: 5}).then(e => { getProductPlans({pageNum: 1, 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)
this.nowMaterial = e.rows?.[0]?.materialName this.nowMaterial = e.rows?.[0]?.materialName
this.materialBomId = e.rows?.[0]?.materialBomId
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.rows?.[0]?.planId}).then(res => { getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.rows?.[0]?.planId}).then(res => {
this.tableData1 = res.rows this.tableData1 = res.rows
this.totalNum2 = Math.ceil(res.total / 5) this.totalNum3 = Math.ceil(res.total / 5)
this.$refs.table.setCurrentRow(res.rows[0]);
}) })
}) })
this.$refs.chart2.setData({
tooltip: {
trigger: 'axis',
axisPointer: {
//
type: 'shadow' // 线'line' | 'shadow'
}
},
grid: {
left: '0',
right: '4%',
bottom: '0',
top: 20,
containLabel: true
},
xAxis: {
type: 'category',
data: [1, 2, 3, 4, 5, 6],
axisLine: {
lineStyle: {
color: 'white'
}
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: 'Microsoft YaHei'
}
}
},
yAxis: {
type: 'value',
axisLine: {
show: false,
lineStyle: {
color: 'white'
}
},
splitLine: {
show: false
},
axisLabel: {}
},
series: [
{
name: '数量',
label: {
normal: {
show: true,
position: 'top',
textStyle: {
color: '#a8aab0',
fontStyle: 'normal',
fontFamily: '微软雅黑',
fontSize: 0.75 * vw
}
}
},
type: 'bar',
barWidth: '30%',
barMaxWidth: 50,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#39ffff'
},
{
offset: 1,
color: '#5affa6'
}
])
}
},
data: [1, 2, 3, 4, 5, 6]
}
]
})
this.$refs.chart4.setData({
tooltip: {
trigger: 'axis',
axisPointer: {
//
type: 'shadow' // 线'line' | 'shadow'
}
},
grid: {
left: '0',
right: '4%',
bottom: '0',
top: 20,
containLabel: true
},
xAxis: {
type: 'category',
data: [1, 2, 3, 4, 5, 6],
axisLine: {
lineStyle: {
color: 'white'
}
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: 'Microsoft YaHei'
}
}
},
yAxis: {
type: 'value',
axisLine: {
show: false,
lineStyle: {
color: 'white'
}
},
splitLine: {
show: false
},
axisLabel: {}
},
series: [
{
name: '数量',
label: {
normal: {
show: true,
position: 'top',
textStyle: {
color: '#a8aab0',
fontStyle: 'normal',
fontFamily: '微软雅黑',
fontSize: 0.75 * vw
}
}
},
type: 'bar',
barWidth: '30%',
barMaxWidth: 50,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#39ffff'
},
{
offset: 1,
color: '#5affa6'
}
])
}
},
data: [1, 2, 3, 4, 5, 6]
}
]
})
}, },
methods: { methods: {
@ -922,16 +684,26 @@ export default {
}, },
next2() { next2() {
this.nowNum2 += 1 this.nowNum2 += 1
getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: this.planId}).then(res => { selectMaterialInstallationCircumstance({
this.tableData1 = res.rows installType: 1,
this.totalNum2 = Math.ceil(res.total / 5) planDetailId: this.info.planDetailId,
pageNum: this.nowNum2,
pageSize: 5
}).then(v => {
this.tableData2 = v.rows
this.totalNum2 = Math.ceil(v.total / 5)
}) })
}, },
pre2() { pre2() {
this.nowNum2 -= 1 this.nowNum2 -= 1
getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: this.planId}).then(res => { selectMaterialInstallationCircumstance({
this.tableData1 = res.rows installType: 1,
this.totalNum2 = Math.ceil(res.total / 5) planDetailId: this.info.planDetailId,
pageNum: this.nowNum2,
pageSize: 5
}).then(v => {
this.tableData2 = v.rows
this.totalNum2 = Math.ceil(v.total / 5)
}) })
}, },
next3() { next3() {
@ -950,16 +722,28 @@ export default {
}, },
next4() { next4() {
this.nowNum4 += 1 this.nowNum4 += 1
getProductPlanDetails({pageNum: this.nowNum4, pageSize: 5, planId: this.planId}).then(res => { selectMaterialInstallationCircumstance({
this.tableData1 = res.rows installType: 2,
this.totalNum4 = Math.ceil(res.total / 5) materialBomId: this.materialBomId,
planDetailId: this.info.planDetailId,
pageNum: this.nowNum4,
pageSize: 5
}).then(v => {
this.tableData3 = v.rows
this.totalNum4 = Math.ceil(v.total / 5)
}) })
}, },
pre4() { pre4() {
this.nowNum4 -= 1 this.nowNum4 -= 1
getProductPlanDetails({pageNum: this.nowNum4, pageSize: 5, planId: this.planId}).then(res => { selectMaterialInstallationCircumstance({
this.tableData1 = res.rows installType: 2,
this.totalNum4 = Math.ceil(res.total / 5) materialBomId: this.materialBomId,
planDetailId: this.info.planDetailId,
pageNum: this.nowNum4,
pageSize: 5
}).then(v => {
this.tableData3 = v.rows
this.totalNum4 = Math.ceil(v.total / 5)
}) })
}, },
// / // /
@ -1016,8 +800,9 @@ export default {
// / // /
async getDetail(e) { async getDetail(e) {
this.planId = e.row.planId this.planId = e.row.planId
this.materialBomId = e.row.materialBomId
this.nowMaterial = e.row.materialName this.nowMaterial = e.row.materialName
this.nowNum2 = 1 this.nowNum3 = 1
await getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.row.planId}).then(res => { await getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.row.planId}).then(res => {
if (res.rows.length === 0) { if (res.rows.length === 0) {
this.$confirm('是否生成计划明细', '确认', { this.$confirm('是否生成计划明细', '确认', {
@ -1028,9 +813,10 @@ export default {
insertProductPlanDetails({ insertProductPlanDetails({
"planId": e.row.planId, "planId": e.row.planId,
}).then(val => { }).then(val => {
getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: e.row.planId}).then(res => { getProductPlanDetails({pageNum: this.nowNum3, pageSize: 5, planId: e.row.planId}).then(res => {
this.tableData1 = res.rows this.tableData1 = res.rows
this.totalNum2 = Math.ceil(res.total / 5) this.totalNum3 = Math.ceil(res.total / 5)
this.$refs.table.setCurrentRow(res.rows[0]);
}) })
this.$message({ this.$message({
type: 'info', type: 'info',
@ -1046,17 +832,36 @@ export default {
}) })
} else { } else {
this.tableData1 = res.rows this.tableData1 = res.rows
this.totalNum2 = Math.ceil(res.total / 5) this.$refs.table.setCurrentRow(res.rows[0]);
this.totalNum3 = Math.ceil(res.total / 5)
} }
}) })
},
async getMaterialInstall(e){
this.info = e
this.nowNum2 = 1
this.nowNum4 = 1
const table1 = await selectMaterialInstallationCircumstance({ const table1 = await selectMaterialInstallationCircumstance({
installType:1, installType: 1,
planDetailId:e.row.planDetailId, planDetailId: e.planDetailId,
materialBomId:e.row.materialBomId pageNum: this.nowNum2,
pageSize: 5
}) })
console.log(table1) const table2 = await selectMaterialInstallationCircumstance({
installType: 2,
materialBomId: this.materialBomId,
planDetailId: e.planDetailId,
pageNum: this.nowNum4,
pageSize: 5
})
this.tableData2 = table1.rows
this.tableData3 = table2.rows
this.totalNum2 = Math.ceil(table1.total / 5)
this.totalNum4 = Math.ceil(table2.total / 5)
}, },
// //
getMaterials(val) { getMaterials(val) {
this.searchMaterialValue = '' this.searchMaterialValue = ''
@ -1079,8 +884,6 @@ export default {
}) })
}, },
// //
receiveMaterial() { receiveMaterial() {
applyRawOutstock(this.form).then(e => { applyRawOutstock(this.form).then(e => {
@ -1341,6 +1144,9 @@ export default {
/deep/ .el-table .cell { /deep/ .el-table .cell {
color: #fff color: #fff
} }
/deep/ .current-row .cell {
color: #000
}
/deep/ .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell { /deep/ .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
background-color: #fff0; background-color: #fff0;

Loading…
Cancel
Save