| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- Ext.define('saas.view.document.product.BasePanel', {
- extend: 'saas.view.core.base.BasePanel',
- xtype: 'document-product-basepanel',
- controller: 'document-product-basepanel',
- viewModel: 'document-product-basepanel',
- deleteMoreMsg: '删除的物料将不能恢复,请确认是否删除?',
- deleteOneMsg: '删除的物料将不能恢复,请确认是否删除?',
- searchField:[{
- xtype : "textfield",
- name : "pr_detail",
- width:150,
- emptyText:'物料编号或名称',
- getCondition: function(value) {
- return ' (pr_code like\'%' + value + '%\''
- +' or pr_detail like \'%'+value+'%\' ) ';
- }
- }, {
- editable:true,
- hiddenBtn:true,
- xtype : "remotecombo",
- storeUrl: '/api/document/producttype/getCombo',
- name : "pr_kind",
- emptyText : "类型",
- width:110,
- }, {
- xtype: 'combobox',
- name: 'pr_statuscode',
- queryMode: 'local',
- displayField: 'pr_status',
- valueField: 'pr_statuscode',
- emptyText :'状态',
- width:90,
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['pr_statuscode', 'pr_status'],
- data: [
- ["ALL", "全部"],
- ["OPEN", "已开启"],
- ["CLOSE", "已关闭"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL' || !value) {
- return '1=1';
- }else {
- return 'pr_statuscode=\'' + value + '\'';
- }
- }
- }, {
- xtype : "textfield",
- name : "pr_brand",
- emptyText : "品牌",
- width:110
- }],
- //字段属性
- caller:'Product',
- _formXtype:'document-product-formpanel',
- _title:'物料资料',
- _deleteUrl:'/api/document/product/delete',
- _batchOpenUrl:'/api/document/product/batchOpen',
- _batchCloseUrl:'/api/document/product/batchClose',
- _batchDeleteUrl:'/api/document/product/batchDelete',
- gridConfig: {
- idField: 'id',
- codeField: 'pr_code',
- statusCodeField:'pr_statuscode',
- dataUrl: '/api/document/product/list',
- columns : [{
- text : "id",
- width : 0,
- dataIndex : "id",
- xtype : "numbercolumn",
- },{
- text : "物料编号",
- dataIndex : "pr_code",
- width : 150.0
- }, {
- text : "物料名称",
- dataIndex : "pr_detail",
- width : 200.0
- }, {
- text : "规格",
- dataIndex : "pr_spec",
- width : 150.0
- }, {
- text : "类型",
- dataIndex : "pr_kind",
- width : 110.0
- }, {
- text : "单位",
- dataIndex : "pr_unit",
- width : 80.0
- }, {
- text : "品牌",
- dataIndex : "pr_brand",
- width : 110.0
- }, {
- text : "总库存",
- dataIndex : "po_onhand",
- xtype: 'numbercolumn',
- width : 110.0,
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
- var format = '0.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- }, {
- text : "标准单价",
- dataIndex : "pr_standardprice",
- xtype: 'numbercolumn',
- width : 110.0,
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- }, {
- text : "最新采购单价",
- dataIndex : "pr_purcprice",
- xtype: 'numbercolumn',
- width : 110.0,
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
- var format = '0.' + xr.join();
- return Ext.util.Format.number(v, format);
- },
- width : 200.0,
- }, {
- text : "最新出库价",
- dataIndex : "pr_saleprice",
- xtype: 'numbercolumn',
- width : 110.0,
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
- var format = '0.' + xr.join();
- return Ext.util.Format.number(v, format);
- },
- width : 200.0,
- }, {
- text : "备注",
- dataIndex : "pr_text1",
- width :250.0
- }, {
- text : "状态",
- dataIndex : "pr_status",
- width : 90.0
- }]
- },
- refresh:function(){
- this.items.items[0].store.load()
- }
- });
|