Browse Source

完善项目详情

HW 4 years ago
parent
commit
1312e77e96

+ 29 - 24
js/component/manageCenter/project/task/myTask.jsx

@@ -4179,11 +4179,12 @@ const Task = React.createClass({
                                         authorizeCount={this.state.authorizeCount}
                                         rejectCount={this.state.rejectCount}
                                         commodityQuantity={this.state.commodityQuantity}
+                                        refresh={()=>{this.xiangqing(this.state.id)}}
                                     />
                                 </div> :
                       <div>
                           {/*高新显示  bpType: 0 正常 1专利 2软著 3审计 4双软 5高新*/}
-                          {this.state.bpType === 5 ? <FormItem
+                          {this.state.bpType === 5 ?  <FormItem
                               className="half-item"
                               {...formItemLayout}
                               label="是否抽查">
@@ -4191,17 +4192,18 @@ const Task = React.createClass({
                                 value={this.state.spotCheckStatus}
                                 onChange={(e) => {
                                   this.setState({ spotCheckStatus: e.target.value })
-                                 }}
+                                }}
                             >
                               <Radio value={0}>否</Radio>
                               <Radio value={1}>是,未通过</Radio>
                               <Radio value={2}>是,通过</Radio>
                             </Radio.Group>
                           </FormItem> : null}
+                          {this.state.bpType === 5 ? <FormItem/> : null}
                           {this.state.bpType === 5 ? <FormItem
                               className="half-item"
                               {...formItemLayout}
-                              label="立项时间"
+                              label="是否立项"
                           >
                             <Radio.Group
                                 value={this.state.setUpStatus}
@@ -4212,27 +4214,30 @@ const Task = React.createClass({
                               <Radio value={0}>否</Radio>
                               <Radio value={1}>是</Radio>
                             </Radio.Group>
-                            {
-                              this.state.setUpStatus === 1 ?
-                                  <DatePicker
-                                      style={{
-                                        marginTop: '2px',
-                                        width: '200px',
-                                        height: '32px',
-                                      }}
-                                      showTime
-                                      format="YYYY-MM-DD"
-                                      onOk={() => {}}
-                                      value={
-                                        this.state.setUpTime
-                                            ? moment(this.state.setUpTime)
-                                            : null
-                                      }
-                                      onChange={(data, dataString) => {
-                                        this.setState({ setUpTime: dataString })
-                                      }}
-                                  /> : null
-                            }
+                          </FormItem> : null}
+                          {this.state.bpType === 5 ? <FormItem
+                              className="half-item"
+                              {...formItemLayout}
+                              label={this.state.setUpStatus === 1 ? "立项时间" : ''}
+                          >
+                            {this.state.setUpStatus === 1 ?<DatePicker
+                                style={{
+                                  marginTop: '2px',
+                                  width: '200px',
+                                  height: '32px',
+                                }}
+                                showTime
+                                format="YYYY-MM-DD"
+                                onOk={() => {}}
+                                value={
+                                  this.state.setUpTime
+                                      ? moment(this.state.setUpTime)
+                                      : null
+                                }
+                                onChange={(data, dataString) => {
+                                  this.setState({ setUpTime: dataString })
+                                }}
+                            /> : null }
                           </FormItem> : null}
                           <FormItem
                             className="half-item"

+ 27 - 23
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -3899,7 +3899,7 @@ const MyTaskOutsource = React.createClass({
                             </div> :
                             <div>
                               {/*高新显示  bpType: 0 正常 1专利 2软著 3审计 4双软 5高新*/}
-                              {this.state.bpType === 5 ? <FormItem
+                              {this.state.bpType === 5 ?  <FormItem
                                   className="half-item"
                                   {...formItemLayout}
                                   label="是否抽查">
@@ -3914,10 +3914,11 @@ const MyTaskOutsource = React.createClass({
                                   <Radio value={2}>是,通过</Radio>
                                 </Radio.Group>
                               </FormItem> : null}
+                              {this.state.bpType === 5 ? <FormItem/> : null}
                               {this.state.bpType === 5 ? <FormItem
                                   className="half-item"
                                   {...formItemLayout}
-                                  label="立项时间"
+                                  label="是否立项"
                               >
                                 <Radio.Group
                                     value={this.state.setUpStatus}
@@ -3928,27 +3929,30 @@ const MyTaskOutsource = React.createClass({
                                   <Radio value={0}>否</Radio>
                                   <Radio value={1}>是</Radio>
                                 </Radio.Group>
-                                {
-                                  this.state.setUpStatus === 1 ?
-                                      <DatePicker
-                                          style={{
-                                            marginTop: '2px',
-                                            width: '200px',
-                                            height: '32px',
-                                          }}
-                                          showTime
-                                          format="YYYY-MM-DD"
-                                          onOk={() => {}}
-                                          value={
-                                            this.state.setUpTime
-                                                ? moment(this.state.setUpTime)
-                                                : null
-                                          }
-                                          onChange={(data, dataString) => {
-                                            this.setState({ setUpTime: dataString })
-                                          }}
-                                      /> : null
-                                }
+                              </FormItem> : null}
+                              {this.state.bpType === 5 ? <FormItem
+                                  className="half-item"
+                                  {...formItemLayout}
+                                  label={this.state.setUpStatus === 1 ? "立项时间" : ''}
+                              >
+                                {this.state.setUpStatus === 1 ?<DatePicker
+                                    style={{
+                                      marginTop: '2px',
+                                      width: '200px',
+                                      height: '32px',
+                                    }}
+                                    showTime
+                                    format="YYYY-MM-DD"
+                                    onOk={() => {}}
+                                    value={
+                                      this.state.setUpTime
+                                          ? moment(this.state.setUpTime)
+                                          : null
+                                    }
+                                    onChange={(data, dataString) => {
+                                      this.setState({ setUpTime: dataString })
+                                    }}
+                                /> : null }
                               </FormItem> : null}
                               <FormItem
                                 className="half-item"

+ 24 - 13
js/component/manageCenter/project/task/patentSchedule.jsx

@@ -3,7 +3,8 @@ import {Button, DatePicker, Select, Table, Input, Modal, Spin, message} from "an
 import moment from "moment";
 import $ from "jquery";
 
-const { Option } = Select
+const { Option } = Select;
+const confirm = Modal.confirm;
 
 class PatentSchedule extends Component{
     constructor(props) {
@@ -134,7 +135,7 @@ class PatentSchedule extends Component{
                     key: 'h',
                     render: (text, record,index) => {
                         return (
-                            <span>
+                            !props.readOnly ? <span>
                                 <Button
                                     size={'small'}
                                     style={{
@@ -163,7 +164,7 @@ class PatentSchedule extends Component{
                                 >
                                     删除
                                 </Button>
-                                {record.id && <Button size={'small'} type='primary' onClick={()=>{
+                                {record.id && !record.isChange && <Button size={'small'} type='primary' onClick={()=>{
                                     this.state.dataSource[index]['isChange'] = true
                                     this.setState({
                                         dataSource: this.state.dataSource
@@ -181,7 +182,7 @@ class PatentSchedule extends Component{
                                         this.createTaskProgress(record);
                                     }
                                 }}>保存</Button> }
-                            </span>
+                            </span> : null
                         )
                     }
                 }
@@ -191,21 +192,21 @@ class PatentSchedule extends Component{
             columnsA: [
                 {
                     title: '时间',
-                    dataIndex: 'h',
-                    key: 'h',
+                    dataIndex: 'createTime',
+                    key: 'createTime',
                 },
                 {
                     title: '操作类型',
-                    dataIndex: 'h',
-                    key: 'h',
+                    dataIndex: 'status',
+                    key: 'status',
                     render: (text, record) => {
-                        return text === 0 ? '新增' : '删除'
+                        return text === 0 ? '新增' : text === 1 ? '删除' : '修改'
                     }
                 },
                 {
                     title: '专利号',
-                    dataIndex: 'h',
-                    key: 'h',
+                    dataIndex: 'patentName',
+                    key: 'patentName',
                 }
             ],
             dataSourceA: [],
@@ -262,6 +263,7 @@ class PatentSchedule extends Component{
                     message.success('添加成功');
                     delete record.isChange;
                     delete record.key;
+                    _this.props.refresh && _this.props.refresh();
                     _this.loaduserss();
                 }
             }.bind(this),
@@ -334,6 +336,11 @@ class PatentSchedule extends Component{
         data.taskId = this.props.taskId;
         data.alreadyNumber = 1;
         data.type = 1;//0软著 1专利
+        for(let i in data){
+            if(!data[i]){
+                delete data[i]
+            }
+        }
         $.ajax({
             method: 'post',
             dataType: 'json',
@@ -346,9 +353,10 @@ class PatentSchedule extends Component{
                         message.warning(data.error[0].message)
                     }
                 }else{
-                    message.success('添加成功');
+                    message.success('修改成功');
                     delete record.isChange;
                     delete record.key;
+                    _this.props.refresh && _this.props.refresh();
                     _this.loaduserss();
                 }
             }.bind(this),
@@ -366,6 +374,7 @@ class PatentSchedule extends Component{
         this.setState({
             loading: true,
         })
+        let _this = this;
         $.ajax({
             method: 'post',
             dataType: 'json',
@@ -381,6 +390,8 @@ class PatentSchedule extends Component{
                     }
                 }else{
                     message.success('删除成功');
+                    _this.loaduserss();
+                    _this.props.refresh && this.props.refresh();
                 }
             }.bind(this),
         }).always(
@@ -433,7 +444,7 @@ class PatentSchedule extends Component{
                 <div style={{
                     display:'flex',
                     alignItems:'center',
-                    paddingLeft: '7%',
+                    paddingLeft: '3%',
                     paddingRight: '10%',
                     color: '#000',
                     fontWeight: 400,

+ 193 - 73
js/component/manageCenter/project/task/taskQuery.jsx

@@ -6,18 +6,19 @@ import {
   Form,
   Input,
   Select,
-  Upload,
+  Radio,
   Spin,
   Table,
   message,
   Modal,
   Tabs,
-  Tag
+  Tag, DatePicker
 } from "antd";
 import Assign from '@/manageCenter/publicComponent/assign';
 import ResolutionDetail from "@/resolutionDetail";
 import OrderDetail from "../../order/orderNew/changeComponent/orderDetail";
 import OrderRiZi from "@/orderRiZi.jsx";
+import PatentSchedule from './patentSchedule';
 import './table.less';
 import {
   getProcessStatus,
@@ -35,6 +36,7 @@ const {TabPane} = Tabs
 import ShowModalDiv from "@/showModal.jsx";
 import ImgList from "../../../common/imgList";
 import {ChooseList} from "../../order/orderNew/chooseList";
+import moment from "moment";
 
 const Task = React.createClass({
   loadData(pageNo) {
@@ -468,6 +470,18 @@ const Task = React.createClass({
             outsourceName: thisdata.outsourceName, //外包公司名称
             outsourcePrice: thisdata.outsourcePrice, //外包价格
             declarationBatch: thisdata.declarationBatch,
+            bpType:thisdata.bpType,//0 正常 1专利 2软著 3审计 4双软 5高新
+            specialComment: thisdata.specialComment,
+            urgentDay: thisdata.urgentDay, //有无材料
+            ifMaterial: thisdata.ifMaterial, //加急情况
+            spotCheckStatus: thisdata.spotCheckStatus,
+            setUpStatus: thisdata.setUpStatus,
+            setUpTime: thisdata.setUpTime,
+            highTechStatus: thisdata.highTechStatus,
+            acceptCount:thisdata.acceptCount,       //受理数
+            authorizeCount:thisdata.authorizeCount, //授权数
+            rejectCount:thisdata.rejectCount,       //驳回数
+            commodityQuantity:thisdata.commodityQuantity, //派单项目数
           });
         }
       }.bind(this),
@@ -875,6 +889,15 @@ const Task = React.createClass({
     this.state.orderNoSearch = "";
     this.state.taskNoSearch = "";
     this.state.departmenttSearch = undefined;
+    this.setState({
+      urgentDay: '', //有无材料
+      ifMaterial: '', //加急情况
+      specialComment: '', //特别说明
+      spotCheckStatus: '',
+      setUpStatus: '',
+      setUpTime: '',
+      highTechStatus: '',
+    })
     this.loadData();
   },
   searchSwitch() {
@@ -1250,6 +1273,29 @@ const Task = React.createClass({
                       {/*  </span>*/}
                       {/*</FormItem>*/}
                     </div>
+                    {/*软著显示  bpType: 0 正常 1专利 2软著 3审计 4双软 5高新*/}
+                    {this.state.bpType === 2 ? <div className="clearfix">
+                      <FormItem
+                          className="half-item"
+                          {...formItemLayout}
+                          label="加急天数"
+                      >
+                        {
+                          this.state.urgentDay === 1 ? '是' :
+                              this.state.urgentDay === 0 ? '否' : ''
+                        }
+                      </FormItem>
+                      <FormItem
+                          className="half-item"
+                          {...formItemLayout}
+                          label="有无材料"
+                      >
+                        {
+                          this.state.ifMaterial === 1 ? '是':
+                              this.state.ifMaterial === 0 ? '否': ''
+                        }
+                      </FormItem>
+                    </div> : null}
                     <div className="clearfix">
                       <div style={{
                         paddingLeft: '8%',
@@ -1258,7 +1304,15 @@ const Task = React.createClass({
                           特别说明
                           <span style={{color: '#58a3ff',}}>(针对项目的特殊情况说明)</span>
                         </div>
-                        <div>{this.state.specialExplain}</div>
+                        <div style={{
+                          display:'flex',
+                        }}>
+                          <span style={{paddingRight:'10px',whiteSpace:"nowrap"}}>备注:</span>
+                          <span style={{
+                            flex: 1,
+                            wordBreak: 'break-all',
+                          }}>{this.state.specialComment}</span>
+                        </div>
                       </div>
                       {
                         // <FormItem
@@ -1502,73 +1556,131 @@ const Task = React.createClass({
                     </div>
                     <div className="clearfix">
                       <h3 className="sub-title">项目申报进度</h3>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="申报批次"
-                      >
-                        <span>{this.state.declarationBatch}</span>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="启动时间"
-                      >
-                        <span>{this.state.startDate}</span>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="完成时间"
-                      >
-                        <span>{this.state.endDate}</span>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="受理时间"
-                      >
-                        <span>{this.state.acceptDate}</span>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="评审时间"
-                      >
-                        <span>{this.state.reviewDate}</span>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="公示时间"
-                      >
-                        <span>{this.state.publicityDate}</span>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="发证时间"
-                      >
-                        <span>{this.state.licenceDate}</span>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="立项金额(万元)"
-                      >
-                        <span>{this.state.setUpAmount}</span>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="是否到款"
-                      >
-                        <span>
-                          {this.state.arrivalMoney ? "已到企业" : "未到企业"}
-                        </span>
-                      </FormItem>
+                      {/*专利显示  bpType: 0 正常 1专利 2软著 3审计 4双软 5高新*/}
+                      {
+                        this.state.bpType === 1 ?
+                            <div>
+                              <FormItem
+                                  labelCol={{ span: 3 }}
+                                  wrapperCol={{ span: 16 }}
+                                  label="是否高新企业"
+                              >
+                                <span>
+                                  {
+                                    this.state.highTechStatus === 1 ? '是':
+                                        this.state.highTechStatus === 0 ? '否' : ''
+                                  }
+                                </span>
+                              </FormItem>
+                              <FormItem/>
+                              <PatentSchedule
+                                  readOnly
+                                  taskId={this.state.id}
+                                  acceptCount={this.state.acceptCount}
+                                  authorizeCount={this.state.authorizeCount}
+                                  rejectCount={this.state.rejectCount}
+                                  commodityQuantity={this.state.commodityQuantity}
+                                  refresh={()=>{this.xiangqing(this.state.id)}}
+                              />
+                            </div> :
+                            <div>
+                              {/*高新显示  bpType: 0 正常 1专利 2软著 3审计 4双软 5高新*/}
+                              {this.state.bpType === 5 ? <FormItem
+                                  className="half-item"
+                                  {...formItemLayout}
+                                  label="是否抽查">
+                                {
+                                  this.state.spotCheckStatus === 0 ? '否':
+                                      this.state.spotCheckStatus === 1 ? '是,未通过':
+                                          this.state.spotCheckStatus === 2 ? '是,通过': ''
+                                }
+                              </FormItem> : null}
+                              <FormItem/>
+                              {this.state.bpType === 5 ? <FormItem
+                                  className="half-item"
+                                  {...formItemLayout}
+                                  label="是否立项"
+                              >
+                                {
+                                  this.state.setUpStatus === 1 ? '是' :
+                                      this.state.setUpStatus === 0 ? '否' : ''
+                                }
+                              </FormItem> : null}
+                              {this.state.bpType === 5 ? <FormItem
+                                  className="half-item"
+                                  {...formItemLayout}
+                                  label={this.state.setUpStatus === 1 ? "立项时间" : ''}
+                              >
+                                {this.state.setUpStatus === 1 ?this.state.setUpTime : null }
+                              </FormItem> : null}
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="申报批次"
+                              >
+                                <span>{this.state.declarationBatch}</span>
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="启动时间"
+                              >
+                                <span>{this.state.startDate}</span>
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="完成时间"
+                              >
+                                <span>{this.state.endDate}</span>
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="受理时间"
+                              >
+                                <span>{this.state.acceptDate}</span>
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="评审时间"
+                              >
+                                <span>{this.state.reviewDate}</span>
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="公示时间"
+                              >
+                                <span>{this.state.publicityDate}</span>
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="发证时间"
+                              >
+                                <span>{this.state.licenceDate}</span>
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="立项金额(万元)"
+                              >
+                                <span>{this.state.setUpAmount}</span>
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="是否到款"
+                              >
+                                <span>
+                                  {this.state.arrivalMoney ? "已到企业" : "未到企业"}
+                                </span>
+                              </FormItem>
+                       </div>}
                     </div>
-                    <div className="clearfix">
+                    {this.state.bpType !== 1 ? <div className="clearfix">
                       <FormItem
                         labelCol={{ span: 3 }}
                         wrapperCol={{ span: 18 }}
@@ -1603,8 +1715,8 @@ const Task = React.createClass({
                           />
                         </Modal> : null}
                       </FormItem>
-                    </div>
-                    <div className="clearfix">
+                    </div> : null}
+                    {this.state.bpType !== 1 ? <div className="clearfix">
                       <FormItem
                         labelCol={{ span: 3 }}
                         wrapperCol={{ span: 16 }}
@@ -1612,7 +1724,7 @@ const Task = React.createClass({
                       >
                         <span>{this.state.taskComment}</span>
                       </FormItem>
-                    </div>
+                    </div>: null}
                     <div>
                       <h3 className="sub-title">项目业务</h3>
                       {this.state.processStatus == 0 ? (
@@ -1879,7 +1991,15 @@ const Task = React.createClass({
                     特别说明
                     <span style={{color: '#58a3ff',}}>(针对项目的特殊情况说明)</span>
                   </div>
-                  <div>{this.state.specialExplain}</div>
+                  <div style={{
+                    display:'flex',
+                  }}>
+                    <span style={{paddingRight:'10px',whiteSpace:"nowrap"}}>备注:</span>
+                    <span style={{
+                      flex: 1,
+                      wordBreak: 'break-all',
+                    }}>{this.state.specialComment}</span>
+                  </div>
                 </div>
                 {
                   // <FormItem