mentoswzq 5 years ago
parent
commit
905cd22a99

+ 18 - 6
js/component/manageCenter/order/orderNew/addService.jsx

@@ -1177,12 +1177,24 @@ const NewService = Form.create()(
                     });
                   }}
                 >
-                  {dataArr.map(item => {
-                    return (
-                      <Select.Option key={item.id} value={item.commodityName}>
-                        {item.commodityName}
-                      </Select.Option>
-                    );
+                  {dataArr.map((item, index) => {
+                    if (item.type == 3) {
+                      return (
+                        <Select.Option
+                          key={item.id}
+                          value={item.commodityName}
+                          disabled
+                        >
+                          {item.commodityName}
+                        </Select.Option>
+                      );
+                    } else {
+                      return (
+                        <Select.Option key={item.id} value={item.commodityName}>
+                          {item.commodityName}
+                        </Select.Option>
+                      );
+                    }
                   })}
                 </Select>
               );

+ 14 - 6
js/component/manageCenter/order/orderNew/changeComponent/changeApply.js

@@ -108,12 +108,20 @@ class ChangeApply extends Component {
                   });
                 }}
               >
-                {dataArr.map(item => {
-                  return (
-                    <Select.Option key={item.id} value={item.commodityName}>
-                      {item.commodityName}
-                    </Select.Option>
-                  );
+                {dataArr.map((item,index) => {
+                  if (item.type == 3) {
+                    return (
+                      <Select.Option key={item.id} value={item.commodityName} disabled>
+                        {item.commodityName}
+                      </Select.Option>
+                    );
+                  }else {
+                     return (
+                       <Select.Option key={item.id} value={item.commodityName}>
+                         {item.commodityName}
+                       </Select.Option>
+                     );
+                  }
                 })}
               </Select>
             );

+ 154 - 148
js/component/manageCenter/order/orderNew/examine.jsx

@@ -1034,6 +1034,9 @@ const IntentionCustomer = Form.create()(
     },
 
     sureOut() {
+      this.setState({
+        loading: true
+      })
       if (!this.state.companyName) {
         message.warning("公司名称不能为空");
         return;
@@ -1694,93 +1697,95 @@ const IntentionCustomer = Form.create()(
                   </Form>
                 </TabPane>
                 <TabPane tab="外包(不走总部)" key="2">
-                  <div className="clearfix">
-                    <FormItem
-                      className="half-item"
-                      {...formItemLayout}
-                      label={
-                        <span>
-                          <strong style={{ color: "#f00" }}>*</strong>外包公司
-                        </span>
-                      }
-                    >
-                      <Input
-                        value={this.state.companyName}
-                        onChange={e => {
-                          this.setState({
-                            companyName: e.target.value
-                          });
-                        }}
-                        placeholder="请填写外包公司名称"
-                      />
-                    </FormItem>
-                    <span className="tip">如多个公司,请用间隔</span>
-                  </div>
-                  <div className="clearfix">
-                    <FormItem
-                      className="half-item"
-                      {...formItemLayout}
-                      label={
-                        <span>
-                          <strong style={{ color: "#f00" }}>*</strong>单价(万元)
-                        </span>
-                      }
-                    >
-                      <Input
-                        value={this.state.unitPrice}
-                        onChange={e => {
-                          this.setState({
-                            unitPrice: e.target.value
-                          });
-                        }}
-                        placeholder="请填写单价"
-                      />
-                    </FormItem>
-                  </div>
-                  <div className="clearfix">
-                    <FormItem
-                      className="half-item"
-                      {...formItemLayout}
-                      label={
-                        <span>
-                          <strong style={{ color: "#f00" }}>*</strong>数量(个)
-                        </span>
-                      }
-                    >
-                      <Input
-                        value={this.state.unitNumber}
-                        onChange={e => {
-                          this.setState({
-                            unitNumber: e.target.value
-                          });
-                        }}
-                        placeholder="请填写数量"
-                      />
-                    </FormItem>
-                  </div>
-                  <div className="clearfix">
-                    <FormItem
-                      className="half-item"
-                      {...formItemLayout}
-                      label={
-                        <span>
-                          <strong style={{ color: "#f00" }}>*</strong>
-                          总金额(万元)
-                        </span>
-                      }
-                    >
-                      <Input
-                        value={this.state.amount}
-                        onChange={e => {
-                          this.setState({
-                            amount: e.target.value
-                          });
-                        }}
-                        placeholder="请填写本次外包公司的价格"
-                      />
-                    </FormItem>
-                  </div>
-                  {/*<div className="clearfix">
+                  <Spin spinning={this.state.loading}>
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        {...formItemLayout}
+                        label={
+                          <span>
+                            <strong style={{ color: "#f00" }}>*</strong>外包公司
+                          </span>
+                        }
+                      >
+                        <Input
+                          value={this.state.companyName}
+                          onChange={e => {
+                            this.setState({
+                              companyName: e.target.value
+                            });
+                          }}
+                          placeholder="请填写外包公司名称"
+                        />
+                      </FormItem>
+                      <span className="tip">如多个公司,请用间隔</span>
+                    </div>
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        {...formItemLayout}
+                        label={
+                          <span>
+                            <strong style={{ color: "#f00" }}>*</strong>
+                            单价(万元)
+                          </span>
+                        }
+                      >
+                        <Input
+                          value={this.state.unitPrice}
+                          onChange={e => {
+                            this.setState({
+                              unitPrice: e.target.value
+                            });
+                          }}
+                          placeholder="请填写单价"
+                        />
+                      </FormItem>
+                    </div>
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        {...formItemLayout}
+                        label={
+                          <span>
+                            <strong style={{ color: "#f00" }}>*</strong>数量(个)
+                          </span>
+                        }
+                      >
+                        <Input
+                          value={this.state.unitNumber}
+                          onChange={e => {
+                            this.setState({
+                              unitNumber: e.target.value
+                            });
+                          }}
+                          placeholder="请填写数量"
+                        />
+                      </FormItem>
+                    </div>
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        {...formItemLayout}
+                        label={
+                          <span>
+                            <strong style={{ color: "#f00" }}>*</strong>
+                            总金额(万元)
+                          </span>
+                        }
+                      >
+                        <Input
+                          value={this.state.amount}
+                          onChange={e => {
+                            this.setState({
+                              amount: e.target.value
+                            });
+                          }}
+                          placeholder="请填写本次外包公司的价格"
+                        />
+                      </FormItem>
+                    </div>
+                    {/*<div className="clearfix">
 									<FormItem className="half-item"
 									    {...formItemLayout}
 									    label="上传协议文件" style={{height:"auto"}}>  
@@ -1801,69 +1806,70 @@ const IntentionCustomer = Form.create()(
 										<span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
 									</FormItem>
 								</div>*/}
-                  <div className="clearfix">
-                    <FormItem
-                      className="half-item"
-                      style={{ height: "auto" }}
-                      {...formItemLayout}
-                      label={
-                        <span>
-                          <strong style={{ color: "#f00" }}>*</strong>备注
-                        </span>
-                      }
-                    >
-                      <TextArea
-                        rows={4}
-                        value={this.state.outsourceRemarks}
-                        onChange={e => {
-                          this.setState({
-                            outsourceRemarks: e.target.value
-                          });
-                        }}
-                        placeholder="请输入备注"
-                      />
-                    </FormItem>
-                  </div>
-                  <p
-                    className="tip"
-                    style={{
-                      paddingBottom: "12px",
-                      width: "240px",
-                      marginLeft: "145px"
-                    }}
-                  >
-                    首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
-                  </p>
-                  <div className="clearfix">
-                    <FormItem
-                      labelCol={{ span: 4 }}
-                      wrapperCol={{ span: 18 }}
-                      label={
-                        <span>
-                          <strong style={{ color: "#f00" }}>*</strong>
-                          合同/协议扫描件
-                          <span style={{ color: "#f00" }}>(外包合同)</span>
-                        </span>
-                      }
-                    >
-                      <PicturesWall
-                        fileList={this.getOrgCodeUrl}
-                        pictureUrl={this.state.pictureUrl}
-                      />
-                      <p>请上传与外包公司签订的合同协议</p>
-                      <p>图片建议:要清晰。</p>
-                    </FormItem>
-                  </div>
-                  <div className="clearfix">
-                    <div
-                      style={{ display: "inline-black", textAlign: "center" }}
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        style={{ height: "auto" }}
+                        {...formItemLayout}
+                        label={
+                          <span>
+                            <strong style={{ color: "#f00" }}>*</strong>备注
+                          </span>
+                        }
+                      >
+                        <TextArea
+                          rows={4}
+                          value={this.state.outsourceRemarks}
+                          onChange={e => {
+                            this.setState({
+                              outsourceRemarks: e.target.value
+                            });
+                          }}
+                          placeholder="请输入备注"
+                        />
+                      </FormItem>
+                    </div>
+                    <p
+                      className="tip"
+                      style={{
+                        paddingBottom: "12px",
+                        width: "240px",
+                        marginLeft: "145px"
+                      }}
                     >
-                      <Button type="primary" onClick={this.sureOut}>
-                        确认发起外包,不通过总部
-                      </Button>
-                      <p className="tip">提示:高于总部价格,费用个人承担</p>
+                      首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
+                    </p>
+                    <div className="clearfix">
+                      <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label={
+                          <span>
+                            <strong style={{ color: "#f00" }}>*</strong>
+                            合同/协议扫描件
+                            <span style={{ color: "#f00" }}>(外包合同)</span>
+                          </span>
+                        }
+                      >
+                        <PicturesWall
+                          fileList={this.getOrgCodeUrl}
+                          pictureUrl={this.state.pictureUrl}
+                        />
+                        <p>请上传与外包公司签订的合同协议</p>
+                        <p>图片建议:要清晰。</p>
+                      </FormItem>
                     </div>
-                  </div>
+                    <div className="clearfix">
+                      <div
+                        style={{ display: "inline-black", textAlign: "center" }}
+                      >
+                        <Button type="primary" onClick={this.sureOut}>
+                          确认发起外包,不通过总部
+                        </Button>
+                        <p className="tip">提示:高于总部价格,费用个人承担</p>
+                      </div>
+                    </div>
+                  </Spin>
                 </TabPane>
               </Tabs>
             </Modal>

+ 14 - 10
js/component/manageCenter/project/task/myTask.jsx

@@ -1222,12 +1222,20 @@ const Task = React.createClass({
   search() {
     this.loadData();
   },
-  reset() {
+  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.state.id = ""; //项目编号
     this.state.orderNo = ""; //订单编号
     this.state.projectStatus = undefined; //项目状态
-    this.state.contractNoSearch = undefined;
-    this.state.projectStatusSearch = undefined; //项目状态
     this.state.taskStatuSearch = undefined; //项目状态
     this.state.taskComment = ""; //说明
     this.state.startDate = ""; //启动日期
@@ -1246,23 +1254,17 @@ const Task = React.createClass({
     this.state.remarks = ""; //说明
     this.state.taskDate = ""; //日期
     this.state.taskComment = ""; //说明
-    this.state.nameSearch = "";
     this.state.releaseDate = [];
-    this.state.orderNoSearch = "";
-    this.state.taskNoSearch = "";
     this.state.outsourceName = "";
     this.state.outsourcePrice = undefined;
     this.state.distribution = undefined;
-    this.state.departmenttSearch = undefined;
     this.loadData(this.state.page);
-    this.state.approvalSearch = undefined;
     this.state.companyName = undefined;
     this.state.unitPrice = undefined;
     this.state.unitNumber = undefined;
     this.state.amount = undefined;
     this.state.outsourceRemarks = undefined;
     this.state.pictureUrl = [];
-    this.state.outsourceStatusSearch = [];
   },
   searchSwitch() {
     this.setState({
@@ -1641,7 +1643,9 @@ const Task = React.createClass({
               <Button type="primary" onClick={this.search}>
                 搜索
               </Button>
-              <Button onClick={this.reset}>重置</Button>
+              <Button onClick={e => { 
+                this.reset(true)
+               }}>重置</Button>
 
               {/* <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>

+ 1 - 1
js/component/manageCenter/project/task/taskCount.jsx

@@ -910,7 +910,7 @@ const IntentionCustomer = Form.create()(
       };
       window.location.href =
         globalConfig.context +
-        "/api/admin/orderProject/exportTaskHoursListData?" +
+        "/api/admin/orderProject/exportMyTaskList?" +
         $.param(data);
     },
     visitOks() {