소스 검색

fix(strain inbound): 处理入库日期格式截断问题

将获取到的入库日期截取前10位,只保留年月日格式
张旭伟 1 개월 전
부모
커밋
a7bd159966
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/view/strain/inbound/add.vue

+ 1 - 1
src/view/strain/inbound/add.vue

@@ -122,7 +122,7 @@ const loadData = async (id: number) => {
       strainName: d.strainName || '',
       strainName: d.strainName || '',
       preservationTemp: d.preservationTemp || '',
       preservationTemp: d.preservationTemp || '',
       storageLocation: d.storageLocation || '',
       storageLocation: d.storageLocation || '',
-      inboundDate: d.inboundDate || '',
+      inboundDate: d.inboundDate ? d.inboundDate.slice(0, 10) : '',
       inboundPersonId: d.inboundPersonId || 0,
       inboundPersonId: d.inboundPersonId || 0,
       inboundPerson: d.inboundPerson || '',
       inboundPerson: d.inboundPerson || '',
       quantity: d.quantity || '',
       quantity: d.quantity || '',