123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- Ext.define('make.view.make.bom.QueryPanel_2', {
- extend: 'saas.view.core.query.QueryPanel',
- xtype: 'make-bom-querypanel-2',
- controller: 'make-bom-querypanel',
- viewModel: {
- extend: 'saas.view.core.query.QueryPanelModel',
- data: {
- form: {}, // 查询字段记录
- addEnable: false, // 显示新增按钮
- auditEnable: false, // 显示审核按钮
- printEnable: false, // 显示打印按钮
- importEnable: true, // 显示导入按钮
- exportEnable: true, // 显示导出按钮
- closeEnable: false, // 显示关闭按钮
- deleteEnable: false, // 显示删除按钮
- deleteDisable:false, //删除按钮是否可使用
-
- openAudit:false,//单独显示审核按钮
- openUnAudit:true,//单独显示反审核按钮
- openEnable:false, //显示开启 针对已取消列表
- configurable: true, // 允许列设置
-
- }
- },
- viewName: 'make-bom-querypanel',
- caller: 'Bom',
- importUploadPath: '/api/make/bom/saveToFormal',
- initComponent: function () {
- var me = this;
- Ext.apply(this, {
- queryFormItems: [ {
- xtype: 'condatefield',
- name: 'Bom.createTime',
- //name: 'pi_date',
- fieldLabel: '日期',
- columnWidth: 0.5,
- operation: 'between',
- },{
- xtype: 'multiqueryField',
- columnWidth: 0.4,
- name: 'multi_query',
- querys: {
- "Prod": {"field": "bo_mothercode", "dbfinds": [{//物料
- from: 'pr_code',
- to: 'bo_mothercode'
- },{
- from: 'pr_detail',
- to: 'pr_detail'
- }]},
- //工作中心
- "BillCode": {"field": "bo_wcname" ,"desc": "工作中心"},
- "Emp":{"field": "BOM.creatorName", "dbfinds": [{
- from: 'em_name',
- to: 'BOM.creatorName'
- }]},
- }
- }],
- moreQueryFormItems: [{
- xtype: 'condatefield',
- name: 'bom.createTime',
- fieldLabel: '单据日期',
- value:1,
- columnWidth: 1
- }, {
- xtype: 'productDbfindTrigger',
- name: 'bo_mothercode',
- fieldLabel: '物料编号'
- },{
- xtype: 'textfield',
- name: 'pr_detail',
- fieldLabel: '产品名称',
- readOnly: true,
- }, {
- xtype: 'textfield',
- name: 'pr_orispeccode',
- fieldLabel: '产品型号',
- readOnly: true,
- }, {
- xtype: "remotecombo",
- name: "pr_brand",
- fieldLabel: "厂家/品牌",
- storeUrl: '/api/document/productbrand/getCombo',
- editable: false,
- hiddenBtn:true
- },{
- xtype: 'remotecombo',
- name: "bo_wcname",
- fieldLabel: "工作中心",
- storeUrl: '/api/document/workcenter/getCombo',
- editable: false,
- hiddenBtn:true
- },{
- xtype: 'combobox',
- name: 'bo_statuscode',
- fieldLabel: '审核状态',
- queryMode: 'local',
- displayField: 'bo_status',
- valueField: 'bo_statuscode',
- emptyText :'全部',
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['bo_statuscode', 'bo_status'],
- data: [
- ["ALL", "全部"],
- ["AUDITED", "已审核"],
- ["UNAUDITED", "未审核"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL') {
- return '1=1';
- }else {
- return 'bo_statuscode=\'' + value + '\'';
- }
- }
- }, {
- xtype: 'employeeDbfindTrigger',
- name: 'creatorName',
- fieldLabel: '录入人',
- emptyText:'请输入账户名称或姓名',
- getCondition: function(value) {
- if(!value) {
- return '1=1';
- }else {
- return 'bom.creatorName like\'%' + value + '%\'';
- }
- }
- },{
- xtype: 'employeeDbfindTrigger',
- name: 'bo_auditman',
- fieldLabel: '审核人',
- emptyText:'请输入账户名称或姓名',
- }],
- queryGridConfig: {
- idField: 'id',
- codeField: 'bo_code',
- mainIdField:'_id',
- detailIdField:'bd_boid',
- addTitle: 'BOM',
- addXtype: 'make-bom-formpanel',
- defaultCondition: me.defaultCondition,
- //baseVastUrl: '/api/make/bom/',
- baseVastUrl: me.baseVastUrl,
- caller: 'Bom',
- baseColumn: [{
- text: 'id',
- dataIndex: 'id',
- hidden: true,
- xtype: 'numbercolumn'
- }, {
- text: '单据编号',
- dataIndex: 'bo_code',
- width: 150
- }, {
- text: '产品编号',
- dataIndex: 'bo_mothercode',
- width: 150
- }, {
- text: '产品名称',
- dataIndex: 'bo_mothername',
- width: 150
- },{
- text: '产品型号',
- dataIndex: 'pr_orispeccode',
- width: 150,
- renderer: saas.util.RenderUtil['renderer_prod']
- }, {
- text: '单位',
- dataIndex: 'pr_unit',
- width: 150
- }, {
- text: '工作中心',
- dataIndex: 'bo_wcname',
- width: 110
- },{
- text: '状态',
- dataIndex: 'bo_status',
- width: 110
- },{
- text: '制单人',
- dataIndex: 'creatorName',
- width: 100,
- }],
- relativeColumn: [{
- text: 'id',
- dataIndex: 'id',
- hidden: true,
- xtype: 'numbercolumn'
- }, {
- text: '单据编号',
- dataIndex: 'bo_code',
- width: 150
- }, {
- text: '产品编号',
- dataIndex: 'bo_mothercode',
- width: 150
- }, {
- text: '产品名称',
- dataIndex: 'bo_mothername',
- width: 150
- },{
- text: '产品型号',
- dataIndex: 'pr_orispeccode',
- width: 150
- }, {
- text: '单位',
- dataIndex: 'pr_unit',
- width: 150
- }, {
- text: '工作中心',
- dataIndex: 'bo_wcname',
- width: 110
- },{
- text: '状态',
- dataIndex: 'bo_status',
- width: 110
- },{
- text: '制单人',
- dataIndex: 'creatorName',
- width: 100,
- }]
- }
- });
- this.callParent(arguments);
- },
- });
|