Browse Source

商机报价信息查看

zhuth 7 years ago
parent
commit
16a8d28421
1 changed files with 14 additions and 4 deletions
  1. 14 4
      frontend/saas-web/app/view/sale/business/Business.js

+ 14 - 4
frontend/saas-web/app/view/sale/business/Business.js

@@ -151,9 +151,15 @@ Ext.define('saas.view.sale.business.Business', {
                                     beforeshow: function updateTipBody(tip) {
                                         var dg = Ext.getCmp('grid-'+id);
                                         var record = grid.focusRecord;
-                                        var replies = record.data.qutations.replies;
-                                        dg.store.loadData(replies);
-                                        dg.show();
+                                        if(record.data.qutations.agreed) {
+                                            this.setHtml(null);
+                                            var replies = record.data.qutations.replies;
+                                            dg.store.loadData(replies);
+                                            dg.show();
+                                        }else {
+                                            dg.hide();
+                                            this.setHtml(record.data.qutations.refusereason || '无');
+                                        }
                                     }
                                 },
                                 items : [Ext.create('Ext.grid.Panel', {
@@ -174,7 +180,11 @@ Ext.define('saas.view.sale.business.Business', {
                                 })]
                             });
                         }
-                        return '<div style="text-align: center;color:#34baf6;">查看报价信息</div>';
+                        if(record.data.qutations.agreed) {
+                            return '<div style="text-align: center;color: green;">查看报价信息</div>';
+                        }else {
+                            return '<div style="text-align: center;color:#ff6c00;">查看拒绝理由</div>';
+                        }
                     },
                     listeners: {
                         click: function(tableView, td, rowIdx, colIdx, e, model, tr) {