Browse Source

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

zhoudw 7 years ago
parent
commit
d17e623e69

+ 1 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersdetailMapper.java

@@ -18,7 +18,7 @@ public interface MaxnumbersdetailMapper {
 
     int insertSelective(Maxnumbersdetail record);
 
-    Maxnumbersdetail selectByExample(MaxnumbersdetailExample example);
+    List<Maxnumbersdetail> selectByExample(MaxnumbersdetailExample example);
 
     Maxnumbersdetail selectByPrimaryKey(Integer md_id);
 

+ 6 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/MaxnumberServiceImpl.java

@@ -263,7 +263,12 @@ public class MaxnumberServiceImpl extends CommonBaseServiceImpl<MaxnumbersMapper
         detailcta.andCompanyIdEqualTo(BaseContextHolder.getCompanyId());
         detailcta.andMd_callerEqualTo(caller);
         detailcta.andMd_leadcodeEqualTo(rulecode);
-        return maxnumbersdetailMapper.selectByExample(detailexample);
+        List<Maxnumbersdetail> details = maxnumbersdetailMapper.selectByExample(detailexample);
+        Maxnumbersdetail detail = null;
+        if (null != details && details.size() > 0) {
+            detail = details.get(0);
+        }
+        return detail;
     }
 
     /**

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

@@ -73,4 +73,6 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_remark;
 
+    private String pi_iocode;
+
 }

+ 7 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -36,6 +36,7 @@
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
+    <result column="pi_iocode" jdbcType="VARCHAR" property="pi_iocode" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
@@ -242,6 +243,9 @@
       <if test="pi_remark != null">
         pi_remark,
       </if>
+      <if test="pi_iocode != null">
+        pi_iocode,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -338,6 +342,9 @@
       <if test="pi_remark != null">
         #{pi_remark,jdbcType=LONGVARCHAR},
       </if>
+      <if test="pi_iocode != null">
+        #{pi_iocode,jdbcType=LONGVARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.po.ProdInOut">

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

@@ -76,4 +76,6 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
     private String pi_macode;
 
     private Long pi_maid;
+
+    private String pi_iocode;
 }

+ 2 - 3
frontend/saas-web/app/Application.scss

@@ -179,9 +179,8 @@ body.launching {
 }
 
 .x-formpanel-btn-blue {
-  border-color: #346fb9;
-  background: linear-gradient(to bottom,#3876c3 0,#346fb9 100%) !important;
-
+  background: #34BAF6;
+  border-color: #34BAF6;
   .x-btn-inner-default-toolbar-small{
       color:#fff !important;
   }

+ 28 - 0
frontend/saas-web/app/model/money/Verification2.js

@@ -0,0 +1,28 @@
+Ext.define('saas.model.money.Verification2', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'vcd_id', type: 'int' },
+        { name: 'vcd_vcid', type: 'int' },
+        { name: 'vcd_detno', type: 'int' },
+        { name: 'vcd_ym', type: 'int' },
+        { name: 'vcd_slid', type: 'int' },
+        { name: 'vcd_slcode', type: 'string' },
+        { name: 'vcd_slkind', type: 'string' },
+        { name: 'vcd_sldate', type: 'date' },
+        { name: 'vcd_amount', type: 'float' },
+        { name: 'vcd_nowbalance', type: 'float' },
+        { name: 'vcd_remark', type: 'string' },
+        { name: 'companyId', type: 'int' },
+        { name: 'updaterId', type: 'int' },
+        { name: 'vcd_text1', type: 'string' },
+        { name: 'vcd_text2', type: 'string' },
+        { name: 'vcd_text3', type: 'string' },
+        { name: 'vcd_text4', type: 'string' },
+        { name: 'vcd_text5', type: 'string' },
+        { name: 'creator', type: 'string' },
+        { name: 'creatorId', type: 'int' },
+        { name: 'createTime', type: 'date' },
+        { name: 'updater', type: 'string' },
+    ]
+});

+ 5 - 3
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -384,9 +384,11 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         me.editable = able;
 
         Ext.Array.each(columns, function(c) {
-            var e = c.getEditor();
-            if(e) {
-                typeof e.setDisabled == 'function' && e.setDisabled(!able);
+            if(typeof c.getEditor != 'undefined'){
+                var e = c.getEditor();
+                if(e) {
+                    typeof e.setDisabled == 'function' && e.setDisabled(!able);
+                }
             }
         });
     },

+ 10 - 10
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -49,12 +49,10 @@ Ext.define('saas.view.money.verification.FormPanel', {
             ],
             listeners:{
                 beforerender:function(f){
-                    f.firstLoad=true;
-                },
-                change:function(f){
-                    if(f.bindError){
-                        f.setValue(f.defaultValue);
-                        f.bindError = false
+                    f.firstLoad = true;
+                    if(f.ownerCt.initId!=0){
+                        f.setReadOnly(true);
+                        f.setDisabled(true);
                     }
                 }
             }
@@ -183,7 +181,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
         },
         detail2: {
             xtype: "detailGridField",
-            storeModel: 'saas.model.money.Verification1',
+            storeModel: 'saas.model.money.Verification2',
             detnoColumn: 'vcd_detno',
             deleteDetailUrl: '/api/money/verification/deleteDetail2',
             columnWidth: 1,
@@ -550,8 +548,10 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
             receivable_offset_payable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0',
                 'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
-            receivable_to_receivable: ['ifnull(sl_custid,0)={vc_outcustid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
-            payable_to_payable: ['ifnull(sl_vendtid,0)={vc_outvendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0']
+            receivable_to_receivable: ['ifnull(sl_custid,0)={vc_outcustid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
+            'and sl_kind in (\'期初余额\',\'出货单\',\'销售退货单\')'],
+            payable_to_payable: ['ifnull(sl_vendtid,0)={vc_outvendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
+            'and sl_kind in (\'期初余额\',\'采购验收单\',\'采购验退单\')']
         }
     },
 
@@ -605,7 +605,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 FormUtil.loadData(me);
             })
             .catch(function(response) {
-                saas.util.BaseUtil.showToast('错误:' + response.message);
+                saas.util.BaseUtil.showErrorToast('错误:' + response.message);
                 console.error(response);
             });
         }

+ 1 - 16
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -21,22 +21,6 @@ Ext.define('saas.view.money.verification.FormPanelController', {
 
                 }
             },
-            // 转出客户
-            'dbfindtrigger[name=vc_outcustname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        //赋值 
-                        dbfinds:[{
-                            from: 'id', to: 'vc_outcustid',ignore:true
-                        }, {
-                            from:'cu_code', to:'vc_outcustcode'
-                        },{
-                            from:'cu_name', to:'vc_outcustname'
-                        }],
-                    }) ;   
-
-                }
-            },
             // 转入客户
             'dbfindtrigger[name=vc_turncustname]':{
                 beforerender:function(f){
@@ -301,6 +285,7 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
+        debugger
         var sum_detail1 = store1.sum('vd_nowbalance'); // 从表1核销合计
         var sum_detail2 = store2.sum('vcd_nowbalance'); // 从表2核销合计
 

+ 1 - 7
frontend/saas-web/app/view/money/verification/FormPanelModel.js

@@ -14,14 +14,8 @@ Ext.define('saas.view.money.verification.FormPanelModel', {
                 }
                 if(vc_kind.firstLoad){
                     vc_kind.firstLoad = false;
-                    if(vc_kind.defaultValue!=v&&vc_kind.defaultValue==vc_kind.value){
-                        vc_kind.bindError = true;
-                        return vc_kind.value;
-                    }
-                }else{
-                    return v;
                 }
-                
+                return v;
             }
         }
     }

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

@@ -117,9 +117,13 @@ Ext.define('saas.view.money.verification.QueryPanel', {
         }, {
             text: '客户名称',
             dataIndex: 'vc_custname',
+        }, {
+            text: '供应商编号',
+            dataIndex: 'vc_vendcode',
+            hidden: true
         }, {
             text: '供应商名称',
-            dataIndex: 'vc_vendcode'
+            dataIndex: 'vc_vendname'
         }, {
             text: '核销金额',
             dataIndex: 'vc_amount1',

BIN
frontend/saas-web/resources/images/guide/background.png