style:库存总览字段调整

main
黄伟杰 3 weeks ago
parent d74f8cf045
commit 4dd9ba1378

@ -21,12 +21,6 @@
<el-option v-for="item in areaOptions" :key="item.id" :label="item.areaName" :value="item.id" /> <el-option v-for="item in areaOptions" :key="item.id" :label="item.areaName" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="t('ErpStock.Overview.dateRange')" prop="dateRange">
<el-date-picker v-model="queryParams.dateRange" value-format="YYYY-MM-DD HH:mm:ss" type="daterange"
:start-placeholder="t('ErpStock.Record.placeholderCreateTimeStart')"
:end-placeholder="t('ErpStock.Record.placeholderCreateTimeEnd')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" class="!w-280px" />
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery"> <el-button type="primary" @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> {{ t('common.query') }} <Icon icon="ep:search" class="mr-5px" /> {{ t('common.query') }}
@ -196,12 +190,10 @@ const queryParams = reactive<{
categoryType?: number categoryType?: number
warehouseId?: number warehouseId?: number
areaId?: number areaId?: number
dateRange: string[]
}>({ }>({
categoryType: undefined, categoryType: undefined,
warehouseId: undefined, warehouseId: undefined,
areaId: undefined, areaId: undefined
dateRange: []
}) })
const cardsLoading = ref(false) const cardsLoading = ref(false)
@ -285,9 +277,9 @@ const summaryCards = computed(() => {
lines: [ lines: [
formatCardLine(t('ErpStock.Overview.cardLabels.outboundOrders'), todayOut.orderCount), formatCardLine(t('ErpStock.Overview.cardLabels.outboundOrders'), todayOut.orderCount),
formatCardLine(t('ErpStock.Overview.cardLabels.detailLines'), todayOut.itemCount), formatCardLine(t('ErpStock.Overview.cardLabels.detailLines'), todayOut.itemCount),
formatCardLine(t('ErpStock.Overview.cardLabels.productOut'), todayOut.productDisplay),
formatCardLine(t('ErpStock.Overview.cardLabels.materialOut'), todayOut.materialDisplay), formatCardLine(t('ErpStock.Overview.cardLabels.materialOut'), todayOut.materialDisplay),
formatCardLine(t('ErpStock.Overview.cardLabels.sparePartOut'), todayOut.sparePartDisplay), formatCardLine(t('ErpStock.Overview.cardLabels.sparePartOut'), todayOut.sparePartDisplay)
formatCardLine(t('ErpStock.Overview.cardLabels.productOut'), todayOut.productDisplay)
] ]
} }
] ]
@ -315,12 +307,10 @@ const filterEmptyParams = (params: Record<string, any>) => {
} }
const buildBaseQueryParams = () => { const buildBaseQueryParams = () => {
const [beginTime, endTime] = queryParams.dateRange || []
return filterEmptyParams({ return filterEmptyParams({
categoryType: queryParams.categoryType, categoryType: queryParams.categoryType,
warehouseId: queryParams.warehouseId, warehouseId: queryParams.warehouseId,
areaId: queryParams.areaId, areaId: queryParams.areaId
createTime: beginTime && endTime ? [beginTime, endTime] : undefined
}) })
} }

Loading…
Cancel
Save