Procházet zdrojové kódy

跟进管理列表

mentoswzq před 4 roky
rodič
revize
18664e24ce

+ 40 - 29
js/component/manageCenter/customer/NEW/intentionCustomer/intentionCustomer.jsx

@@ -61,29 +61,15 @@ const IntentionCustomer = Form.create()(
                 (thisdata.province == null ? "" : thisdata.province) +
                 (thisdata.city == null ? "" : "-" + thisdata.city) +
                 (thisdata.area == null ? "" : "-" + thisdata.area);
-              theArr.push({
-                key: i,
-                id: thisdata.uid,
-                aid: thisdata.aid,
-                name: thisdata.name,
-                contacts: thisdata.contacts,
-                contactMobile: thisdata.contactMobile,
-                industry: thisdata.industry,
-                societyTag: thisdata.societyTag,
-                lastFollowTime:
-                  thisdata.lastFollowTime &&
-                  thisdata.lastFollowTime.split(" ")[0],
-                transferTime:
-                  thisdata.transferTime && thisdata.transferTime.split(" ")[0],
-                surplusFollowTime:
-                  thisdata.surplusFollowTime &&
-                  thisdata.surplusFollowTime.split(" ")[0],
-                surplusSignTime:
-                  thisdata.surplusSignTime &&
-                  thisdata.surplusSignTime.split(" ")[0],
-                locationProvince: diqu,
-                level: thisdata.level,
-              });
+              thisdata.key = i;
+              thisdata.id = thisdata.uid;
+              thisdata.lastFollowTime = thisdata.lastFollowTime &&
+                  thisdata.lastFollowTime.split(" ")[0];
+              thisdata.transferTime= thisdata.transferTime && thisdata.transferTime.split(" ")[0];
+              thisdata.surplusFollowTime = thisdata.surplusFollowTime && thisdata.surplusFollowTime.split(" ")[0];
+              thisdata.surplusSignTime = thisdata.surplusSignTime && thisdata.surplusSignTime.split(" ")[0];
+              thisdata.locationProvince = diqu;
+              theArr.push(thisdata);
             }
             this.state.pagination.current = data.data.pageNo;
             this.state.pagination.total = data.data.totalCount;
@@ -254,13 +240,16 @@ const IntentionCustomer = Form.create()(
                   >
                     客户跟进
                   </Button>
-                  <div
+                  {/*指导 0无 1未读*/}
+                  {record.guidance === 1 ? <div
                       onClick={(e)=>{
                         e.stopPropagation();
-                        this.setState({
-                          tabsKey:"4",
-                        },()=>{
-                          this.tableRowClick(record)
+                        this.guidanceRead(record.uid).then(()=>{
+                          this.setState({
+                            tabsKey:"4",
+                          },()=>{
+                            this.tableRowClick(record)
+                          })
                         })
                       }}
                       style={{
@@ -283,7 +272,7 @@ const IntentionCustomer = Form.create()(
                       }}>
                     <div>指导</div>
                     <div>意见</div>
-                  </div>
+                  </div> : <div/>}
                 </div>
               );
             },
@@ -298,6 +287,28 @@ const IntentionCustomer = Form.create()(
       };
     },
 
+    //已读指导记录
+    guidanceRead(id) {
+      return new Promise((resolve,reject)=>{
+        $.ajax({
+          method: "post",
+          dataType: "json",
+          crossDomain: false,
+          url: globalConfig.context + "/api/admin/customer/pushGuidance",
+          data: {
+            uid: id,
+          }
+        }).done(function(data) {
+          if(!data.error.length) {
+            resolve();
+          } else {
+            message.warning(data.error[0].message);
+            reject();
+          };
+        }.bind(this));
+      })
+    },
+
     rankO(rank) {
       let deletedIds;
       for (let idx = 0; idx < this.state.selectedRows.length; idx++) {

+ 12 - 12
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visit.jsx

@@ -110,17 +110,17 @@ const Visit = React.createClass({
 						  }}
 						  onClick={(e)=>{
 							e.stopPropagation();
-							  Modal.info({
-								  title: '指导意见',
-								  content: (
-									  <div style={{
-									  	wordWrap:"break-word"
-									  }}>
-										  {record.guidance}
-									  </div>
-								  ),
-								  onOk() {},
-							  });
+							Modal.info({
+							  title: '指导意见',
+							  content: (
+								  <div style={{
+									  wordWrap:"break-word"
+								  }}>
+									  {record.guidance}
+								  </div>
+							  ),
+							  onOk() {},
+							});
 						  }}>
 							  <span>
 								{record.guidance}
@@ -147,7 +147,7 @@ const Visit = React.createClass({
 		  key: "guidanceTime",
 		  render: (text, record) => {
 			  return (
-				  <span>{text ? text : ''}</span>
+				  <span>{text ? text : ''}</span>
 			  )
 		  }
 		}

+ 1 - 1
js/component/manageCenter/customer/managementFollow/customerFollow/index.jsx

@@ -145,7 +145,7 @@ class CustomerFollow extends Component{
                                     }}
                                     type="primary"
                                 >
-                                    指导
+                                    {this.props.isEditGuidanceLv ? '指导' : '查看指导'}
                                 </Button>
                             </div>
                         );

+ 2 - 2
webpack.config.js

@@ -320,7 +320,7 @@ module.exports = (function () {
     }
 
     //let staticHost = 'http://afts.hnzhiming.com';
-    let staticHost = 'http://172.16.0.253:3000'
+    let staticHost = 'http://172.16.0.253:80'
     // let staticHost = "http://192.168.0.106";
     // let staticHost = "http://192.168.0.103";
     switch (argv.env.deploy) {
@@ -365,7 +365,7 @@ module.exports = (function () {
         devServer: {
             disableHostCheck: true,
             host: '172.16.0.253',
-            port: 3000,
+            port: 80,
             allowedHosts: ['127.0.0.1', '192.168.0.20', '192.168.0.99'],
             headers: {
                 'Access-Control-Allow-Origin': '*',