Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
d923106a
Commit
d923106a
authored
Dec 31, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复 Select label内容过长导致变形的问题
parent
fa5f2b97
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
444 additions
and
440 deletions
+444
-440
global.less
src/global/styles/global.less
+0
-0
reset.less
src/global/styles/reset.less
+214
-214
index.tsx
...ges/afterService/components/ManualDeliveryModal/index.tsx
+0
-0
index.ts
...terService/components/ManualDeliveryModal/schema/index.ts
+79
-77
verify.tsx
...rService/exchangeApplication/exchangePrDeliver/verify.tsx
+68
-67
index.tsx
...rService/exchangeApplication/exchangePrReceived/index.tsx
+1
-1
verify.tsx
...Service/exchangeApplication/exchangePrReceived/verify.tsx
+82
-81
No files found.
src/global/styles/global.less
View file @
d923106a
This diff is collapsed.
Click to expand it.
src/global/styles/reset.less
View file @
d923106a
@import './mixins/layout.less';
#root {
// 去除input type为number时的箭头
.ant-input-number-handler-wrap {
display: none;
}
.ant-pro-global-footer {
margin: 8px auto 32px auto;
}
.ant-page-header {
padding: 8px 24px;
}
.common_checkbox {
&:hover,
&:active,
&:focus {
.ant-checkbox-inner {
border-color: var(--mall_main_color);
}
}
.ant-checkbox-group-item {
display: block;
margin-bottom: 12px;
}
.ant-checkbox {
&:hover,
&:active,
&:focus {
.ant-checkbox-inner {
border-color: var(--mall_main_color);
}
}
}
.ant-checkbox .ant-checkbox-indeterminate {
&:hover {
border-color: var(--mall_main_color);
}
}
.ant-checkbox-indeterminate.ant-checkbox-checked .ant-checkbox-inner {
background-color: transparent;
}
.ant-checkbox-indeterminate .ant-checkbox-inner {
&:hover,
&:active,
&:focus {
border-color: var(--mall_main_color);
}
&::after {
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
.ant-checkbox-checked .ant-checkbox-inner {
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
// 去除数字输入框的箭头
input[type=number] {
-moz-appearance: textfield;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.identityRadio {
display: flex;
flex-direction: column;
margin: 0 auto;
.make-center(text);
& label {
width: 320px;
height: 48px;
.make-center-space(margin, 12);
vertical-align: middle;
line-height: 48px;
}
}
.businessRadio {
display: flex;
flex-wrap: wrap;
width: 320px;
.make-center(margin);
.make-center(text);
& label {
width: 148px;
height: 32px;
line-height: 32px;
margin: 8px 0;
border-top-width: 1px;
border-left-width: 1px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
& label:nth-child(odd) {
margin-right: 24px;
}
}
// 去除sogou浏览器自动加的密码软盘图标
input::-webkit-input-safebox-button{
display: none;
}
// 设置formitem的*号到字段label前
.ant-form-item-label>label.ant-form-item-required::before {
order: 10;
margin-left: -6px;
}
// 处理ant tree组件
// .ant-tree-checkbox {
// order: 10;
// }
.ant-tree .ant-tree-treenode {
padding-bottom: 0;
padding-right: 16px;
background: @tree-node;
border: 1px solid @tree-node-border;
margin-bottom: 4px;
align-items: center;
height: 32px;
&.ant-tree-treenode-selected {
border-color: @main-color;
background: @tree-node_hover;
}
&.ant-tree-treenode:hover {
border-color: @main-color;
background: @tree-node_hover;
}
&.ant-tree-treenode-selected {
.tree-node-circle {
background: @main-color;
}
}
}
.tree-node-circle {
width: 4px;
height: 4px;
border-radius: 50%;
margin-right: 12px;
background: @status-stop;
}
.ant-tree .ant-tree-checkbox {
margin: 0;
}
.ant-tree .ant-tree-node-content-wrapper:hover {
background: none;
}
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
background: none;
}
.ant-tree .ant-tree-switcher {
width: 28px;
height: 28px;
line-height: 32px;
}
.ant-tree .ant-tree-switcher .ant-tree-switcher-icon,
.ant-tree .ant-tree-switcher .ant-select-tree-switcher-icon {
font-size: 12px;
}
.black-tabs {
&.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
margin-right: 0;
}
}
.ant-badge-count {
z-index: 1;
}
.ant-input-textarea {
width: 100%;
}
}
@import './mixins/layout.less';
#root {
// 去除input type为number时的箭头
.ant-input-number-handler-wrap {
display: none;
}
.ant-pro-global-footer {
margin: 8px auto 32px auto;
}
.ant-page-header {
padding: 8px 24px;
}
.common_checkbox {
&:hover,
&:active,
&:focus {
.ant-checkbox-inner {
border-color: var(--mall_main_color);
}
}
.ant-checkbox-group-item {
display: block;
margin-bottom: 12px;
}
.ant-checkbox {
&:hover,
&:active,
&:focus {
.ant-checkbox-inner {
border-color: var(--mall_main_color);
}
}
}
.ant-checkbox .ant-checkbox-indeterminate {
&:hover {
border-color: var(--mall_main_color);
}
}
.ant-checkbox-indeterminate.ant-checkbox-checked .ant-checkbox-inner {
background-color: transparent;
}
.ant-checkbox-indeterminate .ant-checkbox-inner {
&:hover,
&:active,
&:focus {
border-color: var(--mall_main_color);
}
&::after {
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
.ant-checkbox-checked .ant-checkbox-inner {
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
// 去除数字输入框的箭头
input[type=number] {
-moz-appearance: textfield;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.identityRadio {
display: flex;
flex-direction: column;
margin: 0 auto;
.make-center(text);
& label {
width: 320px;
height: 48px;
.make-center-space(margin, 12);
vertical-align: middle;
line-height: 48px;
}
}
.businessRadio {
display: flex;
flex-wrap: wrap;
width: 320px;
.make-center(margin);
.make-center(text);
& label {
width: 148px;
height: 32px;
line-height: 32px;
margin: 8px 0;
border-top-width: 1px;
border-left-width: 1px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
& label:nth-child(odd) {
margin-right: 24px;
}
}
// 去除sogou浏览器自动加的密码软盘图标
input::-webkit-input-safebox-button{
display: none;
}
// 设置formitem的*号到字段label前
.ant-form-item-label>label.ant-form-item-required::before {
order: 10;
margin-left: -6px;
}
// 处理ant tree组件
// .ant-tree-checkbox {
// order: 10;
// }
.ant-tree .ant-tree-treenode {
padding-bottom: 0;
padding-right: 16px;
background: @tree-node;
border: 1px solid @tree-node-border;
margin-bottom: 4px;
align-items: center;
height: 32px;
&.ant-tree-treenode-selected {
border-color: @main-color;
background: @tree-node_hover;
}
&.ant-tree-treenode:hover {
border-color: @main-color;
background: @tree-node_hover;
}
&.ant-tree-treenode-selected {
.tree-node-circle {
background: @main-color;
}
}
}
.tree-node-circle {
width: 4px;
height: 4px;
border-radius: 50%;
margin-right: 12px;
background: @status-stop;
}
.ant-tree .ant-tree-checkbox {
margin: 0;
}
.ant-tree .ant-tree-node-content-wrapper:hover {
background: none;
}
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
background: none;
}
.ant-tree .ant-tree-switcher {
width: 28px;
height: 28px;
line-height: 32px;
}
.ant-tree .ant-tree-switcher .ant-tree-switcher-icon,
.ant-tree .ant-tree-switcher .ant-select-tree-switcher-icon {
font-size: 12px;
}
.black-tabs {
&.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
margin-right: 0;
}
}
.ant-badge-count {
z-index: 1;
}
.ant-input-textarea {
width: 100%;
}
}
src/pages/afterService/components/ManualDeliveryModal/index.tsx
View file @
d923106a
This diff is collapsed.
Click to expand it.
src/pages/afterService/components/ManualDeliveryModal/schema/index.ts
View file @
d923106a
/*
* @Author: XieZhiXiong
* @Date: 2020-11-09 10:50:43
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-14 18:34:12
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
export
const
schema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
MEGA_LAYOUT
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelAlign
:
'top'
,
},
properties
:
{
deliveryAddress
:
{
type
:
'string'
,
title
:
'发货地址'
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
},
deliveryAddressTxt
:
{
title
:
'发货地址'
,
type
:
'string'
,
display
:
false
,
},
deliveryTime
:
{
type
:
'string'
,
title
:
'发货时间'
,
'x-component'
:
'DatePicker'
,
required
:
true
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
showTime
:
true
,
style
:
{
width
:
'100%'
},
},
},
logisticsOrderNo
:
{
type
:
'string'
,
title
:
'发货单号'
,
required
:
true
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
},
logisticsOrderNoTxt
:
{
type
:
'string'
,
title
:
'发货单号'
,
visible
:
false
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{LogisticsOrderNo}}'
,
},
},
logisticsName
:
{
type
:
'string'
,
title
:
'物流公司'
,
required
:
true
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
},
logisticsNameTxt
:
{
title
:
'物流公司'
,
type
:
'string'
,
display
:
false
,
},
},
},
},
/*
* @Author: XieZhiXiong
* @Date: 2020-11-09 10:50:43
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-31 10:35:24
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
export
const
schema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
MEGA_LAYOUT
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelAlign
:
'left'
,
},
properties
:
{
deliveryAddress
:
{
type
:
'string'
,
title
:
'发货地址'
,
enum
:
[],
required
:
true
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
},
deliveryAddressTxt
:
{
title
:
'发货地址'
,
type
:
'string'
,
display
:
false
,
},
deliveryTime
:
{
type
:
'string'
,
title
:
'发货时间'
,
'x-component'
:
'DatePicker'
,
required
:
true
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
showTime
:
true
,
style
:
{
width
:
'100%'
},
},
},
logisticsOrderNo
:
{
type
:
'string'
,
title
:
'发货单号'
,
required
:
true
,
'x-component-props'
:
{
placeholder
:
'请输入'
,
},
},
logisticsOrderNoTxt
:
{
type
:
'string'
,
title
:
'发货单号'
,
visible
:
false
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{LogisticsOrderNo}}'
,
},
},
logisticsName
:
{
type
:
'string'
,
title
:
'物流公司'
,
required
:
true
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
},
logisticsNameTxt
:
{
title
:
'物流公司'
,
type
:
'string'
,
display
:
false
,
},
},
},
},
};
\ No newline at end of file
src/pages/afterService/exchangeApplication/exchangePrDeliver/verify.tsx
View file @
d923106a
import
React
,
{
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
ExchangePrDeliverVerify
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
if
(
!
id
)
{
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsManualReturnDeliveryGoods
({
dataId
:
id
,
...
values
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
const
handleVisible
=
flag
=>
{
setModalVisible
(
!!
flag
);
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
info
=>
(
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工退货发货
</
Button
>
)
}
</>
)
}
/>
<
ManualDeliveryModal
title=
"退货发货处理"
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
isEdit=
{
true
}
/>
</>
);
};
import
React
,
{
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
ExchangePrDeliverVerify
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
if
(
!
id
)
{
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsManualReturnDeliveryGoods
({
dataId
:
id
,
...
values
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
const
handleVisible
=
flag
=>
{
setModalVisible
(
!!
flag
);
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
info
=>
(
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工退货发货
</
Button
>
)
}
</>
)
}
/>
<
ManualDeliveryModal
title=
"退货发货处理"
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
isEdit=
{
true
}
/>
</>
);
};
export
default
ExchangePrDeliverVerify
;
\ No newline at end of file
src/pages/afterService/exchangeApplication/exchangePrReceived/index.tsx
View file @
d923106a
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
1-19 18:19:21
* @LastEditTime: 2020-1
2-31 10:33:18
* @Description: 待换货收货
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
src/pages/afterService/exchangeApplication/exchangePrReceived/verify.tsx
View file @
d923106a
import
React
,
{
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
ExchangePrReceivedVerify
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
if
(
!
id
)
{
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsConfirmManualReplaceReceiveGoods
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
const
handleVisible
=
flag
=>
{
setModalVisible
(
!!
flag
);
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
info
=>
{
const
detailed
=
info
||
{};
// @ts-ignore
const
{
manualReplaceGoodsAddress
=
{}
}
=
detailed
;
return
(
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<>
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工确认换货收货
</
Button
>
<
ManualDeliveryModal
key=
"2"
title=
"确认换货收货"
value=
{
{
deliveryAddressTxt
:
manualReplaceGoodsAddress
.
deliveryAddress
,
deliveryTime
:
manualReplaceGoodsAddress
.
deliveryTime
,
logisticsOrderNo
:
manualReplaceGoodsAddress
.
logisticsOrderNo
,
logisticsNameTxt
:
manualReplaceGoodsAddress
.
logisticsName
,
}
}
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
isEdit=
{
false
}
/>
</>
)
}
</>
)
}
}
/>
</>
);
};
import
React
,
{
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
ExchangePrReceivedVerify
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
if
(
!
id
)
{
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsConfirmManualReplaceReceiveGoods
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
const
handleVisible
=
flag
=>
{
setModalVisible
(
!!
flag
);
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
info
=>
{
const
detailed
=
info
||
{};
// @ts-ignore
const
{
manualReplaceGoodsAddress
=
{}
}
=
detailed
;
return
(
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<>
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工确认换货收货
</
Button
>
<
ManualDeliveryModal
key=
"2"
title=
"确认换货收货"
value=
{
{
deliveryAddressTxt
:
manualReplaceGoodsAddress
.
deliveryAddress
,
deliveryTime
:
manualReplaceGoodsAddress
.
deliveryTime
,
logisticsOrderNo
:
manualReplaceGoodsAddress
.
logisticsOrderNo
,
logisticsNameTxt
:
manualReplaceGoodsAddress
.
logisticsName
,
}
}
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
isEdit=
{
false
}
/>
</>
)
}
</>
)
}
}
/>
</>
);
};
export
default
ExchangePrReceivedVerify
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment