From 3d50275fd6539227a22758b748b71c2497cf119a Mon Sep 17 00:00:00 2001 From: linfso Date: Thu, 12 Dec 2024 11:41:26 +0800 Subject: [PATCH] md --- src/api/oms/emisWaybill.js | 18 +++++++ src/views/oms/dashboard.vue | 64 +++++++++++++++++++---- src/views/oms/emisWaybill/OrderRecord.vue | 51 ++++++++---------- 3 files changed, 95 insertions(+), 38 deletions(-) diff --git a/src/api/oms/emisWaybill.js b/src/api/oms/emisWaybill.js index a97d57d..02f8089 100644 --- a/src/api/oms/emisWaybill.js +++ b/src/api/oms/emisWaybill.js @@ -85,6 +85,24 @@ export function getEmisWaybill(id) { }) } + +export function getOmsOrderStatInfo() { + return request({ + url: '/oms2c/emisWaybill/getOmsOrderStatInfo', + method: 'get' + }) +} + +export function getLatestMonthCreateOrderMapList() { + return request({ + url: '/oms2c/emisWaybill/getLatestMonthCreateOrderMapList', + method: 'get' + }) +} + + + + // 新增运单列表 export function addEmisWaybill(data) { return request({ diff --git a/src/views/oms/dashboard.vue b/src/views/oms/dashboard.vue index 4859f92..5eb3355 100644 --- a/src/views/oms/dashboard.vue +++ b/src/views/oms/dashboard.vue @@ -78,13 +78,13 @@
- 0 + {{ omsOrderState.issueCount }}
异常件
- 0 + {{ omsOrderState.totalCount }}
总订单量
@@ -96,25 +96,25 @@ -->
- 0 + {{ omsOrderState.waitGotCount }}
待接单
- 0 + {{ omsOrderState.transCount }}
运输中
- 0 + {{ omsOrderState.dispatchCount }}
派送中
- 0 + {{ omsOrderState.signCount }}
已签收
@@ -222,7 +222,7 @@ @@ -299,15 +299,18 @@ import { GridLayout, GridItem } from 'vue-grid-layout' import CardWithHeader from '@/components/CardWithHeader/index.vue'; import RaddarChart from './common/RaddarChart.vue'; -import LineChart from './common/LineChart.vue'; +import LineOrderChart from './common/LineOrderChart.vue'; import QuickLink from './common/QuickLink.vue'; +import { getOmsOrderStatInfo,getLatestMonthCreateOrderMapList } from "@/api/oms/emisWaybill"; + + import { mapGetters } from 'vuex' export default { name: 'Index', components: { CardWithHeader, RaddarChart, - LineChart, + LineOrderChart, QuickLink, GridLayout, GridItem @@ -316,6 +319,18 @@ export default { return { billCode:null, loading: false, + omsOrderState:{ + dispatchCount: 0, + issueCount:0, + signCount:0, + totalCount:0, + transCount:0, + waitGotCount:0 + }, + orderStateData:{ + xAxisData:[], + orderStateData:[] + }, lineChartData: lineChartData.newVisitis, layout: [ { x: 0, y: 0, w: 3, h: 2, i: '1', static: false }, @@ -328,12 +343,41 @@ export default { ...mapGetters(['avatar', 'nickName']), }, created() { - + this.initOmsOrderState(); }, methods: { layoutUpdatedEvent(newLayout) { this.layout = newLayout; }, + + initOmsOrderState() { + // 统计 + getOmsOrderStatInfo().then(response => { + console.log("====>getOmsOrderStatInfo===>",response); + this.omsOrderState = response.data; + }); + + + getLatestMonthCreateOrderMapList().then(response => { + console.log("====>getLatestMonthCreateOrderMapList===>",response); + + let xData=[]; + let yData=[]; + // 做数据转换 + response.data.forEach(item => { + xData.push(item.createDay); + yData.push(item.totalNum); + }); + + this.orderStateData.xAxisData=[...xData]; + this.orderStateData.orderStateData=[...yData]; + console.log("====>this.orderStateData===>",this.orderStateData); + + // this.orderStateList = response.data; + }); + + + }, moveEvent(){ }, diff --git a/src/views/oms/emisWaybill/OrderRecord.vue b/src/views/oms/emisWaybill/OrderRecord.vue index c6b0cfe..30d0b4e 100644 --- a/src/views/oms/emisWaybill/OrderRecord.vue +++ b/src/views/oms/emisWaybill/OrderRecord.vue @@ -243,7 +243,17 @@ - + + @@ -616,28 +626,6 @@
- - - - - -
{{ $t('我已同意接受') }} 《快递运单契约条款》 @@ -798,6 +786,12 @@ data() { currentSelectProduct:null, needDeclare:false, productFeeList:[], + + pickStartDateOption:{ + disabledDate:(time)=> { + return time.getTime() < Date.now()-1 * 24 * 3600 * 1000 + } + }, // 表单校验 rules: { // billCode: [ @@ -941,7 +935,7 @@ watch: { handler (newValue, oldValue) { console.log("===>routeParams==>",this.$route.query.routeParams); - + /* // 选择产品后报价 if(this.$route.query.action=="preOrderByProd"){ this.reset(); @@ -960,16 +954,20 @@ watch: { this.form.productTypeSelArr=[this.form.transLine,this.form.productType]; } + else if(this.$route.query.action=="modify"){ this.action=this.$route.query.action; this.billCode=this.$route.query.billCode; this.initData(); } + + else if(this.$route.query.action=="add"){ this.action=this.$route.query.action; this.billCode=null; this.initData(); } + */ }, deep: true @@ -1021,12 +1019,9 @@ created() { this.form.productTypeSelArr=[this.form.transLine,this.form.productType]; } - else{ + else if(this.$route.query.action=="add"){ this.initData(); } -}, -mounted() { - }, methods: { initData() {