diff --git a/src/modules/04_registry/components/Coin.vue b/src/modules/04_registry/components/Coin.vue index 6223b289c..9d5be1c33 100644 --- a/src/modules/04_registry/components/Coin.vue +++ b/src/modules/04_registry/components/Coin.vue @@ -68,11 +68,76 @@
+
+ + +
+ + + + + + ("true"); const $q = useQuasar(); const store = useProfileDataStore(); const { profileData, changeProfileColumns } = store; @@ -307,7 +373,8 @@ const route = useRoute(); const id = ref(""); const issuer = ref(); const detail = ref(); -const issueDate = ref(new Date()); +const issueDate = ref(new Date().getFullYear()); +const issueDate2 = ref(new Date()); const refCommandNo = ref(); const refCommandDate = ref(new Date()); const myForm = ref(); //form data input @@ -506,7 +573,8 @@ const fetchData = async () => { id: e.id, issuer: e.issuer, detail: e.detail, - issueDate: new Date(e.issueDate), + issueDate: new Date(e.issueDate).getFullYear(), + issueDate2: new Date(e.issueDate), refCommandNo: e.refCommandNo == "" ? "-" : e.refCommandNo, refCommandDate: e.refCommandDate == null ? "-" : new Date(e.refCommandDate), @@ -552,6 +620,7 @@ const getData = () => { issuer.value = row.issuer; detail.value = row.detail; issueDate.value = row.issueDate; + issueDate2.value = row.issueDate2; refCommandNo.value = row.refCommandNo; refCommandDate.value = row.refCommandDate; id.value = row.id; @@ -615,7 +684,10 @@ const saveData = async () => { id: id.value, issuer: issuer.value, detail: detail.value, - issueDate: dateToISO(issueDate.value), + issueDate: + isDate.value == "true" + ? dateToISO(issueDate2.value) + : new Date(`${issueDate.value}-01-01`), refCommandNo: refCommandNo.value, refCommandDate: refCommandDate.value == null @@ -645,7 +717,10 @@ const editData = async () => { id: id.value, issuer: issuer.value, detail: detail.value, - issueDate: dateToISO(issueDate.value), + issueDate: + isDate.value == "true" + ? dateToISO(issueDate2.value) + : new Date(`${issueDate.value}-01-01`), refCommandNo: refCommandNo.value, refCommandDate: refCommandDate.value == null @@ -732,7 +807,7 @@ const selectData = async (props: DataProps) => { detail.value = props.row.detail; issueDate.value = props.row.issueDate; refCommandNo.value = props.row.refCommandNo; - refCommandDate.value = props.row.refCommandDate; + refCommandDate.value = props.row.refCommandDate == '-' ? null:props.row.refCommandDate; id.value = props.row.id; await checkRowPage(); }; @@ -746,7 +821,8 @@ const addData = () => { edit.value = true; issuer.value = ""; detail.value = ""; - issueDate.value = new Date(); + issueDate.value = new Date().getFullYear(); + issueDate2.value = new Date(); refCommandNo.value = ""; refCommandDate.value = null; }; @@ -802,7 +878,8 @@ const clickHistory = async (row: RequestItemsObject) => { id: e.id, issuer: e.issuer, detail: e.detail, - issueDate: new Date(e.issueDate), + issueDate: new Date(e.issueDate).getFullYear(), + issueDate2: new Date(e.issueDate), refCommandNo: e.refCommandNo, refCommandDate: e.refCommandDate == null ? null : new Date(e.refCommandDate), diff --git a/src/modules/04_registry/interface/request/Coin.ts b/src/modules/04_registry/interface/request/Coin.ts index 596a6ab60..d972b3e0a 100644 --- a/src/modules/04_registry/interface/request/Coin.ts +++ b/src/modules/04_registry/interface/request/Coin.ts @@ -8,7 +8,8 @@ interface RequestItemsObject { id: string; issuer: string; detail: string; - issueDate: Date; + issueDate: number; + issueDate2: Date; refCommandNo: string; refCommandDate: Date | null | string; createdFullName: string; diff --git a/src/modules/04_registry/interface/response/Coin.ts b/src/modules/04_registry/interface/response/Coin.ts index 578dcbb5e..e94d13b34 100644 --- a/src/modules/04_registry/interface/response/Coin.ts +++ b/src/modules/04_registry/interface/response/Coin.ts @@ -3,7 +3,8 @@ interface ResponseObject { id: string; issuer: string; detail: string; - issueDate: Date; + issueDate: number; + issueDate2: Date; refCommandNo: string; refCommandDate: Date | null; createdFullName: string;