|
|
@ -40,7 +40,7 @@ |
|
|
|
|
|
|
|
<template #footer> |
|
|
|
<el-button @click="dialogVisible = false">关闭</el-button> |
|
|
|
<el-button type="primary" @click="saveReport">保存</el-button> |
|
|
|
<el-button type="primary" :disabled="saveFlag" @click="saveReport">保存</el-button> |
|
|
|
</template> </Dialog |
|
|
|
>+ |
|
|
|
</template> |
|
|
@ -69,6 +69,7 @@ const unqualified = ref() |
|
|
|
const reportCount = ref() |
|
|
|
const qualified = ref() |
|
|
|
const workTerm = ref() |
|
|
|
const saveFlag=ref(false) |
|
|
|
//获取工序列表 |
|
|
|
const getProcessList=async(row)=>{ |
|
|
|
let params={ |
|
|
@ -99,9 +100,10 @@ const handleCount = () => { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (checkFlag) { |
|
|
|
if (checkFlag.value) { |
|
|
|
if (reportCount.value < qualified.value) { |
|
|
|
message.alert('合格数不能超出报工数!') |
|
|
|
qualified.value=0 |
|
|
|
return |
|
|
|
} |
|
|
|
if (qualified.value == undefined || qualified.value == 0) { |
|
|
@ -112,9 +114,9 @@ const handleCount = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
//提交报工 |
|
|
|
const saveReport = () => { |
|
|
|
const saveReport = async() => { |
|
|
|
let data = { |
|
|
|
reportDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:sss'), |
|
|
|
reportDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
schedulingCode: rowData.value.schedulingCode, |
|
|
|
processCode: processCodeSelected.value, |
|
|
|
list: [ |
|
|
@ -127,8 +129,12 @@ const saveReport = () => { |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
saveFlag.value = true |
|
|
|
//console.log("report-saveReport-82",data) |
|
|
|
workschedulingApi.reportWorkByProcess(data) |
|
|
|
await workschedulingApi.reportWorkByProcess(data) |
|
|
|
saveFlag.value = false |
|
|
|
dialogVisible.value = false |
|
|
|
emit('close') |
|
|
|
} |
|
|
|
// 传递给父类 |
|
|
|
const emit = defineEmits(['success', 'close']) |
|
|
|