全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug
This commit is contained in:
@@ -3,13 +3,10 @@
|
||||
<div class="priceChange" :class="change === true ? 'on' : ''">
|
||||
<div class="priceTitle">
|
||||
{{
|
||||
status === 0 || status === 2
|
||||
? orderInfo.refundStatus === 1
|
||||
? "立即退款"
|
||||
: "一键改价"
|
||||
: "订单备注"
|
||||
status === 0 || status === 2 ? orderInfo.refundStatus === 1 ? "立即退款" : "一键改价" : status === 1?"订单备注":"拒绝原因"
|
||||
}}
|
||||
<span class="iconfont icon-guanbi" @click="close"></span>
|
||||
<i class="el-icon-circle-close iconfonts" @click="close"></i>
|
||||
<!--<span class="iconfont icon-guanbi" @click="close"></span>-->
|
||||
</div>
|
||||
<div class="listChange" v-if="status === 0 || status === 2">
|
||||
<div
|
||||
@@ -68,6 +65,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listChange" v-else-if="status === 3">
|
||||
<textarea
|
||||
placeholder="请填写退款原因"
|
||||
v-model="reason" maxlength="100"
|
||||
></textarea>
|
||||
</div>
|
||||
<div class="listChange" v-else>
|
||||
<textarea
|
||||
:placeholder="
|
||||
@@ -77,11 +80,11 @@
|
||||
></textarea>
|
||||
</div>
|
||||
<div class="modify" @click="save">
|
||||
{{ orderInfo.refundStatus === 0 || status === 1 ? "立即修改" : "确认退款" }}
|
||||
</div>
|
||||
<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1 && status === 2">
|
||||
拒绝退款
|
||||
{{ orderInfo.refundStatus === 0 || status === 1 || status === 3 ? "立即提交" : "确认退款" }}
|
||||
</div>
|
||||
<!--<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1 && status === 2">-->
|
||||
<!--拒绝退款-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
<div class="maskModel" @touchmove.prevent v-show="change === true"></div>
|
||||
</div>
|
||||
@@ -109,7 +112,8 @@
|
||||
focus: false,
|
||||
price: 0,
|
||||
refundPrice: 0,
|
||||
remark: ""
|
||||
remark: "",
|
||||
reason: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -131,14 +135,17 @@
|
||||
this.$emit("closechange", false);
|
||||
},
|
||||
save() {
|
||||
this.savePrice({
|
||||
price: this.price,
|
||||
refundPrice: this.refundPrice,
|
||||
type: 1,
|
||||
remark: this.remark,
|
||||
id: this.orderInfo.id,
|
||||
orderId: this.orderInfo.orderId
|
||||
})
|
||||
if(this.status === 3) {
|
||||
this.refuse();
|
||||
}else{
|
||||
this.savePrice({
|
||||
price: this.price,
|
||||
refundPrice: this.refundPrice,
|
||||
type: 1,
|
||||
remark: this.remark,
|
||||
orderId: this.orderInfo.orderId
|
||||
})
|
||||
}
|
||||
},
|
||||
async savePrice(opt) {
|
||||
let that = this,
|
||||
@@ -159,7 +166,7 @@
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.price = price;
|
||||
data.orderId = opt.orderId;
|
||||
data.orderNo = opt.orderId;
|
||||
editPriceApi(data).then(() => {
|
||||
// that.change = false;
|
||||
this.$emit("closechange", false);
|
||||
@@ -182,7 +189,7 @@
|
||||
}
|
||||
data.amount = refundPrice;
|
||||
data.type = opt.type;
|
||||
data.orderId = opt.id;
|
||||
data.orderNo = opt.orderId;
|
||||
orderRefundApi(data).then(
|
||||
res => {
|
||||
this.$emit("closechange", false);
|
||||
@@ -205,7 +212,7 @@
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.mark = remark;
|
||||
data.id = opt.id;
|
||||
data.orderNo = opt.orderId;
|
||||
orderMarkApi(data).then(
|
||||
res => {
|
||||
this.$emit("closechange", false);
|
||||
@@ -222,9 +229,16 @@
|
||||
);
|
||||
}
|
||||
},
|
||||
refuse: function () {
|
||||
let that = this;
|
||||
that.$emit("getRefuse", this.orderInfo.id);
|
||||
async refuse() {
|
||||
let reason= this.reason;
|
||||
try {
|
||||
await this.$validator({
|
||||
reason: [required(required.message("备注"))]
|
||||
}).validate({reason});
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
this.$emit("getRefuse", this.orderInfo.orderId, reason);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -235,7 +249,7 @@
|
||||
transform: scale(0);opacity:0;}
|
||||
.priceChange.on{opacity:1;transform: scale(1);-webkit-transform:scale(1);-o-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);}
|
||||
.priceChange .priceTitle{background:url("../../../assets/imgs/pricetitle.jpg") no-repeat;background-size:100% 100%;width:100%;height:1.6rem;border-radius:0.1rem 0.1rem 0 0;text-align:center;font-size:0.4rem;color:#fff;line-height:1.6rem;position:relative;}
|
||||
.priceChange .priceTitle .iconfont{position:absolute;font-size:0.4rem;right:0.26rem;top:0.23rem;width:0.4rem;height:0.4rem;line-height:0.4rem;}
|
||||
.priceChange .priceTitle .iconfonts{position:absolute;font-size:0.4rem;right:0.26rem;top:0.23rem;width:0.4rem;height:0.4rem;line-height:0.4rem;}
|
||||
.priceChange .listChange{padding:0 0.4rem;}
|
||||
.priceChange .listChange .item{height:1.03rem;border-bottom:1px solid #e3e3e3;font-size:0.32rem;color:#333;}
|
||||
.priceChange .listChange .item .money{color:#666;width:3rem;text-align:right;}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-show="iShidden === false">
|
||||
<div class="WriteOff">
|
||||
<div class="pictrue"><img :src="orderInfo.storeOrderInfoVos[0].info.productInfo.image" /></div>
|
||||
<div class="pictrue"><img :src="orderInfo.storeOrderInfoVos[0].info.image" /></div>
|
||||
<div class="num acea-row row-center-wrapper">
|
||||
{{ orderInfo.orderId }}
|
||||
<div class="views" @click="toDetail(orderInfo)">
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
methods: {
|
||||
toDetail: function(item) {
|
||||
this.$router.push({
|
||||
path: "/javaMobile/orderDetail/" + item.id + "/looks"
|
||||
path: "/javaMobile/orderDetail/" + item.orderId + "/looks"
|
||||
});
|
||||
},
|
||||
cancel: function() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="order-num acea-row row-between-wrapper">
|
||||
<div class="num line1">订单号:{{ orderId }}</div>
|
||||
<div class="name line1">
|
||||
<span class="iconfont icon-yonghu2"></span>{{ delivery.user.nickname }}
|
||||
<span class="iconfont icon-yonghu2"></span>{{ delivery.nickname }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="address">
|
||||
@@ -34,10 +34,10 @@
|
||||
<div class="list" v-show="active === 0">
|
||||
<div class="item acea-row row-between-wrapper">
|
||||
<div>发货方式</div>
|
||||
<select class="mode" v-model="expressId">
|
||||
<select class="mode" v-model="expressCode">
|
||||
<option value="">选择快递公司</option>
|
||||
<option
|
||||
:value="item.id"
|
||||
:value="item.code"
|
||||
v-for="(item, index) in express"
|
||||
:key="index"
|
||||
>{{ item.name }}</option
|
||||
@@ -50,7 +50,7 @@
|
||||
<input
|
||||
type="text"
|
||||
placeholder="填写快递单号"
|
||||
v-model="expressCode"
|
||||
v-model="expressNumber"
|
||||
class="mode"
|
||||
/>
|
||||
</div>
|
||||
@@ -61,7 +61,7 @@
|
||||
<input
|
||||
type="text"
|
||||
placeholder="填写送货人"
|
||||
v-model="expressId"
|
||||
v-model="deliveryName"
|
||||
class="mode"
|
||||
/>
|
||||
</div>
|
||||
@@ -70,7 +70,7 @@
|
||||
<input
|
||||
type="text"
|
||||
placeholder="填写送货电话"
|
||||
v-model="expressCode"
|
||||
v-model="deliveryTel"
|
||||
class="mode"
|
||||
/>
|
||||
</div>
|
||||
@@ -111,8 +111,10 @@ export default {
|
||||
delivery: {},
|
||||
express: [],
|
||||
type: "1",
|
||||
expressId: "",
|
||||
expressCode: ""
|
||||
deliveryName: "",
|
||||
expressCode: "",
|
||||
expressNumber: '',
|
||||
deliveryTel: ""
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -133,14 +135,16 @@ export default {
|
||||
this.getLogistics();
|
||||
},
|
||||
methods: {
|
||||
changeType: function(item, index) {
|
||||
changeType(item, index) {
|
||||
this.active = index;
|
||||
this.type = item.type;
|
||||
this.expressId = "";
|
||||
this.deliveryName = "";
|
||||
this.deliveryTel = "";
|
||||
this.expressCode = "";
|
||||
this.expressNumber = "";
|
||||
},
|
||||
getIndex() {
|
||||
orderDetailApi({ id: this.$route.params.id }).then(res => {
|
||||
orderDetailApi({ orderNo: this.orderId }).then(res => {
|
||||
this.delivery = res
|
||||
}).catch((error)=>{
|
||||
this.$dialog.error(error.message);
|
||||
@@ -152,14 +156,29 @@ export default {
|
||||
})
|
||||
},
|
||||
async saveInfo() {
|
||||
// type: '1',
|
||||
// expressRecordType: '1',
|
||||
// expressId: '',
|
||||
// expressCode: '',
|
||||
// deliveryName: '',
|
||||
// deliveryTel: '',
|
||||
// // expressName: '',
|
||||
// expressNumber: '',
|
||||
// expressTempId: '',
|
||||
// toAddr: '',
|
||||
// toName: '',
|
||||
// toTel: '',
|
||||
// orderNo: ''
|
||||
|
||||
|
||||
let that = this,
|
||||
type = that.type,
|
||||
expressId = that.expressId,
|
||||
expressCode = that.expressCode,
|
||||
deliveryName = that.deliveryName,
|
||||
deliveryTel = that.deliveryTel,
|
||||
save = {};
|
||||
save.id = that.$route.params.id;
|
||||
save.type = that.type;
|
||||
switch (type) {
|
||||
save.orderNo = that.orderId;
|
||||
|
||||
switch (that.type) {
|
||||
case "1":
|
||||
// try {
|
||||
// await this.$validator({
|
||||
@@ -169,24 +188,24 @@ export default {
|
||||
// } catch (e) {
|
||||
// return validatorDefaultCatch(e);
|
||||
// }
|
||||
if( !that.expressId ) return that.$dialog.error('请输入快递公司');
|
||||
if( !that.expressCode ) return that.$dialog.error('请输入快递单号');
|
||||
save.expressId = expressId;
|
||||
save.expressCode = expressCode;
|
||||
save.id = this.$route.params.id;
|
||||
if( !that.expressCode ) return that.$dialog.error('请输入快递公司');
|
||||
if( !that.expressNumber ) return that.$dialog.error('请输入快递单号');
|
||||
save.expressNumber = that.expressNumber;
|
||||
save.expressRecordType = 1;
|
||||
save.expressCode = that.expressCode;
|
||||
that.setInfo(save);
|
||||
break;
|
||||
case "2":
|
||||
try {
|
||||
await this.$validator({
|
||||
expressId: [required(required.message("发货人姓名"))],
|
||||
expressCode: [required(required.message("发货人电话"))]
|
||||
}).validate({ expressId, expressCode });
|
||||
deliveryName: [required(required.message("发货人姓名"))],
|
||||
deliveryTel: [required(required.message("发货人电话"))]
|
||||
}).validate({ deliveryName, deliveryTel });
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
save.expressId = expressId;
|
||||
save.expressCode = expressCode;
|
||||
save.deliveryName = deliveryName;
|
||||
save.deliveryTel = deliveryTel;
|
||||
that.setInfo(save);
|
||||
break;
|
||||
case "3":
|
||||
|
||||
@@ -43,19 +43,19 @@
|
||||
>
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div class="pictrue">
|
||||
<img :src="item.info.productInfo.image"/>
|
||||
<img :src="item.info.image"/>
|
||||
</div>
|
||||
<div class="text">
|
||||
<div class="info line2">
|
||||
{{ item.info.productInfo.storeName }}
|
||||
{{ item.info.productName }}
|
||||
</div>
|
||||
<div class="attr">{{ item.info.productInfo.attrInfo.suk }}</div>
|
||||
<div class="attr">{{ item.info.sku }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="money">
|
||||
<div class="x-money">¥{{ item.info.productInfo.price }}</div>
|
||||
<div class="num">x{{ item.info.cartNum }}</div>
|
||||
<div class="y-money">¥{{ item.info.productInfo.otPrice }}</div>
|
||||
<div class="x-money">¥{{ item.info.price }}</div>
|
||||
<div class="num">x{{ item.info.payNum }}</div>
|
||||
<!--<div class="y-money">¥{{ item.info.price }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -249,7 +249,7 @@ export default {
|
||||
},
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
orderDetailApi({id: this.$route.params.id}).then(
|
||||
orderDetailApi({orderNo: this.$route.params.id}).then(
|
||||
res => {
|
||||
that.orderInfo = res;
|
||||
that.types = res.statusStr.key;
|
||||
|
||||
@@ -63,20 +63,20 @@
|
||||
>
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div class="pictrue">
|
||||
<img :src="val.info.productInfo.image" />
|
||||
<img :src="val.info.image" />
|
||||
</div>
|
||||
<div class="text ">
|
||||
<div class="info line2">
|
||||
{{ val.info.productInfo.storeName }}
|
||||
{{ val.info.productName }}
|
||||
</div>
|
||||
<div class="attr" v-if="val.info.productInfo.attrInfo.suk">
|
||||
{{ val.info.productInfo.attrInfo.suk }}
|
||||
<div class="attr" v-if="val.info.sku">
|
||||
{{ val.info.sku }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="money">
|
||||
<div class="x-money">¥{{ val.info.productInfo.attrInfo.price }}</div>
|
||||
<div class="num">x{{ val.info.cartNum }}</div>
|
||||
<div class="x-money">¥{{ val.info.price }}</div>
|
||||
<div class="num">x{{ val.info.payNum }}</div>
|
||||
<div class="y-money">
|
||||
<!--¥{{ val.info.productInfo.attrInfo.otPrice }}-->
|
||||
</div>
|
||||
@@ -113,6 +113,13 @@
|
||||
>
|
||||
立即退款
|
||||
</div>
|
||||
<div
|
||||
class="bnt"
|
||||
@click="modify(item, 3)"
|
||||
v-if="where.status === 'refunding' && item.refundStatus === 1"
|
||||
>
|
||||
拒绝退款
|
||||
</div>
|
||||
<!--<div-->
|
||||
<!--class="bnt cancel"-->
|
||||
<!--v-if="item.pay_type === 'offline' && item.paid === 0"-->
|
||||
@@ -147,6 +154,7 @@
|
||||
:orderInfo="orderInfo"
|
||||
v-on:closechange="changeclose($event)"
|
||||
:status="status"
|
||||
@getRefuse="getRefuse"
|
||||
></PriceChange>
|
||||
</div>
|
||||
</template>
|
||||
@@ -220,13 +228,13 @@
|
||||
this.init()
|
||||
},
|
||||
// 拒绝退款
|
||||
getRefuse(id) {
|
||||
orderRefuseApi(data).then(() =>{
|
||||
that.change = false;
|
||||
that.$dialog.success("已拒绝退款");
|
||||
that.init();
|
||||
getRefuse(id, reason) {
|
||||
orderRefuseApi({ orderNo: id, reason: reason}).then(() =>{
|
||||
this.change = false;
|
||||
this.$dialog.success("已拒绝退款");
|
||||
this.init();
|
||||
}).catch((error) => {
|
||||
that.$dialog.error(error.message);
|
||||
this.$dialog.error(error.message);
|
||||
});
|
||||
},
|
||||
async savePrice(opt) {
|
||||
@@ -247,7 +255,7 @@
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.price = price;
|
||||
data.orderId = opt.orderId;
|
||||
data.orderNo = opt.orderId;
|
||||
editPriceApi(data).then(() =>{
|
||||
that.change = false;
|
||||
that.$dialog.success("改价成功");
|
||||
@@ -268,7 +276,7 @@
|
||||
}
|
||||
data.amount = refundPrice;
|
||||
data.type = opt.type;
|
||||
data.orderId = opt.orderId;
|
||||
data.orderNo = opt.orderId;
|
||||
orderRefundApi(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
@@ -289,7 +297,7 @@
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.mark = remark;
|
||||
data.id = opt.id;
|
||||
data.orderNo = opt.orderId;
|
||||
orderMarkApi(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
@@ -317,8 +325,8 @@
|
||||
orderListApi(this.where).then(
|
||||
res => {
|
||||
this.loading = false;
|
||||
this.loaded = res.list.list.length < this.where.limit;
|
||||
this.list.push.apply(this.list, res.list.list);
|
||||
this.loaded = res.list.length < this.where.limit;
|
||||
this.list.push.apply(this.list, res.list);
|
||||
this.where.page = this.where.page + 1;
|
||||
},
|
||||
err => {
|
||||
@@ -333,7 +341,7 @@
|
||||
}
|
||||
},
|
||||
toDetail(item) {
|
||||
this.$router.push({ path: "/javaMobile/orderDetail/" + item.id });
|
||||
this.$router.push({ path: "/javaMobile/orderDetail/" + item.orderId });
|
||||
},
|
||||
offlinePay(item) {
|
||||
// setOfflinePay({ order_id: item.order_id }).then(
|
||||
|
||||
Reference in New Issue
Block a user