diff --git a/src/pages/activity/activityInfo/components/CreateForm.jsx b/src/pages/activity/activityInfo/components/CreateForm.jsx index d7bf698..78b5cd7 100644 --- a/src/pages/activity/activityInfo/components/CreateForm.jsx +++ b/src/pages/activity/activityInfo/components/CreateForm.jsx @@ -3,6 +3,7 @@ import { InputNumber, Row, Col, + Switch, Checkbox, Space, Steps, @@ -123,6 +124,7 @@ const CreateForm = (props) => { result = quantityLimit[key].limit; } } + console.log(result); return result; }; const uploadProp = { @@ -151,7 +153,17 @@ const CreateForm = (props) => { let fileData = null; GetCosRequestURL({ directory: "activity", fileExtension: ext, method: "PUT" }).then((r) => { action = r.allUrl; + var index = file.name.lastIndexOf("."); + //获取后缀 + var ext = file.name.substr(index + 1); const reader = new FileReader(); + + if (['png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext) == -1) + { + message.error(`${file.name} 不是图片文件`); + return; + } + reader.readAsArrayBuffer(file); reader.onload = (e) => { fileData = e.target.result; @@ -252,25 +264,89 @@ const CreateForm = (props) => { {'买满赠送(商品)'} + prevValues.activityType !== currentValues.activityType - } - > + } > {({ getFieldValue }) => + (getFieldValue('activityType') == '6' || getFieldValue('activityType') == '7') ? ( + + + + + + + + + + ) : null + } + + + + prevValues.activityType !== currentValues.activityType + } > + {({ getFieldValue }) => // (getFieldValue('activityType') == '6' || getFieldValue('activityType') == '7') ? ( // @@ -376,12 +452,12 @@ const CreateForm = (props) => { })} ) : (getFieldValue('activityType') == '5' || getFieldValue('activityType') == '8') ? ( - + option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 + } > {goodsInfo.map((item, index) => { return ( @@ -571,7 +647,10 @@ const CreateForm = (props) => { style={{ float: 'left' }} rules={[{ required: true }]} > - + { + return current && current > form.getFieldValue('activityEndTime'); + }} /> { style={{ float: 'left', marginLeft: 20 }} rules={[{ required: true }]} > - + { + + return current && current < form.getFieldValue('activityStartTime'); + }} /> diff --git a/src/pages/activity/activityInfo/index.jsx b/src/pages/activity/activityInfo/index.jsx index 49e7f8c..a28169b 100644 --- a/src/pages/activity/activityInfo/index.jsx +++ b/src/pages/activity/activityInfo/index.jsx @@ -86,9 +86,8 @@ const activityInfManage = () => { const handleUpdate = async (fields) => { message.loading('正在修改...', key); try { - debugger if(fields.activityType==3){ - debugger + fields.activityRewards.forEach(element => { element.value=`[${element.value.join()}]` }); @@ -164,8 +163,8 @@ const activityInfManage = () => { 3: { text: '商品促销', status: 'Success' }, 4: { text: '买满赠送(优惠券)', status: 'Success' }, 5: { text: '买满赠送(商品)', status: 'Success' }, - 6: { text: '消费次数换购(阶梯)', status: 'Success' }, - 7: { text: '消费次数换购(循环)', status: 'Success' }, + 6: { text: '累计消费换购(阶梯)', status: 'Success' }, + 7: { text: '累计消费换购(循环)', status: 'Success' }, 8: { text: '加价换购', status: 'Success' }, }, }, @@ -203,8 +202,8 @@ const activityInfManage = () => { title: '是否后台计算', dataIndex: 'isAutoSend', valueEnum: { - 0: { text: '不显示', status: 'Processing' }, - 1: { text: '显示', status: 'Error' }, + 0: { text: '点击参与', status: 'Processing' }, + 1: { text: '后台计算', status: 'Error' }, }, render: (_, record) => ( <> diff --git a/src/pages/crm/coupon/coupon-Batch/index.jsx b/src/pages/crm/coupon/coupon-Batch/index.jsx index 2adbd34..2cfa22f 100644 --- a/src/pages/crm/coupon/coupon-Batch/index.jsx +++ b/src/pages/crm/coupon/coupon-Batch/index.jsx @@ -33,16 +33,6 @@ const CouponBatch = () => { dataIndex: 'couponTitle', valueType: 'textarea', }, - { - title: '使用范围', - key: 'rangeType', - dataIndex: 'rangeType', - valueEnum: { - 1: { text: '店铺' }, - 2: { text: '加盟商' }, - 3: { text: '区域' }, - }, - }, { title: '发放数量', dataIndex: 'sendNum', diff --git a/src/pages/crm/coupon/couponInfo/components/CreateForm.jsx b/src/pages/crm/coupon/couponInfo/components/CreateForm.jsx index 23a68fe..29249c6 100644 --- a/src/pages/crm/coupon/couponInfo/components/CreateForm.jsx +++ b/src/pages/crm/coupon/couponInfo/components/CreateForm.jsx @@ -77,9 +77,9 @@ const CreateForm = (props) => { - + - + { rules={[{ required: true }]} > - + { rules={[{ required: true }]} > - + 0 为不限制 @@ -120,7 +120,7 @@ const CreateForm = (props) => { getFieldValue('timeType') == '2' ? ( - + ) : (