Browse Source

修改采购模块

zhoudw 7 years ago
parent
commit
404b2b6ae0

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml

@@ -364,7 +364,7 @@
   </select>
 
   <select id="validNameAndCodeWhenUpdate" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
-    select count(1) from customer where cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR}
+    select count(1) from customer where (cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR})
     and cu_id != #{id}
   </select>
 

+ 2 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java

@@ -83,9 +83,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             con = "1=1";
         }
         if (null == req || StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
-              list = prodInOutListMapper.selectProdInOutListByCondition(con,companyId);
+                list = prodInOutListMapper.selectProdInOutBycondition(con,companyId);
         } else {
-              list = prodInOutListMapper.selectProdInOutBycondition(con,companyId);
+            list = prodInOutListMapper.selectProdInOutListByCondition(con,companyId);
         }
         return list;
     }

+ 9 - 9
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -73,30 +73,30 @@
 
   </resultMap>
 
-
-  <select id="selectProdInOutListByCondition"  resultMap="BaseResultMap">
-    select  *  from prodinout left join prodiodetail on pi_id = pd_piid
+  <select id="selectProdInOutBycondition"  resultMap="BaseResultMap">
+    select  *  from prodinout
     <where>
       <if test="con != null">
         ${con}
       </if>
       <if test="companyId != null">
-        and   prodinout.companyid = #{companyId}
+        and   companyid = #{companyId}
       </if>
-    </where>  order by pi_id,pd_pdno
+    </where>  order by pi_id
   </select>
 
-  <select id="selectProdInOutBycondition"  resultMap="BaseResultMap">
-    select  *  from prodinout
+  <select id="selectProdInOutListByCondition"  resultMap="BaseResultMap">
+    select  *  from prodinout left join prodiodetail on pi_id = pd_piid
+    left join product on pd_prodcode=pr_code
     <where>
       <if test="con != null">
         ${con}
       </if>
       <if test="companyId != null">
-        and  companyid = #{companyId}
+        and  prodinout.companyid = #{companyId}
       </if>
     </where>
-    order by pi_id
+    order by pi_id,pd_pdno
   </select>
 
 

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

@@ -165,6 +165,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 text : "已转数", 
                 dataIndex : "pd_yqty", 
                 width : 120.0,
+                hidden:true,
                 editor : {
                     xtype : "numberfield",
                     decimalPrecision: 8,
@@ -275,7 +276,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         ]
     },
     {
-        xtype : "textareafield", 
+        xtype : "textfield", 
         name : "PU_REMARK", 
         fieldLabel : "备注", 
         columnWidth : 1

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

@@ -22,27 +22,31 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
     }, {
         xtype: 'condatefield',
         name: 'pu_date',
-        fieldLabel: '采购日期',
+        fieldLabel: '单据日期',
         columnWidth: 0.5,
         operation: 'between'
     }, {
         xtype: 'dbfindtrigger',
         name: 'pu_vendcode',
-        fieldLabel: '供应商编号'
+        fieldLabel: '供应商编号',
+        hidden:true
     }, {
-        xtype: 'textfield',
+        xtype: 'dbfindtrigger',
         name: 'pu_vendname',
-        fieldLabel: '供应商名称'
+        fieldLabel: '供应商名称',
+        emptyText:'输入供应商编号或名称'
     }, {
         xtype: 'dbfindtrigger',
         name: 'pd_prodcode',
         fieldLabel: '物料编号',
-        showDetail: true
+        showDetail: true,
+        hidden:true
     }, {
-        xtype: 'textfield',
+        xtype: 'dbfindtrigger',
         name: 'pr_detail',
         fieldLabel: '物料名称',
-        showDetail: true
+        showDetail: true,
+        emptyText:'输入物料编号或名称',
     }, {
         xtype: 'combobox',
         name: 'pu_statuscode',
@@ -77,20 +81,6 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             ["CLOSE", "已关闭"]
         ]
     }],
-    moreQueryFormItems: [{
-        xtype: 'textfield',
-        name: 'pu_buyername',
-        fieldLabel: '采购员'
-    }, {
-        xtype: 'textfield',
-        name: 'pu_total',
-        fieldLabel: '金额'
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_delivery',
-        fieldLabel: '交货日期',
-        columnWidth: 1
-    }],
     queryGridConfig: {
         idField: 'pu_id',
         codeField: 'pu_code',

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

@@ -6,7 +6,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanelController', {
         var me = this;
         this.control({
             // 供应商编号
-            'dbfindtrigger[name=pu_vendcode]':{
+            'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         dataUrl:'/api/document/vendor/list',
@@ -78,7 +78,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanelController', {
                 }
             },
             // 放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pd_prodcode]':{
+            'dbfindtrigger[name=pr_detail]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',

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

@@ -187,7 +187,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 }
             },            {
                 text : "已转数", 
-                dataIndex : "pd_yqty", 
+                dataIndex : "pd_yqty",
+                hidden:true, 
                 width : 120.0,
                 editor : {
                     xtype : "numberfield",

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

@@ -37,10 +37,11 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         hidden:true,
         columnWidth: 0.25
     }, {
-        xtype: 'textfield',
+        xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         bind: '{pi_vendname}',
         fieldLabel: '供应商名称',
+        emptyText:'输入供应商编号或名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
@@ -48,12 +49,14 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         name: 'pd_prodcode',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
+        hidden:true,
         showDetail: true
     }, {
-        xtype: 'textfield',
+        xtype: 'dbfindtrigger',
         name: 'pr_detail',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
+        emptyText:'输入物料编号或名称',
         showDetail: true
     }, {
         xtype: 'combobox',
@@ -61,6 +64,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         bind: '{pi_statuscode}',
         fieldLabel: '审核状态',
         allowBlank: true,
+        editable:false,
         columnWidth: 0.25,
         queryMode: 'local',
         displayField: 'pi_status',
@@ -81,26 +85,6 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             }
         }
     }],
-    moreQueryFormItems: [{
-        xtype: 'textfield',
-        name: 'pu_buyername',
-        bind: '{pu_buyername}',
-        fieldLabel: '采购员',
-        allowBlank: true
-    }, {
-        xtype: 'textfield',
-        name: 'pu_total',
-        bind: '{pu_total}',
-        fieldLabel: '金额',
-        allowBlank: true
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_delivery',
-        bind: '{pu_delivery}',
-        fieldLabel: '交货日期',
-        allowBlank: true,
-        columnWidth: 1
-    }],
     queryGridConfig: {
         idField:'id',
         codeField:'pi_inoutno',

+ 6 - 5
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js

@@ -6,16 +6,16 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
         var me = this;
         this.control({
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendname]':{
+            'dbfindtrigger[name=pi_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         dataUrl:'/api/document/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
                         dbfinds:[{
-                            from:'ve_code',to:'pu_vendcode'
+                            from:'ve_code',to:'pi_vendcode'
                         },{
-                            from:'ve_name',to:'pu_vendname'
+                            from:'ve_name',to:'pi_vendname'
                         }],
                         dbtpls:[{
                             field:'ve_code',width:100
@@ -78,7 +78,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pd_prodcode]':{
+            'dbfindtrigger[name=pr_detail]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
@@ -87,7 +87,8 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
                         addTitle: '物料资料',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
-                            from:'pr_unit',to:'pd_unit'
+                        }, {
+                            from:'pr_detail',to:'pr_detail'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100

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

@@ -36,11 +36,20 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         allowBlank: true,
         hidden:true,
         columnWidth: 0.25
-    }, {
+    },{
         xtype: 'textfield',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
+        fieldLabel: '供应商编号',
+        allowBlank: true,
+        hidden:true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         bind: '{pi_vendname}',
         fieldLabel: '供应商名称',
+        emptyText:'输入供应商编号或名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
@@ -48,12 +57,14 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         name: 'pd_prodcode',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
+        hidden:true,
         showDetail: true
     }, {
-        xtype: 'textfield',
+        xtype: 'dbfindtrigger',
         name: 'pr_detail',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
+        emptyText:'输入物料编号或名称',
         showDetail: true
     }, {
         xtype: 'combobox',
@@ -61,6 +72,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         bind: '{pi_statuscode}',
         fieldLabel: '审核状态',
         allowBlank: true,
+        editable:false,
         columnWidth: 0.25,
         queryMode: 'local',
         displayField: 'pi_status',
@@ -81,26 +93,6 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             }
         }
     }],
-    moreQueryFormItems: [{
-        xtype: 'textfield',
-        name: 'pu_buyername',
-        bind: '{pu_buyername}',
-        fieldLabel: '采购员',
-        allowBlank: true
-    }, {
-        xtype: 'textfield',
-        name: 'pu_total',
-        bind: '{pu_total}',
-        fieldLabel: '金额',
-        allowBlank: true
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_delivery',
-        bind: '{pu_delivery}',
-        fieldLabel: '交货日期',
-        allowBlank: true,
-        columnWidth: 1
-    }],
     queryGridConfig: {
         idField:'id',
         codeField:'pi_inoutno',

+ 7 - 6
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js

@@ -6,16 +6,16 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
         var me = this;
         this.control({
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendname]':{
+            'dbfindtrigger[name=pi_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         dataUrl:'/api/document/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
                         dbfinds:[{
-                            from:'ve_code',to:'pu_vendcode'
+                            from:'ve_code',to:'pi_vendcode'
                         },{
-                            from:'ve_name',to:'pu_vendname'
+                            from:'ve_name',to:'pi_vendname'
                         }],
                         dbtpls:[{
                             field:'ve_code',width:100
@@ -78,7 +78,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pd_prodcode]':{
+            'dbfindtrigger[name=pr_detail]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
@@ -87,7 +87,8 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
                         addTitle: '物料资料',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
-                            from:'pr_unit',to:'pd_unit'
+                        }, {
+                            from:'pr_detail',to:'pr_detail'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
@@ -166,7 +167,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",
                             "width": 100,
-                        }]
+                        }]   
                     }) ;   
 
                 }

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

@@ -230,7 +230,8 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 width : 120.0,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 2
+                    decimalPrecision: 2,
+                    editable:false
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
@@ -260,7 +261,8 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 dataIndex : "pd_nettotal", 
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 2
+                    decimalPrecision: 2,
+                    editable:false
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

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

@@ -81,26 +81,6 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             }
         }
     }],
-    moreQueryFormItems: [{
-        xtype: 'textfield',
-        name: 'pu_buyername',
-        bind: '{pu_buyername}',
-        fieldLabel: '采购员',
-        allowBlank: true
-    }, {
-        xtype: 'textfield',
-        name: 'pu_total',
-        bind: '{pu_total}',
-        fieldLabel: '金额',
-        allowBlank: true
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_delivery',
-        bind: '{pu_delivery}',
-        fieldLabel: '交货日期',
-        allowBlank: true,
-        columnWidth: 1
-    }],
     queryGridConfig: {
         idField:'id',
         codeField:'pi_inoutno',

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

@@ -232,7 +232,8 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 width: 120.0,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 2
+                    decimalPrecision: 2,
+                    editable:false
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
@@ -262,7 +263,8 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 dataIndex: "pd_nettotal",
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 2
+                    decimalPrecision: 2,
+                    editable:false
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

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

@@ -81,26 +81,6 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             }
         }
     }],
-    moreQueryFormItems: [{
-        xtype: 'textfield',
-        name: 'pu_buyername',
-        bind: '{pu_buyername}',
-        fieldLabel: '采购员',
-        allowBlank: true
-    }, {
-        xtype: 'textfield',
-        name: 'pu_total',
-        bind: '{pu_total}',
-        fieldLabel: '金额',
-        allowBlank: true
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_delivery',
-        bind: '{pu_delivery}',
-        fieldLabel: '交货日期',
-        allowBlank: true,
-        columnWidth: 1
-    }],
     queryGridConfig: {
         idField:'id',
         codeField:'pi_inoutno',