Browse Source

财务经理增加变更流程

dev01 2 years ago
parent
commit
7ed5ae7c5a

+ 9 - 283
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwjl.js

@@ -27,6 +27,7 @@ import ProAndCuiList from "./proAndCuiList.jsx";
 import Refund from "./refund.js"
 import "./xButton.less"
 import ImgList from "../../../../common/imgList";
+import FlowChart from '../../../../common/flowchart'; // 流程图
 
 
 const { RangePicker } = DatePicker;
@@ -70,7 +71,13 @@ class Itemlist extends Component {
           className="half-item"
           style={{ marginBottom: "-5px" }}
         >
-          <p style={{ width: 731, wordWrap: "break-word" }}>{pageData.dataA}</p>
+          <p style={{ width: 731, wordWrap: "break-word" }}>
+            {pageData.dataA}
+            {
+              pageData.labelA === '当前进度' &&
+              <FlowChart id={this.props.id} />
+            }
+          </p>
         </Form.Item>
         <Form.Item
           label={pageData.labelB}
@@ -1092,7 +1099,7 @@ class ChangeDetail extends Component {
             合同变更记录
           </h2>
           {pageData.map((item, index) => {
-            return <Itemlist key={index} pageData={item} />;
+            return <Itemlist key={index} pageData={item} id={this.props.id}/>;
           })}
           <Form.Item
             label="变更凭证"
@@ -1102,58 +1109,6 @@ class ChangeDetail extends Component {
             <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
               <ImgList domId={this.props.domId ? this.props.domId : 'changeDetailCwjlqq'} fileList={orgCodeUrl} ItemWidth={'96px'} />
             </div>
-            <Modal
-              maskClosable={false}
-              footer={null}
-              width={"50%"}
-              visible={this.state.previewVisible}
-              onCancel={() => {
-                this.setState({ previewVisible: false, rotateDeg: 0 }, () => {
-                  this.reset();
-                });
-              }}
-            >
-              <img
-                alt=""
-                style={{
-                  width: "100%",
-                  transform: `rotate(${this.state.rotateDeg}deg)`,
-                }}
-                src={this.state.previewImage || ""}
-              />
-              <Button
-                onClick={this.rotate}
-                style={{
-                  position: "relative",
-                  left: "50%",
-                  transform: "translateX(-50%)",
-                }}
-              >
-                旋转
-              </Button>
-              <Button
-                onClick={this.upImg}
-                style={{
-                  position: "absolute",
-                  left: -81,
-                  top: "50%",
-                  transform: "translateY(-50%)",
-                }}
-              >
-                上一张
-              </Button>
-              <Button
-                onClick={this.downImg}
-                style={{
-                  position: "absolute",
-                  right: -81,
-                  top: "50%",
-                  transform: "translateY(-50%)",
-                }}
-              >
-                下一张
-              </Button>
-            </Modal>
             <Rizhi changeId={this.props.id} />
           </Form.Item>
           {
@@ -1566,102 +1521,10 @@ class ChangeDetail extends Component {
                 <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
                   {attachment.length > 0 ? <ImgList domId={this.props.domId + 2 ? this.props.domId + 2 : 'changeDetailCwjlqq1'} fileList={attachment} ItemWidth={'96px'} /> : '无附件'}
                 </div>
-                <Modal
-                  maskClosable={false}
-                  footer={null}
-                  width={"50%"}
-                  visible={this.state.previewVisible}
-                  onCancel={() => {
-                    this.setState({ previewVisible: false, rotateDeg: 0 }, () => {
-                      // this.reset();
-                    });
-                  }}
-                >
-                  <img
-                    alt=""
-                    style={{
-                      width: "100%",
-                      transform: `rotate(${this.state.rotateDeg}deg)`,
-                    }}
-                    src={this.state.previewImage || ""}
-                  />
-                  <Button
-                    onClick={this.rotate}
-                    style={{
-                      position: "relative",
-                      left: "50%",
-                      transform: "translateX(-50%)",
-                    }}
-                  >
-                    旋转
-                  </Button>
-                  <Button
-                    onClick={this.upImg}
-                    style={{
-                      position: "absolute",
-                      left: -81,
-                      top: "50%",
-                      transform: "translateY(-50%)",
-                    }}
-                  >
-                    上一张
-                  </Button>
-                  <Button
-                    onClick={this.downImg}
-                    style={{
-                      position: "absolute",
-                      right: -81,
-                      top: "50%",
-                      transform: "translateY(-50%)",
-                    }}
-                  >
-                    下一张
-                  </Button>
-                </Modal>
                 {/* <Rizhi changeId={this.props.id} /> */}
               </Form.Item>
             </div>
           </div>
-          {/* <div
-            style={{
-              position: "relative",
-              display:
-                (this.props.data.processState == 7 ||
-                  this.props.data.processState == 8) &&
-                  this.props.data.status == 4 && !this.props.data.refundStatus
-                  ? "block"
-                  : "none",
-              marginTop: 10
-            }}
-          >
-            <hr style={{ marginTop: 12, marginBottom: 10, backgroundColor: "black", height: 1, border: "none" }} />
-            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10, display: "inline-block" }}>
-              执行退款 <span style={{ fontSize: 12, fontWeight: "normal", color: "red" }}>(注:执行退款,系统将从已收款金额中直接减款)</span>
-            </h3>
-            <Button onClick={this.addRefund} style={{ float: "right" }}>添加执行退款</Button>
-            <Table
-              pagination={false}
-              bordered
-              columns={this.state.refundColumn}
-              dataSource={this.state.refundDataSource}
-              scroll={{ x: "max-content", y: 0 }}
-              size="small"
-            />
-            <div className="clearfix">
-              <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
-                上传退款凭证
-            </h3>
-              <div style={{ marginLeft: 20 }}>
-                <PicturesWall
-                  fileList={this.getVoucherUrl}
-                  pictureUrl={this.state.voucherUrl}
-                  url="/api/admin/orderChange/uploadRefund"
-                  sign="order_change_file"
-                />
-              </div>
-            </div>
-            <Button type="primary" onClick={this.refundExecute} style={{ position: "relative", left: "50%", transform: "translateX(-50%)" }}>确定执行退款</Button>
-          </div> */}
           <div
             style={{
               display:
@@ -1680,143 +1543,6 @@ class ChangeDetail extends Component {
             />
           </div>
         </div>
-        {/* {!(
-          (this.props.data.processState > 5 &&
-            this.props.data.processState <= 8) ||
-          (this.props.data.processState === 9 && this.props.data.status === 4)
-        ) ? (
-            this.state.buttonStatus ? (
-              <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}
-                        rejectState={this.state.rejectState}
-                        reason={this.state.reason}
-                        onCancel={this.props.onCancel}
-                      />
-                    );
-                  })}
-                </div>
-
-                <Select
-                  defaultValue="0"
-                  style={{
-                    width: 120,
-                    float: "left",
-                    position: "relative",
-                    bottom: "28px",
-                    right: "-600px"
-                  }}
-                  onChange={val => {
-                    this.setState({ rejectState: val });
-                    // console.log(val, this.state.rejectState);
-                  }}
-                >
-                  <Option
-                    value="0"
-                    style={{
-                      display: this.props.processState >= 1 ? "block" : "none"
-                    }}
-                  >
-                    营销员
-                </Option>
-                  <Option
-                    value="1"
-                    style={{
-                      display: this.props.processState >= 2 ? "block" : "none"
-                    }}
-                  >
-                    营销管理员
-                </Option>
-                  <Option
-                    value="2"
-                    style={{
-                      display: this.props.processState >= 3 ? "block" : "none"
-                    }}
-                  >
-                    咨询师
-                </Option>
-                  <Option
-                    value="3"
-                    style={{
-                      display: this.props.processState >= 4 ? "block" : "none"
-                    }}
-                  >
-                    咨询师经理
-                </Option>
-                  <Option
-                    value="4"
-                    style={{
-                      display: this.props.processState >= 5 ? "block" : "none"
-                    }}
-                  >
-                    咨询师总监
-                </Option>
-                  <Option
-                    value="5"
-                    style={{
-                      display: this.props.processState >= 6 ? "block" : "none"
-                    }}
-                  >
-                    财务专员(退单)
-                </Option>
-                  <Option
-                    value="6"
-                    style={{
-                      display: this.props.processState >= 7 ? "block" : "none"
-                    }}
-                  >
-                    财务总监
-                </Option>
-                  <Option
-                    value="7"
-                    style={{
-                      display: this.props.processState >= 8 ? "block" : "none"
-                    }}
-                  >
-                    总裁
-                </Option>
-                </Select>
-              </div>
-            ) : (
-                ""
-              )
-          ) : (
-            ""
-          )} */}
-
-        {/* <Button
-          type="primary"
-          shape="round"
-          size="large"
-          style={{
-            position: "absolute",
-            left: "50%",
-            bottom: "0",
-            transform: "translateX(-50%)",
-            display:
-              (this.props.data.processState == 7 ||
-                this.props.data.processState == 8) &&
-                this.props.data.status == 2
-                ? "block"
-                : "none"
-          }}
-          onClick={this.finish}
-        >
-          完成订单
-        </Button> */}
-
         <ReactToPrint
           trigger={() => (
             <Button

+ 0 - 102
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzj.js

@@ -550,56 +550,6 @@ class ChangeDetail extends Component {
             <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
               {orgCodeUrl ? <ImgList domId={'changeDetailCwzj' + this.props.id} fileList={orgCodeUrl} /> : <div />}
             </div>
-            <Modal
-              maskClosable={false}
-              footer={null}
-              width={"50%"}
-              visible={this.state.previewVisible}
-              onCancel={() => {
-                this.setState({ previewVisible: false }, () => { });
-              }}
-            >
-              <img
-                alt=""
-                style={{
-                  width: "100%",
-                  transform: `rotate(${this.state.rotateDeg}deg)`,
-                }}
-                src={this.state.previewImage || ""}
-              />
-              <Button
-                onClick={this.rotate}
-                style={{
-                  position: "relative",
-                  left: "50%",
-                  transform: "translateX(-50%)",
-                }}
-              >
-                旋转
-              </Button>
-              <Button
-                onClick={this.upImg}
-                style={{
-                  position: "absolute",
-                  left: -81,
-                  top: "50%",
-                  transform: "translateY(-50%)",
-                }}
-              >
-                上一张
-              </Button>
-              <Button
-                onClick={this.downImg}
-                style={{
-                  position: "absolute",
-                  right: -81,
-                  top: "50%",
-                  transform: "translateY(-50%)",
-                }}
-              >
-                下一张
-              </Button>
-            </Modal>
             <Rizhi changeId={this.props.id} />
           </Form.Item>
           {
@@ -969,58 +919,6 @@ class ChangeDetail extends Component {
                 <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
                   {attachment.length > 0 ? <ImgList domId={this.props.domId + 2 ? this.props.domId + 2 : 'changeDetailCwzj1'} fileList={attachment} ItemWidth={'96px'} /> : '无附件'}
                 </div>
-                <Modal
-                  maskClosable={false}
-                  footer={null}
-                  width={"50%"}
-                  visible={this.state.previewVisible}
-                  onCancel={() => {
-                    this.setState({ previewVisible: false, rotateDeg: 0 }, () => {
-                      // this.reset();
-                    });
-                  }}
-                >
-                  <img
-                    alt=""
-                    style={{
-                      width: "100%",
-                      transform: `rotate(${this.state.rotateDeg}deg)`,
-                    }}
-                    src={this.state.previewImage || ""}
-                  />
-                  <Button
-                    onClick={this.rotate}
-                    style={{
-                      position: "relative",
-                      left: "50%",
-                      transform: "translateX(-50%)",
-                    }}
-                  >
-                    旋转
-                  </Button>
-                  <Button
-                    onClick={this.upImg}
-                    style={{
-                      position: "absolute",
-                      left: -81,
-                      top: "50%",
-                      transform: "translateY(-50%)",
-                    }}
-                  >
-                    上一张
-                  </Button>
-                  <Button
-                    onClick={this.downImg}
-                    style={{
-                      position: "absolute",
-                      right: -81,
-                      top: "50%",
-                      transform: "translateY(-50%)",
-                    }}
-                  >
-                    下一张
-                  </Button>
-                </Modal>
                 {/* <Rizhi changeId={this.props.id} /> */}
               </Form.Item>
             </div>

+ 129 - 125
js/component/manageCenter/order/orderNew/contractCwjl.js

@@ -1213,14 +1213,9 @@ const contractChange = Form.create()(
     visitCancel() {
       this.setState(
         {
-          activeKey: "a"
-        },
-        () => {
-          this.setState({
-            visible: false
-          });
-        }
-      );
+          activeKey: "a",
+          visible: false
+        });
       this.loadData(this.state.pageNo);
     },
     visitOk() {
@@ -1406,132 +1401,141 @@ const contractChange = Form.create()(
                 />
               </Spin>
             </div>
-            <Modal
-              className="customeDetails"
-              footer=""
-              maskClosable={false}
-              width="1200px"
-              visible={this.state.visible}
-              onOk={this.visitOk}
-              onCancel={this.visitCancel}
-            >
-              <Tabs
-                activeKey={this.state.activeKey}
-                onChange={this.callback}
-                type="card"
+            {
+              this.state.visible &&
+              <Modal
+                className="customeDetails"
+                footer=""
+                maskClosable={false}
+                width="1200px"
+                visible={this.state.visible}
+                onOk={this.visitOk}
+                onCancel={this.visitCancel}
               >
-                <TabPane tab="订单详情" key="a">
-                  <Form
-                    layout="horizontal"
-                    onSubmit={this.handleSubmit}
-                    id="demand-form"
-                    style={{ paddingBottom: "40px" }}
-                  >
-                    <Spin spinning={this.state.loading}>
-                      <OrderDetail
-                        domId='dindanxiangqing'
-                        orderData={this.state.orderData}
-                        getOrderLog={this.getOrderLog}
-                        dataSourceX={this.state.dataSourceX}
-                        contactList={this.state.contactList}
-                        orderNo={this.state.orderNo}
-                        totalCui={this.state.totalCui}
-                        contactListNew={this.state.contactListNew}
-                        pictureUrl={this.state.contractPictureUrl}
-                        isCaiWu={true}
-                      />
-                    </Spin>
-                  </Form>
-                </TabPane>
-                {tabList.map((item, index, arr) => {
-                  return (
-                    <TabPane tab={"合同变更记录" + (tabList.length - index)} key={item.id}>
-                      <ChangeDetail
-                        domId={'changeDetail' + (index + 1)}
-                        id={item.id}
-                        money={
-                          index == arr.length - 1
-                            ? this.state.orderData.totalAmount + ""
-                            : undefined
+                <Tabs
+                  activeKey={this.state.activeKey}
+                  onChange={this.callback}
+                  type="card"
+                >
+                  <TabPane tab="订单详情" key="a">
+                    <Form
+                      layout="horizontal"
+                      onSubmit={this.handleSubmit}
+                      id="demand-form"
+                      style={{ paddingBottom: "40px" }}
+                    >
+                      <Spin spinning={this.state.loading}>
+                        {
+                          this.state.activeKey == "a" &&
+                          <OrderDetail
+                            domId='dindanxiangqing'
+                            orderData={this.state.orderData}
+                            getOrderLog={this.getOrderLog}
+                            dataSourceX={this.state.dataSourceX}
+                            contactList={this.state.contactList}
+                            orderNo={this.state.orderNo}
+                            totalCui={this.state.totalCui}
+                            contactListNew={this.state.contactListNew}
+                            pictureUrl={this.state.contractPictureUrl}
+                            isCaiWu={true}
+                          />
                         }
-                        data={this.state.contractData}
-                        // loadData={this.ChangeDetail}
-                        txt={this.state.processStateText}
-                        pictureUrl={this.state.voucherUrl}
-                        contractPictureUrl={this.state.contractPictureUrl}
-                        attachment={this.state.attachment}
-                        processState={this.props.processState}
-                        loadData={this.callback}
-                        reset={this.state.visible}
-                        dataSource={this.state.dataProps}
-                        proceedsData={this.state.proceedsData}
-                        proceedsTotal={this.state.proTotal}
-                        invoiceTotal={this.state.invTotal}
-                        contactList={this.state.refundInvoice}
-                        onCancel={this.visitCancel}
-                      />
-                    </TabPane>
-                  );
-                })}
-                {tabList.map((item, index) => {
-                  if (item.usedOrder) {
+                      </Spin>
+                    </Form>
+                  </TabPane>
+                  {tabList.map((item, index, arr) => {
                     return (
-                      <TabPane
-                        tab={"原订单" + (tabList.length - index)}
-                        key={item.usedOrder}
-                      >
+                      <TabPane tab={"合同变更记录" + (tabList.length - index)} key={item.id}>
                         {
-                          this.state.activeKey == item.usedOrder &&
-                          <Form
-                            layout="horizontal"
-                            onSubmit={this.handleSubmit}
-                            id="demand-form"
-                            style={{ paddingBottom: "40px" }}
-                          >
-                            <Spin spinning={this.state.loading}>
-                              <OrderDetail
-                                domId={'yuandingdan' + (index + 1)}
-                                orderData={this.state.primaryOrderData}
-                                getOrderLog={this.getOrderLog}
-                                dataSourceX={this.state.dataSourceX}
-                                contactList={this.state.contactList}
-                                orderNo={this.state.primaryOrderNo}
-                                totalCui={this.state.totalCui}
-                                contactListNew={this.state.contactListNew}
-                                isCaiWu={true}
-                              />
-                            </Spin>
-                          </Form>
+                          this.state.activeKey === String(item.id) &&
+                          <ChangeDetail
+                            domId={'changeDetail' + (index + 1)}
+                            id={item.id}
+                            money={
+                              index == arr.length - 1
+                                ? this.state.orderData.totalAmount + ""
+                                : undefined
+                            }
+                            data={this.state.contractData}
+                            // loadData={this.ChangeDetail}
+                            txt={this.state.processStateText}
+                            pictureUrl={this.state.voucherUrl}
+                            contractPictureUrl={this.state.contractPictureUrl}
+                            attachment={this.state.attachment}
+                            processState={this.props.processState}
+                            loadData={this.callback}
+                            reset={this.state.visible}
+                            dataSource={this.state.dataProps}
+                            proceedsData={this.state.proceedsData}
+                            proceedsTotal={this.state.proTotal}
+                            invoiceTotal={this.state.invTotal}
+                            contactList={this.state.refundInvoice}
+                            onCancel={this.visitCancel}
+                          />
                         }
                       </TabPane>
                     );
-                  } else {
-                    return "";
-                  }
-                })}
-                {this.state.status === 4 && this.state.isAddition ? (
-                  this.state.type === 4 || this.state.type === 5 ? (
-                    <TabPane tab="附加订单" key="c">
-                      <OrderDetail
-                        domId='fujiadingdan'
-                        orderData={this.state.additionalOrderData}
-                        getOrderLog={this.getOrderLog}
-                        dataSourceX={this.state.dataSourceX}
-                        contactList={this.state.contactList}
-                        totalCui={this.state.totalCui}
-                        contactListNew={this.state.contactListNew}
-                        orderNo={this.state.additionalOrder}
-                        isCaiWu={true}
-                      />
-                    </TabPane>
+                  })}
+                  {tabList.map((item, index) => {
+                    if (item.usedOrder) {
+                      return (
+                        <TabPane
+                          tab={"原订单" + (tabList.length - index)}
+                          key={item.usedOrder}
+                        >
+                          {
+                            this.state.activeKey == item.usedOrder &&
+                            <Form
+                              layout="horizontal"
+                              onSubmit={this.handleSubmit}
+                              id="demand-form"
+                              style={{ paddingBottom: "40px" }}
+                            >
+                              <Spin spinning={this.state.loading}>
+                                <OrderDetail
+                                  domId={'yuandingdan' + (index + 1)}
+                                  orderData={this.state.primaryOrderData}
+                                  getOrderLog={this.getOrderLog}
+                                  dataSourceX={this.state.dataSourceX}
+                                  contactList={this.state.contactList}
+                                  orderNo={this.state.primaryOrderNo}
+                                  totalCui={this.state.totalCui}
+                                  contactListNew={this.state.contactListNew}
+                                  isCaiWu={true}
+                                />
+                              </Spin>
+                            </Form>
+                          }
+                        </TabPane>
+                      );
+                    } else {
+                      return "";
+                    }
+                  })}
+                  {this.state.status === 4 && this.state.isAddition ? (
+                    this.state.type === 4 || this.state.type === 5 ? (
+                      <TabPane tab="附加订单" key="c">
+                        <OrderDetail
+                          domId='fujiadingdan'
+                          orderData={this.state.additionalOrderData}
+                          getOrderLog={this.getOrderLog}
+                          dataSourceX={this.state.dataSourceX}
+                          contactList={this.state.contactList}
+                          totalCui={this.state.totalCui}
+                          contactListNew={this.state.contactListNew}
+                          orderNo={this.state.additionalOrder}
+                          isCaiWu={true}
+                        />
+                      </TabPane>
+                    ) : (
+                      ""
+                    )
                   ) : (
                     ""
-                  )
-                ) : (
-                  ""
-                )}
-              </Tabs>
-            </Modal>
+                  )}
+                </Tabs>
+              </Modal>
+            }
             <Modal
               maskClosable={false}
               visible={this.state.noVisible}

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.2.60",
+  "version": "1.2.61",
   "description": "",
   "main": "index.js",
   "scripts": {