123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- Ext.define('saas.view.make.bomComposite.QueryPanel_bomcheck', {
- extend: 'Ext.grid.Panel',
- xtype: 'make-bomcomposite-querypanel-bomcheck',
- plugins: [
- 'gridexporter',
- ],
- initComponent: function () {
- var me = this;
- Ext.apply(me, {
- columns: [{
- xtype: 'rownumberer',
- text: '序号',
- width: 50
- }, {
- text: '反查料号',
- dataIndex: 'bm_prcode',
- width: 220
- }, {
- text: '母件编号',
- dataIndex: 'bm_mothercode',
- width: 220
- }, {
- text: '母件名称',
- dataIndex: 'mo_proddetail',
- width: 200
- }, {
- text: '母件规格',
- dataIndex: 'mo_prodspec',
- width: 250
- },{
- text: '单位用量',
- dataIndex: 'bm_baseqty'
- }, {
- text: '备注',
- dataIndex: 'bm_remark'
- }, {
- text: '反查层级',
- dataIndex: 'bm_level'
- }, {
- text: '是否顶层',
- dataIndex: 'bm_iftop',
- xtype: 'yncolumn'
- },{
- text: '类型',
- dataIndex: 'bm_type'
- }],
- tbar: [{
- xtype: 'radiogroup',
- name: 'redio_bomcheck',
- width: 300,
- simpleValue: true,
- items: [
- { boxLabel: '多级反查', inputValue: '/api/make/bom/bomMutiBack/', checked: true },
- { boxLabel: '单级反查', inputValue: '/api/make/bom/bomMutiBackOne/' }
- ],
- listeners:{
- change:function(){
- me.store.reload();
- }
- }
- }],
- store: {
- proxy: {
- type: 'ajax',
- url: '/api/make/bom/bomMutiBack',
- timeout: 8000,
- actionMethods: {
- read: 'GET'
- },
- reader: {
- type: 'json',
- rootProperty: 'data',
- totalProperty: '',
- },
- listeners: {
- exception: function (proxy, response, operation, eOpts) {
- if (operation.success) {
- if (response.timedout) {
- saas.util.BaseUtil.showErrorToast('请求超时');
- }
- } else {
- if (response.timedout) {
- saas.util.BaseUtil.showErrorToast('请求超时');
- } else {
- console.error('exception: ', response);
- var message = response.responseJson ? (response.responseJson.message == null ? '没有数据' : response.responseJson.message) : '请求超时';
- saas.util.BaseUtil.showErrorToast('查询失败:' + message);
- }
- }
- }
- }
- },
- listeners: {
- beforeload: function (store, op) {
- if(me.ownerCt){
- var prCode = me.ownerCt.ownerCt.down('productDbfindTrigger').getRawValue();
- if(prCode){
- store.getProxy().url = me.down('radiogroup[name=redio_bomcheck]').lastValue + prCode;
- }else{
- return false;
- }
- }
- },
- load: function (store, records, successful, operation, eOpts) {
- }
- }
- }
- });
- me.callParent(arguments);
- },
- });
|