diff --git a/src/api/yieldReport/com_finish_roll.js b/src/api/yieldReport/com_finish_roll.js
index 646ed9f..1a1a3f1 100644
--- a/src/api/yieldReport/com_finish_roll.js
+++ b/src/api/yieldReport/com_finish_roll.js
@@ -33,6 +33,10 @@ export const getSfdcDefectByCon = data => createAPI('schedule/getSfdcDefectByCon
// 获取当前上机卷信息
export const getSfdcRollByCon = data => createAPI('schedule/getSfdcRollByCon', 'POST', data)
+// 结束卷的操作
+export const finishRoll = data => createAPI('schedule/finishRoll', 'POST', data)
+
+
diff --git a/src/views/modules/yieldReport/com_finish_roll.vue b/src/views/modules/yieldReport/com_finish_roll.vue
index 46a11cb..32bb83f 100644
--- a/src/views/modules/yieldReport/com_finish_roll.vue
+++ b/src/views/modules/yieldReport/com_finish_roll.vue
@@ -24,7 +24,7 @@
刷新
-
+
结束卷
@@ -42,16 +42,17 @@
v-model="pageData.reportedFlag">是否报告产量
-
+
-
+
-
+
-
+
@@ -59,16 +60,16 @@
style="margin-left: 510px; margin-top: -70px; ;width: 390px;">
-
+
-
+
-
+
-
+
@@ -80,13 +81,13 @@
-
+
-
+
-
+
@@ -94,13 +95,13 @@
-
+
-
+
-
+
@@ -108,13 +109,13 @@
-
+
-
+
-
+
@@ -127,19 +128,19 @@
-
+
-
+
-
+
-
+
-
+
@@ -147,19 +148,19 @@
-
+
-
+
-
+
-
+
-
+
@@ -167,10 +168,10 @@
-
+
-
+
@@ -183,6 +184,7 @@
@@ -197,7 +199,9 @@
:width="item.columnWidth"
:label="item.columnLabel">
- {{scope.row[item.columnProp]}}
+
+ {{scope.row[item.columnProp]}}
@@ -221,6 +225,7 @@ import {
getSfdcTimeData,
getSfdcReportedData,
getSfdcMaterialByRollNo,
+ finishRoll,
} from '@/api/yieldReport/com_finish_roll.js';
export default {
name: "com_finish_roll",
@@ -228,12 +233,14 @@ export default {
return {
titleCon: '',
sfdcTimeList: [],
- searchData: {
+ scheduleData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
seqNo: '',
orderNo: '',
+ itemNo: 0,
partNo: '',
+ workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
@@ -246,9 +253,20 @@ export default {
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
+ operatorId: '',
+ functionName: '',
currentRollFlag: false
- },
+ },
pageData: {
+ site: this.$store.state.user.site,
+ userName: this.$store.state.user.name,
+ orderNo: '',
+ itemNo: 0,
+ seqNo: '',
+ rollNo: '',
+ resourceId: '',
+ scheduledDate: '',
+ shiftNo: '',
reportedTime: this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
reportedFlag: 'N',
approvedQty: 0,
@@ -408,7 +426,7 @@ export default {
align: "center",
columnLabel: "本卷耗用数量",
columnWidth: 100,
- columnHidden: false,
+ columnHidden: true,
columnImage: false,
columnSortable: false,
sortLv: 0,
@@ -472,7 +490,15 @@ export default {
/*初始化页面参数*/
init(scheduleData, operatorData) {
//初始化参数
- this.searchData = JSON.parse(JSON.stringify(scheduleData));
+ this.scheduleData = scheduleData;
+ //初始化参数
+ this.pageData.orderNo = scheduleData.orderNo;
+ this.pageData.itemNo = scheduleData.itemNo;
+ this.pageData.seqNo = scheduleData.seqNo;
+ this.pageData.rollNo = scheduleData.rollNo;
+ this.pageData.scheduledDate = scheduleData.scheduledDate;
+ this.pageData.shiftNo = scheduleData.shiftNo;
+ this.pageData.resourceId = scheduleData.resourceId;
//初始化操作员对象
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//初始化标题
@@ -489,14 +515,14 @@ export default {
/*刷新当前的页面参数*/
refreshPageData(){
//1.刷新当前卷的报工数据
- getCurrentRollReportedQty(this.searchData).then(({data}) => {
+ getCurrentRollReportedQty(this.scheduleData).then(({data}) => {
this.pageData.approvedQty = data.row.approvedQty;
this.pageData.defectedQty = data.row.defectedQty;
this.pageData.totalQty = data.row.totalQty;
this.pageData.otherRollQty = data.row.otherRollQty;
}).then(() => {
//2.刷新当前卷的时间信息
- countSfdcTimeQty(this.searchData).then(({data}) => {
+ countSfdcTimeQty(this.scheduleData).then(({data}) => {
this.pageData.totalSetupTime = data.row.totalSetupTime;
this.pageData.totalDowntimeTimeSetup = data.row.totalDowntimeTimeSetup;
this.pageData.totalPureSetupTime = data.row.totalPureSetupTime;
@@ -509,18 +535,18 @@ export default {
});
}).then(() => {
//3.刷新派工单的班次信息
- getScheduleShiftData(this.searchData).then(({data}) => {
+ getScheduleShiftData(this.scheduleData).then(({data}) => {
this.pageData.shiftDesc = data.row.shiftDesc;
});
}).then(() => {
//4.刷新当前卷的最早和最晚时间
- getSfdcTimeMaxAndMinTime(this.searchData).then(({data}) => {
+ getSfdcTimeMaxAndMinTime(this.scheduleData).then(({data}) => {
this.pageData.eventTime = data.row.eventTime;
this.pageData.tillTime = data.row.tillTime;
});
}).then(() => {
//5.刷新当前卷的Sfdc表的时间
- getSfdcTimeData(this.searchData).then(({data}) => {
+ getSfdcTimeData(this.scheduleData).then(({data}) => {
//判断是否操作成功
this.pageData.eventTime = data.row.finishTime;
this.pageData.sfdcProdTime = data.row.sfdcProdTime;
@@ -532,14 +558,14 @@ export default {
});
}).then(() => {
//6.刷新当前卷的报工数据
- getSfdcReportedData(this.searchData).then(({data}) => {
+ getSfdcReportedData(this.scheduleData).then(({data}) => {
this.pageData.sfdcApprovedQty = this.pageData.approvedQty - data.row.approveQty;
this.pageData.sfdcDefectedQty = this.pageData.defectedQty - data.row.defectQty;
this.pageData.sfdcReportedQty = this.pageData.sfdcApprovedQty + this.pageData.sfdcDefectedQty;
});
}).then(() => {
//刷新当前卷的时间数据
- getSfdcMaterialByRollNo(this.searchData).then(({data}) => {
+ getSfdcMaterialByRollNo(this.scheduleData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
});
@@ -549,7 +575,7 @@ export default {
/*刷新当前卷的报工数据汇总*/
refreshCurrentRollReportedQty(){
- getCurrentRollReportedQty(this.searchData).then(({data}) => {
+ getCurrentRollReportedQty(this.scheduleData).then(({data}) => {
this.pageData.approvedQty = data.row.approvedQty;
this.pageData.defectedQty = data.row.defectedQty;
this.pageData.totalQty = data.row.totalQty;
@@ -559,7 +585,7 @@ export default {
//刷新当前卷的时间信息
refreshCurrentRollTimeQty(){
- countSfdcTimeQty(this.searchData).then(({data}) => {
+ countSfdcTimeQty(this.scheduleData).then(({data}) => {
this.pageData.totalSetupTime = data.row.totalSetupTime;
this.pageData.totalDowntimeTimeSetup = data.row.totalDowntimeTimeSetup;
this.pageData.totalPureSetupTime = data.row.totalPureSetupTime;
@@ -574,14 +600,14 @@ export default {
//刷新派工单的班次信息
refreshScheduleShiftData(){
- getScheduleShiftData(this.searchData).then(({data}) => {
+ getScheduleShiftData(this.scheduleData).then(({data}) => {
this.pageData.shiftDesc = data.row.shiftDesc;
});
},
//刷新当前卷的时间信息
refreshCurrentRollMaxAndMinTime(){
- getSfdcTimeMaxAndMinTime(this.searchData).then(({data}) => {
+ getSfdcTimeMaxAndMinTime(this.scheduleData).then(({data}) => {
this.pageData.eventTime = data.row.eventTime;
this.pageData.tillTime = data.row.tillTime;
});
@@ -589,7 +615,7 @@ export default {
//刷新当前卷的Sfdc的信息
refreshSfdcTimeData(){
- getSfdcTimeData(this.searchData).then(({data}) => {
+ getSfdcTimeData(this.scheduleData).then(({data}) => {
//判断是否操作成功
this.pageData.eventTime = data.row.finishTime;
this.pageData.sfdcProdTime = data.row.sfdcProdTime;
@@ -603,7 +629,7 @@ export default {
//刷新当前卷的报工数据
refreshSfdcData(){
- getSfdcReportedData(this.searchData).then(({data}) => {
+ getSfdcReportedData(this.scheduleData).then(({data}) => {
this.pageData.sfdcApprovedQty = this.pageData.approvedQty - data.row.approveQty;
this.pageData.sfdcDefectedQty = this.pageData.defectedQty - data.row.defectQty;
this.pageData.sfdcReportedQty = this.pageData.sfdcApprovedQty + this.pageData.sfdcDefectedQty;
@@ -612,15 +638,88 @@ export default {
//刷新当前卷的时间数据
refreshSfdcMaterialTable(){
- getSfdcMaterialByRollNo(this.searchData).then(({data}) => {
+ getSfdcMaterialByRollNo(this.scheduleData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
},
+ /*检查数据是否有效*/
+ 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;';
+ }
+ },
+
+ /*检验良品的总数量*/
+ checkValidApprovedQty(){
+ //调用刷新的方法
+ this.refreshSfdcData();
+ },
+
+ /*结束当前的操作*/
+ finishRollOperation(){
+ //首先判断数值是否通过判断
+ let approvedQty = this.pageData.approvedQty;
+ if(approvedQty == null || approvedQty == ''){
+ this.$message.error('请输入良品总数量!');
+ this.pageData.approvedQty = 0;//重新赋值
+ return false;
+ }
+ if(approvedQty <= 0){
+ this.$message.error('良品总数量必须大于0!');
+ this.pageData.approvedQty = 0;//重新赋值
+ return false;
+ }
+ //班次判断
+ if(this.pageData.shiftDesc == '无班次'){
+ this.$message.error('该时间段内没有匹配的班次信息,请联系相关人员!!');
+ return false;
+ }
+ //验证通过提交到后台
+ let postData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)};
+ finishRoll(postData).then(({data}) => {
+ this.$message.error('qty_reported找不到!');
+ //判断操作是否成功
+ if(data.code == 500){
+ this.$message.error(data.msg);
+ }else{
+ //刷新报工的页面
+ this.$emit('refreshPageData');
+ //关闭当前的页面
+ this.closeDialog();
+ }
+ })
+ },
@@ -658,4 +757,9 @@ export default {
padding: 0px !important;
}
+/*table中input*/
+div.table-input /deep/ input.el-input__inner{
+ text-align: right;
+}
+
diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue
index b3ebf7c..aba0e74 100644
--- a/src/views/modules/yieldReport/com_produce_report_normal.vue
+++ b/src/views/modules/yieldReport/com_produce_report_normal.vue
@@ -2643,6 +2643,9 @@ export default {
seqNo: '',
orderNo: '',
itemNo: 0,
+ resourceId: '',
+ scheduledDate: '',
+ shiftNo: '',
partNo: '',
workCenterNo: '',
workCenterDesc: '',
@@ -2652,8 +2655,6 @@ export default {
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
- scheduledDate: '',
- shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
@@ -2711,6 +2712,7 @@ export default {
this.scheduleData.seqNo = data.row.seqNo;
this.scheduleData.orderNo = data.row.orderNo;
this.scheduleData.itemNo = data.row.itemNo;
+ this.scheduleData.resourceId = data.row.resourceId;
this.scheduleData.partNo = data.row.partNo;
this.scheduleData.partDesc = data.row.partDesc;
this.scheduleData.planStartTime = data.row.planStartTime;
@@ -2837,6 +2839,7 @@ export default {
this.scheduleData.seqNo = data.row.seqNo;
this.scheduleData.orderNo = data.row.orderNo;
this.scheduleData.itemNo = data.row.itemNo;
+ this.scheduleData.resourceId = data.row.resourceId;
this.scheduleData.partNo = data.row.partNo;
this.scheduleData.partDesc = data.row.partDesc;
this.scheduleData.planStartTime = data.row.planStartTime;