Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
74f69c4f
Commit
74f69c4f
authored
Nov 23, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改实物商品和电子卡券编辑状态
parent
1c2006cd
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
54 deletions
+31
-54
env.config.js
config/env.config.js
+1
-1
FormInformationBasic.jsx
src/pages/ServiceGoods/components/FormInformationBasic.jsx
+3
-7
FormPriceOrStock.jsx
src/pages/ServiceGoods/components/FormPriceOrStock.jsx
+6
-1
FormRuleSetting.jsx
src/pages/ServiceGoods/components/FormRuleSetting.jsx
+1
-6
FormRuleVPictures.jsx
src/pages/ServiceGoods/components/FormRuleVPictures.jsx
+4
-0
UploadImage.jsx
src/pages/ServiceGoods/components/UploadImage.jsx
+6
-4
config.js
src/pages/ServiceGoods/config.js
+10
-35
No files found.
config/env.config.js
View file @
74f69c4f
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
environment
=
'
sc
'
;
const
environment
=
'
xyqb
'
;
const
envAPi
=
{
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
//'https://security-xyqb.liangkebang.net',
kdspOpApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
...
...
src/pages/ServiceGoods/components/FormInformationBasic.jsx
View file @
74f69c4f
...
...
@@ -90,6 +90,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
>
<
Cascader
placeholder=
"请选择商品类目!"
disabled=
{
customer
.
isEdit
}
showSearch=
{
{
filter
:
filterCategoryOptions
}
}
fieldNames=
{
{
label
:
'
name
'
,
value
:
'
id
'
,
children
:
'
children
'
}
}
onChange=
{
props
.
onCategoryChange
}
...
...
@@ -104,8 +105,8 @@ const FormInformationBasic = forwardRef((props, ref) => {
extra=
"若需新增品牌请联系业务员"
>
<
Select
disabled=
{
customer
.
isService
}
showSearch
disabled=
{
customer
.
isEdit
&&
!
customer
.
isCard
}
placeholder=
"请选择商品品牌"
filterOption=
{
fileterBrandOptions
}
>
...
...
@@ -124,14 +125,9 @@ const FormInformationBasic = forwardRef((props, ref) => {
{
required
:
true
,
min
:
2
,
message
:
'
请输入最少两个字符的商品名称!
'
,
whitespace
:
true
},
]
}
>
<
Input
placeholder=
"请输入商品名称"
/>
<
Input
placeholder=
"请输入商品名称"
disabled=
{
customer
.
isEdit
&&
!
customer
.
isCard
}
/>
</
Form
.
Item
>
</
Popover
>
{
customer
.
isJDGoods
&&
(
<
Button
key=
"jdMsg"
danger
type=
"text"
>
*本列表的商品名称仅供搜索使用,不在前端作展示。若要修改APP端展示的商品名称,请在商品信息中修改。
</
Button
>
)
}
{
!
customer
.
isCard
&&
(
<
Form
.
Item
name=
"character"
...
...
src/pages/ServiceGoods/components/FormPriceOrStock.jsx
View file @
74f69c4f
...
...
@@ -201,7 +201,12 @@ const CreateBatchFormItems = ({ specInitValue, batchChange, editRef, defaultColu
fieldNames=
{
{
label
:
'
secondSpecValue
'
,
value
:
'
secondSpecValue
'
}
}
/>
{
formItems
.
concat
(
<
Button
key=
"batch"
type=
"primary"
onClick=
{
batchChange
}
>
<
Button
key=
"batch"
type=
"primary"
disabled=
{
customer
.
isEdit
&&
!
customer
.
isCard
}
onClick=
{
batchChange
}
>
批量设置
</
Button
>,
)
}
...
...
src/pages/ServiceGoods/components/FormRuleSetting.jsx
View file @
74f69c4f
...
...
@@ -92,19 +92,14 @@ const FormRuleSetting = forwardRef((props, ref) => {
>
<
Form
.
Item
name=
"purchaseTime"
label=
"购买时间"
{
...
rangeConfig
}
>
<
RangePicker
showTime=
{
{
defaultValue
:
[
moment
(
'
00:00:00
'
,
'
HH:mm:ss
'
),
moment
(
'
23:59:59
'
,
'
HH:mm:ss
'
)],
}
}
format=
"YYYY-MM-DD HH:mm:ss"
defaultPickerValue=
{
[
nowDateTime
,
nowDateTimeEnd
]
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"useTime"
label=
"有效期"
{
...
rangeConfig
}
>
<
RangePicker
showTime=
{
{
defaultValue
:
[
moment
(
'
00:00:00
'
,
'
HH:mm:ss
'
),
moment
(
'
23:59:59
'
,
'
HH:mm:ss
'
)],
}
}
format=
"YYYY-MM-DD HH:mm:ss"
defaultPickerValue=
{
[
nowDateTime
,
nowDateTimeEnd
]
}
/>
</
Form
.
Item
>
<
Form
.
Item
...
...
src/pages/ServiceGoods/components/FormRuleVPictures.jsx
View file @
74f69c4f
...
...
@@ -160,6 +160,7 @@ const FormRuleVPictures = forwardRef((props, ref) => {
<
UploadImage
multiple=
{
false
}
name=
"commonImageList"
disabled=
{
customer
.
isEdit
&&
!
customer
.
isCard
}
limit=
{
imgConfig
.
commonImageList
.
limit
}
pictures=
{
commonImageList
}
setPictureList=
{
list
=>
onCommonSuccessEvent
(
list
)
}
...
...
@@ -181,6 +182,7 @@ const FormRuleVPictures = forwardRef((props, ref) => {
<
UploadImage
name=
"cardImageList"
limit=
{
imgConfig
.
cardImageList
.
limit
}
disabled=
{
customer
.
isEdit
&&
!
customer
.
isCard
}
pictures=
{
cardImageList
}
setPictureList=
{
list
=>
onCardSuccessImageList
(
list
)
}
/>
...
...
@@ -201,6 +203,7 @@ const FormRuleVPictures = forwardRef((props, ref) => {
<
UploadImage
name=
{
key
}
limit=
{
11
}
disabled=
{
customer
.
isEdit
&&
!
customer
.
isCard
}
pictures=
{
imageList
[
key
]
}
setPictureList=
{
list
=>
onPictureSuccessEvent
(
list
,
key
)
}
/>
...
...
@@ -230,6 +233,7 @@ const FormRuleVPictures = forwardRef((props, ref) => {
<
UploadImage
limit=
{
imgConfig
.
detailImageList
.
limit
}
name=
"detailImageList"
disabled=
{
customer
.
isEdit
&&
!
customer
.
isCard
}
pictures=
{
detailImageList
}
setPictureList=
{
list
=>
onDetailSuccessImageList
(
list
)
}
/>
...
...
src/pages/ServiceGoods/components/UploadImage.jsx
View file @
74f69c4f
...
...
@@ -176,10 +176,12 @@ const UploadImage = forwardRef((props, ref) => {
onClick={() => handlePreview(item)}
/> */
}
<
EyeOutlined
className=
{
styles
.
maskIcon
}
onClick=
{
()
=>
handlePreview
(
item
)
}
/>
<
DeleteOutlined
className=
{
styles
.
maskIcon
}
onClick=
{
()
=>
handleRemove
(
item
)
}
/>
{
!
disabled
&&
(
<
DeleteOutlined
className=
{
styles
.
maskIcon
}
onClick=
{
()
=>
handleRemove
(
item
)
}
/>
)
}
{
/* <Icon
type="delete"
className={styles.maskIcon}
...
...
src/pages/ServiceGoods/config.js
View file @
74f69c4f
...
...
@@ -58,34 +58,6 @@ export const TaskList = (canAddService, canAddNormal) => [
},
},
},
// {
// name: '电子卡卷',
// type: 3,
// desc: '无需物流',
// hide: true,
// imgConfig: {
// commonImageList: {
// title: '封面图片',
// rule: true,
// limit: 11,
// renderExtra(leng) {
// return `建议尺寸: ##宽##高 (${leng} / 1) `;
// },
// },
// imageList: {
// rule: true,
// limit: 1,
// },
// detailImageList: {
// title: '商品图片',
// rule: true,
// limit: null,
// renderExtra() {
// return '请上传商品图!';
// },
// },
// },
// },
{
name
:
'
电子卡卷
'
,
type
:
4
,
...
...
@@ -166,7 +138,7 @@ export const StaticColumns = customer => [
min
:
0
,
},
roleRules
:
{
required
:
true
},
disabeldRender
:
()
=>
customer
.
is
JDGoods
,
disabeldRender
:
()
=>
customer
.
is
Edit
&&
!
customer
.
isCard
,
},
{
title
:
'
佣金费率
'
,
...
...
@@ -189,7 +161,7 @@ export const StaticColumns = customer => [
min
:
0
,
},
roleRules
:
{
required
:
true
},
// disabeldRender: () => customer.isService
,
disabeldRender
:
()
=>
customer
.
isEdit
&&
!
customer
.
isCard
,
},
{
title
:
'
销售价
'
,
...
...
@@ -202,6 +174,7 @@ export const StaticColumns = customer => [
precision
:
2
,
min
:
0
,
},
disabeldRender
:
()
=>
customer
.
isEdit
&&
!
customer
.
isCard
,
},
{
title
:
'
重量(kg)
'
,
...
...
@@ -220,7 +193,7 @@ export const StaticColumns = customer => [
precision
:
3
,
max
:
999999.999
,
},
// disabeldRender: () => customer.isService
,
disabeldRender
:
()
=>
customer
.
isEdit
&&
!
customer
.
isCard
,
},
{
title
:
'
库存
'
,
...
...
@@ -237,7 +210,7 @@ export const StaticColumns = customer => [
min
:
0
,
},
roleRules
:
{
required
:
true
},
disabeldRender
:
v
=>
v
.
id
&&
customer
.
isService
,
disabeldRender
:
()
=>
customer
.
isEdit
,
},
{
title
:
'
库存预警
'
,
...
...
@@ -250,7 +223,7 @@ export const StaticColumns = customer => [
precision
:
0
,
maxLength
:
5
,
},
// disabeldRender: () => customer.isService
,
disabeldRender
:
()
=>
customer
.
isEdit
&&
!
customer
.
isCard
,
},
{
title
:
'
商品自编码
'
,
...
...
@@ -259,7 +232,7 @@ export const StaticColumns = customer => [
role
:
[
1
,
2
],
inputType
:
'
input
'
,
roleRules
:
{
required
:
true
},
disabeldRender
:
()
=>
customer
.
is
Service
,
disabeldRender
:
()
=>
customer
.
is
Edit
&&
!
customer
.
isCard
,
},
{
title
:
'
京东链接
'
,
...
...
@@ -268,7 +241,7 @@ export const StaticColumns = customer => [
role
:
[
1
,
2
],
inputType
:
'
input
'
,
roleRules
:
{
required
:
false
},
disabeldRender
:
()
=>
customer
.
is
Service
,
disabeldRender
:
()
=>
customer
.
is
Edit
&&
!
customer
.
isCard
,
},
{
title
:
'
sku名称
'
,
...
...
@@ -277,6 +250,7 @@ export const StaticColumns = customer => [
role
:
customer
.
isEdit
&&
customer
.
isJDGoods
?
[
1
,
2
]
:
[],
inputType
:
'
btnText
'
,
roleRules
:
{
required
:
false
},
disabeldRender
:
()
=>
customer
.
isEdit
&&
!
customer
.
isCard
,
},
{
title
:
'
操作
'
,
...
...
@@ -289,5 +263,6 @@ export const StaticColumns = customer => [
min
:
0
,
},
roleRules
:
{
required
:
false
},
disabeldRender
:
()
=>
customer
.
isEdit
&&
!
customer
.
isCard
,
},
];
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