|
|
@@ -33,14 +33,14 @@ Ext.define('saas.view.sale.business.Business', {
|
|
|
queryMode: 'local',
|
|
|
displayField: 'name',
|
|
|
valueField: 'value',
|
|
|
- emptyText :'全部',
|
|
|
+ emptyText :'未报价',
|
|
|
+ value: '0',
|
|
|
editable:false,
|
|
|
labelWidth: 80,
|
|
|
columnWidth: 0.2,
|
|
|
store: Ext.create('Ext.data.ArrayStore', {
|
|
|
fields: ['name', 'value'],
|
|
|
data: [
|
|
|
- ["全部", "all"],
|
|
|
["未报价", "0"],
|
|
|
["已报价", "1"]
|
|
|
]
|
|
|
@@ -131,8 +131,50 @@ Ext.define('saas.view.sale.business.Business', {
|
|
|
}, {
|
|
|
text: '操作',
|
|
|
dataIndex: 'quoted',
|
|
|
- renderer: function(v, m) {
|
|
|
- return v == 1 ? '<a style="color: green; cursor: pointer;">报价中</a>' : '<a style="color: #35BAF6; cursor: pointer;">报价</a>';
|
|
|
+ renderer:function(val, meta, record,x,y,store, view){
|
|
|
+ if(val == 0){
|
|
|
+ return '<a style="color: #35BAF6; cursor: pointer;">点击报价</a>';
|
|
|
+ }
|
|
|
+ var id = record.id;
|
|
|
+ var grid = view.up('grid');
|
|
|
+
|
|
|
+ if(!view.tip) {
|
|
|
+ view.tip = Ext.create('Ext.tip.ToolTip', {
|
|
|
+ hidden: true,
|
|
|
+ target: view.el,
|
|
|
+ delegate: '.x-grid-cell-'+meta.column.id,
|
|
|
+ trackMouse: true,
|
|
|
+ renderTo: Ext.getBody(),
|
|
|
+ maxWidth :830,
|
|
|
+ layout:'anchor',
|
|
|
+ listeners: {
|
|
|
+ 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();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ items : [Ext.create('Ext.grid.Panel', {
|
|
|
+ id: 'grid-'+id,
|
|
|
+ frame:true,
|
|
|
+ anchor: '100% 100%',
|
|
|
+ width:205,
|
|
|
+ store:[],
|
|
|
+ columns: [{
|
|
|
+ text: '分段数量',
|
|
|
+ dataIndex: 'lapQty',
|
|
|
+ width: 110
|
|
|
+ }, {
|
|
|
+ text: '分段价格',
|
|
|
+ dataIndex: 'price',
|
|
|
+ width: 90
|
|
|
+ }]
|
|
|
+ })]
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return '<div style="text-align: center;color:#34baf6;">查看报价信息</div>';
|
|
|
},
|
|
|
listeners: {
|
|
|
click: function(tableView, td, rowIdx, colIdx, e, model, tr) {
|
|
|
@@ -143,9 +185,15 @@ Ext.define('saas.view.sale.business.Business', {
|
|
|
if(value == '0') {
|
|
|
me.getController().showQuoteWin(record);
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }],
|
|
|
+ listeners: {
|
|
|
+ itemmouseenter: function(view, record, item, index, e, eOpts) {
|
|
|
+ var grid = view.up('grid');
|
|
|
+ grid.focusRecord = record;
|
|
|
}
|
|
|
- }]
|
|
|
+ }
|
|
|
},
|
|
|
});
|
|
|
this.callParent(arguments);
|