|
|
@ -1,4 +1,5 @@ |
|
|
<script src="print_roll_label.js"></script> |
|
|
|
|
|
|
|
|
<script src="print_roll_label.js"> |
|
|
|
|
|
</script> |
|
|
<template> |
|
|
<template> |
|
|
<div class="produce-report customer-css"> |
|
|
<div class="produce-report customer-css"> |
|
|
<el-dialog v-drag |
|
|
<el-dialog v-drag |
|
|
@ -58,7 +59,7 @@ |
|
|
<legend class="customer-legend">{{ labels.rollButtons }}</legend> |
|
|
<legend class="customer-legend">{{ labels.rollButtons }}</legend> |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-form-item class="customer-roll-css" style="width: 130px; font-size: 16px; color: #387877;"> |
|
|
<el-form-item class="customer-roll-css" style="width: 130px; font-size: 16px; color: #387877;"> |
|
|
<span>{{ this.currentRollOps.rollNo }}</span> |
|
|
|
|
|
|
|
|
<el-input v-model="this.currentRollOps.rollNo" :readonly="true" style="width: 140px;"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-button class="customer-bun-mid" type="primary" @click="warnCreateNewRollConfirm" |
|
|
<el-button class="customer-bun-mid" type="primary" @click="warnCreateNewRollConfirm" |
|
|
@ -400,30 +401,36 @@ |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-button class="customer-bun-mid" type="primary" @click="refreshPageData" |
|
|
<el-button class="customer-bun-mid" type="primary" @click="refreshPageData" |
|
|
style="margin-left: 15px; margin-top: 20px; margin-bottom: 25px;"> |
|
|
|
|
|
|
|
|
style="margin-left: 15px; margin-top: 10px; margin-bottom: 25px;"> |
|
|
{{ buttons.refreshButton }} |
|
|
{{ buttons.refreshButton }} |
|
|
</el-button> |
|
|
</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-button class="customer-bun-mid" type="primary" @click="switchOperatorModal" |
|
|
<el-button class="customer-bun-mid" type="primary" @click="switchOperatorModal" |
|
|
style="margin-left: 20px; margin-top: 20px;"> |
|
|
|
|
|
|
|
|
style="margin-left: 20px; margin-top: 10px;"> |
|
|
{{ buttons.switchOperator }} |
|
|
{{ buttons.switchOperator }} |
|
|
</el-button> |
|
|
</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item style="margin-top: 35px;"> |
|
|
|
|
|
|
|
|
<el-form-item style="margin-top: 20px;"> |
|
|
<el-button class="customer-bun-mid controller-bun" type="primary" @click="startTuningModal" |
|
|
<el-button class="customer-bun-mid controller-bun" type="primary" @click="startTuningModal" |
|
|
:disabled="buttonTags.tuningFlag" |
|
|
:disabled="buttonTags.tuningFlag" |
|
|
style="margin-left: 15px; margin-bottom: 5px;"> |
|
|
style="margin-left: 15px; margin-bottom: 5px;"> |
|
|
{{ buttons.startTuning }} |
|
|
{{ buttons.startTuning }} |
|
|
</el-button> |
|
|
</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item style="margin-top: 35px;"> |
|
|
|
|
|
|
|
|
<el-form-item style="margin-top: 20px;"> |
|
|
<el-button class="customer-bun-mid controller-bun" type="primary" @click="startProduceModal" |
|
|
<el-button class="customer-bun-mid controller-bun" type="primary" @click="startProduceModal" |
|
|
:disabled="buttonTags.produceFlag" |
|
|
:disabled="buttonTags.produceFlag" |
|
|
style="margin-left: 20px; margin-bottom: 5px;"> |
|
|
style="margin-left: 20px; margin-bottom: 5px;"> |
|
|
{{ buttons.startProduce }} |
|
|
{{ buttons.startProduce }} |
|
|
</el-button> |
|
|
</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item style="margin-top: 12px;"> |
|
|
|
|
|
<el-button class="customer-bun-mid" type="primary" @click="sopPreviewModal" |
|
|
|
|
|
style="margin-left: 15px; margin-bottom: 5px;"> |
|
|
|
|
|
{{ buttons.sopView }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</fieldset> |
|
|
</fieldset> |
|
|
<!-- 不良 --> |
|
|
<!-- 不良 --> |
|
|
@ -655,6 +662,82 @@ |
|
|
<ComMalformedMaterial ref="comMalformedMaterial" :visible.sync="showMalformedMaterialFlag" |
|
|
<ComMalformedMaterial ref="comMalformedMaterial" :visible.sync="showMalformedMaterialFlag" |
|
|
@refreshPageData="refreshPageData"></ComMalformedMaterial> |
|
|
@refreshPageData="refreshPageData"></ComMalformedMaterial> |
|
|
|
|
|
|
|
|
|
|
|
<!-- SOP预览弹出框 --> |
|
|
|
|
|
<el-dialog title="SOP预览" :visible.sync="showSopPreviewFlag" width="50%" top="5vh" :before-close="closeSopPreview"> |
|
|
|
|
|
<div class="sop-preview-content"> |
|
|
|
|
|
<el-table |
|
|
|
|
|
:data="sopPreviewList" |
|
|
|
|
|
border |
|
|
|
|
|
v-loading="sopPreviewLoading" |
|
|
|
|
|
height="400" |
|
|
|
|
|
style="width: 100%;"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="sopNo" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="文件编码" |
|
|
|
|
|
width="120"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="sopName" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="left" |
|
|
|
|
|
label="文件名称" |
|
|
|
|
|
min-width="200"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="sopType" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="文件类型" |
|
|
|
|
|
width="100"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="version" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="版本号" |
|
|
|
|
|
width="100"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="phaseInDate" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="生效日期" |
|
|
|
|
|
width="120"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="phaseOutDate" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="失效日期" |
|
|
|
|
|
width="120"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
fixed="right" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="100" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<a type="text" size="small" @click="previewSopFile(scope.row)">预览</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
|
|
<el-pagination |
|
|
|
|
|
@size-change="sopSizeChangeHandle" |
|
|
|
|
|
@current-change="sopCurrentChangeHandle" |
|
|
|
|
|
:current-page="sopPageIndex" |
|
|
|
|
|
:page-sizes="[10, 20, 50, 100]" |
|
|
|
|
|
:page-size="sopPageSize" |
|
|
|
|
|
:total="sopTotalPage" |
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
|
style="margin-top: 10px;"> |
|
|
|
|
|
</el-pagination> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
@ -690,6 +773,7 @@ import { |
|
|
import { |
|
|
import { |
|
|
getUserSpecialSecurity, |
|
|
getUserSpecialSecurity, |
|
|
} from '@/api/yieldReport/produce_order.js' |
|
|
} from '@/api/yieldReport/produce_order.js' |
|
|
|
|
|
import { sopListSearch } from '@/api/qc/qc.js' |
|
|
/*打印标签专用的js*/ |
|
|
/*打印标签专用的js*/ |
|
|
import { |
|
|
import { |
|
|
printSfdcLabel, |
|
|
printSfdcLabel, |
|
|
@ -759,6 +843,12 @@ export default { |
|
|
showCuttingMaterialFlag: false, |
|
|
showCuttingMaterialFlag: false, |
|
|
showDownFlag: false, |
|
|
showDownFlag: false, |
|
|
showFinishScheduleFlag: false, |
|
|
showFinishScheduleFlag: false, |
|
|
|
|
|
showSopPreviewFlag: false, // SOP预览弹出框显示状态 |
|
|
|
|
|
sopPreviewList: [], // SOP预览列表数据 |
|
|
|
|
|
sopPreviewLoading: false, // SOP预览加载状态 |
|
|
|
|
|
sopPageIndex: 1, // SOP预览分页当前页 |
|
|
|
|
|
sopPageSize: 20, // SOP预览分页大小 |
|
|
|
|
|
sopTotalPage: 0, // SOP预览总页数 |
|
|
activeTable: 'sfdc_time', |
|
|
activeTable: 'sfdc_time', |
|
|
sfdcTimeList: [], |
|
|
sfdcTimeList: [], |
|
|
orderToolList: [], |
|
|
orderToolList: [], |
|
|
@ -3002,6 +3092,7 @@ export default { |
|
|
switchOperator: '切换用户', |
|
|
switchOperator: '切换用户', |
|
|
startTuning: '开始调机', |
|
|
startTuning: '开始调机', |
|
|
startProduce: '开始生产', |
|
|
startProduce: '开始生产', |
|
|
|
|
|
sopView:'SOP预览', |
|
|
reportDefect: '报告不良', |
|
|
reportDefect: '报告不良', |
|
|
toolButton: '刀模板', |
|
|
toolButton: '刀模板', |
|
|
materialButton: '材料', |
|
|
materialButton: '材料', |
|
|
@ -4456,6 +4547,84 @@ export default { |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// SOP预览相关方法 |
|
|
|
|
|
// 打开SOP预览弹出框 |
|
|
|
|
|
sopPreviewModal() { |
|
|
|
|
|
// 检查是否有选择的派工单 |
|
|
|
|
|
if (JSON.stringify(this.currentRow) == '{}') { |
|
|
|
|
|
this.$message.error('请先选择派工单'); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 检查是否有物料号 |
|
|
|
|
|
if (!this.scheduleData.partNo) { |
|
|
|
|
|
this.$message.error('物料号不能为空'); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.showSopPreviewFlag = true; |
|
|
|
|
|
this.getSopPreviewList(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取SOP预览列表数据 |
|
|
|
|
|
getSopPreviewList() { |
|
|
|
|
|
this.sopPreviewLoading = true; |
|
|
|
|
|
|
|
|
|
|
|
sopListSearch({ |
|
|
|
|
|
page: this.sopPageIndex, |
|
|
|
|
|
limit: this.sopPageSize, |
|
|
|
|
|
partNo: this.scheduleData.partNo, |
|
|
|
|
|
site: this.$store.state.user.site |
|
|
|
|
|
}).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.sopPreviewList = data.page.list || []; |
|
|
|
|
|
this.sopTotalPage = data.page.totalCount || 0; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.sopPreviewList = []; |
|
|
|
|
|
this.sopTotalPage = 0; |
|
|
|
|
|
this.$message.warning(data.msg || 'SOP数据获取失败'); |
|
|
|
|
|
} |
|
|
|
|
|
this.sopPreviewLoading = false; |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.sopPreviewList = []; |
|
|
|
|
|
this.sopTotalPage = 0; |
|
|
|
|
|
this.sopPreviewLoading = false; |
|
|
|
|
|
this.$message.error('SOP数据获取失败'); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// SOP分页大小改变 |
|
|
|
|
|
sopSizeChangeHandle(val) { |
|
|
|
|
|
this.sopPageSize = val; |
|
|
|
|
|
this.sopPageIndex = 1; |
|
|
|
|
|
this.getSopPreviewList(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// SOP分页当前页改变 |
|
|
|
|
|
sopCurrentChangeHandle(val) { |
|
|
|
|
|
this.sopPageIndex = val; |
|
|
|
|
|
this.getSopPreviewList(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 预览SOP文件 |
|
|
|
|
|
previewSopFile(row) { |
|
|
|
|
|
if (row.sopUrl) { |
|
|
|
|
|
window.open(row.sopUrl, '_blank'); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.warning('该文件暂无预览路径'); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 关闭SOP预览弹出框 |
|
|
|
|
|
closeSopPreview() { |
|
|
|
|
|
this.showSopPreviewFlag = false; |
|
|
|
|
|
// 重置分页 |
|
|
|
|
|
this.sopPageIndex = 1; |
|
|
|
|
|
this.sopPageSize = 20; |
|
|
|
|
|
this.sopPreviewList = []; |
|
|
|
|
|
this.sopTotalPage = 0; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
created() { |
|
|
created() { |
|
|
|