Browse Source

2025-1-14

cmy 10 months ago
parent
commit
3290935dc7

+ 1 - 1
src/views/Staff/designer/components/Write.vue

@@ -268,7 +268,7 @@ const checkedUser = async (res: any) => {
     avatar: [res.avatar],
     birth_day_time: res.birthday,
     phone: res.phone,
-    gender: res.sex
+    gender: res.sex || 0
   })
 }
 const actionAddress = ref<mapAddressData>()

+ 1 - 1
src/views/Staff/worker/components/Write.vue

@@ -268,7 +268,7 @@ const checkedUser = async (res: any) => {
     avatar: [res.avatar],
     birth_day_time: res.birthday,
     phone: res.phone,
-    gender: res.sex
+    gender: res.sex || 0
   })
 }
 const actionAddress = ref<mapAddressData>()

+ 3 - 2
src/views/Staff/worker/index.vue

@@ -14,6 +14,7 @@ import { ElMessage, ElDivider, ElMessageBox, ElTag } from 'element-plus'
 import { Dialog } from '@/components/Dialog'
 import { TableImage } from '@/components/tableImage'
 import { designerData } from '@/api/staff/types'
+import { formatToDate } from '@/utils/dateUtil'
 const { t } = useI18n()
 
 const { tableRegister, tableState, tableMethods } = useTable({
@@ -217,7 +218,7 @@ const action = async (row: any, type: string) => {
     phone: row.phone,
     avatar: [row.avatar],
     gender: row.gender,
-    birth_day_time: row.birth_day_time,
+    birth_day_time: formatToDate(row.birth_day_time * 1000),
     province: row.province,
     city: row.city,
     area: row.area,
@@ -248,7 +249,7 @@ const save = async () => {
       phone: formData.phone,
       avatar: formData.avatar[0],
       gender: formData.gender,
-      birth_day_time: formData.birth_day_time,
+      birth_day_time: formatToDate(formData.birth_day_time),
       province: formData.province,
       city: formData.city,
       area: formData.area,