Parcourir la source

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

rainco il y a 7 ans
Parent
commit
646436ac49

+ 22 - 5
frontend/saas-web/app/util/FormUtil.js

@@ -110,7 +110,12 @@ Ext.define('saas.util.FormUtil', {
                             };     
                             formModel.set('detail' + index + '.detailStore', Ext.create('Ext.data.Store', {
                                 model:item.storeModel,
-                                data: []
+                                data: [],
+                                listeners: {
+                                    add: function(store, records, index, eOpts) {
+                                        console.log(index);
+                                    }
+                                }
                             }));
 
                             form.detailCount++;
@@ -181,16 +186,28 @@ Ext.define('saas.util.FormUtil', {
                     var viewModel = form.getViewModel();
                     var detailGrids = form.query('detailGridField');
 
-                    Ext.Array.each(detailGrids, function(grid) {
-                        grid.add10EmptyRow();
-                    });
                     if(code){
                         var o = {};
                         o[form._codeField] = code;
 
-                        form.setFormData({
+                        var formData = {
                             main: o
+                        };
+                        Ext.Array.each(detailGrids, function(grid, index) {
+                            var detno = 0;
+                            var detnoColumn = grid.detnoColumn;
+                            var datas = [];
+                            
+                            Ext.Array.each(new Array(3), function() {
+                                detno += 1;
+                                var data = {};
+                                data[detnoColumn] = detno;
+                                datas.push(data);
+                            })
+                            formData['detail' + index] = datas;
                         });
+
+                        form.setFormData(formData);
                     }
                 }
             }).catch(function() {

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

@@ -104,7 +104,7 @@ Ext.define('saas.view.core.form.FormPanel', {
                     text: '保存',
                     handler: 'onSave',
                     bind: {
-                        disabled: '{!base.valid}'
+                        disabled: '{!base.valid || '+ me._statusCodeField + ' == "AUDITED" || ' + me._statusCodeField + ' == "OPEN"}'
                     }
                 }, {
                     xtype: 'button',

+ 1 - 1
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -227,7 +227,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
             var from = value.from,
             to = value.to;
 
-            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s') + ',' + Ext.Date.format(new Date(to), 'Y-m-d h:i:s');
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
         }else if(xtype == 'combobox' || xtype == 'combo') {
             conditionValue = '\'' + value + '\'';
         }else if(xtype == 'multicombo') {

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

@@ -29,7 +29,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'ft_code',
-            width: 150
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'ft_status',

+ 1 - 1
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -54,7 +54,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'or_code',
-            width: 150
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'or_status',

+ 1 - 1
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -54,7 +54,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'os_code',
-            width: 150
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'os_status',

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

@@ -29,7 +29,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pb_code',
-            width: 120
+            width: 200
         }, {
             text: '状态',
             dataIndex: 'pb_status',

+ 1 - 1
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -42,7 +42,7 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'rb_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'rb_status',

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

@@ -105,7 +105,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',
@@ -139,7 +139,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

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

@@ -140,7 +140,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'sa_code',
-            width: 180
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'sa_status',

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

@@ -79,7 +79,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 180
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -121,7 +121,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

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

@@ -79,7 +79,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 180
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -121,7 +121,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 2 - 2
frontend/saas-web/app/view/stock/make/QueryPanel.js

@@ -113,7 +113,7 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',
@@ -147,7 +147,7 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',