Browse Source

指导意见 隐藏账户信息
供应商隐藏 发起原因
修复发起外包网络延迟带来的问题
类型为自定义 隐藏服务年限

mentoswzq 4 years ago
parent
commit
34e3838a5c

+ 3 - 3
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/intentionDetail.jsx

@@ -101,7 +101,7 @@ const IntentionDetail = React.createClass({
 		if(nextProps.modalVisible && nextProps.IntentionData.id) {
 			this.setState({
 				modalVisible:true,
-				callnub:this.props.isGuidanceLv ? (this.props.tabsKey ? this.props.tabsKey : "3") : (this.props.tabsKey ? this.props.tabsKey : (this.props.detailApi.indexOf('Organization'))>0?"2":'1'),
+				callnub:this.props.isGuidanceLv ? (this.props.tabsKey ? this.props.tabsKey : "4") : (this.props.tabsKey ? this.props.tabsKey : (this.props.detailApi.indexOf('Organization'))>0?"2":'1'),
 			})
 		};
 		this.setState({
@@ -141,14 +141,14 @@ const IntentionDetail = React.createClass({
 							        contactState={this.state.contactState}
 							    />
 						    </TabPane> : ""}
-						    <TabPane tab="账户信息" key="3">
+							 {!this.props.isGuidanceLv ? <TabPane tab="账户信息" key="3">
 					    		<Account
 									 isGuidanceLv={this.props.isGuidanceLv}  //用于判断是否为跟进管理页面
 					    			 closeDetail={this.closeDetail}
 							         data={this.props.IntentionData}
 							         accountState={this.state.accountState}
 					    		/>
-						    </TabPane>
+						    </TabPane>: ""}
 							<TabPane tab="客户跟进" key="4">
 							    <Visit
 									isGuidanceLv={this.props.isGuidanceLv}

+ 165 - 160
js/component/manageCenter/customer/managementFollow/customerFollow/index.jsx

@@ -36,6 +36,9 @@ class CustomerFollow extends Component{
             selectedRowKeys: [],
             sortType: 0,
 
+            filteredInfo: null,
+            sortedInfo: null,
+
             provinces: [],
             dataSource: [],
             categoryArr: [],
@@ -56,103 +59,6 @@ class CustomerFollow extends Component{
                     return "共" + total + "条数据";
                 },
             },
-            columns: [
-                {
-                    title: "客户名称",
-                    dataIndex: "name",
-                    key: "name",
-                },
-                {
-                    title: "地区",
-                    dataIndex: "locationProvince",
-                    key: "locationProvince",
-                },
-                {
-                    title: "联系人",
-                    dataIndex: "contacts",
-                    key: "contacts",
-                },
-                {
-                    title: "联系电话",
-                    dataIndex: "contactMobile",
-                    key: "contactMobile",
-                },
-                {
-                    title: "社会性质",
-                    dataIndex: "societyTag",
-                    key: "societyTag",
-                    render: (text) => {
-                        return getSocialAttribute(text);
-                    },
-                },
-                {
-                    title: "客户初始时间",
-                    dataIndex: "transferTime",
-                    key: "transferTime",
-                },
-                {
-                    title: "剩余私有天数",
-                    dataIndex: "surplusFollowTime",
-                    key: "surplusFollowTime",
-                },
-                {
-                    title: "剩余签单天数",
-                    dataIndex: "surplusSignTime",
-                    key: "surplusSignTime",
-                },
-                {
-                    title: "最新跟进时间",
-                    dataIndex: "lastFollowTime",
-                    key: "lastFollowTime",
-                    //0无 1转换倒序 2转换正序
-                    sorter: true,
-                },
-                {
-                    title: "客户等级",
-                    dataIndex: "level",
-                    key: "level",
-                    render: (text) => {
-                        if(text === 0) {
-                            return <Tag color="#87d068">一般客户</Tag>;
-                        }else if(text === 1) {
-                            return <Tag color="#D2691E">意向客户</Tag>;
-                        }else if(text === 2) {
-                            return <Tag color="#FF0000">重点客户</Tag>;
-                        }else {
-                            return "";
-                        }
-                    },
-                },
-                {
-                    title: "跟进人",
-                    dataIndex: "aName",
-                    key: "aName",
-                },
-                {
-                    title: "跟进操作",
-                    dataIndex: "abc",
-                    key: "abc",
-                    render: (text, record, index) => {
-                        return (
-                            <div>
-                                <Button
-                                    onClick={(e) => {
-                                        e.stopPropagation();
-                                        this.setState({
-                                            tabsKey:"4",
-                                        },()=>{
-                                            this.tableRowClick(record)
-                                        })
-                                    }}
-                                    type="primary"
-                                >
-                                    {this.props.isEditGuidanceLv ? '指导' : '查看指导'}
-                                </Button>
-                            </div>
-                        );
-                    },
-                },
-            ],
             loading: false,
             ispage: 1,
             guidance: '',
@@ -267,6 +173,8 @@ class CustomerFollow extends Component{
             releaseDate: [],
             selectedRowKeys: [],
             sortType: 0,
+            filteredInfo: null,
+            sortedInfo: null,
         },()=>{
             this.loadData();
         });
@@ -366,6 +274,108 @@ class CustomerFollow extends Component{
     }
 
     render() {
+        let { sortedInfo, filteredInfo } = this.state;
+        sortedInfo = sortedInfo || {};
+        filteredInfo = filteredInfo || {};
+        const columns = [
+            {
+                title: "客户名称",
+                dataIndex: "name",
+                key: "name",
+            },
+            {
+                title: "地区",
+                dataIndex: "locationProvince",
+                key: "locationProvince",
+            },
+            {
+                title: "联系人",
+                dataIndex: "contacts",
+                key: "contacts",
+            },
+            {
+                title: "联系电话",
+                dataIndex: "contactMobile",
+                key: "contactMobile",
+            },
+            {
+                title: "社会性质",
+                dataIndex: "societyTag",
+                key: "societyTag",
+                render: (text) => {
+                    return getSocialAttribute(text);
+                },
+            },
+            {
+                title: "客户初始时间",
+                dataIndex: "transferTime",
+                key: "transferTime",
+            },
+            {
+                title: "剩余私有天数",
+                dataIndex: "surplusFollowTime",
+                key: "surplusFollowTime",
+            },
+            {
+                title: "剩余签单天数",
+                dataIndex: "surplusSignTime",
+                key: "surplusSignTime",
+            },
+            {
+                title: "最新跟进时间",
+                dataIndex: "lastFollowTime",
+                key: "lastFollowTime",
+                //0无 1转换倒序 2转换正序
+                sorter: true,
+                sortOrder: sortedInfo.columnKey === 'lastFollowTime' && sortedInfo.order,
+                filteredValue: filteredInfo.lastFollowTime || null,
+            },
+            {
+                title: "客户等级",
+                dataIndex: "level",
+                key: "level",
+                render: (text) => {
+                    if(text === 0) {
+                      return <Tag color="#87d068">一般客户</Tag>;
+                    }else if(text === 1) {
+                      return <Tag color="#D2691E">意向客户</Tag>;
+                    }else if(text === 2) {
+                      return <Tag color="#FF0000">重点客户</Tag>;
+                    }else {
+                      return "";
+                    }
+                },
+            },
+            {
+                title: "跟进人",
+                    dataIndex: "aName",
+                key: "aName",
+            },
+            {
+                title: "跟进操作",
+                    dataIndex: "abc",
+                key: "abc",
+                render: (text, record, index) => {
+                return (
+                    <div>
+                        <Button
+                            onClick={(e) => {
+                                e.stopPropagation();
+                                this.setState({
+                                    tabsKey:"4",
+                                },()=>{
+                                    this.tableRowClick(record)
+                                })
+                            }}
+                            type="primary"
+                        >
+                            {this.props.isEditGuidanceLv ? '指导' : '查看指导'}
+                        </Button>
+                    </div>
+                );
+            },
+        },
+    ];
         return(
             <div className="user-content">
                 <ShowModalDiv ShowModal={this.state.showModal} />
@@ -373,31 +383,25 @@ class CustomerFollow extends Component{
                     <span>指导意见</span>
                 </div>
                 <div className="user-search">
-                    <Tabs
-                        defaultActiveKey="1"
-                        onChange={this.callback}
-                        className="test"
+                    <Input
+                        placeholder="客户名称"
+                        value={this.state.nameSearch}
+                        style={{ width: 150, marginRight: 10, marginLeft: 10 }}
+                        onChange={(e) => {
+                            this.setState({ nameSearch: e.target.value });
+                        }}
+                    />
+                    <Select
+                        placeholder="选择地区"
+                        style={{ width: 80 }}
+                        value={this.state.provinceSearch}
+                        onChange={(e) => {
+                            this.setState({ provinceSearch: e });
+                        }}
                     >
-                        <TabPane tab="搜索" key="1">
-                            <Input
-                                placeholder="客户名称"
-                                value={this.state.nameSearch}
-                                style={{ width: 150, marginRight: 10, marginLeft: 10 }}
-                                onChange={(e) => {
-                                    this.setState({ nameSearch: e.target.value });
-                                }}
-                            />
-                            <Select
-                                placeholder="选择地区"
-                                style={{ width: 80 }}
-                                value={this.state.provinceSearch}
-                                onChange={(e) => {
-                                    this.setState({ provinceSearch: e });
-                                }}
-                            >
-                                {this.state.provinces}
-                            </Select>
-                            <span style={{ marginRight: "10px" }}>
+                        {this.state.provinces}
+                    </Select>
+                    <span style={{ marginRight: "10px" }}>
                               <Cascader
                                   options={citySelect()}
                                   value={this.state.addressSearch}
@@ -407,50 +411,47 @@ class CustomerFollow extends Component{
                                   }}
                               />
                             </span>
-                            <Select
-                                style={{ width: 120 }}
-                                value={this.state.level}
-                                onChange={(e) => {
-                                    this.setState({ level: e });
-                                }}
-                                placeholder="选择客户等级"
-                            >
-                                <Select.Option value="0">一般客户</Select.Option>
-                                <Select.Option value="1">意向客户</Select.Option>
-                                <Select.Option value="2">重点客户</Select.Option>
-                            </Select>
-                            <RangePicker
-                                value={[
-                                    this.state.releaseDate[0]
-                                        ? moment(this.state.releaseDate[0])
-                                        : null,
-                                    this.state.releaseDate[1]
-                                        ? moment(this.state.releaseDate[1])
-                                        : null,
-                                ]}
-                                onChange={(data, dataString) => {
-                                    this.setState({ releaseDate: dataString });
-                                }}
-                            />
-                            <Button
-                                type="primary"
-                                style={{ marginLeft: "10px", marginRight: 10 }}
-                                onClick={()=>{
-                                    this.loadData();
-                                }}
-                            >
-                                搜索
-                            </Button>
-                            <Button onClick={this.reset}>重置</Button>
-                        </TabPane>
-                    </Tabs>
+                    <Select
+                        style={{ width: 120 }}
+                        value={this.state.level}
+                        onChange={(e) => {
+                            this.setState({ level: e });
+                        }}
+                        placeholder="选择客户等级"
+                    >
+                        <Select.Option value="0">一般客户</Select.Option>
+                        <Select.Option value="1">意向客户</Select.Option>
+                        <Select.Option value="2">重点客户</Select.Option>
+                    </Select>
+                    <RangePicker
+                        value={[
+                            this.state.releaseDate[0]
+                                ? moment(this.state.releaseDate[0])
+                                : null,
+                            this.state.releaseDate[1]
+                                ? moment(this.state.releaseDate[1])
+                                : null,
+                        ]}
+                        onChange={(data, dataString) => {
+                            this.setState({ releaseDate: dataString });
+                        }}
+                    />
+                    <Button
+                        type="primary"
+                        style={{ marginLeft: "10px", marginRight: 10 }}
+                        onClick={()=>{
+                            this.loadData();
+                        }}
+                    >
+                        搜索
+                    </Button>
+                    <Button onClick={this.reset}>重置</Button>
                 </div>
                 <div className="patent-table">
                     <Spin spinning={this.state.loading}>
                         <Table
-                            columns={this.state.columns}
+                            columns={columns}
                             dataSource={this.state.dataSource}
-                            // rowSelection={rowSelection}
                             pagination={this.state.pagination}
                             onRowClick={this.tableRowClick}
                             onChange={(pagination, filters, sorter)=>{
@@ -474,6 +475,10 @@ class CustomerFollow extends Component{
                                         this.loadData(pagination.current)
                                     });
                                 }
+                                this.setState({
+                                    filteredInfo: filters,
+                                    sortedInfo: sorter,
+                                });
 
                             }
                             }

+ 26 - 16
js/component/manageCenter/order/orderNew/addService.jsx

@@ -897,6 +897,11 @@ const NewService = Form.create()(
                           record.customizeTimes = ""
                           record.customizeName = ""
                         }
+                        if(e == 0){
+                          record.dunTypeCustom = true;
+                        }else{
+                          record.dunTypeCustom = false;
+                        }
                         if (e != 1) {
                           this.setState({
                             timeFlag: true,
@@ -1104,21 +1109,26 @@ const NewService = Form.create()(
                 return <span>{text}</span>;
               }
               return (
-                <Select
-                  placeholder="请选择年限"
-                  style={{ width: "150px" }}
-                  disabled={this.state.yearFlag ? true : false}
-                  onChange={(e) => {
-                    record.effectiveCount = e;
-                  }}
-                >
-                  {/* <Select.Option key={null}>无</Select.Option> */}
-                  <Select.Option key={1}>一年</Select.Option>
-                  <Select.Option key={3}>两年</Select.Option>
-                  <Select.Option key={5}>三年</Select.Option>
-                  <Select.Option key={7}>四年</Select.Option>
-                  <Select.Option key={9}>五年</Select.Option>
-                </Select>
+                <div>
+                  {
+                    record.dunType != 0 ?
+                        <Select
+                            placeholder="请选择年限"
+                            style={{ width: "150px" }}
+                            disabled={this.state.yearFlag ? true : false}
+                            onChange={(e) => {
+                              record.effectiveCount = e;
+                            }}
+                        >
+                          {/* <Select.Option key={null}>无</Select.Option> */}
+                          <Select.Option key={1}>一年</Select.Option>
+                          <Select.Option key={3}>两年</Select.Option>
+                          <Select.Option key={5}>三年</Select.Option>
+                          <Select.Option key={7}>四年</Select.Option>
+                          <Select.Option key={9}>五年</Select.Option>
+                        </Select> : <div/>
+                  }
+                </div>
               );
             },
           },
@@ -2099,7 +2109,7 @@ const NewService = Form.create()(
         record.boStatus = true;
       }
       if (!this.state.yearFlag) {
-        if (!record.effectiveCount) {
+        if (!record.effectiveCount && !record.dunTypeCustom) {
           message.warning("请选择服务年限");
           return;
         }

+ 1 - 1
js/component/manageCenter/order/orderNew/addorders.js

@@ -1163,7 +1163,7 @@ const Addorders = Form.create()(
             totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
             this.setState({
               contactListNew: theArr,
-              totalCui,
+              totalCui:parseFloat(totalCui),
             });
           }
         }.bind(this),

+ 26 - 16
js/component/manageCenter/order/orderNew/changeComponent/changeApply.js

@@ -212,6 +212,11 @@ class ChangeApply extends Component {
                         record.customizeTimes = "";
                         record.customizeName = "";
                       }
+                      if(e == 0){
+                        record.dunTypeCustom = true;
+                      }else{
+                        record.dunTypeCustom = false;
+                      }
                       if (e != 1) {
                         this.setState({
                           timeFlag: true,
@@ -416,21 +421,26 @@ class ChangeApply extends Component {
               return <span>{text}</span>;
             }
             return (
-              <Select
-                placeholder="请选择年限"
-                style={{ width: "150px" }}
-                disabled={this.state.yearFlag ? true : false}
-                onChange={(e) => {
-                  record.effectiveCount = e;
-                }}
-              >
-                {/* <Select.Option key={null}>无</Select.Option> */}
-                <Select.Option key={1}>一年</Select.Option>
-                <Select.Option key={3}>两年</Select.Option>
-                <Select.Option key={5}>三年</Select.Option>
-                <Select.Option key={7}>四年</Select.Option>
-                <Select.Option key={9}>五年</Select.Option>
-              </Select>
+                <div>
+                  {
+                    record.dunType != 0 ?
+                        <Select
+                            placeholder="请选择年限"
+                            style={{ width: "150px" }}
+                            disabled={this.state.yearFlag ? true : false}
+                            onChange={(e) => {
+                              record.effectiveCount = e;
+                            }}
+                        >
+                          {/* <Select.Option key={null}>无</Select.Option> */}
+                          <Select.Option key={1}>一年</Select.Option>
+                          <Select.Option key={3}>两年</Select.Option>
+                          <Select.Option key={5}>三年</Select.Option>
+                          <Select.Option key={7}>四年</Select.Option>
+                          <Select.Option key={9}>五年</Select.Option>
+                        </Select> : <div/>
+                  }
+                </div>
             );
           },
         },
@@ -1164,7 +1174,7 @@ class ChangeApply extends Component {
       record.boStatus = true;
     }
     if (!this.state.yearFlag) {
-      if (!record.effectiveCount) {
+      if (!record.effectiveCount && !record.dunTypeCustom) {
         message.warning("请选择服务年限");
         return;
       }

+ 0 - 19
js/component/manageCenter/order/orderNew/chargeback.jsx

@@ -1645,25 +1645,6 @@ const IntentionCustomer = Form.create()(
                 </Spin>
               </Form>
             </Modal> : <div/>}
-            {/* <Modal
-            visible={this.state.rizhivisible}
-            className="admin-desc-content"
-            width="800px"
-            maskClosable={false}
-            title="订单日志"
-            footer={null}
-            onCancel={this.closeOrderLog}
-          >
-            <div className="patent-table">
-              <Spin spinning={this.state.loading}>
-                <Table
-                  columns={this.state.columnsrizhi}
-                  dataSource={this.state.dataSourcerizhi}
-                  pagination={false}
-                />
-              </Spin>
-            </div>
-          </Modal> */}
             <OrderRiZi
               dataSourcerizhi={this.state.dataSourcerizhi}
               closeOrderLog={this.closeOrderLog}

+ 1 - 1
js/component/manageCenter/order/orderNew/contractYxy.js

@@ -1200,7 +1200,7 @@ const contractChange = Form.create()(
                             <OrderDetail
                                 orderData={this.state.orderData}
                                 getOrderLog={this.getOrderLog}
-                                totalCui={this.state.totalCui}
+                                totalCui={parseFloat(this.state.totalCui)}
                                 dataSourceX={this.state.dataSourceX}
                                 contactList={this.state.contactList}
                                 contactListNew={this.state.contactListNew}

+ 29 - 18
js/component/manageCenter/order/orderNew/reject.jsx

@@ -459,6 +459,11 @@ const IntentionCustomer = Form.create()(
                         record.customizeTimes = "";
                         record.customizeName = "";
                       }
+                      if(e == 0){
+                        record.dunTypeCustom = true;
+                      }else{
+                        record.dunTypeCustom = false;
+                      }
                       if (e != 1) {
                         this.setState({
                           timeFlag: true,
@@ -659,21 +664,26 @@ const IntentionCustomer = Form.create()(
                 return <span>{text}</span>;
               }
               return (
-                <Select
-                  placeholder="请选择年限"
-                  style={{ width: "150px" }}
-                  disabled={this.state.yearFlag ? true : false}
-                  onChange={(e) => {
-                    record.effectiveCount = e;
-                  }}
-                >
-                  {/* <Select.Option key={null}>无</Select.Option> */}
-                  <Select.Option key={1}>一年</Select.Option>
-                  <Select.Option key={3}>两年</Select.Option>
-                  <Select.Option key={5}>三年</Select.Option>
-                  <Select.Option key={7}>四年</Select.Option>
-                  <Select.Option key={9}>五年</Select.Option>
-                </Select>
+                  <div>
+                    {
+                      record.dunType != 0 ?
+                          <Select
+                              placeholder="请选择年限"
+                              style={{ width: "150px" }}
+                              disabled={this.state.yearFlag ? true : false}
+                              onChange={(e) => {
+                                record.effectiveCount = e;
+                              }}
+                          >
+                            {/* <Select.Option key={null}>无</Select.Option> */}
+                            <Select.Option key={1}>一年</Select.Option>
+                            <Select.Option key={3}>两年</Select.Option>
+                            <Select.Option key={5}>三年</Select.Option>
+                            <Select.Option key={7}>四年</Select.Option>
+                            <Select.Option key={9}>五年</Select.Option>
+                          </Select> : <div/>
+                    }
+                  </div>
               );
             },
           },
@@ -1019,6 +1029,7 @@ const IntentionCustomer = Form.create()(
             for (let i = 0; i < data.data.length; i++) {
               let thisdata = data.data[i];
               thisdata.key = i;
+              thisdata.sort = thisdata.cSort;
               theArr.push(thisdata);
             }
           }
@@ -1129,7 +1140,7 @@ const IntentionCustomer = Form.create()(
             totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
             this.setState({
               contactListNew: theArr,
-              totalCui,
+              totalCui: parseFloat(totalCui),
             });
           }
         }.bind(this),
@@ -1189,7 +1200,7 @@ const IntentionCustomer = Form.create()(
         record.boStatus = true;
       }
       if (!this.state.yearFlag) {
-        if (!record.effectiveCount) {
+        if (!record.effectiveCount && !record.dunTypeCustom) {
           message.warning("请选择服务年限");
           return;
         }
@@ -2586,7 +2597,7 @@ const IntentionCustomer = Form.create()(
                             span={24}
                             offset={9}
                             style={{ marginTop: "15px" }}
-                          ></Col>
+                          />
                         </Form>
                       </Spin>
                     </div>

+ 203 - 130
js/component/manageCenter/project/task/myTask.jsx

@@ -1403,16 +1403,19 @@ const Task = React.createClass({
       })
     }
     this.setState({
-      projectType: record.projectType
+      projectType: record.projectType,
+      orderNo: record.orderNo,
+      id:record.id,
+      tid:record.id,
     })
     this.xiangqing(record.id, record.taskName)
     this.xiangqings(record.orderNo)
     this.xiangmu(record.orderNo)
     this.loaduserss(record)
     // 获取第三方信息表格
-    this.thirdTable(record.id);
+    // this.thirdTable(record.id);
     //获取支付节点信息表格
-    this.payNodeTable(record.id);
+    // this.payNodeTable(record.id);
     //查看外包状态日志
     this.getSelectOutsourceLog(record.id);
     // 获取Csort
@@ -2007,49 +2010,54 @@ const Task = React.createClass({
   },
   reset(flag) {
     if (flag) {
-      this.state.nameSearch = ''
-      this.state.orderNoSearch = ''
-      this.state.contractNoSearch = undefined
-      this.state.taskNoSearch = ''
-      this.state.departmenttSearch = undefined
-      this.state.projectStatusSearch = undefined //项目状态
-      this.state.approvalSearch = undefined
-      this.state.outsourceStatusSearch = []
+      this.setState({
+        nameSearch : '',
+        orderNoSearch : '',
+        contractNoSearch : undefined,
+        taskNoSearch : '',
+        departmenttSearch : undefined,
+        projectStatusSearch : undefined, //项目状态
+        approvalSearch : undefined,
+        outsourceStatusSearch : [],
+      })
     }
-    this.state.id = '' //项目编号
-    this.state.orderNo = '' //订单编号
-    this.state.projectStatus = undefined //项目状态
-    this.state.taskStatuSearch = undefined //项目状态
-    this.state.taskComment = '' //说明
-    this.state.startDate = '' //启动日期
-    this.state.endDate = '' //结束日期
-    this.state.acceptDate = '' //受理日期
-    this.state.reviewDate = '' //评审日期
-    this.state.publicityDate = '' //公示日期
-    this.state.licenceDate = '' //发证日期
-    this.state.partyTimes = '' //付款时间
-    attachmentUrl: [] //附件
-    this.state.contacts = '' //联系人
-    this.state.contactMobile = '' //联系人电话
-    this.state.legalPerson = '' //法人
-    this.state.legalPersonTel = '' //法人电话
-    this.state.taskId = '' //项目编号
-    this.state.hours = '' //工时
-    this.state.remarks = '' //说明
-    this.state.taskDate = '' //日期
-    this.state.taskComment = '' //说明
-    this.state.releaseDate = []
-    this.state.outsourceName = ''
-    this.state.outsourcePrice = undefined
-    this.state.distribution = undefined
-    this.state.companyName = undefined
-    this.state.unitPrice = undefined
-    this.state.unitNumber = undefined
-    this.state.amount = undefined
-    this.state.pictureUrl = []
     this.setState({
       oldInfor: {},
-      outsourceRemarks: undefined
+      outsourceRemarks: undefined,
+      thirdInfoList: [],
+      payNodeList: [],
+      orderNo: '',//订单编号
+      tid: '',
+
+      id : '', //项目编号
+      projectStatus : undefined, //项目状态
+      taskStatuSearch : undefined, //项目状态
+      startDate : '', //启动日期
+      endDate : '', //结束日期
+      acceptDate : '', //受理日期
+      reviewDate : '', //评审日期
+      publicityDate : '', //公示日期
+      licenceDate : '', //发证日期
+      partyTimes : '', //付款时间
+      attachmentUrl: [], //附件
+      contacts : '', //联系人
+      contactMobile : '', //联系人电话
+      legalPerson : '', //法人
+      legalPersonTel : '', //法人电话
+      taskId : '', //项目编号
+      hours : '', //工时
+      remarks : '', //说明
+      taskDate : '', //日期
+      taskComment : '', //说明
+      releaseDate : [],
+      outsourceName : '',
+      outsourcePrice : undefined,
+      distribution : undefined,
+      companyName : undefined,
+      unitPrice : undefined,
+      unitNumber : undefined,
+      amount : undefined,
+      pictureUrl : [],
     })
     this.loadData(flag ? '' : this.state.page)
   },
@@ -2198,7 +2206,9 @@ const Task = React.createClass({
     }
 
     //refundStatus   0-待审核 ,1-审核通过,2-审核拒绝
-    if(!this.state.reason && (this.state.refundStatus === 2 || typeof this.state.refundStatus === 'undefined')){
+    //类型为供应商时不需要发起原因
+    //this.state.startType 0外包  1供应商
+    if(!this.state.reason && (this.state.refundStatus === 2 || typeof this.state.refundStatus === 'undefined') && this.state.startType !== 1){
       message.warning('发起原因不能为空')
       return
     }
@@ -2236,7 +2246,9 @@ const Task = React.createClass({
           }
 
           //refundStatus   0-待审核 ,1-审核通过,2-审核拒绝    审核被驳回时和第一次发起外包时,要填写发起原因
-          if(_this.state.refundStatus === 2 || typeof _this.state.refundStatus === 'undefined'){
+          //this.state.startType  0外包 1供应商
+          //类型为外包时不需要传 发起原因
+          if((_this.state.refundStatus === 2 || typeof _this.state.refundStatus === 'undefined') && _this.state.startType !== 1){
             data.reason = _this.state.reason
           }
 
@@ -2269,7 +2281,10 @@ const Task = React.createClass({
                 if (!data.error.length) {
                   resolve();
                   message.success('提交成功!')
-                  _this.visitCancel()
+                  _this.waiDetail();
+                  _this.thirdTable(_this.state.tid);
+                  _this.getSelectOutsourceLog(_this.state.tid);
+                  _this.payNodeTable(_this.state.tid)
                 } else {
                   reject();
                   message.warning(data.error[0].message)
@@ -2312,9 +2327,9 @@ const Task = React.createClass({
   waiDetail() {
     let url = window.location.href.substring(7)
     this.setState({
-      loading: true,
+      waiDetailLoading: true,
     })
-    $.ajax({
+    let ajaxObj = $.ajax({
       method: 'get',
       dataType: 'json',
       crossDomain: false,
@@ -2326,9 +2341,6 @@ const Task = React.createClass({
       },
     }).done(
       function (data) {
-        this.setState({
-          loading: false,
-        })
         if (!data.error.length && data.data) {
           if(data.data.unitNumber){
             this.setState({
@@ -2377,16 +2389,27 @@ const Task = React.createClass({
                 : [], //图片地址
             createTimes: data.data.createTimes,
             auditTimes: data.data.auditTimes,
+          },()=>{
+            this.setState({
+              waiDetailLoading: false,
+            })
           })
         } else if (data.error && data.error.length) {
-          message.warning(data.error[0].message)
+          message.warning(data.error[0].message);
+          this.setState({
+            waiDetailLoading: false,
+          })
         } else if (!data.data) {
           this.setState({
             refundStatus: undefined,
+            waiDetailLoading: false,
           })
         }
       }.bind(this)
     )
+    this.setState({
+      orderOutsourceDtailsAjaxObj: ajaxObj
+    })
   },
   rizhi() {
     this.setState({
@@ -2615,9 +2638,9 @@ const Task = React.createClass({
   //查看第三方信息表格
   thirdTable(id) {
     this.setState({
-      loading: true,
+      thirdInfoLoading: true,
     })
-    $.ajax({
+    let ajaxObj = $.ajax({
       method: 'get',
       dataType: 'json',
       crossDomain: false,
@@ -2629,12 +2652,13 @@ const Task = React.createClass({
         if (data.error && data.error.length) {
           message.warning(data.error[0].message)
         } else {
-          let companyNameArr = []
-          let theArr = []
-          let thisData = []
-          let arr = data.data || []
-          let allTotalAmount = 0
+          let companyNameArr = [];
+          let theArr = [];
+          let thisData = [];
+          let arr = data.data || [];
+          let allTotalAmount = 0;
           let type = 0;
+          let startType = 0;
           let patentNameType = 0;
           for (let i = 0; i < arr.length; i++) {
             thisData = arr[i]
@@ -2644,7 +2668,8 @@ const Task = React.createClass({
             thisData.key = i;
             thisData.patentType = thisData.type;
             theArr.push(thisData);
-            type=thisData.type
+            type=thisData.type;
+            startType=thisData.startType;
             patentNameType= thisData.patentNameType
           }
           if (!allTotalAmount) {
@@ -2666,6 +2691,11 @@ const Task = React.createClass({
             })
           }
 
+          //设置项目类型
+          this.setState({
+            startType: startType
+          })
+
           this.setState({
             tid: id,
             PayNodeCompany: companyNameArr,
@@ -2679,10 +2709,13 @@ const Task = React.createClass({
     }).always(
       function () {
         this.setState({
-          loading: false,
+          thirdInfoLoading: false,
         })
       }.bind(this)
     )
+    this.setState({
+      selectCompanyAjaxObj:ajaxObj
+    })
   },
   //外包日志列表
   getSelectOutsourceLog(tid){
@@ -2721,9 +2754,9 @@ const Task = React.createClass({
   },
   payNodeTable(id) {
     this.setState({
-      loading: true,
+      payNodeLoading: true,
     })
-    $.ajax({
+    let ajaxObj = $.ajax({
       method: 'get',
       dataType: 'json',
       crossDomain: false,
@@ -2771,7 +2804,6 @@ const Task = React.createClass({
             payNodeArr[d].companyName = payNodeArr[d].companyName+ '-' + payNodeArr[d].cid;
           }
 
-          console.log('payNodeArr:', payNodeArr)
           this.setState({
             tid: id,
             payNodeList: payNodeArr,
@@ -2781,10 +2813,13 @@ const Task = React.createClass({
     }).always(
       function () {
         this.setState({
-          loading: false,
+          payNodeLoading: false,
         })
       }.bind(this)
     )
+    this.setState({
+      selectPaymentNodeAjaxObj: ajaxObj
+    })
   },
   // 新增第三方供应商信息
   addThirdList() {
@@ -3382,8 +3417,19 @@ const Task = React.createClass({
           title=""
           width="900px"
           visible={this.state.visible}
-          onOk={this.visitOk}
-          onCancel={this.visitCancel}
+          maskClosable={false}
+          onOk={()=>{
+            this.visitOk();
+            this.state.selectCompanyAjaxObj ? this.state.selectCompanyAjaxObj.abort() : null;
+            this.state.selectPaymentNodeAjaxObj ? this.state.selectPaymentNodeAjaxObj.abort() : null;
+            this.state.orderOutsourceDtailsAjaxObj ? this.state.orderOutsourceDtailsAjaxObj.abort() : null;
+          }}
+          onCancel={()=>{
+            this.visitCancel();
+            this.state.selectCompanyAjaxObj ? this.state.selectCompanyAjaxObj.abort() : null;
+            this.state.selectPaymentNodeAjaxObj ? this.state.selectPaymentNodeAjaxObj.abort() : null;
+            this.state.orderOutsourceDtailsAjaxObj ? this.state.orderOutsourceDtailsAjaxObj.abort() : null;
+          }}
         >
           <Tabs
               tabBarExtraContent={
@@ -4238,6 +4284,7 @@ const Task = React.createClass({
                       }
                     >
                       <Radio.Group
+                        disabled={this.state.payNodeLoading || this.state.thirdInfoLoading}
                         value={this.state.startType}
                         onChange={(e) => {
                             let _this = this;
@@ -4289,6 +4336,7 @@ const Task = React.createClass({
                       }
                     >
                       <Radio.Group
+                        disabled={this.state.payNodeLoading || this.state.thirdInfoLoading}
                         value={this.state.patentType}
                         onChange={(e) => {
                           let _this = this;
@@ -4339,6 +4387,7 @@ const Task = React.createClass({
                       }
                     >
                       <Radio.Group
+                        disabled={this.state.payNodeLoading || this.state.thirdInfoLoading}
                         value={this.state.patentNameType}
                         onChange={(e) => {
                           let _this = this;
@@ -4413,9 +4462,9 @@ const Task = React.createClass({
                       type="primary"
                       onClick={(e) => {
                         //this.state.startType 0外包 1供应商   类型为外包时,当普通单
-                        if(this.state.projectType === 1 && this.state.patentType === -1 && this.state.startType === 1){
+                        if(this.state.projectType === 1 && this.state.patentType === -1){
                           message.info('请先选择专利类型');
-                        }else if(this.state.projectType === 1 && this.state.patentNameType === -1 && this.state.startType === 1){
+                        }else if(this.state.projectType === 1 && this.state.patentNameType === -1){
                           message.info('请先选择专利名称');
                         } else{
                           this.addThirdList()
@@ -4437,7 +4486,7 @@ const Task = React.createClass({
                       display: this.state.type == 1 ? 'block' : 'block',
                     }}
                   >
-                    <Spin spinning={this.state.loading}>
+                    <Spin spinning={this.state.thirdInfoLoading}>
                       <Form layout="horizontal">
                         <Table
                           pagination={false}
@@ -4498,7 +4547,7 @@ const Task = React.createClass({
                       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.loading}>
+                    <Spin spinning={this.state.payNodeLoading}>
                       <Form layout="horizontal">
                         <Table
                           pagination={false}
@@ -4540,29 +4589,29 @@ const Task = React.createClass({
                     </FormItem>
                   </div>
                   {/*<div className="clearfix">
-										<FormItem className="half-item"
-										    {...formItemLayout}
-										    label="上传协议文件" style={{height:"auto"}}>
-										     <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
-													data={(e)=>{
-														return {
-															'sign': e.name.substring(0,e.name.lastIndexOf("."))
-														}
-													}}
-													fileList={this.state.fileUrl}
-													onChange={(e)=>{
-														this.setState({
-															attachmentUrl:e.fileList,
-															fileUrl:e.fileList
-														})
-													}}>
-												{fileUrl.length>1?null:<Button>
-												<Icon type="upload" /> 点击上传
-												</Button>}
-										    </Upload>
-										    <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
-										</FormItem>
-									</div>*/}
+                                        <FormItem className="half-item"
+                                            {...formItemLayout}
+                                            label="上传协议文件" style={{height:"auto"}}>
+                                             <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
+                                                    data={(e)=>{
+                                                        return {
+                                                            'sign': e.name.substring(0,e.name.lastIndexOf("."))
+                                                        }
+                                                    }}
+                                                    fileList={this.state.fileUrl}
+                                                    onChange={(e)=>{
+                                                        this.setState({
+                                                            attachmentUrl:e.fileList,
+                                                            fileUrl:e.fileList
+                                                        })
+                                                    }}>
+                                                {fileUrl.length>1?null:<Button>
+                                                <Icon type="upload" /> 点击上传
+                                                </Button>}
+                                            </Upload>
+                                            <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
+                                        </FormItem>
+                                    </div>*/}
                   <p
                     className="tip"
                     style={{
@@ -4592,8 +4641,9 @@ const Task = React.createClass({
                       <p style={{ color: 'red' }}>图片建议:要清晰。</p>
                     </FormItem>
                   </div>
-                  {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因*/}
-                  {typeof this.state.refundStatus === 'undefined' || this.state.refundStatus === 2 ? <div className="clearfix">
+                  {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因   如果是类型为供应商则不需要发起原因*/}
+                  {/*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}
@@ -4781,6 +4831,12 @@ const Task = React.createClass({
                     pictureUrl={this.state.contractPictureUrl}
                   /> : <div/>}
                 </Spin>
+                <OrderRiZi
+                    dataSourcerizhi={this.state.dataSourceY}
+                    closeOrderLog={this.closeOrderLog}
+                    visible={this.state.avisible}
+                    loading={this.state.loading}
+                />
               </TabPane>
             ) : (
               ''
@@ -4937,11 +4993,22 @@ const Task = React.createClass({
             </Spin>
           </Form>
         </Modal> : <div/>}
-        <Modal
+        {this.state.speVisible ? <Modal
           maskClosable={false}
           visible={this.state.speVisible}
-          onOk={this.visitOk}
-          onCancel={this.visitCancel}
+          onOk={()=>{
+            this.visitOk();
+            this.state.selectCompanyAjaxObj ? this.state.selectCompanyAjaxObj.abort() : null;
+            this.state.selectPaymentNodeAjaxObj ? this.state.selectPaymentNodeAjaxObj.abort() : null;
+            this.state.orderOutsourceDtailsAjaxObj ? this.state.orderOutsourceDtailsAjaxObj.abort() : null;
+
+          }}
+          onCancel={()=>{
+            this.visitCancel();
+            this.state.selectCompanyAjaxObj ? this.state.selectCompanyAjaxObj.abort() : null;
+            this.state.selectPaymentNodeAjaxObj ? this.state.selectPaymentNodeAjaxObj.abort() : null;
+            this.state.orderOutsourceDtailsAjaxObj ? this.state.orderOutsourceDtailsAjaxObj.abort() : null;
+          }}
           width="900px"
           title=""
           footer=""
@@ -5295,7 +5362,7 @@ const Task = React.createClass({
                   className="half-item"
                   {...formItemLayout}
                   label=""
-                ></FormItem>
+                />
                 <FormItem className="half-item" {...formItemLayout} label="">
                   <Input
                     placeholder="请输入详细地址"
@@ -5515,6 +5582,7 @@ const Task = React.createClass({
                           }
                       >
                         <Radio.Group
+                            disabled={this.state.payNodeLoading || this.state.thirdInfoLoading}
                             value={this.state.startType}
                             onChange={(e) => {
                                 let _this = this;
@@ -5566,6 +5634,7 @@ const Task = React.createClass({
                           }
                       >
                         <Radio.Group
+                            disabled={this.state.payNodeLoading || this.state.thirdInfoLoading}
                             value={this.state.patentType}
                             onChange={(e) => {
                               let _this = this;
@@ -5616,6 +5685,7 @@ const Task = React.createClass({
                           }
                       >
                         <Radio.Group
+                            disabled={this.state.payNodeLoading || this.state.thirdInfoLoading}
                             value={this.state.patentNameType}
                             onChange={(e) => {
                               let _this = this;
@@ -5690,9 +5760,9 @@ const Task = React.createClass({
                           type="primary"
                           onClick={(e) => {
                             //this.state.startType   类型为外包时,当普通单
-                            if(this.state.projectType === 1 && this.state.patentType === -1 && this.state.startType === 1){
+                            if(this.state.projectType === 1 && this.state.patentType === -1){
                               message.info('请先选择专利类型');
-                            }else if(this.state.projectType === 1 && this.state.patentNameType === -1 && this.state.startType === 1){
+                            }else if(this.state.projectType === 1 && this.state.patentNameType === -1){
                               message.info('请先选择专利名称');
                             } else{
                               this.addThirdList()
@@ -5714,7 +5784,7 @@ const Task = React.createClass({
                           display: this.state.type == 1 ? 'block' : 'block',
                         }}
                     >
-                      <Spin spinning={this.state.loading}>
+                      <Spin spinning={this.state.thirdInfoLoading}>
                         <Form layout="horizontal">
                           <Table
                               pagination={false}
@@ -5774,7 +5844,7 @@ const Task = React.createClass({
                           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.loading}>
+                      <Spin spinning={this.state.payNodeLoading}>
                         <Form layout="horizontal">
                           <Table
                               pagination={false}
@@ -5816,29 +5886,29 @@ const Task = React.createClass({
                       </FormItem>
                     </div>
                     {/*<div className="clearfix">
-										<FormItem className="half-item"
-										    {...formItemLayout}
-										    label="上传协议文件" style={{height:"auto"}}>
-										     <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
-													data={(e)=>{
-														return {
-															'sign': e.name.substring(0,e.name.lastIndexOf("."))
-														}
-													}}
-													fileList={this.state.fileUrl}
-													onChange={(e)=>{
-														this.setState({
-															attachmentUrl:e.fileList,
-															fileUrl:e.fileList
-														})
-													}}>
-												{fileUrl.length>1?null:<Button>
-												<Icon type="upload" /> 点击上传
-												</Button>}
-										    </Upload>
-										    <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
-										</FormItem>
-									</div>*/}
+                                        <FormItem className="half-item"
+                                            {...formItemLayout}
+                                            label="上传协议文件" style={{height:"auto"}}>
+                                             <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
+                                                    data={(e)=>{
+                                                        return {
+                                                            'sign': e.name.substring(0,e.name.lastIndexOf("."))
+                                                        }
+                                                    }}
+                                                    fileList={this.state.fileUrl}
+                                                    onChange={(e)=>{
+                                                        this.setState({
+                                                            attachmentUrl:e.fileList,
+                                                            fileUrl:e.fileList
+                                                        })
+                                                    }}>
+                                                {fileUrl.length>1?null:<Button>
+                                                <Icon type="upload" /> 点击上传
+                                                </Button>}
+                                            </Upload>
+                                            <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
+                                        </FormItem>
+                                    </div>*/}
                     <p
                         className="tip"
                         style={{
@@ -5868,8 +5938,9 @@ const Task = React.createClass({
                         <p style={{ color: 'red' }}>图片建议:要清晰。</p>
                       </FormItem>
                     </div>
-                    {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因*/}
-                    {typeof this.state.refundStatus === 'undefined' || this.state.refundStatus === 2 ? <div className="clearfix">
+                    {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因 如果是类型为供应商则不需要发起原因*/}
+                    {/*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}
@@ -6062,7 +6133,7 @@ const Task = React.createClass({
               ''
             )}
           </Tabs>
-        </Modal>
+        </Modal> : <div/>}
         <Modal
           width="800px"
           visible={this.state.visibleA}
@@ -6110,6 +6181,8 @@ const Task = React.createClass({
             tid={this.state.tid}
             patentType={this.state.patentType}
             projectType={this.state.startType === 0 ? 0 : this.state.projectType}
+            realProjectType={this.state.projectType}       //真实的项目类型
+            startType={this.state.startType}               //项目类型 0外包  1供应商
             thirdCompanyName={this.state.thirdCompanyName}
             thirdUnitPrice={this.state.thirdUnitPrice}
             thirdQuantity={this.state.thirdQuantity}

+ 71 - 109
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -119,7 +119,7 @@ const MyTaskOutsource = React.createClass({
   waiDetail() {
     let url = window.location.href.substring(7)
     this.setState({
-      loading: true,
+      waiDetailLoading: true,
     })
     $.ajax({
       method: 'get',
@@ -133,9 +133,6 @@ const MyTaskOutsource = React.createClass({
       },
     }).done(
         function (data) {
-          this.setState({
-            loading: false,
-          })
           if (!data.error.length && data.data) {
             if(data.data.unitNumber){
               this.setState({
@@ -155,6 +152,12 @@ const MyTaskOutsource = React.createClass({
                       )
                       : [], //图片地址
                 }
+              },()=>{
+                this.setState({
+                  waiDetailLoading: false,
+                })
+                this.thirdTable(this.state.tid);
+                this.payNodeTable(this.state.tid)
               })
             }else{
               this.setState({
@@ -180,13 +183,23 @@ const MyTaskOutsource = React.createClass({
                     : [], //图片地址
                 createTimes: data.data.createTimes,
                 auditTimes: data.data.auditTimes,
+              },()=>{
+                this.setState({
+                  waiDetailLoading: false,
+                })
+                this.thirdTable(this.state.tid);
+                this.payNodeTable(this.state.tid)
               })
             }
           } else if (data.error && data.error.length) {
-            message.warning(data.error[0].message)
+            message.warning(data.error[0].message);
+            this.setState({
+              waiDetailLoading: false,
+            })
           } else if (!data.data) {
             this.setState({
               refundStatus: undefined,
+              waiDetailLoading: false,
             })
           }
         }.bind(this)
@@ -194,6 +207,7 @@ const MyTaskOutsource = React.createClass({
   },
   getInitialState() {
     return {
+      oldInfor:{},
       paySubject: [],
       orderData: [],
       orderNo: "",
@@ -220,6 +234,7 @@ const MyTaskOutsource = React.createClass({
       approvalSearch: undefined,
       paginations: false,
       loading: false,
+      waiDetailLoading: false,
       pagination: {
         defaultCurrent: 1,
         defaultPageSize: 10,
@@ -528,7 +543,6 @@ const MyTaskOutsource = React.createClass({
       ],
       dataSourceX: [],
       dataSourceA: [],
-      companys: [],
       ContactsLists: [
         {
           title: "批次",
@@ -783,6 +797,11 @@ const MyTaskOutsource = React.createClass({
       });
     }
 
+    this.setState({
+      orderNo: record.orderNo,
+      id:record.id,
+    })
+
     this.xiangqing(record.id, record.taskName);
     this.xiangqings(record.orderNo);
     this.xiangmu(record.orderNo);
@@ -1318,11 +1337,8 @@ const MyTaskOutsource = React.createClass({
     this.setState({
       modKey: e,
     });
-    this.loadCompany();
     if (e == 2) {
       this.waiDetail()
-      this.thirdTable(this.state.tid);
-      this.payNodeTable(this.state.tid)
     }
     if (e == 3) {
       this.orderDetailData(this.state.orderNo);
@@ -1396,7 +1412,6 @@ const MyTaskOutsource = React.createClass({
           });
           this.companyReset();
           message.success(upAndde.warn);
-          this.loadCompany();
         }.bind(this)
       );
     }
@@ -1435,7 +1450,6 @@ const MyTaskOutsource = React.createClass({
           loading: false,
         });
         message.warning("删除成功");
-        this.loadCompany();
       }.bind(this)
     );
   },
@@ -1450,58 +1464,6 @@ const MyTaskOutsource = React.createClass({
       companyRemarks: undefined,
     });
   },
-  //加载外包
-  loadCompany() {
-    this.setState({
-      loading: true,
-    });
-    $.ajax({
-      method: "get",
-      dataType: "json",
-      crossDomain: false,
-      url: globalConfig.context + "/api/admin/outsourceOrg/selectOutsourceOrg",
-      data: {
-        orderNo: this.state.RowData.orderNo,
-        tid: this.state.RowData.id,
-      },
-      success: function (data) {
-        let theArr = [];
-        if (data.error.length || data.data.list == "") {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-        } else {
-          for (let i = 0; i < data.data.length; i++) {
-            let thisdata = data.data[i];
-            let ProvinceCityArr = [];
-            let ProvinceS = thisdata.province; //省
-            let citys = thisdata.city; //市
-            let Areas = thisdata.area; //区
-            ProvinceCityArr.push(ProvinceS, citys, Areas);
-            theArr.push({
-              key: i,
-              id: thisdata.id, //外包Id
-              name: thisdata.name, //名称
-              contacts: thisdata.contacts, //联系人
-              contactsMobile: thisdata.contactsMobile, //联系人电话
-              companyProvinceArr: ProvinceCityArr,
-              address: thisdata.address,
-              remarks: thisdata.remarks,
-            });
-          }
-        }
-        this.setState({
-          companys: theArr,
-        });
-      }.bind(this),
-    }).always(
-      function () {
-        this.setState({
-          loading: false,
-        });
-      }.bind(this)
-    );
-  },
   foo2() {
     this.setState({
       testFlag1: false,
@@ -2987,29 +2949,29 @@ const MyTaskOutsource = React.createClass({
               </Form> : <div/>}
             </TabPane>
             <TabPane tab="外包/供应商信息" key="2">
-              {this.state.visible && this.state.modKey === '2'?<CheckProject
-                  {...this.props}
-                  tid={this.state.tid}
-                  status={this.state.refundStatus}
-                  projectType={this.state.projectType}
-                  oldInfor={this.state.oldInfor}
-                  patentNameType={this.state.patentNameType}
-                  patentName={this.state.patentName}
-                  patentType={this.state.patentType}
-                  isPreviewPay={true}
-                  thirdInfoList={this.state.thirdInfoList}
-                  dataSource={this.state.payNodeList}
-                  outsourceRemarks={this.state.outsourceRemarks}
-                  fileList={this.state.pictureUrl}
-                  startType={this.state.startType}
-                  projectStatus={this.state.projectStatus}
-                  onRefresh={()=>{
-                    this.waiDetail();
-                    this.thirdTable(this.state.tid);
-                    this.payNodeTable(this.state.tid);
-                    this.loadData(this.state.page)
-                  }}
-              />:<div/>}
+              <Spin spinning={this.state.waiDetailLoading}>
+                {this.state.visible && this.state.modKey === '2'?<CheckProject
+                    {...this.props}
+                    tid={this.state.tid}
+                    status={this.state.refundStatus}
+                    projectType={this.state.projectType}
+                    oldInfor={this.state.oldInfor}
+                    patentNameType={this.state.patentNameType}
+                    patentName={this.state.patentName}
+                    patentType={this.state.patentType}
+                    isPreviewPay={true}
+                    thirdInfoList={this.state.thirdInfoList}
+                    dataSource={this.state.payNodeList}
+                    outsourceRemarks={this.state.outsourceRemarks}
+                    fileList={this.state.pictureUrl}
+                    startType={this.state.startType}
+                    projectStatus={this.state.projectStatus}
+                    onRefresh={()=>{
+                      this.waiDetail();
+                      this.loadData(this.state.page)
+                    }}
+                />:<div/>}
+              </Spin>
             </TabPane>
             {!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
               <TabPane tab="订单详情" key="3">
@@ -3696,29 +3658,29 @@ const MyTaskOutsource = React.createClass({
               </div>
             </TabPane>
             <TabPane tab="外包/供应商信息" key="2">
-              {this.state.speVisible && this.state.modKey === '2'?<CheckProject
-                  {...this.props}
-                  tid={this.state.tid}
-                  status={this.state.refundStatus}
-                  projectType={this.state.projectType}
-                  oldInfor={this.state.oldInfor}
-                  patentNameType={this.state.patentNameType}
-                  patentName={this.state.patentName}
-                  patentType={this.state.patentType}
-                  isPreviewPay={true}
-                  thirdInfoList={this.state.thirdInfoList}
-                  dataSource={this.state.payNodeList}
-                  outsourceRemarks={this.state.outsourceRemarks}
-                  fileList={this.state.pictureUrl}
-                  startType={this.state.startType}
-                  projectStatus={this.state.projectStatus}
-                  onRefresh={()=>{
-                    this.waiDetail();
-                    this.thirdTable(this.state.tid);
-                    this.payNodeTable(this.state.tid);
-                    this.loadData(this.state.page)
-                  }}
-              />:<div/>}
+              <Spin spinning={this.state.waiDetailLoading}>
+                {this.state.speVisible && this.state.modKey === '2'?<CheckProject
+                    {...this.props}
+                    tid={this.state.tid}
+                    status={this.state.refundStatus}
+                    projectType={this.state.projectType}
+                    oldInfor={this.state.oldInfor}
+                    patentNameType={this.state.patentNameType}
+                    patentName={this.state.patentName}
+                    patentType={this.state.patentType}
+                    isPreviewPay={true}
+                    thirdInfoList={this.state.thirdInfoList}
+                    dataSource={this.state.payNodeList}
+                    outsourceRemarks={this.state.outsourceRemarks}
+                    fileList={this.state.pictureUrl}
+                    startType={this.state.startType}
+                    projectStatus={this.state.projectStatus}
+                    onRefresh={()=>{
+                      this.waiDetail();
+                      this.loadData(this.state.page)
+                    }}
+                />:<div/>}
+              </Spin>
             </TabPane>
             {!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
               <TabPane tab="订单详情" key="3">

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

@@ -177,7 +177,13 @@ class NewSupplier extends Component{
             data.calculation = 2;                       //0 其他 1软著 2专利
         }
 
-        data.type = this.props.projectType === 1 ? (this.props.patentType === 0 ? 1 : 2) : 0   //0其他 1专利申请 2专利买卖
+        data.type = this.props.realProjectType === 1 ? (this.props.patentType === 0 ? 1 : 2) : 0   //0其他 1专利申请 2专利买卖
+        if(this.props.realProjectType === 1){                   //专利
+            data.patentType = this.props.patentNameType     //专利名称
+        }
+
+        data.startType = this.props.startType;     //项目类型 0外包  1供应商
+
         if(this.props.projectType === 3){
             if(!this.state.audit){
                 message.warning("请选择审计!");
@@ -205,10 +211,6 @@ class NewSupplier extends Component{
             data.income = this.state.income;   //收入
         }
 
-        if(this.props.projectType === 1){                   //专利
-            data.patentType = this.props.patentNameType     //专利名称
-        }
-
         this.setState({
             loading: true,
         })

+ 26 - 21
js/component/orderRiZi.jsx

@@ -47,28 +47,33 @@ const  orderRiZi= React.createClass({
     
     render() {
         return (
-          <Modal
-            visible={this.props.visible}
-            className="admin-desc-content"
-            width="800px"
-            maskClosable={false}
-            title="订单日志"
-            footer={null}
-            onCancel={this.props.closeOrderLog}
-          >
-            <div className="patent-table">
-              <Spin spinning={this.props.loading}>
-                <Table
-                  columns={this.state.columnsrizhi}
-                  dataSource={this.props.dataSourcerizhi}
-                  pagination={false}
-                  bordered
-                  size={"small"}
-                  scroll={{ x: "max-content", y: 0 }}
-                />
-              </Spin>
+            <div>
+              {
+                this.props.visible ?
+                    <Modal
+                        visible={this.props.visible}
+                        className="admin-desc-content"
+                        width="800px"
+                        maskClosable={false}
+                        title="订单日志"
+                        footer={null}
+                        onCancel={this.props.closeOrderLog}
+                    >
+                      <div className="patent-table">
+                        <Spin spinning={this.props.loading}>
+                          <Table
+                              columns={this.state.columnsrizhi}
+                              dataSource={this.props.dataSourcerizhi}
+                              pagination={false}
+                              bordered
+                              size={"small"}
+                              scroll={{ x: "max-content", y: 0 }}
+                          />
+                        </Spin>
+                      </div>
+                    </Modal> : <div/>
+              }
             </div>
-          </Modal>
         );
     }
 });