mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
commit
eb9d820c1b
File diff suppressed because it is too large
Load Diff
@ -56,7 +56,7 @@ let util = {
|
||||
message = '请返回支付宝继续当前订单的支付';
|
||||
break;
|
||||
case "3":
|
||||
message = '请返回手机网页端继续当前订单的支付';
|
||||
message = '请返回手机网页端继续当前订单的支付或扫描二维码进行支付';
|
||||
break;
|
||||
default:
|
||||
message = '订单已过期,请重新下单';
|
||||
|
@ -463,7 +463,12 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
.qrcode{
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||
<el-breadcrumb-item to="/" >{{ this.homepageName }}</el-breadcrumb-item>
|
||||
|
||||
<el-breadcrumb-item :to=item.path v-for="(item, index) in displayData"
|
||||
<el-breadcrumb-item :to="{ path : item.path , query : item.query || {} }" v-for="(item, index) in displayData"
|
||||
:key="index">{{ item.title }}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
@ -29,7 +29,9 @@ export default {
|
||||
'/personal/useraddress/':'我的订单',
|
||||
'/myorder/userrecord/':'购物车',
|
||||
'/useraddress/openaddress/':'收货地址',
|
||||
'/personal/discount/':'优惠券'
|
||||
'/personal/discount/':'优惠券',
|
||||
'/productdetails/producted' : '产品详情',
|
||||
'/personal/useraddress' : '我的订单'
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -55,7 +57,7 @@ export default {
|
||||
if(this.crumbs && this.crumbs.length>0)
|
||||
{
|
||||
this.crumbs.forEach(function(ele,index){
|
||||
let displayObj= {path:'',title:''};
|
||||
let displayObj= {path:'',title:'',query : {}};
|
||||
if(ele.path) {
|
||||
displayObj.path = ele.path;
|
||||
for(let path in _self.nameMapping) {
|
||||
@ -68,6 +70,10 @@ export default {
|
||||
if(ele.title) {
|
||||
displayObj.title = ele.title;
|
||||
}
|
||||
|
||||
if(ele.query) {
|
||||
displayObj.query = ele.query;
|
||||
}
|
||||
_self.displayData.push(displayObj);
|
||||
});
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
let baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/'
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/';
|
||||
// baseUrl = 'http://192.168.10.127:10086/royalcanin/royalcanin/';
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
baseUrl = 'https://shop.royalcanin.com.cn/royalcanin/royalcanin/royalcanin/';
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<div class="list" v-for="(item, index) in cartData" :key="index">
|
||||
<div class="list-left">
|
||||
<label class="check-label"><input type="checkbox" v-model="item.checked" /></label>
|
||||
<label class="check-label"><input type="checkbox" v-model="item.checked" @change="checkRadio(item.checked)" /></label>
|
||||
<div class="product">
|
||||
<div class="product-img"><img :src="item.productImg" alt="" /></div>
|
||||
<div class="right">
|
||||
@ -49,7 +49,7 @@
|
||||
<li>
|
||||
<div class="rc-jia">
|
||||
<img src="../../assets/image/userjian.png" alt="" @click="sub(item.buyCount, index)" />
|
||||
<input type="text" v-model="item.buyCount" />
|
||||
<input type="text" v-model="item.buyCount" @blur="saveCartNumber(item)" />
|
||||
<img src="../../assets/image/userjia.png" alt="" @click="plus(item.buyCount, index)" />
|
||||
</div>
|
||||
</li>
|
||||
@ -61,9 +61,12 @@
|
||||
<div class="rc-footera">
|
||||
<div class="rc-foote">
|
||||
<div class="rc-shop">
|
||||
<label style="visibility: hidden;">
|
||||
<input type="checkbox" v-model="checkAll" />
|
||||
全选
|
||||
<!-- style="visibility: hidden;" -->
|
||||
<label class="check-all-main">
|
||||
<!-- <el-checkbox v-model="checkAllFlag">备选项</el-checkbox> -->
|
||||
<input type="checkbox" v-model="checkAllFlag" @change="toggleCheckAll" />
|
||||
|
||||
<span>全选</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="rc-delete">
|
||||
@ -99,8 +102,8 @@
|
||||
import Myheader from '~/components/header.vue';
|
||||
import MyFooter from '~/components/rc-footer.vue';
|
||||
import tabs from '@/components/tabs.vue';
|
||||
import { mapMutations,mapState } from 'vuex';
|
||||
import { isexistCart, generateOrderWX, deleteCart } from '../../ajax/getData';
|
||||
import { mapMutations, mapState } from 'vuex';
|
||||
import { isexistCart, generateOrderWX, deleteCart,changeCartNumber } from '../../ajax/getData';
|
||||
export default {
|
||||
middleware: 'metaTitle',
|
||||
meta: { title: '购物车' },
|
||||
@ -167,15 +170,14 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if(this.userInfo && this.loginState){
|
||||
if (this.userInfo && this.loginState) {
|
||||
this.carmessage();
|
||||
// this.checkIsLogin();
|
||||
}
|
||||
|
||||
},
|
||||
watch: {
|
||||
userInfo(newVal){
|
||||
if(newVal && this.loginState){
|
||||
userInfo(newVal) {
|
||||
if (newVal && this.loginState) {
|
||||
this.carmessage();
|
||||
}
|
||||
}
|
||||
@ -186,14 +188,31 @@ export default {
|
||||
MyFooter
|
||||
},
|
||||
methods: {
|
||||
/* 监听全选功能 */
|
||||
async toggleCheckAll(e){
|
||||
for (var i = 0; i < this.cartData.length; i++) {
|
||||
this.$set(this.cartData[i],'checked',this.checkAllFlag);
|
||||
}
|
||||
},
|
||||
/* 监听单选 */
|
||||
async checkRadio(state){
|
||||
/* 判断是否全选 */
|
||||
let checkCart = this.cartData.filter(val=>{
|
||||
return val.checked;
|
||||
});
|
||||
this.checkAllFlag = checkCart.length == this.cartData.length;
|
||||
},
|
||||
|
||||
//请求猫
|
||||
...mapMutations(['checkIsLogin']),
|
||||
async carmessage() {
|
||||
let user = this.userInfo;
|
||||
console.log(user);
|
||||
this.userid = user.id;
|
||||
let data = await isexistCart(user.id);
|
||||
console.log(data,'datadata');
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
let item = data[i];
|
||||
data.startBuyCount = item.buyCount;
|
||||
}
|
||||
this.cartData = data;
|
||||
// this.goldmedal = data;
|
||||
},
|
||||
@ -280,6 +299,7 @@ export default {
|
||||
}
|
||||
|
||||
this.cartData[index].buyCount = parseInt(this.cartData[index].buyCount) + 1;
|
||||
this.saveCartNumber(this.cartData[index])
|
||||
},
|
||||
// 数量减方法
|
||||
sub(num, index) {
|
||||
@ -288,6 +308,26 @@ export default {
|
||||
} else {
|
||||
this.cartData[index].buyCount = parseInt(this.cartData[index].buyCount) - 1;
|
||||
}
|
||||
|
||||
this.saveCartNumber(this.cartData[index])
|
||||
},
|
||||
/* 保存购物车数量 */
|
||||
async saveCartNumber(cartInfo){
|
||||
if(!cartInfo.buyCount || cartInfo.buyCount <= 0){
|
||||
return this.$messageToast('数量不正确','error');
|
||||
}
|
||||
if (cartInfo.buyCount >= cartInfo.leftAllotment) {
|
||||
cartInfo.buyCount = cartInfo.startBuyCount;
|
||||
return this.$messageToast('已达到本品最大购买上限','error');
|
||||
}
|
||||
|
||||
let { code } = await changeCartNumber({
|
||||
buyCount : cartInfo.buyCount,
|
||||
id : cartInfo.id,
|
||||
});
|
||||
if(code == 1){
|
||||
cartInfo.startBuyCount = cartInfo.buyCount;
|
||||
}
|
||||
},
|
||||
|
||||
// 求总价
|
||||
@ -354,7 +394,8 @@ export default {
|
||||
this.$router.push({
|
||||
path: '/personal/settlement',
|
||||
query: {
|
||||
list: JSON.stringify(list)
|
||||
list: JSON.stringify(list),
|
||||
type: 'cart'
|
||||
}
|
||||
// params: { test:'222'},
|
||||
});
|
||||
@ -420,8 +461,8 @@ export default {
|
||||
return this.cartData.filter(item => item.checked == true).length;
|
||||
},
|
||||
...mapState({
|
||||
userInfo : state => state.user.userInfo,
|
||||
loginState : state => state.login.loginState,
|
||||
userInfo: state => state.user.userInfo,
|
||||
loginState: state => state.login.loginState
|
||||
})
|
||||
}
|
||||
};
|
||||
@ -451,6 +492,15 @@ export default {
|
||||
height: 24px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.check-all-main{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
span{
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
font-style: normal;
|
||||
|
@ -2,8 +2,11 @@
|
||||
<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="online bold"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<!-- <div class="online bold notop"></div> -->
|
||||
<!-- <div class="rc-top"></div> -->
|
||||
<div class="rc-max-width--xl rc-main" v-for="(item, index) in goldmedal" :key="item.id">
|
||||
<div class="online bold notop"></div>
|
||||
<div class="rc-receiving useruantity">
|
||||
<em>{{ item.status == '0' ? '待付款' : item.status == '1' ? '待收货' : item.status == '2' ? '已完成' : item.status == '3' ? '已取消' : '异常订单' }}</em>
|
||||
<span>{{ orderstatus }}</span>
|
||||
@ -81,7 +84,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="online bold "></div>
|
||||
<div class="rc-payment">
|
||||
<div class="rc-payment">
|
||||
<ul>
|
||||
@ -110,9 +113,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="rc-foot">
|
||||
<div class="rc-foo">
|
||||
<div class="online bold "></div>
|
||||
<div style="">
|
||||
<i>合计金额:</i>
|
||||
<em>¥{{ usersalesAmount }}</em>
|
||||
@ -146,6 +150,7 @@
|
||||
|
||||
<script>
|
||||
import Myheader from '~/components/header.vue';
|
||||
import tabs from '@/components/tabs.vue';
|
||||
import { mapMutations, mapState } from 'vuex';
|
||||
import MyFooter from '~/components/rc-footer.vue';
|
||||
import Vue from 'vue';
|
||||
@ -194,7 +199,15 @@ export default {
|
||||
paytypeText: '',
|
||||
distribution: '快递',
|
||||
catimage: require('../../assets/image/rc-left.png')
|
||||
}
|
||||
},
|
||||
crumbs : [
|
||||
{
|
||||
path: '/personal/useraddress'
|
||||
},
|
||||
{
|
||||
title : '订单详情'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@ -405,7 +418,8 @@ export default {
|
||||
},
|
||||
components: {
|
||||
Myheader,
|
||||
MyFooter
|
||||
MyFooter,
|
||||
tabs
|
||||
},
|
||||
computed : {
|
||||
...mapState({
|
||||
|
@ -428,11 +428,17 @@ ul li ol li em strong i {
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
text-align: right;
|
||||
.totalInfo{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
i {
|
||||
font-style: normal;
|
||||
color: #333333;
|
||||
font-size: 20px;
|
||||
font-size: 19px;
|
||||
margin-right: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
em {
|
||||
|
@ -2,6 +2,7 @@
|
||||
<div class="settlement">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="rc_contline"></div>
|
||||
<div class="rc-main">
|
||||
<div class="address-list">
|
||||
@ -55,8 +56,10 @@
|
||||
|
||||
<li>
|
||||
<span>活动促销:</span>
|
||||
|
||||
<i class="ts-right-arr ts-right-arr--two" @click="userget()">{{ isHasChose ? curCoupon.couponName : drawlist.length ? `有${drawlist.length}张优惠券可选择` : '无优惠券' }}</i>
|
||||
|
||||
<i class="ts-right-arr ts-right-arr--two" @click="userget()">
|
||||
{{ isHasChose ? curCoupon.couponName : drawlist.length ? `有${drawlist.length}张优惠券可选择` : '无优惠券' }}
|
||||
</i>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
@ -75,13 +78,15 @@
|
||||
<div class="rc-main">
|
||||
<div class="rc-foot">
|
||||
<div class="rc-foo">
|
||||
<div>
|
||||
<div class="rc-foo-left">
|
||||
<div class="discountInfo" v-if="discountAmount">
|
||||
<i>优惠金额:</i>
|
||||
<em>{{ discountAmount }}</em>
|
||||
</div>
|
||||
<i>合计金额:</i>
|
||||
<em>{{ finalAmount }}</em>
|
||||
<div class="totalInfo">
|
||||
<i>合计金额:</i>
|
||||
<em>{{ finalAmount }}</em>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-weight: bold"><span @click="preJiesuan()">提交订单</span></div>
|
||||
</div>
|
||||
@ -143,10 +148,47 @@ import { userin, memberAddress, generateOrderWX, getdraw } from '../../ajax/getD
|
||||
import util from '@/ajax/util';
|
||||
import tabs from '@/components/tabs.vue';
|
||||
import myAddress from '~/components/address.vue';
|
||||
import { mapMutations,mapState } from 'vuex';
|
||||
import { mapMutations, mapState } from 'vuex';
|
||||
import itemMixin from '../../../smart-admin-web/src/components/main/components/side-menu/item-mixin';
|
||||
export default {
|
||||
middleware: 'metaTitle',
|
||||
asyncData({ app, $router }) {
|
||||
const { type = 'cart', list = [{}], pathQuery = {} } = app.router.history.current.query;
|
||||
let crumbs = [],
|
||||
product = typeof list == 'string' ? JSON.parse(list)[0] : list[0],
|
||||
query = typeof pathQuery == 'string' ? JSON.parse(pathQuery) : pathQuery;
|
||||
/* 处理面包屑 */
|
||||
switch (type) {
|
||||
case 'cart': //从购物车进入的
|
||||
crumbs = [
|
||||
{
|
||||
path: '/myorder/userrecord/'
|
||||
},
|
||||
{
|
||||
path: '/personal/settlement/'
|
||||
}
|
||||
];
|
||||
break;
|
||||
case 'product': //从产品详情进入的
|
||||
crumbs = [
|
||||
{
|
||||
path: '/productdetails/producted',
|
||||
title: product.productName,
|
||||
query
|
||||
},
|
||||
{
|
||||
path: '/personal/settlement/'
|
||||
}
|
||||
];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
console.log(crumbs, 'crumbs');
|
||||
return {
|
||||
crumbs
|
||||
};
|
||||
},
|
||||
meta: { title: '订单结算' },
|
||||
data() {
|
||||
return {
|
||||
@ -162,7 +204,7 @@ export default {
|
||||
usercolor: { color: '#e1001a' },
|
||||
userimage: require('../../assets/image/unused.png'),
|
||||
curCoupon: { couponName: '未选择可用优惠券' },
|
||||
isHasChose : false, //是否选择优惠券
|
||||
isHasChose: false, //是否选择优惠券
|
||||
drawlist: [],
|
||||
dialogInfo1: false,
|
||||
goldmedal: [],
|
||||
@ -212,8 +254,8 @@ export default {
|
||||
},
|
||||
// 折扣计算
|
||||
...mapState({
|
||||
userInfo : state => state.user.userInfo,
|
||||
loginState : state => state.login.loginState,
|
||||
userInfo: state => state.user.userInfo,
|
||||
loginState: state => state.login.loginState
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@ -551,7 +593,9 @@ export default {
|
||||
if (!userInfo) {
|
||||
this.$router.push({
|
||||
path: '/userlogin/login',
|
||||
query: {}
|
||||
query: {
|
||||
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -653,7 +697,8 @@ export default {
|
||||
this.$router.push({
|
||||
path: '/personal/userpay',
|
||||
query: {
|
||||
userPayData: JSON.stringify(userPayData)
|
||||
userPayData: JSON.stringify(userPayData),
|
||||
pathQuery : JSON.stringify(this.$route.query),
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -667,7 +712,7 @@ export default {
|
||||
let data = await userin(orderNumber);
|
||||
},
|
||||
/* 初始化数据 */
|
||||
initData(){
|
||||
initData() {
|
||||
this.getAddressList();
|
||||
let user = this.userInfo;
|
||||
let memberId = '';
|
||||
@ -686,7 +731,7 @@ export default {
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
if (user) {
|
||||
this.userdraw(user.mobile);
|
||||
}
|
||||
@ -694,12 +739,11 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.goldmedal = JSON.parse(this.$route.query.list);
|
||||
if(this.userInfo && this.loginState){
|
||||
if (this.userInfo && this.loginState) {
|
||||
this.initData();
|
||||
}
|
||||
// this.checkIsLogin();
|
||||
|
||||
|
||||
|
||||
// this.addressstype = this.$route.query.stype;
|
||||
// this.orderNumber = this.$route.query.orderNumber;
|
||||
// this.canceldanhao(this.orderNumber);
|
||||
@ -707,8 +751,8 @@ export default {
|
||||
// this.$refs.rccolor.style.background = "gray";
|
||||
},
|
||||
watch: {
|
||||
userInfo(newVal){
|
||||
if(newVal && this.loginState){
|
||||
userInfo(newVal) {
|
||||
if (newVal && this.loginState) {
|
||||
this.initData();
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
<div class="rc-userheader">
|
||||
<span v-for="(item, index) in message" :key="index">{{ item.title }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="rc-center" v-for="(item, index) in useralllist" :key="index">
|
||||
<div class="rc-usermaina">
|
||||
<div class="rc-title">
|
||||
@ -102,7 +102,6 @@
|
||||
|
||||
<div class="online bold"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<el-dialog :visible.sync="showPaytypeWarning" :close-on-click-modal="false">
|
||||
<div class="ts-warning-popup">
|
||||
@ -111,6 +110,7 @@
|
||||
<h3>温馨提示</h3>
|
||||
<span class="">{{ paytypeWarning.message }}</span>
|
||||
</div>
|
||||
<div class="qrcode rc-center"><vue-qr :text="qrtext" :size="200"></vue-qr></div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<MyFooter></MyFooter>
|
||||
@ -122,8 +122,9 @@ import Myheader from '~/components/header.vue';
|
||||
import MyFooter from '~/components/rc-footer.vue';
|
||||
import tabs from '~/components/tabs.vue';
|
||||
import util from '@/ajax/util';
|
||||
import { customerorders, userindent, canceldanhao, repayOrde } from '../../ajax/getData';
|
||||
import { customerorders, userindent, canceldanhao, repayOrde, generateOrderWX } from '../../ajax/getData';
|
||||
import { mapMutations, mapState } from 'vuex';
|
||||
import vueQr from 'vue-qr';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -195,7 +196,8 @@ export default {
|
||||
userprice: '',
|
||||
catimage: ''
|
||||
}
|
||||
]
|
||||
],
|
||||
qrtext : '', //二维码内容
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -220,7 +222,8 @@ export default {
|
||||
components: {
|
||||
Myheader,
|
||||
MyFooter,
|
||||
tabs
|
||||
tabs,
|
||||
vueQr
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['changemessage', 'checkIsLogin']),
|
||||
@ -252,15 +255,45 @@ export default {
|
||||
this.useralllist[y] = {};
|
||||
}
|
||||
if (!this.goldmedal[y].orderDetailList) continue;
|
||||
|
||||
// let item = {
|
||||
// ...this.useralllist[y],
|
||||
// ...this.goldmedal[y],
|
||||
// phoneNumber : this.goldmedal[y].addressPhoneNumber,
|
||||
// lengthnum : this.goldmedal[y].orderDetailList.length
|
||||
// }
|
||||
// this.useralllist[y] = item;
|
||||
this.useralllist[y].orderNumber = this.goldmedal[y].orderNumber;
|
||||
this.useralllist[y].status = this.goldmedal[y].status;
|
||||
this.useralllist[y].addressUserName = this.goldmedal[y].addressUserName;
|
||||
this.useralllist[y].phoneNumber = this.goldmedal[y].addressPhoneNumber;
|
||||
this.useralllist[y].paytype = this.goldmedal[y].paytype;
|
||||
this.useralllist[y].salesAmount = this.goldmedal[y].salesAmount;
|
||||
this.useralllist[y].lengthnum = this.goldmedal[y].orderDetailList.length;
|
||||
this.useralllist[y].paytype = this.goldmedal[y].paytype;
|
||||
let item = this.goldmedal[y];
|
||||
let orderDetail = item.orderDetailList[0];
|
||||
this.useralllist[y].payInfo = [
|
||||
{
|
||||
basePoint: item.item,
|
||||
productName: orderDetail.productName,
|
||||
buyCount: orderDetail.pcs,
|
||||
productCode: orderDetail.productCode,
|
||||
payAmount: orderDetail.ecPrice,
|
||||
memberId: this.userInfo.id,
|
||||
phoneNumber: item.phoneNumber,
|
||||
orderAddress: {
|
||||
addressPhoneNumber: item.addressPhoneNumber,
|
||||
addressUserName: item.addressUserName,
|
||||
addressProvinceName: item.addressProvinceName,
|
||||
addressCityName: item.addressCityName,
|
||||
addressCountyName:item.addressCountyName,
|
||||
addressDetailInfo: item.addressDetailInfo,
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (this.userstype == 1) {
|
||||
this.useralllist = this.obligation;
|
||||
} else if (this.userstype == 2) {
|
||||
@ -271,9 +304,10 @@ export default {
|
||||
this.useralllist = this.receiving;
|
||||
}
|
||||
/* 过滤空的数据 */
|
||||
let filterArr = this.useralllist.filter(val=>{
|
||||
let filterArr = this.useralllist.filter(val => {
|
||||
return val != undefined;
|
||||
});
|
||||
console.log(this.useralllist,'2222');
|
||||
this.useralllist = filterArr;
|
||||
},
|
||||
//订单立即支付
|
||||
@ -392,14 +426,59 @@ export default {
|
||||
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;
|
||||
let item = this.goldmedal[i];
|
||||
let orderDetail = item.orderDetailList[0];
|
||||
this.useralllist[y].payInfo = [
|
||||
{
|
||||
basePoint: item.item,
|
||||
productName: orderDetail.productName,
|
||||
buyCount: orderDetail.pcs,
|
||||
productCode: orderDetail.productCode,
|
||||
payAmount: orderDetail.ecPrice,
|
||||
memberId: this.userInfo.id,
|
||||
phoneNumber: item.phoneNumber,
|
||||
orderAddress: {
|
||||
addressPhoneNumber: item.addressPhoneNumber,
|
||||
addressUserName: item.addressUserName,
|
||||
addressProvinceName: item.addressProvinceName,
|
||||
addressCityName: item.addressCityName,
|
||||
addressCountyName:item.addressCountyName,
|
||||
addressDetailInfo: item.addressDetailInfo,
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
}
|
||||
console.log(list);
|
||||
|
||||
this.useralllist = list.filter(val=>{
|
||||
this.useralllist = list.filter(val => {
|
||||
return val != undefined;
|
||||
});;
|
||||
});
|
||||
},
|
||||
userfind(item) {
|
||||
async userfind(item) {
|
||||
// let params = [
|
||||
// {
|
||||
// basePoint: 0,
|
||||
// productName: '幼猫全价粮',
|
||||
// buyCount: 1,
|
||||
// productCode: '2003004003',
|
||||
// payAmount: 90,
|
||||
// memberId: 886750,
|
||||
// phoneNumber: '15766132405',
|
||||
// orderAddress: {
|
||||
// addressPhoneNumber: '15766132404',
|
||||
// addressUserName: '测试',
|
||||
// addressProvinceName: '安徽省',
|
||||
// addressCityName: '蚌埠市',
|
||||
// addressCountyName: '怀远县',
|
||||
// addressDetailInfo: '12123134444'
|
||||
// }
|
||||
// }
|
||||
// ];
|
||||
// console.log(item,'222');
|
||||
// return false;
|
||||
let { msg } = await generateOrderWX(item.payInfo, 1);
|
||||
this.qrtext = msg;
|
||||
// return false;
|
||||
this.paytypeWarning = this.util.checkPaytypeValidated(item.paytype);
|
||||
this.showPaytypeWarning = !this.paytypeWarning.result;
|
||||
let user = this.userInfo;
|
||||
|
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="page_modules">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top rc-md-up"></div>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="rc_contline"></div>
|
||||
<div class="cont_modules">
|
||||
<el-row class="order_info">
|
||||
<el-col :span="6" class="ph_hidden">
|
||||
@ -123,10 +125,33 @@ export default {
|
||||
qrtext: '',
|
||||
userData: '',
|
||||
disableAlipay: true,
|
||||
disableQrcode: false
|
||||
disableQrcode: false,
|
||||
crumbs: [
|
||||
|
||||
{
|
||||
path: '/personal/settlement/'
|
||||
},
|
||||
{
|
||||
title : '订单支付'
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
asyncData({app}){
|
||||
const { type = 'cart', list = [{}], pathQuery = {} } = app.router.history.current.query;
|
||||
let query = typeof pathQuery == 'string' ? JSON.parse(pathQuery) : pathQuery;
|
||||
return {
|
||||
crumbs : [
|
||||
{
|
||||
path: '/personal/settlement/',
|
||||
query,
|
||||
},
|
||||
{
|
||||
title : '订单支付'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
let isWx = this.util.isWX();
|
||||
@ -175,7 +200,7 @@ export default {
|
||||
this.checkIsLogin();
|
||||
// let user = this.$store.state.userInfo;
|
||||
let memberId = '';
|
||||
if (this.userInfo){
|
||||
if (this.userInfo) {
|
||||
memberId = this.userInfo.id;
|
||||
}
|
||||
_hmt.push([
|
||||
@ -257,8 +282,8 @@ export default {
|
||||
this.dialogSuccess = true;
|
||||
// let user = this.$store.state.userInfo;
|
||||
let memberId = '';
|
||||
if(this.userInfo){
|
||||
memberId = this.userInfo.id;
|
||||
if (this.userInfo) {
|
||||
memberId = this.userInfo.id;
|
||||
}
|
||||
// if (user) memberId = user.data.id;
|
||||
_hmt.push([
|
||||
@ -287,13 +312,22 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo : state => state.user.userInfo,
|
||||
userInfo: state => state.user.userInfo
|
||||
})
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.rc-top {
|
||||
margin-top: 65px;
|
||||
}
|
||||
@media screen and (max-width: 768px){
|
||||
.rc-top {
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.sucess_img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
|
@ -2,7 +2,6 @@
|
||||
<div>
|
||||
<Myheader></Myheader>
|
||||
<div class="user">
|
||||
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="online rc-margin--none" id="fixed-catbar-seperator"></div>
|
||||
@ -674,7 +673,6 @@ export default {
|
||||
},
|
||||
usertanchu(item, orderm) {
|
||||
let user = this.userInfo;
|
||||
console.log(user,'user');
|
||||
if (!user) {
|
||||
this.dialogInfo2 = true;
|
||||
return;
|
||||
@ -726,11 +724,12 @@ export default {
|
||||
product_amount: this.sales_num * this.curItem.ecPrice
|
||||
}
|
||||
]);
|
||||
|
||||
this.$router.push({
|
||||
path: '/personal/settlement',
|
||||
query: {
|
||||
list: JSON.stringify(list)
|
||||
list: JSON.stringify(list),
|
||||
type : 'product',
|
||||
pathQuery : JSON.stringify(this.$route.query),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user