优化一些功能
parent
eb2b3a66a0
commit
0837f5d9d9
|
@ -71,7 +71,7 @@ service.interceptors.request.use(
|
||||||
let jwtData = JSON.parse(
|
let jwtData = JSON.parse(
|
||||||
decodeURIComponent(escape(window.atob(accessToken.split(".")[1])))
|
decodeURIComponent(escape(window.atob(accessToken.split(".")[1])))
|
||||||
);
|
);
|
||||||
if (jwtData.exp < new Date().getTime() / 1000) {
|
if (jwtData.exp < Math.round(new Date() / 1000)) {
|
||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,47 +1,58 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
|
|
||||||
<Card>
|
<Card>
|
||||||
<Row @keydown.enter.native="handleSearch">
|
|
||||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
|
||||||
<Form-item label="订单号" prop="orderSn">
|
|
||||||
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 200px" />
|
|
||||||
</Form-item>
|
|
||||||
<Form-item label="会员名称" prop="buyerName">
|
|
||||||
<Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 200px" />
|
|
||||||
</Form-item>
|
|
||||||
<Form-item label="订单状态" prop="orderStatus">
|
|
||||||
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 200px">
|
|
||||||
<Option value="UNPAID">未付款</Option>
|
|
||||||
<Option value="PAID">已付款</Option>
|
|
||||||
<Option value="UNDELIVERED">待发货</Option>
|
|
||||||
<Option value="DELIVERED">已发货</Option>
|
|
||||||
<Option value="COMPLETED">已完成</Option>
|
|
||||||
<Option value="TAKE">待核验</Option>
|
|
||||||
<Option value="CANCELLED">已取消</Option>
|
|
||||||
</Select>
|
|
||||||
</Form-item>
|
|
||||||
|
|
||||||
<Form-item label="下单时间">
|
<Row @keydown.enter.native="handleSearch">
|
||||||
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
</Form-item>
|
<Form-item label="订单号" prop="orderSn">
|
||||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 160px" />
|
||||||
|
</Form-item>
|
||||||
|
<Form-item label="会员名称" prop="buyerName">
|
||||||
|
<Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 160px" />
|
||||||
|
</Form-item>
|
||||||
|
|
||||||
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
|
<Form-item label="订单类型" prop="orderType">
|
||||||
<Button type="primary" ghost class="search-btn">导出Excel</Button>
|
<Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px">
|
||||||
</download-excel>
|
<Option value="NORMAL">普通订单</Option>
|
||||||
|
<Option value="PINTUAN">拼团订单</Option>
|
||||||
|
<Option value="GIFT">赠品订单</Option>
|
||||||
|
<Option value="VIRTUAL">核验订单</Option>
|
||||||
|
</Select>
|
||||||
|
</Form-item>
|
||||||
|
<Form-item label="订单状态" prop="orderStatus">
|
||||||
|
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
|
||||||
|
<Option value="UNPAID">未付款</Option>
|
||||||
|
<Option value="PAID">已付款</Option>
|
||||||
|
<Option value="UNDELIVERED">待发货</Option>
|
||||||
|
<Option value="DELIVERED">已发货</Option>
|
||||||
|
<Option value="COMPLETED">已完成</Option>
|
||||||
|
<Option value="TAKE">待核验</Option>
|
||||||
|
<Option value="CANCELLED">已取消</Option>
|
||||||
|
</Select>
|
||||||
|
</Form-item>
|
||||||
|
|
||||||
|
<Form-item label="下单时间">
|
||||||
|
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
|
||||||
|
</Form-item>
|
||||||
|
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||||
|
</Form>
|
||||||
|
</Row>
|
||||||
|
<div>
|
||||||
|
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
|
||||||
|
<Button type="primary" class="export">
|
||||||
|
导出Excel
|
||||||
|
</Button>
|
||||||
|
</download-excel>
|
||||||
|
</div>
|
||||||
|
|
||||||
</Form>
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||||
</Row>
|
|
||||||
|
|
||||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
<Row type="flex" justify="end" class="page">
|
||||||
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||||
<Row type="flex" justify="end" class="page">
|
show-total show-elevator show-sizer></Page>
|
||||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
</Row>
|
||||||
size="small" show-total show-elevator show-sizer></Page>
|
</Card>
|
||||||
</Row>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -57,49 +68,53 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 表格的表头以及内容
|
// 表格的表头以及内容
|
||||||
fields:{
|
fields: {
|
||||||
"订单编号":"sn",
|
订单编号: "sn",
|
||||||
"下单时间":"createTime",
|
下单时间: "createTime",
|
||||||
"客户名称":"memberName",
|
客户名称: "memberName",
|
||||||
"客户账号":"",
|
客户账号: "",
|
||||||
"收货人":"",
|
收货人: "",
|
||||||
"收货人手机号":"",
|
收货人手机号: "",
|
||||||
"收货人地址":"",
|
收货人地址: "",
|
||||||
"支付方式":{
|
支付方式: {
|
||||||
field: "clientType",
|
field: "clientType",
|
||||||
callback:value=>{
|
callback: (value) => {
|
||||||
if (value == "H5") {
|
if (value == "H5") {
|
||||||
return "移动端"
|
return "移动端";
|
||||||
} else if (value == "PC") {
|
} else if (value == "PC") {
|
||||||
return "PC端"
|
return "PC端";
|
||||||
} else if (value== "WECHAT_MP") {
|
} else if (value == "WECHAT_MP") {
|
||||||
return "小程序端"
|
return "小程序端";
|
||||||
} else if (value == "APP") {
|
} else if (value == "APP") {
|
||||||
return "移动应用端"
|
return "移动应用端";
|
||||||
} else {
|
} else {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
"配送方式":"",
|
配送方式: "",
|
||||||
"配送费用":"",
|
配送费用: "",
|
||||||
"订单商品金额":"",
|
订单商品金额: "",
|
||||||
"订单优惠金额":"",
|
订单优惠金额: "",
|
||||||
"订单应付金额":"",
|
订单应付金额: "",
|
||||||
"商品SKU编号":"",
|
商品SKU编号: "",
|
||||||
"商品数量":"groupNum",
|
商品数量: "groupNum",
|
||||||
"买家备注":"",
|
买家备注: "",
|
||||||
"订单状态":"",
|
订单状态: "",
|
||||||
"付款状态":{
|
付款状态: {
|
||||||
field:"payStatus",
|
field: "payStatus",
|
||||||
callback:value=>{
|
callback: (value) => {
|
||||||
return value == "UNPAID" ? "未付款" : value == "PAID" ? "已付款" : ""
|
return value == "UNPAID"
|
||||||
}
|
? "未付款"
|
||||||
|
: value == "PAID"
|
||||||
|
? "已付款"
|
||||||
|
: "";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"发货状态":"",
|
发货状态: "",
|
||||||
"发票类型":"",
|
发票类型: "",
|
||||||
"发票抬头":"",
|
发票抬头: "",
|
||||||
"店铺":"storeName",
|
店铺: "storeName",
|
||||||
},
|
},
|
||||||
loading: true, // 表单加载状态
|
loading: true, // 表单加载状态
|
||||||
searchForm: {
|
searchForm: {
|
||||||
|
@ -123,18 +138,14 @@ export default {
|
||||||
{
|
{
|
||||||
title: "订单号",
|
title: "订单号",
|
||||||
key: "sn",
|
key: "sn",
|
||||||
minWidth: 230,
|
minWidth: 240,
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "下单时间",
|
|
||||||
key: "createTime",
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "订单来源",
|
title: "订单来源",
|
||||||
key: "clientType",
|
key: "clientType",
|
||||||
width: 95,
|
width: 120,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.clientType == "H5") {
|
if (params.row.clientType == "H5") {
|
||||||
return h("div", {}, "移动端");
|
return h("div", {}, "移动端");
|
||||||
|
@ -149,15 +160,34 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "订单类型",
|
||||||
|
key: "orderType",
|
||||||
|
width: 120,
|
||||||
|
render: (h, params) => {
|
||||||
|
if (params.row.orderType == "NORMAL") {
|
||||||
|
return h("div", [h("span", {}, "普通订单")]);
|
||||||
|
} else if (params.row.orderType == "PINTUAN") {
|
||||||
|
return h("div", [h("span", {}, "拼团订单")]);
|
||||||
|
} else if (params.row.orderType == "GIFT") {
|
||||||
|
return h("div", [h("span", {}, "赠品订单")]);
|
||||||
|
} else if (params.row.orderType == "VIRTUAL") {
|
||||||
|
return h("div", [h("tag", {}, "核验订单")]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "买家名称",
|
title: "买家名称",
|
||||||
key: "memberName",
|
key: "memberName",
|
||||||
width: 130,
|
minWidth: 130,
|
||||||
|
tooltip: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "订单金额",
|
title: "订单金额",
|
||||||
key: "flowPrice",
|
key: "flowPrice",
|
||||||
minWidth: 120,
|
minWidth: 100,
|
||||||
|
tooltip: true,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h(
|
return h(
|
||||||
"div",
|
"div",
|
||||||
|
@ -169,7 +199,7 @@ export default {
|
||||||
{
|
{
|
||||||
title: "订单状态",
|
title: "订单状态",
|
||||||
key: "orderStatus",
|
key: "orderStatus",
|
||||||
width: 95,
|
minWidth: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.orderStatus == "UNPAID") {
|
if (params.row.orderStatus == "UNPAID") {
|
||||||
return h("div", [h("span", {}, "未付款")]);
|
return h("div", [h("span", {}, "未付款")]);
|
||||||
|
@ -188,12 +218,19 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "下单时间",
|
||||||
|
key: "createTime",
|
||||||
|
width: 170,
|
||||||
|
sortable: true,
|
||||||
|
sortType: "desc",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 180,
|
width: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h("div", [
|
return h("div", [
|
||||||
h(
|
h(
|
||||||
|
@ -337,4 +374,11 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 建议引入通用样式 可删除下面样式代码
|
// 建议引入通用样式 可删除下面样式代码
|
||||||
@import "@/styles/table-common.scss";
|
@import "@/styles/table-common.scss";
|
||||||
|
.export {
|
||||||
|
margin: 10px 20px 10px 0;
|
||||||
|
}
|
||||||
|
.export-excel-wrapper {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -232,9 +232,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 选中优惠券 父级传值
|
// 选中优惠券 父级传值
|
||||||
check(val,index) {
|
check(val,index) {
|
||||||
|
|
||||||
this.data[index].___selected = !this.data[index].___selected
|
this.data[index].___selected = !this.data[index].___selected
|
||||||
|
|
||||||
this.$emit("selected", val);
|
this.$emit("selected", val);
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
|
|
|
@ -381,6 +381,7 @@
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-goods-publish" v-show="activestep === 2">
|
<div class="content-goods-publish" v-show="activestep === 2">
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 上传 -->
|
<!-- 上传 -->
|
||||||
<div v-if="item.checked && index ==1" class="tpl">
|
<div v-if="item.checked && index ==1" class="tpl">
|
||||||
<Upload style="width:50%; height:400px;" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" multiple type="drag"
|
<Upload name="file" style="width:50%; height:400px;" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" multiple type="drag" :action="action"
|
||||||
action="//jsonplaceholder.typicode.com/posts/">
|
:headers="accessToken">
|
||||||
<div style="padding: 50px 0">
|
<div style="padding: 50px 0">
|
||||||
<Icon type="ios-cloud-upload" size="102" style="color: #3399ff"></Icon>
|
<Icon type="ios-cloud-upload" size="102" style="color: #3399ff"></Icon>
|
||||||
<h2>选择或拖拽文件上传</h2>
|
<h2>选择或拖拽文件上传</h2>
|
||||||
|
@ -42,12 +42,15 @@
|
||||||
<script>
|
<script>
|
||||||
import JsonExcel from "vue-json-excel";
|
import JsonExcel from "vue-json-excel";
|
||||||
import { getLogisticsChecked } from "@/api/order.js";
|
import { getLogisticsChecked } from "@/api/order.js";
|
||||||
|
import { baseUrl } from "@/libs/axios.js";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
"download-excel": JsonExcel,
|
"download-excel": JsonExcel,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
action: baseUrl + "/orders/batchDeliver", // 上传接口
|
||||||
|
accessToken: {}, // 验证token
|
||||||
// 步骤集合
|
// 步骤集合
|
||||||
stepList: [
|
stepList: [
|
||||||
{
|
{
|
||||||
|
@ -68,7 +71,9 @@ export default {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
this.accessToken.accessToken =this.getStore("accessToken");
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 点击选择步骤
|
// 点击选择步骤
|
||||||
handleCheckStep(val) {
|
handleCheckStep(val) {
|
||||||
|
@ -78,9 +83,8 @@ export default {
|
||||||
val.checked = true;
|
val.checked = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
async downLoad() {
|
async downLoad() {
|
||||||
let res = await getLogisticsChecked()
|
let res = await getLogisticsChecked();
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,13 +4,21 @@
|
||||||
<Row @keydown.enter.native="handleSearch">
|
<Row @keydown.enter.native="handleSearch">
|
||||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
<Form-item label="订单编号" prop="orderSn">
|
<Form-item label="订单编号" prop="orderSn">
|
||||||
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 200px" />
|
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 160px" />
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="会员名称" prop="buyerName">
|
<Form-item label="会员名称" prop="buyerName">
|
||||||
<Input type="text" v-model="searchForm.buyerName" clearable placeholder="请输入会员名称" style="width: 200px" />
|
<Input type="text" v-model="searchForm.buyerName" clearable placeholder="请输入会员名称" style="width: 160px" />
|
||||||
|
</Form-item>
|
||||||
|
<Form-item label="订单类型" prop="orderType">
|
||||||
|
<Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px">
|
||||||
|
<Option value="NORMAL">普通订单</Option>
|
||||||
|
<Option value="PINTUAN">拼团订单</Option>
|
||||||
|
<Option value="GIFT">赠品订单</Option>
|
||||||
|
<Option value="VIRTUAL">核验订单</Option>
|
||||||
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="订单状态" prop="orderStatus">
|
<Form-item label="订单状态" prop="orderStatus">
|
||||||
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 200px">
|
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
|
||||||
<Option value="UNPAID">未付款</Option>
|
<Option value="UNPAID">未付款</Option>
|
||||||
<Option value="PAID">已付款</Option>
|
<Option value="PAID">已付款</Option>
|
||||||
<Option value="UNDELIVERED">待发货</Option>
|
<Option value="UNDELIVERED">待发货</Option>
|
||||||
|
@ -21,7 +29,7 @@
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="下单时间">
|
<Form-item label="下单时间">
|
||||||
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
|
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||||
<Button @click="handleReset" class="search-btn">重置</Button>
|
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||||
|
|
Loading…
Reference in New Issue