Commit 9a6d7464 authored by MrShi's avatar MrShi

dev分支,订单模块

parent a4904564
...@@ -86,15 +86,15 @@ export default { ...@@ -86,15 +86,15 @@ export default {
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
'/tos/': { /* '/tos/': {
target: 'http://47.74.233.180:8651', target: 'http://47.74.233.180:8651',
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },*/
/* '/tos/': { '/tos/': {
target: 'http://localhost:8651', target: 'http://localhost:8651',
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
},*/ },
}, },
}; };
import { getAdvertisement,delAdvertisement,saveAdvertisement,quitAndUserAd,uploadApk,checkVideo } from '@/services/orderManagement'; import { getOrder,getAdvertisement,delAdvertisement,saveAdvertisement,quitAndUserAd,uploadApk,checkVideo } from '@/services/orderManagement';
export default{ export default{
namespace: 'orderManagementModel', namespace: 'orderManagementModel',
...@@ -6,6 +6,13 @@ export default{ ...@@ -6,6 +6,13 @@ export default{
data: [], data: [],
}, },
effects: { 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 }) { *getAdvertisement({callback,payload},{ call, put }) {
const response = yield call(getAdvertisement,payload); const response = yield call(getAdvertisement,payload);
yield put({ yield put({
......
...@@ -221,21 +221,21 @@ class OrderManagement extends React.Component { ...@@ -221,21 +221,21 @@ class OrderManagement extends React.Component {
userPhone:"18813787835" userPhone:"18813787835"
}; };
this.props.dispatch({ this.props.dispatch({
type: 'tUModel/getTosUser', type: 'orderManagementModel/getOrder',
payload: params, payload: params,
callback: (res) => { callback: (res) => {
if (res) { if (res) {
this.setState({ /*this.setState({
data: res.rows, data: res.rows,
total: res.total, 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"){ if(res.error_code == "0001"){
alert(res.error_msg); alert(res.error_msg);
...@@ -492,47 +492,45 @@ class OrderManagement extends React.Component { ...@@ -492,47 +492,45 @@ class OrderManagement extends React.Component {
/*--------------------------------------*/ /*--------------------------------------*/
//表格列名 //表格列名
columns = [ columns = [
{
title: 'Service Community',
dataIndex: 'communityName',
key: 'communityName',
},
{ {
title: 'User Name', title: 'User Name',
dataIndex: 'owerName', dataIndex: 'ownerName',
key: 'owerName', key: 'ownerName',
},
{
title: 'Service Type',
dataIndex: 'serviceType',
key: 'serviceType',
}, },
{ {
title: 'Project', title: 'Service Content',
dataIndex: 'owerPhone', dataIndex: 'serviceContent',
key: 'owerPhone', key: 'serviceContent',
}, },
{ {
title: 'Affiliated Unit', title: 'Order Time',
dataIndex: 'buildingNumber', dataIndex: 'orderSendTime',
key: 'buildingNumber', key: 'orderSendTime',
}, },
{ {
title: 'User Status', title: 'Appointment',
dataIndex: 'enable', dataIndex: 'orderFinishTime',
key: 'enable', key: 'orderFinishTime',
},
{
title: 'Status',
dataIndex: 'orderStatus',
key: 'orderStatus',
render: (text, record) => ( 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'; import request from '@/utils/request';
export async function getOrder(params) {
return request('/tos/tosOrder/get', {
method: 'POST',
data: params,
});
}
export async function getAdvertisement(params) { export async function getAdvertisement(params) {
return request('/api/ad/get', { return request('/api/ad/get', {
method: 'POST', 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