mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 02:36:39 +08:00
订单
This commit is contained in:
parent
38792ccbd6
commit
95614b9c66
@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
.usercontshow{
|
||||||
|
min-height: 70vh;
|
||||||
|
}
|
||||||
@media screen and (max-width:768px){
|
@media screen and (max-width:768px){
|
||||||
.online{
|
.online{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -271,6 +272,7 @@
|
|||||||
|
|
||||||
.rc-center {
|
.rc-center {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin-bottom: 40px;
|
||||||
.rc-usermain {
|
.rc-usermain {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -4,9 +4,32 @@ ul li ol li em strong i {
|
|||||||
}
|
}
|
||||||
//手机端
|
//手机端
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
|
.rc-margin-y--md{
|
||||||
|
width: 100%;
|
||||||
|
height: 80px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px -5px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin: 0;
|
||||||
|
.ts-standard-btn{
|
||||||
|
width: 155px;
|
||||||
|
height: 48px;
|
||||||
|
background: #E2001A;
|
||||||
|
border-radius: 30px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.rc-main {
|
.rc-main {
|
||||||
padding: 20px 17px;
|
|
||||||
margin-top: 90px;
|
|
||||||
.rc-userbottom{
|
.rc-userbottom{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -25,6 +48,7 @@ ul li ol li em strong i {
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #e1001a;
|
color: #e1001a;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
color: #666666;
|
color: #666666;
|
||||||
@ -269,7 +293,9 @@ ul li ol li em strong i {
|
|||||||
|
|
||||||
//pc端
|
//pc端
|
||||||
@media screen and (min-width: 768px) and (max-width: 1920px) {
|
@media screen and (min-width: 768px) and (max-width: 1920px) {
|
||||||
|
.rc-margin-y--md{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.rc-main {
|
.rc-main {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 90px;
|
margin-top: 90px;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="user-main">
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
|
<div class="rc-top"></div>
|
||||||
<div class="rc-main" v-for="(item,index) in goldmedal" :key="item.id" >
|
<div class="rc-main" v-for="(item,index) in goldmedal" :key="item.id" >
|
||||||
<div class="rc-receiving" >
|
<div class="rc-receiving" >
|
||||||
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
|
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
|
||||||
@ -53,11 +54,11 @@
|
|||||||
<span>数量:{{ item.pcs }}件</span>
|
<span>数量:{{ item.pcs }}件</span>
|
||||||
<i>¥{{ item.ecPrice }}</i>
|
<i>¥{{ item.ecPrice }}</i>
|
||||||
<div class="rc-bottom">
|
<div class="rc-bottom">
|
||||||
<span>联系客服申请售后</span>
|
<span @click="userpay()">{{customer}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-bottomm">
|
<div class="rc-bottomm">
|
||||||
<span>联系客服申请售后</span>
|
<span @click="userpay()">{{customer}}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="rc-userbottomm">
|
<!-- <div class="rc-userbottomm">
|
||||||
<i>¥{{ item.userprice }}</i>
|
<i>¥{{ item.userprice }}</i>
|
||||||
@ -109,8 +110,8 @@
|
|||||||
<li>
|
<li>
|
||||||
<span>快递单号:</span>
|
<span>快递单号:</span>
|
||||||
<div class="u-trackingnumber">
|
<div class="u-trackingnumber">
|
||||||
<!-- <i>{{ userlist.logisticsNumber }}
|
<i>{{ logisticsNumber }}
|
||||||
</i> -->
|
</i>
|
||||||
<!-- <img :src="information.catimage" alt=""> -->
|
<!-- <img :src="information.catimage" alt=""> -->
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@ -122,33 +123,49 @@
|
|||||||
<div class="rc-foo">
|
<div class="rc-foo">
|
||||||
<div style="padding-top:55px">
|
<div style="padding-top:55px">
|
||||||
<i>合计金额:</i>
|
<i>合计金额:</i>
|
||||||
<em>¥167.00</em>
|
<em>¥{{usersalesAmount}}</em>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-bottom:40px">
|
<div style="padding-bottom:40px">
|
||||||
<span>再次购买</span>
|
<span @click="onceagain">再次购买</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
|
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain">
|
||||||
|
{{payorsucess}}
|
||||||
|
</i>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<MyFooter></MyFooter>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import { userin} from "../../ajax/getData";
|
import { userin} from "../../ajax/getData";
|
||||||
import {selectaddress} from "../../ajax/getData";
|
import MyFooter from '~/components/rc-footer.vue'
|
||||||
|
import {selectaddress,canceldanhao,generateOrderWX} from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
goldmedal:[],
|
goldmedal:[],
|
||||||
|
userproductId:'',
|
||||||
|
userphone:'',
|
||||||
|
logisticsNumber:'',
|
||||||
|
customer:'',//联系客服或者取消订单
|
||||||
|
payorsucess:'', //立即支付或者再次购买,
|
||||||
addressstype: null,
|
addressstype: null,
|
||||||
|
addressUserName:'',
|
||||||
orderstatus: '',
|
orderstatus: '',
|
||||||
|
goldastates:'',
|
||||||
userisdelivery:'待收货',
|
userisdelivery:'待收货',
|
||||||
userdelivery: "派送中",
|
userdelivery: "派送中",
|
||||||
isshow:true,
|
isshow:true,
|
||||||
|
usersalesAmount:'',
|
||||||
leftico: require("../../assets/image/rc-left.png"),
|
leftico: require("../../assets/image/rc-left.png"),
|
||||||
orderNumber:'',
|
orderNumber:'',
|
||||||
usermessage:null,
|
usermessage:null,
|
||||||
@ -180,19 +197,106 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
async canceldanhao(orderNumber){
|
//取消订单
|
||||||
let data=await userin(orderNumber);
|
async canceldanhao(orderNumber) {
|
||||||
this.goldmedal=data;
|
let data = await canceldanhao(this.userphone,this.orderNumber);
|
||||||
console.log(this.goldmedal[0].orderDetailList);
|
if (data) {
|
||||||
|
this.$message({
|
||||||
for(let i =0;i<this.goldmedal[i].length;i++){
|
type: "warning",
|
||||||
console.log(this.goldmedal[i].orderDetailList);
|
message: "取消订单成功",
|
||||||
// this.useralllist.push(this.goldmedal[i].orderDetailList);
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/personal/useraddress",
|
||||||
|
query: {
|
||||||
|
stype: 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
userpay(){
|
||||||
|
console.log('---');
|
||||||
|
if(this.goldastates==0){
|
||||||
|
this.canceldanhao();
|
||||||
}
|
}
|
||||||
console.log(this.useralllist);
|
|
||||||
},
|
},
|
||||||
//查询人的所有地址
|
//订单支付和再次购买
|
||||||
async editaddress(user) {
|
onceagain(){
|
||||||
|
console.log(this.payorsucess);
|
||||||
|
if(this.payorsucess=='立即支付'){
|
||||||
|
console.log('----')
|
||||||
|
this.getwei();
|
||||||
|
}else{
|
||||||
|
this.$router.push({
|
||||||
|
path: "/productdetails/producted",
|
||||||
|
query: {
|
||||||
|
stype: 1,
|
||||||
|
productCode: this.userproductId
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log('不是立即支付');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
async orderquantity(orderNumber){
|
||||||
|
|
||||||
|
let data=await userin(orderNumber);
|
||||||
|
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.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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
//订单立即支付
|
||||||
|
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+ //姓名
|
||||||
|
" " +
|
||||||
|
this.userphone, //电话
|
||||||
|
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||||
|
};
|
||||||
|
this.$router.push({
|
||||||
|
path: "/personal/userpay",
|
||||||
|
query: {
|
||||||
|
userPayData:JSON.stringify(userPayData),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async editaddress(user) {
|
||||||
// user.data.id=844350;
|
// user.data.id=844350;
|
||||||
let data = await selectaddress(this.userid);
|
let data = await selectaddress(this.userid);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@ -205,6 +309,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.useraddress=list;
|
this.useraddress=list;
|
||||||
console.log(list);
|
console.log(list);
|
||||||
|
console.log(this.goldmedal);
|
||||||
// console.log(this.list);
|
// console.log(this.list);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -214,36 +319,44 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
||||||
this.userid = this.usermessage.data.id;
|
this.userid = this.usermessage.data.id;
|
||||||
console.log(this.userid);
|
this.userphone=this.usermessage.data.mobile;
|
||||||
this.editaddress(this.userid);
|
this.editaddress(this.userid);
|
||||||
this.addressstype = this.$route.query.stype;
|
this.addressstype = this.$route.query.stype;
|
||||||
this.orderNumber=this.$route.query.orderNumber;
|
this.orderNumber=this.$route.query.orderNumber;
|
||||||
this.canceldanhao(this.orderNumber)
|
this.orderquantity(this.orderNumber)
|
||||||
console.log(this.orderNumber);
|
|
||||||
if(this.addressstype==2){
|
if(this.addressstype==2){
|
||||||
this.orderstatus='您的订单已付款成功,请耐心等候,我们会尽快安排给您发货!';
|
this.orderstatus='您的订单已完成';
|
||||||
this.isshow=false;
|
this.isshow=false;
|
||||||
this.userisdelivery='待发货';
|
this.userisdelivery='待发货';
|
||||||
|
this.customer='联系客服申请售后'
|
||||||
|
this.payorsucess='再次购买'
|
||||||
console.log( this.orderstatus);
|
console.log( this.orderstatus);
|
||||||
}else if(this.addressstype==0){
|
}else if(this.addressstype==0){
|
||||||
this.orderstatus='您的订单尚未支付';
|
this.orderstatus='您的订单还未付款,请尽快付款!';
|
||||||
this.isshow=false;
|
this.isshow=false;
|
||||||
this.userisdelivery='待付款';
|
this.userisdelivery='待付款';
|
||||||
|
this.customer='取消订单'
|
||||||
|
this.payorsucess='立即支付'
|
||||||
}
|
}
|
||||||
else if(this.addressstype==1){
|
else if(this.addressstype==1){
|
||||||
this.orderstatus='您的订单发货,请您耐心等候!';
|
this.orderstatus='您的订单已发出,请耐心等候。';
|
||||||
this.isshow=true;
|
this.isshow=true;
|
||||||
this.userisdelivery='待收货';
|
this.userisdelivery='待收货';
|
||||||
|
this.customer='联系客服申请售后'
|
||||||
|
this.payorsucess='再次购买'
|
||||||
}
|
}
|
||||||
else if(this.addressstype==3){
|
else if(this.addressstype==3){
|
||||||
this.orderstatus='您的订单已取消!';
|
this.orderstatus='您的订单已取消!';
|
||||||
this.isshow=false;
|
this.isshow=false;
|
||||||
this.userisdelivery='已取消';
|
this.userisdelivery='已取消';
|
||||||
|
this.customer='联系客服申请售后'
|
||||||
|
this.payorsucess='再次购买'
|
||||||
}
|
}
|
||||||
console.log(this.addressstype);
|
console.log(this.addressstype);
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
|
MyFooter,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -41,11 +41,11 @@
|
|||||||
}}</em>
|
}}</em>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-usermain" @click="userfind(item)">
|
<div class="rc-usermain" >
|
||||||
<div class="rc-image">
|
<div class="rc-image">
|
||||||
<img :src="item.catimage" alt="" />
|
<img :src="item.catimage" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right" @click="usertiaozhuan(item)">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
<em>{{ item.usereat }}</em>
|
<em>{{ item.usereat }}</em>
|
||||||
<div class="rc-userright">
|
<div class="rc-userright">
|
||||||
@ -64,8 +64,28 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pc-bottom">
|
<div class="pc-bottom">
|
||||||
<span @click="usertwo()">再次购买</span>
|
<span @click="userpay(item, index)">{{
|
||||||
<span @click="userfind()">查看订单</span>
|
item.status == "0"
|
||||||
|
? "取消订单"
|
||||||
|
: item.status == "1"
|
||||||
|
? "确认收货"
|
||||||
|
: item.status == "2"
|
||||||
|
? "再次购买"
|
||||||
|
: item.status == "3"
|
||||||
|
? "再次购买"
|
||||||
|
: "异常订单"
|
||||||
|
}}</span>
|
||||||
|
<span @click="userfind(item)">{{
|
||||||
|
item.status == "0"
|
||||||
|
? "立即支付"
|
||||||
|
: item.status == "1"
|
||||||
|
? "查看订单"
|
||||||
|
: item.status == "2"
|
||||||
|
? "查看订单"
|
||||||
|
: item.status == "3"
|
||||||
|
? "查看订单"
|
||||||
|
: "异常订单"
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="online" style="display:none"></div>
|
<div class="online" style="display:none"></div>
|
||||||
@ -111,17 +131,27 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<MyFooter></MyFooter>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import { customerorders, userindent, canceldanhao } from "../../ajax/getData";
|
import MyFooter from '~/components/rc-footer.vue'
|
||||||
|
import { customerorders, userindent, canceldanhao,generateOrderWX } from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
|
userstype:'',
|
||||||
|
alllist:[],
|
||||||
|
obligation:[],//待付款
|
||||||
|
pending:[],//待发货
|
||||||
|
receiving :[],//待收货
|
||||||
|
allmessage:[],
|
||||||
useralllist: [],
|
useralllist: [],
|
||||||
|
usertitle:'',
|
||||||
|
useraliset:[],
|
||||||
userdata: [],
|
userdata: [],
|
||||||
buttontitle: "再次购买",
|
buttontitle: "再次购买",
|
||||||
discountlist: [
|
discountlist: [
|
||||||
@ -235,8 +265,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||||
this.userdata = user.data.mobile;
|
this.userdata = user.data.mobile;
|
||||||
console.log(this.userdata);
|
|
||||||
let stype = this.$route.query.stype;
|
let stype = this.$route.query.stype;
|
||||||
|
this.userstype=this.$route.query.stype;
|
||||||
|
console.log(stype);
|
||||||
if (user == "" || user == null) {
|
if (user == "" || user == null) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: "warning",
|
||||||
@ -249,25 +280,98 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
|
MyFooter
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async indet(mobile, stype) {
|
async indet(mobile, stype) {
|
||||||
let data = await userindent(mobile);
|
let data = await userindent(mobile);
|
||||||
this.activeIndex = stype;
|
this.activeIndex = stype;
|
||||||
this.goldmedal = data;
|
this.goldmedal = data;
|
||||||
// console.log(this.goldmedal);
|
|
||||||
let usermenulist = [];
|
|
||||||
let list = [];
|
|
||||||
for (let i = 0; i < this.goldmedal.length; i++) {
|
for (let i = 0; i < this.goldmedal.length; i++) {
|
||||||
this.useralllist.push(this.goldmedal[i].orderDetailList[0]);
|
this.useralllist.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
|
this.alllist.push(this.goldmedal[i].orderDetailList[0])
|
||||||
|
this.allmessage.push(this.goldmedal[i].orderDetailList[0])
|
||||||
|
if(this.goldmedal[i].status==0){
|
||||||
|
console.log("+++++++++++++");
|
||||||
|
this.obligation.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
|
|
||||||
|
}else if(this.goldmedal[i].status==1){
|
||||||
|
this.receiving.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
|
}
|
||||||
|
else if(this.goldmedal[i].status==4){
|
||||||
|
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (var i = 0; i < this.useralllist.length; i++) {
|
for (var i = 0; i < this.useralllist.length; i++) {
|
||||||
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
||||||
this.useralllist[i].status = this.goldmedal[i].status;
|
this.useralllist[i].status = this.goldmedal[i].status;
|
||||||
|
this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName;
|
||||||
|
this.useralllist[i].phoneNumber = this.goldmedal[i].phoneNumber;
|
||||||
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
|
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
|
||||||
this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length
|
this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length
|
||||||
}
|
}
|
||||||
console.log(this.useralllist);
|
console.log(this.obligation)
|
||||||
|
if(this.userstype==1){
|
||||||
|
this.useralllist=this.obligation
|
||||||
|
}else if(this.userstype==2){
|
||||||
|
this.useralllist=this.pending
|
||||||
|
}
|
||||||
|
else if(this.userstype==0){
|
||||||
|
this.useralllist=this.allmessage
|
||||||
|
}
|
||||||
|
else if(this.userstype==3){
|
||||||
|
this.useralllist=this.receiving
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
//订单立即支付
|
||||||
|
async getwei(item) {
|
||||||
|
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,
|
||||||
|
// },
|
||||||
|
// };
|
||||||
|
postData.push(oneProduct);
|
||||||
|
let res = await generateOrderWX(postData);
|
||||||
|
let userPayData = {
|
||||||
|
orderId: res.data,
|
||||||
|
userprice: item.salesAmount, //订单总价
|
||||||
|
userinformation:
|
||||||
|
item.addressUserName+ //姓名
|
||||||
|
" " +
|
||||||
|
item.phoneNumber, //电话
|
||||||
|
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||||
|
};
|
||||||
|
this.$router.push({
|
||||||
|
path: "/personal/userpay",
|
||||||
|
query: {
|
||||||
|
userPayData:JSON.stringify(userPayData),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
usertiaozhuan(item){
|
||||||
|
this.$router.push({
|
||||||
|
path: "/myorder/usertion",
|
||||||
|
query: {
|
||||||
|
stype: item.status,
|
||||||
|
orderNumber: item.orderNumber,
|
||||||
|
},
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async canceldanhao(orderNumber) {
|
async canceldanhao(orderNumber) {
|
||||||
@ -285,7 +389,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
userpay(item, index) {
|
userpay(item, index) {
|
||||||
console.log(item)
|
|
||||||
if (item.status == 0) {
|
if (item.status == 0) {
|
||||||
this.canceldanhao(item.orderNumber);
|
this.canceldanhao(item.orderNumber);
|
||||||
}
|
}
|
||||||
@ -307,20 +410,48 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectGoods(item, index) {
|
selectGoods(item, index) {
|
||||||
|
let list=[]
|
||||||
|
|
||||||
this.activeIndex = index;
|
this.activeIndex = index;
|
||||||
if (index == 1) {
|
if(item.title=='待付款'){
|
||||||
|
list=this.obligation
|
||||||
}
|
}
|
||||||
if (index == 2) {
|
else if(item.title=='待收货'){
|
||||||
|
list=this.receiving
|
||||||
|
|
||||||
|
}else if(item.title=='待发货'){
|
||||||
|
this.useralllist=this.pending
|
||||||
|
list=this.pending
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if(item.title=='全部'){
|
||||||
|
list=this.alllist
|
||||||
|
}
|
||||||
|
console.log(this.useralllist);
|
||||||
|
for (var i = 0; i < this.useralllist.length; i++) {
|
||||||
|
this.useralllist[i].orderNumber =this.goldmedal[i].orderNumber;
|
||||||
|
this.useralllist[i].status = this.goldmedal[i].status
|
||||||
|
this.useralllist[i].addressUserName =this.goldmedal[i].addressUserName;
|
||||||
|
this.useralllist[i].phoneNumber = this.goldmedal[i].phoneNumber;
|
||||||
|
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
|
||||||
|
this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length
|
||||||
|
}
|
||||||
|
this.useralllist=list
|
||||||
|
|
||||||
},
|
},
|
||||||
userfind(item) {
|
userfind(item) {
|
||||||
this.$router.push({
|
if(item.status==0){
|
||||||
|
this.getwei(item);
|
||||||
|
}else{
|
||||||
|
this.$router.push({
|
||||||
path: "/myorder/usertion",
|
path: "/myorder/usertion",
|
||||||
query: {
|
query: {
|
||||||
stype: item.status,
|
stype: item.status,
|
||||||
orderNumber: item.orderNumber,
|
orderNumber: item.orderNumber,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
usertwo() {
|
usertwo() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
|
Loading…
Reference in New Issue
Block a user