Commit a123c667 authored by 陈万宝's avatar 陈万宝

feat: 更新数据问题

parent bf91c52a
......@@ -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: 750px !important;
height: 550px !important;
}
}
......@@ -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;
......
......@@ -216,7 +216,7 @@ const UploadCropImage = forwardRef((props, ref) => {
onMouseEnter={() => setActiveImgIndex(index)}
onMouseLeave={() => setActiveImgIndex(null)}
>
<div style={{ width: '100%', height: '100%', overflow: 'hidden' }}>
<div style={{ width: '90%', height: '90%', 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={900} quality={0.5} showReset>
<ImgCrop rotationSlider modalWidth={500} modalHeight={500} quality={0.5} showReset>
<Upload
{...uploadParams}
disabled={Boolean(disabled)}
......
......@@ -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,
});
......
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