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

feat: bug fix

parent a6e3ea2f
...@@ -245,10 +245,18 @@ ...@@ -245,10 +245,18 @@
.multiSpecification { .multiSpecification {
display: flex; display: flex;
flex-flow: row wrap; flex-flow: row wrap;
:global{
.ant-form-item-control {
flex-direction:none;
}
.ant-form-item-control-input-content{
flex:none
}
}
} }
.specsBetween { .specsBetween {
display: flex; display: flex;
flex-flow: row nowrap; justify-content: flex-end;
:global { :global {
.ant-form-item-label { .ant-form-item-label {
overflow: inherit; overflow: inherit;
...@@ -310,8 +318,8 @@ ...@@ -310,8 +318,8 @@
} }
.rowWarp { .rowWarp {
display: flex; display: flex;
flex-flow: row wrap;
background: #f8f8f8; background: #f8f8f8;
flex-direction: column;
} }
:global { :global {
......
...@@ -511,7 +511,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -511,7 +511,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
} }
}); });
if (editData?.skuList?.length) { 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) { if (specs.length === 0 && !editData?.specList[0]?.specs[0]?.activityPrice) {
let { let {
...@@ -527,8 +527,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -527,8 +527,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
editData.salePrice = salePrice; editData.salePrice = salePrice;
editData.maxStock = maxStock; editData.maxStock = maxStock;
editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId]; editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId];
editData.saleTimeType = saleTimeType; // editData.saleTimeType = saleTimeType;
editData.saleDates = saleDates; // editData.saleDates = saleDates;
editData.autoStock = +autoStock === 1 ? true : false; editData.autoStock = +autoStock === 1 ? true : false;
editData.saleTimes = saleTimes.length editData.saleTimes = saleTimes.length
? saleTimes.map(item => { ? saleTimes.map(item => {
...@@ -561,8 +561,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -561,8 +561,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
}); });
console.log(specs, 'specs'); console.log(specs, 'specs');
editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId]; editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId];
editData.saleTimeType = saleTimeType; // editData.saleTimeType = saleTimeType;
editData.saleDates = saleDates; // editData.saleDates = saleDates;
editData.saleTimes = saleTimes.length editData.saleTimes = saleTimes.length
? saleTimes.map(item => { ? saleTimes.map(item => {
return [moment(item?.startTime, format), moment(item?.endTime, format)]; return [moment(item?.startTime, format), moment(item?.endTime, format)];
...@@ -585,15 +585,13 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -585,15 +585,13 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
let tempUnit = item.specs[weightIndex].unit; let tempUnit = item.specs[weightIndex].unit;
let specsNameList = item.specs.map(itm => itm.specName); let specsNameList = item.specs.map(itm => itm.specName);
let lastName = specsNameList.slice(1)?.join(' '); let lastName = specsNameList.slice(1)?.join(' ');
// item.unique = `${specsNameList[0]} (${tempQuantity}${tempUnit}) ${lastName}`; item.unique = (item?.specs.map(itm=>itm.specName)).toString()
item.unique = '大份,加糖,中辣';
} }
return item; return item;
}); });
setTempMultiSpu(tempMultiSpu || []); setTempMultiSpu(tempMultiSpu || []);
setMultiSpu(JSON.parse(JSON.stringify(tempMultiSpu)) || []); setMultiSpu(JSON.parse(JSON.stringify(tempMultiSpu)) || []);
console.log('tempMultiSpu111', multiSpu, tempMultiSpu);
} }
form.setFieldsValue({ productRefShopId: editData.shopId }); form.setFieldsValue({ productRefShopId: editData.shopId });
onCardSuccessImageList(editData?.detailImageList); onCardSuccessImageList(editData?.detailImageList);
...@@ -787,7 +785,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -787,7 +785,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
unit = unit =
(unit && (Array.isArray(unit) && unit?.length && unit?.slice(1).toString())) || (unit && (Array.isArray(unit) && unit?.length && unit?.slice(1).toString())) ||
unit; unit;
if (unit && !peopleUnits.includes(unit)) { if (!peopleUnits.includes(unit)) {
return ( return (
<Form.Item <Form.Item
name="quantity" name="quantity"
...@@ -1186,8 +1184,9 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -1186,8 +1184,9 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
{item.unique && ( {item.unique && (
<> <>
<div key={idx} className={styles.specsBetween}> <div key={idx} className={styles.specsBetween}>
<Form.Item label={calcLabelName(intactData, item)}> <Form.Item>
<div className={styles.specsBetween}> <div className={styles.specsBetween}>
<div>{calcLabelName(intactData, item)} :</div>
<span className={styles.repertoryLimit}> <span className={styles.repertoryLimit}>
{item?.serviceItem?.productStock}/ {item?.serviceItem?.productStock}/
{item?.serviceItem?.maxStock} {item?.serviceItem?.maxStock}
...@@ -1198,7 +1197,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -1198,7 +1197,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
showAddRepertoryModal('multi', `${item.unique}`, item); // 多个库存 showAddRepertoryModal('multi', `${item.unique}`, item); // 多个库存
}} }}
> >
设置库存{item.unique} 设置库存
</div> </div>
</div> </div>
</Form.Item> </Form.Item>
......
...@@ -59,7 +59,7 @@ export const TaskList = (canAddService, canAddNormal) => [ ...@@ -59,7 +59,7 @@ export const TaskList = (canAddService, canAddNormal) => [
}, },
}, },
{ {
name: '电子卡卷', name: '服务类商品',
type: 4, type: 4,
desc: '无需物流', desc: '无需物流',
hide: !canAddService, hide: !canAddService,
......
...@@ -103,7 +103,7 @@ const ServiceGoods = options => { ...@@ -103,7 +103,7 @@ const ServiceGoods = options => {
} }
if (productType === 5) { if (productType === 5) {
setTakeawayInfoMation(e); setTakeawayInfoMation(e);
console.log('takeawayInfoMation', takeawayInfoMation); // console.log('takeawayInfoMation', takeawayInfoMation);
} }
}; };
...@@ -128,10 +128,11 @@ const ServiceGoods = options => { ...@@ -128,10 +128,11 @@ const ServiceGoods = options => {
}; };
// 查询外卖商品详情 // 查询外卖商品详情
const querGetShopDetail = async params => { const querGetShopDetail = async params => {
const { spuId, shopId } = params; const { spuId, shopId, skuId } = params;
const temp = { const temp = {
id: spuId, id: spuId,
shopId, shopId,
skuId,
}; };
const { data } = await apiGetShopDetail(temp); const { data } = await apiGetShopDetail(temp);
const { 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