|
|
|
@ -1,9 +1,9 @@ |
|
|
|
<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"> |
|
|
|
width="755px" style="height: 530px;" class="customer-dialog"> |
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" style="height: 425px;" |
|
|
|
<el-form :inline="true" label-position="top" style="height: 400px;" |
|
|
|
label-width="80px"> |
|
|
|
<fieldset class="customer-fieldset" style="width: 730px;"> |
|
|
|
<el-row style="margin-left: 5px; margin-top: -5px;"> |
|
|
|
@ -66,7 +66,6 @@ |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
<el-table height="300" |
|
|
|
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName" |
|
|
|
:data="sfdcMaterialList" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
@ -94,6 +93,9 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer" > |
|
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!--列表的组件--> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
@ -107,6 +109,8 @@ import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/ |
|
|
|
import { |
|
|
|
refreshCurrentPageData, |
|
|
|
refreshCurrentPageTable, |
|
|
|
checkCreateSeparateRoll,/*检查是否可以创建分卷*/ |
|
|
|
createSeparateRoll,/*创建分卷*/ |
|
|
|
} from '@/api/yieldReport/com_separate_roll_with_split.js'; |
|
|
|
export default { |
|
|
|
name: "com_finish_roll", |
|
|
|
@ -316,7 +320,6 @@ export default { |
|
|
|
methods: { |
|
|
|
/*初始化页面参数*/ |
|
|
|
init(scheduleData, operatorData) { |
|
|
|
debugger; |
|
|
|
//设置参数 |
|
|
|
this.pageData.partNo = scheduleData.partNo; |
|
|
|
this.pageData.partDesc = scheduleData.partDesc; |
|
|
|
@ -402,53 +405,48 @@ export default { |
|
|
|
//首先检查是否可以创建分卷 |
|
|
|
checkCreateSeparateRoll(){ |
|
|
|
//调用创建分卷的方法 |
|
|
|
endTuningAndStartProduce(requestData).then(({data}) => { |
|
|
|
checkCreateSeparateRoll(this.pageData).then(({data}) => { |
|
|
|
//判断操作是否成功 |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
//关闭上机dialog的页面 |
|
|
|
this.$emit('closeDialog'); |
|
|
|
//关闭当前的页面 |
|
|
|
this.closeDialog(); |
|
|
|
//调用创建分卷的方法 |
|
|
|
this.createSeparateRollBun(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*检查数据是否有效*/ |
|
|
|
checkValidQty(row){ |
|
|
|
//判断当前是否为空 |
|
|
|
if(row.netIssueQty == ''){ |
|
|
|
this.$message.error('材料上本卷耗用数量不能为空!'); |
|
|
|
row.netIssueQty = 0;//重新赋值 |
|
|
|
/*处理材料下料的记录*/ |
|
|
|
createSeparateRollBun(){ |
|
|
|
//数量是否符合要求 |
|
|
|
let rollQty = this.pageData.rollQty; |
|
|
|
debugger; |
|
|
|
//判断是否可以修改 |
|
|
|
if (rollQty <= 0){ |
|
|
|
this.$message.error('请输入有效的每卷数量!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//判断当前是否有效 |
|
|
|
if(row.netIssueQty <= 0){ |
|
|
|
this.$message.error('材料上本卷耗用数量必须大于0!'); |
|
|
|
//判断卷数 |
|
|
|
let rollNums = this.pageData.rollNums; |
|
|
|
if (rollNums <= 0){ |
|
|
|
this.$message.error('请输入有效的卷数!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//判断是否超限 |
|
|
|
if(row.netIssueQty > row.transQty){ |
|
|
|
this.$message.error('材料上本卷耗用数量大于发料数量!'); |
|
|
|
row.netIssueQty = 0;//重新赋值 |
|
|
|
return false; |
|
|
|
//调用方法执行上材料 |
|
|
|
createSeparateRoll(this.pageData).then(({data}) => { |
|
|
|
if(data.code === 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新报工的页面 |
|
|
|
this.$emit('refreshPageData'); |
|
|
|
//关闭当前的页面 |
|
|
|
this.closeDialog(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*添加定制的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() { |
|
|
|
|