|
|
|
@ -34,7 +34,7 @@ |
|
|
|
刷新</el-button> |
|
|
|
</el-form-item> |
|
|
|
<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-form-item> |
|
|
|
<el-form-item class="customer-button"> |
|
|
|
@ -47,13 +47,14 @@ |
|
|
|
<el-form> |
|
|
|
<fieldset class="customer-fieldset" style="width: 830px;"> |
|
|
|
<legend>主材料</legend> |
|
|
|
<el-table |
|
|
|
height="180" |
|
|
|
<el-table height="180" |
|
|
|
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName" |
|
|
|
: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" |
|
|
|
@ -64,9 +65,12 @@ |
|
|
|
:width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<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]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -82,13 +86,13 @@ |
|
|
|
<script> |
|
|
|
import { |
|
|
|
getSfdcMaterialByRollNo, |
|
|
|
endTuningAndStartProduce, |
|
|
|
} from '@/api/yieldReport/com_end_tuning.js'; |
|
|
|
export default { |
|
|
|
name: "com_finish_roll", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
titleCon: '', |
|
|
|
sfdcTimeList: [], |
|
|
|
scheduleData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
@ -111,6 +115,12 @@ export default { |
|
|
|
currentRollFlag: false |
|
|
|
}, |
|
|
|
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'), |
|
|
|
reportTime: this.dayjs().format('HH:mm:ss'), |
|
|
|
}, |
|
|
|
@ -223,7 +233,7 @@ export default { |
|
|
|
tableName: "派工单材料", |
|
|
|
columnProp: "transQty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: "数量", |
|
|
|
columnWidth: 80, |
|
|
|
columnHidden: false, |
|
|
|
@ -241,7 +251,7 @@ export default { |
|
|
|
tableName: "派工单材料", |
|
|
|
columnProp: "netIssueQty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: "本卷调机数量", |
|
|
|
columnWidth: 100, |
|
|
|
columnHidden: true, |
|
|
|
@ -288,27 +298,18 @@ export default { |
|
|
|
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)); |
|
|
|
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)); |
|
|
|
//初始化标题 |
|
|
|
@ -316,6 +317,7 @@ export default { |
|
|
|
//刷新当前派工单的信息 |
|
|
|
this.refreshPageData(); |
|
|
|
}, |
|
|
|
|
|
|
|
/*关闭modal*/ |
|
|
|
closeDialog(){ |
|
|
|
this.$emit('update:visible', false); |
|
|
|
@ -329,11 +331,61 @@ export default { |
|
|
|
|
|
|
|
//刷新当前卷的时间数据 |
|
|
|
refreshSfdcMaterialTable(){ |
|
|
|
getSfdcMaterialByRollNo(this.scheduleData).then(({data}) => { |
|
|
|
getSfdcMaterialByRollNo(this.pageData).then(({data}) => { |
|
|
|
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() { |
|
|
|
@ -362,4 +414,17 @@ export default { |
|
|
|
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> |