mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-17 16:13:48 +08:00
Web code updated
This commit is contained in:
@@ -513,28 +513,28 @@ export default {
|
||||
let postData = [];
|
||||
let tmpCounter=0;
|
||||
this.goldmedal.forEach((item) => {
|
||||
let basePoint = (item.basePoint?item.basePoint:0);
|
||||
let basePoint = (item.basePoint?item.basePoint:0);
|
||||
let oneProduct = {
|
||||
basePoint:basePoint,
|
||||
productName: item.productName,
|
||||
buyCount: item.buyCount,
|
||||
productCode: item.productCode,
|
||||
payAmount: item.productPrice,
|
||||
memberId: userInfo.data.id,
|
||||
phoneNumber: userInfo.data.mobile,
|
||||
// couponId: "NGQ2022P12",
|
||||
// couponTypeId: "4",
|
||||
// couponName: "内购券",
|
||||
// couponAmount: "0.3175",
|
||||
// couponCode: "0007792402",
|
||||
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,
|
||||
},
|
||||
basePoint:basePoint,
|
||||
productName: item.productName,
|
||||
buyCount: item.buyCount,
|
||||
productCode: item.productCode,
|
||||
payAmount: item.productPrice,
|
||||
memberId: userInfo.data.id,
|
||||
phoneNumber: userInfo.data.mobile,
|
||||
// couponId: "NGQ2022P12",
|
||||
// couponTypeId: "4",
|
||||
// couponName: "内购券",
|
||||
// couponAmount: "0.3175",
|
||||
// couponCode: "0007792402",
|
||||
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,
|
||||
},
|
||||
};
|
||||
if(this.curCoupon.couponId && item.productCode == this.discountedProductCode) {
|
||||
oneProduct.couponId = this.curCoupon.couponId;
|
||||
@@ -626,6 +626,18 @@ export default {
|
||||
this.getAddressList();
|
||||
this.checkIsLogin();
|
||||
this.finalAmount = this.sumPrice;
|
||||
this.goldmedal.forEach((item) => {
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"placing_order",
|
||||
{
|
||||
"product_id_":item.productCode,
|
||||
"product_name_": item.productName,
|
||||
"product_quantity_" : item.buyCount,
|
||||
"product_amount_" : item.buyCount*item.productPrice,
|
||||
}
|
||||
])
|
||||
});
|
||||
// this.addressstype = this.$route.query.stype;
|
||||
// this.orderNumber = this.$route.query.orderNumber;
|
||||
// this.canceldanhao(this.orderNumber);
|
||||
|
||||
@@ -132,7 +132,18 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<MyFooter></MyFooter>
|
||||
<el-dialog :visible.sync="showPaytypeWarning" :close-on-click-modal="false">
|
||||
<div class="ts-warning-popup">
|
||||
<div class="title rc-full-width">
|
||||
<img src="../../assets/error.png" alt="" />
|
||||
</div>
|
||||
<div class="content rc-full-width rc-text--center rc-margin-y--md">
|
||||
<h3>温馨提示</h3>
|
||||
<span class="">{{ paytypeWarning.message}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<MyFooter></MyFooter>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -146,6 +157,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
util,
|
||||
paytypeWarning:{result:true,message:''},
|
||||
showPaytypeWarning:false,
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal/',
|
||||
@@ -279,7 +292,6 @@ export default {
|
||||
this.userdata = user.data.mobile;
|
||||
let stype = this.$route.query.stype;
|
||||
this.userstype=this.$route.query.stype;
|
||||
console.log(stype);
|
||||
if (user == "" || user == null) {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
@@ -297,68 +309,61 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async indet(mobile, stype) {
|
||||
let data = await userindent(mobile,undefined,1,100);
|
||||
this.activeIndex = stype;
|
||||
this.goldmedal = data;
|
||||
this.alllist=[];
|
||||
this.useralllist=[];
|
||||
this.obligation=[];
|
||||
this.receiving=[];
|
||||
this.pending=[];
|
||||
for (let i = 0; i < this.goldmedal.length; i++) {
|
||||
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){
|
||||
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.useralllist[i].status==2){
|
||||
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
||||
}
|
||||
}
|
||||
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].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;//商品名称
|
||||
// this.useralllist[i].ecPrice=this.goldmedal[i].ecPrice//第一个的单价
|
||||
// this.useralllist[i].pcs=this.goldmedal[i].pcs//数量
|
||||
let data = await userindent(mobile,undefined,1,100);
|
||||
this.activeIndex = stype;
|
||||
this.goldmedal = data;
|
||||
this.alllist=[];
|
||||
this.useralllist=[];
|
||||
this.obligation=[];
|
||||
this.receiving=[];
|
||||
this.pending=[];
|
||||
for (let i = (this.goldmedal.length-1); i >= 0; i--) {
|
||||
this.useralllist.unshift(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){
|
||||
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==2){
|
||||
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
||||
}
|
||||
}
|
||||
for (let i = (this.goldmedal.length-1); i >0; 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].addressPhoneNumber;
|
||||
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
|
||||
this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length;
|
||||
this.useralllist[i].paytype=this.goldmedal[i].paytype;
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length
|
||||
}
|
||||
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 data = await this.repayOrde(item.orderNumber);
|
||||
let payType = this.util.pickPaytype();
|
||||
let data = await this.repayOrde(item.orderNumber, payType);
|
||||
if(data.code==1) {
|
||||
let userPayData = {
|
||||
userprice: item.usersalesAmount,
|
||||
userprice: item.salesAmount,
|
||||
orderId: item.orderNumber,
|
||||
userinformation: item.addressUserName + " " + item.addressPhoneNumber,
|
||||
userinformation: item.addressUserName + " " + item.phoneNumber,
|
||||
wxPay:data.msg
|
||||
};
|
||||
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
query: {
|
||||
@@ -443,51 +448,49 @@ export default {
|
||||
}
|
||||
},
|
||||
selectGoods(item, index) {
|
||||
let list=[]
|
||||
this.activeIndex = index;
|
||||
console.log(this.obligation)
|
||||
if(item.title=='待付款'){
|
||||
list=this.obligation
|
||||
}
|
||||
else if(item.title=='待收货'){
|
||||
list=this.receiving
|
||||
console.log(this.receiving);
|
||||
let list=[]
|
||||
this.activeIndex = index;
|
||||
if(item.title=='待付款'){
|
||||
list=this.obligation
|
||||
}
|
||||
else if(item.title=='待收货'){
|
||||
list=this.receiving
|
||||
}else if(item.title=='待发货'){
|
||||
this.useralllist=this.pending
|
||||
list=this.pending
|
||||
}
|
||||
|
||||
}else if(item.title=='待发货'){
|
||||
this.useralllist=this.pending
|
||||
list=this.pending
|
||||
}
|
||||
|
||||
else if(item.title=='全部'){
|
||||
list=this.alllist
|
||||
}
|
||||
this.useralllist=[];
|
||||
console.log(this.useralllist,list);
|
||||
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) {
|
||||
if(item.status==0){
|
||||
this.getwei(item);
|
||||
}else{
|
||||
this.$router.push({
|
||||
path: "/myorder/usertion",
|
||||
query: {
|
||||
stype: item.status,
|
||||
orderNumber: item.orderNumber,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
else if(item.title=='全部'){
|
||||
list=this.alllist
|
||||
}
|
||||
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) {
|
||||
this.paytypeWarning = this.util.checkPaytypeValidated(item.paytype);
|
||||
this.showPaytypeWarning = !this.paytypeWarning.result;
|
||||
if(this.paytypeWarning.result) {
|
||||
if(item.status==0){
|
||||
this.getwei(item);
|
||||
}else{
|
||||
this.$router.push({
|
||||
path: "/myorder/usertion",
|
||||
query: {
|
||||
stype: item.status,
|
||||
orderNumber: item.orderNumber,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
usertwo() {
|
||||
this.$router.push({
|
||||
path: "/myorder/userrecord",
|
||||
|
||||
@@ -175,6 +175,14 @@ export default {
|
||||
//TODO raise WX jsapi pay
|
||||
break;
|
||||
}
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"payment",
|
||||
{
|
||||
"payType" : payType,
|
||||
"product_amount_" : this.userPayData.userprice,
|
||||
}
|
||||
])
|
||||
},
|
||||
goPayH5() {
|
||||
let isMobile = this.util.isMobile();
|
||||
@@ -228,7 +236,14 @@ export default {
|
||||
if (res.success) {
|
||||
this.qrtext = '成功加入群的二维码';
|
||||
this.dialogSuccess = true;
|
||||
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"payment_finished",
|
||||
{
|
||||
"payType" : 'native',
|
||||
"product_amount_" : this.userPayData.userprice,
|
||||
}
|
||||
])
|
||||
} else if (res.fail) {
|
||||
this.dialogFail = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user