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
d7341338
Commit
d7341338
authored
Jul 16, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 删除重复的东西
parent
2d627562
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
21 additions
and
1720 deletions
+21
-1720
index.tsx
...ction/purchaserEvaluation/components/RecordList/index.tsx
+1
-1
index.tsx
...ion/purchaserEvaluation/received/detail/effects/index.tsx
+0
-6
useBusinessEffects.tsx
...Evaluation/received/detail/effects/useBusinessEffects.tsx
+0
-41
index.tsx
...transaction/purchaserEvaluation/received/detail/index.tsx
+3
-4
index.ts
...ction/purchaserEvaluation/received/detail/schema/index.ts
+0
-107
index.tsx
...erEvaluation/sent/components/DetailInfo/effects/index.tsx
+0
-6
useBusinessEffects.tsx
...sent/components/DetailInfo/effects/useBusinessEffects.tsx
+0
-41
index.tsx
.../purchaserEvaluation/sent/components/DetailInfo/index.tsx
+2
-4
index.ts
...aserEvaluation/sent/components/DetailInfo/schema/index.ts
+0
-107
index.tsx
...urchaserEvaluation/unevaluated/evaluate/effects/index.tsx
+0
-6
useBusinessEffects.tsx
...ation/unevaluated/evaluate/effects/useBusinessEffects.tsx
+0
-41
index.tsx
...action/purchaserEvaluation/unevaluated/evaluate/index.tsx
+2
-2
index.ts
.../purchaserEvaluation/unevaluated/evaluate/schema/index.ts
+0
-108
index.tsx
src/pages/transaction/supplierEvaluation/analysis/index.tsx
+2
-2
index.less
...n/supplierEvaluation/components/EvaluationList/index.less
+0
-0
index.tsx
...on/supplierEvaluation/components/EvaluationList/index.tsx
+0
-169
index.less
...ction/supplierEvaluation/components/RecordList/index.less
+0
-84
index.tsx
...action/supplierEvaluation/components/RecordList/index.tsx
+0
-383
index.ts
.../supplierEvaluation/components/RecordList/schema/index.ts
+0
-78
index.less
...nsaction/supplierEvaluation/components/Shelves/index.less
+0
-29
index.tsx
...ansaction/supplierEvaluation/components/Shelves/index.tsx
+0
-24
index.tsx
...tion/supplierEvaluation/received/detail/effects/index.tsx
+0
-6
useBusinessEffects.tsx
...Evaluation/received/detail/effects/useBusinessEffects.tsx
+0
-41
index.tsx
.../transaction/supplierEvaluation/received/detail/index.tsx
+5
-7
index.ts
...action/supplierEvaluation/received/detail/schema/index.ts
+0
-107
index.tsx
...erEvaluation/sent/components/DetailInfo/effects/index.tsx
+0
-6
useBusinessEffects.tsx
...sent/components/DetailInfo/effects/useBusinessEffects.tsx
+0
-41
index.tsx
...n/supplierEvaluation/sent/components/DetailInfo/index.tsx
+3
-5
index.ts
...lierEvaluation/sent/components/DetailInfo/schema/index.ts
+0
-107
index.tsx
...supplierEvaluation/unevaluated/evaluate/effects/index.tsx
+0
-6
useBusinessEffects.tsx
...ation/unevaluated/evaluate/effects/useBusinessEffects.tsx
+0
-41
index.tsx
...saction/supplierEvaluation/unevaluated/evaluate/index.tsx
+3
-3
index.ts
...n/supplierEvaluation/unevaluated/evaluate/schema/index.ts
+0
-107
No files found.
src/pages/transaction/purchaserEvaluation/components/RecordList/index.tsx
View file @
d7341338
...
...
@@ -80,7 +80,7 @@ export interface RecordItem {
/**
* 订单id
*/
orderId
:
string
orderId
:
number
};
export
interface
RecordRes
{
...
...
src/pages/transaction/purchaserEvaluation/received/detail/effects/index.tsx
deleted
100644 → 0
View file @
2d627562
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
export
const
createEffects
=
(
context
,
actions
)
=>
{
useBusinessEffects
(
context
,
actions
);
};
\ No newline at end of file
src/pages/transaction/purchaserEvaluation/received/detail/effects/useBusinessEffects.tsx
deleted
100644 → 0
View file @
2d627562
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
setFieldState
,
}
=
actions
;
// 评论图片限制 4 张
onFieldInputChange$
(
'comments.*.picture'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$
(
'comments.*.star'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.smile`
}),
state
=>
{
state
.
value
=
value
;
}
);
});
}
\ No newline at end of file
src/pages/transaction/purchaserEvaluation/received/detail/index.tsx
View file @
d7341338
...
...
@@ -14,8 +14,8 @@ import { PublicApi } from '@/services/api';
import
{
normalizeFiledata
,
FileData
}
from
'@/utils'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
evaluateSchema
}
from
'.
/s
chema'
;
import
{
createEffects
}
from
'./effects'
;
import
{
evaluateSchema
}
from
'.
./../common/schemas/evaluateS
chema'
;
import
{
createEffects
}
from
'.
./../common
/effects'
;
import
EvaluationList
from
'../../components/EvaluationList'
;
const
formActions
=
createFormActions
();
...
...
@@ -41,11 +41,10 @@ interface OrderInfo {
};
const
ReceivedDetail
:
React
.
FC
=
()
=>
{
const
{
orderId
,
id
}
=
usePageStatus
();
const
{
id
}
=
usePageStatus
();
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
OrderInfo
>
(
null
);
const
[
evaluationInfo
,
setEvaluationInfo
]
=
useState
<
Unevaluated
>
(
null
);
const
[
evaluationInfoLoading
,
setEvaluationInfoLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
getEvaluationInfo
=
()
=>
{
if
(
!
id
)
{
...
...
src/pages/transaction/purchaserEvaluation/received/detail/schema/index.ts
deleted
100644 → 0
View file @
2d627562
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-07 15:13:26
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
evaluateSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
comments
:
{
type
:
'array'
,
'x-component'
:
'EvaluationList'
,
default
:
[],
items
:
{
type
:
'object'
,
properties
:
{
LEFT_RIGHT
:
{
type
:
'object'
,
'x-component'
:
'LeftRightLayout'
,
'x-component-props'
:
{
rightProps
:
{
span
:
2
,
offset
:
4
,
},
},
properties
:
{
MEGA_LADYOUT
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
labelCol
:
6
,
labelAlign
:
'left'
,
position
:
'left'
,
},
properties
:
{
star
:
{
title
:
'满意程度'
,
required
:
true
,
'x-component'
:
'Rating'
,
'x-component-props'
:
{
allowHalf
:
false
,
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择满意程度'
,
},
],
},
comment
:
{
type
:
'string'
,
title
:
'评价'
,
required
:
true
,
'x-component'
:
'TextArea'
,
'x-component-props'
:
{
rows
:
4
,
},
'x-rules'
:
{
max
:
200
,
},
},
picture
:
{
type
:
'string'
,
title
:
'图片'
,
'x-component'
:
'FixUpload'
,
'x-component-props'
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload/prefix'
,
data
:
{
fileType
:
UPLOAD_TYPE
,
prefix
:
''
,
},
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
max
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
},
},
},
smile
:
{
type
:
'object'
,
default
:
1
,
'x-component'
:
'SmilingFace'
,
'x-component-props'
:
{
position
:
'right'
,
},
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/transaction/purchaserEvaluation/sent/components/DetailInfo/effects/index.tsx
deleted
100644 → 0
View file @
2d627562
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
export
const
createEffects
=
(
context
,
actions
)
=>
{
useBusinessEffects
(
context
,
actions
);
};
\ No newline at end of file
src/pages/transaction/purchaserEvaluation/sent/components/DetailInfo/effects/useBusinessEffects.tsx
deleted
100644 → 0
View file @
2d627562
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
setFieldState
,
}
=
actions
;
// 评论图片限制 4 张
onFieldInputChange$
(
'comments.*.picture'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$
(
'comments.*.star'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.smile`
}),
state
=>
{
state
.
value
=
value
;
}
);
});
}
\ No newline at end of file
src/pages/transaction/purchaserEvaluation/sent/components/DetailInfo/index.tsx
View file @
d7341338
...
...
@@ -15,8 +15,8 @@ import { PublicApi } from '@/services/api';
import
{
normalizeFiledata
,
FileData
}
from
'@/utils'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
evaluateSchema
}
from
'.
/s
chema'
;
import
{
createEffects
}
from
'./effects'
;
import
{
evaluateSchema
}
from
'.
./../../common/schemas/evaluateS
chema'
;
import
{
createEffects
}
from
'.
./../../common
/effects'
;
import
EvaluationList
from
'../../../components/EvaluationList'
;
const
formActions
=
createFormActions
();
...
...
@@ -53,7 +53,6 @@ interface DetailInfoProps {
};
const
DetailInfo
:
React
.
FC
<
DetailInfoProps
>
=
({
orderId
,
id
,
isEdit
=
false
,
})
=>
{
...
...
@@ -104,7 +103,6 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const
payload
=
values
.
comments
.
map
(
item
=>
{
const
{
comment
,
good
,
picture
,
star
,
}
=
item
;
...
...
src/pages/transaction/purchaserEvaluation/sent/components/DetailInfo/schema/index.ts
deleted
100644 → 0
View file @
2d627562
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-07 15:04:44
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
evaluateSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
comments
:
{
type
:
'array'
,
'x-component'
:
'EvaluationList'
,
default
:
[],
items
:
{
type
:
'object'
,
properties
:
{
LEFT_RIGHT
:
{
type
:
'object'
,
'x-component'
:
'LeftRightLayout'
,
'x-component-props'
:
{
rightProps
:
{
span
:
2
,
offset
:
4
,
},
},
properties
:
{
MEGA_LADYOUT
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
labelCol
:
6
,
labelAlign
:
'left'
,
position
:
'left'
,
},
properties
:
{
star
:
{
title
:
'满意程度'
,
required
:
true
,
'x-component'
:
'Rating'
,
'x-component-props'
:
{
allowHalf
:
false
,
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择满意程度'
,
},
],
},
comment
:
{
type
:
'string'
,
title
:
'评价'
,
required
:
true
,
'x-component'
:
'TextArea'
,
'x-component-props'
:
{
rows
:
4
,
},
'x-rules'
:
{
max
:
200
,
},
},
picture
:
{
type
:
'string'
,
title
:
'图片'
,
'x-component'
:
'FixUpload'
,
'x-component-props'
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload/prefix'
,
data
:
{
fileType
:
UPLOAD_TYPE
,
prefix
:
''
,
},
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
max
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
},
},
},
smile
:
{
type
:
'object'
,
default
:
1
,
'x-component'
:
'SmilingFace'
,
'x-component-props'
:
{
position
:
'right'
,
},
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/transaction/purchaserEvaluation/unevaluated/evaluate/effects/index.tsx
deleted
100644 → 0
View file @
2d627562
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
export
const
createEffects
=
(
context
,
actions
)
=>
{
useBusinessEffects
(
context
,
actions
);
};
\ No newline at end of file
src/pages/transaction/purchaserEvaluation/unevaluated/evaluate/effects/useBusinessEffects.tsx
deleted
100644 → 0
View file @
2d627562
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
setFieldState
,
}
=
actions
;
// 评论图片限制 4 张
onFieldInputChange$
(
'comments.*.picture'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$
(
'comments.*.star'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.smile`
}),
state
=>
{
state
.
value
=
value
;
}
);
});
}
\ No newline at end of file
src/pages/transaction/purchaserEvaluation/unevaluated/evaluate/index.tsx
View file @
d7341338
...
...
@@ -18,8 +18,8 @@ import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
normalizeUnevaluatedList
}
from
'../../utils'
;
import
{
evaluateSchema
}
from
'.
/s
chema'
;
import
{
createEffects
}
from
'./effects'
;
import
{
evaluateSchema
}
from
'.
./../common/schemas/evaluateS
chema'
;
import
{
createEffects
}
from
'.
./../common
/effects'
;
import
EvaluationList
from
'../../components/EvaluationList'
;
const
formActions
=
createFormActions
();
...
...
src/pages/transaction/purchaserEvaluation/unevaluated/evaluate/schema/index.ts
deleted
100644 → 0
View file @
2d627562
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-13 10:15:05
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
evaluateSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
comments
:
{
type
:
'array'
,
'x-component'
:
'EvaluationList'
,
default
:
[],
items
:
{
type
:
'object'
,
properties
:
{
LEFT_RIGHT
:
{
type
:
'object'
,
'x-component'
:
'LeftRightLayout'
,
'x-component-props'
:
{
rightProps
:
{
span
:
2
,
offset
:
4
,
},
},
properties
:
{
MEGA_LADYOUT
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
labelCol
:
6
,
labelAlign
:
'left'
,
position
:
'left'
,
},
properties
:
{
star
:
{
title
:
'满意程度'
,
required
:
true
,
'x-component'
:
'Rating'
,
'x-component-props'
:
{
allowHalf
:
false
,
allowClear
:
false
,
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择满意程度'
,
},
],
},
comment
:
{
type
:
'string'
,
title
:
'评价'
,
required
:
true
,
'x-component'
:
'TextArea'
,
'x-component-props'
:
{
rows
:
4
,
},
'x-rules'
:
{
max
:
200
,
},
},
picture
:
{
type
:
'string'
,
title
:
'图片'
,
'x-component'
:
'FixUpload'
,
'x-component-props'
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload/prefix'
,
data
:
{
fileType
:
UPLOAD_TYPE
,
prefix
:
''
,
},
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
max
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
},
},
},
smile
:
{
type
:
'object'
,
default
:
5
,
'x-component'
:
'SmilingFace'
,
'x-component-props'
:
{
position
:
'right'
,
},
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/transaction/supplierEvaluation/analysis/index.tsx
View file @
d7341338
...
...
@@ -11,8 +11,8 @@ import PolymericTable from '@/components/PolymericTable';
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
{
Pie
}
from
'@/components/Charts'
;
import
Mood
from
'@/components/Mood'
;
import
Shelves
from
'../components/Shelves'
;
import
RecordList
,
{
ListParams
,
RecordRes
}
from
'../components/RecordList'
;
import
Shelves
from
'../
../purchaserEvaluation/
components/Shelves'
;
import
RecordList
,
{
ListParams
,
RecordRes
}
from
'../
../purchaserEvaluation/
components/RecordList'
;
import
styles
from
'./index.less'
;
const
{
TabPane
}
=
Tabs
;
...
...
src/pages/transaction/supplierEvaluation/components/EvaluationList/index.less
deleted
100644 → 0
View file @
2d627562
src/pages/transaction/supplierEvaluation/components/EvaluationList/index.tsx
deleted
100644 → 0
View file @
2d627562
import
React
from
'react'
;
import
{
Row
,
Col
,
Button
,
}
from
'antd'
;
import
styled
from
'styled-components'
;
import
{
SchemaForm
,
SchemaField
,
SchemaMarkupField
as
Field
}
from
'@formily/antd'
;
import
{
ArrayList
}
from
'@formily/react-shared-components'
;
import
{
toArr
,
isFn
,
FormPath
}
from
'@formily/shared'
;
import
SmilingFace
from
'@/components/NiceForm/components/SmilingFace'
;
const
ArrayComponents
=
{
CircleButton
:
props
=>
<
Button
{
...
props
}
/>,
TextButton
:
props
=>
<
Button
text
{
...
props
}
/>,
AdditionIcon
:
()
=>
<
div
>
+Add
</
div
>,
RemoveIcon
:
()
=>
<
div
>
Remove
</
div
>,
MoveDownIcon
:
()
=>
<
div
>
Down
</
div
>,
MoveUpIcon
:
()
=>
<
div
>
Up
</
div
>
};
const
RowStyleLayout
=
styled
(
props
=>
<
div
{
...
props
}
/>)
`
padding: 24px 64px 24px 24px;
background: #ffffff;
.ant-btn {
margin-right: 16px;
}
.ant-form-item {
display: flex;
margin-right: 16px;
margin-bottom: 16px;
}
> .ant-form-item {
margin-bottom: 0;
margin-right: 0;
}
.goodInfo {
display: flex;
align-items: align;
&-left {
flex-shrink: 0;
margin-right: 16px;
width: 100px;
height: 100px;
> img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
&-right {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
&-title {
line-height: 14px;
margin-bottom: 18px;
font-size: 12px;
font-weight: 400;
color: #303133;
}
&-desc {
line-height: 12px;
margin-bottom: 16px;
font-size: 12px;
font-weight: 400;
color: #909399;
}
&-price {
line-height: 14px;
font-size: 12px;
font-weight: 500;
color: #303133;
}
}
.main {
position: relative;
padding-left: 24px;
> .ant-form-item {
margin-bottom: 0;
margin-right: 0;
}
::after {
content: ' ';
display: block;
position: absolute;
top: 6%;
left: 0;
bottom: 6%;
border-left: 1px dashed #EEF0F3;
}
}
`
;
const
EvaluationList
=
props
=>
{
const
{
value
,
schema
,
className
,
editable
,
path
,
mutators
}
=
props
;
const
{
renderAddition
,
renderRemove
,
renderMoveDown
,
renderMoveUp
,
renderEmpty
,
renderExtraOperations
,
...
componentProps
}
=
schema
.
getExtendsComponentProps
()
||
{};
return
(
<
ArrayList
value=
{
value
}
minItems=
{
schema
.
minItems
}
maxItems=
{
schema
.
maxItems
}
editable=
{
editable
}
components=
{
ArrayComponents
}
>
{
toArr
(
value
).
map
((
item
,
index
)
=>
{
return
(
<
RowStyleLayout
{
...
componentProps
}
key=
{
index
}
>
<
Row
align=
"middle"
>
<
Col
span=
{
8
}
>
<
div
className=
"goodInfo"
>
<
div
className=
"goodInfo-left"
>
<
img
src=
{
item
.
good
?
item
.
good
.
pic
:
''
}
/>
</
div
>
<
div
className=
"goodInfo-right"
>
<
div
className=
"goodInfo-title"
>
{
item
.
good
.
productName
}
</
div
>
<
div
className=
"goodInfo-desc"
>
X
{
item
.
good
.
purchaseCount
||
''
}
{
item
.
good
.
unit
||
''
}
</
div
>
<
div
className=
"goodInfo-price"
>
{
`¥ ${item.good.price}`
}
</
div
>
</
div
>
</
div
>
</
Col
>
<
Col
span=
{
16
}
>
<
div
className=
"main"
>
<
SchemaField
path=
{
FormPath
.
parse
(
path
).
concat
(
index
)
}
/>
</
div
>
</
Col
>
</
Row
>
</
RowStyleLayout
>
)
})
}
</
ArrayList
>
)
}
EvaluationList
.
isFieldComponent
=
true
;
export
default
EvaluationList
;
\ No newline at end of file
src/pages/transaction/supplierEvaluation/components/RecordList/index.less
deleted
100644 → 0
View file @
2d627562
@import '../../../../../global/styles/utils.less';
.record {
padding: 0;
margin: 0;
&-item {
padding: 14px 16px;
line-height: 14px;
display: flex;
align-items: center;
background: #FAFBFC;
color: #303133;
&-good {
width: 25%;
&-name {
line-height: 14px;
margin-bottom: 13px;
font-size: 12px;
font-weight: 400;
}
&-price {
margin-right: 16px;
font-weight: 500;
}
&-desc {
line-height: 12px;
font-weight: 400;
color: #909399;
}
}
&-extra {
width: 20%;
&-item {
display: flex;
align-items: center;
&-label {
flex: 0 0 60px;
line-height: 12px;
font-size: 12px;
font-weight: 400;
color: #909399;
}
&-control {
flex: 1;
}
&:not(:last-child) {
margin-bottom: 13px;
}
}
}
&-comment {
width: 40%;
&-main {
margin-top: 6px;
line-height: 14px;
font-weight: 400;
color: #303133;
.textOverflow();
}
}
&-actions {
flex: 1;
text-align: center;
}
&:not(:last-child) {
margin-bottom: 16px;
}
}
}
\ No newline at end of file
src/pages/transaction/supplierEvaluation/components/RecordList/index.tsx
deleted
100644 → 0
View file @
2d627562
This diff is collapsed.
Click to expand it.
src/pages/transaction/supplierEvaluation/components/RecordList/schema/index.ts
deleted
100644 → 0
View file @
2d627562
/*
* @Author: XieZhiXiong
* @Date: 2020-10-19 18:08:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-21 13:58:50
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
export
const
searchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
inline
:
true
,
},
properties
:
{
star
:
{
type
:
'string'
,
enum
:
[
{
label
:
'一星'
,
value
:
1
,
},
{
label
:
'二星'
,
value
:
2
,
},
{
label
:
'三星'
,
value
:
3
,
},
{
label
:
'四星'
,
value
:
4
,
},
{
label
:
'五星'
,
value
:
5
,
},
],
'x-component-props'
:
{
placeholder
:
'评论星级'
,
allowClear
:
true
,
style
:
{
width
:
206
,
},
},
},
'[dealTimeStart, dealTimeEnd]'
:
{
type
:
'string'
,
default
:
''
,
'x-component'
:
'dateSelect'
,
'x-component-props'
:
{
placeholder
:
'交易时间'
,
allowClear
:
true
,
style
:
{
width
:
206
,
},
},
},
memberName
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-left'
,
advanced
:
false
,
tip
:
''
,
},
},
},
},
},
};
\ No newline at end of file
src/pages/transaction/supplierEvaluation/components/Shelves/index.less
deleted
100644 → 0
View file @
2d627562
@import '../../../../../global/styles/index.less';
.shelves {
&-title {
line-height: 14px;
padding: 12px;
position: relative;
font-size: 12px;
font-weight: 400;
color: #606266;
border-bottom: 1px solid #EEF0F3;
&::after {
content: ' ';
display: block;
width: 2px;
position: absolute;
top: 30%;
left: 0;
bottom: 30%;
background: @primary-color;
}
}
&-content {
padding: 30px 0;
}
}
\ No newline at end of file
src/pages/transaction/supplierEvaluation/components/Shelves/index.tsx
deleted
100644 → 0
View file @
2d627562
import
React
from
'react'
;
import
styles
from
'./index.less'
;
interface
ShelvesProps
{
title
?:
string
;
children
?:
React
.
ReactNode
;
};
const
Shelves
:
React
.
FC
<
ShelvesProps
>
=
({
title
=
'标题'
,
children
,
})
=>
{
return
(
<
div
className=
{
styles
.
shelves
}
>
<
div
className=
{
styles
[
'shelves-title'
]
}
>
{
title
}
</
div
>
<
div
className=
{
styles
[
'shelves-content'
]
}
>
{
children
}
</
div
>
</
div
>
);
};
export
default
Shelves
;
\ No newline at end of file
src/pages/transaction/supplierEvaluation/received/detail/effects/index.tsx
deleted
100644 → 0
View file @
2d627562
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
export
const
createEffects
=
(
context
,
actions
)
=>
{
useBusinessEffects
(
context
,
actions
);
};
\ No newline at end of file
src/pages/transaction/supplierEvaluation/received/detail/effects/useBusinessEffects.tsx
deleted
100644 → 0
View file @
2d627562
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
setFieldState
,
}
=
actions
;
// 评论图片限制 4 张
onFieldInputChange$
(
'comments.*.picture'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$
(
'comments.*.star'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.smile`
}),
state
=>
{
state
.
value
=
value
;
}
);
});
}
\ No newline at end of file
src/pages/transaction/supplierEvaluation/received/detail/index.tsx
View file @
d7341338
...
...
@@ -11,12 +11,12 @@ import { history } from 'umi';
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
normalizeFiledata
,
FileData
,
isJSONStr
}
from
'@/utils'
;
import
{
normalizeFiledata
,
FileData
}
from
'@/utils'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
evaluateSchema
}
from
'.
/s
chema'
;
import
{
createEffects
}
from
'./effects'
;
import
EvaluationList
from
'../../components/EvaluationList'
;
import
{
evaluateSchema
}
from
'.
./../../purchaserEvaluation/common/schemas/evaluateS
chema'
;
import
{
createEffects
}
from
'.
./../../purchaserEvaluation/common
/effects'
;
import
EvaluationList
from
'../../
../purchaserEvaluation/
components/EvaluationList'
;
const
formActions
=
createFormActions
();
...
...
@@ -41,11 +41,10 @@ interface OrderInfo {
};
const
ReceivedDetail
:
React
.
FC
=
()
=>
{
const
{
orderId
,
id
,
pageStatus
}
=
usePageStatus
();
const
{
id
}
=
usePageStatus
();
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
OrderInfo
>
(
null
);
const
[
evaluationInfo
,
setEvaluationInfo
]
=
useState
<
Unevaluated
>
(
null
);
const
[
evaluationInfoLoading
,
setEvaluationInfoLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
getEvaluationInfo
=
()
=>
{
if
(
!
id
)
{
...
...
@@ -57,7 +56,6 @@ const ReceivedDetail: React.FC = () => {
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
product
}
=
res
.
data
;
const
productObj
=
isJSONStr
(
product
)
||
{};
setEvaluationInfo
({
good
:
{
...
...
src/pages/transaction/supplierEvaluation/received/detail/schema/index.ts
deleted
100644 → 0
View file @
2d627562
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-21 13:46:22
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
evaluateSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
comments
:
{
type
:
'array'
,
'x-component'
:
'EvaluationList'
,
default
:
[],
items
:
{
type
:
'object'
,
properties
:
{
LEFT_RIGHT
:
{
type
:
'object'
,
'x-component'
:
'LeftRightLayout'
,
'x-component-props'
:
{
rightProps
:
{
span
:
2
,
offset
:
4
,
},
},
properties
:
{
MEGA_LADYOUT
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
labelCol
:
6
,
labelAlign
:
'left'
,
position
:
'left'
,
},
properties
:
{
star
:
{
title
:
'满意程度'
,
required
:
true
,
'x-component'
:
'Rating'
,
'x-component-props'
:
{
allowHalf
:
false
,
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择满意程度'
,
},
],
},
comment
:
{
type
:
'string'
,
title
:
'评价'
,
required
:
true
,
'x-component'
:
'TextArea'
,
'x-component-props'
:
{
rows
:
4
,
},
'x-rules'
:
{
max
:
200
,
},
},
picture
:
{
type
:
'string'
,
title
:
'图片'
,
'x-component'
:
'FixUpload'
,
'x-component-props'
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload/prefix'
,
data
:
{
fileType
:
UPLOAD_TYPE
,
prefix
:
''
,
},
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
max
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
},
},
},
smile
:
{
type
:
'object'
,
default
:
1
,
'x-component'
:
'SmilingFace'
,
'x-component-props'
:
{
position
:
'right'
,
},
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/transaction/supplierEvaluation/sent/components/DetailInfo/effects/index.tsx
deleted
100644 → 0
View file @
2d627562
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
export
const
createEffects
=
(
context
,
actions
)
=>
{
useBusinessEffects
(
context
,
actions
);
};
\ No newline at end of file
src/pages/transaction/supplierEvaluation/sent/components/DetailInfo/effects/useBusinessEffects.tsx
deleted
100644 → 0
View file @
2d627562
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
setFieldState
,
}
=
actions
;
// 评论图片限制 4 张
onFieldInputChange$
(
'comments.*.picture'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$
(
'comments.*.star'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.smile`
}),
state
=>
{
state
.
value
=
value
;
}
);
});
}
\ No newline at end of file
src/pages/transaction/supplierEvaluation/sent/components/DetailInfo/index.tsx
View file @
d7341338
...
...
@@ -15,9 +15,9 @@ import { PublicApi } from '@/services/api';
import
{
normalizeFiledata
,
FileData
}
from
'@/utils'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
evaluateSchema
}
from
'.
/s
chema'
;
import
{
createEffects
}
from
'./effects'
;
import
EvaluationList
from
'../../../components/EvaluationList'
;
import
{
evaluateSchema
}
from
'.
./../../../purchaserEvaluation/common/schemas/evaluateS
chema'
;
import
{
createEffects
}
from
'.
./../../../purchaserEvaluation/common
/effects'
;
import
EvaluationList
from
'../../../
../purchaserEvaluation/
components/EvaluationList'
;
const
formActions
=
createFormActions
();
const
{
...
...
@@ -53,7 +53,6 @@ interface DetailInfoProps {
};
const
DetailInfo
:
React
.
FC
<
DetailInfoProps
>
=
({
orderId
,
id
,
isEdit
=
false
,
})
=>
{
...
...
@@ -104,7 +103,6 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const
payload
=
values
.
comments
.
map
(
item
=>
{
const
{
comment
,
good
,
picture
,
star
,
}
=
item
;
...
...
src/pages/transaction/supplierEvaluation/sent/components/DetailInfo/schema/index.ts
deleted
100644 → 0
View file @
2d627562
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-19 16:23:24
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
evaluateSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
comments
:
{
type
:
'array'
,
'x-component'
:
'EvaluationList'
,
default
:
[],
items
:
{
type
:
'object'
,
properties
:
{
LEFT_RIGHT
:
{
type
:
'object'
,
'x-component'
:
'LeftRightLayout'
,
'x-component-props'
:
{
rightProps
:
{
span
:
2
,
offset
:
4
,
},
},
properties
:
{
MEGA_LADYOUT
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
labelCol
:
6
,
labelAlign
:
'left'
,
position
:
'left'
,
},
properties
:
{
star
:
{
title
:
'满意程度'
,
required
:
true
,
'x-component'
:
'Rating'
,
'x-component-props'
:
{
allowHalf
:
false
,
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择满意程度'
,
},
],
},
comment
:
{
type
:
'string'
,
title
:
'评价'
,
required
:
true
,
'x-component'
:
'TextArea'
,
'x-component-props'
:
{
rows
:
4
,
},
'x-rules'
:
{
max
:
200
,
},
},
picture
:
{
type
:
'string'
,
title
:
'图片'
,
'x-component'
:
'FixUpload'
,
'x-component-props'
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload/prefix'
,
data
:
{
fileType
:
UPLOAD_TYPE
,
prefix
:
''
,
},
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
max
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
},
},
},
smile
:
{
type
:
'object'
,
default
:
1
,
'x-component'
:
'SmilingFace'
,
'x-component-props'
:
{
position
:
'right'
,
},
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/effects/index.tsx
deleted
100644 → 0
View file @
2d627562
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
export
const
createEffects
=
(
context
,
actions
)
=>
{
useBusinessEffects
(
context
,
actions
);
};
\ No newline at end of file
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/effects/useBusinessEffects.tsx
deleted
100644 → 0
View file @
2d627562
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
setFieldState
,
}
=
actions
;
// 评论图片限制 4 张
onFieldInputChange$
(
'comments.*.picture'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
// 评分联动
onFieldInputChange$
(
'comments.*.star'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`comments.
${
$1
}
.smile`
}),
state
=>
{
state
.
value
=
value
;
}
);
});
}
\ No newline at end of file
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/index.tsx
View file @
d7341338
...
...
@@ -18,9 +18,9 @@ import { GetOrderPurchaseOrderDetailsResponse } from '@/services/OrderApi';
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
normalizeUnevaluatedList
}
from
'../../utils'
;
import
{
evaluateSchema
}
from
'.
/s
chema'
;
import
{
createEffects
}
from
'./effects'
;
import
EvaluationList
from
'../../components/EvaluationList'
;
import
{
evaluateSchema
}
from
'.
./../../purchaserEvaluation/common/schemas/evaluateS
chema'
;
import
{
createEffects
}
from
'.
./../../purchaserEvaluation/common
/effects'
;
import
EvaluationList
from
'../../
../purchaserEvaluation/
components/EvaluationList'
;
const
formActions
=
createFormActions
();
const
{
...
...
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/schema/index.ts
deleted
100644 → 0
View file @
2d627562
/*
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-03 18:49:30
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
evaluateSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
comments
:
{
type
:
'array'
,
'x-component'
:
'EvaluationList'
,
default
:
[],
items
:
{
type
:
'object'
,
properties
:
{
LEFT_RIGHT
:
{
type
:
'object'
,
'x-component'
:
'LeftRightLayout'
,
'x-component-props'
:
{
rightProps
:
{
span
:
2
,
offset
:
4
,
},
},
properties
:
{
MEGA_LADYOUT
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
labelCol
:
6
,
labelAlign
:
'left'
,
position
:
'left'
,
},
properties
:
{
star
:
{
title
:
'满意程度'
,
required
:
true
,
'x-component'
:
'Rating'
,
'x-component-props'
:
{
allowHalf
:
false
,
allowClear
:
false
,
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择满意程度'
,
},
],
},
comment
:
{
type
:
'string'
,
title
:
'评价'
,
required
:
true
,
'x-component'
:
'TextArea'
,
'x-component-props'
:
{
rows
:
4
,
},
'x-rules'
:
{
max
:
200
,
},
},
picture
:
{
type
:
'array'
,
title
:
'图片'
,
'x-component'
:
'FixUpload'
,
'x-component-props'
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload/prefix'
,
data
:
{
fileType
:
UPLOAD_TYPE
,
prefix
:
''
,
},
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
max
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
},
},
},
smile
:
{
type
:
'object'
,
default
:
5
,
'x-component'
:
'SmilingFace'
,
'x-component-props'
:
{
position
:
'right'
,
},
},
},
},
},
},
},
},
};
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