|
@@ -655,7 +655,7 @@ const Task = React.createClass({
|
|
|
},
|
|
|
//用于判断 第三方信息表格显示
|
|
|
projectTypeTabContent(projectType) {
|
|
|
- if(projectType === 0 || !projectType){ //0正常 1专利 2软著 3审计
|
|
|
+ if(projectType === 0 || !projectType || this.state.startType === 0){ //0正常 1专利 2软著 3审计 this.state.startType 0外包 1供应商 外包时当普通单处理
|
|
|
this.setState({
|
|
|
ContactsListsNew: [
|
|
|
{
|
|
@@ -4224,7 +4224,29 @@ const Task = React.createClass({
|
|
|
<Radio.Group
|
|
|
value={this.state.startType}
|
|
|
onChange={(e) => {
|
|
|
- this.setState({ startType: e.target.value })
|
|
|
+ let _this = this;
|
|
|
+ if(this.state.thirdInfoList.length >0){
|
|
|
+ confirm({
|
|
|
+ title: '确定要切换吗?',
|
|
|
+ content: '切换将删除所有第三信息和付款节点',
|
|
|
+ onOk() {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ _this.setState({ startType: e.target.value },()=>{
|
|
|
+ _this.projectTypeTabContent(_this.state.projectType);
|
|
|
+ })
|
|
|
+ _this.confirmDeletNew(-1,resolve,reject)
|
|
|
+ if(_this.state.payNodeList.length > 0){
|
|
|
+ _this.payNodeConfirmDeletNew(-1,resolve,reject);
|
|
|
+ }
|
|
|
+ }).catch(() => console.log('Oops errors!'));
|
|
|
+ },
|
|
|
+ onCancel() {},
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.setState({ startType: e.target.value },()=>{
|
|
|
+ this.projectTypeTabContent(this.state.projectType);
|
|
|
+ })
|
|
|
+ }
|
|
|
}}
|
|
|
>
|
|
|
<Radio value={0}>外包(不走总部)</Radio>
|
|
@@ -4373,12 +4395,12 @@ const Task = React.createClass({
|
|
|
<Button
|
|
|
type="primary"
|
|
|
onClick={(e) => {
|
|
|
- if(this.state.projectType === 1 && this.state.patentType === -1){
|
|
|
+ //this.state.startType 0外包 1供应商 类型为外包时,当普通单
|
|
|
+ if(this.state.projectType === 1 && this.state.patentType === -1 && this.state.startType === 1){
|
|
|
message.info('请先选择专利类型');
|
|
|
- }else if(this.state.projectType === 1 && this.state.patentNameType === -1){
|
|
|
+ }else if(this.state.projectType === 1 && this.state.patentNameType === -1 && this.state.startType === 1){
|
|
|
message.info('请先选择专利名称');
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else{
|
|
|
this.addThirdList()
|
|
|
}
|
|
|
}}
|
|
@@ -4417,10 +4439,11 @@ const Task = React.createClass({
|
|
|
</Form>
|
|
|
</Spin>
|
|
|
</div>
|
|
|
- {/*如果是软著类或者专利类的专利申请,隐藏付款节点*/}
|
|
|
+ {/*如果是软著类或者专利类的专利申请,隐藏付款节点 但当为外包类型时,无需隐藏*/}
|
|
|
+ {/*this.state.startType 0外包 1供应商*/}
|
|
|
<div
|
|
|
style={{
|
|
|
- display: (this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block', //0正常 1专利 2软著 3审计
|
|
|
+ display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
|
|
|
}}
|
|
|
>
|
|
|
<span
|
|
@@ -4437,7 +4460,7 @@ const Task = React.createClass({
|
|
|
marginLeft: 10,
|
|
|
color: 'red',
|
|
|
}}
|
|
|
- ></span>
|
|
|
+ />
|
|
|
<Button
|
|
|
type="primary"
|
|
|
onClick={(e) => {
|
|
@@ -4452,11 +4475,11 @@ const Task = React.createClass({
|
|
|
+新增付款节点
|
|
|
</Button>
|
|
|
</div>
|
|
|
- {/*如果是软著类或者专利类的专利申请,隐藏付款节点*/}
|
|
|
+ {/*如果是软著类或者专利类的专利申请,隐藏付款节点 但当为外包类型时,无需隐藏*/}
|
|
|
<div
|
|
|
className="clearfix"
|
|
|
style={{
|
|
|
- display: (this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block', //0正常 1专利 2软著 3审计
|
|
|
+ display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
|
|
|
}}
|
|
|
>
|
|
|
<Spin spinning={this.state.loading}>
|
|
@@ -5478,7 +5501,29 @@ const Task = React.createClass({
|
|
|
<Radio.Group
|
|
|
value={this.state.startType}
|
|
|
onChange={(e) => {
|
|
|
- this.setState({ startType: e.target.value })
|
|
|
+ let _this = this;
|
|
|
+ if(this.state.thirdInfoList.length >0){
|
|
|
+ confirm({
|
|
|
+ title: '确定要切换吗?',
|
|
|
+ content: '切换将删除所有第三信息和付款节点',
|
|
|
+ onOk() {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ _this.setState({ startType: e.target.value },()=>{
|
|
|
+ _this.projectTypeTabContent(_this.state.projectType);
|
|
|
+ })
|
|
|
+ _this.confirmDeletNew(-1,resolve,reject)
|
|
|
+ if(_this.state.payNodeList.length > 0){
|
|
|
+ _this.payNodeConfirmDeletNew(-1,resolve,reject);
|
|
|
+ }
|
|
|
+ }).catch(() => console.log('Oops errors!'));
|
|
|
+ },
|
|
|
+ onCancel() {},
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.setState({ startType: e.target.value },()=>{
|
|
|
+ this.projectTypeTabContent(this.state.projectType);
|
|
|
+ })
|
|
|
+ }
|
|
|
}}
|
|
|
>
|
|
|
<Radio value={0}>外包(不走总部)</Radio>
|
|
@@ -5627,12 +5672,12 @@ const Task = React.createClass({
|
|
|
<Button
|
|
|
type="primary"
|
|
|
onClick={(e) => {
|
|
|
- if(this.state.projectType === 1 && this.state.patentType === -1){
|
|
|
+ //this.state.startType 类型为外包时,当普通单
|
|
|
+ if(this.state.projectType === 1 && this.state.patentType === -1 && this.state.startType === 1){
|
|
|
message.info('请先选择专利类型');
|
|
|
- }else if(this.state.projectType === 1 && this.state.patentNameType === -1){
|
|
|
+ }else if(this.state.projectType === 1 && this.state.patentNameType === -1 && this.state.startType === 1){
|
|
|
message.info('请先选择专利名称');
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else{
|
|
|
this.addThirdList()
|
|
|
}
|
|
|
}}
|
|
@@ -5674,7 +5719,7 @@ const Task = React.createClass({
|
|
|
{/*如果是软著类或者专利类的专利申请,隐藏付款节点*/}
|
|
|
<div
|
|
|
style={{
|
|
|
- display: (this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block', //0正常 1专利 2软著 3审计
|
|
|
+ display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
|
|
|
}}
|
|
|
>
|
|
|
<span
|
|
@@ -5691,7 +5736,7 @@ const Task = React.createClass({
|
|
|
marginLeft: 10,
|
|
|
color: 'red',
|
|
|
}}
|
|
|
- ></span>
|
|
|
+ />
|
|
|
<Button
|
|
|
type="primary"
|
|
|
onClick={(e) => {
|
|
@@ -5706,11 +5751,11 @@ const Task = React.createClass({
|
|
|
+新增付款节点
|
|
|
</Button>
|
|
|
</div>
|
|
|
- {/*如果是软著类或者专利类的专利申请,隐藏付款节点*/}
|
|
|
+ {/*如果是软著类或者专利类的专利申请,隐藏付款节点但当为外包类型时,无需隐藏*/}
|
|
|
<div
|
|
|
className="clearfix"
|
|
|
style={{
|
|
|
- display: (this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block', //0正常 1专利 2软著 3审计
|
|
|
+ display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
|
|
|
}}
|
|
|
>
|
|
|
<Spin spinning={this.state.loading}>
|
|
@@ -6048,7 +6093,7 @@ const Task = React.createClass({
|
|
|
ThirdId={this.state.ThirdId}
|
|
|
tid={this.state.tid}
|
|
|
patentType={this.state.patentType}
|
|
|
- projectType={this.state.projectType}
|
|
|
+ projectType={this.state.startType === 0 ? 0 : this.state.projectType}
|
|
|
thirdCompanyName={this.state.thirdCompanyName}
|
|
|
thirdUnitPrice={this.state.thirdUnitPrice}
|
|
|
thirdQuantity={this.state.thirdQuantity}
|