diff --git a/src/api/modules/order.js b/src/api/modules/order.js index 6dae9d3..4e7c03c 100644 --- a/src/api/modules/order.js +++ b/src/api/modules/order.js @@ -15,5 +15,5 @@ export function getOrderList(query) { export function exportOrder(query) { const urlParams = new URLSearchParams(query); - return `http://repair.cpolar.top/order/list/export?${urlParams.toString()}`; + return `https://api.cqcxj.cn/order/list/export?${urlParams.toString()}`; } \ No newline at end of file diff --git a/src/views/goods/index.vue b/src/views/goods/index.vue index e5c164f..af09c61 100644 --- a/src/views/goods/index.vue +++ b/src/views/goods/index.vue @@ -112,7 +112,6 @@ diff --git a/src/views/order/index.vue b/src/views/order/index.vue index a8ecef2..16c6ff5 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -429,7 +429,6 @@ const formSearch = ref({ username: '', surveyorsName: '', repairerName: '', - date: '', month: '', year: '', day: '', @@ -580,7 +579,7 @@ const excelDown = async () => { 'Content-Type': 'application/json' } }); - + const blob = await response.blob(); const downloadUrl = window.URL.createObjectURL(blob); const a = document.createElement('a'); @@ -602,22 +601,49 @@ const generateRandomNumber = () => { const downloadFile = () => { let params = {...formSearch.value} + if(params.status !== ' ') { params.status = parseInt(params.status, 10); + }else{ + delete params.status; + } + + if(params.year !== '') + { + let { + year + } = {...formatDate(params.year)}; + + params.year = year; + }else{ + delete params.year; } - if(params.date !== '') + if(params.month !== '') + { + let { + month + } = {...formatDate(params.month)}; + + params.month = month; + }else{ + delete params.month; + } + + if(params.day !== '') { let { year, month, day - } = {...formatDate(params.date)}; + } = {...formatDate(params.day)}; params.year = year; params.month = month; params.day = day; + }else{ + delete params.day; } return exportOrder(params); @@ -630,6 +656,8 @@ const onSearchSubmit = ()=> { if(params.status !== ' ') { params.status = parseInt(params.status, 10); + }else{ + delete params.status; } if(params.year !== '') @@ -639,6 +667,8 @@ const onSearchSubmit = ()=> { } = {...formatDate(params.year)}; params.year = year; + }else{ + delete params.year; } if(params.month !== '') @@ -648,6 +678,8 @@ const onSearchSubmit = ()=> { } = {...formatDate(params.month)}; params.month = month; + }else{ + delete params.month; } if(params.day !== '') @@ -661,6 +693,8 @@ const onSearchSubmit = ()=> { params.year = year; params.month = month; params.day = day; + }else{ + delete params.day; } getOrderList(params).then((res) => { diff --git a/src/views/scheduling/timeFrame.vue b/src/views/scheduling/timeFrame.vue index 8865651..9fac3bd 100644 --- a/src/views/scheduling/timeFrame.vue +++ b/src/views/scheduling/timeFrame.vue @@ -40,14 +40,6 @@ /> - - -
取消 @@ -82,17 +74,6 @@ - - -