duy %!s(int64=2) %!d(string=hai) anos
pai
achega
be31a359f1
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/views/expense/invoice/billing.vue

+ 5 - 0
src/views/expense/invoice/billing.vue

@@ -281,12 +281,16 @@ const getFormData = (submitStatus = 1) => {
 const tempLoading = ref(false)
 const tempDraftData = async () => {
     tempLoading.value = true
+    
     const form = getFormData(1)
+    form.id = dataId.value
+
     const { error, code, msg } = await mainApi.submit(form)
     //判断状态
     tempLoading.value = false
     if (!error && code === 200) {
         window.$message?.success('暂存成功')
+        router.push({ name: 'expense-invoice' })
     } else {
         window.$message?.error(msg)
     }
@@ -300,6 +304,7 @@ const submitFormData = async () => {
         submitLoading.value = true
         //发起请求
         const form = getFormData(2)
+        form.id = ''
         const { error, code, msg } = await mainApi.submit(form)
         //判断状态
         submitLoading.value = false