feat: 实现订单综合查询列表
This commit is contained in:
parent
01e7263de7
commit
24984ac8bb
11
api/order.js
Normal file
11
api/order.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import request from "../utils/request";
|
||||||
|
|
||||||
|
// 订单综合查询列表内部用户
|
||||||
|
export const getReportOrderQuery = (data, query) => {
|
||||||
|
return request({
|
||||||
|
method: 'post',
|
||||||
|
url: '/report/stock/ReportOrderQuery',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
63
pages/work/OrderSearchQuery/ListItem.vue
Normal file
63
pages/work/OrderSearchQuery/ListItem.vue
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<template>
|
||||||
|
<uni-card
|
||||||
|
v-for="(item,index) in items"
|
||||||
|
:key="item.saleid"
|
||||||
|
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||||
|
:extra="item.contractcode"
|
||||||
|
:title="item.user_name"
|
||||||
|
style="margin: 0;margin-bottom: 20px"
|
||||||
|
@click="handleDetail(item)"
|
||||||
|
>
|
||||||
|
<view class="context">
|
||||||
|
<view class="label">
|
||||||
|
<text>货主:</text>
|
||||||
|
<text>{{ item.companyname }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
<text>发货仓库:</text>
|
||||||
|
<text>{{ item.warehousename }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
<text>订单金额:</text>
|
||||||
|
<text>{{ formatPrice(item.contractmoney) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
<text>补差金额:</text>
|
||||||
|
<text>{{ formatPrice(item.piaokou) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
<text>制单日期:</text>
|
||||||
|
<text>{{ item.addDate }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
<text>执行日期:</text>
|
||||||
|
<text>{{ item.execDate }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
<text>支付方式:</text>
|
||||||
|
<text>{{ item.ispaynow }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
<text>状态:</text>
|
||||||
|
<text>{{ item.stateText }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</uni-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {defineOptions, defineProps, getCurrentInstance} from 'vue'
|
||||||
|
import UniCard from "../../../uni_modules/uni-card/components/uni-card/uni-card.vue";
|
||||||
|
import {formatPrice} from "../../../utils/utils";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "ListItem"
|
||||||
|
})
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance()
|
||||||
|
const props = defineProps(['items'])
|
||||||
|
const handleDetail = (raw) => {
|
||||||
|
// proxy.$tab.navigateTo(`/pages/work/FinancialApproval/OrderDetail?id=${raw.saleid}`)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -16,13 +16,27 @@
|
|||||||
<Area v-model="queryParams.areaId" @change="handleQuery"/>
|
<Area v-model="queryParams.areaId" @change="handleQuery"/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="商业公司">
|
<uni-forms-item label="商业公司">
|
||||||
<BusinessCompany v-model="queryParams.params.userId" @change="handleQuery" :areaId="queryParams.areaId"/>
|
<BusinessCompany v-model="queryParams.params.userId" :areaId="queryParams.areaId"
|
||||||
|
@change="handleQuery"/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="货主">
|
<uni-forms-item label="货主">
|
||||||
<ProductionUnit v-model="queryParams.companyId" @change="handleQuery"/>
|
<ProductionUnit v-model="queryParams.companyId" @change="handleQuery"/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</MBCard>
|
</MBCard>
|
||||||
|
|
||||||
|
|
||||||
|
<MBLoading v-if="loading"/>
|
||||||
|
<view v-else>
|
||||||
|
<ListItem v-if="tableData.length > 0" :items="tableData"/>
|
||||||
|
<MBPagination
|
||||||
|
v-if="total > 0"
|
||||||
|
v-model:limit="paging.pageSize"
|
||||||
|
v-model:page="paging.pageNum"
|
||||||
|
:total="total"
|
||||||
|
@pagination="handleQuery"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -31,14 +45,38 @@ import MBCard from "../../../components/MB/MBCard.vue";
|
|||||||
import ProductionUnit from "../../../components/ProductionUnit/ProductionUnit.vue";
|
import ProductionUnit from "../../../components/ProductionUnit/ProductionUnit.vue";
|
||||||
import UniForms from "../../../uni_modules/uni-forms/components/uni-forms/uni-forms.vue";
|
import UniForms from "../../../uni_modules/uni-forms/components/uni-forms/uni-forms.vue";
|
||||||
import UniFormsItem from "../../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue";
|
import UniFormsItem from "../../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue";
|
||||||
import {ref} from 'vue'
|
import {onMounted, ref} from 'vue'
|
||||||
import BusinessCompany from "../../../components/BusinessCompany.vue";
|
import BusinessCompany from "../../../components/BusinessCompany.vue";
|
||||||
import Area from "../../../components/Area.vue";
|
import Area from "../../../components/Area.vue";
|
||||||
|
import MBLoading from "../../../components/MB/MBLoading.vue";
|
||||||
|
import MBPagination from "../../../components/MB/MBPagination.vue";
|
||||||
|
import ListItem from "./ListItem.vue";
|
||||||
|
import {getReportOrderQuery} from "../../../api/order";
|
||||||
|
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
params: {}
|
params: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleQuery = () => {
|
const loading = ref(true)
|
||||||
|
const total = ref(0)
|
||||||
|
const paging = ref({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
isAsc: 'descending',
|
||||||
|
orderByColumn: 'adddate'
|
||||||
|
})
|
||||||
|
const tableData = ref([])
|
||||||
|
|
||||||
|
const handleQuery = async () => {
|
||||||
|
loading.value = true
|
||||||
|
const data = await getReportOrderQuery(queryParams.value, paging.value)
|
||||||
|
total.value = data.total
|
||||||
|
tableData.value = data.rows
|
||||||
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await handleQuery()
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user