From 3e3b40fd0596debc69f6478bc4aed3d1915ccecc Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Sat, 20 Nov 2021 13:43:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=86=E9=94=80=E5=95=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/distributor/add/add.js | 15 ++++++++++----- .../adddistributorinfo/adddistributorinfo.js | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/pages/distributor/add/add.js b/src/pages/distributor/add/add.js index d1c5b7d1..a99d5313 100644 --- a/src/pages/distributor/add/add.js +++ b/src/pages/distributor/add/add.js @@ -19,8 +19,8 @@ export default class acclist extends React.Component{ //去调子组件的方法 activeFn(){ let valiform=this.refs.disbutorForm.submit(); - console.log(99,this.refs.disbutorForm.state.rules); - console.log(8888888,this.refs.disbutorForm.state.model); + console.log('是否通过',valiform); + console.log('是否通过data',this.refs.disbutorForm.state); let formInfo=this.refs.disbutorForm.state.model; let iptVal=this.state.model; let _this=this; @@ -33,11 +33,16 @@ export default class acclist extends React.Component{ content: _this.props.enumer==0?(
是否新增[{formInfo.name}]分销商?
):(是否修改[{formInfo.name}]分销商信息?
), onConfirm:()=>{ //提交接口 - let data=_.cloneDeep(formInfo); + let data=_.cloneDeep(formInfo); if(_this.state.headImg){ data.head_img=_this.refs.disbutorForm.state.headImg; - } - if(_this.props.enumer==0){ + } + data.salesman_id=formInfo.salesman_id.key; + data.salesman_name=formInfo.salesman_id.text; + data.company_id=formInfo.company_id.key; + data.company_name=formInfo.company_id.text; + console.log(data); + if(_this.props.enumer==0){ postCreateReseller(data).then(res=>{ handelResponse(res,(response,msg)=>{ Notify.clear(); diff --git a/src/pages/distributor/adddistributorinfo/adddistributorinfo.js b/src/pages/distributor/adddistributorinfo/adddistributorinfo.js index 765b3d73..9a2fdfb5 100644 --- a/src/pages/distributor/adddistributorinfo/adddistributorinfo.js +++ b/src/pages/distributor/adddistributorinfo/adddistributorinfo.js @@ -91,7 +91,7 @@ export default class adduserinfo extends React.Component{ submit(){ this.refs.form1.validator() - console.log(this.state.model); + console.log(11,this.state.model); } //选择图片