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
a123c667
Commit
a123c667
authored
Apr 11, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新数据问题
parent
bf91c52a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
17 deletions
+18
-17
common.less
src/pages/ServiceGoods/common.less
+6
-6
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+9
-8
UploadCropImage.jsx
src/pages/ServiceGoods/components/UploadCropImage.jsx
+2
-2
service.js
src/pages/ServiceGoods/service.js
+1
-1
No files found.
src/pages/ServiceGoods/common.less
View file @
a123c667
...
...
@@ -249,12 +249,12 @@
.multiSpecification {
display: flex;
flex-flow: row wrap;
:global{
:global
{
.ant-form-item-control {
flex-direction:none;
flex-direction:
none;
}
.ant-form-item-control-input-content{
flex:
none
.ant-form-item-control-input-content
{
flex:
none;
}
}
}
...
...
@@ -262,7 +262,7 @@
display: flex;
justify-content: flex-start;
width: max-content;
align-items:center;
align-items:
center;
:global {
.ant-form-item-label {
overflow: inherit;
...
...
@@ -342,6 +342,6 @@
:global {
.reactEasyCrop_Container {
height:
7
50px !important;
height:
5
50px !important;
}
}
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
a123c667
...
...
@@ -267,7 +267,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
if
(
itm
?.
specName
)
{
return
itm
.
specName
;
}
return
itm
return
itm
;
})
.
toString
();
});
...
...
@@ -303,7 +303,14 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
multiSpu
.
map
(
item
=>
{
tempMultiSpu
.
forEach
(
itm
=>
{
if
(
item
.
unique
===
itm
.
unique
)
{
item
.
serviceItem
=
{
...
item
.
serviceItem
,
...
itm
.
serviceItem
};
// 修改商品售卖信息参数
const
params
=
{
saleDates
:
temp
.
serviceItem
.
saleDates
,
saleTimes
:
temp
.
serviceItem
.
saleTimes
,
saleTimeType
:
temp
.
serviceItem
.
saleTimeType
,
minPurchaseNum
:
temp
.
serviceItem
.
minPurchaseNum
,
};
item
.
serviceItem
=
{
...
item
.
serviceItem
,
...
itm
.
serviceItem
,
...
params
};
itm
.
specs
=
[...
item
.
specs
];
}
});
...
...
@@ -349,7 +356,6 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
const
getFormValues
=
debounce
(()
=>
{
const
values
=
form
.
getFieldsValue
();
console
.
log
(
values
,
'
values===
'
);
// debugger
props
.
onValuesChange
({
takeawayItem
:
JSON
.
parse
(
JSON
.
stringify
(
values
))
});
const
takeawayData
=
customer
.
isEdit
?
{
takeawayItem
:
Object
.
assign
({},
editData
,
values
)
}
...
...
@@ -548,7 +554,6 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
weight.forEach(item => {
if (item?.specs?.length) {
item.specs.forEach(itm => {
console.log('itm?.unit11111', itm?.unit);
if (itm?.unit && tempWeightName.includes(itm?.unit)) {
itm.quantity =
itm?.quantity.indexOf('约') > -1 ? itm?.quantity.slice(1) : itm?.quantity || '';
...
...
@@ -590,8 +595,6 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
weight.forEach(item => {
if (item?.specs?.length) {
item.specs.forEach(itm => {
console.log('itm?.unit112222', itm?.unit);
if (itm?.unit && tempWeightName.includes(itm?.unit)) {
itm.quantity =
itm?.quantity?.indexOf('约') > -1
...
...
@@ -611,7 +614,6 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
form.setFieldsValue({ specs });
const tempMultiSpu = editData?.skuList.map(item => {
if (item) {
console.log('item===', item);
item.serviceItem.productStock = item.productStock;
const weightIndex = item.specs.findIndex(itm => itm.specGroupName === '份量');
const tempQuantity = item.specs[weightIndex].quantity;
...
...
@@ -837,7 +839,6 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
>
{form => {
let unit = form.getFieldValue('unit') || '';
console.log('unit', unit);
unit =
(unit && (Array.isArray(unit) && unit?.length && unit?.slice(1).toString())) ||
unit;
...
...
src/pages/ServiceGoods/components/UploadCropImage.jsx
View file @
a123c667
...
...
@@ -216,7 +216,7 @@ const UploadCropImage = forwardRef((props, ref) => {
onMouseEnter=
{
()
=>
setActiveImgIndex
(
index
)
}
onMouseLeave=
{
()
=>
setActiveImgIndex
(
null
)
}
>
<
div
style=
{
{
width
:
'
100%
'
,
height
:
'
10
0%
'
,
overflow
:
'
hidden
'
}
}
>
<
div
style=
{
{
width
:
'
90%
'
,
height
:
'
9
0%
'
,
overflow
:
'
hidden
'
}
}
>
<
img
width=
"100%"
key=
{
item
.
uid
}
src=
{
item
.
url
}
alt=
""
/>
</
div
>
{
activeImgIndex
===
index
&&
(
...
...
@@ -238,7 +238,7 @@ const UploadCropImage = forwardRef((props, ref) => {
{
limit
!==
null
&&
fileList
.
length
>=
limit
?
(
''
)
:
(
<
ImgCrop
rotationSlider
modalWidth=
{
900
}
modalHeight=
{
9
00
}
quality=
{
0.5
}
showReset
>
<
ImgCrop
rotationSlider
modalWidth=
{
500
}
modalHeight=
{
5
00
}
quality=
{
0.5
}
showReset
>
<
Upload
{
...
uploadParams
}
disabled=
{
Boolean
(
disabled
)
}
...
...
src/pages/ServiceGoods/service.js
View file @
a123c667
...
...
@@ -153,7 +153,7 @@ export const apiUnits = data =>
});
// 获取shopids http://yapi.quantgroups.com/project/389/interface/api/38056
export
const
apiShopIds
=
data
=>
request
.
get
(
'
/api/merchants/shops/getBySupplierId?state=1
'
,
{
request
.
get
(
'
/api/merchants/shops/getBySupplierId?state=1
&productBusiness=1
'
,
{
prefix
:
goodsApi
,
data
,
});
...
...
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