Browse Source

代码提交

hy 7 years ago
parent
commit
43b0bde9e7

+ 5 - 1
frontend/saas-web/app/Application.scss

@@ -612,4 +612,8 @@ div::-webkit-scrollbar-track {
 input::-webkit-input-placeholder {
   /* placeholder颜色  */
   color: #C3C3C3;
-}
+}
+
+.x-quotation-detail{
+  width: 1105px !important;
+}

+ 10 - 0
frontend/saas-web/app/view/document/currencys/DatalistController.js

@@ -22,6 +22,16 @@ Ext.define('saas.view.document.currencys.DatalistController', {
         }
         return columns;
     },
+    onEdit:function(grid,row,col){
+        var dk = grid.ownerCt.ownerCt;
+        var dataKind=dk.getViewModel().getData()['dataKind'].value,
+        rec = grid.getStore().getAt(row);
+        if(rec.get('cr_standard')==1){
+            saas.util.BaseUtil.showErrorToast('本位币汇率无法修改')
+            return false;
+        }
+        this.createDialog(dataKind,rec,dk);
+    },
     onAdd:function(b){
         var form = this.view;
         this.dialog = form.add({

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

@@ -79,7 +79,8 @@ Ext.define('saas.view.main.Navigation', {
     showNavMenu: function (navView, record, navItem, index, e, eOpts) {
         var me = this,
             recData = record.data,
-            menuItems = recData.items || [],
+            d = recData.items || [],
+            menuItems = JSON.parse( JSON.stringify( d ) ),
             itemBox = navItem.getBoundingClientRect(),
             pos = [itemBox.left + itemBox.width, itemBox.top],
             id = recData.id,

+ 3 - 0
frontend/saas-web/app/view/purchase/deviceQuery/DataList.js

@@ -219,6 +219,9 @@ Ext.define('saas.view.purchase.deviceQuery.DataList', {
             var pageSize = Math.floor(gridBodyBoxHeight / 32);
 
             store.setPageSize(pageSize);
+
+            grid.ownerCt.el.dom.style.left = '8px';
+            grid.el.dom.style.padding = '0px'
         },
         itemClick: function(view,record,a,index,c) {
             var classList = c.target.classList.value;

+ 177 - 35
frontend/saas-web/app/view/purchase/quotationList/DataList.js

@@ -15,12 +15,25 @@ Ext.define('saas.view.purchase.quotationList.DataList', {
         ptype: 'menuclipboard'
     },{
         ptype: 'rowwidget',
+        setupRowData: function(record, rowIndex, rowValues) {
+            var me = this.rowExpander;
+            me.rowBodyFeature = this;
+            rowValues.rowBodyCls = me.recordsExpanded[record.internalId] ? '' : me.rowBodyHiddenCls;
+            if(record.get('qutations')==null){
+                this.rowExpander.expanderColumn.setWidth(0)
+            }else{
+                this.rowExpander.expanderColumn.setWidth(40)
+            }
+        },
         widget: {
             frame:true,
+            cls:'x-quotation-detail',
             xtype: 'grid',
+            plugins: [{
+                ptype: 'menuclipboard'
+            }],
             bind: {
-                store: '{record.quotationRspDTOList}',
-                //title: 'Orders for {record.name}'
+                store: '{record.qutations}'
             },
             columns: [{
                 text: '供应商名称',
@@ -44,10 +57,59 @@ Ext.define('saas.view.purchase.quotationList.DataList', {
                 dataIndex: 'taxRate'
             }, {
                 width: 120,
-                text: '分段信息',
-                dataIndex: 'replies'
+                text: '梯度/价格',
+                dataIndex: 'replies',
+                renderer:function(val, meta, record,x,y,store, view){
+                    if(val==null||val==''){
+                        return '<div style="text-align: center;color:#34baf6;">暂无</div>';
+                    }
+                    var id = record.id;
+                    var renderName=this.columns[y].dataIndex;
+                    var grid = view.ownerCt;
+                    var columnId;
+                    Ext.Array.each(grid.columns, function(c, index){
+                        if(c.dataIndex=='replies'){
+                            columnId = c.id
+                        }
+                    });
+                    if(!view.tip || view.tip.createFrom != renderName) {
+                        view.tip = Ext.create('Ext.tip.ToolTip', {
+                            target: view.el,
+                            delegate: '.x-grid-cell-'+columnId,
+                            trackMouse: true,
+                            createFrom:renderName,
+                            renderTo: Ext.getBody(),	
+                            maxWidth :830,
+                            layout:'anchor',
+                            listeners: {								          
+                                beforeshow: function updateTipBody(tip) {
+                                    var dg = Ext.getCmp('grid-'+id);
+                                    dg.store.loadData(val);
+                                    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>';
+                }
             }, {
-                width: 120,
+                width: 200,
                 text: '操作',
                 dataIndex: 'agreed'
             }]
@@ -55,36 +117,97 @@ Ext.define('saas.view.purchase.quotationList.DataList', {
     }],
 
     tbar: [{
-        width: 310,
-        name: 'search',
-        xtype: 'textfield',
-        emptyText : '请输入物料编号/品牌/名称/型号',
-        enableKeyEvents: true,
-        getCondition: function (value) {
-            return ' (pr_code like\'%' + value + '%\' or pr_detail like \'%' + value + '%\' or pr_brand like \'%' + value + '%\' or pr_orispeccode like \'%' + value + '%\') ';
-        },
-        listeners: {
-            keydown: {
-                fn: function(th, e, eOpts) {
-                    if(e.keyCode == 13) {
-                        var grid = th.up('grid');
-                        grid.condition = grid.getConditions();
-                        grid.store.loadPage(1);
+        bodyStyle:'padding:0px 10px 0 0',
+        xtype:'panel',
+        layout:'column',
+        height:75,
+        width:'100%',
+        rbar:{style:'padding:0',items:[{
+            xtype:'button',
+            cls:'x-formpanel-btn-blue',
+            text:'查询',
+            listeners: {
+                click:function(b){
+                    var grid = b.ownerCt.ownerCt;
+                    grid.condition = grid.getConditions();
+                    grid.store.loadPage(1);
+                }
+            }
+        },{
+            style:'text-align: center',
+            xtype:'displayfield',
+            value:'立即询价'
+        }]},
+        items:[{
+            columnWidth:0.33,
+            name: 'search',
+            xtype: 'textfield',
+            emptyText : '请输入供应商名称/物料编号/品牌/名称/型号',
+            enableKeyEvents: true,
+            getCondition: function (value) {
+                return value;
+            },
+            listeners: {
+                keydown: {
+                    fn: function(th, e, eOpts) {
+                        if(e.keyCode == 13) {
+                            var grid = th.up('grid');
+                            grid.condition = grid.getConditions();
+                            grid.store.loadPage(1);
+                        }
                     }
                 }
             }
-        }
-    },{
-        cls:'x-formpanel-btn-blue',
-        xtype:'button',
-        text:'查询',
-        listeners: {
-            click:function(b){
-                var grid = b.ownerCt.ownerCt;
-                grid.condition = grid.getConditions();
-                grid.store.loadPage(1);
+        },{
+            columnWidth:0.33,
+            xtype: 'combobox',
+            name: 'quoted',
+            fieldLabel: '报价状态',
+            allowBlank: true,
+            value:1,
+            editable: false,
+            queryMode: 'local',
+            displayField: 'pi_status',
+            valueField: 'pi_statuscode',
+            store: Ext.create('Ext.data.ArrayStore', {
+                fields: ['pi_statuscode', 'pi_status'],
+                data: [
+                    [1, "已报价"],
+                    [0, "未报价"]
+                ]
+            }),
+            getCondition: function (value) {
+                return null
             }
-        }
+        },{
+            columnWidth:0.33,
+            xtype: 'combobox',
+            name: 'overdue',
+            fieldLabel: '截止状态',
+            allowBlank: true,
+            value:0,
+            editable: false,
+            queryMode: 'local',
+            displayField: 'pi_status',
+            valueField: 'pi_statuscode',
+            store: Ext.create('Ext.data.ArrayStore', {
+                fields: ['pi_statuscode', 'pi_status'],
+                data: [
+                    [1, "已截止"],
+                    [0, "未截止"]
+                ]
+            }),
+            getCondition: function (value) {
+                return null
+            }
+        },{
+            margin:'10px 0 0 0',
+            columnWidth:0.5,
+            xtype: 'condatefield',
+            name: '_date',
+            fieldLabel: '日期',
+            operation: 'between'
+        }]
     }],
 
     columns : [{
@@ -173,13 +296,29 @@ Ext.define('saas.view.purchase.quotationList.DataList', {
                         if (Ext.isEmpty(condition)) {
                             condition = '';
                         }
+                        var date = Ext.ComponentQuery.query('[name=_date]')[0];
+                        var from = date.value.from || '';
+                        if(!Ext.isDate(from)){
+                            from = new Date(from);
+                            from = from.getTime()
+                        }else{
+                            from = date.value.from.getTime()
+                        }
+                        var to = date.value.to || '';
+                        if(!Ext.isDate(to)){
+                            to = new Date(to);
+                            to = to.getTime()
+                        }else{
+                            to = date.value.to.getTime()
+                        }
+                        var quoted = Ext.ComponentQuery.query('[name=quoted]')[0].value;
                         Ext.apply(store.proxy.extraParams, {
-                            keyword:condition,
+                            keyword :condition==''?' ':condition[0].value,
                             pageNumber: op._page,
                             pageSize: store.pageSize,
-                            quoted:1,
-                            fromDate:null,
-                            endDate:null,
+                            quoted:quoted,
+                            fromDate:from,
+                            endDate:to,
                             overdue:0
                         });
                     }
@@ -207,6 +346,9 @@ Ext.define('saas.view.purchase.quotationList.DataList', {
             var pageSize = Math.floor(gridBodyBoxHeight / 32);
 
             store.setPageSize(pageSize);
+
+            grid.ownerCt.el.dom.style.left = '8px';
+            grid.el.dom.style.padding = '0px'
         },
         itemClick: function(view,record,a,index,c) {
         }

+ 3 - 0
frontend/saas-web/app/view/purchase/sendQuotation/DataList.js

@@ -212,6 +212,9 @@ Ext.define('saas.view.purchase.sendQuotation.DataList', {
             var pageSize = Math.floor(gridBodyBoxHeight / 32);
 
             store.setPageSize(pageSize);
+
+            grid.ownerCt.el.dom.style.left = '8px';
+            grid.el.dom.style.padding = '0px'
         },
         itemClick: function(view,record,a,index,c) {
             var classList = c.target.classList.value;

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

@@ -285,6 +285,9 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
             var pageSize = Math.floor(gridBodyBoxHeight / 32);
 
             store.setPageSize(pageSize);
+
+            grid.ownerCt.el.dom.style.left = '8px';
+            grid.el.dom.style.padding = '0px'
         },
     },
 

+ 20 - 0
frontend/saas-web/app/view/sys/baseconfig/FormPanel.js

@@ -70,6 +70,26 @@ Ext.define('saas.view.sys.baseconfig.FormPanel', {
         readOnly:true,
         ignore:true,
         width:500
+    },{
+        bind:'{enableB2B}',
+        xtype: 'combobox',
+        allowBlank: false,
+        value:0,
+        editable: false,
+        queryMode: 'local',
+        displayField: 'pi_status',
+        valueField: 'pi_statuscode',
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['pi_statuscode', 'pi_status'],
+            data: [
+                [1, "是"],
+                [0, "否"]
+            ]
+        }),
+        name : "enableB2B",
+        fieldLabel : "是否开通B2B", 
+        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
+        width:500
     }],
 
     initComponent: function () {

+ 1 - 0
frontend/saas-web/app/view/sys/baseconfig/FormPanelController.js

@@ -61,6 +61,7 @@ Ext.define('saas.view.sys.baseconfig.FormPanelController', {
                                 d[item.code] = item.data;
                             });
                             viewModel.setData(d);
+                            viewModel._parent.setData(d)
                         }
                     }
                 })

+ 3 - 0
frontend/saas-web/app/view/sys/finish/DataList.js

@@ -117,6 +117,9 @@ Ext.define('saas.view.sys.finish.DataList', {
             var pageSize = Math.floor(gridBodyBoxHeight / 32);
 
             store.setPageSize(pageSize);
+
+            grid.ownerCt.el.dom.style.left = '8px';
+            grid.el.dom.style.padding = '0px'
         }
     },
 

+ 3 - 0
frontend/saas-web/app/view/sys/maxnumbers/DataList.js

@@ -219,6 +219,9 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
             var pageSize = Math.floor(gridBodyBoxHeight / 32);
 
             store.setPageSize(pageSize);
+
+            grid.ownerCt.el.dom.style.left = '8px';
+            grid.el.dom.style.padding = '0px'
         },
         itemClick: function(view,record,a,index,c) {
             var classList = c.target.classList.value;

+ 3 - 0
frontend/saas-web/app/view/sys/messagelog/DataList.js

@@ -127,6 +127,9 @@ Ext.define('saas.view.sys.messagelog.DataList', {
             var pageSize = Math.floor(gridBodyBoxHeight / 32);
 
             store.setPageSize(pageSize);
+
+            grid.ownerCt.el.dom.style.left = '8px';
+            grid.el.dom.style.padding = '0px'
         }
     },