| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- Ext.define('saas.view.sale.sale.QueryPanel', {
- extend: 'saas.view.core.query.QueryPanel',
- xtype: 'sale-sale-querypanel',
- controller: 'sale-sale-querypanel',
- viewModel: 'sale-sale-querypanel',
- viewName: 'sale-sale-querypanel',
-
- queryFormItems: [{
- xtype: 'textfield',
- name: 'sa_code',
- emptyText:'请输入单号或客户',
- getCondition: function(value) {
- return ' (sa_code like\'%' + value + '%\' or sa_custcode like \'%'+value+'%\' or sa_custname like \'%'+value+'%\') ';
- }
- }, {
- xtype: 'condatefield',
- name: 'sa_date',
- fieldLabel: '日期',
- columnWidth: 0.5
- }, {
- xtype: 'productDbfindTrigger',
- name: 'pr_detail',
- fieldLabel: '物料',
- showDetail: true,
- emptyText:'输入物料编号或名称',
- }, {
- xtype: 'combobox',
- name: 'sa_statuscode',
- fieldLabel: '单据状态',
- queryMode: 'local',
- displayField: 'sa_status',
- valueField: 'sa_statuscode',
- emptyText :'全部',
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['sa_statuscode', 'sa_status'],
- data: [
- ["ALL", "全部"],
- ["AUDITED", "已审核"],
- ["UNAUDITED", "未审核"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL') {
- return '1=1';
- }else {
- return 'sa_statuscode=\'' + value + '\'';
- }
- }
- }, {
- xtype: 'multicombo',
- name: 'sa_sendstatuscode',
- fieldLabel: '业务状态',
- allowBlank: true,
- columnWidth: 0.25,
- emptyText:'全部',
- datas: [
- ["TURNOUT", "已出库"],
- ["UNTURNOUT", "未出库"],
- ["PARTOUT", "部分出库"],
- ["CLOSE", "已关闭"]
- ]
- }, {
- xtype: 'employeeDbfindTrigger',
- name: 'sa_seller',
- fieldLabel: '业务员',
- emptyText:'输入人员编号或名称',
- }, {
- xtype: 'accountDbfindTrigger',
- name: 'creatorName',
- fieldLabel: '录入人',
- emptyText:'输入人员编号或名称',
- getCondition: function(value) {
- if(!value) {
- return '1=1';
- }else {
- return 'sale.creatorName like\'%' + value + '%\'';
- }
- }
- }, {
- xtype: 'accountDbfindTrigger',
- name: 'sa_auditman',
- fieldLabel: '审核人',
- emptyText:'输入人员编号或名称',
- }],
- moreQueryFormItems: [],
- queryGridConfig: {
- idField: 'sa_id',
- codeField: 'sa_code',
- addTitle: '销售订单',
- addXtype: 'sale-sale-formpanel',
- defaultCondition:'',
- baseVastUrl: '/api/sale/sale/',
- caller:'Sale',
- baseColumn: [{
- text: 'id',
- dataIndex: 'sa_id',
- hidden:true,
- xtype: 'numbercolumn'
- }, {
- text: '销售单号',
- dataIndex: 'sa_code',
- width: 150
- }, {
- text: '单据日期',
- dataIndex: 'sa_date',
- xtype: 'datecolumn',
- width: 110
- }, {
- text: '客户编号',
- dataIndex: 'sa_custcode',
- hidden :true
- }, {
- text: '客户名称',
- dataIndex: 'sa_custname',
- width: 250
- }, {
- text: '总金额',
- dataIndex: 'sa_total',
- width: 110,
- xtype: 'numbercolumn',
- 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: '审核状态',
- align: 'center',
- dataIndex: 'sa_status',
- width: 90
- }, {
- text: '业务状态',
- align: 'center',
- dataIndex: 'sa_sendstatus',
- width: 100
- }, {
- text: '业务员',
- dataIndex: 'sa_seller',
- width: 110
- }, {
- text: '录入人',
- dataIndex: 'creatorName',
- width :110
- }, {
- text: '审核人',
- dataIndex: 'sa_auditman',
- width: 110
- }, {
- text: '收货地址',
- dataIndex: 'sa_toplace',
- hidden :true
- }, {
- text: '备注',
- dataIndex: 'sa_remark',
- width: 250
- }
- ],
- relativeColumn: [ {
- text: 'id',
- dataIndex: 'sa_id',
- hidden:true,
- xtype: 'numbercolumn'
- }, {
- text: '单据编号',
- dataIndex: 'sa_code',
- width: 200
- }, {
- text: '单据状态',
- align: 'center',
- dataIndex: 'sa_status',
- width: 120
- }, {
- text: '单据日期',
- dataIndex: 'sa_date',
- xtype: 'datecolumn',
- width: 200
- }, {
- text: '客户名称',
- dataIndex: 'sa_custname',
- width: 120
- }, {
- text: '业务状态',
- align: 'center',
- dataIndex: 'sa_sendstatus',
- width: 90
- }, {
- text: '明细序号',
- dataIndex: 'sd_detno',
- xtype: 'numbercolumn',
- width: 120,
- renderer : function(v) {
- return Ext.util.Format.number(v, '0');
- }
- }, {
- text: '物料编号',
- dataIndex: 'sd_prodcode',
- width: 120
- },{
- text: '品牌',
- dataIndex: 'pr_brand',
- width: 150
- },{
- text: '名称',
- dataIndex: 'pr_detail',
- width: 200
- },{
- text: '型号',
- dataIndex: 'pr_orispeccode',
- width: 200
- },{
- text: '数量',
- dataIndex: 'sd_qty',
- xtype: 'numbercolumn',
- width: 120,
- 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_unit',
- width: 80
- }, {
- text: '单价(元)',
- dataIndex: 'sd_price',
- xtype: 'numbercolumn',
- width: 120,
- 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: 'sd_yqty',
- xtype: 'numbercolumn',
- width: 120,
- 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: 'sd_sendqty',
- xtype: 'numbercolumn',
- width: 120,
- 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: 'sd_remark',
- width: 250
- }]
- }
- });
|