Commit b5a3f9ae authored by cellee's avatar cellee

图片避免重复修改图片名称

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 456aff51
...@@ -63,6 +63,10 @@ const Facilitys = (props: any) => { ...@@ -63,6 +63,10 @@ const Facilitys = (props: any) => {
message.success(`${info.file.name} file uploaded successfully`); message.success(`${info.file.name} file uploaded successfully`);
// 拿到key 值 开始存储 // 拿到key 值 开始存储
let key = parseInt(info.fileList[0].response.data.identification); let key = parseInt(info.fileList[0].response.data.identification);
// 重命名图片的名称
info.fileList[0].name = info.file.response.data.imageName;
let list = FacilitysList; let list = FacilitysList;
setidKey(idKey + 1); setidKey(idKey + 1);
list[key] = { list[key] = {
......
...@@ -87,9 +87,16 @@ const PictureOptionsRow = (props: any) => { ...@@ -87,9 +87,16 @@ const PictureOptionsRow = (props: any) => {
return file.status == 'done'; return file.status == 'done';
}); });
setFileList(tmp); setFileList(tmp);
console.log(tmp);
var result = new Array(); var result = new Array();
tmp.map((item: { name: string }, index: number) => { tmp.map((item: any, index: number) => {
result.push(item.name); // 如果没返回就用原来的名称
let name =
item.response.data && item.response.data.imageName
? item.response.data.imageName
: item.name;
result.push(name);
}); });
onChange && onChange(result); onChange && onChange(result);
} }
......
...@@ -142,11 +142,16 @@ const TitleSearch = (props: any) => { ...@@ -142,11 +142,16 @@ const TitleSearch = (props: any) => {
) : null} ) : null}
{status != null {status != null
? status.map((item: { name: string; data: Array<''> }, index: number) => { ? status.map((item: { name: string; data: Array<''>; default: any }, index: number) => {
return ( return (
<Col key={'StatusCol_' + index}> <Col key={'StatusCol_' + index}>
<Form.Item name={item.name[0]}> <Form.Item name={item.name[0]}>
<Select style={{ width: 160 }} placeholder={item.name[1]} allowClear={true}> <Select
style={{ width: 160 }}
placeholder={item.name[1]}
allowClear={true}
defaultValue={item.default}
>
{item.data.map((word) => { {item.data.map((word) => {
return ( return (
<Option key={word[0]} value={word[0]}> <Option key={word[0]} value={word[0]}>
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
sourceData: null, sourceData: null,
curString: { curString: {
subscribeDate: null, subscribeDate: null,
status: 0, status: null,
communityNameList: null, communityNameList: null,
tab:1, tab:1,
curPage: 1, curPage: 1,
......
...@@ -491,7 +491,7 @@ const Adds = (props: any) => { ...@@ -491,7 +491,7 @@ const Adds = (props: any) => {
<Form.Item <Form.Item
label="Shuttle Bus Timetable" label="Shuttle Bus Timetable"
name="balouscheduleFile" name="balouscheduleFile"
style={{ marginBottom: '0' }} style={{ marginBottom: '0', minHeight: 159 }}
> >
<Upload <Upload
{...uploads} {...uploads}
...@@ -511,7 +511,11 @@ const Adds = (props: any) => { ...@@ -511,7 +511,11 @@ const Adds = (props: any) => {
</Form.Item> </Form.Item>
{/* 上传部分 */} {/* 上传部分 */}
<Form.Item label="Property Guide" name="serviceGuideFile" style={{ marginBottom: '0' }}> <Form.Item
label="Property Guide"
name="serviceGuideFile"
style={{ marginBottom: '0', minHeight: 159 }}
>
<Upload <Upload
{...uploads} {...uploads}
{...upload2} {...upload2}
...@@ -533,7 +537,7 @@ const Adds = (props: any) => { ...@@ -533,7 +537,7 @@ const Adds = (props: any) => {
<Form.Item <Form.Item
label="Warranty Period Service" label="Warranty Period Service"
name="lifeServiceFile" name="lifeServiceFile"
style={{ marginBottom: '0' }} style={{ marginBottom: '0', minHeight: 159 }}
> >
<Upload <Upload
{...uploads} {...uploads}
......
...@@ -173,6 +173,23 @@ const BookingDetail = (props: any) => { ...@@ -173,6 +173,23 @@ const BookingDetail = (props: any) => {
<Descriptions.Item label="Contact Number">{DataSave.accountPhone}</Descriptions.Item> <Descriptions.Item label="Contact Number">{DataSave.accountPhone}</Descriptions.Item>
</Descriptions> </Descriptions>
{/* 部分退费 */}
{DataSaveDetail && DataSaveDetail.backMarginFeeReason ? (
<Descriptions>
<Descriptions.Item label="Total Refundable Amount">
$ <span style={{ color: '#f00' }}>{DataSaveDetail.marginFee.toFixed(2)}</span>
</Descriptions.Item>
<Descriptions.Item label="Total Amount Returned" span={2}>
$ <span style={{ color: '#f00' }}>{DataSaveDetail.backMarginFee.toFixed(2)}</span>
</Descriptions.Item>
<Descriptions.Item label="Reasons For Refund" span={3}>
{DataSaveDetail.backMarginFeeReason}
</Descriptions.Item>
</Descriptions>
) : (
''
)}
<hr /> <hr />
{/* 已交押金且未产生退费且不是免费的 */} {/* 已交押金且未产生退费且不是免费的 */}
......
...@@ -330,6 +330,7 @@ const FacilityBookings = (props: any) => { ...@@ -330,6 +330,7 @@ const FacilityBookings = (props: any) => {
[3, 'Used'], [3, 'Used'],
[4, 'Cancelled'], [4, 'Cancelled'],
], ],
default: curString.status,
}, },
]} ]}
time={['key', 'Booking time ']} time={['key', 'Booking time ']}
......
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