hujie123456 5 years ago
parent
commit
b55ff3d65a

+ 3 - 0
css/base.less

@@ -525,3 +525,6 @@ body {
 .ant-tabs-tabpane.ant-tabs-tabpane-active .ant-calendar-picker-input.ant-input {
   width: 170px !important;
 }
+.up-btn:hover {
+    opacity: 1 !important;
+}

+ 1 - 1
js/component/manageCenter/financialManage/distribute/shouKuan.less

@@ -3,4 +3,4 @@
 // }
 .half-item .ant-calendar-picker-input.ant-input {
     width: 155px !important;
-}
+}

+ 79 - 26
js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx

@@ -11,7 +11,6 @@ import {
 } from 'antd';
 import {getjiedian,splitUrl,getNewOrderType,getProcessStatus,getApproval,getLiquidationStatus,getProjectStatus} from '@/tools';
 
-
 const OrderDetail = Form.create()(React.createClass({
     loadXmu(record) {
         this.state.data = [];
@@ -462,46 +461,100 @@ const OrderDetail = Form.create()(React.createClass({
                         this.setState({ previewVisible: false, rotateDeg: 0 });
                       }}
                     >
-                      <img
-                        alt=""
+                      <div
+                        onClick={this.upImg}
+                        className="up-btn"
                         style={{
-                          width: "100%",
-                          transform: `rotate(${this.state.rotateDeg}deg)`
+                          cursor: "pointer",
+                          transition: "all .5s",
+                          opacity: ".2",
+                          width: "41px",
+                          height: "69px",
+                          backgroundColor: "rgba(0,0,0,.5)",
+                          position: "absolute",
+                          top: "50%",
+                          left: 16,
+                          transform: "translateY(-50%)",
+                          zIndex: 1
                         }}
-                        src={this.state.previewImage || ""}
-                      />
-                      <Button
+                      >
+                        <span
+                          style={{
+                            position: "absolute",
+                            border: "1px solid #fff",
+                            width: "20px",
+                            height: "20px",
+                            left: "60%",
+                            top: "50%",
+                            transform: "translate(-50%, -50%) rotate(45deg)",
+                            borderTop: "none",
+                            borderRight: "none"
+                          }}
+                        ></span>
+                      </div>
+                      <div
                         onClick={this.rotate}
+                        className="up-btn"
                         style={{
-                          position: "relative",
+                          textAlign: "center",
+                          lineHeight: "30px",
+                          color: "#fff",
+                          cursor: "pointer",
+                          transition: "all .5s",
+                          opacity: ".2",
+                          width: "50px",
+                          height: "30px",
+                          backgroundColor: "rgba(0,0,0,.5)",
+                          position: "absolute",
+                          bottom: 10,
                           left: "50%",
-                          transform: "translateX(-50%)"
+                          transform: "translateX(-50%)",
+                          zIndex: 1,
+                          borderRadius: "5px",
                         }}
                       >
                         旋转
-                      </Button>
-                      <Button
-                        onClick={this.upImg}
+                      </div>
+                      <div
+                        onClick={this.downImg}
+                        className="up-btn"
                         style={{
+                          cursor: "pointer",
+                          transition: "all .5s",
+                          opacity: ".2",
+                          width: "41px",
+                          height: "69px",
+                          backgroundColor: "rgba(0,0,0,.5)",
                           position: "absolute",
-                          left: -81,
                           top: "50%",
-                          transform: "translateY(-50%)"
+                          right: 16,
+                          transform: "translateY(-50%)",
+                          zIndex: 1
                         }}
                       >
-                        上一张
-                      </Button>
-                      <Button
-                        onClick={this.downImg}
+                        <span
+                          style={{
+                            position: "absolute",
+                            border: "1px solid #fff",
+                            width: "20px",
+                            height: "20px",
+                            left: "40%",
+                            top: "50%",
+                            transform: "translate(-50%, -50%) rotate(225deg)",
+                            borderTop: "none",
+                            borderRight: "none"
+                          }}
+                        ></span>
+                      </div>
+                      <img
+                        alt=""
                         style={{
-                          position: "absolute",
-                          right: -81,
-                          top: "50%",
-                          transform: "translateY(-50%)"
+                          width: "100%",
+                          transform: `rotate(${this.state.rotateDeg}deg)`
                         }}
-                      >
-                        下一张
-                      </Button>
+                        src={this.state.previewImage || ""}
+                      />
+                      
                     </Modal>
                     <Button
                       style={{

+ 71 - 30
js/component/manageCenter/index/content.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Spin, Button, Tabs, Table, message } from 'antd';
+import { Spin, Button, Tabs, Table, message, Modal } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
@@ -13,7 +13,7 @@ const TabPane = Tabs.TabPane;
 const MessageModal = React.createClass({
     getInitialState() {
         return {
-            visible: false,
+            newVisible: false,
             loading: false,
             pagination: {
                 defaultCurrent: 1,
@@ -64,15 +64,16 @@ const MessageModal = React.createClass({
                     title: '内容',
                     dataIndex: 'content',
                     key: 'content',
-                }, {
-                    title: '公司',
-                    dataIndex: 'unitName',
-                    key: 'unitName',
-                }, {
-                    title: '业务员',
-                    dataIndex: 'principle',
-                    key: 'principle',
-                }
+                },
+                //  {
+                //     title: '公司',
+                //     dataIndex: 'unitName',
+                //     key: 'unitName',
+                // }, {
+                //     title: '业务员',
+                //     dataIndex: 'principle',
+                //     key: 'principle',
+                // }
             ],
             data: []
         };
@@ -333,13 +334,18 @@ const MessageModal = React.createClass({
             };
             this.state.UnreadPagination.current = data.data.pageNo;
             this.state.UnreadPagination.total = data.data.totalCount;
+            if(data.data.list.length) {
+                this.setState({
+                  newVisible: true
+                });
+            }
             this.setState({
                 unreadData: this.state.data,
                 UnreadPagination: this.state.UnreadPagination
             });
         }).always(function () {
             this.setState({
-                loading: false
+                loading: false,
             });
         }.bind(this));
     },
@@ -348,27 +354,62 @@ const MessageModal = React.createClass({
         this.loadUnread();
         this.mainMenu();
     },
+    handleOk() {
+        this.setState({
+          newVisible: false
+        });
+    },
     render() {
         return (
-            <div className="set-content">
-                <div className="set-title">
-                    <span>信息中心</span>
-                </div>
-                <Spin spinning={this.state.loading} className='spin-box'>
-                    <Tabs defaultActiveKey="1">
-                        <Tabs.TabPane tab="新信息" key="1">
-                            <Table columns={this.state.columns}
-                                dataSource={this.state.unreadData}
-                                pagination={this.state.UnreadPagination} />
-                        </Tabs.TabPane>
-                        <Tabs.TabPane tab="已读信息" key="2">
-                            <Table columns={this.state.columns}
-                                dataSource={this.state.dataSource}
-                                pagination={this.state.pagination} />
-                        </Tabs.TabPane>
-                    </Tabs>
-                </Spin>
+          <div className="set-content">
+            <div className="set-title">
+              <span>信息中心</span>
             </div>
+            <Spin spinning={this.state.loading} className="spin-box">
+              <Tabs defaultActiveKey="1">
+                <Tabs.TabPane tab="新信息" key="1">
+                  <Table
+                    columns={this.state.columns}
+                    dataSource={this.state.unreadData}
+                    pagination={this.state.UnreadPagination}
+                  />
+                </Tabs.TabPane>
+                <Tabs.TabPane tab="已读信息" key="2">
+                  <Table
+                    columns={this.state.columns}
+                    dataSource={this.state.dataSource}
+                    pagination={this.state.pagination}
+                  />
+                </Tabs.TabPane>
+              </Tabs>
+            </Spin>
+            <Modal
+              style={{ position: "relative" }}
+              title="消息提醒"
+              visible={this.state.newVisible}
+              width={1000}
+              closable={false}
+              footer={null}
+            >
+              <Table
+                columns={this.state.columns}
+                dataSource={this.state.unreadData}
+                pagination={false}
+              />
+              <Button
+                onClick={this.handleOk}
+                type={"primary"}
+                style={{
+                  position: "relative",
+                  left: "50%",
+                  transform: "translateX(-50%)",
+                  bottom: -10
+                }}
+              >
+                我已阅读以上信息
+              </Button>
+            </Modal>
+          </div>
         );
     }
 });

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

@@ -145,6 +145,7 @@ const NewService = Form.create()(
       return {
         loading: false,
         visible: false,
+        status: 4,
         orgCodeUrl: [],
         voucherUrl: [],
         customerArr: [],
@@ -617,8 +618,11 @@ const NewService = Form.create()(
                 ? thisData.approval.toString()
                 : thisData.approval,
             organizationSearch: thisData.orderDep,
-            depName: thisData.depName
+            depName: thisData.depName,
+            status: thisData.status
           });
+          console.log("kkkk",this.state.processStatus);
+          
         }.bind(this)
       }).always(
         function() {
@@ -1300,7 +1304,7 @@ const NewService = Form.create()(
 
     //变更申请
     changeApply() {
-      if (this.state.processStatus <= 4) {
+      if (this.state.status <= 4) {
         message.warning("当前订单流程不能发起变更!");
         return false;
       }

+ 1 - 6
js/component/manageCenter/order/orderNew/changeComponent/changeDetailJsy.js

@@ -183,12 +183,7 @@ class ChangeDetail extends Component {
   //   });
   // }
 
-  componentDidMount() {
-    // this.loadData();
-    window.setTimeout(() => {
-      console.log(this.props);
-    }, 1000);
-  }
+
   
 
   render() {

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

@@ -27,7 +27,7 @@ const contractChange = Form.create()(
         crossDomain: false,
         url: globalConfig.context + "/api/admin/orderChange/orderChangeList",
         data: {
-          pageNo: pageNo || 1,
+          pageNo: pageNo || this.state.page || 1,
           pageSize: this.state.pagination.pageSize,
           userName: this.state.searchData.userNameSearch,
           processState: this.props.processState,
@@ -114,6 +114,9 @@ const contractChange = Form.create()(
           pageSize: 10,
           onChange: function(page) {
             this.loadData(page);
+            this.setState({
+              page
+            })
           }.bind(this),
           showTotal: function(total) {
             return "共" + total + "条数据";

+ 10 - 1
js/component/manageCenter/order/orderNew/reject.jsx

@@ -8,9 +8,11 @@ import {
   getProcessStatus,
   splitUrl,
   getCuikuan,
-  moneyVerify
+  moneyVerify,
+  ShowModal
 } from "@/tools.js";
 import './customer.less';
+import ShowModalDiv from "@/showModal.jsx"
 //图片组件
 const PicturesWall = React.createClass({
 	getInitialState() {
@@ -97,12 +99,18 @@ const IntentionCustomer = Form.create()(React.createClass({
 				endTime: this.state.releaseDate[1],//结束时间
 			},
 			success: function(data) {
+        this.setState({
+          showModal: ShowModal()
+        });
+        console.log(ShowModal());
+        
 				let theArr = [];
 				if(data.error.length || data.data.list == "") {
 					if(data.error && data.error.length) {
 						message.warning(data.error[0].message);
 					};
 				} else {
+          
 					for(let i = 0; i < data.data.list.length; i++) {
 						let thisdata = data.data.list[i];
 						theArr.push({
@@ -1048,6 +1056,7 @@ const IntentionCustomer = Form.create()(React.createClass({
 				     )
 		return (
       <div className="user-content">
+        <ShowModalDiv ShowModal={this.state.showModal} />
         <div className="content-title">
           <span>订单审核</span>
         </div>

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

@@ -49,7 +49,7 @@ const MyTaskOutsource = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/orderProject/orderTaskList",
       data: {
-        pageNo: pageNo || 1,
+        pageNo: pageNo || this.state.page || 1,
         pageSize: this.state.pagination.pageSize,
         specially: 0, //个人
         name: this.state.nameSearch, //客户名称
@@ -113,6 +113,7 @@ const MyTaskOutsource = React.createClass({
   },
   getInitialState() {
     return {
+      page: 1,
       searchMore: true,
       assignVisible: false,
       releaseDate: [],
@@ -137,6 +138,9 @@ const MyTaskOutsource = React.createClass({
         pageSize: 10,
         onChange: function(page) {
           this.loadData(page);
+          this.setState({
+            page,
+          })
         }.bind(this),
         showTotal: function(total) {
           return "共" + total + "条数据";

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

@@ -20,7 +20,7 @@ const Task = React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/orderProject/selectTaskList",
             data: {
-                pageNo: pageNo || 1,
+                pageNo: pageNo || this.state.page || 1,
                 pageSize: this.state.pagination.pageSize,
                 specially:1,//经理
                 name: this.state.nameSearch,//客户名称

+ 5 - 2
js/component/manageCenter/set/organization/organization.jsx

@@ -20,7 +20,7 @@ const Organization=Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + '/api/admin/organization/listOrganizationManagement',
             data: {
-                pageNo: pageNo || 1,
+                pageNo: pageNo || this.state.page ||  1,
                 pageSize: this.state.pagination.pageSize,
                 name: this.state.name, //组织名称
                 superId:this.state.superId,//上级组织
@@ -75,6 +75,9 @@ const Organization=Form.create()(React.createClass({
                 pageSize: 10,
                 onChange: function (page) {
                     this.loadData(page);
+                    this.setState({
+                        page
+                    })
                 }.bind(this),
                 showTotal: function (total) {
                     return '共' + total + '条数据';
@@ -115,7 +118,7 @@ const Organization=Form.create()(React.createClass({
         };
     },
     componentWillMount() {
-    	this.selectSuperId();
+        this.selectSuperId();
     },
     //获取上级组织
     selectSuperId() {  

+ 45 - 0
js/component/showModal.jsx

@@ -0,0 +1,45 @@
+import React from "react";
+import { Spin, Button, Tabs, Table, message, Modal } from "antd";
+
+
+const ShowModal = React.createClass({
+  getInitialState() {
+    return {
+      
+    };
+  },
+
+  handleOk() {
+    this.setState({
+      newVisible: false
+    });
+  },
+  render() {
+    return (
+        <Modal
+          style={{ position: "relative" }}
+          title="消息提醒"
+          visible={this.props.ShowModal}
+          width={1000}
+          closable={false}
+          footer={null}
+        >
+          有消息
+          <Button
+            onClick={this.handleOk}
+            type={"primary"}
+            style={{
+              position: "relative",
+              left: "50%",
+              transform: "translateX(-50%)",
+              bottom: -10
+            }}
+          >
+            我已阅读以上信息
+          </Button>
+        </Modal>
+    );
+  }
+});
+
+export default ShowModal;

+ 19 - 0
js/component/tools.js

@@ -89,6 +89,7 @@ import {
 } from './dataDic.js';
 
 import { provinceList} from './NewDicProvinceList.js';
+import ShowModal from './showModal.jsx';
 
 module.exports = {
   splitUrl: function(string, i, url) {
@@ -1904,5 +1905,23 @@ module.exports = {
       message.warning("输入金额不符合规范")
       return true
     }
+  },
+  // 消息提醒函数接口
+  ShowModal() {
+    let flag = false
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/notice/unreadCount",
+      data: {},
+      success: function(data) {
+        if(data.data == 0 ) {
+          console.log(data);
+          let flag = true
+        }
+      }
+    })
+    return flag
   }
 };