| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- Ext.define('saas.view.document.vendor.BasePanel', {
- extend: 'saas.view.core.base.BasePanel',
- xtype: 'document-vendor-basepanel',
- controller: 'document-vendor-basepanel',
- viewModel: 'document-vendor-basepanel',
- searchField:[{
- xtype : "dbfindtrigger",
- name : "ve_code",
- emptyText : "供应商编号",
- width:140,
- },{
- xtype : "textfield",
- name : "ve_name",
- emptyText : "供应商名称",
- width:140,
- },{
- xtype : "remotecombo",
- storeUrl:'/api/document/vendorkind/getCombo',
- name : "ve_type",
- emptyText : "供应商类型",
- width:140,
- hiddenBtn:true
- },{
- xtype : "textfield",
- name : "ve_promisedays",
- emptyText : "承付天数",
- width:120,
- getCondition: function(value) {
- if(value.indexOf("=")>=0||value.indexOf("<")>=0||value.indexOf(">")>=0){
- return ' ve_promisedays '+value;
- }else if(value){
- return ' ve_promisedays = '+value;
- }else{
- return '1=1';
- }
- }
- },{
- xtype: 'combobox',
- name: 've_statuscode',
- queryMode: 'local',
- displayField: 've_status',
- valueField: 've_statuscode',
- emptyText :'状态',
- width:100,
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['ve_statuscode', 've_status'],
- data: [
- ["ALL", "全部"],
- ["OPEN", "已开启"],
- ["CLOSE", "已关闭"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL'||value == null) {
- return '1=1';
- }else {
- return 've_statuscode=\'' + value + '\'';
- }
- }
- }],
- //字段属性
- _formXtype:'document-vendor-formpanel',
- _title:'供应商资料',
- // _dataUrl:'/api/ducument/vendor/list',
- _deleteUrl:'/api/document/vendor/delete/',
- _batchOpenUrl:'/api/document/vendor/batchOpen',
- _batchCloseUrl:'/api/document/vendor/batchClose',
- _batchDeleteUrl:'/api/document/vendor/batchDelete',
- gridConfig: {
- idField: 'id',
- codeField: 've_code',
- statusCodeField:'ve_statuscode',
- dataUrl: '/api/document/vendor/list',
- columns : [{
- text : "供应商id",
- width : 0,
- dataIndex : "id",
- xtype : "numbercolumn",
- },{
- text : "供应商编号",
- width : 200.0,
- dataIndex : "ve_code",
- xtype : "",
- },
- {
- text : "供应商名称",
- dataIndex : "ve_name",
- width : 120.0,
- xtype : "",
- },
- {
- text : "类型",
- dataIndex : "ve_type",
- width : 120.0,
- xtype : "",
- },
- {
- text : "供应商状态码",
- dataIndex : "ve_statuscode",
- width : 0,
- xtype : ""
- },
- {
- text : "税率",
- dataIndex : "ve_taxrate",
- width : 120.0,
- xtype : "",
- align:'end'
- }, {
- text : "承付天数",
- xtype: 'numbercolumn',
- dataIndex : "ve_promisedays",
- width : 120.0,
- align:'end',
- renderer : function(v) {
- return Ext.util.Format.number(v, '0');
- }
- }, {
- text : "纳税人识别号",
- dataIndex : "ve_nsrzh",
- width : 120.0,
- xtype : ""
- }, {
- text : "开户银行",
- dataIndex : "ve_bankcode",
- width : 120.0,
- xtype : ""
- }, {
- text : "银行账户",
- dataIndex : "ve_bankaccount",
- width : 120.0,
- xtype : ""
- }, {
- text : "状态",
- dataIndex : "ve_status",
- width : 120.0,
- xtype : ""
- },{
- text: '应收款余额',
- dataIndex : 've_leftamount',
- width : 120,
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- },
- }]
- },
- refresh:function(){
- this.items.items[0].store.load()
- }
- });
|