浏览代码

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

魏熙美 5 年前
父节点
当前提交
d0045dfaa5

+ 99
- 97
src/pages/activity/groupActivity/list.jsx 查看文件

@@ -14,25 +14,25 @@ const { Option } = Select;
14 14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15 15
 
16 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 20
   useEffect(() => {
21 21
     getList({ pageNum: 1, pageSize: 10 });
22
-  },[])
22
+  }, [])
23 23
 
24 24
   // 查询列表
25 25
   const getList = (params) => {
26
-      console.log(params);
26
+    console.log(params);
27 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 36
     router.push({
37 37
       pathname: '/activity/groupActivity/editGroupActivity',
38 38
       query: {
@@ -40,14 +40,14 @@ const toEditActivity = (groupActivityId) => () => {
40 40
       },
41 41
     });
42 42
   }
43
-  
43
+
44 44
   /**
45 45
    *
46 46
    *
47 47
    * @param {*} props
48 48
    * @returns
49 49
    */
50
-  
50
+
51 51
   const columns = [
52 52
     {
53 53
       title: '活动标题',
@@ -63,11 +63,11 @@ const toEditActivity = (groupActivityId) => () => {
63 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 72
       title: '已参与人数',
73 73
       dataIndex: 'participateNum',
@@ -79,7 +79,7 @@ const toEditActivity = (groupActivityId) => () => {
79 79
       dataIndex: 'groupBuyPeople',
80 80
       key: 'groupBuyPeople',
81 81
       align: 'center',
82
-    },  
82
+    },
83 83
     {
84 84
       title: '状态',
85 85
       dataIndex: 'activityStatus',
@@ -99,127 +99,129 @@ const toEditActivity = (groupActivityId) => () => {
99 99
       render: (x, row) => (
100 100
         <>
101 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 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 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 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 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 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 161
           console.log(data)
174 162
           message.info('操作成功!')
175 163
           getList({ pageNum: 1, pageSize: 10 })
176
-      }).catch((err) => {
164
+        }).catch((err) => {
177 165
           console.log(err)
178 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 185
   const topGroupActivity = (row, weight) => () => {
184 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 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 197
   const recommendGroupActivity = (row, code) => () => {
196 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 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 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 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 225
     e.preventDefault();
224 226
     props.form.validateFields((err, values) => {
225 227
       if (!err) {
@@ -229,8 +231,8 @@ const handleSubmit = (e, props) => {
229 231
     });
230 232
   }
231 233
 
232
-   //重置搜索
233
-   function handleReset() {
234
+  //重置搜索
235
+  function handleReset () {
234 236
     props.form.resetFields();
235 237
   }
236 238
 
@@ -272,14 +274,14 @@ const handleSubmit = (e, props) => {
272 274
             搜索
273 275
           </Button>
274 276
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
275
-              重置
277
+            重置
276 278
             </Button>
277 279
         </Form.Item>
278 280
       </Form>
279 281
       <AuthButton name="admin.taShareActivity.post" noRight={null}>
280 282
         <Button type="danger" className={styles.addBtn} onClick={toEditActivity()}>新增</Button>
281 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 285
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
284 286
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
285 287
       </div>

+ 5
- 4
src/pages/activity/helpActivity/edithelpActivity.jsx 查看文件

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

+ 10
- 10
src/pages/activity/helpActivity/list.jsx 查看文件

@@ -93,36 +93,36 @@ const toEditGoods = (helpActivityId) => () => {
93 93
         <>
94 94
           {row.activityStatus === 0 &&
95 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 97
           </AuthButton>}
98 98
           {row.activityStatus === 0 &&
99 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 103
           </AuthButton> }
104 104
 
105 105
           {row.activityStatus === 1 &&
106 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 108
           </AuthButton>
109 109
           }
110 110
           {row.activityStatus === 1 &&
111 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 114
             </AuthButton>
115 115
           }
116 116
 
117 117
           {row.activityStatus === 2 &&
118 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 120
           </AuthButton>
121 121
           }
122 122
            {row.activityStatus === 2 &&
123 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 126
         </AuthButton>
127 127
           }
128 128
         </>

+ 4
- 4
src/pages/customer/independentList/index.jsx 查看文件

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

+ 10
- 5
src/pages/style/GoodsList.less 查看文件

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

+ 48
- 24
src/pages/system/document/audit.jsx 查看文件

@@ -1,5 +1,5 @@
1 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 3
 import ZmageImg from '../../../components/ZmageImg/ZmageImg'
4 4
 import request from '../../../utils/request';
5 5
 import apis from '../../../services/apis';
@@ -7,10 +7,26 @@ import { router } from 'umi';
7 7
 import AuthButton from '../../../components/AuthButton';
8 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 26
 function body (props) {
11 27
   const documentVerifyId = props.location.query.id
12 28
   const [data, setData] = useState([])
13
-
29
+  const [datas, setDatas] = useState({})
14 30
   // const [status,setStatus] = useState()
15 31
   useEffect(() => {
16 32
     getList()
@@ -22,9 +38,9 @@ function body (props) {
22 38
   function getList (params) {
23 39
     // 网路请求
24 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 42
       console.log('data:', data.records)
27
-
43
+      setDatas(data)
28 44
       setData(data.records)
29 45
     }).catch(err => {
30 46
       // eslint-disable-next-line no-unused-expressions
@@ -85,10 +101,15 @@ function body (props) {
85 101
     };
86 102
 
87 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,21 +125,21 @@ function body (props) {
104 125
     }
105 126
 
106 127
 
107
-    console.log("props", props.data)
128
+    // console.log("props", props.data)
108 129
     const carddata = props.data.imgList
109 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 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 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 143
         <Row gutter={16}>
123 144
               {
124 145
                 // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
@@ -132,11 +153,11 @@ function body (props) {
132 153
           </div>
133 154
           {props.data.verifyStatus == 0 && <div style={{ marginTop: '10px', display: 'flex', justifyContent: 'center' }}>
134 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 157
             </AuthButton>
137 158
             &nbsp;&nbsp;&nbsp;&nbsp;
138 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 161
             </AuthButton>
141 162
             {/* &nbsp;&nbsp;&nbsp;&nbsp;
142 163
         <Button onClick={cancelPage}>返回</Button> */}
@@ -159,24 +180,27 @@ function body (props) {
159 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 188
   return (
166 189
     <>
167 190
       {/* <div>111</div> */}
168
-      <div>{console.log("data1", data)}
191
+      <div>
169 192
         {
170 193
           // data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
171 194
           data.map((data, inx) =>
172 195
 
173 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 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 205
       </div>
182 206
 

+ 1
- 1
src/pages/system/document/list.jsx 查看文件

@@ -84,7 +84,7 @@ function body(props) {
84 84
       dataIndex: 'createDate',
85 85
       key: 'createDate',
86 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
     {