|
|
@ -48,8 +48,8 @@ function BusinessConf(props) { |
|
|
|
operator_name: "0", |
|
|
|
item_name: '', |
|
|
|
parameterValue: 1, |
|
|
|
parameter_exit:'', |
|
|
|
parameter_exit_pda:'' |
|
|
|
parameter_exit: '', |
|
|
|
parameter_exit_pda: '' |
|
|
|
}) |
|
|
|
const addAdmin = () => { |
|
|
|
setImgVisible(true) |
|
|
@ -73,20 +73,20 @@ function BusinessConf(props) { |
|
|
|
...addManage, item_name: v, |
|
|
|
area_name: '0', |
|
|
|
operator_name: "0", |
|
|
|
parameter:'', |
|
|
|
parameterValue:1 |
|
|
|
parameter: '', |
|
|
|
parameterValue: 1 |
|
|
|
}) |
|
|
|
} |
|
|
|
//添加 |
|
|
|
const onChangeAdd = (e) => { |
|
|
|
setAddManage({ ...addManage, parameterValue: e.target.value , parameter_exit:'', parameter_exit_pda:''}) |
|
|
|
setAddManage({ ...addManage, parameterValue: e.target.value, parameter_exit: '', parameter_exit_pda: '' }) |
|
|
|
} |
|
|
|
//添加 |
|
|
|
const onChangehoose = (e) => { |
|
|
|
//添加 |
|
|
|
const onChangehoose = (e) => { |
|
|
|
setAddManage({ ...addManage, parameter_exit: e.target.value }) |
|
|
|
} |
|
|
|
//添加 |
|
|
|
const onChangeAddTypeValue = (e) => { |
|
|
|
//添加 |
|
|
|
const onChangeAddTypeValue = (e) => { |
|
|
|
setAddManage({ ...addManage, parameter_exit_pda: e.target.value }) |
|
|
|
} |
|
|
|
const [getType, setGetType] = useState(1) |
|
|
@ -137,14 +137,19 @@ function BusinessConf(props) { |
|
|
|
let data = { |
|
|
|
...addManage |
|
|
|
} |
|
|
|
console.log(addManage.parameterValue ); |
|
|
|
var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\]<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"); |
|
|
|
var pattern1 = /^[1-9]\d{0,19}(\.\d{1,2})?$/; |
|
|
|
if (addManage.area_name === '') { |
|
|
|
message.error('请选择城市') |
|
|
|
} else if (addManage.operator_name === '') { |
|
|
|
message.error('请选择商户名称') |
|
|
|
} else if (addManage.item_name === '') { |
|
|
|
message.error('请选择配置项') |
|
|
|
} else if (addManage.parameter === '' ) { |
|
|
|
} else if (addManage.parameterValue ===1||addManage.parameterValue ===6||addManage.parameterValue ===7||addManage.parameterValue ===16) { |
|
|
|
message.error('请输入参数项') |
|
|
|
} else if(!pattern1.test(addManage.parameter)||pattern.test(addManage.parameter)){ |
|
|
|
message.error('禁止输入特殊符号,负数且只能保留两位小数点') |
|
|
|
} else { |
|
|
|
ajax.addBusiness(data).then(res => { |
|
|
|
if (res.status === 20000) { |
|
|
@ -266,10 +271,10 @@ function BusinessConf(props) { |
|
|
|
area_id: "0", |
|
|
|
operator_id: "0", |
|
|
|
item_id: '', |
|
|
|
parameter:'', |
|
|
|
parameterValue:1, |
|
|
|
parameter_exit:'', |
|
|
|
parameter_exit_pda:'' |
|
|
|
parameter: '', |
|
|
|
parameterValue: 1, |
|
|
|
parameter_exit: '', |
|
|
|
parameter_exit_pda: '' |
|
|
|
}) |
|
|
|
const CheckApplyBtn = (record) => { |
|
|
|
setGetAdminId(record) |
|
|
@ -394,27 +399,27 @@ function BusinessConf(props) { |
|
|
|
id: getAdminId.id, |
|
|
|
...geteditData |
|
|
|
} |
|
|
|
console.log(geteditData); |
|
|
|
console.log(geteditData); |
|
|
|
if (geteditData.area_name === '') { |
|
|
|
message.error('请选择城市') |
|
|
|
} else if (geteditData.operator_name === '') { |
|
|
|
message.error('请选择商户名称') |
|
|
|
} else if (geteditData.item_name === '') { |
|
|
|
message.error('请选择配置项') |
|
|
|
} else if (geteditData.parameter === '' && (geteditData.item_id != 1 &&geteditData.item_id != 11 && geteditData.item_id!=8)) { |
|
|
|
} else if (geteditData.parameter === '' && (geteditData.item_id != 1 && geteditData.item_id != 11 && geteditData.item_id != 8)) { |
|
|
|
message.error('请输入参数项') |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
ajax.editBusiness(data).then(res => { |
|
|
|
if (res.status === 20000) { |
|
|
|
setEditVisible(false) |
|
|
|
getData(formData) |
|
|
|
setGetConfiguration(0) |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
message.error(res.message) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//角色 |
|
|
@ -555,7 +560,7 @@ function BusinessConf(props) { |
|
|
|
{ |
|
|
|
getConfiguration === 0 || getConfiguration === 2 || getConfiguration === 3 || getConfiguration === 4 || getConfiguration === 5 |
|
|
|
|| getConfiguration === 9 || getConfiguration === 10 || getConfiguration === 12 || getConfiguration === 13 |
|
|
|
|| getConfiguration === 14 || getConfiguration === 15 || getConfiguration === 16|| getConfiguration === 17 |
|
|
|
|| getConfiguration === 14 || getConfiguration === 15 || getConfiguration === 16 || getConfiguration === 17 |
|
|
|
|
|
|
|
? |
|
|
|
<> |
|
|
@ -565,6 +570,7 @@ function BusinessConf(props) { |
|
|
|
<Input |
|
|
|
placeholder="请输入" |
|
|
|
value={addManage.parameter} |
|
|
|
min={0} |
|
|
|
style={{ width: 260, marginLeft: 50 }} |
|
|
|
onChange={handleParameter} |
|
|
|
/> |
|
|
@ -611,11 +617,11 @@ function BusinessConf(props) { |
|
|
|
{ |
|
|
|
getType == 1 ? |
|
|
|
<> |
|
|
|
<Radio.Group onChange={onChangehoose} value={addManage.parameter_exit}> |
|
|
|
<Radio.Group onChange={onChangehoose} value={addManage.parameter_exit}> |
|
|
|
<Radio value={3}>自动出场</Radio> |
|
|
|
</Radio.Group> |
|
|
|
<Radio.Group onChange={onChangeAddTypeValue} value={addManage.parameter_exit_pda}> |
|
|
|
<Radio value={4}>PDA确认出场</Radio> |
|
|
|
<Radio.Group onChange={onChangeAddTypeValue} value={addManage.parameter_exit_pda}> |
|
|
|
<Radio value={4}>PDA确认出场</Radio> |
|
|
|
</Radio.Group> |
|
|
|
</> |
|
|
|
: '' |
|
|
@ -848,7 +854,7 @@ function BusinessConf(props) { |
|
|
|
> |
|
|
|
<div className="addAdmin"> |
|
|
|
<div className="yisa-search"> |
|
|
|
<div className="redLogo">*</div> |
|
|
|
<div className="redLogo">*</div> |
|
|
|
<label>城市</label> |
|
|
|
<Select |
|
|
|
style={{ width: 260, marginLeft: 50 }} |
|
|
@ -864,7 +870,7 @@ function BusinessConf(props) { |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="yisa-search"> |
|
|
|
<div className="redLogo">*</div> |
|
|
|
<div className="redLogo">*</div> |
|
|
|
<label>商户名称</label> |
|
|
|
<Select |
|
|
|
style={{ width: 260, marginLeft: 22 }} |
|
|
@ -880,7 +886,7 @@ function BusinessConf(props) { |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="yisa-search"> |
|
|
|
<div className="redLogo">*</div> |
|
|
|
<div className="redLogo">*</div> |
|
|
|
<label>配置项</label> |
|
|
|
<Select |
|
|
|
style={{ width: 260, marginLeft: 35 }} |
|
|
@ -891,7 +897,7 @@ function BusinessConf(props) { |
|
|
|
setGetMessage(option); |
|
|
|
setGetConfiguration(v) |
|
|
|
setGetEditData( |
|
|
|
Object.assign({}, geteditData, { item_id: v, area_id: "0", operator_id: "0", parameter:'', parameterValue:1}) |
|
|
|
Object.assign({}, geteditData, { item_id: v, area_id: "0", operator_id: "0", parameter: '', parameterValue: 1 }) |
|
|
|
); |
|
|
|
console.log(geteditData); |
|
|
|
}} |
|
|
@ -908,7 +914,7 @@ function BusinessConf(props) { |
|
|
|
? |
|
|
|
<> |
|
|
|
<div className="yisa-search" > |
|
|
|
<div className="redLogo">*</div> |
|
|
|
<div className="redLogo">*</div> |
|
|
|
<label>参数</label> |
|
|
|
<Input |
|
|
|
placeholder="请输入" |
|
|
|