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) => {
message.success(`${info.file.name} file uploaded successfully`);
// 拿到key 值 开始存储
let key = parseInt(info.fileList[0].response.data.identification);
// 重命名图片的名称
info.fileList[0].name = info.file.response.data.imageName;
let list = FacilitysList;
setidKey(idKey + 1);
list[key] = {
......
......@@ -87,9 +87,16 @@ const PictureOptionsRow = (props: any) => {
return file.status == 'done';
});
setFileList(tmp);
console.log(tmp);
var result = new Array();
tmp.map((item: { name: string }, index: number) => {
result.push(item.name);
tmp.map((item: any, index: number) => {
// 如果没返回就用原来的名称
let name =
item.response.data && item.response.data.imageName
? item.response.data.imageName
: item.name;
result.push(name);
});
onChange && onChange(result);
}
......
......@@ -142,11 +142,16 @@ const TitleSearch = (props: any) => {
) : null}
{status != null
? status.map((item: { name: string; data: Array<''> }, index: number) => {
? status.map((item: { name: string; data: Array<''>; default: any }, index: number) => {
return (
<Col key={'StatusCol_' + index}>
<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) => {
return (
<Option key={word[0]} value={word[0]}>
......
......@@ -18,7 +18,7 @@ export default {
sourceData: null,
curString: {
subscribeDate: null,
status: 0,
status: null,
communityNameList: null,
tab:1,
curPage: 1,
......
......@@ -491,7 +491,7 @@ const Adds = (props: any) => {
<Form.Item
label="Shuttle Bus Timetable"
name="balouscheduleFile"
style={{ marginBottom: '0' }}
style={{ marginBottom: '0', minHeight: 159 }}
>
<Upload
{...uploads}
......@@ -511,7 +511,11 @@ const Adds = (props: any) => {
</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
{...uploads}
{...upload2}
......@@ -533,7 +537,7 @@ const Adds = (props: any) => {
<Form.Item
label="Warranty Period Service"
name="lifeServiceFile"
style={{ marginBottom: '0' }}
style={{ marginBottom: '0', minHeight: 159 }}
>
<Upload
{...uploads}
......
......@@ -173,6 +173,23 @@ const BookingDetail = (props: any) => {
<Descriptions.Item label="Contact Number">{DataSave.accountPhone}</Descriptions.Item>
</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 />
{/* 已交押金且未产生退费且不是免费的 */}
......
......@@ -330,6 +330,7 @@ const FacilityBookings = (props: any) => {
[3, 'Used'],
[4, 'Cancelled'],
],
default: curString.status,
},
]}
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