Browse Source

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

zhuth 7 years ago
parent
commit
df66e9ea1b
28 changed files with 216 additions and 122 deletions
  1. 2 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdIODetailDTO.java
  2. 3 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java
  3. 20 3
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  4. 3 2
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  5. 5 1
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  6. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java
  7. 1 0
      frontend/saas-web/app/model/sale/ProdIODetail.js
  8. 6 5
      frontend/saas-web/app/view/document/customer/FormPanel.js
  9. 22 1
      frontend/saas-web/app/view/document/kind/ChildForm.js
  10. 5 1
      frontend/saas-web/app/view/document/kind/Kind.js
  11. 1 1
      frontend/saas-web/app/view/document/kind/KindModel.js
  12. 2 2
      frontend/saas-web/app/view/document/product/FormPanel.js
  13. 9 16
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  14. 2 2
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  15. 1 2
      frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js
  16. 1 1
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  17. 4 5
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  18. 1 1
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  19. 15 9
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  20. 1 1
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  21. 66 24
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  22. 4 1
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  23. 3 3
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  24. 25 36
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  25. 8 0
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  26. 1 1
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  27. 1 1
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  28. 2 3
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js

+ 2 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdIODetailDTO.java

@@ -88,6 +88,8 @@ public class ProdIODetailDTO implements Serializable {
 
     private Long pd_ioid;
 
+    private Double pd_ordertotal;
+
     private ProductDTO productDTO;
 
 }

+ 3 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java

@@ -6,6 +6,7 @@ import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.storage.po.ProdInOut;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.HashMap;
 import java.util.List;
 
 public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
@@ -40,4 +41,6 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
     String validateBatchOpen(List<DocBaseDTO> baseDTOs);
 
     void updatePiTotal(Long id);
+
+    List<HashMap<String, Object>> getWareHouseByCode(@Param("code") String code, @Param("companyId") Long companyId);
 }

+ 20 - 3
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -30,9 +30,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * @author: guq
@@ -462,6 +460,13 @@ public class SaleServiceImpl implements SaleService{
             prodIODetail.setCompanyId(companyId);
             //本次转单数
             prodIODetail.setPd_outqty(saleDetail.getSd_qty() - saleDetail.getSd_yqty());
+            //获取物料默认仓库
+            Map<String, Object> warehouse = getWareHouseByCode(saleDetail.getSd_prodcode());
+            if (null != warehouse) {
+                prodIODetail.setPd_whid(warehouse.get("pr_whid") == null ? 0 : Integer.valueOf(warehouse.get("pr_whid").toString()));
+                prodIODetail.setPd_whcode(String.valueOf(warehouse.get("pr_whcode")));
+                prodIODetail.setPd_whname(String.valueOf(warehouse.get("pr_whname")));
+            }
             prodIODetailMapper.insertSelective(prodIODetail);
             //更新已转数
             saleDetail.setSd_yqty(saleDetail.getSd_qty());
@@ -573,4 +578,16 @@ public class SaleServiceImpl implements SaleService{
         return baseDTO;
     }
 
+    private Map<String, Object> getWareHouseByCode(String code) {
+        if (StringUtils.isEmpty(code)) {
+            return null;
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        List<HashMap<String, Object>> list = prodInOutMapper.getWareHouseByCode(code, companyId);
+        if (null != list) {
+            return list.get(0);
+        }
+        return null;
+    }
+
 }

+ 3 - 2
applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -41,6 +41,7 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
       <id column="pr_id" property="id"/>
       <result column="pr_code" property="pr_code"/>
@@ -759,14 +760,14 @@ update prodiodetail a
 
   <update id="updatePDSaleIN" parameterType="long">
    update prodiodetail set
-   pd_total=round(IFNULL(pd_inqty,0)*IFNULL(pd_sendprice,0),2),
+   pd_ordertotal=round(IFNULL(pd_inqty,0)*IFNULL(pd_sendprice,0),2),
    pd_netprice = round(IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),2),
    pd_nettotal = round((IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_inqty,0),2)
    where pd_piid=#{id}
   </update>
   <update id="updatePDSaleOut" parameterType="long">
     update prodiodetail set
-    pd_total=round(IFNULL(pd_outqty,0)*IFNULL(pd_sendprice,0),2),
+    pd_ordertotal=round(IFNULL(pd_outqty,0)*IFNULL(pd_sendprice,0),2),
     pd_netprice = round(IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),2),
     pd_nettotal = round((IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0),2)
     where pd_piid=#{id}

+ 5 - 1
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -540,9 +540,13 @@
   </select>
   <update id="updatePiTotal"  parameterType="long">
 update ProdInOut SET
-		 pi_total = ( select IFNULL(sum(IFNULL(pd_total,0)),0) FROM ProdIODetail WHERE pd_piid=#{id}),
+		 pi_total = ( select IFNULL(sum(IFNULL(pd_ordertotal,0)),0) FROM ProdIODetail WHERE pd_piid=#{id}),
 		 pi_nettotal = ( select IFNULL(sum(IFNULL(pd_nettotal,0)),0) FROM ProdIODetail WHERE pd_piid=#{id})
 			where pi_id =#{id}
   </update>
 
+  <select id="getWareHouseByCode" resultType="java.util.HashMap">
+    select pr_whid,pr_whcode,pr_whname from product where pr_code=#{code} and companyid=#{companyId} and pr_statuscode='OPEN'
+  </select>
+
 </mapper>

+ 2 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java

@@ -81,6 +81,8 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
+    private Double pd_ordertotal;
+
     private ProductDTO productDTO;
 
 }

+ 1 - 0
frontend/saas-web/app/model/sale/ProdIODetail.js

@@ -35,6 +35,7 @@ Ext.define('saas.model.sale.ProdIODetail', {
         { name: 'pd_yqty', type: 'int' },
         { name: 'pd_remark', type: 'string' },
         { name: 'pd_ioid', type: 'int' },
+        { name: 'pd_ordertotal', type: 'float' }
     ],
     //一对一映射
     associations: [{ type: 'hasOne', model: 'saas.model.document.Product', associationKey: 'productDTO'}]

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

@@ -41,7 +41,6 @@ Ext.define('saas.view.document.customer.FormPanel', {
         allowBlank: true,
         columnWidth: 0.25
     },{
-        editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 
@@ -159,6 +158,8 @@ Ext.define('saas.view.document.customer.FormPanel', {
         name : "cu_uu", 
         fieldLabel : "客户UU", 
         allowBlank : true, 
+        readOnly:true,
+        editable:false,
         columnWidth : 0.25
     },{
         xtype:'textfield',
@@ -224,7 +225,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 items : null
             },
             {
-                allowBlank:false,
+                allowBlank:true,
                 text : "微信/QQ", 
                 editor : {
                     xtype : "textfield"
@@ -320,7 +321,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 items : null
             },  
             {
-                allowBlank:false,
+                allowBlank:true,
                 text : "联系人", 
                 editor : {
                     xtype : "textfield"
@@ -330,7 +331,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 items : null   
             },
             {
-                allowBlank:false,
+                allowBlank:true,
                 text : "联系电话", 
                 editor : {
                     xtype : "textfield",
@@ -341,8 +342,8 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 items : null   
             },
             {
+                allowBlank:false,
                 editor : {
-                    editable:false,
                     displayField : "display", 
                     format : "", 
                     hideTrigger : false, 

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

@@ -139,8 +139,29 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 name:'ft_name',
                 allowBlank:false,
-                fieldLabel:'类型',
+                fieldLabel:'收支名称',
                 maxLength: 20
+            },{
+                xtype:'combo',
+                name:'ft_kind',
+                allowBlank:false,
+                fieldLabel:'收支类型',
+                hideTrigger : false, 
+                maxLength : 100.0, 
+                minValue : null, 
+                positiveNum : false, 
+                queryMode : "local", 
+                valueField : "value", 
+                xtype : "combo",
+                editable:false,
+                displayField : "display", 
+                store:{
+                    fields: ['display', 'value'],
+                    data : [
+                        {"display":"收入", "value":'收入'},
+                        {"display":"支出", "value":'支出'}
+                    ]
+                }
             }]
         },
         address:{

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

@@ -155,9 +155,13 @@ Ext.define('saas.view.document.kind.Kind', {
         },
         inoutkind:{
             columns: [{
-                text: '收支类别',
+                text: '收支名称',
                 dataIndex: 'ft_name',
                 flex: 1
+            },{
+                text: '收支类别',
+                dataIndex: 'ft_kind',
+                flex: 1
             }],
             keyField:'id',
             reqUrl: '/api/document/fundinouttype/save',

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

@@ -152,7 +152,7 @@ Ext.define('saas.view.document.kind.KindModel', {
         inoutkind:{ 
             fields:[
                 {name: 'id', type: 'int'},
-                {name: 'ft_type',  type: 'string'},
+                {name: 'ft_kind',  type: 'string'},
                 {name: 'ft_name',  type: 'string'}
             ],
             proxy: {  

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

@@ -170,9 +170,8 @@ Ext.define('saas.view.document.product.FormPanel', {
         allowBlank : true, 
         columnWidth : 0.25
     },{
-        ignore:true,
-        readOnly:true,
         xtype : "numberfield", 
+        bind : "{pr_standardprice}",
         name : "pr_standardprice", 
         fieldLabel : "标准单价", 
         allowBlank : true, 
@@ -181,6 +180,7 @@ Ext.define('saas.view.document.product.FormPanel', {
         ignore:true,
         readOnly:true,
         xtype : "numberfield", 
+        bind : "{pr_purcprice}",
         name : "pr_purcprice", 
         fieldLabel : "最新采购单价", 
         allowBlank : true, 

+ 9 - 16
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -95,14 +95,14 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         xtype : "numberfield", 
         hideTrigger:true,
         name : "ve_beginapamount", 
-        fieldLabel : "期初应", 
+        fieldLabel : "期初应", 
         allowBlank : true, 
         columnWidth : 0.25
     },{ 
         xtype : "numberfield", 
         hideTrigger:true, 
         name : "ve_beginprepayamount", 
-        fieldLabel : "期初预", 
+        fieldLabel : "期初预", 
         allowBlank : true, 
         columnWidth : 0.25    
     },{
@@ -121,29 +121,20 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         columnWidth : 0.25      
     },{
         xtype : "textfield", 
-        name : "ve_1", 
+        name : "ve_nsrzh", 
         fieldLabel : "纳税人识别号", 
-        ignore:true,
-        editable:false,
-        readOnly:true,
         allowBlank : true, 
         columnWidth : 0.25
     },{
         xtype : "textfield", 
-        name : "ve_2", 
+        name : "ve_bankcode", 
         fieldLabel : "开户银行", 
-        ignore:true,
-        editable:false,
-        readOnly:true,
         allowBlank : true, 
         columnWidth : 0.25
     },{
         xtype : "textfield", 
-        name : "ve_3", 
+        name : "ve_bankaccount", 
         fieldLabel : "银行账户", 
-        ignore:true,
-        editable:false,
-        readOnly:true,
         allowBlank : true, 
         columnWidth : 0.25
     },{
@@ -151,6 +142,8 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         name : "ve_uu", 
         fieldLabel : "供应商UU", 
         allowBlank : true, 
+        editable:false,
+        readOnly:true,
         columnWidth : 0.25
     },{  
         xtype : "datefield", 
@@ -206,7 +199,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 xtype : "", 
             },
             {
-                allowBlank:false,
+                allowBlank:true,
                 text : "微信/QQ", 
                 editor : {
                     xtype : "textfield"
@@ -225,7 +218,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
             {
                 editor : {
                     displayField : "display", 
-                    editable:false,
+                    editable:true,
                     format : "", 
                     hideTrigger : false, 
                     maxLength : 100.0, 

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

@@ -9,7 +9,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
     caller:'FundTransfer',
     
      //字段属性
-     _title:'其它收入单',
+     _title:'资金转账',
      _idField: 'id',
      _codeField: 'ft_code',
      _statusField: 'ft_status',
@@ -51,7 +51,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                     xtype : "numberfield"
                 },
                 width : 120.0, 
-                xtype : "numbercolumn", 
+                xtype : "hidden",
                 items : null
             }, {
                 text : "转出账户ID", 

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

@@ -68,8 +68,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             "width": 120,
                             "xtype": "datecolumn"
                         }]
-                    }) ;   
-
+                    }) ;
                 }
             },
             'dbfindtrigger[name=ftd_inbankname]':{

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

@@ -24,7 +24,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
             text: 'id',
             dataIndex: 'id',
             width: 0,
-            xtype: 'numbercolumn'
+            xtype: 'hidden'
         }, {
             text: '单据编号',
             dataIndex: 'ft_code',

+ 4 - 5
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -75,12 +75,11 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
             }, {
                 text : "收入类别", 
                 width : 200.0, 
-                dataIndex : "ord_type", 
-                xtype : "", 
+                dataIndex : "ord_type",
                 items : null,
                 editor : {
                     xtype : "remotecombo", 
-                    storeUrl:'/api/document/inoutkind/getCombo',
+                    storeUrl:'/api/document/fundinouttype/getCombo',
                     addHandler:function(b){
                         var document = Ext.create('saas.view.document.kind.Kind',{});
                         var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
@@ -89,8 +88,8 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                             bind: {
                                 title: '新增收入类别类型'
                             },
-                            dataKind:'inoutkind',
-                            belong:document.etc['inoutkind'],
+                            dataKind:'fundinouttype',
+                            belong:document.etc['fundinouttype'],
                             _parent:form,
                             _combo:this.ownerCmp,
                             record:null,

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

@@ -49,7 +49,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 100,
+            width: 0,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',

+ 15 - 9
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -35,7 +35,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
          name : 'os_vendcode', 
          fieldLabel : '供应商编号'
      }, {
-         xtype : "dbfindtrigger", 
+         xtype : "dbfindtrigger",
          name : "os_vendname", 
          fieldLabel : "供应商名称"
      }, {
@@ -47,10 +47,18 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
          name : 'os_bankcode', 
          fieldLabel : '结算账户编号'
      }, {
-         xtype : "dbfindtrigger", 
+         xtype : "dbfindtrigger",
          name : "os_bankname", 
          fieldLabel : "结算账户名称"
      }, {
+        xtype:'datefield',
+        name : 'os_date',
+        fieldLabel : '单据日期'
+    },{
+        xtype : 'numberfield',
+        name : 'os_amount',
+        fieldLabel : '付款金额'
+    },{
         name : "detailGridField", 
         xtype : "detailGridField", 
         storeModel:'saas.model.money.Othspendings',
@@ -70,17 +78,16 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                     xtype : "numberfield"
                 },
                 width : 120.0, 
-                xtype : "numbercolumn", 
+                xtype : "hidden",
                 items : null
             }, {
                 text : "支出类别", 
                 width : 200.0, 
-                dataIndex : "osd_type", 
-                xtype : "", 
+                dataIndex : "osd_type",
                 items : null,
                 editor : {
                     xtype : "remotecombo", 
-                    storeUrl:'/api/document/inoutkind/getCombo',
+                    storeUrl:'/api/document/fundinouttype/getCombo',
                     addHandler:function(b){
                         var document = Ext.create('saas.view.document.kind.Kind',{});
                         var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
@@ -89,8 +96,8 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                             bind: {
                                 title: '新增收入类别类型'
                             },
-                            dataKind:'inoutkind',
-                            belong:document.etc['inoutkind'],
+                            dataKind:'fundinouttype',
+                            belong:document.etc['fundinouttype'],
                             _parent:form,
                             _combo:this.ownerCmp,
                             record:null,
@@ -151,6 +158,5 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
         fieldLabel : "录入日期",
         readOnly:true
     }
-
     ]
 });

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

@@ -49,7 +49,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 100,
+            width: 0,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',

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

@@ -61,10 +61,6 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: "datefield",
         name: "pb_date",
         fieldLabel: "日期"
-    },{
-      xtype:"textfield",
-      name:"pb_code",
-      fieldLabel:"单号"
     },{
         xtype: 'hidden',
         name: 'pb_manname',
@@ -110,15 +106,38 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: '结算账户ID',
             dataIndex: 'pd_bankid',
-            editor:{
-                xtype:'hidden'
-            }
+            xtype:'hidden'
         }, {
         //     text: '结算账户编号',
         //     dataIndex: 'paybalancedet'
         // }, {
             text: '资金账户',
-            dataIndex: 'pd_bankname'
+            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: "付款金额",
             dataIndex: "pd_amount",
@@ -141,10 +160,27 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             }
         }, {
             text: "结算方式",
-            dataIndex: "pd_paymethod"
+            dataIndex: "pd_paymethod",
+            editor : {
+                xtype:'combo',
+                queryMode: 'local',
+                displayField: 'display',
+                valueField: 'value',
+                store:Ext.create('Ext.data.Store', {
+                    fields: ['value', 'display'],
+                    data : [{value:"信用卡", display:"信用卡"},
+                        {value:"支票", display:"支票"},
+                        {value:"汇票", display:"汇票"},
+                        {value:"现金", display:"现金"},
+                        {value:"银行转账", display:"银行转账"}]
+                })
+            }
         }, {
             text: "结算号",
-            dataIndex: "pd_paycode"
+            dataIndex: "pd_paycode",
+            editor:{
+                xtype:'textfield'
+            }
         }, {
             text: "备注",
             dataIndex: "pd_remark",
@@ -154,36 +190,44 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             }
         }]
     }, {
+        xtype:'button',
+        text:'选择源单',
+        width:100
+
+    },{
         xtype: "detailGridField",
         storeModel: 'saas.model.money.PayBalance2',
         detnoColumn: 'pbd_detno',
         deleteDetailUrl: '/api/money/paybalance/deleteDetail2/',
-        ltar: {
-          xtype:'button',
-          text:'选择源单',
-          name:'chooseSource'
-        },columns: [{
+        columns: [{
             text: 'ID',
             dataIndex: 'id',
             hidden: true
         }, {
             text: '期间',
             dataIndex: 'pbd_ym',
-            editor:{
-                xtype:'hidden'
-            }
+            xtype:'hidden'
         }, {
             text: '来源ID',
             dataIndex: 'pbd_slid',
-            editor:{
-                xtype:'hidden'
-            }
+            xtype:'hidden'
         }, {
             text: '来源单号',
             dataIndex: 'pbd_slcode'
         }, {
             text: "业务类型",
             dataIndex: "pbd_slkind",
+            editor : {
+                xtype:'combo',
+                queryMode: 'local',
+                displayField: 'display',
+                valueField: 'value',
+                store:Ext.create('Ext.data.Store', {
+                    fields: ['value', 'display'],
+                    data : [{value:"应付", display:"应付"},
+                        {value:"应收", display:"应收"}]
+                })
+            }
         }, {
             text: "单据日期",
             dataIndex: "pbd_sldate",
@@ -273,9 +317,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             text: '备注',
             dataIndex: 'pbd_remark',
             width: 250,
-            editor:{
-                xtype: 'hidden'
-            }
+            xtype: 'hidden'
         }]
     }, {
         xtype: 'hidden',

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

@@ -9,7 +9,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
             'dbfindtrigger[name=pb_vendname]':{
                 beforerender: function (f) {
                     Ext.apply(f, {
-                        dataUrl: 'api/document/vendor/list',
+                        dataUrl: '/api/document/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
                         dbfinds: [{
@@ -18,6 +18,9 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         }, {
                             from: 've_name',
                             to: 'pb_vendname'
+                        },{
+                            from: 've_leftamount',
+                            to: 've_leftamount'
                         }],
                         dbtpls: [{
                             field: 've_code',

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

@@ -18,9 +18,9 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         codeField: 'pb_code',
         addTitle: '付款单',
         addXtype: 'money-paybalance-formpanel',
-        defaultCondition:'',
+        defaultCondition:'1=1',
         baseVastUrl: '/api/money/paybalance/',
-        // baseVastUrl: 'http://192.168.253.129:8940/money/paybalance/',
+        // baseVastUrl: 'http://127.0.0.1:8880/paybalance/',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -38,7 +38,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         }, {
             text: '日期',
             dataIndex: 'pb_date',
-            width: 120
+            width: 160
         }, {
             text: '供应商编号',
             dataIndex: 'pb_vendcode',

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

@@ -32,7 +32,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         name: 'rb_custid',
         fieldLabel: '客户ID'
     }, {
-        xtype: 'hidden',
+        xtype: 'textfield',
         name: 'rb_kind',
         fieldLabel: '单据类型',
         defaultValue: '收款单'
@@ -89,9 +89,9 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: '期间',
             dataIndex: 'rd_ym',
-            editor: {
-                xtype: 'numberfield'
-            },
+            // editor: {
+            //     xtype: 'numberfield'
+            // },
             hidden: true
         }, {
             text: '资金账户ID',
@@ -139,8 +139,19 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "结算方式",
             dataIndex: "rd_paymethod",
-            editor: {
-                xtype: 'textfield'
+            editor : {
+                xtype:'combo',
+                queryMode: 'local',
+                displayField: 'display',
+                valueField: 'value',
+                store:Ext.create('Ext.data.Store', {
+                    fields: ['value', 'display'],
+                    data : [{value:"信用卡", display:"信用卡"},
+                        {value:"支票", display:"支票"},
+                        {value:"汇票", display:"汇票"},
+                        {value:"现金", display:"现金"},
+                        {value:"银行转账", display:"银行转账"}]
+                })
             }
         }, {
             text: "结算号",
@@ -157,6 +168,11 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             }
         }]
     }, {
+        xtype:'button',
+        text:'选择源单',
+        width:100
+
+    },{
         xtype: "detailGridField",
         storeModel: 'saas.model.money.RecBalance2',
         detnoColumn: 'rbd_detno',
@@ -181,29 +197,16 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             hidden: true
         }, {
             text: '来源单号',
-            dataIndex: 'rbd_slcode',
-            editor: {
-                xtype: 'textfield'
-            }
+            dataIndex: 'rbd_slcode'
         }, {
             text: "业务类型",
-            dataIndex: "rbd_slkind",
-            editor: {
-                xtype: 'textfield'
-            }
+            dataIndex: "rbd_slkind"
         }, {
             text: "单据日期",
-            dataIndex: "rbd_sldate",
-            editor: {
-                xtype: 'datefield'
-            }
+            dataIndex: "rbd_sldate"
         }, {
             text: "单据金额",
             dataIndex: "rbd_amount",
-            // editor : {
-            //     xtype : "numberfield",
-            //     decimalPrecision: 2
-            // },
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');
@@ -220,10 +223,6 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "已核销金额",
             dataIndex: "rbd_nowbalance",
-            // editor : {
-            //     xtype : "numberfield",
-            //     decimalPrecision: 2
-            // },
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');
@@ -240,10 +239,6 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "未核销金额",
             dataIndex: "pbd_nowbalance",
-            // editor : {
-            //     xtype : "numberfield",
-            //     decimalPrecision: 2
-            // },
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');
@@ -277,12 +272,6 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
                 var format = '0,000.' + xr.join();
                 return Ext.util.Format.number(v, format);
             }
-        // }, {
-        //     text: '备注',
-        //     dataIndex: 'rbd_remark',
-        //     editor: {
-        //         xtype: 'textfield'
-        //     }
         }]
     }, {
         xtype: 'numberfield',

+ 8 - 0
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -19,12 +19,16 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             from:'cu_code', to:'rb_custcode'
                         },{
                             from:'cu_name', to:'rb_custname'
+                        },{
+                            from:'cu_leftamount', to:'rb_rdamount'
                         }],
                         //联想设置
                         dbtpls:[{
                             field:'cu_code',width:100
                         },{
                             field:'cu_name',width:100
+                        },{
+                            field:'cu_leftamount',width:100
                         }],
                         defaultCondition: 'cu_statuscode="OPEN"',
                         dbSearchFields:[{
@@ -58,6 +62,10 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             "text": "业务员",
                             "dataIndex": "cu_sellername",
                             "width": 100
+                        },{
+                            "text": "应收款余额",
+                            "dataIndex": "cu_leftamount",
+                            "width": 100
                         },{
                             "text": "税率",
                             "dataIndex": "cu_taxrate",

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

@@ -172,7 +172,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
             }, 
            {
                 text : "含税金额", 
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 120.0, 
                 editor : {
                     xtype : "numberfield",

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

@@ -183,7 +183,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
             }, 
            {
                 text : "含税金额", 
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 120.0, 
                 editor : {
                     xtype : "numberfield",

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

@@ -107,11 +107,10 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '未税金额',
+            text: '未税金额',
             dataIndex: 'pi_nettotal',
             xtype:'numbercolumn',
-            width: 120,
-            flex: 1
+            width: 120
         }],
         relativeColumn: [{
             text: 'id',