Browse Source

发起外包,添加询问框

mentoswzq 4 years ago
parent
commit
0afe0dbfa8

+ 1 - 1
js/component/common/imgList/index.js

@@ -76,7 +76,7 @@ class ImgList extends Component{
                             </div>
                         ))
                     }
-                    {console.log(this.props.fileList,'图片')}
+                    {/*{console.log(this.props.fileList,'图片')}*/}
                 </div>
                 {this.props.fileList && this.props.fileList.length > 10 ? <div className='seeMore' onClick={()=>{this.setState({seeMore:!this.state.seeMore})}}>
                     {this.state.seeMore ? '收起' : '查看更多'}

+ 53 - 35
js/component/manageCenter/components/checkProject/index.jsx

@@ -5,9 +5,11 @@ import {
   Table,
   Modal,
   Col,
-  Input,
-  Button, message,
-  Row, Popconfirm, Radio,
+  Tag,
+  Button,
+  message,
+  Row,
+  Popconfirm,
 } from 'antd'
 import {getProjectStatus,} from '@/tools'
 import { getMaterialStatus, getUrgentStatus } from '@/tools'
@@ -856,7 +858,7 @@ class CheckProject extends Component {
         {
           this.props.projectType === 1?
               <div>
-                <div style={{padding:'20px 0px 20px 20px',}}>
+                <div style={{padding:'0px 0px 20px 20px',}}>
                   专利类型:<span style={{marginLeft:'15px'}}>{this.props.patentType === 0 ? '专利申请/变更/转让' : '专利买卖'}</span>
                 </div>
                 <div style={{paddingBottom:'20px',paddingLeft:'20px'}}>
@@ -935,7 +937,7 @@ class CheckProject extends Component {
           </div>
           <div style={{paddingTop:'20px'}}>
             <div className="title">合同/协议扫描件</div>
-            <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
+            <div style={{paddingBottom:'10px'}}>
                 <ImgList fileList={this.props.fileList} ItemWidth={'96px'}/>
             </div>
             {/*<Upload*/}
@@ -966,22 +968,27 @@ class CheckProject extends Component {
           </div>
         </div>
         {parseInt(this.props.startType) !== 1 ? <div className="outsourceLogConent">
-          <div className="title">外包状态</div>
+          <div className="title" style={{
+            paddingBottom: 0,
+          }}>外包状态</div>
           <div className="outsourceLogList">
             {
               this.state.outsourceLogs.map((value,index)=>(
-                  <div key={index} className="outsourceLogItem">
-                    <Row gutter={16}>
+                  <div key={index} className="outsourceLogItem outsource">
+                    <Row gutter={16} style={{
+                      paddingBottom: '8px',
+                      paddingTop: '8px',
+                    }}>
                       <Col className="gutter-row" span={6}>
-                        <div className="gutter-box">
+                        <div>
                           {value.aname}
                         </div>
                       </Col>
                       <Col className="gutter-row" span={6}>
                         <div className="gutter-box">
                           {
-                            value.status === 0 ? '发起外包审核' :
-                                value.status === 1 ? '通过' : '驳回'
+                            value.status === 0 ? <Tag color="#2db7f5">发起外包审核</Tag> :
+                                value.status === 1 ? <Tag color="#87d068">通过</Tag> : <Tag color="#f50">驳回</Tag>
                           }
                         </div>
                       </Col>
@@ -1009,8 +1016,8 @@ class CheckProject extends Component {
             fontWeight: 'bold',
           }}>
             <Row gutter={16}>
-              <Col className="gutter-row" span={4}>
-                <div className="gutter-box">
+              <Col className="gutter-row" span={2}>
+                <div>
                   编号
                 </div>
               </Col>
@@ -1029,12 +1036,12 @@ class CheckProject extends Component {
                   申请支付金额(万元)
                 </div>
               </Col>
-              <Col className="gutter-row" span={5}>
+              <Col className="gutter-row" span={6}>
                 <div className="gutter-box">
                   申请时间
                 </div>
               </Col>
-              <Col className="gutter-row" span={5}>
+              <Col className="gutter-row" span={6}>
                 <div className="gutter-box">
                   状态
                 </div>
@@ -1044,10 +1051,15 @@ class CheckProject extends Component {
           <div className="outsourceLogList" style={{paddingTop:'20px'}}>
             {
               this.state.selectOrderPayments.map((value,index)=>(
-                  <div key={index} className="orderPayItem">
+                  <div key={index} className="orderPayItem" onClick={()=>{
+                    this.setState({
+                      payRecordVisible: true,
+                      orderPaymentsId: value.id,
+                    })
+                  }}>
                     <Row gutter={16}>
-                      <Col className="gutter-row" span={4}>
-                        <div className="gutter-box">
+                      <Col className="gutter-row" span={2}>
+                        <div>
                           {value.id}
                         </div>
                       </Col>
@@ -1067,28 +1079,34 @@ class CheckProject extends Component {
                           {value.applicationAmount}
                         </div>
                       </Col>
-                      <Col className="gutter-row" span={5}>
+                      <Col className="gutter-row" span={6}>
                         <div className="gutter-box">
                           {value.createTimes}
                         </div>
                       </Col>
-                      <Col className="operationItem" span={5}>
-                        <div className="operation">
-                          {
-                            value.status === 0 ? '审核中' :
-                                value.status === 1 ? '审核通过' :
-                                    value.status === 2 ? '已驳回' :
-                                        value.status === 3 ? '支付完成' : '已取消'
-                          }
-                        </div>
-                        <Button type="primary" size='small' onClick={()=>{
-                            this.setState({
-                                payRecordVisible: true,
-                                orderPaymentsId: value.id,
-                            })
+                      <Col className="operationItem" span={6}>
+                        <div className="gutter-box" style={{
+                          width: '100%',
+                          display: 'flex',
+                          justifyContent: 'center',
                         }}>
-                          {this.operationJudgmentName(value.status)}
-                        </Button>
+                          <div className="operation">
+                            {
+                              value.status === 0 ? '审核中' :
+                                  value.status === 1 ? '审核通过' :
+                                      value.status === 2 ? '已驳回' :
+                                          value.status === 3 ? '支付完成' : '已取消'
+                            }
+                          </div>
+                          <Button type="primary" size='small' onClick={()=>{
+                              this.setState({
+                                  payRecordVisible: true,
+                                  orderPaymentsId: value.id,
+                              })
+                          }}>
+                            {this.operationJudgmentName(value.status)}
+                          </Button>
+                        </div>
                       </Col>
                     </Row>
                   </div>

+ 11 - 3
js/component/manageCenter/components/checkProject/index.less

@@ -1,6 +1,5 @@
 .App {
   padding-top: 10px;
-
   .thirdParty {
     padding: 0px 20px 0px 20px;
   }
@@ -11,6 +10,8 @@
     border-bottom: 1px #000000 dashed;
     padding-left: 20px;
     align-items: center;
+    padding-bottom: 10px;
+    margin-bottom: 15px;
     .typeTitle {
       display: flex;
       flex-flow: row nowrap;
@@ -29,7 +30,7 @@
     padding: 20px 20px 0px 20px;
     .outsourceLogList{
       .outsourceLogItem{
-        padding-bottom: 10px;
+
       }
       .orderPayItem{
         padding-bottom: 10px;
@@ -48,9 +49,16 @@
     }
   }
   .title{
-    font-size: 18px;
+    font-size: 15px;
+    font-weight: 800;
     padding-bottom:10px;
   }
+  .gutter-box{
+    display: flex;
+    flex-flow: row nowrap;
+    justify-content: center;
+    align-items: center;
+  }
 }
 
 .payStateList{

+ 74 - 5
js/component/manageCenter/project/project/projectAssignment.jsx

@@ -16,7 +16,7 @@ import {
   message,
   DatePicker,
   Modal,
-  AutoComplete,Tag,Tabs
+  AutoComplete,Tag,Tabs,Radio
 } from "antd";
 import Assign from "@/manageCenter/publicComponent/assign";
 import {
@@ -365,6 +365,7 @@ const PaiDan = React.createClass({
   tableRowClick(record) {
     this.state.RowData = record;
     this.setState({
+      displayFees: "block",
       visible: true
     });
     this.xiangqing(record.orderNo);
@@ -664,6 +665,16 @@ const PaiDan = React.createClass({
       message.warning("服务名称不匹配!");
       return false;
     }
+    if (this.state.displayFees=='block') {
+      if(this.state.officialCost==''){
+        message.warning("请选择官费!");
+        return false;
+      }
+      if (this.state.costReduction == "") {
+        message.warning("请选择费减!");
+        return false;
+      }
+    }
     if (!this.state.commodityPrice) {
       message.warning("请输入金额!");
       this.refs.commodityPrice.focus();
@@ -697,7 +708,9 @@ const PaiDan = React.createClass({
         commodityQuantity: this.state.commodityQuantity, //商品数量
         commodityPrice: this.state.commodityPrice, //签单总价
         taskComment: this.state.taskComment, //服务说明
-        main: this.state.main //是否为主要项目
+        main: this.state.main, //是否为主要项目
+        officialCost: this.state.officialCost, //是否有官费
+        costReduction: this.state.costReduction, //是否有费减
       }
     }).done(
       function(data) {
@@ -726,6 +739,15 @@ const PaiDan = React.createClass({
         kid = item;
       }
     });
+    if (kid.type === 1) {
+      this.setState({
+        displayFees: "block",
+      });
+    } else {
+      this.setState({
+        displayFees: "none",
+      });
+    }
     this.setState({
       commodityName: value,
       gid: kid.id,
@@ -733,7 +755,6 @@ const PaiDan = React.createClass({
       commodityFirstPayment:
         kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
     });
-    console.log(this.state.commodityName, "jjjj", this.state.gid);
   },
 
   //点击添加项目明细
@@ -748,7 +769,10 @@ const PaiDan = React.createClass({
       main: undefined,
       commodityPrice: "",
       addState: 1,
-      addserviceVisible: true
+      addserviceVisible: true,
+      displayFees: "none",
+      officialCost: "",
+      costReduction: "",
     });
   },
 
@@ -1478,7 +1502,52 @@ const PaiDan = React.createClass({
                   />
                   <span className="mandatory">*</span>
                 </FormItem>
-
+                <FormItem
+                    className="half-item"
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 14 }}
+                    label="官费:"
+                    style={{
+                      display: this.state.displayFees,
+                      marginLeft: "55px",
+                    }}
+                >
+                      <span style={{ color: "red", marginRight: "27px" }}>
+                        *
+                      </span>
+                  <Radio.Group
+                      value={this.state.officialCost}
+                      onChange={(e) => {
+                        this.setState({ officialCost: e.target.value });
+                      }}
+                  >
+                    <Radio value="1">含官费</Radio>
+                    <Radio value="0">不含官费</Radio>
+                  </Radio.Group>
+                </FormItem>
+                <FormItem
+                    className="half-item"
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 14 }}
+                    label="费减:"
+                    style={{
+                      display: this.state.displayFees,
+                      marginLeft: "55px",
+                    }}
+                >
+                      <span style={{ color: "red", marginRight: "27px" }}>
+                        *
+                      </span>
+                  <Radio.Group
+                      value={this.state.costReduction}
+                      onChange={(e) => {
+                        this.setState({ costReduction: e.target.value });
+                      }}
+                  >
+                    <Radio value="1">有费减</Radio>
+                    <Radio value="0">无费减</Radio>
+                  </Radio.Group>
+                </FormItem>
                 <FormItem
                   className="half-item"
                   {...formItemLayout}

+ 70 - 51
js/component/manageCenter/project/task/myTask.jsx

@@ -2139,7 +2139,7 @@ const Task = React.createClass({
     })
   },
   // 项目发起外包
-  sureOut() {
+  sureOut(startType) {
     if (this.state.startType !== 0 && this.state.startType !== 1) {
       message.warning('请选择类型')
       return
@@ -2176,55 +2176,66 @@ const Task = React.createClass({
       message.warning('合同扫描件不能为空')
       return
     }
+    let _this = this;
+    confirm({
+      title: startType === 0 ? '确定要发起外包吗?' : '确定要提交供应商信息吗?',
+      content: startType === 0 ? '高于总部价格,费用个人承担' : '确定提交供应商信息后,不可修改',
+      onOk() {
+        return new Promise((resolve, reject) => {
+          _this.setState({
+            loading: true,
+          })
 
-    this.setState({
-      loading: true,
-    })
-
-    let data = {
-      tid: this.state.id,
-      orderNo: this.state.orderNo,
-      type: 1,                                //分类 0订单  1项目
-      startType: this.state.startType,       //支付类型  0外包 1供应商 false 0
-      companyName: this.state.companyName,
-      amount: this.state.amount,
-      pictureUrl: this.getUrl(this.state.pictureUrl).length
-          ? this.getUrl(this.state.pictureUrl)
-          : '',
-      outsourceRemarks: this.state.outsourceRemarks,
-      unitNumber: this.state.unitNumber,
-      unitPrice: this.state.unitPrice,
-      id: this.state.refundStatus == 2 ? this.state.mid : undefined,
-    }
+          let data = {
+            tid: _this.state.id,
+            orderNo: _this.state.orderNo,
+            type: 1,                                //分类 0订单  1项目
+            startType: _this.state.startType,       //支付类型  0外包 1供应商 false 0
+            companyName: _this.state.companyName,
+            amount: _this.state.amount,
+            pictureUrl: _this.getUrl(_this.state.pictureUrl).length
+                ? _this.getUrl(_this.state.pictureUrl)
+                : '',
+            outsourceRemarks: _this.state.outsourceRemarks,
+            unitNumber: _this.state.unitNumber,
+            unitPrice: _this.state.unitPrice,
+            id: _this.state.refundStatus == 2 ? _this.state.mid : undefined,
+          }
 
-    if (this.state.projectType === 1) {
-      data.patentType = this.state.patentType;
-      data.patentNameType = this.state.patentNameType;
-      if (this.state.patentNameType == 3) {
-        data.patentName = this.state.patentName;
-      }
-    }
+          if (_this.state.projectType === 1) {
+            data.patentType = _this.state.patentType;
+            data.patentNameType = _this.state.patentNameType;
+            if (_this.state.patentNameType == 3) {
+              data.patentName = _this.state.patentName;
+            }
+          }
 
-    $.ajax({
-      method: 'POST',
-      dataType: 'json',
-      crossDomain: false,
-      url:
-        globalConfig.context + '/api/admin/outsourceOrg/outsourceProjectAudit',
-      data: data,
-    }).done(
-      function (data) {
-        this.setState({
-          loading: false,
-        })
-        if (!data.error.length) {
-          message.success('提交成功!')
-          this.visitCancel()
-        } else {
-          message.warning(data.error[0].message)
-        }
-      }.bind(this)
-    )
+          $.ajax({
+            method: 'POST',
+            dataType: 'json',
+            crossDomain: false,
+            url:
+                globalConfig.context + '/api/admin/outsourceOrg/outsourceProjectAudit',
+            data: data,
+          }).done(
+              function (data) {
+                _this.setState({
+                  loading: false,
+                })
+                if (!data.error.length) {
+                  resolve();
+                  message.success('提交成功!')
+                  _this.visitCancel()
+                } else {
+                  reject();
+                  message.warning(data.error[0].message)
+                }
+              }.bind(_this)
+          )
+        }).catch(() => console.log('Oops errors!'));
+      },
+      onCancel() {},
+    });
   },
   callback(e) {
     this.setState({
@@ -4447,14 +4458,18 @@ const Task = React.createClass({
                       <Button
                         type="primary"
                         loading={this.state.loading}
-                        onClick={this.sureOut}
+                        onClick={()=>{
+                          this.sureOut(this.state.startType);
+                        }}
                       >
                         {
                           this.state.startType === 0 ? "确认发起外包,不通过总部" : "提交供应商信息"
                         }
                       </Button>
                       <p className="tip" style={{ color: 'red' }}>
-                        提示:高于总部价格,费用个人承担
+                        {
+                          this.state.startType === 0 ? "提示:高于总部价格,费用个人承担" : "确定提交供应商信息,提交后,不可修改"
+                        }
                       </p>
                     </div>
                   </div>
@@ -5403,14 +5418,18 @@ const Task = React.createClass({
                       <Button
                         type="primary"
                         loading={this.state.loading}
-                        onClick={this.sureOut}
+                        onClick={()=>{
+                          this.sureOut(this.state.startType);
+                        }}
                       >
                         {
                           this.state.startType === 0 ? "确认发起外包,不通过总部" : "提交供应商信息"
                         }
                       </Button>
                       <p className="tip" style={{ color: 'red' }}>
-                        提示:高于总部价格,费用个人承担
+                        {
+                          this.state.startType === 0 ? "提示:高于总部价格,费用个人承担" : "确定提交供应商信息,提交后,不可修改"
+                        }
                       </p>
                     </div>
                   </div>