|
|
@@ -104,11 +104,11 @@ Ext.define('saas.view.purchase.b2b.quotationList.DataList', {
|
|
|
columns: [{
|
|
|
text: '供应商名称',
|
|
|
dataIndex: 'vendName',
|
|
|
- width: 175
|
|
|
+ width: 155
|
|
|
}, {
|
|
|
text: '联系电话',
|
|
|
dataIndex: 'tel',
|
|
|
- width: 265
|
|
|
+ width: 130
|
|
|
}, {
|
|
|
text: '替代型号',
|
|
|
dataIndex: 'replaceOrispeccode',
|
|
|
@@ -178,8 +178,22 @@ Ext.define('saas.view.purchase.b2b.quotationList.DataList', {
|
|
|
}
|
|
|
return '<div style="text-align: center;color:#34baf6;">查看报价信息</div>';
|
|
|
}
|
|
|
+ },{
|
|
|
+ width: 110,
|
|
|
+ text: '状态',
|
|
|
+ dataIndex: 'agreed',
|
|
|
+ renderer:function(val, meta, record,x,y,store, view){
|
|
|
+ if((!val||val=='')&&val!=0){
|
|
|
+ //未采纳状态
|
|
|
+ return ''
|
|
|
+ }else if(val==1||val=='1'){
|
|
|
+ return '<div style="text-align: center;color:#2cda2c;">已采纳</div>';
|
|
|
+ }else if(val==0||val=='0'){
|
|
|
+ return '<div style="text-align: center;color:#ff6c00;">已拒绝</div>';
|
|
|
+ }
|
|
|
+ }
|
|
|
}, {
|
|
|
- width: 200,
|
|
|
+ width: 250,
|
|
|
text: '操作',
|
|
|
dataIndex: 'agreed',
|
|
|
renderer:function(val, meta, record,x,y,store, view){
|
|
|
@@ -188,13 +202,16 @@ Ext.define('saas.view.purchase.b2b.quotationList.DataList', {
|
|
|
return '<div style="width:100%;vertical-align: middle; text-align: center;">'+
|
|
|
"<input type='button' value='采纳' name='agree' style='border: 1px solid;color:#34baf6;cursor:pointer;background:#fff;'>"+
|
|
|
"<input type='button' value='拒绝' name='disagree' style='margin:0 0 0 20px;border: 1px solid;color:#ff0000;cursor:pointer;background:#fff;'>"+
|
|
|
+ "<input type='button' value='下单' name='order' style='margin:0 0 0 20px;border: 1px solid;color:#2cda2c;cursor:pointer;background:#fff;'>"+
|
|
|
'</div>';
|
|
|
}else if(val==1||val=='1'){
|
|
|
- return '<div style="color:#34baf6;width:100%;vertical-align: middle; text-align: center;">已采纳</div>'
|
|
|
+ return '<div style="width:100%;vertical-align: middle; text-align: center;">'+
|
|
|
+ "<input type='button' value='下单' name='order' style='border: 1px solid;color:#2cda2c;cursor:pointer;background:#fff;'>"+
|
|
|
+ '</div>';
|
|
|
}else if(val==0||val=='0'){
|
|
|
var refusereason = record.get('refusereason');
|
|
|
if(!refusereason||refusereason==''){
|
|
|
- return '<div style="color:#ff6c00;width:100%;vertical-align: middle; text-align: center;">已拒绝</div>'
|
|
|
+ return '<div style="color:#ff6c00;width:100%;vertical-align: middle; text-align: center;">已拒绝,无拒绝理由</div>'
|
|
|
}else{
|
|
|
return '<div style="width:100%;vertical-align: middle; text-align: center;">'+
|
|
|
"<input type='button' value='查看拒绝理由' name='showRefuse' style='border: 1px solid;color:#ff6c00;cursor:pointer;background:#fff;'></input>"+
|
|
|
@@ -212,6 +229,8 @@ Ext.define('saas.view.purchase.b2b.quotationList.DataList', {
|
|
|
me.checkPrice(0, id);
|
|
|
}else if(name == 'showRefuse') {
|
|
|
me.showRefuse(model.data.refusereason);
|
|
|
+ }else if(name == 'order'){
|
|
|
+ me.order(model.data);
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
@@ -386,6 +405,64 @@ Ext.define('saas.view.purchase.b2b.quotationList.DataList', {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ order:function(data){
|
|
|
+ var me = this;
|
|
|
+ //显示弹窗
|
|
|
+ var win = Ext.create('Ext.window.Window', {
|
|
|
+ renderTo: me.getEl(),
|
|
|
+ cls:'x-window-dbfind',
|
|
|
+ height: 260,
|
|
|
+ width: 450,
|
|
|
+ modal:true,
|
|
|
+ title: '选择分段数量',
|
|
|
+ bodyPadding: 10,
|
|
|
+ constrain: true,
|
|
|
+ closable: true,
|
|
|
+ layout: {
|
|
|
+ type: 'vbox',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ listeners:{
|
|
|
+ beforeshow:function(){
|
|
|
+ this.items.items[0].store.loadData(data.replies)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ items:[{
|
|
|
+ xtype:'grid',
|
|
|
+ frame:true,
|
|
|
+ anchor: '100% 100%',
|
|
|
+ width:206,
|
|
|
+ store:[],
|
|
|
+ height:138,
|
|
|
+ columns: [{
|
|
|
+ text: '分段数量',
|
|
|
+ dataIndex: 'lapQty',
|
|
|
+ width: 110,
|
|
|
+ renderer:function(v,m,rec){
|
|
|
+ return '≥' +v
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '分段价格',
|
|
|
+ dataIndex: 'price',
|
|
|
+ width: 90
|
|
|
+ },{
|
|
|
+ text: '下单数量',
|
|
|
+ dataIndex: 'num',
|
|
|
+ width: 90
|
|
|
+ }]
|
|
|
+ },{
|
|
|
+ margin:'20 0 0 0',
|
|
|
+ xtype:'button',
|
|
|
+ text:'确认',
|
|
|
+ handler:function(b){
|
|
|
+ var refusereason = b.ownerCt.down('[name=refusereason]').value;
|
|
|
+ me.sendMessage(id,status,refusereason);
|
|
|
+ b.ownerCt.ownerCt.close();
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ });
|
|
|
+ win.show();
|
|
|
+ },
|
|
|
|
|
|
/**
|
|
|
* 处理部分字段值
|