Commit 5c088264 authored by 陈万宝's avatar 陈万宝

feat: bug fix

parent a6e3ea2f
......@@ -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 {
......
......@@ -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>
......
......@@ -59,7 +59,7 @@ export const TaskList = (canAddService, canAddNormal) => [
},
},
{
name: '电子卡卷',
name: '服务类商品',
type: 4,
desc: '无需物流',
hide: !canAddService,
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment