Explorar el Código

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

huangx hace 7 años
padre
commit
ed2b5b5299

+ 2 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java

@@ -137,7 +137,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
         Double or_amount = othreceipts.getOr_amount();
         //收款
         Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
-        Double beginamount = bankinformation.getBk_beginamount();
+        Double beginamount = bankinformation.getBk_beginamount() == null ? new Double(0) : bankinformation.getBk_beginamount();
         Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
         Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
         bankinformation.setBk_thisamount(beginamount + incomme - spending + or_amount);
@@ -234,7 +234,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
         Double or_amount = othreceipts.getOr_amount();
         //收款
         Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
-        Double beginamount = bankinformation.getBk_beginamount();
+        Double beginamount = bankinformation.getBk_beginamount() == null ? new Double(0) : bankinformation.getBk_beginamount();
         Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
         Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
         bankinformation.setBk_thisamount(beginamount + incomme - spending - or_amount);

+ 1 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java

@@ -267,7 +267,7 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
         Double bk_amount = othspendings.getOs_amount();
         //付款方
         Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_id);
-        Double beginamount = bankinformation.getBk_beginamount();
+        Double beginamount = bankinformation.getBk_beginamount() == null ? new Double(0) : bankinformation.getBk_beginamount();
         Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
         Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
         bankinformation.setBk_thisamount(beginamount + incomme - spending + bk_amount);

+ 7 - 1
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/StocktakingServiceImpl.java

@@ -84,9 +84,10 @@ public class StocktakingServiceImpl extends CommonBaseServiceImpl<StockTakingMap
     @Transactional
     public Map<String,Object> stock() {
         Map<String,Object> resultMap = new HashMap();
-
         Long companyId = BaseContextHolder.getCompanyId();
         Long userId = BaseContextHolder.getUserId();
+        String userName = BaseContextHolder.getUserName();
+
         //生成入库单
         ProdInOut prodIn = new ProdInOut();
         String piInno = getMaxnumber(BillCodeSeq.OTHERIN);
@@ -101,6 +102,8 @@ public class StocktakingServiceImpl extends CommonBaseServiceImpl<StockTakingMap
         prodIn.setPi_remark("盘盈单");
         prodInOutMapper.insertSelective(prodIn);
         long inid = prodIn.getId();
+        //更新录入人
+        prodInOutMapper.updateCreator(userId,userName,inid);
 
         Double purcprice = null;
 
@@ -142,6 +145,9 @@ public class StocktakingServiceImpl extends CommonBaseServiceImpl<StockTakingMap
         prodOut.setPi_remark("盘亏单");
         prodInOutMapper.insertSelective(prodOut);
         long outid = prodOut.getId();
+        //更新录入人
+        prodInOutMapper.updateCreator(userId,userName,outid);
+
 
         List<StockTaking> outlist  = getMapper().selectStockTakingBycondition("st_num<0",companyId);
         for (int i=0;i<outlist.size();i++) {

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

@@ -285,7 +285,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             text: "本次核销金额",
             xtype: 'numbercolumn',
             dataIndex: "pbd_nowbalance",
-            width: 120,
+            width: 140,
             editor : {
                 xtype : "numberfield",
                 decimalPrecision: 2

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

@@ -288,7 +288,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             text: "本次核销金额",
             xtype: 'numbercolumn',
             dataIndex: "rbd_nowbalance",
-            width:120,
+            width:140,
             editor : {
                 xtype : "numberfield",
                 decimalPrecision: 2

+ 27 - 27
frontend/saas-web/app/view/money/report/CustomerCheck.js

@@ -7,7 +7,7 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
 
     viewName: 'money-report-customercheck',
 
-    groupField: 'pi_custname',
+    // groupField: 'pi_custname',
     listUrl: '/api/money/report/customercheck',
     defaultCondition: null,
     reportTitle: '客户对账单',
@@ -88,19 +88,19 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
             width: 110,
             dataIndex: 'pd_total',
             xtype: 'numbercolumn',
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            }
+            // renderer : function(v) {
+            //     var arr = (v + '.').split('.');
+            //     var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
+            //     var format = '0,000.' + xr.join();
+            //     return Ext.util.Format.number(v, format);
+            // }
         }, {
             text: '不含税单价',
             width: 110,
@@ -112,19 +112,19 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
             xtype: 'numbercolumn',
             dataIndex: 'pd_nettotal',
             xtype: 'numbercolumn',
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            }
+            // renderer : function(v) {
+            //     var arr = (v + '.').split('.');
+            //     var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
+            //     var format = '0,000.' + xr.join();
+            //     return Ext.util.Format.number(v, format);
+            // }
         }, {
             text: '备注',
             dataIndex: 'pd_remark',

+ 26 - 26
frontend/saas-web/app/view/money/report/VendorCheck.js

@@ -79,19 +79,19 @@ Ext.define('saas.view.money.report.VendorCheck', {
             dataIndex: 'qty',
             xtype: 'numbercolumn',
             width: 110,
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-	            var format = '0.' + 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 > 3 ? 3 : arr[1].length)).fill('0');
-	            var format = '0.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            }
+            // renderer : function(v) {
+            //     var arr = (v + '.').split('.');
+            //     var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+	         //    var format = '0.' + 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 > 3 ? 3 : arr[1].length)).fill('0');
+	         //    var format = '0.' + xr.join();
+            //     return Ext.util.Format.number(v, format);
+            // }
         }, {
             text: '单价',
             dataIndex: 'pd_orderprice',
@@ -108,19 +108,19 @@ Ext.define('saas.view.money.report.VendorCheck', {
             dataIndex: 'pd_total',
             xtype: 'numbercolumn',
             width: 110,
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            }
+            // renderer : function(v) {
+            //     var arr = (v + '.').split('.');
+            //     var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
+            //     var format = '0,000.' + xr.join();
+            //     return Ext.util.Format.number(v, format);
+            // }
         }, {
             text: '不含税单价',
             dataIndex: 'pd_netprice',

+ 54 - 26
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -14,7 +14,8 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     requires: [
         'Ext.Action',
         'Ext.grid.plugin.CellEditing',
-        'Ext.selection.CellModel'
+        'Ext.selection.CellModel',
+        'Ext.grid.plugin.Exporter'
     ],
     plugins: {
         cellediting: {
@@ -24,7 +25,8 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
                 //     context.column.fireEvent('edit', context.value);
                 // }
             }
-        }
+        },
+        gridexporter: true
     },
     tbar: [{
         xtype: 'hidden',
@@ -53,25 +55,9 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         storeUrl:'/api/document/producttype/getCombo',
         name : "pr_kind",
         bind:'{pr_kind}', 
-        emptyText : "类型", 
-        allowBlank : false, 
-        addHandler:function(b){
-            var document = Ext.create('saas.view.document.kind.Kind',{});
-            var form = this.ownerCmp.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增物料类型'
-                },
-                dataKind:'productkind',
-                belong:document.etc['productkind'],
-                _parent:form,
-                _combo:this.ownerCmp,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        },
+        emptyText : "类型",
+        hiddenBtn:true, 
+        allowBlank : false,
         width:150
     },{
         xtype: 'hidden',
@@ -118,7 +104,8 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         text:'导出',
         listeners: {
             click:function(b){
-             
+                var me = this.ownerCt.ownerCt;
+                me.onExport(me)
             }
         }
     },{
@@ -281,9 +268,15 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
                         if (Ext.isEmpty(condition)) {
                             condition = "";
                         }
+                        // Ext.apply(store.proxy.extraParams, {
+                        //     number: op._page,
+                        //     size: store.pageSize,
+                        //     condition: JSON.stringify(condition)
+                        // });
                         Ext.apply(store.proxy.extraParams, {
-                            number: op._page,
-                            size: store.pageSize,
+                            number: store.exportNumber?store.exportNumber:op._page,
+                            size: store.exportPageSize?store.exportPageSize:store.pageSize,
+                            mode:'MAIN',
                             condition: JSON.stringify(condition)
                         });
                     }
@@ -515,6 +508,41 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         });
         return dirtyData;
     },
-
-
+    onImport:function(me){
+        console.log("导入");
+    },
+    onExport: function (me) {
+        // var grid = me.ownerCt.ownerCmp.ownerCt.ownerCt;
+        var grid = me;
+        //导出接口权限设置
+        var _url = grid.dataUrl.substring(0,grid.dataUrl.length-1);
+        var lastIndex = _url.lastIndexOf('/');
+        var caller = _url.substring(lastIndex);
+        var url = '/api/commons'+caller+'/export';
+        saas.util.BaseUtil.request({
+            url: url,
+            params: '',
+            method: 'GET',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                grid.store.exportPageSize = 5000;
+                grid.store.exportNumber = 1;
+                grid.store.load(function(records, operation, success) {
+                    grid.saveDocumentAs({
+                        type: 'xlsx',
+                        title:  '盘点单列表',
+                        fileName: '盘点单列表.xlsx'
+                    });
+                    grid.store.exportPageSize = null;
+                    grid.store.exportNumber = null;
+                    grid.store.load(function(records, operation, success) {
+                    });
+                });
+            }
+        })
+        .catch(function(res) {
+            saas.util.BaseUtil.showErrorToast('导出失败: ' + res.message);
+        });
+    }
 });

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

@@ -95,7 +95,9 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         form = me.getView(),
         viewModel = me.getViewModel(),
         store = viewModel.get('detail0').detailStore,
-        loadData = new Array();;
+        type = viewModel.get('ma_type'),
+        loadData = new Array();
+
         //请求bom资料
         saas.util.BaseUtil.request({
             url: form._getBomUrl+v,
@@ -117,7 +119,8 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         mm_remark:item.bd_remark,                        
                         mm_whid:item.productDTO.pr_whid,                        
                         mm_whcode:item.productDTO.pr_whcode,
-                        mm_whname:item.productDTO.pr_whname
+                        mm_whname:item.productDTO.pr_whname,
+                        mm_price:type=='拆件'?item.productDTO.pr_purcprice:null
                     })                
                 });
                 store.loadData(loadData);