Commit 978bf3d6 authored by 张子雨's avatar 张子雨

feat: 中台一期

parent 27cb99be
.table :global .ant-table-row-expand-icon-cell {
visibility: hidden;
}
.table :global .ant-table-expanded-row .ant-pro-table {
margin-left: -17px;
}
.logBtn {
display: inherit;
margin: 20px auto;
}
.pageHeader {
background-color: #fff;
border: 1px solid #ebedf0;
}
.listHeader {
display: flex;
}
.listHeader--item {
position: relative;
display: flex;
align-items: center;
width: 40px;
height: 40px;
text-align: center;
justify-content: center;
box-sizing: border-box;
margin-right: 20px;
font-size: 14px;
line-height: 14px;
border: 1px solid #333;
border-radius: 50%;
}
.listHeader--item::after {
position: absolute;
right: -21px;
width: 20px;
height: 1px;
background-color: #333;
content: '';
}
.listHeader--item:last-child::after {
width: 0;
height: 0;
}
...@@ -335,21 +335,14 @@ class BusinessInfo extends Component { ...@@ -335,21 +335,14 @@ class BusinessInfo extends Component {
loading: true, loading: true,
}); });
console.log('obj :>>提交 ', obj); console.log('obj :>>提交 ', obj);
// const [res, error] = await api(obj); const data = await api(obj);
// if (!error) { if (data.businessCode === '0000') {
// console.log('res :>> ', res); // const msg = this.state.type === infoTypeChecked ? '审核完成' : '保存成功';
// const msg = this.state.type === infoTypeChecked ? '审核完成' : '保存成功'; notification.success({ message: `${data.msg}!~` });
// notification.success({ message: `${msg}!~` }); }
// if (this.state.id) { this.setState({
// this.onCancel(); loading: false,
// } else { });
// // 如果是新增 则返回商户审核页面
// history.push('/businessManage');
// }
// }
// this.setState({
// loading: false,
// });
} else { } else {
const message = getErrorMessage(err); const message = getErrorMessage(err);
notification.warning({ message }); notification.warning({ message });
...@@ -400,14 +393,14 @@ class BusinessInfo extends Component { ...@@ -400,14 +393,14 @@ class BusinessInfo extends Component {
)} )}
</FormItem> </FormItem>
</Col> </Col>
{/* <Col span={24}> <Col span={24}>
<FormItem label="商户名称" labelCol={{ span: 4 }}> <FormItem label="商户名称" labelCol={{ span: 4 }}>
{getFieldDecorator('name', { {getFieldDecorator('name', {
rules: [{ required: true, message: '请输入商户名称!' }], rules: [{ required: true, message: '请输入商户名称!' }],
initialValue: businessInfo.name, initialValue: businessInfo.name,
})(<Input maxLength={32} disabled={disabled || } />)} })(<Input maxLength={32} />)}
</FormItem> </FormItem>
</Col> */} </Col>
<Col span={24}> <Col span={24}>
<FormItem label="店铺区域" labelCol={{ span: 4 }}> <FormItem label="店铺区域" labelCol={{ span: 4 }}>
{getFieldDecorator('addr', { {getFieldDecorator('addr', {
......
...@@ -127,3 +127,24 @@ export const getClientInfo = () => { ...@@ -127,3 +127,24 @@ export const getClientInfo = () => {
}; };
export const getObjectType = v => Object.prototype.toString.call(v).replace(/\[object |]/g, ''); export const getObjectType = v => Object.prototype.toString.call(v).replace(/\[object |]/g, '');
// 获取长表单错误提示
export const getErrorMessage = err => {
const message = '请检查表单数据!';
// (function getMsg(v) {
// if (Array.isArray(v)) {
// getMsg(v[0]);
// } else {
// const keys = Object.keys(v);
// if (Array.isArray(v[keys[0]])) {
// getMsg(v[keys[0]][0]);
// } else if (v[keys[0]].errors && v[keys[0]].errors.length) {
// // eslint-disable-next-line no-const-assign
// message = v[keys[0]].errors[0].message;
// } else {
// getMsg(v);
// }
// }
// })(err);
return message;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment