|
@@ -14,13 +14,17 @@
|
|
|
<ul class="order-list-wrap">
|
|
|
<li class="clearfix" v-for="item in orderList">
|
|
|
<div class="list-wrap-title clearfix">
|
|
|
- <div class="pull-left">{{item.buyername}} | {{item.buyentername}}</div>
|
|
|
+ <div class="pull-left" v-if="vendorType !== 'buyer'">{{item.buyername}} | {{item.buyentername}}</div>
|
|
|
+ <div class="pull-left" v-else>{{item.sellername}}</div>
|
|
|
<div class="pull-right">
|
|
|
<template v-if="vendorType === 'buyer'">
|
|
|
- <span class="red">待卖家发货</span>
|
|
|
- <!--<span class="red">待付款</span>-->
|
|
|
- <!--<span class="red">待收货</span>-->
|
|
|
- <!--<span class="red">交易关闭</span>-->
|
|
|
+ <span class="red" v-if="item.status === 505 || item.status === 406 || item.status === 407 || item.status === 403 || item.status === 408">待卖家发货</span>
|
|
|
+ <span class="red" v-else-if="item.status === 501 || item.status === 502 || item.status === 503 || item.status === 524">待付款</span>
|
|
|
+ <span class="red" v-else-if="item.status === 404">待收货</span>
|
|
|
+ <span class="red" v-else-if="item.status === 602 || item.status === 603 || item.status === 315 || item.status === 604 || item.status === 605 || item.status === 606">已取消</span>
|
|
|
+ <span class="red" v-else-if="item.status === 504">付款确认中</span>
|
|
|
+ <span class="red" v-else-if="item.status === 520 || item.status === 405">交易已完成</span>
|
|
|
+ <span class="red" v-else-if="item.status === 525">卖家请求取消</span>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<span class="red" v-if="item.status === 502 || item.status === 406">买家已付款</span>
|
|
@@ -36,7 +40,7 @@
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="list-wrap-content" v-for="details in item.purchaseDetails">
|
|
|
+ <div class="list-wrap-content" v-for="(details, index) in item.purchaseDetails" v-if="index < 3">
|
|
|
<div class="list-item clearfix">
|
|
|
<div class="list-wrap-content-brand clearfix pull-left">
|
|
|
<div class="name pull-left">品牌:</div>
|
|
@@ -70,24 +74,29 @@
|
|
|
<div class="list-all-info clearfix">
|
|
|
<div>共<span>{{item.batchQty}}</span>件商品 合计:
|
|
|
<span class="pri"><a class="red">¥</a>{{item.ensurePrice }}</span>
|
|
|
- <span class="lab">(含运费:<a class="red">¥</a><a class="red">{{item.fare || '0.00'}}</a>)</span></div>
|
|
|
+ <span class="lab">(含运费:<a class="red">¥</a><a class="red">{{item.fare | priceFiter}}</a>)</span></div>
|
|
|
</div>
|
|
|
<div class="list-btn clearfix">
|
|
|
<template v-if="vendorType === 'buyer'">
|
|
|
- <div class="pull-right sendGoods">确认收货</div>
|
|
|
- <!--<div class="pull-right sendGoods">确认付款</div>-->
|
|
|
- <!--<div class="pull-right">订单详情</div>-->
|
|
|
- <!--<div class="pull-right">取消订单</div>-->
|
|
|
- <!--<div class="pull-right">删除订单</div>-->
|
|
|
+ <div class="pull-right sendGoods" v-if="item.status === 404" @click="buyerGetGoods(item)">确认收货</div>
|
|
|
+ <div class="pull-right sendGoods" v-if="!item.installmentId && (item.status === 503 || item.status === 501)" @click="onMind('跳到上传水印地址')">确认付款</div>
|
|
|
+ <div class="pull-right" @click="lookOrderDetail(item)">订单详情</div>
|
|
|
+ <div class="pull-right sendGoods" @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" v-if="item.installmentId && (item.status === 503 || item.status === 504 || item.status === 524 ) && item.installment.status !== 505 && !item.againUpload">立即付款</div>
|
|
|
+ <div class="pull-right" @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" v-if="item.installmentId && (item.status === 503 || item.status === 504 || item.status === 524 ) && item.installment.status !== 505 && item.againUpload">重新上传</div>
|
|
|
+ <div class="pull-right" @click="cancelOrder(item)" v-if="item.status === 503 || item.status === 501 || item.status === 502">取消订单</div>
|
|
|
+ <div class="pull-right" @click="deleteOrder(item)" v-if="item.status === 602 || item.status === 603 || item.status === 315 || item.status === 604 || item.status === 605 || item.status === 606">
|
|
|
+ 删除订单</div>
|
|
|
+ <div class="pull-right" v-if="_getHoursFromNow(item.paytime) > sellsendGoodsTime - 1">提醒发货</div>
|
|
|
+ <div @click="lookLogisticsInfo(item)" class="pull-right" v-if="item.status === 404 || item.status === 520 || item.status === 405 || item.status === 521">查看物流</div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<div class="pull-right sendGoods" v-if="(item.status === 502 || item.status === 406) && !item.uasPurcid" @click="sendGoods(item)">点击发货</div>
|
|
|
- <div class="pull-right sendGoods" v-if="item.status === 404 && !item.uasPurcid">修改物流</div>
|
|
|
- <div class="pull-right">订单详情</div>
|
|
|
- <div class="pull-right" v-if="item.status === 602 || item.status === 603 || item.status === 315 || item.status === 604 || item.status === 605 || item.status === 606">
|
|
|
+ <div @click="changelogistics(item)" class="pull-right sendGoods" v-if="item.status === 404 && !item.uasPurcid">修改物流</div>
|
|
|
+ <div @click="lookOrderDetail(item)" class="pull-right">订单详情</div>
|
|
|
+ <div @click="deleteOrder(item)" class="pull-right" v-if="item.status === 602 || item.status === 603 || item.status === 315 || item.status === 604 || item.status === 605 || item.status === 606">
|
|
|
删除订单</div>
|
|
|
- <div class="pull-right" v-if="item.status === 404 || item.status === 520 || item.status === 405 || item.status === 503 || item.status === 514">查看物流</div>
|
|
|
- <div class="pull-right" v-if="item.installmentId && ((item.installment.status === 503 && item.Overtime) || item.installment.status === 504) && item.status !== 606 && item.status !== 525">
|
|
|
+ <div @click="lookLogisticsInfo(item)" class="pull-right" v-if="item.status === 404 || item.status === 520 || item.status === 405 || item.status === 503 || item.status === 514">查看物流</div>
|
|
|
+ <div @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" class="pull-right" v-if="item.installmentId && ((item.installment.status === 503 && item.Overtime) || item.installment.status === 504) && item.status !== 606 && item.status !== 525">
|
|
|
取消订单
|
|
|
</div>
|
|
|
<div @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" class="pull-right" v-if="installmentDetailPaid(item) && item.status !== 525 && item.status !== 606">
|
|
@@ -99,7 +108,7 @@
|
|
|
</ul>
|
|
|
<div v-if="getOrderList && false"></div>
|
|
|
<!-- 发货弹窗 -->
|
|
|
- <div class="mobile-modal" v-show="showSend">
|
|
|
+ <div class="mobile-modal" v-if="showSend">
|
|
|
<div class="sendGoods_Alert">
|
|
|
<div class="sendGoods_title">发货信息<span><i class="iconfont icon-guanbi1" @click="showSend = false"></i></span></div>
|
|
|
<div class="sendGoods_buyer">
|
|
@@ -118,25 +127,25 @@
|
|
|
{{sendGoodsInfo.sendType === 1301 ? '第三方配送' : (sendGoodsInfo.sendType === 1302 ? '卖家配送': '上门自提')}}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="sendGoods_list clearfix">
|
|
|
+ <div class="sendGoods_list clearfix" @click="choosePeisong()">
|
|
|
<div class="ti pull-left">配送商</div>
|
|
|
- <div class="pull-right">请选择<img src="/images/mobile/user/icon-right.png"/></div>
|
|
|
+ <div class="pull-right">{{peisongShowName ? peisongShowName : '请选择'}}<img src="/images/mobile/user/icon-right.png"/></div>
|
|
|
</div>
|
|
|
<div class="sendGoods_list clearfix">
|
|
|
<div class="ti pull-left">运单号</div>
|
|
|
- <div class="pull-right"><input type="number" placeholder="请输入运单号"/></div>
|
|
|
+ <div class="pull-right"><input type="number" placeholder="请输入运单号" v-model="sendGoodsInfo.kuaidinumber"/></div>
|
|
|
</div>
|
|
|
- <div class="sendGoods_Btn">
|
|
|
+ <div class="sendGoods_Btn" @click="saveSendGoods()">
|
|
|
确定
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- /end 发货弹窗 -->
|
|
|
<!-- 选择配送商 -->
|
|
|
- <div class="mobile-modal" v-show="peisongShow">
|
|
|
+ <div class="mobile-modal" v-if="peisongShow">
|
|
|
<div class="peisong_Alert">
|
|
|
- <div class="com-mobile-header">
|
|
|
- <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
|
|
|
+ <div class="com-mobile-header" >
|
|
|
+ <a @click="peisongShow = false"><i class="iconfont icon-fanhui"></i></a>
|
|
|
<p>选择配送商
|
|
|
</p>
|
|
|
</div>
|
|
@@ -147,14 +156,44 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
<ul>
|
|
|
- <li class="clearfix">
|
|
|
- <div class="name pull-left">11111</div>
|
|
|
- <div class="pull-right target" :class="peisonChooseItem === 0 ? 'active' : ''"></div>
|
|
|
+ <li class="clearfix" v-for="(item, index) in peisongList" @click="selectPeisong(index, item)">
|
|
|
+ <div class="name pull-left">{{item.companyName}}</div>
|
|
|
+ <div class="pull-right target" :class="peisongChooseIndex === index ? 'active' : ''"></div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
+ <div @click="savePeisongChoose()" class="sendGoods_Btn">保存</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- /end 选择配送商 -->
|
|
|
+ <!-- 删除订单 -->
|
|
|
+ <!-- 删除提示框 -->
|
|
|
+ <div class="deleteKuang" v-if="showDeleteAlert">
|
|
|
+ <div class="kuangContent">
|
|
|
+ <div class="title">删除信息</div>
|
|
|
+ <div class="titleinfo">是否删除此订单</div>
|
|
|
+ <!--<div class="info" v-show="isUploadpro">*存在已上架信息</div>-->
|
|
|
+ <div class="K_btn">
|
|
|
+ <div class="cancelBtn" @click="showDeleteAlert = false">取消</div>
|
|
|
+ <div class="answerBtn" @click="deleteFn()">确定</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- /end 删除订单 -->
|
|
|
+ <!-- 取消订单原因弹窗 -->
|
|
|
+ <div class="mobile-modal" v-if="showBuyerAlert">
|
|
|
+ <div class="cancelOrder">
|
|
|
+ <div class="sendGoods_title">取消订单<span><i class="iconfont icon-guanbi1" @click="showBuyerAlert = false"></i></span></div>
|
|
|
+ <div class="cancelOrder_title">请选择取消订单的原因(必选):</div>
|
|
|
+ <ul>
|
|
|
+ <li v-for="(item, index) in cancelList" class="clearfix" @click="ChooseOrderCancel(item, index)">
|
|
|
+ <div class="target pull-left" :class="index === OrderCancelIndex ? 'active' : ''"></div>
|
|
|
+ <div class="name pull-left">{{item}}</div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div @click="cancenFn()" class="sendGoods_Btn">确定</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- /end 取消订单原因弹窗 -->
|
|
|
<remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
|
|
|
<pull-up :fixId="'order-wrapper'"
|
|
|
:searchMore="isSearchSearchingMore"
|
|
@@ -167,12 +206,21 @@
|
|
|
<script>
|
|
|
import { EncryptionFilter } from '~utils/tools.js'
|
|
|
import { RemindBox, PullUp } from '~components/mobile/common'
|
|
|
+ import axios from '~plugins/axios'
|
|
|
export default {
|
|
|
name: 'order',
|
|
|
layout: 'mobile',
|
|
|
middleware: 'authenticated',
|
|
|
fetch({store, route}) {
|
|
|
return route.query.type === 'buyer' ? Promise.all([
|
|
|
+ store.dispatch('order/getBuyerOrderList', {
|
|
|
+ count: 5,
|
|
|
+ page: 1,
|
|
|
+ isRate: false,
|
|
|
+ currentPage: 1,
|
|
|
+ sorting: { creattime: 'DESC' },
|
|
|
+ status: '503-504-524-525-505-406-407-403-408-404-405-520-523-522-602-603-315-604-605-606'}
|
|
|
+ )
|
|
|
]) : Promise.all([
|
|
|
store.dispatch('order/getSellOrderList', {
|
|
|
count: 5,
|
|
@@ -189,16 +237,25 @@
|
|
|
page: 1,
|
|
|
collectResult: '',
|
|
|
timeoutCount: 0,
|
|
|
- activeType: '',
|
|
|
- orderList: [],
|
|
|
- $status: '',
|
|
|
- showSend: false,
|
|
|
- sendGoodsInfo: {
|
|
|
+ activeType: '', // 选择类型
|
|
|
+ orderList: [], // 订单列表
|
|
|
+ $status: '', // 传参状态
|
|
|
+ showSend: false, // 是否显示发货弹窗
|
|
|
+ sendGoodsInfo: { // 发货弹窗对象
|
|
|
area: {}
|
|
|
},
|
|
|
- peisongShow: true,
|
|
|
+ peisongShow: false, // 是否显示配送商选择弹窗
|
|
|
seekKeyword: '',
|
|
|
- peisonChooseItem: 0
|
|
|
+ peisongChooseIndex: '', // 配送商选择下标
|
|
|
+ peisongList: [], // 配送商数组
|
|
|
+ peisongShowName: '', // 选择完后的配送
|
|
|
+ showDeleteAlert: false, // 是否显示删除订单
|
|
|
+ sellsendGoodsTime: '', // 卖家发货时间
|
|
|
+ showBuyerAlert: false, // 买家取消订单原因
|
|
|
+ cancelList: ['我不想买了', '信息填写有误,重新购买', '先看看样品再下单', '付款遇到问题(如余额不足、超出限额等)', '买错了', '其他原因'], // 取消订单原因数组
|
|
|
+ $CancenOrderId: '', // 取消订单id
|
|
|
+ $Orderreason: '', // 取消订单原因
|
|
|
+ OrderCancelIndex: '' // 取消订单原因下标
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -209,10 +266,18 @@
|
|
|
return this.$route.query.type
|
|
|
},
|
|
|
getOrderList() {
|
|
|
- this.orderList = this.$store.state.order.order.orderList.data.content
|
|
|
+ this.orderList = this._initSetParams(this.$store.state.order.order.orderList.data.content)
|
|
|
return this.$store.state.order.order.orderList
|
|
|
}
|
|
|
},
|
|
|
+ async asyncData({route}) {
|
|
|
+ if (route.query.type === 'buyer') {
|
|
|
+ let { data } = await axios.get(`/trade/tradebasicproperties/get/1054`)
|
|
|
+ return {
|
|
|
+ sellsendGoodsTime: parseInt(data.info)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
getMoreSearch() {
|
|
|
this.page++
|
|
@@ -220,18 +285,55 @@
|
|
|
let params = {
|
|
|
count: 5,
|
|
|
page: this.page,
|
|
|
- sorting: { createtime: 'DESC' },
|
|
|
+ sorting: {createtime: 'DESC'},
|
|
|
status: this.$status,
|
|
|
- storeType: 'other'
|
|
|
+ storeType: 'other',
|
|
|
+ isRate: false,
|
|
|
+ currentPage: this.page
|
|
|
}
|
|
|
- this.$http.get('/trade/purchase/status/createtime', {params}).then(res => {
|
|
|
+ if (this.vendorType === 'buyer') {
|
|
|
+ params.sorting = { creattime: 'DESC' }
|
|
|
+ }
|
|
|
+ let url = this.vendorType !== 'buyer' ? '/trade/purchase/status/createtime' : '/trade/history/goods/list'
|
|
|
+ this.$http.get(url, {params}).then(res => {
|
|
|
this.isSearchSearchingMore = false
|
|
|
+ res.data.content = this._initSetParams(res.data.content)
|
|
|
this.orderList = [...this.orderList, ...res.data.content]
|
|
|
})
|
|
|
},
|
|
|
ChangeList(_tp) {
|
|
|
this.activeType = _tp
|
|
|
this.page = 1
|
|
|
+ if (this.$route.query.type !== 'buyer') {
|
|
|
+ // 卖家中心
|
|
|
+ this.sellOrderList(_tp)
|
|
|
+ } else {
|
|
|
+ // 买家中心
|
|
|
+ this.buyerOrderList(_tp)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 买家中心订单列表加载数据
|
|
|
+ buyerOrderList(_tp) {
|
|
|
+ let status = '503-504-524-525-505-406-407-403-408-404-405-520-523-522-602-603-315-604-605-606'
|
|
|
+ if (_tp === 'tobeconfirmed') {
|
|
|
+ status = '503-504-524-525'
|
|
|
+ } else if (_tp === 'comfirmed') {
|
|
|
+ status = '505-406-407-403-408'
|
|
|
+ } else if (_tp === 'inbound') {
|
|
|
+ status = '404'
|
|
|
+ }
|
|
|
+ this.$status = status
|
|
|
+ this.$store.dispatch('order/getBuyerOrderList', {
|
|
|
+ count: 5,
|
|
|
+ page: 1,
|
|
|
+ isRate: false,
|
|
|
+ currentPage: 1,
|
|
|
+ sorting: { creattime: 'DESC' },
|
|
|
+ status: status
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 卖家中心订单列表加载数据
|
|
|
+ sellOrderList(_tp) {
|
|
|
let status = ''
|
|
|
if (_tp === 'tobeconfirmed') {
|
|
|
status = '501-504-524-525'
|
|
@@ -240,13 +342,16 @@
|
|
|
} else if (_tp === 'inbound') {
|
|
|
status = '404-511'
|
|
|
}
|
|
|
+ this.peisongShowName = ''
|
|
|
+ this.sendGoodsInfo.kuaidinumber = ''
|
|
|
this.$status = status
|
|
|
this.$store.dispatch('order/getSellOrderList', {
|
|
|
count: 5,
|
|
|
page: 1,
|
|
|
- sorting: { createtime: 'DESC' },
|
|
|
+ sorting: {createtime: 'DESC'},
|
|
|
status: status,
|
|
|
- storeType: 'other'})
|
|
|
+ storeType: 'other'
|
|
|
+ })
|
|
|
},
|
|
|
// 是否为分期付款
|
|
|
installmentDetailPaid(item) {
|
|
@@ -261,18 +366,19 @@
|
|
|
},
|
|
|
// 发货
|
|
|
sendGoods(item) {
|
|
|
- let _id
|
|
|
+ this._id
|
|
|
+ this.sendGoodstype = 'add'
|
|
|
if (item.inid) {
|
|
|
- _id = EncryptionFilter(item.inid)
|
|
|
- this.$http.get(`/trade/inFpu/tobeshipped/${_id}`).then(res => {
|
|
|
+ this._id = EncryptionFilter(item.inid)
|
|
|
+ this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
|
|
|
this.sendGoodsInfo = res.data[0]
|
|
|
this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
|
|
|
this.showSend = true
|
|
|
})
|
|
|
} else {
|
|
|
this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
|
|
|
- _id = EncryptionFilter(res.inid)
|
|
|
- this.$http.get(`/trade/inFpu/tobeshipped/${_id}`).then(res => {
|
|
|
+ this._id = EncryptionFilter(res.inid)
|
|
|
+ this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
|
|
|
this.sendGoodsInfo = res.data[0]
|
|
|
this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
|
|
|
this.showSend = true
|
|
@@ -282,14 +388,266 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- onMind(str) {
|
|
|
- this.collectResult = str
|
|
|
- this.timeoutCount++
|
|
|
+ // 选择配送商
|
|
|
+ choosePeisong() {
|
|
|
+ if (this.peisongList.length > 0) {
|
|
|
+ this.peisongShow = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$http.get('/trade/distributor/selected').then(res => {
|
|
|
+ this.peisongList = res.data
|
|
|
+ this.peisongList.splice(0, 0, {
|
|
|
+ companyName: '请选择配送商'
|
|
|
+ })
|
|
|
+ this.peisongShow = true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 配送商列表选择
|
|
|
+ selectPeisong(index, item) {
|
|
|
+ this.peisongChooseIndex = index
|
|
|
+ this.peisongChooseItem = item
|
|
|
+ },
|
|
|
+ // 确定选择当前配送商
|
|
|
+ savePeisongChoose() {
|
|
|
+ this.peisongShow = false
|
|
|
+ this.peisongShowName = this.peisongChooseItem.companyName === '请选择配送商' ? '' : this.peisongChooseItem.companyName
|
|
|
+ },
|
|
|
+ // 发货最终步骤
|
|
|
+ saveSendGoods() {
|
|
|
+ // 发货
|
|
|
+ if (this.sendGoodstype === 'add') {
|
|
|
+ let patt = new RegExp('^[A-Za-z0-9]+$')
|
|
|
+ if (this.peisongShowName === '') {
|
|
|
+ this.onMind('请选择配送商')
|
|
|
+ } else if (!this.sendGoodsInfo.kuaidinumber) {
|
|
|
+ this.onMind('请填写物流单号')
|
|
|
+ } else if (!patt.test(this.sendGoodsInfo.kuaidinumber)) {
|
|
|
+ this.onMind('请输入正确的物流单号')
|
|
|
+ } else {
|
|
|
+ let sendInfo = this.getLogisticsInfo()
|
|
|
+ this.$http.post(`/trade/inFpu/save?id=${this.sendGoodsInfo.id}`, sendInfo).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.onMind('发货成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.ChangeList(this.activeType)
|
|
|
+ this.showSend = false
|
|
|
+ this.peisongChooseIndex = 0
|
|
|
+ this.peisongChooseItem = {companyName: '请选择配送商'}
|
|
|
+ }, 1500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (this.sendGoodstype === 'change') {
|
|
|
+ // 修改物流
|
|
|
+ let sendInfo = this.getLogisticsInfo('change')
|
|
|
+ let patt = new RegExp('^[A-Za-z0-9]+$')
|
|
|
+ if (!this.sendGoodsInfo.lgtId) {
|
|
|
+ // 如果快递公司 以及 快递编号为空
|
|
|
+ if (!this.peisongShowName && !this.sendGoodsInfo.kuaidinumber) {
|
|
|
+ this.showSend = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 如果快递公司为空
|
|
|
+ if (!this.peisongShowName && this.sendGoodsInfo.kuaidinumber) {
|
|
|
+ this.onMind('请选择配送商')
|
|
|
+ return
|
|
|
+ } else if (!this.sendGoodsInfo.kuaidinumber) {
|
|
|
+ this.onMind('请填写物流单号')
|
|
|
+ return
|
|
|
+ } else if (!patt.test(this.sendGoodsInfo.kuaidinumber)) {
|
|
|
+ this.onMind('请输入正确的物流单号')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 没有物流信息则添加物流信息
|
|
|
+ this.$http.post(`/trade/logistics/add?inid=${this.sendGoodsInfo.inid}`, sendInfo).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.onMind('物流信息保存成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.ChangeList(this.activeType)
|
|
|
+ this.peisongChooseIndex = 0
|
|
|
+ this.peisongChooseItem = {companyName: '请选择配送商'}
|
|
|
+ this.showSend = false
|
|
|
+ }, 1500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (this.ChangeInfoObj.number === this.sendGoodsInfo.kuaidinumber && this.peisongShowName === this.ChangeInfoObj.peisongShowName) {
|
|
|
+ this.showSend = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.peisongShowName !== '' || this.sendGoodsInfo.kuaidinumber !== '') {
|
|
|
+ // 如果用户未做任何信息修改
|
|
|
+ if (!this.peisongShowName) {
|
|
|
+ this.onMind('请选择配送商')
|
|
|
+ return
|
|
|
+ } else if (!this.sendGoodsInfo.kuaidinumber) {
|
|
|
+ this.onMind('请填写物流单号')
|
|
|
+ return
|
|
|
+ } else if (!patt.test(this.sendGoodsInfo.kuaidinumber)) {
|
|
|
+ this.onMind('请输入正确的物流单号')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$http.post(`/trade/logistics/${this.sendGoodsInfo.lgtId}?invoiceFuid=${this.sendGoodsInfo.inid}`, sendInfo).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.onMind('修改物流信息成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.ChangeList(this.activeType)
|
|
|
+ this.peisongChooseIndex = 0
|
|
|
+ this.peisongChooseItem = {companyName: '请选择配送商'}
|
|
|
+ this.showSend = false
|
|
|
+ }, 1500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (this.sendGoodsInfo.sendType !== 1301) {
|
|
|
+ // 如果清空了物流信息
|
|
|
+ this.$http.put(`/trade/logistics/clear?inid=${this.sendGoodsInfo.inid}`).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.onMind('修改物流信息成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.ChangeList(this.activeType)
|
|
|
+ this.peisongChooseIndex = 0
|
|
|
+ this.peisongChooseItem = {companyName: '请选择配送商'}
|
|
|
+ this.showSend = false
|
|
|
+ }, 1500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 买家取消订单
|
|
|
+ cancelOrder(item) {
|
|
|
+ this.$CancenOrderId = item.orderid
|
|
|
+ this.showBuyerAlert = true
|
|
|
+ },
|
|
|
+ // 买家取消订单原因选择
|
|
|
+ ChooseOrderCancel(item, index) {
|
|
|
+ this.OrderCancelIndex = index
|
|
|
+ this.$Orderreason = item
|
|
|
+ },
|
|
|
+ // 取消订单确认事件
|
|
|
+ cancenFn() {
|
|
|
+ if (!this.$Orderreason || this.$Orderreason === '') {
|
|
|
+ this.onMind('请选择取消订单的原因')
|
|
|
+ } else {
|
|
|
+ let reason = {
|
|
|
+ reason: this.$Orderreason
|
|
|
+ }
|
|
|
+ this.$http.put(`/trade/order/simpleinfo/ones/${this.$CancenOrderId}/release`, reason).then(res => {
|
|
|
+ this.onMind('取消订单成功,等待买家确认')
|
|
|
+ this.$Orderreason = ''
|
|
|
+ this.ChangeList(this.activeType)
|
|
|
+ this.showBuyerAlert = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 删除订单弹窗
|
|
|
+ deleteOrder(item) {
|
|
|
+ this.sendGoodsInfo = this.baseUtils.deepCopy(item)
|
|
|
+ this.showDeleteAlert = true
|
|
|
+ },
|
|
|
+ // 删除订单确定按钮
|
|
|
+ deleteFn() {
|
|
|
+ if (this.$route.query.type !== 'buyer') {
|
|
|
+ this.$http.post(`/trade/purchase/used/${this.sendGoodsInfo.purchaseid}`).then(res => {
|
|
|
+ this.ChangeList(this.activeType)
|
|
|
+ this.showDeleteAlert = false
|
|
|
+ this.onMind('删除成功')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$http.post(`/trade/order/used/${this.sendGoodsInfo.orderid}`).then(res => {
|
|
|
+ this.ChangeList(this.activeType)
|
|
|
+ this.showDeleteAlert = false
|
|
|
+ this.onMind('删除成功')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 修改物流
|
|
|
+ changelogistics(item) {
|
|
|
+ this.sendGoodstype = 'change'
|
|
|
+ this.peisongShowName = ''
|
|
|
+ this.sendGoodsInfo.kuaidinumber = ''
|
|
|
+ let _obj = this.baseUtils.deepCopy(item)
|
|
|
+ if (!item.lgtId) {
|
|
|
+ // 如果没有订单编号
|
|
|
+ this.sendGoodsInfo = _obj
|
|
|
+ this.sendGoodsInfo.area = JSON.parse(_obj.jsonSdAddress)
|
|
|
+ this.showSend = true
|
|
|
+ this.ChangeInfoObj = {
|
|
|
+ number: '',
|
|
|
+ peisongShowName: ''
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$http.get(`/trade/logistics/${_obj.lgtId}`).then(res => {
|
|
|
+ this.sendGoodsInfo = _obj
|
|
|
+ this.sendGoodsInfo.area = JSON.parse(_obj.jsonSdAddress)
|
|
|
+ this.sendGoodsInfo.kuaidinumber = res.data.number
|
|
|
+ this.peisongShowName = res.data.companyName
|
|
|
+ this.ChangeInfoObj = {
|
|
|
+ number: res.data.number,
|
|
|
+ peisongShowName: res.data.companyName
|
|
|
+ }
|
|
|
+ this.showSend = true
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 搜索
|
|
|
searchSeek() {
|
|
|
this.seekKeyword
|
|
|
},
|
|
|
+ // 获取物流提交信息
|
|
|
+ getLogisticsInfo(_type) {
|
|
|
+ let sendInfo = {}
|
|
|
+ sendInfo.sendType = this.sendGoodsInfo.sendType
|
|
|
+ sendInfo.jsonSdAddress = this.sendGoodsInfo.jsonSpAddress
|
|
|
+ sendInfo.logisticsInfo = {}
|
|
|
+ if (this.peisongShowName) {
|
|
|
+ sendInfo.logisticsInfo.companyName = this.peisongShowName
|
|
|
+ }
|
|
|
+ if (this.sendGoodsInfo.kuaidinumber) {
|
|
|
+ sendInfo.logisticsInfo.number = this.sendGoodsInfo.kuaidinumber
|
|
|
+ }
|
|
|
+ return _type ? sendInfo.logisticsInfo : sendInfo
|
|
|
+ },
|
|
|
+ // 查看物流信息
|
|
|
+ lookLogisticsInfo(item) {
|
|
|
+ this.$router.push(`/mobile/order/logistics?uuid=${EncryptionFilter(item.purchaseid)}`)
|
|
|
+ },
|
|
|
+ // 查看订单详情
|
|
|
+ lookOrderDetail(item) {},
|
|
|
+ // 买家确认收货
|
|
|
+ buyerGetGoods(item) {
|
|
|
+ this.$http.put(`/trade/order/simpleinfo/ones/${item.id}?_status=ensureaccept`).then(res => {
|
|
|
+ this.onMind('确认收货成功')
|
|
|
+ this.ChangeList(this.activeType)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 买卖家中心字段同步化
|
|
|
+ _initSetParams(_obj) {
|
|
|
+ _obj = this.baseUtils.deepCopy(_obj)
|
|
|
+ for (let i = 0; i < _obj.length; i++) {
|
|
|
+ if (!_obj[i].purchaseDetails) {
|
|
|
+ _obj[i].purchaseDetails = _obj[i].orderDetails
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return _obj
|
|
|
+ },
|
|
|
+ // 传入时间,计算距离现在的时间是多少小时了
|
|
|
+ _getHoursFromNow(time) {
|
|
|
+ if (!time) {
|
|
|
+ return 0
|
|
|
+ }
|
|
|
+ let newTime = new Date()
|
|
|
+ let msec = newTime.getTime() - time
|
|
|
+ let hours = parseInt(parseInt(msec) / (1000 * 60 * 60))
|
|
|
+ return hours
|
|
|
+ },
|
|
|
+ onMind(str) {
|
|
|
+ this.collectResult = str
|
|
|
+ this.timeoutCount++
|
|
|
+ },
|
|
|
blur: function() {
|
|
|
setTimeout(() => {
|
|
|
this.$store.dispatch('mobile/SetInputGetFocus', false)
|
|
@@ -301,6 +659,12 @@
|
|
|
}, 300)
|
|
|
}
|
|
|
},
|
|
|
+ filters: {
|
|
|
+ priceFiter(val) {
|
|
|
+ if (!val) return '0.00'
|
|
|
+ return val.toFixed(2)
|
|
|
+ }
|
|
|
+ },
|
|
|
components: {
|
|
|
RemindBox,
|
|
|
PullUp
|
|
@@ -539,6 +903,8 @@
|
|
|
top: 0;
|
|
|
z-index: 11111;
|
|
|
ul {
|
|
|
+ height: calc(100vh - 1.2rem - 1.7rem);
|
|
|
+ overflow-y: scroll;
|
|
|
li {
|
|
|
line-height: 1rem;
|
|
|
background: #fff;
|
|
@@ -546,6 +912,9 @@
|
|
|
font-size: 0.28rem;
|
|
|
color: #333;
|
|
|
border-bottom: 1px solid #e0e1e2;
|
|
|
+ div.name {
|
|
|
+ @include overFlowHidden();
|
|
|
+ }
|
|
|
div.target {
|
|
|
width: 0.36rem;
|
|
|
height: 0.36rem;
|
|
@@ -556,10 +925,231 @@
|
|
|
&.active {
|
|
|
background-image: url('/images/order/getChoose_icon.png');
|
|
|
background-size: 100% 100%;
|
|
|
+ border: 0px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .sendGoods_Btn {
|
|
|
+ @include lineHeight(1rem);
|
|
|
+ text-align: center;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 0.36rem;
|
|
|
+ background: #3f84f6;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .deleteKuang {
|
|
|
+ position: fixed;
|
|
|
+ background: rgba(0,0,0,0.5);
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ z-index: 9999;
|
|
|
+ .kuangContent {
|
|
|
+ border-radius: 5px;
|
|
|
+ background: #fff;
|
|
|
+ width: 5rem;
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 50%;
|
|
|
+ transform: translate3d(-50%, -50%, 0);
|
|
|
+ overflow: hidden;
|
|
|
+ .titleinfo {
|
|
|
+ font-size: .3rem;
|
|
|
+ color: #666;
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 0.5rem;
|
|
|
+ margin-bottom: 0.1rem;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ background: #5078cb;
|
|
|
+ height: .7rem;
|
|
|
+ line-height: .7rem;
|
|
|
+ font-size: .3rem;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .info {
|
|
|
+ color: #f00;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .K_btn {
|
|
|
+ margin-top: 0.4rem;
|
|
|
+ line-height: 0.7rem;
|
|
|
+ height: 0.7rem;
|
|
|
+ &::after{
|
|
|
+ clear: both;
|
|
|
+ display: block;
|
|
|
+ content: ' ';
|
|
|
+ visibility: hidden;
|
|
|
+ zoom: 1;
|
|
|
+ }
|
|
|
+ div {
|
|
|
+ float: left;
|
|
|
+ width: 50%;
|
|
|
+ font-size: 0.3rem;
|
|
|
+ text-align: center;
|
|
|
+ &.cancelBtn {
|
|
|
+ background: #b4b5b9;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ &.answerBtn {
|
|
|
+ background: #5078cb;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ i {
|
|
|
+ font-size: .6rem;
|
|
|
+ position: absolute;
|
|
|
+ right: -0.3rem;
|
|
|
+ top: -0.35rem;
|
|
|
+ color: #fff;
|
|
|
+ &::after{
|
|
|
+ position: absolute;
|
|
|
+ top: -0.1rem;
|
|
|
+ left: -0.1rem;
|
|
|
+ right: -0.1rem;
|
|
|
+ bottom: -0.1rem;
|
|
|
+ content: ' '
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ background: #3f84f6;
|
|
|
+ height: 0.7rem;
|
|
|
+ line-height: 0.7rem;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 0.3rem;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .Kuang {
|
|
|
+ max-height: 10rem;
|
|
|
+ width: 6.7rem;
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 50%;
|
|
|
+ transform: translate3d(-50%, -50%, 0);
|
|
|
+ background: #ececec;
|
|
|
+ border-radius: 5px;
|
|
|
+ }
|
|
|
+ .content {
|
|
|
+ overflow-y: scroll;
|
|
|
+ max-height: 9.3rem;
|
|
|
+ .infob {
|
|
|
+ background: #e3edfd;
|
|
|
+ padding: 0.2rem;
|
|
|
+ .info {
|
|
|
+ color: #333;
|
|
|
+ font-size: 0.3rem;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ margin-bottom: 0.18rem;
|
|
|
+ .name {
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ div {
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .content_sq {
|
|
|
+ width: 6.4rem;
|
|
|
+ margin: 0.1rem auto;
|
|
|
+ background: #fff;
|
|
|
+ padding: 0.2rem 0rem;
|
|
|
+ .list {
|
|
|
+ margin-bottom: 0.18rem;
|
|
|
+ }
|
|
|
+ .fl {
|
|
|
+ width: 3.2rem;
|
|
|
+ }
|
|
|
+ .table {
|
|
|
+ width: 4.2rem;
|
|
|
+ margin-top: -0.1rem;
|
|
|
+ }
|
|
|
+ .labelinfo {
|
|
|
+ background-image: url('/images/mobile/@2x/labelTop.png');
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ width: 6.29rem;
|
|
|
+ height: 0.64rem;
|
|
|
+ line-height: 0.64rem;
|
|
|
+ background-size: 100%;
|
|
|
+ margin-top: 0rem;
|
|
|
+ margin-right: 0rem;
|
|
|
+ background-color: rgba(0, 0, 0, 0);
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .cancelOrder {
|
|
|
+ background: #fff;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ border-top-left-radius: 5px;
|
|
|
+ border-top-right-radius: 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ .sendGoods_title {
|
|
|
+ color: #333;
|
|
|
+ font-size: 0.42rem;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 1rem;
|
|
|
+ font-weight: 600;
|
|
|
+ position: relative;
|
|
|
+ i {
|
|
|
+ position: absolute;
|
|
|
+ font-size: 16px;
|
|
|
+ right: 0.2rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .cancelOrder_title {
|
|
|
+ font-size: 0.36rem;
|
|
|
+ color: #333;
|
|
|
+ border-bottom: 1px solid #d9d9d9;
|
|
|
+ font-weight: bold;
|
|
|
+ padding: 0 0.2rem;
|
|
|
+ line-height: 0.6rem;
|
|
|
+ }
|
|
|
+ ul {
|
|
|
+ li {
|
|
|
+ line-height: 1rem;
|
|
|
+ background: #fff;
|
|
|
+ padding: 0 0.2rem;
|
|
|
+ font-size: 0.32rem;
|
|
|
+ color: #333;
|
|
|
+ border-bottom: 1px solid #d9d9d9;
|
|
|
+ div.name {
|
|
|
+ @include overFlowHidden();
|
|
|
+ }
|
|
|
+ div.target {
|
|
|
+ margin-right: 0.2rem;
|
|
|
+ width: 0.36rem;
|
|
|
+ height: 0.36rem;
|
|
|
+ border-radius: 50%;
|
|
|
+ overflow: hidden;
|
|
|
+ border: 1px solid #a4a4a4;
|
|
|
+ margin-top: 0.3rem;
|
|
|
+ &.active {
|
|
|
+ background-image: url('/images/order/getChoose_icon.png');
|
|
|
+ background-size: 100% 100%;
|
|
|
+ border: 0px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .sendGoods_Btn {
|
|
|
+ @include lineHeight(1rem);
|
|
|
+ text-align: center;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 0.36rem;
|
|
|
+ background: #3f84f6;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|