Browse Source

付款单配置

zhuth 7 years ago
parent
commit
d842a1901c

+ 11 - 0
frontend/saas-web/app/model/money/RecBalance1.js

@@ -0,0 +1,11 @@
+Ext.define('saas.model.money.RecBalance1', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'rd_detno', type: 'number' },
+        { name: 'rd_bankname', type: 'string' },
+        { name: 'rd_amount', type: 'number' },
+        { name: 'rd_paymethod', type: 'string' },
+        { name: 'rd_paycode', type: 'string' },
+        { name: 'rd_remark', type: 'string' }
+    ]
+});

+ 14 - 0
frontend/saas-web/app/model/money/RecBalance2.js

@@ -0,0 +1,14 @@
+Ext.define('saas.model.money.RecBalance2', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'rbd_detno', type: 'number' },
+        { name: 'rbd_slcode', type: 'string' },
+        { name: 'rbd_slkind', type: 'string' },
+        { name: 'rbd_sldate', type: 'date' },
+        { name: 'rbd_amount', type: 'number' },
+        { name: 'rbd_remark', type: 'number' },
+        { name: 'pbd_nowbalance', type: 'number' },
+        { name: 'pbd_nowbalance', type: 'number' },
+        { name: 'pbd_nowbalance', type: 'number' }
+    ]
+});

+ 6 - 13
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -7,30 +7,23 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
 
     viewName: 'money-paybalance-formpanel',
 
-    caller: 'Purchase',
+    caller: 'PayBalance',
 
     //字段属性
     _title: '付款单',
     _idField: 'id',
-    _codeField: 'pu_code',
-    _statusField: 'pu_status',
-    _statusCodeField: 'pu_statuscode',
+    _codeField: 'pd_code',
+    _statusField: 'pd_status',
+    _statusCodeField: 'pd_statuscode',
     
-    _relationColumn: 'pd_puid',
-    _readUrl: 'http://192.168.0.181:8560/api/purchase/purchase/read/',
-    _saveUrl: 'http://192.168.0.181:8560/api/purchase/purchase/save',
+    _readUrl: 'http://192.168.253.129:8920/api/money/recbalance/read',
+    _saveUrl: 'http://192.168.253.129:8920/money/paybalance/save',
     _auditUrl: 'http://192.168.0.181:8560/api/purchase/purchase/audit',
     _deleteUrl: 'http://192.168.0.181:8560/api/purchase/purchase/delete/',
     _deleteDetailUrl: 'http://192.168.0.181:8560/api/purchase/purchase/deleteItem/',
     _turnInUrl: 'http://192.168.253.228:8800/purchase/turnProdin/',
     initId: 0,
 
-    // toolBtns: [{
-    //     xtype: 'button',
-    //     text: '转采购验收单',
-    //     handler: 'turnIn'
-    // }],
-
     defaultItems: [{
         xtype: 'hidden',
         name: 'id',

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

@@ -1,4 +1,4 @@
-Ext.define('saas.view.money.paybalance.FormPanelController', {
+Ext.define('saas.view.money.payBalance.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
     alias: 'controller.money-paybalance-formpanel',
 

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

@@ -1,4 +1,4 @@
-Ext.define('saas.view.money.paybalance.FormPanelModel', {
+Ext.define('saas.view.money.payBalance.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.money-paybalance-formpanel',
 

+ 177 - 0
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -0,0 +1,177 @@
+Ext.define('saas.view.money.recBalance.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'money-recbalance-formpanel',
+
+    controller: 'money-recbalance-formpanel',
+    viewModel: 'money-recbalance-formpanel',
+
+    viewName: 'money-recbalance-formpanel',
+
+    caller: 'RecBalance',
+
+    //字段属性
+    _title: '收款单',
+    _idField: 'id',
+    _codeField: 'pd_code',
+    _statusField: 'pd_status',
+    _statusCodeField: 'pd_statuscode',
+    
+    _readUrl: 'http://192.168.253.129:8920/api/money/recbalance/read',
+    _saveUrl: 'http://192.168.253.129:8920/money/recbalance/save',
+    _auditUrl: 'http://192.168.0.181:8560/api/purchase/purchase/audit',
+    _deleteUrl: 'http://192.168.0.181:8560/api/purchase/purchase/delete/',
+    _deleteDetailUrl: 'http://192.168.0.181:8560/api/purchase/purchase/deleteItem/',
+    _turnInUrl: 'http://192.168.253.228:8800/purchase/turnProdin/',
+    initId: 0,
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        fieldLabel: 'id'
+    }, {
+        xtype: 'hidden',
+        name: 'custid',
+        fieldLabel: '客户ID'
+    }, {
+        xtype: 'hidden',
+        name: 'custcode',
+        fieldLabel: '客户编号'
+    }, {
+        xtype: "dbfindtrigger",
+        name: "rb_custname",
+        fieldLabel: "客户名称"
+    }, {
+        xtype: "numberfield",
+        name: "rb_rbdamount",
+        fieldLabel: "总欠款"
+    }, {
+        xtype: "datefield",
+        name: "rb_date",
+        fieldLabel: "日期"
+    }, {
+        xtype: "dbfindtrigger",
+        name: "rb_manname",
+        fieldLabel: "收款人"
+    }, {
+        xtype: 'textareafield',
+        name: 'rb_remark',
+        fieldLabel: '备注',
+        columnWidth: 1
+    }, {
+        xtype: "numberfield",
+        name: "rb_discounts",
+        fieldLabel: "整单折扣"
+    }, {
+        xtype: 'numberfield',
+        name: 'rb_preamount',
+        fieldLabel : '本次预收款'
+    }, {
+        xtype: "detailGridField",
+        storeModel: 'saas.model.money.RecBalance1',
+        _detnoColumn: 'rd_detno',
+        columns: [{
+            text: "序号",
+            dataIndex: "rd_detno",
+            width: 100,
+            xtype: "numbercolumn",
+            align: 'center',
+            format: '0',
+            summaryType: 'count',
+            summaryRenderer: function (value, summaryData, dataIndex) {
+                return Ext.String.format('合计: {0}条', value);
+            },
+        }, {
+            text: '资金账户',
+            dataIndex: 'rd_bankname',
+            width : 200.0, 
+            editor : {
+                displayField : "display", 
+                editable : true, 
+                format : "", 
+                hideTrigger : false, 
+                maxLength : 100.0, 
+                minValue : null, 
+                positiveNum : false, 
+                queryMode : "local", 
+                store : null, 
+                valueField : "value", 
+                xtype : "dbfindtrigger"
+            }
+        }, {
+            text: "收款金额",
+            dataIndex: "rd_amount",
+        }, {
+            text: "结算方式",
+            dataIndex: "rd_paymethod"
+        }, {
+            text: "结算号",
+            dataIndex: "rd_paycode"
+        }, {
+            text: "备注",
+            dataIndex: "rd_remark"
+        }]
+    }, {
+        xtype: "detailGridField",
+        storeModel: 'saas.model.money.RecBalance1',
+        _detnoColumn: 'rbd_detno',
+        columns: [{
+            text: "序号",
+            dataIndex: "rbd_detno",
+            width: 100,
+            xtype: "numbercolumn",
+            align: 'center',
+            format: '0',
+            summaryType: 'count',
+            summaryRenderer: function (value, summaryData, dataIndex) {
+                return Ext.String.format('合计: {0}条', value);
+            },
+        }, {
+            text: '来源单号',
+            dataIndex: 'rbd_slcode'
+        }, {
+            text: "业务类型",
+            dataIndex: "rbd_slkind",
+        }, {
+            text: "单据日期",
+            dataIndex: "rbd_sldate"
+        }, {
+            text: "单据金额",
+            dataIndex: "rbd_amount"
+        }, {
+            text: "已核销金额",
+            dataIndex: "rbd_nowbalance"
+        }, {
+            text: "未核销金额",
+            dataIndex: "pbd_nowbalance"
+        }, {
+            text: "本次核销金额",
+            dataIndex: "pbd_nowbalance"
+        }]
+    }, {
+        xtype: 'textfield',
+        name: 'companyid',
+        fieldLabel: '公司id'
+    }, {
+        format: "Y-m-d h:i:s",
+        xtype: "datefield",
+        name: "pb_recorddate",
+        fieldLabel: "创建时间"
+    }, {
+        format: "Y-m-d h:i:s",
+        xtype: "datefield",
+        name: "updatedate",
+        fieldLabel: "更新时间"
+    }, {
+        xtype: "textfield",
+        readOnly: true,
+        editable: false,
+        name: "pd_status",
+        fieldLabel: "单据状态"
+    }, {
+        xtype: "hidden",
+        readOnly: true,
+        editable: false,
+        name: "pd_statuscode",
+        fieldLabel: "单据状态码"
+    }]
+});

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

@@ -0,0 +1,158 @@
+Ext.define('saas.view.money.recBalance.FormPanelController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.money-recbalance-formpanel',
+
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "flex": 0,
+                            "dataIndex": "pr_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "物料编号",
+                            "flex": 1,
+                            "dataIndex": "pr_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料名称",
+                            "flex": 1,
+                            "dataIndex": "pr_detail",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料规格",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    addCombo:function(){
+        var combo=this.ownerCmp;
+        Ext.create('Ext.window.Window',{
+            layout:'vbox',
+            bodyPadding: 15,
+            width:500,
+            items:[{
+                fieldLabel:'实际值',
+                xtype:'textfield'
+            },{
+                fieldLabel:'显示值',
+                xtype:'textfield'
+            }],
+            buttons:[{
+                text:'确认',
+                handler:function(b){
+                    combo.setValue('ok');
+                    b.up('window').close();
+                }
+            }],
+            renderTo:this.ownerCmp.ownerCt.getEl()
+        }).show();
+
+    },
+
+    turnIn: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnInUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','转单成功');
+              
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','转单失败');
+        });
+     }
+});

+ 5 - 0
frontend/saas-web/app/view/money/recBalance/FormPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.money.recBalance.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.money-recbalance-formpanel',
+
+});

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

@@ -0,0 +1,196 @@
+Ext.define('saas.view.money.recBalance.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'money-recbalance-querypanel',
+
+    controller: 'money-recbalance-querypanel',
+    viewModel: 'money-recbalance-querypanel',
+
+    viewName: 'money-recbalance-querypanel',
+    
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'pu_id',
+        bind: '{pu_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        getCondition: function(value) {
+            return 'pu_id=' + value;
+        }
+    }, {
+        xtype: 'textfield',
+        name: 'pu_code',
+        bind: '{pu_code}',
+        fieldLabel: '单据编号'
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_date',
+        bind: '{pu_date}',
+        fieldLabel: '采购日期',
+        columnWidth: 0.5,
+        operation: 'between'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendcode',
+        bind: '{pu_vendcode}',
+        fieldLabel: '供应商编号'
+    }, {
+        xtype: 'textfield',
+        name: 'pu_vendname',
+        bind: '{pu_vendname}',
+        fieldLabel: '供应商名称'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        showDetail: true
+    }, {
+        xtype: 'textfield',
+        name: 'pr_detail',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        showDetail: true
+    }, {
+        xtype: 'combobox',
+        name: 'pu_statuscode',
+       // bind: '{pu_statuscode}',
+        fieldLabel: '审核状态',
+        queryMode: 'local',
+        displayField: 'pu_status',
+        valueField: 'pu_statuscode',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+        fields: ['pu_statuscode', 'pu_status'],
+        data: [
+            ["$ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ]
+        })
+    }, {
+        xtype: 'multicombo',
+        name: 'pu_acceptstatuscode',
+        bind: '{pu_acceptstatuscode}',
+        fieldLabel: '入库状态',
+        datas: [
+            ["TURNIN", "已入库"],
+            ["UNTURNIN", "未入库"],
+            ["PARTIN", "部分入库"]
+        ]
+    }],
+    moreQueryFormItems: [{
+        xtype: 'textfield',
+        name: 'pu_buyername',
+        bind: '{pu_buyername}',
+        fieldLabel: '采购员'
+    }, {
+        xtype: 'textfield',
+        name: 'pu_total',
+        bind: '{pu_total}',
+        fieldLabel: '金额'
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_delivery',
+        bind: '{pu_delivery}',
+        fieldLabel: '交货日期',
+        columnWidth: 1
+    }],
+    queryGridConfig: {
+        idField: 'pu_id',
+        codeField: 'pu_code',
+        addTitle: '采购单',
+        addXtype: 'purchase-purchase-formpanel',
+        defaultCondition:'',
+        baseVastUrl: 'http://192.168.253.58:8800/purchase/',
+        baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '含税金额',
+            dataIndex: 'pu_taxtotal',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '金额',
+            dataIndex: 'pu_total',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }],
+        relativeColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '采购序号',
+            dataIndex: 'pd_detno',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
+            width: 120
+        }, {
+            text: '数量',
+            dataIndex: 'pd_qty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '单价',
+            dataIndex: 'pd_price',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已转数',
+            dataIndex: 'pd_ytqy',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }]
+    }
+});

+ 117 - 0
frontend/saas-web/app/view/money/recBalance/QueryPanelController.js

@@ -0,0 +1,117 @@
+Ext.define('saas.view.money.recBalance.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.money-recbalance-querypanel',
+    
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                        }, {
+                            from:'pr_detail',to:'pr_detail'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "flex": 0,
+                            "dataIndex": "pr_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "物料编号",
+                            "flex": 1,
+                            "dataIndex": "pr_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料名称",
+                            "flex": 1,
+                            "dataIndex": "pr_detail",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料规格",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

+ 5 - 0
frontend/saas-web/app/view/money/recBalance/QueryPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.money.recBalance.QueryPanelModel', {
+    extend: 'saas.view.core.query.QueryPanelModel',
+    alias: 'viewmodel.money-recbalance-querypanel'
+
+});