修改html标签为uni标签,修改rem单位为rpx,修改提示及确认为uniapi,修改登录模块为uni接口,修改css入口为APP.vue,增加app端样式支持
This commit is contained in:
@@ -1,141 +1,141 @@
|
||||
<template>
|
||||
<div class="order-details pos-order-details">
|
||||
<div class="header acea-row row-middle">
|
||||
<div class="state">{{ title }}</div>
|
||||
<div class="data">
|
||||
<div class="order-num">订单:{{ orderInfo.orderId }}</div>
|
||||
<div>
|
||||
<span class="time">
|
||||
<view class="order-details pos-order-details">
|
||||
<view class="header acea-row row-middle">
|
||||
<view class="state">{{ title }}</view>
|
||||
<view class="data">
|
||||
<view class="order-num">订单:{{ orderInfo.orderId }}</view>
|
||||
<view>
|
||||
<text class="time">
|
||||
<data-format :data="orderInfo.addTime"></data-format>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="orderingUser acea-row row-middle">{{ orderInfo.nickname }}</div>
|
||||
<div class="address">
|
||||
<div class="name">
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="orderingUser acea-row row-middle">{{ orderInfo.nickname }}</view>
|
||||
<view class="address">
|
||||
<view class="name">
|
||||
{{ orderInfo.realName}}
|
||||
<span class="phone">{{ orderInfo.userPhone }}</span>
|
||||
</div>
|
||||
<div>{{ orderInfo.userAddress }}</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
|
||||
</div>
|
||||
<div class="pos-order-goods">
|
||||
<div
|
||||
<text class="phone">{{ orderInfo.userPhone }}</text>
|
||||
</view>
|
||||
<view>{{ orderInfo.userAddress }}</view>
|
||||
</view>
|
||||
<view class="line">
|
||||
<image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
|
||||
</view>
|
||||
<view class="pos-order-goods">
|
||||
<view
|
||||
class="goods acea-row row-between-wrapper"
|
||||
v-for="(item, orderInfoIndex) in orderInfo.cartInfo"
|
||||
:key="orderInfoIndex"
|
||||
>
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div class="pictrue">
|
||||
<img :src="item.productInfo.image" />
|
||||
</div>
|
||||
<div class="text acea-row row-between row-column">
|
||||
<div class="info line2">{{ item.productInfo.storeName }}</div>
|
||||
<div class="attr">{{ item.productInfo.suk }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="money">
|
||||
<div class="x-money">¥{{ item.productInfo.price }}</div>
|
||||
<div class="num">x{{ item.cartNum }}</div>
|
||||
<div class="y-money">¥{{ item.productInfo.otPrice ? item.productInfo.otPrice : 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="public-total">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="item.productInfo.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-between row-column">
|
||||
<view class="info line2">{{ item.productInfo.storeName }}</view>
|
||||
<view class="attr">{{ item.productInfo.suk }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money">
|
||||
<view class="x-money">¥{{ item.productInfo.price }}</view>
|
||||
<view class="num">x{{ item.cartNum }}</view>
|
||||
<view class="y-money">¥{{ item.productInfo.otPrice ? item.productInfo.otPrice : 0 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="public-total">
|
||||
共{{ orderInfo.totalNum }}件商品,应支付
|
||||
<span class="money">¥{{ orderInfo.payPrice }}</span>
|
||||
<text class="money">¥{{ orderInfo.payPrice }}</text>
|
||||
( 邮费 ¥{{
|
||||
orderInfo.payPostage
|
||||
}}
|
||||
)
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="item acea-row row-between">
|
||||
<div>订单编号:</div>
|
||||
<div class="conter acea-row row-middle row-right">
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="item acea-row row-between">
|
||||
<view>订单编号:</view>
|
||||
<view class="conter acea-row row-middle row-right">
|
||||
{{ orderInfo.orderId
|
||||
}}
|
||||
<span
|
||||
<text
|
||||
class="copy copy-data"
|
||||
@click="copyClipboard(orderInfo.orderId)"
|
||||
>复制</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item acea-row row-between">
|
||||
<div>下单时间:</div>
|
||||
<div class="conter">
|
||||
>复制</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>下单时间:</view>
|
||||
<view class="conter">
|
||||
<data-format :data="orderInfo.addTime"></data-format>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item acea-row row-between">
|
||||
<div>支付状态:</div>
|
||||
<div class="conter">{{ orderInfo.paid == 1 ? "已支付" : "未支付" }}</div>
|
||||
</div>
|
||||
<div class="item acea-row row-between">
|
||||
<div>支付方式:</div>
|
||||
<div class="conter">{{ payType }}</div>
|
||||
</div>
|
||||
<div class="item acea-row row-between">
|
||||
<div>买家留言:</div>
|
||||
<div class="conter">{{ orderInfo.mark }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="item acea-row row-between">
|
||||
<div>支付金额:</div>
|
||||
<div class="conter">¥{{ orderInfo.totalPrice }}</div>
|
||||
</div>
|
||||
<div class="item acea-row row-between">
|
||||
<div>优惠券抵扣:</div>
|
||||
<div class="conter">-¥{{ orderInfo.couponPrice }}</div>
|
||||
</div>
|
||||
<div class="actualPay acea-row row-right">
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>支付状态:</view>
|
||||
<view class="conter">{{ orderInfo.paid == 1 ? "已支付" : "未支付" }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>支付方式:</view>
|
||||
<view class="conter">{{ payType }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>买家留言:</view>
|
||||
<view class="conter">{{ orderInfo.mark }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="item acea-row row-between">
|
||||
<view>支付金额:</view>
|
||||
<view class="conter">¥{{ orderInfo.totalPrice }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>优惠券抵扣:</view>
|
||||
<view class="conter">-¥{{ orderInfo.couponPrice }}</view>
|
||||
</view>
|
||||
<view class="actualPay acea-row row-right">
|
||||
实付款:
|
||||
<span class="money font-color-red">¥{{ orderInfo.payPrice }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
<text class="money font-color-red">¥{{ orderInfo.payPrice }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="wrapper"
|
||||
v-if="orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2"
|
||||
>
|
||||
<div class="item acea-row row-between">
|
||||
<div>配送方式:</div>
|
||||
<div class="conter" v-if="orderInfo.delivery_type === 'express'">快递</div>
|
||||
<div class="conter" v-if="orderInfo.delivery_type === 'send'">送货</div>
|
||||
</div>
|
||||
<div class="item acea-row row-between">
|
||||
<div v-if="orderInfo.delivery_type === 'express'">快递公司:</div>
|
||||
<div v-if="orderInfo.delivery_type === 'send'">送货人:</div>
|
||||
<div class="conter">{{ orderInfo.delivery_name }}</div>
|
||||
</div>
|
||||
<div class="item acea-row row-between">
|
||||
<div v-if="orderInfo.delivery_type === 'express'">快递单号:</div>
|
||||
<div v-if="orderInfo.delivery_type === 'send'">送货人电话:</div>
|
||||
<div class="conter">
|
||||
<view class="item acea-row row-between">
|
||||
<view>配送方式:</view>
|
||||
<view class="conter" v-if="orderInfo.delivery_type === 'express'">快递</view>
|
||||
<view class="conter" v-if="orderInfo.delivery_type === 'send'">送货</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view v-if="orderInfo.delivery_type === 'express'">快递公司:</view>
|
||||
<view v-if="orderInfo.delivery_type === 'send'">送货人:</view>
|
||||
<view class="conter">{{ orderInfo.delivery_name }}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view v-if="orderInfo.delivery_type === 'express'">快递单号:</view>
|
||||
<view v-if="orderInfo.delivery_type === 'send'">送货人电话:</view>
|
||||
<view class="conter">
|
||||
{{ orderInfo.delivery_id
|
||||
}}
|
||||
<span
|
||||
<text
|
||||
class="copy copy-data"
|
||||
@click="copyClipboard(orderInfo.delivery_id)"
|
||||
>复制</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:100rpx;"></div>
|
||||
<div class="footer acea-row row-right row-middle">
|
||||
<div class="more"></div>
|
||||
<div class="bnt cancel" @click="modify(0)" v-if="types == 0">一键改价</div>
|
||||
<div class="bnt cancel" @click="modify(0)" v-if="types == -1">立即退款</div>
|
||||
<div
|
||||
>复制</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:100rpx;"></view>
|
||||
<view class="footer acea-row row-right row-middle">
|
||||
<view class="more"></view>
|
||||
<view class="bnt cancel" @click="modify(0)" v-if="types == 0">一键改价</view>
|
||||
<view class="bnt cancel" @click="modify(0)" v-if="types == -1">立即退款</view>
|
||||
<view
|
||||
class="bnt cancel"
|
||||
v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0"
|
||||
@click="offlinePay"
|
||||
>确认付款</div>
|
||||
<div class="bnt delivery" v-if="types == 1" @click="goGoodsDeliver(orderInfo)">去发货</div>
|
||||
</div>
|
||||
>确认付款</view>
|
||||
<view class="bnt delivery" v-if="types == 1" @click="goGoodsDeliver(orderInfo)">去发货</view>
|
||||
</view>
|
||||
<PriceChange
|
||||
:change="change"
|
||||
:orderInfo="orderInfo"
|
||||
@@ -143,7 +143,7 @@
|
||||
v-on:savePrice="savePrice"
|
||||
:status="status"
|
||||
></PriceChange>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import PriceChange from "@/components/PriceChange";
|
||||
|
||||
@@ -1,318 +1,330 @@
|
||||
<template>
|
||||
<div class="pos-order-list" ref="container">
|
||||
<div class="nav acea-row row-around row-middle">
|
||||
<div class="item" :class="where.status == 0 ? 'on' : ''" @click="changeStatus(0)">待付款</div>
|
||||
<div class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">待发货</div>
|
||||
<div class="item" :class="where.status == 2 ? 'on' : ''" @click="changeStatus(2)">待收货</div>
|
||||
<div class="item" :class="where.status == 3 ? 'on' : ''" @click="changeStatus(3)">待评价</div>
|
||||
<div class="item" :class="where.status == 4 ? 'on' : ''" @click="changeStatus(4)">已完成</div>
|
||||
<div class="item" :class="where.status == -3 ? 'on' : ''" @click="changeStatus(-3)">退款</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<div class="item" v-for="(item, listIndex) in list" :key="listIndex">
|
||||
<div class="order-num acea-row row-middle" @click="toDetail(item)">
|
||||
<span>订单号:{{ item.orderId }}</span>
|
||||
<span class="time">
|
||||
<span>下单时间:</span>
|
||||
<data-format :data="item.addTime"></data-format>
|
||||
</span>
|
||||
</div>
|
||||
<div class="pos-order-goods" v-for="(val, key) in item.cartInfo" :key="key">
|
||||
<div class="goods acea-row row-between-wrapper" @click="toDetail(item)">
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div class="pictrue">
|
||||
<img :src="val.productInfo.image" />
|
||||
</div>
|
||||
<div class="text acea-row row-between row-column">
|
||||
<div class="info line2">{{ val.productInfo.storeName }}</div>
|
||||
<div class="attr" v-if="val.productInfo.suk">{{ val.productInfo.suk }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="money">
|
||||
<div class="x-money">¥{{ val.productInfo.price }}</div>
|
||||
<div class="num">x{{ val.cartNum }}</div>
|
||||
<div class="y-money">¥{{ val.productInfo.otPrice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="public-total">
|
||||
共{{ item.totalNum }}件商品,应支付
|
||||
<span class="money">¥{{ item.payPrice }}</span>
|
||||
( 邮费 ¥{{
|
||||
<view class="pos-order-list" ref="container">
|
||||
<view class="nav acea-row row-around row-middle">
|
||||
<view class="item" :class="where.status == 0 ? 'on' : ''" @click="changeStatus(0)">待付款</view>
|
||||
<view class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">待发货</view>
|
||||
<view class="item" :class="where.status == 2 ? 'on' : ''" @click="changeStatus(2)">待收货</view>
|
||||
<view class="item" :class="where.status == 3 ? 'on' : ''" @click="changeStatus(3)">待评价</view>
|
||||
<view class="item" :class="where.status == 4 ? 'on' : ''" @click="changeStatus(4)">已完成</view>
|
||||
<view class="item" :class="where.status == -3 ? 'on' : ''" @click="changeStatus(-3)">退款</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item, listIndex) in list" :key="listIndex">
|
||||
<view class="order-num acea-row row-middle" @click="toDetail(item)">
|
||||
<text>订单号:{{ item.orderId }}</text>
|
||||
<text class="time">
|
||||
<text>下单时间:</text>
|
||||
<data-format :data="item.addTime"></data-format>
|
||||
</text>
|
||||
</view>
|
||||
<view class="pos-order-goods" v-for="(val, key) in item.cartInfo" :key="key">
|
||||
<view class="goods acea-row row-between-wrapper" @click="toDetail(item)">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="val.productInfo.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-between row-column">
|
||||
<view class="info line2">{{ val.productInfo.storeName }}</view>
|
||||
<view class="attr" v-if="val.productInfo.suk">{{ val.productInfo.suk }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money">
|
||||
<view class="x-money">¥{{ val.productInfo.price }}</view>
|
||||
<view class="num">x{{ val.cartNum }}</view>
|
||||
<view class="y-money">¥{{ val.productInfo.otPrice }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="public-total">
|
||||
共{{ item.totalNum }}件商品,应支付
|
||||
<text class="money">¥{{ item.payPrice }}</text>
|
||||
( 邮费 ¥{{
|
||||
item.totalPostage
|
||||
}}
|
||||
)
|
||||
</div>
|
||||
<div class="operation acea-row row-between-wrapper">
|
||||
<div class="more">
|
||||
<!-- <div class="iconfont icon-gengduo" @click="more(index)"></div>-->
|
||||
<!-- <div class="order" v-show="current === index">-->
|
||||
<!-- <div class="items">-->
|
||||
<!-- {{ where.status > 0 ? "删除" : "取消" }}订单-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="arrow"></div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="acea-row row-middle">
|
||||
<div class="bnt" @click="modify(item, 0)" v-if="where.status == 0">一键改价</div>
|
||||
<div
|
||||
class="bnt"
|
||||
@click="modify(item, 0)"
|
||||
v-if="where.status == -3 && item.refundStatus === 1"
|
||||
>立即退款</div>
|
||||
<div
|
||||
class="bnt cancel"
|
||||
v-if="item.pay_type === 'offline' && item.paid === 0"
|
||||
@click="offlinePay(item)"
|
||||
>确认付款</div>
|
||||
<div class="bnt" v-if="where.status == 1" @click="goGoodsDeliver(item)">去发货</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
<PriceChange
|
||||
:change="change"
|
||||
:orderInfo="orderInfo"
|
||||
v-on:closechange="changeclose($event)"
|
||||
v-on:savePrice="savePrice"
|
||||
:status="status"
|
||||
></PriceChange>
|
||||
</div>
|
||||
)
|
||||
</view>
|
||||
<view class="operation acea-row row-between-wrapper">
|
||||
<view class="more">
|
||||
<!-- <view class="iconfont icon-gengduo" @click="more(index)"></view>-->
|
||||
<!-- <view class="order" v-show="current === index">-->
|
||||
<!-- <view class="items">-->
|
||||
<!-- {{ where.status > 0 ? "删除" : "取消" }}订单-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="arrow"></view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<view class="acea-row row-middle">
|
||||
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 0">一键改价</view>
|
||||
<view class="bnt" @click="modify(item, 0)" v-if="where.status == -3 && item.refundStatus === 1">立即退款</view>
|
||||
<view class="bnt cancel" v-if="item.pay_type === 'offline' && item.paid === 0" @click="offlinePay(item)">确认付款</view>
|
||||
<view class="bnt" v-if="where.status == 1" @click="goGoodsDeliver(item)">去发货</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
|
||||
:status="status"></PriceChange>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import PriceChange from "@/components/PriceChange";
|
||||
import Loading from "@/components/Loading";
|
||||
import DataFormat from "@/components/DataFormat";
|
||||
import {
|
||||
getAdminOrderList,
|
||||
setAdminOrderPrice,
|
||||
setAdminOrderRemark,
|
||||
setOfflinePay,
|
||||
setOrderRefund
|
||||
} from "@/api/admin";
|
||||
import { required, num } from "@/utils/validate";
|
||||
import { validatorDefaultCatch } from "@/utils/dialog";
|
||||
export default {
|
||||
name: "AdminOrderList",
|
||||
components: {
|
||||
PriceChange,
|
||||
Loading,
|
||||
DataFormat
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
current: "",
|
||||
change: false,
|
||||
types: 0,
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 5,
|
||||
status: 0
|
||||
},
|
||||
list: [],
|
||||
loaded: false,
|
||||
loading: false,
|
||||
orderInfo: {},
|
||||
status: ""
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"$yroute.query.types": function(newVal) {
|
||||
let that = this;
|
||||
if (newVal != undefined) {
|
||||
that.where.status = newVal;
|
||||
that.init();
|
||||
}
|
||||
},
|
||||
types: function() {
|
||||
this.getIndex();
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
let that = this;
|
||||
that.where.status = that.$yroute.query.types;
|
||||
that.current = "";
|
||||
that.getIndex();
|
||||
},
|
||||
onReachBottom() {
|
||||
!that.loading && that.getIndex();
|
||||
},
|
||||
methods: {
|
||||
goGoodsDeliver(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/orderAdmin/GoodsDeliver/index",
|
||||
query: { id: item.orderId }
|
||||
});
|
||||
},
|
||||
more: function(index) {
|
||||
if (this.current === index) this.current = "";
|
||||
else this.current = index;
|
||||
},
|
||||
modify: function(item, status) {
|
||||
this.change = true;
|
||||
this.orderInfo = item;
|
||||
this.status = status;
|
||||
},
|
||||
changeclose: function(msg) {
|
||||
this.change = msg;
|
||||
},
|
||||
async savePrice(opt) {
|
||||
let that = this,
|
||||
data = {},
|
||||
price = opt.price.toString(),
|
||||
refund_price = opt.refund_price.toString(),
|
||||
refund_status = that.orderInfo.refundStatus,
|
||||
remark = opt.remark;
|
||||
data.orderId = that.orderInfo.orderId;
|
||||
if (that.status == 0 && refund_status === 0) {
|
||||
try {
|
||||
await this.$validator({
|
||||
price: [
|
||||
required(required.message("金额")),
|
||||
num(num.message("金额"))
|
||||
]
|
||||
}).validate({ price });
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.price = price;
|
||||
setAdminOrderPrice(data).then(
|
||||
function() {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: "改价成功",
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
that.init();
|
||||
},
|
||||
function() {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: "改价失败",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
} else if (that.status == 0 && refund_status === 1) {
|
||||
try {
|
||||
await this.$validator({
|
||||
refund_price: [
|
||||
required(required.message("金额")),
|
||||
num(num.message("金额"))
|
||||
]
|
||||
}).validate({ refund_price });
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.price = refund_price;
|
||||
data.type = opt.type;
|
||||
setOrderRefund(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
that.init();
|
||||
},
|
||||
err => {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
} else {
|
||||
try {
|
||||
await this.$validator({
|
||||
remark: [required(required.message("备注"))]
|
||||
}).validate({ remark });
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.remark = remark;
|
||||
setAdminOrderRemark(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
that.init();
|
||||
},
|
||||
err => {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
init: function() {
|
||||
this.list = [];
|
||||
this.where.page = 1;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
this.getIndex();
|
||||
this.current = "";
|
||||
},
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
if (that.loading || that.loaded) return;
|
||||
that.loading = true;
|
||||
getAdminOrderList(that.where).then(
|
||||
res => {
|
||||
that.loading = false;
|
||||
that.loaded = res.data.length < that.where.limit;
|
||||
that.list.push.apply(that.list, res.data);
|
||||
that.where.page = that.where.page + 1;
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
changeStatus: function(val) {
|
||||
if (this.where.status != val) {
|
||||
this.where.status = val;
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
toDetail: function(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/orderAdmin/AdminOrder/index",
|
||||
query: { oid: item.orderId }
|
||||
});
|
||||
},
|
||||
offlinePay: function(item) {
|
||||
setOfflinePay({ order_id: item.order_id }).then(
|
||||
res => {
|
||||
this.$uni.showToast({ title: res.msg, icon: "none", duration: 2000 });
|
||||
this.init();
|
||||
},
|
||||
error => {
|
||||
this.$dialog.error(error.msg);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
import PriceChange from "@/components/PriceChange";
|
||||
import Loading from "@/components/Loading";
|
||||
import DataFormat from "@/components/DataFormat";
|
||||
import {
|
||||
getAdminOrderList,
|
||||
setAdminOrderPrice,
|
||||
setAdminOrderRemark,
|
||||
setOfflinePay,
|
||||
setOrderRefund
|
||||
} from "@/api/admin";
|
||||
import {
|
||||
required,
|
||||
num
|
||||
} from "@/utils/validate";
|
||||
import {
|
||||
validatorDefaultCatch
|
||||
} from "@/utils/dialog";
|
||||
export default {
|
||||
name: "AdminOrderList",
|
||||
components: {
|
||||
PriceChange,
|
||||
Loading,
|
||||
DataFormat
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
current: "",
|
||||
change: false,
|
||||
types: 0,
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 5,
|
||||
status: 0
|
||||
},
|
||||
list: [],
|
||||
loaded: false,
|
||||
loading: false,
|
||||
orderInfo: {},
|
||||
status: ""
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"$yroute.query.types": function(newVal) {
|
||||
let that = this;
|
||||
if (newVal != undefined) {
|
||||
that.where.status = newVal;
|
||||
that.init();
|
||||
}
|
||||
},
|
||||
types: function() {
|
||||
this.getIndex();
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
let that = this;
|
||||
that.where.status = that.$yroute.query.types;
|
||||
that.current = "";
|
||||
that.getIndex();
|
||||
},
|
||||
onReachBottom() {
|
||||
!that.loading && that.getIndex();
|
||||
},
|
||||
methods: {
|
||||
goGoodsDeliver(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/orderAdmin/GoodsDeliver/index",
|
||||
query: {
|
||||
id: item.orderId
|
||||
}
|
||||
});
|
||||
},
|
||||
more: function(index) {
|
||||
if (this.current === index) this.current = "";
|
||||
else this.current = index;
|
||||
},
|
||||
modify: function(item, status) {
|
||||
this.change = true;
|
||||
this.orderInfo = item;
|
||||
this.status = status;
|
||||
},
|
||||
changeclose: function(msg) {
|
||||
this.change = msg;
|
||||
},
|
||||
async savePrice(opt) {
|
||||
let that = this,
|
||||
data = {},
|
||||
price = opt.price.toString(),
|
||||
refund_price = opt.refund_price.toString(),
|
||||
refund_status = that.orderInfo.refundStatus,
|
||||
remark = opt.remark;
|
||||
data.orderId = that.orderInfo.orderId;
|
||||
if (that.status == 0 && refund_status === 0) {
|
||||
try {
|
||||
await this.$validator({
|
||||
price: [
|
||||
required(required.message("金额")),
|
||||
num(num.message("金额"))
|
||||
]
|
||||
}).validate({
|
||||
price
|
||||
});
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.price = price;
|
||||
setAdminOrderPrice(data).then(
|
||||
function() {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: "改价成功",
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
that.init();
|
||||
},
|
||||
function() {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: "改价失败",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
} else if (that.status == 0 && refund_status === 1) {
|
||||
try {
|
||||
await this.$validator({
|
||||
refund_price: [
|
||||
required(required.message("金额")),
|
||||
num(num.message("金额"))
|
||||
]
|
||||
}).validate({
|
||||
refund_price
|
||||
});
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.price = refund_price;
|
||||
data.type = opt.type;
|
||||
setOrderRefund(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
that.init();
|
||||
},
|
||||
err => {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
} else {
|
||||
try {
|
||||
await this.$validator({
|
||||
remark: [required(required.message("备注"))]
|
||||
}).validate({
|
||||
remark
|
||||
});
|
||||
} catch (e) {
|
||||
return validatorDefaultCatch(e);
|
||||
}
|
||||
data.remark = remark;
|
||||
setAdminOrderRemark(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
that.init();
|
||||
},
|
||||
err => {
|
||||
that.change = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
init: function() {
|
||||
this.list = [];
|
||||
this.where.page = 1;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
this.getIndex();
|
||||
this.current = "";
|
||||
},
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
if (that.loading || that.loaded) return;
|
||||
that.loading = true;
|
||||
getAdminOrderList(that.where).then(
|
||||
res => {
|
||||
that.loading = false;
|
||||
that.loaded = res.data.length < that.where.limit;
|
||||
that.list.push.apply(that.list, res.data);
|
||||
that.where.page = that.where.page + 1;
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
changeStatus: function(val) {
|
||||
if (this.where.status != val) {
|
||||
this.where.status = val;
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
toDetail: function(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/orderAdmin/AdminOrder/index",
|
||||
query: {
|
||||
oid: item.orderId
|
||||
}
|
||||
});
|
||||
},
|
||||
offlinePay: function(item) {
|
||||
setOfflinePay({
|
||||
order_id: item.order_id
|
||||
}).then(
|
||||
res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
error => {
|
||||
uni.showToast({
|
||||
title: error.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<template>
|
||||
<div class="deliver-goods">
|
||||
<view class="deliver-goods">
|
||||
<header>
|
||||
<div class="order-num acea-row row-between-wrapper">
|
||||
<div class="num line1">订单号:{{ delivery.orderId }}</div>
|
||||
<div class="name line1">{{ delivery.nickname }}</div>
|
||||
</div>
|
||||
<div class="address">
|
||||
<div class="name">
|
||||
<view class="order-num acea-row row-between-wrapper">
|
||||
<view class="num line1">订单号:{{ delivery.orderId }}</view>
|
||||
<view class="name line1">{{ delivery.nickname }}</view>
|
||||
</view>
|
||||
<view class="address">
|
||||
<view class="name">
|
||||
{{ delivery.realName
|
||||
}}
|
||||
<span class="phone">{{ delivery.userPhone }}</span>
|
||||
</div>
|
||||
<div>{{ delivery.userAddress }}</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
|
||||
</div>
|
||||
<text class="phone">{{ delivery.userPhone }}</text>
|
||||
</view>
|
||||
<view>{{ delivery.userAddress }}</view>
|
||||
</view>
|
||||
<view class="line">
|
||||
<image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
|
||||
</view>
|
||||
</header>
|
||||
<div class="wrapper">
|
||||
<div class="item acea-row row-between-wrapper">
|
||||
<div>发货方式</div>
|
||||
<div class="mode acea-row row-middle row-right">
|
||||
<div
|
||||
<view class="wrapper">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>发货方式</view>
|
||||
<view class="mode acea-row row-middle row-right">
|
||||
<view
|
||||
class="goods"
|
||||
:class="active === typesIndex ? 'on' : ''"
|
||||
v-for="(item, typesIndex) in types"
|
||||
@@ -29,34 +29,34 @@
|
||||
@click="changeType(item, typesIndex)"
|
||||
>
|
||||
{{ item.title }}
|
||||
<span class="iconfont icon-xuanzhong2"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list" v-show="active === 0">
|
||||
<div class="item acea-row row-between-wrapper">
|
||||
<div>快递公司</div>
|
||||
<text class="iconfont icon-xuanzhong2"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list" v-show="active === 0">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>快递公司</view>
|
||||
<input type="text" placeholder="填写快递公司" v-model="delivery_name" class="mode" />
|
||||
</div>
|
||||
<div class="item acea-row row-between-wrapper">
|
||||
<div>快递单号</div>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>快递单号</view>
|
||||
<input type="text" placeholder="填写快递单号" v-model="delivery_id" class="mode" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="list" v-show="active === 1">
|
||||
<div class="item acea-row row-between-wrapper">
|
||||
<div>送货人</div>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list" v-show="active === 1">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>送货人</view>
|
||||
<input type="text" placeholder="填写送货人" v-model="delivery_name" class="mode" />
|
||||
</div>
|
||||
<div class="item acea-row row-between-wrapper">
|
||||
<div>送货电话</div>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>送货电话</view>
|
||||
<input type="text" placeholder="填写送货电话" v-model="delivery_id" class="mode" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:100rpx;"></div>
|
||||
<div class="confirm" @click="saveInfo">确认提交</div>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:100rpx;"></view>
|
||||
<view class="confirm" @click="saveInfo">确认提交</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getAdminOrderDelivery, setAdminOrderDelivery } from "@/api/admin";
|
||||
|
||||
@@ -1,161 +1,195 @@
|
||||
<template>
|
||||
<div class="OrderCancellation">
|
||||
<div class="header"></div>
|
||||
<div class="whiteBg">
|
||||
<div class="input">
|
||||
<input type="number" placeholder="0" v-model="verify_code" />
|
||||
</div>
|
||||
<div class="bnt" @click="storeCancellation">立即核销</div>
|
||||
</div>
|
||||
<div class="scan" v-if="iswechat">
|
||||
<img :src="$VUE_APP_RESOURCES_URL+'/images/scan.gif'" @click="openQRCode" />
|
||||
</div>
|
||||
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff>
|
||||
</div>
|
||||
<view class="OrderCancellation">
|
||||
<view class="header"></view>
|
||||
<view class="whiteBg">
|
||||
<view class="input">
|
||||
<input type="number" placeholder="0" v-model="verify_code" />
|
||||
</view>
|
||||
<view class="bnt" @click="storeCancellation">立即核销</view>
|
||||
</view>
|
||||
<view class="scan" v-if="iswechat">
|
||||
<image :src="$VUE_APP_RESOURCES_URL+'/images/scan.gif'" @click="openQRCode" />
|
||||
</view>
|
||||
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff>
|
||||
</view>
|
||||
</template>
|
||||
<style scoped>
|
||||
.OrderCancellation .header {
|
||||
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") no-repeat;
|
||||
width: 100%;
|
||||
height: 3rem;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.OrderCancellation .whiteBg {
|
||||
width: 6.9rem;
|
||||
background-color: #fff;
|
||||
margin: -0.93rem auto 0 auto;
|
||||
padding-top: 0.8rem;
|
||||
border-radius: 0.06rem 0.06rem 0 0;
|
||||
}
|
||||
.OrderCancellation .whiteBg .input {
|
||||
width: 5.8rem;
|
||||
margin: 0 auto;
|
||||
border-bottom: 0.01rem solid #eee;
|
||||
}
|
||||
.OrderCancellation .whiteBg .input input {
|
||||
padding-bottom: 0.25rem;
|
||||
font-size: 0.6rem;
|
||||
color: #282828;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.OrderCancellation .whiteBg .bnt {
|
||||
font-size: 0.32rem;
|
||||
color: #fff;
|
||||
width: 5.8rem;
|
||||
height: 0.86rem;
|
||||
border-radius: 0.43rem;
|
||||
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%);
|
||||
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
|
||||
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
|
||||
text-align: center;
|
||||
line-height: 0.86rem;
|
||||
margin: 0.55rem auto 0 auto;
|
||||
}
|
||||
.OrderCancellation .scan {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
margin: 1.1rem auto 0 auto;
|
||||
}
|
||||
.OrderCancellation .scan img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
.OrderCancellation .header {
|
||||
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") no-repeat;
|
||||
width: 100%;
|
||||
height: 3rem;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.OrderCancellation .whiteBg {
|
||||
width: 6.9rem;
|
||||
background-color: #fff;
|
||||
margin: -0.93rem auto 0 auto;
|
||||
padding-top: 0.8rem;
|
||||
border-radius: 0.06rem 0.06rem 0 0;
|
||||
}
|
||||
|
||||
.OrderCancellation .whiteBg .input {
|
||||
width: 5.8rem;
|
||||
margin: 0 auto;
|
||||
border-bottom: 0.01rem solid #eee;
|
||||
}
|
||||
|
||||
.OrderCancellation .whiteBg .input input {
|
||||
padding-bottom: 0.25rem;
|
||||
font-size: 0.6rem;
|
||||
color: #282828;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.OrderCancellation .whiteBg .bnt {
|
||||
font-size: 0.32rem;
|
||||
color: #fff;
|
||||
width: 5.8rem;
|
||||
height: 0.86rem;
|
||||
border-radius: 0.43rem;
|
||||
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%);
|
||||
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
|
||||
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
|
||||
text-align: center;
|
||||
line-height: 0.86rem;
|
||||
margin: 0.55rem auto 0 auto;
|
||||
}
|
||||
|
||||
.OrderCancellation .scan {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
margin: 1.1rem auto 0 auto;
|
||||
}
|
||||
|
||||
.OrderCancellation .scan image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import WriteOff from "@/components/WriteOff";
|
||||
import { isWeixin } from "@/utils";
|
||||
// import { wechatEvevt } from "@/libs/wechat";
|
||||
import { orderVerific } from "@/api/order";
|
||||
const NAME = "OrderCancellation";
|
||||
import WriteOff from "@/components/WriteOff";
|
||||
import {
|
||||
isWeixin
|
||||
} from "@/utils";
|
||||
// import { wechatEvevt } from "@/libs/wechat";
|
||||
import {
|
||||
orderVerific
|
||||
} from "@/api/order";
|
||||
const NAME = "OrderCancellation";
|
||||
|
||||
export default {
|
||||
name: NAME,
|
||||
components: {
|
||||
WriteOff
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
iShidden: true,
|
||||
iswechat: isWeixin(),
|
||||
orderInfo: {},
|
||||
verify_code: ""
|
||||
};
|
||||
},
|
||||
mounted: function() {},
|
||||
methods: {
|
||||
cancel: function(res) {
|
||||
this.iShidden = res;
|
||||
},
|
||||
confirm: function() {
|
||||
orderVerific(this.verify_code, 1)
|
||||
.then(res => {
|
||||
this.iShidden = true;
|
||||
this.verify_code = "";
|
||||
this.$uni.showToast({ title: res.msg, icon: 'none', duration: 2000 });
|
||||
})
|
||||
.catch(res => {
|
||||
this.$dialog.error(res.msg);
|
||||
});
|
||||
},
|
||||
storeCancellation: function() {
|
||||
let ref = /[0-9]{12}/;
|
||||
if (!this.verify_code) return this.$dialog.error("请输入核销码");
|
||||
if (!ref.test(this.verify_code))
|
||||
return this.$dialog.error("请输入正确的核销码");
|
||||
uni.showLoading({ title: "查询中" });
|
||||
orderVerific(this.verify_code, 0)
|
||||
.then(res => {
|
||||
uni.hideLoading();
|
||||
this.orderInfo = res.data;
|
||||
this.iShidden = false;
|
||||
})
|
||||
.catch(() => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
openQRCode: function() {
|
||||
let that = this;
|
||||
// wechatEvevt("scanQRCode", {
|
||||
// needResult: 1,
|
||||
// scanType: ["qrCode", "barCode"]
|
||||
// })
|
||||
// .then(res => {
|
||||
// if (res.resultStr) {
|
||||
// that.verify_code = res.resultStr;
|
||||
// that.storeCancellation();
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: '没有扫描到什么!',
|
||||
// icon: "none",
|
||||
// duration: 2000
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
// .catch(res => {
|
||||
// if (res.is_ready) {
|
||||
// res.wx.scanQRCode({
|
||||
// needResult: 1,
|
||||
// scanType: ["qrCode", "barCode"],
|
||||
// success: function(res) {
|
||||
// that.verify_code = res.resultStr;
|
||||
// that.storeCancellation();
|
||||
// },
|
||||
// fail: function(res) {
|
||||
// if (res.errMsg == "scanQRCode:permission denied") {
|
||||
// uni.showToast({
|
||||
// title: '没有权限',
|
||||
// icon: "none",
|
||||
// duration: 2000
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
export default {
|
||||
name: NAME,
|
||||
components: {
|
||||
WriteOff
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
iShidden: true,
|
||||
iswechat: isWeixin(),
|
||||
orderInfo: {},
|
||||
verify_code: ""
|
||||
};
|
||||
},
|
||||
mounted: function() {},
|
||||
methods: {
|
||||
cancel: function(res) {
|
||||
this.iShidden = res;
|
||||
},
|
||||
confirm: function() {
|
||||
orderVerific(this.verify_code, 1)
|
||||
.then(res => {
|
||||
this.iShidden = true;
|
||||
this.verify_code = "";
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
storeCancellation: function() {
|
||||
let ref = /[0-9]{12}/;
|
||||
if (!this.verify_code) {
|
||||
uni.showToast({
|
||||
title: "请输入核销码",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return
|
||||
}
|
||||
if (!ref.test(this.verify_code)) {
|
||||
uni.showToast({
|
||||
title: "请输入正确的核销码",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "查询中"
|
||||
});
|
||||
orderVerific(this.verify_code, 0)
|
||||
.then(res => {
|
||||
uni.hideLoading();
|
||||
this.orderInfo = res.data;
|
||||
this.iShidden = false;
|
||||
})
|
||||
.catch(() => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
openQRCode: function() {
|
||||
let that = this;
|
||||
// wechatEvevt("scanQRCode", {
|
||||
// needResult: 1,
|
||||
// scanType: ["qrCode", "barCode"]
|
||||
// })
|
||||
// .then(res => {
|
||||
// if (res.resultStr) {
|
||||
// that.verify_code = res.resultStr;
|
||||
// that.storeCancellation();
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: '没有扫描到什么!',
|
||||
// icon: "none",
|
||||
// duration: 2000
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
// .catch(res => {
|
||||
// if (res.is_ready) {
|
||||
// res.wx.scanQRCode({
|
||||
// needResult: 1,
|
||||
// scanType: ["qrCode", "barCode"],
|
||||
// success: function(res) {
|
||||
// that.verify_code = res.resultStr;
|
||||
// that.storeCancellation();
|
||||
// },
|
||||
// fail: function(res) {
|
||||
// if (res.errMsg == "scanQRCode:permission denied") {
|
||||
// uni.showToast({
|
||||
// title: '没有权限',
|
||||
// icon: "none",
|
||||
// duration: 2000
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,81 +1,81 @@
|
||||
<template>
|
||||
<div class="order-index" ref="container">
|
||||
<div class="header acea-row">
|
||||
<div class="item" @click="goAdminOrderList(0)">
|
||||
<div class="num">{{ census.orderCount.unpaidCount }}</div>
|
||||
<div>待付款</div>
|
||||
</div>
|
||||
<div class="item" @click="goAdminOrderList(1)">
|
||||
<div class="num">{{ census.orderCount.unshippedCount }}</div>
|
||||
<div>待发货</div>
|
||||
</div>
|
||||
<div class="item" @click="goAdminOrderList(2)">
|
||||
<div class="num">{{ census.orderCount.receivedCount }}</div>
|
||||
<div>待收货</div>
|
||||
</div>
|
||||
<div class="item" @click="goAdminOrderList(3)">
|
||||
<div class="num">{{ census.orderCount.evaluatedCount }}</div>
|
||||
<div>待评价</div>
|
||||
</div>
|
||||
<div class="item" @click="goAdminOrderList(3)">
|
||||
<div class="num">{{ census.orderCount.refundCount }}</div>
|
||||
<div>退款</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="title">
|
||||
<span class="iconfont icon-shujutongji"></span>数据统计
|
||||
</div>
|
||||
<div class="list acea-row">
|
||||
<div class="item" @click="goStatistics({type:'price',time:'today'})">
|
||||
<div class="num">{{ census.orderTimeCount.todayPrice }}</div>
|
||||
<div>今日成交额</div>
|
||||
</div>
|
||||
<div class="item" @click="goStatistics({type:'price',time:'yesterday'})">
|
||||
<div class="num">{{ census.orderTimeCount.proPrice }}</div>
|
||||
<div>昨日成交额</div>
|
||||
</div>
|
||||
<div class="item" @click="goStatistics({type:'price',time:'month'})">
|
||||
<div class="num">{{ census.orderTimeCount.monthPrice }}</div>
|
||||
<div>本月成交额</div>
|
||||
</div>
|
||||
<div class="item" @click="goStatistics({type:'order',time:'today'})">
|
||||
<div class="num">{{ census.orderTimeCount.todayCount }}</div>
|
||||
<div>今日订单数</div>
|
||||
</div>
|
||||
<div class="item" @click="goStatistics({type:'order',time:'yesterday'})">
|
||||
<div class="num">{{ census.orderTimeCount.proCount }}</div>
|
||||
<div>昨日订单数</div>
|
||||
</div>
|
||||
<div class="item" @click="goStatistics({type:'order',time:'month'})">
|
||||
<div class="num">{{ census.orderTimeCount.monthCount }}</div>
|
||||
<div>本月订单数</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="public-wrapper">
|
||||
<div class="title">
|
||||
<span class="iconfont icon-xiangxishuju"></span>详细数据
|
||||
</div>
|
||||
<div class="nav acea-row row-between-wrapper">
|
||||
<div class="data">日期</div>
|
||||
<div class="browse">订单数</div>
|
||||
<div class="turnover">成交额</div>
|
||||
</div>
|
||||
<div class="conter">
|
||||
<div
|
||||
<view class="order-index" ref="container">
|
||||
<view class="header acea-row">
|
||||
<view class="item" @click="goAdminOrderList(0)">
|
||||
<view class="num">{{ census.orderCount.unpaidCount }}</view>
|
||||
<view>待付款</view>
|
||||
</view>
|
||||
<view class="item" @click="goAdminOrderList(1)">
|
||||
<view class="num">{{ census.orderCount.unshippedCount }}</view>
|
||||
<view>待发货</view>
|
||||
</view>
|
||||
<view class="item" @click="goAdminOrderList(2)">
|
||||
<view class="num">{{ census.orderCount.receivedCount }}</view>
|
||||
<view>待收货</view>
|
||||
</view>
|
||||
<view class="item" @click="goAdminOrderList(3)">
|
||||
<view class="num">{{ census.orderCount.evaluatedCount }}</view>
|
||||
<view>待评价</view>
|
||||
</view>
|
||||
<view class="item" @click="goAdminOrderList(3)">
|
||||
<view class="num">{{ census.orderCount.refundCount }}</view>
|
||||
<view>退款</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="title">
|
||||
<text class="iconfont icon-shujutongji"></text>数据统计
|
||||
</view>
|
||||
<view class="list acea-row">
|
||||
<view class="item" @click="goStatistics({type:'price',time:'today'})">
|
||||
<view class="num">{{ census.orderTimeCount.todayPrice }}</view>
|
||||
<view>今日成交额</view>
|
||||
</view>
|
||||
<view class="item" @click="goStatistics({type:'price',time:'yesterday'})">
|
||||
<view class="num">{{ census.orderTimeCount.proPrice }}</view>
|
||||
<view>昨日成交额</view>
|
||||
</view>
|
||||
<view class="item" @click="goStatistics({type:'price',time:'month'})">
|
||||
<view class="num">{{ census.orderTimeCount.monthPrice }}</view>
|
||||
<view>本月成交额</view>
|
||||
</view>
|
||||
<view class="item" @click="goStatistics({type:'order',time:'today'})">
|
||||
<view class="num">{{ census.orderTimeCount.todayCount }}</view>
|
||||
<view>今日订单数</view>
|
||||
</view>
|
||||
<view class="item" @click="goStatistics({type:'order',time:'yesterday'})">
|
||||
<view class="num">{{ census.orderTimeCount.proCount }}</view>
|
||||
<view>昨日订单数</view>
|
||||
</view>
|
||||
<view class="item" @click="goStatistics({type:'order',time:'month'})">
|
||||
<view class="num">{{ census.orderTimeCount.monthCount }}</view>
|
||||
<view>本月订单数</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="public-wrapper">
|
||||
<view class="title">
|
||||
<text class="iconfont icon-xiangxishuju"></text>详细数据
|
||||
</view>
|
||||
<view class="nav acea-row row-between-wrapper">
|
||||
<view class="data">日期</view>
|
||||
<view class="browse">订单数</view>
|
||||
<view class="turnover">成交额</view>
|
||||
</view>
|
||||
<view class="conter">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(item, orderListIndex) in list"
|
||||
:key="orderListIndex"
|
||||
>
|
||||
<div class="data">{{ item.time }}</div>
|
||||
<div class="browse">{{ item.count }}</div>
|
||||
<div class="turnover">{{ item.price }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<view class="data">{{ item.time }}</view>
|
||||
<view class="browse">{{ item.count }}</view>
|
||||
<view class="turnover">{{ item.price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getStatisticsInfo, getStatisticsMonth } from "@/api/admin";
|
||||
@@ -129,7 +129,11 @@ export default {
|
||||
that.census.unpaidCount = that.census.orderCount.unpaidCount;
|
||||
},
|
||||
err => {
|
||||
that.$dialog.message(err.msg);
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -144,8 +148,12 @@ export default {
|
||||
that.list.push.apply(that.list, res.data);
|
||||
that.where.page = that.where.page + 1;
|
||||
},
|
||||
error => {
|
||||
that.$dialog.message(error.msg);
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
},
|
||||
300
|
||||
);
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
<template>
|
||||
<div class="statistical-page" ref="container">
|
||||
<div class="navs">
|
||||
<div class="list">
|
||||
<div class="item" :class="time == 'today' ? 'on' : ''" @click="setTime('today')">今天</div>
|
||||
<div class="item" :class="time == 'yesterday' ? 'on' : ''" @click="setTime('yesterday')">昨天</div>
|
||||
<div class="item" :class="time == 'seven' ? 'on' : ''" @click="setTime('seven')">最近7天</div>
|
||||
<div class="item" :class="time == 'month' ? 'on' : ''" @click="setTime('month')">本月</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="title">{{ title }}{{ this.where.type == 1 ? "营业额(元)" : "订单量(份)" }}</div>
|
||||
<div class="money">{{ time_price }}</div>
|
||||
</div>
|
||||
<!-- <div class="chart">
|
||||
<div class="company">{{ where.type === 1 ? "单位(元)" : "单位(份)" }}</div>
|
||||
<view class="statistical-page" ref="container">
|
||||
<view class="navs">
|
||||
<view class="list">
|
||||
<view class="item" :class="time == 'today' ? 'on' : ''" @click="setTime('today')">今天</view>
|
||||
<view class="item" :class="time == 'yesterday' ? 'on' : ''" @click="setTime('yesterday')">昨天</view>
|
||||
<view class="item" :class="time == 'seven' ? 'on' : ''" @click="setTime('seven')">最近7天</view>
|
||||
<view class="item" :class="time == 'month' ? 'on' : ''" @click="setTime('month')">本月</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="title">{{ title }}{{ this.where.type == 1 ? "营业额(元)" : "订单量(份)" }}</view>
|
||||
<view class="money">{{ time_price }}</view>
|
||||
</view>
|
||||
<!-- <view class="chart">
|
||||
<view class="company">{{ where.type === 1 ? "单位(元)" : "单位(份)" }}</view>
|
||||
<ECharts :options="polar"></ECharts>
|
||||
</div> -->
|
||||
<div class="public-wrapper">
|
||||
<div class="title">
|
||||
<span class="iconfont icon-xiangxishuju"></span>详细数据
|
||||
</div>
|
||||
<div class="nav acea-row row-between-wrapper">
|
||||
<div class="data">日期</div>
|
||||
<div class="browse">订单量</div>
|
||||
<div class="turnover">成交额</div>
|
||||
</div>
|
||||
<div class="conter">
|
||||
<div
|
||||
</view> -->
|
||||
<view class="public-wrapper">
|
||||
<view class="title">
|
||||
<text class="iconfont icon-xiangxishuju"></text>详细数据
|
||||
</view>
|
||||
<view class="nav acea-row row-between-wrapper">
|
||||
<view class="data">日期</view>
|
||||
<view class="browse">订单量</view>
|
||||
<view class="turnover">成交额</view>
|
||||
</view>
|
||||
<view class="conter">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(item, statisticalIndex) in list"
|
||||
:key="statisticalIndex"
|
||||
>
|
||||
<div class="data">{{ item.time }}</div>
|
||||
<div class="browse">{{ item.count }}</div>
|
||||
<div class="turnover">{{ item.price }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="calendar-wrapper" :class="current === true ? 'on' : ''">
|
||||
<div class="calendar">
|
||||
<view class="data">{{ item.time }}</view>
|
||||
<view class="browse">{{ item.count }}</view>
|
||||
<view class="turnover">{{ item.price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="calendar-wrapper" :class="current === true ? 'on' : ''">
|
||||
<view class="calendar">
|
||||
<Calendar
|
||||
:clean="clean"
|
||||
:lunar="lunar"
|
||||
@@ -57,11 +57,11 @@
|
||||
:begin="[1992, 5, 20]"
|
||||
:end="[2049, 5, 20]"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="mask" @touchmove.prevent v-show="current === true" @click="close"></div>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="mask" @touchmove.prevent v-show="current === true" @click="close"></view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// import ECharts from "vue-echarts";
|
||||
@@ -398,8 +398,12 @@ export default {
|
||||
that.list.push.apply(that.list, res.data);
|
||||
that.filter.page = that.filter.page + 1;
|
||||
},
|
||||
error => {
|
||||
that.$dialog.message(error.msg);
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user