|
|
|
|
@ -295,7 +295,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
<script setup lang="ts" name="InvoiceInfoEdit">
|
|
|
|
|
import api from '@/api/system/user';
|
|
|
|
|
import { ref, reactive, computed, onMounted } from 'vue';
|
|
|
|
|
import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
|
|
|
|
|
@ -329,7 +329,7 @@ const contractPaymentMethodVoList = ref<ContractPaymentMethodVO[]>([]);
|
|
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
const routeParams = ref<Record<string, any>>({ ...(route.query as Record<string, any>) });
|
|
|
|
|
const routeParams = ref<Record<string, any>>({});
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
|
|
|
|
const buttonLoading = ref(false);
|
|
|
|
|
@ -553,7 +553,7 @@ const calculateReturnedRate = () => {
|
|
|
|
|
const isInitialized = ref(false);
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
nextTick(async () => {
|
|
|
|
|
getUserList(); // 初始化部门数据
|
|
|
|
|
getUserList(); // 初始化用户数据
|
|
|
|
|
// 获取路由参数
|
|
|
|
|
routeParams.value = route.query;
|
|
|
|
|
console.log(route.query);
|
|
|
|
|
@ -765,14 +765,19 @@ const handleSave = async (status: string, mode: boolean) => {
|
|
|
|
|
form.value.earlyReason = undefined;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
form.value.invoiceStatus = getInvoiceStatus(status);
|
|
|
|
|
form.value.flowStatus = getFlowStatus(status);
|
|
|
|
|
const invoiceForm = {
|
|
|
|
|
...form.value,
|
|
|
|
|
// 设置状态
|
|
|
|
|
invoiceStatus: getInvoiceStatus(status),
|
|
|
|
|
flowStatus: getFlowStatus(status),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 调用保存接口
|
|
|
|
|
if (form.value.invoiceId) {
|
|
|
|
|
form.value.toDeletedInvoiceDetailIdList = toDeletedInvoiceDetailIdList.value;
|
|
|
|
|
await updateFinInvoiceInfo(form.value);
|
|
|
|
|
await updateFinInvoiceInfo(invoiceForm);
|
|
|
|
|
} else {
|
|
|
|
|
await addFinInvoiceInfo(form.value);
|
|
|
|
|
await addFinInvoiceInfo(invoiceForm);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ElMessage.success('保存成功');
|
|
|
|
|
|