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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
988 additions
and
978 deletions
+988
-978
global.less
src/global/styles/global.less
+364
-359
reset.less
src/global/styles/reset.less
+214
-214
index.tsx
...ges/afterService/components/ManualDeliveryModal/index.tsx
+180
-179
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
/********************************** 布局 ******************************************/
/********************************** 布局 ******************************************/
@import './mixins/layout.less';
@import './mixins/layout.less';
@import './index.less';
@import './index.less';
@import '../../theme/style/colors.less';
@import '../../theme/style/colors.less';
@makeCenters : text,
@makeCenters : text,
block,
block,
flex,
flex,
flexAlign,
flexAlign,
flexJustify,
flexJustify,
absolute,
absolute,
fixed,
fixed,
margin;
margin;
@makeCentersLen: length(@makeCenters);
@makeCentersLen: length(@makeCenters);
.loopCenter(@list, @i: 1, @val: extract(@list, @i)) when (@i < @makeCentersLen + 1) {
.loopCenter(@list, @i: 1, @val: extract(@list, @i)) when (@i < @makeCentersLen + 1) {
.center-@{val} {
.center-@{val} {
.make-center(@val);
.make-center(@val);
}
}
.loopCenter(@list, @i + 1)
.loopCenter(@list, @i + 1)
}
}
;
;
.loopCenter(@makeCenters);
.loopCenter(@makeCenters);
.hide {
.hide {
display: none;
display: none;
}
}
// antd default
// antd default
h1,
h1,
h2,
h2,
h3,
h3,
h4,
h4,
h5,
h5,
h6 {
h6 {
color: #909399;
color: #909399;
}
}
a {
a {
&:hover {
&:hover {
color: var(--mall_main_color);
color: var(--mall_main_color);
}
}
}
}
::-webkit-scrollbar {
::-webkit-scrollbar {
height: 8px;
height: 8px;
width: 6px;
width: 6px;
background: #f0f2f5;
background: #f0f2f5;
border-radius: 5px;
border-radius: 5px;
}
}
::-webkit-scrollbar-button {
::-webkit-scrollbar-button {
display: none;
display: none;
}
}
::-webkit-scrollbar-thumb {
::-webkit-scrollbar-thumb {
width: 8px;
width: 8px;
min-height: 15px;
min-height: 15px;
background: rgba(0,0,0,.2);
background: rgba(0,0,0,.2);
border-radius: 5px;
border-radius: 5px;
}
}
.tb_bg {
.tb_bg {
background-color: #FAFBFC;
background-color: #FAFBFC;
}
}
.noMarginBottom {
.noMarginBottom {
margin-bottom: 0;
margin-bottom: 0;
}
}
.common_tb {
.common_tb {
.ant-table-thead>tr>th {
.ant-table-thead>tr>th {
background-color: #FFF;
background-color: #FFF;
color: #303133;
color: #303133;
}
}
tr.ant-table-expanded-row>td,
tr.ant-table-expanded-row>td,
tr.ant-table-expanded-row:hover>td {
tr.ant-table-expanded-row:hover>td {
background: #FFF;
background: #FFF;
}
}
.ant-table-tbody>tr.ant-table-row-selected>td {
.ant-table-tbody>tr.ant-table-row-selected>td {
background-color: #fff;
background-color: #fff;
}
}
.ant-table-tbody>tr.ant-table-row-selected.tb_bg>td {
.ant-table-tbody>tr.ant-table-row-selected.tb_bg>td {
background-color: #FAFBFC;
background-color: #FAFBFC;
}
}
}
}
.@{prefix}-margin_content {
.@{prefix}-margin_content {
.center-margin;
.center-margin;
width: 1190px;
width: 1190px;
}
}
.@{prefix}-content1024 {
.@{prefix}-content1024 {
.center-margin;
.center-margin;
width: 1024px;
width: 1024px;
}
}
// 公共的title伪类竖线
// 公共的title伪类竖线
.commonPanelTitle {
.commonPanelTitle {
padding-left: 8px;
padding-left: 8px;
position: relative;
position: relative;
&::before {
&::before {
content: "";
content: "";
display: inline-block;
display: inline-block;
position: absolute;
position: absolute;
left: 0;
left: 0;
top: 50%;
top: 50%;
margin-top: -.42667rem;
margin-top: -.42667rem;
width: 2px;
width: 2px;
height: .85333rem;
height: .85333rem;
background-color: @primary-color;
background-color: @primary-color;
box-shadow: 0 0.14933rem 0.256rem 0 rgba(97, 144, 232, .2);
box-shadow: 0 0.14933rem 0.256rem 0 rgba(97, 144, 232, .2);
border-radius: 1px;
border-radius: 1px;
}
}
}
}
// 公共显示隐藏处理
// 公共显示隐藏处理
.commonShowBlock {
.commonShowBlock {
display: block;
display: block;
}
}
.commonShow {
.commonShow {
display: inline-block;
display: inline-block;
}
}
.commonHide {
.commonHide {
display: none;
display: none;
}
}
// 公共着色 主体颜色
// 公共着色 主体颜色
.commonPickColor {
.commonPickColor {
color: @main-color;
color: @main-color;
cursor: pointer;
cursor: pointer;
}
}
.padLeft0 {
.padLeft0 {
padding-left: 0 !important;
padding-left: 0 !important;
}
}
// 公共状态 圆点
// 公共状态 圆点
.commonStatus {
.commonStatus {
display: inline-block;
display: inline-block;
width: 8px;
width: 8px;
height: 8px;
height: 8px;
margin-right: 6px;
margin-right: 6px;
border-radius: 50%;
border-radius: 50%;
vertical-align: middle;
vertical-align: middle;
}
}
.commonStatusStop {
.commonStatusStop {
.commonStatus();
.commonStatus();
background-color: @status-stop; // 停用
background-color: @status-stop; // 停用
}
}
.mall_container {
.mall_container {
width: 1200px;
width: 1200px;
position: relative;
position: relative;
margin: 0 auto;
margin: 0 auto;
}
}
.commonStatusModify {
.commonStatusModify {
.commonStatus();
.commonStatus();
background-color: @status-modify; // 已修改
background-color: @status-modify; // 已修改
}
}
.commonStatusValid {
.commonStatusValid {
.commonStatus();
.commonStatus();
background-color: @status-valid; // 已生成,有效、审核通过
background-color: @status-valid; // 已生成,有效、审核通过
}
}
.commonStatusInvalid {
.commonStatusInvalid {
.commonStatus();
.commonStatus();
background-color: @status-invalid; // 未生成,无效、待审核
background-color: @status-invalid; // 未生成,无效、待审核
}
}
.commonStatusNoPass {
.commonStatusNoPass {
.commonStatus();
.commonStatus();
background-color: @status-nopass; // 审核不通过
background-color: @status-nopass; // 审核不通过
}
}
.mb-30 {
.mb-30 {
margin-bottom: 30px;
margin-bottom: 30px;
}
}
.sc-fzpans {
.sc-fzpans {
display: block;
display: block;
width: 100%;
width: 100%;
}
}
.mr_t-40 {
.mr_t-40 {
margin-top: 40px;
margin-top: 40px;
}
}
#registerForm {
#registerForm {
.ant-input-group-addon {
.ant-input-group-addon {
padding: 0;
padding: 0;
border: none;
border: none;
background: none;
background: none;
}
}
}
}
.white-wrapper {
.white-wrapper {
background-color: #fff;
background-color: #fff;
}
}
//addonAfter 有选择弹窗时
//addonAfter 有选择弹窗时
.input_addonAfter {
.input_addonAfter {
.ant-input-group-addon {
.ant-input-group-addon {
padding: 0 !important;
padding: 0 !important;
}
}
}
}
/* 有关联或选择按钮的input输入框 */
/* 有关联或选择按钮的input输入框 */
// 此样式用于input的父级以上元素
// 此样式用于input的父级以上元素
.useConnectBtnWrapper {
.useConnectBtnWrapper {
.ant-input-group-addon {
.ant-input-group-addon {
padding: 0;
padding: 0;
border: none;
border: none;
}
}
.connectBtn {
.connectBtn {
width: 80px;
width: 80px;
height: 32px;
height: 32px;
line-height: 32px;
line-height: 32px;
background: #909399;
background: #909399;
color: #fff;
color: #fff;
text-align: center;
text-align: center;
cursor: pointer;
cursor: pointer;
}
}
}
}
/* 带树的模态框 */
/* 带树的模态框 */
// 此样式用于模态框上面
// 此样式用于模态框上面
.useTreeModalWrapper {
.useTreeModalWrapper {
.ant-tree .ant-tree-treenode {
.ant-tree .ant-tree-treenode {
padding-bottom: 0;
padding-bottom: 0;
padding-right: 16px;
padding-right: 16px;
background: @tree-node;
background: @tree-node;
border: 1px solid @tree-node-border;
border: 1px solid @tree-node-border;
margin-bottom: 4px;
margin-bottom: 4px;
align-items: center;
align-items: center;
height: 32px;
height: 32px;
&.ant-tree-treenode-selected {
&.ant-tree-treenode-selected {
border-color: @main-color;
border-color: @main-color;
background: @tree-node_hover;
background: @tree-node_hover;
}
}
&.ant-tree-treenode:hover {
&.ant-tree-treenode:hover {
border-color: @main-color;
border-color: @main-color;
background: @tree-node_hover;
background: @tree-node_hover;
}
}
&.ant-tree-treenode-selected {
&.ant-tree-treenode-selected {
.tree-node-circle {
.tree-node-circle {
background: @main-color;
background: @main-color;
}
}
}
}
}
}
.tree-node-circle {
.tree-node-circle {
width: 4px;
width: 4px;
height: 4px;
height: 4px;
border-radius: 50%;
border-radius: 50%;
margin-right: 12px;
margin-right: 12px;
background: @status-stop;
background: @status-stop;
}
}
.ant-tree .ant-tree-checkbox {
.ant-tree .ant-tree-checkbox {
margin: 0;
margin: 0;
}
}
.ant-tree .ant-tree-node-content-wrapper:hover {
.ant-tree .ant-tree-node-content-wrapper:hover {
background: none;
background: none;
}
}
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
background: none;
background: none;
}
}
.ant-tree .ant-tree-switcher {
.ant-tree .ant-tree-switcher {
width: 28px;
width: 28px;
height: 28px;
height: 28px;
line-height: 32px;
line-height: 32px;
}
}
.ant-tree .ant-tree-switcher .ant-tree-switcher-icon,
.ant-tree .ant-tree-switcher .ant-tree-switcher-icon,
.ant-tree .ant-tree-switcher .ant-select-tree-switcher-icon {
.ant-tree .ant-tree-switcher .ant-select-tree-switcher-icon {
font-size: 12px;
font-size: 12px;
}
}
.black-tabs {
.black-tabs {
&.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
&.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
margin-right: 0;
margin-right: 0;
}
}
}
}
}
}
// 可编辑表格项公用样式
// 可编辑表格项公用样式
.editable-cell {
.editable-cell {
position: relative;
position: relative;
}
}
.editable-cell-value-wrap {
.editable-cell-value-wrap {
padding: 5px 12px;
padding: 5px 12px;
min-height: 32px;
min-height: 32px;
cursor: pointer;
cursor: pointer;
}
}
.editable-row:hover .editable-cell-value-wrap {
.editable-row:hover .editable-cell-value-wrap {
border: 1px solid #d9d9d9;
border: 1px solid #d9d9d9;
border-radius: 4px;
border-radius: 4px;
padding: 4px 11px;
padding: 4px 11px;
}
}
.editable-row .ant-form-item-explain {
.editable-row .ant-form-item-explain {
position: absolute;
position: absolute;
top: 100%;
top: 100%;
font-size: 12px;
font-size: 12px;
}
}
// 强制覆盖下拉框固定位置
// 强制覆盖下拉框固定位置
.fixed-ant-selected-down {
.fixed-ant-selected-down {
.ant-select-dropdown {
.ant-select-dropdown {
top: 36px !important;
top: 36px !important;
}
}
}
}
// 强制块级标签居中
// 强制块级标签居中
.global-block-center {
.global-block-center {
margin-left: auto !important;
margin-left: auto !important;
margin-right: auto !important;
margin-right: auto !important;
}
}
// 重置Card样式
// 重置Card样式
.ant-card {
.ant-card {
border-radius: 8px !important;
border-radius: 8px !important;
.ant-card-head {
.ant-card-head {
border-bottom: none;
border-bottom: none;
.ant-card-head-title {
.ant-card-head-title {
// line-height: 24px;
// line-height: 24px;
// padding-bottom: 0;
// padding-bottom: 0;
font-size: 16px;
font-size: 16px;
font-weight: 500;
font-weight: 500;
color: #343031;
color: #343031;
}
}
}
}
}
.ant-form-horizontal .ant-form-item-control {
overflow: hidden;
}
}
\ No newline at end of file
src/global/styles/reset.less
View file @
d923106a
@import './mixins/layout.less';
@import './mixins/layout.less';
#root {
#root {
// 去除input type为number时的箭头
// 去除input type为number时的箭头
.ant-input-number-handler-wrap {
.ant-input-number-handler-wrap {
display: none;
display: none;
}
}
.ant-pro-global-footer {
.ant-pro-global-footer {
margin: 8px auto 32px auto;
margin: 8px auto 32px auto;
}
}
.ant-page-header {
.ant-page-header {
padding: 8px 24px;
padding: 8px 24px;
}
}
.common_checkbox {
.common_checkbox {
&:hover,
&:hover,
&:active,
&:active,
&:focus {
&:focus {
.ant-checkbox-inner {
.ant-checkbox-inner {
border-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
}
}
.ant-checkbox-group-item {
.ant-checkbox-group-item {
display: block;
display: block;
margin-bottom: 12px;
margin-bottom: 12px;
}
}
.ant-checkbox {
.ant-checkbox {
&:hover,
&:hover,
&:active,
&:active,
&:focus {
&:focus {
.ant-checkbox-inner {
.ant-checkbox-inner {
border-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
}
}
}
}
.ant-checkbox .ant-checkbox-indeterminate {
.ant-checkbox .ant-checkbox-indeterminate {
&:hover {
&:hover {
border-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
}
}
.ant-checkbox-indeterminate.ant-checkbox-checked .ant-checkbox-inner {
.ant-checkbox-indeterminate.ant-checkbox-checked .ant-checkbox-inner {
background-color: transparent;
background-color: transparent;
}
}
.ant-checkbox-indeterminate .ant-checkbox-inner {
.ant-checkbox-indeterminate .ant-checkbox-inner {
&:hover,
&:hover,
&:active,
&:active,
&:focus {
&:focus {
border-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
&::after {
&::after {
background-color: var(--mall_main_color);
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
}
}
.ant-checkbox-checked .ant-checkbox-inner {
.ant-checkbox-checked .ant-checkbox-inner {
background-color: var(--mall_main_color);
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
}
}
// 去除数字输入框的箭头
// 去除数字输入框的箭头
input[type=number] {
input[type=number] {
-moz-appearance: textfield;
-moz-appearance: textfield;
}
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
-webkit-appearance: none;
margin: 0;
margin: 0;
}
}
.identityRadio {
.identityRadio {
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
margin: 0 auto;
margin: 0 auto;
.make-center(text);
.make-center(text);
& label {
& label {
width: 320px;
width: 320px;
height: 48px;
height: 48px;
.make-center-space(margin, 12);
.make-center-space(margin, 12);
vertical-align: middle;
vertical-align: middle;
line-height: 48px;
line-height: 48px;
}
}
}
}
.businessRadio {
.businessRadio {
display: flex;
display: flex;
flex-wrap: wrap;
flex-wrap: wrap;
width: 320px;
width: 320px;
.make-center(margin);
.make-center(margin);
.make-center(text);
.make-center(text);
& label {
& label {
width: 148px;
width: 148px;
height: 32px;
height: 32px;
line-height: 32px;
line-height: 32px;
margin: 8px 0;
margin: 8px 0;
border-top-width: 1px;
border-top-width: 1px;
border-left-width: 1px;
border-left-width: 1px;
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
}
}
& label:nth-child(odd) {
& label:nth-child(odd) {
margin-right: 24px;
margin-right: 24px;
}
}
}
}
// 去除sogou浏览器自动加的密码软盘图标
// 去除sogou浏览器自动加的密码软盘图标
input::-webkit-input-safebox-button{
input::-webkit-input-safebox-button{
display: none;
display: none;
}
}
// 设置formitem的*号到字段label前
// 设置formitem的*号到字段label前
.ant-form-item-label>label.ant-form-item-required::before {
.ant-form-item-label>label.ant-form-item-required::before {
order: 10;
order: 10;
margin-left: -6px;
margin-left: -6px;
}
}
// 处理ant tree组件
// 处理ant tree组件
// .ant-tree-checkbox {
// .ant-tree-checkbox {
// order: 10;
// order: 10;
// }
// }
.ant-tree .ant-tree-treenode {
.ant-tree .ant-tree-treenode {
padding-bottom: 0;
padding-bottom: 0;
padding-right: 16px;
padding-right: 16px;
background: @tree-node;
background: @tree-node;
border: 1px solid @tree-node-border;
border: 1px solid @tree-node-border;
margin-bottom: 4px;
margin-bottom: 4px;
align-items: center;
align-items: center;
height: 32px;
height: 32px;
&.ant-tree-treenode-selected {
&.ant-tree-treenode-selected {
border-color: @main-color;
border-color: @main-color;
background: @tree-node_hover;
background: @tree-node_hover;
}
}
&.ant-tree-treenode:hover {
&.ant-tree-treenode:hover {
border-color: @main-color;
border-color: @main-color;
background: @tree-node_hover;
background: @tree-node_hover;
}
}
&.ant-tree-treenode-selected {
&.ant-tree-treenode-selected {
.tree-node-circle {
.tree-node-circle {
background: @main-color;
background: @main-color;
}
}
}
}
}
}
.tree-node-circle {
.tree-node-circle {
width: 4px;
width: 4px;
height: 4px;
height: 4px;
border-radius: 50%;
border-radius: 50%;
margin-right: 12px;
margin-right: 12px;
background: @status-stop;
background: @status-stop;
}
}
.ant-tree .ant-tree-checkbox {
.ant-tree .ant-tree-checkbox {
margin: 0;
margin: 0;
}
}
.ant-tree .ant-tree-node-content-wrapper:hover {
.ant-tree .ant-tree-node-content-wrapper:hover {
background: none;
background: none;
}
}
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
background: none;
background: none;
}
}
.ant-tree .ant-tree-switcher {
.ant-tree .ant-tree-switcher {
width: 28px;
width: 28px;
height: 28px;
height: 28px;
line-height: 32px;
line-height: 32px;
}
}
.ant-tree .ant-tree-switcher .ant-tree-switcher-icon,
.ant-tree .ant-tree-switcher .ant-tree-switcher-icon,
.ant-tree .ant-tree-switcher .ant-select-tree-switcher-icon {
.ant-tree .ant-tree-switcher .ant-select-tree-switcher-icon {
font-size: 12px;
font-size: 12px;
}
}
.black-tabs {
.black-tabs {
&.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
&.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
margin-right: 0;
margin-right: 0;
}
}
}
}
.ant-badge-count {
.ant-badge-count {
z-index: 1;
z-index: 1;
}
}
.ant-input-textarea {
.ant-input-textarea {
width: 100%;
width: 100%;
}
}
}
}
src/pages/afterService/components/ManualDeliveryModal/index.tsx
View file @
d923106a
/*
/*
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-09 10:48:12
* @Date: 2020-11-09 10:48:12
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
14 18:33:19
* @LastEditTime: 2020-12-
31 10:48:22
* @Description: 手动发货弹窗
* @Description: 手动发货弹窗
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
{
Modal
}
from
'antd'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
DatePicker
}
from
'@formily/antd-components'
;
import
{
DatePicker
}
from
'@formily/antd-components'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
schema
}
from
'./schema'
;
import
{
schema
}
from
'./schema'
;
const
modalFormActions
=
createFormActions
();
const
modalFormActions
=
createFormActions
();
const
{
const
{
onFieldValueChange$
,
onFieldValueChange$
,
onFieldInputChange$
,
onFieldInputChange$
,
onFormInit$
,
onFormInit$
,
}
=
FormEffectHooks
;
}
=
FormEffectHooks
;
interface
VerifyModalProps
{
interface
VerifyModalProps
{
visible
:
boolean
;
visible
:
boolean
;
confirmLoading
:
boolean
;
confirmLoading
:
boolean
;
onSubmit
:
(
values
:
{[
key
:
string
]:
any
})
=>
void
;
onSubmit
:
(
values
:
{[
key
:
string
]:
any
})
=>
void
;
onVisible
:
(
flag
:
boolean
)
=>
void
;
onVisible
:
(
flag
:
boolean
)
=>
void
;
// 是否编辑的
// 是否编辑的
isEdit
?:
boolean
;
isEdit
?:
boolean
;
title
?:
string
;
title
?:
string
;
value
?:
{[
key
:
string
]:
any
};
value
?:
{[
key
:
string
]:
any
};
};
};
const
VerifyModal
:
React
.
FC
<
VerifyModalProps
>
=
({
const
VerifyModal
:
React
.
FC
<
VerifyModalProps
>
=
({
visible
,
visible
,
confirmLoading
,
confirmLoading
,
onSubmit
,
onSubmit
,
onVisible
,
onVisible
,
isEdit
=
true
,
isEdit
=
true
,
title
=
'换货发货处理'
,
title
=
'换货发货处理'
,
value
=
{},
value
=
{},
})
=>
{
})
=>
{
const
handleSubmit
=
values
=>
{
const
handleSubmit
=
values
=>
{
const
{
const
{
deliveryAddress
,
deliveryAddress
,
deliveryAddressTxt
,
deliveryAddressTxt
,
deliveryTime
,
deliveryTime
,
logisticsName
,
logisticsName
,
logisticsNameTxt
,
logisticsNameTxt
,
...
rest
...
rest
}
=
values
;
}
=
values
;
if
(
onSubmit
)
{
if
(
onSubmit
)
{
onSubmit
(
isEdit
?
{
onSubmit
(
isEdit
?
{
deliveryAddress
:
deliveryAddressTxt
,
deliveryAddress
:
deliveryAddressTxt
,
logisticsName
:
logisticsNameTxt
,
logisticsName
:
logisticsNameTxt
,
deliveryTime
:
deliveryTime
?
deliveryTime
.
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
deliveryTime
:
deliveryTime
?
deliveryTime
.
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
...
rest
,
...
rest
,
}
:
null
);
}
:
null
);
}
}
};
};
// 获取发货地址
// 获取发货地址
const
fetchShipperAddress
=
():
Promise
<
any
[]
>
=>
{
const
fetchShipperAddress
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getLogisticsSelectListShipperAddress
().
then
(
res
=>
{
PublicApi
.
getLogisticsSelectListShipperAddress
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
const
options
=
const
options
=
res
.
data
?
res
.
data
?
res
.
data
.
map
(
item
=>
({
res
.
data
.
map
(
item
=>
({
label
:
`
${
item
.
fullAddress
}
/
${
item
.
shipperName
}
/
${
item
.
phone
}
`
,
label
:
`
${
item
.
fullAddress
}
/
${
item
.
shipperName
}
/
${
item
.
phone
}
`
,
value
:
item
.
id
,
value
:
item
.
id
,
...
item
,
...
item
,
}))
:
}))
:
[];
[];
resolve
(
options
);
resolve
(
options
);
}
}
reject
();
reject
();
}).
catch
(()
=>
{
}).
catch
(()
=>
{
reject
();
reject
();
});
});
});
});
};
};
// 获取物流公司
// 获取物流公司
const
fetchLogisticsCompany
=
():
Promise
<
any
[]
>
=>
{
const
fetchLogisticsCompany
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getLogisticsSelectListCompany
({
PublicApi
.
getLogisticsSelectListCompany
({
cooperateType
:
'2'
,
// 1-平台物流服务商,2-商户合作物流公司
cooperateType
:
'2'
,
// 1-平台物流服务商,2-商户合作物流公司
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
const
options
=
const
options
=
res
.
data
?
res
.
data
?
res
.
data
.
map
(
item
=>
({
res
.
data
.
map
(
item
=>
({
label
:
item
.
name
,
label
:
item
.
name
,
value
:
item
.
id
,
value
:
item
.
id
,
}))
:
}))
:
[];
[];
resolve
(
options
);
resolve
(
options
);
}
}
reject
();
reject
();
}).
catch
(()
=>
{
}).
catch
(()
=>
{
reject
();
reject
();
});
});
});
});
};
};
const
LogisticsOrderNo
=
(
const
LogisticsOrderNo
=
(
<
a
<
a
href=
{
`https://www.kuaidi100.com/chaxun?nu=${value.logisticsOrderNo}`
}
href=
{
`https://www.kuaidi100.com/chaxun?nu=${value.logisticsOrderNo}`
}
target=
"_blank"
target=
"_blank"
>
>
{
value
.
logisticsOrderNo
}
{
value
.
logisticsOrderNo
}
</
a
>
</
a
>
);
);
return
(
return
(
<
Modal
<
Modal
title=
{
title
}
title=
{
title
}
visible=
{
visible
}
visible=
{
visible
}
confirmLoading=
{
confirmLoading
}
confirmLoading=
{
confirmLoading
}
onOk=
{
()
=>
modalFormActions
.
submit
()
}
onOk=
{
()
=>
modalFormActions
.
submit
()
}
onCancel=
{
()
=>
onVisible
(
false
)
}
onCancel=
{
()
=>
onVisible
(
false
)
}
destroyOnClose
destroyOnClose
>
>
<
NiceForm
<
NiceForm
effects=
{
(
$
,
{
setFieldState
,
setFieldValue
})
=>
{
effects=
{
(
$
,
{
setFieldState
,
setFieldValue
})
=>
{
const
linkage
=
useLinkageUtils
();
const
linkage
=
useLinkageUtils
();
useAsyncSelect
(
'deliveryAddress'
,
fetchShipperAddress
,
[
'label'
,
'value'
]);
useAsyncSelect
(
'deliveryAddress'
,
fetchShipperAddress
,
[
'label'
,
'value'
]);
useAsyncSelect
(
'logisticsName'
,
fetchLogisticsCompany
,
[
'label'
,
'value'
]);
useAsyncSelect
(
'logisticsName'
,
fetchLogisticsCompany
,
[
'label'
,
'value'
]);
onFieldInputChange$
(
'deliveryAddress'
).
subscribe
(
state
=>
{
onFieldInputChange$
(
'deliveryAddress'
).
subscribe
(
state
=>
{
const
{
originAsyncData
,
value
}
=
state
;
const
{
originAsyncData
,
value
}
=
state
;
const
current
=
originAsyncData
.
find
(
item
=>
item
.
value
===
value
);
const
current
=
originAsyncData
.
find
(
item
=>
item
.
value
===
value
);
if
(
current
)
{
if
(
current
)
{
setFieldValue
(
'deliveryAddressTxt'
,
current
.
fullAddress
);
setFieldValue
(
'deliveryAddressTxt'
,
current
.
fullAddress
);
}
}
});
});
onFieldInputChange$
(
'logisticsName'
).
subscribe
(
state
=>
{
onFieldInputChange$
(
'logisticsName'
).
subscribe
(
state
=>
{
const
{
originAsyncData
,
value
}
=
state
;
const
{
originAsyncData
,
value
}
=
state
;
const
current
=
originAsyncData
.
find
(
item
=>
item
.
value
===
value
);
const
current
=
originAsyncData
.
find
(
item
=>
item
.
value
===
value
);
if
(
current
)
{
if
(
current
)
{
setFieldValue
(
'logisticsNameTxt'
,
current
.
label
);
setFieldValue
(
'logisticsNameTxt'
,
current
.
label
);
}
}
});
});
onFormInit$
().
subscribe
(()
=>
{
onFormInit$
().
subscribe
(()
=>
{
if
(
!
isEdit
)
{
if
(
!
isEdit
)
{
linkage
.
hide
(
'*(deliveryAddress,logisticsName,logisticsOrderNo)'
);
linkage
.
hide
(
'*(deliveryAddress,logisticsName,logisticsOrderNo)'
);
linkage
.
show
(
'*(logisticsOrderNoTxt)'
);
linkage
.
show
(
'*(logisticsOrderNoTxt)'
);
setFieldState
(
'*(deliveryAddressTxt,logisticsNameTxt)'
,
state
=>
{
setFieldState
(
'*(deliveryAddressTxt,logisticsNameTxt)'
,
state
=>
{
state
.
display
=
true
;
state
.
display
=
true
;
});
});
}
}
});
});
}
}
}
}
initialValues=
{
{
initialValues=
{
{
deliveryTime
:
moment
(),
deliveryTime
:
moment
(),
...
value
,
...
value
,
}
}
}
}
components=
{
{
components=
{
{
DatePicker
,
DatePicker
,
}
}
}
}
expressionScope=
{
{
expressionScope=
{
{
LogisticsOrderNo
,
LogisticsOrderNo
,
}
}
}
}
editable=
{
isEdit
}
editable=
{
isEdit
}
actions=
{
modalFormActions
}
actions=
{
modalFormActions
}
schema=
{
schema
}
schema=
{
schema
}
onSubmit=
{
handleSubmit
}
onSubmit=
{
handleSubmit
}
/>
/>
</
Modal
>
</
Modal
>
);
);
};
};
export
default
VerifyModal
;
export
default
VerifyModal
;
\ No newline at end of file
src/pages/afterService/components/ManualDeliveryModal/schema/index.ts
View file @
d923106a
/*
/*
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-09 10:50:43
* @Date: 2020-11-09 10:50:43
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-14 18:34:12
* @LastEditTime: 2020-12-31 10:35:24
* @Description:
* @Description:
*/
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
ISchema
}
from
'@formily/antd'
;
export
const
schema
:
ISchema
=
{
export
const
schema
:
ISchema
=
{
type
:
'object'
,
type
:
'object'
,
properties
:
{
properties
:
{
MEGA_LAYOUT
:
{
MEGA_LAYOUT
:
{
type
:
'object'
,
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
'x-component-props'
:
{
labelAlign
:
'top'
,
labelAlign
:
'left'
,
},
},
properties
:
{
properties
:
{
deliveryAddress
:
{
deliveryAddress
:
{
type
:
'string'
,
type
:
'string'
,
title
:
'发货地址'
,
title
:
'发货地址'
,
enum
:
[],
enum
:
[],
'x-component-props'
:
{
required
:
true
,
placeholder
:
'请选择'
,
'x-component-props'
:
{
},
placeholder
:
'请选择'
,
},
},
deliveryAddressTxt
:
{
},
title
:
'发货地址'
,
deliveryAddressTxt
:
{
type
:
'string'
,
title
:
'发货地址'
,
display
:
false
,
type
:
'string'
,
},
display
:
false
,
deliveryTime
:
{
},
type
:
'string'
,
deliveryTime
:
{
title
:
'发货时间'
,
type
:
'string'
,
'x-component'
:
'DatePicker'
,
title
:
'发货时间'
,
required
:
true
,
'x-component'
:
'DatePicker'
,
'x-component-props'
:
{
required
:
true
,
placeholder
:
'请选择'
,
'x-component-props'
:
{
showTime
:
true
,
placeholder
:
'请选择'
,
style
:
{
width
:
'100%'
},
showTime
:
true
,
},
style
:
{
width
:
'100%'
},
},
},
logisticsOrderNo
:
{
},
type
:
'string'
,
logisticsOrderNo
:
{
title
:
'发货单号'
,
type
:
'string'
,
required
:
true
,
title
:
'发货单号'
,
'x-component-props'
:
{
required
:
true
,
placeholder
:
'请选择'
,
'x-component-props'
:
{
},
placeholder
:
'请输入'
,
},
},
logisticsOrderNoTxt
:
{
},
type
:
'string'
,
logisticsOrderNoTxt
:
{
title
:
'发货单号'
,
type
:
'string'
,
visible
:
false
,
title
:
'发货单号'
,
'x-component'
:
'Children'
,
visible
:
false
,
'x-component-props'
:
{
'x-component'
:
'Children'
,
children
:
'{{LogisticsOrderNo}}'
,
'x-component-props'
:
{
},
children
:
'{{LogisticsOrderNo}}'
,
},
},
logisticsName
:
{
},
type
:
'string'
,
logisticsName
:
{
title
:
'物流公司'
,
type
:
'string'
,
required
:
true
,
title
:
'物流公司'
,
enum
:
[],
required
:
true
,
'x-component-props'
:
{
enum
:
[],
placeholder
:
'请选择'
,
'x-component-props'
:
{
},
placeholder
:
'请选择'
,
},
},
logisticsNameTxt
:
{
},
title
:
'物流公司'
,
logisticsNameTxt
:
{
type
:
'string'
,
title
:
'物流公司'
,
display
:
false
,
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
React
,
{
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
ExchangePrDeliverVerify
:
React
.
FC
=
()
=>
{
const
ExchangePrDeliverVerify
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
{
id
,
creditId
}
=
usePageStatus
();
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
const
handleSubmit
=
values
=>
{
if
(
!
id
)
{
if
(
!
id
)
{
return
;
return
;
}
}
setSubmitLoading
(
true
);
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsManualReturnDeliveryGoods
({
PublicApi
.
postAsReplaceGoodsManualReturnDeliveryGoods
({
dataId
:
id
,
dataId
:
id
,
...
values
,
...
values
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
history
.
goBack
();
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
setSubmitLoading
(
false
);
});
});
};
};
const
handleVisible
=
flag
=>
{
const
handleVisible
=
flag
=>
{
setModalVisible
(
!!
flag
);
setModalVisible
(
!!
flag
);
};
};
return
(
return
(
<>
<>
<
DetailInfo
<
DetailInfo
id=
{
id
}
id=
{
id
}
headExtra=
{
info
=>
(
headExtra=
{
info
=>
(
<>
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<
Button
<
Button
type=
"default"
type=
"default"
icon=
{
<
SettingOutlined
/>
}
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
>
手工退货发货
手工退货发货
</
Button
>
</
Button
>
)
}
)
}
</>
</>
)
}
)
}
/>
/>
<
ManualDeliveryModal
<
ManualDeliveryModal
title=
"退货发货处理"
title=
"退货发货处理"
visible=
{
modalVisible
}
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
onVisible=
{
handleVisible
}
isEdit=
{
true
}
isEdit=
{
true
}
/>
/>
</>
</>
);
);
};
};
export
default
ExchangePrDeliverVerify
;
export
default
ExchangePrDeliverVerify
;
\ No newline at end of file
src/pages/afterService/exchangeApplication/exchangePrReceived/index.tsx
View file @
d923106a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
1-19 18:19:21
* @LastEditTime: 2020-1
2-31 10:33:18
* @Description: 待换货收货
* @Description: 待换货收货
*/
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
src/pages/afterService/exchangeApplication/exchangePrReceived/verify.tsx
View file @
d923106a
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
ExchangePrReceivedVerify
:
React
.
FC
=
()
=>
{
const
ExchangePrReceivedVerify
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
{
id
,
creditId
}
=
usePageStatus
();
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
const
handleSubmit
=
values
=>
{
if
(
!
id
)
{
if
(
!
id
)
{
return
;
return
;
}
}
setSubmitLoading
(
true
);
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsConfirmManualReplaceReceiveGoods
({
PublicApi
.
postAsReplaceGoodsConfirmManualReplaceReceiveGoods
({
dataId
:
id
,
dataId
:
id
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
history
.
goBack
();
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
setSubmitLoading
(
false
);
});
});
};
};
const
handleVisible
=
flag
=>
{
const
handleVisible
=
flag
=>
{
setModalVisible
(
!!
flag
);
setModalVisible
(
!!
flag
);
};
};
return
(
return
(
<>
<>
<
DetailInfo
<
DetailInfo
id=
{
id
}
id=
{
id
}
headExtra=
{
info
=>
{
headExtra=
{
info
=>
{
const
detailed
=
info
||
{};
const
detailed
=
info
||
{};
// @ts-ignore
// @ts-ignore
const
{
manualReplaceGoodsAddress
=
{}
}
=
detailed
;
const
{
manualReplaceGoodsAddress
=
{}
}
=
detailed
;
return
(
return
(
<>
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<>
<>
<
Button
<
Button
type=
"default"
type=
"default"
icon=
{
<
SettingOutlined
/>
}
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
>
手工确认换货收货
手工确认换货收货
</
Button
>
</
Button
>
<
ManualDeliveryModal
<
ManualDeliveryModal
key=
"2"
key=
"2"
title=
"确认换货收货"
title=
"确认换货收货"
value=
{
{
value=
{
{
deliveryAddressTxt
:
manualReplaceGoodsAddress
.
deliveryAddress
,
deliveryAddressTxt
:
manualReplaceGoodsAddress
.
deliveryAddress
,
deliveryTime
:
manualReplaceGoodsAddress
.
deliveryTime
,
deliveryTime
:
manualReplaceGoodsAddress
.
deliveryTime
,
logisticsOrderNo
:
manualReplaceGoodsAddress
.
logisticsOrderNo
,
logisticsOrderNo
:
manualReplaceGoodsAddress
.
logisticsOrderNo
,
logisticsNameTxt
:
manualReplaceGoodsAddress
.
logisticsName
,
logisticsNameTxt
:
manualReplaceGoodsAddress
.
logisticsName
,
}
}
}
}
visible=
{
modalVisible
}
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
onVisible=
{
handleVisible
}
isEdit=
{
false
}
isEdit=
{
false
}
/>
/>
</>
</>
)
}
)
}
</>
</>
)
)
}
}
}
}
/>
/>
</>
</>
);
);
};
};
export
default
ExchangePrReceivedVerify
;
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