| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- Ext.define('saas.view.purchase.purchase.QueryPanel', {
- extend: 'saas.view.core.query.QueryPanel',
- xtype: 'purchase-purchase-querypanel',
- controller: 'purchase-purchase-querypanel',
- viewModel: 'purchase-purchase-querypanel',
- viewName: 'purchase-purchase-querypanel',
-
- queryFormItems: [{
- xtype: 'textfield',
- name: 'pu_code',
- fieldLabel: ' ',
- labelSeparator:' ',
- emptyText:'请输入单号或供应商',
- getCondition: function(value) {
- return ' (pu_code like\'%' + value + '%\' or pu_vendcode like \'%'+value+'%\' or pu_vendname like \'%'+value+'%\') ';
- }
- }, {
- xtype: 'condatefield',
- name: 'pu_date',
- fieldLabel: '日期',
- columnWidth: 0.5,
- operation: 'between'
- }, {
- xtype: 'productDbfindTrigger',
- name: 'pr_detail',
- fieldLabel: '物料',
- showDetail: true,
- emptyText:'输入物料编号或名称',
- }, {
- xtype: 'combobox',
- name: 'pu_statuscode',
- fieldLabel: '单据状态',
- queryMode: 'local',
- displayField: 'pu_status',
- valueField: 'pu_statuscode',
- emptyText :'全部',
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['pu_statuscode', 'pu_status'],
- data: [
- ["ALL", "全部"],
- ["AUDITED", "已审核"],
- ["UNAUDITED", "未审核"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL') {
- return '1=1';
- }else {
- return 'pu_statuscode=\'' + value + '\'';
- }
- }
- }, {
- xtype: 'multicombo',
- name: 'pu_acceptstatuscode',
- fieldLabel: '业务状态',
- emptyText :'全部',
- datas: [
- ["TURNIN", "已入库"],
- ["UNTURNIN", "未入库"],
- ["PART2IN", "部分入库"],
- ["CLOSE", "已关闭"]
- ]
- }, {
- xtype: 'textfield',
- name: 'pu_sacode',
- fieldLabel: '关联销售单号',
- emptyText: '输入单号',
- }, {
- xtype: 'accountDbfindTrigger',
- name: 'creatorName',
- fieldLabel: '录入人',
- emptyText:'请输入人员编号或名称',
- getCondition: function(value) {
- if(!value) {
- return '1=1';
- }else {
- return 'purchase.creatorName like\'%' + value + '%\'';
- }
- }
- }, {
- xtype: 'accountDbfindTrigger',
- name: 'pu_auditman',
- fieldLabel: '审核人',
- emptyText:'请输入人员编号或名称'
- }],
- queryGridConfig: {
- idField: 'pu_id',
- codeField: 'pu_code',
- addTitle: '采购订单',
- addXtype: 'purchase-purchase-formpanel',
- defaultCondition:'',
- baseVastUrl: '/api/purchase/purchase/',
- caller:'Purchase',
- baseColumn: [
- {
- text: 'id',
- dataIndex: 'pu_id',
- width: 0,
- xtype: 'numbercolumn',
- hidden:true
- }, {
- text: '采购单号',
- dataIndex: 'pu_code',
- width: 150
- },{
- text: '单据日期',
- dataIndex: 'pu_date',
- xtype: 'datecolumn',
- width: 110
- },{
- text: '供应商名称',
- dataIndex: 'pu_vendname',
- width:250
- }, {
- text: '总金额',
- dataIndex: 'pu_total',
- xtype: 'numbercolumn',
- width: 110
- }, {
- text: '审核状态',
- align: 'center',
- dataIndex: 'pu_status',
- width: 90
- },{
- text: '业务状态',
- align: 'center',
- dataIndex: 'pu_acceptstatus',
- width: 90
- },{
- text: '录入人',
- dataIndex: 'creatorName',
- width: 110
- },{
- text: '审核人',
- dataIndex: 'pu_auditman',
- width: 110
- },{
- text: '关联销售单',
- dataIndex: 'pu_sacode',
- width: 150
- },{
- text: '备注',
- dataIndex: 'pu_remark',
- width: 250
- }],
- relativeColumn: [
- {
- text: 'id',
- dataIndex: 'pu_id',
- width: 0,
- hidden: true
- }, {
- text: '采购单号',
- dataIndex: 'pu_code',
- width: 150
- }, {
- text: '单据日期',
- dataIndex: 'pu_date',
- xtype: 'datecolumn',
- width: 110
- },{
- text: '供应商名称',
- dataIndex: 'pu_vendname',
- width: 150
- }, {
- text: '审核状态',
- align: 'center',
- dataIndex: 'pu_status',
- width: 90
- },{
- text: '业务状态',
- align: 'center',
- dataIndex: 'pu_acceptstatus',
- width: 90
- }, {
- text: '序号',
- dataIndex: 'pd_detno',
- xtype: 'numbercolumn',
- width: 80,
- renderer : function(v) {
- return Ext.util.Format.number(v, '0');
- }
- }, {
- text: '物料编号',
- dataIndex: 'pd_prodcode',
- width: 150
- },{
- text: '品牌',
- dataIndex: 'pr_brand',
- width: 150
- },{
- text: '名称',
- dataIndex: 'pr_detail',
- width: 200
- },{
- text: '型号',
- dataIndex: 'pr_orispeccode',
- width: 200
- },{
- text: '采购数量',
- dataIndex: 'pd_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: 'pr_unit',
- width: 80
- }, {
- text: '单价(元)',
- dataIndex: 'pd_price',
- xtype: 'numbercolumn',
- width: 110,
- 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: 'pd_delivery',
- xtype: 'datecolumn',
- width: 110
- }, {
- text: '税率',
- dataIndex: 'pd_taxrate',
- xtype: 'numbercolumn',
- width: 80,
- renderer : function(v) {
- return Ext.util.Format.number(v, '0');
- },
- },{
- text: '金额(元)',
- dataIndex: 'pd_total',
- xtype: 'numbercolumn',
- width: 110,
- 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);
- }
- },{
- text: '备注',
- dataIndex: 'pd_remark',
- width: 250
- }]
- }
- });
|