| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- 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_code",
- width:300,
- emptyText:'输入物料编号、名称、型号或品牌',
- getCondition: function (v) {
- return "(upper(CONCAT(pr_code,'#',pr_detail,'#',ifnull(pr_orispeccode,''),'#',ifnull(pr_brand,''))) like '%" + v.toUpperCase() + "%' )";
- },
- },{
- editable:true,
- hiddenBtn:true,
- xtype : "remotecombo",
- storeUrl: '/api/document/producttype/getCombo',
- name : "pr_kind",
- fieldLabel : '物料类型',
- emptyText: '全部',
- }, {
- xtype: 'combobox',
- name: 'pr_statuscode',
- queryMode: 'local',
- displayField: 'pr_status',
- valueField: 'pr_statuscode',
- fieldLabel : '状态',
- emptyText: '全部',
- editable:false,
- defaultValue:'ENABLE',
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['pr_statuscode', 'pr_status'],
- data: [
- ["ALL", "全部"],
- ["ENABLE", "已启用"],
- ["BANNED", "已禁用"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL' || !value) {
- return '1=1';
- }else {
- return 'pr_statuscode=\'' + value + '\'';
- }
- }
- }],
- //字段属性
- 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',
- caller: 'Product',
- columns : [{
- text : "id",
- width : 0,
- dataIndex : "id",
- xtype : "numbercolumn",
- },{
- text : "物料编号",
- dataIndex : "pr_code",
- width : 150.0
- },{
- text : "品牌",
- dataIndex : "pr_brand",
- width : 100.0
- }, {
- text : "物料名称",
- dataIndex : "pr_detail",
- width : 150.0
- }, {
- text : "型号",
- dataIndex : "pr_orispeccode",
- width : 200.0
- }, {
- text : "规格",
- dataIndex : "pr_spec",
- width : 200.0
- }, {
- text : "物料类型",
- dataIndex : "pr_kind",
- width:100
- }, {
- text : "库存",
- dataIndex : "po_onhand",
- xtype: 'numbercolumn',
- width : 100.0,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 3, false);
- }
- }, {
- text : "单位",
- dataIndex : "pr_unit",
- width : 65.0
- }, {
- text : "标准定价(元)",
- dataIndex : "pr_standardprice",
- xtype: 'numbercolumn',
- width : 110.0,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 4, true);
- }
- }, {
- text : "最新购价(元)",
- dataIndex : "pr_purcprice",
- xtype: 'numbercolumn',
- width : 110.0,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 4, true);
- }
- }, {
- text : "最新售价(元)",
- dataIndex : "pr_saleprice",
- xtype: 'numbercolumn',
- width : 110.0,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 4, true);
- }
- }, {
- text : "备注",
- dataIndex : "pr_text1",
- width :250.0
- }, {
- text : "状态",
- dataIndex : "pr_status",
- align:'center',
- width : 80.0
- }]
- },
- refresh:function(){
- this.items.items[0].store.load()
- }
- });
|