dev01 2 years ago
parent
commit
55aa77ee68

+ 71 - 65
js/component/manageCenter/order/orderNew/addService.jsx

@@ -5063,8 +5063,8 @@ const NewService = Form.create()(
                                       let ups = this.state.updatas
                                       ups.salesType = e.salesType
                                       if (e.salesType == "3") {
-                                        ups.channelId = e.channelid
-                                        ups.other = e.channelname
+                                        ups.channelId = e.channelId
+                                        ups.other = e.other
                                       } else if (e.salesType == "4" || e.salesType == "5") {
                                         ups.other = e.other
                                       }
@@ -5644,72 +5644,78 @@ const NewService = Form.create()(
                               <div style={{ display: "flex" }}><span style={{ color: 'red' }}>*</span><span style={{ color: "#333" }}>服务内容:</span></div>
                             </div>
                             <div>
-                              {this.state.processStatus == 0 ? <div> <PicturesWall
-                                domId={"addServiceContent"}
-                                fileList={this.getContentUrl}
-                                pictureUrl={this.state.contentUrl}
-                                url="/api/admin/order/uploadOrderImg"
-                                sign=""
-                              />
-                                <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p></div> : this.state.contentUrl.length > 0 ? <div><ImgList
-                                  domId={"addService13"}
-                                  fileList={this.state.contentUrl}
-                                  ItemWidth={"96px"}
-                                />
-                                  <Modal
-                                    maskClosable={false}
-                                    footer={null}
-                                    width={"50%"}
-                                    visible={this.state.previewVisibleCont}
-                                    onCancel={() => {
-                                      this.setState({
-                                        previewVisibleCont: false,
-                                        rotateDeg: 0,
-                                      });
-                                    }}
-                                  >
-                                    <img
-                                      alt=""
-                                      style={{
-                                        width: "100%",
-                                        transform: `rotate(${this.state.rotateDeg}deg)`,
-                                      }}
-                                      src={this.state.previewImage || ""}
+                              {this.state.processStatus == 0 ?
+                                <div>
+                                  <PicturesWall
+                                    domId={"addServiceContent"}
+                                    fileList={this.getContentUrl}
+                                    pictureUrl={this.state.contentUrl}
+                                    url="/api/admin/order/uploadOrderImg"
+                                    sign=""
+                                  />
+                                  <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
+                                </div> :
+                                this.state.contentUrl.length > 0 ?
+                                  <div>
+                                    <ImgList
+                                      domId={"addService13"}
+                                      fileList={this.state.contentUrl}
+                                      ItemWidth={"96px"}
                                     />
-                                    <Button
-                                      onClick={this.rotateCont}
-                                      style={{
-                                        position: "relative",
-                                        left: "50%",
-                                        transform: "translateX(-50%)",
+                                    <Modal
+                                      maskClosable={false}
+                                      footer={null}
+                                      width={"50%"}
+                                      visible={this.state.previewVisibleCont}
+                                      onCancel={() => {
+                                        this.setState({
+                                          previewVisibleCont: false,
+                                          rotateDeg: 0,
+                                        });
                                       }}
                                     >
-                                      旋转
-                                    </Button>
-                                    <Button
-                                      onClick={this.upImgCont}
-                                      style={{
-                                        position: "absolute",
-                                        left: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      上一张
-                                    </Button>
-                                    <Button
-                                      onClick={this.downImgCont}
-                                      style={{
-                                        position: "absolute",
-                                        right: -81,
-                                        top: "50%",
-                                        transform: "translateY(-50%)",
-                                      }}
-                                    >
-                                      下一张
-                                    </Button>
-                                  </Modal>
-                                </div> : "暂无附件!"}
+                                      <img
+                                        alt=""
+                                        style={{
+                                          width: "100%",
+                                          transform: `rotate(${this.state.rotateDeg}deg)`,
+                                        }}
+                                        src={this.state.previewImage || ""}
+                                      />
+                                      <Button
+                                        onClick={this.rotateCont}
+                                        style={{
+                                          position: "relative",
+                                          left: "50%",
+                                          transform: "translateX(-50%)",
+                                        }}
+                                      >
+                                        旋转
+                                      </Button>
+                                      <Button
+                                        onClick={this.upImgCont}
+                                        style={{
+                                          position: "absolute",
+                                          left: -81,
+                                          top: "50%",
+                                          transform: "translateY(-50%)",
+                                        }}
+                                      >
+                                        上一张
+                                      </Button>
+                                      <Button
+                                        onClick={this.downImgCont}
+                                        style={{
+                                          position: "absolute",
+                                          right: -81,
+                                          top: "50%",
+                                          transform: "translateY(-50%)",
+                                        }}
+                                      >
+                                        下一张
+                                      </Button>
+                                    </Modal>
+                                  </div> : "暂无附件!"}
                             </div>
                           </div>
                           {/* 服务内容结束 */}

+ 76 - 68
js/component/manageCenter/order/orderNew/contentUrl.jsx

@@ -1,5 +1,5 @@
 import React, { Component } from "react";
-import {Table,Modal,Button} from "antd";
+import { Table, Modal, Button } from "antd";
 import PicturesWall from "./changeComponent/picturesWall.js";
 import ImgList from "../../../common/imgList";
 import $ from "jquery/src/ajax";
@@ -55,80 +55,88 @@ class contentUrl extends Component {
     });
   }
   render() {
-    const contentUrl = this.props.contentUrl
+    const { contentUrl = [] } = this.props
     return (
-      <div class="clearfix" style={{display:"flex",margin:"0 0 10px 80px"}}>
-      <div style={{marginRight:"6px"}}>
-      <div style={{display:"flex"}}><span style={{color:'red'}}>*</span><span style={{color:"#333"}}>服务内容:</span></div>  
-      </div>
-     <div>
-         {this.props.processStatus == 0 ? <div> <PicturesWall
-              domId={this.props.domId}
-              fileList={this.props.getContentUrl}
-              pictureUrl={this.props.contentUrl}
-              url="/api/admin/order/uploadOrderImg"
-              sign=""
-            />
-            <p><span style={{color:"red",display:"inline-block"}}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p></div> : contentUrl ?  <div><ImgList
+      <div class="clearfix" style={{ display: "flex", margin: "0 0 10px 80px" }}>
+        <div style={{ marginRight: "6px" }}>
+          <div style={{ display: "flex" }}><span style={{ color: 'red' }}>*</span><span style={{ color: "#333" }}>服务内容:</span></div>
+        </div>
+        <div>
+          {this.props.processStatus == 0 ?
+            <div>
+              <PicturesWall
+                domId={this.props.domId}
+                fileList={this.props.getContentUrl}
+                pictureUrl={this.props.contentUrl}
+                url="/api/admin/order/uploadOrderImg"
+                sign=""
+              />
+              <p><span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
+            </div> :
+            !!contentUrl && contentUrl.length > 0 ?
+              <div>
+                <ImgList
                   domId={this.props.imgId}
                   fileList={this.props.contentUrl}
                   ItemWidth={"96px"}
-                /><Modal
-                maskClosable={false}
-                footer={null}
-                width={"50%"}
-                visible={this.state.previewVisible}
-                onCancel={() => {
-                  this.setState({
-                    previewVisible: false,
-                    rotateDeg: 0,
-                  });
-                }}
-              >
-                <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%)",
+                <Modal
+                  maskClosable={false}
+                  footer={null}
+                  width={"50%"}
+                  visible={this.state.previewVisible}
+                  onCancel={() => {
+                    this.setState({
+                      previewVisible: false,
+                      rotateDeg: 0,
+                    });
                   }}
                 >
-                  上一张
-                </Button>
-                <Button
-                  onClick={this.downImg}
-                  style={{
-                    position: "absolute",
-                    right: -81,
-                    top: "50%",
-                    transform: "translateY(-50%)",
-                  }}
-                >
-                  下一张
-                </Button>
-              </Modal> </div>
-                :"暂无附件!"}
-                {/* <div style={{color:"red"}}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等)</div> */}
-      </div>
+                  <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>
+              </div>
+              : "暂无附件!"}
+          {/* <div style={{color:"red"}}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等)</div> */}
+        </div>
       </div>
     );
   }

+ 1 - 1
js/component/manageCenter/order/orderNew/examine.jsx

@@ -1274,7 +1274,7 @@ const IntentionCustomer = Form.create()(
       this.setState({
         signBillVisible: false,
       });
-      this.state.orderNo = "";
+      this.state.orderNoSearch = "";
       this.state.customerName = "";
       this.state.releaseDate[0] = undefined;
       this.state.releaseDate[1] = undefined;

+ 45 - 24
js/component/manageCenter/order/orderNew/reject.jsx

@@ -940,11 +940,16 @@ const IntentionCustomer = Form.create()(
             }
           } else {
             let thisdata = data.data;
-            if (thisdata.approval == 2) {
-              thisdata.approval = "特批通过";
-            } else if (thisdata.approval == 3) {
-              thisdata.approval = "特批驳回";
+            if (thisdata.approval == 0) {
+              thisdata.approval = 0;
+            } else {
+              thisdata.approval = 1;
             }
+            // if (thisdata.approval == 2) {
+            //   thisdata.approval = "特批通过";
+            // } else if (thisdata.approval == 3) {
+            //   thisdata.approval = "特批驳回";
+            // }
             this.setState({
               id: thisdata.id,
               orderUid: thisdata.uid,
@@ -995,7 +1000,7 @@ const IntentionCustomer = Form.create()(
               initiateName: thisdata.initiateName, //驳回人
               backDate: thisdata.backDate, //驳回时间
               reason: thisdata.reason, //驳回原因
-              approval: thisdata.approval.toString(), //特批状态
+              approval: thisdata.approval, //特批状态
               organizationSearch: thisdata.orderDep,
               //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
               outsource: thisdata.outsource == 0 ? "否" : "是",
@@ -1407,7 +1412,6 @@ const IntentionCustomer = Form.create()(
     },
     //重新提交
     examOk() {
-      // if (this.state.flag) return;
       let theorgCodeUrl = [];
       if (this.state.orgCodeUrl.length) {
         let picArr = [];
@@ -2063,18 +2067,15 @@ const IntentionCustomer = Form.create()(
                       <span>
                         {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
                           (salesList[this.state.updatas.salesType] || "")}
-                        {
+                        {/* {
                           this.state.updatas.other != null && this.state.updatas.other != "" &&
                           <Tooltip title={this.state.updatas.other}>
                             <span>
                               {"(" + this.state.updatas.other.toString().slice(0, 10) + (this.state.updatas.other.toString().length > 9 ? "...)" : ")")}
                             </span>
                           </Tooltip>
-                        }
+                        } */}
                       </span>
-
-                      {/* <span>{(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
-                        (salesList[this.state.updatas.salesType] || "")}</span> */}
                       <UpdateSales
                         orderNo={this.state.orderNo}
                         updatas={this.state.updatas}
@@ -2083,8 +2084,8 @@ const IntentionCustomer = Form.create()(
                             let ups = this.state.updatas
                             ups.salesType = e.salesType
                             if (e.salesType == "3") {
-                              ups.channelId = e.channelid
-                              ups.other = e.channelname
+                              ups.channelId = e.channelId
+                              ups.other = e.other
                             } else if (e.salesType == "4" || e.salesType == "5") {
                               ups.other = e.other
                             }
@@ -2233,15 +2234,16 @@ const IntentionCustomer = Form.create()(
                           this.setState({ approval: e });
                         }}
                       >
-                        {/* {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>
+                        {
+                          [{ id: 0, name: "非特批" },
+                          { id: 1, name: "特批" }].map(function (item) {
+                            return (
+                              <Select.Option key={item.id} value={item.id}>
+                                {item.name}
+                              </Select.Option>
+                            );
+                          })
+                        }
                       </Select>
                     </FormItem>
                     <FormItem
@@ -2342,16 +2344,35 @@ const IntentionCustomer = Form.create()(
                         </Button>
                       </FormItem>
                     </div>
-                    <ContentUrl
+                    {/* 服务内容 */}
+                    {/* <ContentUrl
                       processStatus={this.state.processStatus}
                       domId={"rejectContent"}
                       contentUrl={this.state.contentUrl}
                       getContentUrl={this.getContentUrl}
                       imgId={"rejectImg1"}
-                    />
+                    /> */}
                     <div className="clearfix">
                       <FormItem
                         labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label={
+                          <span>
+                            <strong style={{ color: "#f00" }}>*</strong>
+                            服务内容
+                          </span>
+                        }
+                      >
+                        <PicturesWall
+                          domId={'rejectContent'}
+                          fileList={this.getContentUrl}
+                          pictureUrl={this.state.contentUrl}
+                        />
+                        <p><span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
+                      </FormItem>
+
+                      <FormItem
+                        labelCol={{ span: 4 }}
                         wrapperCol={{ span: 16 }}
                         label={
                           <span>

+ 1 - 1
js/component/manageCenter/order/orderNew/updatesales.jsx

@@ -82,7 +82,7 @@ class UpdateSales extends Component {
         });
         if (!data.error.length) {
           message.success("修改成功!");
-          onRefresh(datas);
+          onRefresh(post);
           this.close();
         } else {
           message.warning(data.error[0].message);