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

feat: 更新单规库存

parent 46cd83d3
...@@ -177,8 +177,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -177,8 +177,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
if (weight.length) { if (weight.length) {
weight.forEach((item, weightIndex) => { weight.forEach((item, weightIndex) => {
console.log('eee====', item); console.log('eee====', item);
if (item?.unit && item.unit.length) { if (item?.unit && item?.unit.length) {
item.unit = item.unit.slice(item.unit.length - 1).toString(); item.unit = (item?.unit?.slice(item.unit.length - 1))?.toString();
} }
if (item && !item.specGroupName) { if (item && !item.specGroupName) {
item.specGroupName = '份量'; item.specGroupName = '份量';
...@@ -275,8 +275,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -275,8 +275,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
specList: +repertoryType === 1 ? singularSpecList : multiSpecList, // 单库存和多库存specList specList: +repertoryType === 1 ? singularSpecList : multiSpecList, // 单库存和多库存specList
items: +repertoryType === 1 ? singularSpu : JSON.parse(JSON.stringify(multiSpu)), items: +repertoryType === 1 ? singularSpu : JSON.parse(JSON.stringify(multiSpu)),
categoryId: ( categoryId: (
infoMation?.categoryId && infoMation?.categoryId.slice(infoMation.categoryId.length - 1) infoMation?.categoryId && infoMation?.categoryId?.slice(infoMation?.categoryId?.length - 1)
).toString(), )?.toString(),
}; };
console.log('intactData======>', intactData); console.log('intactData======>', intactData);
setIntactData(intactDataTemp); setIntactData(intactDataTemp);
...@@ -409,6 +409,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -409,6 +409,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
// 切换库存 // 切换库存
const onChangeRepertory = e => { const onChangeRepertory = e => {
setRepertoryType(`${e.target.value}`); setRepertoryType(`${e.target.value}`);
console.log("e,===",e);
}; };
// 勾选库存设置 // 勾选库存设置
const onChangeSetRepertory = e => { const onChangeSetRepertory = e => {
......
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