|
|
@ -143,11 +143,14 @@ |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
<div v-if="exceptionRuleLocked" class="exception-rule-lock-tip"> |
|
|
|
|
|
{{ exceptionRuleLockMessage }} |
|
|
|
|
|
</div> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" @click="checkCreateSeparateRolllBun" :loading="yieldReportLoading">产量报告</el-button> |
|
|
|
|
|
<el-button type="success" @click="saveShiftChangeTransfer" :loading="shiftChangeLoading">换班结转</el-button> |
|
|
|
|
|
<el-button type="warning" @click="executeAbnormalRollCut" :loading="abnormalCutLoading">异常截卷</el-button> |
|
|
|
|
|
<el-button @click="closeDialog">{{ buttons.closeButton }}</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="checkCreateSeparateRolllBun" :loading="yieldReportLoading" :disabled="exceptionRuleLocked">产量报告</el-button> |
|
|
|
|
|
<el-button type="success" @click="saveShiftChangeTransfer" :loading="shiftChangeLoading" :disabled="exceptionRuleLocked">换班结转</el-button> |
|
|
|
|
|
<el-button type="warning" @click="executeAbnormalRollCut" :loading="abnormalCutLoading" :disabled="exceptionRuleLocked">异常截卷</el-button> |
|
|
|
|
|
<el-button @click="closeDialog" :disabled="exceptionRuleLocked">{{ buttons.closeButton }}</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
@ -384,13 +387,12 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
checkCreateSplitSfdcRoll,/*校验是否可以创建分卷*/ |
|
|
|
|
|
|
|
|
checkSplitRollExceptionRule,/*创建分卷前异常规则校验*/ |
|
|
createSplitSfdcRoll,/*执行创建分卷的操作*/ |
|
|
createSplitSfdcRoll,/*执行创建分卷的操作*/ |
|
|
getFixedCarrierList,/*获取固定载具列表*/ |
|
|
getFixedCarrierList,/*获取固定载具列表*/ |
|
|
getUnprocessedShiftChangeData,/*查询未处理的换班结转数据*/ |
|
|
getUnprocessedShiftChangeData,/*查询未处理的换班结转数据*/ |
|
|
saveShiftChangeData,/*保存换班结转数据*/ |
|
|
saveShiftChangeData,/*保存换班结转数据*/ |
|
|
markShiftChangeAsProcessed,/*更新换班结转数据为已处理*/ |
|
|
markShiftChangeAsProcessed,/*更新换班结转数据为已处理*/ |
|
|
validateShiftChangeDataCount,/*校验数据条数*/ |
|
|
|
|
|
saveAbnormalRollData,/*保存异常截卷数据*/ |
|
|
saveAbnormalRollData,/*保存异常截卷数据*/ |
|
|
} from '@/api/yieldReport/com_separate_roll.js'; |
|
|
} from '@/api/yieldReport/com_separate_roll.js'; |
|
|
import { checkDefectCode } from '@/api/yieldReport/com_defect_roll.js'; |
|
|
import { checkDefectCode } from '@/api/yieldReport/com_defect_roll.js'; |
|
|
@ -438,6 +440,8 @@ export default { |
|
|
yieldReportLoading: false, // 产量报告loading |
|
|
yieldReportLoading: false, // 产量报告loading |
|
|
shiftChangeLoading: false, // 换班结转loading |
|
|
shiftChangeLoading: false, // 换班结转loading |
|
|
abnormalCutLoading: false, // 异常截卷loading |
|
|
abnormalCutLoading: false, // 异常截卷loading |
|
|
|
|
|
exceptionRuleLocked: false, // 异常规则触发后的强制锁定 |
|
|
|
|
|
exceptionRuleLockMessage: '', // 锁定提示文案 |
|
|
scheduleData: { |
|
|
scheduleData: { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
@ -454,6 +458,7 @@ export default { |
|
|
resourceDesc: '', |
|
|
resourceDesc: '', |
|
|
rollNo: '', |
|
|
rollNo: '', |
|
|
partDesc: '', |
|
|
partDesc: '', |
|
|
|
|
|
totalRollQty: 0, |
|
|
planStartTime: '', |
|
|
planStartTime: '', |
|
|
planFinishTime: '', |
|
|
planFinishTime: '', |
|
|
qtyRequiredOriginal: 0, |
|
|
qtyRequiredOriginal: 0, |
|
|
@ -682,6 +687,9 @@ export default { |
|
|
this.pageData.rowCount = scheduleData.rowCount; |
|
|
this.pageData.rowCount = scheduleData.rowCount; |
|
|
this.pageData.rollCount = scheduleData.rollCount; |
|
|
this.pageData.rollCount = scheduleData.rollCount; |
|
|
this.pageData.fixture = scheduleData.carrierNo; |
|
|
this.pageData.fixture = scheduleData.carrierNo; |
|
|
|
|
|
// 重置异常规则锁定状态 |
|
|
|
|
|
this.exceptionRuleLocked = false; |
|
|
|
|
|
this.exceptionRuleLockMessage = ''; |
|
|
// 重置缓存数据标记 |
|
|
// 重置缓存数据标记 |
|
|
this.hasCachedData = false; |
|
|
this.hasCachedData = false; |
|
|
this.cachedDataCount = 0; |
|
|
this.cachedDataCount = 0; |
|
|
@ -1261,6 +1269,16 @@ export default { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
const passRuleCheck = await this.checkSplitRuleBeforeAction('异常截卷') |
|
|
|
|
|
if (!passRuleCheck) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
this.$message.error(error.message || '异常规则校验失败') |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 确认框 |
|
|
// 确认框 |
|
|
try { |
|
|
try { |
|
|
await this.$confirm('确定执行异常截卷操作吗?该操作将执行产量报告。', '提示', { |
|
|
await this.$confirm('确定执行异常截卷操作吗?该操作将执行产量报告。', '提示', { |
|
|
@ -1641,6 +1659,65 @@ export default { |
|
|
this.$emit('update:visible', false); |
|
|
this.$emit('update:visible', false); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
buildSplitRuleCheckPayload (actionName) { |
|
|
|
|
|
return { |
|
|
|
|
|
site: this.scheduleData.site, |
|
|
|
|
|
buNo: this.scheduleData.buNo, |
|
|
|
|
|
orderNo: this.scheduleData.orderNo, |
|
|
|
|
|
itemNo: this.scheduleData.itemNo, |
|
|
|
|
|
seqNo: this.scheduleData.seqNo, |
|
|
|
|
|
rollNo: this.scheduleData.rollNo, |
|
|
|
|
|
operatorId: this.pageData.operatorId, |
|
|
|
|
|
functionName: actionName || '', |
|
|
|
|
|
rowCount: this.pageData.rowCount || 0, |
|
|
|
|
|
rollCount: this.pageData.rollCount || 0, |
|
|
|
|
|
totalRollQty: Number(this.scheduleData.totalRollQty || 0), |
|
|
|
|
|
rollRows: (this.rowDataList || []).map(row => ({ |
|
|
|
|
|
rowNumber: row.rowNumber, |
|
|
|
|
|
goodQty: row.goodQty || 0, |
|
|
|
|
|
surfaceLossQty: row.surfaceLossQty || 0, |
|
|
|
|
|
poorPerformanceQty: row.poorPerformanceQty || 0, |
|
|
|
|
|
defectQty: row.defectQty || 0, |
|
|
|
|
|
totalQty: row.totalQty || 0 |
|
|
|
|
|
})) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async checkSplitRuleBeforeAction (actionName) { |
|
|
|
|
|
const payload = this.buildSplitRuleCheckPayload(actionName) |
|
|
|
|
|
const { data } = await checkSplitRollExceptionRule(payload) |
|
|
|
|
|
if (!data || data.code === 500) { |
|
|
|
|
|
throw new Error((data && data.msg) || '异常规则校验失败') |
|
|
|
|
|
} |
|
|
|
|
|
const resultMap = data.resultMap || {} |
|
|
|
|
|
if (!resultMap.matched) { |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const action = resultMap.action || 'NONE' |
|
|
|
|
|
const message = resultMap.message || '触发异常规则,请先处理。' |
|
|
|
|
|
if (action === 'OPEN_DEFECT') { |
|
|
|
|
|
this.$message.warning(message) |
|
|
|
|
|
this.$emit('openDefectByExceptionRule', resultMap) |
|
|
|
|
|
this.$emit('update:visible', false) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
if (action === 'OPEN_DOWNTIME') { |
|
|
|
|
|
this.$message.warning(message) |
|
|
|
|
|
this.$emit('openDownTimeByExceptionRule', resultMap) |
|
|
|
|
|
this.$emit('update:visible', false) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
if (action === 'LOCK_PAGE') { |
|
|
|
|
|
this.exceptionRuleLocked = true |
|
|
|
|
|
this.exceptionRuleLockMessage = message |
|
|
|
|
|
this.$message.error(message) |
|
|
|
|
|
this.$emit('lockPageByExceptionRule', resultMap) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
return true |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/*检查材料卷号的数据*/ |
|
|
/*检查材料卷号的数据*/ |
|
|
checkValidQty() { |
|
|
checkValidQty() { |
|
|
//获取当前是的数量 |
|
|
//获取当前是的数量 |
|
|
@ -1767,6 +1844,18 @@ export default { |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
const passRuleCheck = await this.checkSplitRuleBeforeAction('参量报告') |
|
|
|
|
|
if (!passRuleCheck) { |
|
|
|
|
|
this.yieldReportLoading = false |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
this.$message.error(error.message || '异常规则校验失败') |
|
|
|
|
|
this.yieldReportLoading = false |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
// 计算分卷 |
|
|
// 计算分卷 |
|
|
const rowsPerRoll = Math.floor(this.pageData.rowCount / this.pageData.rollCount) |
|
|
const rowsPerRoll = Math.floor(this.pageData.rowCount / this.pageData.rollCount) |
|
|
@ -2203,6 +2292,15 @@ export default { |
|
|
overflow-y: auto !important; |
|
|
overflow-y: auto !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.exception-rule-lock-tip { |
|
|
|
|
|
margin-top: 10px; |
|
|
|
|
|
padding: 8px 12px; |
|
|
|
|
|
border-radius: 4px; |
|
|
|
|
|
background: #fde2e2; |
|
|
|
|
|
color: #c45656; |
|
|
|
|
|
font-size: 13px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* 分卷不良原因对话框 */ |
|
|
/* 分卷不良原因对话框 */ |
|
|
.roll-defect-summary { |
|
|
.roll-defect-summary { |
|
|
display: flex; |
|
|
display: flex; |
|
|
|