Commit 3e11df0d authored by 吴春's avatar 吴春

1

parent 9346b599
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<u-number-box :disabled="!skuObj" v-model="gc" :min="1" :max="goodamount" @change="valChange"></u-number-box> <u-number-box :disabled="!skuObj" v-model="gc" :min="1" :max="goodamount" @change="valChange"></u-number-box>
</view> </view>
<view class="btn-box" v-if="g.totalStock>0&& g.status==1 && (g.form_id == -1 || g.form_id ==0 ||g.form_id>1)"> <view class="btn-box" v-if="g.totalStock>0&& g.status==1 && (g.form_id == -1 || g.form_id ==0 ||g.form_id>1)">
<view style="flex: 1;" v-if="optionType != 1"> <view style="flex: 1;" v-if="(optionType != 1&&u.TenantId!=29)||(optionType != 1&&setting.is_show_cart==1&&u.TenantId==29)">
<u-button @click="joinCar" :ripple="true" :hair-line="false" :custom-style="btn1">加入购物车</u-button> <u-button @click="joinCar" :ripple="true" :hair-line="false" :custom-style="btn1">加入购物车</u-button>
</view> </view>
<view style="flex: 1;" v-if="optionType != 0"> <view style="flex: 1;" v-if="optionType != 0">
...@@ -171,6 +171,8 @@ ...@@ -171,6 +171,8 @@
}, },
sku: '', sku: '',
g: {}, g: {},
u: {},
setting: {},
skuObj: null, skuObj: null,
notStockGood: [], notStockGood: [],
forms: { forms: {
...@@ -188,9 +190,14 @@ ...@@ -188,9 +190,14 @@
}; };
}, },
mounted() { mounted() {
this.u = uni.getStorageSync("mall_UserInfo");
this.getGoodsInfo(); this.getGoodsInfo();
this.initConfig();
}, },
methods: { methods: {
initConfig() {
this.setting = uni.getStorageSync("basedata").mall.setting;
},
getGoodsInfo() { getGoodsInfo() {
this.request2({ this.request2({
url: '/api/AppletGoods/GetAppletGoodsInfo', url: '/api/AppletGoods/GetAppletGoodsInfo',
...@@ -227,6 +234,9 @@ ...@@ -227,6 +234,9 @@
this.btn1.borderRadius = '40px 0 0 40px'; this.btn1.borderRadius = '40px 0 0 40px';
this.btn2.borderRadius = '0 40px 40px 0'; this.btn2.borderRadius = '0 40px 40px 0';
} }
if (this.setting.is_show_cart == 0 && this.u.TenantId == 29) {
this.btn2.borderRadius = '40px 40px 40px 40px';
}
if (this.g.attr_groups && this.g.attr_groups.length > 0) { if (this.g.attr_groups && this.g.attr_groups.length > 0) {
this.g.attr_groups.forEach(x => { this.g.attr_groups.forEach(x => {
if (!this.skuObj) { if (!this.skuObj) {
......
...@@ -43,7 +43,6 @@ export default { ...@@ -43,7 +43,6 @@ export default {
}, },
getDataInfo() { getDataInfo() {
let that=this; let that=this;
console.log("that.payInfo",that.payInfo)
let msg = { let msg = {
OpenId: that.payInfo.OpenId, OpenId: that.payInfo.OpenId,
OrderId: that.payInfo.OrderId, OrderId: that.payInfo.OrderId,
......
<template> <template>
<view class="actionsheet" :style="{ 'padding-bottom': bian ? '28px' : '0px' }"> <view class="actionsheet" :style="{ 'padding-bottom': bian ? '28px' : '0px' }">
<view class="item" style="width:36px;" @click="goCart" v-if="formid!=1"> <view class="item" style="width:36px;" @click="goCart" v-if="formid!=1&&((setting.is_show_cart==1&&u.TenantId==29)||u.TenantId!=29)">
<view style="width: 22px; margin: auto;"><u-icon name="cart-o" size="44" :color="mc"></u-icon></view> <view style="width: 22px; margin: auto;"><u-icon name="cart-o" size="44" :color="mc"></u-icon></view>
<text class="text" :style="{ color: mc }">购物车</text> <text class="text" :style="{ color: mc }">购物车</text>
</view> </view>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<text class="text">收藏</text> <text class="text">收藏</text>
</view> </view>
<view class="item2" v-if="totalStock>0 && status==1 && formid!=1"> <view class="item2" v-if="totalStock>0 && status==1 && formid!=1">
<view style="flex: 1;"><u-button @click="joinCar" :ripple="true" :hair-line="false" :custom-style="btn1">加入购物车</u-button></view> <view style="flex: 1;" v-if="(setting.is_show_cart==1&&u.TenantId==29)||u.TenantId!=29"><u-button @click="joinCar" :ripple="true" :hair-line="false" :custom-style="btn1">加入购物车</u-button></view>
<view style="flex: 1;"><u-button @click="buy" :ripple="true" :hair-line="false" :custom-style="btn2">立即购买</u-button></view> <view style="flex: 1;"><u-button @click="buy" :ripple="true" :hair-line="false" :custom-style="btn2">立即购买</u-button></view>
</view> </view>
<view class="item2" v-if="totalStock>0 && status==1 && formid==1" @click='buy'> <view class="item2" v-if="totalStock>0 && status==1 && formid==1" @click='buy'>
...@@ -80,7 +80,8 @@ export default { ...@@ -80,7 +80,8 @@ export default {
favorStatus: false, favorStatus: false,
//是否显示登陆 //是否显示登陆
showAuth: false, showAuth: false,
u: {} u: {},
setting: {}
}; };
}, },
components: { components: {
...@@ -96,14 +97,22 @@ export default { ...@@ -96,14 +97,22 @@ export default {
this.getfu() this.getfu()
let t = getCurrentPages(); let t = getCurrentPages();
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
this.u=u;
let uid = u.UserId ? u.UserId : 0; let uid = u.UserId ? u.UserId : 0;
let Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0; let Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;
this.path = '/pages/index/index?id=' + this.goodId + "&user_id=" + uid+ "&Up=" + Up+'&JumpType=1'; this.path = '/pages/index/index?id=' + this.goodId + "&user_id=" + uid+ "&Up=" + Up+'&JumpType=1';
//console.log(t[t.length - 1]); //console.log(t[t.length - 1]);
this.favorStatus = this.favorite; this.favorStatus = this.favorite;
this.initConfig();
if (this.setting.is_show_cart == 0 && this.u.TenantId == 29) {
this.btn2.borderRadius = '40px 40px 40px 40px';
}
}, },
methods: { methods: {
initConfig() {
this.setting = uni.getStorageSync("basedata").mall.setting;
},
getfu(){ getfu(){
let fucolor = this.colorRgb(this.fu) ; let fucolor = this.colorRgb(this.fu) ;
var RgbValue = fucolor.replace("rgb(", "").replace(")", ""); var RgbValue = fucolor.replace("rgb(", "").replace(")", "");
......
...@@ -176,6 +176,13 @@ ...@@ -176,6 +176,13 @@
<text class="price">¥{{ goodPrice.toFixed(2) }}</text> <text class="price">¥{{ goodPrice.toFixed(2) }}</text>
</view> </view>
</view> </view>
<view class="filed" v-if="mallUserInfo.TenantId == 29&&depositPrice>0&&goodPrice!=depositPrice">
<view class="left">订金金额</view>
<view class="right">
<text class="price">¥{{ depositPrice.toFixed(2) }}</text>
</view>
</view>
<view class="filed"> <view class="filed">
<view class="left">运费</view> <view class="left">运费</view>
<view class="right"> <view class="right">
...@@ -335,6 +342,7 @@ ...@@ -335,6 +342,7 @@
}, },
expressPrice: 0.0, expressPrice: 0.0,
goodPrice: 0.0, goodPrice: 0.0,
depositPrice: 0.0,//2024-02-22 add by:W 订金金额
couponPrice: 0.0, couponPrice: 0.0,
cashPrice: 0.0, cashPrice: 0.0,
integral: { integral: {
...@@ -537,7 +545,13 @@ ...@@ -537,7 +545,13 @@
"&SmallShopId=" + SmallShopId + '&JumpType=4'; "&SmallShopId=" + SmallShopId + '&JumpType=4';
} else { } else {
that.payInfo.OrderId = res.data.OrderId; that.payInfo.OrderId = res.data.OrderId;
that.payInfo.total_price = that.ds.total_price; if(that.mallUserInfo.TenantId == 29){
that.payInfo.total_price = that.ds.pay_total_price;
}
else{
that.payInfo.total_price = that.ds.total_price;
}
if (that.formdata.Use_Deposit_Id != 0 && that.ds.total_price == 0) { //如果使用了储蓄卡 就直接支付成功 跳入支付结果 if (that.formdata.Use_Deposit_Id != 0 && that.ds.total_price == 0) { //如果使用了储蓄卡 就直接支付成功 跳入支付结果
uni.reLaunch({ uni.reLaunch({
url: '/pages/order-submit/pay-success?payInfo=' + JSON.stringify(that.payInfo) url: '/pages/order-submit/pay-success?payInfo=' + JSON.stringify(that.payInfo)
...@@ -700,6 +714,7 @@ ...@@ -700,6 +714,7 @@
this.ds = res.data; this.ds = res.data;
this.expressPrice = 0.0; this.expressPrice = 0.0;
this.goodPrice = 0.0; this.goodPrice = 0.0;
this.depositPrice = res.data.pay_total_price;
this.couponPrice = 0.0; this.couponPrice = 0.0;
this.cashPrice = 0.0; this.cashPrice = 0.0;
if (res.data.total_price < 0) { if (res.data.total_price < 0) {
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
class="image" class="image"
/> />
<view class="name">退货</view> <view class="name">退货</view>
<view class="tips">退回收到的商品</view> <view class="tips" v-if="mallUserInfo.TenantId!=29">退回收到的商品</view>
<view class="arrow"> <view class="arrow">
<u-icon name="arrow" size="32" color="#333"></u-icon> <u-icon name="arrow" size="32" color="#333"></u-icon>
</view> </view>
</view> </view>
<view class="item" @click="refundsHandler(2)"> <view class="item" @click="refundsHandler(2)" v-if="mallUserInfo.TenantId!=29">
<image <image
src="@/static/images/icon/huan.png" src="@/static/images/icon/huan.png"
mode="aspectFill" mode="aspectFill"
...@@ -56,13 +56,14 @@ export default { ...@@ -56,13 +56,14 @@ export default {
chosenId: 0, chosenId: 0,
good: {}, good: {},
loading: false, loading: false,
mallUserInfo: {}, //商城用户信息
}; };
}, },
onLoad(option) { onLoad(option) {
console.log("jump in"); console.log("jump in");
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
this.mallUserInfo = uni.getStorageSync('mall_UserInfo')
this.id = option.id || 98180; this.id = option.id || 98180;
console.log(this.id)
this.chosenId = option.chosenId; this.chosenId = option.chosenId;
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "选择售后类型", title: "选择售后类型",
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<view <view
style="margin-top: 40rpx;" style="margin-top: 40rpx;"
class="block" class="block"
v-if="d.ReOrderStatus=='3' || d.ReOrderStatus=='4'|| d.ReOrderStatus=='5'" v-if="(d.ReOrderStatus=='3' || d.ReOrderStatus=='4'|| d.ReOrderStatus=='5')&& mallUserInfo.TenantId!=29 "
> >
<view class="good-title">{{d.ReOrderStatus==3?'退货物流':'换货物流'}} </view> <view class="good-title">{{d.ReOrderStatus==3?'退货物流':'换货物流'}} </view>
<view class="filed"> <view class="filed">
...@@ -245,6 +245,7 @@ export default { ...@@ -245,6 +245,7 @@ export default {
mc: "", mc: "",
secondary: "", secondary: "",
headStyle: {}, headStyle: {},
mallUserInfo: {}, //商城用户信息
statusList: [ statusList: [
{ {
name: "申请售后", name: "申请售后",
...@@ -316,7 +317,7 @@ export default { ...@@ -316,7 +317,7 @@ export default {
let t = getCurrentPages(); let t = getCurrentPages();
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
this.uid = u.UserId ? u.UserId : 0; this.uid = u.UserId ? u.UserId : 0;
this.mallUserInfo = uni.getStorageSync('mall_UserInfo')
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "售后详情", title: "售后详情",
}); });
......
...@@ -10,9 +10,10 @@ ...@@ -10,9 +10,10 @@
</view> </view>
<view class="price"> <view class="price">
<text>单价:</text> <text>单价:</text>
<text style="color: #222; margin-right: 30rpx;">{{
good.Final_Price <text style="color: #222; margin-right: 30rpx;" >{{
}}</text> good.Final_Price
}}</text>
<text>购买数量:</text> <text>购买数量:</text>
<text style="color: #222;">{{ good.Number }}</text> <text style="color: #222;">{{ good.Number }}</text>
</view> </view>
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
<input <input
style='text-align: right;' style='text-align: right;'
type="number" type="number"
:disabled="mallUserInfo.TenantId==29"
v-model="forms.Refund" v-model="forms.Refund"
@blur='inputnum' @blur='inputnum'
placeholder="请输入退款金额" placeholder="请输入退款金额"
...@@ -41,7 +43,8 @@ ...@@ -41,7 +43,8 @@
<view class="apply"> <view class="apply">
<view class="title"> <view class="title">
<view class="left">申请原因</view> <view class="left">申请原因</view>
<view class="right">请您描述问题并上传收到的商品照片</view> <view class="right" v-if="mallUserInfo.TenantId!=29">请您描述问题并上传收到的商品照片</view>
<view class="right" v-else>请您描述问题</view>
</view> </view>
<view class="content"> <view class="content">
<textarea <textarea
...@@ -53,7 +56,7 @@ ...@@ -53,7 +56,7 @@
/> />
<view class="maxnum">{{ forms.Remark.length }}/150</view> <view class="maxnum">{{ forms.Remark.length }}/150</view>
</view> </view>
<view class="upload"> <view class="upload" v-if="mallUserInfo.TenantId!=29">
<u-upload <u-upload
:action="action" :action="action"
:file-list="fileList" :file-list="fileList"
...@@ -68,7 +71,7 @@ ...@@ -68,7 +71,7 @@
</view> </view>
</u-upload> </u-upload>
</view> </view>
<view style="color: #d81e06; font-size: 26rpx;" <view style="color: #d81e06; font-size: 26rpx;" v-if="mallUserInfo.TenantId!=29"
>为了帮您更好的解决问题,请务必上传照片凭证</view >为了帮您更好的解决问题,请务必上传照片凭证</view
> >
</view> </view>
...@@ -78,12 +81,12 @@ ...@@ -78,12 +81,12 @@
<view class="right active">原支付返回</view> <view class="right active">原支付返回</view>
</view> </view>
</view> </view>
<view class="apply"> <view class="apply" v-if="mallUserInfo.TenantId!=29">
<view class="title"> <view class="title">
<view class="left">返回方式</view> <view class="left">返回方式</view>
<view class="right active">快递返回</view> <view class="right active">快递返回</view>
</view> </view>
<view class="tips" style="text-align: left;"> <view class="tips" style="text-align: left;" >
<text <text
>商品寄回地址将在审核通过后以客服通知的形式告知,或者申请记录中查询。商铺不收取快递附加费。</text >商品寄回地址将在审核通过后以客服通知的形式告知,或者申请记录中查询。商铺不收取快递附加费。</text
> >
...@@ -154,12 +157,14 @@ export default { ...@@ -154,12 +157,14 @@ export default {
fontSize: "13px", fontSize: "13px",
width: "100%", width: "100%",
}, },
mallUserInfo: {}, //商城用户信息
action:this.host2+'/api/File/UploadTencent', action:this.host2+'/api/File/UploadTencent',
}; };
}, },
onLoad(option) { onLoad(option) {
console.log("jump in"); console.log("jump in");
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
this.mallUserInfo = uni.getStorageSync('mall_UserInfo')
this.id = option.id || 98180; this.id = option.id || 98180;
this.forms.Type = option.type || 1; this.forms.Type = option.type || 1;
this.forms.OrderDetialId = this.id; this.forms.OrderDetialId = this.id;
...@@ -186,7 +191,13 @@ export default { ...@@ -186,7 +191,13 @@ export default {
this.forms.ReNumber = res.data.Number; this.forms.ReNumber = res.data.Number;
if (this.forms.Type == 1) { if (this.forms.Type == 1) {
this.forms.Refund = res.data.Final_Price; if(this.mallUserInfo.TenantId == 29){
this.forms.Refund = res.data.PayIncome;
}
else{
this.forms.Refund = res.data.Final_Price;
}
} }
this.loading = false; this.loading = false;
uni.hideNavigationBarLoading(); uni.hideNavigationBarLoading();
...@@ -227,7 +238,9 @@ export default { ...@@ -227,7 +238,9 @@ export default {
} else if(that.forms.Refund<0){ } else if(that.forms.Refund<0){
msg = "亲,退款金额为正数"; msg = "亲,退款金额为正数";
}else if (that.forms.VoucherList.length == 0) { }else if (that.forms.VoucherList.length == 0) {
msg = "亲,请上传一张说明截图吧"; if(that.mallUserInfo.TenantId!=29){
msg = "亲,请上传一张说明截图吧";
}
} }
if (msg == "") { if (msg == "") {
...@@ -245,9 +258,17 @@ export default { ...@@ -245,9 +258,17 @@ export default {
confirmText: "查看记录", confirmText: "查看记录",
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
uni.reLaunch({ if(that.mallUserInfo.TenantId!=29){
url: "/pages/order/after-sale/refunds-list", uni.reLaunch({
}); url: "/pages/order/after-sale/refunds-list",
});
}
else{
uni.reLaunch({
url: "/pages/order/index/index?status=6",
});
}
} }
that.submitStatus = false; that.submitStatus = false;
}, },
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
<view class="listBox" v-for="(item, index) in g" :key="index"> <view class="listBox" v-for="(item, index) in g" :key="index">
<view class="listBox_t" @click="redirectToDetail(item)"> <view class="listBox_t" @click="redirectToDetail(item)">
<Text>订单号:{{ item.OrderNo }}</Text> <Text>订单号:{{ item.OrderNo }}</Text>
<Text style="color: gray;">{{ item.OrderStatusName }}</Text> <Text style="color: gray;" v-if="u.TenantId==29&&item.OrderStatus==3">待出团</Text>
<Text style="color: gray;" v-else>{{item.OrderStatusName }}</Text>
</view> </view>
<view class="listBox_c"> <view class="listBox_c">
<template v-if="item.DetailList.length == 1"> <template v-if="item.DetailList.length == 1">
...@@ -52,7 +53,18 @@ ...@@ -52,7 +53,18 @@
<text style="font-size: 10px;"></text> <text style="font-size: 10px;"></text>
<text style="font-size: 17px;">{{item.Income.toString().split(".")[0]}}</text> <text style="font-size: 17px;">{{item.Income.toString().split(".")[0]}}</text>
<text style="font-size: 11px;">.{{item.Income.toString().split(".")[1] || "00"}}</text> <text style="font-size: 11px;">.{{item.Income.toString().split(".")[1] || "00"}}</text>
<Text v-if="u.TenantId==29&&item.GoodsDepositMoney>0&&item.PayIncome<=0" style="padding-left: 10px;">订金金额:</Text>
<text style="font-size: 10px;" v-if="u.TenantId==29&&item.GoodsDepositMoney>0&&item.PayIncome<=0"></text>
<text style="font-size: 17px;" v-if="u.TenantId==29&&item.GoodsDepositMoney>0&&item.PayIncome<=0">{{item.GoodsDepositMoney.toString().split(".")[0]}}</text>
<text style="font-size: 11px;" v-if="u.TenantId==29&&item.GoodsDepositMoney>0&&item.PayIncome<=0">{{item.GoodsDepositMoney.toString().split(".")[1] || "00"}}</text>
<Text v-if="u.TenantId==29&&item.PayIncome>0" style="padding-left: 10px;">已付金额:</Text>
<text style="font-size: 10px;" v-if="u.TenantId==29&&item.PayIncome>0"></text>
<text style="font-size: 17px;" v-if="u.TenantId==29&&item.PayIncome>0">{{item.PayIncome.toString().split(".")[0]}}</text>
<text style="font-size: 11px;" v-if="u.TenantId==29&&item.PayIncome>0">{{item.PayIncome.toString().split(".")[1] || "00"}}</text>
</view> </view>
<!-- TODO 样式结构修改--> <!-- TODO 样式结构修改-->
<view class="handle"> <view class="handle">
<u-button shape="circle" size="medium" :custom-style="customStyle" v-on:click.stop="cancel(item, index)" v-if=" <u-button shape="circle" size="medium" :custom-style="customStyle" v-on:click.stop="cancel(item, index)" v-if="
...@@ -61,11 +73,12 @@ ...@@ -61,11 +73,12 @@
<u-button shape="circle" size="medium" :custom-style="customStyle" v-on:click.stop="cancel(item, index)" v-if="u.TenantId!=27&& <u-button shape="circle" size="medium" :custom-style="customStyle" v-on:click.stop="cancel(item, index)" v-if="u.TenantId!=27&&
item.OrderStatus == '1' || (item.OrderStatus == '2' && item.PresentFXGrade!=1&&u.TenantId!=27)">取消订单</u-button> item.OrderStatus == '1' || (item.OrderStatus == '2' && item.PresentFXGrade!=1&&u.TenantId!=27)">取消订单</u-button>
</view> </view>
<u-button shape="circle" size="medium" :custom-style="themCustomStyle" v-on:click.stop="payment(item)" v-if="item.OrderStatus == '1'">立即支付</u-button> <u-button shape="circle" size="medium" :custom-style="themCustomStyle" v-on:click.stop="payment(item)" v-if="item.OrderStatus == '1'||(item.ResultPayMoney>0&&item.OrderStatus==3)">立即支付</u-button>
<u-button shape="circle" size="medium" :custom-style="item.OrderStatus == '3' ? customStyle : themCustomStyle" <u-button shape="circle" size="medium" :custom-style="item.OrderStatus == '3' ? customStyle : themCustomStyle"
v-if="item.OrderStatus != '1'" @click.stop="buy(item)">再次购买</u-button> v-if="item.OrderStatus != '1'" @click.stop="buy(item)">再次购买</u-button>
<template v-if="u&&u.TenantId==29"> <template v-if="u&&u.TenantId==29">
<u-button shape="circle" size="medium" :custom-style="customStyle" v-if="item.OrderStatus == '3'" @click="shouhuoHandler(item.OrderId)">确认</u-button> <u-button shape="circle" size="medium" :custom-style="customStyle" v-if="item.OrderStatus == '3'&&item.PayIncome>=item.Income"
@click="shouhuoHandler(item.OrderId)">确认</u-button>
</template> </template>
<template v-else> <template v-else>
<u-button shape="circle" size="medium" :custom-style="customStyle" v-if="item.OrderStatus == '3'" @click="shouhuoHandler(item.OrderId)">确认收货</u-button> <u-button shape="circle" size="medium" :custom-style="customStyle" v-if="item.OrderStatus == '3'" @click="shouhuoHandler(item.OrderId)">确认收货</u-button>
...@@ -212,9 +225,11 @@ ...@@ -212,9 +225,11 @@
}, },
onLoad: function(option) { onLoad: function(option) {
this.current = 0; this.current = 0;
console.log("onLoad_option", option);
console.log("onLoad_option", option.status);
//option为object类型,会序列化上个页面传递的参数 //option为object类型,会序列化上个页面传递的参数
if (option && option.status && option.status != '') { if (option && option.status && option.status != '') {
this.current = option.status; this.current = Number(option.status);
} }
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) { if (!this.u) {
...@@ -231,6 +246,7 @@ ...@@ -231,6 +246,7 @@
getOrderStatus() { getOrderStatus() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.g = []; this.g = [];
var that = this;
this.payInfo.OpenId = uni.getStorageSync('mall_UserInfo').OpenId; this.payInfo.OpenId = uni.getStorageSync('mall_UserInfo').OpenId;
this.request2({ this.request2({
url: '/api/order/GetOrderStatusEnumList', url: '/api/order/GetOrderStatusEnumList',
...@@ -239,6 +255,7 @@ ...@@ -239,6 +255,7 @@
res => { res => {
uni.hideNavigationBarLoading(); uni.hideNavigationBarLoading();
if (res.resultCode == 1) { if (res.resultCode == 1) {
console.log("this.current", this.current);
this.isloading = false; this.isloading = false;
this.list = res.data; this.list = res.data;
let obj = { let obj = {
...@@ -246,7 +263,12 @@ ...@@ -246,7 +263,12 @@
Id: 0, Id: 0,
} }
this.list.unshift(obj) this.list.unshift(obj)
this.msg.OrderStatus = this.list[this.current].Id; var currentObj = this.list.find(x => {
return x.Id == that.current
});
if (currentObj && currentObj.Id) {
this.msg.OrderStatus = currentObj.Id;
}
this.init(); this.init();
} }
} }
...@@ -336,7 +358,7 @@ ...@@ -336,7 +358,7 @@
this.payInfo.OrderId = e.OrderId; this.payInfo.OrderId = e.OrderId;
this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0, 10); this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0, 10);
this.payInfo.PaymentWay = e.PaymentWay; this.payInfo.PaymentWay = e.PaymentWay;
this.payInfo.total_price = e.Income; this.payInfo.total_price = this.u.MallBaseId == 19 ? e.ResultPayMoney : e.Income;
this.StuId = e.JJSWStuId this.StuId = e.JJSWStuId
e.DetailList.forEach(item => { e.DetailList.forEach(item => {
list.push(item.EduTeacherId) list.push(item.EduTeacherId)
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</view> </view>
</template> </template>
<view style="margin-top: 20px;display: flex;flex-direction: row-reverse;align-items: center;"> <view style="margin-top: 20px;display: flex;flex-direction: row-reverse;align-items: center;">
<u-button shape="circle" size="medium" :custom-style="customStyle" @click="joinCart(x)">加购物车 <u-button shape="circle" v-if="u.TenantId!=29||(setting.is_show_cart==1&&u.TenantId==29)" size="medium" :custom-style="customStyle" @click="joinCart(x)">加购物车
</u-button> </u-button>
<view v-if="x.refund_status == 1" style="margin-right: 40rpx; font-size: 28rpx; color: gray;"> <view v-if="x.refund_status == 1" style="margin-right: 40rpx; font-size: 28rpx; color: gray;">
已申请售后({{ x.refund.status_text }}) 已申请售后({{ x.refund.status_text }})
...@@ -138,7 +138,15 @@ ...@@ -138,7 +138,15 @@
<view class="label">商品总额</view> <view class="label">商品总额</view>
<view class="content right">¥{{ orders.PreferPrice }}</view> <view class="content right">¥{{ orders.PreferPrice }}</view>
</view> </view>
<view class="field"> <view class="field" v-if="u.TenantId==29&&orders.GoodsDepositMoney>0">
<view class="label">订金金额</view>
<view class="content right">¥{{ orders.GoodsDepositMoney }}</view>
</view>
<view class="field" v-if="u.TenantId==29&&orders.PayIncome>0">
<view class="label">已付金额</view>
<view class="content right">¥{{ orders.PayIncome }}</view>
</view>
<view class="field" v-if="u.TenantId==29">
<view class="label">运费</view> <view class="label">运费</view>
<view class="content right">+¥{{ orders.FreightMoney }}</view> <view class="content right">+¥{{ orders.FreightMoney }}</view>
</view> </view>
...@@ -178,7 +186,7 @@ ...@@ -178,7 +186,7 @@
<view class="btn-box" v-if="orders.OrderStatus != '5'&&isShowBtn"> <view class="btn-box" v-if="orders.OrderStatus != '5'&&isShowBtn">
<view class="item" v-if="orders.OrderStatus == '3'"> <view class="item" v-if="orders.OrderStatus == '3'">
<template v-if="u&&u.TenantId==29"> <template v-if="u&&u.TenantId==29">
<u-button shape="circle" size="medium" @click="shouhuoHandler" :custom-style="themCustomStyle">确认 <u-button shape="circle" size="medium" @click="shouhuoHandler" :custom-style="themCustomStyle" v-if="orders.PayIncome>=orders.Income">确认
</u-button> </u-button>
</template> </template>
<template v-else> <template v-else>
...@@ -187,7 +195,7 @@ ...@@ -187,7 +195,7 @@
</template> </template>
</view> </view>
<view class="item" v-if="orders.OrderStatus == '1'"> <view class="item" v-if="orders.OrderStatus == '1'||(orders.ResultPayMoney>0&&orders.OrderStatus==3)">
<u-button shape="circle" size="medium" :custom-style="themCustomStyle" v-on:click.stop="payment(orders)">立即支付</u-button> <u-button shape="circle" size="medium" :custom-style="themCustomStyle" v-on:click.stop="payment(orders)">立即支付</u-button>
</view> </view>
<view class="item" v-if="orders.OrderStatus == '1' && orders.Income >0"> <view class="item" v-if="orders.OrderStatus == '1' && orders.Income >0">
...@@ -314,6 +322,7 @@ ...@@ -314,6 +322,7 @@
isShowBtn: true, isShowBtn: true,
path: '', path: '',
contentStr: "是否确认收货?", contentStr: "是否确认收货?",
setting: {},
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -340,9 +349,13 @@ ...@@ -340,9 +349,13 @@
} }
this.themCustomStyle.background = this.mc; this.themCustomStyle.background = this.mc;
this.init(); this.init();
this.initConfig();
}, },
methods: { methods: {
initConfig() {
this.setting = uni.getStorageSync("basedata").mall.setting;
},
onShareAppMessage() { onShareAppMessage() {
return { return {
title: this.zrName, title: this.zrName,
...@@ -514,7 +527,8 @@ ...@@ -514,7 +527,8 @@
this.payInfo.OrderId = e.OrderId; this.payInfo.OrderId = e.OrderId;
this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0, 10); this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0, 10);
this.payInfo.PaymentWay = e.PaymentWay; this.payInfo.PaymentWay = e.PaymentWay;
this.payInfo.total_price = e.Income; this.payInfo.total_price = this.u.TenantId == 29 ? e.ResultPayMoney: e.Income;
//this.payInfo.total_price = e.Income;
this.payBtn = true this.payBtn = true
}, },
exitPay() { exitPay() {
......
...@@ -79,26 +79,30 @@ ...@@ -79,26 +79,30 @@
float: right; float: right;
margin-left: 15px; margin-left: 15px;
} }
.payOrderBtn{
border:1px solid #00d6a6!important; .payOrderBtn {
border: 1px solid #00d6a6 !important;
} }
.order_Btn_inner .order_Btn_Com:first-child { .order_Btn_inner .order_Btn_Com:first-child {
margin-right: 0; margin-right: 0;
} }
.course-head{
width:100%; .course-head {
width: 100%;
} }
.order_TotalPrice{
.order_TotalPrice {
text-align: right; text-align: right;
margin-top:15px; margin-top: 15px;
font-size:13px; font-size: 13px;
} }
</style> </style>
<template> <template>
<view class="quick-box" style="height:100vh;"> <view class="quick-box" style="height:100vh;">
<view class="course-head"> <view class="course-head">
<u-tabs name="Name" :list="headData" v-if="headData&&headData.length>1" :is-scroll="false" :current="current" :bar-width="80" :font-size="28" <u-tabs name="Name" :list="headData" v-if="headData&&headData.length>1" :is-scroll="false" :current="current"
:active-color="mainColor" :bold="false" @change="getChild"></u-tabs> :bar-width="80" :font-size="28" :active-color="mainColor" :bold="false" @change="getChild"></u-tabs>
</view> </view>
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty> <u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty>
<scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;" :enable-back-to-top="true" :enable-flex="true" <scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;" :enable-back-to-top="true" :enable-flex="true"
...@@ -131,6 +135,7 @@ ...@@ -131,6 +135,7 @@
<view class="order_TotalPrice">应付金额:¥{{item.Income}}</view> <view class="order_TotalPrice">应付金额:¥{{item.Income}}</view>
<view class="order_BtnList"> <view class="order_BtnList">
<view class="order_Btn_inner"> <view class="order_Btn_inner">
<view class="order_EduBtn_Com payOrderBtn" v-if="item.OrderStatus==1" @click.stop="payment(item)" :style="{'color':mainColor}">立即支付</view> <view class="order_EduBtn_Com payOrderBtn" v-if="item.OrderStatus==1" @click.stop="payment(item)" :style="{'color':mainColor}">立即支付</view>
<view class="order_EduBtn_Com" v-if="item.OrderStatus==1" @click.stop="cancel(item,index)">取消订单</view> <view class="order_EduBtn_Com" v-if="item.OrderStatus==1" @click.stop="cancel(item,index)">取消订单</view>
<view class="order_EduBtn_Com payOrderBtn" v-if="item.OrderStatus==5||item.OrderStatus==7" :style="{'color':mainColor}">查看详情</view> <view class="order_EduBtn_Com payOrderBtn" v-if="item.OrderStatus==5||item.OrderStatus==7" :style="{'color':mainColor}">查看详情</view>
...@@ -197,12 +202,12 @@ ...@@ -197,12 +202,12 @@
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多了", nomore: "没有更多了",
}, },
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:5, pageSize: 5,
StartTime:'', StartTime: '',
EndTime:'', EndTime: '',
OrderStatus:0 OrderStatus: 0
}, },
headData: [], //头部切换数据 headData: [], //头部切换数据
current: 0, current: 0,
...@@ -222,9 +227,9 @@ ...@@ -222,9 +227,9 @@
OrderPayType: 1, OrderPayType: 1,
GoodsName: '' GoodsName: ''
}, },
payBtn:false, payBtn: false,
payExit:false, payExit: false,
showAuth:false showAuth: false
}; };
}, },
created() { created() {
...@@ -257,7 +262,7 @@ ...@@ -257,7 +262,7 @@
this.showAuth = true; this.showAuth = true;
} else { } else {
this.current = option.status || 0; this.current = option.status || 0;
this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId; this.payInfo.OpenId = uni.getStorageSync('mall_UserInfo').OpenId;
this.getHeadList(); this.getHeadList();
// this.getContent(); // this.getContent();
} }
...@@ -296,7 +301,7 @@ ...@@ -296,7 +301,7 @@
Name: '全部' Name: '全部'
} }
this.headData.unshift(obj) this.headData.unshift(obj)
this.msg.OrderStatus=this.headData[this.current].Id; this.msg.OrderStatus = this.headData[this.current].Id;
this.getContent(); this.getContent();
} }
} }
...@@ -351,7 +356,7 @@ ...@@ -351,7 +356,7 @@
cancel(e, index) { cancel(e, index) {
this.showModal = true; this.showModal = true;
this.Cancelmsg.Remark = '', this.Cancelmsg.Remark = '',
this.index = index; this.index = index;
this.subItem = e; this.subItem = e;
this.Cancelmsg.OrderId = e.OrderId; this.Cancelmsg.OrderId = e.OrderId;
this.Cancelmsg.Type = e.OrderStatus == 1 ? 1 : 2; this.Cancelmsg.Type = e.OrderStatus == 1 ? 1 : 2;
...@@ -404,7 +409,7 @@ ...@@ -404,7 +409,7 @@
let forms = {}; let forms = {};
let good = { let good = {
// MallId: y.MallId, // MallId: y.MallId,
DetailList: [], DetailList: [],
Use_Integral: 0, Use_Integral: 0,
User_Coupon_Id: 0, User_Coupon_Id: 0,
DeliveryMethod: 0, DeliveryMethod: 0,
...@@ -425,12 +430,12 @@ ...@@ -425,12 +430,12 @@
'&IsFormShoppingCart=2&ShoppingCartIdList=' + JSON.stringify(ShoppingCartIdList) '&IsFormShoppingCart=2&ShoppingCartIdList=' + JSON.stringify(ShoppingCartIdList)
}); });
}, },
payment(e){ payment(e) {
this.payInfo.OrderId = e.OrderId; this.payInfo.OrderId = e.OrderId;
this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0,10); this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0, 10);
this.payInfo.PaymentWay = e.PaymentWay; this.payInfo.PaymentWay = e.PaymentWay;
this.payInfo.total_price = e.Income; this.payInfo.total_price = e.Income;
this.payBtn=true this.payBtn = true
}, },
exitPay() { exitPay() {
this.payExit = false; this.payExit = false;
...@@ -440,17 +445,19 @@ ...@@ -440,17 +445,19 @@
this.payExit = true; this.payExit = true;
}, },
//跳转到详情 //跳转到详情
goDetail(item){ goDetail(item) {
uni.navigateTo({ url: '/pages/school/personal/orderDetail?OrderId='+item.OrderId}) uni.navigateTo({
url: '/pages/school/personal/orderDetail?OrderId=' + item.OrderId
})
}, },
//格式化日期 //格式化日期
getCreateTime(item){ getCreateTime(item) {
if(item){ if (item) {
let time='' let time = ''
var time1 = item.split("-").join("."); var time1 = item.split("-").join(".");
var time2 = time1.split(" ")[0]; var time2 = time1.split(" ")[0];
var time3 = item.split(" ")[1].substring(0,5); var time3 = item.split(" ")[1].substring(0, 5);
time = time2+' '+time3; time = time2 + ' ' + time3;
return time; return time;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment