dev01 3 years ago
parent
commit
0f0be56ba8

+ 134 - 127
js/component/manageCenter/customer/publicStatistics/detailedList.jsx

@@ -42,27 +42,27 @@ class DetailedList extends Component {
           dataIndex: "key",
           key: "key",
           width: 45,
-          fixed: 'left'
+          fixed: "left",
         },
         {
           title: "客户名称",
           dataIndex: "nickname",
           key: "nickname",
           width: 80,
-          fixed: 'left',
+          fixed: "left",
           render: (text) => {
             return (
               // <Tooltip title={text}>
-                <div
-                  // style={{
-                  //   width: 80,
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
-                >
-                  {text}
-                </div>
+              <div
+              // style={{
+              //   width: 80,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              >
+                {text}
+              </div>
               // </Tooltip>
             );
           },
@@ -75,16 +75,16 @@ class DetailedList extends Component {
           render: (text) => {
             return (
               // <Tooltip title={text}>
-                <div
-                  // style={{
-                  //   width: 100,
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
-                >
-                  {text}
-                </div>
+              <div
+              // style={{
+              //   width: 100,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              >
+                {text}
+              </div>
               // </Tooltip>
             );
           },
@@ -97,16 +97,16 @@ class DetailedList extends Component {
           render: (text) => {
             return (
               // <Tooltip title={text}>
-                <div
+              <div
               //     style={{
               //       width: 100,
               //       overflow: "hidden",
               //       textOverflow: "ellipsis",
               //       whiteSpace: "nowrap",
               //     }}
-                >
-                  {text}
-                 </div>
+              >
+                {text}
+              </div>
               // </Tooltip>
             );
           },
@@ -138,16 +138,16 @@ class DetailedList extends Component {
           render: (text) => {
             return (
               // <Tooltip title={text}>
-                <div
-                  // style={{
-                  //   width: 120,
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
-                >
-                  {text}
-                </div>
+              <div
+              // style={{
+              //   width: 120,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              >
+                {text}
+              </div>
               // </Tooltip>
             );
           },
@@ -189,7 +189,13 @@ class DetailedList extends Component {
           key: "type",
           width: 70,
           render: (text) =>
-            text === 1 ? "技术公出" : text === 0 ? "业务/行政公出" : "",
+            text === 2
+              ? "行政公出"
+              : text === 1
+              ? "技术公出"
+              : text === 0
+              ? "业务公出"
+              : "",
         },
         {
           title: "公出目标",
@@ -199,13 +205,13 @@ class DetailedList extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 60,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
-                // title={text}
+              // style={{
+              //   width: 60,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              // title={text}
               >
                 {text}
               </div>
@@ -220,13 +226,13 @@ class DetailedList extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 60,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
-                // title={text}
+              // style={{
+              //   width: 60,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              // title={text}
               >
                 {text}
               </div>
@@ -241,13 +247,13 @@ class DetailedList extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 60,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
-                // title={text}
+              // style={{
+              //   width: 60,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              // title={text}
               >
                 {text}
               </div>
@@ -262,13 +268,13 @@ class DetailedList extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 60,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
-                // title={text}
+              // style={{
+              //   width: 60,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              // title={text}
               >
                 {text}
               </div>
@@ -283,13 +289,13 @@ class DetailedList extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 80,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
-                // title={text}
+              // style={{
+              //   width: 80,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              // title={text}
               >
                 {text}
               </div>
@@ -318,20 +324,20 @@ class DetailedList extends Component {
           title: "审核/指导",
           dataIndex: "auditInfo",
           key: "auditInfo",
-          width:200,
+          width: 200,
           render: (text) => {
             return (
               // <Tooltip title={text}>
-                <div
-                  // style={{
-                  //   width: 80,
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
-                >
-                  {text}
-                </div>
+              <div
+              // style={{
+              //   width: 80,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              >
+                {text}
+              </div>
               // </Tooltip>
             );
           },
@@ -452,7 +458,7 @@ class DetailedList extends Component {
   }
 
   changeList(arr) {
-      debugger
+    debugger;
     const newArr = [];
     this.state.columns.forEach((item) => {
       arr.forEach((val) => {
@@ -485,7 +491,7 @@ class DetailedList extends Component {
         uid: this.state.theCustomerTypes,
         status: this.state.status,
         clockIn: this.state.clockIn,
-        publicType:this.state.type
+        publicType: this.state.type,
       },
       success: function (data) {
         ShowModal(this);
@@ -535,7 +541,7 @@ class DetailedList extends Component {
         customer: "",
         theTypes: undefined,
         theTypes1: undefined,
-        type:undefined
+        type: undefined,
       },
       () => {
         this.loadData();
@@ -702,12 +708,12 @@ class DetailedList extends Component {
   }
   exportExec() {
     message.config({
-        duration: 20,
-      });
-      let loading = message.loading("下载中...");
-      this.setState({
-        exportPendingLoading: true,
-      });
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
     let data = {
       releaseStart: this.state.releaseDate[0],
       releaseEnd: this.state.releaseDate[1],
@@ -716,7 +722,7 @@ class DetailedList extends Component {
       uid: this.state.theCustomerTypes,
       status: this.state.status,
       clockIn: this.state.clockIn,
-      publicType:this.state.type
+      publicType: this.state.type,
     };
     for (let i of Object.keys(data)) {
       if (i === "status" || i === "clockIn") {
@@ -729,27 +735,27 @@ class DetailedList extends Component {
     }
     console.log(data);
     $.ajax({
-        method: "get",
-        dataType: "json",
-        crossDomain: false,
-        url: globalConfig.context +
-        "/api/admin/release/publicReleaseDtails/export?",
-        data,
-        success: function (data) {
-          if (data.error.length === 0) {
-            this.download(data.data);
-          } else {
-            message.warning(data.error[0].message);
-          }
-        }.bind(this),
-      }).always(
-        function () {
-          loading();
-          this.setState({
-            exportPendingLoading: false,
-          });
-        }.bind(this)
-      );
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url:
+        globalConfig.context + "/api/admin/release/publicReleaseDtails/export?",
+      data,
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
     // window.location.href =
     //   globalConfig.context +
     //   "/api/admin/release/publicReleaseDtails/export?" +
@@ -854,18 +860,19 @@ class DetailedList extends Component {
                     </Select>
                   </span>
                   <span style={{ marginRight: "10px" }}>
-                  <Select
-                    placeholder="请选择公出类型"
-                    style={{ width: 200, marginLeft: 10 }}
-                    value={this.state.type}
-                    onChange={(e) => {
-                      this.setState({ type: e });
-                    }}
-                  >
-                    <Select.Option value={0}>营销打卡</Select.Option>
-                    <Select.Option value={1}>技术打卡</Select.Option>
-                  </Select>
-                </span>
+                    <Select
+                      placeholder="请选择公出类型"
+                      style={{ width: 200, marginLeft: 10 }}
+                      value={this.state.type}
+                      onChange={(e) => {
+                        this.setState({ type: e });
+                      }}
+                    >
+                      <Select.Option value={0}>业务打卡</Select.Option>
+                      <Select.Option value={1}>技术打卡</Select.Option>
+                      <Select.Option value={2}>行政打卡</Select.Option>
+                    </Select>
+                  </span>
                   <span style={{ marginRight: "10px" }}>
                     <AutoComplete
                       className="certain-category-search"
@@ -962,7 +969,7 @@ class DetailedList extends Component {
                 <Table
                   bordered
                   size="middle"
-                  scroll={{ x: '130%', y: 0 }}
+                  scroll={{ x: "130%", y: 0 }}
                   columns={
                     this.state.changeList.length > 0
                       ? this.state.changeList

+ 63 - 54
js/component/manageCenter/customer/publicSummary/index.jsx

@@ -40,14 +40,14 @@ class PublicSummary extends Component {
           dataIndex: "key",
           key: "key",
           width: 45,
-          fixed: 'left'
+          fixed: "left",
         },
         {
           title: "客户名称",
           dataIndex: "nickname",
           key: "nickname",
           width: 80,
-          fixed: 'left',
+          fixed: "left",
           render: (text) => {
             return (
               <div
@@ -131,16 +131,16 @@ class PublicSummary extends Component {
           width: 120,
           render: (text) => {
             return (
-                <div
-                  // style={{
-                  //   width: 120,
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
-                >
-                  {text}
-                </div>
+              <div
+              // style={{
+              //   width: 120,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              >
+                {text}
+              </div>
             );
           },
         },
@@ -181,7 +181,14 @@ class PublicSummary extends Component {
           key: "type",
           width: 70,
           render: (text) =>
-            text === 1 ? "技术公出" : text === 0 ? "业务/行政公出" : "",
+            text === 2
+              ? "行政公出"
+              : text === 1
+              ? "技术公出"
+              : text === 0
+              ? "业务公出"
+              : "",
+          // text === 1 ? "技术公出" : text === 0 ? "业务/行政公出" : "",
         },
         {
           title: "公出目标",
@@ -191,12 +198,12 @@ class PublicSummary extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 60,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
+              // style={{
+              //   width: 60,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
               >
                 {text}
               </div>
@@ -211,13 +218,13 @@ class PublicSummary extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 60,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
-                // title={text}
+              // style={{
+              //   width: 60,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              // title={text}
               >
                 {text}
               </div>
@@ -232,13 +239,13 @@ class PublicSummary extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 60,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
-                // title={text}
+              // style={{
+              //   width: 60,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              // title={text}
               >
                 {text}
               </div>
@@ -253,13 +260,13 @@ class PublicSummary extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 130,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
-                // title={text}
+              // style={{
+              //   width: 130,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              // title={text}
               >
                 {text}
               </div>
@@ -274,13 +281,13 @@ class PublicSummary extends Component {
           render: (text) => {
             return (
               <div
-                // style={{
-                //   width: 120,
-                //   overflow: "hidden",
-                //   textOverflow: "ellipsis",
-                //   whiteSpace: "nowrap",
-                // }}
-                // title={text}
+              // style={{
+              //   width: 120,
+              //   overflow: "hidden",
+              //   textOverflow: "ellipsis",
+              //   whiteSpace: "nowrap",
+              // }}
+              // title={text}
               >
                 {text}
               </div>
@@ -444,7 +451,7 @@ class PublicSummary extends Component {
         status: this.state.status,
         clockIn: this.state.clockIn,
         depId: this.state.depId || undefined,
-        publicType:this.state.type
+        publicType: this.state.type,
       },
       success: function (data) {
         ShowModal(this);
@@ -495,7 +502,7 @@ class PublicSummary extends Component {
         customer: "",
         theTypes: undefined,
         theTypes1: undefined,
-        type:undefined
+        type: undefined,
       },
       () => {
         this.loadData();
@@ -679,7 +686,7 @@ class PublicSummary extends Component {
       status: this.state.status,
       clockIn: this.state.clockIn,
       depId: this.state.depId,
-      publicType:this.state.type
+      publicType: this.state.type,
     };
     for (let i of Object.keys(data)) {
       if (i === "status" || i === "clockIn") {
@@ -696,8 +703,7 @@ class PublicSummary extends Component {
       dataType: "json",
       crossDomain: false,
       url:
-        globalConfig.context +
-        "/api/admin/release/publicReleaseDtails/export",
+        globalConfig.context + "/api/admin/release/publicReleaseDtails/export",
       data,
       success: function (data) {
         if (data.error.length === 0) {
@@ -811,8 +817,11 @@ class PublicSummary extends Component {
                       this.setState({ type: e });
                     }}
                   >
-                    <Select.Option value={0}>营销打卡</Select.Option>
+                    <Select.Option value={0}>业务打卡</Select.Option>
                     <Select.Option value={1}>技术打卡</Select.Option>
+                    <Select.Option value={2}>行政打卡</Select.Option>
+                    {/* <Select.Option value={0}>营销打卡</Select.Option>
+                    <Select.Option value={1}>技术打卡</Select.Option> */}
                   </Select>
                 </span>
                 <span style={{ marginRight: "10px" }}>
@@ -928,7 +937,7 @@ class PublicSummary extends Component {
               <Table
                 bordered
                 size="middle"
-                scroll={{ x: '120%' }}
+                scroll={{ x: "120%" }}
                 columns={
                   this.state.changeList.length > 0
                     ? this.state.changeList

+ 1 - 1
package.json

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