提交
This commit is contained in:
@ -165,7 +165,7 @@
|
||||
</el-row>
|
||||
<template #footer>
|
||||
<el-button @click="closeDialog">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm(formRef)">确定</el-button>
|
||||
<el-button type="primary" @click="submitForm(formRef)" :loading="loadingBtn">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog title="详情" v-model="detailDialog" width="75%" draggable>
|
||||
@ -228,7 +228,7 @@ const rules = ref({
|
||||
content: [{ required: true, message: '请输入内容', trigger: 'blur' }]
|
||||
});
|
||||
const loading = ref(false);
|
||||
|
||||
const loadingBtn = ref();
|
||||
//字典获取数据
|
||||
const getTabsList = async () => {
|
||||
const res = await getDicts('subcontracting_type');
|
||||
@ -457,6 +457,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
});
|
||||
return;
|
||||
}
|
||||
loadingBtn.value = true;
|
||||
const newSelectionData = selectionData.value.filter((item) => item.quantity != '' && item.quantity != null);
|
||||
if (newSelectionData.some((item) => item.selectNum == '' || item.selectNum == null)) {
|
||||
ElMessage.error('存在未填写数量的工程或费用名称,请检查');
|
||||
@ -488,6 +489,8 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
loadingBtn.value = false;
|
||||
}
|
||||
} else {
|
||||
console.log('error submit!', fields);
|
||||
@ -544,7 +547,7 @@ const handleDetail = (row: any) => {
|
||||
getDetails(row);
|
||||
};
|
||||
const getDetails = (row: any) => {
|
||||
getDetailsList({ id: row.id, type: '1' }).then((res) => {
|
||||
getDetailsList({ id: row.id, type: '1', projectId: currentProject.value?.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
detailData.value = res.data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user