1

parent 43aca4c6
...@@ -55,6 +55,13 @@ const selectItem = (index, item) => { ...@@ -55,6 +55,13 @@ const selectItem = (index, item) => {
emit('dataParams', item, datePart); emit('dataParams', item, datePart);
} }
}; };
function timestampToDateBasic(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day} 00:00:00`;
}
const getStartDateList = () => { const getStartDateList = () => {
getStartDate(params).then((res) => { getStartDate(params).then((res) => {
dataList.value = res.data; dataList.value = res.data;
...@@ -64,13 +71,6 @@ function handleConfirm({ value }) { ...@@ -64,13 +71,6 @@ function handleConfirm({ value }) {
const datePart = timestampToDateBasic(value); const datePart = timestampToDateBasic(value);
emit('dataParams', null, datePart); emit('dataParams', null, datePart);
} }
function timestampToDateBasic(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}/${month}/${day}`;
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -210,7 +210,7 @@ const dataParams = (item, datePart) => { ...@@ -210,7 +210,7 @@ const dataParams = (item, datePart) => {
queryOfferProdListFn(); queryOfferProdListFn();
}); });
} else { } else {
params.value.dateType = 8; params.value.dateType = '8';
if (datePart && datePart !== 'NaN/NaN/NaN') { if (datePart && datePart !== 'NaN/NaN/NaN') {
params.value.allocateDate = datePart; params.value.allocateDate = datePart;
rotate2.value = false; rotate2.value = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment