Browse Source

Merge branch 'v3.5' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into v3.5

魏熙美 5 years ago
parent
commit
d0045dfaa5

+ 99
- 97
src/pages/activity/groupActivity/list.jsx View File

14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
 
15
 
16
 const header = props => {
16
 const header = props => {
17
-  const [ data, setData ] = useState({})
18
-//   const [page, changePage] = useState({})
17
+  const [data, setData] = useState({})
18
+  //   const [page, changePage] = useState({})
19
 
19
 
20
   useEffect(() => {
20
   useEffect(() => {
21
     getList({ pageNum: 1, pageSize: 10 });
21
     getList({ pageNum: 1, pageSize: 10 });
22
-  },[])
22
+  }, [])
23
 
23
 
24
   // 查询列表
24
   // 查询列表
25
   const getList = (params) => {
25
   const getList = (params) => {
26
-      console.log(params);
26
+    console.log(params);
27
     request({ ...apis.groupActivity.list, params: { ...params } }).then((data) => {
27
     request({ ...apis.groupActivity.list, params: { ...params } }).then((data) => {
28
-        console.log(data)
29
-        setData(data)
28
+      console.log(data)
29
+      setData(data)
30
     })
30
     })
31
   }
31
   }
32
 
32
 
33
-  
34
-// 跳转到拼团活动新增
35
-const toEditActivity = (groupActivityId) => () => {
33
+
34
+  // 跳转到拼团活动新增
35
+  const toEditActivity = (groupActivityId) => () => {
36
     router.push({
36
     router.push({
37
       pathname: '/activity/groupActivity/editGroupActivity',
37
       pathname: '/activity/groupActivity/editGroupActivity',
38
       query: {
38
       query: {
40
       },
40
       },
41
     });
41
     });
42
   }
42
   }
43
-  
43
+
44
   /**
44
   /**
45
    *
45
    *
46
    *
46
    *
47
    * @param {*} props
47
    * @param {*} props
48
    * @returns
48
    * @returns
49
    */
49
    */
50
-  
50
+
51
   const columns = [
51
   const columns = [
52
     {
52
     {
53
       title: '活动标题',
53
       title: '活动标题',
63
       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></>
63
       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></>
64
     },
64
     },
65
     {
65
     {
66
-        title: '所需积分',
67
-        dataIndex: 'integral',
68
-        key: 'integral',
69
-        align: 'center',
70
-      },
66
+      title: '所需积分',
67
+      dataIndex: 'integral',
68
+      key: 'integral',
69
+      align: 'center',
70
+    },
71
     {
71
     {
72
       title: '已参与人数',
72
       title: '已参与人数',
73
       dataIndex: 'participateNum',
73
       dataIndex: 'participateNum',
79
       dataIndex: 'groupBuyPeople',
79
       dataIndex: 'groupBuyPeople',
80
       key: 'groupBuyPeople',
80
       key: 'groupBuyPeople',
81
       align: 'center',
81
       align: 'center',
82
-    },  
82
+    },
83
     {
83
     {
84
       title: '状态',
84
       title: '状态',
85
       dataIndex: 'activityStatus',
85
       dataIndex: 'activityStatus',
99
       render: (x, row) => (
99
       render: (x, row) => (
100
         <>
100
         <>
101
           {row.activityStatus === 0 &&
101
           {row.activityStatus === 0 &&
102
-          <AuthButton name="admin.taShareActivity.finish.put" noRight={null}><span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span></AuthButton>
102
+            <AuthButton name="admin.taShareActivity.finish.put" noRight={null}><span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span></AuthButton>
103
           }
103
           }
104
           {row.activityStatus === 0 &&
104
           {row.activityStatus === 0 &&
105
-          <AuthButton name="admin.taShareSuccessRecord.get" noRight={null}>    <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span></AuthButton>
105
+            <AuthButton name="admin.taShareSuccessRecord.get" noRight={null}>
106
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span>
107
+            </AuthButton>
106
           }
108
           }
107
           {row.activityStatus === 0 &&
109
           {row.activityStatus === 0 &&
108
-          <AuthButton name="admin.taShareActivity.list.get" noRight={null}>
109
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
110
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{ row.sort === true ? '取消推荐首页' : '推荐首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
111
-        </AuthButton> }
110
+            <AuthButton name="admin.taShareActivity.list.get" noRight={null}>
111
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{row.weight === 1 ? '取消置顶' : '置顶'}<Icon type="vertical-align-top" className={styles.edit} /></span>
112
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
113
+            </AuthButton>}
112
 
114
 
113
           {row.activityStatus === 1 &&
115
           {row.activityStatus === 1 &&
114
-          <AuthButton name="admin.taShareActivity.update.put" noRight={null}>
115
-            <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditActivity(row.groupActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>
116
-          </AuthButton>
116
+            <AuthButton name="admin.taShareActivity.update.put" noRight={null}>
117
+              <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditActivity(row.groupActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>
118
+            </AuthButton>
117
           }
119
           }
118
-           {row.activityStatus === 1 &&
119
-          <AuthButton name="admin.taShareActivity.finish.put" noRight={null}>
120
-                <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
121
-          </AuthButton>
120
+          {row.activityStatus === 1 &&
121
+            <AuthButton name="admin.taShareActivity.finish.put" noRight={null}>
122
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
123
+            </AuthButton>
122
           }
124
           }
123
-           {row.activityStatus === 1 &&
124
-           <AuthButton name="admin.taShareActivity.weight.put" noRight={null}>
125
-                <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
126
-                <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{ row.sort === true ? '取消推荐首页' : '推荐首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
127
-        </AuthButton>
125
+          {row.activityStatus === 1 &&
126
+            <AuthButton name="admin.taShareActivity.weight.put" noRight={null}>
127
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{row.weight === 1 ? '取消置顶' : '置顶'}<Icon type="vertical-align-top" className={styles.edit} /></span>
128
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
129
+            </AuthButton>
128
           }
130
           }
129
 
131
 
130
-        {row.activityStatus === 2 &&
131
-        <AuthButton><span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span></AuthButton>
132
-        }
133
-         {row.activityStatus === 2 &&
134
-        <AuthButton name="admin.taShareActivity.weight.put" noRight={null}>
135
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
136
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{ row.sort === true ? '取消推荐首页' : '推荐首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
137
-        </AuthButton>
132
+          {row.activityStatus === 2 &&
133
+            <AuthButton><span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span></AuthButton>
134
+          }
135
+          {row.activityStatus === 2 &&
136
+            <AuthButton name="admin.taShareActivity.weight.put" noRight={null}>
137
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{row.weight === 1 ? '取消置顶' : '置顶'}<Icon type="vertical-align-top" className={styles.edit} /></span>
138
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
139
+            </AuthButton>
138
           }
140
           }
139
         </>
141
         </>
140
       ),
142
       ),
141
     },
143
     },
142
   ];
144
   ];
143
   const getSignList = groupActivityId => {
145
   const getSignList = groupActivityId => {
144
-      router.push({
145
-          pathname: '/activity/groupActivity/helpRecord',
146
-          query: {
147
-            groupActivityId,
148
-          },
149
-        });
146
+    router.push({
147
+      pathname: '/activity/groupActivity/helpRecord',
148
+      query: {
149
+        groupActivityId,
150
+      },
151
+    });
150
   }
152
   }
151
-  
153
+
152
   const finishDynamic = (row) => {
154
   const finishDynamic = (row) => {
153
-      Modal.confirm({
154
-          title: '结束以后将无法编辑, 是否继续?',
155
-          okText: '确定',
156
-          cancelText: '取消',
157
-          onOk() {
158
-              request({ ...apis.activity.finish, data: {dynamicId: row.dynamicId, top: ""} }).then((data) => {
159
-                  console.log(data)
160
-                  message.info('操作成功!')
161
-                  getList({ pageNum: 1, pageSize: 10 })
162
-              }).catch((err) => {
163
-                  console.log(err)
164
-                  message.info(err.msg || err.message)
165
-              })
166
-          },
167
-        });
168
-  }
169
-  
170
-  //结束活动
171
-  const endGroupActivity = (row) => () => {
172
-      request({ ...apis.groupActivity.finish, urlData: { id: row.groupActivityId} }).then((data) => {
155
+    Modal.confirm({
156
+      title: '结束以后将无法编辑, 是否继续?',
157
+      okText: '确定',
158
+      cancelText: '取消',
159
+      onOk () {
160
+        request({ ...apis.activity.finish, data: { dynamicId: row.dynamicId, top: "" } }).then((data) => {
173
           console.log(data)
161
           console.log(data)
174
           message.info('操作成功!')
162
           message.info('操作成功!')
175
           getList({ pageNum: 1, pageSize: 10 })
163
           getList({ pageNum: 1, pageSize: 10 })
176
-      }).catch((err) => {
164
+        }).catch((err) => {
177
           console.log(err)
165
           console.log(err)
178
           message.info(err.msg || err.message)
166
           message.info(err.msg || err.message)
179
-      })
167
+        })
168
+      },
169
+    });
170
+  }
171
+
172
+  //结束活动
173
+  const endGroupActivity = (row) => () => {
174
+    request({ ...apis.groupActivity.finish, urlData: { id: row.groupActivityId } }).then((data) => {
175
+      console.log(data)
176
+      message.info('操作成功!')
177
+      getList({ pageNum: 1, pageSize: 10 })
178
+    }).catch((err) => {
179
+      console.log(err)
180
+      message.info(err.msg || err.message)
181
+    })
180
   }
182
   }
181
 
183
 
182
   //置顶
184
   //置顶
183
   const topGroupActivity = (row, weight) => () => {
185
   const topGroupActivity = (row, weight) => () => {
184
     request({ ...apis.groupActivity.top, data: { groupActivityId: row.groupActivityId, weight: weight } }).then((data) => {
186
     request({ ...apis.groupActivity.top, data: { groupActivityId: row.groupActivityId, weight: weight } }).then((data) => {
185
-        console.log(data)
186
-        message.info('操作成功!')
187
-        getList({ pageNum: 1, pageSize: 10 })
187
+      console.log(data)
188
+      message.info('操作成功!')
189
+      getList({ pageNum: 1, pageSize: 10 })
188
     }).catch((err) => {
190
     }).catch((err) => {
189
-        console.log(err)
190
-        message.info(err.msg || err.message)
191
+      console.log(err)
192
+      message.info(err.msg || err.message)
191
     })
193
     })
192
   }
194
   }
193
 
195
 
194
   //首页推荐
196
   //首页推荐
195
   const recommendGroupActivity = (row, code) => () => {
197
   const recommendGroupActivity = (row, code) => () => {
196
     request({ ...apis.groupActivity.top, data: { groupActivityId: row.groupActivityId, sort: row.sort } }).then((data) => {
198
     request({ ...apis.groupActivity.top, data: { groupActivityId: row.groupActivityId, sort: row.sort } }).then((data) => {
197
-        console.log(data)
198
-        message.info('操作成功!')
199
-        getList({ pageNum: 1, pageSize: 10 })
199
+      console.log(data)
200
+      message.info('操作成功!')
201
+      getList({ pageNum: 1, pageSize: 10 })
200
     }).catch((err) => {
202
     }).catch((err) => {
201
-        console.log(err)
202
-        message.info(err.msg || err.message)
203
+      console.log(err)
204
+      message.info(err.msg || err.message)
203
     })
205
     })
204
   }
206
   }
205
-    
207
+
206
   //发布活动
208
   //发布活动
207
   const sendDynamic = (row) => {
209
   const sendDynamic = (row) => {
208
-      request({ ...apis.activity.send, urlData: {id: row.dynamicId}}).then((data) => {
209
-          message.info('操作成功!')
210
-          getList({ pageNum: 1, pageSize: 10 });
211
-      }).catch(err => {
212
-          console.log(err)
213
-          message.info(err.msg || err.message)
214
-      })
210
+    request({ ...apis.activity.send, urlData: { id: row.dynamicId } }).then((data) => {
211
+      message.info('操作成功!')
212
+      getList({ pageNum: 1, pageSize: 10 });
213
+    }).catch(err => {
214
+      console.log(err)
215
+      message.info(err.msg || err.message)
216
+    })
215
   }
217
   }
216
-  
218
+
217
   const changePageNum = pageNumber => {
219
   const changePageNum = pageNumber => {
218
-      getList({ pageNum: pageNumber, pageSize: 10 })
220
+    getList({ pageNum: pageNumber, pageSize: 10 })
219
   }
221
   }
220
 
222
 
221
   // 提交事件
223
   // 提交事件
222
-const handleSubmit = (e, props) => {
224
+  const handleSubmit = (e, props) => {
223
     e.preventDefault();
225
     e.preventDefault();
224
     props.form.validateFields((err, values) => {
226
     props.form.validateFields((err, values) => {
225
       if (!err) {
227
       if (!err) {
229
     });
231
     });
230
   }
232
   }
231
 
233
 
232
-   //重置搜索
233
-   function handleReset() {
234
+  //重置搜索
235
+  function handleReset () {
234
     props.form.resetFields();
236
     props.form.resetFields();
235
   }
237
   }
236
 
238
 
272
             搜索
274
             搜索
273
           </Button>
275
           </Button>
274
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
276
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
275
-              重置
277
+            重置
276
             </Button>
278
             </Button>
277
         </Form.Item>
279
         </Form.Item>
278
       </Form>
280
       </Form>
279
       <AuthButton name="admin.taShareActivity.post" noRight={null}>
281
       <AuthButton name="admin.taShareActivity.post" noRight={null}>
280
         <Button type="danger" className={styles.addBtn} onClick={toEditActivity()}>新增</Button>
282
         <Button type="danger" className={styles.addBtn} onClick={toEditActivity()}>新增</Button>
281
       </AuthButton>
283
       </AuthButton>
282
-      <Table dataSource={data.records} columns={columns} pagination={false} rowKey="activityList"/>
284
+      <Table dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
283
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
285
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
284
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
286
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
285
       </div>
287
       </div>

+ 5
- 4
src/pages/activity/helpActivity/edithelpActivity.jsx View File

85
           message.error('助力邀请人数不能超过200')
85
           message.error('助力邀请人数不能超过200')
86
           return
86
           return
87
         }
87
         }
88
+          // 助力邀请人数>0
89
+        if (values.personNum <= 0) {
90
+          message.error('助力邀请人数大于0')
91
+          return
92
+        }
88
 
93
 
89
         // 判断助力人数必须大于0
94
         // 判断助力人数必须大于0
90
         if (values.isEnlist === 1) {
95
         if (values.isEnlist === 1) {
92
           message.error('限制助力次数必须大于0')
97
           message.error('限制助力次数必须大于0')
93
           return
98
           return
94
         }
99
         }
95
-        if (values.personNum <= 0) {
96
-          message.error('助力邀请人数大于0')
97
-          return
98
-        }
99
       }
100
       }
100
         const { activityTime, signupTime, ...submitValue } = values
101
         const { activityTime, signupTime, ...submitValue } = values
101
         const [startDate, endDate] = activityTime
102
         const [startDate, endDate] = activityTime

+ 10
- 10
src/pages/activity/helpActivity/list.jsx View File

93
         <>
93
         <>
94
           {row.activityStatus === 0 &&
94
           {row.activityStatus === 0 &&
95
           <AuthButton name="admin.helpRecord.get">
95
           <AuthButton name="admin.helpRecord.get">
96
-             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" className={styles.shoppingCart} /></span>
96
+             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" style={{color:'#bebebe'}}   className={styles.shoppingCart} /></span>
97
           </AuthButton>}
97
           </AuthButton>}
98
           {row.activityStatus === 0 &&
98
           {row.activityStatus === 0 &&
99
           <AuthButton name="admin.top.update.post" noRight={null}>
99
           <AuthButton name="admin.top.update.post" noRight={null}>
100
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
101
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
102
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
100
+            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" style={{color:'#bebebe'}} className={styles.edit} /></span>
101
+            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top"  style={{color:'#bebebe'}} className={styles.edit} /></span>
102
+            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
103
           </AuthButton> }
103
           </AuthButton> }
104
 
104
 
105
           {row.activityStatus === 1 &&
105
           {row.activityStatus === 1 &&
106
           <AuthButton name="admin.helpActivity.update.put" noRight={null}>
106
           <AuthButton name="admin.helpActivity.update.put" noRight={null}>
107
-            <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>
107
+            <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" style={{color:'#bebebe'}} className={styles.edit} /></span>
108
           </AuthButton>
108
           </AuthButton>
109
           }
109
           }
110
           {row.activityStatus === 1 &&
110
           {row.activityStatus === 1 &&
111
            <AuthButton name="admin.top.update.post" noRight={null}>
111
            <AuthButton name="admin.top.update.post" noRight={null}>
112
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
113
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
112
+            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
113
+            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
114
             </AuthButton>
114
             </AuthButton>
115
           }
115
           }
116
 
116
 
117
           {row.activityStatus === 2 &&
117
           {row.activityStatus === 2 &&
118
           <AuthButton name="admin.helpRecord.get" noRight={null}>
118
           <AuthButton name="admin.helpRecord.get" noRight={null}>
119
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" className={styles.shoppingCart} /></span>
119
+            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" style={{color:'#bebebe'}} className={styles.shoppingCart} /></span>
120
           </AuthButton>
120
           </AuthButton>
121
           }
121
           }
122
            {row.activityStatus === 2 &&
122
            {row.activityStatus === 2 &&
123
         <AuthButton name="admin.top.update.post" noRight={null}>
123
         <AuthButton name="admin.top.update.post" noRight={null}>
124
-           <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
125
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
124
+           <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
125
+            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
126
         </AuthButton>
126
         </AuthButton>
127
           }
127
           }
128
         </>
128
         </>

+ 4
- 4
src/pages/customer/independentList/index.jsx View File

210
       },
210
       },
211
       {
211
       {
212
         title: '用户姓名',
212
         title: '用户姓名',
213
-        dataIndex: 'name',
214
-        key: 'name',
213
+        dataIndex: 'nickname',
214
+        key: 'nickname',
215
         align: 'center',
215
         align: 'center',
216
         render: text => <a>{text}</a>,
216
         render: text => <a>{text}</a>,
217
       },
217
       },
218
       {
218
       {
219
         title: '电话',
219
         title: '电话',
220
-        dataIndex: 'tel',
221
-        key: 'tel',
220
+        dataIndex: 'phone',
221
+        key: 'phone',
222
         align: 'center',
222
         align: 'center',
223
       },
223
       },
224
       {
224
       {

+ 10
- 5
src/pages/style/GoodsList.less View File

8
   width: 93px;
8
   width: 93px;
9
   height: 93px;
9
   height: 93px;
10
 }
10
 }
11
+
11
 .ant-table-column-title {
12
 .ant-table-column-title {
12
   font-weight: 600;
13
   font-weight: 600;
13
 }
14
 }
14
-.shoppingCart{
15
-  color: #dcdcdc;
15
+
16
+.shoppingCart {
17
+  // color: #dcdcdc;
18
+  color: #bebebe;
16
   margin-left: 6px;
19
   margin-left: 6px;
17
   font-size: 16px;
20
   font-size: 16px;
18
 }
21
 }
19
-.edit{
20
-  color: #dcdcdc;
22
+
23
+.edit {
24
+  // color: #dcdcdc;
25
+  color: #bebebe;
21
   margin-left: 6px;
26
   margin-left: 6px;
22
   font-size: 15px;
27
   font-size: 15px;
23
-}
28
+}

+ 48
- 24
src/pages/system/document/audit.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Col, Row, Button, Modal, Input } from 'antd'
2
+import { Col, Row, Button, Modal, Input, Pagination, message } from 'antd'
3
 import ZmageImg from '../../../components/ZmageImg/ZmageImg'
3
 import ZmageImg from '../../../components/ZmageImg/ZmageImg'
4
 import request from '../../../utils/request';
4
 import request from '../../../utils/request';
5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';
7
 import AuthButton from '../../../components/AuthButton';
7
 import AuthButton from '../../../components/AuthButton';
8
 import moment from 'moment';
8
 import moment from 'moment';
9
 
9
 
10
+const unaudited = {
11
+  // color :'rgb(255, 126, 72)'
12
+  float: "right", fontWeight: "bold", marginRight: '30px'
13
+}
14
+
15
+const auditPass = {
16
+  // color : '#FF7E48',
17
+  color: 'green',
18
+  float: "right", fontWeight: "bold", marginRight: '30px'
19
+}
20
+
21
+const noauditPass = {
22
+  color: ' #fc515c',
23
+  float: "right", fontWeight: "bold", marginRight: '30px'
24
+}
25
+
10
 function body (props) {
26
 function body (props) {
11
   const documentVerifyId = props.location.query.id
27
   const documentVerifyId = props.location.query.id
12
   const [data, setData] = useState([])
28
   const [data, setData] = useState([])
13
-
29
+  const [datas, setDatas] = useState({})
14
   // const [status,setStatus] = useState()
30
   // const [status,setStatus] = useState()
15
   useEffect(() => {
31
   useEffect(() => {
16
     getList()
32
     getList()
22
   function getList (params) {
38
   function getList (params) {
23
     // 网路请求
39
     // 网路请求
24
     console.log(props, '1111')
40
     console.log(props, '1111')
25
-    request({ ...apis.system.documentVerifyDetail, urlData: { id: documentVerifyId } }).then(data => {
41
+    request({ ...apis.system.documentVerifyDetail, urlData: { id: documentVerifyId }, params: params }).then(data => {
26
       console.log('data:', data.records)
42
       console.log('data:', data.records)
27
-
43
+      setDatas(data)
28
       setData(data.records)
44
       setData(data.records)
29
     }).catch(err => {
45
     }).catch(err => {
30
       // eslint-disable-next-line no-unused-expressions
46
       // eslint-disable-next-line no-unused-expressions
85
     };
101
     };
86
 
102
 
87
     const handleOk1 = e => {
103
     const handleOk1 = e => {
88
-      console.log(e);
89
-      onVerify(2)
90
-
91
-      setVisible(false)
104
+      console.log(reasonValue, "2222");
105
+      if (reasonValue ) {
106
+        // console.log(e);
107
+        onVerify(2)
108
+        console.log(reasonValue, "11111111");
109
+        setVisible(false)
110
+      } else {
111
+        message.info("不能为空")
112
+      }
92
 
113
 
93
     };
114
     };
94
 
115
 
104
     }
125
     }
105
 
126
 
106
 
127
 
107
-    console.log("props", props.data)
128
+    // console.log("props", props.data)
108
     const carddata = props.data.imgList
129
     const carddata = props.data.imgList
109
     return (
130
     return (
110
       <>
131
       <>
111
-        <div style={{ background: '#ffffff', padding: '40px', marginTop: '30px',borderRadius: '12px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)'}}>
112
-          <p style={{ fontSize: '0.096rem'}}>
132
+        <div style={{ background: '#ffffff', padding: '40px', marginTop: '30px', borderRadius: '12px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)' }}>
133
+          <p style={{ fontSize: '0.096rem' }}>
113
             <span>资料说明:{props.data.documentTitle} </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
134
             <span>资料说明:{props.data.documentTitle} </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
114
-            <span>提交时间:{moment(props.data.createDate).format('YYYY-MM-DD')} </span>
115
-            <span style={{ float: "right", fontWeight: "bold", marginRight: '30px' }} className={props.data.verifyStatus == 0 ? "unaudited" : props.data.verifyStatus == 1 ? "auditPass" : "noauditPass"} > 
116
-             {props.data.verifyStatus == 0 ? "待审核" : props.data.verifyStatus == 1 ? "审核通过" : "不通过"}
117
-             </span>
135
+           
136
+            <span style={props.data.verifyStatus == 0 ? unaudited : props.data.verifyStatus == 1 ? auditPass : noauditPass} >
137
+              {props.data.verifyStatus == 0 ? "待审核" : props.data.verifyStatus == 1 ? "审核通过" : "不通过"}
138
+            </span>
118
           </p>
139
           </p>
140
+          <p style={{ fontSize: '0.096rem' }}>提交时间:{moment(props.data.createDate).format('YYYY-MM-DD h:mm:ss')}   </p>
119
 
141
 
120
-
121
-          <div style={{ fontSize: '0.096rem'}}>资料图片:
142
+          <div style={{ fontSize: '0.096rem' }}>资料图片:
122
         <Row gutter={16}>
143
         <Row gutter={16}>
123
               {
144
               {
124
                 // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
145
                 // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
132
           </div>
153
           </div>
133
           {props.data.verifyStatus == 0 && <div style={{ marginTop: '10px', display: 'flex', justifyContent: 'center' }}>
154
           {props.data.verifyStatus == 0 && <div style={{ marginTop: '10px', display: 'flex', justifyContent: 'center' }}>
134
             <AuthButton name="admin.documentVerify.id.put" noRight={null}>
155
             <AuthButton name="admin.documentVerify.id.put" noRight={null}>
135
-              <Button type="primary" onClick={() => handleOk(1)}>通过</Button>
156
+              <Button type="primary" style={{ marginTop: '30px' }} onClick={() => handleOk(1)}>通过</Button>
136
             </AuthButton>
157
             </AuthButton>
137
             &nbsp;&nbsp;&nbsp;&nbsp;
158
             &nbsp;&nbsp;&nbsp;&nbsp;
138
         <AuthButton name="admin.documentVerify.id.put" noRight={null}>
159
         <AuthButton name="admin.documentVerify.id.put" noRight={null}>
139
-              <Button onClick={() => handleOk(2)}>不通过</Button>
160
+              <Button style={{ marginTop: '30px' }} onClick={() => handleOk(2)}>不通过</Button>
140
             </AuthButton>
161
             </AuthButton>
141
             {/* &nbsp;&nbsp;&nbsp;&nbsp;
162
             {/* &nbsp;&nbsp;&nbsp;&nbsp;
142
         <Button onClick={cancelPage}>返回</Button> */}
163
         <Button onClick={cancelPage}>返回</Button> */}
159
     // return <div>111</div>
180
     // return <div>111</div>
160
   }
181
   }
161
 
182
 
162
-
183
+  const changePageNum = (pageNumber) => {
184
+    getList({ pageNum: pageNumber, pageSize: 5 })
185
+  }
163
 
186
 
164
 
187
 
165
   return (
188
   return (
166
     <>
189
     <>
167
       {/* <div>111</div> */}
190
       {/* <div>111</div> */}
168
-      <div>{console.log("data1", data)}
191
+      <div>
169
         {
192
         {
170
           // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
193
           // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
171
           data.map((data, inx) =>
194
           data.map((data, inx) =>
172
 
195
 
173
             <Card data={data}></Card>
196
             <Card data={data}></Card>
174
-            // <Col span={6}>
175
-            //   <ZmageImg style={{ width: '300px', height: '400px' }} src={data.img} />
176
-            // </Col>
197
+
177
           )
198
           )
178
         }
199
         }
179
         {/* <Card data = {data.records}></Card> */}
200
         {/* <Card data = {data.records}></Card> */}
201
+        <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
202
+          <Pagination showQuickJumper defaultCurrent={1} total={datas.total} pageSize={datas.size} onChange={changePageNum} current={datas.current} />
203
+        </div>
180
 
204
 
181
       </div>
205
       </div>
182
 
206
 

+ 1
- 1
src/pages/system/document/list.jsx View File

84
       dataIndex: 'createDate',
84
       dataIndex: 'createDate',
85
       key: 'createDate',
85
       key: 'createDate',
86
       align: 'center',
86
       align: 'center',
87
-      render: (createDate) => moment(createDate).format('YYYY-MM-DD')
87
+      render: (createDate) => moment(createDate).format('YYYY-MM-DD h:mm:ss')
88
     },
88
     },
89
 
89
 
90
     {
90
     {