|
|
|
|
@ -164,7 +164,7 @@ |
|
|
|
|
<template #footer> |
|
|
|
|
<span class="dialog-footer"> |
|
|
|
|
<el-button @click="closeDialog">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
|
|
|
<el-button type="primary" @click="submitForm" :loading="loading">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
@ -173,7 +173,7 @@ |
|
|
|
|
<script> |
|
|
|
|
import { getWorkCenterList } from '@/api/processManagement/addQuantity.js'; |
|
|
|
|
// import { submitBatchData } from '@/api/processManagement/periodical.js'; // 实际提交接口 |
|
|
|
|
import { getEquipmentList,add } from '@/api/processManagement/specialProcess'; |
|
|
|
|
import { getEquipmentList, add } from '@/api/processManagement/specialProcess'; |
|
|
|
|
import { getRoleUserList } from '@/api/processManagement/taskDispatch'; |
|
|
|
|
export default { |
|
|
|
|
props: { |
|
|
|
|
@ -184,6 +184,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
loading: false, |
|
|
|
|
openShow: false, |
|
|
|
|
wcData: [], |
|
|
|
|
equipmentData: [], |
|
|
|
|
@ -231,8 +232,9 @@ export default { |
|
|
|
|
// 初始添加一行(可选) |
|
|
|
|
if (this.moldAddMore && this.form.tableData.length === 0) { |
|
|
|
|
this.addTable(); |
|
|
|
|
}else{ |
|
|
|
|
this.form.tableData = this.itemData.length > 0 ? JSON.parse(JSON.stringify(this.itemData)) : []; |
|
|
|
|
} else { |
|
|
|
|
this.form.tableData = |
|
|
|
|
this.itemData.length > 0 ? JSON.parse(JSON.stringify(this.itemData)) : []; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
@ -304,6 +306,7 @@ export default { |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
|
|
// 校验通过:准备提交数据(过滤无用字段) |
|
|
|
|
const submitData = this.form.tableData.map(row => { |
|
|
|
|
@ -316,9 +319,11 @@ export default { |
|
|
|
|
console.log('提交数据:', submitData); |
|
|
|
|
add(submitData).then(res => { |
|
|
|
|
this.$message.success('操作成功'); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.closeDialog(); |
|
|
|
|
}); |
|
|
|
|
} catch (err) { |
|
|
|
|
this.loading = false; |
|
|
|
|
this.$message.error(err.message); |
|
|
|
|
console.error('提交失败:', err); |
|
|
|
|
} |
|
|
|
|
|