feat: 完成包吗限制

This commit is contained in:
zhangds 2024-02-20 11:52:40 +08:00
parent bedb5c6ede
commit 8548013e11
2 changed files with 19 additions and 25 deletions

View File

@ -578,10 +578,6 @@ const UseExchangeAddEdit = forwardRef((props, ref) => {
return (
<div className="draw">
<Card style={{ width: "95%", margin: "10px auto" }} title={"基本信息"}>
<p>
2222222222
{props.isSettlement} {JSON.stringify(props.settlementData)}
</p>
<div className="addcode">
<Form model={codeInfo} rules={codeInfoRules} ref={codeInfoEl} className="addform">
<FormItem labelname="兑换码名称" prop="code_name" id="code_name">
@ -673,6 +669,11 @@ const UseExchangeAddEdit = forwardRef((props, ref) => {
type="primary"
style={{ marginLeft: "20px" }}
loading={state.addProductBtnLoading}
disabled={
props.isSettlement === 1 &&
props.settlementData &&
(props.settlementData.key === 8 || props.settlementData.key === 9)
}
onClick={() => {
addProduct("addProduct")
}}
@ -685,7 +686,12 @@ const UseExchangeAddEdit = forwardRef((props, ref) => {
onClick={() => {
addProduct("addKnockGold")
}}
disabled={!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))}
disabled={
!JSON.parse(sessionStorage.getItem("isEarlyWarningMan")) ||
(props.isSettlement === 1 &&
props.settlementData &&
props.settlementData.key === 7)
}
>
新建立减金
</Button>
@ -695,7 +701,12 @@ const UseExchangeAddEdit = forwardRef((props, ref) => {
onClick={() => {
addProduct("redPackets")
}}
disabled={!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))}
disabled={
!JSON.parse(sessionStorage.getItem("isEarlyWarningMan")) ||
(props.isSettlement === 1 &&
props.settlementData &&
(props.settlementData.key === 7 || props.settlementData.key === 8))
}
>
新建红包
</Button>

View File

@ -496,10 +496,6 @@ const UseProductPop = forwardRef((props, ref) => {
iconText="加载中"
>
<Form model={model} rules={formRules} ref={formEl}>
<p>
2222222222
{props.isSettlement} {JSON.stringify(props.settlementData)}
</p>
<FormItem labelname="商品类型" prop="type" id="type">
<RadioGroup
onChange={(e) => {
@ -508,24 +504,11 @@ const UseProductPop = forwardRef((props, ref) => {
value={model.product_type}
disabled={!!model.code_batch_id}
>
<RadioButton
value={1}
disabled={
props.isSettlement === 1 &&
props.settlementData &&
(props.settlementData.key === 8 || props.settlementData.key === 9)
}
>
直充
</RadioButton>
<RadioButton value={1}>直充</RadioButton>
<RadioButton
value={2}
disabled={
props.isSettlement === 1 &&
props.settlementData &&
(props.settlementData.key === 3 ||
props.settlementData.key === 8 ||
props.settlementData.key === 9)
props.isSettlement === 1 && props.settlementData && props.settlementData.key === 7
}
>
卡密