dev01 2 роки тому
батько
коміт
9feb7862c9

+ 126 - 0
js/component/common/logPopup/viplogs.jsx

@@ -0,0 +1,126 @@
+// 会员日志弹窗
+import React, { Component } from "react";
+import { Button, message, Modal, Spin, Table } from "antd";
+import { ShowModal } from "../../tools";
+import $ from "jquery/src/ajax";
+
+class VipLogs extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      visible: false,
+      columnsDate: [
+        {
+          title: "操作人",
+          dataIndex: "aname",
+          key: "aname",
+          width: 150,
+        },
+        {
+          title: "操作",
+          dataIndex: "status",
+          key: "status",
+          width: 110,
+          render: (text, record) => {
+            return (
+              <div>
+                {["发起", "通过", "拒绝", "完成",][text]}
+              </div>
+            );
+          },
+        },
+        {
+          title: "操作时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          width: 150,
+        },
+        {
+          title: "备注",
+          dataIndex: "remarks",
+          key: "remarks",
+        },
+      ],
+      recordData: [],
+    };
+  }
+
+  componentDidMount() { }
+
+  getData() {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/orderProject/memberLog",
+      data: {
+        id: this.props.id,
+      },
+      success: function (data) {
+        ShowModal(this);
+        let theArr = [];
+        if (!data.data) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          this.setState({
+            recordData: data.data,
+          });
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  }
+
+  render() {
+    return (
+      <span>
+        <Button
+          type="primary"
+          onClick={(e) => {
+            e.stopPropagation();
+            this.getData();
+            this.setState({
+              visible: true,
+            })
+          }}
+          style={{ marginLeft: "10px" }}
+        >
+          日志
+        </Button>
+        <Modal
+          maskClosable={false}
+          visible={this.state.visible}
+          footer=""
+          title="会员审批日志"
+          className="admin-desc-content"
+          width="800px"
+          onCancel={(e) => {
+            this.setState({
+              visible: false,
+            });
+          }}
+          style={{ zIndex: 10 }}
+        >
+          <Spin spinning={this.state.loading}>
+            <div className="patent-table">
+              <Table
+                columns={this.state.columnsDate}
+                dataSource={this.state.recordData || []}
+                pagination={false}
+              />
+            </div>
+          </Spin>
+        </Modal>
+      </span>
+    );
+  }
+}
+
+export default VipLogs;

+ 22 - 21
js/component/common/projectOperation/index.jsx

@@ -559,27 +559,28 @@ class ProjectOperation extends Component {
                                                 this.state.declarationBatch === 2 ? '第二批' :
                                                     this.state.declarationBatch === 3 ? '第三批' :
                                                         this.state.declarationBatch === 4 ? '第四批' : '未知'
-                                        ) : <Select
-                                            placeholder="请选择企业要求申报批次"
-                                            style={{ width: "200px" }}
-                                            value={this.state.declarationBatch}
-                                            onChange={(e) => {
-                                                this.setState({ declarationBatch: e });
-                                            }}
-                                        >
-                                            <Select.Option value={1}>
-                                                第一批
-                                            </Select.Option>
-                                            <Select.Option value={2}>
-                                                第二批
-                                            </Select.Option>
-                                            <Select.Option value={3}>
-                                                第三批
-                                            </Select.Option>
-                                            <Select.Option value={4}>
-                                                第四批
-                                            </Select.Option>
-                                        </Select>}
+                                        ) :
+                                            <Select
+                                                placeholder="请选择企业要求申报批次"
+                                                style={{ width: "200px" }}
+                                                value={this.state.declarationBatch}
+                                                onChange={(e) => {
+                                                    this.setState({ declarationBatch: e });
+                                                }}
+                                            >
+                                                <Select.Option value={1}>
+                                                    第一批
+                                                </Select.Option>
+                                                <Select.Option value={2}>
+                                                    第二批
+                                                </Select.Option>
+                                                <Select.Option value={3}>
+                                                    第三批
+                                                </Select.Option>
+                                                <Select.Option value={4}>
+                                                    第四批
+                                                </Select.Option>
+                                            </Select>}
                                         <span className="mandatory">*</span>
                                     </FormItem>
                                 </div> : null

+ 3 - 2
js/component/manageCenter/financialManage/distribute/projectvip.jsx

@@ -9,6 +9,7 @@ import { ChooseList } from "../../order/orderNew/chooseList"
 import ReactToPrint from "react-to-print";
 import OrderItemStatus from "../../../common/orderItemStatus";
 import ShowModalDiv from "@/showModal.jsx";
+import VipLogs from "../../../common/logPopup/viplogs";//会员日志
 const { TabPane } = Tabs;
 
 //财务专员会员项目审核
@@ -202,7 +203,6 @@ const ProjectVip = React.createClass({
           dataIndex: "caozuo",
           key: "caouzo",
           className: "title-table",
-          width: 150,
           render: (text, recard) => {
             return (
               <div>
@@ -222,7 +222,7 @@ const ProjectVip = React.createClass({
                   recard.status == 1 &&
                   <Button
                     type="danger"
-                    style={{ marginLeft: "5px", }}
+                    style={{ marginLeft: 10, }}
                     onClick={(e) => {
                       e.stopPropagation(),
                         this.checkRemark(recard, 0);
@@ -231,6 +231,7 @@ const ProjectVip = React.createClass({
                     驳回
                   </Button>
                 }
+                <VipLogs id={recard.id} />
               </div>
             );
           },

+ 14 - 0
js/component/manageCenter/financialManage/distribute/projectvipall.jsx

@@ -7,6 +7,7 @@ import { ChooseList } from "../../order/orderNew/chooseList"
 import ReactToPrint from "react-to-print";
 import OrderItemStatus from "../../../common/orderItemStatus";
 import ShowModalDiv from "@/showModal.jsx";
+import VipLogs from "../../../common/logPopup/viplogs";
 const { TabPane } = Tabs;
 
 
@@ -196,6 +197,19 @@ const ProjectVipAll = React.createClass({
             );
           }
         },
+        {
+          title: "操作",
+          dataIndex: "caozuo",
+          key: "caouzo",
+          className: "title-table",
+          render: (text, recard) => {
+            return (
+              <div>
+                <VipLogs id={recard.id} />
+              </div>
+            );
+          },
+        },
       ],
       dataSource: [],
       fjlist: [],// 营销员列表

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

@@ -403,7 +403,7 @@ const NewService = Form.create()(
                   title={text}
                 >
                   <div>
-                    {text && text.length > 15 ? text.substr(0, 15) + "…" : text}
+                    {text && text.length > 16 ? text.substr(0, 16) + "…" : text}
                   </div>
                 </Tooltip>
               )
@@ -608,11 +608,13 @@ const NewService = Form.create()(
             title: "项目数量",
             dataIndex: "commodityQuantity",
             key: "commodityQuantity",
+            width: 50,
           },
           {
             title: "金额(万元)",
             dataIndex: "commodityPrice",
             key: "commodityPrice",
+            width: 75,
             render: (text, record) => {
               if (this.props.isZxs) {
                 return <span>***</span>;
@@ -627,6 +629,7 @@ const NewService = Form.create()(
             title: "主要项目",
             dataIndex: "main",
             key: "main",
+            width: 50,
             render: (text) => {
               return text ? "是" : "否";
             },
@@ -640,8 +643,17 @@ const NewService = Form.create()(
             title: "项目说明",
             dataIndex: "taskComment",
             key: "taskComment",
+            width: 250,
             render: (text) => {
-              return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
+              return (
+                <Tooltip
+                  title={text}
+                >
+                  <div>
+                    {text && text.length > 18 ? text.substr(0, 18) + "…" : text}
+                  </div>
+                </Tooltip>
+              )
             },
           },
         ],

+ 4 - 3
js/component/manageCenter/order/orderNew/approvedvipproject.jsx

@@ -7,6 +7,7 @@ import { ChooseList } from "../../order/orderNew/chooseList"
 import ReactToPrint from "react-to-print";
 import OrderItemStatus from "../../../common/orderItemStatus";
 import ShowModalDiv from "@/showModal.jsx";
+import VipLogs from "../../../common/logPopup/viplogs";//会员日志
 const { TabPane } = Tabs;
 
 //总裁特批会员项目
@@ -200,7 +201,6 @@ const ApprovedVipProject = React.createClass({
           dataIndex: "caozuo",
           key: "caouzo",
           className: "title-table",
-          width: 150,
           render: (text, recard) => {
             return (
               <div>
@@ -220,7 +220,7 @@ const ApprovedVipProject = React.createClass({
                   recard.status == 2 &&
                   <Button
                     type="danger"
-                    style={{ marginLeft: "5px", }}
+                    style={{ marginLeft: 10, }}
                     onClick={(e) => {
                       e.stopPropagation(),
                         this.checkRemark(recard, 0);
@@ -229,6 +229,7 @@ const ApprovedVipProject = React.createClass({
                     驳回
                   </Button>
                 }
+                <VipLogs id={recard.id} />
               </div>
             );
           },
@@ -551,7 +552,7 @@ const ApprovedVipProject = React.createClass({
       <div className="user-content">
         <ShowModalDiv ShowModal={this.state.showModal} />
         <div className="content-title" style={{ marginBottom: 10 }}>
-          <span style={{ fontWeight: 900, fontSize: 16 }}>会员项目审核</span>
+          <span style={{ fontWeight: 900, fontSize: 16 }}>特批会员项目</span>
         </div>
         <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
           <TabPane tab="更改表格显示数据" key="1">

+ 4 - 3
js/component/manageCenter/order/orderNew/myprojectvip.jsx

@@ -8,6 +8,7 @@ import ReactToPrint from "react-to-print";
 import OrderItemStatus from "../../../common/orderItemStatus";
 import ProjectOperationVip from ".././../../common/projectOperation/vip";
 import ShowModalDiv from "@/showModal.jsx";
+import VipLogs from "../../../common/logPopup/viplogs";//会员日志
 const { TabPane } = Tabs;
 
 //我的会员项目列表
@@ -185,10 +186,9 @@ const MyProjectVip = React.createClass({
           dataIndex: "status",
           key: "status",
           className: "title-table",
-          width: 80,
           render: (text) => {
             return (
-              <div style={{ color: text == 4 && "red" }}>
+              <div style={{ maxWidth: 115, color: text == 4 && "red" }}>
                 {["", "财务审核", "特批审核", "通过", "驳回"][text]}
               </div>
             );
@@ -199,13 +199,13 @@ const MyProjectVip = React.createClass({
           dataIndex: "caozuo",
           key: "caouzo",
           className: "title-table",
-          width: 150,
           render: (text, recard) => {
             return (
               <div>
                 {
                   recard.status == 4 &&
                   <Button
+                    style={{ marginLeft: 10 }}
                     type="primary"
                     onClick={() => {
                       this.setState({
@@ -217,6 +217,7 @@ const MyProjectVip = React.createClass({
                     重新提交
                   </Button>
                 }
+                <VipLogs id={recard.id} />
               </div>
             );
           },