123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416 |
- Ext.define('make.view.sale.saleForecast.QueryPanel', {
- extend: 'saas.view.core.query.QueryPanel',
- xtype: 'sale-saleforecast-querypanel',
- controller: 'sale-saleforecast-querypanel',
- viewModel: {
- extend: 'saas.view.core.query.QueryPanelModel',
- data: {
- form: {}, // 查询字段记录
- addEnable: false, // 显示新增按钮
- auditEnable: true, // 显示审核按钮
- printEnable: false, // 显示打印按钮
- importEnable: true, // 显示导入按钮
- exportEnable: true, // 显示导出按钮
- closeEnable: true, // 显示关闭按钮
- deleteEnable: true, // 显示删除按钮
- deleteDisable:false, //删除按钮是否可使用
-
- openAudit:false,//单独显示审核按钮
- openUnAudit:false,//单独显示反审核按钮
- openEnable:false, //显示开启 针对已取消列表
- configurable: true, // 允许列设置
-
- }
- },
- viewName: 'sale-saleforecast-querypanel',
- caller: 'SaleForecast',
- importUploadPath: '/api/sale/saleforecast/saveToFormal',
-
- initComponent: function() {
- var me = this;
- console.log('querypanel');
- Ext.apply(me, {
- queryFormItems: [
- {
- xtype: 'condatefield',
- name: 'sf_date',
- fieldLabel: '订单时间',
- showDetail: true,
- columnWidth: 0.5
- }, {
- xtype: 'multiqueryField',
- columnWidth: 0.4,
- name: 'multi_query',
- querys: {
- "Prod": {"field": "pr_code", "dbfinds": [{
- from: 'pr_code',
- to: 'pr_code'
- },{
- from: 'pr_detail',
- to: 'pr_detail'
- }]},
- "Cust": {"field": "sd_custname", "dbfinds": [{
- from: 'cu_name',
- to: 'sd_custname'
- }]},
-
- "Emp":{"field": "sf_seller", "dbfinds": [{
- from: 'em_name',
- to: 'sf_seller'
- }]},
- "BillCode": {"field": "sf_code" ,"desc": "订单号"}
- }
- }],
- moreQueryFormItems: [{
- xtype: 'condatefield',
- name: 'sf_date',
- fieldLabel: '单据日期',
- columnWidth: 1
- }, {
- xtype: 'customerDbfindTrigger',
- name: 'sd_custname',
- fieldLabel: '客户名称'
- },{
- xtype: 'productDbfindTrigger',
- name: 'saleforecastdetail.sd_prodcode',
- showDetail: true,
- fieldLabel: '物料编号'
- },{
- xtype: 'textfield',
- name: 'pr_detail',
- fieldLabel: '产品名称',
- readOnly: true,
- }, {
- xtype: 'textfield',
- name: 'pr_orispeccode',
- fieldLabel: '产品型号',
- readOnly: true,
- renderer: saas.util.RenderUtil['renderer_prod']
- }, {
- editable: false,
- xtype: "remotecombo",
- storeUrl: '/api/document/productbrand/getCombo',
- name: "pr_brand",
- fieldLabel: "厂家/品牌",
- showDetail: true,
- addHandler: function (b) {
- var form = this.ownerCmp.ownerCt;
- this.dialog = form.add({
- xtype: 'document-productbrand-window',
- bind: {
- title: '新增物料厂家/品牌'
- },
- dataKind: 'productbrand',
- _parent: form,
- _combo: this.ownerCmp,
- record: null,
- session: true
- });
- this.dialog.show();
- },
- editHandler:function(btn,type){
- saas.util.BaseUtil.openTab('document-productbrand-datalist', '物料厂家/品牌','maintab--document-productbrand-datalist');
- var combo = btn.ownerCt.up('remotecombo');
- if(combo){
- combo.collapse();
- }
- }
- },/*{
- xtype: 'combobox',
- name: 'sf_currency',
- fieldLabel: '币别',
- queryMode: 'local',
- displayField: 'sf_currency',
- valueField: 'sf_currency',
- emptyText :'',
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['sf_currency', 'sf_currency'],
- data: [
- ["RMB", "RMB"],
- ["USD", "USD"],
- ["HKD", "HKD"]
- ]
- }),
- getCondition: function(value) {
- if(!value) {
- return '1=1';
- }else {
- return 'sf_currency=\'' + value + '\'';
- }
- }
- },*/ {
- xtype: 'employeeDbfindTrigger',
- name: 'sf_seller',
- fieldLabel: '业务员',
- emptyText:'输入人员编号或名称',
- }/*, {
- xtype: 'multicombo',
- name: 'sa_sendstatuscode',
- fieldLabel: '业务状态',
- allowBlank: true,
- emptyText:'全部',
- datas: [
- ["TURNOUT", "已出库"],
- ["UNTURNOUT", "未出库"],
- ["PARTOUT", "部分出库"],
- ["CLOSE", "已关闭"]
- ]
- }*/, {
- xtype: 'employeeDbfindTrigger',
- name: 'creatorName',
- fieldLabel: '录入人',
- emptyText:'请输入账户名称或姓名',
- getCondition: function(value) {
- if(!value) {
- return '1=1';
- }else {
- return 'saleforecast.creatorName like\'%' + value + '%\'';
- }
- }
- },{
- xtype: 'condatefield',
- name: 'saleforecast.createTime',
- fieldLabel: '录入日期',
- columnWidth: 1
- }, {
- xtype: 'employeeDbfindTrigger',
- name: 'sf_auditman',
- fieldLabel: '审核人',
- emptyText:'请输入账户名称或姓名',
- }, {
- xtype: 'combobox',
- name: 'sf_statuscode',
- fieldLabel: '审核状态',
- queryMode: 'local',
- displayField: 'sf_status',
- valueField: 'sf_statuscode',
- emptyText :'全部',
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['sf_statuscode', 'sf_status'],
- data: [
- ["ALL", "全部"],
- ["AUDITED", "已审核"],
- ["UNAUDITED", "未审核"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL') {
- return '1=1';
- }else {
- return 'sf_statuscode=\'' + value + '\'';
- }
- }
- }],
- queryGridConfig: {
- idField: 'sd_id',
- mainIdField:'sf_id',
- detailIdField:'sd_id',
- codeField: 'sf_code',
- addTitle: '备货单',
- addXtype: 'sale-saleforecast-formpanel',
- defaultCondition:me.defaultCondition,
- baseVastUrl: '/api/sale/saleforecast/',
- caller:'SaleForecast',
- baseColumn: [{
- text: '明细id',
- dataIndex: 'sd_id',
- hidden:true,
- xtype: 'numbercolumn'
- },{
- text: 'id',
- dataIndex: 'sf_id',
- hidden:true,
- xtype: 'numbercolumn'
- }, {
- text: '备货单号',
- dataIndex: 'sf_code',
- width: 150,
-
- }, {
- text: '单据日期',
- dataIndex: 'sf_date',
- xtype: 'datecolumn',
- width: 110
- }, {
- text: '客户名称',
- dataIndex: 'sd_custname',
- width: 200
- },{
- text: '审核状态',
- dataIndex: 'sf_status',
- width: 80
- },{
- text: '序号',
- dataIndex: 'sd_detno',
- width: 60
- },{
- text: '物料名称',
- dataIndex: 'pr_detail',
- width: 200
- },{
- text: '型号',
- dataIndex: 'pr_orispeccode',
- width: 200
- },{
- text: '已核销数量',
- dataIndex: 'sd_yqty',
- xtype: 'numbercolumn',
- width: 110,
- renderer : function(v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- },{
- text: '备货数',
- dataIndex: 'sd_qty',
- xtype: 'numbercolumn',
- width: 110,
- renderer : function(v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- summaryType: 'sum',
- summaryRenderer: function(v, d, f, m) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- }
- },{
- text: '已开工单数',
- dataIndex: 'sd_ymaqty',
- xtype: 'numbercolumn',
- width: 110,
- renderer : function(v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- },{
- text: '订单冲减工单数',
- dataIndex: 'sd_maqty',
- xtype: 'numbercolumn',
- width: 140,
- renderer : function(v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- }, {
- text: '交货日期',
- dataIndex: 'sd_delivery',
- xtype: 'datecolumn',
- width: 110
- },{
- text: '业务员',
- align: 'center',
- dataIndex: 'sf_seller',
- width: 80
- },{
- text: '物料编号',
- dataIndex: 'sd_prodcode',
- width: 200
- },{
- text: '厂家/品牌',
- dataIndex: 'pr_brand',
- width: 200
- },{
- text: '备注',
- dataIndex: 'sd_remark',
- width: 250
- }],
- relativeColumn: [{
- text: '明细id',
- dataIndex: 'sd_id',
- hidden:true,
- xtype: 'numbercolumn'
- },{
- text: 'id',
- dataIndex: 'sf_id',
- hidden:true,
- xtype: 'numbercolumn'
- }, {
- text: '备货单号',
- dataIndex: 'sf_code',
- width: 150
- }, {
- text: '单据日期',
- dataIndex: 'sf_date',
- xtype: 'datecolumn',
- width: 110
- }, {
- text: '客户名称',
- dataIndex: 'sd_custname',
- width: 200
- },{
- text: '审核状态',
- dataIndex: 'sf_status',
- width: 80
- },{
- text: '序号',
- dataIndex: 'sd_detno',
- width: 60
- },{
- text: '物料名称',
- dataIndex: 'pr_detail',
- width: 200
- },{
- text: '型号',
- dataIndex: 'pr_orispeccode',
- width: 200,
- renderer: saas.util.RenderUtil['renderer_prod']
- },{
- text: '已核销数量',
- dataIndex: 'sd_yqty',
- xtype: 'numbercolumn',
- width: 110,
- renderer : function(v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- },{
- text: '备货数',
- dataIndex: 'sd_qty',
- xtype: 'numbercolumn',
- width: 110,
- renderer : function(v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- },{
- text: '已开工单数',
- dataIndex: 'sd_ymaqty',
- xtype: 'numbercolumn',
- width: 110,
- renderer : function(v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- },{
- text: '订单冲减工单数',
- dataIndex: 'sd_maqty',
- xtype: 'numbercolumn',
- width: 140,
- renderer : function(v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- }, {
- text: '交货日期',
- dataIndex: 'sd_delivery',
- xtype: 'datecolumn',
- width: 110
- },{
- text: '业务员',
- align: 'center',
- dataIndex: 'sf_seller',
- width: 80
- },{
- text: '物料编号',
- dataIndex: 'sd_prodcode',
- width: 200
- },{
- text: '厂家/品牌',
- dataIndex: 'pr_brand',
- width: 200
- },{
- text: '备注',
- dataIndex: 'sd_remark',
- width: 250
- }]
- }
- });
- me.callParent(arguments);
- },
- });
|