hujie123456 пре 5 година
родитељ
комит
1863ec28d4

+ 1 - 1
css/base.less

@@ -513,4 +513,4 @@ body {
 }
 .chooseList>.ant-checkbox-wrapper {
   width: 80%;
-}
+}

+ 1 - 0
css/sign.less

@@ -36,3 +36,4 @@
     }
 }
 .group{margin-top: 0;}
+

+ 8 - 5
js/component/manageCenter/bottom.jsx

@@ -4,11 +4,14 @@ import './bottom.less';
 const Bottom = React.createClass({
     render() {
         return (
-            <div className="account-bottom">
-                <p>阿凡提科技</p>
-                <p>技术支持@阿凡提</p>
-            </div>
-        )
+          <div
+            className="account-bottom"
+            style={{ background: "rgb(0,0,0,.5)", color: "white" }}
+          >
+            <p>阿凡提科技</p>
+            <p>技术支持@阿凡提</p>
+          </div>
+        );
     }
 });
 

+ 22 - 12
js/component/manageCenter/order/orderNew/addService.jsx

@@ -35,7 +35,8 @@ import {
   getApprovedState,
   getjiedian,
   getCuikuan,
-  getProjectStatus
+  getProjectStatus,
+  moneyVerify
 } from "../../../tools.js";
 import PicturesWall from "./changeComponent/picturesWall.js";
 import { changeType, getChangeType } from "./changeComponent/changeDetailYxgly";
@@ -439,16 +440,22 @@ const NewService = Form.create()(
         theorgCodeUrl = picArr.join(",");
       }
       if (this.props.userDetaile) {
-        // if (this.state.totalAmount === "") {
-        //   message.warning("签单金额不能为空");
-        //   this.refs.signFirstPayment.focus();
-        //   return false;
-        // }
-        // if (this.state.firstAmount === "") {
-        //   message.warning("首付金额不能为空");
-        //   this.refs.signFirstPayment.focus();
-        //   return false;
-        // }
+        if (this.state.totalAmount === "") {
+          message.warning("签单金额不能为空");
+          this.refs.signFirstPayment.focus();
+          return false;
+        }
+        if (this.state.firstAmount === "") {
+          message.warning("首付金额不能为空");
+          this.refs.signFirstPayment.focus();
+          return false;
+        }
+        if(moneyVerify(this.state.firstAmount)) {
+          return
+        }
+        if (moneyVerify(this.state.totalAmount)) {
+          return;
+        }
         if (!theorgCodeUrl) {
           message.warning("图片过大,上传失败");
           this.refs.signFirstPayment.focus();
@@ -671,7 +678,7 @@ const NewService = Form.create()(
     contactSave() {
       if (this.state.contactList) {
         let cuiData = this.state.contactList;
-        for (var a = 0; a < cuiData.length; a++) {
+        for (var a = 0; a < cuiData.length; a++) { 
           if (cuiData[a].money == "") {
             message.warning("催款金额不能为空");
             this.refs.signFirstPayment.focus();
@@ -681,6 +688,9 @@ const NewService = Form.create()(
             this.refs.signFirstPayment.focus();
             return false;
           }
+          if (moneyVerify(cuiData[a].money)) {
+            return;
+          }
         }
       }
       this.setState({

+ 10 - 1
js/component/manageCenter/order/orderNew/changeComponent/changeApply.js

@@ -3,7 +3,7 @@ import { Form, Select, Input, Button, message } from "antd";
 import $ from "jquery/src/ajax";
 import PicturesWall from "./picturesWall";
 import Rizhi from "./rizhi";
-
+import {moneyVerify} from "@/tools.js"
 const FormItem = Form.Item;
 const formItemLayout = {
   labelCol: { span: 8 },
@@ -30,6 +30,15 @@ class ChangeApply extends Component {
 
   //变更申请
   changeApply() {
+    if(moneyVerify(this.state.data.totalAmount)) {
+      return false
+    }
+    if (moneyVerify(this.state.data.settlementAmount)) {
+      return false;
+    }
+    if(moneyVerify(this.state.data.changeAmount)) {
+      return false
+    }
     let theorgCodeUrl = [];
     if (this.state.voucherUrl.length) {
       let picArr = [];

+ 81 - 30
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzy.js

@@ -167,6 +167,7 @@ class ChangeDetail extends Component {
   constructor(props) {
     super(props);
     this.state = {
+      rotateDeg: 0,
       previewVisible: false,
       buttonStatus: true,
       changeType: 2,
@@ -243,12 +244,16 @@ class ChangeDetail extends Component {
           key: "dels",
           render: (text, record, index) => {
             return (
-              <div style={{ display:
-                (this.props.data.processState == 7 ||
-                  this.props.data.processState == 8) &&
-                this.props.data.status == 4
-                  ? "none"
-                  : "block"}}>
+              <div
+                style={{
+                  display:
+                    (this.props.data.processState == 7 ||
+                      this.props.data.processState == 8) &&
+                    this.props.data.status == 4
+                      ? "none"
+                      : "block"
+                }}
+              >
                 <Popconfirm
                   title="是否删除?"
                   onConfirm={() => {
@@ -293,8 +298,11 @@ class ChangeDetail extends Component {
     this.addcontact = this.addcontact.bind(this);
     this.contactSave = this.contactSave.bind(this);
     this.confirmDelet = this.confirmDelet.bind(this);
-    this.finish = this.finish.bind(this)
-    this.reload = this.reLoad.bind(this)
+    this.finish = this.finish.bind(this);
+    this.reload = this.reLoad.bind(this);
+    this.downImg = this.downImg.bind(this);
+    this.upImg = this.upImg.bind(this);
+    this.rotate = this.rotate.bind(this);
   }
 
   componentWillReceiveProps(nextProps) {
@@ -316,7 +324,6 @@ class ChangeDetail extends Component {
 
   componentDidMount() {
     window.setTimeout(() => {
-
       const contactList = this.props.contactList;
       contactList.forEach(item => {
         item.load = true;
@@ -324,7 +331,6 @@ class ChangeDetail extends Component {
       this.setState({
         contactList
       });
-
     }, 0);
   }
   // componentDidMount() {
@@ -347,6 +353,45 @@ class ChangeDetail extends Component {
   //     });
   // }
 
+  downImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.props.pictureUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  }
+  upImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  }
+  rotate() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg
+    });
+  }
+
   reset() {
     this.setState({
       paymentTimes: null,
@@ -450,7 +495,6 @@ class ChangeDetail extends Component {
         });
       }
     });
-
   }
 
   // 完成订单
@@ -463,10 +507,10 @@ class ChangeDetail extends Component {
         type: this.props.data.type,
         id: this.props.data.id
       },
-      success: (data) => {
-        if(data) {
+      success: data => {
+        if (data) {
           message.success("保存成功!");
-          window.location.reload()
+          window.location.reload();
         }
       }
     });
@@ -499,9 +543,9 @@ class ChangeDetail extends Component {
       function(data) {
         if (!data.error.length) {
           message.success("保存成功!");
-          let num = 0
+          let num = 0;
           this.state.contactList.forEach(item => {
-            num += +item.amount
+            num += +item.amount;
             // if (item.key == index.key) {
             //   item.load = true;
             //   let time = this.timestampToTime(new Date().getTime());
@@ -513,8 +557,7 @@ class ChangeDetail extends Component {
             refundInvoice: num
           });
           this.reLoad();
-          console.log("bug",this.state);
-          
+          console.log("bug", this.state);
         } else {
           message.warning(data.error[0].message);
         }
@@ -569,10 +612,10 @@ class ChangeDetail extends Component {
     if (index.key) {
       let num = this.state.contactList.findIndex(item => item.key == index.key);
       this.state.contactList.splice(num, 1);
-      let total = 0
-      this.state.contactList.forEach((item) => {
-        total += +item.amount
-      })
+      let total = 0;
+      this.state.contactList.forEach(item => {
+        total += +item.amount;
+      });
       this.setState({
         contactList: this.state.contactList,
         refundInvoice: total
@@ -598,10 +641,10 @@ class ChangeDetail extends Component {
 
           this.state.contactList.splice(num, 1);
 
-          let total = 0
-          this.state.contactList.forEach((item) => {
-            total += +item.amount
-          })
+          let total = 0;
+          this.state.contactList.forEach(item => {
+            total += +item.amount;
+          });
           this.setState({
             contactList: this.state.contactList,
             refundInvoice: total
@@ -752,14 +795,16 @@ class ChangeDetail extends Component {
         },
         labelB: "应退金额(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: this.props.data.refundableAmount ? this.props.data.refundableAmount : "0",
+        dataB: this.props.data.refundableAmount
+          ? this.props.data.refundableAmount
+          : "0",
         onChangeB: value => {
           this.setState({
             refundableAmount: value
           });
         },
         mark: true
-      },
+      }
       // {
       //   labelA: "备注",
       //   formItemLayoutA: formItemLayout,
@@ -869,15 +914,21 @@ class ChangeDetail extends Component {
               visible={this.state.previewVisible}
               onCancel={() => {
                 this.setState({ previewVisible: false }, () => {
-                  this.foo.reset();
+                  this.reset();
                 });
               }}
             >
               <img
                 alt=""
-                style={{ width: "100%" }}
+                style={{
+                  width: "100%",
+                  transform: `rotate(${this.state.rotateDeg}deg)`
+                }}
                 src={this.state.previewImage || ""}
               />
+              <Button onClick={this.rotate}>旋转</Button>
+              <Button onClick={this.upImg}>上一张</Button>
+              <Button onClick={this.downImg}>下一张</Button>
             </Modal>
             <Rizhi changeId={this.props.data.id} />
           </Form.Item>

+ 57 - 9
js/component/manageCenter/order/orderNew/changeComponent/changeDetailYxy.js

@@ -85,6 +85,7 @@ class ChangeDetail extends Component {
   constructor(props) {
     super(props);
     this.state = {
+      rotateDeg: 0,
       previewVisible: false,
       dataSource: [],
       // 累计回收退票
@@ -132,16 +133,15 @@ class ChangeDetail extends Component {
           dataIndex: "createTimes",
           key: "createTimes",
           render: (text, record) => {
-            return (
-              <div>
-                {record.createTimes}
-              </div>
-            );
+            return <div>{record.createTimes}</div>;
           }
         }
       ]
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
+    this.downImg = this.downImg.bind(this);
+    this.upImg = this.upImg.bind(this);
+    this.rotate = this.rotate.bind(this);
   }
 
   getOrgCodeUrl(e) {
@@ -149,7 +149,9 @@ class ChangeDetail extends Component {
       orgCodeUrl: e
     });
   }
-
+  componentDidMount() {
+    console.log("图片", this.props.pictureUrl);
+  }
   // loadData() {
   //   $.ajax({
   //     method: "get",
@@ -187,7 +189,44 @@ class ChangeDetail extends Component {
       refundInvoice: nextProps.data.refundInvoice
     });
   }
-
+  downImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.props.pictureUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  }
+  upImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  }
+  rotate() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg
+    });
+  }
   render() {
     // const loadData = [
     //   {
@@ -278,7 +317,7 @@ class ChangeDetail extends Component {
         labelB: "应退金额(万元)",
         formItemLayoutB: formItemLayout,
         dataB: this.props.data.refundableAmount
-      },
+      }
     ];
     const buttonData = [
       {
@@ -364,6 +403,9 @@ class ChangeDetail extends Component {
               listType="picture-card"
               fileList={orgCodeUrl}
               onPreview={file => {
+                console.log(file);
+                console.log(this.props.pictureUrl);
+
                 this.setState({
                   previewImage: file.url || file.thumbUrl,
                   previewVisible: true
@@ -380,9 +422,15 @@ class ChangeDetail extends Component {
             >
               <img
                 alt=""
-                style={{ width: "100%" }}
+                style={{
+                  width: "100%",
+                  transform: `rotate(${this.state.rotateDeg}deg)`
+                }}
                 src={this.state.previewImage || ""}
               />
+              <Button onClick={this.rotate}>旋转</Button>
+              <Button onClick={this.upImg}>上一张</Button>
+              <Button onClick={this.downImg}>下一张</Button>
             </Modal>
             <Rizhi changeId={this.props.data.id} />
           </Form.Item>

+ 2 - 1
js/component/manageCenter/order/orderNew/changeComponent/orderDetail.js

@@ -259,7 +259,8 @@ class OrderDetail extends Component {
               footer={null}
               visible={this.state.previewVisible}
               onCancel={() => {
-                this.setState({ previewVisible: false });
+                this.state.rotateDeg = 0
+                this.setState({ previewVisible: false, rotateDeg: this.state.rotateDeg });
               }}
             >
               <img

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

@@ -23,7 +23,8 @@ import {
   getjiedian,
   getboutique,
   getCuikuan,
-  getProjectStatus
+  getProjectStatus,
+  moneyVerify
 } from "@/tools.js";
 import "./customer.less";
 //图片组件
@@ -816,6 +817,9 @@ const IntentionCustomer = Form.create()(
         message.warning("单价不能为空");
         return;
       }
+      if(moneyVerify(this.state.unitPrice)) {
+        return 
+      }
       if (!this.state.unitNumber) {
         message.warning("数量不能为空");
         return;
@@ -824,6 +828,9 @@ const IntentionCustomer = Form.create()(
         message.warning("总金额不能为空");
         return;
       }
+      if (moneyVerify(this.state.amount)) {
+        return;
+      }
       if (!this.state.outsourceRemarks) {
         message.warning("备注不能为空");
         return;

+ 31 - 11
js/component/manageCenter/order/orderNew/reject.jsx

@@ -3,7 +3,13 @@ import { Icon, Button, AutoComplete,Input, Select, Spin, Popconfirm, Table, mess
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import {boutique ,tepi,jiedian} from '@/dataDic.js';
-import { getLiquidationStatus,getProcessStatus,splitUrl,getCuikuan} from '@/tools.js';
+import {
+  getLiquidationStatus,
+  getProcessStatus,
+  splitUrl,
+  getCuikuan,
+  moneyVerify
+} from "@/tools.js";
 import './customer.less';
 //图片组件
 const PicturesWall = React.createClass({
@@ -517,6 +523,11 @@ const IntentionCustomer = Form.create()(React.createClass({
 	},
 	//催款节点保存
 	contactSave() {
+		for(let i = 0; i < this.state.contactList.length; i++) {
+			if(moneyVerify(this.state.contactList[i].money)) {
+				return
+			}
+		}
 		this.setState({
 			loading: true
 		});
@@ -571,11 +582,17 @@ const IntentionCustomer = Form.create()(React.createClass({
 				}
             });
             theorgCodeUrl = picArr.join(",");
-        };
-        if(!this.state.totalAmount){
-        	message.warning('签单金额不能为空');
-        	this.refs.signFirstPayment.focus()
-        	return false;
+		};
+		if (moneyVerify(this.state.totalAmount)) {
+			return
+		}
+      	if (moneyVerify(this.state.firstAmount)) {
+          	return;
+        }
+        if (!this.state.totalAmount) {
+          message.warning("签单金额不能为空");
+          this.refs.signFirstPayment.focus();
+          return false;
         };
         if(!this.state.firstAmount){
         	message.warning('首付金额不能为空');
@@ -709,11 +726,14 @@ const IntentionCustomer = Form.create()(React.createClass({
 			message.warning('服务名称不匹配!');
 			return false;
 		};
-		if(!this.state.commodityPrice){
-			message.warning('请输入金额!');
-			this.refs.commodityPrice.focus();
-			return false;
-		};
+		if (moneyVerify(this.state.commodityPrice)) {
+			return
+		}
+      if (!this.state.commodityPrice) {
+        message.warning("请输入金额!");
+        this.refs.commodityPrice.focus();
+        return false;
+      };
 		if(!this.state.commodityQuantity){
 			message.warning('请输入商品数量!');
 			this.refs.commodityQuantity.focus();

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

@@ -30,7 +30,8 @@ import {
   getProjectStatus,
   splitUrl,
   getboutique,
-  getprovince
+  getprovince,
+  moneyVerify
 } from "@/tools";
 import { taskStatus, projectStatus } from "@/dataDic.js";
 const FormItem = Form.Item;
@@ -548,6 +549,9 @@ const MyTaskOutsource = React.createClass({
   },
   //点击修改任务详情
   tijiaoOk() {
+    if(moneyVerify(this.state.setUpAmount)) {
+      return
+    }
     let attachmentUrls = [];
     if (this.state.attachmentUrl.length) {
       let picArr = [];