Browse Source

创建新卷BUG修改

master
rui_li 4 years ago
parent
commit
9087e41764
  1. 42
      src/api/yieldReport/com_material_settlement.js
  2. 4
      src/api/yieldReport/produce_report_normal.js
  3. 365
      src/views/modules/yieldReport/com_material_settlement.vue
  4. 167
      src/views/modules/yieldReport/com_produce_report_normal.vue
  5. 67
      src/views/modules/yieldReport/com_start_produce.vue
  6. 4
      src/views/modules/yieldReport/com_switch_operator.vue

42
src/api/yieldReport/com_material_settlement.js

@ -0,0 +1,42 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取当前的卷的报工汇总数据
export const getCurrentRollReportedQty = data => createAPI('schedule/getCurrentRollReportedQty', 'POST', data)
// 获取上机卷的时间信息汇总
export const countSfdcTimeQty = data => createAPI('schedule/countSfdcTimeQty', 'POST', data)
// 获取派工单的班次信息
export const getScheduleShiftData = data => createAPI('schedule/getScheduleShiftData', 'POST', data)
// 获取sfdc表的时间信息汇总
export const getSfdcTimeData = data => createAPI('schedule/getSfdcTimeData', 'POST', data)
// 获取当前时间记录信息
export const getSfdcTimeMaxAndMinTime = data => createAPI('schedule/getSfdcTimeMaxAndMinTime', 'POST', data)
// 获取当前卷sfdc表的报工数据
export const getSfdcReportedData = data => createAPI('schedule/getSfdcReportedData', 'POST', data)
// 获取当前卷的材料记录--在线的
export const getSfdcMaterialByRollNo = data => createAPI('schedule/getSfdcMaterialByRollNo', '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)

4
src/api/yieldReport/produce_report_normal.js

@ -35,8 +35,10 @@ export const refreshWorkPlatformButtons = data => createAPI('schedule/refreshWor
// 获取当前页面的按钮
export const checkProduceButton = data => createAPI('schedule/checkProduceButton', 'POST', data)
export const checkScheduleButton = data => createAPI('schedule/checkScheduleButton', 'POST', data)
//创建新卷号
export const createNewRoll = data => createAPI('schedule/createNewRoll', 'POST', data)

365
src/views/modules/yieldReport/com_material_settlement.vue

@ -0,0 +1,365 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="925px" style="height: 415px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 265px;"
label-width="80px">
<!-- 菜单信息 -->
<el-row>
<el-col :span="3" >
<el-form-item :label="'当前时间:'">
<el-date-picker style="width: 100px;"
v-model="pageData.reportDate"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-top: 27px;">
<el-form-item :label="''">
<el-form-item :label="''">
<el-time-picker style="width: 80px;"
v-model="pageData.reportTime"
format="HH:mm:ss"
value-format="HH:mm:ss"
placeholder="">
</el-time-picker>
</el-form-item>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="customer-button">
<el-button type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
刷新</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button type="primary" style="margin-left: 10px; margin-bottom: 5px;">
结束调机</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button type="primary" @click="closeDialog" style="margin-left: 10px; margin-bottom: 5px;">
关闭</el-button>
</el-form-item>
</el-col>
</el-row>
<!-- 主材料 -->
<el-form>
<fieldset class="customer-fieldset" style="width: 830px;">
<legend>主材料</legend>
<el-table
height="180"
:data="sfdcMaterialList"
border
v-loading="dataListLoading"
style="width: 100%; margin-top: -5px;">
<el-table-column
v-for="(item,index) in columnMaterialArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<el-input v-if="item.columnHidden"> {{scope.row[item.columnProp]}}</el-input>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</fieldset>
</el-form>
</el-form>
</el-dialog>
</div>
</template>
<script>
import {
getSfdcMaterialByRollNo,
} from '@/api/yieldReport/com_material_settlement.js';
export default {
name: "com_finish_roll",
data() {
return {
titleCon: '',
sfdcTimeList: [],
scheduleData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
currentRollFlag: false
},
pageData: {
reportDate: this.dayjs().format('YYYY-MM-DD'),
reportTime: this.dayjs().format('HH:mm:ss'),
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
sfdcMaterialList: [],
columnMaterialArray: [
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303MaterialReportDate',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "reportDate",
headerAlign: "center",
align: "center",
columnLabel: "报告时间",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialReportedBy',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "reportedBy",
headerAlign: "center",
align: "center",
columnLabel: "报告人",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialRmRollNo',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "rmRollNo",
headerAlign: "center",
align: "center",
columnLabel: "材料卷号",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialPartNo',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "partNo",
headerAlign: "center",
align: "center",
columnLabel: "零部件编码",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialStartDate',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "startDate",
headerAlign: "center",
align: "center",
columnLabel: "开始使用时间",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialTransQty',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "transQty",
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: 5305,
serialNumber: '5305MaterialNetIssueQty',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "netIssueQty",
headerAlign: "center",
align: "center",
columnLabel: "本卷调机数量",
columnWidth: 100,
columnHidden: true,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialKeyRMFlag',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "keyRMFlag",
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: 5305,
serialNumber: '5305MaterialSAPBOMItemNo',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "sAPBOMItemNo",
headerAlign: "center",
align: "center",
columnLabel: "SAP BOM序号",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
buttonTags:{
createNewRollFlag: true,
switchRollFlag: true,
separatorRollFlag: true,
finishRollFlag: true,
mergeRollFlag: true,
tuningFlag: true,
produceFlag: true,
defectFlag: true,
toolFlag: true,
materialFlag: true,
downTimeFlag: true
},
dataListLoading: false,
}
},
methods: {
/*初始化页面参数*/
init(scheduleData, operatorData) {
//
this.scheduleData = JSON.parse(JSON.stringify(scheduleData));
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.titleCon = '卷调机-卷材料结算';
//
this.refreshPageData();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageData(){
//
this.refreshSfdcMaterialTable();
},
//
refreshSfdcMaterialTable(){
getSfdcMaterialByRollNo(this.scheduleData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
},
},
created() {
//
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

167
src/views/modules/yieldReport/com_produce_report_normal.vue

@ -59,7 +59,8 @@
<span>{{this.currentRollOps.rollNo}}</span>
</el-form-item>
<el-form-item>
<el-button type="primary" :disabled="buttonTags.createNewRollFlag" style="margin-left: 10px; margin-bottom: 5px;">
<el-button type="primary" @click="createNewRollFun" :disabled="buttonTags.createNewRollFlag"
style="margin-left: 10px; margin-bottom: 5px;">
创建新卷</el-button>
</el-form-item>
<el-form-item>
@ -432,7 +433,8 @@ import {
getSfdcDefectByCon,
getSfdcRollByCon,
refreshWorkPlatformButtons,
checkProduceButton,
checkScheduleButton,
createNewRoll,
} from "@/api/yieldReport/produce_report_normal.js";
/*引入组件*/
import comSwitchOperator from "./com_switch_operator";/*切换操作员*/
@ -2618,6 +2620,7 @@ export default {
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
@ -2630,6 +2633,8 @@ export default {
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
currentRollOps: {
@ -2647,7 +2652,7 @@ export default {
showFlag: false
},
buttonTags:{
createNewRollFlag: true,
createNewRollFlag: false,
switchRollFlag: false,
separateRollFlag: false,
finishRollFlag: false,
@ -2691,6 +2696,7 @@ export default {
this.scheduleData.shiftNo = data.row.shiftNo;
this.scheduleData.preItemDesc = data.row.preItemDesc;
this.scheduleData.nextItemDesc = data.row.nextItemDesc;
this.scheduleData.workCenterNo = data.row.workCenterNo;
this.scheduleData.workCenterDesc = data.row.workCenterDesc;
this.scheduleData.resourceDesc = data.row.resourceDesc;
});
@ -2816,6 +2822,7 @@ export default {
this.scheduleData.shiftNo= data.row.shiftNo;
this.scheduleData.preItemDesc= data.row.preItemDesc;
this.scheduleData.nextItemDesc= data.row.nextItemDesc;
this.scheduleData.workCenterNo = data.row.workCenterNo;
this.scheduleData.workCenterDesc = data.row.workCenterDesc;
this.scheduleData.resourceDesc = data.row.resourceDesc;
//
@ -2839,58 +2846,75 @@ export default {
//
refreshPageButtons(){
/*refreshWorkPlatformButtons(this.scheduleData).then(({data}) => {
if(data.resultMap.createNewRollFlag == 'Y'){
this.buttonTags.createNewRollFlag = false;
}else{
this.buttonTags.createNewRollFlag = true;
}
if(data.resultMap.switchRollFlag == 'Y'){
this.buttonTags.switchRollFlag = false;
}else{
this.buttonTags.switchRollFlag = true;
}
if(data.resultMap.separateRollFlag == 'Y'){
this.buttonTags.separateRollFlag = false;
}else{
this.buttonTags.separateRollFlag = true;
}
if(data.resultMap.finishRollFlag == 'Y'){
this.buttonTags.finishRollFlag = false;
}else{
this.buttonTags.finishRollFlag = true;
}
if(data.resultMap.tuningFlag == 'Y'){
this.buttonTags.tuningFlag = false;
}else{
this.buttonTags.tuningFlag = true;
}
if(data.resultMap.produceFlag == 'Y'){
this.buttonTags.produceFlag = false;
}else{
this.buttonTags.produceFlag = true;
}
if(data.resultMap.defectFlag == 'Y'){
this.buttonTags.defectFlag = false;
}else{
this.buttonTags.defectFlag = true;
}
if(data.resultMap.toolFlag == 'Y'){
this.buttonTags.toolFlag = false;
}else{
this.buttonTags.toolFlag = true;
}
if(data.resultMap.materialFlag == 'Y'){
this.buttonTags.materialFlag = false;
}else{
this.buttonTags.materialFlag = true;
}
if(data.resultMap.downTimeFlag == 'Y'){
this.buttonTags.downTimeFlag = false;
}else{
this.buttonTags.downTimeFlag = true;
}
});*/
//
if(this.operatorData.operatorId == null || this.operatorData.operatorId == ''){
this.buttonTags.createNewRollFlag = true;
this.buttonTags.switchRollFlag = true;
this.buttonTags.separateRollFlag = true;
this.buttonTags.finishRollFlag = true;
this.buttonTags.tuningFlag = true;
this.buttonTags.produceFlag = true;
this.buttonTags.defectFlag = true;
this.buttonTags.toolFlag = true;
this.buttonTags.materialFlag = true;
this.buttonTags.downTimeFlag = true;
}else{
//
this.buttonTags.mergeRollFlag = false;
//
refreshWorkPlatformButtons(this.scheduleData).then(({data}) => {
if(data.resultMap.createNewRollFlag == 'Y'){
this.buttonTags.createNewRollFlag = false;
}else{
this.buttonTags.createNewRollFlag = true;
}
if(data.resultMap.switchRollFlag == 'Y'){
this.buttonTags.switchRollFlag = false;
}else{
this.buttonTags.switchRollFlag = true;
}
if(data.resultMap.separateRollFlag == 'Y'){
this.buttonTags.separateRollFlag = false;
}else{
this.buttonTags.separateRollFlag = true;
}
if(data.resultMap.finishRollFlag == 'Y'){
this.buttonTags.finishRollFlag = false;
}else{
this.buttonTags.finishRollFlag = true;
}
if(data.resultMap.tuningFlag == 'Y'){
this.buttonTags.tuningFlag = false;
}else{
this.buttonTags.tuningFlag = true;
}
if(data.resultMap.produceFlag == 'Y'){
this.buttonTags.produceFlag = false;
}else{
this.buttonTags.produceFlag = true;
}
if(data.resultMap.defectFlag == 'Y'){
this.buttonTags.defectFlag = false;
}else{
this.buttonTags.defectFlag = true;
}
if(data.resultMap.toolFlag == 'Y'){
this.buttonTags.toolFlag = false;
}else{
this.buttonTags.toolFlag = true;
}
if(data.resultMap.materialFlag == 'Y'){
this.buttonTags.materialFlag = false;
}else{
this.buttonTags.materialFlag = true;
}
if(data.resultMap.downTimeFlag == 'Y'){
this.buttonTags.downTimeFlag = false;
}else{
this.buttonTags.downTimeFlag = true;
}
});
}
},
//
@ -2925,8 +2949,21 @@ export default {
},
//
createNewRollFunction(){
checkProduceButton('createNewRollFlag');
createNewRollFun(){
//
this.scheduleData.functionName = 'createNewRollFlag';
this.scheduleData.operatorId = this.operatorData.operatorId;
checkScheduleButton(this.scheduleData).then(({data}) => {
//
let resultMap = data.resultMap;
//
if(resultMap.code == 200){
//
this.createNewRollDo();
}else{
this.$message.error(resultMap.msg)
}
});
},
/*切换卷操作*/
@ -2993,7 +3030,7 @@ export default {
//
this.$nextTick(() => {
this.showProduceFlag = true;
this.$refs.comStartProduce.init(this.scheduleData.seqNo, this.operatorData)
this.$refs.comStartProduce.init(this.scheduleData, this.operatorData)
// this.$refs.com_finish_roll.init(this.scheduleData.seqNo, this.currentRollOps.rollNo);
});
},
@ -3043,6 +3080,20 @@ export default {
});
},
//
createNewRollDo(){
createNewRoll(this.scheduleData).then(({data}) => {
//
if(data.success){
this.$message.success(data.msg);
//
this.refreshPageData();
}else{
this.$message.error(data.msg);
}
});
}
},
created() {

67
src/views/modules/yieldReport/com_start_produce.vue

@ -9,7 +9,7 @@
<el-col :span="10" >
<el-form-item :label="'当前时间:'">
<el-date-picker style="width: 100px;"
v-model="scheduleData.reportDate"
v-model="pageData.reportDate"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="">
@ -20,7 +20,7 @@
<el-form-item :label="''">
<el-form-item :label="''">
<el-time-picker style="width: 80px;"
v-model="scheduleData.reportTime"
v-model="pageData.reportTime"
format="HH:mm:ss"
value-format="HH:mm:ss"
placeholder="">
@ -31,31 +31,40 @@
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click=""> </el-button>
<el-button type="primary" @click="materialSettlementModal">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
<!-- 卷调机-卷材料耗用 -->
<comMaterialSettlement ref="comMaterialSettlement" :close-on-click-modal="false"
:visible.sync="materialSettlementFlag">
</comMaterialSettlement>
</div>
</template>
<script>
/*引入组件*/
import comMaterialSettlement from './com_material_settlement';/*开始生产时候报告调机的材料的使用数量*/
export default {
name: "com_merge_roll",
data() {
return {
titleCon: '开始生产',
materialSettlementFlag: false,
sfdcTimeList: [],
scheduleData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
reportDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
reportTime: this.dayjs(new Date()).format('HH:mm:ss'),
reportedFlag: 'N',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
@ -64,6 +73,10 @@ export default {
nextItemNo: 0,
currentRollFlag: false
},
pageData: {
reportDate: this.dayjs().format('YYYY-MM-DD'),
reportTime: this.dayjs().format('HH:mm:ss'),
},
currentRollOps: {
site: this.$store.state.user.site,
seqNo: '',
@ -95,37 +108,41 @@ export default {
dataListLoading: false,
}
},
components: {
comMaterialSettlement,/*开始生产时候报告调机的材料的使用数量*/
},
methods: {
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
init(seqNo, operatorData) {
/*页面的初始化方法*/
init(scheduleData, operatorData) {
//
this.scheduleData.seqNo = seqNo;
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.titleCon = '开始生产操作 \
派工单号:'+seqNo;
派工单号:'+scheduleData.seqNo;
// this.currentRollOps.seqNo = seqNo;
// this.currentRollOps.rollNo = rollNo;
//
//this.refreshPageData();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*打开调机时候卷材料的耗用界面*/
materialSettlementModal(){
//
this.$nextTick(() => {
//modal
this.materialSettlementFlag = true;
this.$refs.comMaterialSettlement.init(this.scheduleData, this.operatorData);
});
},
},
created() {
// this.factoryList()

4
src/views/modules/yieldReport/com_switch_operator.vue

@ -3,7 +3,7 @@
<el-dialog :title="titleCon" v-bind="$attrs" v-on="$listeners" 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-input ref="operatorId" 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;">
@ -61,6 +61,8 @@ export default {
//
this.operatorData.operatorName = '';
this.operatorData.operatorId = '';
//
this.$refs.operatorId.focus();
//
//this.refreshPageData();
},

Loading…
Cancel
Save