update:  更新收货汇总

This commit is contained in:
admin 2024-03-15 10:40:59 +08:00
parent 798f4389d3
commit 2dd4b8e43c
12 changed files with 443 additions and 120 deletions

View File

@ -2,22 +2,24 @@
<u-popup :show="show" mode="left" :closeable="true" @close="handleClose">
<view class="c-dialog-filter">
<view class="title">筛选</view>
<u-list>
<u-list height="200">
<u-list-item>
<u-cell :title="`供应商`" @click="handleDialog('showSupplier', true)">
<template #right-icon> </template>
</u-cell>
</u-list-item>
<u-list-item boder="none">
<u-cell :title="`收货产品`" @click="handleDialog('showProduct', true)">
<u-cell
:title="`收货产品`"
@click="handleDialog('showProduct', true)"
>
<template #right-icon> </template>
</u-cell>
</u-list-item>
</u-list>
<view class="btn-layout">
<view class="btn">
<up-button type="primary" text="确定"></up-button>
<up-button type="primary" text="确定" @click="handleOk()"></up-button>
</view>
</view>
<view class="btn-layout">
@ -29,9 +31,18 @@
</u-popup>
<!-- 供应商选择弹框 -->
<SupplierDialog :show="showDialog.showSupplier" @handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}"></SupplierDialog>
<SupplierDialog
:show="showDialog.showSupplier"
@handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}"
@changeUser="changeUser"
></SupplierDialog>
<!-- 收货产品弹框 -->
<ProductDialog :show="showDialog.showProduct" @handleDialog="(v:boolean) => {handleDialog('showProduct', v)}"></ProductDialog>
<ProductDialog
:show="showDialog.showProduct"
@handleDialog="(v:boolean) => {handleDialog('showProduct', v)}"
@changeProduct="changeProduct"
ref="productRef"
></ProductDialog>
</template>
<script setup lang="ts">
import SupplierDialog from "./SupplierDialog.vue";
@ -39,25 +50,47 @@ import ProductDialog from "./ProductDialog.vue";
const props = defineProps<{
show: boolean;
}>();
const emit = defineEmits(["handleDialog"]);
const emit = defineEmits(["handleDialog", "changeOther"]);
const handleClose = () => {
emit("handleDialog", false);
};
const showDialog = <
{
[key: string]: boolean
[key: string]: boolean;
}
>reactive(
{
showProduct: false,
showSupplier: false
}
)
>reactive({
showProduct: false,
showSupplier: false,
});
const handleDialog = (key: string, v:boolean) => {
showDialog[key] = v
const state = <
{
[key: string]: any;
}
>reactive({
project: {
id: -1,
reProductsName: ''
},
user: {
id: -1
}
});
const handleDialog = (key: string, v: boolean) => {
showDialog[key] = v;
};
const changeUser = (obj:any) => {
state.user = obj
}
const changeProduct = (obj:any) => {
state.project = obj
}
const handleOk = () => {
emit("changeOther",{userId: state.user.id, productId: state.project.id})
emit("handleDialog", false);
}
</script>
<style lang="scss" scoped>
.c-dialog-filter {

View File

@ -3,26 +3,49 @@
<view class="c-dialog-filter">
<view class="title">收货产品</view>
<view class="dialog-product-layout">
<text v-for="item in 20" :class="{ active: item === 2 }" :key="item"
>钢板料{{ item }}</text
<text v-for="(item, index) in state.list" :class="{ active: state.current === item.id }" @click="handleSelect(item)" :key="index"
>{{ item.reProductsName }}</text
>
</view>
<view class="btn-confirm">
<!-- <view class="btn-confirm">
<view class="btn">
<u-button type="primary" :text="'确认'"></u-button>
</view>
</view>
</view> -->
</view>
</u-popup>
</template>
<script setup lang="ts">
import { ReceiveProductApi } from '@/services';
const props = defineProps<{
show: boolean,
}>()
const emit = defineEmits(['handleDialog']);
const emit = defineEmits(['handleDialog', 'changeProduct']);
const handleClose = () => {
emit('handleDialog', false)
}
const state = reactive<any>({
list: [],
current: -1,
})
const handleSelect = (item:any) => {
state.current = item.id
emit('changeProduct', item)
emit('handleDialog', false)
}
const getList = () => {
ReceiveProductApi.getAllReProducts().then(res => {
if (res.code === 200) {
state.list = res.data
}
})
}
onMounted(() => {
getList()
})
</script>
<style lang="scss" scoped>
.c-dialog-filter {
@ -50,7 +73,7 @@ const handleClose = () => {
text {
font-weight: 400;
font-size: 24rpx;
font-size: 26rpx;
color: #999999;
background: #ffffff;
border-radius: 6rpx;

View File

@ -1,5 +1,5 @@
<template>
<u-popup :show="show" mode="bottom" :closeable="true" @close="handleClose" :zIndex="999999999999999999">
<u-popup :show="show" mode="bottom" :round="10" :closeable="true" @close="handleClose" :zIndex="999999999999999999">
<view class="c-dialog-filter">
<view class="title">收货产品</view>
<view class="dialog-product-layout">
@ -16,6 +16,8 @@
</u-popup>
</template>
<script setup lang="ts">
import { ReceiveProductApi } from '@/services';
const props = defineProps<{
show: boolean,
}>()
@ -23,6 +25,12 @@ const emit = defineEmits(['handleDialog']);
const handleClose = () => {
emit('handleDialog', false)
}
ReceiveProductApi.getAllReProducts().then(res => {
if (res.code === 200) {
}
})
</script>
<style lang="scss" scoped>
.c-dialog-filter {

View File

@ -1,21 +1,60 @@
<template>
<u-popup :show="show" mode="bottom" :closeable="true" @close="handleClose">
<u-popup
:show="show"
mode="bottom"
:round="10"
:closeable="true"
@close="handleClose"
>
<view class="c-dialog">
<view class="box"><text>单据状态</text></view>
<view class="box-btn"
><text class="active">全部</text><text>已支付</text><text>已审未付</text
><text>未审核</text></view
><text
v-for="(item, index) in state.statusList"
:key="index"
:class="{ active: state.currentStates === item.id }"
@click="handleSelect(item)"
>{{ item.name }}</text
></view
>
</view>
</u-popup>
</template>
<script setup lang="ts">
const props = defineProps<{
show: boolean,
}>()
const emit = defineEmits(['handleDialog']);
show: boolean;
}>();
const state = reactive({
currentStates: -1,
statusList: [
{
id: -1,
name: "全部",
},
{
id: 4,
name: "已支付",
},
{
id: 3,
name: "已审未付",
},
{
id: 2,
name: "未审核",
},
],
});
const emit = defineEmits(["handleDialog", "changeStatus"]);
const handleClose = () => {
emit('handleDialog', false)
emit("handleDialog", false);
};
const handleSelect = (item: any) => {
state.currentStates = item.id
emit("changeStatus", item)
emit("handleDialog", false);
}
</script>
<style lang="scss" scoped>
@ -27,7 +66,7 @@ const handleClose = () => {
margin: 65.38rpx 44.87rpx;
font-family: Source Han Sans CN;
font-weight: 500;
font-size: 24rpx;
font-size: 26rpx;
color: #000000;
.box-btn,
.box {
@ -40,9 +79,9 @@ const handleClose = () => {
margin-bottom: 30rpx;
text {
font-weight: 400;
font-size: 24rpx;
font-size: 26rpx;
color: #999999;
width: 117rpx;
width: 140rpx;
background: #ffffff;
border-radius: 6rpx;
border: 1px solid rgba(153, 153, 153, 0.64);
@ -56,7 +95,7 @@ const handleClose = () => {
}
.btn {
font-weight: 500;
font-size: 24rpx;
font-size: 26rpx;
color: $u-primary;
}
.box-border {

View File

@ -1,50 +1,134 @@
<template>
<u-popup :show="show" mode="bottom" :closeable="true" @close="handleClose">
<u-popup
:show="show"
mode="bottom"
:round="10"
:closeable="true"
@close="handleClose"
>
<view class="c-dialog">
<view class="box"><text>常用时间选择</text></view>
<view class="box-btn"
><text class="active">今日</text><text>昨日</text><text>本月</text
><text>本年</text></view
<view class="box-btn">
<text
v-for="(item, index) in state.statusList"
:key="index"
:class="{ active: state.currentStates === item.id }"
@click="handleSelect(item)"
>{{ item.name }}</text
></view
>
<view class="box box-border"
><text>其它时间选择</text
><text class="btn" @click="showCalendar = true">自定义</text></view
><text class="btn" @click="handleCustom()">自定义</text></view
>
<view v-if="showCalendar">
<view class="line"></view>
<view class="box">
<text @click="showCalendar = false">取消</text>
<text class="btn" @click="showCalendar = false">完成</text>
<text class="btn" @click="confirm()">完成</text>
</view>
<view>{{ state.startTime }} - {{ state.endTime }}</view>
<uni-calendar
:insert="true"
:lunar="true"
:start-date="'2014-1-1'"
:end-date="'2099-1-1'"
:end-date="'2034-1-1'"
:range="true"
@change="handleChangeDate"
color="#00D2E3"
/>
</view>
</view>
</u-popup>
</template>
<script setup lang="ts">
import { formatDate, getCurrentMonthStartAndEnd, getCurrentYearStartAndEnd } from "@/utils";
const props = defineProps<{
show: boolean,
}>()
const emit = defineEmits(['handleDialog']);
show: boolean;
}>();
const state = reactive<any>({
startTime: "",
endTime: "",
currentStates: -1,
statusList: [
{
id: 1,
name: "今日",
},
{
id: 2,
name: "昨日",
},
{
id: 3,
name: "本月",
},
{
id: 4,
name: "本年",
},
],
});
const emit = defineEmits(["handleDialog", "changeTime"]);
const handleClose = () => {
emit('handleDialog', false)
emit("handleDialog", false);
};
const handleCustom = () => {
showCalendar.value = true
state.currentStates = -1
}
const showCalendar = ref(false)
const handleChangeDate = (v: any) => {
console.log(v);
const handleSelect = (item: any) => {
const today = new Date();
const yesterday = new Date((today as any) - (24 * 60 * 60 * 1000));
state.currentStates = item.id;
console.log(item);
if (item.id === 1) {
state.startTime = formatDate(today, "{y}-{m}-{d}");
state.endTime = formatDate(today, "{y}-{m}-{d}");
} else if (item.id === 2) {
state.startTime = formatDate(yesterday, "{y}-{m}-{d}");
state.endTime = formatDate(yesterday, "{y}-{m}-{d}");
} else if (item.id === 3) {
state.startTime = formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}");
state.endTime = formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}");
} else if (item.id === 4) {
state.startTime = formatDate(getCurrentYearStartAndEnd().start, "{y}-{m}-{d}");
state.endTime = formatDate(getCurrentYearStartAndEnd().end, "{y}-{m}-{d}");
}
emit("changeTime", {startTime: state.startTime, endTime: state.endTime});
emit("handleDialog", false);
};
const showCalendar = ref(false);
const handleChangeDate = (v: any) => {
const time1 = v.range.before;
const time2 = v.range.after;
if (time1 && time2) {
const date1 = new Date(time1);
const date2 = new Date(time2);
if (date1 < date2) {
state.startTime = formatDate(time1, "{y}-{m}-{d}");
state.endTime = formatDate(time2, "{y}-{m}-{d}");
} else if (date1 > date2) {
state.startTime = formatDate(time2, "{y}-{m}-{d}");
state.endTime = formatDate(time1, "{y}-{m}-{d}");
} else {
state.startTime = formatDate(time1, "{y}-{m}-{d}");
state.endTime = formatDate(time2, "{y}-{m}-{d}");
}
}
};
const confirm = () => {
showCalendar.value = false
emit("changeTime", {startTime: state.startTime, endTime: state.endTime});
emit("handleDialog", false);
}
</script>
<style lang="scss" scoped>
::v-deep .u-popup__content {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 32rpx 32rpx 0rpx 0rpx;
@ -53,7 +137,7 @@ const handleChangeDate = (v: any) => {
margin: 65.38rpx 44.87rpx;
font-family: Source Han Sans CN;
font-weight: 500;
font-size: 24rpx;
font-size: 26rpx;
color: #000000;
.box-btn,
.box {
@ -66,9 +150,9 @@ const handleChangeDate = (v: any) => {
margin-bottom: 30rpx;
text {
font-weight: 400;
font-size: 24rpx;
font-size: 26rpx;
color: #999999;
width: 117rpx;
width: 140rpx;
background: #ffffff;
border-radius: 6rpx;
border: 1px solid rgba(153, 153, 153, 0.64);
@ -82,7 +166,7 @@ const handleChangeDate = (v: any) => {
}
.btn {
font-weight: 500;
font-size: 24rpx;
font-size: 26rpx;
color: $u-primary;
}
.box-border {

View File

@ -1,5 +1,5 @@
<template>
<u-popup :show="show" mode="bottom" :closeable="false" @close="handleClose">
<u-popup :show="show" mode="bottom" :round="10" :closeable="false" @close="handleClose">
<view class="c-dialog">
<view>
<view class="box">

View File

@ -8,7 +8,7 @@
<view v-for="(child, index) in item.child" :key="index" @click="(child as any).fn(child)">
<view>
<up-image
:src="`/PagesStatistics/static/${child.icon}`"
:src="`/pagesStatistics/static/${child.icon}`"
mode="aspectFill"
width="60rpx"
height="60rpx"

View File

@ -2,41 +2,46 @@
<view class="layout-box">
<view class="filter">
<u-input
v-model="params.startTime"
v-model="state.startTime"
disabled
disabledColor="#ffffff"
placeholder="请选择开始时间"
></u-input>
<text>-</text>
<u-input
v-model="params.endTime"
v-model="state.endTime"
disabled
disabledColor="#ffffff"
placeholder="请选择结束时间"
></u-input>
<u-icon name="arrow-down-fill" @click="handleDialog('showTime',true)"></u-icon>
<u-icon
name="arrow-down"
@click="handleDialog('showTime', true)"
></u-icon>
<text class="status">单据状态</text>
<u-icon name="arrow-down-fill" @click="handleDialog('showStatus', true)"></u-icon>
<u-icon
name="arrow-down"
@click="handleDialog('showStatus', true)"
></u-icon>
<text class="btn" @click="handleDialog('showFilter', true)">筛选</text>
</view>
<view class="box">
<up-row>
<up-col span="4">
<view class="inner-box" style="border: none">
<view class="num">892339.9</view>
<view class="num">{{ state.summary.totalAmount }}</view>
<view>收货总量/kg</view>
</view>
</up-col>
<up-col span="4">
<view class="inner-box">
<view class="num">892339.9</view>
<view class="num">{{ state.summary.totalPaid }}</view>
<view>已付/kg</view>
</view>
</up-col>
<up-col span="4">
<view class="inner-box">
<view class="num">892339.9</view>
<view class="num">{{ state.summary.totalUnpaid }}</view>
<view>未付/kg</view>
</view>
</up-col>
@ -47,19 +52,19 @@
<up-row>
<up-col span="4">
<view class="inner-box" style="border: none">
<view class="num">892339.9</view>
<view class="num">{{ state.summary.totalPayment }}</view>
<view>结算金额/</view>
</view>
</up-col>
<up-col span="4">
<view class="inner-box">
<view class="num">892339.9</view>
<view class="num">{{ state.summary.totalPaidPrice }}</view>
<view>实收金额</view>
</view>
</up-col>
<up-col span="4">
<view class="inner-box">
<view class="num">892339.9</view>
<view class="num">{{ state.summary.totalUnpaidPrice }}</view>
<view>应付金额</view>
</view>
</up-col>
@ -69,13 +74,13 @@
<up-row>
<up-col span="6">
<view class="inner-box" style="border: none">
<view class="num">892339.9</view>
<view class="num">{{ state.summary.totalReceipt }}</view>
<view>收货单</view>
</view>
</up-col>
<up-col span="6">
<view class="inner-box">
<view class="num">892339.9</view>
<view class="num">{{ state.summary.averagePrice }}</view>
<view>均价/kg</view>
</view>
</up-col>
@ -91,36 +96,45 @@
}}</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item, index) in 10" :key="index">
<uni-td>轻一</uni-td>
<uni-td>1636.00</uni-td>
<uni-td>5646.00</uni-td>
<uni-td>5636.00</uni-td>
<uni-td>5636.00</uni-td>
<uni-tr v-for="(item, index) in state.summary.rankings" :key="index">
<uni-td>{{ item.productName }}</uni-td>
<uni-td>{{ item.totalAmount }}</uni-td>
<uni-td>{{ item.totalPayment }}</uni-td>
<uni-td>{{ item.totalOrderNumber }}</uni-td>
<uni-td>{{ item.averagePrice }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<!-- 时间弹框 -->
<TimeDialog ref="timeDialog" :show="showDialog.showTime" @handleDialog="(v:boolean) => {handleDialog('showTime', v)}"/>
<TimeDialog
ref="timeDialog"
:show="showDialog.showTime"
@handleDialog="(v:boolean) => {handleDialog('showTime', v)}"
@changeTime="changeTime"
/>
<!-- 单据弹框 -->
<StatusDialog :show="showDialog.showStatus" @handleDialog="(v:boolean) => {handleDialog('showStatus', v)}"/>
<StatusDialog
:show="showDialog.showStatus"
@handleDialog="(v:boolean) => {handleDialog('showStatus', v)}"
@changeStatus="changeStatus"
/>
<!-- 筛选弹框 -->
<FilterDialog :show="showDialog.showFilter" @handleDialog="(v:boolean) => {handleDialog('showFilter', v)}"/>
<FilterDialog
:show="showDialog.showFilter"
@handleDialog="(v:boolean) => {handleDialog('showFilter', v)}"
@changeOther="changeOther"
/>
</template>
<script setup lang="ts">
import TimeDialog from './components/TimeDialog.vue'
import StatusDialog from './components/StatusDialog.vue'
import FilterDialog from './components/FilterDialog.vue'
const params = reactive({
startTime: "2024-01-01",
endTime: "2024-01-01",
});
import TimeDialog from "./components/TimeDialog.vue";
import StatusDialog from "./components/StatusDialog.vue";
import FilterDialog from "./components/FilterDialog.vue";
import { ReceiveApi } from "@/services";
import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
const tableTitleList = reactive([
{
name: "收货产品",
@ -140,21 +154,84 @@ const tableTitleList = reactive([
]);
const showDialog = <
{
[key: string]: boolean
[key: string]: boolean;
}
>reactive(
{
showTime: false,
showStatus: false,
showFilter: false
>reactive({
showTime: false,
showStatus: false,
showFilter: false,
});
const state = reactive<{
summary: ReceiveSummaryCount;
startTime: string;
endTime: string;
scaleStatus: number;
userId: number;
productId: number;
}>({
summary: {
totalAmount: 0, //
totalPaid: 0, //
totalUnpaid: 0, //
totalPayment: 0, //
totalPaidPrice: 0, //
totalUnpaidPrice: 0, //
totalReceipt: 0, //
averagePrice: 0, //
rankings: [],
},
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}"),
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}"),
scaleStatus: -1,
userId: -1,
productId:-1
});
const changeTime = (obj: any) => {
state.startTime = obj.startTime;
state.endTime = obj.endTime;
getList();
};
const changeStatus = (obj: any) => {
state.scaleStatus = obj.id;
getList();
};
const changeOther = (obj: any) => {
state.userId = obj.userId;
state.productId = obj.productId
getList();
};
const handleDialog = (key: string, v: boolean) => {
showDialog[key] = v;
};
const getList = () => {
let params: any = {
startTime: state.startTime + " 00:00:00",
endTime: state.endTime + " 23:59:59",
};
if (state.scaleStatus > -1) {
params.scaleStatus = state.scaleStatus
}
)
const handleDialog = (key: string, v:boolean) => {
showDialog[key] = v
}
if (state.userId > -1) {
params.userId = state.userId
}
if (state.productId > -1) {
params.productId = state.productId
}
ReceiveApi.OrderInReceipt(params).then((res) => {
if (res.code === 200) {
state.summary = res.data;
}
});
};
onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.layout-box {
@ -164,15 +241,14 @@ const handleDialog = (key: string, v:boolean) => {
align-items: center;
justify-items: center;
font-family: Source Han Sans CN;
font-weight: 500;
font-size: 27rpx;
font-size: 28rpx;
color: #000000;
::v-deep .u-input {
padding: 0rpx 16.03rpx !important;
input {
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 21rpx !important;
font-size: 24rpx !important;
color: #000000;
}
}
@ -195,7 +271,7 @@ const handleDialog = (key: string, v:boolean) => {
align-items: center;
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
font-size: 26rpx;
color: #000000;
text-align: center;
background: #ffffff;
@ -207,7 +283,7 @@ const handleDialog = (key: string, v:boolean) => {
text-align: center;
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
font-size: 26rpx;
color: #000000;
border-left: 1px solid #e9e9e9;
.num {
@ -216,21 +292,20 @@ const handleDialog = (key: string, v:boolean) => {
}
}
::v-deep .uni-table {
min-width: auto !important;
min-width: 500px !important;
.uni-table-th {
font-family: Source Han Sans CN;
font-weight: 500;
font-size: 22rpx;
font-size: 24rpx;
color: #000000;
padding: 5px 5px;
}
.uni-table-td {
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 21rpx;
font-size: 24rpx;
color: #000000;
}
}
}
</style>

View File

@ -82,10 +82,11 @@ export const updateOne = (data: any) => {
};
// 收货汇总
export const OrderInReceipt = () => {
return http({
export const OrderInReceipt = (data:any) => {
return http<ReceiveSummaryCount>({
method: "GET",
url: "/api/orderIn/OrderInReceipt"
url: "/api/orderIn/OrderInReceipt",
data
});
};

View File

@ -10,7 +10,7 @@ export const getReceiveProduct = () => {
// 查询收货产品列表All
export const getAllReProducts = () => {
return http({
return http<ReceiveProduct>({
method: "GET",
url: "/api/reproducts/allReProducts"
});

51
src/types/order.d.ts vendored
View File

@ -48,6 +48,17 @@ interface Order {
isChecked?: boolean;
[attrName: string]: any;
}
interface ReceiveSummaryCount {
totalAmount?: number; // 审核过的收货订单
totalPaid?: number; // 已支付的收货总量
totalUnpaid?: number; // 未支付的收货总量
totalPayment?: number; // 总支付金额
totalPaidPrice?: number; // 已经支付的金额
totalUnpaidPrice?: number; // 未支付的金额
totalReceipt?: number; // 收货单数量已审核的
averagePrice?: number; // 平均单价
rankings?: Array;
}
// 分页结构
interface OrderPage<T> {
total: number;
@ -73,7 +84,7 @@ type PageParams = {
productId?: string; // 产品id
repairFlag?: boolean; // 是否为补单,true 是未补单false是补单
scaleStatus?: number; // 磅单状态:0待定价1待过皮2待审核3已审核待支付4已支付
isDeleted?:boolean
isDeleted?: boolean;
};
interface Shipment {
@ -116,13 +127,13 @@ interface Shipment {
updateUserId?: string; //undefined
updateTime?: string; //undefined
isDeleted?: string; //删除标识true删除false未删除
settlementWeight?: number, // 结算重量
settlementGross?: number, // 结算毛重
settlementTare?: number, // 结算皮重
settlementNet?: number, // 结算净重
signTime?: string, // 签收时间
settlementWeight?: number; // 结算重量
settlementGross?: number; // 结算毛重
settlementTare?: number; // 结算皮重
settlementNet?: number; // 结算净重
signTime?: string; // 签收时间
paymentMethod?: string; //支付方式0:未支付,1:现金支付2银行卡支付3线上支付微信4支付宝
userType?: number;//用户类型0刷脸1刷卡
userType?: number; //用户类型0刷脸1刷卡
[attrName: string]: any;
}
@ -150,3 +161,29 @@ interface ShipmentTypeCount {
averagePrice: number; // 平均单价
rankings: ShipmentRank[]; // 出货产品汇总
}
// 收货产品
interface ReceiveProduct {
id?: string; // 收货产品id
reProductsName?: string; //收货产品名称
reCategoryId?: string; //收货分类id
reCategoryName?: string;
//收货分类名称
substationName?: string;
//分站名称
minPrice?: string;
//产品的最低价格
maxPrice?: string;
//产品的最高价格
commonPrice?: string;
//产品的常用价格
isDeleted?: boolean; //逻辑删除 TRUE=是 FALSE=否
}

View File

@ -32,3 +32,26 @@ export function formatDate(time: any, cFormat: string) {
});
return time_str;
}
export function getCurrentMonthStartAndEnd() {
let now = new Date();
let currentMonthStart = new Date(now.getFullYear(), now.getMonth(), 1);
let currentMonthEnd = new Date(now.getFullYear(), now.getMonth() + 1, 0);
return {
start: currentMonthStart,
end: currentMonthEnd
};
}
export function getCurrentYearStartAndEnd() {
let now = new Date();
let currentYearStart = new Date(now.getFullYear(), 0, 1); // 0 代表一月
let currentYearEnd = (new Date(now.getFullYear() + 1, 0, 1) as any) - 1; // 下一年的一月一日减一毫秒
return {
start: currentYearStart,
end: currentYearEnd
};
}