hujie123456 5 years ago
parent
commit
3f7d9e3bd3

+ 27 - 3
js/component/manageCenter/order/orderNew/addService.jsx

@@ -528,6 +528,13 @@ const NewService = Form.create()(
       this.setState({
         loading: true
       });
+      if (this.state.approval == 2 || this.state.approval == 3) {
+        message.warning("特批状态不正确")
+        this.setState({
+          loading: false
+        });
+        return
+      } 
       $.ajax({
         url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
         method: "post",
@@ -577,6 +584,11 @@ const NewService = Form.create()(
             }
             thisData = {};
           }
+          if (thisData.approval == 2) {
+            thisData.approval = "特批通过";
+          } else if (thisData.approval == 3) {
+                   thisData.approval = "特批驳回";
+                 }
           this.setState({
             id: thisData.id,
             kehuId: thisData.buyerId,
@@ -1626,13 +1638,20 @@ const NewService = Form.create()(
                                       this.setState({ approval: e });
                                     }}
                                   >
-                                    {tepi.map(function(item) {
+                                    {/* {tepi.map(function(item) {
+                                      // if(item.key == "特批通过" || item.key == "特批驳回") 
                                       return (
                                         <Select.Option key={item.value}>
                                           {item.key}
                                         </Select.Option>
                                       );
-                                    })}
+                                    })} */}
+                                    <Select.Option key={0}>
+                                      非特批
+                                    </Select.Option>
+                                    <Select.Option key={1}>
+                                      特批
+                                    </Select.Option>
                                   </Select>
                                 </FormItem>
                                 <FormItem
@@ -1658,7 +1677,12 @@ const NewService = Form.create()(
                                       this.setState({ signDate: dataString });
                                     }}
                                   />
-                                  <span className="mandatory" style={{marginLeft: 20}}>*</span>
+                                  <span
+                                    className="mandatory"
+                                    style={{ marginLeft: 20 }}
+                                  >
+                                    *
+                                  </span>
                                 </FormItem>
                                 <FormItem
                                   className="half-item"

+ 25 - 5
js/component/manageCenter/order/orderNew/approveds.jsx

@@ -531,6 +531,10 @@ const IntentionCustomer = Form.create()(React.createClass({
 	},
 	//审核通过
 	examOk(){
+    if (this.state.flagE) return;
+    this.setState({
+      flagE: true
+    });
 		$.ajax({
 			method: "post",
 			dataType: "json",
@@ -543,14 +547,20 @@ const IntentionCustomer = Form.create()(React.createClass({
 			success: function(data) {
 				if(data.error.length || data.data.list == "") {
 					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
+            message.warning(data.error[0].message);
+            this.setState({
+              flagE: false
+            });
 					};
 				} else {
 					message.success("该特批订单已通过审核~");
 					this.setState({
 						visible:false,
 					});
-					this.reset();
+          this.reset();
+          this.setState({
+            flagE: false
+          });
 				};
 				
 			}.bind(this),
@@ -562,6 +572,10 @@ const IntentionCustomer = Form.create()(React.createClass({
 	},
 	//审核不通过
 	examOks(){
+    if(this.state.flagE) return
+    this.setState({
+      flagE: true
+    })
 		$.ajax({
 			method: "post",
 			dataType: "json",
@@ -575,16 +589,22 @@ const IntentionCustomer = Form.create()(React.createClass({
 			success: function(data) {
 				if(data.error.length || data.data.list == "") {
 					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
+            message.warning(data.error[0].message);
+            this.setState({
+              flagE: false
+            });
 					};
 				} else {
 					message.success("该特批订单已被驳回~");
 					this.setState({
 						visible:false,
-						noVisible:false
+						noVisible:false,
 					});
 					this.loadData();
-					this.resets();
+          this.resets();
+          this.setState({
+            flagE: false
+          });
 				};
 				
 			}.bind(this),

+ 43 - 1
js/component/manageCenter/order/orderNew/billing.jsx

@@ -418,58 +418,100 @@ const MyService=Form.create()(React.createClass({
 		if (this.state.status === 1 || this.state.status === 0) {
 			if (typeof(this.state.type) !== 'number') {
 				message.warning('省内/外不能为空')
+				this.setState({
+          			flagA: false
+        		});
 				return
 			}
 			if (typeof(this.state.invoiceType) !== 'number') {
 				message.warning('发票类型不能为空')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if(typeof theorgCodeUrl !== 'string'){
-			    message.warning('未上传图片');
+				message.warning('未上传图片');
+				this.setState({
+          			flagA: false
+        		})
 			    return 
 			}
 			if (!this.state.unitName) {
 				message.warning('单位名称不能为空')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (!this.state.taxNumber) {
 				message.warning('税号不能为空')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (!this.state.amount) {
 				message.warning('金额不能为空')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (isNaN(this.state.amount)) {
 				message.warning('开票金额包含非法字符,请重新输入')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (isNaN(this.state.alreadyAmount)) {
 				message.warning('开票金额总计包含非法字符,请重新输入')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (parseFloat(this.state.alreadyAmount)<0) {
 				message.warning('开票金额总计不能小于0,请重新输入')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (!this.state.banks) {
 				message.warning('开户行不能为空')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (!this.state.content) {
 				message.warning('开票内容及说明不能为空')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (!this.state.unitAddress) {
 				message.warning('单位地址不能为空')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (!this.state.unitMobile) {
 				message.warning('单位电话不能为空')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 			if (this.state.alreadyAmount === '') {
 				message.warning('开票金额总计不能为空')
+				this.setState({
+          			flagA: false
+        		})
 				return
 			}
 		}

+ 64 - 5
js/component/manageCenter/order/orderNew/changeComponent/searchInput.js

@@ -198,8 +198,30 @@ class SearchInput extends Component {
     // 输入框数据
     const SearchInputData = [
       {
+        placeholder: "订单编号",
+        width: 120,
+        defaultValue: "",
+        getValue: value => {
+          this.setState({
+            orderNoSearch: value,
+            reset: false
+          });
+        }
+      },
+      {
+        placeholder: "合同编号",
+        width: 120,
+        defaultValue: "",
+        getValue: value => {
+          this.setState({
+            contractNoSearch: value,
+            reset: false
+          });
+        }
+      },
+      {
         placeholder: "客户名称",
-        width: 160,
+        width: 120,
         defaultValue: "",
         getValue: value => {
           this.setState({
@@ -210,7 +232,7 @@ class SearchInput extends Component {
       },
       {
         placeholder: "订单负责人",
-        width: 160,
+        width: 120,
         defaultValue: "",
         getValue: value => {
           this.setState({
@@ -225,7 +247,7 @@ class SearchInput extends Component {
     const SearchSelectData = [
       {
         placeholder: "订单部门",
-        width: 160,
+        width: 120,
         defaultValue: undefined,
         content: this.state.departmentArr,
         getValue: value => {
@@ -237,7 +259,7 @@ class SearchInput extends Component {
       },
       {
         placeholder: "审核状态",
-        width: 160,
+        width: 120,
         defaultValue: "1",
         content: [
           {
@@ -265,8 +287,45 @@ class SearchInput extends Component {
         }
       },
       {
+        placeholder: "变更类型",
+        width: 120,
+        defaultValue: undefined,
+        content: [
+          {
+            name: "退单退款",
+            id: "0"
+          },
+          {
+            name: "项目及金额变更",
+            id: "1"
+          },
+          {
+            name: "仅项目变更",
+            id: "2"
+          },
+          {
+            name: "仅金额变更",
+            id: "3"
+          },
+          {
+            name: "重报",
+            id: "4"
+          },
+          {
+            name: "赠送",
+            id: "5"
+          }
+        ],
+        getValue: value => {
+          this.setState({
+            changeSearch: value,
+            reset: false
+          });
+        }
+      },
+      {
         placeholder: "时间",
-        width: 160,
+        width: 120,
         defaultValue: "1",
         content: [
           {

File diff suppressed because it is too large
+ 718 - 434
js/component/manageCenter/order/orderNew/checkOutsourcing.jsx


+ 282 - 10
js/component/manageCenter/order/orderNew/contractCwzy.js

@@ -1,5 +1,5 @@
 import React from "react";
-import { Button, Input, Spin, Table, message, Form, Modal, Tabs } from "antd";
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, Select, DatePicker } from "antd";
 import $ from "jquery/src/ajax";
 import {
   getNewOrderStatus,
@@ -9,7 +9,7 @@ import {
   getboutique,
   getCuikuan,
   getProjectStatus,
-  ShowModal
+  ShowModal,
 } from "@/tools.js";
 import "./customer.less";
 import { ChangeDetail } from "./changeComponent/changeDetailCwzy.js";
@@ -17,6 +17,7 @@ import { SearchInput } from "./changeComponent/searchInput.js";
 import OrderDetail from "./changeComponent/orderDetail";
 import { ChooseList } from "./chooseList.jsx";
 import ShowModalDiv from "@/showModal.jsx";
+const { RangePicker } = DatePicker;
 
 const contractChange = Form.create()(
   React.createClass({
@@ -39,7 +40,10 @@ const contractChange = Form.create()(
           endTime: this.state.searchData.releaseDate[1],
           salesmanName: this.state.searchData.salesmanNameSearch,
           complete: this.state.searchData.completeSearch || 1,
-          depId: this.state.searchData.depIdSearch
+          depId: this.state.searchData.depIdSearch,
+          orderNo: this.state.searchData.orderNoSearch,
+          contractNo: this.state.searchData.contractNoSearch,
+          type: this.state.searchData.changeSearch
         },
         success: function(data) {
           ShowModal(this);
@@ -68,6 +72,7 @@ const contractChange = Form.create()(
                 type: thisdata.type,
                 status: thisdata.status,
                 id: thisdata.id,
+                contractNo: thisdata.contractNo,
                 processStateText: getProcessStatusNew(
                   thisdata.processState,
                   thisdata.status
@@ -132,6 +137,11 @@ const contractChange = Form.create()(
         },
         columns: [
           {
+            title: "合同编号",
+            dataIndex: "contractNo",
+            key: "contractNo"
+          },
+          {
             title: "订单编号",
             dataIndex: "orderNo",
             key: "orderNo"
@@ -302,6 +312,44 @@ const contractChange = Form.create()(
         ]
       };
     },
+    departmentList() {
+      this.setState({
+        loading: true
+      });
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/organization/selectSuperId",
+        data: {},
+        success: function(data) {
+          let thedata = data.data;
+          let theArr = [];
+          if (!thedata) {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            thedata.map(function(item, index) {
+              theArr.push({
+                key: index,
+                name: item.name,
+                id: item.id
+              });
+            });
+          }
+          this.setState({
+            departmentArr: theArr
+          });
+        }.bind(this)
+      }).always(
+        function() {
+          this.setState({
+            loading: false
+          });
+        }.bind(this)
+      );
+    },
     //页面加载函数
     componentWillMount() {
       this.loadData();
@@ -382,7 +430,6 @@ const contractChange = Form.create()(
                 : []
             });
             console.log("url", this.state.voucherUrl);
-            
           }
         }.bind(this)
       });
@@ -465,7 +512,7 @@ const contractChange = Form.create()(
                 ? splitUrl(
                     thisdata.contractPictureUrl,
                     ",",
-                    globalConfig.avatarHost + "/upload",
+                    globalConfig.avatarHost + "/upload"
                   )
                 : []
             });
@@ -1034,21 +1081,246 @@ const contractChange = Form.create()(
       };
       const FormItem = Form.Item;
       const { TabPane } = Tabs;
+      const departmentArr = this.state.departmentArr || [];
       return (
         <div className="user-content" style={{ position: "relative" }}>
           <ShowModalDiv ShowModal={this.state.showModal} />
-          <div className="content-title">
-            <span>合同变更审核订单</span>
+          <div className="content-title" style={{ marginBottom: 10 }}>
+            <span style={{ fontWeight: 900, fontSize: 16 }}>
+              合同变更审核订单
+            </span>
           </div>
           <div className="user-search">
-            <SearchInput search={this.search} />
+            {/* <SearchInput search={this.search} /> */}
 
-            <ChooseList
+            {/* <ChooseList
               columns={this.state.columns}
               changeFn={this.changeList}
               changeList={this.state.changeList}
               top={55}
-            />
+            /> */}
+            <Tabs
+              defaultActiveKey="2"
+              onChange={this.callbackTab}
+              className="test"
+            >
+              <TabPane tab="更改表格显示数据" key="1">
+                <div style={{ marginLeft: 10 }}>
+                  <ChooseList
+                    columns={this.state.columns}
+                    changeFn={this.changeList}
+                    changeList={this.state.changeList}
+                    top={55}
+                    margin={11}
+                  />
+                </div>
+              </TabPane>
+              <TabPane tab="搜索" key="2">
+                <div style={{ marginLeft: 10 }}>
+                  <SearchInput search={this.search} />
+                </div>
+                {/* <div className="user-search" style={{ marginLeft: 10 }}>
+                  <Input
+                    placeholder="订单编号"
+                    value={this.state.orderNoSearch}
+                    onChange={e => {
+                      this.setState({ orderNoSearch: e.target.value });
+                    }}
+                  />
+                  <Input
+                    placeholder="客户名称"
+                    value={this.state.nameSearch}
+                    onChange={e => {
+                      this.setState({ nameSearch: e.target.value });
+                    }}
+                  />
+                  <Select
+                    placeholder="订单部门"
+                    style={{ width: 150, marginRight: 10 }}
+                    value={this.state.departmenttList}
+                    onChange={e => {
+                      this.setState({ departmenttList: e });
+                    }}
+                  >
+                    {departmentArr.map(function(item) {
+                      return (
+                        <Select.Option key={item.id}>{item.name}</Select.Option>
+                      );
+                    })}
+                  </Select>
+                  <Input
+                    placeholder="合同编号"
+                    value={this.state.contractNoSearch}
+                    onChange={e => {
+                      this.setState({
+                        contractNoSearch: e.target.value
+                      });
+                    }}
+                  />
+                  <Select
+                    placeholder="流程状态"
+                    onChange={e => {
+                      this.setState({ processStatusSearch: e });
+                    }}
+                    style={{ width: 160, marginRight: 5 }}
+                    value={this.state.processStatusSearch}
+                  >
+                    <Option value="3">未分配</Option>
+                    <Option value="4">已分配</Option>
+                  </Select>
+                  <Select
+                    placeholder="结算状态"
+                    onChange={e => {
+                      this.setState({ liquidationStatus: e });
+                    }}
+                    style={{ width: 160, marginRight: 5 }}
+                    value={this.state.liquidationStatus}
+                  >
+                    <Option value="0">首付待付清</Option>
+                    <Option value="1">尾款待付清</Option>
+                    <Option value="2">已付清</Option>
+                  </Select>
+                  <span style={{}}>下单日期:</span>
+                  <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 });
+                    }}
+                  />
+                  <span style={{}}>最近收款:</span>
+                  <RangePicker
+                    value={[
+                      this.state.shouKuanDate[0]
+                        ? moment(this.state.shouKuanDate[0])
+                        : null,
+                      this.state.shouKuanDate[1]
+                        ? moment(this.state.shouKuanDate[1])
+                        : null
+                    ]}
+                    onChange={(data, dataString) => {
+                      this.setState({ shouKuanDate: dataString });
+                    }}
+                  />
+                  <Button
+                    type="primary"
+                    onClick={this.loadData}
+                    style={{ marginLeft: 10 }}
+                  >
+                    搜索
+                  </Button>
+                  <Button onClick={this.reset}>重置</Button>
+                </div> */}
+              </TabPane>
+              {/* <TabPane tab="打印" key="3">
+                <Button
+                  type="primary"
+                  style={{ margin: "11px 0px 10px 10px" }}
+                  onClick={this.printAll}
+                  disabled={!this.state.dataSource.length}
+                >
+                  打印所有列表信息
+                </Button>
+                <Button
+                  type="primary"
+                  disabled={this.state.selectedRowKeys.length != 1}
+                  style={{ margin: "11px 0px 10px 10px" }}
+                  onClick={() => {
+                    this.inRecordData();
+                    this.setState({
+                      bvisible: true
+                    });
+                  }}
+                >
+                  打印开票详情
+                </Button>
+                <Button
+                  type="primary"
+                  disabled={this.state.selectedRowKeys.length != 1}
+                  style={{ margin: "11px 0px 10px 10px" }}
+                  onClick={() => {
+                    this.waterData();
+                    this.setState({
+                      cvisible: true
+                    });
+                  }}
+                >
+                  打印收款流水
+                </Button>
+              </TabPane>
+              <TabPane tab="导出Excel" key="4">
+                <Button
+                  type="primary"
+                  style={{ margin: "11px 0px 10px 10px" }}
+                  onClick={this.exportAll}
+                >
+                  导出当前列表
+                </Button>
+                <Button
+                  type="primary"
+                  disabled={this.state.selectedRowKeys.length != 1}
+                  style={{ margin: "11px 0px 10px 10px" }}
+                  onClick={this.exportKaip}
+                >
+                  导出所选开票详情
+                </Button>
+                <Button
+                  type="primary"
+                  disabled={this.state.selectedRowKeys.length != 1}
+                  style={{ margin: "11px 0px 10px 10px" }}
+                  onClick={this.exportWater}
+                >
+                  导出所选收款详情流水
+                </Button>
+              </TabPane>
+              <TabPane tab="查看" key="5">
+                <Button
+                  type="primary"
+                  disabled={this.state.selectedRowKeys.length != 1}
+                  style={{ margin: "11px 0px 10px 10px" }}
+                  onClick={() => {
+                    this.inRecordData();
+                    this.setState({
+                      bvisible: true
+                    });
+                  }}
+                >
+                  查看开票详情
+                </Button>
+                <Button
+                  type="primary"
+                  disabled={this.state.selectedRowKeys.length != 1}
+                  style={{ margin: "11px 0px 10px 10px" }}
+                  onClick={() => {
+                    this.waterData();
+                    this.setState({
+                      cvisible: true
+                    });
+                  }}
+                >
+                  详情收款流水
+                </Button>
+              </TabPane> */}
+              {/* <TabPane tab="批量操作" key="6">
+            <Button
+              type="primary"
+              disabled={this.state.selectedRowKeys.length == 0}
+              style={{ margin: "0px 0px 10px 10px" }}
+              onClick={e => {
+                e.stopPropagation(),
+                  this.evaluateY(this.state.selectedRowKeys, "财务专员");
+              }}
+            >
+              转交
+            </Button>
+          </TabPane> */}
+            </Tabs>
 
             <div className="patent-table">
               <Spin spinning={this.state.loading}>

+ 4 - 0
js/component/manageCenter/order/orderNew/customer.less

@@ -38,3 +38,7 @@
 	color:red;
 	margin-left:44em
 }
+.ant-tabs.ant-tabs-top.test.ant-tabs-line {
+    background-color: #f5f5f5;
+    margin-bottom: 10px;
+}

+ 40 - 7
js/component/manageCenter/order/orderNew/reject.jsx

@@ -398,7 +398,12 @@ const IntentionCustomer = Form.create()(React.createClass({
 						message.warning(data.error[0].message);
 					};
 				} else {
-					let thisdata=data.data;
+          let thisdata=data.data;
+          if(thisdata.approval == 2) {
+            thisdata.approval = "特批通过";
+          }else if(thisdata.approval == 3) {
+            thisdata.approval = "特批驳回";
+          }
 					this.setState({
             id: thisdata.id,
             kehuId: thisdata.buyerId,
@@ -603,26 +608,51 @@ const IntentionCustomer = Form.create()(React.createClass({
             theorgCodeUrl = picArr.join(",");
 		};
 		if (moneyVerify(this.state.totalAmount)) {
+      this.setState({
+        flag: false
+      });
 			return
 		}
       	if (moneyVerify(this.state.firstAmount)) {
+          this.setState({
+            flag: false
+          });
           	return;
         }
         if (!this.state.totalAmount) {
           message.warning("签单金额不能为空");
           this.refs.signFirstPayment.focus();
+          this.setState({
+            flag: false
+          });
           return false;
         };
         if(!this.state.firstAmount){
         	message.warning('首付金额不能为空');
-        	this.refs.signFirstPayment.focus()
+          this.refs.signFirstPayment.focus()
+          this.setState({
+            flag: false
+          });
         	return false;
         };
         if(!theorgCodeUrl){
         	message.warning('企业负责人不能为空');
-        	this.refs.signFirstPayment.focus()
+          this.refs.signFirstPayment.focus()
+          this.setState({
+            flag: false
+          });
         	return false;
         };
+        if (
+          this.state.approval == "特批通过" ||
+          this.state.approval == "特批驳回"
+        ) {
+          message.warning("特批状态不正确,请重新填写");
+          this.setState({
+            flag: false
+          });
+          return false;
+        }
 		$.ajax({
 			method: "post",
 			dataType: "json",
@@ -870,7 +900,8 @@ const IntentionCustomer = Form.create()(React.createClass({
     	this.state.orderNo='';
     	this.state.customerName='';
     	this.state.releaseDate[0] = undefined;
-		this.state.releaseDate[1] = undefined;
+    this.state.releaseDate[1] = undefined;
+    this.loadData();
     },
     //点击添加项目明细
 	addDetailed(){
@@ -1104,7 +1135,7 @@ const IntentionCustomer = Form.create()(React.createClass({
           >
             搜索
           </Button>
-          <Button onClick={this.reset}>重置</Button>
+          <Button onClick={this.resets}>重置</Button>
           <div className="patent-table">
             <Spin spinning={this.state.loading}>
               <Table
@@ -1283,13 +1314,15 @@ const IntentionCustomer = Form.create()(React.createClass({
                         this.setState({ approval: e });
                       }}
                     >
-                      {tepi.map(function(item) {
+                      {/* {tepi.map(function(item) {
                         return (
                           <Select.Option key={item.value}>
                             {item.key}
                           </Select.Option>
                         );
-                      })}
+                      })} */}
+                      <Select.Option key={0}>非特批</Select.Option>
+                      <Select.Option key={1}>特批</Select.Option>
                     </Select>
                   </FormItem>
                   <FormItem

+ 32 - 4
js/component/manageCenter/project/task/myTask.jsx

@@ -58,8 +58,10 @@ const Task = React.createClass({
         name: this.state.nameSearch, //客户名称
         depId: this.state.departmenttSearch, //订单部门
         orderNo: this.state.orderNoSearch, //订单编号
+        contractNo: this.state.contractNoSearch, //合同编号
         taskId: this.state.taskNoSearch, //项目编号
-        taskStatus: this.state.taskStatus, //项目状态
+        taskStatus: this.state.taskStatuSearch, //项目状态
+        projectStatus: this.state.projectStatusSearch, //项目状态
         adminName: this.state.adminName //项目受理人
       },
       success: function(data) {
@@ -207,7 +209,7 @@ const Task = React.createClass({
           className: "userName"
         },
         {
-          title: "项目状态",
+          title: "分配状态",
           dataIndex: "taskStatus",
           key: "taskStatus",
           render: text => {
@@ -1063,7 +1065,9 @@ const Task = React.createClass({
     this.state.id = ""; //项目编号
     this.state.orderNo = ""; //订单编号
     this.state.projectStatus = undefined; //项目状态
-    this.state.taskStatus = undefined; //项目状态
+    this.state.contractNoSearch = undefined; 
+    this.state.projectStatusSearch = undefined; //项目状态
+    this.state.taskStatuSearch = undefined; //项目状态
     this.state.taskComment = ""; //说明
     this.state.startDate = ""; //启动日期
     this.state.endDate = ""; //结束日期
@@ -1230,6 +1234,13 @@ const Task = React.createClass({
                 }}
               />
               <Input
+                placeholder="合同编号"
+                value={this.state.contractNoSearch}
+                onChange={e => {
+                  this.setState({ contractNoSearch: e.target.value });
+                }}
+              />
+              <Input
                 placeholder="项目编号"
                 value={this.state.taskNoSearch}
                 onChange={e => {
@@ -1250,6 +1261,21 @@ const Task = React.createClass({
                   );
                 })}
               </Select>
+              <Select
+                placeholder="项目状态"
+                style={{ width: 150, marginRight: "10px" }}
+                value={this.state.projectStatusSearch}
+                onChange={e => {
+                  this.setState({ projectStatusSearch: e });
+                  console.log(this.state.projectStatusSearch);
+                }}
+              >
+                {projectStatus.map(function(item) {
+                  return (
+                    <Select.Option key={item.value}>{item.key}</Select.Option>
+                  );
+                })}
+              </Select>
               <Button type="primary" onClick={this.search}>
                 搜索
               </Button>
@@ -1353,6 +1379,7 @@ const Task = React.createClass({
               }
               dataSource={this.state.dataSource}
               pagination={this.state.pagination}
+              scroll={{ x: "max-content", y: 0 }}
               onRowClick={this.tableRowClick.bind(this)}
               bordered
               size={"small"}
@@ -2752,6 +2779,7 @@ const Task = React.createClass({
           title="工时记录"
           visible={this.state.timeVisible}
           onCancel={this.timeClose}
+          width={800}
           footer={null}
         >
           <Spin spinning={this.state.loading}>
@@ -2759,7 +2787,7 @@ const Task = React.createClass({
               columns={this.state.columnsTime}
               dataSource={this.state.dataSourceTime}
               pagination={false}
-              width={600}
+              scroll={{ x: "max-content", y: 0 }}
               bordered
               size={"small"}
             />

+ 35 - 5
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -60,8 +60,10 @@ const MyTaskOutsource = React.createClass({
         name: this.state.nameSearch, //客户名称
         depId: this.state.departmenttSearch, //订单部门
         orderNo: this.state.orderNoSearch, //订单编号
+        contractNo: this.state.contractNoSearch, //合同编号
         taskId: this.state.taskNoSearch, //项目编号
-        taskStatus: this.state.taskStatus, //项目状态
+        taskStatus: this.state.taskStatuSearch, //项目状态
+        projectStatus: this.state.projectStatusSearch, //项目状态
         adminName: this.state.adminName, //项目受理人
         outsource: 1
       },
@@ -220,7 +222,7 @@ const MyTaskOutsource = React.createClass({
           key: "outsourceName"
         },
         {
-          title: "项目状态",
+          title: "分配状态",
           dataIndex: "taskStatus",
           key: "taskStatus",
           render: text => {
@@ -1357,8 +1359,10 @@ const MyTaskOutsource = React.createClass({
   reset() {
     this.state.id = ""; //项目编号
     this.state.orderNo = ""; //订单编号
+    this.state.contractNoSearch = undefined; //订单编号
     this.state.projectStatus = undefined; //项目状态
-    this.state.taskStatus = undefined; //项目状态
+    this.state.projectStatusSearch = undefined; //项目状态
+    this.state.taskStatuSearch = undefined; //项目状态
     this.state.taskComment = ""; //说明
     this.state.startDate = ""; //启动日期
     this.state.endDate = ""; //结束日期
@@ -1525,6 +1529,13 @@ const MyTaskOutsource = React.createClass({
                 }}
               />
               <Input
+                placeholder="合同编号"
+                value={this.state.contractNoSearch}
+                onChange={e => {
+                  this.setState({ contractNoSearch: e.target.value });
+                }}
+              />
+              <Input
                 placeholder="项目编号"
                 value={this.state.taskNoSearch}
                 onChange={e => {
@@ -1545,6 +1556,21 @@ const MyTaskOutsource = React.createClass({
                   );
                 })}
               </Select>
+              <Select
+                placeholder="项目状态"
+                style={{ width: 150, marginRight: "10px" }}
+                value={this.state.projectStatusSearch}
+                onChange={e => {
+                  this.setState({ projectStatusSearch: e });
+                  console.log(this.state.projectStatusSearch);
+                }}
+              >
+                {projectStatus.map(function(item) {
+                  return (
+                    <Select.Option key={item.value}>{item.key}</Select.Option>
+                  );
+                })}
+              </Select>
               <Button type="primary" onClick={this.search}>
                 搜索
               </Button>
@@ -1595,6 +1621,7 @@ const MyTaskOutsource = React.createClass({
               dataSource={this.state.dataSource}
               pagination={this.state.pagination}
               onRowClick={this.tableRowClick.bind(this)}
+              scroll={{ x: "max-content", y: 0 }}
               bordered
               size={"small"}
             />
@@ -3262,6 +3289,7 @@ const MyTaskOutsource = React.createClass({
           title="工时记录"
           visible={this.state.timeVisible}
           onCancel={this.timeClose}
+          width={800}
           footer={null}
         >
           <Spin spinning={this.state.loading}>
@@ -3269,11 +3297,13 @@ const MyTaskOutsource = React.createClass({
               columns={this.state.columnsTime}
               dataSource={this.state.dataSourceTime}
               pagination={false}
-              width={600}
+              scroll={{ x: "max-content", y: 0 }}
               bordered
               size={"small"}
             />
-            <p style={{ marginTop: 10, color: "red" }}>累计工时(小时):{this.state.recordHour}</p>
+            <p style={{ marginTop: 10, color: "red" }}>
+              累计工时(小时):{this.state.recordHour}
+            </p>
           </Spin>
         </Modal>
       </div>

+ 5 - 2
js/component/tools.js

@@ -1785,7 +1785,7 @@ module.exports = {
   },
   //开票状态
   getInvoiceStatus: function(e,record) {
-    if(record.approval == 1) {
+    if( record && record.approval == 1) {
        return "特批待审核"
     }else {
       if (e || e == 0) {
@@ -1930,5 +1930,8 @@ module.exports = {
       }
     })
     // return flag
-  }
+  },
+  // getType() {
+
+  // }
 };