修复bug
This commit is contained in:
parent
db35f2d707
commit
6de147a86c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -112,8 +112,8 @@ defineExpose({
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="order-list" v-loading="loading" v-infinite-scroll="getOrderList"
|
<div class="order-list" v-loading="loading" v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="300"
|
:infinite-scroll-distance="300"
|
||||||
infinite-scroll-delay="500"
|
:infinite-scroll-delay="500"
|
||||||
infinite-scroll-immediate="false"
|
infinite-scroll-immediate="false"
|
||||||
style="overflow: auto">
|
style="overflow: auto">
|
||||||
<div class="item" :class="{'item-active': activeStore == index}" v-for="(item, index) in orderList" :key="index" @click="setForm(item, index)">
|
<div class="item" :class="{'item-active': activeStore == index}" v-for="(item, index) in orderList" :key="index" @click="setForm(item, index)">
|
||||||
|
|
|
@ -89,8 +89,8 @@ onUnmounted(() => {
|
||||||
<div
|
<div
|
||||||
class="shop-list"
|
class="shop-list"
|
||||||
v-infinite-scroll="loadMore"
|
v-infinite-scroll="loadMore"
|
||||||
infinite-scroll-distance="100"
|
:infinite-scroll-distance="100"
|
||||||
infinite-scroll-delay="500"
|
:infinite-scroll-delay="500"
|
||||||
:infinite-scroll-immediate="false"
|
:infinite-scroll-immediate="false"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
>
|
>
|
||||||
|
|
|
@ -135,8 +135,8 @@ onUnmounted(() => {
|
||||||
class="table"
|
class="table"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-infinite-scroll="getOrderList"
|
v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="300"
|
:infinite-scroll-distance="300"
|
||||||
infinite-scroll-delay="300"
|
:infinite-scroll-delay="300"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
v-if="formData?.id"
|
v-if="formData?.id"
|
||||||
:infinite-scroll-immediate="false"
|
:infinite-scroll-immediate="false"
|
||||||
|
|
|
@ -180,8 +180,8 @@ onUnmounted(()=>{
|
||||||
class="order-lists"
|
class="order-lists"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-infinite-scroll="getOrderList"
|
v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="300"
|
:infinite-scroll-distance="300"
|
||||||
infinite-scroll-delay="500"
|
:infinite-scroll-delay="500"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -150,8 +150,8 @@ onUnmounted(() => {
|
||||||
class="table"
|
class="table"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-infinite-scroll="getOrderList"
|
v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="300"
|
:infinite-scroll-distance="300"
|
||||||
infinite-scroll-delay="300"
|
:infinite-scroll-delay="300"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
:infinite-scroll-immediate="false"
|
:infinite-scroll-immediate="false"
|
||||||
>
|
>
|
||||||
|
|
|
@ -162,8 +162,8 @@ onUnmounted(()=>{
|
||||||
class="order-lists"
|
class="order-lists"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-infinite-scroll="getOrderList"
|
v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="300"
|
:infinite-scroll-distance="300"
|
||||||
infinite-scroll-delay="500"
|
:infinite-scroll-delay="500"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -77,8 +77,8 @@ defineExpose({
|
||||||
class="table"
|
class="table"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-infinite-scroll="getOrderList"
|
v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="300"
|
:infinite-scroll-distance="300"
|
||||||
infinite-scroll-delay="300"
|
:infinite-scroll-delay="300"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
:infinite-scroll-immediate="false"
|
:infinite-scroll-immediate="false"
|
||||||
>
|
>
|
||||||
|
|
|
@ -89,8 +89,8 @@ onUnmounted(() => {
|
||||||
<div
|
<div
|
||||||
class="shop-list"
|
class="shop-list"
|
||||||
v-infinite-scroll="loadMore"
|
v-infinite-scroll="loadMore"
|
||||||
infinite-scroll-distance="1000"
|
:infinite-scroll-distance="1000"
|
||||||
infinite-scroll-delay="500"
|
:infinite-scroll-delay="500"
|
||||||
:infinite-scroll-immediate="false"
|
:infinite-scroll-immediate="false"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
>
|
>
|
||||||
|
|
|
@ -130,8 +130,8 @@ onUnmounted(() => {
|
||||||
class="table"
|
class="table"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-infinite-scroll="getOrderList"
|
v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="300"
|
:infinite-scroll-distance="300"
|
||||||
infinite-scroll-delay="300"
|
:infinite-scroll-delay="300"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
:infinite-scroll-immediate="false"
|
:infinite-scroll-immediate="false"
|
||||||
>
|
>
|
||||||
|
|
|
@ -155,8 +155,8 @@ onUnmounted(()=>{
|
||||||
class="order-lists"
|
class="order-lists"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-infinite-scroll="getOrderList"
|
v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="300"
|
:infinite-scroll-distance="300"
|
||||||
infinite-scroll-delay="500"
|
:infinite-scroll-delay="500"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, onUnmounted, ref } from "vue";
|
import { onMounted, onUnmounted, ref } from "vue";
|
||||||
import { amountTakingListsApi, financialRecordListsApi } from "@/api/merchant.js";
|
import {
|
||||||
|
amountTakingListsApi,
|
||||||
|
financialRecordListsApi,
|
||||||
|
} from "@/api/merchant.js";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import mitt from "@/utils/mitt.js";
|
import mitt from "@/utils/mitt.js";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
@ -11,7 +14,7 @@ const where = ref({
|
||||||
loadend: false,
|
loadend: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
create_time: "",
|
create_time: "",
|
||||||
start_time: ""
|
start_time: "",
|
||||||
});
|
});
|
||||||
const changeDate = () => {
|
const changeDate = () => {
|
||||||
where.value.page_no = 1;
|
where.value.page_no = 1;
|
||||||
|
@ -40,12 +43,22 @@ const getOrderList = () => {
|
||||||
where.value.loading = false;
|
where.value.loading = false;
|
||||||
where.value.page_no++;
|
where.value.page_no++;
|
||||||
});
|
});
|
||||||
if (listType.value == 2)
|
if (listType.value == 2) {
|
||||||
|
if(where.value.start_time[0] >= where.value.start_time[1]) {
|
||||||
|
where.value.loading = false;
|
||||||
|
return ElMessage.error('开始时间不能大于等于结束时间');
|
||||||
|
}
|
||||||
|
let start_time = where.value.start_time[0]
|
||||||
|
? moment(where.value.start_time[0]).format("YYYY-MM-DD")
|
||||||
|
: "";
|
||||||
|
let end_time = where.value.start_time[1]
|
||||||
|
? moment(where.value.start_time[1]).format("YYYY-MM-DD")
|
||||||
|
: "";
|
||||||
financialRecordListsApi({
|
financialRecordListsApi({
|
||||||
page_no: where.value.page_no,
|
page_no: where.value.page_no,
|
||||||
page_size: where.value.page_size,
|
page_size: where.value.page_size,
|
||||||
start_time: moment(where.value.start_time || new Date()).format('YYYY-MM-DD'),
|
start_time: start_time,
|
||||||
// end_time: moment('2024-05-16').format('YYYY-MM-DD'),
|
end_time: end_time,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
goods_list.value = [...goods_list.value, ...res.data.lists];
|
goods_list.value = [...goods_list.value, ...res.data.lists];
|
||||||
if (res.data.lists.length < where.value.page_size)
|
if (res.data.lists.length < where.value.page_size)
|
||||||
|
@ -54,6 +67,7 @@ const getOrderList = () => {
|
||||||
where.value.page_no++;
|
where.value.page_no++;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
getOrderList();
|
getOrderList();
|
||||||
|
|
||||||
|
@ -94,7 +108,7 @@ onUnmounted(() => {
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-if="listType == 2"
|
v-if="listType == 2"
|
||||||
v-model="where.start_time"
|
v-model="where.start_time"
|
||||||
type="date"
|
type="daterange"
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
@change="changeDate"
|
@change="changeDate"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
|
@ -111,8 +125,8 @@ onUnmounted(() => {
|
||||||
class="table"
|
class="table"
|
||||||
v-loading="where.loading"
|
v-loading="where.loading"
|
||||||
v-infinite-scroll="getOrderList"
|
v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="300"
|
::infinite-scroll-delay="500"
|
||||||
infinite-scroll-delay="300"
|
:infinite-scroll-distance="300"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
:infinite-scroll-immediate="false"
|
:infinite-scroll-immediate="false"
|
||||||
v-if="listType == 1"
|
v-if="listType == 1"
|
||||||
|
@ -174,25 +188,20 @@ onUnmounted(() => {
|
||||||
class="table"
|
class="table"
|
||||||
v-loading="where.loading"
|
v-loading="where.loading"
|
||||||
v-infinite-scroll="getOrderList"
|
v-infinite-scroll="getOrderList"
|
||||||
infinite-scroll-distance="500"
|
::infinite-scroll-delay="500"
|
||||||
infinite-scroll-delay="500"
|
:infinite-scroll-distance="300"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
:infinite-scroll-immediate="false"
|
:infinite-scroll-immediate="false"
|
||||||
v-if="listType == 2"
|
v-if="listType == 2"
|
||||||
>
|
>
|
||||||
<el-table :data="goods_list">
|
<el-table :data="goods_list">
|
||||||
<el-table-column
|
<el-table-column prop="number_sn" label="订单号" width="250">
|
||||||
prop="number_sn"
|
|
||||||
label="订单号"
|
|
||||||
width="250"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="number" label="变动金额" width="180" />
|
<el-table-column prop="number" label="变动金额" width="180" />
|
||||||
<el-table-column prop="financial_type" label="变动类型" width="180" />
|
<el-table-column prop="financial_type" label="变动类型" width="180" />
|
||||||
<el-table-column prop="create_time" label="时间" />
|
<el-table-column prop="create_time" label="时间" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -80,8 +80,8 @@ const submit = ()=>{
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="order-lists"
|
class="order-lists"
|
||||||
infinite-scroll-distance="300"
|
:infinite-scroll-distance="300"
|
||||||
infinite-scroll-delay="500"
|
:infinite-scroll-delay="500"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Reference in New Issue