|
@@ -14,19 +14,23 @@ class PatentSchedule extends Component{
|
|
title: '批次',
|
|
title: '批次',
|
|
dataIndex: 'key',
|
|
dataIndex: 'key',
|
|
key: 'key',
|
|
key: 'key',
|
|
|
|
+ render: (text, record,index) => {
|
|
|
|
+ return index+1;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '专利号',
|
|
title: '专利号',
|
|
dataIndex: 'patentNo',
|
|
dataIndex: 'patentNo',
|
|
key: 'patentNo',
|
|
key: 'patentNo',
|
|
- render: (text, record) => {
|
|
|
|
|
|
+ render: (text, record,index) => {
|
|
return !record.isChange ? text : <Input
|
|
return !record.isChange ? text : <Input
|
|
|
|
+ value={text}
|
|
size={'small'}
|
|
size={'small'}
|
|
style={{
|
|
style={{
|
|
width: '100px'
|
|
width: '100px'
|
|
}}
|
|
}}
|
|
onChange={(e)=>{
|
|
onChange={(e)=>{
|
|
- this.changeEvidence(e.target.value,record.key,'patentNo')
|
|
|
|
|
|
+ this.changeEvidence(e.target.value,index,'patentNo')
|
|
}}/>
|
|
}}/>
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -34,11 +38,13 @@ class PatentSchedule extends Component{
|
|
title: '专利名称',
|
|
title: '专利名称',
|
|
dataIndex: 'patentName',
|
|
dataIndex: 'patentName',
|
|
key: 'patentName',
|
|
key: 'patentName',
|
|
- render: (text, record) => {
|
|
|
|
- return !record.isChange ? text : <Input style={{
|
|
|
|
- width: '100px'
|
|
|
|
- }} size={'small'} onChange={(e)=>{
|
|
|
|
- this.changeEvidence(e.target.value,record.key,'patentName')
|
|
|
|
|
|
+ render: (text, record,index) => {
|
|
|
|
+ return !record.isChange ? text : <Input
|
|
|
|
+ value={text}
|
|
|
|
+ style={{width: '100px'}}
|
|
|
|
+ size={'small'}
|
|
|
|
+ onChange={(e)=>{
|
|
|
|
+ this.changeEvidence(e.target.value,index,'patentName')
|
|
}}/>
|
|
}}/>
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -46,8 +52,11 @@ class PatentSchedule extends Component{
|
|
title: '受理时间',
|
|
title: '受理时间',
|
|
dataIndex: 'acceptTimes',
|
|
dataIndex: 'acceptTimes',
|
|
key: 'acceptTimes',
|
|
key: 'acceptTimes',
|
|
- render: (text, record) => {
|
|
|
|
|
|
+ render: (text, record,index) => {
|
|
return !record.isChange ? text : <DatePicker
|
|
return !record.isChange ? text : <DatePicker
|
|
|
|
+ value={
|
|
|
|
+ text ? moment(text) : null
|
|
|
|
+ }
|
|
size={'small'}
|
|
size={'small'}
|
|
style={{
|
|
style={{
|
|
marginTop: '4px',
|
|
marginTop: '4px',
|
|
@@ -56,7 +65,7 @@ class PatentSchedule extends Component{
|
|
showTime
|
|
showTime
|
|
format="YYYY-MM-DD"
|
|
format="YYYY-MM-DD"
|
|
onChange={(data, dataString) => {
|
|
onChange={(data, dataString) => {
|
|
- this.changeEvidence(dataString,record.key,'acceptTimes')
|
|
|
|
|
|
+ this.changeEvidence(dataString,index,'acceptTimes')
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
}
|
|
}
|
|
@@ -65,17 +74,20 @@ class PatentSchedule extends Component{
|
|
title: '授权时间',
|
|
title: '授权时间',
|
|
dataIndex: 'authorizeTimes',
|
|
dataIndex: 'authorizeTimes',
|
|
key: 'authorizeTimes',
|
|
key: 'authorizeTimes',
|
|
- render: (text, record) => {
|
|
|
|
|
|
+ render: (text, record,index) => {
|
|
return !record.isChange ? text : <DatePicker
|
|
return !record.isChange ? text : <DatePicker
|
|
size={'small'}
|
|
size={'small'}
|
|
style={{
|
|
style={{
|
|
marginTop: '4px',
|
|
marginTop: '4px',
|
|
width: '100px'
|
|
width: '100px'
|
|
}}
|
|
}}
|
|
|
|
+ value={
|
|
|
|
+ text ? moment(text) : null
|
|
|
|
+ }
|
|
showTime
|
|
showTime
|
|
format="YYYY-MM-DD"
|
|
format="YYYY-MM-DD"
|
|
onChange={(data, dataString) => {
|
|
onChange={(data, dataString) => {
|
|
- this.changeEvidence(dataString,record.key,'authorizeTimes')
|
|
|
|
|
|
+ this.changeEvidence(dataString,index,'authorizeTimes')
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
}
|
|
}
|
|
@@ -84,8 +96,11 @@ class PatentSchedule extends Component{
|
|
title: '下证时间',
|
|
title: '下证时间',
|
|
dataIndex: 'licenceTimes',
|
|
dataIndex: 'licenceTimes',
|
|
key: 'licenceTimes',
|
|
key: 'licenceTimes',
|
|
- render: (text, record) => {
|
|
|
|
|
|
+ render: (text, record,index) => {
|
|
return !record.isChange ? text : <DatePicker
|
|
return !record.isChange ? text : <DatePicker
|
|
|
|
+ value={
|
|
|
|
+ text ? moment(text) : null
|
|
|
|
+ }
|
|
size={'small'}
|
|
size={'small'}
|
|
style={{
|
|
style={{
|
|
marginTop: '4px',
|
|
marginTop: '4px',
|
|
@@ -94,19 +109,20 @@ class PatentSchedule extends Component{
|
|
showTime
|
|
showTime
|
|
format="YYYY-MM-DD"
|
|
format="YYYY-MM-DD"
|
|
onChange={(data, dataString) => {
|
|
onChange={(data, dataString) => {
|
|
- this.changeEvidence(dataString,record.key,'licenceTimes')
|
|
|
|
|
|
+ this.changeEvidence(dataString,index,'licenceTimes')
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '通过/驳回',
|
|
|
|
|
|
+ title: '状态',
|
|
dataIndex: 'status',
|
|
dataIndex: 'status',
|
|
key: 'status',
|
|
key: 'status',
|
|
- render: (text, record) => {
|
|
|
|
- return !record.isChange ? text === 1 ? '通过' : '驳回' : <Select size={'small'} onChange={(v)=>{
|
|
|
|
- this.changeEvidence(v,record.key,'status')
|
|
|
|
|
|
+ render: (text, record,index) => {
|
|
|
|
+ return !record.isChange ? text === 0 ? '待审核' : text === 1 ? '通过' : '驳回' : <Select style={{width:'80px'}} value={text} size={'small'} onChange={(v)=>{
|
|
|
|
+ this.changeEvidence(v,index,'status')
|
|
}}>
|
|
}}>
|
|
|
|
+ <Option value={0}>待审核</Option>
|
|
<Option value={1}>通过</Option>
|
|
<Option value={1}>通过</Option>
|
|
<option value={2}>驳回</option>
|
|
<option value={2}>驳回</option>
|
|
</Select>
|
|
</Select>
|
|
@@ -116,7 +132,7 @@ class PatentSchedule extends Component{
|
|
title: '操作',
|
|
title: '操作',
|
|
dataIndex: 'h',
|
|
dataIndex: 'h',
|
|
key: 'h',
|
|
key: 'h',
|
|
- render: (text, record) => {
|
|
|
|
|
|
+ render: (text, record,index) => {
|
|
return (
|
|
return (
|
|
<span>
|
|
<span>
|
|
<Button
|
|
<Button
|
|
@@ -130,7 +146,7 @@ class PatentSchedule extends Component{
|
|
onClick={()=>{
|
|
onClick={()=>{
|
|
let _this = this;
|
|
let _this = this;
|
|
if(record.isChange){
|
|
if(record.isChange){
|
|
- this.state.dataSource.splice(record.key-1,1)
|
|
|
|
|
|
+ this.state.dataSource.splice(index,1)
|
|
this.setState({
|
|
this.setState({
|
|
dataSource: this.state.dataSource
|
|
dataSource: this.state.dataSource
|
|
})
|
|
})
|
|
@@ -147,9 +163,23 @@ class PatentSchedule extends Component{
|
|
>
|
|
>
|
|
删除
|
|
删除
|
|
</Button>
|
|
</Button>
|
|
- {record.isChange &&<Button size={'small'} type='primary' onClick={()=>{
|
|
|
|
- this.createTaskProgress(record);
|
|
|
|
- console.log(record)
|
|
|
|
|
|
+ {record.id && <Button size={'small'} type='primary' onClick={()=>{
|
|
|
|
+ this.state.dataSource[index]['isChange'] = true
|
|
|
|
+ this.setState({
|
|
|
|
+ dataSource: this.state.dataSource
|
|
|
|
+ })
|
|
|
|
+ }}>修改</Button>}
|
|
|
|
+ {record.isChange &&<Button size={'small'} style={{
|
|
|
|
+ marginLeft:'10px',
|
|
|
|
+ color: '#ffffff',
|
|
|
|
+ background: '#4ad028',
|
|
|
|
+ border: 'none',
|
|
|
|
+ }} onClick={()=>{
|
|
|
|
+ if(record.id){
|
|
|
|
+ this.changeTaskProgress(record);
|
|
|
|
+ }else{
|
|
|
|
+ this.createTaskProgress(record);
|
|
|
|
+ }
|
|
}}>保存</Button> }
|
|
}}>保存</Button> }
|
|
</span>
|
|
</span>
|
|
)
|
|
)
|
|
@@ -185,10 +215,12 @@ class PatentSchedule extends Component{
|
|
this.createTaskProgress = this.createTaskProgress.bind(this);
|
|
this.createTaskProgress = this.createTaskProgress.bind(this);
|
|
this.selectTaskProgressLog = this.selectTaskProgressLog.bind(this);
|
|
this.selectTaskProgressLog = this.selectTaskProgressLog.bind(this);
|
|
this.delectTaskProgress = this.delectTaskProgress.bind(this);
|
|
this.delectTaskProgress = this.delectTaskProgress.bind(this);
|
|
|
|
+ this.changeTaskProgress = this.changeTaskProgress.bind(this);
|
|
|
|
+ this.loaduserss = this.loaduserss.bind(this);
|
|
}
|
|
}
|
|
|
|
|
|
changeEvidence(value,index,key){
|
|
changeEvidence(value,index,key){
|
|
- this.state.dataSource[index-1][key] = value;
|
|
|
|
|
|
+ this.state.dataSource[index][key] = value;
|
|
this.setState({
|
|
this.setState({
|
|
dataSource: this.state.dataSource
|
|
dataSource: this.state.dataSource
|
|
})
|
|
})
|
|
@@ -196,16 +228,31 @@ class PatentSchedule extends Component{
|
|
|
|
|
|
//新增申报进度
|
|
//新增申报进度
|
|
createTaskProgress(record) {
|
|
createTaskProgress(record) {
|
|
- delete record.isChange;
|
|
|
|
- delete record.key;
|
|
|
|
- record.taskId = this.props.taskId;
|
|
|
|
- record.alreadyNumber = 1;
|
|
|
|
|
|
+ if(!record.patentNo){
|
|
|
|
+ message.warning('请填写专利号');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if(!record.patentName){
|
|
|
|
+ message.warning('请填写专利名称');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if(typeof record.status !== 'number'){
|
|
|
|
+ message.warning('请选择状态');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ let _this = this;
|
|
|
|
+ let data = Object.assign({},record);
|
|
|
|
+ delete data.isChange;
|
|
|
|
+ delete data.key;
|
|
|
|
+ data.taskId = this.props.taskId;
|
|
|
|
+ data.alreadyNumber = 1;
|
|
|
|
+ data.type = 1;//0软著 1专利
|
|
$.ajax({
|
|
$.ajax({
|
|
method: 'post',
|
|
method: 'post',
|
|
dataType: 'json',
|
|
dataType: 'json',
|
|
crossDomain: false,
|
|
crossDomain: false,
|
|
url: globalConfig.context + '/api/admin/orderProject/createTaskProgress',
|
|
url: globalConfig.context + '/api/admin/orderProject/createTaskProgress',
|
|
- data: record,
|
|
|
|
|
|
+ data: data,
|
|
success: function (data) {
|
|
success: function (data) {
|
|
if (data.error.length) {
|
|
if (data.error.length) {
|
|
if (data.error && data.error.length) {
|
|
if (data.error && data.error.length) {
|
|
@@ -213,6 +260,9 @@ class PatentSchedule extends Component{
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
message.success('添加成功');
|
|
message.success('添加成功');
|
|
|
|
+ delete record.isChange;
|
|
|
|
+ delete record.key;
|
|
|
|
+ _this.loaduserss();
|
|
}
|
|
}
|
|
}.bind(this),
|
|
}.bind(this),
|
|
}).always(
|
|
}).always(
|
|
@@ -263,6 +313,54 @@ class PatentSchedule extends Component{
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //修改申报进度
|
|
|
|
+ changeTaskProgress(record) {
|
|
|
|
+ if(!record.patentNo){
|
|
|
|
+ message.warning('请填写专利号');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if(!record.patentName){
|
|
|
|
+ message.warning('请填写专利名称');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if(typeof record.status !== 'number'){
|
|
|
|
+ message.warning('请选择状态');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ let _this = this;
|
|
|
|
+ let data = Object.assign({},record);
|
|
|
|
+ delete data.isChange;
|
|
|
|
+ delete data.key;
|
|
|
|
+ data.taskId = this.props.taskId;
|
|
|
|
+ data.alreadyNumber = 1;
|
|
|
|
+ data.type = 1;//0软著 1专利
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: 'post',
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ url: globalConfig.context + '/api/admin/orderProject/updateTaskProgress',
|
|
|
|
+ data: data,
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if (data.error.length) {
|
|
|
|
+ if (data.error && data.error.length) {
|
|
|
|
+ message.warning(data.error[0].message)
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ message.success('添加成功');
|
|
|
|
+ delete record.isChange;
|
|
|
|
+ delete record.key;
|
|
|
|
+ _this.loaduserss();
|
|
|
|
+ }
|
|
|
|
+ }.bind(this),
|
|
|
|
+ }).always(
|
|
|
|
+ function () {
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: false,
|
|
|
|
+ })
|
|
|
|
+ }.bind(this)
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+
|
|
// 删除申报进度
|
|
// 删除申报进度
|
|
delectTaskProgress(id) {
|
|
delectTaskProgress(id) {
|
|
this.setState({
|
|
this.setState({
|
|
@@ -294,8 +392,39 @@ class PatentSchedule extends Component{
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
- componentDidMount() {
|
|
|
|
|
|
+ //查看下证信息
|
|
|
|
+ loaduserss() {
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: 'get',
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ url: globalConfig.context + '/api/admin/orderProject/selectTaskProgress',
|
|
|
|
+ data: {
|
|
|
|
+ tid: this.props.taskId,
|
|
|
|
+ },
|
|
|
|
+ success: function (data) {
|
|
|
|
+ let thisData = []
|
|
|
|
+ if (!thisData) {
|
|
|
|
+ if (data.error && data.error.length) {
|
|
|
|
+ message.warning(data.error[0].message)
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.setState({
|
|
|
|
+ dataSource: data.data,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }.bind(this),
|
|
|
|
+ }).always(
|
|
|
|
+ function () {
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: false,
|
|
|
|
+ })
|
|
|
|
+ }.bind(this)
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ componentDidMount() {
|
|
|
|
+ this.loaduserss();
|
|
}
|
|
}
|
|
|
|
|
|
render() {
|
|
render() {
|
|
@@ -309,15 +438,20 @@ class PatentSchedule extends Component{
|
|
color: '#000',
|
|
color: '#000',
|
|
fontWeight: 400,
|
|
fontWeight: 400,
|
|
}}>
|
|
}}>
|
|
- <div style={{paddingRight:'10px'}}>派单项目数:20</div>
|
|
|
|
- <div style={{paddingRight:'10px'}}>受理数:20</div>
|
|
|
|
- <div style={{paddingRight:'10px'}}>下证数(即授权数):20</div>
|
|
|
|
- <div>驳回数:20</div>
|
|
|
|
|
|
+ <div style={{paddingRight:'10px'}}>派单项目数:{this.props.commodityQuantity}</div>
|
|
|
|
+ <div style={{paddingRight:'10px'}}>受理数:{this.props.acceptCount}</div>
|
|
|
|
+ <div style={{paddingRight:'10px'}}>下证数(即授权数):{this.props.authorizeCount}</div>
|
|
|
|
+ <div>驳回数:{this.props. rejectCount}</div>
|
|
<div style={{display:'flex',alignItems:'center',marginLeft:'auto'}}>
|
|
<div style={{display:'flex',alignItems:'center',marginLeft:'auto'}}>
|
|
- <Button
|
|
|
|
|
|
+ {!this.props.readOnly ? <Button
|
|
type="primary"
|
|
type="primary"
|
|
style={{ marginRight: '15px' }}
|
|
style={{ marginRight: '15px' }}
|
|
onClick={()=>{
|
|
onClick={()=>{
|
|
|
|
+ let arr = this.state.dataSource.filter((v)=>v.isChange)
|
|
|
|
+ if(arr.length > 0){
|
|
|
|
+ message.warning('已存在未保存项,请先保存!')
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.state.dataSource.push({
|
|
this.state.dataSource.push({
|
|
key: this.state.dataSource.length+1,
|
|
key: this.state.dataSource.length+1,
|
|
isChange: true,
|
|
isChange: true,
|
|
@@ -328,7 +462,7 @@ class PatentSchedule extends Component{
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
增加专利信息
|
|
增加专利信息
|
|
- </Button>
|
|
|
|
|
|
+ </Button> : null}
|
|
<Button
|
|
<Button
|
|
type="primary"
|
|
type="primary"
|
|
onClick={()=>{
|
|
onClick={()=>{
|
|
@@ -343,8 +477,6 @@ class PatentSchedule extends Component{
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style={{
|
|
<div style={{
|
|
- paddingLeft: '7%',
|
|
|
|
- paddingRight: '10%',
|
|
|
|
paddingTop:'10px'
|
|
paddingTop:'10px'
|
|
}}>
|
|
}}>
|
|
<Spin spinning={this.state.progressLogLoading}>
|
|
<Spin spinning={this.state.progressLogLoading}>
|