| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- Ext.define('saas.view.document.vendor.BasePanelController', {
- extend: 'saas.view.core.base.BasePanelController',
- alias: 'controller.document-vendor-basepanel',
- init: function (form) {
- var me = this;
- this.control({
- // 主表-供应商名称
- 'dbfindtrigger[name=ve_code]':{
- beforerender:function(f){
- Ext.apply(f,{
- //数据接口
- dataUrl:'/api/document/vendor/list',
- addXtype: 'document-vendor-formpanel',
- addTitle: '供应商资料',
- defaultCondition:"ve_statuscode='OPEN'",
- //赋值
- dbfinds:[{
- from:'id',to:'id',ignore:true
- },{
- from:'ve_code',to:'ve_code'
- },{
- from:'ve_name',to:'ve_name'
- },{
- from:'ve_type',to:'ve_type'
- },{
- from:'ve_promisedays',to:'ve_promisedays'
- },{
- from:'ve_statuscode',to:'ve_statuscode'
- },{
- from:'ve_name',to:'ve_name'
- }],
- //联想设置
- dbtpls:[{
- field:'ve_code',width:100
- },{
- field:'ve_name',width:100
- }],
- defaultCondition: "ve_statuscode='OPEN'",
- dbSearchFields:[{
- emptyText:'输入供应商编号或名称',
- xtype : "textfield",
- name : "search",
- getCondition: function(v) {
- return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
- },
- allowBlank : true,
- columnWidth : 0.25
- }],
- //放大镜窗口列表
- dbColumns:[{
- "text": "供应商ID",
- "hidden": true,
- "dataIndex": "id",
- "width": 100,
- "xtype": "numbercolumn"
- },{
- "text": "供应商编号",
- "dataIndex": "ve_code",
- "width": 200
- }, {
- "text": "供应商名称",
- "dataIndex": "ve_name",
- "width": 200
- }, {
- "text": "供应商类型",
- "dataIndex": "ve_type",
- "width": 180,
- "items": null
- }, {
- "text": "税率",
- "dataIndex": "ve_taxrate",
- "width": 100,
- xtype: 'numbercolumn'
- }, {
- "text": "承付天数",
- "dataIndex": "ve_promisedays",
- "width": 100,
- xtype: 'numbercolumn',
- renderer : function(v) {
- return Ext.util.Format.number(v, '0');
- }
- }, {
- "text": "纳税人识别号",
- "dataIndex": "ve_bankaccount",
- "width": 150
- }, {
- "text": "开户银行",
- "dataIndex": "ve_bankaccount",
- "width": 100
- }, {
- "text": "银行账户",
- "dataIndex": "ve_bankcode",
- "width": 100
- }]
- }) ;
- }
- }
- });
- }
- });
|