Explorar o código

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

zhuth %!s(int64=7) %!d(string=hai) anos
pai
achega
55647610dd

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

@@ -150,7 +150,13 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         //更新本次预付款金额
         Paybalance updatePay = new Paybalance();
         updatePay.setId(paybalance.getId());
-        updatePay.setPb_preamount(amountTotal+paybalance.getPb_discounts()-nowbalanceTotal);
+
+        //折扣
+        Double discounts = paybalance.getPb_discounts();
+        if(discounts == null){
+            discounts = 0.0;
+        }
+        updatePay.setPb_preamount(amountTotal + discounts - nowbalanceTotal);
         paybalanceMapper.updateByPrimaryKeySelective(updatePay);
     }
 

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

@@ -96,7 +96,7 @@ public class RecbalanceServiceImpl implements RecbalanceService {
 
     /**
      * 校验数据
-     * @param Rec
+     * @param rec
      */
     private void checkRecbalance(Rec rec){
         Recbalance recbalance = rec.getMain();
@@ -147,7 +147,13 @@ public class RecbalanceServiceImpl implements RecbalanceService {
         //更新本次预付款金额
         Recbalance updatePay = new Recbalance();
         updatePay.setId(recbalance.getId());
-        updatePay.setRb_preamount(amountTotal+recbalance.getRb_discounts()-nowbalanceTotal);
+
+        //折扣
+        Double discount = recbalance.getRb_discounts();
+        if (discount == null){
+            discount = 0.0;
+        }
+        updatePay.setRb_preamount(amountTotal + discount - nowbalanceTotal);
         recbalanceMapper.updateByPrimaryKeySelective(updatePay);
     }
 

+ 3 - 3
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -13,7 +13,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
 
     layout: 'vbox',
     autoScroll: true,
-    border: 1,
+    bodyBorder:false,
     bodyPadding: 5,
 
     groupField: null, // 分组字段
@@ -49,7 +49,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                         style: {
                             float: 'right'
                         },
-                        text: '导出为...',
+                        text: '导出',
                         menu: {
                             defaults: {
                                 handler: 'exportTo'
@@ -112,7 +112,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 width: '100%',
                 cls: 'x-report-grid',
                 flex: 1,
-                border: 1,
+                border: 0,
                 sortableColumns: false,
                 enableColumnHide: false,
                 rowLines: false,

+ 6 - 0
frontend/saas-web/app/view/core/report/ReportPanel.scss

@@ -34,6 +34,12 @@
                 border-color: #999 !important;
                 border-width: 1px !important;
             }
+            .x-panel-default-outer-border-rl {
+                border-right-color: #999 !important;
+                border-right-width: 1px !important;
+                border-left-color:  #999 !important;
+                border-left-width: 1px !important;
+            }
         }
     }
 }

+ 9 - 9
frontend/saas-web/app/view/document/bom/BasePanel.js

@@ -8,17 +8,17 @@ Ext.define('saas.view.document.bom.BasePanel', {
     searchField:[{ 
         xtype : "textfield", 
         name : "bo_mothercode", 
-        emptyText : "母件编号", 
+        emptyText : "产品编号", 
         width:120
     },{
         xtype : "textfield", 
         name : "bo_mothername", 
-        emptyText : "母件名称", 
+        emptyText : "产品名称", 
         width:120
     },{
         xtype : "textfield", 
         name : "bo_status", 
-        emptyText : "BOM状态",    
+        emptyText : "产品状态",    
         width:100
     }],
 
@@ -42,32 +42,32 @@ Ext.define('saas.view.document.bom.BasePanel', {
             dataIndex : "id", 
             xtype : "numbercolumn",   
         },{
-            text : "母件id", 
+            text : "产品id", 
             width : 0, 
             dataIndex : "bo_motherid", 
             xtype : "numbercolumn",   
         },{
-            text : "母件编号", 
+            text : "产品编号", 
             dataIndex : "bo_mothercode",
             width : 200.0,
         }, 
         {
-            text : "母件名称", 
+            text : "产品名称", 
             dataIndex : "bo_mothername", 
             width : 120.0, 
         }, 
         {
-            text : "BOM状态", 
+            text : "产品状态", 
             dataIndex : "bo_status", 
             width : 120.0, 
         }, 
         {
-            text : "BOM状态码", 
+            text : "产品状态码", 
             dataIndex : "bo_statuscode", 
             width : 0, 
         },
         {   
-            text : "BOM版本", 
+            text : "产品版本", 
             dataIndex : "bo_version", 
             width : 120.0, 
         }]

+ 12 - 11
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -63,6 +63,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
         xtype: 'textfield',
         name: 'bo_mothername',
         fieldLabel: '产品名称',
+        reddOnly:true,
         allowBlank: false
     },{
         xtype: 'textfield',
@@ -73,7 +74,9 @@ Ext.define('saas.view.document.bom.FormPanel', {
     },{
         xtype: 'textfield',
         name: 'bo_status',
-        fieldLabel: '产品状态'
+        fieldLabel: '产品状态',
+        reddOnly:true
+
     },{
         xtype: 'hidden',
         name: 'bo_statuscode',
@@ -105,6 +108,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 allowBlank:false,
                 text : "物料编号", 
                 dataIndex : "bd_soncode", 
+                width : 160, 
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -148,11 +152,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     return v;
                 }
             }, {
-                allowBlank:false,
                 text : "单位", 
-                editor : {
-                    xtype : "textfield"
-                },
                 dataIndex : "bd_unit", 
             },
             {
@@ -195,14 +195,15 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     xtype : "textfield"
                 },
             }]
-    },{
-        xtype : "datefield", 
-        name : "createTime", 
-        fieldLabel : "创建时间"
     },{  
+        xtype : "textfield", 
+        name : "bo_recorder", 
+        reddOnly:true,
+        fieldLabel : "录入人"
+    },{
         xtype : "datefield", 
-        name : "updateTime", 
-        fieldLabel : "更新时间"
+        name : "bo_recorddate", 
+        fieldLabel : "录入时间"
     }],
 
     auditTexts: {

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

@@ -65,9 +65,9 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         name: "pb_date",
         fieldLabel: "日期"
     },{
-        xtype: 'hidden',
+        xtype: 'textfield',
         name: 'pb_manname',
-        fieldLabel: '款人'
+        fieldLabel: '款人'
     }, {
         xtype: 'hidden',
         name: 'pb_pdamount',
@@ -79,7 +79,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     }, {
         xtype: "numberfield",
         name: "pb_preamount",
-        fieldLabel: "本次预付款"
+        fieldLabel: "本次预付款",
+        readOnly: true
     }, {
         xtype: 'numberfield',
         name: 'pb_discounts',

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

@@ -10,7 +10,23 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
     queryFormItems: [{
         xtype: 'textfield',
         name: 'pb_code',
-        fieldLabel: '单据编号'
+        fieldLabel: '单据编号',
+        columnWidth: 0.2
+    },{
+        xtype: 'condatefield',
+        name: 'pb_date',
+        fieldLabel: '日期',
+        columnWidth: 0.5,
+        operation: 'between'
+    },{
+        xtype: 'multicombo',
+        name: 'pb_status',
+        fieldLabel: '审核状态',
+        columnWidth: 0.2,
+        datas: [
+            ["已审核", "已审核"],
+            ["未审核", "未审核"]
+        ]
     }],
     moreQueryFormItems: [],
     queryGridConfig: {
@@ -19,8 +35,8 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         addTitle: '付款单',
         addXtype: 'money-paybalance-formpanel',
         defaultCondition:'1=1',
-        // baseVastUrl: '/api/money/paybalance/',
-        baseVastUrl: 'http://192.168.253.129:8881/paybalance/',
+        baseVastUrl: '/api/money/paybalance/',
+        // baseVastUrl: 'http://192.168.253.129:8881/paybalance/',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

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

@@ -64,7 +64,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         name: "rb_date",
         fieldLabel: "日期"
     }, {
-        xtype: "hidden",
+        xtype: "textfield",
         name: "rb_manname",
         fieldLabel: "收款人"
     }, {
@@ -73,13 +73,14 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         fieldLabel: '备注',
         columnWidth: 1
     }, {
-        xtype: "hidden",
+        xtype: "numberfield",
         name: "rb_discounts",
         fieldLabel: "整单折扣"
     }, {
-        xtype: 'hidden',
+        xtype: 'numberfield',
         name: 'rb_preamount',
-        fieldLabel : '本次预收款'
+        fieldLabel : '本次预收款',
+        readOnly: true
     }, {
         xtype: 'hidden',
         name: 'rb_havebalance',

+ 9 - 0
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -25,6 +25,15 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         fieldLabel: '日期',
         columnWidth: 0.5,
         operation: 'between'
+    },{
+        xtype: 'multicombo',
+        name: 'rb_status',
+        fieldLabel: '审核状态',
+        columnWidth: 0.2,
+        datas: [
+            ["已审核", "已审核"],
+            ["未审核", "未审核"]
+        ]
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

+ 105 - 0
frontend/saas-web/app/view/stock/report/ProdinoutCount.js

@@ -0,0 +1,105 @@
+Ext.define('saas.view.stock.report.ProdinoutCount', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'stock-report-prodinoutCount',
+
+    controller: 'stock-report-prodinoutCount',
+    viewModel: 'stock-report-prodinoutCount',
+
+    viewName: 'stock-report-prodinoutCount',
+    //按物料分组
+    groupField: null,
+    listUrl: '/api/stock/report/prodinoutCount',
+    defaultCondition: null,
+    reportTitle: '物料收发汇总表',
+    QueryWidth:0.25,
+    //筛选:仓库、物料、物料类型、时间			
+    searchItems: [{		
+        xtype: 'dbfindtrigger',
+        name: 'pd_whcode',
+        fieldLabel: '仓库编号',
+        columnWidth: 0.25
+    }, {		
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode',
+        fieldLabel: '物料编号',
+        columnWidth: 0.25
+    }, {		
+        xtype: 'remotecombo',
+        editable:false,
+        name: 'pd_prodcode',
+        fieldLabel: '物料类型',
+        columnWidth: 0.25,
+        storeUrl:'/api/document/producttype/getCombo',
+        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();
+        }
+    }, {
+        xtype: 'condatefield',
+        name: 'pi_date',
+        fieldLabel: '单据日期',
+        columnWidth: 0.5
+    }],
+    reportColumns: [{
+        text: '物料类型',
+        dataIndex: 'pr_kind'
+    }, {
+        text: '物料编号',
+        dataIndex: 'pr_code',
+        width: 200
+    }, {
+        text: '物料名称',
+        dataIndex: 'pr_detail',
+        width: 200
+    }, {
+        text: '物料规格',
+        dataIndex: 'pr_spec'
+    }, {
+        text: '单位',
+        dataIndex: 'pr_unit'
+    }, {
+        text: '仓库',
+        dataIndex:'pd_whcode'
+    }, {
+        text: '期初',
+        columns: [{
+            text: '数量'
+        },{
+            text: '成本'
+        }]
+    }, {
+        text: '入库合计',
+        columns: [{
+            text: '数量'
+        },{
+            text: '成本'
+        }]
+    }, {
+        text: '出库合计',
+        columns: [{
+            text: '数量'
+        },{
+            text: '成本'
+        }]
+    }, {
+        text: '结存',
+        columns: [{
+            text: '数量'
+        },{
+            text: '成本'
+        }]
+    }]
+});

+ 177 - 0
frontend/saas-web/app/view/stock/report/ProdinoutCountController.js

@@ -0,0 +1,177 @@
+Ext.define('saas.view.stock.report.ProdinoutCountController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'stock-report-prodinoutCount',
+    init: function (form) {
+        this.control({
+           //放大镜赋值关系 以及 tpl模板
+           'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'/api/document/product/list',
+                        addXtype: 'document-product-formpanel',
+                        addTitle: '物料资料',
+                        dbfinds:[
+                        {
+                            from:'pr_code',to:'pd_prodcode'
+                        }, {
+                            from:'pr_detail',to:'pr_detail'
+                        }, {
+                            from:'pr_spec',to:'pr_spec'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
+                            "dataIndex": "pr_code",
+                            "width": 200,
+                        }, {
+                            "text": "物料名称",
+                            "width": 200,
+                            "dataIndex": "pr_detail",
+                        }, {
+                            "text": "规格",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        }, {
+                            "text": "单位",
+                            "dataIndex": "pr_unit",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
+                            "width": 200,
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                            align:'right'
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                            align:'right'
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]
+                    }) ;   
+
+                }
+            },
+            'dbfindtrigger[name=pd_whcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'wh_code',
+                        dataUrl:'/api/document/warehouse/list',
+                        addXtype: 'other-storeinformation',
+                        addTitle: '仓库资料',
+                        dbfinds:[{
+                            from:'id',to:'id',ignore:true 
+                        }, { 
+                            from:'wh_code',to:'pd_whcode'
+                        }, {
+                            from:'wh_description',to:'wh_description'
+                        }],
+                        dbtpls:[{
+                            field:'wh_code',width:100
+                        },{
+                            field:'wh_description',width:100
+                        }],
+                        defaultCondition: "wh_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(wh_code) like '%" + v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "仓库ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 1,
+                            "dataIndex": "wh_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库名称",
+                            "flex": 1,
+                            "dataIndex": "wh_description",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库类型",
+                            "flex": 0,
+                            "dataIndex": "wh_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库状态",
+                            "flex": 0,
+                            "dataIndex": "wh_status",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+         });
+        }
+});

+ 4 - 0
frontend/saas-web/app/view/stock/report/ProdinoutCountModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.stock.report.ProdinoutCountModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'stock-report-prodinoutCount'
+});

+ 138 - 0
frontend/saas-web/app/view/stock/report/Prodiodetail.js

@@ -0,0 +1,138 @@
+Ext.define('saas.view.stock.report.Prodiodetail', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'stock-report-prodiodetail',
+
+    controller: 'stock-report-prodiodetail',
+    viewModel: 'stock-report-prodiodetail',
+
+    viewName: 'stock-report-prodiodetail',
+  //  按物料分组
+    groupField: 'pd_prodcode',
+    listUrl: '/api/stock/report/prodiodetail',
+    defaultCondition: null,
+    reportTitle: '物料出入库明细表',
+    QueryWidth:0.25,
+    //筛选:单据类型、物料、日期
+    searchItems: [{
+        xtype: 'multicombo',
+        name: 'pi_class',
+        fieldLabel: '单据类型',
+        allowBlank: true,
+        columnWidth: 0.25,
+        datas: [
+            ["采购验收单", "采购验收单"],
+            ["采购验退单", "采购验退单"],
+            ["出货单", "出货单"],
+            ["销售退货单", "销售退货单"],
+            ["完工入库单", "完工入库单"],
+            ["生产领料单", "生产领料单"],
+            ["其它入库单", "其它入库单"],
+            ["其它出库单", "其它出库单"],
+            ["调拨单", "调拨单"],
+            ["库存初始化","库存初始化"]
+        ]
+    }, {		
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode',
+        fieldLabel: '物料编号',
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'pi_date',
+        fieldLabel: '单据日期',
+        columnWidth: 0.5
+    }],
+  //  单号	单据类型	客户/供应商编号	客户/供应商名称	单据日期	序号	
+  //物料类型	物料编号	物料名称	物料规格	单位	入库数量	出库数量	成本单价	备注
+    reportColumns: [{
+        text: 'id',
+        dataIndex: 'id',
+        hidden: true
+    }, {
+        text: '单号',
+        dataIndex: 'pi_inoutno',
+        width: 200
+    }, {
+        text: '单据类型',
+        dataIndex: 'pi_class',
+        width: 200
+    }, {
+        text: '客户/供应商编号',
+        dataIndex: 'bizcode',
+        width: 200
+    }, {
+        text: '客户/供应商名称',
+        dataIndex: 'bizname',
+        width: 200
+    }, {
+        text: '日期',
+        dataIndex: 'pi_date',
+        xtype: 'datecolumn'
+    }, {
+        text: '序号',
+        dataIndex: 'pd_pdno'
+    }, {
+        text: '物料类型',
+        dataIndex: 'pr_kind'
+    }, {
+        text: '物料编号',
+        dataIndex: 'pd_prodcode',
+        width: 200
+    }, {
+        text: '物料名称',
+        dataIndex: 'pr_detail',
+        width: 200
+    }, {
+        text: '物料规格',
+        dataIndex: 'pr_spec'
+    }, {
+        text: '单位',
+        dataIndex: 'pd_unit'
+    }, {
+        text: '入库数量',
+        dataIndex: 'inqty',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(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)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {
+        text: '出库数量',
+        dataIndex: 'outqty',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(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)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {
+        text: '成本单价',
+        dataIndex: 'pd_price',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {
+        text: '备注',
+        dataIndex: 'pd_remark',
+        width: 250
+    }]
+
+});

+ 107 - 0
frontend/saas-web/app/view/stock/report/ProdiodetailController.js

@@ -0,0 +1,107 @@
+Ext.define('saas.view.stock.report.ProdiodetailController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'stock-report-prodiodetail',
+    init: function (form) {
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'/api/document/product/list',
+                        addXtype: 'document-product-formpanel',
+                        addTitle: '物料资料',
+                        dbfinds:[
+                        {
+                            from:'pr_code',to:'pd_prodcode'
+                        }, {
+                            from:'pr_detail',to:'pr_detail'
+                        }, {
+                            from:'pr_spec',to:'pr_spec'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
+                            "dataIndex": "pr_code",
+                            "width": 200,
+                        }, {
+                            "text": "物料名称",
+                            "width": 200,
+                            "dataIndex": "pr_detail",
+                        }, {
+                            "text": "规格",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        }, {
+                            "text": "单位",
+                            "dataIndex": "pr_unit",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
+                            "width": 200,
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                            align:'right'
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                            align:'right'
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]
+                    }) ;   
+
+                }
+            }
+         });
+        }
+});

+ 4 - 0
frontend/saas-web/app/view/stock/report/ProdiodetailModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.stock.report.ProdiodetailModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'stock-report-prodiodetail'
+});

+ 6 - 2
frontend/saas-web/resources/json/navigation.json

@@ -112,9 +112,13 @@
     }, {
         "text": "报表",
         "items": [{
-            "text": "物料出入库明细表"
+            "text": "物料出入库明细表",
+            "id":"prodiodetail",
+            "viewType": "stock-report-prodiodetail"
         }, {
-            "text": "物料收发汇总表"
+            "text": "物料收发汇总表",
+            "id":"prodinoutCount",
+            "viewType": "stock-report-prodinoutCount"
         }, {
             "text": "物料库存数量金额表",
             "id":"stock-stockamount-datalist",