5 changed files with 432 additions and 25 deletions
-
14src/api/yieldReport/com_select_shift.js
-
1src/icons/svg/ellipsis.svg
-
48src/views/modules/schedule/order_schedule.vue
-
2src/views/modules/yieldReport/com_produce_report_normal.vue
-
392src/views/modules/yieldReport/com_select_shift.vue
@ -0,0 +1,14 @@ |
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
|
|||
// 获取当前的卷的上机材料的主料
|
|||
export const getSfdcMaterialByRollNo = data => createAPI('schedule/getSfdcMaterialByRollNo', 'POST', data) |
|||
|
|||
//
|
|||
export const endTuningAndStartProduce = data => createAPI('schedule/endTuningAndStartProduce', 'POST', data) |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1 @@ |
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1647512322340" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1704" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M819.2 511.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z" fill="#BDBDBD" p-id="1705"></path><path d="M512 511.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z" fill="#BDBDBD" p-id="1706"></path><path d="M204.8 511.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z" fill="#BDBDBD" p-id="1707"></path></svg> |
|||
@ -0,0 +1,392 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners" |
|||
width="900px" style="height: 415px;" class="customer-dialog"> |
|||
<el-form :inline="true" label-position="top" style="height: 265px;" |
|||
label-width="80px"> |
|||
<!-- 主材料 --> |
|||
<el-form> |
|||
<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" |
|||
: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 type="number" class="table-input" align="right" @blur="checkValidQty(scope.row)"--> |
|||
<el-input type="number" class="table-input" align="right" 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> |
|||
</el-form> |
|||
</el-form> |
|||
|
|||
|
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getSfdcMaterialByRollNo, |
|||
endTuningAndStartProduce, |
|||
} from '@/api/yieldReport/com_select_shift.js'; |
|||
export default { |
|||
name: "com_select_shift", |
|||
data() { |
|||
return { |
|||
titleCon: '', |
|||
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: { |
|||
site: this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
seqNo: '', |
|||
orderNo: '', |
|||
itemNo: 0, |
|||
operatorId: '', |
|||
reportDate: '', |
|||
reportTime: '', |
|||
}, |
|||
operatorData: { |
|||
site: this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
operatorId: '', |
|||
operatorName: '', |
|||
status: '', |
|||
seqNo: '', |
|||
showFlag: false |
|||
}, |
|||
scheduleShiftList: [], |
|||
columnShiftArray: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 5306, |
|||
serialNumber: '5306MaterialScheduleDate', |
|||
tableId: "5306Material", |
|||
tableName: "派工单材料", |
|||
columnProp: "scheduleDate", |
|||
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: "right", |
|||
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: "right", |
|||
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 |
|||
} |
|||
], |
|||
dataListLoading: false, |
|||
} |
|||
}, |
|||
methods: { |
|||
/*初始化页面参数*/ |
|||
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.pageData.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD'); |
|||
this.pageData.reportTime = this.dayjs(new Date()).format('HH:mm:ss'); |
|||
//初始化操作员对象 |
|||
this.operatorData = JSON.parse(JSON.stringify(operatorData)); |
|||
//初始化标题 |
|||
this.titleCon = '卷调机-卷材料结算'; |
|||
//刷新当前派工单的信息 |
|||
this.refreshPageData(); |
|||
}, |
|||
|
|||
/*关闭modal*/ |
|||
closeDialog(){ |
|||
this.$emit('update:visible', false); |
|||
}, |
|||
|
|||
/*刷新当前的页面参数*/ |
|||
refreshPageData(){ |
|||
//刷新材料的数据 |
|||
this.refreshSfdcMaterialTable(); |
|||
}, |
|||
|
|||
//刷新当前卷的时间数据 |
|||
refreshSfdcMaterialTable(){ |
|||
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() { |
|||
// |
|||
} |
|||
} |
|||
|
|||
</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; |
|||
} |
|||
|
|||
/*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> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue