商城订单

main
bibi 3 years ago
parent 8318c11546
commit 18083f5080

@ -1,6 +1,7 @@
import httpService from "@/request" import httpService from "@/request"
// 工单 // 工单
// list
export function name(params) { export function name(params) {
return httpService({ return httpService({
url: ` `, url: ` `,

@ -1,5 +1,6 @@
import httpService from "@/request" import httpService from "@/request"
// 组织
// 所有的组织架构 // 所有的组织架构
export function departmentList(params) { export function departmentList(params) {
return httpService({ return httpService({

@ -1,5 +1,6 @@
import httpService from "@/request" import httpService from "@/request"
// 房产 楼栋
// 楼栋列表 // 楼栋列表
export function buildingList(params) { export function buildingList(params) {
return httpService({ return httpService({
@ -8,6 +9,15 @@ export function buildingList(params) {
params: params, params: params,
}) })
} }
// 楼栋删除
export function buildingDel(params) {
return httpService({
url: `/user/building/deleteBuilding`,
method: 'post',
data: params,
})
}
// 房屋列表 // 房屋列表
export function houseList(params) { export function houseList(params) {
return httpService({ return httpService({
@ -16,3 +26,27 @@ export function houseList(params) {
params: params, params: params,
}) })
} }
// 房屋列表
export function houseInsert(params) {
return httpService({
url: `/user/estate/insert`,
method: 'post',
data: params,
})
}
// 房屋删除
export function houseDel(params) {
return httpService({
url: `/user/estate/delete`,
method: 'post',
data: params,
})
}
// 房屋租聘切换
export function isEnableLease(params) {
return httpService({
url: `/user/estate/isEnableLease`,
method: 'get',
params: params,
})
}

@ -0,0 +1,11 @@
import httpService from "@/request"
// 订单
// list
export function orderList(params) {
return httpService({
url: `/user/shopOrder/list`,
method: 'get',
params: params,
})
}

@ -12,6 +12,7 @@ router.beforeEach((to, from, next) => {
next('/login'); next('/login');
} else { } else {
next(); next();
NProgress.done()
} }
}) })

@ -26,17 +26,17 @@ export default [
hide: false, hide: false,
component: resolve => require(['@/views/Basic/Authority'], resolve), component: resolve => require(['@/views/Basic/Authority'], resolve),
meta: {title: '权限管理'}, meta: {title: '权限管理'},
children: [ // children: [
{ // {
path: '/Authority/_details', // path: '/Authority/_details',
name: "Authority_details", // name: "Authority_details",
title: "账单管理-详情", // title: "账单管理-详情",
icon: 'profile', // icon: 'profile',
hide: true, // hide: true,
component: resolve => require(['@/views/Basic/Authority/_details'], resolve), // component: resolve => require(['@/views/Basic/Authority/_details'], resolve),
meta: {title: '账单管理-详情'}, // meta: {title: '账单管理-详情'},
} // }
] // ]
}, },
{ {
path: '/EstateInfo', path: '/EstateInfo',

@ -18,7 +18,7 @@ Vue.use(Router);
import Layout from "@/views/Layout" import Layout from "@/views/Layout"
import basic from "./basic" // 基础功能 import basic from "./basic" // 基础功能
// import payment from "./payment" // 缴费管理 // import payment from "./payment" // 缴费管理
// import smartMall from "./smartMall" // 智慧商城 import shop from "./shop" // 智慧商城
// import operation from "./operation" // 运营管理 // import operation from "./operation" // 运营管理
import setting from "./setting" // 设置 import setting from "./setting" // 设置
@ -45,6 +45,17 @@ const router = [
...setting, ...setting,
] ]
}, },
{
path: "/shop",
name: "shop",
title: "智慧商城",
component: Layout,
redirect: '/OrderManage',
meta: {title: '智慧商城'},
children: [
...shop,
]
},
{ {
path: "/login", path: "/login",
name: "Login", name: "Login",

@ -6,4 +6,14 @@
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /LittleBeeSaas/src/router/smartMall.js * @FilePath: /LittleBeeSaas/src/router/smartMall.js
*/ */
export default [] export default [
{
path: '/OrderManage',
name: "OrderManage",
title: "订单列表",
hide: false,
icon: 'container',
component: resolve => require(['@/views/Shop/OrderManage'], resolve),
meta: {title: '订单列表'}
},
]

@ -67,17 +67,13 @@ export default {
}, },
data() { data() {
return { return {
pagination,
columns,
searchForm,
tableChoosed: [], tableChoosed: [],
roleList: [], roleList: [],
// tableData: [], //
pagination: pagination, ActionsList: [],
//
columns: columns,
searchForm:searchForm,
//
tableData: [],
ActionsList: [
],
}; };
}, },
mounted() { mounted() {

@ -6,12 +6,12 @@ export const columns = [
{ {
title: "真实名称", title: "真实名称",
dataIndex: "actualName", dataIndex: "actualName",
width: "16%", width: "12%",
}, },
{ {
title: "手机号", title: "手机号",
dataIndex: "tel", dataIndex: "tel",
width: "16%", width: "14%",
}, },
{ {
title: "所属部门", title: "所属部门",
@ -21,7 +21,22 @@ export const columns = [
{ {
title: "岗位", title: "岗位",
dataIndex: "positionName", dataIndex: "positionName",
width: "10%",
},
{
title: "状态",
dataIndex: "status",
width: "16%", width: "16%",
customRender: function (status) {
switch (status) {
case 1:
return '正常'
case 2:
return '停用'
default:
break;
}
}
}, },
{ {
title: "备注", title: "备注",

@ -90,6 +90,7 @@
<span slot="action" slot-scope="text,scope"> <span slot="action" slot-scope="text,scope">
<a-space size="small"> <a-space size="small">
<a class="ant-dropdown-link" @click="edit(scope)"></a> <a class="ant-dropdown-link" @click="edit(scope)"></a>
<a-switch @change="enableUser(scope.id)" :checked='scope.status ===1'></a-switch>
<a class="ant-dropdown-link" @click="resetPsw(scope.id)"></a> <a class="ant-dropdown-link" @click="resetPsw(scope.id)"></a>
</a-space> </a-space>
</span> </span>
@ -209,7 +210,8 @@ import {
departmentUpdate, departmentUpdate,
departmentDel, departmentDel,
findToUser, findToUser,
rePassword rePassword,
userEnable
} from "@/api/basic/department"; } from "@/api/basic/department";
export default { export default {
@ -218,9 +220,9 @@ export default {
}, },
data() { data() {
return { return {
columns: columns, columns,
pagination: pagination, pagination,
searchForm: searchForm, searchForm,
searchStr: "", searchStr: "",
searchValue: "", searchValue: "",
rules: { rules: {
@ -363,6 +365,15 @@ export default {
}); });
} }
}, },
async enableUser(id){
const res = await userEnable({manageUserId:id})
if(res.code === 200){
this.$message.success(res.msg)
this.getData()
}else{
this.$message.error(res.msg)
}
},
handleCancel() { handleCancel() {
this.show.addDepartment = false; this.show.addDepartment = false;
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();

@ -26,7 +26,7 @@
<template v-slot:actionBox="data"> <template v-slot:actionBox="data">
<a-space size="small"> <a-space size="small">
<a class="ant-dropdown-link" @click='detail(data)'>详情</a> <a class="ant-dropdown-link" @click='detail(data)'>详情</a>
<a class="ant-dropdown-link" @click='del(data)'>删除</a> <a class="ant-dropdown-link" @click='del([data.data.id])'>删除</a>
</a-space> </a-space>
</template> </template>
</commonTable> </commonTable>
@ -136,10 +136,13 @@
<script> <script>
import { columns,pagination,searchForm} from "./depend/config" import { columns,pagination,searchForm} from "./depend/config"
import { buildingList } from "@/api/basic/estate" import { buildingList,buildingDel } from "@/api/basic/estate"
export default { export default {
data() { data() {
return { return {
pagination,
columns,
searchForm,
drawerConfig:{ drawerConfig:{
addShow:false, addShow:false,
detailShow:false, detailShow:false,
@ -154,26 +157,8 @@ export default {
name:[{required:true,message:'请输入楼栋',trigger:'blur'}], name:[{required:true,message:'请输入楼栋',trigger:'blur'}],
fileList:[{required:true}] fileList:[{required:true}]
}, },
fileList: [ fileList: [],
{
uid: '-1',
name: 'xxx.png',
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
},
{
uid: '-2',
name: 'yyy.png',
status: 'done',
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
thumbUrl: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
},
],
tableChoosed: [], tableChoosed: [],
//
pagination: pagination,
//
columns:columns,
searchForm:searchForm,
unitData:[], unitData:[],
unitColumns: [ unitColumns: [
{ {
@ -222,10 +207,6 @@ export default {
label: "批量删除", label: "批量删除",
value: 1, value: 1,
}, },
{
label: "批量导出",
value: 2,
},
], ],
}; };
}, },
@ -274,19 +255,30 @@ export default {
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
del(data) { del(ids) {
this.$confirm({ this.$confirm({
title: "是否删除", title: "是否删除",
// okText:'',
// cancelText:'',
icon: "", icon: "",
onOk: function () { onOk: function () {
console.log(data); buildingDel({buildingIds:ids}).then(res=>{
if(res.code === 200){
this.$message.success(res.msg)
}else{
this.$message.error(res.msg)
}
})
}, },
}); });
}, },
Actions(data) { Actions(data) {
console.log(data); let ids =[]
for(const item of this.tableChoosed){
ids.push(item.id)
}
//
if(data===1){
this.del(ids)
}
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);

@ -59,14 +59,3 @@ export const pagination = {
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
} }
export function del(data) {
this.$confirm({
title: "是否删除",
// okText:'删除',
// cancelText:'取消',
icon: "",
onOk: function () {
console.log(data);
},
});
}

@ -48,7 +48,7 @@
:scroll="{ x: 1300 }" :scroll="{ x: 1300 }"
:row-selection="{ :row-selection="{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed, onChange: onSelectChange,
}" }"
:row-key=" :row-key="
(record, index) => { (record, index) => {
@ -71,7 +71,7 @@
<span slot="action" slot-scope="text, row"> <span slot="action" slot-scope="text, row">
<a-space> <a-space>
<a class="ant-dropdown-link" @click='edit(row)'>编辑</a> <a class="ant-dropdown-link" @click='edit(row)'>编辑</a>
<a class="ant-dropdown-link" @click='del(row)'>删除</a> <a class="ant-dropdown-link" @click='del([row.id])'>删除</a>
</a-space> </a-space>
</span> </span>
<span slot="tags" slot-scope="tag"> <span slot="tags" slot-scope="tag">
@ -82,7 +82,7 @@
</a-tag> </a-tag>
</span> </span>
<span slot="switch" slot-scope="switchV, row"> <span slot="switch" slot-scope="switchV, row">
<a-switch :checked="switchV === 1" @change="enable(row)"></a-switch> <a-switch :checked="switchV === 1" @change="handleEnable(row)"></a-switch>
</span> </span>
</a-table> </a-table>
</div> </div>
@ -250,8 +250,8 @@ function getBase64(file) {
reader.onerror = error => reject(error); reader.onerror = error => reject(error);
}); });
} }
import { columns,pagination,searchForm, del } from "./depend/config" import { columns,pagination,searchForm } from "./depend/config"
import { houseList } from '@/api/basic/estate' import { houseList, houseDel, isEnableLease} from '@/api/basic/estate'
export default { export default {
data() { data() {
return { return {
@ -324,10 +324,10 @@ export default {
label: "批量删除", label: "批量删除",
value: 1, value: 1,
}, },
{ // {
label: "批量导出", // label: "",
value: 2, // value: 2,
}, // },
], ],
}; };
}, },
@ -361,8 +361,16 @@ export default {
handleChange({ fileList }) { handleChange({ fileList }) {
this.fileList = fileList; this.fileList = fileList;
}, },
enable(data) { handleEnable: async function(data) {
console.log(data); const res = await isEnableLease({
estateId:data.id
})
if(res.code===200){
this.$message.success(res.msg)
this.getData()
}else{
this.$message.error(res.msg)
}
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
console.log(pagination); console.log(pagination);
@ -371,17 +379,30 @@ export default {
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
// del(data) { del(ids) {
this.$confirm({
// }, title: "是否删除",
del:del, icon: "",
onOk: function () {
houseDel({estateIds:ids}).then(res=>{
if(res.code === 200){
this.$message.success(res.msg)
}else{
this.$message.error(res.msg)
}
})
},
});
},
Actions(data) { Actions(data) {
console.log(data); //
this.activeAction = undefined; if(data===1){
this.del(this.selectedRowKeys)
this.activeAction = undefined;
}
}, },
selectionChoosed(data) { onSelectChange(selectedRowKeys) {
console.log(data); this.selectedRowKeys = selectedRowKeys;
this.tableChoosed = data;
}, },
addClose(){ addClose(){
this.drawerConfig.addShow = false; this.drawerConfig.addShow = false;

@ -43,15 +43,21 @@ export default {
components: { components: {
yMenu, yMenu,
}, },
mounted(){
this.$router.push({ name: sessionStorage.getItem('routerName') });
this.tagActive = Number(sessionStorage.getItem('index'))
},
watch: { watch: {
$route: { $route: {
handler(val) { handler(val) {
this.tags = val.matched; this.tags = val.matched;
sessionStorage.setItem('routerName',val.name)
}, },
immediate: true, immediate: true,
}, },
tagActive:{ tagActive:{
handler(val) { handler(val) {
// console.log(val);
sessionStorage.setItem('modal',this.menuTags[val].value) sessionStorage.setItem('modal',this.menuTags[val].value)
}, },
immediate: true, immediate: true,
@ -66,13 +72,13 @@ export default {
label: "基础功能", label: "基础功能",
value: "basic" value: "basic"
}, },
{ // {
label: "缴费管理", // label: "",
value: "payment" // value: "payment"
}, // },
{ {
label: "智慧商城", label: "智慧商城",
value: "smartMall" value: "shop"
}, },
// { // {
// label: "", // label: "",
@ -92,6 +98,7 @@ export default {
}, },
handlerTags(n) { handlerTags(n) {
this.tagActive = n; this.tagActive = n;
sessionStorage.setItem('index',n)
} }
}, },
}; };

@ -104,7 +104,6 @@ export default {
handlerSelect({selectedKeys}) { handlerSelect({selectedKeys}) {
this.selectedKeys = selectedKeys; this.selectedKeys = selectedKeys;
this.setSelectedKeys(selectedKeys); this.setSelectedKeys(selectedKeys);
}, },
handlerOpen(val) { handlerOpen(val) {
this.setOpenKeys(val); this.setOpenKeys(val);

@ -0,0 +1,154 @@
/**
* 配置
* 表格列
*/
export const columns = [
{
title: "订单号",
dataIndex: "code",
width: "15%",
},
{
title: "创建时间",
dataIndex: "createDate",
width: "15%",
},
{
title: "付款方式",
dataIndex: "payType",
width: "15%",
customRender: function (payType) {
switch (payType) {
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;
}
}
},
// {
// 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 searchForm = {
code: "",
jcookCode: '',
tradeStatus:null
}
// 分页
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}
export function del(data) {
this.$confirm({
title: "是否删除",
// okText:'删除',
// cancelText:'取消',
icon: "",
onOk: function () {
console.log(data);
},
});
}

@ -0,0 +1,147 @@
<template>
<div>
<div class="cardTitle">订单列表</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input style="width: 200px" placeholder="请输入订单号" />
<a-input style="width: 200px" 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>
</a-space>
</a-col>
<a-col :span="4">
<!-- <a-button class="add-btn" @click="">添加</a-button> -->
</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-descriptions-item>
<a-descriptions-item label="Telephone">
1810000000
</a-descriptions-item>
<a-descriptions-item label="Live">
Hangzhou, Zhejiang
</a-descriptions-item>
<a-descriptions-item label="Remark">
empty
</a-descriptions-item>
<a-descriptions-item label="Address">
No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
</a-descriptions-item>
</a-descriptions>
</div>
<span slot="action" slot-scope="text, record" class="action-col">
<a-space>
<a @click='detail(record)'>查看详情</a>
<a @click='remark(record)'>备注</a>
</a-space>
</span>
</a-table>
</div>
</template>
<script>
import { orderList } from '@/api/shop/order'
import { columns,pagination,searchForm } from './depend/config'
export default {
data() {
return {
tableData:[],
columns,
pagination,
searchForm
};
},
mounted() {
// this.getData()
this.tableData =[{
"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":'2022-2-2'
},{
"id":2,
"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":'2022-2-2'
},{
"id":3,
"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":'2022-2-2'
},
]
},
methods: {
async getData(){
const res = await orderList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
code:this.searchForm.code,
jcookCode:this.searchForm.jcookCode,
tradeStatus:this.searchForm.tradeStatus,
})
this.tableData = res.data.rows
}
}
};
</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