Bläddra i källkod

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

魏熙美 5 år sedan
förälder
incheckning
eea01ab292

+ 1
- 1
config/routes.js Visa fil

206
               },
206
               },
207
               {
207
               {
208
                 path: '/channel/InviteClients',
208
                 path: '/channel/InviteClients',
209
-                name: '邀请客户',
209
+                name: '邀请经纪人',
210
                 hideInMenu: true,
210
                 hideInMenu: true,
211
                 component: './channel/InviteClients',
211
                 component: './channel/InviteClients',
212
               },
212
               },

+ 2
- 2
src/pages/activity/ActivityList.jsx Visa fil

106
             <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this,row)}>{ row.status === 1 ? '取消发布' : '发布' }<Icon type="close-circle" className={styles.edit} /></span>
106
             <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this,row)}>{ row.status === 1 ? '取消发布' : '发布' }<Icon type="close-circle" className={styles.edit} /></span>
107
           </AuthButton>
107
           </AuthButton>
108
           <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
108
           <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
109
-            <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={finishDynamic.bind(this,row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
109
+            {row.isEnlist != 2 && <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={finishDynamic.bind(this,row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>}
110
           </AuthButton>
110
           </AuthButton>
111
           <AuthButton name="admin.buildingDynamic.update.put" noRight={null}>
111
           <AuthButton name="admin.buildingDynamic.update.put" noRight={null}>
112
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
112
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
113
-            <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditGoods(row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>
113
+            {row.isEnlist != 2 && <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditGoods(row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>}
114
           </AuthButton>
114
           </AuthButton>
115
         </>
115
         </>
116
       )
116
       )

+ 4
- 3
src/pages/activity/editActivity.jsx Visa fil

133
         label: '报名时间',
133
         label: '报名时间',
134
         name: 'signupTime',
134
         name: 'signupTime',
135
         type: FieldTypes.RangePicker,
135
         type: FieldTypes.RangePicker,
136
-        value: dynamicData.enlistStart != null ? [moment(dynamicData.enlistStart, 'YYYY-MM-DD'), moment(dynamicData.enlistEnd, 'YYYY-MM-DD')] : null,
136
+        value: dynamicData.enlistStart != null ? [moment(dynamicData.enlistStart, 'YYYY-MM-DD HH:mm'), moment(dynamicData.enlistEnd, 'YYYY-MM-DD HH:mm')] : null,
137
+        props: {showTime:{ format: 'HH:mm' }},
137
         rules: [
138
         rules: [
138
           { required: true, message: '请选择报名时间' },
139
           { required: true, message: '请选择报名时间' },
139
         ]
140
         ]
146
       submitValue.startDate = moment(startDate).format('YYYY-MM-DD HH:mm');
147
       submitValue.startDate = moment(startDate).format('YYYY-MM-DD HH:mm');
147
       submitValue.endDate = moment(endDate).format('YYYY-MM-DD HH:mm');
148
       submitValue.endDate = moment(endDate).format('YYYY-MM-DD HH:mm');
148
       const [enlistStart, enlistEnd] = signupTime
149
       const [enlistStart, enlistEnd] = signupTime
149
-      submitValue.enlistStart = moment(enlistStart).format('YYYY-MM-DD');
150
-      submitValue.enlistEnd = moment(enlistEnd).format('YYYY-MM-DD');
150
+      submitValue.enlistStart = moment(enlistStart).format('YYYY-MM-DD HH:mm');
151
+      submitValue.enlistEnd = moment(enlistEnd).format('YYYY-MM-DD HH:mm');
151
       console.log('submit data --->', submitValue)
152
       console.log('submit data --->', submitValue)
152
       if (dynamicId) {
153
       if (dynamicId) {
153
         submitValue.dynamicId = dynamicId
154
         submitValue.dynamicId = dynamicId

+ 1
- 1
src/pages/building/list/index.jsx Visa fil

135
       </p>
135
       </p>
136
       <p className={Styles.cardItem}>
136
       <p className={Styles.cardItem}>
137
         <span className={Styles.title}>录入时间</span>
137
         <span className={Styles.title}>录入时间</span>
138
-        <span >:{data.createDate}</span>
138
+        <span >:{moment(data.createDate).format('YYYY-MM-DD HH:mm:ss')}</span>
139
       </p>
139
       </p>
140
       <p style={{ margin: '15px 0', position: 'relative', fontSize: '0.106rem' }}>
140
       <p style={{ margin: '15px 0', position: 'relative', fontSize: '0.106rem' }}>
141
       <AuthButton name="admin.building.update.status.put" noRight={null}>
141
       <AuthButton name="admin.building.update.status.put" noRight={null}>

+ 1
- 0
src/pages/channel/recommendClients.jsx Visa fil

84
     dataIndex: 'createDate',
84
     dataIndex: 'createDate',
85
     key: 'createDate',
85
     key: 'createDate',
86
     align: 'center',
86
     align: 'center',
87
+    render: (_, record) => <><span>{ record.createDate && moment(record.createDate).format('YYYY-MM-DD') }</span></>,
87
   },
88
   },
88
   {
89
   {
89
     title: '状态',
90
     title: '状态',

+ 1
- 0
src/pages/customer/independentList/index.jsx Visa fil

106
         title: '推荐时间',
106
         title: '推荐时间',
107
         dataIndex: 'createDate',
107
         dataIndex: 'createDate',
108
         key: 'createDate',
108
         key: 'createDate',
109
+        render: (_, record) => <><span>{ record.createDate && moment(record.createDate).format('YYYY-MM-DD') }</span></>,
109
       },
110
       },
110
       {
111
       {
111
         title: '状态',
112
         title: '状态',

+ 17
- 1
src/pages/news/list/NewsList.jsx Visa fil

5
 import request from '../../../utils/request';
5
 import request from '../../../utils/request';
6
 import apis from '../../../services/apis';
6
 import apis from '../../../services/apis';
7
 import Styles from './style.less';
7
 import Styles from './style.less';
8
+import styles from '../../style/GoodsList.less';
8
 import NewsTypeSelect from '../../../components/SelectButton/NewTypeSelect'
9
 import NewsTypeSelect from '../../../components/SelectButton/NewTypeSelect'
9
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
10
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
10
 import SelectCity from '../../../components/SelectButton/CitySelect'
11
 import SelectCity from '../../../components/SelectButton/CitySelect'
118
       });
119
       });
119
     }
120
     }
120
 
121
 
122
+    //   置顶
123
+    const topNews = (weightParam, newsId) => () => {
124
+      const weight = Math.abs(weightParam - 1)
125
+      request({ ...apis.news.weight, params: {newsId: newsId, weight} }).then((data) => {
126
+          console.log(data)
127
+          message.info('操作成功!')
128
+          getList({ pageNum: 1, pageSize: 10 })
129
+      }).catch((err) => {
130
+          console.log(err)
131
+          message.info(err.msg || err.message)
132
+      })
133
+    }
134
+
121
     function cancelRelease(newsId, newsStatus, buildingId, newsTypeId) {
135
     function cancelRelease(newsId, newsStatus, buildingId, newsTypeId) {
122
       console.log("newsId" + newsId + "status" + newsStatus);
136
       console.log("newsId" + newsId + "status" + newsStatus);
123
       if (newsStatus === 1) {
137
       if (newsStatus === 1) {
167
         bodyStyle={{ padding: '10px 20px' }}
181
         bodyStyle={{ padding: '10px 20px' }}
168
       >
182
       >
169
         <AuthButton name="admin.taNews.id.put" noRight={null}>
183
         <AuthButton name="admin.taNews.id.put" noRight={null}>
184
+          <span style={{ position: 'absolute', right: '100px', top: '19px', fontSize: ' 0.106rem',zIndex:1, color: '#FF7E48', cursor: 'pointer' }} onClick={topNews(data.weight, data.newsId)}>{ data.weight === 1 ? '取消置顶' : '置顶' }</span>
185
+
170
           <span style={{ position: 'absolute', right: '20px', top: '20px', fontSize: ' 0.106rem',zIndex:1, color: '#FF7E48', cursor: 'pointer' }} onClick={toEditList(data.newsId)}>
186
           <span style={{ position: 'absolute', right: '20px', top: '20px', fontSize: ' 0.106rem',zIndex:1, color: '#FF7E48', cursor: 'pointer' }} onClick={toEditList(data.newsId)}>
171
             编辑
187
             编辑
172
                   <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
188
                   <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
210
             <span>收藏数量:{data.saveNum}</span>
226
             <span>收藏数量:{data.saveNum}</span>
211
           </p>
227
           </p>
212
 
228
 
213
-          <p style={{ fontSize: ' 0.106rem', color: '#999', marginBottom: '8px' }}>发布时间:{data.createDate}</p>
229
+          <p style={{ fontSize: ' 0.106rem', color: '#999', marginBottom: '8px' }}>发布时间:{moment(data.createDate).format('YYYY-MM-DD HH:mm:ss')}</p>
214
         </div>
230
         </div>
215
       </Card>
231
       </Card>
216
     )
232
     )

+ 1
- 0
src/pages/staff/list/editStaff.jsx Visa fil

121
       type: FieldTypes.Text,
121
       type: FieldTypes.Text,
122
       placeholder: '请输入电话号码',
122
       placeholder: '请输入电话号码',
123
       value: userData.phone,
123
       value: userData.phone,
124
+      help: '默认密码:123456',
124
     },
125
     },
125
     {
126
     {
126
       label: '角色',
127
       label: '角色',

+ 5
- 0
src/services/apis.js Visa fil

156
       method: 'PUT',
156
       method: 'PUT',
157
       url: `${prefix}/taNews/:id`,
157
       url: `${prefix}/taNews/:id`,
158
       action: 'admin.taNews.id.put',
158
       action: 'admin.taNews.id.put',
159
+    },
160
+    weight: {
161
+      method: 'PUT',
162
+      url: `${prefix}/taNews/weight`,
163
+      action: 'admin.taNews.weight.put',
159
     }
164
     }
160
   },
165
   },
161
   newsType: {
166
   newsType: {