123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932 |
- <template>
- <view :style="colorStyle">
- <view class='order-details'>
- <view v-if="orderInfo && orderInfo.invoice" class='header bg-color acea-row row-middle'>
- <view class='iconfont icon-fapiao1'></view>
- <view class='data'>
- <view class='state'>{{orderInfo.invoice.is_invoice ? '已开票' : '未开票'}}</view>
- <view>{{orderInfo.invoice.add_time}}</view>
- </view>
- </view>
- <view v-if="orderInfo && orderInfo.invoice" class="wrapper">
- <view class="item acea-row row-between-wrapper">
- <view>发票类型</view>
- <view class="conter">{{orderInfo.invoice.type === 1 ? '增值税电子普通发票' : '增值税电子专用发票'}}</view>
- </view>
- <view class="item acea-row row-between-wrapper">
- <view>发票抬头</view>
- <view class="conter">{{orderInfo.invoice.name}}</view>
- </view>
- <view v-if="orderInfo.invoice.duty_number" class="item acea-row row-between-wrapper">
- <view>税号</view>
- <view class="conter">{{orderInfo.invoice.duty_number}}</view>
- </view>
- <view class="item acea-row row-between-wrapper">
- <view>手机号</view>
- <view class="conter">{{orderInfo.invoice.drawer_phone}}</view>
- </view>
- <view class="item acea-row row-between-wrapper">
- <view>邮箱</view>
- <view class="conter">{{orderInfo.invoice.email}}</view>
- </view>
- <template v-if="orderInfo.invoice.type === 2">
- <view class="item acea-row row-between-wrapper">
- <view>开户银行</view>
- <view class="conter">{{orderInfo.invoice.bank}}</view>
- </view>
- <view class="item acea-row row-between-wrapper">
- <view>银行账号</view>
- <view class="conter">{{orderInfo.invoice.card_number}}</view>
- </view>
- <view class="item acea-row row-between-wrapper">
- <view>企业地址</view>
- <view class="conter">{{orderInfo.invoice.address}}</view>
- </view>
- <view class="item acea-row row-between-wrapper">
- <view>企业电话</view>
- <view class="conter">{{orderInfo.invoice.tell}}</view>
- </view>
- </template>
- <view class="item acea-row row-between-wrapper" v-if='orderInfo.invoice.invoice_number'>
- <view>发票编号</view>
- <view class="conter">{{orderInfo.invoice.invoice_number}}</view>
- </view>
- <view class="item acea-row row-between-wrapper" v-if='orderInfo.invoice.remark'>
- <view>发票备注</view>
- <view class="conter">{{orderInfo.invoice.remark}}</view>
- </view>
- </view>
- <orderGoods :evaluate='evaluate' :orderId="order_id" :cartInfo="cartInfo" :jump="true"></orderGoods>
- <view class='wrapper'>
- <view class='item acea-row row-between'>
- <view>订单编号:</view>
- <view class='conter acea-row row-middle row-right'>{{orderInfo.order_id}}
- <!-- #ifndef H5 -->
- <text class='copy' @tap='copy'>复制</text>
- <!-- #endif -->
- <!-- #ifdef H5 -->
- <text class='copy copy-data' :data-clipboard-text="orderInfo.order_id">复制</text>
- <!-- #endif -->
- </view>
- </view>
- <view class='item acea-row row-between'>
- <view>下单时间:</view>
- <view class='conter'>{{(orderInfo.add_time_y || '') +' '+(orderInfo.add_time_h || 0)}}</view>
- </view>
- <view class='item acea-row row-between'>
- <view>支付状态:</view>
- <view class='conter' v-if="orderInfo.paid">已支付</view>
- <view class='conter' v-else>未支付</view>
- </view>
- <view class='item acea-row row-between'>
- <view>支付方式:</view>
- <view class='conter'>{{orderInfo._status._payType}}</view>
- </view>
- <view class='item acea-row row-between' v-if="orderInfo.mark">
- <view>买家留言:</view>
- <view class='conter'>{{orderInfo.mark}}</view>
- </view>
- <view class='item acea-row row-between' v-if="orderInfo.fictitious_content">
- <view>备注:</view>
- <view class='conter'>{{orderInfo.fictitious_content}}</view>
- </view>
- </view>
- <!-- 退款订单详情 -->
- <view class='wrapper' v-if="isGoodsReturn">
- <view class='item acea-row row-between'>
- <view>收货人:</view>
- <view class='conter'>{{orderInfo.real_name}}</view>
- </view>
- <view class='item acea-row row-between'>
- <view>联系电话:</view>
- <view class='conter'>{{orderInfo.user_phone}}</view>
- </view>
- <view class='item acea-row row-between'>
- <view>收货地址:</view>
- <view class='conter'>{{orderInfo.user_address}}</view>
- </view>
- </view>
- <view v-if="orderInfo.status!=0">
- <view class='wrapper' v-if='orderInfo.delivery_type=="express"'>
- <view class='item acea-row row-between'>
- <view>配送方式:</view>
- <view class='conter'>发货</view>
- </view>
- <view class='item acea-row row-between'>
- <view>快递公司:</view>
- <view class='conter'>{{orderInfo.delivery_name || ''}}</view>
- </view>
- <view class='item acea-row row-between'>
- <view>快递号:</view>
- <view class='conter'>{{orderInfo.delivery_id || ''}}</view>
- </view>
- </view>
- <view class='wrapper' v-else-if='orderInfo.delivery_type=="send"'>
- <view class='item acea-row row-between'>
- <view>配送方式:</view>
- <view class='conter'>送货</view>
- </view>
- <view class='item acea-row row-between'>
- <view>配送人姓名:</view>
- <view class='conter'>{{orderInfo.delivery_name || ''}}</view>
- </view>
- <view class='item acea-row row-between'>
- <view>联系电话:</view>
- <view class='conter acea-row row-middle row-right'>{{orderInfo.delivery_id || ''}}<text class='copy' @tap='goTel'>拨打</text></view>
- </view>
- </view>
- <view class='wrapper' v-else-if='orderInfo.delivery_type=="fictitious"'>
- <view class='item acea-row row-between'>
- <view>虚拟发货:</view>
- <view class='conter'>已发货,请注意查收</view>
- </view>
- </view>
- </view>
- <view class='wrapper'>
- <view class='item acea-row row-between'>
- <view>支付金额:</view>
- <view class='conter'>¥{{orderInfo.pay_price}}</view>
- </view>
- <view class='item acea-row row-between' v-if='orderInfo.coupon_id'>
- <view>优惠券抵扣:</view>
- <view class='conter'>-¥{{orderInfo.coupon_price}}</view>
- </view>
- <view class='item acea-row row-between' v-if="orderInfo.use_integral > 0">
- <view>积分抵扣:</view>
- <view class='conter'>-¥{{orderInfo.deduction_price}}</view>
- </view>
- <view class='item acea-row row-between' v-if="orderInfo.pay_postage > 0">
- <view>运费:</view>
- <view class='conter'>¥{{orderInfo.pay_postage}}</view>
- </view>
- </view>
- </view>
- <home v-if="navigation"></home>
- <!-- #ifdef MP -->
- <!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
- <!-- #endif -->
- </view>
- </template>
- <style scoped lang="scss">
- .goodCall {
- color: #e93323;
- text-align: center;
- width: 100%;
- height: 86rpx;
- padding: 0 30rpx;
- border-bottom: 1rpx solid #eee;
- font-size: 30rpx;
- line-height: 86rpx;
- background: #fff;
- .icon-kefu {
- font-size: 36rpx;
- margin-right: 15rpx;
- }
- /* #ifdef MP */
- button {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 86rpx;
- font-size: 30rpx;
- color: #e93323;
- }
- /* #endif */
- }
- .order-details .header {
- padding: 0 30rpx;
- height: 150rpx;
- }
- .order-details .header.on {
- background-color: #666 !important;
- }
- .order-details .header .iconfont {
- font-size: 70rpx;
- color: #fff;
- }
- .order-details .header .data {
- color: rgba(255, 255, 255, 0.8);
- font-size: 24rpx;
- margin-left: 27rpx;
- }
- .order-details .header .data.on {
- margin-left: 0;
- }
- .order-details .header .data .state {
- font-size: 30rpx;
- font-weight: bold;
- color: #fff;
- margin-bottom: 7rpx;
- }
- .order-details .header .data .time {
- margin-left: 20rpx;
- }
- .order-details .nav {
- background-color: #fff;
- font-size: 26rpx;
- color: #282828;
- padding: 25rpx 0;
- }
- .order-details .nav .navCon {
- padding: 0 40rpx;
- }
- .order-details .nav .on {
- color: #e93323;
- }
- .order-details .nav .progress {
- padding: 0 65rpx;
- margin-top: 10rpx;
- }
- .order-details .nav .progress .line {
- width: 100rpx;
- height: 2rpx;
- background-color: #939390;
- }
- .order-details .nav .progress .iconfont {
- font-size: 25rpx;
- color: #939390;
- margin-top: -2rpx;
- }
- .order-details .address {
- font-size: 26rpx;
- color: #868686;
- background-color: #fff;
- margin-top: 13rpx;
- padding: 35rpx 30rpx;
- }
- .order-details .address .name {
- font-size: 30rpx;
- color: #282828;
- margin-bottom: 15rpx;
- }
- .order-details .address .name .phone {
- margin-left: 40rpx;
- }
- .order-details .line {
- width: 100%;
- height: 3rpx;
- }
- .order-details .line image {
- width: 100%;
- height: 100%;
- display: block;
- }
- .order-details .wrapper {
- background-color: #fff;
- margin-top: 12rpx;
- padding: 30rpx;
- }
- .order-details .wrapper .item {
- font-size: 28rpx;
- color: #282828;
- }
- .order-details .wrapper .item~.item {
- margin-top: 20rpx;
- }
- .order-details .wrapper .item .conter {
- color: #868686;
- width: 460rpx;
- text-align: right;
- }
- .order-details .wrapper .item .conter .copy {
- font-size: 20rpx;
- color: #333;
- border-radius: 3rpx;
- border: 1rpx solid #666;
- padding: 3rpx 15rpx;
- margin-left: 24rpx;
- }
- .order-details .wrapper .actualPay {
- border-top: 1rpx solid #eee;
- margin-top: 30rpx;
- padding-top: 30rpx;
- }
- .order-details .wrapper .actualPay .money {
- font-weight: bold;
- font-size: 30rpx;
- }
- .order-details .footer {
- width: 100%;
- height: 100rpx;
- position: fixed;
- bottom: 0;
- left: 0;
- background-color: #fff;
- padding: 0 30rpx;
- box-sizing: border-box;
- }
- .order-details .footer .bnt {
- width: 176rpx;
- height: 60rpx;
- text-align: center;
- line-height: 60rpx;
- border-radius: 50rpx;
- color: #fff;
- font-size: 27rpx;
- }
- .order-details .footer .bnt.cancel {
- color: #aaa;
- border: 1rpx solid #ddd;
- }
- .order-details .footer .bnt~.bnt {
- margin-left: 18rpx;
- }
- .order-details .writeOff {
- background-color: #fff;
- margin-top: 13rpx;
- padding-bottom: 30rpx;
- }
- .order-details .writeOff .title {
- font-size: 30rpx;
- color: #282828;
- height: 87rpx;
- border-bottom: 1px solid #f0f0f0;
- padding: 0 30rpx;
- line-height: 87rpx;
- }
- .order-details .writeOff .grayBg {
- background-color: #f2f5f7;
- width: 590rpx;
- height: 384rpx;
- border-radius: 20rpx 20rpx 0 0;
- margin: 50rpx auto 0 auto;
- padding-top: 55rpx;
- position: relative;
- }
- .order-details .writeOff .grayBg .written {
- position: absolute;
- top: 0;
- right: 0;
- width: 60rpx;
- height: 60rpx;
- }
- .order-details .writeOff .grayBg .written image {
- width: 100%;
- height: 100%;
- }
- .order-details .writeOff .grayBg .pictrue {
- width: 290rpx;
- height: 290rpx;
- margin: 0 auto;
- }
- .order-details .writeOff .grayBg .pictrue image {
- width: 100%;
- height: 100%;
- display: block;
- }
- .order-details .writeOff .gear {
- width: 590rpx;
- height: 30rpx;
- margin: 0 auto;
- }
- .order-details .writeOff .gear image {
- width: 100%;
- height: 100%;
- display: block;
- }
- .order-details .writeOff .num {
- background-color: #f0c34c;
- width: 590rpx;
- height: 84rpx;
- color: #282828;
- font-size: 48rpx;
- margin: 0 auto;
- border-radius: 0 0 20rpx 20rpx;
- text-align: center;
- padding-top: 4rpx;
- }
- .order-details .writeOff .rules {
- margin: 46rpx 30rpx 0 30rpx;
- border-top: 1px solid #f0f0f0;
- padding-top: 10rpx;
- }
- .order-details .writeOff .rules .item {
- margin-top: 20rpx;
- }
- .order-details .writeOff .rules .item .rulesTitle {
- font-size: 28rpx;
- color: #282828;
- }
- .order-details .writeOff .rules .item .rulesTitle .iconfont {
- font-size: 30rpx;
- color: #333;
- margin-right: 8rpx;
- margin-top: 5rpx;
- }
- .order-details .writeOff .rules .item .info {
- font-size: 28rpx;
- color: #999;
- margin-top: 7rpx;
- }
- .order-details .writeOff .rules .item .info .time {
- margin-left: 20rpx;
- }
- .order-details .map {
- height: 86rpx;
- font-size: 30rpx;
- color: #282828;
- line-height: 86rpx;
- border-bottom: 1px solid #f0f0f0;
- margin-top: 13rpx;
- background-color: #fff;
- padding: 0 30rpx;
- }
- .order-details .map .place {
- font-size: 26rpx;
- width: 176rpx;
- height: 50rpx;
- border-radius: 25rpx;
- line-height: 50rpx;
- text-align: center;
- }
- .order-details .map .place .iconfont {
- font-size: 27rpx;
- height: 27rpx;
- line-height: 27rpx;
- margin: 2rpx 3rpx 0 0;
- }
- .order-details .address .name .iconfont {
- font-size: 34rpx;
- margin-left: 10rpx;
- }
- .refund {
- padding: 0 30rpx 30rpx;
- margin-top: 24rpx;
- background-color: #fff;
- .title {
- display: flex;
- align-items: center;
- font-size: 30rpx;
- color: #333;
- height: 86rpx;
- border-bottom: 1px solid #f5f5f5;
- image {
- width: 32rpx;
- height: 32rpx;
- margin-right: 10rpx;
- }
- }
- .con {
- padding-top: 25rpx;
- font-size: 28rpx;
- color: #868686;
- }
- }
- </style>
- <script>
- import {
- orderInvoiceDetail,
- orderAgain,
- orderTake,
- orderDel,
- orderCancel
- } from '@/api/order.js';
- import {
- openOrderRefundSubscribe
- } from '@/utils/SubscribeMessage.js';
- import {
- getUserInfo
- } from '@/api/user.js';
- import home from '@/components/home';
- import payment from '@/components/payment';
- import orderGoods from "@/components/orderGoods";
- import ClipboardJS from "@/plugin/clipboard/clipboard.js";
- import {
- toLogin
- } from '@/libs/login.js';
- import {
- mapGetters
- } from "vuex";
- import colors from "@/mixins/color";
- export default {
- components: {
- payment,
- home,
- orderGoods
- },
- mixins: [colors],
- data() {
- return {
- order_id: '',
- evaluate: 0,
- cartInfo: [], //购物车产品
- orderInfo: {
- system_store: {},
- _status: {}
- }, //订单详情
- system_store: {},
- isGoodsReturn: false, //是否为退款订单
- status: {}, //订单底部按钮状态
- isClose: false,
- payMode: [{
- name: "微信支付",
- icon: "icon-weixinzhifu",
- value: 'weixin',
- title: '微信快捷支付'
- },
- // #ifdef H5 || APP-PLUS
- {
- name: '支付宝支付',
- icon: 'icon-zhifubao',
- value: 'alipay',
- title: '支付宝支付',
- payStatus: true
- },
- // #endif
- {
- name: "余额支付",
- icon: "icon-yuezhifu",
- value: 'yue',
- title: '可用余额:',
- number: 0
- },
- ],
- pay_close: false,
- pay_order_id: '',
- totalPrice: '0',
- isAuto: false, //没有授权的不会自动授权
- isShowAuth: false //是否隐藏授权
- };
- },
- computed: mapGetters(['isLogin']),
- onLoad: function(options) {
- if (options.order_id) {
- this.$set(this, 'order_id', options.order_id);
- }
- },
- onShow() {
- uni.removeStorageSync('form_type_cart');
- if (this.isLogin) {
- this.getOrderInfo();
- this.getUserInfo();
- } else {
- toLogin();
- }
- },
- onHide: function() {
- this.isClose = true;
- },
- onReady: function() {
- // #ifdef H5
- this.$nextTick(function() {
- const clipboard = new ClipboardJS(".copy-data");
- clipboard.on("success", () => {
- this.$util.Tips({
- title: '复制成功'
- });
- });
- });
- // #endif
- },
- methods: {
- // 授权关闭
- authColse: function(e) {
- this.isShowAuth = e
- },
- goGoodCall() {
- let self = this
- uni.navigateTo({
- url: `/pages/extension/customer_list/chat?orderId=${self.order_id}`
- })
- },
- openSubcribe: function(e) {
- let page = e;
- uni.showLoading({
- title: '正在加载',
- })
- openOrderRefundSubscribe().then(res => {
- uni.hideLoading();
- uni.navigateTo({
- url: page,
- });
- }).catch(() => {
- uni.hideLoading();
- });
- },
- /**
- * 事件回调
- *
- */
- onChangeFun: function(e) {
- let opt = e;
- let action = opt.action || null;
- let value = opt.value != undefined ? opt.value : null;
- (action && this[action]) && this[action](value);
- },
- /**
- * 拨打电话
- */
- makePhone: function() {
- uni.makePhoneCall({
- phoneNumber: this.system_store.phone
- })
- },
- /**
- * 打开地图
- *
- */
- showMaoLocation: function() {
- if (!this.system_store.latitude || !this.system_store.longitude) return this.$util.Tips({
- title: '缺少经纬度信息无法查看地图!'
- });
- uni.openLocation({
- latitude: parseFloat(this.system_store.latitude),
- longitude: parseFloat(this.system_store.longitude),
- scale: 8,
- name: this.system_store.name,
- address: this.system_store.address + this.system_store.detailed_address,
- success: function() {
- },
- });
- },
- /**
- * 关闭支付组件
- *
- */
- payClose: function() {
- this.pay_close = false;
- },
- /**
- * 打开支付组件
- *
- */
- pay_open: function() {
- this.pay_close = true;
- this.pay_order_id = this.orderInfo.order_id;
- this.totalPrice = this.orderInfo.pay_price;
- },
- /**
- * 支付成功回调
- *
- */
- pay_complete: function() {
- this.pay_close = false;
- this.pay_order_id = '';
- this.getOrderInfo();
- },
- /**
- * 支付失败回调
- *
- */
- pay_fail: function() {
- this.pay_close = false;
- this.pay_order_id = '';
- },
- /**
- * 登录授权回调
- *
- */
- onLoadFun: function() {
- this.getOrderInfo();
- this.getUserInfo();
- this.isShowAuth = false;
- },
- /**
- * 获取用户信息
- *
- */
- getUserInfo: function() {
- let that = this;
- getUserInfo().then(res => {
- that.payMode[1].number = res.data.now_money;
- that.$set(that, 'payMode', that.payMode);
- })
- },
- /**
- * 获取订单详细信息
- *
- */
- getOrderInfo: function() {
- let that = this;
- uni.showLoading({
- title: "正在加载中"
- });
- orderInvoiceDetail(this.order_id).then(res => {
- let _type = res.data._status._type;
- uni.hideLoading();
- that.$set(that, 'orderInfo', res.data);
- that.$set(that, 'cartInfo', res.data.cartInfo);
- that.$set(that, 'evaluate', _type == 3 ? 3 : 0);
- that.$set(that, 'system_store', res.data.system_store);
- if (this.orderInfo.refund_status != 0) {
- this.isGoodsReturn = true;
- }
- that.getOrderStatus();
- }).catch(err => {
- uni.hideLoading();
- that.$util.Tips({
- title: err
- });
- });
- },
- /**
- *
- * 剪切订单号
- */
- // #ifndef H5
- copy: function() {
- let that = this;
- uni.setClipboardData({
- data: this.orderInfo.order_id
- });
- },
- // #endif
- /**
- * 打电话
- */
- goTel: function() {
- uni.makePhoneCall({
- phoneNumber: this.orderInfo.delivery_id
- })
- },
- /**
- * 设置底部按钮
- *
- */
- getOrderStatus: function() {
- let orderInfo = this.orderInfo || {},
- _status = orderInfo._status || {
- _type: 0
- },
- status = {};
- let type = parseInt(_status._type),
- delivery_type = orderInfo.delivery_type,
- seckill_id = orderInfo.seckill_id ? parseInt(orderInfo.seckill_id) : 0,
- bargain_id = orderInfo.bargain_id ? parseInt(orderInfo.bargain_id) : 0,
- combination_id = orderInfo.combination_id ? parseInt(orderInfo.combination_id) : 0;
- status = {
- type: type == 9 ? -9 : type,
- class_status: 0
- };
- if (type == 1 && combination_id > 0) status.class_status = 1; //查看拼团
- if (type == 2 && delivery_type == 'express') status.class_status = 2; //查看物流
- if (type == 2) status.class_status = 3; //确认收货
- if (type == 4 || type == 0) status.class_status = 4; //删除订单
- if (!seckill_id && !bargain_id && !combination_id && (type == 3 || type == 4)) status.class_status = 5; //再次购买
- this.$set(this, 'status', status);
- },
- /**
- * 去拼团详情
- *
- */
- goJoinPink: function() {
- uni.navigateTo({
- url: '/pages/activity/goods_combination_status/index?id=' + this.orderInfo.pink_id,
- });
- },
- /**
- * 再此购买
- *
- */
- goOrderConfirm: function() {
- let that = this;
- orderAgain(that.orderInfo.order_id).then(res => {
- return uni.navigateTo({
- url: '/pages/goods/order_confirm/index?new=1&cartId=' + res.data.cateId
- });
- });
- },
- confirmOrder: function() {
- let that = this;
- uni.showModal({
- title: '确认收货',
- content: '为保障权益,请收到货确认无误后,再确认收货',
- success: function(res) {
- if (res.confirm) {
- orderTake(that.order_id).then(res => {
- return that.$util.Tips({
- title: '操作成功',
- icon: 'success'
- }, function() {
- that.getOrderInfo();
- });
- }).catch(err => {
- return that.$util.Tips({
- title: err
- });
- })
- }
- }
- })
- },
- /**
- *
- * 删除订单
- */
- delOrder: function() {
- let that = this;
- orderDel(this.order_id).then(res => {
- return that.$util.Tips({
- title: '删除成功',
- icon: 'success'
- }, {
- tab: 3,
- url: 1
- });
- }).catch(err => {
- return that.$util.Tips({
- title: err
- });
- });
- },
- cancelOrder() {
- let self = this
- uni.showModal({
- title: '提示',
- content: '确认取消该订单?',
- success: function(res) {
- if (res.confirm) {
- orderCancel(self.orderInfo.order_id)
- .then((data) => {
- self.$util.Tips({
- title: data.msg
- }, {
- tab: 3
- })
- })
- .catch(() => {
- self.getDetail();
- });
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- }
- }
- </script>
- <style>
- .qs-btn {
- width: auto;
- height: 60rpx;
- text-align: center;
- line-height: 60rpx;
- border-radius: 50rpx;
- color: #fff;
- font-size: 27rpx;
- padding: 0 3%;
- color: #aaa;
- border: 1px solid #ddd;
- margin-right: 20rpx;
- }
- </style>
|