Browse Source

产量报告

master
rui_li 4 years ago
parent
commit
667aee7966
  1. 2
      src/api/yieldReport/produce_order.js
  2. 39
      src/api/yieldReport/produce_report_normal.js
  3. 38
      src/assets/scss/global.scss
  4. 9
      src/views/modules/schedule/order_schedule.vue
  5. 232
      src/views/modules/yieldReport/produce_order.vue
  6. 2700
      src/views/modules/yieldReport/produce_report_normal.vue

2
src/api/yieldReport/produce_order.js

@ -4,7 +4,7 @@ import { createAPI } from '@/utils/httpRequest.js'
export const getProduceScheduleList = data => createAPI('schedule/getProduceScheduleData', 'POST', data)
// 获取信息
export const getShopOrderList = data => createAPI('schedule/getShopOrderList', 'POST', data)
export const getOperatorData = data => createAPI('schedule/getOperatorData', 'POST', data)
// 获取信息
export const getOrderScheduleList = data => createAPI('schedule/getOrderScheduleList', 'POST', data)

39
src/api/yieldReport/produce_report_normal.js

@ -0,0 +1,39 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取派工单信息
export const getScheduleDataBySeqNo = data => createAPI('schedule/getScheduleDataBySeqNo', 'POST', data)
// 获取当前上机卷信息
export const getCurrentRollOpsBySeqNo = data => createAPI('schedule/getCurrentRollOpsBySeqNo', 'POST', data)
// 获取当前派工单的时间记录
export const getSfdcTimeByCon = data => createAPI('schedule/getSfdcTimeByCon', 'POST', data)
// 获取当前派工单的刀模记录
export const getOrderToolByCon = data => createAPI('schedule/getOrderToolByCon', 'POST', data)
// 获取当前派工单的刀模记录
export const getSfdcToolByCon = data => createAPI('schedule/getSfdcToolByCon', 'POST', data)
// 获取当前工单的Bom记录
export const getOrderBomByCon = data => createAPI('schedule/getOrderBomByCon', 'POST', data)
// 获取当前派工单的材料记录
export const getSfdcMaterialByCon = data => createAPI('schedule/getSfdcMaterialByCon', 'POST', data)
// 获取当前派工单的上机卷记录
export const getSfdcRollOpsByCon = data => createAPI('schedule/getSfdcRollOpsByCon', 'POST', data)
// 获取当前派工单的不良卷记录
export const getSfdcDefectByCon = data => createAPI('schedule/getSfdcDefectByCon', 'POST', data)
// 获取当前上机卷信息
export const getSfdcRollByCon = data => createAPI('schedule/getSfdcRollByCon', 'POST', data)

38
src/assets/scss/global.scss

@ -28,8 +28,8 @@
background-color: #17b3a3;
color: #fff;
height: 20px;
}
.el-table .cell {
line-height: 14px;
font-size: 12px;
@ -248,6 +248,42 @@ div.el-time-width{
padding-left: 23px;
}
/* table单击选中行的样式 */
.el-table__body tr.current-row > td{
background-color: #d9edf7 !important; ;
/* color: #f19944; */ /* 设置文字颜色,可以选择不设置 */
}
/*全局的fieldset样式*/
.customer-fieldset{
padding: 0.125em;
}
/*全局fieldset的legend的样式*/
.customer-fieldset > .customer-legend{
font-size: 12px;
line-height: 20px;
}
/*全局fieldset的页签内容的样式*/
.customer-fieldset .el-tabs__item {
padding: 0 13px;
height: 26px;
line-height: 26px;
font-size: 12px;
font-weight: 500;
}
/*定制组件的样式*/
.customer-css .el-dialog{
top: 10vh !important;
margin-top: 0px !important;
margin-bottom: 10px;
}
/* 定制模态框中 table的样式 */
.customer-tab .el-table .is-leaf{
line-height: 16px;
}
/*.el-form {
margin-top: -8px !important;
}*/

9
src/views/modules/schedule/order_schedule.vue

@ -103,7 +103,7 @@
</el-form>
</fieldset>
<!-- 等待订单 -->
<fieldset style="margin-left: 585px; margin-top: -93px; width: 180px; ">
<fieldset style="margin-left: 585px; margin-top: -93px; width: 180px; ">
<legend>等待订单</legend>
<el-form :inline="true" label-position="left" label-width="100px" class="customer-border">
<el-form-item :label="'等待时间(分钟):'" >
@ -1729,13 +1729,6 @@ export default {
}
</script>
<style>
.el-textarea__inner {
padding: 5px 5px;
}
</style>
<!--当前页面的标签样式-->
<style scoped lang="scss">

232
src/views/modules/yieldReport/produce_order.vue

@ -1,9 +1,9 @@
<template>
<div class="customer-css" >
<div class="customer-css">
<!-- 菜单按钮区域 -->
<fieldset class="customer-field" style="width: 675px; padding: 0.35em 0.75em 0.425em;" >
<fieldset class="customer-field" style="width: 675px; padding: 0.35em 0.75em 0.425em;">
<legend>菜单</legend>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;" >
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;">
<el-form-item :label="''">
<el-button type="primary" style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">列表</el-button>
</el-form-item>
@ -11,32 +11,44 @@
<el-button type="primary" style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">关闭</el-button>
</el-form-item>
<el-form-item :label="''">
<el-button type="primary" @click="refreshPageTables()" style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">查询</el-button>
<el-button type="primary" @click="refreshPageTables()"
style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">查询
</el-button>
</el-form-item>
<el-form-item :label="''">
<el-button type="primary" @click="refreshPageTables()" style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">报工</el-button>
<el-button type="primary" @click="switchOperatorModal()"
style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">报工
</el-button>
</el-form-item>
<el-form-item :label="''">
<el-button type="primary" @click="refreshPageTables()" style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">FQC报工</el-button>
<el-button type="primary" @click="refreshPageTables()"
style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">FQC报工
</el-button>
</el-form-item>
<el-form-item :label="''">
<el-button type="primary" @click="refreshPageTables()" style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">返工重检</el-button>
<el-button type="primary" @click="refreshPageTables()"
style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">返工重检
</el-button>
</el-form-item>
<el-form-item :label="''">
<el-button type="primary" @click="refreshPageTables()" style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">换包装</el-button>
<el-button type="primary" @click="refreshPageTables()"
style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">换包装
</el-button>
</el-form-item>
<el-form-item :label="''">
<el-button type="primary" @click="refreshPageTables()" style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">FQC分卷</el-button>
<el-button type="primary" @click="refreshPageTables()"
style="margin-left: 10px; margin-top: 13px; margin-bottom: 5px;">FQC分卷
</el-button>
</el-form-item>
</el-form>
</fieldset>
<!-- 查询时间和产品 -->
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;" >
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
<el-form-item :label="'工厂编号:'">
<el-input v-model="searchData.site" style="width: 85px"></el-input>
</el-form-item>
<el-form-item :label="'机台编号:'">
<el-input v-model="searchData.resourceId" style="width: 120px"></el-input>
<el-input v-model="searchData.resourceId" style="width: 110px"></el-input>
</el-form-item>
<el-form-item :label="'计划开工时间:'">
<el-date-picker class="el-time-width"
@ -61,18 +73,20 @@
<el-input v-model="searchData.seqNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="''" style="margin-left: -5px;">
<el-checkbox style="margin-top: 28px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">显示已结束派工单</el-checkbox>
<el-checkbox style="margin-top: 28px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">显示已结束派工单
</el-checkbox>
</el-form-item>
</el-form>
<!-- 工单主表信息 -->
<el-main style="margin-left: -20px; margin-top: -20px; width: 104%;">
<el-table
:height="height"
:data="produceScheduleList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table @row-click="setCurrentRow"
:height="height"
highlight-current-row
:data="produceScheduleList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnProduceScheduleArray" :key="index"
:sortable="item.columnSortable"
@ -84,13 +98,47 @@
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-main>
<!-- 展示员工切换的模块 -->
<el-dialog title="操作员切换" :close-on-click-modal="false"
v-drag :visible.sync="operatorData.showFlag" width="300px">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;">
<el-form-item :label="'操作员:'">
<el-input v-model="operatorData.operatorId" style="width: 110px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;">
<el-form-item :label="'操作员姓名:'">
<el-input v-model="operatorData.operatorName" style="width: 110px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px"
style="margin-left: 180px; margin-top: -80px; width: 60px;">
<el-form-item label="">
<el-button type="primary">列表</el-button>
</el-form-item>
<el-form-item label="" style="margin-top: 10px; margin-bottom: 0px;">
<el-button type="primary" @click="saveOperatorData()">保存</el-button>
</el-form-item>
<el-form-item label="" style="margin-top: 15px; margin-bottom: 5px;">
<el-button type="primary" @click="operatorData.showFlag = false">关闭</el-button>
</el-form-item>
</el-form>
</el-dialog>
<produceReportNormal class="customer-components" v-if="showReportFlag" ref="produceReportNormal">
</produceReportNormal>
</div>
</template>
@ -98,14 +146,16 @@
import {
getProduceScheduleList,
getOperatorData,
} from '@/api/yieldReport/produce_order.js'
import produceReportNormal from "./produce_report_normal";
export default {
data() {
return {
height: 800,
modelFlag: false,
modelInputFlag: true,
operatorFlag: false,
showReportFlag: false,
selectList: [],
searchData: {
site: this.$store.state.user.site,
@ -116,7 +166,16 @@ export default {
planStartTime2: this.dayjs(new Date()).format('YYYY-MM-DD'),
closedFlag: 'N',
status: 1,
user: this.$store.state.user.name
username: this.$store.state.user.name
},
currentRow: {},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
showFlag: false
},
produceScheduleList: [],
dataListLoading: false,
@ -134,7 +193,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "计划开工时间",
columnWidth: 60,
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -152,7 +211,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "计划完工时间",
columnWidth: 80,
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -170,7 +229,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "需求时间",
columnWidth: 80,
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -188,7 +247,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "已报告时间",
columnWidth: 80,
columnWidth: 70,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -206,7 +265,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "生产订单号",
columnWidth: 80,
columnWidth: 70,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -224,7 +283,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "工序号",
columnWidth: 80,
columnWidth: 50,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -260,7 +319,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "机台",
columnWidth: 80,
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -278,7 +337,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "需求数量",
columnWidth: 80,
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -296,7 +355,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "已报告数量",
columnWidth: 80,
columnWidth: 70,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -314,7 +373,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "生产订单要求完工日期",
columnWidth: 80,
columnWidth: 130,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -332,7 +391,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "已关闭",
columnWidth: 80,
columnWidth: 50,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -350,7 +409,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "产品编码",
columnWidth: 80,
columnWidth: 110,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -368,7 +427,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "产品名称",
columnWidth: 80,
columnWidth: 180,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -433,10 +492,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceNextItemDesc',
serialNumber: '5302ProduceBarcodeId',
tableId: "5302Produce",
tableName: "条形码",
columnProp: "nextItemDesc",
columnProp: "barcodeId",
headerAlign: "center",
align: "center",
columnLabel: "条形码",
@ -592,6 +651,24 @@ export default {
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302ProduceMachRunFactor',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "machRunFactor",
headerAlign: "center",
align: "center",
columnLabel: "单位产出",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5302,
@ -847,10 +924,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302Produce',
serialNumber: '5302ProduceManualFlag',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "",
columnProp: "manualFlag",
headerAlign: "center",
align: "center",
columnLabel: "刀模已发",
@ -865,10 +942,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5302,
serialNumber: '5302Produce',
serialNumber: '5302ProduceRepairSOFlag',
tableId: "5302Produce",
tableName: "待生产工单",
columnProp: "",
columnProp: "repairSOFlag",
headerAlign: "center",
align: "center",
columnLabel: "印版已发",
@ -883,12 +960,16 @@ export default {
],
}
},
components: {
produceReportNormal,
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 225;
})
},
methods: {
/*查询派工单*/
getProduceScheduleList() {
getProduceScheduleList(this.searchData).then(({data}) => {
this.produceScheduleList = data.rows
@ -896,9 +977,58 @@ export default {
},
/*刷新页面table*/
refreshPageTables(){
refreshPageTables() {
this.getProduceScheduleList();
},
/*设置选中行的参数*/
setCurrentRow(row, column, event) {
this.currentRow = JSON.parse(JSON.stringify(row));
},
//modal
switchOperatorModal() {
//
if (JSON.stringify(this.currentRow) == '{}') {
this.$message.error('请先选择派工单!');
return false;
}
//
this.operatorData.showFlag = true;
},
//使
//
saveOperatorData() {
//
getOperatorData(this.operatorData).then(({data}) => {
let operatorData = data.row;
let status = operatorData.status;
//
this.operatorData.status = status;
//
if (status == 'N') {
this.operatorFlag = false;
} else {
this.operatorFlag = true;
}
if (!this.operatorFlag) {
this.$message.error('操作员信息不可用!');
}
})
//--
.then(() => {
if (!this.operatorFlag) {
return false;
}
//
this.operatorData.showFlag = false;
//
this.showReportFlag = true;
//
this.$nextTick(() => {
this.$refs.produceReportNormal.init(this.currentRow.seqNo);
});
})
}
},
created() {
//
@ -918,26 +1048,29 @@ export default {
<style scoped lang="scss">
/*针对el-card*/
.customer-card .el-form-item__content{
.customer-card .el-form-item__content {
margin-top: -15px;
}
.customer-card .el-form-item{
.customer-card .el-form-item {
height: 22px;
}
.customer-border .el-form-item__content{
.customer-border .el-form-item__content {
margin-top: -30px;
}
/*全局年与日类型 宽度*/
div.el-time-width{
width: 190px !important;
div.el-time-width {
width: 110px !important;
}
/* 全局时间右边框*/
.customer-css input.el-input__inner{
.customer-css input.el-input__inner {
height: 22px !important;
padding-right: 0px !important;
}
/* 控制el-card标签的数据*/
div.customer-el-card {
margin-left: 110px;
@ -945,6 +1078,7 @@ div.customer-el-card {
height: 20px;
width: 60px;
}
/* 颜色控制 */
div.customer-el-card-pink {
background: #FF00FF;
@ -959,7 +1093,7 @@ div.customer-el-card-blue {
}
/*清掉样式*/
.el-radio+.el-radio {
.el-radio + .el-radio {
margin-left: 0px;
}

2700
src/views/modules/yieldReport/produce_report_normal.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save