HW 4 роки тому
батько
коміт
cb020d22bf

+ 21 - 8
js/component/manageCenter/project/summary/highTech.jsx

@@ -97,12 +97,13 @@ class HighTech extends Component{
                 depId: this.state.depId || undefined,//部门ID
                 thchDepId: this.state.thchDepId || undefined,//责任部门ID
                 projectStatus: this.state.projectStatus || undefined,//项目类别
-                projectType: this.state.projectType || undefined,//项目分类
+                projectType: typeof this.state.projectType === 'number' ? this.state.projectType : undefined,//项目分类
                 orderNo: this.state.searchOrderNo || undefined,//订单编号
                 contractNo: this.state.searchContractNo || undefined,//合同编号
                 userName: this.state.searchEnterpriseName || undefined,//用户名称
                 declarationBatch: this.state.declarationBatch || undefined,//申报批次
                 projectAmount: this.state.projectAmount || undefined,//项目金额
+                status: this.state.status,
             },
             success: function(data) {
                 ShowModal(this);
@@ -114,7 +115,7 @@ class HighTech extends Component{
                 } else {
                     for (let i = 0; i < data.data.list.length; i++) {
                         let thisdata = data.data.list[i];
-                        thisdata.key=i;
+                        thisdata.key=(data.data.pageNo - 1) * data.data.pageSize + i + 1;
                         theArr.push(thisdata);
                     }
                     this.state.pagination.current = data.data.pageNo;
@@ -229,16 +230,26 @@ class HighTech extends Component{
         let url = `/api/admin/statistis/exporTaskList?status=${this.state.status}`;
         let dep = this.state.departmentArr.filter((e)=> e.id === this.state.depId);//订单部门名称
         let thchDep = this.state.departmentArr.filter((e)=> e.id === this.state.thchDepId); //责任部门名称
+        let option = this.state.contactsOptionData.filter((e)=> e.id === this.state.projectStatus); //项目类别名称
+
         if(dep.length > 0){url = url+`&depName=${dep[0].name}`;}
         if(thchDep.length > 0){url = url+`&thchDepName=${thchDep[0].name}`;}
-
+        if(option.length > 0){url = url+`&projectStatusName=${option[0].cname}`;}
+        if(typeof this.state.projectType === 'number'){url = url+`&projectTypeName=${
+            this.state.projectType === 0? '通用' :
+                this.state.projectType === 1? '专利' :
+                    this.state.projectType === 2? '软著' :
+                        this.state.projectType === 3? '审计' :
+                            this.state.projectType === 4? '双软' :
+                                this.state.projectType === 5? '高新' : ''
+        }`;}
         let data ={
             startDate: this.state.releaseDate.length > 0 ? this.state.releaseDate[0]: undefined, //开始时间
             endDate: this.state.releaseDate.length > 0 ? this.state.releaseDate[1]: undefined, //结束时间
             depId: this.state.depId || undefined,//部门ID
             thchDepId: this.state.thchDepId || undefined,//责任部门ID
             projectStatus: this.state.projectStatus || undefined,//项目类别
-            projectType: this.state.projectType || undefined,//项目分类
+            projectType: typeof this.state.projectType === 'number' ? this.state.projectType : undefined,//项目分类
             orderNo: this.state.searchOrderNo || undefined,//订单编号
             contractNo: this.state.searchContractNo || undefined,//合同编号
             userName: this.state.searchEnterpriseName || undefined,//用户名称
@@ -295,7 +306,7 @@ class HighTech extends Component{
                                         this.setState({
                                             projectStatus: e,
                                         },()=>{
-                                            if((infor[0].cname === '科技项目' || infor[0].cname === '高新') && typeof this.state.projectType !== 'number'){
+                                            if(infor[0].cname === '高新' && typeof this.state.projectType !== 'number'){
                                                 this.setState({
                                                     columns: highTechColumns,
                                                     changeList: [],
@@ -333,21 +344,23 @@ class HighTech extends Component{
                                                     e === 1 ? patent :
                                                         e === 2 ? softWriting :
                                                             e === 3 ? currency :
-                                                                e === 4 ? doubleSoft:[],
+                                                                e === 4 ? doubleSoft :
+                                                                    e === 5 ? highTechColumns : [],
                                             changeList: [],
                                             projectType: e,
-                                            status: e === 4 ? 2 : e === 2 ? 3 : e === 1 ? 4 : 0,
+                                            status: e === 4 ? 2 : e === 2 ? 3 : e === 1 ? 4 : e === 5 ? 1 : 0,
                                         },()=>{
                                             this.loadData();
                                         })
                                     }}
                                 >
-                                    {/*0正常 1专利 2软著 3审计 4双软*/}
+                                    {/*0通用 1专利 2软著 3审计 4双软 5高新*/}
                                     <Option value={0}>通用</Option>
                                     <Option value={1}>专利</Option>
                                     <Option value={2}>软著</Option>
                                     <Option value={3}>审计</Option>
                                     <Option value={4}>双软</Option>
+                                    <Option value={5}>高新</Option>
                                 </Select>
                             </span>
                             <Input

+ 30 - 0
js/component/manageCenter/project/summary/highTechConfig.jsx

@@ -111,6 +111,11 @@ const highTechColumns =[
             )
         }
     },
+    {
+        title: "特别说明",
+        dataIndex: "specialComment",
+        key: "specialComment"
+    },
 ];
 
 // 双软
@@ -201,6 +206,11 @@ const doubleSoft = [
             )
         }
     },
+    {
+        title: "特别说明",
+        dataIndex: "specialComment",
+        key: "specialComment"
+    },
 ];
 
 // 软著
@@ -321,6 +331,11 @@ const softWriting = [
             )
         }
     },
+    {
+        title: "特别说明",
+        dataIndex: "specialComment",
+        key: "specialComment"
+    },
 ];
 
 // 专利
@@ -456,6 +471,11 @@ const patent =[
             )
         }
     },
+    {
+        title: "特别说明",
+        dataIndex: "specialComment",
+        key: "specialComment"
+    },
 ];
 
 // 通用表
@@ -536,6 +556,16 @@ const currency = [
             )
         }
     },
+    {
+        title: "项目金额",
+        dataIndex: "commodityPrice",
+        key: "commodityPrice"
+    },
+    {
+        title: "特别说明",
+        dataIndex: "specialComment",
+        key: "specialComment"
+    },
 ];
 
 export {

+ 91 - 3
js/component/manageCenter/project/summary/projecCount.jsx

@@ -1,5 +1,5 @@
 import React,{ Component } from 'react';
-import {Button, DatePicker, Input, message, Select, Spin, Table, Tabs} from "antd";
+import {AutoComplete, Button, DatePicker, Input, message, Select, Spin, Table, Tabs} from "antd";
 import {
     ShowModal,
     getNewDiccityArr
@@ -56,6 +56,10 @@ class ProjecCount extends Component{
 
             contactsOption: [],
             contactsOptionData: [],
+
+            customerArr: [],
+            commodityName: '',
+            kid: '',
         }
         this.loadData = this.loadData.bind(this);
         this.resetAll = this.resetAll.bind(this);
@@ -63,6 +67,9 @@ class ProjecCount extends Component{
         this.departmentList = this.departmentList.bind(this);
         this.exportPending = this.exportPending.bind(this);
         this.selectSuperId = this.selectSuperId.bind(this);
+        this.supervisorCui = this.supervisorCui.bind(this);
+        this.httpChangeCui = this.httpChangeCui.bind(this);
+        this.selectAuto = this.selectAuto.bind(this);
     }
 
     changeList(arr) {
@@ -96,7 +103,8 @@ class ProjecCount extends Component{
                 startDate: this.state.releaseDate.length > 0 ? this.state.releaseDate[0]: undefined, //开始时间
                 endDate: this.state.releaseDate.length > 0 ? this.state.releaseDate[1]: undefined, //结束时间
                 projectStatus: this.state.projectStatus || undefined,//项目类别
-                projectType: this.state.projectType || undefined,//项目分类
+                projectType: typeof this.state.projectType === 'number' ? this.state.projectType : undefined,//项目分类
+                status: this.state.status,
             },
             success: function(data) {
                 ShowModal(this);
@@ -219,6 +227,62 @@ class ProjecCount extends Component{
         );
     }
 
+    supervisorCui(e) {
+        //客户名称与服务名称自动补全
+        let api = "/api/admin/order/getBusinessProjectByName";
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + api,
+            data: {
+                businessName: e,
+            },
+            success: function (data) {
+                let thedata = data.data;
+                if (!thedata) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    }
+                    thedata = {};
+                }
+                this.setState({
+                    customerArr: thedata,
+                });
+            }.bind(this),
+        }).always(
+            function () {
+                this.setState({
+                    loading: false,
+                });
+            }.bind(this)
+        );
+    }
+
+    httpChangeCui(e) {
+        if (e.length >= 1) {
+            this.supervisorCui(e, false);
+        }
+        this.setState({
+            commodityName: e,
+        });
+    }
+
+    //上级主管输入框失去焦点是判断客户是否存在
+    selectAuto(value){
+        let kid=[];
+        let fwList=this.state.customerArr;
+        fwList.map(function(item){
+            if(value===item.bname){
+                kid=item.id
+            }
+        })
+        this.setState({
+            kid:kid,
+            commodityName:value,
+        })
+    }
+
     componentWillMount() {
         this.loadData();
         this.departmentList();
@@ -226,6 +290,10 @@ class ProjecCount extends Component{
     }
 
     render() {
+        const dataSources=this.state.customerArr || [];
+        const options = dataSources.map((group,index) =>
+            <Select.Option key={index} value={group.bname}>{group.bname}</Select.Option>
+        )
         return (
             <div className="user-content">
                 <div className="content-title">
@@ -286,7 +354,8 @@ class ProjecCount extends Component{
                                                     e === 1 ? invention :
                                                         e === 2 ? softWriting :
                                                             e === 3 ? currency :
-                                                                e === 4 ? currency:[],
+                                                                e === 4 ? currency:
+                                                                    e === 5 ? highTechColumns : [],
                                             changeList: [],
                                             projectType: e,
                                         },()=>{
@@ -300,6 +369,7 @@ class ProjecCount extends Component{
                                     <Option value={2}>软著</Option>
                                     <Option value={3}>审计</Option>
                                     <Option value={4}>双软</Option>
+                                    <Option value={5}>高新</Option>
                                 </Select>
                             </span>
                             <Input
@@ -362,6 +432,24 @@ class ProjecCount extends Component{
                                 </Select>
                             </span>
                             <span style={{display: "inline-block",marginRight:'10px',marginBottom:'10px'}}>
+                                <span>服务项目名称:</span>
+                                <AutoComplete
+                                    className="certain-category-search"
+                                    dropdownClassName="certain-category-search-dropdown"
+                                    dropdownMatchSelectWidth={false}
+                                    dropdownStyle={{ width: 200 }}
+                                    style={{ width: '200px',marginLeft:'10px' }}
+                                    dataSource={options}
+                                    placeholder="输入服务名称"
+                                    value={this.state.commodityName}
+                                    onChange={this.httpChangeCui}
+                                    filterOption={true}
+                                    onSelect={this.selectAuto}
+                                >
+                                    <Input/>
+                                </AutoComplete>
+                            </span>
+                            <span style={{display: "inline-block",marginRight:'10px',marginBottom:'10px'}}>
                                 <span>负责部门:</span>
                                 <Select
                                     placeholder="请选择部门"

+ 27 - 8
js/component/manageCenter/project/task/myTask.jsx

@@ -544,6 +544,7 @@ const Task = React.createClass({
               <div>
                 <DatePicker
                   style={{ marginTop: '5px' }}
+                  disabled={record.flag}
                   showTime
                   format="YYYY-MM-DD"
                   onOk={() => {}}
@@ -569,6 +570,7 @@ const Task = React.createClass({
                 {
                   <Input
                     value={record.alreadyNumber}
+                    disabled={record.flag}
                     placeholder="请输入下证数量"
                     key={record.id}
                     required="required"
@@ -1603,7 +1605,18 @@ const Task = React.createClass({
             outsourcePrice: thisdata.outsourcePrice, //外包价格
             declarationBatch: thisdata.declarationBatch,
             orderTaskOfficialCost: thisdata.officialCost,    //官费 0无 1有
-            bpType:thisdata.bpType//0 正常 1专利 2软著 3审计 4双软 5高新
+            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),
@@ -3748,8 +3761,8 @@ const Task = React.createClass({
                               this.setState({ urgentDay: e.target.value })
                             }}
                         >
-                          <Radio value={0}>是</Radio>
-                          <Radio value={1}>否</Radio>
+                          <Radio value={1}>是</Radio>
+                          <Radio value={0}>否</Radio>
                         </Radio.Group>
                       </FormItem>
                       <FormItem
@@ -3763,8 +3776,8 @@ const Task = React.createClass({
                               this.setState({ ifMaterial: e.target.value })
                             }}
                         >
-                          <Radio value={0}>是</Radio>
-                          <Radio value={1}>否</Radio>
+                          <Radio value={1}>是</Radio>
+                          <Radio value={0}>否</Radio>
                         </Radio.Group>
                       </FormItem>
                     </div> : null}
@@ -4155,12 +4168,18 @@ const Task = React.createClass({
                                                 this.setState({ highTechStatus: e.target.value })
                                             }}
                                         >
-                                            <Radio value={0}>是</Radio>
-                                            <Radio value={1}>否</Radio>
+                                            <Radio value={1}>是</Radio>
+                                            <Radio value={0}>否</Radio>
                                         </Radio.Group>
                                     </FormItem>
                                     <FormItem/>
-                                    <PatentSchedule taskId={this.state.id}/>
+                                    <PatentSchedule
+                                        taskId={this.state.id}
+                                        acceptCount={this.state.acceptCount}
+                                        authorizeCount={this.state.authorizeCount}
+                                        rejectCount={this.state.rejectCount}
+                                        commodityQuantity={this.state.commodityQuantity}
+                                    />
                                 </div> :
                       <div>
                           {/*高新显示  bpType: 0 正常 1专利 2软著 3审计 4双软 5高新*/}

+ 352 - 208
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -7,6 +7,7 @@ import "@/manageCenter/financialManage/distribute/public.less";
 import "@/manageCenter/financialManage/distribute/shouKuan.less";
 import {cuiJieDian } from '@/dataDic.js'
 import OrderDetail from "../../order/orderNew/changeComponent/orderDetail";
+import PatentSchedule from './patentSchedule';
 import {
   Button,
   Form,
@@ -608,6 +609,7 @@ const MyTaskOutsource = React.createClass({
                 <DatePicker
                   style={{ marginTop: "5px" }}
                   showTime
+                  disabled={record.flag}
                   format="YYYY-MM-DD"
                   onOk={() => {}}
                   value={
@@ -631,6 +633,7 @@ const MyTaskOutsource = React.createClass({
               <div>
                 {
                   <Input
+                    disabled={record.flag}
                     value={record.alreadyNumber}
                     placeholder="请输入下证数量"
                     key={record.id}
@@ -921,6 +924,13 @@ const MyTaskOutsource = React.createClass({
         outsourceName: this.state.outsourceName, //外包公司名称
         outsourcePrice: this.state.outsourcePrice, //外包价格
         declarationBatch: this.state.declarationBatch,
+        specialComment: this.state.specialComment || undefined,//特别说明
+        setUpStatus: typeof this.state.setUpStatus === 'number' ? this.state.setUpStatus : undefined,//是否立项
+        setUpTime: this.state.setUpTime || undefined,//立项时间
+        highTechStatus: typeof this.state.highTechStatus === 'number' ? this.state.highTechStatus : undefined,//是否高新
+        spotCheckStatus: typeof this.state.spotCheckStatus === 'number' ? this.state.spotCheckStatus : undefined,//是否抽查 0否 1未通过 2通过
+        urgentDay: typeof this.state.urgentDay === 'number' ? this.state.urgentDay : undefined,//加急天数
+        ifMaterial: typeof this.state.ifMaterial === 'number' ? this.state.ifMaterial :  undefined,//有无材料
       },
     }).done(
       function (data) {
@@ -1038,6 +1048,18 @@ const MyTaskOutsource = React.createClass({
             outsourcePrice: thisdata.outsourcePrice, //外包价格
             declarationBatch: thisdata.declarationBatch,
             orderTaskOfficialCost: thisdata.officialCost,    //官费 0无 1有
+            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, //派单项目数PatentSchedule
           });
         }
       }.bind(this),
@@ -1629,7 +1651,14 @@ const MyTaskOutsource = React.createClass({
     this.state.approvalSearch = undefined;
     this.loadData(page || 0);
     this.setState({
-      oldInfor: {}
+      oldInfor: {},
+      urgentDay: '', //有无材料
+      ifMaterial: '', //加急情况
+      specialComment: '', //特别说明
+      spotCheckStatus: '',
+      setUpStatus: '',
+      setUpTime: '',
+      highTechStatus: '',
     })
   },
   searchSwitch() {
@@ -3468,6 +3497,39 @@ const MyTaskOutsource = React.createClass({
                       {/*  </Radio.Group>*/}
                       {/*</FormItem>*/}
                     </div>
+                    {/*软著显示  bpType: 0 正常 1专利 2软著 3审计 4双软 5高新*/}
+                    {this.state.bpType === 2 ? <div className="clearfix">
+                      <FormItem
+                          className="half-item"
+                          {...formItemLayout}
+                          label="加急天数"
+                      >
+                        <Radio.Group
+                            value={this.state.urgentDay}
+                            onChange={(e) => {
+                              this.setState({ urgentDay: e.target.value })
+                            }}
+                        >
+                          <Radio value={1}>是</Radio>
+                          <Radio value={0}>否</Radio>
+                        </Radio.Group>
+                      </FormItem>
+                      <FormItem
+                          className="half-item"
+                          {...formItemLayout}
+                          label="有无材料"
+                      >
+                        <Radio.Group
+                            value={this.state.ifMaterial}
+                            onChange={(e) => {
+                              this.setState({ ifMaterial: e.target.value })
+                            }}
+                        >
+                          <Radio value={1}>是</Radio>
+                          <Radio value={0}>否</Radio>
+                        </Radio.Group>
+                      </FormItem>
+                    </div> : null}
                     <div className="clearfix">
                       <div style={{
                         paddingLeft: '8%',
@@ -3486,9 +3548,9 @@ const MyTaskOutsource = React.createClass({
                                 width:'33%',
                                 marginLeft: '10px',
                               }}
-                              value={this.state.specialExplain}
+                              value={this.state.specialComment}
                               onChange={(e) => {
-                                this.setState({ specialExplain: e.target.value });
+                                this.setState({ specialComment: e.target.value });
                               }}
                           />
                         </div>
@@ -3807,207 +3869,289 @@ const MyTaskOutsource = React.createClass({
                     </div>
                     <div className="clearfix">
                       <h3 className="sub-title">项目申报进度</h3>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="申报批次"
-                      >
-                        <Select
-                          value={
-                            this.state.declarationBatch
-                              ? this.state.declarationBatch
-                              : undefined
-                          }
-                          placeholder="请选择批次"
-                          style={{ width: 200 }}
-                          onChange={(e) => {
-                            this.setState({
-                              declarationBatch: e,
-                            });
-                          }}
-                        >
-                          <Option value={1}>第一批</Option>
-                          <Option value={2}>第二批</Option>
-                          <Option value={3}>第三批</Option>
-                          <Option value={4}>第四批</Option>
-                        </Select>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="启动时间"
-                      >
-                        <DatePicker
-                          style={{
-                            marginTop: "2px",
-                            width: "200px",
-                            height: "32px",
-                          }}
-                          showTime
-                          format="YYYY-MM-DD"
-                          onOk={() => {}}
-                          value={
-                            this.state.startDate
-                              ? moment(this.state.startDate)
-                              : null
-                          }
-                          onChange={(data, dataString) => {
-                            this.setState({ startDate: dataString });
-                          }}
-                        />
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="完成时间"
-                      >
-                        <DatePicker
-                          style={{
-                            marginTop: "2px",
-                            width: "200px",
-                            height: "32px",
-                          }}
-                          showTime
-                          format="YYYY-MM-DD"
-                          onOk={() => {}}
-                          value={
-                            this.state.endDate
-                              ? moment(this.state.endDate)
-                              : null
-                          }
-                          onChange={(data, dataString) => {
-                            this.setState({ endDate: dataString });
-                          }}
-                        />
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="受理时间"
-                      >
-                        <DatePicker
-                          style={{
-                            marginTop: "2px",
-                            width: "200px",
-                            height: "32px",
-                          }}
-                          showTime
-                          format="YYYY-MM-DD"
-                          onOk={() => {}}
-                          value={
-                            this.state.acceptDate
-                              ? moment(this.state.acceptDate)
-                              : null
-                          }
-                          onChange={(data, dataString) => {
-                            this.setState({ acceptDate: dataString });
-                          }}
-                        />
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="评审时间"
-                      >
-                        <DatePicker
-                          style={{
-                            marginTop: "2px",
-                            width: "200px",
-                            height: "32px",
-                          }}
-                          showTime
-                          format="YYYY-MM-DD"
-                          onOk={() => {}}
-                          value={
-                            this.state.reviewDate
-                              ? moment(this.state.reviewDate)
-                              : null
-                          }
-                          onChange={(data, dataString) => {
-                            this.setState({ reviewDate: dataString });
-                          }}
-                        />
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="公示时间"
-                      >
-                        <DatePicker
-                          style={{
-                            marginTop: "2px",
-                            width: "200px",
-                            height: "32px",
-                          }}
-                          showTime
-                          format="YYYY-MM-DD"
-                          onOk={() => {}}
-                          value={
-                            this.state.publicityDate
-                              ? moment(this.state.publicityDate)
-                              : null
-                          }
-                          onChange={(data, dataString) => {
-                            this.setState({ publicityDate: dataString });
-                          }}
-                        />
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="发证时间"
-                      >
-                        <DatePicker
-                          style={{
-                            marginTop: "2px",
-                            width: "200px",
-                            height: "32px",
-                          }}
-                          showTime
-                          format="YYYY-MM-DD"
-                          onOk={() => {}}
-                          value={
-                            this.state.licenceDate
-                              ? moment(this.state.licenceDate)
-                              : null
-                          }
-                          onChange={(data, dataString) => {
-                            this.setState({ licenceDate: dataString });
-                          }}
-                        />
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="立项金额(万元)"
-                      >
-                        <Input
-                          placeholder="请输入立项金额"
-                          value={this.state.setUpAmount}
-                          style={{ width: "200px" }}
-                          onChange={(e) => {
-                            this.setState({ setUpAmount: e.target.value });
-                          }}
-                          ref="commodityQuantity"
-                        />
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="是否到款"
-                      >
-                        <Radio.Group
-                          value={this.state.arrivalMoney}
-                          onChange={(e) => {
-                            this.setState({ arrivalMoney: e.target.value });
-                          }}
-                        >
-                          <Radio value={0}>未到企业</Radio>
-                          <Radio value={1}>已到企业</Radio>
-                        </Radio.Group>
-                      </FormItem>
+                      {/*专利显示  bpType: 0 正常 1专利 2软著 3审计 4双软 5高新*/}
+                      {
+                        this.state.bpType === 1 ?
+                            <div>
+                              <FormItem
+                                  className="half-item"
+                                  {...formItemLayout}
+                                  label="是否高新企业"
+                              >
+                                <Radio.Group
+                                    value={this.state.highTechStatus}
+                                    onChange={(e) => {
+                                      this.setState({ highTechStatus: e.target.value })
+                                    }}
+                                >
+                                  <Radio value={1}>是</Radio>
+                                  <Radio value={0}>否</Radio>
+                                </Radio.Group>
+                              </FormItem>
+                              <FormItem/>
+                              <PatentSchedule
+                                  taskId={this.state.id}
+                                  acceptCount={this.state.acceptCount}
+                                  authorizeCount={this.state.authorizeCount}
+                                  rejectCount={this.state.rejectCount}
+                                  commodityQuantity={this.state.commodityQuantity}
+                              />
+                            </div> :
+                            <div>
+                              {/*高新显示  bpType: 0 正常 1专利 2软著 3审计 4双软 5高新*/}
+                              {this.state.bpType === 5 ? <FormItem
+                                  className="half-item"
+                                  {...formItemLayout}
+                                  label="是否抽查">
+                                <Radio.Group
+                                    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
+                                  className="half-item"
+                                  {...formItemLayout}
+                                  label="立项时间"
+                              >
+                                <Radio.Group
+                                    value={this.state.setUpStatus}
+                                    onChange={(e) => {
+                                      this.setState({ setUpStatus: e.target.value })
+                                    }}
+                                >
+                                  <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}
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="申报批次"
+                              >
+                                <Select
+                                  value={
+                                    this.state.declarationBatch
+                                      ? this.state.declarationBatch
+                                      : undefined
+                                  }
+                                  placeholder="请选择批次"
+                                  style={{ width: 200 }}
+                                  onChange={(e) => {
+                                    this.setState({
+                                      declarationBatch: e,
+                                    });
+                                  }}
+                                >
+                                  <Option value={1}>第一批</Option>
+                                  <Option value={2}>第二批</Option>
+                                  <Option value={3}>第三批</Option>
+                                  <Option value={4}>第四批</Option>
+                                </Select>
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="启动时间"
+                              >
+                                <DatePicker
+                                  style={{
+                                    marginTop: "2px",
+                                    width: "200px",
+                                    height: "32px",
+                                  }}
+                                  showTime
+                                  format="YYYY-MM-DD"
+                                  onOk={() => {}}
+                                  value={
+                                    this.state.startDate
+                                      ? moment(this.state.startDate)
+                                      : null
+                                  }
+                                  onChange={(data, dataString) => {
+                                    this.setState({ startDate: dataString });
+                                  }}
+                                />
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="完成时间"
+                              >
+                                <DatePicker
+                                  style={{
+                                    marginTop: "2px",
+                                    width: "200px",
+                                    height: "32px",
+                                  }}
+                                  showTime
+                                  format="YYYY-MM-DD"
+                                  onOk={() => {}}
+                                  value={
+                                    this.state.endDate
+                                      ? moment(this.state.endDate)
+                                      : null
+                                  }
+                                  onChange={(data, dataString) => {
+                                    this.setState({ endDate: dataString });
+                                  }}
+                                />
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="受理时间"
+                              >
+                                <DatePicker
+                                  style={{
+                                    marginTop: "2px",
+                                    width: "200px",
+                                    height: "32px",
+                                  }}
+                                  showTime
+                                  format="YYYY-MM-DD"
+                                  onOk={() => {}}
+                                  value={
+                                    this.state.acceptDate
+                                      ? moment(this.state.acceptDate)
+                                      : null
+                                  }
+                                  onChange={(data, dataString) => {
+                                    this.setState({ acceptDate: dataString });
+                                  }}
+                                />
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="评审时间"
+                              >
+                                <DatePicker
+                                  style={{
+                                    marginTop: "2px",
+                                    width: "200px",
+                                    height: "32px",
+                                  }}
+                                  showTime
+                                  format="YYYY-MM-DD"
+                                  onOk={() => {}}
+                                  value={
+                                    this.state.reviewDate
+                                      ? moment(this.state.reviewDate)
+                                      : null
+                                  }
+                                  onChange={(data, dataString) => {
+                                    this.setState({ reviewDate: dataString });
+                                  }}
+                                />
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="公示时间"
+                              >
+                                <DatePicker
+                                  style={{
+                                    marginTop: "2px",
+                                    width: "200px",
+                                    height: "32px",
+                                  }}
+                                  showTime
+                                  format="YYYY-MM-DD"
+                                  onOk={() => {}}
+                                  value={
+                                    this.state.publicityDate
+                                      ? moment(this.state.publicityDate)
+                                      : null
+                                  }
+                                  onChange={(data, dataString) => {
+                                    this.setState({ publicityDate: dataString });
+                                  }}
+                                />
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="发证时间"
+                              >
+                                <DatePicker
+                                  style={{
+                                    marginTop: "2px",
+                                    width: "200px",
+                                    height: "32px",
+                                  }}
+                                  showTime
+                                  format="YYYY-MM-DD"
+                                  onOk={() => {}}
+                                  value={
+                                    this.state.licenceDate
+                                      ? moment(this.state.licenceDate)
+                                      : null
+                                  }
+                                  onChange={(data, dataString) => {
+                                    this.setState({ licenceDate: dataString });
+                                  }}
+                                />
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="立项金额(万元)"
+                              >
+                                <Input
+                                  placeholder="请输入立项金额"
+                                  value={this.state.setUpAmount}
+                                  style={{ width: "200px" }}
+                                  onChange={(e) => {
+                                    this.setState({ setUpAmount: e.target.value });
+                                  }}
+                                  ref="commodityQuantity"
+                                />
+                              </FormItem>
+                              <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label="是否到款"
+                              >
+                                <Radio.Group
+                                  value={this.state.arrivalMoney}
+                                  onChange={(e) => {
+                                    this.setState({ arrivalMoney: e.target.value });
+                                  }}
+                                >
+                                  <Radio value={0}>未到企业</Radio>
+                                  <Radio value={1}>已到企业</Radio>
+                                </Radio.Group>
+                              </FormItem>
+                         </div>}
                     </div>
-                    <div className="clearfix">
+                    {this.state.bpType !== 1 ? <div className="clearfix">
                       <FormItem
                         labelCol={{ span: 3 }}
                         wrapperCol={{ span: 16 }}
@@ -4027,8 +4171,8 @@ const MyTaskOutsource = React.createClass({
                           }}
                         />
                       </FormItem>
-                    </div>
-                    <div className="clearfix">
+                    </div> : null}
+                    {this.state.bpType !== 1 ? <div className="clearfix">
                       <FormItem
                         labelCol={{ span: 3 }}
                         wrapperCol={{ span: 16 }}
@@ -4049,7 +4193,7 @@ const MyTaskOutsource = React.createClass({
                           }}
                         />
                       </FormItem>
-                    </div>
+                    </div> : null}
                     <div>
                       <h3 className="sub-title">项目业务</h3>
                       {this.state.processStatus == 0 ? (
@@ -4939,9 +5083,9 @@ const MyTaskOutsource = React.createClass({
                           width:'33%',
                           marginLeft: '10px',
                         }}
-                        value={this.state.specialExplain}
+                        value={this.state.specialComment}
                         onChange={(e) => {
-                          this.setState({ specialExplain: e.target.value });
+                          this.setState({ specialComment: e.target.value });
                         }}
                     />
                   </div>

+ 169 - 37
js/component/manageCenter/project/task/patentSchedule.jsx

@@ -14,19 +14,23 @@ class PatentSchedule extends Component{
                     title: '批次',
                     dataIndex: 'key',
                     key: 'key',
+                    render: (text, record,index) => {
+                        return index+1;
+                    }
                 },
                 {
                     title: '专利号',
                     dataIndex: 'patentNo',
                     key: 'patentNo',
-                    render: (text, record) => {
+                    render: (text, record,index) => {
                         return !record.isChange ? text : <Input
+                            value={text}
                             size={'small'}
                             style={{
                                 width: '100px'
                             }}
                             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: '专利名称',
                     dataIndex: '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: '受理时间',
                     dataIndex: 'acceptTimes',
                     key: 'acceptTimes',
-                    render: (text, record) => {
+                    render: (text, record,index) => {
                         return !record.isChange ? text : <DatePicker
+                            value={
+                                text ? moment(text) : null
+                            }
                             size={'small'}
                             style={{
                                 marginTop: '4px',
@@ -56,7 +65,7 @@ class PatentSchedule extends Component{
                             showTime
                             format="YYYY-MM-DD"
                             onChange={(data, dataString) => {
-                                this.changeEvidence(dataString,record.key,'acceptTimes')
+                                this.changeEvidence(dataString,index,'acceptTimes')
                             }}
                         />
                     }
@@ -65,17 +74,20 @@ class PatentSchedule extends Component{
                     title: '授权时间',
                     dataIndex: 'authorizeTimes',
                     key: 'authorizeTimes',
-                    render: (text, record) => {
+                    render: (text, record,index) => {
                         return !record.isChange ? text : <DatePicker
                             size={'small'}
                             style={{
                                 marginTop: '4px',
                                 width: '100px'
                             }}
+                            value={
+                                text ? moment(text) : null
+                            }
                             showTime
                             format="YYYY-MM-DD"
                             onChange={(data, dataString) => {
-                                this.changeEvidence(dataString,record.key,'authorizeTimes')
+                                this.changeEvidence(dataString,index,'authorizeTimes')
                             }}
                         />
                     }
@@ -84,8 +96,11 @@ class PatentSchedule extends Component{
                     title: '下证时间',
                     dataIndex: 'licenceTimes',
                     key: 'licenceTimes',
-                    render: (text, record) => {
+                    render: (text, record,index) => {
                         return !record.isChange ? text : <DatePicker
+                            value={
+                                text ? moment(text) : null
+                            }
                             size={'small'}
                             style={{
                                 marginTop: '4px',
@@ -94,19 +109,20 @@ class PatentSchedule extends Component{
                             showTime
                             format="YYYY-MM-DD"
                             onChange={(data, dataString) => {
-                                this.changeEvidence(dataString,record.key,'licenceTimes')
+                                this.changeEvidence(dataString,index,'licenceTimes')
                             }}
                         />
                     }
                 },
                 {
-                    title: '通过/驳回',
+                    title: '状态',
                     dataIndex: '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={2}>驳回</option>
                         </Select>
@@ -116,7 +132,7 @@ class PatentSchedule extends Component{
                     title: '操作',
                     dataIndex: 'h',
                     key: 'h',
-                    render: (text, record) => {
+                    render: (text, record,index) => {
                         return (
                             <span>
                                 <Button
@@ -130,7 +146,7 @@ class PatentSchedule extends Component{
                                     onClick={()=>{
                                         let _this = this;
                                         if(record.isChange){
-                                            this.state.dataSource.splice(record.key-1,1)
+                                            this.state.dataSource.splice(index,1)
                                             this.setState({
                                                 dataSource: this.state.dataSource
                                             })
@@ -147,9 +163,23 @@ class PatentSchedule extends Component{
                                 >
                                     删除
                                 </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> }
                             </span>
                         )
@@ -185,10 +215,12 @@ class PatentSchedule extends Component{
         this.createTaskProgress = this.createTaskProgress.bind(this);
         this.selectTaskProgressLog = this.selectTaskProgressLog.bind(this);
         this.delectTaskProgress = this.delectTaskProgress.bind(this);
+        this.changeTaskProgress = this.changeTaskProgress.bind(this);
+        this.loaduserss = this.loaduserss.bind(this);
     }
 
     changeEvidence(value,index,key){
-        this.state.dataSource[index-1][key] = value;
+        this.state.dataSource[index][key] = value;
         this.setState({
             dataSource: this.state.dataSource
         })
@@ -196,16 +228,31 @@ class PatentSchedule extends Component{
 
     //新增申报进度
     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({
             method: 'post',
             dataType: 'json',
             crossDomain: false,
             url: globalConfig.context + '/api/admin/orderProject/createTaskProgress',
-            data: record,
+            data: data,
             success: function (data) {
                 if (data.error.length) {
                     if (data.error && data.error.length) {
@@ -213,6 +260,9 @@ class PatentSchedule extends Component{
                     }
                 }else{
                     message.success('添加成功');
+                    delete record.isChange;
+                    delete record.key;
+                    _this.loaduserss();
                 }
             }.bind(this),
         }).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) {
         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() {
@@ -309,15 +438,20 @@ class PatentSchedule extends Component{
                     color: '#000',
                     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'}}>
-                        <Button
+                        {!this.props.readOnly ? <Button
                             type="primary"
                             style={{ marginRight: '15px' }}
                             onClick={()=>{
+                                let arr = this.state.dataSource.filter((v)=>v.isChange)
+                                if(arr.length > 0){
+                                    message.warning('已存在未保存项,请先保存!')
+                                    return;
+                                }
                                 this.state.dataSource.push({
                                     key: this.state.dataSource.length+1,
                                     isChange: true,
@@ -328,7 +462,7 @@ class PatentSchedule extends Component{
                             }}
                         >
                             增加专利信息
-                        </Button>
+                        </Button> : null}
                         <Button
                             type="primary"
                             onClick={()=>{
@@ -343,8 +477,6 @@ class PatentSchedule extends Component{
                     </div>
                 </div>
                 <div style={{
-                    paddingLeft: '7%',
-                    paddingRight: '10%',
                     paddingTop:'10px'
                 }}>
                     <Spin spinning={this.state.progressLogLoading}>