bibi 3 years ago
parent c1b1091239
commit b6085145da

@ -0,0 +1,11 @@
import httpService from "@/request"
// 商品
// list
export function goodsList(params) {
return httpService({
url: `/user/shop/jcookGoodsList`,
method: 'get',
params: params,
})
}

@ -9,3 +9,19 @@ export function orderList(params) {
params: params,
})
}
// 订单详情
export function orderInfo(params) {
return httpService({
url: `/user/shopOrder/findDetail`,
method: 'get',
params: params,
})
}
// 取消订单
export function shopOrderCancel(params) {
return httpService({
url: `/user/shopOrder/cancel`,
method: 'get',
params: params,
})
}

@ -45,6 +45,7 @@ export default [
icon: 'home',
hide: false,
component: resolve => require(['@/views/Basic/EstateInfo'], resolve),
redirect: '/EstateInfo/BuildingManage',
meta: {title: '小区信息'},
children: [
{

@ -7,6 +7,50 @@
* @FilePath: /LittleBeeSaas/src/router/smartMall.js
*/
export default [
{
path: '/GoodsManage',
name: "GoodsManage",
title: "商品管理",
icon: 'home',
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage'], resolve),
redirect: '/GoodsManage/GoodsList',
meta: {title: '商品管理'},
children: [
{
path: '/GoodsManage/GoodsList',
name: "GoodsList",
title: "商品列表",
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage/_goodsList'], resolve),
meta: {title: '商品列表'},
},
{
path: '/GoodsManage/GoodsCate',
name: "GoodsCate",
title: "商品分类",
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage/_goodsCate'], resolve),
meta: {title: '商品分类'},
},
// {
// path: '/GoodsManage/GoodsCate',
// name: "GoodsCate",
// title: "商品审核",
// hide: false,
// component: resolve => require(['@/views/Shop/GoodsManage/_goodsCate'], resolve),
// meta: {title: '商品分类'},
// },
{
path: '/GoodsManage/Brand',
name: "Brand",
title: "品牌资质",
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage/_brand'], resolve),
meta: {title: '品牌资质'},
},
]
},
{
path: '/OrderManage',
name: "OrderManage",
@ -16,4 +60,13 @@ export default [
component: resolve => require(['@/views/Shop/OrderManage'], resolve),
meta: {title: '订单列表'}
},
{
path: '/OrderDetail',
name: "OrderDetail",
title: "订单详情",
hide: true,
icon: 'container',
component: resolve => require(['@/views/Shop/OrderManage/depend/detail'], resolve),
meta: {title: '订单详情'}
},
]

@ -20,7 +20,13 @@
margin-left : 10px;
margin-bottom: 10px;
}
.back-btn{
font-size: 16px;
line-height: 22px;
color: #000000D9;
font-weight: 500;
cursor: pointer;
}
// 表格
#commonTable {
margin: 24px;

@ -219,6 +219,7 @@ export default {
keyword: this.searchForm.keyword,
}).then((res) => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total
});
},
success() {

@ -291,6 +291,7 @@ export default {
positionId:this.searchForm.positionId,
}).then((res) => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total
});
},
openDepartment(type) {

@ -71,6 +71,7 @@ export default {
}
)
this.tableData = res.data.rows
this.pagination.total = res.data.total
},
addBuilding(){
this.drawerConfig.show = true

@ -175,6 +175,7 @@ export default {
identity: this.searchForm.identity,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total
},
tabsChange() {
this.getData();

@ -233,6 +233,7 @@ export default {
manageEstateTypeId: this.searchForm.manageEstateTypeId,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total
},
//
async getType() {

@ -0,0 +1,13 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -6,7 +6,12 @@ export const columns = [
{
title: "订单号",
dataIndex: "code",
width: "15%",
width: "25%",
},
{
title: "jcook订单号",
dataIndex: "jcookCode",
width: "25%",
},
{
title: "创建时间",
@ -42,95 +47,78 @@ export const columns = [
}
}
},
// {
// title: "jcook订单号",
// dataIndex: "jcookCode",
// width: "15%",
// },
// {
// title: "支付宝交易号",
// dataIndex: "tradeNo",
// width: "15%",
// },
// {
// title: "交易状态",
// dataIndex: "tradeStatus",
// width: "15%",
// },
// {
// title: "支付人名称",
// dataIndex: "payName",
// width: "15%",
// },
// {
// title: "支付人联系方式",
// dataIndex: "payTel",
// width: "15%",
// },
// {
// title: "付款方式",
// dataIndex: "payType",
// width: "15%",
// },
// {
// title: "付款金额",
// dataIndex: "payPrice",
// width: "15%",
// },
// {
// title: "运费",
// dataIndex: "freightFee",
// width: "15%",
// },
// {
// title: "收货人",
// dataIndex: "receiverName",
// width: "15%",
// },
// {
// title: "收货人联系方式",
// dataIndex: "receiverTel",
// width: "15%",
// },
// {
// title: "所在地区名称",
// dataIndex: "locationName",
// width: "15%",
// },
// {
// title: "详细地址",
// dataIndex: "addressDetail",
// width: "15%",
// },
// {
// title: "运费",
// dataIndex: "freightFee",
// width: "15%",
// },
// {
// title: "运费",
// dataIndex: "freightFee",
// width: "15%",
// },
// {
// title: "房屋类型",
// dataIndex: "manageEstateTypeName",
// width: "15%",
// },
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const detailColumns = [
{
title: "商品",
dataIndex: "skuName",
width: "16%",
scopedSlots: { customRender: "skuName"}
},
{
title: "商品类别",
dataIndex: "kind",
width: "15%",
customRender:function(kind){
switch (kind) {
case 0:
return '未知'
case 1:
return '自营'
case 2:
return '其他'
default:
break;
}
}
},
{
title: "商品单价",
dataIndex: "sellPrice",
width: "10%",
customRender:function(sellPrice){
return '¥'+sellPrice
}
},
{
title: "数量",
dataIndex: "num",
width: "8%",
},
{
title: "单位",
dataIndex: "unit",
width: "12%",
},
{
title: "总金额",
width: "12%",
customRender:function(data){
return '¥'+data.sellPrice*data.num
}
},
{
title: "实收款",
dataIndex: "payPrice",
width: "15%",
customRender:function(payPrice){
return '¥'+payPrice
}
},
]
// 搜索项
export const searchForm = {
code: "",
jcookCode: '',
tradeStatus:null
tradeStatus:undefined
}
// 分页
export const pagination = {
@ -140,15 +128,4 @@ export const pagination = {
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}
export function del(data) {
this.$confirm({
title: "是否删除",
// okText:'删除',
// cancelText:'取消',
icon: "delete",
onOk: function () {
console.log(data);
},
});
}

@ -0,0 +1,303 @@
<template>
<div>
<a-space class="top-content" size="large">
<span class="back-btn" @click='back'><a-icon type="left" style='margin-right:10px' />返回</span>
<span>订单号{{infoData.code}}</span>
<span>下单时间{{infoData.createDate}}</span>
<span>{{infoData.payType | payType}}</span>
</a-space>
<a-card class="gray-content">
<a-row>
<a-col :span="12">
<div class="tradeStatus">
{{infoData.tradeStatus|tradeStatus}}
</div>
<div style='margin-bottom:10px'>买家已付款至账户请尽快发货否则买家有权申请退款</div>
<a-space size='large'><a-button type="primary">确认发货</a-button><a></a></a-space>
</a-col>
<a-col :span="12" style="margin-top:20px">
<a-steps :current="1" style="">
<a-step>
<!-- <span slot="title">Finished</span> -->
<template slot="title">
Finished
</template>
<span slot="description">This is a description.</span>
</a-step>
<a-step title="In Progress" description="This is a description." />
<a-step title="Waiting" description="This is a description." />
</a-steps>
</a-col>
</a-row>
</a-card>
<a-card class="white-content">
<div>
<span class="box">
<a-descriptions title="买家信息" :column="1">
<a-descriptions-item label="买家">
{{infoData.payName}}
</a-descriptions-item>
<a-descriptions-item label="留言">
{{infoData.remake}}
</a-descriptions-item>
</a-descriptions>
</span>
<span class="box">
<a-descriptions title="收货人信息" :column="1">
<a-descriptions-item label="收货人">
{{infoData.receiverName}}
</a-descriptions-item>
<a-descriptions-item label="联系方式">
{{infoData.receiverTel}}
</a-descriptions-item>
<a-descriptions-item label="收货地址">
{{infoData.locationName+infoData.addressDetail+infoData.addressDetail+infoData.addressDetail+infoData.addressDetail+infoData.addressDetail+infoData.addressDetail}}
</a-descriptions-item>
</a-descriptions>
</span>
<span class="box">
<a-descriptions title="付款信息" :column="1">
<a-descriptions-item label="实付金额">
{{'¥'+infoData.payPrice}}
</a-descriptions-item>
<a-descriptions-item label="付款方式">
{{infoData.payType | payType}}
</a-descriptions-item>
<a-descriptions-item label="付款时间">
{{infoData.createDate}}
</a-descriptions-item>
</a-descriptions>
</span>
<span class="box">
<a-descriptions title="配送信息" :column="1">
<a-descriptions-item label="配送方式">
快递
</a-descriptions-item>
<a-descriptions-item label="配送公司">
顺丰
</a-descriptions-item>
<a-descriptions-item label="配送单号">
76845423
</a-descriptions-item>
</a-descriptions>
</span>
</div>
</a-card>
<a-table class='white-content' :columns="detailColumns" :pagination="false" :data-source='skuList' :rowKey="(record,index)=>index">
<span slot="skuName" slot-scope="text, row">
<img :src="row.mainPhoto" class="table-img" alt="">
<span>{{row.skuName}}</span>
</span>
</a-table>
<a-card class="gray-content right">
<a-descriptions :column="1">
<a-descriptions-item label="商品总价">
{{'¥'+(infoData.payPrice - infoData.freightFee)}}
</a-descriptions-item>
<a-descriptions-item label="运费">
{{'¥'+infoData.freightFee}}
</a-descriptions-item>
</a-descriptions>
<span style='color:#000000D9;font-size:20px;line-height:28px;font-weight:500'>实付款</span>
<span style='color:#CF1322;font-size:20px;line-height:26px;font-weight:500;font-style: normal;'>{{'¥'+infoData.payPrice}}</span>
</a-card>
</div>
</template>
<script>
import { orderInfo } from '@/api/shop/order'
import { detailColumns } from './config'
export default {
data(){
return{
infoData:{
"id":1,
"code":"123456",
"jcookCode":"123131241",
"tradeNo":"12123",
"tradeStatus":1,
"payName":"张三",
"payTel":"13738611460",
"payType":1,
"payPrice":13,
"freightFee":4,
"receiverName":"王五",
"receiverTel":"13738611465",
"locationName":"宁波镇海",
"addressDetail":"深蓝大厦",
"remake":null,
"createName":"张三",
"createDate":'2020-1-2',
"skuList":[
{
"mallType":1,
"appSkuId":"235533200452096000",
"skuName":"测试修改",
"mainPhoto":"http://oss.jcook.com.cn/file4/100003980222/100003980222_0.jpg",
"sellPrice":12,
"kind":1,
"weight":1,
"unit":"个",
"num":1,
"payPrice":13,
"goodsId":null
}
]
},
skuList:[
{
"mallType":1,
"appSkuId":"235533200452096000",
"skuName":"测试修改",
"mainPhoto":"http://oss.jcook.com.cn/file4/100003980222/100003980222_0.jpg",
"sellPrice":12,
"kind":1,
"weight":1,
"unit":"个",
"num":1,
"payPrice":13,
"goodsId":null
},
{
"mallType":1,
"appSkuId":"235533200452096000",
"skuName":"测试修改",
"mainPhoto":"http://oss.jcook.com.cn/file4/100003980222/100003980222_0.jpg",
"sellPrice":12,
"kind":1,
"weight":1,
"unit":"个",
"num":1,
"payPrice":13,
"goodsId":null
},
],
detailColumns
}
},
mounted() {
if(this.$route.params.id){
// this.getInfo(this.$route.params.id)
}
},
filters: {
tradeStatus: function (value) {
switch (value) {
// (0.,1.退,
// 2.,3.退4.,5.,
// 6.,7.8.9.10.,11.)
case 0:
return '交易创建并等待买家付款'
case 1:
return '交易关闭'
case 2:
return '待发货'
case 3:
return '交易结束'
case 4:
return '待收货'
case 5:
return '订单完成'
case 6:
return '申请取消'
case 7:
return '申请拒收'
case 8:
return '取消订单失败'
case 9:
return '取消订单成功'
case 10:
return '发生拆单'
case 11:
return '售后换新'
default:
break;
}
},
payType: function (value) {
switch (value) {
// 1.2.3.4.pos5.6.7.8.9.
case 1:
return '支付宝'
case 2:
return '微信'
case 3:
return '现金'
case 4:
return 'pos'
case 5:
return '预缴扣除'
case 6:
return '银行卡'
case 7:
return '支票'
case 8:
return '转账'
case 9:
return '开发商代付'
default:
break;
}
}
},
methods:{
getInfo(id){
orderInfo({orderId:id}).then(res=>{
this.infoData = res.data
this.skuList = res.data.skuList
})
},
back(){
this.$router.go(-1)
}
}
}
</script>
<style lang="less" scoped>
.top-content{
padding-left:13px ;
padding-bottom:20px ;
padding-top: 5px;
font-size: 14px;
border-bottom: 1px solid #e8e8e8;
width: 100%;
}
.gray-content{
width:95%;
background:#00000005;
margin:auto;
margin-top: 20px;
margin-bottom: 20px;
border-radius: 8px;
.tradeStatus{
color: #000000D9;
font-weight: 500;
font-size: 20px;
}
}
.white-content{
width:95%;
margin:auto;
margin-bottom: 20px;
margin-top: 20px;
border-radius: 8px;
}
.box{
width: 25%;
display: inline-block;
margin: auto;
vertical-align:top;
padding-left: 20px;
padding-right: 20px;
}
.table-img{
width: 40px;
height: 40px;
display: inline;
}
.right{
text-align: right;
padding-right: 20px;
}
</style>

@ -5,8 +5,8 @@
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input style="width: 200px" placeholder="请输入订单号" />
<a-input style="width: 200px" placeholder="请输入jcook订单号" />
<a-input style="width: 200px" v-model="searchForm.code" placeholder="请输入订单号" />
<a-input style="width: 200px" v-model="searchForm.jcookCode" placeholder="请输入jcook订单号" />
<a-select style="width: 200px" v-model="searchForm.tradeStatus" placeholder="请选择交易状态" ></a-select>
<a-button type="primary" @click='getData'> </a-button>
<a-button> </a-button>
@ -17,37 +17,53 @@
</a-col>
</a-row>
</div>
<a-table :columns="columns" :data-source="tableData" :rowKey="record=>record.id">>
<div slot="expandedRowRender" slot-scope="record" class="orderInfo">
<a-descriptions title="商品信息">
<a-descriptions-item label="UserName">
{{record.freightFee}}
<a-table :columns="columns" :data-source="tableData" :rowKey="record=>record.id" tableLayout='auto' :pagination="pagination">
<div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<a-descriptions title="订单信息">
<!-- 商品图片 -->
<!-- <template>
<img :src="ImgUrl(record)" class='order-pic' alt="">
</template> -->
<a-descriptions-item label="订单状态">
{{record.tradeStatus | tradeStatus}}
</a-descriptions-item>
<a-descriptions-item label="Telephone">
1810000000
<a-descriptions-item label="支付人">
{{record.payName + record.payTel}}
</a-descriptions-item>
<a-descriptions-item label="Live">
Hangzhou, Zhejiang
<a-descriptions-item label="付款金额">
{{record.payPrice}}
</a-descriptions-item>
<a-descriptions-item label="Remark">
empty
<a-descriptions-item label="运费">
{{record.freightFee}}
</a-descriptions-item>
<a-descriptions-item label="Address">
No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
<a-descriptions-item label="收货人">
{{record.receiverName + record.receiverTel}}
</a-descriptions-item>
<a-descriptions-item label="地址">
{{record.locationName + record.addressDetail}}
</a-descriptions-item>
<a-descriptions-item label="备注">
{{record.remake||'无'}}
</a-descriptions-item>
<a-descriptions-item label="创建人">
{{record.createName}}
</a-descriptions-item>
<a-descriptions-item label="创建时间">
{{record.createDate}}
</a-descriptions-item>
</a-descriptions>
</div>
<span slot="action" slot-scope="text, record" class="action-col">
<span slot="action" slot-scope="text, record">
<a-space>
<a @click='detail(record)'>查看详情</a>
<a @click='remark(record)'>备注</a>
<a @click='cancelOrder(record)'>取消订单</a>
</a-space>
</span>
</a-table>
</div>
</template>
<script>
import { orderList } from '@/api/shop/order'
import { orderList, shopOrderCancel, orderInfo } from '@/api/shop/order'
import { columns,pagination,searchForm } from './depend/config'
export default {
data() {
@ -58,6 +74,41 @@ export default {
searchForm
};
},
filters: {
tradeStatus: function (value) {
switch (value) {
// (0.,1.退,
// 2.,3.退4.,5.,
// 6.,7.8.9.10.,11.)
case 0:
return '交易创建并等待买家付款'
case 1:
return '交易关闭'
case 2:
return '待发货'
case 3:
return '交易结束'
case 4:
return '待收货'
case 5:
return '订单完成'
case 6:
return '申请取消'
case 7:
return '申请拒收'
case 8:
return '取消订单失败'
case 9:
return '取消订单成功'
case 10:
return '发生拆单'
case 11:
return '售后换新'
default:
break;
}
}
},
mounted() {
// this.getData()
this.tableData =[{
@ -127,21 +178,22 @@ export default {
tradeStatus:this.searchForm.tradeStatus,
})
this.tableData = res.data.rows
this.pagination.total = res.data.total
},
reset(){
this.searchForm = {
code: "",
jcookCode: '',
tradeStatus:undefined
}
this.getData()
},
cancelOrder(data){},
detail(data){
this.$router.push({name:'OrderDetail',params:{id:data.id}})
}
}
};
</script>
<style lang="less" scoped>
.orderInfo{
// background-color:red;
}
/deep/tr.ant-table-expanded-row, tr.ant-table-expanded-row:hover{
// z-index: 999;
position: relative;
}
/deep/.action-col{
position: relative;
// background-color:red;
// z-index: 1;
}
</style>
Loading…
Cancel
Save