|
|
@ -44,6 +44,8 @@ function CreditScoreMgm() { |
|
|
|
const [tipVisible, setTipVisible] = useState(false); |
|
|
|
const [ruleVisible, setRuleVisible] = useState(false); |
|
|
|
const [redeemVisible, setRedeemVisible] = useState(false); |
|
|
|
const [payVisible, setPayVisible] = useState(false); |
|
|
|
const [fields, setFields] = useState([1]); |
|
|
|
const [editVisible, setEditVisible] = useState({ visible: false, type: 0 }); |
|
|
|
const [searchSelectList, setSearchSelectList] = useState([]); //搜索下拉数据 |
|
|
|
const columns = [ |
|
|
@ -400,7 +402,23 @@ function CreditScoreMgm() { |
|
|
|
]) |
|
|
|
}) |
|
|
|
}; |
|
|
|
|
|
|
|
const acf = () => { |
|
|
|
{ |
|
|
|
fields?.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div className="row-line" key={'items-' + index}> |
|
|
|
<div className="row">11</div> |
|
|
|
<div onClick={() => { |
|
|
|
let arr = fields |
|
|
|
arr.push(1) |
|
|
|
setFields(arr) |
|
|
|
} |
|
|
|
}>+</div> |
|
|
|
</div>) |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
useEffect(() => { |
|
|
|
getSelectList(); |
|
|
|
}, []); |
|
|
@ -423,6 +441,16 @@ function CreditScoreMgm() { |
|
|
|
type="primary" |
|
|
|
style={{ width: '116px' }} |
|
|
|
onClick={() => { |
|
|
|
//getRule() |
|
|
|
setPayVisible(true) |
|
|
|
}} |
|
|
|
> |
|
|
|
充值规则配置 |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
type="primary" |
|
|
|
style={{ width: '116px' }} |
|
|
|
onClick={() => { |
|
|
|
getRule() |
|
|
|
setRuleVisible(true) |
|
|
|
}} |
|
|
@ -698,6 +726,78 @@ function CreditScoreMgm() { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|
<Modal |
|
|
|
open={payVisible} |
|
|
|
width={550} |
|
|
|
title={'充值规则配置'} |
|
|
|
className="pay-modal" |
|
|
|
onCancel={() => { |
|
|
|
setPayVisible(false); |
|
|
|
}} |
|
|
|
onOk={() => { }} |
|
|
|
> |
|
|
|
<div className="pay-box"> |
|
|
|
<div>规则</div> |
|
|
|
<div className="content"> |
|
|
|
<div className="row-title">充值 |
|
|
|
<InputNumber |
|
|
|
className="credit-inputnum" |
|
|
|
min={0} |
|
|
|
value={saveData?.deducting_points} |
|
|
|
onChange={(e) => { setSaveData({ ...saveData, deducting_points: e }) }} |
|
|
|
/> |
|
|
|
元,返优惠券 |
|
|
|
</div> |
|
|
|
<div className="row-box"> |
|
|
|
{fields.length != 0 ? |
|
|
|
fields?.map((item, index) => { |
|
|
|
return ( |
|
|
|
<div className="row-line" key={'items-' + index}> |
|
|
|
<Select |
|
|
|
getPopupContainer={(e) => e.parentNode} |
|
|
|
options={[]} |
|
|
|
//defaultValue={item.defaultValue} |
|
|
|
//placeholder={item.placeholder} |
|
|
|
/> |
|
|
|
<InputNumber |
|
|
|
className="credit-inputnum" |
|
|
|
min={0} |
|
|
|
value={saveData?.deducting_points} |
|
|
|
onChange={(e) => { setSaveData({ ...saveData, deducting_points: e }) }} |
|
|
|
/> |
|
|
|
张 |
|
|
|
{ |
|
|
|
index > 0 && index + 1 == fields.length ? |
|
|
|
<div className="add-btn del-btn" onClick={() => { |
|
|
|
let arr = fields |
|
|
|
arr.shift() |
|
|
|
setFields([...arr]) |
|
|
|
} |
|
|
|
}>—</div> |
|
|
|
|
|
|
|
: |
|
|
|
<div className="add-btn" onClick={() => { |
|
|
|
let arr = fields |
|
|
|
if (arr.length > 2) { |
|
|
|
message.error('最多添加三个优惠券!') |
|
|
|
return |
|
|
|
} |
|
|
|
arr.push(1) |
|
|
|
setFields([...arr]) |
|
|
|
} |
|
|
|
}>+</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
) |
|
|
|
}) |
|
|
|
: null |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|
</> |
|
|
|
) |
|
|
|
} |
|
|
|