mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 18:26:38 +08:00
commit
14bba229ea
@ -91,6 +91,7 @@ export const monitorOrderNotify = (OrderNumber) => {
|
|||||||
* 删除购物车
|
* 删除购物车
|
||||||
*/
|
*/
|
||||||
export const deleteCart = ( productCode) => {
|
export const deleteCart = ( productCode) => {
|
||||||
|
debugger;
|
||||||
var data = {
|
var data = {
|
||||||
productCode
|
productCode
|
||||||
}
|
}
|
||||||
@ -475,6 +476,12 @@ export const generateOrderWX = (list) => {
|
|||||||
}]
|
}]
|
||||||
return fetch('generateOrderWX', list, 'POST' )
|
return fetch('generateOrderWX', list, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//再次支付
|
||||||
|
export const repayOrde = (ordernumber) => {
|
||||||
|
console.log(ordernumber);
|
||||||
|
return fetch('repayOrderWX?orderNo='+ordernumber,'', 'POST' )
|
||||||
|
}
|
||||||
//用户所有的优惠券
|
//用户所有的优惠券
|
||||||
export const allConfig = (memberId,channelSecurity,mobile) => {
|
export const allConfig = (memberId,channelSecurity,mobile) => {
|
||||||
var data = {
|
var data = {
|
||||||
@ -628,12 +635,9 @@ export const memberAddress = (type, data) => {
|
|||||||
return fetch('memberAddress?type='+type, data, 'POST' )
|
return fetch('memberAddress?type='+type, data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
//微信支付二维码
|
|
||||||
export const updateOrderWX = (data) => {
|
|
||||||
return fetch('updateOrderWX', data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
//支付宝支付二维码
|
//支付宝支付二维码
|
||||||
export const generateOrderAlipay = (data) => {
|
export const generateOrderAlipay = (data) => {
|
||||||
return fetch('generateOrderAlipay', data, 'POST' )
|
return fetch('generateOrderAlipay', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
@ -77,6 +77,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.rc-right {
|
.rc-right {
|
||||||
@ -121,6 +122,8 @@ align-items: center;
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
float: right;
|
||||||
|
margin-right: 28px;
|
||||||
|
|
||||||
}
|
}
|
||||||
span{
|
span{
|
||||||
@ -286,6 +289,8 @@ align-items: center;
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
float: right;
|
||||||
|
margin-right: 28px;
|
||||||
|
|
||||||
}
|
}
|
||||||
span{
|
span{
|
||||||
|
@ -127,6 +127,7 @@ margin-right: 20px;
|
|||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
display: block;
|
display: block;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -416,6 +417,7 @@ margin-right: 20px;
|
|||||||
img {
|
img {
|
||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
|
object-fit: contain;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
25621
rc-busness/package-lock.json
generated
Normal file
25621
rc-busness/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,23 +7,19 @@
|
|||||||
<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>
|
||||||
<span>{{orderstatus}}</span>
|
<span>{{orderstatus}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-border"></div>
|
<div class="delivery" v-if="isshow" >
|
||||||
<div v-if="isshow">
|
|
||||||
<div class="delivery" v-for="(userdata,index) in delivery" :key="index" >
|
|
||||||
|
|
||||||
<div class="to-delivery">
|
<div class="to-delivery">
|
||||||
<span>{{ userdata.state }}</span>
|
<span>{{ trackingstates}}</span>
|
||||||
<i>{{ userdata.time }}</i>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="bo-delivery">
|
<div class="bo-delivery">
|
||||||
<span>{{ userdata.address }}</span>
|
<span>{{ logisticsCompany }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="viewdetails">
|
<div class="viewdetails">
|
||||||
<span>查看详情</span>
|
<span>查看详情</span>
|
||||||
<img :src="leftico" alt="" />
|
<img :src="leftico" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
class="mypersonal"
|
class="mypersonal"
|
||||||
v-for="(datddress, index) in useraddress"
|
v-for="(datddress, index) in useraddress"
|
||||||
@ -37,11 +33,14 @@
|
|||||||
<span>{{ datddress.provinceName }}{{datddress.cityName}}{{datddress.districtName}}{{datddress.detailAddress}}</span>
|
<span>{{ datddress.provinceName }}{{datddress.cityName}}{{datddress.districtName}}{{datddress.detailAddress}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div >
|
<div >
|
||||||
<div class="rc-center">
|
<div class="rc-center">
|
||||||
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index">
|
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index">
|
||||||
<div class="rc-image">
|
<div class="rc-image">
|
||||||
<img :src="item.catimage" alt="" />
|
<img src="../../static/images/default.jpg" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
@ -52,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottom">
|
<div class="rc-userbottom">
|
||||||
<span>数量:{{ item.pcs }}件</span>
|
<span>数量:{{ item.pcs }}件</span>
|
||||||
<i>¥{{ item.ecPrice }}</i>
|
<i>¥{{ 10 }}</i>
|
||||||
<div class="rc-bottom">
|
<div class="rc-bottom">
|
||||||
<span @click="userpay()">{{customer}}</span>
|
<span @click="userpay()">{{customer}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -126,7 +125,7 @@
|
|||||||
<em>¥{{usersalesAmount}}</em>
|
<em>¥{{usersalesAmount}}</em>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-bottom:40px">
|
<div style="padding-bottom:40px">
|
||||||
<span @click="onceagain">再次购买</span>
|
<span @click="onceagain()">再次购买</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -134,7 +133,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-full-width rc-margin-y--md">
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain">
|
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain()">
|
||||||
{{payorsucess}}
|
{{payorsucess}}
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
@ -155,12 +154,14 @@ export default {
|
|||||||
return {
|
return {
|
||||||
goldmedal:[],
|
goldmedal:[],
|
||||||
userproductId:'',
|
userproductId:'',
|
||||||
|
logisticsDate:'',
|
||||||
userphone:'',
|
userphone:'',
|
||||||
logisticsNumber:'',
|
logisticsNumber:'',
|
||||||
customer:'',//联系客服或者取消订单
|
customer:'',//联系客服或者取消订单
|
||||||
payorsucess:'', //立即支付或者再次购买,
|
payorsucess:'', //立即支付或者再次购买,
|
||||||
addressstype: null,
|
addressstype: null,
|
||||||
addressUserName:'',
|
addressUserName:'',
|
||||||
|
logisticsCompany:'',//物流公司
|
||||||
orderstatus: '',
|
orderstatus: '',
|
||||||
goldastates:'',
|
goldastates:'',
|
||||||
userisdelivery:'待收货',
|
userisdelivery:'待收货',
|
||||||
@ -172,6 +173,7 @@ export default {
|
|||||||
userdata:"",
|
userdata:"",
|
||||||
usermessage:null,
|
usermessage:null,
|
||||||
userid: null,
|
userid: null,
|
||||||
|
trackingstates:'',//运输状态
|
||||||
useralllist:[],
|
useralllist:[],
|
||||||
delivery: [
|
delivery: [
|
||||||
|
|
||||||
@ -240,6 +242,7 @@ userpay(){
|
|||||||
if(this.payorsucess=='立即支付'){
|
if(this.payorsucess=='立即支付'){
|
||||||
console.log('----')
|
console.log('----')
|
||||||
this.getwei();
|
this.getwei();
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/productdetails/producted",
|
path: "/productdetails/producted",
|
||||||
@ -259,13 +262,27 @@ userpay(){
|
|||||||
if(data){
|
if(data){
|
||||||
this.goldmedal=data;
|
this.goldmedal=data;
|
||||||
for(let i=0;i<this.goldmedal.length;i++){
|
for(let i=0;i<this.goldmedal.length;i++){
|
||||||
// this.goldmedal[i].status=0
|
|
||||||
this.goldastates=this.goldmedal[i].status;
|
this.goldastates=this.goldmedal[i].status;
|
||||||
this.userproductId=this.goldmedal[i].orderDetailList[0].productId;
|
this.userproductId=this.goldmedal[i].orderDetailList[0].productId;
|
||||||
this.logisticsNumber=this.goldmedal[i].orderDetailList[0].logisticsNumber;
|
this.logisticsNumber=this.goldmedal[i].orderDetailList[0].logisticsNumber; //物流单号
|
||||||
|
this.trackingstates=this.goldmedal[i].orderDetailList[0].status//运输状态
|
||||||
|
|
||||||
|
if( this.trackingstates==0){
|
||||||
|
this.trackingstates='运输中'
|
||||||
|
}else if(this.trackingstates==1){
|
||||||
|
this.trackingstates='已签收'
|
||||||
|
}
|
||||||
|
else if(this.trackingstates==2){
|
||||||
|
this.trackingstates='未发货'
|
||||||
|
}
|
||||||
|
console.log(this.goldmedal[i].orderDate);
|
||||||
|
this.logisticsDate=new Date(this.goldmedal[i].orderDate.toLocaleString())//时间戳
|
||||||
|
console.log(this.logisticsDate);
|
||||||
|
this.logisticsCompany=this.goldmedal[i].orderDetailList[0].logisticsCompany; //物流公司
|
||||||
this.orderNumber=this.goldmedal[i].orderNumber
|
this.orderNumber=this.goldmedal[i].orderNumber
|
||||||
this.usersalesAmount=this.goldmedal[i].salesAmount;
|
this.usersalesAmount=this.goldmedal[i].salesAmount;
|
||||||
this.addressUserName=this.goldmedal[i].addressUserName;
|
this.addressUserName=this.goldmedal[i].addressUserName;
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log(this.goldmedal,this.userproductId,this.usersalesAmount);
|
console.log(this.goldmedal,this.userproductId,this.usersalesAmount);
|
||||||
}
|
}
|
||||||
@ -274,39 +291,30 @@ if(data){
|
|||||||
},
|
},
|
||||||
//订单立即支付
|
//订单立即支付
|
||||||
async getwei(user) {
|
async getwei(user) {
|
||||||
let postData = [];
|
console.log(user);
|
||||||
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 = {
|
let userPayData = {
|
||||||
orderId: res.data,
|
userprice: this.usersalesAmount,
|
||||||
userprice: this.usersalesAmount, //订单总价
|
userinformation:this.
|
||||||
userinformation:
|
addressUserName +
|
||||||
this.addressUserName+ //姓名
|
|
||||||
" " +
|
" " +
|
||||||
this.userphone, //电话
|
this.orderNumber,
|
||||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||||
};
|
};
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
query: {
|
query: {
|
||||||
|
userData:this.orderNumber,
|
||||||
|
stype:1,
|
||||||
userPayData: JSON.stringify(userPayData),
|
userPayData: JSON.stringify(userPayData),
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// this.$router.push({
|
||||||
|
// path: "/personal/userpay",
|
||||||
|
// query: {
|
||||||
|
|
||||||
|
// },
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
async editaddress(user) {
|
async editaddress(user) {
|
||||||
// user.data.id=844350;
|
// user.data.id=844350;
|
||||||
@ -337,6 +345,7 @@ console.log(this.userdata);
|
|||||||
this.userphone=this.usermessage.data.mobile;
|
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.orderquantity(this.orderNumber)
|
this.orderquantity(this.orderNumber)
|
||||||
if(this.addressstype==2){
|
if(this.addressstype==2){
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
<em>{{item.validTo}}</em>
|
<em>{{item.validTo}}</em>
|
||||||
</div>
|
</div>
|
||||||
<nuxt-link :to="`/productdetails/productlist`">
|
<nuxt-link :to="`/productdetails/productlist`">
|
||||||
<div v-if="userload" class="ts-stand">
|
<div class="ts-standard-btn">
|
||||||
|
立即使用
|
||||||
</div>
|
</div>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-usermain" >
|
<div class="rc-usermain" >
|
||||||
<div class="rc-image">
|
<div class="rc-image">
|
||||||
<img :src="item.catimage" alt="" />
|
<img src="../../static/images/default.jpg" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right" @click="usertiaozhuan(item)">
|
<div class="rc-right" @click="usertiaozhuan(item)">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
@ -316,7 +316,6 @@ export default {
|
|||||||
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
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;
|
||||||
@ -343,37 +342,21 @@ export default {
|
|||||||
|
|
||||||
//订单立即支付
|
//订单立即支付
|
||||||
async getwei(item) {
|
async getwei(item) {
|
||||||
|
console.log(item);
|
||||||
let postData = [];
|
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 = {
|
let userPayData = {
|
||||||
orderId: res.data,
|
userprice: item.salesAmount,
|
||||||
userprice: item.salesAmount, //订单总价
|
orderId:item.orderNumber,
|
||||||
userinformation:
|
userinformation:item.addressUserName +
|
||||||
item.addressUserName+ //姓名
|
|
||||||
" " +
|
" " +
|
||||||
item.phoneNumber, //电话
|
item.phoneNumber,
|
||||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||||
};
|
};
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
query: {
|
query: {
|
||||||
|
userData:item.orderNumber,
|
||||||
|
stype:1,
|
||||||
userPayData: JSON.stringify(userPayData),
|
userPayData: JSON.stringify(userPayData),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -87,7 +87,7 @@ import Myheader from "~/components/header.vue";
|
|||||||
import tabs from "@/components/tabs.vue";
|
import tabs from "@/components/tabs.vue";
|
||||||
import vueQr from 'vue-qr'
|
import vueQr from 'vue-qr'
|
||||||
|
|
||||||
import { generateOrderAlipay, updateOrderWX, monitorOrderNotify } from "../../ajax/getData";
|
import { generateOrderAlipay, updateOrderWX, monitorOrderNotify,repayOrde } from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -111,15 +111,24 @@ export default {
|
|||||||
dialogFail: false,
|
dialogFail: false,
|
||||||
userPayData: {},
|
userPayData: {},
|
||||||
qrtext:'',
|
qrtext:'',
|
||||||
|
userData:'',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
let stype=this.$route.query.stype;
|
||||||
|
console.log(stype)
|
||||||
|
if(stype==1){
|
||||||
|
this.userData = this.$route.query.userData;
|
||||||
|
this.repayOrde(this.userData);
|
||||||
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||||
//this.qrtext=this.userPayData.wxPay
|
console.log(this.userPayData);
|
||||||
this.qrtext=this.userPayData.wxPay;
|
}else{
|
||||||
this.payOrderWX()
|
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||||
|
console.log(this.userPayData);
|
||||||
|
}
|
||||||
|
this.qrtext=this.userPayData.wxPay
|
||||||
|
this.payOrderWX();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeDialogSuccess() {
|
closeDialogSuccess() {
|
||||||
@ -139,6 +148,16 @@ export default {
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async repayOrde(ordernumber) {
|
||||||
|
let res = await repayOrde(ordernumber);
|
||||||
|
console.log(ordernumber);
|
||||||
|
if (res) {
|
||||||
|
console.log(res)
|
||||||
|
this.qrtext=res.msg
|
||||||
|
console.log(this.qrtext);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
async selectGoods(item, index) {
|
async selectGoods(item, index) {
|
||||||
this.activeIndex = index;
|
this.activeIndex = index;
|
||||||
this.paytype = item.paytype;
|
this.paytype = item.paytype;
|
||||||
|
BIN
rc-busness/static/images/default.jpg
Normal file
BIN
rc-busness/static/images/default.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
Loading…
Reference in New Issue
Block a user