parent
bb4d9721ab
commit
93b235fac6
@ -0,0 +1,43 @@
|
|||||||
|
import { message } from 'antd';
|
||||||
|
import { orderPage, updateOrderItem } from '../../services/order';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
namespace: 'orderList',
|
||||||
|
|
||||||
|
state: {
|
||||||
|
list: [],
|
||||||
|
},
|
||||||
|
|
||||||
|
effects: {
|
||||||
|
*queryPage({ payload }, { call, put }) {
|
||||||
|
const response = yield call(orderPage, payload);
|
||||||
|
message.info('查询成功!');
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageSuccess',
|
||||||
|
payload: {
|
||||||
|
list: response.data,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
*updateOrderItem({ payload }, { call, put }) {
|
||||||
|
const { params } = payload;
|
||||||
|
const response = yield call(updateOrderItem, params);
|
||||||
|
message.info('查询成功!');
|
||||||
|
yield put({
|
||||||
|
type: 'queryPageSuccess',
|
||||||
|
payload: {
|
||||||
|
list: response.data,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
reducers: {
|
||||||
|
queryPageSuccess(state, { payload }) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
...payload,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
@ -0,0 +1,237 @@
|
|||||||
|
@import '~antd/lib/style/themes/default.less';
|
||||||
|
@import '~@/utils/utils.less';
|
||||||
|
|
||||||
|
.standardList {
|
||||||
|
:global {
|
||||||
|
.ant-card-head {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.ant-card-head-title {
|
||||||
|
padding: 24px 0;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
.ant-card-extra {
|
||||||
|
padding: 24px 0;
|
||||||
|
}
|
||||||
|
.ant-list-pagination {
|
||||||
|
margin-top: 24px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.ant-avatar-lg {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.headerInfo {
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
& > span {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
color: @text-color-secondary;
|
||||||
|
font-size: @font-size-base;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
& > p {
|
||||||
|
margin: 0;
|
||||||
|
color: @heading-color;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
& > em {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 1px;
|
||||||
|
height: 56px;
|
||||||
|
background-color: @border-color-split;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.listContent {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
font-size: 0;
|
||||||
|
|
||||||
|
.listContentItem {
|
||||||
|
flex: 1;
|
||||||
|
margin-left: 40px;
|
||||||
|
color: @text-color-secondary;
|
||||||
|
font-size: @font-size-base;
|
||||||
|
vertical-align: middle;
|
||||||
|
> span {
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
> p {
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.extraContentSearch {
|
||||||
|
width: 272px;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-xs) {
|
||||||
|
.standardList {
|
||||||
|
:global {
|
||||||
|
.ant-list-item-content {
|
||||||
|
display: block;
|
||||||
|
flex: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.ant-list-item-action {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.listContent {
|
||||||
|
margin-left: 0;
|
||||||
|
& > div {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.listCard {
|
||||||
|
:global {
|
||||||
|
.ant-card-head-title {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-sm) {
|
||||||
|
.standardList {
|
||||||
|
.extraContentSearch {
|
||||||
|
width: 100%;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
.headerInfo {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
& > em {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-md) {
|
||||||
|
.standardList {
|
||||||
|
.listContent {
|
||||||
|
& > div {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
& > div:last-child {
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.listCard {
|
||||||
|
:global {
|
||||||
|
.ant-radio-group {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-lg) and (min-width: @screen-md) {
|
||||||
|
.standardList {
|
||||||
|
.listContent {
|
||||||
|
& > div {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
& > div:last-child {
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-xl) {
|
||||||
|
.standardList {
|
||||||
|
.listContent {
|
||||||
|
& > div {
|
||||||
|
margin-left: 24px;
|
||||||
|
}
|
||||||
|
& > div:last-child {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 1400px) {
|
||||||
|
.standardList {
|
||||||
|
.listContent {
|
||||||
|
text-align: right;
|
||||||
|
& > div:last-child {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.standardListForm {
|
||||||
|
:global {
|
||||||
|
.ant-form-item {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 32px;
|
||||||
|
padding-top: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.formResult {
|
||||||
|
width: 100%;
|
||||||
|
[class^='title'] {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tableListForm {
|
||||||
|
:global {
|
||||||
|
.ant-form-item {
|
||||||
|
display: flex;
|
||||||
|
margin-right: 0;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
> .ant-form-item-label {
|
||||||
|
width: auto;
|
||||||
|
padding-right: 8px;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
.ant-form-item-control {
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ant-form-item-control-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.submitButtons {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-lg) {
|
||||||
|
.tableListForm :global(.ant-form-item) {
|
||||||
|
margin-right: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-md) {
|
||||||
|
.tableListForm :global(.ant-form-item) {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
import { stringify } from '@/utils/request.qs';
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// order
|
||||||
|
export async function orderPage(params) {
|
||||||
|
return request(`/order-api/admins/order/page?${stringify(params)}`, {
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function updateOrderItem(params) {
|
||||||
|
return request(`/order-api/admins/order_item/update?${stringify(params)}`, {
|
||||||
|
method: 'PUT',
|
||||||
|
body: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
// 字典定义
|
||||||
|
|
||||||
|
const DictionaryConstants = {
|
||||||
|
GENDER: 'gender',
|
||||||
|
ORDER_STATUS: 'order_status',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default DictionaryConstants;
|
||||||
Loading…
Reference in new issue