Parcourir la source

Revert "bug fix"

This reverts commit 948f596dc425a2d9049a5e9ddf0d86829321c28a.
魏超 il y a 5 ans
Parent
révision
78b5688a7a

+ 0
- 46
config/routes.js Voir le fichier

@@ -623,52 +623,6 @@ export default [
623 623
               },
624 624
             ],
625 625
           },
626
-          {
627
-            path: '/h5SampleManager',
628
-            name: 'H5样例管理',
629
-            component: '../layouts/BlankLayout',
630
-            routes: [
631
-              {
632
-                path: '/h5SampleManager/h5Sample/list',
633
-                name: 'H5样例',
634
-                component: './h5SampleManager/h5Sample/list',
635
-              },
636
-              {
637
-                path: '/h5SampleManager/h5Sample/detail',
638
-                name: '详情',
639
-                hideInMenu: true,
640
-                component: './h5SampleManager/h5Sample/detail',
641
-              },
642
-              {
643
-                path: '/h5SampleManager/h5Sample/add',
644
-                name: '提交需求',
645
-                hideInMenu: true,
646
-                component: './h5SampleManager/h5Sample/add',
647
-              },
648
-              {
649
-                path: '/h5SampleManager/h5Demand/list',
650
-                name: 'H5需求单',
651
-                component: './h5SampleManager/h5Demand/list',
652
-              },
653
-              // {
654
-              //   path: '/drainageSampleManager/drainageDemand/add',
655
-              //   name: '新增需求单',
656
-              //   component: './drainageSampleManager/drainageDemand/add',
657
-              // },
658
-              {
659
-                path: '/h5SampleManager/h5Demand/detail',
660
-                name: '详情',
661
-                hideInMenu: true,
662
-                component: './h5SampleManager/h5Demand/detail',
663
-              },
664
-              {
665
-                path: '/h5SampleManager/h5Demand/edit',
666
-                name: '修改需求',
667
-                hideInMenu: true,
668
-                component: './h5SampleManager/h5Demand/edit',
669
-              },
670
-            ],
671
-          },
672 626
           // {
673 627
           //   path: '/miniapp',
674 628
           //   name: '小程序管理',

+ 0
- 2
src/components/Wangedit/Wangedit.jsx Voir le fichier

@@ -11,7 +11,6 @@ class Wangedit extends React.Component {
11 11
     super(props, context);
12 12
     this.state = {
13 13
       html: undefined,
14
-      contenteditable: props.contenteditable == false ? false : true
15 14
     }
16 15
     this.editor = undefined;
17 16
   }
@@ -78,7 +77,6 @@ class Wangedit extends React.Component {
78 77
     }
79 78
 
80 79
     this.editor.create()
81
-    this.editor.$textElem.attr('contenteditable',this.state.contenteditable);
82 80
     this.editor.customConfig.uploadImgShowBase64 = true
83 81
     this.editor.txt.html(this.props.value)
84 82
   }

+ 0
- 117
src/pages/h5SampleManager/h5Demand/detail.jsx Voir le fichier

@@ -1,117 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, InputNumber, Checkbox, Row, Col} from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import XForm, { FieldTypes } from '../../../components/XForm';
5
-import router from 'umi/router';
6
-import moment from 'moment';
7
-import apis from '../../../services/apis';
8
-import request from '../../../utils/request';
9
-import AuthButton from '@/components/AuthButton';
10
-import Wangedit from '../../../components/Wangedit/Wangedit'
11
-import TextArea from 'antd/lib/input/TextArea';
12
-
13
-const { Option } = Select;
14
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
-
16
-
17
-const header = props => {
18
-  const demandId  = props.location.query.id;
19
-  const [demandData, setDemandData] = useState({})
20
-
21
-  useEffect(() => {
22
-    getDemandData(demandId);
23
-  },[])
24
-
25
-  // 查询列表
26
-  const getDemandData = (demandId) => {
27
-      request({ ...apis.taH5SampleManager.taH5DemandById, urlData: {id: demandId} }).then((data) => {
28
-          setDemandData(data)
29
-          props.form.setFieldsValue(data)
30
-      })
31
-  }
32
-
33
-  function handleSubmit (e) {
34
-    e.preventDefault();
35
-    props.form.validateFields((err, values) => {
36
-      if (!err){
37
-        console.log(values,'valuesvaluesvalues')
38
-        if (values.payType == 'onLine' && (values.payDescriptionOnline == '' || values.payDescriptionOnline == null)){
39
-            message.info("请填写线上缴费说明");
40
-            return;
41
-        }
42
-        if (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null)){
43
-          message.info("请填写线下缴费说明");
44
-          return;
45
-        }
46
-        if ((values.payType == 'onLine' && (values.payDescriptionOnline == '' || values.payDescriptionOnline == null)) ||
47
-            (values.payType == 'offLine' && (values.payDescriptionOffline == '' || values.payDescriptionOffline == null))){
48
-          message.info("请填写缴费说明");
49
-          return;
50
-        }
51
-        
52
-        let {liveTime, ...submitValue} = values
53
-        if (values.raiseStartTime > values.raiseEndTime){
54
-          message.info("认筹结束时间大于认筹开始时间")
55
-          return;
56
-        }
57
-        submitValue.raiseStartTime = moment(submitValue.raiseStartTime).format('YYYY-MM-DD HH:mm:ss')
58
-        submitValue.raiseEndTime = moment(submitValue.raiseEndTime).format('YYYY-MM-DD HH:mm:ss')
59
-        submitValue.payType = values.payType.toString();
60
-        submitValue.raisePrice = submitValue.raisePrice * 100;
61
-        request({ ...apis.house.addRaise, data: { ...submitValue },}).then((data) => {
62
-          message.info("保存成功")
63
-          router.push({
64
-            pathname: '/house/raise/list',
65
-          });
66
-        }).catch((err) => {
67
-          message.info(err.msg || err.message)
68
-        })
69
-      }
70
-    });
71
-  }
72
-
73
-  const { getFieldDecorator } = props.form;
74
-
75
-  return (
76
-    <>
77
-      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
78
-        <Form.Item label="样例名">
79
-          {/* {getFieldDecorator('sampleName')(<Input disabled={true}/>)} */}
80
-          <span>{demandData.sampleName}</span>
81
-        </Form.Item>
82
-        <Form.Item label="下单人">
83
-          {/* {getFieldDecorator('orderer')(<Input disabled={true}/>)} */}
84
-          <span>{demandData.orderer}</span>
85
-        </Form.Item>
86
-        <Form.Item label="联系方式">
87
-        <span>{demandData.phone}</span>
88
-          {/* {getFieldDecorator('phone')(<Input disabled={true}/>)} */}
89
-        </Form.Item>
90
-        <Form.Item label="下单时间">
91
-        <span>{`${moment(demandData.createDate).format('YYYY-MM-DD HH:mm')}`}</span>
92
-          {/* {getFieldDecorator('createDate')} */}
93
-        </Form.Item>
94
-        <Form.Item label="更新时间">
95
-        <span>{`${moment(demandData.updateDate).format('YYYY-MM-DD HH:mm')}`}</span>
96
-          {/* {getFieldDecorator('createDate')} */}
97
-        </Form.Item>
98
-        <Form.Item label="需求单状态">
99
-        <span>{demandData.demandStatus === 1 ? "已提交": demandData.demandStatus === 2 ?"处理中":demandData.demandStatus === 3?"已交付":"作废"}</span>
100
-          {/* {getFieldDecorator('demandStatus')(<Input disabled={true}/>)} */}
101
-        </Form.Item>
102
-        <Form.Item label="需求描述">
103
-          {getFieldDecorator('demandContent')(<Wangedit contenteditable={false}/>)}
104
-        </Form.Item>
105
-        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
106
-          <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
107
-            修改需求
108
-          </Button>
109
-        </Form.Item>
110
-      </Form>
111
-    </>
112
-  )
113
-}
114
-
115
-const WrappedHeader = Form.create({ name: 'header' })(header);
116
-
117
-export default WrappedHeader

+ 0
- 0
src/pages/h5SampleManager/h5Demand/edit.jsx Voir le fichier


+ 0
- 237
src/pages/h5SampleManager/h5Demand/list.jsx Voir le fichier

@@ -1,237 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import styles from '../../style/GoodsList.less';
5
-import router from 'umi/router';
6
-import moment from 'moment';
7
-import SelectCity from '../../../components/SelectButton/CitySelect'
8
-import BuildSelect from '../../../components/SelectButton/BuildSelect'
9
-import apis from '../../../services/apis';
10
-import request from '../../../utils/request';
11
-import AuthButton from '@/components/AuthButton';
12
-
13
-const { Option } = Select;
14
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
-
16
-const header = props => {
17
-  const [data, setData] = useState({})
18
-  const [demend, setDemend] = useState({})
19
-
20
-  useEffect(() => {
21
-    getList({ pageNum: 1, pageSize: 10 });
22
-  }, [])
23
-
24
-  // 查询列表
25
-  const getList = (params) => {
26
-    console.log(params);
27
-    request({ ...apis.taH5SampleManager.tataH5Demand, params: { ...params } }).then((data) => {
28
-      console.log(data)
29
-      setData(data)
30
-    })
31
-  }
32
-
33
-
34
-  // 跳转到拼团活动新增
35
-  const toEditActivity = (groupActivityId) => () => {
36
-    router.push({
37
-      pathname: '/activity/groupActivity/editGroupActivity',
38
-      query: {
39
-        groupActivityId
40
-      },
41
-    });
42
-  }
43
-
44
-  const getActivityDetail = (groupActivityId) => () => {
45
-    router.push({
46
-      pathname: '/activity/groupActivity/detailActivity',
47
-      query: {
48
-        groupActivityId,
49
-      },
50
-    });
51
-  } 
52
-
53
-  const getJoinPeople = (groupActivityId) => () => {
54
-    router.push({
55
-      pathname: '/activity/groupActivity/helpRecord',
56
-      query: {
57
-          groupActivityId,
58
-      },
59
-    });
60
-  } 
61
-
62
-  // 跳转到编辑
63
-  const toDetail = rowData => () => {
64
-    if(rowData) {
65
-      router.push({
66
-      pathname: '/h5SampleManager/h5Demand/detail',
67
-      query: {
68
-        id: rowData.demandId,
69
-      },
70
-    });
71
-      return
72
-    }
73
-  }
74
-
75
-  /**
76
-   *
77
-   *
78
-   * @param {*} props
79
-   * @returns
80
-   */
81
-
82
-  const columns = [
83
-    {
84
-      title: '样例名',
85
-      dataIndex: 'sampleName',
86
-      key: 'sampleName',
87
-      align: 'center',
88
-    },
89
-    {
90
-      title: '下单人',
91
-      dataIndex: 'orderer',
92
-      key: 'orderer',
93
-      align: 'center',
94
-      
95
-    },
96
-    {
97
-      title: '联系方式',
98
-      dataIndex: 'phone',
99
-      key: 'phone',
100
-      align: 'center',
101
-    },
102
-    {
103
-      title: '下单时间',
104
-      dataIndex: 'createDate',
105
-      key: 'createDate',
106
-      align: 'center',
107
-      render: (x, row) => <><span>{`${moment(row.startTime).format('YYYY-MM-DD HH:mm:ss')} —— ${moment(row.endTime).format('YYYY-MM-DD HH:mm:ss')}`}</span></>
108
-    },
109
-    {
110
-      title: '需求单状态',
111
-      dataIndex: 'demandStatus',
112
-      key: 'demandStatus',
113
-      align: 'center',
114
-      render: (text, records) => {
115
-        if (records.demandStatus === 1) { return '已提交' }
116
-        if (records.demandStatus === 2) { return '处理中' }
117
-        if (records.demandStatus === 3) { return '已交付' }
118
-        if (records.demandStatus === 4) { return '作废' }
119
-      },
120
-    },
121
-    {
122
-      title: '操作',
123
-      dataIndex: 'handle',
124
-      key: 'handle',
125
-      align: 'center',
126
-      render: (text, record) => (
127
-        <AuthButton name="admin.raise.detail.get" noRight={null}>
128
-          <a style={{ color: '#66B3FF' }} onClick={toDetail(record)} >查看详情</a>
129
-        </AuthButton>
130
-      ),
131
-    },
132
-  ];
133
-  
134
-  const rowSelection = {
135
-    onChange: (selectedRowKeys, selectedRows) => {
136
-      console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
137
-      setDemend(selectedRows)
138
-    },
139
-  };
140
-
141
-  const changePageNum = pageNumber => {
142
-    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
143
-  }
144
-
145
-  // 提交事件
146
-  const handleSubmit = (e, props) => {
147
-    e.preventDefault();
148
-    props.form.validateFields((err, values) => {
149
-      if (!err) {
150
-        console.log('提交数据: ', values)
151
-        getList({ pageNum: 1, pageSize: 10, ...values })
152
-      }
153
-    });
154
-  }
155
-
156
-  //重置搜索
157
-  function handleReset () {
158
-    props.form.resetFields();
159
-    getList({ pageNum: 1, pageSize: 10 })
160
-  }
161
-
162
-
163
-  const { getFieldDecorator } = props.form
164
-  return (
165
-
166
-    <>
167
-      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
168
-        <Form.Item>
169
-          {getFieldDecorator('sampleName')(
170
-            <Input
171
-            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
172
-            placeholder="样例名"
173
-          />,
174
-          )}
175
-        </Form.Item>
176
-        <Form.Item>
177
-          {getFieldDecorator('orderer')(
178
-            <Input
179
-            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
180
-            placeholder="下单人"
181
-          />,
182
-          )}
183
-        </Form.Item>
184
-        <Form.Item>
185
-          {getFieldDecorator('phone')(
186
-            <Input
187
-              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
188
-              placeholder="联系方式"
189
-            />,
190
-          )}
191
-        </Form.Item>
192
-        <Form.Item>
193
-          {getFieldDecorator('createDate')(
194
-            <RangePicker placeholder={['开始时间','结束时间']}/>
195
-          )}
196
-        </Form.Item>
197
-        <Form.Item>
198
-          {getFieldDecorator('createDate')(
199
-            <Select style={{ width: '180px' }} placeholder="需求单状态">
200
-                <option value="">全部</option>
201
-                <option value="1">已提交</option>
202
-                <option value="2">处理中</option>
203
-                <option value="3">已交付</option>
204
-                <option value="4">作废</option>
205
-            </Select>
206
-          )}
207
-        </Form.Item>
208
-        <Form.Item>
209
-            <AuthButton name="admin.taShareActivity.search" noRight={null}>
210
-                <Button type="primary" htmlType="submit" className={styles.searchBtn}>
211
-                    搜索
212
-                </Button>
213
-            </AuthButton>
214
-            <AuthButton name="admin.taShareActivity.search" noRight={null}>
215
-                <Button style={{ marginLeft: 8 }} onClick={handleReset}>
216
-                        重置
217
-                </Button>
218
-            </AuthButton>
219
-        </Form.Item>
220
-      </Form>
221
-      <AuthButton name="admin.taShareActivity.post" noRight={null}>
222
-        <Button type="danger" className={styles.addBtn} onClick={toEditActivity()}>新增</Button>
223
-      </AuthButton>
224
-      <AuthButton name="admin.taShareActivity.post" noRight={null}>
225
-        <Button type="primary" className={styles.addBtn} onClick={toEditActivity()} style={{marginLeft:'30px'}}>删除</Button>
226
-      </AuthButton>
227
-      <Table rowSelection={rowSelection}
228
-        style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
229
-      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
230
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
231
-      </div>
232
-    </>
233
-  )
234
-}
235
-const WrappedHeader = Form.create({ name: 'header' })(header);
236
-
237
-export default WrappedHeader

+ 0
- 0
src/pages/h5SampleManager/h5Sample/add.jsx Voir le fichier


+ 0
- 0
src/pages/h5SampleManager/h5Sample/detail.jsx Voir le fichier


+ 0
- 0
src/pages/h5SampleManager/h5Sample/list.jsx Voir le fichier


+ 0
- 12
src/services/apis.js Voir le fichier

@@ -1419,17 +1419,5 @@ export default {
1419 1419
     action: 'admin.taLiveActivity.get',
1420 1420
   },
1421 1421
  },
1422
- taH5SampleManager: {
1423
-  tataH5Demand:{
1424
-    url: `${prefix}/taH5Demand`,
1425
-    method: 'GET',
1426
-    action: 'admin.taH5Demand.get',
1427
-  },
1428
-  taH5DemandById:{
1429
-    url: `${prefix}/taH5Demand/:id`,
1430
-    method: 'GET',
1431
-    action: 'admin.taH5Demand.get',
1432
-  },
1433
- },
1434 1422
  
1435 1423
 }