Commit cebd7fae authored by 琉璃丶c's avatar 琉璃丶c

1.优化step的线长度

2.添加物流信息页的空白页面
3.修复取消订单 类型的step显示问题
4.屏蔽订单详情中的发票点击事件
5.引入Empty组件,更新 vant 的版本
parent 9ab64a45
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -19,11 +19,11 @@ VueAMap.initAMapApiLoader({ ...@@ -19,11 +19,11 @@ VueAMap.initAMapApiLoader({
}) })
// import './assets/styles/variable.scss' // import './assets/styles/variable.scss'
import { Button, Toast, Field, Row, Col, NavBar, Search, Uploader, import { Button, Toast, Field, Row, Col, NavBar, Search, Uploader, Empty,
List, PullRefresh, Popup, Cell, CellGroup, Tab, Tabs, Collapse, Divider, IndexBar, IndexAnchor, List, PullRefresh, Popup, Cell, CellGroup, Tab, Tabs, Collapse, Divider, IndexBar, IndexAnchor,
CollapseItem, Icon, Image, RadioGroup, Radio, DatetimePicker, Step, Steps, Card, Swipe, SwipeItem, CollapseItem, Icon, Image, RadioGroup, Radio, DatetimePicker, Step, Steps, Card, Swipe, SwipeItem,
Slider, DropdownMenu, DropdownItem, Grid, GridItem, Tag, ImagePreview, Loading,Checkbox, CheckboxGroup, SwipeCell, Dialog, Stepper } from 'vant' Slider, DropdownMenu, DropdownItem, Grid, GridItem, Tag, ImagePreview, Loading, Checkbox, CheckboxGroup, SwipeCell, Dialog, Stepper } from 'vant'
Vue.use(Button).use(Icon).use(Field).use(Row).use(Col).use(NavBar).use(CellGroup) Vue.use(Button).use(Icon).use(Field).use(Row).use(Col).use(NavBar).use(CellGroup).use(Empty)
.use(Toast).use(Search).use(List).use(PullRefresh).use(Popup).use(Cell).use(Tab).use(Tabs) .use(Toast).use(Search).use(List).use(PullRefresh).use(Popup).use(Cell).use(Tab).use(Tabs)
.use(Collapse).use(CollapseItem).use(Image).use(RadioGroup).use(Radio).use(DatetimePicker) .use(Collapse).use(CollapseItem).use(Image).use(RadioGroup).use(Radio).use(DatetimePicker)
.use(Steps).use(Step).use(Card).use(Swipe).use(SwipeItem).use(Slider).use(DropdownMenu) .use(Steps).use(Step).use(Card).use(Swipe).use(SwipeItem).use(Slider).use(DropdownMenu)
......
...@@ -14,7 +14,7 @@ export default { ...@@ -14,7 +14,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.calDashLineWidth() // this.calDashLineWidth()
}, },
methods: { methods: {
calDashLineWidth() { calDashLineWidth() {
......
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
top: 12px; top: 12px;
left: 50%; left: 50%;
z-index: -1; z-index: -1;
width: 88%; width: 95%;
height: 2px; height: 2px;
background-size: 15px 3px; background-size: 15px 3px;
background-repeat: repeat-x; background-repeat: repeat-x;
......
<template> <template>
<div class="logistics-content"> <div class="logistics-content">
<map-view/> <van-empty description="暂无数据"
<div class="logistics-header" v-if="shippingInfo"> v-if="!shippingInfo&&!shippingInfo.shippingNo&&
(!stepList|| stepList.length<0)&&(!mapPointList||mapPointList.length < 0)"/>
<map-view v-if="mapPointList&&mapPointList.length > 0"/>
<div class="logistics-header" v-if="shippingInfo&&shippingInfo.shippingNo">
<div class="header-title"> <div class="header-title">
<van-icon class="logistic-logo" :name="icons.logo"/> <van-icon class="logistic-logo" :name="icons.logo"/>
<span class="logistic-header-layout"> <span class="logistic-header-layout">
...@@ -26,7 +29,7 @@ ...@@ -26,7 +29,7 @@
<span class="logistic-type">市内</span> <span class="logistic-type">市内</span>
</div> </div>
</div> </div>
<div id="stepLine" class="logistics-step-line"> <div id="stepLine" :class="stepList.length>2?'logistics-step-line':'logistics-step-line_show'" v-if="stepList">
<logistics-step> <logistics-step>
<step-item v-for="(item, index) in stepList" :stepInfo=item :key="index"/> <step-item v-for="(item, index) in stepList" :stepInfo=item :key="index"/>
</logistics-step> </logistics-step>
...@@ -54,6 +57,7 @@ export default { ...@@ -54,6 +57,7 @@ export default {
logo: require('@/assets/img/u48.png') logo: require('@/assets/img/u48.png')
}, },
shippingInfo: {}, shippingInfo: {},
mapPointList: [],
stepList: [] stepList: []
} }
}, },
...@@ -63,10 +67,11 @@ export default { ...@@ -63,10 +67,11 @@ export default {
show: true, show: true,
leftArrow: true, leftArrow: true,
rightIcon: false, rightIcon: false,
title: '', title: '物流详情',
leftText: '物流详情', leftText: '',
leftClick: this.onBrowserBack, leftClick: this.onBrowserBack,
rightClick: null rightClick: function () {
}
}) })
window.addEventListener('popstate', this.onBrowserBack, false) window.addEventListener('popstate', this.onBrowserBack, false)
...@@ -85,6 +90,7 @@ export default { ...@@ -85,6 +90,7 @@ export default {
let stepEle = document.getElementById('stepLine') let stepEle = document.getElementById('stepLine')
stepEle.className = 'logistics-step-line_show' stepEle.className = 'logistics-step-line_show'
}, },
/* 获取运单信息 */
getShippingData() { getShippingData() {
console.log(this.orderInfo) console.log(this.orderInfo)
let data = { let data = {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<order-state-item text="已完成" :item-num="3" :hasNext="false"/> <order-state-item text="已完成" :item-num="3" :hasNext="false"/>
</order-state> </order-state>
<!-- 订单状态 取消 --> <!-- 订单状态 取消 -->
<order-state class="order-state" :active="1" v-if="trackData.currentOrderStatusCode === '110'"> <order-state class="order-state" :active="2" v-if="trackData.currentOrderStatusCode === '110'">
<order-state-item text="已开单" :item-num="1"/> <order-state-item text="已开单" :item-num="1"/>
<order-state-item text="已取消" :item-num="2" :hasNext="false"/> <order-state-item text="已取消" :item-num="2" :hasNext="false"/>
</order-state> </order-state>
...@@ -42,7 +42,9 @@ ...@@ -42,7 +42,9 @@
<div class="info-text"> <div class="info-text">
<div style="display: flex"> <div style="display: flex">
<span class="order-code">{{ detailData.orderNo }}</span> <span class="order-code">{{ detailData.orderNo }}</span>
<span class="order-copy"><van-icon :name="icons.copy"/>复制</span> <span class="order-copy" @click="onCopyOrderNo()">
<!-- <van-icon :name="icons.copy"/>-->
复制</span>
</div> </div>
下单时间: {{ detailData.orderDate }} 下单时间: {{ detailData.orderDate }}
</div> </div>
...@@ -65,7 +67,7 @@ ...@@ -65,7 +67,7 @@
<van-icon :name="icons.inDelivery" class="order-icon logistics-icon"/> <van-icon :name="icons.inDelivery" class="order-icon logistics-icon"/>
<div class="logistics-text"> <div class="logistics-text">
<div style="display:flex"> <div style="display:flex">
<span class="logistics-speak">{{ trackData.orderStatusInfoVoList[0].statusMsg }}</span> <span class="logistics-speak">{{ !trackData.orderStatusInfoVoList[0].statusMsg?'暂无数据':trackData.orderStatusInfoVoList[0].statusMsg }}</span>
<van-icon class="logistics-arrow" name="arrow"/> <van-icon class="logistics-arrow" name="arrow"/>
</div> </div>
<div class="logistics-time">{{ trackData.orderStatusInfoVoList[0].opDate }}</div> <div class="logistics-time">{{ trackData.orderStatusInfoVoList[0].opDate }}</div>
...@@ -93,8 +95,8 @@ ...@@ -93,8 +95,8 @@
<div> <div>
<div class="goods-all" @click="openOrderInvoice()"> <div class="goods-all" @click="openOrderInvoice()">
<span class="all-title">发票信息 ({{ invoiceData.total ? invoiceData.total : 0 }})</span> <span class="all-title">发票信息 ({{ invoiceData.total ? invoiceData.total : 0 }})</span>
<span class="title-more">更多</span> <!-- <span class="title-more">更多</span>-->
<van-icon class="title-arrow" name="arrow"/> <!-- <van-icon class="title-arrow" name="arrow"/>-->
</div> </div>
<div class="order-common" style="margin-bottom: 10px"> <div class="order-common" style="margin-bottom: 10px">
<invoice-simple-item v-for="(item, index) in invoiceData.invoiceList" :item="item" :key="item.invoiceNo" <invoice-simple-item v-for="(item, index) in invoiceData.invoiceList" :item="item" :key="item.invoiceNo"
...@@ -111,6 +113,7 @@ import OrderState from '../components/orderState' ...@@ -111,6 +113,7 @@ import OrderState from '../components/orderState'
import GoodsSimpleItem from '../components/goodsSimpleItem' import GoodsSimpleItem from '../components/goodsSimpleItem'
import InvoiceSimpleItem from '../components/invoiceSimpleItem' import InvoiceSimpleItem from '../components/invoiceSimpleItem'
import {getMyOrderList, getTrackInfo, getOrderInvoiceList} from '@/api/myOrder' import {getMyOrderList, getTrackInfo, getOrderInvoiceList} from '@/api/myOrder'
import {copyToCliborad} from '@/utils/bridge'
export default { export default {
name: 'orderDetail', name: 'orderDetail',
...@@ -169,6 +172,9 @@ export default { ...@@ -169,6 +172,9 @@ export default {
onBrowserBack() { onBrowserBack() {
this.$router.go(-1) this.$router.go(-1)
}, },
onCopyOrderNo() {
this.copyToCliborad(this.detailData.orderNo)
},
/* 打开物流页面 */ /* 打开物流页面 */
openLogistics() { openLogistics() {
this.$router.push({ this.$router.push({
...@@ -185,20 +191,20 @@ export default { ...@@ -185,20 +191,20 @@ export default {
}, },
/* 打开发票列表页面 */ /* 打开发票列表页面 */
openOrderInvoice() { openOrderInvoice() {
this.$router.push({ // this.$router.push({
path: 'orderInvoice', // path: 'orderInvoice',
query: this.detailData // query: this.detailData
}) // })
}, },
/* 打开单个发票页面 */ /* 打开单个发票页面 */
openInvoice(model) { openInvoice(model) {
let item = this.detailData // let item = this.detailData
item.invoiceNo = model.invoiceNo // item.invoiceNo = model.invoiceNo
this.$router.push({ // this.$router.push({
path: 'orderInvoiecDetail', // path: 'orderInvoiecDetail',
query: item // query: item
}) // })
console.log(item) // console.log(item)
}, },
/* 计算订单状态Step */ /* 计算订单状态Step */
calcOrderStep(statusCode) { calcOrderStep(statusCode) {
...@@ -273,10 +279,14 @@ export default { ...@@ -273,10 +279,14 @@ export default {
this.detailData.goodsInfos.forEach(item => { this.detailData.goodsInfos.forEach(item => {
// console.log(111, item) // console.log(111, item)
let mode = item.storageMode let mode = item.storageMode
if (mode.indexOf('') !== -1) { if (mode.indexOf('') !== -1) {
// 插入到 // 插入到
this.storageModel.cold = true this.storageModel.cold = true
} }
if (mode.indexOf('非冷链') !== -1) {
// 插入到
this.storageModel.cold = false
}
if (mode.indexOf('退') !== -1) { if (mode.indexOf('退') !== -1) {
this.storageModel.rtn = true this.storageModel.rtn = true
} }
...@@ -417,15 +427,19 @@ export default { ...@@ -417,15 +427,19 @@ export default {
/*主信息 复制按钮*/ /*主信息 复制按钮*/
.order-copy { .order-copy {
font-size: 12px;
color: #555555; color: #555555;
display: flex; border-radius: 15px;
align-items: center; border: solid 1px #c0c0c0;
background-color: #e4eceb;
i { padding: 2px;
color: #1296db; transform: scale(0.85);
font-size: 20px; //display: flex;
} //align-items: center;
//i {
// color: #1296db;
// font-size: 20px;
//}
} }
} }
} }
......
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
'businessType': '', 'businessType': '',
'clientID': [ 'clientID': [
'3168' '3168'
], // 客户编码 ], // 客户编码
'endDate': _this.moreSearchInfo.time.end, // 结束时间 'endDate': _this.moreSearchInfo.time.end, // 结束时间
'startDate': _this.moreSearchInfo.time.start, // 开始时间 'startDate': _this.moreSearchInfo.time.start, // 开始时间
'goodsCode': '', // 商品代码 'goodsCode': '', // 商品代码
...@@ -185,6 +185,7 @@ export default { ...@@ -185,6 +185,7 @@ export default {
'supplierId': [ 'supplierId': [
] // 供应商(部门)编码 ] // 供应商(部门)编码
} }
// let data2 = {"clientID":["3168"],"goodsCode":"","goodsDesc":"","goodsId":"","goodsName":"","goodsSpec":"","isInoivce":"","isWeb":"","manufacturer":"","mdmClientCode":"","order":"","orderDate":"","orderId":"19958468","orderNo":"","orderStatusCode":"110","orderType":"","pageNum":1,"pageSize":10,"shippingAdress":"","sort":"","sourceDb":"SHYY","sourceOrderNo":"","sourceSystem":"","supplierId":["305"],"startDate":"","endDate":"","userSiteId":"1372122450039607296"}
getMyOrderList(data).then(rt => { getMyOrderList(data).then(rt => {
if (rt.data.code === '00000') { if (rt.data.code === '00000') {
if (_this.isRefreshing) { if (_this.isRefreshing) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment