mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 18:26:38 +08:00
Merge branch 'sit-Carl' of https://gitee.com/carl_Ming_1/smart-admin into sit-Carl-V3
This commit is contained in:
commit
217afb123f
@ -91,7 +91,6 @@ export const monitorOrderNotify = (OrderNumber) => {
|
||||
* 删除购物车
|
||||
*/
|
||||
export const deleteCart = ( productCode) => {
|
||||
debugger;
|
||||
var data = {
|
||||
productCode
|
||||
}
|
||||
|
@ -4,18 +4,13 @@ body {
|
||||
line-height: 1.5;
|
||||
color: #666;
|
||||
}
|
||||
div[data-js-modal-menu] {
|
||||
display:none;
|
||||
}
|
||||
aside div[data-js-modal-menu] {
|
||||
display:block;
|
||||
}
|
||||
.el-message-box .el-button--primary{
|
||||
background-color: #e1001a !important;
|
||||
color:#fff;
|
||||
border:unset;
|
||||
}
|
||||
|
||||
|
||||
.rc-menu--xs .rc-screen-reader{
|
||||
left:28%;
|
||||
}
|
||||
@ -154,6 +149,9 @@ picture {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.useruantity{
|
||||
margin: 1rem 1.25rem;
|
||||
}
|
||||
|
||||
.ts-remove {
|
||||
text-decoration: line-through;
|
||||
@ -330,7 +328,7 @@ picture {
|
||||
height: auto;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 40%;
|
||||
top: 56vh;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
|
||||
border-radius: .25rem;
|
||||
@ -532,7 +530,12 @@ picture {
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
div[data-js-modal-menu] {
|
||||
display:none;
|
||||
}
|
||||
aside div[data-js-modal-menu] {
|
||||
display:block;
|
||||
}
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
@ -451,7 +451,6 @@
|
||||
}
|
||||
span {
|
||||
font-size: 45px;
|
||||
font-weight: bold;
|
||||
}
|
||||
strong {
|
||||
font-style: normal;
|
||||
|
@ -341,6 +341,7 @@ border-radius: 100px;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
margin-top:1rem;
|
||||
}
|
||||
.ts-scrollable{
|
||||
margin-top: 1rem;
|
||||
|
@ -236,6 +236,7 @@ color: #333333;
|
||||
font-style: normal;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
span {
|
||||
font-size: 14px;
|
||||
|
||||
@ -251,6 +252,10 @@ color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ts-right-arr {
|
||||
line-height:1rem;
|
||||
height:1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,8 +2,110 @@ ul li ol li em strong i {
|
||||
list-style: none;
|
||||
font-style: normal;
|
||||
}
|
||||
.rc-main{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
//手机端
|
||||
@media screen and (max-width: 768px) {
|
||||
.online{
|
||||
margin: 0;
|
||||
&.bold{
|
||||
height: 0.5rem;
|
||||
}
|
||||
}
|
||||
// 订单状态
|
||||
.rc-receiving {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// margin: 1rem 1.25rem;
|
||||
em {
|
||||
font-style: normal;
|
||||
color: #e1001a;
|
||||
font-size: 1.375rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
span {
|
||||
color: #666666;
|
||||
font-size: 0.875rem;
|
||||
display: block;
|
||||
margin-left: 1.125rem;
|
||||
width: 62%;
|
||||
margin-top: 0.5rem;
|
||||
|
||||
}
|
||||
}
|
||||
//快递列表
|
||||
.delivery {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 1rem 1.25rem;
|
||||
.to-delivery {
|
||||
img{
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
object-fit: contain;
|
||||
}
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-style: normal;
|
||||
span {
|
||||
display: block;
|
||||
margin-left: 0.18rem;
|
||||
color: #333333;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
i {
|
||||
font-style: normal;
|
||||
margin-left: 0.5rem;
|
||||
display: block;
|
||||
color: #999999;
|
||||
font-size: 0.75rem;
|
||||
margin-top: 0.31rem;
|
||||
}
|
||||
}
|
||||
.bo-delivery {
|
||||
span {
|
||||
font-size: 0.87rem;
|
||||
color: #666666;
|
||||
display: block;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
//地址列表
|
||||
.mypersonal{
|
||||
.my-delivery {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-style: normal;
|
||||
span {
|
||||
display: block;
|
||||
font-size: 0.87rem;
|
||||
color: #333333;
|
||||
}
|
||||
i {
|
||||
font-style: normal;
|
||||
display: block;
|
||||
font-size: 0.87rem;
|
||||
color: #333333;
|
||||
margin-left: .5rem;
|
||||
}
|
||||
}
|
||||
.per-delivery {
|
||||
span {
|
||||
font-size:0.875rem;
|
||||
color: #666666;
|
||||
display: block;
|
||||
margin-top: 0.43rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.rc-margin-y--md{
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
@ -39,83 +141,7 @@ margin-right: 20px;
|
||||
.rc-foo{
|
||||
display: none;
|
||||
}
|
||||
.rc-receiving {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
em {
|
||||
font-style: normal;
|
||||
color: #e1001a;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
}
|
||||
span {
|
||||
color: #666666;
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
margin-left: 18px;
|
||||
width: 62%;
|
||||
|
||||
}
|
||||
}
|
||||
.delivery {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 80px;
|
||||
.to-delivery {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-style: normal;
|
||||
span {
|
||||
display: block;
|
||||
margin-left: 3px;
|
||||
}
|
||||
i {
|
||||
font-style: normal;
|
||||
margin-left: 8px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.bo-delivery {
|
||||
span {
|
||||
font-size: 14px;
|
||||
|
||||
color: #666666;
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mypersonal {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 80px;
|
||||
.my-delivery {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-style: normal;
|
||||
span {
|
||||
display: block;
|
||||
margin-left: 3px;
|
||||
}
|
||||
i {
|
||||
font-style: normal;
|
||||
margin-left: 8px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.per-delivery {
|
||||
span {
|
||||
font-size: 14px;
|
||||
|
||||
color: #666666;
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.rc-usermain {
|
||||
display: flex;
|
||||
@ -207,14 +233,16 @@ margin-right: 20px;
|
||||
|
||||
.rc-merchandise {
|
||||
width: 100%;
|
||||
margin-top: 32px;
|
||||
margin-top: 24px;
|
||||
padding-right: 0.7rem;
|
||||
padding-left: 0.7rem;
|
||||
|
||||
ul {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
line-height: 26px;
|
||||
line-height: 30px;
|
||||
i {
|
||||
font-style: normal;
|
||||
color: #666666;
|
||||
@ -240,10 +268,15 @@ margin-right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.useruantity{
|
||||
padding-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.rc-payment{
|
||||
padding-right: 0.7rem;
|
||||
padding-left: 0.7rem;
|
||||
width: 100%;
|
||||
margin-top: 32px;
|
||||
.u-trackingnumber{
|
||||
@ -293,7 +326,49 @@ margin-right: 20px;
|
||||
|
||||
|
||||
//pc端
|
||||
@media screen and (min-width: 768px) {
|
||||
@media screen and (min-width: 768px){
|
||||
|
||||
//快递列表
|
||||
.delivery {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 1rem 1.25rem;
|
||||
.to-delivery {
|
||||
margin-top: 20px;
|
||||
img{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
object-fit: contain;
|
||||
}
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-style: normal;
|
||||
span {
|
||||
display: block;
|
||||
margin-left: 16px;
|
||||
color: #333333;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
}
|
||||
i {
|
||||
font-style: normal;
|
||||
margin-left: 0.5rem;
|
||||
display: block;
|
||||
color: #999999;
|
||||
font-size: 0.75rem;
|
||||
margin-top: 0.31rem;
|
||||
}
|
||||
}
|
||||
.bo-delivery {
|
||||
margin-top: 16px;
|
||||
span {
|
||||
font-size: 0.87rem;
|
||||
color: #666666;
|
||||
display: block;
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.rc-margin-y--md{
|
||||
display: none;
|
||||
}
|
||||
@ -329,7 +404,6 @@ margin-right: 20px;
|
||||
.delivery {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 140px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.viewdetails{
|
||||
|
@ -2,45 +2,65 @@
|
||||
<div class="user-main">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<div class="rc-main" v-for="(item,index) in goldmedal" :key="item.id" >
|
||||
<div class="rc-receiving" >
|
||||
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
|
||||
<span>{{orderstatus}}</span>
|
||||
<div class="rc-main" v-for="(item, index) in goldmedal" :key="item.id">
|
||||
<div class="online bold">
|
||||
</div>
|
||||
<div class="rc-receiving useruantity">
|
||||
<em>{{
|
||||
item.status == "0"
|
||||
? "待付款"
|
||||
: item.status == "1"
|
||||
? "待收货"
|
||||
: item.status == "2"
|
||||
? "已完成"
|
||||
: item.status == "3"
|
||||
? "已取消"
|
||||
: "异常订单"
|
||||
}}</em>
|
||||
<span>{{ orderstatus }}</span>
|
||||
</div>
|
||||
<div class="online bold">
|
||||
</div>
|
||||
<div class="delivery useruantity" v-if="isshow">
|
||||
<div class="to-delivery">
|
||||
<img src="../../static/images/delivery.png" alt="">
|
||||
<span>{{ trackingstates }}</span>
|
||||
<!-- <i>2021-1-21</i> -->
|
||||
</div>
|
||||
<div class="delivery" v-if="isshow" >
|
||||
<div class="to-delivery">
|
||||
<span>{{ trackingstates}}</span>
|
||||
</div>
|
||||
<div class="bo-delivery">
|
||||
<span>{{ logisticsCompany }}</span>
|
||||
</div>
|
||||
<div class="viewdetails">
|
||||
<span>查看详情</span>
|
||||
<img :src="leftico" alt="" />
|
||||
</div>
|
||||
<div class="bo-delivery">
|
||||
<!-- <span> 广州天河—刘某某【15124617917】正在派送中</span> -->
|
||||
<!-- {{ logisticsCompany }} -->
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="mypersonal"
|
||||
v-for="(datddress, index) in useraddress"
|
||||
:key="datddress.id"
|
||||
>
|
||||
<div class="my-delivery">
|
||||
<span>{{ datddress.recipient }}</span>
|
||||
<i>{{ datddress.recipientPhone }}</i>
|
||||
</div>
|
||||
<div class="per-delivery">
|
||||
<span>{{ datddress.provinceName }}{{datddress.cityName}}{{datddress.districtName}}{{datddress.detailAddress}}</span>
|
||||
</div>
|
||||
<div class="viewdetails">
|
||||
<span>查看详情</span>
|
||||
<img :src="leftico" alt="" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div >
|
||||
</div>
|
||||
<div class="online bold">
|
||||
</div>
|
||||
<div class="mypersonal useruantity">
|
||||
<div class="my-delivery">
|
||||
<span>{{ item.addressUserName }}</span>
|
||||
<i>{{ item.addressPhoneNumber }}</i>
|
||||
</div>
|
||||
<div class="per-delivery">
|
||||
<span
|
||||
>{{ item.addressProvinceName }}{{ item.addressCityName
|
||||
}}{{ item.addressCountyName }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="online bold"></div>
|
||||
<div>
|
||||
<div class="rc-center">
|
||||
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index">
|
||||
<div
|
||||
class="rc-usermain useruantity"
|
||||
v-for="(userlist, index) in item.orderDetailList"
|
||||
:key="index"
|
||||
|
||||
>
|
||||
<div class="rc-image">
|
||||
<img :src= userlist.picFile alt="" />
|
||||
<img :src="userlist.picFile" alt="" />
|
||||
</div>
|
||||
<div class="rc-right">
|
||||
<div class="rc-usercenter">
|
||||
@ -52,13 +72,13 @@
|
||||
<div class="rc-userbottom">
|
||||
<span>数量:{{ userlist.pcs }}件</span>
|
||||
<i>¥{{ userlist.ecPrice }}</i>
|
||||
<div class="rc-bottom">
|
||||
<span @click="userpay()">{{customer}}</span>
|
||||
</div>
|
||||
<div class="rc-bottom">
|
||||
<span @click="userpay()">{{ customer }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-bottomm">
|
||||
<span @click="userpay()">{{ customer }}</span>
|
||||
</div>
|
||||
<div class="rc-bottomm">
|
||||
<span @click="userpay()">{{customer}}</span>
|
||||
</div>
|
||||
<!-- <div class="rc-userbottomm">
|
||||
<i>¥{{ item.userprice }}</i>
|
||||
<span>{{ item.orderstype }}</span>
|
||||
@ -66,8 +86,10 @@
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="online bold"></div>
|
||||
</div>
|
||||
<div class="rc-merchandise">
|
||||
<div class="rc-merchandise ">
|
||||
<div class="rc-merchandise ">
|
||||
<ul>
|
||||
<li>
|
||||
<span>商品总价:</span>
|
||||
@ -87,8 +109,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="rc-payment">
|
||||
<div class="rc-payment">
|
||||
<div class="rc-payment">
|
||||
<ul>
|
||||
<li>
|
||||
<span>订单编号::</span>
|
||||
@ -109,272 +133,259 @@
|
||||
<li>
|
||||
<span>快递单号:</span>
|
||||
<div class="u-trackingnumber">
|
||||
<i>{{ logisticsNumber }}
|
||||
</i>
|
||||
<!-- <img :src="information.catimage" alt=""> -->
|
||||
</div>
|
||||
<i>{{ logisticsNumber }} </i>
|
||||
<!-- <img :src="information.catimage" alt=""> -->
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rc-foot">
|
||||
<div class="rc-foo">
|
||||
<div style="padding-top:55px">
|
||||
<div style="padding-top: 55px">
|
||||
<i>合计金额:</i>
|
||||
<em>¥{{usersalesAmount}}</em>
|
||||
</div>
|
||||
<div style="padding-bottom:40px">
|
||||
<span @click="onceagain()">再次购买</span>
|
||||
</div>
|
||||
<em>¥{{ usersalesAmount }}</em>
|
||||
</div>
|
||||
<div style="padding-bottom: 40px; cursor: pointer">
|
||||
<span @click="onceagain(item)"> {{ payorsucess }}</span>
|
||||
</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>
|
||||
</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>
|
||||
|
||||
</div>
|
||||
|
||||
<MyFooter></MyFooter>
|
||||
<MyFooter></MyFooter>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Myheader from "~/components/header.vue";
|
||||
import { mapMutations } from "vuex";
|
||||
import { userin} from "../../ajax/getData";
|
||||
import MyFooter from '~/components/rc-footer.vue';
|
||||
import Vue from 'vue';
|
||||
import { userin } from "../../ajax/getData";
|
||||
import MyFooter from "~/components/rc-footer.vue";
|
||||
import Vue from "vue";
|
||||
let vm = new Vue();
|
||||
import formatConversion from '../../static/js/date'
|
||||
import {selectaddress,canceldanhao,generateOrderWX} from "../../ajax/getData";
|
||||
import formatConversion from "../../static/js/date";
|
||||
import {
|
||||
selectaddress,
|
||||
canceldanhao,
|
||||
generateOrderWX,
|
||||
} from "../../ajax/getData";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
goldmedal:[],
|
||||
userproductId:'',
|
||||
logisticsDate:'',
|
||||
userphone:'',
|
||||
logisticsNumber:'',
|
||||
customer:'',//联系客服或者取消订单
|
||||
payorsucess:'', //立即支付或者再次购买,
|
||||
goldmedal: [],
|
||||
userproductId: "",
|
||||
logisticsDate: "",
|
||||
addressPhoneNumber: "",
|
||||
userphone: "",
|
||||
logisticsNumber: "",
|
||||
customer: "", //联系客服或者取消订单
|
||||
payorsucess: "", //立即支付或者再次购买,
|
||||
addressstype: null,
|
||||
addressUserName:'',
|
||||
logisticsCompany:'',//物流公司
|
||||
orderstatus: '',
|
||||
goldastates:'',
|
||||
userisdelivery:'待收货',
|
||||
addressUserName: "",
|
||||
logisticsCompany: "", //物流公司
|
||||
orderstatus: "",
|
||||
goldastates: "",
|
||||
|
||||
userisdelivery: "待收货",
|
||||
userdelivery: "派送中",
|
||||
isshow:true,
|
||||
usersalesAmount:'',
|
||||
isshow: true,
|
||||
usersalesAmount: "",
|
||||
leftico: require("../../assets/image/rc-left.png"),
|
||||
orderNumber:'',
|
||||
userdata:"",
|
||||
usermessage:null,
|
||||
userid: null,
|
||||
trackingstates:'',//运输状态
|
||||
useralllist:[],
|
||||
delivery: [
|
||||
|
||||
],
|
||||
orderNumber: "",
|
||||
userdata: "",
|
||||
usermessage: null,
|
||||
userid: null,
|
||||
trackingstates: "", //运输状态
|
||||
useralllist: [],
|
||||
delivery: [],
|
||||
|
||||
useraddress: [
|
||||
|
||||
],
|
||||
useraddress: [],
|
||||
|
||||
goldmedal: [
|
||||
|
||||
],
|
||||
shopprice: {
|
||||
|
||||
},
|
||||
goldmedal: [],
|
||||
shopprice: {},
|
||||
information: {
|
||||
reference: "1111111111111111",
|
||||
ordertime: "2012-12-01 11:20:00",
|
||||
paymentmethod: "微信支付",
|
||||
distribution: "快递",
|
||||
trackingnumber: "11111111111111",
|
||||
catimage: require("../../assets/image/rc-left.png"),
|
||||
catimage: require("../../assets/image/rc-left.png"),
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
refreshDesktopNav:function(){
|
||||
RCDL.navigation.currentState=null;
|
||||
RCDL.navigation.rebuild();
|
||||
},
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
refreshDesktopNav: function () {
|
||||
RCDL.navigation.currentState = null;
|
||||
RCDL.navigation.rebuild();
|
||||
},
|
||||
//取消订单
|
||||
async canceldanhao(orderNumber) {
|
||||
let data = await canceldanhao(this.userphone,this.orderNumber);
|
||||
async canceldanhao(orderNumber) {
|
||||
let data = await canceldanhao(this.userphone, this.orderNumber);
|
||||
if (data) {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: "取消订单成功",
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress",
|
||||
query: {
|
||||
stype: 1,
|
||||
},
|
||||
});
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress",
|
||||
query: {
|
||||
stype: 1,
|
||||
},
|
||||
});
|
||||
}, 500);
|
||||
|
||||
}
|
||||
},
|
||||
userpay(){
|
||||
console.log('---');
|
||||
if(this.goldastates==0){
|
||||
this.canceldanhao();
|
||||
}
|
||||
else if( this.customer='联系客服申请售后'){
|
||||
var option = {
|
||||
customer: {id: '', name: '', email: '', mobile: '', memberId: this.userdata.data.id}
|
||||
}
|
||||
dis_livchat(option);
|
||||
}
|
||||
},
|
||||
//订单支付和再次购买
|
||||
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;
|
||||
console.log(this.goldmedal);
|
||||
for(let i=0;i<this.goldmedal.length;i++){
|
||||
this.goldastates=this.goldmedal[i].status;
|
||||
this.userproductId=this.goldmedal[i].orderDetailList[0].productId;
|
||||
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='未发货'
|
||||
}
|
||||
this.logisticsDate=this.formatConversion(this.goldmedal[i].orderDate)//时间戳
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
//订单立即支付
|
||||
async getwei(user) {
|
||||
console.log(user);
|
||||
let userPayData = {
|
||||
userprice: this.usersalesAmount,
|
||||
orderId:this.orderNumber,
|
||||
userinformation:this.useraddress[0].recipient +
|
||||
" "+this.userphone
|
||||
userpay() {
|
||||
console.log("---");
|
||||
if (this.goldastates == 0) {
|
||||
this.canceldanhao();
|
||||
} else if ((this.customer = "联系客服申请售后")) {
|
||||
var option = {
|
||||
customer: {
|
||||
id: "",
|
||||
name: "",
|
||||
email: "",
|
||||
mobile: "",
|
||||
memberId: this.userdata.data.id,
|
||||
},
|
||||
};
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
dis_livchat(option);
|
||||
}
|
||||
},
|
||||
//订单支付和再次购买
|
||||
onceagain(item) {
|
||||
console.log(this.payorsucess);
|
||||
if (this.payorsucess == "立即支付") {
|
||||
console.log("----");
|
||||
this.getwei(item);
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: "/productdetails/producted",
|
||||
query: {
|
||||
userData:this.orderNumber,
|
||||
stype:1,
|
||||
userPayData: JSON.stringify(userPayData),
|
||||
|
||||
stype: 1,
|
||||
productCode: this.userproductId,
|
||||
},
|
||||
});
|
||||
// this.$router.push({
|
||||
// path: "/personal/userpay",
|
||||
// query: {
|
||||
|
||||
// },
|
||||
// });
|
||||
console.log("不是立即支付");
|
||||
}
|
||||
},
|
||||
async editaddress(user) {
|
||||
// user.data.id=844350;
|
||||
let data = await selectaddress(this.userid);
|
||||
let list=[]
|
||||
this.useraddress=data.data;
|
||||
for(let i =0;i<this.useraddress.length;i++){
|
||||
if(this.useraddress[i].isDefault==true){
|
||||
list.push(this.useraddress[i]);
|
||||
async orderquantity(orderNumber) {
|
||||
let data = await userin(orderNumber);
|
||||
if (data) {
|
||||
this.goldmedal = data;
|
||||
console.log(this.goldmedal);
|
||||
for (let i = 0; i < this.goldmedal.length; i++) {
|
||||
this.goldastates = this.goldmedal[i].status;
|
||||
|
||||
this.userproductId = this.goldmedal[i].orderDetailList[0].productId;
|
||||
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 = "未发货";
|
||||
}
|
||||
this.logisticsDate = this.formatConversion(
|
||||
this.goldmedal[i].orderDate
|
||||
); //时间戳
|
||||
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;
|
||||
this.addressPhoneNumber = this.goldmedal[i].addressPhoneNumber;
|
||||
}
|
||||
this.useraddress=list;
|
||||
console.log( this.useraddress[0].recipient);
|
||||
|
||||
// console.log(this.list);
|
||||
console.log(this.goldmedal, this.userproductId, this.usersalesAmount);
|
||||
}
|
||||
},
|
||||
//订单立即支付
|
||||
async getwei(user) {
|
||||
console.log(user);
|
||||
let userPayData = {
|
||||
userprice: this.usersalesAmount,
|
||||
orderId: this.orderNumber,
|
||||
userinformation: this.addressUserName + " " + this.addressPhoneNumber,
|
||||
};
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
query: {
|
||||
userData: this.orderNumber,
|
||||
stype: 1,
|
||||
userPayData: JSON.stringify(userPayData),
|
||||
},
|
||||
});
|
||||
},
|
||||
async editaddress(user) {
|
||||
// user.data.id=844350;
|
||||
let data = await selectaddress(this.userid);
|
||||
let list = [];
|
||||
this.useraddress = data.data;
|
||||
for (let i = 0; i < this.useraddress.length; i++) {
|
||||
if (this.useraddress[i].isDefault == true) {
|
||||
list.push(this.useraddress[i]);
|
||||
}
|
||||
}
|
||||
this.useraddress = list;
|
||||
console.log(this.useraddress[0].recipient);
|
||||
|
||||
|
||||
|
||||
// console.log(this.list);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.checkIsLogin();
|
||||
this.userdata=this.$store.state.userInfo;
|
||||
console.log(this.userdata);
|
||||
this.userdata = this.$store.state.userInfo;
|
||||
console.log(this.userdata);
|
||||
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
||||
this.userid = this.usermessage.data.id;
|
||||
this.userphone=this.usermessage.data.mobile;
|
||||
this.editaddress(this.userid);
|
||||
this.userid = this.usermessage.data.id;
|
||||
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){
|
||||
this.orderstatus='您的订单已完成';
|
||||
this.isshow=false;
|
||||
this.userisdelivery='待发货';
|
||||
this.customer='联系客服申请售后'
|
||||
this.payorsucess='再次购买'
|
||||
console.log( this.orderstatus);
|
||||
}else if(this.addressstype==0){
|
||||
this.orderstatus='您的订单还未付款,请尽快付款!';
|
||||
this.isshow=false;
|
||||
this.userisdelivery='待付款';
|
||||
this.customer='取消订单'
|
||||
this.payorsucess='立即支付'
|
||||
}
|
||||
else if(this.addressstype==1){
|
||||
this.orderstatus='您的订单已发出,请耐心等候。';
|
||||
this.isshow=true;
|
||||
this.userisdelivery='待收货';
|
||||
this.customer='联系客服申请售后'
|
||||
this.payorsucess='再次购买'
|
||||
}
|
||||
else if(this.addressstype==3){
|
||||
this.orderstatus='您的订单已取消!';
|
||||
this.isshow=false;
|
||||
this.userisdelivery='已取消';
|
||||
this.customer='联系客服申请售后'
|
||||
this.payorsucess='再次购买'
|
||||
this.orderNumber = this.$route.query.orderNumber;
|
||||
this.orderquantity(this.orderNumber);
|
||||
if (this.addressstype == 2) {
|
||||
this.orderstatus = "您的订单已完成";
|
||||
this.isshow = false;
|
||||
this.userisdelivery = "待发货";
|
||||
this.customer = "联系客服申请售后";
|
||||
this.payorsucess = "再次购买";
|
||||
console.log(this.orderstatus);
|
||||
} else if (this.addressstype == 0) {
|
||||
this.orderstatus = "您的订单还未付款,请尽快付款!";
|
||||
this.isshow = false;
|
||||
this.userisdelivery = "待付款";
|
||||
this.customer = "取消订单";
|
||||
this.payorsucess = "立即支付";
|
||||
} else if (this.addressstype == 1) {
|
||||
this.orderstatus = "您的订单已发出,请耐心等候。";
|
||||
this.isshow = true;
|
||||
this.userisdelivery = "待收货";
|
||||
this.customer = "联系客服申请售后";
|
||||
this.payorsucess = "再次购买";
|
||||
} else if (this.addressstype == 3) {
|
||||
this.orderstatus = "您的订单已取消!";
|
||||
this.isshow = false;
|
||||
this.userisdelivery = "已取消";
|
||||
this.customer = "联系客服申请售后";
|
||||
this.payorsucess = "再次购买";
|
||||
}
|
||||
console.log(this.addressstype);
|
||||
},
|
||||
@ -388,5 +399,4 @@ console.log(this.userdata);
|
||||
<style lang="less" scoped>
|
||||
@import url("../../assets/css/global.less");
|
||||
@import url("../../assets/css/usertion.less");
|
||||
|
||||
</style>
|
@ -34,7 +34,7 @@
|
||||
¥
|
||||
</i>
|
||||
<span>
|
||||
{{item.couponTypeId=='4'?parseInt(((item.discount)*10))+'折':item.couponAmount}}
|
||||
{{ item.couponAmount?item.couponAmount:(parseInt((item.discount)*10)+'折') }}
|
||||
</span>
|
||||
</div>
|
||||
<strong>{{ item.couponName }}</strong>
|
||||
@ -48,7 +48,7 @@
|
||||
<span>{{item.validFrom}}至</span>
|
||||
<em>{{item.validTo}}</em>
|
||||
</div>
|
||||
<nuxt-link :to="`/productdetails/productlist`">
|
||||
<nuxt-link :to="`/productdetails/productlist`" v-if="activeIndex==0">
|
||||
<div class="ts-standard-btn">
|
||||
立即使用
|
||||
</div>
|
||||
@ -231,6 +231,5 @@ import Myheader from "~/components/header.vue";
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 手机端
|
||||
@import url("../../assets/css/global.less");
|
||||
@import url("../../assets/css/discount.less");
|
||||
</style>
|
@ -8,7 +8,16 @@ ul li ol li em strong i {
|
||||
}
|
||||
.settlement {
|
||||
}
|
||||
|
||||
.rc-merchandise {
|
||||
li {
|
||||
align-items: baseline;
|
||||
}
|
||||
}
|
||||
.discountInfo {
|
||||
i,em {
|
||||
font-size:.875rem;
|
||||
}
|
||||
}
|
||||
.rc-discount {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@ -38,7 +47,7 @@ ul li ol li em strong i {
|
||||
font-size: 12px;
|
||||
}
|
||||
span {
|
||||
font-size: 26px;
|
||||
font-size: 45px;
|
||||
}
|
||||
strong {
|
||||
font-style: normal;
|
||||
@ -417,8 +426,8 @@ ul li ol li em strong i {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
flex-direction: column;
|
||||
align-items: self-end;
|
||||
|
||||
align-items: flex-end;
|
||||
text-align: right;
|
||||
i {
|
||||
font-style: normal;
|
||||
color: #333333;
|
||||
@ -430,7 +439,15 @@ ul li ol li em strong i {
|
||||
font-style: normal;
|
||||
color: #e1001a;
|
||||
font-size: 26px;
|
||||
display:inline-block;
|
||||
min-width:6rem;
|
||||
}
|
||||
|
||||
.discountInfo {
|
||||
i,em {
|
||||
font-size:1rem;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
|
@ -52,7 +52,7 @@
|
||||
<div class="rc-userbottom">
|
||||
<p>¥{{ item.productPrice }}</p>
|
||||
<p>X{{ item.buyCount }}</p>
|
||||
<p class="price">¥{{ item.productPrice }}</p>
|
||||
<p class="price">¥{{ item.productPrice * item.buyCount }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -88,8 +88,12 @@
|
||||
<div class="rc-foot">
|
||||
<div class="rc-foo">
|
||||
<div>
|
||||
<div class="discountInfo" v-if="discountAmount">
|
||||
<i>优惠金额:</i>
|
||||
<em>{{ discountAmount }}</em>
|
||||
</div>
|
||||
<i>合计金额:</i>
|
||||
<em>{{ sumPrice }}</em>
|
||||
<em>{{ finalAmount }}</em>
|
||||
</div>
|
||||
<div style="font-weight: bold">
|
||||
<span @click="preJiesuan()">提交订单</span>
|
||||
@ -147,7 +151,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="dialogInfo1" class="pop_coupon">
|
||||
<el-dialog :visible.sync="dialogInfo1" class="pop_coupon" :close-on-click-modal="false">
|
||||
<div class="ts-no-data" v-if="drawlist.length<=0">您还没有优惠券,可在商品的详情页面中领取</div>
|
||||
<div class="rs-dis">
|
||||
<div
|
||||
@ -155,26 +159,33 @@
|
||||
v-for="(item, index) in drawlist"
|
||||
:key="index"
|
||||
>
|
||||
<img :src="userimage" alt="" />
|
||||
<div class="rc-contair">
|
||||
<div class="rc-left">
|
||||
<div v-if="item.couponAmount">
|
||||
<i>¥</i><span>{{ item.couponAmount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-right">
|
||||
<i>
|
||||
{{ item.couponDesc }}
|
||||
</i>
|
||||
<div v-show="item.validTo">
|
||||
<span>有效期</span>
|
||||
<em>{{ item.validTo }}</em>
|
||||
</div>
|
||||
<div class="rc-footer">
|
||||
<span @click="pickCoupon(item)">立即使用</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<img :src="userimage" alt="" />
|
||||
<div class="rc-contair">
|
||||
<div class="rc-left" :style='usercolor'>
|
||||
<div>
|
||||
<i v-if="(item.couponTypeId!='4' && item.couponAmount>0)">
|
||||
¥
|
||||
</i>
|
||||
<span>
|
||||
{{ item.couponAmount?item.couponAmount:(parseInt((item.discount)*10)+'折') }}
|
||||
</span>
|
||||
</div>
|
||||
<strong>{{ item.couponName }}</strong>
|
||||
</div>
|
||||
<div class="rc-right">
|
||||
<i :style='usercolor'>
|
||||
{{ item.couponName }}
|
||||
</i>
|
||||
<div class="rc-userfont">
|
||||
<strong>有效期</strong>
|
||||
<span>{{item.validFrom}}至</span>
|
||||
<em>{{item.validTo}}</em>
|
||||
</div>
|
||||
<div class="rc-footer">
|
||||
<span @click="pickCoupon(item)">立即使用</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -201,6 +212,7 @@ export default {
|
||||
path:'/personal/settlement'
|
||||
}
|
||||
],
|
||||
usercolor:{color:'#e1001a'},
|
||||
userimage: require("../../assets/image/unused.png"),
|
||||
curCoupon:{couponName:'未选择可用优惠券'},
|
||||
drawlist:[],
|
||||
@ -239,18 +251,113 @@ export default {
|
||||
promotion: "¥167.00",
|
||||
payment: "¥0.00 ",
|
||||
},
|
||||
discountAmount:0,
|
||||
finalAmount:0,
|
||||
discountedProductCode:undefined,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 总价计算
|
||||
sumPrice() {
|
||||
return this.goldmedal.reduce((pre, cur) => {
|
||||
return pre + cur.buyCount * cur.productPrice;
|
||||
}, 0);
|
||||
},
|
||||
sumPrice() {
|
||||
return this.goldmedal.reduce((pre, cur) => {
|
||||
return pre + cur.buyCount * cur.productPrice;
|
||||
}, 0);
|
||||
},
|
||||
// 折扣计算
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
discountedSumPrice() {
|
||||
let total = 0;
|
||||
if(this.curCoupon.productCodes)
|
||||
this.finalAmount = this.qualifiedProductDiscount();
|
||||
else
|
||||
this.finalAmount = this.wholeOrderDiscount();
|
||||
this.finalAmount = parseFloat(this.finalAmount).toFixed(2);
|
||||
this.discountAmount = parseFloat(this.discountAmount).toFixed(2);
|
||||
},
|
||||
wholeOrderDiscount(){
|
||||
this.discountedItemIndex = 0;
|
||||
let checkResult = true;
|
||||
if(this.curCoupon.minPrice && this.curCoupon.minPrice > this.sumPrice) {
|
||||
checkResult = false;
|
||||
}
|
||||
if(this.curCoupon.couponAmount && this.curCoupon.couponAmount > this.sumPrice) {
|
||||
checkResult = false;
|
||||
}
|
||||
if(checkResult) {
|
||||
if(this.curCoupon.couponAmount && this.curCoupon.couponAmount>0) {
|
||||
this.discountAmount = this.curCoupon.couponAmount;
|
||||
return this.sumPrice - this.curCoupon.couponAmount;
|
||||
} else if(this.curCoupon.discount && this.curCoupon.discount>0) {
|
||||
this.discountAmount = this.sumPrice*this.curCoupon.discount;
|
||||
return this.sumPrice * (1-this.curCoupon.discount);
|
||||
}
|
||||
} else {
|
||||
return this.sumPrice;
|
||||
}
|
||||
},
|
||||
qualifiedProductDiscount(){
|
||||
this.discountedItemIndex = 0;
|
||||
let total = 0;
|
||||
let couponUsed = false;
|
||||
let tmpShoppingCartList = this.arrSort(this.goldmedal);
|
||||
|
||||
for(let itemInCart of tmpShoppingCartList) {
|
||||
if((!this.curCoupon.productCodes || this.curCoupon.productCodes.indexOf(itemInCart.productCode)>-1) && !couponUsed) {
|
||||
if(this.curCoupon.minQuantity && this.curCoupon.minQuantity>itemInCart.buyCount) {
|
||||
//Check minQuantity
|
||||
total+=(itemInCart.buyCount * itemInCart.productPrice);
|
||||
} else if(this.curCoupon.minPrice && this.curCoupon.minPrice > (itemInCart.buyCount * itemInCart.productPrice)) {
|
||||
//Check minPrice
|
||||
total+=(itemInCart.buyCount * itemInCart.productPrice);
|
||||
} else {
|
||||
//Into coupon discount calculation
|
||||
switch(this.curCoupon.couponTypeId) {
|
||||
case 1: //Amount deduct
|
||||
total = total + (itemInCart.productPrice * itemInCart.buyCount - this.curCoupon.couponAmount);
|
||||
this.discountAmount = this.curCoupon.couponAmount;
|
||||
this.discountedProductCode = itemInCart.productCode;
|
||||
couponUsed=true;
|
||||
break;
|
||||
case 2: //Amount deduct with minPrice restriction
|
||||
case 6:
|
||||
total = total + (itemInCart.productPrice * itemInCart.buyCount) - this.curCoupon.couponAmount;
|
||||
this.discountAmount = this.curCoupon.couponAmount;
|
||||
this.discountedProductCode = itemInCart.productCode;
|
||||
couponUsed=true;
|
||||
break;
|
||||
case 3: //Limited product % discount
|
||||
case 4: //% discount
|
||||
total = total + (itemInCart.productPrice * itemInCart.buyCount) * this.curCoupon.discount;
|
||||
this.discountAmount = (itemInCart.productPrice * itemInCart.buyCount) * ( 1 - this.curCoupon.discount);
|
||||
this.discountedProductCode = itemInCart.productCode;
|
||||
couponUsed=true;
|
||||
break;
|
||||
default:
|
||||
total += itemInCart.productPrice * itemInCart.buyCount;
|
||||
break;
|
||||
}
|
||||
//Into coupon discount calculation end
|
||||
}
|
||||
} else {
|
||||
total += itemInCart.productPrice * itemInCart.buyCount;
|
||||
}
|
||||
}
|
||||
return total;
|
||||
},
|
||||
arrSort(arr) {
|
||||
let userarr=[]
|
||||
let a=[];
|
||||
for(let i in arr){
|
||||
arr[i].total=arr[i].productPrice*arr[i].buyCount;
|
||||
if(arr[i].total){
|
||||
userarr.push(arr[i]);
|
||||
}
|
||||
}
|
||||
return userarr.sort((n1,n2)=>{
|
||||
return n2.total-n1.total;
|
||||
});
|
||||
},
|
||||
async getAddressList() {
|
||||
let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
||||
let { data } = await memberAddress("getAll", { memberId: memberId });
|
||||
@ -278,19 +385,51 @@ export default {
|
||||
async userdraw(mobile) {
|
||||
let data = await getdraw(mobile);
|
||||
let _self = this;
|
||||
let curTime = new Date().getTime();
|
||||
let valDateFromTime=0;
|
||||
let valDateToTime=0;
|
||||
let dateChecked=true;
|
||||
|
||||
if (data) {
|
||||
//TODO check status = 0
|
||||
this.drawlist=[];
|
||||
data.data.forEach((item) => {
|
||||
if(item.status==0) {
|
||||
_self.drawlist.push(item);
|
||||
for(let itemInCart of this.goldmedal) {
|
||||
let tmpIndex=0;
|
||||
for(let myCoupon of data.data) {
|
||||
valDateFromTime=0;
|
||||
valDateToTime=0;
|
||||
dateChecked=true;
|
||||
if(myCoupon.fValidFrom) {
|
||||
valDateFromTime = new Date(myCoupon.fValidFrom).getTime();
|
||||
}
|
||||
if(myCoupon.fValidTo) {
|
||||
valDateToTime = new Date(myCoupon.fValidTo).getTime();
|
||||
}
|
||||
if(valDateFromTime && curTime < valDateFromTime) {
|
||||
dateChecked=false;
|
||||
}
|
||||
if(valDateToTime && curTime > valDateToTime) {
|
||||
dateChecked=false;
|
||||
}
|
||||
if(myCoupon.minQuantity && myCoupon.minQuantity>itemInCart.buyCount) {
|
||||
dateChecked=false;
|
||||
}
|
||||
if(myCoupon.minPrice && myCoupon.minPrice>this.sumPrice) {
|
||||
dateChecked=false;
|
||||
}
|
||||
|
||||
if(dateChecked && myCoupon.activityId != 10 && myCoupon.status == 0 && (!myCoupon.productCodes || myCoupon.productCodes.indexOf(itemInCart.productCode)>-1)) {
|
||||
data.data.splice(tmpIndex,1);
|
||||
_self.drawlist.push(myCoupon);
|
||||
}
|
||||
tmpIndex++;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
pickCoupon(item){
|
||||
this.curCoupon = item;
|
||||
this.dialogInfo1 = false;
|
||||
this.discountedSumPrice();
|
||||
},
|
||||
editAddress(item) {
|
||||
this.dialogAddTitle = "修改收货地址";
|
||||
@ -370,6 +509,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
let postData = [];
|
||||
let tmpCounter=0;
|
||||
this.goldmedal.forEach((item) => {
|
||||
let basePoint = (item.basePoint?item.basePoint:0);
|
||||
let oneProduct = {
|
||||
@ -394,7 +534,7 @@ export default {
|
||||
addressDetailInfo: orderAddress[0].detailAddress,
|
||||
},
|
||||
};
|
||||
if(this.curCoupon.couponId) {
|
||||
if(this.curCoupon.couponId && item.productCode == this.discountedProductCode) {
|
||||
oneProduct.couponId = this.curCoupon.couponId;
|
||||
oneProduct.couponTypeId = this.curCoupon.couponTypeId;
|
||||
oneProduct.couponName = this.curCoupon.couponName;
|
||||
@ -402,6 +542,7 @@ export default {
|
||||
oneProduct.couponAmount = (this.curCoupon.couponAmount?this.curCoupon.couponAmount:this.curCoupon.discount);
|
||||
}
|
||||
postData.push(oneProduct);
|
||||
tmpCounter++;
|
||||
});
|
||||
// let postData = [
|
||||
// {
|
||||
@ -450,8 +591,8 @@ export default {
|
||||
let res = await generateOrderWX(postData);
|
||||
if (res.success) {
|
||||
let userPayData = {
|
||||
orderId: res.data,
|
||||
userprice: this.sumPrice,
|
||||
orderId: res.data.orderNumber,
|
||||
userprice: parseFloat(res.data.orderAmount).toFixed(2),
|
||||
userinformation:
|
||||
postData[0].orderAddress.addressUserName +
|
||||
" " +
|
||||
@ -481,6 +622,7 @@ export default {
|
||||
this.goldmedal = JSON.parse(this.$route.query.list);
|
||||
this.getAddressList();
|
||||
this.checkIsLogin();
|
||||
this.finalAmount = this.sumPrice;
|
||||
// this.addressstype = this.$route.query.stype;
|
||||
// this.orderNumber = this.$route.query.orderNumber;
|
||||
// this.canceldanhao(this.orderNumber);
|
||||
|
@ -320,7 +320,7 @@ export default {
|
||||
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].phoneNumber = this.goldmedal[i].addressPhoneNumber;
|
||||
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
|
||||
// this.useralllist[i].picFile = this.goldmedal[i].picFile; //图片路径
|
||||
// this.useralllist[i].productName=this.goldmedal[i].productName;//商品名称
|
||||
|
@ -19,7 +19,7 @@
|
||||
<el-col :span="6" class="ready_right">
|
||||
<div class="inline_right">
|
||||
<p>付款金额:</p>
|
||||
<p class="price">¥{{ userPayData.userprice }}</p>
|
||||
<p class="price" v-if="userPayData.userprice">¥{{ userPayData.userprice }}</p>
|
||||
</div>
|
||||
<div class="inline_right">
|
||||
<p>收货信息:</p>
|
||||
@ -64,7 +64,9 @@
|
||||
<p>您的商品我们正在抓紧打包,请耐心等候!</p>
|
||||
<div class="line_dashed"></div>
|
||||
<div class="userer">
|
||||
<div class="qrcode"><vue-qr :text="qrtext" :size="260"></vue-qr></div>
|
||||
<div class="qrcode">
|
||||
<img src="/images/qrcode-aichong.jpg">
|
||||
</div>
|
||||
<p>微信扫一扫,识别二维码</p>
|
||||
<p class="tips">加入社群0元试用商品随单发放</p>
|
||||
</div>
|
||||
@ -94,7 +96,7 @@ export default {
|
||||
activeIndex: 0,
|
||||
paymentTimer:undefined,
|
||||
isSucess: false,
|
||||
dialogSuccess: false,
|
||||
dialogSuccess: true,
|
||||
paytype: "微信",
|
||||
userpaystype: [
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="online" id="fixed-catbar-seperator rc-margin--none"></div>
|
||||
<div class="online rc-margin--none" id="fixed-catbar-seperator"></div>
|
||||
<div class="rc-top"></div>
|
||||
<div
|
||||
class="
|
||||
@ -187,7 +187,7 @@
|
||||
<li>
|
||||
<span
|
||||
><i class="ts-row-title">商品编号:</i
|
||||
><i>{{ curItem.brandCode }}</i></span
|
||||
><i>{{ curItem.productCode }}</i></span
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
@ -208,8 +208,8 @@
|
||||
<FixRight></FixRight>
|
||||
<Myfooter v-on:litentop="showmesg"></Myfooter>
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogInfo1" @close="userclose" class="pop_coupon">
|
||||
<div class="ts-no-data" v-if="usernewlist.length<=0">您还没有优惠券,可在商品的详情页面中领取</div>
|
||||
<el-dialog :visible.sync="dialogInfo1" @close="userclose" class="pop_coupon" :close-on-click-modal="false">
|
||||
<div class="ts-no-data" v-if="usernewlist.length<=0">目前还没有可用的优惠券</div>
|
||||
<div class="rs-dis">
|
||||
<div
|
||||
class="rc-discount"
|
||||
@ -217,25 +217,32 @@
|
||||
:key="index"
|
||||
>
|
||||
<img :src="userimage" alt="" />
|
||||
<div class="rc-contair">
|
||||
<div class="rc-left">
|
||||
<div v-if="item.couponAmount">
|
||||
<i>¥</i><span>{{ item.couponAmount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-right">
|
||||
<i>
|
||||
{{ item.couponDesc }}
|
||||
</i>
|
||||
<div v-show="item.validTo">
|
||||
<span>有效期</span>
|
||||
<em>{{ item.validTo }}</em>
|
||||
</div>
|
||||
<div class="rc-footer">
|
||||
<span @click="usergetconf(item)">立即领取</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-contair">
|
||||
<div class="rc-left">
|
||||
<div>
|
||||
<i v-if="(item.couponTypeId!='4' && item.couponAmount>0)">
|
||||
¥
|
||||
</i>
|
||||
<span>
|
||||
{{ item.couponAmount?item.couponAmount:(parseInt((item.discount)*10)+'折') }}
|
||||
</span>
|
||||
</div>
|
||||
<strong>{{ item.couponName }}</strong>
|
||||
</div>
|
||||
<div class="rc-right">
|
||||
<i>
|
||||
{{ item.couponName }}
|
||||
</i>
|
||||
<div class="rc-userfont">
|
||||
<strong>有效期</strong>
|
||||
<span>{{item.validFrom}}至</span>
|
||||
<em>{{item.validTo}}</em>
|
||||
</div>
|
||||
<div class="rc-footer">
|
||||
<span @click="usergetconf(item)">立即领取</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -472,6 +479,7 @@ export default {
|
||||
|
||||
userclose() {
|
||||
this.userlist = [];
|
||||
this.dialogInfo1=false;
|
||||
},
|
||||
async userquery() {
|
||||
let data = await goodsmessage(this.productCode);
|
||||
@ -518,7 +526,7 @@ export default {
|
||||
let alllist = [];
|
||||
this.userlist = this.alldraw.data;
|
||||
this.userlist.forEach((element, index) => {
|
||||
if (typeof element.productCodes == "string") {
|
||||
if (typeof element.productCodes == "string" || !element.productCodes) {
|
||||
userlist.push(element);
|
||||
// let s=element.productCodes.split(',');
|
||||
// console.log(s.indexOf(this.productCode) != -1 )
|
||||
@ -527,12 +535,36 @@ export default {
|
||||
});
|
||||
let menualist = [];
|
||||
userlist.filter((item) => {
|
||||
item.productCodes = item.productCodes.split(",");
|
||||
item.productCodes.forEach((element) => {
|
||||
if (element == this.curItem.productCode && item.activityId !== 10) {
|
||||
menualist.push(item);
|
||||
}
|
||||
});
|
||||
let valDateFromTime=0;
|
||||
let valDateToTime=0;
|
||||
let curTime = new Date().getTime();
|
||||
let dateChecked=true;
|
||||
if(item.fValidFrom) {
|
||||
valDateFromTime = new Date(item.fValidFrom).getTime();
|
||||
}
|
||||
if(item.fValidTo) {
|
||||
valDateToTime = new Date(item.fValidTo).getTime();
|
||||
}
|
||||
if(valDateFromTime && curTime < valDateFromTime) {
|
||||
dateChecked=false;
|
||||
}
|
||||
if(valDateToTime && curTime > valDateToTime) {
|
||||
dateChecked=false;
|
||||
}
|
||||
if(dateChecked && item.activityId!=10) {
|
||||
if(!item.productCodes) {
|
||||
menualist.push(item);
|
||||
} else {
|
||||
item.productCodes = item.productCodes.split(",");
|
||||
item.productCodes.forEach((element) => {
|
||||
if (element == this.curItem.productCode) {
|
||||
menualist.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
//Expired coupons
|
||||
}
|
||||
});
|
||||
this.usernewlist = menualist;
|
||||
}
|
||||
@ -561,6 +593,8 @@ export default {
|
||||
// let userid=JSON.parse(location.getItem('userInfo'));
|
||||
// let mobile=JSON.parse(location.getItem('userInfo'));
|
||||
// console.log(userid,mobile);
|
||||
let basePoint = item.basePoint;
|
||||
basePoint = basePoint?basePoint:0;
|
||||
let data = await postCourseId(
|
||||
item.productCode,
|
||||
this.sales_num,
|
||||
@ -571,7 +605,7 @@ export default {
|
||||
item.ecPrice,
|
||||
item.specifications,
|
||||
item.leftAllotment,
|
||||
item.basePoint
|
||||
basePoint
|
||||
);
|
||||
if (data) {
|
||||
this.productlist = data;
|
||||
@ -623,7 +657,7 @@ export default {
|
||||
this.dialogInfo2 = true;
|
||||
return;
|
||||
} else {
|
||||
this.userdraw(this.usermessage.data.mobile);
|
||||
//this.userdraw(this.usermessage.data.mobile);
|
||||
this.alldrawlist(this.usermessage.data.id);
|
||||
this.dialogInfo1 = true;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@
|
||||
</div>
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item)">
|
||||
<span>{{ item.categoryName }}</span>
|
||||
<span>{{ item.name }}</span>
|
||||
<i>{{ item.ecPrice?("¥"+item.ecPrice):'' }}</i>
|
||||
</div>
|
||||
<strong
|
||||
|
@ -256,10 +256,14 @@ export default {
|
||||
else{
|
||||
//let user= JSON.parse(localStorage.getItem("userInfo"));
|
||||
let data = await this.vadmsg();
|
||||
if(data.code=="1")
|
||||
console.log(data.code)
|
||||
if(data.code=1)
|
||||
{
|
||||
console.log('---');
|
||||
data=await useredit(this.tel);
|
||||
if(data.code=='1'){
|
||||
console.log(this.tel);
|
||||
console.log(data);
|
||||
if(data.code=1){
|
||||
let couponId='0000000123';
|
||||
this.serdiscount(this.tel,couponId);
|
||||
setTimeout(() => {
|
||||
|
BIN
rc-busness/static/images/delivery.png
Normal file
BIN
rc-busness/static/images/delivery.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
Loading…
Reference in New Issue
Block a user