| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- Ext.define('saas.view.stock.make.QueryPanel', {
- extend: 'saas.view.core.query.QueryPanel',
- xtype: 'stock-make-querypanel',
- controller: 'stock-make-querypanel',
- viewModel: 'stock-make-querypanel',
- viewName: 'stock-make-querypanel',
-
- queryFormItems: [{
- xtype: 'textfield',
- name: 'ma_code',
- emptyText :'请输入单号',
- }, {
- xtype: 'condatefield',
- name: 'createTime',
- fieldLabel: '日期',
- columnWidth: 0.5,
- operation: 'between'
- },{
- xtype: 'productDbfindTrigger',
- name: 'ma_prodcode',
- fieldLabel: '产品',
- emptyText :'请输入产品名称或编号',
- getCondition: function(value) {
- if(value == 'ALL') {
- return '1=1';
- }else {
- return ' (ma_prodcode like\'%' + value + '%\' or ma_proddetail like \'%'+value+'%\') ';
- }
- }
- }, {
- xtype: 'combobox',
- name: 'ma_type',
- fieldLabel: '类型',
- allowBlank: true,
- editable:false,
- columnWidth: 0.25,
- emptyText :'全部',
- queryMode: 'local',
- displayField: 'name',
- valueField: 'value',
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['name', 'value'],
- data: [
- ["全部", "ALL"],
- ["组装", "组装"],
- ["拆件", "拆件"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL') {
- return '1=1';
- }else {
- return 'ma_type=\'' + value + '\'';
- }
- }
- }, {
- xtype: 'combobox',
- name: 'ma_statuscode',
- fieldLabel: '单据状态',
- queryMode: 'local',
- displayField: 'ma_status',
- valueField: 'ma_statuscode',
- emptyText :'全部',
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['ma_statuscode', 'ma_status'],
- data: [
- ["ALL", "全部"],
- ["AUDITED", "已审核"],
- ["UNAUDITED", "未审核"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL') {
- return '1=1';
- }else {
- return 'ma_statuscode=\'' + value + '\'';
- }
- }
- }, {
- xtype: 'accountDbfindTrigger',
- name: 'creatorName',
- fieldLabel: '录入人',
- emptyText:'请输入账户名称或姓名',
- getCondition: function(value) {
- if(!value) {
- return '1=1';
- }else {
- return 'make.creatorName like\'%' + value + '%\'';
- }
- }
- }, {
- xtype: 'accountDbfindTrigger',
- name: 'ma_auditman',
- fieldLabel: '审核人',
- emptyText:'请输入账户名称或姓名'
- }],
- moreQueryFormItems: [],
- queryGridConfig: {
- idField: 'id',
- codeField: 'ma_code',
- addTitle: '制造单',
- addXtype: 'stock-make-formpanel',
- defaultCondition:'',
- baseVastUrl: '/api/storage/make/',
- caller:'Make',
- baseColumn: [{
- text: 'id',
- dataIndex: 'id',
- hidden:true,
- xtype: 'numbercolumn'
- }, {
- text: '制造单号',
- dataIndex: 'ma_code',
- width: 150
- }, {
- text: '类型',
- dataIndex: 'ma_type',
- width: 110
- }, {
- text: '产品编号',
- dataIndex: 'ma_prodcode',
- width: 150
- }, {
- text: '产品名称',
- dataIndex: 'ma_proddetail',
- width: 200
- }, {
- text: '版本号',
- dataIndex: 'ma_version',
- width: 80
- }, {
- text: '数量',
- dataIndex: 'ma_qty',
- xtype: 'numbercolumn',
- width: 110,
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
- var format = '0,000.' + xr.join('');
- return Ext.util.Format.number(v, format);
- },
- },{
- text: '单位',
- dataIndex: 'ma_produnit',
- width: 80,
- },{
- text: '单据状态',
- align: 'center',
- dataIndex: 'ma_status',
- width: 90,
- },{
- text: '单位成本',
- dataIndex: 'ma_total',
- xtype: 'numbercolumn',
- width: 0,
- }],
- relativeColumn: []
- }
- });
|