|
|
@@ -123,67 +123,47 @@ Ext.define('saas.view.sale.b2b.Business', {
|
|
|
text: '发布时间',
|
|
|
xtype: 'datecolumn',
|
|
|
dataIndex: 'startDate',
|
|
|
- format: 'Y-m-d H:i:s'
|
|
|
+ format: 'Y-m-d H:i:s',
|
|
|
+ width: 150
|
|
|
}, {
|
|
|
text: '截止时间',
|
|
|
xtype: 'datecolumn',
|
|
|
- dataIndex: 'endDate'
|
|
|
+ dataIndex: 'endDate',
|
|
|
+ format: 'Y-m-d H:i:s',
|
|
|
+ width: 150
|
|
|
}, {
|
|
|
- text: '操作',
|
|
|
+ text: '报价状态',
|
|
|
dataIndex: 'quoted',
|
|
|
+ textAlign: 'center',
|
|
|
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;
|
|
|
- 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', {
|
|
|
- id: 'grid-'+id,
|
|
|
- frame:true,
|
|
|
- anchor: '100% 100%',
|
|
|
- width:205,
|
|
|
- store:[],
|
|
|
- columns: [{
|
|
|
- text: '分段数量',
|
|
|
- dataIndex: 'lapQty',
|
|
|
- width: 110
|
|
|
- }, {
|
|
|
- text: '分段价格',
|
|
|
- dataIndex: 'price',
|
|
|
- width: 90
|
|
|
- }]
|
|
|
- })]
|
|
|
- });
|
|
|
+ if(val == 0) {
|
|
|
+ return '<div style="text-align: center;color: #35BAF6;">未报价</div>';
|
|
|
+ }else {
|
|
|
+ var qutations = record.data.qutations;
|
|
|
+ if(qutations.agreed == null) {
|
|
|
+ return '<div style="text-align: center;color: #FBBC05;">已报价</div>';
|
|
|
+ }else if(qutations.agreed == 1){
|
|
|
+ return '<div style="text-align: center;color: green;">被采纳</div>';
|
|
|
+ }else if(qutations.agreed == 0) {
|
|
|
+ return '<div style="text-align: center;color:#ff6c00;">被拒绝</div>';
|
|
|
+ }
|
|
|
}
|
|
|
- if(record.data.qutations.agreed) {
|
|
|
- return '<div style="text-align: center;color: green;">查看报价信息</div>';
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '操作',
|
|
|
+ dataIndex: 'quoted',
|
|
|
+ renderer:function(val, meta, record,x,y,store, view){
|
|
|
+ if(val == 0) {
|
|
|
+ return '<div style="text-align: center;color: #35BAF6;cursor: pointer;">点击报价</div>';
|
|
|
}else {
|
|
|
- return '<div style="text-align: center;color:#ff6c00;">查看拒绝理由</div>';
|
|
|
+ var qutations = record.data.qutations;
|
|
|
+ if(qutations.agreed == null) {
|
|
|
+ return '<div style="text-align: center;color: #FBBC05;cursor: pointer;">查看报价信息</div>';
|
|
|
+ }else if(qutations.agreed == 1){
|
|
|
+ return '<div style="text-align: center;color: green;cursor: pointer;">查看报价信息</div>';
|
|
|
+ }else if(qutations.agreed == 0) {
|
|
|
+ return '<div style="text-align: center;color:#ff6c00;">查看报价信息</div>';
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
listeners: {
|
|
|
@@ -191,10 +171,8 @@ Ext.define('saas.view.sale.b2b.Business', {
|
|
|
var dataIndex = this.dataIndex;
|
|
|
var record = tableView.store.getAt(rowIdx);
|
|
|
var value = record.get(dataIndex);
|
|
|
-
|
|
|
- if(value == '0') {
|
|
|
- me.getController().showQuoteWin(record);
|
|
|
- }
|
|
|
+
|
|
|
+ me.getController().showQuoteWin(record, !!value);
|
|
|
},
|
|
|
}
|
|
|
}],
|