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
2ca85f31
Commit
2ca85f31
authored
Jan 13, 2022
by
beisir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改验收意见
parent
7b9919f4
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
132 additions
and
42 deletions
+132
-42
env.config.js
config/env.config.js
+5
-5
index.jsx
src/pages/GoodsManage/LogModal/index.jsx
+84
-22
batchSetting.jsx
src/pages/GoodsManage/createModal/batchSetting.jsx
+16
-1
index.jsx
src/pages/GoodsManage/createModal/index.jsx
+3
-3
index.jsx
src/pages/GoodsManage/index.jsx
+6
-5
service.js
src/pages/GoodsManage/service.js
+9
-0
staticdata.js
src/pages/GoodsManage/staticdata.js
+5
-5
index.jsx
src/pages/components/sortablUpload/index.jsx
+3
-0
request.js
src/utils/request.js
+1
-1
No files found.
config/env.config.js
View file @
2ca85f31
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
let
envAPi
=
{
let
envAPi
=
{
api
:
'
//backstms-
gyl2
.liangkebang.net
'
,
api
:
'
//backstms-
test1
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-
gyl2
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-
test1
.liangkebang.net
'
,
// kdspApi: 'http://192.168.28.107:7000',
// kdspApi: 'http://192.168.28.107:7000',
kdspApi
:
'
https://sc-op-api-
gyl2
.liangkebang.net
'
,
kdspApi
:
'
https://sc-op-api-
test1
.liangkebang.net
'
,
prologueDomain
:
'
https://prologue-
gyl2
.liangkebang.net
'
,
prologueDomain
:
'
https://prologue-
test1
.liangkebang.net
'
,
qiniuHost
:
'
https://appsync.lkbang.net
'
,
qiniuHost
:
'
https://appsync.lkbang.net
'
,
opapiHost
:
'
https://opapi-
gyl2
.liangkebang.net
'
,
opapiHost
:
'
https://opapi-
test1
.liangkebang.net
'
,
// opapiHost: 'http://192.168.29.45:7000',
// opapiHost: 'http://192.168.29.45:7000',
};
};
...
...
src/pages/GoodsManage/LogModal/index.jsx
View file @
2ca85f31
import
{
Modal
,
Table
,
Button
,
Pagination
}
from
'
antd
'
;
import
{
Modal
,
Table
,
Button
,
Pagination
,
Tabs
}
from
'
antd
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
styles
from
'
../style.less
'
;
import
styles
from
'
../style.less
'
;
import
{
changeLog
}
from
'
../service
'
;
import
{
changeLog
,
productMerchantLog
}
from
'
../service
'
;
const
LogModal
=
props
=>
{
const
LogModal
=
props
=>
{
const
[
tabActiveKey
,
setTabActiveKey
]
=
useState
(
'
0
'
);
const
[
tableData
,
setTableData
]
=
useState
([]);
const
[
tableData
,
setTableData
]
=
useState
([]);
const
[
pageNo
,
setPageNo
]
=
useState
(
1
);
const
[
pageNo
,
setPageNo
]
=
useState
(
1
);
const
[
pageSize
]
=
useState
(
20
);
const
[
pageSize
]
=
useState
(
20
);
const
[
merchantList
,
setMerchantList
]
=
useState
([]);
const
columns
=
[
const
columns
=
[
{
{
title
:
'
时间
'
,
title
:
'
时间
'
,
...
@@ -39,21 +41,69 @@ const LogModal = props => {
...
@@ -39,21 +41,69 @@ const LogModal = props => {
align
:
'
center
'
,
align
:
'
center
'
,
},
},
];
];
const
columnsMerchant
=
[
{
title
:
'
时间
'
,
dataIndex
:
'
createdAt
'
,
align
:
'
center
'
,
},
{
title
:
'
审核结果
'
,
align
:
'
center
'
,
dataIndex
:
'
operation
'
,
render
:
value
=>
([
5
,
6
,
7
].
includes
(
value
)
?
'
审核通过
'
:
'
驳回
'
),
},
{
title
:
'
驳回原因
'
,
dataIndex
:
'
rejectReason
'
,
align
:
'
center
'
,
},
{
title
:
'
操作账号
'
,
dataIndex
:
'
createdBy
'
,
align
:
'
center
'
,
},
];
const
handleSearch
=
async
(
page
=
1
)
=>
{
const
handleSearch
=
async
(
page
=
1
)
=>
{
setPageNo
(
page
);
setPageNo
(
page
);
const
{
data
=
{}
}
=
await
changeLog
({
id
:
props
.
id
,
pageNo
:
page
,
pageSize
});
const
{
data
=
{}
}
=
await
changeLog
({
id
:
props
.
id
,
pageNo
:
page
,
pageSize
});
setTableData
(
data
);
setTableData
(
data
);
};
};
const
onPageChange
=
page
=>
{
const
onPageChange
=
page
=>
{
handleSearch
(
page
);
handleSearch
(
page
);
};
};
const
getProductMerchantLog
=
async
()
=>
{
const
{
data
=
[]
}
=
await
productMerchantLog
(
props
.
spuId
);
setMerchantList
(
data
);
// merchantList
};
const
bundleOnTabChange
=
key
=>
{
if
(
key
===
'
1
'
)
{
getProductMerchantLog
();
}
else
{
onPageChange
(
1
);
}
setTabActiveKey
(
key
);
};
const
bundleOnCancel
=
()
=>
{
setMerchantList
([]);
setTabActiveKey
(
'
0
'
);
props
.
onCancel
();
};
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
props
.
id
)
return
;
if
(
!
props
.
id
)
return
;
handleSearch
();
handleSearch
();
},
[
props
.
id
]);
},
[
props
.
id
]);
const
{
visible
}
=
props
;
const
{
visible
}
=
props
;
return
(
return
(
<
Modal
title=
"日志详情"
visible=
{
visible
}
footer=
{
null
}
onCancel=
{
props
.
onCancel
}
width=
"800px"
>
<
Modal
title=
"日志详情"
visible=
{
visible
}
footer=
{
null
}
onCancel=
{
bundleOnCancel
}
width=
"800px"
>
<
Tabs
type=
"card"
onChange=
{
bundleOnTabChange
}
activeKey=
{
tabActiveKey
}
>
<
Tabs
.
TabPane
tab=
"订单详情"
key=
"0"
>
<
Table
<
Table
dataSource=
{
tableData
.
records
}
dataSource=
{
tableData
.
records
}
bordered
bordered
...
@@ -72,7 +122,19 @@ const LogModal = props => {
...
@@ -72,7 +122,19 @@ const LogModal = props => {
className=
{
styles
.
pagination
}
className=
{
styles
.
pagination
}
/>
/>
)
}
)
}
<
Button
type=
"primary"
onClick=
{
props
.
onCancel
}
className=
{
styles
.
logBtn
}
>
</
Tabs
.
TabPane
>
<
Tabs
.
TabPane
tab=
"审核详情"
key=
"1"
>
<
Table
dataSource=
{
merchantList
}
bordered
columns=
{
columnsMerchant
}
rowKey=
{
record
=>
record
.
id
}
pagination=
{
false
}
scroll=
{
{
y
:
300
}
}
/>
</
Tabs
.
TabPane
>
</
Tabs
>
<
Button
type=
"primary"
onClick=
{
bundleOnCancel
}
className=
{
styles
.
logBtn
}
>
关闭
关闭
</
Button
>
</
Button
>
</
Modal
>
</
Modal
>
...
...
src/pages/GoodsManage/createModal/batchSetting.jsx
View file @
2ca85f31
...
@@ -31,6 +31,7 @@ class goodsManage extends Component {
...
@@ -31,6 +31,7 @@ class goodsManage extends Component {
if
(
!
isEdit
)
item
.
productStock
=
data
.
productStock
;
// 编辑状态不可修改库存
if
(
!
isEdit
)
item
.
productStock
=
data
.
productStock
;
// 编辑状态不可修改库存
item
.
supplyPrice
=
data
.
supplyPrice
;
item
.
supplyPrice
=
data
.
supplyPrice
;
item
.
weight
=
data
.
weight
;
item
.
weight
=
data
.
weight
;
item
.
productStockWarning
=
data
.
productStockWarning
;
});
});
}
}
if
(
data
.
firstSpecValue
&&
!
data
.
secondSpecValue
)
{
if
(
data
.
firstSpecValue
&&
!
data
.
secondSpecValue
)
{
...
@@ -41,6 +42,7 @@ class goodsManage extends Component {
...
@@ -41,6 +42,7 @@ class goodsManage extends Component {
if
(
!
isEdit
)
item
.
productStock
=
data
.
productStock
;
if
(
!
isEdit
)
item
.
productStock
=
data
.
productStock
;
item
.
supplyPrice
=
data
.
supplyPrice
;
item
.
supplyPrice
=
data
.
supplyPrice
;
item
.
weight
=
data
.
weight
;
item
.
weight
=
data
.
weight
;
item
.
productStockWarning
=
data
.
productStockWarning
;
}
}
});
});
}
}
...
@@ -52,6 +54,7 @@ class goodsManage extends Component {
...
@@ -52,6 +54,7 @@ class goodsManage extends Component {
if
(
!
isEdit
)
item
.
productStock
=
data
.
productStock
;
if
(
!
isEdit
)
item
.
productStock
=
data
.
productStock
;
item
.
supplyPrice
=
data
.
supplyPrice
;
item
.
supplyPrice
=
data
.
supplyPrice
;
item
.
weight
=
data
.
weight
;
item
.
weight
=
data
.
weight
;
item
.
productStockWarning
=
data
.
productStockWarning
;
}
}
});
});
}
}
...
@@ -66,6 +69,7 @@ class goodsManage extends Component {
...
@@ -66,6 +69,7 @@ class goodsManage extends Component {
if
(
!
isEdit
)
item
.
productStock
=
data
.
productStock
;
if
(
!
isEdit
)
item
.
productStock
=
data
.
productStock
;
item
.
supplyPrice
=
data
.
supplyPrice
;
item
.
supplyPrice
=
data
.
supplyPrice
;
item
.
weight
=
data
.
weight
;
item
.
weight
=
data
.
weight
;
item
.
productStockWarning
=
data
.
productStockWarning
;
}
}
});
});
}
}
...
@@ -139,7 +143,7 @@ class goodsManage extends Component {
...
@@ -139,7 +143,7 @@ class goodsManage extends Component {
max=
{
999999.999
}
max=
{
999999.999
}
// eslint-disable-next-line radix
// eslint-disable-next-line radix
placeholder=
"重量"
placeholder=
"重量"
style=
{
{
width
:
1
5
0
}
}
style=
{
{
width
:
1
3
0
}
}
/>,
/>,
)
}
)
}
</
FormItem
>
</
FormItem
>
...
@@ -158,6 +162,17 @@ class goodsManage extends Component {
...
@@ -158,6 +162,17 @@ class goodsManage extends Component {
)
}
)
}
</
FormItem
>
</
FormItem
>
)
}
)
}
<
FormItem
>
{
getFieldDecorator
(
'
productStockWarning
'
,
{})(
<
InputNumber
placeholder=
"库存预警"
maxLength=
{
5
}
min=
{
0
}
precision=
{
0
}
style=
{
{
width
:
100
}
}
/>,
)
}
</
FormItem
>
<
FormItem
>
<
FormItem
>
<
Button
type=
"primary"
htmlType=
"submit"
onClick=
{
this
.
batchSetting
}
>
<
Button
type=
"primary"
htmlType=
"submit"
onClick=
{
this
.
batchSetting
}
>
批量设置
批量设置
...
...
src/pages/GoodsManage/createModal/index.jsx
View file @
2ca85f31
...
@@ -513,7 +513,7 @@ class goodsManage extends Component {
...
@@ -513,7 +513,7 @@ class goodsManage extends Component {
fieldNames=
{
{
label
:
'
name
'
,
value
:
'
id
'
,
children
:
'
children
'
}
}
fieldNames=
{
{
label
:
'
name
'
,
value
:
'
id
'
,
children
:
'
children
'
}
}
options=
{
treeDataArray
}
options=
{
treeDataArray
}
onChange=
{
(
val
,
label
,
ext
)
=>
this
.
treeChange
(
val
,
label
,
ext
)
}
onChange=
{
(
val
,
label
,
ext
)
=>
this
.
treeChange
(
val
,
label
,
ext
)
}
disabled=
{
isEdit
}
//
disabled=
{
isEdit
}
/>,
/>,
)
}
)
}
</
FormItem
>
</
FormItem
>
...
@@ -586,7 +586,7 @@ class goodsManage extends Component {
...
@@ -586,7 +586,7 @@ class goodsManage extends Component {
allowClear
allowClear
showSearch
showSearch
style=
{
{
width
:
200
}
}
style=
{
{
width
:
200
}
}
disabled=
{
isEdit
}
disabled=
{
isEdit
&&
initData
.
firstSpecId
}
onChange=
{
(
val
,
option
)
=>
onChange=
{
(
val
,
option
)
=>
this
.
specChange
(
'
first
'
,
option
?.
props
.
children
,
val
)
this
.
specChange
(
'
first
'
,
option
?.
props
.
children
,
val
)
}
}
...
@@ -664,7 +664,7 @@ class goodsManage extends Component {
...
@@ -664,7 +664,7 @@ class goodsManage extends Component {
<
Select
<
Select
allowClear
allowClear
showSearch
showSearch
disabled=
{
isEdit
}
disabled=
{
isEdit
&&
initData
.
secondSpecId
}
style=
{
{
width
:
200
}
}
style=
{
{
width
:
200
}
}
onChange=
{
(
val
,
option
)
=>
this
.
specChange
(
'
second
'
,
option
?.
props
.
children
)
}
onChange=
{
(
val
,
option
)
=>
this
.
specChange
(
'
second
'
,
option
?.
props
.
children
)
}
filterOption=
{
(
input
,
option
)
=>
filterOption=
{
(
input
,
option
)
=>
...
...
src/pages/GoodsManage/index.jsx
View file @
2ca85f31
...
@@ -53,7 +53,7 @@ class goodsManage extends Component {
...
@@ -53,7 +53,7 @@ class goodsManage extends Component {
loading
=
false
;
loading
=
false
;
current
SkuId
=
null
;
current
Log
=
null
;
supplierId
=
null
;
supplierId
=
null
;
...
@@ -189,8 +189,8 @@ class goodsManage extends Component {
...
@@ -189,8 +189,8 @@ class goodsManage extends Component {
}
}
};
};
viewLog
=
async
skuId
=>
{
viewLog
=
async
rows
=>
{
this
.
current
SkuId
=
skuId
;
this
.
current
Log
=
rows
;
this
.
setState
({
this
.
setState
({
logVisible
:
true
,
logVisible
:
true
,
});
});
...
@@ -341,9 +341,10 @@ class goodsManage extends Component {
...
@@ -341,9 +341,10 @@ class goodsManage extends Component {
<
LogModal
<
LogModal
visible=
{
this
.
state
.
logVisible
}
visible=
{
this
.
state
.
logVisible
}
id=
{
this
.
currentSkuId
}
spuId=
{
this
.
currentLog
?.
spuId
}
id=
{
this
.
currentLog
?.
skuId
}
onCancel=
{
()
=>
{
onCancel=
{
()
=>
{
this
.
current
SkuId
=
null
;
this
.
current
Log
=
null
;
this
.
setState
({
logVisible
:
false
});
this
.
setState
({
logVisible
:
false
});
}
}
}
}
/>
/>
...
...
src/pages/GoodsManage/service.js
View file @
2ca85f31
...
@@ -150,6 +150,15 @@ export async function changeLog(params) {
...
@@ -150,6 +150,15 @@ export async function changeLog(params) {
});
});
}
}
export
async
function
productMerchantLog
(
productId
)
{
return
request
.
get
(
'
/product/api/merchant/auditLog
'
,
{
params
:
{
productId
,
},
prefix
:
kdspApi
,
});
}
// 商品详情
// 商品详情
export
async
function
detail
(
params
)
{
export
async
function
detail
(
params
)
{
return
request
.
post
(
'
/product/supply/list
'
,
{
return
request
.
post
(
'
/product/supply/list
'
,
{
...
...
src/pages/GoodsManage/staticdata.js
View file @
2ca85f31
...
@@ -94,7 +94,7 @@ export function column() {
...
@@ -94,7 +94,7 @@ export function column() {
sorter
:
(
a
,
b
)
=>
a
.
supplyPrice
-
b
.
supplyPrice
,
sorter
:
(
a
,
b
)
=>
a
.
supplyPrice
-
b
.
supplyPrice
,
render
:
(
_
,
row
)
=>
(
render
:
(
_
,
row
)
=>
(
<
div
className
=
{
styles
.
price
}
>
<
div
className
=
{
styles
.
price
}
>
<
p
>
供货价:
{
row
.
supplyPrice
.
toFixed
(
2
)}
<
/p
>
<
p
>
供货价:
{
(
row
.
supplyPrice
||
0
)
.
toFixed
(
2
)}
<
/p
>
<
p
>
市场价:
{(
row
.
marketPrice
||
0
).
toFixed
(
2
)}
<
/p
>
<
p
>
市场价:
{(
row
.
marketPrice
||
0
).
toFixed
(
2
)}
<
/p
>
<
/div
>
<
/div
>
),
),
...
@@ -139,7 +139,7 @@ export function column() {
...
@@ -139,7 +139,7 @@ export function column() {
className
=
{
styles
.
button
}
className
=
{
styles
.
button
}
onClick
=
{()
=>
this
.
onUpdateInfo
(
row
)}
onClick
=
{()
=>
this
.
onUpdateInfo
(
row
)}
>
>
编辑
修改
<
/Button
>
<
/Button
>
)}
)}
<
Button
<
Button
...
@@ -156,7 +156,7 @@ export function column() {
...
@@ -156,7 +156,7 @@ export function column() {
size
=
"
small
"
size
=
"
small
"
type
=
"
primary
"
type
=
"
primary
"
className
=
{
styles
.
button
}
className
=
{
styles
.
button
}
onClick
=
{()
=>
this
.
viewLog
(
row
.
skuId
)}
onClick
=
{()
=>
this
.
viewLog
(
row
)}
>
>
查看日志
查看日志
<
/Button
>
<
/Button
>
...
@@ -168,11 +168,11 @@ export function column() {
...
@@ -168,11 +168,11 @@ export function column() {
export
const
disSelectStatus
=
[
2
,
5
];
export
const
disSelectStatus
=
[
2
,
5
];
export
const
stateList
=
[
export
const
stateList
=
[
{
value
:
3
,
label
:
'
待审核
'
},
{
value
:
3
,
label
:
'
待审核
'
},
{
value
:
4
,
label
:
'
申请
驳回
'
},
{
value
:
4
,
label
:
'
驳回
'
},
{
value
:
5
,
label
:
'
审核通过
'
},
{
value
:
5
,
label
:
'
审核通过
'
},
];
];
// AUDITING(3, "待审核"),REJECTED(4, "
申请
驳回"),WAIT_SELL(5, "未上架"),ON_SELL(6, "已上架"),OFF_SHELVES(7, "已下架"))
// AUDITING(3, "待审核"),REJECTED(4, "驳回"),WAIT_SELL(5, "未上架"),ON_SELL(6, "已上架"),OFF_SHELVES(7, "已下架"))
export
const
productTypeList
=
[
export
const
productTypeList
=
[
{
value
:
1
,
label
:
'
实体商品
'
},
{
value
:
1
,
label
:
'
实体商品
'
},
{
value
:
2
,
label
:
'
虚拟充值
'
},
{
value
:
2
,
label
:
'
虚拟充值
'
},
...
...
src/pages/components/sortablUpload/index.jsx
View file @
2ca85f31
...
@@ -4,6 +4,9 @@ import { ReactSortable } from 'react-sortablejs';
...
@@ -4,6 +4,9 @@ import { ReactSortable } from 'react-sortablejs';
import
{
uploadImg
}
from
'
../../GoodsManage/service
'
;
import
{
uploadImg
}
from
'
../../GoodsManage/service
'
;
import
styles
from
'
./styles.less
'
;
import
styles
from
'
./styles.less
'
;
const
ImageInfo
=
file
=>
{
console
.
log
(
file
);
};
class
PicturesWall
extends
React
.
Component
{
class
PicturesWall
extends
React
.
Component
{
state
=
{
state
=
{
previewVisible
:
false
,
previewVisible
:
false
,
...
...
src/utils/request.js
View file @
2ca85f31
...
@@ -122,7 +122,7 @@ request.interceptors.response.use(async (response, options) => {
...
@@ -122,7 +122,7 @@ request.interceptors.response.use(async (response, options) => {
});
});
window
.
location
.
href
=
loginPath
;
window
.
location
.
href
=
loginPath
;
}
}
if
(
data
.
businessCode
&&
data
.
businessCode
!==
'
0000
'
)
{
if
(
(
data
.
businessCode
&&
data
.
businessCode
!==
'
0000
'
)
||
data
.
businessCode
===
null
)
{
notification
.
warning
({
notification
.
warning
({
message
:
data
.
detail
||
data
.
msg
||
'
操作失败
'
,
message
:
data
.
detail
||
data
.
msg
||
'
操作失败
'
,
});
});
...
...
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