|
@@ -2138,16 +2138,12 @@ const Task = React.createClass({
|
|
},
|
|
},
|
|
// 项目发起外包
|
|
// 项目发起外包
|
|
sureOut() {
|
|
sureOut() {
|
|
- console.log({
|
|
|
|
- patentType:this.state.patentType,
|
|
|
|
- patentNameType:this.state.patentNameType,
|
|
|
|
- patentName:this.state.patentName,
|
|
|
|
- })
|
|
|
|
if (this.state.startType !== 0 && this.state.startType !== 1) {
|
|
if (this.state.startType !== 0 && this.state.startType !== 1) {
|
|
message.warning('请选择类型')
|
|
message.warning('请选择类型')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (this.state.refundStatus === 1) {
|
|
+ //0正常 1专利 2软著 3审计
|
|
|
|
+ if (this.state.projectType === 1) {
|
|
//专利
|
|
//专利
|
|
if (this.state.patentType === -1) {
|
|
if (this.state.patentType === -1) {
|
|
message.warning('请选择专利类型')
|
|
message.warning('请选择专利类型')
|
|
@@ -2168,30 +2164,20 @@ const Task = React.createClass({
|
|
message.warning('备注不能为空')
|
|
message.warning('备注不能为空')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (this.state.pictureUrl.length === 0) {
|
|
+ console.log(this.state.pictureUrl)
|
|
|
|
+ if (!this.state.pictureUrl && !Array.isArray(this.state.pictureUrl)) {
|
|
|
|
+ message.warning('合同扫描件不能为空')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(this.state.pictureUrl.length === 0){
|
|
message.warning('合同扫描件不能为空')
|
|
message.warning('合同扫描件不能为空')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
this.setState({
|
|
this.setState({
|
|
loading: true,
|
|
loading: true,
|
|
})
|
|
})
|
|
- // setTimeout(() => {
|
|
|
|
- // this.setState({
|
|
|
|
- // loading: true,
|
|
|
|
- // })
|
|
|
|
- // /* this.setState(
|
|
|
|
- // {
|
|
|
|
- // ContactsListsNew: this.state.ContactsListsNew.map((item) => {
|
|
|
|
- // if (item.title != '操作') {
|
|
|
|
- // this.state.ContactsListsNew.push(item)
|
|
|
|
- // }
|
|
|
|
- // }),
|
|
|
|
- // },
|
|
|
|
- // () => {
|
|
|
|
- // console.log('this.state.contactListNew', this.state.contactListNew)
|
|
|
|
- // }
|
|
|
|
- // ) */
|
|
|
|
- // }, 3000)
|
|
|
|
|
|
|
|
let data = {
|
|
let data = {
|
|
tid: this.state.id,
|
|
tid: this.state.id,
|
|
@@ -2203,16 +2189,18 @@ const Task = React.createClass({
|
|
pictureUrl: this.getUrl(this.state.pictureUrl).length
|
|
pictureUrl: this.getUrl(this.state.pictureUrl).length
|
|
? this.getUrl(this.state.pictureUrl)
|
|
? this.getUrl(this.state.pictureUrl)
|
|
: '',
|
|
: '',
|
|
- patentNameType:this.state.patentNameType,
|
|
|
|
- patentName:this.state.patentName,
|
|
|
|
outsourceRemarks: this.state.outsourceRemarks,
|
|
outsourceRemarks: this.state.outsourceRemarks,
|
|
unitNumber: this.state.unitNumber,
|
|
unitNumber: this.state.unitNumber,
|
|
unitPrice: this.state.unitPrice,
|
|
unitPrice: this.state.unitPrice,
|
|
id: this.state.refundStatus == 2 ? this.state.mid : undefined,
|
|
id: this.state.refundStatus == 2 ? this.state.mid : undefined,
|
|
}
|
|
}
|
|
|
|
|
|
- if (this.state.refundStatus === 1) {
|
|
+ if (this.state.projectType === 1) {
|
|
data.patentType = this.state.patentType;
|
|
data.patentType = this.state.patentType;
|
|
|
|
+ data.patentNameType = this.state.patentNameType;
|
|
|
|
+ if (this.state.patentNameType == 3) {
|
|
|
|
+ data.patentName = this.state.patentName;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -2563,7 +2551,7 @@ const Task = React.createClass({
|
|
let arr = data.data || []
|
|
let arr = data.data || []
|
|
let allTotalAmount = 0
|
|
let allTotalAmount = 0
|
|
let type = 0;
|
|
let type = 0;
|
|
- let type1 = 0;
|
|
+ let patentNameType = 0;
|
|
for (let i = 0; i < arr.length; i++) {
|
|
for (let i = 0; i < arr.length; i++) {
|
|
thisData = arr[i]
|
|
thisData = arr[i]
|
|
allTotalAmount =
|
|
allTotalAmount =
|
|
@@ -2587,8 +2575,10 @@ const Task = React.createClass({
|
|
costReduction: thisData.costReduction,//费减
|
|
costReduction: thisData.costReduction,//费减
|
|
officialCost: thisData.officialCost,//官费
|
|
officialCost: thisData.officialCost,//官费
|
|
type: thisData.type, //0其他 1专利申请 2专利买卖
|
|
type: thisData.type, //0其他 1专利申请 2专利买卖
|
|
|
|
+ patentType: thisData.type, //专利名称类型 0实用新型 1发明专利 2外观专利 3 其他
|
|
})
|
|
})
|
|
type=thisData.type
|
|
type=thisData.type
|
|
|
|
+ patentNameType= thisData.patentNameType
|
|
}
|
|
}
|
|
if (!allTotalAmount) {
|
|
if (!allTotalAmount) {
|
|
allTotalAmount = 0
|
|
allTotalAmount = 0
|
|
@@ -2605,6 +2595,7 @@ const Task = React.createClass({
|
|
if(type === 1 || type === 2){
|
|
if(type === 1 || type === 2){
|
|
this.setState({
|
|
this.setState({
|
|
patentType: type === 1 ? 0 : type === 2 ? 1 : -1, //0其他 1专利申请 2专利买卖
|
|
patentType: type === 1 ? 0 : type === 2 ? 1 : -1, //0其他 1专利申请 2专利买卖
|
|
|
|
+ patentNameType: patentNameType, //0实用新型 1发明专利 2外观专利 3 其他
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|