Browse Source

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

guq 7 years ago
parent
commit
ecef7b4595

+ 18 - 14
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -28,21 +28,25 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var id = viewModel.get(form._idField);
         var code = viewModel.get(form._codeField);
         if(id&&id.value!=0){
-            me.BaseUtil.request({
-                url: form._deleteUrl+id,
-                method: 'POST',
-            })
-            .then(function(localJson) {
-                if(localJson.success){
-                    var mainTab = Ext.getCmp('main-tab-panel');
-                    mainTab.getActiveTab().close();
-                    //解析参数
-                    showToast('删除成功');
+            deleteWarn(form._deleteMsg,function(btn){
+                if(btn == 'yes'){
+                    me.BaseUtil.request({
+                        url: form._deleteUrl+id,
+                        method: 'POST',
+                    })
+                    .then(function(localJson) {
+                        if(localJson.success){
+                            var mainTab = Ext.getCmp('main-tab-panel');
+                            mainTab.getActiveTab().close();
+                            //解析参数
+                            showToast('删除成功');
+                        }
+                    })
+                    .catch(function(res) {
+                        console.error(res);
+                        showToast('删除失败: ' + res.message);
+                    });
                 }
-            })
-            .catch(function(res) {
-                console.error(res);
-                showToast('删除失败: ' + res.message);
             });
         }
     },

+ 5 - 1
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -100,7 +100,11 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 readOnly:true,
                 fieldLabel:'建账日期',
                 format:'Y-m-d H:i:s',
-                value:new Date()
+                listeners:{
+                    beforerender:function(d){
+                        d.setValue(new Date())
+                    }
+                }
             }]
         },
         productbrand:{

+ 1 - 0
frontend/saas-web/app/view/document/product/FormPanel.js

@@ -18,6 +18,7 @@ Ext.define('saas.view.document.product.FormPanel', {
     _openUrl:'/api/document/product/open',
     _closeUrl:'/api/document/product/close',
     _deleteUrl:'/api/document/product/delete/',
+    _deleteMsg:'删除的物料将不能恢复,请确认是否删除?',
     initId:0,
 
     codeInHeader: false,

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

@@ -223,7 +223,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 }
             }, 
             {
-                text : "未税金额", 
+                text : "未税金额", 
                 dataIndex : "pd_taxtotal", 
                 width : 120.0,
                 editor : {

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

@@ -74,7 +74,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         bind: '{pi_vendname}',
-        fieldLabel: '供应商名称'
+        fieldLabel: '供应商名称',
+        allowBlank : false,
     },{
         xtype : "datefield", 
         name : "pi_date", 
@@ -241,8 +242,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                     minValue:0
                 },
                 dataIndex : "pd_orderprice", 
-                width : 120.0, 
-                xtype : "numbercolumn"
+                width : 120.0,
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
             }, 
            {
                 text : "含税金额", 
@@ -270,6 +276,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 dataIndex : "pd_taxrate", 
                 width : 120.0,
                 editor : {
+                    xtype : "numberfield",
                     decimalPrecision: 0,
                     minValue: 0,
                     maxValue: 100

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

@@ -145,7 +145,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '不含税金额',
+            text: '税金额',
             dataIndex: 'pi_nettotal',
             xtype:'numbercolumn',
             width: 120,

+ 24 - 8
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -66,7 +66,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         bind: '{pi_vendname}',
-        fieldLabel: '供应商名称'
+        fieldLabel: '供应商名称',
+        allowBlank : false,
     },{
         xtype : "datefield", 
         name : "pi_date", 
@@ -232,16 +233,32 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 text : "税率", 
                 dataIndex : "pd_taxrate",
                 editor : {
-                    xtype : "numberfield"
-                },   
-                width : 120.0, 
-                xtype : "numbercolumn"
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                }
             },
             {
                 text : "未税金额", 
                 dataIndex : "pd_nettotal", 
-                xtype : "numbercolumn",
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             },
             {
                 text : "采购单明细id", 
@@ -257,7 +274,6 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 text : "采购序号", 
                 dataIndex : "pd_orderdetno", 
                 xtype : "numbercolumn",
-                flex:1,
                 format: '0000',
                 renderer: function(v) {
                     return v ? v : null;

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -21,7 +21,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'ve_id',to:'pi_vendid',ignore:true
+                            from:'id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{

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

@@ -145,7 +145,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '不含税金额',
+            text: '税金额',
             dataIndex: 'pi_nettotal',
             xtype:'numbercolumn',
             width: 120,

+ 1 - 1
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -203,7 +203,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 }
             }, 
             {
-                text : "未税金额", 
+                text : "未税金额", 
                 dataIndex : "sd_nettotal",
                 editor : {
                     xtype : "numberfield",

+ 1 - 1
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -203,7 +203,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 }
             },
             {
-                text : "未税金额", 
+                text : "未税金额", 
                 dataIndex : "pd_nettotal", 
                 editor : {
                     xtype : "numberfield",

+ 1 - 1
frontend/saas-web/app/view/sale/saleIn/QueryPanel.js

@@ -107,7 +107,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '不含税金额',
+            text: '税金额',
             dataIndex: 'pi_nettotal',
             xtype:'numbercolumn',
             width: 120,

+ 1 - 1
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -214,7 +214,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 }
             },
             {
-                text : "未税金额", 
+                text : "未税金额", 
                 dataIndex : "pd_nettotal", 
                 editor : {
                     xtype : "numberfield",

+ 1 - 1
frontend/saas-web/app/view/sale/saleOut/QueryPanel.js

@@ -107,7 +107,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '不含税金额',
+            text: '税金额',
             dataIndex: 'pi_nettotal',
             xtype:'numbercolumn',
             width: 120,

+ 1 - 1
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -145,7 +145,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '不含税金额',
+            text: '税金额',
             dataIndex: 'pi_nettotal',
             xtype:'numbercolumn',
             width: 120,

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -254,7 +254,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 }
             },
             {
-                text : "未税金额", 
+                text : "未税金额", 
                 dataIndex : "pd_nettotal", 
                 editor : {
                     xtype : "numberfield",

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -145,7 +145,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '不含税金额',
+            text: '税金额',
             dataIndex: 'pi_nettotal',
             xtype:'numbercolumn',
             width: 120,

+ 1 - 1
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -256,7 +256,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 }
             },
             {
-                text: "未税金额",
+                text: "未税金额",
                 dataIndex: "pd_nettotal",
                 editor : {
                     xtype : "numberfield",

+ 1 - 1
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -145,7 +145,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '不含税金额',
+            text: '税金额',
             dataIndex: 'pi_nettotal',
             xtype:'numbercolumn',
             width: 120,

+ 11 - 0
frontend/saas-web/overrides/i18n.js

@@ -76,4 +76,15 @@ function warnMsg(msg, fn){
      	icon: Ext.Msg.WARNING,
      	fn: fn
 	});
+}
+
+function deleteWarn(msg, fn){
+	Ext.MessageBox.show({
+     	title: '提示',
+     	msg: msg || '确定要删除当前表单?',
+     	buttons: Ext.Msg.YESNO,
+     	icon: Ext.Msg.WARNING,
+         fn: fn,
+         renderTo: Ext.getCmp('main-tab-panel').getActiveTab().getEl()
+	});
 }