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
5c088264
Commit
5c088264
authored
Apr 03, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: bug fix
parent
a6e3ea2f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
16 deletions
+24
-16
common.less
src/pages/ServiceGoods/common.less
+10
-2
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+10
-11
config.js
src/pages/ServiceGoods/config.js
+1
-1
index.jsx
src/pages/ServiceGoods/index.jsx
+3
-2
No files found.
src/pages/ServiceGoods/common.less
View file @
5c088264
...
...
@@ -245,10 +245,18 @@
.multiSpecification {
display: flex;
flex-flow: row wrap;
:global{
.ant-form-item-control {
flex-direction:none;
}
.ant-form-item-control-input-content{
flex:none
}
}
}
.specsBetween {
display: flex;
flex-flow: row nowrap
;
justify-content: flex-end
;
:global {
.ant-form-item-label {
overflow: inherit;
...
...
@@ -310,8 +318,8 @@
}
.rowWarp {
display: flex;
flex-flow: row wrap;
background: #f8f8f8;
flex-direction: column;
}
:global {
...
...
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
5c088264
...
...
@@ -511,7 +511,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
}
});
if (editData?.skuList?.length) {
editData.minPurchaseNum = editData?.skuList[0]?.serviceItem.minPurchaseNum;
//
editData.minPurchaseNum = editData?.skuList[0]?.serviceItem.minPurchaseNum;
// 单规格
if (specs.length === 0 && !editData?.specList[0]?.specs[0]?.activityPrice) {
let {
...
...
@@ -527,8 +527,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
editData.salePrice = salePrice;
editData.maxStock = maxStock;
editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId];
editData.saleTimeType = saleTimeType;
editData.saleDates = saleDates;
//
editData.saleTimeType = saleTimeType;
//
editData.saleDates = saleDates;
editData.autoStock = +autoStock === 1 ? true : false;
editData.saleTimes = saleTimes.length
? saleTimes.map(item => {
...
...
@@ -561,8 +561,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
});
console.log(specs, 'specs');
editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId];
editData.saleTimeType = saleTimeType;
editData.saleDates = saleDates;
//
editData.saleTimeType = saleTimeType;
//
editData.saleDates = saleDates;
editData.saleTimes = saleTimes.length
? saleTimes.map(item => {
return [moment(item?.startTime, format), moment(item?.endTime, format)];
...
...
@@ -585,15 +585,13 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
let tempUnit = item.specs[weightIndex].unit;
let specsNameList = item.specs.map(itm => itm.specName);
let lastName = specsNameList.slice(1)?.join(' ');
// item.unique = `
$
{
specsNameList
[
0
]}
(
$
{
tempQuantity
}
$
{
tempUnit
})
$
{
lastName
}
`;
item.unique = '大份,加糖,中辣';
item.unique = (item?.specs.map(itm=>itm.specName)).toString()
}
return item;
});
setTempMultiSpu(tempMultiSpu || []);
setMultiSpu(JSON.parse(JSON.stringify(tempMultiSpu)) || []);
console.log('tempMultiSpu111', multiSpu, tempMultiSpu);
}
form.setFieldsValue({ productRefShopId: editData.shopId });
onCardSuccessImageList(editData?.detailImageList);
...
...
@@ -787,7 +785,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
unit =
(unit && (Array.isArray(unit) && unit?.length && unit?.slice(1).toString())) ||
unit;
if (
unit &&
!peopleUnits.includes(unit)) {
if (!peopleUnits.includes(unit)) {
return (
<Form.Item
name="quantity"
...
...
@@ -1186,8 +1184,9 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
{item.unique && (
<>
<div key={idx} className={styles.specsBetween}>
<Form.Item
label={calcLabelName(intactData, item)}
>
<Form.Item>
<div className={styles.specsBetween}>
<div>{calcLabelName(intactData, item)} :</div>
<span className={styles.repertoryLimit}>
{item?.serviceItem?.productStock}/
{item?.serviceItem?.maxStock}
...
...
@@ -1198,7 +1197,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
showAddRepertoryModal('multi', `
$
{
item
.
unique
}
`, item); // 多个库存
}}
>
设置库存
{item.unique}
设置库存
</div>
</div>
</Form.Item>
...
...
src/pages/ServiceGoods/config.js
View file @
5c088264
...
...
@@ -59,7 +59,7 @@ export const TaskList = (canAddService, canAddNormal) => [
},
},
{
name
:
'
电子卡卷
'
,
name
:
'
服务类商品
'
,
type
:
4
,
desc
:
'
无需物流
'
,
hide
:
!
canAddService
,
...
...
src/pages/ServiceGoods/index.jsx
View file @
5c088264
...
...
@@ -103,7 +103,7 @@ const ServiceGoods = options => {
}
if
(
productType
===
5
)
{
setTakeawayInfoMation
(
e
);
console
.
log
(
'
takeawayInfoMation
'
,
takeawayInfoMation
);
//
console.log('takeawayInfoMation', takeawayInfoMation);
}
};
...
...
@@ -128,10 +128,11 @@ const ServiceGoods = options => {
};
// 查询外卖商品详情
const
querGetShopDetail
=
async
params
=>
{
const
{
spuId
,
shopId
}
=
params
;
const
{
spuId
,
shopId
,
skuId
}
=
params
;
const
temp
=
{
id
:
spuId
,
shopId
,
skuId
,
};
const
{
data
}
=
await
apiGetShopDetail
(
temp
);
const
{
...
...
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