Compare commits

..

No commits in common. "7c789a8f6831517d33fa9180dfe0a661794f4864" and "88a7428ed67c164bebcfd947818c10df869e96b1" have entirely different histories.

12 changed files with 30 additions and 60 deletions

View File

@ -66,7 +66,6 @@ import ProductDialog from "./components/ProductDialog.vue";
import { formatDate, getCurrentMonthStartAndEnd } from "@/utils"; import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
import { ShipmentApi } from "@/services"; import { ShipmentApi } from "@/services";
import _ from "underscore"; import _ from "underscore";
import {formatStartAndEndTime} from "@/utils";
const getOptions = (x: Array<any>, y: Array<any>) => { const getOptions = (x: Array<any>, y: Array<any>) => {
return { return {
tooltip: { tooltip: {
@ -159,8 +158,8 @@ const handleDialog = (key: string, v: boolean) => {
}; };
const getList = () => { const getList = () => {
let params: any = { let params: any = {
startTime: formatStartAndEndTime(state.startTime, 's'), startTime: state.startTime + " 00:00:00",
endTime: formatStartAndEndTime(state.endTime, 'e'), endTime: state.endTime + " 23:59:59",
}; };
if (state.scaleStatus > -1) { if (state.scaleStatus > -1) {
params.scaleStatus = state.scaleStatus; params.scaleStatus = state.scaleStatus;

View File

@ -185,14 +185,8 @@ const state = reactive<{
averagePrice: 0, // averagePrice: 0, //
rankings: [], rankings: [],
}, },
startTime: formatDate( startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d} {h}:{i}:{s}"),
getCurrentMonthStartAndEnd().start, endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d} {h}:{i}:{s}"),
"{y}-{m}-{d} {h}:{i}:{s}"
),
endTime: formatDate(
getCurrentMonthStartAndEnd().end,
"{y}-{m}-{d} {h}:{i}:{s}"
),
scaleStatus: -1, scaleStatus: -1,
userId: -1, userId: -1,
productId: -1, productId: -1,
@ -216,8 +210,8 @@ const handleDialog = (key: string, v: boolean) => {
const getList = () => { const getList = () => {
let params: any = { let params: any = {
startTime: state.startTime, startTime: state.startTime + " 00:00:00",
endTime: state.endTime, endTime: state.endTime + " 23:59:59",
}; };
if (state.scaleStatus > -1) { if (state.scaleStatus > -1) {
params.scaleStatus = state.scaleStatus; params.scaleStatus = state.scaleStatus;

View File

@ -61,7 +61,7 @@ import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import CEcharts from "./Echarts/echarts.vue"; import CEcharts from "./Echarts/echarts.vue";
import ProductDialog from "./components/ProductDialog.vue"; import ProductDialog from "./components/ProductDialog.vue";
import { ReceiveApi } from "@/services"; import { ReceiveApi } from "@/services";
import { formatDate, getCurrentMonthStartAndEnd, formatStartAndEndTime } from "@/utils"; import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
import _ from "underscore"; import _ from "underscore";
const getOptions = (x: Array<any>, y: Array<any>) => { const getOptions = (x: Array<any>, y: Array<any>) => {
return { return {
@ -156,8 +156,8 @@ const changeTime = (obj: any) => {
const getList = () => { const getList = () => {
let params: any = { let params: any = {
startTime: formatStartAndEndTime(state.startTime, 's'), startTime: state.startTime + " 00:00:00",
endTime: formatStartAndEndTime(state.endTime, 'e'), endTime: state.endTime + " 23:59:59",
}; };
if (state.scaleStatus > -1) { if (state.scaleStatus > -1) {
params.scaleStatus = state.scaleStatus; params.scaleStatus = state.scaleStatus;

View File

@ -112,11 +112,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { FinanceApi } from "@/services"; import { FinanceApi } from "@/services";
import PageView from "@/components/PageView/index.vue"; import PageView from "@/components/PageView/index.vue";
import { import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
formatDate,
getCurrentMonthStartAndEnd,
formatStartAndEndTime,
} from "@/utils";
import TimeDialog from "@/components/Dialog/TimeDialog.vue"; import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import FilterDialog from "./components/CustomFilterDialog.vue"; import FilterDialog from "./components/CustomFilterDialog.vue";
import { onShow } from "@dcloudio/uni-app"; import { onShow } from "@dcloudio/uni-app";
@ -242,8 +238,8 @@ const getList = (v?: boolean) => {
let params: any = { let params: any = {
pageSize: pageList.pageSize, pageSize: pageList.pageSize,
pageNumber: pageList.pageNum, pageNumber: pageList.pageNum,
startTime: formatStartAndEndTime(state.startTime, 's'), startTime: state.startTime + " 00:00:00",
endTime: formatStartAndEndTime(state.endTime, 'e'), endTime: state.endTime + " 23:59:59",
oddNumbers: keyword.value, oddNumbers: keyword.value,
}; };
if (state.currentPaymentType > -1) { if (state.currentPaymentType > -1) {

View File

@ -107,7 +107,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { FinanceApi } from "@/services"; import { FinanceApi } from "@/services";
import PageView from "@/components/PageView/index.vue"; import PageView from "@/components/PageView/index.vue";
import { formatDate, getCurrentMonthStartAndEnd, formatStartAndEndTime } from "@/utils"; import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
import TimeDialog from "@/components/Dialog/TimeDialog.vue"; import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import FilterDialog from "./components/CustomFilterDialog.vue"; import FilterDialog from "./components/CustomFilterDialog.vue";
import { onShow } from "@dcloudio/uni-app"; import { onShow } from "@dcloudio/uni-app";
@ -242,8 +242,8 @@ const getList = (v?: boolean) => {
let params: any = { let params: any = {
pageSize: pageList.pageSize, pageSize: pageList.pageSize,
pageNumber: pageList.pageNum, pageNumber: pageList.pageNum,
startTime: formatStartAndEndTime(state.startTime, 's'), startTime: state.startTime + " 00:00:00",
endTime: formatStartAndEndTime(state.endTime, 'e'), endTime: state.endTime + " 23:59:59",
oddNumbers: keyword.value, oddNumbers: keyword.value,
}; };
if (state.currentPaymentType > -1) { if (state.currentPaymentType > -1) {

View File

@ -158,7 +158,6 @@ import {
formatDate, formatDate,
getCurrentMonthStartAndEnd, getCurrentMonthStartAndEnd,
filterNullUndefined, filterNullUndefined,
formatStartAndEndTime
} from "@/utils"; } from "@/utils";
import TimeDialog from "@/components/Dialog/TimeDialog.vue"; import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import FilterDialog from "./components/FilterDialog.vue"; import FilterDialog from "./components/FilterDialog.vue";
@ -376,8 +375,8 @@ const getList = (v?: boolean) => {
let params: any = { let params: any = {
pageSize: pageList.pageSize, pageSize: pageList.pageSize,
pageNumber: pageList.pageNum, pageNumber: pageList.pageNum,
startTime: formatStartAndEndTime(state.startTime, 's'), startTime: state.startTime + " 00:00:00",
endTime: formatStartAndEndTime(state.endTime, 'e'), endTime: state.endTime + " 23:59:59",
}; };
if (state.currentScaleStatus > -1) { if (state.currentScaleStatus > -1) {
params.scaleStatus = state.currentScaleStatus; params.scaleStatus = state.currentScaleStatus;

View File

@ -173,7 +173,6 @@ import {
formatDate, formatDate,
getCurrentMonthStartAndEnd, getCurrentMonthStartAndEnd,
filterNullUndefined, filterNullUndefined,
formatStartAndEndTime
} from "@/utils"; } from "@/utils";
import TimeDialog from "@/components/Dialog/TimeDialog.vue"; import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import FilterDialog from "./components/FilterDialog.vue"; import FilterDialog from "./components/FilterDialog.vue";
@ -409,8 +408,8 @@ const getList = (v?: boolean) => {
let params: any = { let params: any = {
pageSize: pageList.pageSize, pageSize: pageList.pageSize,
pageNumber: pageList.pageNum, pageNumber: pageList.pageNum,
startTime: formatStartAndEndTime(state.startTime, 's'), startTime: state.startTime + " 00:00:00",
endTime: formatStartAndEndTime(state.endTime, 'e'), endTime: state.endTime + " 23:59:59",
}; };
if (state.currentScaleStatus > -1) { if (state.currentScaleStatus > -1) {
params.scaleStatus = state.currentScaleStatus; params.scaleStatus = state.currentScaleStatus;

View File

@ -62,7 +62,6 @@ import PageView from "@/components/PageView/index.vue";
import { ScaleStatus } from "@/utils/enum"; import { ScaleStatus } from "@/utils/enum";
import TimeDialog from "@/components/Dialog/TimeDialog.vue"; import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import Detail from "./components/detail.vue"; import Detail from "./components/detail.vue";
import {formatStartAndEndTime} from "@/utils";
// //
const filterState = reactive({ const filterState = reactive({
showTime: false, showTime: false,
@ -118,8 +117,8 @@ const getList = (v?: boolean) => {
pageNumber: pageList.pageNum, pageNumber: pageList.pageNum,
scaleStatus: ScaleStatus.Paid, scaleStatus: ScaleStatus.Paid,
userName: keyword.value, userName: keyword.value,
startTime: formatStartAndEndTime(filterState.startTime, 's'), startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : "",
endTime: formatStartAndEndTime(filterState.endTime, 'e'), endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : "",
}).then((res: any) => { }).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
pageList.isLoading = false; pageList.isLoading = false;

View File

@ -320,8 +320,8 @@ const getList = (v?: boolean) => {
pageNumber: pageList.pageNum, pageNumber: pageList.pageNum,
scaleStatus: currentTab.value, scaleStatus: currentTab.value,
userName: keyword.value, userName: keyword.value,
startTime: filterState.startTime ? `${filterState.startTime}` : '', startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : '',
endTime: filterState.startTime ? `${filterState.endTime}` : '', endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : '',
}).then((res: any) => { }).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
pageList.isLoading = false; pageList.isLoading = false;

View File

@ -57,12 +57,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ShipmentApi } from "@/services/index"; import { ShipmentApi } from "@/services/index";
import { ScaleStatus } from "@/utils/enum"; import { ScaleStatus, ScaleStatusBtnType } from "@/utils/enum";
import { onShow } from "@dcloudio/uni-app"; import { onShow } from "@dcloudio/uni-app";
import PageView from "@/components/PageView/index.vue"; import PageView from "@/components/PageView/index.vue";
import TimeDialog from "@/components/Dialog/TimeDialog.vue"; import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import ReceivedDetail from "./components/receivedDetail.vue"; import ReceivedDetail from "./components/receivedDetail.vue";
import {formatStartAndEndTime} from "@/utils";
// //
const filterState = reactive({ const filterState = reactive({
showTime: false, showTime: false,
@ -116,8 +115,8 @@ const getList = (v?: boolean) => {
pageNumber: pageList.pageNum, pageNumber: pageList.pageNum,
scaleStatus: ScaleStatus.ToBeShipmentReview, scaleStatus: ScaleStatus.ToBeShipmentReview,
userName: keyword.value, userName: keyword.value,
startTime: formatStartAndEndTime(filterState.startTime, 's'), startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : "",
endTime: formatStartAndEndTime(filterState.endTime, 'e'), endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : "",
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
pageList.isLoading = false; pageList.isLoading = false;

View File

@ -135,11 +135,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { ShipmentApi } from "@/services/index"; import { ShipmentApi } from "@/services/index";
import { ScaleStatus, ScaleStatusBtnType } from "@/utils/enum"; import { ScaleStatus, ScaleStatusBtnType } from "@/utils/enum";
import { onLoad, onShow } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
import { onShow } from "@dcloudio/uni-app";
import PageView from "@/components/PageView/index.vue"; import PageView from "@/components/PageView/index.vue";
import type { ComType } from "@/types/global"; import type { ComType } from "@/types/global";
import TimeDialog from "@/components/Dialog/TimeDialog.vue"; import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import {formatStartAndEndTime} from "@/utils";
// //
const filterState = reactive({ const filterState = reactive({
showTime: false, showTime: false,
@ -292,8 +292,8 @@ const getList = (v?: boolean) => {
pageNumber: pageList.pageNum, pageNumber: pageList.pageNum,
scaleStatus: ScaleStatus.ToBeShipmentReview, scaleStatus: ScaleStatus.ToBeShipmentReview,
userName: keyword.value, userName: keyword.value,
startTime: formatStartAndEndTime(filterState.startTime, 's'), startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : "",
endTime: formatStartAndEndTime(filterState.endTime, 'e'), endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : "",
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
pageList.isLoading = false; pageList.isLoading = false;

View File

@ -307,18 +307,3 @@ export function getScaleStatus(type: number, value: number) {
} }
} }
} }
// 判断是否是时间格式
export function isDateTimePicker(str: any) {
return str.split(' ').length === 2
}
// 格式化开始时间和结束时间
export function formatStartAndEndTime(str:string, type:string) {
if (type === 's') {
return str ? isDateTimePicker(str) ? str : (str + " 00:00:00") : ''
}else if (type === 'e') {
return str ? isDateTimePicker(str) ? str : (str + " 23:59:59") : ''
}
}