Ver Fonte

资金模块-调整资金模块选择源单放大镜

huangx há 7 anos atrás
pai
commit
8122f2fbc3

+ 7 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/BankinformationController.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.entities.Bankinformation;
 import com.usoftchina.saas.document.service.BankinformationService;
@@ -38,4 +39,10 @@ public class BankinformationController {
         PageInfo<Bankinformation> bankinformationList = bankinformationService.selectList(page, condition);
         return Result.success(bankinformationList);
     }
+
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<ComboDTO> comboDTOList = bankinformationService.getCombo();
+        return Result.success(comboDTOList);
+    }
 }

+ 3 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BankinformationMapper.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Bankinformation;
 import org.apache.ibatis.annotations.Param;
 
@@ -22,4 +23,6 @@ public interface BankinformationMapper extends CommonBaseMapper<Bankinformation>
     int updateByPrimaryKey(Bankinformation record);
 
     List<Bankinformation> selectBankinformationBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

+ 2 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/BankinformationService.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.entities.Bankinformation;
 import com.usoftchina.saas.document.mapper.BankinformationMapper;
@@ -21,5 +22,5 @@ public interface BankinformationService extends CommonBaseService<Bankinformatio
 
     PageInfo<Bankinformation> selectList(PageRequest page, ListReqDTO condition);
 
-
+    List<ComboDTO> getCombo();
 }

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BankinformationServiceImpl.java

@@ -3,6 +3,7 @@ package com.usoftchina.saas.document.service.impl;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Bankinformation;
@@ -69,4 +70,9 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
         recbalancesList = bankinformationMapper.selectBankinformationBycondition(con, companyId);
         return recbalancesList;
     }
+
+    @Override
+    public List<ComboDTO> getCombo() {
+        return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
 }

+ 3 - 0
applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml

@@ -334,4 +334,7 @@
       </if>
     </where>  order by bk_id
   </select>
+  <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+        SELECT CONCAT(bk_bankcode,' ',bk_bankname) display,bk_bankname value FROM bankinformation WHERE COMPANYID=#{companyId}
+    </select>
 </mapper>

+ 1 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/SubledgerController.java

@@ -20,7 +20,7 @@ public class SubledgerController {
     @Autowired
     private SubledgerService subledgerService;
 
-    @GetMapping("/list")
+    @RequestMapping("/list")
     public Result getListData(PageRequest page, ListReqDTO condition){
         return Result.success(subledgerService.seleteList(page, condition));
     }

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

@@ -89,6 +89,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: "detailGridField",
         storeModel: 'saas.model.money.PayBalance1',
         detnoColumn: 'pd_detno',
+        allowEmpty: true,
         deleteDetailUrl: '/api/money/paybalance/deleteDetail1/',
         columns: [{
             text: 'ID',
@@ -114,30 +115,30 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             text: '资金账户',
             dataIndex: 'pd_bankname',
             editable:false,
-            // xtype : "remotecombo",
-            // storeUrl:'/api/document/bankinformation/getCombo',
-            // name : "bk_bankname",
-            // fieldLabel : "资金账户",
-            // allowBlank : false, //不能为空
-            // columnWidth : 0.25,//布局
-            // hiddenBtn:false,//true 则会关闭新增按钮功能
-            // 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:'bankinformation',
-            //         belong:document.etc['bankinformation'],
-            //         _parent:form,
-            //         _combo:this.ownerCmp,
-            //         record:null,
-            //         session: true
-            //     });
-            //     this.dialog.show();
-            // }
+            xtype : "remotecombo",
+            storeUrl:'/api/document/bankinformation/getCombo',
+            name : "bk_bankname",
+            fieldLabel : "资金账户",
+            allowBlank : false, //不能为空
+            columnWidth : 0.25,//布局
+            hiddenBtn:false,//true 则会关闭新增按钮功能
+            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:'bankinformation',
+                    belong:document.etc['bankinformation'],
+                    _parent:form,
+                    _combo:this.ownerCmp,
+                    record:null,
+                    session: true
+                });
+                this.dialog.show();
+            }
         }, {
             text: "付款金额",
             dataIndex: "pd_amount",
@@ -190,14 +191,15 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             }
         }]
     }, {
-        xtype:'button',
-        text:'选择源单',
-        width:100
-
+        xtype:'dbfindtrigger',
+        columnWidth: 1,
+        fieldLabel:'选择源单',
+        name: 'choseSource'
     },{
         xtype: "detailGridField",
         storeModel: 'saas.model.money.PayBalance2',
         detnoColumn: 'pbd_detno',
+        allowEmpty: true,
         deleteDetailUrl: '/api/money/paybalance/deleteDetail2/',
         columns: [{
             text: 'ID',
@@ -255,7 +257,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             }
         }, {
             text: "已核销金额",
-            dataIndex: "pb_remark",
+            dataIndex: "pb_havebalance",
             // editor : {
             //     xtype : "numberfield",
             //     decimalPrecision: 2
@@ -275,7 +277,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             }
         }, {
             text: "未核销金额",
-            dataIndex: "pb_remark",
+            dataIndex: "pb_pbdamount",
             // editor : {
             //     xtype : "numberfield",
             //     decimalPrecision: 2

+ 68 - 0
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -100,6 +100,74 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
 
                 }
             },
+            'dbfindtrigger[name=choseSource]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/money/subledger/list',
+                        addTitle: '源单资料',
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'pbd_slid'
+                        }, {
+                            from: 'sl_code',
+                            to: 'pbd_slcode'
+                        },{
+                            from: 'sl_orderamount',
+                            to: 'pbd_amount'
+                        },{
+                            from: 'sl_yamount',
+                            to: 'pb_havebalance'
+                        },{
+                            from: 'sl_namount',
+                            to: 'pb_pbdamount'
+                        }],
+                        dbtpls: [{
+                            field: 'sl_code',
+                            width: 100
+                        }],
+                        defaultCondition: "sl_vendtid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0",
+                        dbSearchFields:[{
+                            emptyText:'输入源单编号',
+                            xtype : "textfield",
+                            name : "search",
+                            getCondition: function(v) {
+                                return "(upper(sl_code) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true,
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "源单id",
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
+                        },{
+                            "text": "源单编号",
+                            "flex": 1,
+                            "dataIndex": "sl_code",
+                            "width": 100
+                        }, {
+                            "text": "单据金额",
+                            "flex": 1,
+                            "dataIndex": "sl_orderamount",
+                            "width": 100
+                        }, {
+                            "text": "已核销金额",
+                            "flex": 0,
+                            "dataIndex": "sl_yamount",
+                            "width": 200,
+                            "items": null
+                        }, {
+                            "text": "未核销金额",
+                            "flex": 1,
+                            "dataIndex": "sl_namount",
+                            "width": 100
+                        }]
+                    });
+
+                }
+            }
         });
 
     },

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

@@ -111,10 +111,31 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             hidden: true
         }, {
             text: '资金账户',
-            dataIndex: 'rd_bankname',
-            width : 200.0, 
-            editor: {
-                xtype: 'textfield'
+            dataIndex: 'pd_bankname',
+            editable:false,
+            xtype : "remotecombo",
+            storeUrl:'/api/document/bankinformation/getCombo',
+            name : "bk_bankname",
+            fieldLabel : "资金账户",
+            allowBlank : false, //不能为空
+            columnWidth : 0.25,//布局
+            hiddenBtn:false,//true 则会关闭新增按钮功能
+            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:'bankinformation',
+                    belong:document.etc['bankinformation'],
+                    _parent:form,
+                    _combo:this.ownerCmp,
+                    record:null,
+                    session: true
+                });
+                this.dialog.show();
             }
         }, {
             text: "收款金额",
@@ -167,11 +188,11 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
                 xtype: 'textfield'
             }
         }]
-    }, {
-        xtype:'button',
-        text:'选择源单',
-        width:100
-
+    },{
+        xtype:'dbfindtrigger',
+        columnWidth: 1,
+        fieldLabel:'选择源单',
+        name: 'choseSource'
     },{
         xtype: "detailGridField",
         storeModel: 'saas.model.money.RecBalance2',

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

@@ -154,8 +154,75 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
 
                 }
             },
-        });
+            'dbfindtrigger[name=choseSource]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/money/subledger/list',
+                        addTitle: '源单资料',
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'rbd_slid'
+                        }, {
+                            from: 'sl_code',
+                            to: 'rbd_slcode'
+                        },{
+                            from: 'sl_orderamount',
+                            to: 'rbd_amount'
+                        },{
+                            from: 'sl_yamount',
+                            to: 'rbd_havebalance'
+                        },{
+                            from: 'sl_namount',
+                            to: 'rbd_pbdamount'
+                        }],
+                        dbtpls: [{
+                            field: 'sl_code',
+                            width: 100
+                        }],
+                        defaultCondition: "sl_vendtid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0",
+                        dbSearchFields:[{
+                            emptyText:'输入源单编号',
+                            xtype : "textfield",
+                            name : "search",
+                            getCondition: function(v) {
+                                return "(upper(sl_code) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true,
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "源单id",
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
+                        },{
+                            "text": "源单编号",
+                            "flex": 1,
+                            "dataIndex": "sl_code",
+                            "width": 100
+                        }, {
+                            "text": "单据金额",
+                            "flex": 1,
+                            "dataIndex": "sl_orderamount",
+                            "width": 100
+                        }, {
+                            "text": "已核销金额",
+                            "flex": 0,
+                            "dataIndex": "sl_yamount",
+                            "width": 200,
+                            "items": null
+                        }, {
+                            "text": "未核销金额",
+                            "flex": 1,
+                            "dataIndex": "sl_namount",
+                            "width": 100
+                        }]
+                    });
 
+                }
+            }
+        });
     },
     addCombo:function(){
         var combo=this.ownerCmp;