Forráskód Böngészése

拆分项目-变更上线

mentoswzq 5 éve%!(EXTRA string=óta)
szülő
commit
14182a4418

+ 3 - 1
js/component/manageCenter/order/orderNew/changeComponent/agreeButton.js

@@ -46,7 +46,7 @@ class ReasonInput extends Component {
       crossDomain: false,
       url: globalConfig.context + "/api/admin/orderChange/orderChangeAudit",
       data: {
-        orderNo: backData.orderNo,
+        changeId: backData.id,
         remarks: this.props.reason,
         status: data.status,
         processState: this.props.processState,
@@ -159,6 +159,8 @@ class ReasonInput extends Component {
   }
 
   onOk(data, backData) {
+    console.log(this.props);
+    
     if (!this.props.reason) {
       message.error("理由不能为空!");
       return false;

+ 144 - 220
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzj.js

@@ -505,7 +505,7 @@ class ChangeDetail extends Component {
               display:
                 (this.props.data.processState == 7 ||
                   this.props.data.processState == 8) &&
-                  this.props.data.status == 4
+                this.props.data.status == 4
                   ? "block"
                   : "none"
             }}
@@ -552,7 +552,7 @@ class ChangeDetail extends Component {
               footer={null}
               visible={this.state.previewVisible}
               onCancel={() => {
-                this.setState({ previewVisible: false }, () => { });
+                this.setState({ previewVisible: false }, () => {});
               }}
             >
               <img
@@ -690,7 +690,7 @@ class ChangeDetail extends Component {
               display:
                 (this.props.data.processState == 8 ||
                   this.props.data.processState == 7) &&
-                  (this.props.data.status == 2 || this.props.data.status == 4)
+                (this.props.data.status == 2 || this.props.data.status == 4)
                   ? "block"
                   : "none"
             }}
@@ -722,7 +722,6 @@ class ChangeDetail extends Component {
               columns={this.state.ContactsLists}
               dataSource={this.state.contactList}
             />
-
           </div>
 
           {/* {this.props.data.type === 0 && this.props.data.processState >= 4 ? (
@@ -765,254 +764,179 @@ class ChangeDetail extends Component {
             ""
           )} */}
         </div>
-        {this.props.data.status !== 2 &&
-          this.props.data.status !== 4 &&
-          this.props.processState == this.props.data.processState ? (
-            // this.state.buttonStatus ? (
-            <div>
-              <div style={{ marginBottom: 10 }}>
-                <div className="clearfix">
-                  {/* <Form.Item
-                  className="half-item"
-                  label="收款时间"
-                  labelCol={{ span: 8 }}
-                  wrapperCol={{ span: 14 }}
-                >
-                  <DatePicker
-                    style={{ width: 160 }}
-                    value={
-                      this.state.paymentTimes
-                        ? moment(this.state.paymentTimes)
-                        : null
-                    }
-                    onChange={(_data, dataString) => {
-                      this.setState({
-                        paymentTimes: dataString
-                      });
+        {this.props.data.processState > 5 &&
+        this.props.data.status == 1 &&
+        this.props.processState == this.props.data.processState ? (
+          // this.state.buttonStatus ? (
+          <div>
+            <div style={{ marginBottom: 10 }}>
+              <div className="clearfix">
+                <div>
+                  <h3
+                    style={{
+                      marginLeft: 10,
+                      fontWeight: 800,
+                      marginBottom: 10
                     }}
-                  />
-                </Form.Item>
+                  >
+                    当前财务状态(财务填写)
+                  </h3>
+                  {financeData.map((item, index) => {
+                    return <Itemlist key={index} pageData={item} />;
+                  })}
+                </div>
+              </div>
+
+              <div
+                style={{
+                  marginTop: "10px",
+                  display:
+                    this.props.data.status == 2 ||
+                    this.props.processState != this.props.data.processState
+                      ? "none"
+                      : "block"
+                }}
+              >
                 <Form.Item
-                  className="half-item"
-                  label="收款金额(万元)"
-                  labelCol={{ span: 8 }}
+                  label="备注"
+                  labelCol={{ span: 4 }}
                   wrapperCol={{ span: 14 }}
                 >
-                  <Input
-                    style={{ width: 160 }}
-                    value={this.state.paymentAmount}
-                    placeholder="请输入收款金额"
+                  <Input.TextArea
+                    rows={4}
+                    value={this.state.reason}
+                    placeholder="请输入补充资料/备注"
                     onChange={e => {
                       this.setState({
-                        paymentAmount: e.target.value
+                        reason: e.target.value
                       });
                     }}
                   />
                 </Form.Item>
               </div>
-              <div className="clearfix">
-                <Form.Item
-                  className="half-item"
-                  label="开票时间"
-                  labelCol={{ span: 8 }}
-                  wrapperCol={{ span: 14 }}
-                >
-                  <DatePicker
-                    style={{ width: 160 }}
-                    value={
-                      this.state.invoiceTimes
-                        ? moment(this.state.invoiceTimes)
-                        : null
-                    }
-                    onChange={(_data, dataString) => {
-                      this.setState({
-                        invoiceTimes: dataString
-                      });
-                    }}
-                  />
-                </Form.Item>
-                <Form.Item
-                  className="half-item"
-                  label="开票金额(万元)"
-                  labelCol={{ span: 8 }}
-                  wrapperCol={{ span: 14 }}
-                >
-                  <Input
-                    style={{ width: 160 }}
-                    value={this.state.invoiceAmount}
-                    placeholder="请输入开票金额"
-                    onChange={e => {
-                      this.setState({
-                        invoiceAmount: e.target.value
-                      });
-                    }}
+            </div>
+            <div
+              className="clearfix"
+              style={{ display: "flex", justifyContent: "space-around" }}
+            >
+              {buttonData.map((item, index) => {
+                return (
+                  <AgreeButton
+                    data={item}
+                    key={index}
+                    backData={this.props.data}
+                    processState={this.props.processState}
+                    visible={this.changeButtonStatus}
+                    ajaxData={this.state}
+                    loadData={this.props.loadData}
+                    reason={this.state.reason}
+                    rejectState={this.state.rejectState}
+                    onCancel={this.props.onCancel}
                   />
-                </Form.Item> */}
-
-                  <div>
-                    <h3
-                      style={{
-                        marginLeft: 10,
-                        fontWeight: 800,
-                        marginBottom: 10
-                      }}
-                    >
-                      当前财务状态(财务填写)
-                  </h3>
-                    {financeData.map((item, index) => {
-                      return <Itemlist key={index} pageData={item} />;
-                    })}
-                  </div>
-                </div>
-
-                <div
-                  style={{
-                    marginTop: "10px",
-                    display:
-                      this.props.data.status == 2 ||
-                        this.props.processState != this.props.data.processState
-                        ? "none"
-                        : "block"
-                  }}
-                >
-                  <Form.Item
-                    label="备注"
-                    labelCol={{ span: 4 }}
-                    wrapperCol={{ span: 14 }}
-                  >
-                    <Input.TextArea
-                      rows={4}
-                      value={this.state.reason}
-                      placeholder="请输入补充资料/备注"
-                      onChange={e => {
-                        this.setState({
-                          reason: e.target.value
-                        });
-                      }}
-                    />
-                  </Form.Item>
-                </div>
-              </div>
-              <div
-                className="clearfix"
-                style={{ display: "flex", justifyContent: "space-around" }}
-              >
-                {buttonData.map((item, index) => {
-                  return (
-                    <AgreeButton
-                      data={item}
-                      key={index}
-                      backData={this.props.data}
-                      processState={this.props.processState}
-                      visible={this.changeButtonStatus}
-                      ajaxData={this.state}
-                      loadData={this.props.loadData}
-                      reason={this.state.reason}
-                      rejectState={this.state.rejectState}
-                      onCancel={this.props.onCancel}
-                    />
-                  );
-                })}
-              </div>
+                );
+              })}
+            </div>
 
-              <Select
-                defaultValue="0"
+            <Select
+              defaultValue="0"
+              style={{
+                width: 120,
+                float: "left",
+                position: "relative",
+                bottom: "28px",
+                right: "-600px"
+              }}
+              onChange={val => {
+                this.setState({ rejectState: val });
+              }}
+            >
+              <Option
+                value="0"
                 style={{
-                  width: 120,
-                  float: "left",
-                  position: "relative",
-                  bottom: "28px",
-                  right: "-600px"
-                }}
-                onChange={val => {
-                  this.setState({ rejectState: val });
+                  display: this.props.processState >= 1 ? "block" : "none"
                 }}
               >
-                <Option
-                  value="0"
-                  style={{
-                    display: this.props.processState >= 1 ? "block" : "none"
-                  }}
-                >
-                  营销员
+                营销员
               </Option>
-                <Option
-                  value="1"
-                  style={{
-                    display: this.props.processState >= 2 ? "block" : "none"
-                  }}
-                >
-                  营销管理员
+              <Option
+                value="1"
+                style={{
+                  display: this.props.processState >= 2 ? "block" : "none"
+                }}
+              >
+                营销管理员
               </Option>
-                <Option
-                  value="2"
-                  style={{
-                    display: this.props.processState >= 3 ? "block" : "none"
-                  }}
-                >
-                  咨询师
+              <Option
+                value="2"
+                style={{
+                  display: this.props.processState >= 3 ? "block" : "none"
+                }}
+              >
+                咨询师
               </Option>
-                <Option
-                  value="3"
-                  style={{
-                    display: this.props.processState >= 4 ? "block" : "none"
-                  }}
-                >
-                  咨询师经理
+              <Option
+                value="3"
+                style={{
+                  display: this.props.processState >= 4 ? "block" : "none"
+                }}
+              >
+                咨询师经理
               </Option>
-                <Option
-                  value="4"
-                  style={{
-                    display: this.props.processState >= 5 ? "block" : "none"
-                  }}
-                >
-                  咨询师总监
+              <Option
+                value="4"
+                style={{
+                  display: this.props.processState >= 5 ? "block" : "none"
+                }}
+              >
+                咨询师总监
               </Option>
-                <Option
-                  value="5"
-                  style={{
-                    display: this.props.processState >= 6 ? "block" : "none"
-                  }}
-                >
-                  财务专员(退单)
+              <Option
+                value="5"
+                style={{
+                  display: this.props.processState >= 6 ? "block" : "none"
+                }}
+              >
+                财务专员(退单)
               </Option>
-                <Option
-                  value="6"
-                  style={{
-                    display: this.props.processState >= 7 ? "block" : "none"
-                  }}
-                >
-                  财务总监
+              <Option
+                value="6"
+                style={{
+                  display: this.props.processState >= 7 ? "block" : "none"
+                }}
+              >
+                财务总监
               </Option>
-                <Option
-                  value="7"
-                  style={{
-                    display: this.props.processState >= 8 ? "block" : "none"
-                  }}
-                >
-                  总裁
+              <Option
+                value="7"
+                style={{
+                  display: this.props.processState >= 8 ? "block" : "none"
+                }}
+              >
+                总裁
               </Option>
-              </Select>
-            </div>
-          ) : (
-            <div>
-              <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
-                当前财务状态(财务填写)
+            </Select>
+          </div>
+        ) : (
+          <div>
+            <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
+              当前财务状态(财务填写)
             </h3>
-              {financeData.map((item, index) => {
-                return <Itemlist key={index} pageData={item} />;
-              })}
-            </div>
-          )}
+            {financeData.map((item, index) => {
+              return <Itemlist key={index} pageData={item} />;
+            })}
+          </div>
+        )}
         <div
           style={{
             display:
               (this.props.data.processState == 7 ||
                 this.props.data.processState == 8) &&
-                this.props.data.status == 4 && this.props.data.refundStatus
+              this.props.data.status == 4 &&
+              this.props.data.refundStatus
                 ? "block"
                 : "none"
-          }}>
+          }}
+        >
           <Refund data={this.props.data} id={this.props.id} />
         </div>
         {/* <ReactToPrint

+ 7 - 12
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzy.js

@@ -550,6 +550,8 @@ class ChangeDetail extends Component {
       });
     }, 0);
     this.refundGetList()
+    console.log(this.props,"222");
+    
   }
 
   addRefund() {
@@ -1341,10 +1343,7 @@ class ChangeDetail extends Component {
           </div>
 
 
-          {(this.props.data.processState > 5 &&
-            this.props.data.processState <= 8) ||
-            (this.props.data.processState === 9 &&
-              this.props.data.status === 4) ? (
+          {this.props.data.processState != 5   ? (
               <div>
                 <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
                   当前财务状态(财务填写)
@@ -1511,9 +1510,9 @@ class ChangeDetail extends Component {
                     marginTop: "10px",
                     display:
                       this.props.data.processState == 5 &&
-                        this.props.data.status == 2
-                        ? "none"
-                        : "block"
+                        this.props.data.status == 1
+                        ? "block"
+                        : "none"
                   }}
                 >
                   <Form.Item
@@ -1612,11 +1611,7 @@ class ChangeDetail extends Component {
             <Refund data={this.props.data} id={this.props.id} dataSource={this.state.refundDataSource} />
           </div>
         </div>
-        {!(
-          (this.props.data.processState > 5 &&
-            this.props.data.processState <= 8) ||
-          (this.props.data.processState === 9 && this.props.data.status === 4)
-        ) ? (
+        { this.props.data.processState == 5 ? (
             this.state.buttonStatus ? (
               <div>
                 <div

+ 9 - 0
js/component/manageCenter/order/orderNew/changeComponent/searchInput.js

@@ -281,6 +281,10 @@ class SearchInput extends Component {
           {
             name: "已完成",
             id: "4"
+          },
+          {
+            name: "已驳回",
+            id: "5"
           }
         ],
         getValue: value => {
@@ -374,6 +378,11 @@ class SearchInput extends Component {
           );
         })}
         {SearchSelectData.map((item, index) => {
+          if(this.props.isYxy) {
+            if(item.placeholder == "审核状态") {
+              item.content.splice(item.content.length - 1, 1)
+            }
+          }
           return (
             <PrimarySelect
               searchSelectData={item}

+ 6 - 1
js/component/manageCenter/order/orderNew/contractCwzj.js

@@ -1217,8 +1217,13 @@ const contractChange = Form.create()(
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
                       <ChangeDetail
                         id={item.id}
-                        money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
+                        money={
+                          index == arr.length - 1
+                            ? this.state.orderData.totalAmount + ""
+                            : undefined
+                        }
                         data={this.state.contractData}
+                        orderData={this.state.orderData}
                         txt={this.state.processStateText}
                         pictureUrl={this.state.voucherUrl}
                         processState={this.props.processState}

+ 0 - 8
js/component/manageCenter/order/orderNew/contractJsjl.js

@@ -1185,13 +1185,6 @@ const contractChange = Form.create()(
                 {tabList.map((item, index, arr) => {
                   return (
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
-                      {this.state.contractData.processState === 0 ? (
-                        <ChangeApply
-                          orderData={this.state.contractData}
-                          voucherUrl={this.state.voucherUrl}
-                          onCancel={this.visitCancel}
-                        />
-                      ) : (
                           <ChangeDetail
                             id={item.id}
                             money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
@@ -1207,7 +1200,6 @@ const contractChange = Form.create()(
                             contactList={this.state.refundInvoice}
                             onCancel={this.visitCancel}
                           />
-                        )}
                     </TabPane>
                   );
                 })}

+ 1 - 8
js/component/manageCenter/order/orderNew/contractJsy.js

@@ -1125,13 +1125,7 @@ const contractChange = Form.create()(
                 {tabList.map((item, index) => {
                   return (
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
-                      {this.state.contractData.processState === 0 ? (
-                        <ChangeApply
-                          orderData={this.state.contractData}
-                          voucherUrl={this.state.voucherUrl}
-                          onCancel={this.visitCancel}
-                        />
-                      ) : (
+                      
                           <ChangeDetail
                             id={item.id}
                             data={this.state.contractData}
@@ -1142,7 +1136,6 @@ const contractChange = Form.create()(
                             dataSource={this.state.dataProps}
                             onCancel={this.visitCancel}
                           />
-                        )}
                     </TabPane>
                   );
                 })}

+ 0 - 8
js/component/manageCenter/order/orderNew/contractJszj.js

@@ -1179,13 +1179,6 @@ const contractChange = Form.create()(
                 {tabList.map((item, index, arr) => {
                   return (
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
-                      {this.state.contractData.processState === 0 ? (
-                        <ChangeApply
-                          orderData={this.state.contractData}
-                          voucherUrl={this.state.voucherUrl}
-                          onCancel={this.visitCancel}
-                        />
-                      ) : (
                           <ChangeDetail
                             id={item.id}
                             money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
@@ -1201,7 +1194,6 @@ const contractChange = Form.create()(
                             contactList={this.state.refundInvoice}
                             onCancel={this.visitCancel}
                           />
-                        )}
                     </TabPane>
                   );
                 })}

+ 1 - 8
js/component/manageCenter/order/orderNew/contractYxgly.js

@@ -1185,13 +1185,7 @@ const contractChange = Form.create()(
                 {tabList.map((item, index, arr) => {
                   return (
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
-                      {this.state.contractData.processState === 0 ? (
-                        <ChangeApply
-                          orderData={this.state.contractData}
-                          voucherUrl={this.state.voucherUrl}
-                          onCancel={this.visitCancel}
-                        />
-                      ) : (
+
                           <ChangeDetail
                             id={item.id}
                             money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
@@ -1205,7 +1199,6 @@ const contractChange = Form.create()(
                             contactList={this.state.refundInvoice}
                             onCancel={this.visitCancel}
                           />
-                        )}
                     </TabPane>
                   );
                 })}

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

@@ -1140,7 +1140,7 @@ const contractChange = Form.create()(
             <span>合同变更审核订单</span>
           </div>
           <div className="user-search">
-            <SearchInput search={this.search} />
+            <SearchInput search={this.search} isYxy={true} />
 
             <ChooseList
               columns={this.state.columns}

+ 6 - 1
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -682,7 +682,9 @@ const MyTaskOutsource = React.createClass({
       });
       attachmentUrls = picArr.join(",");
     }
-
+    this.setState({
+      loading: true
+    })
     $.ajax({
       method: "POST",
       dataType: "json",
@@ -1245,6 +1247,9 @@ const MyTaskOutsource = React.createClass({
               remarks: this.state.companyRemarks
             }
           };
+      this.setState({
+        loading: true
+      })
       $.ajax({
         method: "post",
         dataType: "json",