From db80aba09d2aa09c4e0e091d0b7ebeccb57973fa Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 08 六月 2026 11:16:30 +0800
Subject: [PATCH] fix: 数量小数输入问题

---
 src/views/financialManagement/payable/paymentApply.vue |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/views/financialManagement/payable/paymentApply.vue b/src/views/financialManagement/payable/paymentApply.vue
index b83eb58..e34793f 100644
--- a/src/views/financialManagement/payable/paymentApply.vue
+++ b/src/views/financialManagement/payable/paymentApply.vue
@@ -160,7 +160,7 @@
           <el-col :span="12">
             <el-form-item label="鍒涘缓鏃堕棿" prop="createTime">
               <el-date-picker
-                v-model="form.createTime"
+                v-model="formCreateTimeDate"
                 type="date"
                 placeholder="閫夋嫨鏃ユ湡"
                 value-format="YYYY-MM-DD"
@@ -260,7 +260,7 @@
           <el-col :span="12">
             <el-form-item label="鍒涘缓鏃堕棿" prop="createTime">
               <el-date-picker
-                v-model="paymentForm.createTime"
+                v-model="paymentFormCreateTimeDate"
                 type="date"
                 placeholder="閫夋嫨鏃ユ湡"
                 value-format="YYYY-MM-DD"
@@ -353,6 +353,7 @@
 
 <script setup>
 import { ref, reactive, computed, onMounted, nextTick, getCurrentInstance } from "vue";
+import dayjs from "dayjs";
 import { ElMessage, ElMessageBox } from "element-plus";
 import FormDialog from "@/components/Dialog/FormDialog.vue";
 import { getOptions } from "@/api/procurementManagement/procurementLedger.js";
@@ -454,6 +455,18 @@
   inboundBatches: "",
   status: 0,
   createTime: "",
+});
+const formCreateTimeDate = computed({
+  get: () => (form.createTime ? String(form.createTime).split(" ")[0] : ""),
+  set: (value) => {
+    form.createTime = value ? `${value} ${dayjs().format("HH:mm:ss")}` : "";
+  },
+});
+const paymentFormCreateTimeDate = computed({
+  get: () => (paymentForm.createTime ? String(paymentForm.createTime).split(" ")[0] : ""),
+  set: (value) => {
+    paymentForm.createTime = value ? `${value} ${dayjs().format("HH:mm:ss")}` : "";
+  },
 });
 
 const rules = {
@@ -620,6 +633,7 @@
     remark: form.remark || "",
     status: 0,
     paymentAmount: form.paymentAmount,
+    createTime: form.createTime,
   };
   if (forUpdate) {
     payload.id = currentId.value;
@@ -730,7 +744,7 @@
     stockInRecordIds: [],
     inboundBatches: "",
     status: 0,
-    createTime: new Date().toISOString().split("T")[0],
+    createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
   });
   inboundBatchList.value = [];
   inboundBatchOptions.value = [];
@@ -809,7 +823,7 @@
     bankAccount: row.bankAccountNum ?? row.bankAccount ?? "",
     bankName: row.bankAccountName ?? row.bankName ?? "",
     remark: "",
-    createTime: new Date().toISOString().split("T")[0],
+    createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
   });
   paymentDialogVisible.value = true;
   nextTick(() => {

--
Gitblit v1.9.3