| | |
| | | <el-dialog :title="modalOptions.title" v-model="visible" @close="close"> |
| | | <EditForm ref="editFormRef" /> |
| | | <template #footer> |
| | | <el-button type="primary" :loading="loading" @click="sendForm"> |
| | | {{ modalOptions.confirmText }} |
| | | </el-button> |
| | | <el-button @click="closeModal">{{ modalOptions.cancelText }}</el-button> |
| | | <el-button type="primary" :loading="loading" @click="sendForm"> |
| | | {{ modalOptions.confirmText }} |
| | | </el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | }); |
| | | const emits = defineEmits(["success"]); |
| | | |
| | | const saleLedgerProjectId = ref('') |
| | | const editFormRef = ref(); |
| | | const { |
| | | id, |
| | |
| | | closeModal, |
| | | } = useModal({ title: "来票台账" }); |
| | | |
| | | const open = async (id) => { |
| | | openModal(id); |
| | | const open = async (row) => { |
| | | openModal(row.id); |
| | | saleLedgerProjectId.value = row.saleLedgerProjectId; |
| | | await nextTick(); |
| | | editFormRef.value.load(id); |
| | | editFormRef.value.load(row.id); |
| | | }; |
| | | |
| | | const close = () => { |
| | |
| | | |
| | | const sendForm = async () => { |
| | | const form = editFormRef.value.form; |
| | | form.saleLedgerProjectId = saleLedgerProjectId.value; |
| | | const { code } = await updateRegistration(form); |
| | | if (code === 200) { |
| | | emits("success"); |