HW 3 years ago
parent
commit
ff2ea9dc8a
23 changed files with 79 additions and 50 deletions
  1. 6 0
      js/component/dataDic.js
  2. 31 7
      js/component/manageCenter/customer/NEW/intentionCustomer/channel.jsx
  3. 11 7
      js/component/manageCenter/customer/NEW/intentionCustomer/duplicateData.jsx
  4. 1 1
      js/component/manageCenter/customer/content.jsx
  5. 1 1
      js/component/manageCenter/financialManage/bonus/jsBonus11.jsx
  6. 0 1
      js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx
  7. 0 1
      js/component/manageCenter/financialManage/distribute/huiKuan.jsx
  8. 0 1
      js/component/manageCenter/financialManage/distribute/inSpecial.jsx
  9. 0 1
      js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx
  10. 0 1
      js/component/manageCenter/financialManage/distribute/invoiceApplyListQuery.jsx
  11. 0 1
      js/component/manageCenter/financialManage/distribute/invoiceApplyListWai.jsx
  12. 0 1
      js/component/manageCenter/financialManage/distribute/kaiPiaoModal.jsx
  13. 0 1
      js/component/manageCenter/financialManage/distribute/outInvoiceQuery.jsx
  14. 0 1
      js/component/manageCenter/financialManage/distribute/outSpecial.jsx
  15. 0 1
      js/component/manageCenter/financialManage/distribute/outsourcingPaiDan.jsx
  16. 0 1
      js/component/manageCenter/financialManage/distribute/shouKuanAll.jsx
  17. 0 1
      js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx
  18. 3 3
      js/component/manageCenter/operate/personnel/personnelAll.jsx
  19. 0 3
      js/component/manageCenter/order/orderNew/costAuditList/detailsModal/projectOverview.js
  20. 3 0
      js/component/manageCenter/project/task/myTask.jsx
  21. 2 3
      js/component/manageCenter/project/task/myTaskCount.jsx
  22. 20 12
      js/component/tools.js
  23. 1 1
      package.json

+ 6 - 0
js/component/dataDic.js

@@ -1535,26 +1535,32 @@ module.exports = {
     {
       value: "0",
       key: "未分配",
+      color:'#ff5500'
     },
     {
       value: "1",
       key: "已分配",
+      color:'#87d068'
     },
     {
       value: "2",
       key: "已存在私有",
+      color:'#108ee9'
     },
     {
       value: "3",
       key: "已存在公共",
+      color:'#63aade'
     },
     {
       value: "4",
       key: "已存在签单",
+      color:'#316388'
     },
     {
       value: "5",
       key: "回退",
+      color:'#f00'
     },
   ],
   //账户状态

+ 31 - 7
js/component/manageCenter/customer/NEW/intentionCustomer/channel.jsx

@@ -9,8 +9,10 @@ import {
     Select,
     Spin,
     Table,
-    Tabs, Tooltip,
-    Upload
+    Tabs,
+    Tooltip,
+    Upload,
+    Modal
 } from "antd";
 import {ChooseList} from "../../../order/orderNew/chooseList";
 import $ from "jquery/src/ajax";
@@ -29,6 +31,7 @@ import IntentionDetail from "./intentionDetail/intentionDetail";
 import TransferRecords from './transferRecords';
 import DuplicateData from './duplicateData';
 import OperationTips from './operationTips';
+import ShowModalDiv from "@/showModal.jsx";
 
 const {TabPane} = Tabs;
 const { RangePicker } = DatePicker;
@@ -45,7 +48,7 @@ class Channel extends Component{
                     render: (text,record) => {
                         return (
                             <span>
-                                {record.status === 5 ? <div style={{
+                                {record.recovery === 1 ? <div style={{
                                     background:'#ef7207',
                                     color:'#FFF',
                                     padding: '1px 7px',
@@ -99,7 +102,7 @@ class Channel extends Component{
                     dataIndex: "status",
                     key: "status",
                     render: (text) => (
-                        getChannelAllocationStatus(text)
+                        getChannelAllocationStatus(text,true)
                     )
                 },
             ],
@@ -124,7 +127,6 @@ class Channel extends Component{
             selectedRowKeys:[],
             selectedRows:[],
             modalVisible:false,
-            recordt:'',
 
 
             nameSearch:'',
@@ -143,6 +145,7 @@ class Channel extends Component{
                     if (info.file.status === "done") {
                         if (info.file.response && info.file.response.error.length === 0) {
                             if(info.file.response.data.list.length > 0){
+                                message.warning('已成功导入!错误/重复客户无法导入,请查看错误渠道数据!');
                                 this.setState({
                                     duplicateData: [],
                                     duplicateDataVisible: true
@@ -391,7 +394,6 @@ class Channel extends Component{
             "sign=user_channel";
     }
 
-
     changeList(arr) {
         const newArr = [];
         this.state.columns.forEach(item => {
@@ -545,6 +547,11 @@ class Channel extends Component{
     }
 
     changeAssigner(remarks,type,lv) {
+        let arr = this.state.selectedRows.filter(v=>v.status === 1);
+        if(type === 0 && arr.length>0){
+            message.warning('选中的信息中存在“已分配”数据,请取消这些选项后重新提交')
+            return;
+        }
         if(!remarks){
             message.warning(type === 1 ? "请输入转交原因" : type === 2 ? "请输入回收原因" : type === 0 ? "请输入分配原因" : "");
             return;
@@ -554,6 +561,23 @@ class Channel extends Component{
             let oldAid = '';
             for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
                 let rowItem = this.state.selectedRows[idx];
+                if(rowItem.recovery === 1 && type === 2){
+                    let arr = this.state.selectedRows.filter(v => v.recovery === 1)
+                    Modal.info({
+                        title: '以下数据属于回收再分配资源,无法再次回收,请前往列表取消掉标识了“回收”标识的选项',
+                        content: (
+                            <div>
+                                {
+                                    arr.map(i=>(
+                                        <div style={{paddingBottom:'7px'}}>{i.userName}</div>
+                                    ))
+                                }
+                            </div>
+                        ),
+                        onOk() {},
+                    });
+                    return ;
+                }
                 if (rowItem.id) {
                     oldAid = rowItem.aid;
                     changeIds = this.state.selectedRows.length-1 === idx ? changeIds +rowItem.id : changeIds + rowItem.id + ',' ;
@@ -612,7 +636,6 @@ class Channel extends Component{
             onSelect: (recordt, selected, selectedRows) => {
                 this.setState({
                     modalVisible: false,
-                    recordt: recordt.id,
                 });
             },
         };
@@ -625,6 +648,7 @@ class Channel extends Component{
         const hasSelected = this.state.selectedRowKeys.length > 0;
         return (
             <div className="user-content">
+                <ShowModalDiv ShowModal={this.state.showModal} />
                 <div className="content-title">
                     <span>渠道客户</span>
                 </div>

+ 11 - 7
js/component/manageCenter/customer/NEW/intentionCustomer/duplicateData.jsx

@@ -156,13 +156,17 @@ class DuplicateData extends Component{
                             thisdata.locationProvince = diqu;
                             theArr.push(thisdata);
                         }
-                        this.state.pagination.current = data.data.pageNo;
-                        this.state.pagination.total = data.data.totalCount;
-                        this.setState({
-                            pageNo: data.data.pageNo,
-                            dataSource: theArr,
-                            pagination: this.state.pagination,
-                        })
+                        if(data.data.list.length === 0 && pageNo > 1){
+                            this.loadData(pageNo - 1);
+                        }else{
+                            this.state.pagination.current = data.data.pageNo;
+                            this.state.pagination.total = data.data.totalCount;
+                            this.setState({
+                                pageNo: data.data.pageNo,
+                                dataSource: theArr,
+                                pagination: this.state.pagination,
+                            })
+                        }
                     }
                 }.bind(this),
             }).always(

+ 1 - 1
js/component/manageCenter/customer/content.jsx

@@ -344,7 +344,7 @@ class Content extends Component {
                             deliver={0}
                             followUp={true}
                             isGuidanceLv={false}         //是否可查看指导  也用于判断是否为跟进管理页面
-                            isEditGuidanceLv={true}     //是否可以编辑指导
+                            isEditGuidanceLv={false}     //是否可以编辑指导
                             recovery={true}             //是否可以回收
                             detailApi={'/api/admin/customer/findOrganizationCustomerDetail'}
                         />

+ 1 - 1
js/component/manageCenter/financialManage/bonus/jsBonus11.jsx

@@ -4,7 +4,7 @@ import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import '../distribute/public.less';
 import {  Button, Input, Spin, Table,Select, Switch, message, DatePicker,Modal ,Form } from 'antd';
-import {getProjectStatus,getTaskStatus,getBonusState,getLiquidationStatus,getJsyPaymentType} from '@/tools';
+import {getTaskStatus,getBonusState,getLiquidationStatus,getJsyPaymentType} from '@/tools';
 import JsBonuseDetail from './jsBonusDetail';
 import { ChooseList } from "../../order/orderNew/chooseList";
 import {getProjectName} from "../../../tools";

+ 0 - 1
js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx

@@ -29,7 +29,6 @@ import {
   getApproval,
   getNewOrderType,
   getLiquidationStatus,
-  getProjectStatus,
   splitUrl,
   getprovince,
   getRefundStatus,

+ 0 - 1
js/component/manageCenter/financialManage/distribute/huiKuan.jsx

@@ -19,7 +19,6 @@ import {
   Tag
 } from "antd";
 import {
-  getProjectStatus,
   getProvinceA,
   getInvoiceStatus,
   getprovince,

+ 0 - 1
js/component/manageCenter/financialManage/distribute/inSpecial.jsx

@@ -14,7 +14,6 @@ import {
   Tabs, Popconfirm
 } from "antd";
 import {
-  getProjectStatus,
   getProvinceA,
   getInvoiceStatus,
   getprovince,

+ 0 - 1
js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx

@@ -14,7 +14,6 @@ import {
   Tabs
 } from "antd";
 import {
-  getProjectStatus,
   getProvinceA,
   getInvoiceStatus,
   getprovince,

+ 0 - 1
js/component/manageCenter/financialManage/distribute/invoiceApplyListQuery.jsx

@@ -14,7 +14,6 @@ import {
   Tabs
 } from "antd";
 import {
-  getProjectStatus,
   getProvinceA,
   getInvoiceStatus,
   getProcessStatus,

+ 0 - 1
js/component/manageCenter/financialManage/distribute/invoiceApplyListWai.jsx

@@ -14,7 +14,6 @@ import {
   Tabs, Popconfirm
 } from "antd";
 import {
-  getProjectStatus,
   getProvinceA,
   getInvoiceStatus,
   getProcessStatus,

+ 0 - 1
js/component/manageCenter/financialManage/distribute/kaiPiaoModal.jsx

@@ -2,7 +2,6 @@ import React from "react";
 import { Spin, Button, Tabs, Table, message, Modal, Form, Upload } from "antd";
 import $ from "jquery/src/ajax";
 import {
-  getProjectStatus,
   getProvinceA,
   getInvoiceStatus,
   getprovince,

+ 0 - 1
js/component/manageCenter/financialManage/distribute/outInvoiceQuery.jsx

@@ -14,7 +14,6 @@ import {
   Tabs
 } from "antd";
 import {
-  getProjectStatus,
   getApproval,
   getProvinceA,
   getInvoiceStatus,

+ 0 - 1
js/component/manageCenter/financialManage/distribute/outSpecial.jsx

@@ -3,7 +3,6 @@ import $ from "jquery/src/ajax";
 import "./public.less";
 import {Form, Button, Input, Spin, Table, message, Modal, Upload, Tabs, Popconfirm} from "antd";
 import {
-  getProjectStatus,
   getProvinceA,
   getInvoiceStatus,
   getprovince,

+ 0 - 1
js/component/manageCenter/financialManage/distribute/outsourcingPaiDan.jsx

@@ -24,7 +24,6 @@ import {
   getApproval,
   getNewOrderType,
   getLiquidationStatus,
-  getProjectStatus,
   splitUrl,
   getprovince,
   getRefundStatus

+ 0 - 1
js/component/manageCenter/financialManage/distribute/shouKuanAll.jsx

@@ -31,7 +31,6 @@ import {
   getTransactionProject,
   getTaskStatus,
   getNewOrderStatus,
-  getProjectStatus,
   getjiedian,
   splitUrl,
 } from "@/tools";

+ 0 - 1
js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx

@@ -18,7 +18,6 @@ import {
   getProcessStatus,
   getApproval,
   getLiquidationStatus,
-  getProjectStatus,
   getboutique,
   getCuikuan,
 } from "@/tools";

+ 3 - 3
js/component/manageCenter/operate/personnel/personnelAll.jsx

@@ -21,7 +21,7 @@ import {
   getLiquidationStatus,
   getApprovedState,
   splitUrl,
-  getProjectStatus,
+  getProjectName,
   getboutique,
   ShowModal,
 } from "@/tools";
@@ -160,7 +160,7 @@ const PersonnelAll = React.createClass({
           dataIndex: "projectStatus",
           key: "projectStatus",
           render: (text) => {
-            return getProjectStatus(text);
+            return getProjectName(text);
           },
         },
         {
@@ -659,7 +659,7 @@ const PersonnelAll = React.createClass({
             dataIndex: "projectStatus",
             key: "projectStatus",
             render: (text) => {
-              return getProjectStatus(text);
+              return getProjectName(text);
             },
           },
           {

+ 0 - 3
js/component/manageCenter/order/orderNew/costAuditList/detailsModal/projectOverview.js

@@ -22,11 +22,8 @@ import {
     getTaskStatus,
     getLiquidationStatus,
     splitUrl,
-    getProjectStatus,
-    getboutique,
     getprovince,
     ShowModal,
-    getRefundStatus,
 } from '@/tools'
 import { taskStatus, projectStatus, cuiJieDian } from '@/dataDic.js'
 import { areaSelect } from '@/NewDicProvinceList'

+ 3 - 0
js/component/manageCenter/project/task/myTask.jsx

@@ -2338,6 +2338,9 @@ const Task = React.createClass({
                   }
                 } else {
                   message.warning(data.error[0].message);
+                  _this.waiDetail();
+                  _this.thirdTable(_this.state.tid);
+                  _this.getSelectOutsourceLog(_this.state.tid);
                   reject();
                 }
               }.bind(_this)

+ 2 - 3
js/component/manageCenter/project/task/myTaskCount.jsx

@@ -24,8 +24,7 @@ import {
   getTaskStatus,
   getApproval,
   getprovince,
-  getProjectStatus,
-  getProjectName
+  getProjectName,
 } from "@/tools.js";
 import {ChooseList} from "../../order/orderNew/chooseList";
 import PatentSchedule from './patentSchedule';
@@ -317,7 +316,7 @@ const MyTaskCount = Form.create()(
             dataIndex: "projectStatus",
             key: "projectStatus",
             render: text => {
-              return getProjectStatus(text);
+              return getProjectName(text);
             }
           },
           {

+ 20 - 12
js/component/tools.js

@@ -1,4 +1,5 @@
 import { message, Select } from 'antd';
+import { Tag } from 'antd';
 import React from 'react';
 import $ from 'jquery/src/ajax';
 import {
@@ -1095,17 +1096,27 @@ module.exports = {
     }
   },
   //获取渠道分配状态名
-  getChannelAllocationStatus: function (e) {
+  getChannelAllocationStatus: function (e,isTag) {
     if (!isNaN(parseInt(e))) {
       let theType = "";
+      let color = "";
       channelAllocationStatus.map(function (item) {
         if (item.value == e) {
           theType = item.key;
+          color = item.color;
         }
       });
-      return theType;
+      if(isTag){
+        return <Tag color={color}>{theType}</Tag>
+      }else{
+        return theType;
+      }
     }else{
-      return '未知';
+      if(isTag){
+        return <Tag color='#000'>未知</Tag>
+      }else{
+        return '未知';
+      }
     }
   },
 
@@ -1743,16 +1754,13 @@ module.exports = {
   },
   //项目状态
   getProjectStatus: function (e) {
-    if (e || e == 0) {
-      let str = e.toString();
-      let theType = "";
-      projectStatus.map(function (item) {
-        if (item.value == str) {
-          theType = item.key;
-        }
-      });
-      return theType;
+    let arr = projectStatusList.filter(v=>{
+      return v.value === e
+    });
+    if(arr.length){
+      return arr[0].label
     }
+    return '';
   },
   //流程状态
   getProcessStatus: function (e) {

+ 1 - 1
package.json

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