Commit 9a6d7464 authored by MrShi's avatar MrShi

dev分支,订单模块

parent a4904564
......@@ -86,15 +86,15 @@ export default {
changeOrigin: true,
pathRewrite: { '^': '' },
},
'/tos/': {
/* '/tos/': {
target: 'http://47.74.233.180:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},
/* '/tos/': {
},*/
'/tos/': {
target: 'http://localhost:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},*/
},
},
};
import { getAdvertisement,delAdvertisement,saveAdvertisement,quitAndUserAd,uploadApk,checkVideo } from '@/services/orderManagement';
import { getOrder,getAdvertisement,delAdvertisement,saveAdvertisement,quitAndUserAd,uploadApk,checkVideo } from '@/services/orderManagement';
export default{
namespace: 'orderManagementModel',
......@@ -6,6 +6,13 @@ export default{
data: [],
},
effects: {
*getOrder({callback,payload},{ call, put }) {
const response = yield call(getOrder,payload);
yield put({
type: "getAd",
});
if(callback) callback(response);
},
*getAdvertisement({callback,payload},{ call, put }) {
const response = yield call(getAdvertisement,payload);
yield put({
......
......@@ -221,21 +221,21 @@ class OrderManagement extends React.Component {
userPhone:"18813787835"
};
this.props.dispatch({
type: 'tUModel/getTosUser',
type: 'orderManagementModel/getOrder',
payload: params,
callback: (res) => {
if (res) {
this.setState({
/*this.setState({
data: res.rows,
total: res.total,
})
// if(res.error_code == "0000"){
// this.setState({
// data: res.data.rows,
// total: res.data.total,
// })
// }
})*/
if(res.error_code == "0000"){
this.setState({
data: res.data.rows,
total: res.data.total,
})
}
if(res.error_code == "0001"){
alert(res.error_msg);
......@@ -492,47 +492,45 @@ class OrderManagement extends React.Component {
/*--------------------------------------*/
//表格列名
columns = [
{
title: 'Service Community',
dataIndex: 'communityName',
key: 'communityName',
},
{
title: 'User Name',
dataIndex: 'owerName',
key: 'owerName',
dataIndex: 'ownerName',
key: 'ownerName',
},
{
title: 'Project',
dataIndex: 'owerPhone',
key: 'owerPhone',
title: 'Service Type',
dataIndex: 'serviceType',
key: 'serviceType',
},
{
title: 'Affiliated Unit',
dataIndex: 'buildingNumber',
key: 'buildingNumber',
title: 'Service Content',
dataIndex: 'serviceContent',
key: 'serviceContent',
},
{
title: 'User Status',
dataIndex: 'enable',
key: 'enable',
title: 'Order Time',
dataIndex: 'orderSendTime',
key: 'orderSendTime',
},
{
title: 'Appointment',
dataIndex: 'orderFinishTime',
key: 'orderFinishTime',
},
{
title: 'Status',
dataIndex: 'orderStatus',
key: 'orderStatus',
render: (text, record) => (
<span>{record.enable == '1' ? "注册" : "未注册"}</span>
<span>{record.orderStatus == '0' ? "已发单": "待上门"}</span>
),
/* render: (text, record) => (
<>
{record.map(enable => {
let color = 'green';
if (enable === '1') {
color = 'volcano';
}
if (enable === '0') {
color = 'geekblue';
}
return (
<Tag color={color} key={enable}>
{enable.toUpperCase()}
</Tag>
);
}
</>
),*/
},
......
import request from '@/utils/request';
export async function getOrder(params) {
return request('/tos/tosOrder/get', {
method: 'POST',
data: params,
});
}
export async function getAdvertisement(params) {
return request('/api/ad/get', {
method: 'POST',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment