Browse Source

Merge remote-tracking branch 'origin/master'

master
ruanqi 4 years ago
parent
commit
d4376b961b
  1. 34
      src/api/yieldReport/com_end_tuning.js
  2. 4
      src/api/yieldReport/com_start_produce.js
  3. 6
      src/assets/scss/global.scss
  4. 6
      src/views/modules/schedule/order_schedule.vue
  5. 113
      src/views/modules/yieldReport/com_end_tuning.vue
  6. 8
      src/views/modules/yieldReport/com_produce_report_normal.vue
  7. 52
      src/views/modules/yieldReport/com_start_produce.vue

34
src/api/yieldReport/com_end_tuning.js

@ -1,38 +1,10 @@
import { createAPI } from '@/utils/httpRequest.js' 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 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)
//
export const endTuningAndStartProduce = data => createAPI('schedule/endTuningAndStartProduce', 'POST', data)

4
src/api/yieldReport/com_start_produce.js

@ -2,3 +2,7 @@ import { createAPI } from '@/utils/httpRequest.js'
//判断是否可以开始生产 //判断是否可以开始生产
export const checkStartProduce = data => createAPI('schedule/checkStartProduce', 'POST', data) export const checkStartProduce = data => createAPI('schedule/checkStartProduce', 'POST', data)
//开始生产
export const startProduce = data => createAPI('schedule/startProduce', 'POST', data)

6
src/assets/scss/global.scss

@ -336,7 +336,11 @@ input.el-input__inner{
font-size: 16px; font-size: 16px;
} }
/*全局 el-table 下 el-input的样式 LR 2022-01-12*/
.customer-number-cell .cell{
height: 25px !important;
padding: 0px;
}

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

@ -167,6 +167,7 @@
height="120" height="120"
:data="shopOrderList" :data="shopOrderList"
border border
@row-dblclick="startScheduleOperation(row, $event)"
v-loading="dataListLoading" v-loading="dataListLoading"
style="margin-top: -20px; width: 100%;"> style="margin-top: -20px; width: 100%;">
<el-table-column <el-table-column
@ -1719,6 +1720,11 @@ export default {
this.getShopOrderList(); this.getShopOrderList();
this.getOrderScheduleList(); this.getOrderScheduleList();
}, },
/*开始排产的操作*/
startScheduleOperation(row, $event){
this.$message.error('字段time_required找不到!');
}
}, },
created() { created() {
// //

113
src/views/modules/yieldReport/com_end_tuning.vue

@ -34,7 +34,7 @@
刷新</el-button> 刷新</el-button>
</el-form-item> </el-form-item>
<el-form-item class="customer-button"> <el-form-item class="customer-button">
<el-button type="primary" style="margin-left: 10px; margin-bottom: 5px;">
<el-button @click="endTuningAndStartProduceOperation" type="primary" style="margin-left: 10px; margin-bottom: 5px;">
结束调机</el-button> 结束调机</el-button>
</el-form-item> </el-form-item>
<el-form-item class="customer-button"> <el-form-item class="customer-button">
@ -47,13 +47,14 @@
<el-form> <el-form>
<fieldset class="customer-fieldset" style="width: 830px;"> <fieldset class="customer-fieldset" style="width: 830px;">
<legend>主材料</legend> <legend>主材料</legend>
<el-table
height="180"
<el-table height="180"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
:data="sfdcMaterialList" :data="sfdcMaterialList"
border border
v-loading="dataListLoading" v-loading="dataListLoading"
style="width: 100%; margin-top: -5px;"> style="width: 100%; margin-top: -5px;">
<el-table-column <el-table-column
v-for="(item,index) in columnMaterialArray" :key="index" v-for="(item,index) in columnMaterialArray" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"
:prop="item.columnProp" :prop="item.columnProp"
@ -64,9 +65,12 @@
:width="item.columnWidth" :width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="item.columnHidden"> {{scope.row[item.columnProp]}}</el-input>
<el-input type="number" class="table-input" align="right" @blur="checkValidQty(scope.row)"
v-if="item.columnHidden" v-model="scope.row[item.columnProp]"></el-input>
<span v-else>{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -82,13 +86,13 @@
<script> <script>
import { import {
getSfdcMaterialByRollNo, getSfdcMaterialByRollNo,
endTuningAndStartProduce,
} from '@/api/yieldReport/com_end_tuning.js'; } from '@/api/yieldReport/com_end_tuning.js';
export default { export default {
name: "com_finish_roll", name: "com_finish_roll",
data() { data() {
return { return {
titleCon: '', titleCon: '',
sfdcTimeList: [],
scheduleData: { scheduleData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
userName: this.$store.state.user.name, userName: this.$store.state.user.name,
@ -111,6 +115,12 @@ export default {
currentRollFlag: false currentRollFlag: false
}, },
pageData: { pageData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
operatorId: '',
reportDate: this.dayjs().format('YYYY-MM-DD'), reportDate: this.dayjs().format('YYYY-MM-DD'),
reportTime: this.dayjs().format('HH:mm:ss'), reportTime: this.dayjs().format('HH:mm:ss'),
}, },
@ -223,7 +233,7 @@ export default {
tableName: "派工单材料", tableName: "派工单材料",
columnProp: "transQty", columnProp: "transQty",
headerAlign: "center", headerAlign: "center",
align: "center",
align: "right",
columnLabel: "数量", columnLabel: "数量",
columnWidth: 80, columnWidth: 80,
columnHidden: false, columnHidden: false,
@ -241,7 +251,7 @@ export default {
tableName: "派工单材料", tableName: "派工单材料",
columnProp: "netIssueQty", columnProp: "netIssueQty",
headerAlign: "center", headerAlign: "center",
align: "center",
align: "right",
columnLabel: "本卷调机数量", columnLabel: "本卷调机数量",
columnWidth: 100, columnWidth: 100,
columnHidden: true, columnHidden: true,
@ -288,27 +298,18 @@ export default {
fixed: false 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, dataListLoading: false,
} }
}, },
methods: { methods: {
/*初始化页面参数*/ /*初始化页面参数*/
init(scheduleData, operatorData) {
//
this.scheduleData = JSON.parse(JSON.stringify(scheduleData));
init(pageData, operatorData) {
//
this.pageData.orderNo = pageData.orderNo;
this.pageData.itemNo = pageData.itemNo;
this.pageData.seqNo = pageData.seqNo;
this.pageData.rollNo = pageData.rollNo;
this.pageData.operatorId = operatorData.operatorId;
// //
this.operatorData = JSON.parse(JSON.stringify(operatorData)); this.operatorData = JSON.parse(JSON.stringify(operatorData));
// //
@ -316,6 +317,7 @@ export default {
// //
this.refreshPageData(); this.refreshPageData();
}, },
/*关闭modal*/ /*关闭modal*/
closeDialog(){ closeDialog(){
this.$emit('update:visible', false); this.$emit('update:visible', false);
@ -329,11 +331,61 @@ export default {
// //
refreshSfdcMaterialTable(){ refreshSfdcMaterialTable(){
getSfdcMaterialByRollNo(this.scheduleData).then(({data}) => {
getSfdcMaterialByRollNo(this.pageData).then(({data}) => {
this.sfdcMaterialList = data.rows; this.sfdcMaterialList = data.rows;
}); });
}, },
//
endTuningAndStartProduceOperation(){
let requestData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)};
endTuningAndStartProduce(requestData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
//dialog
this.$emit('closeDialog');
//
this.closeDialog();
}
});
},
/*检查数据是否有效*/
checkValidQty(row){
//
if(row.netIssueQty == ''){
this.$message.error('材料上本卷耗用数量不能为空!');
row.netIssueQty = 0;//
return false;
}
//
if(row.netIssueQty <= 0){
this.$message.error('材料上本卷耗用数量必须大于0!');
return false;
}
//
if(row.netIssueQty > row.transQty){
this.$message.error('材料上本卷耗用数量大于发料数量!');
row.netIssueQty = 0;//
return false;
}
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
if(column.property == 'netIssueQty'){
return 'customer-number-cell';
}
},
/*添加定制的cess样式*/
customerCellStyle({row, column, rowIndex, columnIndex}) {
if(column.property == 'netIssueQty'){
return 'padding: 0px 0px;';
}
}
}, },
created() { created() {
@ -362,4 +414,17 @@ export default {
padding: 0px !important; padding: 0px !important;
} }
/*table中input 修改样式*/
/deep/ div.table-input {
padding: 0px 0px;
height: 25px !important;
}
/*table中input*/
div.table-input /deep/ input.el-input__inner{
padding: 0px 0px;
height: 23px !important;
text-align: right;
}
</style> </style>

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

@ -387,18 +387,18 @@
<!-- 创建分卷的操作 --> <!-- 创建分卷的操作 -->
<comSeparateRoll ref="comSeparateRoll" :close-on-click-modal="false" <comSeparateRoll ref="comSeparateRoll" :close-on-click-modal="false"
:visible.sync="showSeparateFlag">
:visible.sync="showSeparateFlag" @refreshPageData="refreshPageData">
</comSeparateRoll> </comSeparateRoll>
<!-- 结束卷的modal --> <!-- 结束卷的modal -->
<comFinishRoll ref="comFinishRoll" :close-on-click-modal="false" <comFinishRoll ref="comFinishRoll" :close-on-click-modal="false"
:visible.sync="showFinishFlag">
:visible.sync="showFinishFlag" @refreshPageData="refreshPageData">
</comFinishRoll> </comFinishRoll>
<!-- 合并卷组件 --> <!-- 合并卷组件 -->
<comMergeRoll ref="comMergeRoll" :close-on-click-modal="false" <comMergeRoll ref="comMergeRoll" :close-on-click-modal="false"
:visible.sync="showMergeFlag">
:visible.sync="showMergeFlag" @refreshPageData="refreshPageData">
</comMergeRoll> </comMergeRoll>
@ -411,7 +411,7 @@
<!-- 开始生产组件 --> <!-- 开始生产组件 -->
<comStartProduce ref="comStartProduce" :close-on-click-modal="false" <comStartProduce ref="comStartProduce" :close-on-click-modal="false"
:visible.sync="showProduceFlag">
:visible.sync="showProduceFlag" @refreshPageData="refreshPageData">
</comStartProduce> </comStartProduce>

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

@ -38,7 +38,7 @@
<!-- 卷调机-卷材料耗用 --> <!-- 卷调机-卷材料耗用 -->
<comEndTuning ref="comEndTuning" :close-on-click-modal="false" <comEndTuning ref="comEndTuning" :close-on-click-modal="false"
:visible.sync="endTuningFlag">
:visible.sync="endTuningFlag" @closeDialog="closeDialog">
</comEndTuning> </comEndTuning>
</div> </div>
</template> </template>
@ -46,6 +46,7 @@
<script> <script>
import { import {
checkStartProduce, checkStartProduce,
startProduce,
} }
from '@/api/yieldReport//com_start_produce.js'; from '@/api/yieldReport//com_start_produce.js';
/*引入组件*/ /*引入组件*/
@ -57,31 +58,14 @@ export default {
titleCon: '开始生产', titleCon: '开始生产',
endTuningFlag: false, endTuningFlag: false,
sfdcTimeList: [], sfdcTimeList: [],
scheduleData: {
pageData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
userName: this.$store.state.user.name, userName: this.$store.state.user.name,
seqNo: '', seqNo: '',
orderNo: '', orderNo: '',
itemNo: 0, itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '', rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '', operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
reportDate: this.dayjs().format('YYYY-MM-DD'), reportDate: this.dayjs().format('YYYY-MM-DD'),
reportTime: this.dayjs().format('HH:mm:ss'), reportTime: this.dayjs().format('HH:mm:ss'),
}, },
@ -104,8 +88,12 @@ export default {
/*页面的初始化方法*/ /*页面的初始化方法*/
init(scheduleData, operatorData) { init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.rollNo = scheduleData.rollNo;
this.pageData.operatorId = operatorData.operatorId;
// //
this.operatorData = JSON.parse(JSON.stringify(operatorData)); this.operatorData = JSON.parse(JSON.stringify(operatorData));
// //
@ -120,22 +108,24 @@ export default {
/*关闭modal*/ /*关闭modal*/
closeDialog(){ closeDialog(){
this.$emit('update:visible', false); this.$emit('update:visible', false);
//
this.$emit('refreshPageData')
}, },
/*开始生产的方法*/ /*开始生产的方法*/
startProduceFun(){ startProduceFun(){
// //
checkStartProduce(this.scheduleData).then(({data}) => {
checkStartProduce(this.pageData).then(({data}) => {
// --- // ---
if(data.code == 500){ if(data.code == 500){
this.$message.error(data.msg); this.$message.error(data.msg);
// //
}else if (data.resultMap.resultCode == 201){ }else if (data.resultMap.resultCode == 201){
// //
debugger;
this.comEndTuningModal(); this.comEndTuningModal();
}else{ }else{
// //
this.startProduceOperation();
} }
}); });
@ -147,12 +137,26 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
//modal //modal
this.endTuningFlag = true; this.endTuningFlag = true;
this.$refs.comEndTuning.init(this.scheduleData, this.operatorData);
this.$refs.comEndTuning.init(this.pageData, this.operatorData);
});
},
/*打开结束调机的modal*/
startProduceOperation(){
startProduce(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
//modal
this.closeDialog();
}
}); });
}, },
}, },
created() { created() {
// this.factoryList() // this.factoryList()

Loading…
Cancel
Save