Authored by 张文文

卖家订单详情页添加优惠券金额 review by jun.qiu

... ... @@ -109,6 +109,10 @@ export default {
readContract: false,
};
},
components: {
CubeButton: Button,
CubeInput: Input
},
created() {
let { skup, code } = this.$route.params || {};
... ... @@ -126,19 +130,6 @@ export default {
couponCode: ''
});
},
computed: {
...mapState(['appraiseAddress', 'orderFeeInfo', 'selectCouponCode']),
stateCenterAddress() {
if (!this.centerAddress.address) {
this.centerAddress = get(this.appraiseAddress, this.orderCode) || {};
}
return this.centerAddress;
},
deliverDisable() {
return !(this.expressCode && this.readContract);
}
},
mounted() {
if (this.$yoho.isAliApp) {
this.canScan = true;
... ... @@ -222,6 +213,19 @@ export default {
}
);
},
computed: {
...mapState(['appraiseAddress', 'orderFeeInfo', 'selectCouponCode']),
stateCenterAddress() {
if (!this.centerAddress.address) {
this.centerAddress = get(this.appraiseAddress, this.orderCode) || {};
}
return this.centerAddress;
},
deliverDisable() {
return !(this.expressCode && this.readContract);
}
},
methods: {
...mapActions([
'fetchAppraiseAddress',
... ... @@ -325,10 +329,6 @@ export default {
this.toast('请输入正确的快递单号');
}
}
},
components: {
CubeButton: Button,
CubeInput: Input
}
};
</script>
... ...
... ... @@ -41,6 +41,10 @@
>
<span>{{ orderDetail.bankTransferFee }}</span>
</p>
<p class="coupon-fee" v-if="orderDetail.couponCutAmount">
<span class="label">优惠券:</span>
<span>{{ orderDetail.couponCutAmount }}</span>
</p>
<p>
<span class="label">实际收入:</span>
<span class="pay-price">{{ orderDetail.income }}</span>
... ... @@ -98,23 +102,23 @@
</template>
<script>
import { createNamespacedHelpers } from "vuex";
import { Button } from "cube-ui";
import Clipboard from "clipboard";
import { createNamespacedHelpers } from 'vuex';
import { Button } from 'cube-ui';
import Clipboard from 'clipboard';
import AddressInfo from "./components/sell-order-address-info";
import OrderItemInfo from "./components/order-detail-item";
import DetailHeader from "./components/header";
import DetailFooter from "./components//detail-footer";
import AddressInfo from './components/sell-order-address-info';
import OrderItemInfo from './components/order-detail-item';
import DetailHeader from './components/header';
import DetailFooter from './components//detail-footer';
import OrderActions from "../components/order-actions";
import OrderActions from '../components/order-actions';
import orderActionMixin from "../mixin/order-action";
import orderInSaleActionMixin from "../mixin/order-in-sale-action";
import orderActionMixin from '../mixin/order-action';
import orderInSaleActionMixin from '../mixin/order-in-sale-action';
import PlatformFeeInfo from "../components/platform-fee-info";
import PlatformFeeInfo from '../components/platform-fee-info';
const STORE_PATH = "order/orderDetail";
const STORE_PATH = 'order/orderDetail';
const { mapActions, mapState, mapGetters } = createNamespacedHelpers(
STORE_PATH
... ... @@ -140,36 +144,39 @@ export default {
return this.orderDetail.orderCode;
}
});
this.copyBtn.on("success", () => {
this.copyBtn.on('success', () => {
this.$createToast({
txt: "复制成功",
type: "txt"
txt: '复制成功',
type: 'txt'
}).show();
});
});
console.log('this.orderDetail======', this.orderDetail);
},
computed: {
...mapState(["orderDetail"]),
...mapState(['orderDetail']),
...mapGetters([
"lastExpressInfo",
"priceInfo",
"statusDetail",
"platformFee",
"actionList"
'lastExpressInfo',
'priceInfo',
'statusDetail',
'platformFee',
'actionList'
])
},
beforeRouteLeave(to, from, next) {
next();
},
methods: {
...mapActions(["fetchOrderDetail"]),
...mapActions(['fetchOrderDetail']),
onPlatformFee() {
const { platformFee = {} } = this.orderDetail;
this.$createDialog(
{
type: "alert",
title: "平台费用",
confirmBtn: { text: "我知道了" }
type: 'alert',
title: '平台费用',
confirmBtn: { text: '我知道了' }
},
createElement => {
return [
... ... @@ -177,24 +184,24 @@ export default {
props: {
platformFeeInfo: {
packageFee: platformFee.packageFee,
packageFeeDesc: "商品包装费",
packageFeeDesc: '商品包装费',
payChannelPercentage: platformFee.goodsPaymentRatePercent,
serviceFee: platformFee.serviceFee,
serviceFeeDesc: "平台服务费",
serviceFeeDesc: '平台服务费',
appraiseFee: platformFee.appraiseFee,
appraiseFeeDesc: "商品鉴定费"
appraiseFeeDesc: '商品鉴定费'
}
},
slot: "content"
slot: 'content'
})
];
}
).show();
},
onBack() {
if (this.from.name === "OrderPay") {
if (this.from.name === 'OrderPay') {
this.$router.replace({
name: "InSaleOrderList"
name: 'InSaleOrderList'
});
} else {
this.$router.back();
... ... @@ -314,6 +321,11 @@ export default {
color: #999;
}
.coupon-fee {
margin-bottom: 12px;
color: #999;
}
.pay-price {
color: #d0021b;
}
... ...