Commit 4714428f authored by 陈万宝's avatar 陈万宝

feat: 更新自动补足字段

parent c2eca6f0
...@@ -744,7 +744,6 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -744,7 +744,6 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
<InputNumber <InputNumber
min={1} min={1}
max={999999999} max={999999999}
precision={2}
style={{ width: 200 }} style={{ width: 200 }}
placeholder="请输入数字" placeholder="请输入数字"
/> />
...@@ -890,7 +889,6 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -890,7 +889,6 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
style={{ width: '200px' }} style={{ width: '200px' }}
max={999999999} max={999999999}
min={0} min={0}
precision={2}
placeholder="约 份量(数字)" placeholder="约 份量(数字)"
/> />
</Form.Item> </Form.Item>
......
...@@ -120,20 +120,20 @@ export const filterSendData = (type, params) => { ...@@ -120,20 +120,20 @@ export const filterSendData = (type, params) => {
// console.log(tempWeightName, 'tempWeightName'); // console.log(tempWeightName, 'tempWeightName');
temp.items.forEach(item => { temp.items.forEach(item => {
item.autoStock = item.autoStock ? 1 : 0 item.autoStock = item.autoStock ? 1 : 0
item.serviceItem.autoStock = item.serviceItem.autoStock ? 1 : 0 item.serviceItem.autoStock = item?.serviceItem?.autoStock ? 1 : 0
if (item?.specs?.length) { if (item?.specs?.length) {
item.specs.forEach(itm => { item?.specs.forEach(itm => {
if (tempWeightName.includes(itm.unit)) { if (tempWeightName.includes(itm.unit)) {
itm.quantity = itm.quantity.indexOf('') > -1 ? itm.quantity : `约${itm.quantity}` itm.quantity = `${itm?.quantity}`.indexOf('约') > -1 ? itm?.quantity : `${itm?.quantity}`
} }
}) })
} }
}) })
temp.specList && temp.specList.forEach(item => { temp.specList && temp.specList.forEach(item => {
if (item?.specs?.length) { if (item?.specs?.length) {
item.specs.forEach(itm => { item?.specs.forEach(itm => {
if (tempWeightName.includes(itm.unit)) { if (tempWeightName.includes(itm.unit)) {
itm.quantity = itm.quantity.indexOf('') > -1 ? itm.quantity : `约${itm.quantity}` itm.quantity = `${itm?.quantity}`.indexOf('约') > -1 ? itm?.quantity : `${itm?.quantity}`
} }
}) })
} }
......
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