This commit is contained in:
刘仕伟
2023-12-20 22:09:55 +08:00
parent 2e957ac485
commit 3db7e387f1
3 changed files with 133 additions and 16 deletions

View File

@@ -59,7 +59,7 @@
<p>{{ inventoryMoeny }}</p>
</div>
<div class="item">
<h2>已收货总量</h2>
<h2>已收货总量()</h2>
<p>{{ deliveryTotal }}</p>
</div>
<div class="item">

View File

@@ -28,21 +28,23 @@
<p>{{ lastSyncDate }}</p>
</div>
<div class="item">
<h2>发货总量</h2>
<h2>发货总量()</h2>
<p>{{ totalDelivery }}</p>
</div>
</div>
<ai-card title="数据明细" style="padding-bottom: 40px;">
<!--<template #right>
<json-excel
:data="last30Daylist"
:fields="last30DaysJsonFields"
:before-generate = "startDownload"
name="近30天销售数据.xls"
worksheet="近30天销售统计">
<el-button type="primary">导出数据</el-button>
</json-excel>
</template>-->
<template #right>
<el-date-picker
v-model="form.date"
type="daterange"
value-format="yyyy-MM-dd"
range-separator=""
start-placeholder="发货开始日期"
end-placeholder="发货结束日期">
</el-date-picker>
<el-button type="primary" @click="beginSearch">查询</el-button>&nbsp;
<ai-download url="/api/deliveryOrder/exportExcel" fileName="已收货发货单" :disabled="!search.mallId" :params="getExportParams"></ai-download>
</template>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
@@ -57,6 +59,7 @@
</template>
<script>
import AiDownload from '@/components/AiDownload.vue'
import {sendChromeAPIMessage} from '@/api/chromeApi'
// import JsonExcel from 'vue-json-excel'
import {timestampToTime} from '@/utils/date'
@@ -64,7 +67,7 @@ import { Message } from 'element-ui'
export default {
name: 'ShippingList',
components: {AiDownload},
data () {
return {
isLoading: false,
@@ -78,6 +81,9 @@ import { Message } from 'element-ui'
{ prop: 'totalNumber', label: '总件数', align: 'left' },
{ prop: 'deliveryTime', label: '发货时间', width: '180px', fixed: 'right'}
],
form: {
date: ''
},
currentPage: 1,
pageSize: 100,
@@ -99,6 +105,14 @@ import { Message } from 'element-ui'
},
computed: {
getExportParams() {
let params = {...this.search}
if (this.form.date) {
params.beginDate = this.form.date[0]
params.endDate = this.form.date[1]
}
return {...params}
}
},
/*components: {
@@ -113,10 +127,13 @@ import { Message } from 'element-ui'
},
getDeliveryOrderList () {
let params = {...this.search}
if (this.form.date) {
params.beginDate = this.form.date[0]
params.endDate = this.form.date[1]
}
this.$http.post('/api/deliveryOrder/page',null,{
params: {
...this.search
}
params: params
}).then(res => {
this.tableData = res.data.records
this.total = res.data.total
@@ -265,6 +282,13 @@ import { Message } from 'element-ui'
this.getList()
}, 1500)
}
},
beginSearch() {
if (!this.search.mallId) {
Message.error("请先选择店铺")
return
}
this.getDeliveryOrderList()
}
}
}