4 changed files with 515 additions and 8 deletions
-
14src/api/yieldReport/com_separate_roll_with_split.js
-
2src/api/yieldReport/com_split_order_report.js
-
493src/views/modules/yieldReport/com_separate_roll_with_split.vue
-
14src/views/modules/yieldReport/com_split_order_report.vue
@ -0,0 +1,14 @@ |
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
|
|||
// 获取当前的卷的上机材料的主料
|
|||
export const refreshCurrentPageData = data => createAPI('scheduling/getSplitScheduleCreateRollPageData', 'POST', data) |
|||
|
|||
//
|
|||
export const refreshCurrentPageTable = data => createAPI('schedule/endTuningAndStartProduce', 'POST', data) |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,493 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners" |
|||
width="755px" style="height: 470px;" class="customer-dialog"> |
|||
|
|||
<el-form :inline="true" label-position="top" style="height: 425px;" |
|||
label-width="80px"> |
|||
<fieldset class="customer-fieldset" style="width: 730px;"> |
|||
<el-row style="margin-left: 5px; margin-top: -5px;"> |
|||
<el-col :span="4" > |
|||
<el-form-item :label="''"> |
|||
<span slot="label" style="" @click="getBaseList(92)"><a herf="#">客户编码:</a></span> |
|||
<el-input v-model="pageData.customerId" @change="getCurrentPageData" style="width: 100px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" > |
|||
<el-form-item :label="''"> |
|||
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">产品编码:</a></span> |
|||
<el-input v-model="pageData.fgPartNo" @change="getCurrentPageData" style="width: 100px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" > |
|||
<el-form-item :label="'产品名称:'"> |
|||
<el-input v-model="pageData.fgPartDesc" readonly="readonly" style="width: 200px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" style="margin-top: 0px;"> |
|||
<el-form-item :label="'参照名称'"> |
|||
<el-input v-model="pageData.referName" readonly="readonly" style="width: 200px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row style="margin-left: 5px;"> |
|||
<el-col :span="4" style="margin-top: -5px;"> |
|||
<el-form-item :label="'供应商编码:'"> |
|||
<el-input v-model="pageData.supplierId" readonly="readonly" style="width: 100px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="5" style="margin-top: -5px;"> |
|||
<el-form-item :label="'供应商名称'"> |
|||
<el-input v-model="pageData.supplierName" readonly="readonly" style="width: 125px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" style="margin-top: -5px;"> |
|||
<el-form-item :label="'每卷数量:'"> |
|||
<el-input v-model="pageData.rollQty" style="width: 100px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" style="margin-top: -5px;"> |
|||
<el-form-item :label="'卷数:'"> |
|||
<el-input v-model="pageData.rollNums" style="width: 90px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" style="margin-left: 10px; margin-top: -10px;"> |
|||
<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-col> |
|||
<el-col :span="4" style="margin-top: -10px;"> |
|||
<el-form-item class="customer-button"> |
|||
<el-button type="primary" @click="checkCreateSeparateRoll" style="margin-left: 10px; margin-bottom: 5px;"> |
|||
创建分卷</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</fieldset> |
|||
<el-table height="300" |
|||
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName" |
|||
:data="sfdcMaterialList" |
|||
border |
|||
v-loading="dataListLoading" |
|||
style="width: 730px; margin-left: 0px; 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-dialog> |
|||
<!--列表的组件--> |
|||
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
/*组件*/ |
|||
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/ |
|||
/*js请求*/ |
|||
import { |
|||
refreshCurrentPageData, |
|||
refreshCurrentPageTable, |
|||
} from '@/api/yieldReport/com_separate_roll_with_split.js'; |
|||
export default { |
|||
name: "com_finish_roll", |
|||
data() { |
|||
return { |
|||
titleCon: '创建分卷', |
|||
pageData: { |
|||
site: this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
seqNo: '', |
|||
orderNo: '', |
|||
itemNo: 0, |
|||
partNo: '', |
|||
partDesc: '', |
|||
operatorId: '', |
|||
fgPartNo: '无', |
|||
fgPartDesc: '', |
|||
customerId: '无', |
|||
customerName: '', |
|||
referName: '', |
|||
supplierId: '*', |
|||
supplierName: '', |
|||
rollQty: 0, |
|||
rollNums: 1, |
|||
}, |
|||
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: "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, |
|||
} |
|||
}, |
|||
/*组件*/ |
|||
components: { |
|||
Chooselist,/*列表的组件*/ |
|||
}, |
|||
methods: { |
|||
/*初始化页面参数*/ |
|||
init(scheduleData, operatorData) { |
|||
debugger; |
|||
//设置参数 |
|||
this.pageData.partNo = scheduleData.partNo; |
|||
this.pageData.partDesc = scheduleData.partDesc; |
|||
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.pageData.customerId = '无'; |
|||
this.pageData.customerName = ''; |
|||
this.pageData.fgPartNo = '无'; |
|||
this.pageData.fgPartDesc = ''; |
|||
this.pageData.supplierId = '*'; |
|||
this.pageData.supplierName = ''; |
|||
//初始化操作员对象 |
|||
this.operatorData = JSON.parse(JSON.stringify(operatorData)); |
|||
//初始化标题 |
|||
this.titleCon = '创建分卷'; |
|||
//刷新当前派工单的信息 |
|||
this.refreshPageData(); |
|||
}, |
|||
|
|||
/*关闭modal*/ |
|||
closeDialog(){ |
|||
this.$emit('update:visible', false); |
|||
}, |
|||
|
|||
/*刷新当前的页面参数*/ |
|||
refreshPageData(){ |
|||
//获取页面显示的参数 |
|||
this.getCurrentPageData(); |
|||
//刷新页面的table数据 |
|||
//this.getCurrentPageTable(); |
|||
}, |
|||
|
|||
//获取当前页面的参数 |
|||
getCurrentPageData(){ |
|||
refreshCurrentPageData(this.pageData).then(({data}) => { |
|||
//填充数据 |
|||
this.pageData.customerId = data.pageMap.customerId; |
|||
this.pageData.customerName = data.pageMap.customerName; |
|||
this.pageData.fgPartNo = data.pageMap.fgPartNo; |
|||
this.pageData.fgPartDesc = data.pageMap.fgPartDesc; |
|||
this.pageData.referName = data.pageMap.referName; |
|||
this.pageData.supplierId = data.pageMap.supplierId; |
|||
this.pageData.supplierName = data.pageMap.supplierName; |
|||
}); |
|||
}, |
|||
|
|||
//刷新当前页面的表格数据 |
|||
getCurrentPageTable(){ |
|||
refreshCurrentPageTable(this.pageData).then(({data}) => { |
|||
this.sfdcMaterialList = data.rows; |
|||
}); |
|||
}, |
|||
|
|||
|
|||
/*列表方法的回调*/ |
|||
getBaseData(val){ |
|||
if (this.tagNo === 92){ |
|||
this.pageData.customerId = val.ConfigurationTemplateID; |
|||
this.pageData.customerName = val.CustDesc; |
|||
}else if(this.tagNo == 5){ |
|||
this.pageData.fgPartNo = val.PartNo; |
|||
this.pageData.fgPartDesc = val.PartDescSpec; |
|||
} |
|||
}, |
|||
|
|||
// 获取基础数据列表 |
|||
getBaseList(val){ |
|||
this.tagNo = val |
|||
this.$nextTick(() => { |
|||
let strVal = ""; |
|||
if (val === 92){ |
|||
strVal = this.pageData.customerId; |
|||
}else if(val === 5){ |
|||
strVal = this.pageData.fgPartNo; |
|||
} |
|||
this.$refs.baseList.init(val, strVal) |
|||
}) |
|||
}, |
|||
|
|||
//首先检查是否可以创建分卷 |
|||
checkCreateSeparateRoll(){ |
|||
//调用创建分卷的方法 |
|||
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-css /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