| | |
| | | <view class="row" v-if="searchForm.reportType === 'inout'"><text class="l">出库数量</text><text class="r">{{ item.totalStockOut }}</text></view> |
| | | <view class="row"><text class="l">现在库存</text><text class="r highlight">{{ item.currentStock }}</text></view> |
| | | <view class="row" v-if="item.createBy"><text class="l">入库人</text><text class="r">{{ item.createBy }}</text></view> |
| | | <view class="row" v-if="item.currentWeight"><text class="l">现净重(吨)</text><text class="r">{{ item.currentWeight }}</text></view> |
| | | <view class="row" v-if="item.recordType"><text class="l">来源</text><text class="r">{{ getRecordType(item.recordType) }}</text></view> |
| | | </view> |
| | | </view> |
| | | <view class="load-more-wrap"> |
| | |
| | | getStockInventoryReportList, |
| | | getStockInventoryInAndOutReportList |
| | | } from '@/api/inventoryManagement/stockInventory.js' |
| | | import {findAllQualifiedStockInRecordTypeOptions} from "@/api/basicData/enum"; |
| | | |
| | | const reportTypes = [ |
| | | { label: '日报', value: 'daily' }, |
| | |
| | | p.startMonth = searchForm.value.startMonth + '-01' |
| | | p.endMonth = searchForm.value.endMonth + '-01' |
| | | } else { |
| | | p.startDate = searchForm.value.startDate |
| | | p.endDate = searchForm.value.endDate |
| | | p.startMonth = searchForm.value.startDate |
| | | p.endMonth = searchForm.value.endDate |
| | | } |
| | | return p |
| | | } |
| | | |
| | | const stockRecordTypeOptions = ref([]) |
| | | |
| | | const getRecordType = (recordType) => { |
| | | return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || '' |
| | | } |
| | | |
| | | // 获取来源类型选项 |
| | | const fetchStockRecordTypeOptions = () => { |
| | | findAllQualifiedStockInRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }) |
| | | } |
| | | |
| | | const getList = () => { |
| | |
| | | searchForm.value.singleDate = today.format('YYYY-MM-DD') |
| | | } |
| | | if (!searchForm.value.startMonth || !searchForm.value.endMonth) { |
| | | searchForm.value.startMonth = today.subtract(1, 'month').format('YYYY-MM') |
| | | searchForm.value.endMonth = today.format('YYYY-MM') |
| | | searchForm.value.startMonth = today.format('YYYY-MM') |
| | | searchForm.value.endMonth = today.add(1, 'month').format('YYYY-MM') |
| | | } |
| | | if (!searchForm.value.startDate || !searchForm.value.endDate) { |
| | | searchForm.value.endDate = today.format('YYYY-MM-DD') |
| | |
| | | onShow(() => { |
| | | initDefaultDates() |
| | | handleQuery() |
| | | fetchStockRecordTypeOptions() |
| | | }) |
| | | |
| | | const goBack = () => uni.navigateBack() |