This commit is contained in:
zhangds 2024-05-16 17:30:37 +08:00
parent 09a14079dd
commit 6290afbf62
6 changed files with 21 additions and 35 deletions

View File

@ -1,29 +1,24 @@
import React from "react"; import React from "react"
import "./main.less"; import "./main.less"
export default class filterSelect extends React.Component { export default class filterSelect extends React.Component {
static defaultProps = { static defaultProps = {
required: "*" required: "*"
}; }
constructor(props) { constructor(props) {
super(props); super(props)
} }
render() { render() {
const { labelname, prop, labelwidth, myClassName, id, required } = const { labelname, prop, labelwidth, myClassName, id, required, noLabel } = this.props
this.props;
return ( return (
<div <div className={myClassName ? myClassName + " form-Item" : "form-Item"} id={id ? id : null}>
className={myClassName ? myClassName + " form-Item" : "form-Item"} <div className="form-label" style={{ width: labelwidth ? labelwidth : "180px" }}>
id={id ? id : null}>
<div
className='form-label'
style={{ width: labelwidth ? labelwidth : "180px" }}>
{labelname} {labelname}
{required ? <span className='mustwrite'>*</span> : null} {required ? <span className="mustwrite">*</span> : null}
</div> </div>
<div className='form-compontent'>{this.props.children}</div> <div className="form-compontent">{this.props.children}</div>
<div className='form-expand'>{this.props.expand}</div> <div className="form-expand">{this.props.expand}</div>
</div> </div>
); )
} }
} }

View File

@ -954,7 +954,7 @@ export default class addKnockGold extends Component {
{/* 批量需改主体 */} {/* 批量需改主体 */}
{this.state.subjectList.length > 0 ? ( {this.state.subjectList.length > 0 ? (
<FormItem> <FormItem noLabel={true} required={false} labelwidth="0px">
<VoucherBatch <VoucherBatch
ref="voucherBatchRef" ref="voucherBatchRef"
isEdit={!!this.props.data?.id} isEdit={!!this.props.data?.id}

View File

@ -270,8 +270,8 @@ const VoucherBatch = forwardRef((props, ref) => {
return ( return (
<div> <div>
<div style={{ margin: "20px 0 10px 0", display: "flex", alignItems: "center" }}> <div style={{ margin: "20px 0px 10px 0px", display: "flex", alignItems: "center" }}>
<span style={{ paddingLeft: "21px" }}> <span style={{ paddingLeft: "0" }}>
立减金平台批次号<span style={{ color: "red" }}>*</span> 立减金平台批次号<span style={{ color: "red" }}>*</span>
</span> </span>
<Button style={{ margin: "0px 0 0px 46px" }} type="primary" onClick={addVoucherBatch}> <Button style={{ margin: "0px 0 0px 46px" }} type="primary" onClick={addVoucherBatch}>
@ -283,7 +283,7 @@ const VoucherBatch = forwardRef((props, ref) => {
</Button> */} </Button> */}
</div> </div>
<div style={{ border: "1px solid #f0f0f0", margin: "0 20px 10px 20px" }}> <div style={{ border: "1px solid #f0f0f0", margin: "0 20px 10px 0px" }}>
<Grid columns={columns} datasets={datasets} size="large" /> <Grid columns={columns} datasets={datasets} size="large" />
</div> </div>
</div> </div>

View File

@ -117,6 +117,7 @@ export default class add extends React.Component {
res, res,
(req, msg) => { (req, msg) => {
try { try {
this.setState({ send_method: req.info.send_method })
//获取分销商 //获取分销商
getReseller(req.info.reseller_id).then((res) => { getReseller(req.info.reseller_id).then((res) => {
handelResponse(res, (req, msg) => { handelResponse(res, (req, msg) => {
@ -173,6 +174,7 @@ export default class add extends React.Component {
handelResponse( handelResponse(
res, res,
(req, msg) => { (req, msg) => {
this.setState({ send_method: req.info.send_method })
//获取分销商 //获取分销商
getReseller(req.info.reseller_id).then((res) => { getReseller(req.info.reseller_id).then((res) => {
handelResponse(res, (req, msg) => { handelResponse(res, (req, msg) => {

View File

@ -282,7 +282,7 @@ export default class acclist extends React.Component {
submit() { submit() {
let valide = false let valide = false
if (this.props.send_method == 2 && this.state.model.val && this.state.model.person.length < 1) { if (this.props.send_method == 2 && this.state.model.val && this.state.model.person.length < 1) {
Notify.error("请选择预警人") Notify.error("请选择预警人3")
return false return false
} }
if (this.state.expiration_type == 2 && this.state.expiration_value.length < 1) { if (this.state.expiration_type == 2 && this.state.expiration_value.length < 1) {
@ -1314,7 +1314,6 @@ export default class acclist extends React.Component {
</RadioButton> </RadioButton>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
{this.state.isload && this.props.isSettlement === 1 ? ( {this.state.isload && this.props.isSettlement === 1 ? (
<FormItem labelname="成本价" prop="key_cost_price" id="key_cost_price"> <FormItem labelname="成本价" prop="key_cost_price" id="key_cost_price">
<Ipt <Ipt
@ -1334,7 +1333,6 @@ export default class acclist extends React.Component {
/> />
</FormItem> </FormItem>
) : null} ) : null}
{this.state.isload && this.props.isSettlement === 1 ? ( {this.state.isload && this.props.isSettlement === 1 ? (
<FormItem labelname="官方价" prop="key_official_price" id="key_official_price"> <FormItem labelname="官方价" prop="key_official_price" id="key_official_price">
<Ipt <Ipt
@ -1354,7 +1352,6 @@ export default class acclist extends React.Component {
/> />
</FormItem> </FormItem>
) : null} ) : null}
{this.state.isload ? ( {this.state.isload ? (
<FormItem labelname="key批次名称" prop="batch_name" id="batch_name"> <FormItem labelname="key批次名称" prop="batch_name" id="batch_name">
<Ipt <Ipt
@ -1412,8 +1409,7 @@ export default class acclist extends React.Component {
</div> </div>
</FormItem> </FormItem>
) : null} ) : null}
{this.state.isload && this.props.send_method == 2 ? (
{this.props.send_method == 2 && this.state.isload ? (
<> <>
<FormItem labelname="库存预警值" prop="warningValue" id="warningValue" required=""> <FormItem labelname="库存预警值" prop="warningValue" id="warningValue" required="">
<div className="warningValue"> <div className="warningValue">
@ -1499,7 +1495,6 @@ export default class acclist extends React.Component {
</FormItem> </FormItem>
</> </>
) : null} ) : null}
<FormItem labelname="key码有效期" prop="expiration_type" id="expiration_type"> <FormItem labelname="key码有效期" prop="expiration_type" id="expiration_type">
<Radio.Group <Radio.Group
value={this.state.model.expiration_type} value={this.state.model.expiration_type}
@ -1513,7 +1508,6 @@ export default class acclist extends React.Component {
<Radio value={"3"}>接口调取后有效期</Radio> <Radio value={"3"}>接口调取后有效期</Radio>
</Radio.Group> </Radio.Group>
</FormItem> </FormItem>
{this.state.model.expiration_type === "2" ? ( {this.state.model.expiration_type === "2" ? (
<FormItem labelname="固定时间段"> <FormItem labelname="固定时间段">
<DateRangePicker <DateRangePicker
@ -1531,7 +1525,6 @@ export default class acclist extends React.Component {
/> />
</FormItem> </FormItem>
) : null} ) : null}
{this.state.model.expiration_type === "3" ? ( {this.state.model.expiration_type === "3" ? (
<FormItem labelname="接口调取后有效期"> <FormItem labelname="接口调取后有效期">
<Input <Input
@ -1568,7 +1561,6 @@ export default class acclist extends React.Component {
/> />
</FormItem> </FormItem>
) : null} ) : null}
<FormItem labelname="绑定类型" prop="bind_object" id="bind_object"> <FormItem labelname="绑定类型" prop="bind_object" id="bind_object">
<Radio.Group <Radio.Group
value={this.props.keyType} value={this.props.keyType}
@ -1584,7 +1576,6 @@ export default class acclist extends React.Component {
</Radio> </Radio>
</Radio.Group> </Radio.Group>
</FormItem> </FormItem>
<FormItem labelname="" prop="btn" required={false}> <FormItem labelname="" prop="btn" required={false}>
{this.props.keyType === 1 ? ( {this.props.keyType === 1 ? (
<> <>
@ -1637,7 +1628,6 @@ export default class acclist extends React.Component {
</Button> </Button>
)} )}
</FormItem> </FormItem>
<FormItem labelname="绑定对象" prop="grid"> <FormItem labelname="绑定对象" prop="grid">
<Grid <Grid
headBackgroud="#f9fafc" headBackgroud="#f9fafc"
@ -1696,7 +1686,6 @@ export default class acclist extends React.Component {
<RadioButton value={0}></RadioButton> <RadioButton value={0}></RadioButton>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem labelname="是否允许亏损" id="allow_loss" prop="allow_loss"> <FormItem labelname="是否允许亏损" id="allow_loss" prop="allow_loss">
<RadioGroup onChange={(e) => this.onLossChange(e)} value={this.state.model.allow_loss}> <RadioGroup onChange={(e) => this.onLossChange(e)} value={this.state.model.allow_loss}>
<RadioButton value={1}></RadioButton> <RadioButton value={1}></RadioButton>

View File

@ -691,7 +691,7 @@ const UseKeyAddEdit = () => {
// //
const exchangeCouponBtnPop = () => { const exchangeCouponBtnPop = () => {
if (model.val && model.person.length < 1) { if (model.val && model.person.length < 1) {
Notify.error("请选择预警人") Notify.error("请选择预警人1")
return false return false
} }
// //
@ -849,7 +849,7 @@ const UseKeyAddEdit = () => {
// //
const examineBtn = () => { const examineBtn = () => {
if (model.val && model.person.length < 1) { if (model.val && model.person.length < 1) {
Notify.error("请选择预警人") Notify.error("请选择预警人2")
return false return false
} }