Browse Source

sfdcRolls 小功能

master
rui_li 4 years ago
parent
commit
c671d759f2
  1. 8
      src/api/yieldReport/produce_report_normal.js
  2. 66
      src/views/modules/yieldReport/com_produce_report_normal.vue

8
src/api/yieldReport/produce_report_normal.js

@ -40,6 +40,14 @@ export const checkScheduleButton = data => createAPI('schedule/checkScheduleButt
//创建新卷号
export const createNewRoll = data => createAPI('schedule/createNewRoll', 'POST', data)
//重新打开sfdcRolls
export const reopenSfdcRolls = data => createAPI('schedule/reopenSfdcRolls', 'POST', data)
//删除sfdcRolls
export const deleteSfdcRolls = data => createAPI('schedule/deleteSfdcRolls', 'POST', data)

66
src/views/modules/yieldReport/com_produce_report_normal.vue

@ -331,9 +331,9 @@
width="115"
:label="'操作'">
<template slot-scope="scope">
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.FinishedFlag != 'N'" @click="replaceMaterialModal(scope.row)"
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.finishedFlag != 'N'" @click="warnReopenSfdcRollsConfirm(scope.row)"
>重打开</a>
<a class="customer-a" v-if="scope.row.finishedFlag == 'N' && scope.row.histType == '发料'" @click="cuttingMaterialModal(scope.row)"
<a class="customer-a" v-if="operatorData.operatorName != ''" @click="warnDeleteSfdcRollsConfirm(scope.row)"
>删除卷</a>
</template>
</el-table-column>
@ -535,6 +535,8 @@ import {
refreshWorkPlatformButtons,
checkScheduleButton,
createNewRoll,
reopenSfdcRolls,/*重新打开卷操作*/
deleteSfdcRolls,/*删除sfdcRolls的操作*/
} from "@/api/yieldReport/produce_report_normal.js";
/*引入组件*/
import comSwitchOperator from "./com_switch_operator";/*切换操作员*/
@ -3289,8 +3291,66 @@ export default {
this.$message.error(data.msg);
}
});
}
},
/*提醒是否重新打开的提示*/
warnReopenSfdcRollsConfirm(sfdcRollRow){
this.$confirm('确实要重新打开卷'+sfdcRollRow.rollNo+'吗?', '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() =>{
//sfdcRolls
this.reopenSfdcRollsOperation(sfdcRollRow);
});
},
/*执行重新sfdcRolls表的记录*/
reopenSfdcRollsOperation(sfdcRollRow){
let sfdcRoll = {'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'rollNo': sfdcRollRow.rollNo, 'operatorId': this.scheduleData.operatorId};
reopenSfdcRolls(sfdcRoll).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.info(data.resultMap.resultMsg);
//
this.refreshPageData();
}
});
},
/*提醒是否删除的提示*/
warnDeleteSfdcRollsConfirm(sfdcRollRow){
this.$confirm('确实要删除该卷吗?', '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() =>{
//sfdcRolls
this.deleteSfdcRollsOperation(sfdcRollRow);
});
},
/*执行删除sfdcRolls的数据功能*/
deleteSfdcRollsOperation(sfdcRollRow){
let sfdcRoll = {'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'rollNo': sfdcRollRow.rollNo, 'oriRollNo': sfdcRollRow.oriRollNo, 'operatorId': this.scheduleData.operatorId};
//
deleteSfdcRolls(sfdcRoll).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.info(data.resultMap.resultMsg);
//
this.refreshPageData();
}
});
},
},
created() {

Loading…
Cancel
Save