|
@@ -3,7 +3,9 @@ import {Button, DatePicker, Input, message, Select, Spin, Table, Tabs} from "ant
|
|
import {ChooseList} from "../../order/orderNew/chooseList";
|
|
import {ChooseList} from "../../order/orderNew/chooseList";
|
|
import $ from "jquery/src/ajax";
|
|
import $ from "jquery/src/ajax";
|
|
import {
|
|
import {
|
|
- ShowModal
|
|
|
|
|
|
+ ShowModal,
|
|
|
|
+ getProjectName,
|
|
|
|
+ download,
|
|
} from "@/tools";
|
|
} from "@/tools";
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
import ProjectDetails from "../summary/projectDetails";
|
|
import ProjectDetails from "../summary/projectDetails";
|
|
@@ -40,18 +42,18 @@ class EnterpriseProjectQuery extends Component{
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "派单时间",
|
|
title: "派单时间",
|
|
- dataIndex: "distributionTime",
|
|
|
|
- key: "distributionTime",
|
|
|
|
|
|
+ dataIndex: "taskDistributionTime",
|
|
|
|
+ key: "taskDistributionTime",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "派单省份",
|
|
title: "派单省份",
|
|
- dataIndex: "province",
|
|
|
|
- key: "province",
|
|
|
|
|
|
+ dataIndex: "provinceName",
|
|
|
|
+ key: "provinceName",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '订单部门',
|
|
title: '订单部门',
|
|
- dataIndex: 'departmentName',
|
|
|
|
- key: 'departmentName',
|
|
|
|
|
|
+ dataIndex: 'depName',
|
|
|
|
+ key: 'depName',
|
|
render:(text)=>{
|
|
render:(text)=>{
|
|
return (text&&text.length>8?text.substr(0,8)+'...':text)
|
|
return (text&&text.length>8?text.substr(0,8)+'...':text)
|
|
}
|
|
}
|
|
@@ -83,8 +85,8 @@ class EnterpriseProjectQuery extends Component{
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "项目名称",
|
|
title: "项目名称",
|
|
- dataIndex: "pname",
|
|
|
|
- key: "pname",
|
|
|
|
|
|
+ dataIndex: "commodityName",
|
|
|
|
+ key: "commodityName",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "数量",
|
|
title: "数量",
|
|
@@ -106,13 +108,7 @@ class EnterpriseProjectQuery extends Component{
|
|
dataIndex: "projectStatus",
|
|
dataIndex: "projectStatus",
|
|
key: "projectStatus",
|
|
key: "projectStatus",
|
|
render:(value)=>(
|
|
render:(value)=>(
|
|
- value === 0 ? '未开始':
|
|
|
|
- value === 1 ? '进行中':
|
|
|
|
- value === 2 ? '已暂停':
|
|
|
|
- value === 3 ? '已驳回(专利、软著项目编写)':
|
|
|
|
- value === 4 ? '已完成':
|
|
|
|
- value === 5 ? '项目已完成 已退单':
|
|
|
|
- value === 6 ? '项目未完成 已退单': ''
|
|
|
|
|
|
+ getProjectName(parseInt(value))
|
|
)
|
|
)
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -140,11 +136,10 @@ class EnterpriseProjectQuery extends Component{
|
|
|
|
|
|
contactsOption: [],
|
|
contactsOption: [],
|
|
contactsOptionData: [],
|
|
contactsOptionData: [],
|
|
-
|
|
|
|
- status: 0,
|
|
|
|
}
|
|
}
|
|
this.changeList = this.changeList.bind(this);
|
|
this.changeList = this.changeList.bind(this);
|
|
this.resetAll = this.resetAll.bind(this);
|
|
this.resetAll = this.resetAll.bind(this);
|
|
|
|
+ this.exportPending = this.exportPending.bind(this);
|
|
}
|
|
}
|
|
|
|
|
|
changeList(arr) {
|
|
changeList(arr) {
|
|
@@ -169,23 +164,22 @@ class EnterpriseProjectQuery extends Component{
|
|
method: "get",
|
|
method: "get",
|
|
dataType: "json",
|
|
dataType: "json",
|
|
crossDomain: false,
|
|
crossDomain: false,
|
|
- url: globalConfig.context + "/api/admin/statistis/selectTaskList",
|
|
|
|
|
|
+ url: globalConfig.context + "/api/admin/orderProject/managerSelect",
|
|
data: {
|
|
data: {
|
|
pageNo: pageNo || 1,
|
|
pageNo: pageNo || 1,
|
|
pageSize: this.state.pagination.pageSize || 10,
|
|
pageSize: this.state.pagination.pageSize || 10,
|
|
- startDate: this.state.releaseDate.length > 0 ? this.state.releaseDate[0]: undefined, //开始时间
|
|
|
|
- endDate: this.state.releaseDate.length > 0 ? this.state.releaseDate[1]: undefined, //结束时间
|
|
|
|
|
|
+ startTime: this.state.releaseDate.length > 0 ? this.state.releaseDate[0]: undefined, //开始时间
|
|
|
|
+ endTime: this.state.releaseDate.length > 0 ? this.state.releaseDate[1]: undefined, //结束时间
|
|
depId: this.state.depId || undefined,//部门ID
|
|
depId: this.state.depId || undefined,//部门ID
|
|
- thchDepId: this.state.thchDepId || undefined,//责任部门ID
|
|
|
|
- projectStatus: this.state.projectStatus || undefined,//项目类别
|
|
|
|
|
|
+ techDepId: this.state.thchDepId || undefined,//责任部门ID
|
|
|
|
+ cid: this.state.projectStatus || undefined,//项目类别
|
|
projectType: typeof this.state.projectType === 'number' ? this.state.projectType : undefined,//项目分类
|
|
projectType: typeof this.state.projectType === 'number' ? this.state.projectType : undefined,//项目分类
|
|
orderNo: this.state.searchOrderNo || undefined,//订单编号
|
|
orderNo: this.state.searchOrderNo || undefined,//订单编号
|
|
contractNo: this.state.searchContractNo || undefined,//合同编号
|
|
contractNo: this.state.searchContractNo || undefined,//合同编号
|
|
- userName: this.state.searchEnterpriseName || undefined,//企业名称
|
|
|
|
|
|
+ name: this.state.searchEnterpriseName || undefined,//企业名称
|
|
declarationBatch: this.state.declarationBatch || undefined,//申报批次
|
|
declarationBatch: this.state.declarationBatch || undefined,//申报批次
|
|
- projectSituation: typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined,//项目分类
|
|
|
|
- projectAmount: this.state.projectAmount || undefined,//项目金额
|
|
|
|
- status: this.state.status,
|
|
|
|
|
|
+ // projectSituation: typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined,//项目分类
|
|
|
|
+ commodityPrice: this.state.projectAmount || undefined,//项目金额
|
|
},
|
|
},
|
|
success: function (data) {
|
|
success: function (data) {
|
|
ShowModal(this);
|
|
ShowModal(this);
|
|
@@ -275,7 +269,6 @@ class EnterpriseProjectQuery extends Component{
|
|
depId:'',
|
|
depId:'',
|
|
thchDepId:'',
|
|
thchDepId:'',
|
|
projectStatus:'',
|
|
projectStatus:'',
|
|
- status: 0,
|
|
|
|
},()=>{
|
|
},()=>{
|
|
this.loadData();
|
|
this.loadData();
|
|
})
|
|
})
|
|
@@ -318,43 +311,41 @@ class EnterpriseProjectQuery extends Component{
|
|
}
|
|
}
|
|
|
|
|
|
exportPending() {
|
|
exportPending() {
|
|
- 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: 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,//申报批次
|
|
|
|
- projectSituation: typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined,//项目情况
|
|
|
|
- projectAmount: this.state.projectAmount || undefined,//项目金额
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- for(let key in data){
|
|
|
|
- if(data[key]){
|
|
|
|
- url = url+`&${key}=${data[key]}`;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- window.open(globalConfig.context +url);
|
|
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "get",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ url: globalConfig.context + "/api/admin/orderProject/exportManagerSelect",
|
|
|
|
+ data: {
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 99999,
|
|
|
|
+ startTime: this.state.releaseDate.length > 0 ? this.state.releaseDate[0]: undefined, //开始时间
|
|
|
|
+ endTime: this.state.releaseDate.length > 0 ? this.state.releaseDate[1]: undefined, //结束时间
|
|
|
|
+ depId: this.state.depId || undefined,//部门ID
|
|
|
|
+ techDepId: this.state.thchDepId || undefined,//责任部门ID
|
|
|
|
+ cid: this.state.projectStatus || undefined,//项目类别
|
|
|
|
+ projectType: typeof this.state.projectType === 'number' ? this.state.projectType : undefined,//项目分类
|
|
|
|
+ orderNo: this.state.searchOrderNo || undefined,//订单编号
|
|
|
|
+ contractNo: this.state.searchContractNo || undefined,//合同编号
|
|
|
|
+ name: this.state.searchEnterpriseName || undefined,//企业名称
|
|
|
|
+ declarationBatch: this.state.declarationBatch || undefined,//申报批次
|
|
|
|
+ commodityPrice: this.state.projectAmount || undefined,//项目金额
|
|
|
|
+ },
|
|
|
|
+ success: function (data) {
|
|
|
|
+ ShowModal(this);
|
|
|
|
+ if (data.error && data.error.length) {
|
|
|
|
+ message.warning(data.error[0].message);
|
|
|
|
+ } else {
|
|
|
|
+ download(data.data,true);
|
|
|
|
+ }
|
|
|
|
+ }.bind(this),
|
|
|
|
+ }).always(
|
|
|
|
+ function () {
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: false,
|
|
|
|
+ });
|
|
|
|
+ }.bind(this)
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -413,16 +404,6 @@ class EnterpriseProjectQuery extends Component{
|
|
let infor = this.state.contactsOptionData.filter((v)=>v.id === e);
|
|
let infor = this.state.contactsOptionData.filter((v)=>v.id === e);
|
|
this.setState({
|
|
this.setState({
|
|
projectStatus: e,
|
|
projectStatus: e,
|
|
- },()=>{
|
|
|
|
- if(infor[0].cname === '高新' && typeof this.state.projectType !== 'number'){
|
|
|
|
- this.setState({
|
|
|
|
- status: 1,
|
|
|
|
- })
|
|
|
|
- }else if (typeof this.state.projectType !== 'number'){
|
|
|
|
- this.setState({
|
|
|
|
- status: 0,
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
})
|
|
})
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
@@ -438,7 +419,6 @@ class EnterpriseProjectQuery extends Component{
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
this.setState({
|
|
this.setState({
|
|
projectType: e,
|
|
projectType: e,
|
|
- status: e === 4 ? 2 : e === 2 ? 3 : e === 1 ? 4 : e === 5 ? 1 : 0,
|
|
|
|
})
|
|
})
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
@@ -529,27 +509,27 @@ class EnterpriseProjectQuery extends Component{
|
|
<Option value={9}>80万上</Option>
|
|
<Option value={9}>80万上</Option>
|
|
</Select>
|
|
</Select>
|
|
</span>
|
|
</span>
|
|
- <span style={{display:"inline-block"}}>
|
|
|
|
- <span style={{marginRight:'10px',marginBottom:'10px'}}>项目情况 :</span>
|
|
|
|
- <Select
|
|
|
|
- value={typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined}
|
|
|
|
- placeholder="请选择项目情况"
|
|
|
|
- style={{ width: 200,marginRight:'10px',marginBottom:'10px' }}
|
|
|
|
- onChange={(e) => {
|
|
|
|
- this.setState({
|
|
|
|
- projectSituation: e,
|
|
|
|
- });
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- <Option value={0}>未开始</Option>
|
|
|
|
- <Option value={1}>进行中</Option>
|
|
|
|
- <Option value={2}>已暂停</Option>
|
|
|
|
- <Option value={3}>已驳回(专利、软著项目编写)</Option>
|
|
|
|
- <Option value={4}>已完成</Option>
|
|
|
|
- <Option value={5}>项目已完成 已退单</Option>
|
|
|
|
- <Option value={6}>项目未完成 已退单</Option>
|
|
|
|
- </Select>
|
|
|
|
- </span>
|
|
|
|
|
|
+ {/*<span style={{display:"inline-block"}}>*/}
|
|
|
|
+ {/* <span style={{marginRight:'10px',marginBottom:'10px'}}>项目情况 :</span>*/}
|
|
|
|
+ {/* <Select*/}
|
|
|
|
+ {/* value={typeof this.state.projectSituation === 'number' ? this.state.projectSituation : undefined}*/}
|
|
|
|
+ {/* placeholder="请选择项目情况"*/}
|
|
|
|
+ {/* style={{ width: 200,marginRight:'10px',marginBottom:'10px' }}*/}
|
|
|
|
+ {/* onChange={(e) => {*/}
|
|
|
|
+ {/* this.setState({*/}
|
|
|
|
+ {/* projectSituation: e,*/}
|
|
|
|
+ {/* });*/}
|
|
|
|
+ {/* }}*/}
|
|
|
|
+ {/* >*/}
|
|
|
|
+ {/* <Option value={0}>未开始</Option>*/}
|
|
|
|
+ {/* <Option value={1}>进行中</Option>*/}
|
|
|
|
+ {/* <Option value={2}>已暂停</Option>*/}
|
|
|
|
+ {/* <Option value={3}>已驳回(专利、软著项目编写)</Option>*/}
|
|
|
|
+ {/* <Option value={4}>已完成</Option>*/}
|
|
|
|
+ {/* <Option value={5}>项目已完成 已退单</Option>*/}
|
|
|
|
+ {/* <Option value={6}>项目未完成 已退单</Option>*/}
|
|
|
|
+ {/* </Select>*/}
|
|
|
|
+ {/*</span>*/}
|
|
<span style={{display:"inline-block"}}>
|
|
<span style={{display:"inline-block"}}>
|
|
<span style={{marginRight:'10px',marginBottom:'10px'}}>派单时间 :</span>
|
|
<span style={{marginRight:'10px',marginBottom:'10px'}}>派单时间 :</span>
|
|
<RangePicker
|
|
<RangePicker
|
|
@@ -601,7 +581,7 @@ class EnterpriseProjectQuery extends Component{
|
|
this.setState({
|
|
this.setState({
|
|
projectdetailsId: record.id,
|
|
projectdetailsId: record.id,
|
|
projectdetailsOrderNo: record.orderNo,
|
|
projectdetailsOrderNo: record.orderNo,
|
|
- pname: record.pname,
|
|
|
|
|
|
+ commodityName: record.commodityName,
|
|
visible: true,
|
|
visible: true,
|
|
})
|
|
})
|
|
}}
|
|
}}
|
|
@@ -614,7 +594,7 @@ class EnterpriseProjectQuery extends Component{
|
|
visible={this.state.visible}
|
|
visible={this.state.visible}
|
|
id={this.state.projectdetailsId}
|
|
id={this.state.projectdetailsId}
|
|
orderNo={this.state.projectdetailsOrderNo}
|
|
orderNo={this.state.projectdetailsOrderNo}
|
|
- taskName={this.state.pname}
|
|
|
|
|
|
+ taskName={this.state.commodityName}
|
|
visitOk={()=>{
|
|
visitOk={()=>{
|
|
this.setState({
|
|
this.setState({
|
|
visible: false,
|
|
visible: false,
|