Browse Source

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

hy 7 years ago
parent
commit
0ae4a1c425

+ 8 - 2
frontend/saas-web/Readme.md

@@ -92,12 +92,14 @@ viewModel: view.core.form.FormPanelModel
 | storeModel | grid model | √ | "saas.model.purchase.purchasedetail" |
 | detnoColumn | 序号列,配置该项后无需再columns定义序号列 | √ | "pud_detno" |
 | deleteDetailUrl | 删除明细接口 | √ | "/api/purchase/purchase/deleteItem" |
+| allowEmpty | 是否允许从表数据为空,为真时表单校验不会校验从表非dirty数据,无数据时也可以保存 | x | false |
+| showCount | 是否显示合计栏 | x | true |
 | columns[i].ignore | 是否忽略,为真时在调用保存方法时不会取到该列值 | x | true |
 | columns[i].allowBlank | 是否必填列 | x | true |
 | columns[i].isValid | 自定义校验规则,传入value,返回boolean | x | function(v) { return v > 10; } |
 | columns[i].defaultValue | 默认值,只对设置了dataIndex的column生效 | x | 40 |
 - 需要根据columns在models文件夹下添加storeModel对应的Model
-- allowBlan和isValid的校验只会校验dirty数据
+
 ---
 
 ## 查询列表配置
@@ -161,11 +163,15 @@ deleteDetailUrl 配置调整 formpanel.form->formpanel.detailGridField
 
 - 2018-10-31 11:50:22
 
-从表必填配置说明allowBlamk、isValid
+从表必填配置说明allowEmpty、isValid
 
 - 2018-10-31 18:00:55
 
 从表默认值配置说明
 
+- 2018-11-1 17:52:58
+
+从表显示合计栏配置说明
+
 
 

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

@@ -28,6 +28,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
     configUrl: '',
     editable: true,
     allowEmpty: false, // 校验时只校验dirty数据
+    showCount: true, // 显示合计栏
 
     initComponent: function() {
         var me = this;
@@ -110,6 +111,8 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         var me = this,
         columns = me.columns,
         detnoField = me.detnoColumn,
+        showCount = me.showCount,
+
         indexColumn = {
             text : "序号", 
             dataIndex : detnoField, 
@@ -118,12 +121,8 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
             align : 'center',
             format:'0',
             allowBlank: true,
-            summaryType: 'count',
             locked:true,
             lockable: false,
-            summaryRenderer: function(value, summaryData, dataIndex) {
-                return Ext.String.format('合计', value);
-            },
             renderer: function(value, a, record, index) {
                 return '<div class="text">' + value + '</div>' +
                 '<div class="icons" style="height: 19px; display: none;">' + 
@@ -133,6 +132,15 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
             },
         };
 
+        if(showCount) {
+            Ext.apply(indexColumn, {
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计', value);
+                },
+            });
+        }
+
         if (detnoField) {
             Ext.apply(me, { columns: [indexColumn].concat(columns) });
         }

+ 3 - 1
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -55,7 +55,9 @@ Ext.define('saas.view.document.bom.FormPanel', {
         name : "updateTime", 
         fieldLabel : "更新时间"
     }, {
-        xtype : "detailGridField", 
+        xtype : "detailGridField",
+        detnoColumn: 'bd_detno',
+        showCount: false,
         storeModel:'saas.model.document.bomdetail',
         deleteDetailUrl:'/api/document/bom/deleteDetail/',
         columns : [

+ 5 - 1
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -113,7 +113,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         xtype : "numberfield", 
         name : "cu_taxrate", 
         fieldLabel : "税率", 
-        allowBlank : true, 
+        allowBlank : false, 
         columnWidth : 0.25   
     },{
         // xtype : "numberfield", 
@@ -139,6 +139,8 @@ Ext.define('saas.view.document.customer.FormPanel', {
         height: 169,
         xtype : "detailGridField", 
         storeModel:'saas.model.document.customercontact',
+        detnoColumn: 'cc_detno',
+        showCount: false,
         deleteDetailUrl:'/api/document/customer/deletecontact/',
         columns : [
             {
@@ -227,6 +229,8 @@ Ext.define('saas.view.document.customer.FormPanel', {
         height: 169,
         xtype : "detailGridField", 
         storeModel:'saas.model.document.customeraddress',
+        detnoColumn: 'ca_detno',
+        showCount: false,
         deleteDetailUrl:'/api/document/customer/deleteaddress/',
         columns : [
             {

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

@@ -145,7 +145,7 @@ Ext.define('saas.view.document.product.FormPanel', {
         name : "pr_whcode", 
         bind : "{pr_whcode}", 
         fieldLabel : "仓库编号", 
-        allowBlank : true, 
+        allowBlank : false, 
         columnWidth : 0.25, 
     }, {
         xtype : "textfield", 

+ 2 - 0
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -137,6 +137,8 @@ Ext.define('saas.view.document.vendor.FormPanel', {
     }, {
         xtype : "detailGridField", 
         storeModel:'saas.model.document.vendorcontact',
+        detnoColumn: 'vc_detno',
+        showCount: false,
         deleteDetailUrl:'/api/document/vendor/deleteContact/',
         columns : [
             {

+ 2 - 1
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -29,7 +29,8 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
     }, {
         xtype : "datefield", 
         name : "ft_date", 
-        fieldLabel : "单据日期"
+        fieldLabel : "单据日期",
+        defaultValue: new Date()
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 

+ 2 - 1
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -141,7 +141,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             dataIndex: "pbd_slkind",
         }, {
             text: "单据日期",
-            dataIndex: "pbd_sldate"
+            dataIndex: "pbd_sldate",
+            defaultValue: new Date()
         }, {
             text: "单据金额",
             dataIndex: "pbd_amount"

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

@@ -81,7 +81,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         bind : "{pi_date}", 
         fieldLabel : "单据日期", 
         allowBlank : false, 
-        columnWidth : 0.25
+        columnWidth : 0.25,
+        defaultValue: new Date()
     },{
         xtype : "textfield", 
         name : "pi_total", 

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

@@ -73,7 +73,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         bind : "{pi_date}", 
         fieldLabel : "单据日期", 
         allowBlank : false, 
-        columnWidth : 0.25
+        columnWidth : 0.25,
+        defaultValue: new Date()
     },{
         xtype : "textfield", 
         name : "pi_total", 

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

@@ -191,7 +191,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
             {
                 text : "销售单号", 
                 dataIndex : "pd_ordercode", 
-                width : 120.0
+                width : 200.0
             },{
                 text : "销售序号", 
                 dataIndex : "pd_orderdetno", 

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

@@ -91,7 +91,8 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
         bind : "{pi_date}", 
         fieldLabel : "单据日期", 
         allowBlank : false, 
-        columnWidth : 0.25
+        columnWidth : 0.25,
+        defaultValue: new Date()
     }
     // ,{
     //     xtype : "textfield", 

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

@@ -89,7 +89,8 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
         bind : "{pi_date}", 
         fieldLabel : "单据日期", 
         allowBlank : false, 
-        columnWidth : 0.25
+        columnWidth : 0.25,
+        defaultValue: new Date()
     },{
         xtype : "textfield", 
         name : "pi_total", 

+ 2 - 2
frontend/saas-web/resources/json/navigation.json

@@ -70,7 +70,7 @@
     }]
 }, {
     "text": "库存",
-    "iconCls": "x-fa fa-shopping-cart",
+    "iconCls": "x-fa fa-home",
     "items": [{
         "text": "制单",
         "items": [{
@@ -111,7 +111,7 @@
     }]
 }, {
     "text": "资金",
-    "iconCls": "x-fa fa-shopping-cart",
+    "iconCls": "x-fa fa-money",
     "items": [{
         "text": "制单",
         "items": [{