- 添加订单列表
This commit is contained in:
@@ -18,8 +18,7 @@ export default {
|
||||
const dicKey = item.enumValue;
|
||||
const dicTreeItem = {};
|
||||
item.values.map(item2 => {
|
||||
dicTreeItem.text = item2.displayName;
|
||||
dicTreeItem.value = item2.value;
|
||||
dicTreeItem[item2.value] = item2.displayName;
|
||||
return true;
|
||||
});
|
||||
dicTreeMap[dicKey] = dicTreeItem;
|
||||
|
||||
43
admin-web/src/models/order/orderList.js
Normal file
43
admin-web/src/models/order/orderList.js
Normal file
@@ -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,
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user