|
|
@@ -5,195 +5,134 @@
|
|
|
<img :src="`${constant.imgUrl}/retail/order/bg.png`" mode="widthFix" />
|
|
|
</view>
|
|
|
<view class="page-top-det">
|
|
|
- <view> <view class="page-status">{{ data.status | constantfilter('ORDER_STATUS') }}</view> </view>
|
|
|
+ <view> <view class="page-status">{{ orderInfo.status | constantfilter('ORDER_STATUS') }}</view> </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="page-det">
|
|
|
<view class="module-com">
|
|
|
<view class="module-tit">商品信息</view>
|
|
|
<view class="module-det">
|
|
|
- <block v-if="!$util.isEmpty(data.goodsInfoList)">
|
|
|
- <detailGoods v-for="(items, subIndex) in data.goodsInfoList" :key="subIndex" :info="items"></detailGoods>
|
|
|
+ <block v-if="!$util.isEmpty(orderInfo.goodsInfoList)">
|
|
|
+ <detailGoods v-for="(items, subIndex) in orderInfo.goodsInfoList" :key="subIndex" :info="items"></detailGoods>
|
|
|
+ </block>
|
|
|
+ <block v-if="!$util.isEmpty(orderInfo.itemInfoList)">
|
|
|
+ <detailGoods v-for="(items, subIndex) in orderInfo.itemInfoList" :key="subIndex" :info="items"></detailGoods>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="module-com order-msg">
|
|
|
- <view class="module-tit">订单信息</view>
|
|
|
+
|
|
|
+ <view class="module-com order-msg" v-if="!$util.isEmpty(orderInfo.receiveMobile)">
|
|
|
+ <view class="module-tit">收花人信息</view>
|
|
|
<view class="module-det">
|
|
|
<view class="order-msg-blo">
|
|
|
<view class="msg-list">
|
|
|
<view class="label">收花人</view>
|
|
|
- <view class="value">{{ data.receiveUserName }}</view>
|
|
|
+ <view class="value">{{ orderInfo.receiveUserName }}</view>
|
|
|
</view>
|
|
|
<view class="msg-list">
|
|
|
<view class="label">电话</view>
|
|
|
- <view class="value">{{ data.receiveMobile }}</view>
|
|
|
+ <view class="value">{{ orderInfo.receiveMobile }}</view>
|
|
|
</view>
|
|
|
<view class="msg-list">
|
|
|
<view class="label">地址</view>
|
|
|
- <view class="value">{{ data.receiveFullAddress }}</view>
|
|
|
+ <view class="value">{{ orderInfo.receiveFullAddress }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="order-msg-blo">
|
|
|
<view class="msg-list">
|
|
|
<view class="label">送达时间</view>
|
|
|
- <view v-if="data.reachDate == '0000-00-00'" class="value">-</view>
|
|
|
- <view v-else class="value"><span style="margin-right:10upx;">{{data.reachDate}}</span> <span v-if="data.reachPeriod == 0">上午</span><span v-else-if="data.reachPeriod == 1">下午</span><span v-else>晚上</span></view>
|
|
|
+ <view v-if="orderInfo.reachDate == '0000-00-00'" class="value">-</view>
|
|
|
+ <view v-else class="value"><span style="margin-right:10upx;">{{orderInfo.reachDate}}</span> <span v-if="orderInfo.reachPeriod == 0">上午</span><span v-else-if="orderInfo.reachPeriod == 1">下午</span><span v-else>晚上</span></view>
|
|
|
</view>
|
|
|
- <view v-if="data.reachDate != '0000-00-00'" class="msg-list">
|
|
|
+ <view v-if="orderInfo.reachDate != '0000-00-00'" class="msg-list">
|
|
|
<view class="label">贺卡</view>
|
|
|
- <view class="value">{{ data.needCard == 1 ? "需要" : '不需要' }}</view>
|
|
|
+ <view class="value">{{ orderInfo.needCard == 1 ? "需要" : '不需要' }}</view>
|
|
|
</view>
|
|
|
<view class="msg-list">
|
|
|
<view class="label">祝福语</view>
|
|
|
- <view class="value">{{ data.cardInfo || '-' }}</view>
|
|
|
+ <view class="value">{{ orderInfo.cardInfo || '-' }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="module-com order-msg">
|
|
|
+ <view class="module-tit">
|
|
|
+ <text>订单信息</text>
|
|
|
+ <text style="float:right;color: #3385ff;font-weight:normal;" @click.stop="goRefund()">发起退款</text>
|
|
|
+ </view>
|
|
|
+ <view class="module-det">
|
|
|
<view class="order-msg-blo">
|
|
|
<view class="msg-list">
|
|
|
<view class="label">订单号</view>
|
|
|
- <view class="value">{{ data.orderSn||'' }}</view>
|
|
|
+ <view class="value">{{ orderInfo.orderSn||'' }}</view>
|
|
|
</view>
|
|
|
<view class="msg-list">
|
|
|
<view class="label">创建时间</view>
|
|
|
- <view class="value">{{ data.addTime ? data.addTime.substr(5,11) : ''}}</view>
|
|
|
+ <view class="value">{{ orderInfo.addTime ? orderInfo.addTime.substr(5,11) : ''}}</view>
|
|
|
</view>
|
|
|
<view class="msg-list">
|
|
|
<view class="label">运费</view>
|
|
|
- <view class="value">¥{{ data.sendCost ? parseFloat(data.sendCost) : 0 }}</view>
|
|
|
+ <view class="value">¥{{ orderInfo.sendCost ? parseFloat(orderInfo.sendCost) : 0 }}</view>
|
|
|
</view>
|
|
|
<view class="msg-list">
|
|
|
<view class="label">总金额</view>
|
|
|
- <view class="value">¥{{ data.prePrice ? parseFloat(data.prePrice) : 0 }}</view>
|
|
|
+ <view class="value">¥{{ orderInfo.prePrice ? parseFloat(orderInfo.prePrice) : 0 }}</view>
|
|
|
</view>
|
|
|
- <view v-if="data.discountAmount > 0" class="msg-list">
|
|
|
+ <view v-if="orderInfo.discountAmount > 0" class="msg-list">
|
|
|
<view class="label">优惠</view>
|
|
|
- <view class="value">¥{{ data.discountAmount ? parseFloat(data.discountAmount) : 0 }}</view>
|
|
|
+ <view class="value">¥{{ orderInfo.discountAmount ? parseFloat(orderInfo.discountAmount) : 0 }}</view>
|
|
|
</view>
|
|
|
<view class="msg-list">
|
|
|
<view class="label">实付款</view>
|
|
|
- <view class="value">¥{{ data.realPrice ? parseFloat(data.realPrice) : 0 }}</view>
|
|
|
+ <view class="value">¥{{ orderInfo.realPrice ? parseFloat(orderInfo.realPrice) : 0 }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="module-com coupon-wrap" v-if="data.discountAmount && data.discountAmount != '0.00' && 1==2" >
|
|
|
- <view class="module-det flex-center-between">
|
|
|
- <view class="app-color-3" >
|
|
|
- <template v-if="data.discountType == 0">未知</template>
|
|
|
- <template v-else-if="data.discountType == 1">优惠券</template>
|
|
|
- <template v-else-if="data.discountType == 2">会员优惠</template>
|
|
|
- <template v-else-if="data.discountType == 3">随机优惠</template>
|
|
|
- <template v-else>未知</template>
|
|
|
- </view>
|
|
|
- <view class="app-price">-¥{{ data.discountAmount }}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+
|
|
|
</view>
|
|
|
<view class="page-btn app-footer">
|
|
|
- <view class="flex-center">
|
|
|
- <span v-if="data.status == 0">应付款</span>
|
|
|
- <span v-else-if="data.status == 6">已退款</span>
|
|
|
- <span v-else>已付款</span>
|
|
|
- <span class="app-price">
|
|
|
- <span>¥</span>
|
|
|
- <span class="app-size-40">{{ data.actPrice ? parseFloat(data.actPrice) : 0 }}</span>
|
|
|
- </span>
|
|
|
+ <view class="flex-center"> </view>
|
|
|
+ <view class="operate-btn-wrap">
|
|
|
+ <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">发货</button>
|
|
|
</view>
|
|
|
- <template>
|
|
|
- </template>
|
|
|
- <template>
|
|
|
- <view class="operate-btn-wrap">
|
|
|
- <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">自取</button>
|
|
|
- <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">发货</button>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import detailGoods from "./components/detail-goods.vue";
|
|
|
+import detailItem from "./components/detail-item.vue";
|
|
|
import AppCoupon from "@/components/app-coupon-sel";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
import RateModule from "@/components/plugin/rate";
|
|
|
-import { getDetB, freeShipping, orderUpdatePrice } from "@/api/order";
|
|
|
+import { getDetB} from "@/api/order";
|
|
|
export default {
|
|
|
name: "detail",
|
|
|
- components: { detailGoods, AppCoupon, ModalModule, RateModule },
|
|
|
+ components: { detailGoods, AppCoupon, ModalModule, RateModule,detailItem },
|
|
|
data() {
|
|
|
return {
|
|
|
constant: this.$constant,
|
|
|
- waitPayImg: `${this.$constant.imgUrl}/retail/order/wait-pay.png`,
|
|
|
- waitDeliveryImg: `${this.$constant.imgUrl}/retail/order/wait-delivery.png`,
|
|
|
- data: {},
|
|
|
- updatePriceModal: false,
|
|
|
- form: { price: "" },
|
|
|
- freeShipModal: false
|
|
|
+ orderInfo: {}
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
},
|
|
|
methods: {
|
|
|
+ goRefund(){
|
|
|
+ if(this.orderInfo.payWay == 1){
|
|
|
+ this.$msg('支付宝订单暂不支持退款,请线下退款')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.$util.pageTo({url:'/admin/order/refund?id='+this.option.id})
|
|
|
+ },
|
|
|
init() {
|
|
|
- this._getDet();
|
|
|
+ this.getDetailInfo();
|
|
|
},
|
|
|
- _getDet() {
|
|
|
+ getDetailInfo() {
|
|
|
return getDetB({ id: this.option.id }).then(res => {
|
|
|
- this.data = res.data;
|
|
|
+ this.orderInfo = res.data;
|
|
|
});
|
|
|
- },
|
|
|
- // 免发货
|
|
|
- freeShippingFn() {
|
|
|
- this.freeShipModal = true;
|
|
|
- },
|
|
|
- // 免发货
|
|
|
- freeShipModalClick(e) {
|
|
|
- if (e.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
- } else {
|
|
|
- this.data.status = 4;
|
|
|
- this.data.sendType = 1;
|
|
|
- freeShipping({ id: this.data.id }).then(res => {
|
|
|
- this.$msg("操作成功!");
|
|
|
- this.modalCancel();
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- // 查看配送
|
|
|
- seeSendFn() {
|
|
|
- this.$util.pageTo({
|
|
|
- url: "/admin/order/ship",
|
|
|
- query: {
|
|
|
- id: this.data.id,
|
|
|
- pageStatus: 5
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- // 修改价格
|
|
|
- updatePriceFn() {
|
|
|
- this.form.price = this.data.prePrice;
|
|
|
- this.updatePriceModal = true;
|
|
|
- },
|
|
|
- updateModalClick(e) {
|
|
|
- if (e.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
- } else {
|
|
|
- orderUpdatePrice({ id: this.data.id, price: this.form.price }).then(
|
|
|
- res => {
|
|
|
- this.modalCancel();
|
|
|
- this.$msg("修改成功!");
|
|
|
- setTimeout(() => {
|
|
|
- this._getDet();
|
|
|
- }, 1000);
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- // 关闭弹窗
|
|
|
- modalCancel() {
|
|
|
- this.form.price = "";
|
|
|
- this.freeShipModal = false;
|
|
|
- this.updatePriceModal = false;
|
|
|
}
|
|
|
}
|
|
|
};
|