Quellcode durchsuchen

修改项目发起

HW vor 3 Jahren
Ursprung
Commit
5b959e76c8

+ 516 - 0
js/component/common/initiateOrder/index.jsx

@@ -0,0 +1,516 @@
+import React, {Component} from "react";
+import {Button, Col, Form, message, Radio, Spin, Table, Tag} from "antd";
+import PatentCheck from "../patentCheck";
+import CheckProject from "../../manageCenter/components/checkProject";
+
+class InitiateOrder extends Component {
+    constructor(props) {
+        super(props);
+    }
+
+    render() {
+        return (
+            <div>
+                <Spin
+                    spinning={this.state.sureOutLoading || this.state.waiDetailLoading || this.state.payNodeLoading || this.state.thirdInfoLoading}>
+                    <div style={{marginTop: 10}}>
+                        <div className="clearfix">
+                            <FormItem
+                                className="half-item"
+                                labelCol={{span: 3}}
+                                wrapperCol={{span: 14}}
+                                label={
+                                    <span>
+                            <strong style={{color: '#f00'}}>*</strong>
+                            类型
+                          </span>
+                                }
+                            >
+                                <Radio.Group
+                                    disabled={this.state.payNodeLoading || this.state.thirdInfoLoading}
+                                    value={this.state.startType}
+                                    onChange={(e) => {
+                                        let _this = this;
+                                        if (this.state.thirdInfoList.length > 0) {
+                                            confirm({
+                                                title: '确定要切换吗?',
+                                                content: '切换将删除所有第三信息和付款节点',
+                                                onOk() {
+                                                    return new Promise((resolve, reject) => {
+                                                        _this.setState({startType: e.target.value}, () => {
+                                                            _this.projectTypeTabContent(_this.state.projectType);
+                                                        })
+                                                        _this.confirmDeletNew(-1, resolve, reject)
+                                                        if (_this.state.payNodeList.length > 0) {
+                                                            _this.payNodeConfirmDeletNew(-1, resolve, reject);
+                                                        }
+                                                    }).catch(() => console.log('Oops errors!'));
+                                                },
+                                                onCancel() {
+                                                },
+                                            });
+                                        } else {
+                                            this.setState({startType: e.target.value}, () => {
+                                                this.projectTypeTabContent(this.state.projectType);
+                                            })
+                                        }
+                                    }}
+                                >
+                                    <Radio value={0}>外包(不走总部)</Radio>
+                                    <Radio value={1}>供应商信息</Radio>
+                                </Radio.Group>
+                            </FormItem>
+                        </div>
+                        {/* 专利类型 */}
+                        <div
+                            className="clearfix"
+                            style={{
+                                display: this.state.projectType === 1 ? 'block' : 'none',
+                            }}
+                        >
+                            <FormItem
+                                className="half-item"
+                                labelCol={{span: 4}}
+                                wrapperCol={{span: 14}}
+                                label={
+                                    <span>
+                            <strong style={{color: '#f00'}}>*</strong>
+                            专利类型
+                          </span>
+                                }
+                            >
+                                <Radio.Group
+                                    disabled={this.state.payNodeLoading || this.state.thirdInfoLoading}
+                                    value={this.state.patentType}
+                                    onChange={(e) => {
+                                        let _this = this;
+                                        if (this.state.thirdInfoList.length > 0) {
+                                            confirm({
+                                                title: '确定要切换吗?',
+                                                content: '切换将删除所有第三信息和付款节点',
+                                                onOk() {
+                                                    return new Promise((resolve, reject) => {
+                                                        _this.setState({patentType: e.target.value}, () => {
+                                                            _this.projectTypeTabContent(_this.state.projectType);
+                                                        })
+                                                        _this.confirmDeletNew(-1, resolve, reject)
+                                                        if (_this.state.payNodeList.length > 0) {
+                                                            _this.payNodeConfirmDeletNew(-1, resolve, reject);
+                                                        }
+                                                    }).catch(() => console.log('Oops errors!'));
+                                                },
+                                                onCancel() {
+                                                },
+                                            });
+                                        } else {
+                                            this.setState({patentType: e.target.value}, () => {
+                                                this.projectTypeTabContent(this.state.projectType);
+                                            })
+                                        }
+                                    }}
+                                >
+                                    <Radio value={0}>专利申请/变更/转让</Radio>
+                                    <Radio value={1}>专利买卖</Radio>
+                                </Radio.Group>
+                            </FormItem>
+                        </div>
+                        <div
+                            className="clearfix"
+                            style={{
+                                display: this.state.projectType === 1 ? 'block' : 'none',
+                            }}
+                        >
+                            <FormItem
+                                className="half-item"
+                                labelCol={{span: 4}}
+                                wrapperCol={{span: 14}}
+                                label={
+                                    <span>
+                            <strong style={{color: '#f00'}}>*</strong>
+                            专利名称
+                          </span>
+                                }
+                            >
+                                <Radio.Group
+                                    disabled={this.state.payNodeLoading || this.state.thirdInfoLoading}
+                                    value={this.state.patentNameType}
+                                    onChange={(e) => {
+                                        let _this = this;
+                                        if (this.state.thirdInfoList.length > 0) {
+                                            confirm({
+                                                title: '确定要切换吗?',
+                                                content: '切换将删除所有第三信息和付款节点',
+                                                onOk() {
+                                                    return new Promise((resolve, reject) => {
+                                                        _this.setState({patentNameType: e.target.value}, () => {
+                                                            _this.projectTypeTabContent(_this.state.projectType);
+                                                        })
+                                                        _this.confirmDeletNew(-1, resolve, reject)
+                                                        if (_this.state.payNodeList.length > 0) {
+                                                            _this.payNodeConfirmDeletNew(-1, resolve, reject);
+                                                        }
+                                                    }).catch(() => console.log('Oops errors!'));
+                                                },
+                                                onCancel() {
+                                                },
+                                            });
+                                        } else {
+                                            this.setState({patentNameType: e.target.value}, () => {
+                                                this.projectTypeTabContent(this.state.projectType);
+                                            })
+                                        }
+                                    }}
+                                >
+                                    <Radio value={0}>实用新型专利</Radio>
+                                    <Radio value={1}>发明专利</Radio>
+                                    <Radio value={2}>外观专利</Radio>
+                                    {/*<Radio value={3}>*/}
+                                    {/*  其他*/}
+                                    {/*  <Input*/}
+                                    {/*    disabled={this.state.patentNameType !== 3}*/}
+                                    {/*    value={this.state.patentName}*/}
+                                    {/*    style={{ marginLeft: '15px' }}*/}
+                                    {/*    onChange={(e) => {*/}
+                                    {/*      this.setState({*/}
+                                    {/*        patentName: e.target.value,*/}
+                                    {/*      })*/}
+                                    {/*    }}*/}
+                                    {/*    placeholder="请填写专利名称"*/}
+                                    {/*  />*/}
+                                    {/*</Radio>*/}
+                                </Radio.Group>
+                            </FormItem>
+                        </div>
+                        {/*外包类型无此选项*/}
+                        {this.state.startType !== 0 && this.state.projectType === 1 ? <div className="clearfix">
+                            <FormItem
+                                className="half-item"
+                                labelCol={{span: 3}}
+                                wrapperCol={{span: 15}}
+                                label={<span>官费</span>}>
+                                {
+                                    this.state.patentType === 1 ?
+                                        <Radio.Group
+                                            value={this.state.containOfficialFees}
+                                            onChange={(e) => {
+                                                this.setState({containOfficialFees: e.target.value})
+                                            }}
+                                        >
+                                            <Radio value={0}>实际已缴费</Radio>
+                                            <Radio value={1}>实际未缴费</Radio>
+                                        </Radio.Group> :
+                                        <PatentCheck
+                                            style={{
+                                                display: 'flex',
+                                                alignItems: 'center',
+                                            }}
+                                            id={this.state.id}
+                                            patentTypeName={this.state.patentTypeName}
+                                            checkStatus={this.state.checkStatus}  //核对状态
+                                            projectType={this.state.projectType}  //项目类型
+                                            patentType={this.state.patentType}   //专利类型
+                                            startType={this.state.startType}   //1供应商 0外包
+                                            orderTaskOfficialCost={this.state.orderTaskOfficialCost}  //1含官费 0不含官费
+                                            orderTaskCostReduction={this.state.orderTaskCostReduction} //1有费减 0无费减
+                                            isPreviewPay={false}
+                                            onRefresh={() => {
+                                                this.xiangqing(this.state.tid);
+                                            }}
+                                            status={this.state.refundStatus}
+                                        />
+                                }
+                            </FormItem>
+                        </div> : <div/>}
+                        {/* 第三方信息专利 */}
+                        <div>
+                      <span
+                          style={{
+                              fontSize: '18px',
+                          }}
+                      >
+                        第三方信息
+                      </span>
+                            <span
+                                style={{
+                                    display: 'inline-block',
+                                    marginLeft: 10,
+                                    color: 'red',
+                                }}
+                            >
+                        金额总计(万元): {this.state.allTotalAmount}
+                      </span>
+                            <Button
+                                type="primary"
+                                onClick={(e) => {
+                                    //this.state.startType 0外包 1供应商   类型为外包时,当普通单
+                                    if (this.state.projectType === 1 && this.state.patentType === -1) {
+                                        message.info('请先选择专利类型');
+                                    } else if (this.state.projectType === 1 && this.state.patentNameType === -1) {
+                                        message.info('请先选择专利名称');
+                                    } else {
+                                        this.addThirdList()
+                                    }
+                                }}
+                                style={{
+                                    float: 'right',
+                                    marginRight: '50px',
+                                    marginBottom: '15px',
+                                }}
+                            >
+                                +新增供应商名称
+                            </Button>
+                        </div>
+                        <div
+                            className="clearfix"
+                            style={{
+                                // display: this.state.type == 1 ? "block" : "none",
+                                display: this.state.type == 1 ? 'block' : 'block',
+                            }}
+                        >
+                            <Spin spinning={this.state.thirdInfoLoading}>
+                                <Form layout="horizontal">
+                                    <Table
+                                        pagination={false}
+                                        columns={this.state.ContactsListsNew}
+                                        dataSource={this.state.thirdInfoList}
+                                        onRowClick={this.tableRowClickOne}
+                                        scroll={{x: 'max-content', y: 0}}
+                                        bordered
+                                        size="small"
+                                    />
+                                    <Col
+                                        span={24}
+                                        offset={9}
+                                        style={{marginTop: '15px'}}
+                                    />
+                                </Form>
+                            </Spin>
+                        </div>
+                        {/*如果是软著类或者专利类的专利申请,隐藏付款节点 但当为外包类型时,无需隐藏*/}
+                        {/*this.state.startType 0外包 1供应商*/}
+                        <div
+                            style={{
+                                display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2 ? 'none' : 'block'),  //0正常 1专利 2软著 3审计
+                            }}
+                        >
+                      <span
+                          style={{
+                              fontSize: '18px',
+                          }}
+                      >
+                        付款节点
+                      </span>
+                            <span
+                                style={{
+                                    display: 'inline-block',
+                                    marginLeft: 10,
+                                    color: 'red',
+                                }}
+                            />
+                            <Button
+                                type="primary"
+                                onClick={(e) => {
+                                    this.addPayNode()
+                                }}
+                                style={{
+                                    float: 'right',
+                                    marginRight: '50px',
+                                    marginBottom: '15px',
+                                }}
+                            >
+                                +新增付款节点
+                            </Button>
+                        </div>
+                        {/*如果是软著类或者专利类的专利申请,隐藏付款节点 但当为外包类型时,无需隐藏*/}
+                        <div
+                            className="clearfix"
+                            style={{
+                                display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2 ? 'none' : 'block'),  //0正常 1专利 2软著 3审计
+                            }}
+                        >
+                            <Spin spinning={this.state.payNodeLoading}>
+                                <Form layout="horizontal">
+                                    <Table
+                                        pagination={false}
+                                        columns={this.state.PayNodeTableColunms}
+                                        dataSource={this.state.payNodeList}
+                                        onRowClick={this.payNodeTableRowClickOne}
+                                        scroll={{x: 'max-content', y: 0}}
+                                        bordered
+                                        size="small"
+                                    />
+                                    <Col
+                                        span={24}
+                                        offset={9}
+                                        style={{marginTop: '15px'}}
+                                    />
+                                </Form>
+                            </Spin>
+                        </div>
+                        <div className="clearfix">
+                            <FormItem
+                                className="half-item"
+                                {...formItemLayout}
+                                label={
+                                    <span>
+                            <strong style={{color: '#f00'}}>*</strong>备注
+                          </span>
+                                }
+                            >
+                                <TextArea
+                                    rows={4}
+                                    value={this.state.outsourceRemarks}
+                                    onChange={(e) => {
+                                        this.setState({
+                                            outsourceRemarks: e.target.value,
+                                        })
+                                    }}
+                                    placeholder="请输入备注"
+                                />
+                            </FormItem>
+                        </div>
+                        <p
+                            className="tip"
+                            style={{
+                                paddingBottom: '12px',
+                                width: '240px',
+                                marginLeft: '145px',
+                                color: 'red',
+                            }}
+                        >
+                            首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
+                        </p>
+                        <div className="clearfix">
+                            <FormItem
+                                labelCol={{span: 4}}
+                                wrapperCol={{span: 18}}
+                                label={
+                                    <span>
+                            合同/协议扫描件
+                          </span>
+                                }
+                            >
+                                <PicturesWall
+                                    domId={'myTask3'}
+                                    fileList={this.getOrgCodeUrlWai}
+                                    pictureUrl={this.state.pictureUrl}
+                                />
+                                <p style={{color: 'red'}}>图片建议:要清晰。</p>
+                            </FormItem>
+                        </div>
+                        {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因   如果是类型为供应商则不需要发起原因*/}
+                        {/*this.state.startType  0外包  1供应商*/}
+                        {(typeof this.state.refundStatus === 'undefined' || this.state.refundStatus === 2) && this.state.startType !== 1 ?
+                            <div className="clearfix">
+                                <FormItem
+                                    className="half-item"
+                                    {...formItemLayout}
+                                    label={
+                                        <span>
+                            <strong style={{color: '#f00'}}>*</strong>发起原因
+                          </span>
+                                    }
+                                >
+                                    <TextArea
+                                        rows={4}
+                                        value={this.state.reason}
+                                        onChange={(e) => {
+                                            this.setState({
+                                                reason: e.target.value,
+                                            })
+                                        }}
+                                        placeholder="请输入发起原因"
+                                    />
+                                </FormItem>
+                            </div> : <div/>}
+                        <div className="clearfix">
+                            <div
+                                style={{
+                                    display: 'inline-black',
+                                    textAlign: 'center',
+                                }}
+                            >
+                                <Button
+                                    type="primary"
+                                    loading={this.state.loading}
+                                    onClick={() => {
+                                        this.sureOut(this.state.startType);
+                                    }}
+                                >
+                                    {
+                                        this.state.startType === 0 ? "确认发起外包,不通过总部" : "提交供应商信息"
+                                    }
+                                </Button>
+                                <p className="tip" style={{color: 'red'}}>
+                                    {
+                                        this.state.startType === 0 ? "提示:高于总部价格,费用个人承担" : "确定提交供应商信息,提交后,不可修改"
+                                    }
+                                </p>
+                            </div>
+                        </div>
+                    </div>
+                    {(this.state.refundStatus == 1 ||
+                        this.state.refundStatus == 0 ||
+                        this.state.refundStatus == 2) &&
+                    this.state.startType !== 1
+                        ? (
+                            <div className="clearfix"
+                                 style={{
+                                     display: this.state.refundStatus == 0 ? 'none' : 'block',
+                                 }}
+                            >
+                                <hr className="division"/>
+                                {parseInt(this.state.startType) !== 1 ? <div style={{
+                                    color: '#F00',
+                                    fontWeight: 'bolder',
+                                    paddingBottom: '20px',
+                                }}>
+                                    审核结果: <span
+                                    style={{paddingLeft: '20px'}}>{getRefundStatus(this.state.refundStatus)}</span>
+                                </div> : <div/>}
+                                <div className="outsourceLogList">
+                                    {
+                                        this.state.outsourceLogs && this.state.outsourceLogs.map((value, index) => (
+                                            <div key={index} className="outsourceLogItem outsource">
+                                                <div style={{
+                                                    display: 'flex',
+                                                    flexFlow: 'row nowrap',
+                                                    paddingBottom: '3px',
+                                                    paddingTop: '3px',
+                                                }}>
+                                                    <div>
+                                                        {value.aname}
+                                                    </div>
+                                                    <div style={{paddingLeft: '5px'}}>
+                                                        {
+                                                            value.status === 0 ?
+                                                                <Tag color="#2db7f5">发起外包审核</Tag> :
+                                                                value.status === 1 ? <Tag color="#87d068">通过</Tag> :
+                                                                    <Tag color="#f50">驳回</Tag>
+                                                        }
+                                                    </div>
+                                                    <div style={{
+                                                        wordBreak: 'break-all',
+                                                        maxWidth: '67%',
+                                                    }}>
+                                                        {value.remarks}
+                                                    </div>
+                                                    <div style={{paddingLeft: '10px'}}>
+                                                        {value.createTimes}
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        ))
+                                    }
+                                </div>
+                            </div>
+                        ) : (
+                            ''
+                        )}
+                </Spin>
+            </div>
+        )
+    }
+}
+
+export default InitiateOrder;

+ 218 - 0
js/component/common/initiateOrder/paymentRecord.jsx

@@ -0,0 +1,218 @@
+import React, {Component} from "react";
+import {Button, Col, Form, message, Spin, Table} from "antd";
+import $ from "jquery";
+import PayRecord from "../../manageCenter/components/checkProject/payRecord";
+
+class PaymentRecord extends Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+            orderPaymentseColunms: [
+                {
+                    title: '编号',
+                    dataIndex: 'id',
+                    key: 'id',
+                },
+                {
+                    title: '节点编号',
+                    dataIndex: 'nodeId',
+                    key: 'nodeId',
+                },
+                {
+                    title: '供应商名称',
+                    dataIndex: 'companyName',
+                    key: 'companyName',
+                    render: (text, record) => {
+                        return <span>
+                                  {
+                                      record.chooseType === 2 ? text : (text + '-' + record.tpcId)
+                                  }
+                                  {
+                                    text !== record.tpcName && record.tpcName ?
+                                        '(' + record.tpcName + ')' : ''
+                                  }
+                                </span>
+                    },
+                },
+                {
+                    title: '支付类型',
+                    dataIndex: 'chooseType',
+                    key: 'chooseType',
+                    render: (text) => {
+                        return <span>
+                                {/*0第三方 1催款 2官费*/}
+                                {text === 0 ? '第三方' : text === 1 ? '催款' : '官费'}
+                               </span>
+                    },
+                },
+                {
+                    title: '申请支付金额(万元)',
+                    dataIndex: 'applicationAmount',
+                    key: 'applicationAmount',
+                    render: (text, record) => {
+                        return <span>
+                                  {isNaN(parseFloat(text)) ? text : parseFloat(text)}
+                               </span>
+                    },
+                },
+                {
+                    title: '申请支付数量',
+                    dataIndex: 'quantity',
+                    key: 'quantity',
+                },
+                {
+                    title: '申请时间',
+                    dataIndex: 'createTimes',
+                    key: 'createTimes',
+                },
+                {
+                    title: '状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: (text, record) => {
+                        return <div style={{
+                            display: 'flex',
+                            justifyContent: 'center',
+                        }}>
+                            <div style={{
+                                paddingRight: '15px',
+                            }}>
+                                {
+                                    text === 0 ? '审核中' :
+                                        text === 1 ? '审核通过' :
+                                            text === 2 ? '已驳回' :
+                                                text === 3 ? '支付完成' : '已取消'
+                                }
+                            </div>
+                            <Button type="primary" size='small' onClick={() => {
+                                this.setState({
+                                    payRecordVisible: true,
+                                    orderPaymentsId: record.id,
+                                })
+                            }}>
+                                {this.operationJudgmentName(text)}
+                            </Button>
+                        </div>
+                    },
+                },
+            ],//支付记录
+            selectOrderPayments:[]
+        }
+        this.operationJudgmentName = this.operationJudgmentName.bind(this);
+        this.getSelectOrderPayment = this.getSelectOrderPayment.bind(this);
+    }
+
+    componentDidMount() {
+        if(this.props.tid){
+            this.getSelectOrderPayment();
+        }
+    }
+
+    //0审核 1待支付 2驳回 3已支付 4取消
+    operationJudgmentName(id) {
+        if(this.props.isAuditPayment){          //财务
+            return id === 0 ? '待审核' :
+                id === 1 ? '待支付' :
+                    id === 2 ? '查看详情' : '查看详情'
+        }else{
+            return id === 0 ? '待审核' :
+                id === 1 ? '待支付' :
+                    id === 2 ? '查看详情' : '查看详情'
+        }
+    }
+
+    //支付列表
+    getSelectOrderPayment() {
+        this.setState({
+            payRecordsLoading: true
+        })
+        $.ajax({
+            method: 'get',
+            dataType: 'json',
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/company/selectOrderPayment',
+            data: {
+                id: this.props.tid,
+            },
+            success: function (data) {
+                if (data.error.length) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    }
+                } else {
+                    this.setState({
+                        selectOrderPayments: data.data
+                    })
+                }
+            }.bind(this),
+        }).always(
+            function () {
+                this.setState({
+                    payRecordsLoading: false
+                })
+            }.bind(this)
+        )
+    }
+
+    //刷新
+    refresh(){
+        if(this.props.tid){
+            this.getSelectOrderPayment();
+        }
+    }
+
+    render() {
+        return (
+            this.state.selectOrderPayments.length > 0 ? <div>
+                <div className="title">支付记录(已修改)</div>
+                <Spin spinning={this.state.payRecordsLoading}>
+                    <Form layout="horizontal">
+                        <Table
+                            pagination={false}
+                            columns={this.state.orderPaymentseColunms}
+                            dataSource={this.state.selectOrderPayments}
+                            style={{
+                                cursor: 'pointer',
+                            }}
+                            onRowClick={(record) => {
+                                this.setState({
+                                    payRecordVisible: true,
+                                    orderPaymentsId: record.id,
+                                })
+                            }}
+                            scroll={{x: 'max-content', y: 0}}
+                            bordered
+                            size="middle"
+                        />
+                        <Col span={24} offset={9} style={{marginTop: '15px'}}/>
+                    </Form>
+                </Spin>
+
+                {/*  支付记录操作弹出  */}
+                {this.state.payRecordVisible ? <PayRecord
+                    {...this.props}
+                    tid={this.props.tid}
+                    projectType={this.props.projectType}
+                    patentType={this.props.patentType}
+                    payId={this.state.orderPaymentsId}
+                    visible={this.state.payRecordVisible}
+                    isAuditPayment={this.props.isAuditPayment}
+                    isAuditPaymentGLY={this.props.isAuditPaymentGLY}
+                    onRefresh={()=>{
+                        this.props.onRefresh();
+                        this.refresh();
+                    }}
+                    changeVisible={()=>{
+                        this.refresh();
+                        this.props.onRefresh && this.props.onRefresh();
+                        this.setState({
+                            payRecordVisible: false,
+                        })
+                    }}
+                /> : <div/>}
+            </div> : null
+        )
+    }
+}
+
+export default PaymentRecord;

+ 1 - 7
js/component/common/patentCheck/index.jsx

@@ -37,12 +37,6 @@ class PatentCheck extends Component{
         this.getProjectCheckLog = this.getProjectCheckLog.bind(this);
     }
 
-    componentDidUpdate(prevProps, prevState, snapshot) {
-        console.log(prevProps.checkStatus,'prevProps')
-        console.log(prevState,'prevState')
-        console.log('=================================')
-    }
-
     addProjectCheck(){
         this.setState({
             addProjectCheckLoading: true,
@@ -139,7 +133,7 @@ class PatentCheck extends Component{
                     {
                         this.props.checkStatus === 0 || this.props.checkStatus === 2 ?
                             <Popconfirm
-                                title="是否发起核对?"
+                                title="您确认是否发起核对?发起核对后已发布的官费支付申请将被取消."
                                 onConfirm={() => {
                                     this.addProjectCheck();
                                 }}

+ 97 - 195
js/component/manageCenter/components/checkProject/index.jsx

@@ -20,6 +20,10 @@ import $ from "jquery";
 import OldInforProject from "../oldInforProject";
 import PatentCheck from "../../../common/patentCheck";
 
+import PaymentRecord from '../../../common/initiateOrder/paymentRecord';
+import NewSupplier from "../../project/task/newSupplier";
+import OperationPayNode from "../../project/task/operationPayNode";
+
 const confirm = Modal.confirm
 
 class CheckProject extends Component {
@@ -30,8 +34,6 @@ class CheckProject extends Component {
       loading: false,
       previewImage: '',
       previewVisible: false,
-      payRecordVisible: false,
-      orderPaymentsId: 0,
       previewPayVisible: false,
       type: 1,//1 申请付款 2 申请付官费
       previewPayInfor: {},        //点击申请付款的第三方信息或者支付节点信息
@@ -41,110 +43,39 @@ class CheckProject extends Component {
       //付款节点表头
       PayNodeTableColunms: [],
       outsourceLogs: [],//审核日志
-      selectOrderPayments: [],//支付列表
-      orderPaymentseColunms: [
-        {
-          title: '编号',
-          dataIndex: 'id',
-          key: 'id',
-        },
-        {
-          title: '节点编号',
-          dataIndex: 'nodeId',
-          key: 'nodeId',
-        },
-        {
-          title: '供应商名称',
-          dataIndex: 'companyName',
-          key: 'companyName',
-          render: (text, record) => {
-            return <span>
-              {
-                record.chooseType === 2 ? text : (text+'-'+record.tpcId)
-              }
-              {
-                text !== record.tpcName && record.tpcName ?
-                    '('+record.tpcName+')' : ''
-              }
-            </span>
-          },
-        },
-        {
-          title: '支付类型',
-          dataIndex: 'chooseType',
-          key: 'chooseType',
-          render: (text, record) => {
-            return <span>
-              {/*0第三方 1催款 2官费*/}
-              {text === 0 ? '第三方' : text === 1 ? '催款' : '官费'}
-            </span>
-          },
-        },
-        {
-          title: '申请支付金额(万元)',
-          dataIndex: 'applicationAmount',
-          key: 'applicationAmount',
-          render: (text, record) => {
-            return <span>
-              {isNaN(parseFloat(text)) ? text : parseFloat(text)}
-            </span>
-          },
-        },
-        {
-          title: '申请支付数量',
-          dataIndex: 'quantity',
-          key: 'quantity',
-        },
-        {
-          title: '申请时间',
-          dataIndex: 'createTimes',
-          key: 'createTimes',
-        },
-        {
-          title: '状态',
-          dataIndex: 'status',
-          key: 'status',
-          render: (text, record) => {
-              return <div style={{
-                display: 'flex',
-                justifyContent: 'center',
-              }}>
-                <div style={{
-                  paddingRight: '15px',
-                }}>
-                  {
-                    text === 0 ? '审核中' :
-                        text === 1 ? '审核通过' :
-                            text === 2 ? '已驳回' :
-                                text === 3 ? '支付完成' : '已取消'
-                  }
-                </div>
-                <Button type="primary" size='small' onClick={()=>{
-                  this.setState({
-                    payRecordVisible: true,
-                    orderPaymentsId: record.id,
-                  })
-                }}>
-                  {this.operationJudgmentName(text)}
-                </Button>
-              </div>
-          },
-        },
-      ],//支付记录
+
 
       outsourcingLogLoading: false,
       payRecordsLoading: false,
+
+      PayNodeCompany:[]
     }
+    this.getPayNodeCompany = this.getPayNodeCompany.bind(this);
   }
 
   componentDidMount() {
     if(this.props.tid){
       setTimeout(()=>{
         this.getSelectOutsourceLog();
-        this.getSelectOrderPayment();
         this.projectTypeTabContent(this.props.projectType);
       },500)
     }
+    this.getPayNodeCompany();
+  }
+
+  getPayNodeCompany(){
+    let arr = this.props.thirdInfoList || [];
+    let companyNameArr = [];
+    for (let d = 0; d < arr.length; d++) {
+      arr[d].companyName = arr[d].companyName + '-' + arr[d].id;
+      companyNameArr.push({
+        companyName: arr[d].companyName,
+        id: arr[d].id,
+      });
+    }
+    this.setState({
+      PayNodeCompany:companyNameArr
+    })
   }
 
   projectTypeTabContent(projectType) {
@@ -908,12 +839,6 @@ class CheckProject extends Component {
     }
   }
 
-  onChange() {
-    this.setState({
-      value: e.target.value,
-    })
-  }
-
   tableRowClickOne(record) {}
 
   //点击付款节点详情
@@ -952,53 +877,8 @@ class CheckProject extends Component {
     )
   }
 
-  //支付列表
-  getSelectOrderPayment() {
-    this.setState({
-      payRecordsLoading: true
-    })
-    $.ajax({
-      method: 'get',
-      dataType: 'json',
-      crossDomain: false,
-      url: globalConfig.context + '/api/admin/company/selectOrderPayment',
-      data: {
-        id: this.props.tid,
-      },
-      success: function (data) {
-        if (data.error.length) {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-        } else {
-          this.setState({
-            selectOrderPayments: data.data
-          })
-        }
-      }.bind(this),
-    }).always(
-        function () {
-          this.setState({
-            payRecordsLoading: false
-          })
-        }.bind(this)
-    )
-  }
 
 
-  //0审核 1待支付 2驳回 3已支付 4取消
-  operationJudgmentName(id) {
-    if(this.props.isAuditPayment){          //财务
-      return id === 0 ? '待审核' :
-          id === 1 ? '待支付' :
-              id === 2 ? '查看详情' : '查看详情'
-    }else{
-      return id === 0 ? '待审核' :
-          id === 1 ? '待支付' :
-              id === 2 ? '查看详情' : '查看详情'
-    }
-  }
-
   // 删除供应商信息
   confirmDeletNew(index) {
     this.setState({
@@ -1143,6 +1023,21 @@ class CheckProject extends Component {
                     <span className="title">
                       第三方信息
                     </span>
+                    {this.props.startType === 1 && !this.props.isAuditPayment && !this.props.isAuditPaymentGLY ? <Button
+                        type="primary"
+                        onClick={(e) => {
+                          this.setState({
+                            ThirdListVisible: true,
+                          })
+                        }}
+                        style={{
+                          float: 'right',
+                          marginRight: '50px',
+                          marginBottom: '15px',
+                        }}
+                    >
+                      +新增供应商名称
+                    </Button> : null}
                   </div>
                   <div
                       className="clearfix"
@@ -1169,9 +1064,25 @@ class CheckProject extends Component {
                 {/*如果是软著类或者专利类的专利申请,隐藏付款节点但当为外包类型时,无需隐藏*/}
                 {(!((this.props.projectType === 1 && this.props.patentType === 0) || this.props.projectType === 2)) || this.props.startType === 0 ? <div className="thirdParty">
                   <div>
-            <span className="title">
-              付款节点
-            </span>
+                    <span className="title">
+                      付款节点
+                    </span>
+                    {this.props.startType === 1 && !this.props.isAuditPayment && !this.props.isAuditPaymentGLY ? <Button
+                        type="primary"
+                        onClick={(e) => {
+                          this.getPayNodeCompany();
+                          this.setState({
+                            PayNodeVisible: true,
+                          })
+                        }}
+                        style={{
+                          float: 'right',
+                          marginRight: '50px',
+                          marginBottom: '15px',
+                        }}
+                    >
+                      +新增付款节点
+                    </Button> : null}
                   </div>
                   <div
                       className="clearfix"
@@ -1282,31 +1193,15 @@ class CheckProject extends Component {
                   </div> : <div/>}
                 </Spin>
                 <Spin spinning={this.state.payRecordsLoading}>
-                  {this.state.selectOrderPayments.length !== 0 ? <div className="outsourceLogConent">
-                    <div className="title">支付记录</div>
-                    <Spin spinning={this.state.loading}>
-                      <Form layout="horizontal">
-                        <Table
-                            pagination={false}
-                            columns={this.state.orderPaymentseColunms}
-                            dataSource={this.state.selectOrderPayments}
-                            style={{
-                              cursor: 'pointer',
-                            }}
-                            onRowClick={(record)=>{
-                              this.setState({
-                                payRecordVisible: true,
-                                orderPaymentsId: record.id,
-                              })
-                            }}
-                            scroll={{ x: 'max-content', y: 0 }}
-                            bordered
-                            size="middle"
-                        />
-                        <Col span={24} offset={9} style={{ marginTop: '15px' }}/>
-                      </Form>
-                    </Spin>
-                  </div> : <div/>}
+                  <PaymentRecord
+                      {...this.props}
+                      ref={res=>this.paymentRecordRef=res}
+                      tid={this.props.tid}
+                      isAuditPayment={this.props.isAuditPayment}
+                      projectType={this.props.projectType}
+                      patentType={this.props.patentType}
+                      isAuditPaymentGLY={this.props.isAuditPaymentGLY}
+                  />
                 </Spin>
                 {/*
                   申请付款
@@ -1326,7 +1221,7 @@ class CheckProject extends Component {
                     commodityQuantity={this.props.commodityQuantity}
                     onRefresh={()=>{
                       this.props.onRefresh();
-                      this.getSelectOrderPayment();
+                      this.paymentRecordRef.refresh();
                     }}
                     changeVisible={()=>{
                       this.setState({
@@ -1336,28 +1231,6 @@ class CheckProject extends Component {
                         type: 1
                       })
                     }}/> : <div/>}
-                {/*  支付记录操作弹出  */}
-                {this.state.payRecordVisible ? <PayRecord
-                    {...this.props}
-                    tid={this.props.tid}
-                    projectType={this.props.projectType}
-                    patentType={this.props.patentType}
-                    payId={this.state.orderPaymentsId}
-                    visible={this.state.payRecordVisible}
-                    isAuditPayment={this.props.isAuditPayment}
-                    isAuditPaymentGLY={this.props.isAuditPaymentGLY}
-                    onRefresh={()=>{
-                      this.props.onRefresh();
-                      this.getSelectOrderPayment();
-                    }}
-                    changeVisible={()=>{
-                      this.getSelectOrderPayment();
-                      this.props.onRefresh && this.props.onRefresh();
-                      this.setState({
-                        payRecordVisible: false,
-                      })
-                    }}
-                /> : <div/>}
               </div>
           }
           {/*管理员在审核通过的情况下才有此操作*/}
@@ -1386,6 +1259,35 @@ class CheckProject extends Component {
                 </Button>
           </div> : null
           }
+          {this.state.ThirdListVisible ? <NewSupplier
+              isLaunch//是否项目已经发起
+              patentNameType={this.props.patentNameType}
+              tid={this.props.tid}
+              patentType={this.props.patentType}
+              projectType={this.props.startType === 0 ? 0 : this.props.projectType}
+              realProjectType={this.props.projectType}       //真实的项目类型
+              startType={this.props.startType}               //项目类型 0外包  1供应商
+              visible={this.state.ThirdListVisible}
+              onCancel={() => {
+                this.props.onRefresh();
+                this.setState({
+                  ThirdListVisible: false,
+                })
+              }}/> : null}
+          {this.state.PayNodeVisible ? <OperationPayNode
+              tid={this.props.tid}
+              cSort={this.props.sort}
+              visible={this.state.PayNodeVisible}
+              thirdInfoList={this.props.thirdInfoList}
+              supplierList={this.state.PayNodeCompany}
+              onCancel={() => {
+                this.setState({
+                  PayNodeVisible: false,
+                  PayNodeCompany:[],
+                })
+                this.props.onRefresh();
+              }}
+          /> : <div/>}
         </div>
     )
   }

+ 1 - 0
js/component/manageCenter/order/orderNew/costAuditList/detailsModal/index.js

@@ -366,6 +366,7 @@ class DetailsModal extends Component{
                             isAuditPayment={true}
                             {...this.props}
                             tid={this.props.tid}
+                            sort={this.state.sort}
                             patentTypeName={this.state.patentTypeName}                  //官费类型
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
                             checkStatus={this.state.checkStatus}                        //核对状态

+ 1 - 0
js/component/manageCenter/order/orderNew/glCostAuditList/detailsModal/index.js

@@ -363,6 +363,7 @@ class DetailsModal extends Component{
                         {this.state.activeKey === '1' ? <CheckProject
                             {...this.props}
                             tid={this.props.tid}
+                            sort={this.state.sort}
                             patentTypeName={this.state.patentTypeName}                  //官费类型
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
                             checkStatus={this.state.checkStatus}                        //核对状态

+ 1 - 0
js/component/manageCenter/order/orderNew/outsourcingPro.jsx

@@ -1547,6 +1547,7 @@ const outsourcingPro = Form.create()(
                     <CheckProject
                         {...this.props}
                         tid={this.state.tid}
+                        sort={this.state.sort}
                         patentTypeName={this.state.patentTypeName}                  //官费类型
                         commodityQuantity={this.state.commodityQuantity}            //项目数量
                         checkStatus={this.state.checkStatus}                        //核对状态

+ 1 - 0
js/component/manageCenter/project/project/zxsglyOutSourcingPaiDan.jsx

@@ -967,6 +967,7 @@ const zxsglyOutSourcingPaiDan = React.createClass({
       dataInfor:{},
     },()=>{
       this.loadData();
+      this.xiangmu(this.state.orderNo);
     });
   },
   //点击打卡项目详情

Datei-Diff unterdrückt, da er zu groß ist
+ 6321 - 6280
js/component/manageCenter/project/task/myTask.jsx


+ 2 - 0
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -4636,6 +4636,7 @@ const MyTaskOutsource = React.createClass({
                         <CheckProject
                             {...this.props}
                             tid={this.state.tid}
+                            sort={this.state.sort}
                             orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有
                             patentTypeName={this.state.patentTypeName}                  //官费类型
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
@@ -5430,6 +5431,7 @@ const MyTaskOutsource = React.createClass({
                 {this.state.speVisible && this.state.modKey === '2'?<CheckProject
                     {...this.props}
                     tid={this.state.tid}
+                    sort={this.state.sort}
                     orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有
                     patentTypeName={this.state.patentTypeName}                  //官费类型
                     commodityQuantity={this.state.commodityQuantity}            //项目数量

+ 5 - 0
js/component/manageCenter/project/task/newSupplier.js

@@ -212,6 +212,11 @@ class NewSupplier extends Component{
             data.income = this.state.income;   //收入
         }
 
+        //已经发起的供应商项目新增第三方时需要传type=1
+        if(this.props.isLaunch && !this.props.ThirdId && this.props.startType === 1){
+            data.type = 1;   //在发起供应商后,新增第三方需要加上type=1,因为在发起供应商会计算成本,这个新增的需要单独去计算
+        }
+
         this.setState({
             loading: true,
         })

+ 1 - 0
js/component/manageCenter/project/task/payApplyReject/detailsModal/index.js

@@ -359,6 +359,7 @@ class DetailsModal extends Component{
                         {this.state.activeKey === '1' ? <CheckProject
                             {...this.props}
                             tid={this.props.tid}
+                            sort={this.state.sort}
                             patentTypeName={this.state.patentTypeName}                  //官费类型
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
                             checkStatus={this.state.checkStatus}                        //核对状态

+ 2 - 0
js/component/project.jsx

@@ -275,6 +275,7 @@ const project = React.createClass({
             declarationBatch: thisdata.declarationBatch, //外包价格
             projectType: thisdata.bpType,//项目类型
             orderTaskOfficialCost: thisdata.officialCost,    //官费 0无 1有
+            sort: thisdata.sort,
           })
         }
       }.bind(this),
@@ -1323,6 +1324,7 @@ const project = React.createClass({
                         <CheckProject
                             {...this.props}
                             tid={this.props.record.id}
+                            sort={this.state.sort}
                             patentTypeName={this.state.patentTypeName}                  //官费类型
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
                             checkStatus={this.state.checkStatus}                        //核对状态