1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- Ext.define('saas.view.make.bomComposite.QueryPanel_stockdetail', {
- extend: 'Ext.grid.Panel',
- xtype: 'make-bomcomposite-querypanel-stockdetail',
- plugins: [
- 'gridexporter',
- ],
- initComponent: function () {
- var me = this;
- Ext.apply(me, {
- queryUrl: '/api/make/bomComposite/stockDetailList/',
- columns: [{
- text: '仓库编号',
- dataIndex: 'pw_whcode',
- width: 150
- }, {
- text: '仓库名称',
- dataIndex: 'wh_description',
- width: 200
- }, {
- text: '仓库类型',
- dataIndex: 'wh_type',
- width: 150
- }, {
- text: '库存数量',
- dataIndex: 'pw_onhand',
- xtype: 'numbercolumn',
- renderer: function (v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- }
- }],
- store: {
- proxy: {
- type: 'ajax',
- url: me.queryUrl,
- timeout: 8000,
- autoLoad: false,
- 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) {
- var prCode = me.ownerCt.ownerCt.down('productDbfindTrigger').getRawValue();
- if (prCode) {
- store.getProxy().url = me.queryUrl + prCode;
- } else {
- return false;
- }
- },
- load: function (store, records, successful, operation, eOpts) {
- }
- }
- }
- });
- me.callParent(arguments);
- },
- });
|