mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-21 18:06:52 +08:00
提交更改
This commit is contained in:
@@ -7,23 +7,19 @@
|
||||
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
|
||||
<span>{{orderstatus}}</span>
|
||||
</div>
|
||||
<div class="rc-border"></div>
|
||||
<div v-if="isshow">
|
||||
<div class="delivery" v-for="(userdata,index) in delivery" :key="index" >
|
||||
|
||||
<div class="delivery" v-if="isshow" >
|
||||
<div class="to-delivery">
|
||||
<span>{{ userdata.state }}</span>
|
||||
<i>{{ userdata.time }}</i>
|
||||
<span>{{ trackingstates}}</span>
|
||||
</div>
|
||||
<div class="bo-delivery">
|
||||
<span>{{ userdata.address }}</span>
|
||||
<span>{{ logisticsCompany }}</span>
|
||||
</div>
|
||||
<div class="viewdetails">
|
||||
<span>查看详情</span>
|
||||
<img :src="leftico" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="mypersonal"
|
||||
v-for="(datddress, index) in useraddress"
|
||||
@@ -37,11 +33,14 @@
|
||||
<span>{{ datddress.provinceName }}{{datddress.cityName}}{{datddress.districtName}}{{datddress.detailAddress}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div >
|
||||
<div class="rc-center">
|
||||
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index">
|
||||
<div class="rc-image">
|
||||
<img :src="item.catimage" alt="" />
|
||||
<img src="../../static/images/default.jpg" alt="" />
|
||||
</div>
|
||||
<div class="rc-right">
|
||||
<div class="rc-usercenter">
|
||||
@@ -52,7 +51,7 @@
|
||||
</div>
|
||||
<div class="rc-userbottom">
|
||||
<span>数量:{{ item.pcs }}件</span>
|
||||
<i>¥{{ item.ecPrice }}</i>
|
||||
<i>¥{{ 10 }}</i>
|
||||
<div class="rc-bottom">
|
||||
<span @click="userpay()">{{customer}}</span>
|
||||
</div>
|
||||
@@ -126,7 +125,7 @@
|
||||
<em>¥{{usersalesAmount}}</em>
|
||||
</div>
|
||||
<div style="padding-bottom:40px">
|
||||
<span @click="onceagain">再次购买</span>
|
||||
<span @click="onceagain()">再次购买</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -134,7 +133,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-full-width rc-margin-y--md">
|
||||
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain">
|
||||
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain()">
|
||||
{{payorsucess}}
|
||||
</i>
|
||||
|
||||
@@ -155,12 +154,14 @@ export default {
|
||||
return {
|
||||
goldmedal:[],
|
||||
userproductId:'',
|
||||
logisticsDate:'',
|
||||
userphone:'',
|
||||
logisticsNumber:'',
|
||||
customer:'',//联系客服或者取消订单
|
||||
payorsucess:'', //立即支付或者再次购买,
|
||||
addressstype: null,
|
||||
addressUserName:'',
|
||||
logisticsCompany:'',//物流公司
|
||||
orderstatus: '',
|
||||
goldastates:'',
|
||||
userisdelivery:'待收货',
|
||||
@@ -172,6 +173,7 @@ export default {
|
||||
userdata:"",
|
||||
usermessage:null,
|
||||
userid: null,
|
||||
trackingstates:'',//运输状态
|
||||
useralllist:[],
|
||||
delivery: [
|
||||
|
||||
@@ -240,6 +242,7 @@ userpay(){
|
||||
if(this.payorsucess=='立即支付'){
|
||||
console.log('----')
|
||||
this.getwei();
|
||||
|
||||
}else{
|
||||
this.$router.push({
|
||||
path: "/productdetails/producted",
|
||||
@@ -259,13 +262,27 @@ userpay(){
|
||||
if(data){
|
||||
this.goldmedal=data;
|
||||
for(let i=0;i<this.goldmedal.length;i++){
|
||||
// this.goldmedal[i].status=0
|
||||
this.goldastates=this.goldmedal[i].status;
|
||||
this.userproductId=this.goldmedal[i].orderDetailList[0].productId;
|
||||
this.logisticsNumber=this.goldmedal[i].orderDetailList[0].logisticsNumber;
|
||||
this.logisticsNumber=this.goldmedal[i].orderDetailList[0].logisticsNumber; //物流单号
|
||||
this.trackingstates=this.goldmedal[i].orderDetailList[0].status//运输状态
|
||||
|
||||
if( this.trackingstates==0){
|
||||
this.trackingstates='运输中'
|
||||
}else if(this.trackingstates==1){
|
||||
this.trackingstates='已签收'
|
||||
}
|
||||
else if(this.trackingstates==2){
|
||||
this.trackingstates='未发货'
|
||||
}
|
||||
console.log(this.goldmedal[i].orderDate);
|
||||
this.logisticsDate=new Date(this.goldmedal[i].orderDate.toLocaleString())//时间戳
|
||||
console.log(this.logisticsDate);
|
||||
this.logisticsCompany=this.goldmedal[i].orderDetailList[0].logisticsCompany; //物流公司
|
||||
this.orderNumber=this.goldmedal[i].orderNumber
|
||||
this.usersalesAmount=this.goldmedal[i].salesAmount;
|
||||
this.addressUserName=this.goldmedal[i].addressUserName;
|
||||
|
||||
}
|
||||
console.log(this.goldmedal,this.userproductId,this.usersalesAmount);
|
||||
}
|
||||
@@ -274,39 +291,30 @@ if(data){
|
||||
},
|
||||
//订单立即支付
|
||||
async getwei(user) {
|
||||
let postData = [];
|
||||
let oneProduct = {
|
||||
productName: item.productName,
|
||||
buyCount: item.buyCount,
|
||||
productId: item.productCode,
|
||||
payAmount: item.productPrice,
|
||||
memberId: item.memberId,
|
||||
phoneNumber: item.mobile,
|
||||
orderAddress: {
|
||||
addressPhoneNumber: orderAddress[0].recipientPhone,
|
||||
addressUserName: orderAddress[0].recipient,
|
||||
addressProvinceName: orderAddress[0].provinceName,
|
||||
addressCityName: orderAddress[0].cityName,
|
||||
addressCountyName: orderAddress[0].districtName,
|
||||
addressDetailInfo: orderAddress[0].detailAddress,
|
||||
},
|
||||
};
|
||||
let res = await generateOrderWX(postData);
|
||||
let userPayData = {
|
||||
orderId: res.data,
|
||||
userprice: this.usersalesAmount, //订单总价
|
||||
userinformation:
|
||||
this.addressUserName+ //姓名
|
||||
console.log(user);
|
||||
let userPayData = {
|
||||
userprice: this.usersalesAmount,
|
||||
userinformation:this.
|
||||
addressUserName +
|
||||
" " +
|
||||
this.userphone, //电话
|
||||
this.orderNumber,
|
||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
};
|
||||
this.$router.push({
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
query: {
|
||||
userPayData:JSON.stringify(userPayData),
|
||||
userData:this.orderNumber,
|
||||
stype:1,
|
||||
userPayData: JSON.stringify(userPayData),
|
||||
|
||||
},
|
||||
});
|
||||
// this.$router.push({
|
||||
// path: "/personal/userpay",
|
||||
// query: {
|
||||
|
||||
// },
|
||||
// });
|
||||
},
|
||||
async editaddress(user) {
|
||||
// user.data.id=844350;
|
||||
@@ -337,6 +345,7 @@ console.log(this.userdata);
|
||||
this.userphone=this.usermessage.data.mobile;
|
||||
this.editaddress(this.userid);
|
||||
this.addressstype = this.$route.query.stype;
|
||||
|
||||
this.orderNumber=this.$route.query.orderNumber;
|
||||
this.orderquantity(this.orderNumber)
|
||||
if(this.addressstype==2){
|
||||
|
||||
Reference in New Issue
Block a user