Browse Source

B2B对接Bug调整

hy 6 years ago
parent
commit
c69a878b0b

+ 0 - 1
frontend/saas-web/app/view/main/Navigation.js

@@ -189,7 +189,6 @@ Ext.define('saas.view.main.Navigation', {
             config = data.config,
             id = data.id,
             addType = data.addType;
-
         saas.util.BaseUtil.openTab(type == 'add' ? addType : viewType, text, 'maintab-' + type + '-' + id, config);
 
     },

+ 82 - 5
frontend/saas-web/app/view/purchase/b2b/quotationList/DataList.js

@@ -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();
+    },
 
     /**
      * 处理部分字段值

+ 1 - 1
frontend/saas-web/app/view/purchase/b2b/sendQuotation/DataList.js

@@ -55,7 +55,7 @@ Ext.define('saas.view.purchase.b2b.sendQuotation.DataList', {
                 style:'text-align: center;',
                 xtype:'displayfield',
                 ignore: true,
-                value:'<a href=\"javascript:saas.util.BaseUtil.openTab(\'purchase-b2b-quotationList-datalist\',\'询价信息查询\',\'maintab-query-quotationList\')\">询价信息查询</a>'
+                value:'<a href=\"javascript:saas.util.BaseUtil.openTab(\'\',\'询价信息查询\',\'maintab--quotationList\')\">询价信息查询</a>'
             }],
 
             gridConfig: {

+ 3 - 3
frontend/saas-web/app/view/sale/b2b/RecDataList.js

@@ -188,14 +188,14 @@ Ext.define('saas.view.sale.b2b.RecDataList', {
                 searchFilter.endDate = con.value.to;
             }
         }
-        if(ar_customer.value&&ar_customer.value!=""){
-            searchFilter.keyword = ar_customer.value
-        }
         var obj = {
             count:op.config.limit,
             page:op.config.page,
             searchFilter:JSON.stringify(searchFilter)
         };
+        if(ar_customer.value&&ar_customer.value!=""){
+            obj.keyword = ar_customer.value
+        }
 
         return obj;
     }

+ 1 - 6
frontend/saas-web/app/view/sale/b2b/reconciliation/DataList.js

@@ -14,12 +14,7 @@ Ext.define('saas.view.sale.b2b.reconciliation.DataList', {
                 width: 240,
                 name: 'ac_vendname',
                 xtype: 'textfield',
-                emptyText: '请输入客户名称',
-            },{
-                width: 240,
-                name: 'ac_vendcode',
-                xtype: 'textfield',
-                emptyText: '请输入对账编号',
+                emptyText: '输入对账编号或客户名称',
             }, {
                 xtype: 'condatefield',
                 name: 'ac_date',

+ 3 - 0
frontend/saas-web/app/view/sale/b2b/reconciliation/FormPanel.js

@@ -188,5 +188,8 @@ Ext.define('saas.view.sale.b2b.reconciliation.FormPanel', {
         load:function(f){
             this.getViewModel().setData({ac_date:Ext.Date.format(new Date(this.getViewModel().data.beginDate),'Y-m-d') + ' --- ' + Ext.Date.format(new Date(this.getViewModel().data.endDate),'Y-m-d')})
         }
+    },
+    isDirty: function () {
+        return false;
     }
 });

+ 0 - 1
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -286,7 +286,6 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
 
             store.setPageSize(pageSize);
 
-            debugger
             grid.ownerCt.el.dom.style.left = '8px';
             grid.el.dom.style.padding = '0px'
         },