支付单号,删除订单

This commit is contained in:
徐哼唧L
2023-12-08 10:35:24 +08:00
parent 3a2e92b82d
commit 2489d1a17b
2 changed files with 1221 additions and 1109 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
<template>
<div class="mod-config">
<div class="mod-config">
<!-- 订单详细更新 -->
<div class="orderType">
<span v-if="orderDetails.orderStatus == 0" class="item hightLight0">待付款</span>
<span v-if="orderDetails.orderStatus == 1" class="item hightLight1">待发货</span>
<span v-if="orderDetails.orderStatus == 2" class="item hightLight2">已发货</span>
<span v-if="orderDetails.orderStatus == 3" class="item hightLight3">已完成</span>
<span v-if="orderDetails.orderStatus == 3" class="item hightLight3">已完成</span>
</div>
<div>
<ul class="list">
@@ -13,8 +13,8 @@
<div class="liName">用户信息</div>
<li><span class="infoTitle">用户名</span><span>{{orderDetails.userInfo.userName !== null ? orderDetails.userInfo.userName : '暂无'}}</span></li>
<!-- <li><span class="infoTitle">用户ID</span><span>{{orderDetails.userId}}</span></li> -->
<li><span class="infoTitle">联系电话</span><span>{{orderDetails.userInfo.userPhone}}</span></li>
<li style="clear:both"></li>
<li><span class="infoTitle">联系电话</span><span>{{orderDetails.userInfo.userPhone}}</span></li>
<li style="clear:both"></li>
<!-- <li><span class="infoTitle"> </span><span>187898544875</span></li> -->
<!-- <li><span class="infoTitle"> </span><span>天津市天津市天津市天津市天津市天津市</span></li> -->
<li class="line"></li>
@@ -25,13 +25,13 @@
<span v-if="orderDetails.orderStatus == 0" class="hightLight">待付款</span>
<span v-if="orderDetails.orderStatus == 1" class="hightLight">待发货</span>
<span v-if="orderDetails.orderStatus == 2" class="hightLight">已发货</span>
<span v-if="orderDetails.orderStatus == 3" class="hightLight">已完成</span>
<span v-if="orderDetails.orderStatus == 3" class="hightLight">已完成</span>
<!-- <el-button v-if="orderDetails.orderStatus == 1" @click="godeliver" class="text_button" size="mini" type="text">去发货</el-button> -->
</li>
<!-- <li><span class="infoTitle">商品总数</span><span>{{orderDetails.}}</span></li> -->
<li><span class="infoTitle">订单金额</span><span>{{orderDetails.orderPrice}}</span></li>
<li><span class="infoTitle">交付邮费</span><span>{{orderDetails.shippingPrice}}</span></li>
<li v-if="orderDetails.orderStatus > 0"><span class="infoTitle" >实际支付金额</span><span>{{orderDetails.realPrice}}</span></li>
<li><span class="infoTitle">创建时间</span><span>{{orderDetails.createTime}}</span></li>
<li><span class="infoTitle" v-if="orderDetails.orderStatus > 0">支付时间</span><span>{{orderDetails.paymentDate}}</span></li>
@@ -43,7 +43,15 @@
<!-- <icon-svg name="zhifubao"></icon-svg> -->
<span>IOS内购</span>
</span>
</li>
</li>
<li style="width: 100%;" v-if="orderDetails.paymentMethod == 2">
<span class="infoTitle">商家订单号</span>
<span>{{orderDetails.outTradeNo}}</span>
</li>
<li style="width: 100%;" v-if="orderDetails.paymentMethod == 2">
<span class="infoTitle">支付宝订单号</span>
<span>{{orderDetails.tradeNo}}</span>
</li>
<li class="line"></li>
<div style="clear:both"></div>
<div v-if="orderDetails.orderStatus > 0">
@@ -53,22 +61,22 @@
<li><span class="infoTitle">积分抵扣</span><span>{{orderDetails.districtPrice}}</span></li>
<li class="line"></li>
</div>
<div style="clear:both"></div>
<div style="clear:both"></div>
<!-- 订单商品 -->
<div class="liName">商品信息</div>
<el-table :data="orderDetails.goodsList"
<el-table :data="orderDetails.goodsList"
style="width: 100%">
<el-table-column
<el-table-column
label="商品名"
width="280">
<template slot-scope="scope">
<div class="flexbox">
<img style="padding: 2px; border:1px solid #f1f1f1; margin-right: 5px;" :src="scope.row.productImage" width="30px" height="30px">
<div class="proname">{{ scope.row.productName}}
<div class="proname">{{ scope.row.productName}}
<i v-if="scope.row.books && scope.row.books.length > 0" @click.stop="seeBooks(scope.row.books)" class="el-icon-view" style="color:#409eff; cursor: pointer;"></i></div>
</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop="productPrice"
label="价格"
@@ -83,15 +91,15 @@
<div class="liName">物流信息 <a href="#" @click="changeAddressShow" v-if="orderDetails.orderStatus <= 1"><i class="el-icon-edit"></i>修改收货信息</a></div>
<div style="background:#f9f9f9; padding:5px; overflow:hidden; ">
<li><span class="infoTitle">收货人</span><span>{{orderDetails.consignee.consigneeName}}</span>&nbsp;&nbsp;&nbsp;<span>{{orderDetails.consignee.consigneeMobile}}</span></li>
<li><span class="infoTitle">收货地址</span><span>{{orderDetails.consignee.province}}-{{orderDetails.consignee.city}}-{{orderDetails.consignee.county}}-{{orderDetails.consignee.address}}</span></li>
<li><span class="infoTitle">收货地址</span><span>{{orderDetails.consignee.province}}-{{orderDetails.consignee.city}}-{{orderDetails.consignee.county}}-{{orderDetails.consignee.address}}</span></li>
</div>
</div>
<!-- <el-alert title="`该订单下共有 2 条物流信息`" type="info">
</el-alert> -->
<li class="flexbox deliverBox" style="width: 100%;" v-if="orderDetails.orderStatus > 0 && sheetList && sheetList.length > 0">
<el-row :gutter="20" style="flex-wrap:wrap; width: 100%;" class="flexbox">
<el-col :md="12" :lg="12" class="item" v-for="(item, index) in sheetList" :key="index">
<div class="deliver_heade">
<el-col :md="12" :lg="12" class="item" v-for="(item, index) in sheetList" :key="index">
<div class="deliver_heade">
<!-- <div><span class="infoTitle">物流公司</span><span>{{item.expressCompanyName}}</span></div> -->
<div>
<span class="infoTitle">快递包裹 {{index+1}} 运单号</span><span style="margin-right:10px">{{item.expressOrderSn}}</span>
@@ -101,45 +109,45 @@
<i class="el-icon-arrow-down myicon" ></i>显示包裹内商品</span>
<el-button type="primary" size="mini" plain @click="seeSheetDetails(item)" style="margin-left:10px">查看物流进度</el-button>
<!-- 包含的订单商品信息 -->
<div class="" v-if="showChange && item.showProduct" style="margin-top:15px; overflow:hidden; background:#f9f9f9; padding:10px;">
<ul class="sheetOrdersUl" style="overflow:hidden" >
<div class="" v-if="showChange && item.showProduct" style="margin-top:15px; overflow:hidden; background:#f9f9f9; padding:10px;">
<ul class="sheetOrdersUl" style="overflow:hidden" >
<li style="flex-wrap:wrap; margin-bottom:10px; width: 100%;">
<!-- <div style="width:100%" v-if="showChange">订单编号{{item.orderSn}}</div> -->
<div >
<div >
<div class="flexbox" v-for="item2 in item.products" :key="item2.productId" style="align-items:center; margin-bottom:10px">
<div class="img">
<img style="padding: 2px; border:1px solid #f1f1f1; margin-right: 5px;" :src="item2.productImages" width="60px" height="60px">
</div>
<div>
<div><span>{{item2.productName}} [ ×{{item2.quantity}} ]</span> </div>
<div style="color:#999">所属订单{{item2.orderSn}}</div>
<div><span>{{item2.productName}} [ ×{{item2.quantity}} ]</span> </div>
<div style="color:#999">所属订单{{item2.orderSn}}</div>
</div>
</div></div>
</div></div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</el-col>
</el-col>
</el-row>
</li>
<li class="line" style="margin:10px 0;"></li>
</ul>
</div>
<!-- 抽屉 -->
<el-dialog
<el-dialog
title="物流详情"
:visible.sync="tracesShow"
@close="drawerHandleClose">
<div class="deliver_info">
<div>运单信息{{currentSheet.expressCompanyName}} - {{currentSheet.expressOrderSn}}</div>
:visible.sync="tracesShow"
@close="drawerHandleClose">
<div class="deliver_info">
<div>运单信息{{currentSheet.expressCompanyName}} - {{currentSheet.expressOrderSn}}</div>
<div class="scroll" style="padding: 10px;" v-if="traces && traces.length > 0">
<el-timeline :reverse="reverse">
<el-timeline-item v-for="(activity, index2) in traces" :key="index2" :icon="activity.icon"
<el-timeline-item v-for="(activity, index2) in traces" :key="index2" :icon="activity.icon"
:timestamp="activity.acceptTime">
{{ activity.acceptStation }}
</el-timeline-item>
</el-timeline-item>
</el-timeline>
</div>
<div v-else class="noinfo">-暂无物流信息-</div>
@@ -159,7 +167,7 @@
<el-input v-model="addressForm.tel"></el-input>
</el-form-item>
<el-form-item label="收货地址:">
<!-- <el-input v-model="addressForm.address"></el-input> -->
<!-- <el-input v-model="addressForm.address"></el-input> -->
<!-- 省市区-->
<!-- -->
<el-select v-model="addressForm.provinceCode" placeholder="请选择省份" style="width:200px" @change="provinceChange">
@@ -170,7 +178,7 @@
:value="item.regionCode">
</el-option>
</el-select>
<el-select v-model="addressForm.cityCode" placeholder="请选择市" @change="cityChange">
<el-select v-model="addressForm.cityCode" placeholder="请选择市" @change="cityChange">
<el-option
v-for="item in cityEntity.cityList"
:key="item.regionCode"
@@ -188,9 +196,9 @@
</el-select>
</el-form-item>
<el-form-item label="详细地址:" prop="addressXX">
<el-input type="textarea" v-model="addressForm.addressXX"></el-input>
<el-input type="textarea" v-model="addressForm.addressXX"></el-input>
</el-form-item>
</el-form>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="changeAddHandleClose"> </el-button>
@@ -200,22 +208,22 @@
<el-dialog center
title="商品包含的书籍信息"
:visible.sync="booksShow"
width="500"
width="500"
:close="booksHandleClose">
<div>
<span>该商品共包含了 {{currBookLIst.length}} 个书籍</span>
<div>
<span>该商品共包含了 {{currBookLIst.length}} 个书籍</span>
<ul class="booksUl ">
<li class="flexbox" v-for="item in currBookLIst" :key="item.id">
<div class="img">
<img style="padding: 2px; border:1px solid #f1f1f1; margin-right: 5px;" :src="item.images" width="100px" height="100px">
</div>
<div>
<span>{{item.name}}[{{item.id}}]</span>
<span>{{item.name}}[{{item.id}}]</span>
</div>
</li>
</ul>
</div>
<span slot="footer" class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="booksHandleClose"> </el-button>
</span>
</el-dialog>
@@ -236,13 +244,13 @@ export default {
key: ''
},
traces:[], // 物流轨迹
tracesShow:false,
tracesShow:false,
currentSheet:{},
reverse: true,
activities: [ ],
deliverData: [], // 物流信息
setDeliverVisible: false,
dataListLoading: false,
dataListSelections: [],
@@ -275,17 +283,17 @@ export default {
},
addressFormRule:{
name: [
{ required: true, message: '请输入收货人信息', trigger: 'blur' }
{ required: true, message: '请输入收货人信息', trigger: 'blur' }
],
tel: [
{ required: true, message: '请输入收货联系电话信息', trigger: 'blur' }
{ required: true, message: '请输入收货联系电话信息', trigger: 'blur' }
],
county: [
{ required: true, message: '请选择收货地址', trigger: 'blur' }
{ required: true, message: '请选择收货地址', trigger: 'blur' }
],
addressXX: [
{ required: true, message: '请输入详细地址信息', trigger: 'blur' }
],
{ required: true, message: '请输入详细地址信息', trigger: 'blur' }
],
},
sheetList:[], // 面单列表
currBookLIst:[],
@@ -303,11 +311,11 @@ export default {
this.getData()
// this.getOrderSheetList()
},
methods: {
methods: {
showProducts(item,index){
this.showChange = false
this.sheetList[index].showProduct = !item.showProduct
this.showChange = true
this.sheetList[index].showProduct = !item.showProduct
this.showChange = true
// console.log(this.sheetList,'this.sheetList[index].showProduct')
},
seeBooks(arr){
@@ -333,14 +341,14 @@ export default {
text: '正在获取物流信息...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
});
// var mobileLeng = this.orderDetails.consignee.consigneeMobile.length
this.$http({
url: this.$http.adornUrl('/book/buyOrder/searchExpress'),
method: 'get',
params: this.$http.adornParams({
'expressOrderSn': item.expressOrderSn,
// 'expressCompanyCode': item.expressCompanyCode,
params: this.$http.adornParams({
'expressOrderSn': item.expressOrderSn,
// 'expressCompanyCode': item.expressCompanyCode,
// 'customerName': this.orderDetails.consignee.consigneeMobile.substring(mobileLeng-4, mobileLeng)
})
}).then(({ data }) => {
@@ -355,25 +363,25 @@ export default {
loading.close()
}
}
}).catch(({e}) => {
console.log(e,'e')
loading.close()
})
},
countyChange(e){
// console.log(e,'countyName')
this.countyEntity.countyList.find((val,index,arr)=>{
this.addressForm.countyName = val.countyName
},
countyChange(e){
// console.log(e,'countyName')
this.countyEntity.countyList.find((val,index,arr)=>{
this.addressForm.countyName = val.countyName
return val.regionCode == e
})
// console.log('this.addressForm.countyName', this.addressForm)
},
},
cityChange(e){
// console.log('修改了市',e)
this.addressForm.countyCode = null
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
this.addressForm.cityName = val.cityName
this.addressForm.countyCode = null
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
this.addressForm.cityName = val.cityName
return val.regionCode == e
})
// console.log(' this.addressForm.cityName', this.addressForm.cityName)
@@ -381,12 +389,12 @@ export default {
provinceChange(e){
// console.log('修改了省份',e)
this.addressForm.cityCode = null;
this.addressForm.countyCode = null
this.addressForm.countyCode = null
this.cityEntity = this.provinceEntity.find((val,index,arr)=>{
this.addressForm.provinceName = val.provName
return val.regionCode == e
})
// console.log('this.addressForm.provinceName',this.addressForm.provinceName)
// console.log('this.addressForm.provinceName',this.addressForm.provinceName)
},
changeAddHandleClose(){
this.changeAddVisible = false
@@ -413,8 +421,8 @@ export default {
this.$http({
url: this.$http.adornUrl('/api/province/getProvince'),
method: 'post',
// params: this.$http.adornParams({
// 'orderId': this.query.orderId
// params: this.$http.adornParams({
// 'orderId': this.query.orderId
// })
}).then(({ data }) => {
// console.log('获取地址三级列表', data)
@@ -433,25 +441,25 @@ export default {
this.cityEntity = this.provinceEntity.find((val,index,arr)=>{
return val.regionCode == this.addressForm.provinceCode
})
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
return val.regionCode == this.addressForm.cityCode
})
}
}).catch( e => {
console.log(e,'e')
})
})
this.changeAddVisible = true
// console.log('显示修改收货地址')
},
// 修改收货信息
changeAddress(){
changeAddress(){
this.$refs['addressFormRef'].validate((valid) => {
if (valid) {
if (valid) {
// console.log('修改收货地址')
this.$http({
url: this.$http.adornUrl('/book/buyOrder/modifyConsigneeAddress'),
method: 'post',
data: this.$http.adornData({
data: this.$http.adornData({
'orderSn': this.query.orderSn,
// 'province': this.addressForm.provinceName,
// 'city': this.addressForm.cityName,
@@ -462,7 +470,7 @@ export default {
"provinceCode": this.addressForm.provinceCode,
"cityCode": this.addressForm.cityCode,
"countyCode": this.addressForm.countyCode,
//'orderId': this.addressForm.orderId
//'orderId': this.addressForm.orderId
})
}).then(({ data }) => {
@@ -470,41 +478,41 @@ export default {
this.$message.success('修改地址成功!')
this.changeAddHandleClose()
this.getData()
}).catch( e => {
console.log(e,'e')
})
} else {
} else {
return false;
}
});
},
},
// 获取数据列表
getData() {
this.dataListLoading = true
this.dataListLoading = true
this.$http({
// url: this.$http.adornUrl(`/book/buyOrder/appGetOrderInfo/${this.query.ordertype}`),
url: this.$http.adornUrl(`/book/buyOrder/orderDetail`),
method: 'get',
params: this.$http.adornParams({
'orderSn': this.query.orderSn,
params: this.$http.adornParams({
'orderSn': this.query.orderSn,
})
}).then(({ data }) => {
if (data && data.code === 0) {
// console.log(data.result,'data.result')
this.orderDetails = data.result
this.orderDetails = data.result
data.result.expressOrders.forEach(element => {
element.showProduct = false
});
this.sheetList = data.result.expressOrders
});
this.sheetList = data.result.expressOrders
} else {
this.orderDetails = {}
return this.$message.error('商品详情获取失败,请重试')
}
this.dataListLoading = false
})
},
},
closeDeliverDialog(val) {
this.setDeliverVisible = false
this.getData()
@@ -526,7 +534,7 @@ export default {
.booksUl{ overflow: hidden; margin-top: 15px; padding-left: 0;
li{list-style: none; width: 50%; float: left; align-items: center; margin-bottom: 15px;}
}
.sheetOrdersUl{padding-left: 0;
.sheetOrdersUl{padding-left: 0;
li{width: 100%;}
}
.orderType{
@@ -541,7 +549,7 @@ export default {
background-color: #e6a23c;
}
.hightLight1{
background-color: #409eff;
background-color: #409eff;
}
.hightLight2{
background-color: #f56c6c;
@@ -554,7 +562,7 @@ export default {
color: #ddd;
text-align: center;
padding: 20px;
}
}
.scroll{margin-top: 15px; height: 300px;}
.deliverBox{
flex-wrap: wrap; justify-content: space-between;
@@ -612,7 +620,7 @@ ul.list {
content: "\e740";
}
.el-timeline-item:first-child {
.el-timeline-item:first-child {
.el-timeline-item__node {
background-color: rgb(11, 189, 135);
}