|
@@ -4,7 +4,7 @@ import {
|
|
|
Spin,
|
|
Spin,
|
|
|
Table,
|
|
Table,
|
|
|
message,
|
|
message,
|
|
|
- Tooltip, Tabs, Button,Modal
|
|
|
|
|
|
|
+ Tooltip, Tabs, Button, Modal, Form, Input
|
|
|
} from "antd";
|
|
} from "antd";
|
|
|
import {ShowModal,getProjectStatus} from "@/tools";
|
|
import {ShowModal,getProjectStatus} from "@/tools";
|
|
|
import FilterColumn from './filterColumn';
|
|
import FilterColumn from './filterColumn';
|
|
@@ -18,6 +18,19 @@ import {ChooseList} from "../chooseList";
|
|
|
import {getProjectName} from "../../../../tools";
|
|
import {getProjectName} from "../../../../tools";
|
|
|
|
|
|
|
|
const { TabPane } = Tabs;
|
|
const { TabPane } = Tabs;
|
|
|
|
|
+const layout = {
|
|
|
|
|
+ labelCol: {
|
|
|
|
|
+ span: 8,
|
|
|
|
|
+ },
|
|
|
|
|
+ wrapperCol: {
|
|
|
|
|
+ span: 16,
|
|
|
|
|
+ },
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const formItemLayout = {
|
|
|
|
|
+ labelCol: { span: 8 },
|
|
|
|
|
+ wrapperCol: { span: 14 },
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
class CostAuditList extends Component{
|
|
class CostAuditList extends Component{
|
|
|
constructor(props) {
|
|
constructor(props) {
|
|
@@ -44,9 +57,9 @@ class CostAuditList extends Component{
|
|
|
title: "项目状态",
|
|
title: "项目状态",
|
|
|
dataIndex: "projectStatus",
|
|
dataIndex: "projectStatus",
|
|
|
key: "projectStatus",
|
|
key: "projectStatus",
|
|
|
- render: (text) => {
|
|
|
|
|
- return getProjectName(text);
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ render: (text) => (
|
|
|
|
|
+ getProjectName(text)
|
|
|
|
|
+ ),
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "分类名称",
|
|
title: "分类名称",
|
|
@@ -103,8 +116,8 @@ class CostAuditList extends Component{
|
|
|
dataIndex: "chooseType",
|
|
dataIndex: "chooseType",
|
|
|
key: "chooseType",
|
|
key: "chooseType",
|
|
|
render: (text) => {
|
|
render: (text) => {
|
|
|
- return text == 0 ? '第三方成本' :
|
|
|
|
|
- text == 1 ? '催款节点' :'官费';
|
|
|
|
|
|
|
+ return text === 0 ? '第三方成本' :
|
|
|
|
|
+ text === 1 ? '催款节点' : text === 2 ? '官费' : '';
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -175,6 +188,7 @@ class CostAuditList extends Component{
|
|
|
})
|
|
})
|
|
|
}}>
|
|
}}>
|
|
|
{
|
|
{
|
|
|
|
|
+ this.props.isPatentManager ? '查看详情' :
|
|
|
record.status === 0 ? '待审核' :
|
|
record.status === 0 ? '待审核' :
|
|
|
record.status === 1 ? '待支付' :
|
|
record.status === 1 ? '待支付' :
|
|
|
record.status === 2 ? '查看详情' : '查看详情'
|
|
record.status === 2 ? '查看详情' : '查看详情'
|
|
@@ -227,6 +241,7 @@ class CostAuditList extends Component{
|
|
|
orderPaymentsId: 0,
|
|
orderPaymentsId: 0,
|
|
|
}
|
|
}
|
|
|
this.printAll = this.printAll.bind(this);
|
|
this.printAll = this.printAll.bind(this);
|
|
|
|
|
+ this.examineAll = this.examineAll.bind(this);
|
|
|
this.exportExec = this.exportExec.bind(this);
|
|
this.exportExec = this.exportExec.bind(this);
|
|
|
this.changeList = this.changeList.bind(this);
|
|
this.changeList = this.changeList.bind(this);
|
|
|
}
|
|
}
|
|
@@ -234,21 +249,34 @@ class CostAuditList extends Component{
|
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
|
this.loadData()
|
|
this.loadData()
|
|
|
if(this.props.isPatentManager){
|
|
if(this.props.isPatentManager){
|
|
|
- let arr = JSON.parse(JSON.stringify(this.state.columns));
|
|
|
|
|
|
|
+ let arr = this.state.columns;
|
|
|
|
|
+ arr.splice(7, 0, {
|
|
|
|
|
+ title: "官费",
|
|
|
|
|
+ dataIndex: "officialCost",
|
|
|
|
|
+ key: "officialCost",
|
|
|
|
|
+ render: (text,record) => {
|
|
|
|
|
+ return (
|
|
|
|
|
+ (text === 1 ? '含官费' : '不含官费' ) + (record.costReduction === 1 ? '有费减' : '')
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ arr.splice(8, 0, {
|
|
|
|
|
+ title: "流程状态",
|
|
|
|
|
+ dataIndex: "processStatus",
|
|
|
|
|
+ key: "processStatus",
|
|
|
|
|
+ render: (text,record) => {
|
|
|
|
|
+ return (
|
|
|
|
|
+ text === 0 ? '发起' :
|
|
|
|
|
+ text === 1 ? '专利管理员审核' :
|
|
|
|
|
+ text === 2 ? '财务审核' : ''
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
this.setState({
|
|
this.setState({
|
|
|
- columns:arr.splice(7, 0, {
|
|
|
|
|
- title: "官费",
|
|
|
|
|
- dataIndex: "officialCost",
|
|
|
|
|
- key: "officialCost",
|
|
|
|
|
- render: (text,record) => {
|
|
|
|
|
- return (
|
|
|
|
|
- (text === 1 ? '含官费' : '不含官费' ) + (record.costReduction === 1 ? '有费减' : '')
|
|
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
- },)
|
|
|
|
|
|
|
+ columns:arr
|
|
|
})
|
|
})
|
|
|
}else{
|
|
}else{
|
|
|
- let arr = JSON.parse(JSON.stringify(this.state.columns));
|
|
|
|
|
|
|
+ let arr = this.state.columns;
|
|
|
arr.splice(9, 0, {
|
|
arr.splice(9, 0, {
|
|
|
title: "签单金额(万元)",
|
|
title: "签单金额(万元)",
|
|
|
dataIndex: "totalAmount",
|
|
dataIndex: "totalAmount",
|
|
@@ -323,6 +351,80 @@ class CostAuditList extends Component{
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //专利审核
|
|
|
|
|
+ examineAll(status){
|
|
|
|
|
+ if(!this.state.remarks){
|
|
|
|
|
+ message.warning('请输入备注')
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ let _this = this;
|
|
|
|
|
+ Modal.confirm({
|
|
|
|
|
+ title: '确定要批量审核已标记的条目吗?',
|
|
|
|
|
+ content: '已标记的序号为'+_this.state.selectedRowKeys.join(','),
|
|
|
|
|
+ okText: '确定',
|
|
|
|
|
+ okType: 'primary',
|
|
|
|
|
+ cancelText: '取消',
|
|
|
|
|
+ onOk() {
|
|
|
|
|
+ _this.setState({
|
|
|
|
|
+ loading: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ remarks:_this.state.remarks,
|
|
|
|
|
+ status:status
|
|
|
|
|
+ }
|
|
|
|
|
+ if(_this.state.selectedRowKeys.length === 1){
|
|
|
|
|
+ data.pid = _this.state.selectedRowKeys[0]
|
|
|
|
|
+ }else{
|
|
|
|
|
+ data.pids = _this.state.selectedRowKeys.join(',')
|
|
|
|
|
+ }
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ method: "POST",
|
|
|
|
|
+ dataType: "json",
|
|
|
|
|
+ crossDomain: false,
|
|
|
|
|
+ url: globalConfig.context + "/api/admin/company/paymentExamine",
|
|
|
|
|
+ data: data,
|
|
|
|
|
+ }).done(
|
|
|
|
|
+ function (data) {
|
|
|
|
|
+ _this.setState({
|
|
|
|
|
+ loading: false,
|
|
|
|
|
+ });
|
|
|
|
|
+ if (data.error.length === 0) {
|
|
|
|
|
+ // let failLength = data.data.fail.length;
|
|
|
|
|
+ // let okLength = data.data.OK.length;
|
|
|
|
|
+ // Modal.info({
|
|
|
|
|
+ // title: '操作提醒',
|
|
|
|
|
+ // content: (
|
|
|
|
|
+ // <div>
|
|
|
|
|
+ // <div style={{paddingBottom:'15px'}}>
|
|
|
|
|
+ // {'操作成功'+okLength+'条,'+'操作失败'+failLength+'条'}
|
|
|
|
|
+ // </div>
|
|
|
|
|
+ // {
|
|
|
|
|
+ // failLength !== 0 ?
|
|
|
|
|
+ // <div>操作失败序号为:{data.data.fail.join(',')}</div>:
|
|
|
|
|
+ // <div/>
|
|
|
|
|
+ // }
|
|
|
|
|
+ // </div>
|
|
|
|
|
+ // ),
|
|
|
|
|
+ // onOk() {},
|
|
|
|
|
+ // });
|
|
|
|
|
+ message.success('审核成功')
|
|
|
|
|
+ _this.setState({
|
|
|
|
|
+ selectedRowKeys: [],
|
|
|
|
|
+ patentVisible:false
|
|
|
|
|
+ });
|
|
|
|
|
+ _this.loadData(_this.state.page);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ message.warning(data.error[0].message);
|
|
|
|
|
+ }
|
|
|
|
|
+ }.bind(_this)
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ onCancel() {
|
|
|
|
|
+ // console.log('Cancel');
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//批量审核
|
|
//批量审核
|
|
|
printAll() {
|
|
printAll() {
|
|
|
if(this.state.selectedRowKeys.length === 0){
|
|
if(this.state.selectedRowKeys.length === 0){
|
|
@@ -450,7 +552,15 @@ class CostAuditList extends Component{
|
|
|
<Button
|
|
<Button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
style={{ margin: "11px 0px 10px 10px" }}
|
|
style={{ margin: "11px 0px 10px 10px" }}
|
|
|
- onClick={this.printAll}
|
|
|
|
|
|
|
+ onClick={this.props.isPatentManager ? ()=>{
|
|
|
|
|
+ if(this.state.selectedRowKeys.length === 0){
|
|
|
|
|
+ message.warning('请先选择需要批量审核的专利');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.setState({
|
|
|
|
|
+ patentVisible:true
|
|
|
|
|
+ })
|
|
|
|
|
+ } : this.printAll}
|
|
|
disabled={!this.state.dataSource.length}
|
|
disabled={!this.state.dataSource.length}
|
|
|
>
|
|
>
|
|
|
{this.props.isPatentManager ? '批量审核' :'批量支付'}
|
|
{this.props.isPatentManager ? '批量审核' :'批量支付'}
|
|
@@ -498,7 +608,7 @@ class CostAuditList extends Component{
|
|
|
},
|
|
},
|
|
|
getCheckboxProps: (record) => ({
|
|
getCheckboxProps: (record) => ({
|
|
|
// 0审核 1待支付 2驳回 3已支付 只有待支付可以勾选
|
|
// 0审核 1待支付 2驳回 3已支付 只有待支付可以勾选
|
|
|
- disabled: record.status !== 1,
|
|
|
|
|
|
|
+ disabled: this.props.isPatentManager ? record.processStatus !== 1 : record.status !== 1,
|
|
|
})
|
|
})
|
|
|
}}
|
|
}}
|
|
|
scroll={{ x: "max-content", y: 0 }}
|
|
scroll={{ x: "max-content", y: 0 }}
|
|
@@ -510,6 +620,8 @@ class CostAuditList extends Component{
|
|
|
{
|
|
{
|
|
|
this.state.visible ?
|
|
this.state.visible ?
|
|
|
<DetailsModal
|
|
<DetailsModal
|
|
|
|
|
+ isAuditPayment={!this.props.isPatentManager}
|
|
|
|
|
+ isAuditPaymentGLY={this.props.isPatentManager}
|
|
|
tid={this.state.selectInfor.tid}
|
|
tid={this.state.selectInfor.tid}
|
|
|
orderNo={this.state.selectInfor.orderNo}
|
|
orderNo={this.state.selectInfor.orderNo}
|
|
|
projectType={this.state.selectInfor.projectType}
|
|
projectType={this.state.selectInfor.projectType}
|
|
@@ -532,7 +644,8 @@ class CostAuditList extends Component{
|
|
|
tid={this.state.tid}
|
|
tid={this.state.tid}
|
|
|
visible={this.state.paymentVisible}
|
|
visible={this.state.paymentVisible}
|
|
|
projectType={this.state.projectType}
|
|
projectType={this.state.projectType}
|
|
|
- isAuditPayment={true}
|
|
|
|
|
|
|
+ isAuditPayment={!this.props.isPatentManager}
|
|
|
|
|
+ isAuditPaymentGLY={this.props.isPatentManager}
|
|
|
onCancer={()=>{
|
|
onCancer={()=>{
|
|
|
this.setState({
|
|
this.setState({
|
|
|
paymentVisible: false,
|
|
paymentVisible: false,
|
|
@@ -556,7 +669,8 @@ class CostAuditList extends Component{
|
|
|
payId={this.state.orderPaymentsId}
|
|
payId={this.state.orderPaymentsId}
|
|
|
visible={this.state.payRecordVisible}
|
|
visible={this.state.payRecordVisible}
|
|
|
tid={this.state.tid}
|
|
tid={this.state.tid}
|
|
|
- isAuditPayment={true}
|
|
|
|
|
|
|
+ isAuditPayment={!this.props.isPatentManager}
|
|
|
|
|
+ isAuditPaymentGLY={this.props.isPatentManager}
|
|
|
projectType={this.state.projectType}
|
|
projectType={this.state.projectType}
|
|
|
changeVisible={()=>{
|
|
changeVisible={()=>{
|
|
|
this.loadData(this.state.page,this.state.searchInfor);
|
|
this.loadData(this.state.page,this.state.searchInfor);
|
|
@@ -568,6 +682,49 @@ class CostAuditList extends Component{
|
|
|
})
|
|
})
|
|
|
}}
|
|
}}
|
|
|
/> : <div/>}
|
|
/> : <div/>}
|
|
|
|
|
+ <Modal
|
|
|
|
|
+ title='专利成本审核'
|
|
|
|
|
+ className='payRecordComponent'
|
|
|
|
|
+ width={500}
|
|
|
|
|
+ maskClosable={false}
|
|
|
|
|
+ footer={null}
|
|
|
|
|
+ visible={this.state.patentVisible}
|
|
|
|
|
+ onCancel={() => {
|
|
|
|
|
+ this.setState({
|
|
|
|
|
+ patentVisible:false
|
|
|
|
|
+ })
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
|
|
+ <Form
|
|
|
|
|
+ {...layout}
|
|
|
|
|
+ name="basic"
|
|
|
|
|
+ initialValues={{
|
|
|
|
|
+ remember: true,
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
|
|
+ <div style={{
|
|
|
|
|
+ paddingBottom:'20px'
|
|
|
|
|
+ }}>
|
|
|
|
|
+ <div style={{
|
|
|
|
|
+ paddingBottom:'10px'
|
|
|
|
|
+ }}>成本审核备注:</div>
|
|
|
|
|
+ <Input
|
|
|
|
|
+ row={5}
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ onChange={(e) => { this.setState({
|
|
|
|
|
+ remarks:e.target.value
|
|
|
|
|
+ })}} />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style={{display:'flex',justifyContent:'center'}}>
|
|
|
|
|
+ <Button type='primary' style={{marginRight:'15px'}} onClick={()=>{
|
|
|
|
|
+ this.examineAll(1);
|
|
|
|
|
+ }}>通过</Button>
|
|
|
|
|
+ <Button type='primary' style={{background:'#f00'}} onClick={()=>{
|
|
|
|
|
+ this.examineAll(2);
|
|
|
|
|
+ }}>驳回</Button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Form>
|
|
|
|
|
+ </Modal>
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|