Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

chenw 6 years ago
parent
commit
3bab3bb8df

+ 2 - 2
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -37,7 +37,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
 
         addRows = function(id) {
             var grid = Ext.getCmp(id);
-            if(grid.editable) {
+            if(grid.editable && grid.fireEvent('beforeAddRow', grid, 0)) {
                 grid.addDetail(0);
             }
         };
@@ -225,7 +225,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
     addDetail: function(v, d) {
         d = d || {};
         var me = this;
-        if(!me.editable) {
+        if(!me.editable || !me.fireEvent('beforeAddRow', me, v, d)) {
             return;
         }
         var detnoColumn = me.detnoColumn,

+ 2 - 0
frontend/saas-web/app/view/document/uusetting/UUSettingController.js

@@ -69,11 +69,13 @@ Ext.define('saas.view.document.uusetting.UUSettingController', {
         };
         if(kind == 'vendorkind') {
             if(!!record.get('ve_uu')) {
+                saas.util.BaseUtil.showErrorToast('不可重复设置UU');
                 return;
             }
             config.cname = record.get('ve_name');
         }else {
             if(!!record.get('cu_uu')) {
+                saas.util.BaseUtil.showErrorToast('不可重复设置UU');
                 return;
             }
             config.cname = record.get('cu_name');

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

@@ -519,6 +519,7 @@ Ext.define('saas.view.purchase.b2b.quotationList.DataList', {
                     var num = b.ownerCt.down('[name=num]')
                     if(!num.isValid()){
                         saas.util.BaseUtil.showErrorToast('数量校验有误,请修改或重新选择分段');
+                        return false;
                     }
                     var params = {
                         id : row.id ,

+ 11 - 0
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -18,6 +18,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     _auditdateField: 'pu_auditdate',
     _relationColumn: 'pd_puid',
     _readUrl: '/api/purchase/purchase/read',
+    // _readUrl: 'http://10.1.80.36:8560/api/purchase/purchase/read',
     _saveUrl: '/api/purchase/purchase/save',
     _auditUrl: '/api/purchase/purchase/audit',
     _unAuditUrl: '/api/purchase/purchase/unAudit',
@@ -104,6 +105,16 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     });
                     this.dialog.show();
                 }
+            }, {
+                xtype: "textfield",
+                name: "b2bStatus",
+                fieldLabel: "上传状态",
+                columnWidth: 0.25,
+                readOnly: true,
+                bind: {
+                    hidden: '{!enableB2B}'
+                },
+                defaultValue: '待上传'
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",

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

@@ -159,6 +159,9 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
                     width:120,
                     hidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
                     initHidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
+                    renderer: function(v) {
+                        return v ? v : '待上传'
+                    }
                 }, {
                     text: '备注',
                     dataIndex: 'pu_remark',

+ 10 - 0
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -112,6 +112,16 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 fieldLabel: "采购单号",
                 allowBlank: true,
                 columnWidth: 0.25
+            }, {
+                xtype: "textfield",
+                name: "b2bStatus",
+                fieldLabel: "上传状态",
+                columnWidth: 0.25,
+                readOnly: true,
+                bind: {
+                    hidden: '{!enableB2B}'
+                },
+                defaultValue: '待上传'
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",

+ 20 - 0
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -158,6 +158,16 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
                     text: '关联采购单号',
                     dataIndex: 'pi_pucode',
                     width: 150
+                }, {
+                    text: 'B2B上传状态',
+                    dataIndex: 'b2bStatus',
+                    textAlign: 'center',
+                    width:120,
+                    hidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
+                    initHidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
+                    renderer: function(v) {
+                        return v ? v : '待上传'
+                    }
                 }, {
                     text: '备注',
                     dataIndex: 'pi_remark',
@@ -288,6 +298,16 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
                     text: '关联采购单号',
                     dataIndex: 'pi_pucode',
                     width: 150
+                }, {
+                    text: 'B2B上传状态',
+                    dataIndex: 'b2bStatus',
+                    textAlign: 'center',
+                    width:120,
+                    hidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
+                    initHidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
+                    renderer: function(v) {
+                        return v ? v : '待上传'
+                    }
                 }, {
                     text: '备注',
                     dataIndex: 'pd_remark',

+ 10 - 0
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -108,6 +108,16 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 fieldLabel: "采购单号",
                 allowBlank: true,
                 columnWidth: 0.25
+            }, {
+                xtype: "textfield",
+                name: "b2bStatus",
+                fieldLabel: "上传状态",
+                columnWidth: 0.25,
+                readOnly: true,
+                bind: {
+                    hidden: '{!enableB2B}'
+                },
+                defaultValue: '待上传'
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",

+ 20 - 0
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -164,6 +164,16 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
                     text: '关联验收单号',
                     dataIndex: 'pi_iocode',
                     width: 150
+                }, {
+                    text: 'B2B上传状态',
+                    dataIndex: 'b2bStatus',
+                    textAlign: 'center',
+                    width:120,
+                    hidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
+                    initHidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
+                    renderer: function(v) {
+                        return v ? v : '待上传'
+                    }
                 }, {
                     text: '备注',
                     dataIndex: 'pi_remark',
@@ -293,6 +303,16 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
                     text: '关联验收单号',
                     dataIndex: 'pi_iocode',
                     width: 150
+                }, {
+                    text: 'B2B上传状态',
+                    dataIndex: 'b2bStatus',
+                    textAlign: 'center',
+                    width:120,
+                    hidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
+                    initHidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
+                    renderer: function(v) {
+                        return v ? v : '待上传'
+                    }
                 }, {
                     text: '备注',
                     dataIndex: 'pd_remark',

+ 23 - 5
frontend/saas-web/app/view/sale/b2b/QuoteWin.js

@@ -57,17 +57,23 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
                         return false;
                     }
 
+                    let lastQ = 0;
                     for (var x = 0; x < gridData.length; x++) {
-                        var d = gridData[x];
-                        var idx = d.get('no');
+                        let d = gridData[x];
+                        let idx = d.get('no');
                         if (!d.get('lapQty')) {
                             saas.util.BaseUtil.showErrorToast('序号为' + idx + '的行梯度有误');
                             return false;
                         }
+                        if(d.get('lapQty') <= lastQ) {
+                            saas.util.BaseUtil.showErrorToast('序号为' + idx + '的行梯度需要大于上一梯度设置');
+                            return false;
+                        }
                         if(!d.get('price')) {
                             saas.util.BaseUtil.showErrorToast('序号为' + idx + '的行单价有误');
                             return false;
                         }
+                        lastQ = d.get('lapQty');
                     }
 
                     return true;
@@ -124,10 +130,12 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
                             type: 'int'
                         }, {
                             name: 'lapQty',
-                            type: 'int'
+                            type: 'int',
+                            vtype: 'positiveNumber'
                         }, {
                             name: 'price',
-                            type: 'float'
+                            type: 'float',
+                            vtype: 'positiveNumber'
                         }],
                         data: []
                     }),
@@ -155,7 +163,17 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
                         renderer: function (v, m, r) {
                             return saas.util.BaseUtil.numberFormat(v, 4, true);
                         },
-                    }]
+                    }],
+                    listeners: {
+                        beforeaddrow: function(grid, index, data) {
+                            if(grid.store.getCount() < 5) {
+                                return true;
+                            }else {
+                                saas.util.BaseUtil.showErrorToast('最多只能设置5条梯度价格');
+                                return false;
+                            }
+                        }
+                    }
                 }, {
                     xtype: 'textfield',
                     name: 'message',

+ 6 - 6
frontend/saas-web/app/view/sys/guide/FormPanel.js

@@ -57,7 +57,7 @@ Ext.define('saas.view.sys.guide.FormPanel', {
 				'<div class="x-guide-panel" align ="center">',
                     '<div class="x-guide-item" align ="center" >',
 
-                        '<figure style="margin: 0 185px 0 180px;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'baseSet\')">',
+                        '<figure style="margin: 0px;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'baseSet\')">',
                         '<img class="',
                             '<tpl if="!baseSet">x-guide-mask </tpl>',
                             '" src="resources/images/guide/baseSet.png" align ="center" width="135" height="90" alt="基础设置"  >',
@@ -66,7 +66,7 @@ Ext.define('saas.view.sys.guide.FormPanel', {
                         '</figcaption>',
                         '</figure>',
                         
-                        '<figure style="margin:0 185px 0 0;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'warehouse\')">',
+                        '<figure style="margin:0 0 0 185px;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'warehouse\')">',
                         '<img class="',
                         '<tpl if="!warehouse">x-guide-mask </tpl>',
                         '"src="resources/images/guide/warehouse.png" align ="center" width="135" height="90" alt="仓库资料"  >',
@@ -75,7 +75,7 @@ Ext.define('saas.view.sys.guide.FormPanel', {
                         '</figcaption>',
                         '</figure>',
 
-                        '<figure style="margin:0 185px 0 0;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'product\')">',
+                        '<figure style="margin:0 0 0 185px;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'product\')">',
                         '<img class="',
                         '<tpl if="!product">x-guide-mask </tpl>',
                         '"src="resources/images/guide/product.png" align ="center" width="135" height="90" alt="物料资料"  >',
@@ -116,7 +116,7 @@ Ext.define('saas.view.sys.guide.FormPanel', {
                     '</div>',
                     '<div class="x-guide-item" align ="center">',
 
-                        '<figure style="margin: 40px 185px 0 182px;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'customer\')">',
+                        '<figure style="margin: 20px 0 0 0;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'customer\')">',
                         '<img class="',
                         '<tpl if="!customer">x-guide-mask </tpl>',
                         '"src="resources/images/guide/customer.png" align ="center" width="135" height="90" alt="客户资料"  >',
@@ -125,7 +125,7 @@ Ext.define('saas.view.sys.guide.FormPanel', {
                         '</figcaption>',
                         '</figure>',
 
-                        '<figure style="margin: 0px 185px 0 0px;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'vendor\')">',
+                        '<figure style="margin:20px 0 0 185px;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'vendor\')">',
                         '<img class="',
                         '<tpl if="!vendor">x-guide-mask </tpl>',
                         '"src="resources/images/guide/vendor.png" align ="center" width="135" height="90" alt="供应商资料"  >',
@@ -134,7 +134,7 @@ Ext.define('saas.view.sys.guide.FormPanel', {
                         '</figcaption>',
                         '</figure>',
 
-                        '<figure style="margin: 0 185px 0 0px;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'begin\',\'{begin}\')">',
+                        '<figure style="margin:20px 0 0 185px;cursor: pointer;" align="center" class="imghvr-zoom-out" onClick="showInformation(\'begin\',\'{begin}\')">',
                         '<img class="',
                         '<tpl if="!begin">x-guide-mask </tpl>',
                         '" src="resources/images/guide/begin.png" align ="center" width="135" height="90" alt="开始使用"  >',