| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- /**
- * Created by zhouy on 2018/10/18.
- */
- Ext.define('saas.view.document.kind.KindModel', {
- extend: 'Ext.app.ViewModel',
- alias: 'viewmodel.document-kind',
- data: {
- title: '客户类型'
- },
- stores: {
- customerkind: {
- fields:[
- {name: 'id', type: 'int'},
- {name: 'ck_name', type: 'string'}
- ],
- proxy: {
- type: 'ajax',
- url: '/api/document/customerkind/list',
- actionMethods: {
- read: 'GET'
- },
- reader: {
- type: 'json',
- rootProperty: 'data'
- },
- listeners: {
- exception: function(proxy, response, operation, eOpts) {
- if(operation.success) {
- if(response.timedout) {
- saas.util.BaseUtil.showErrorToast('请求超时');
- }
- }else {
- console.error('exception: ', response.responseJson);
- saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
- }
- }
- }
- },
- pageSize: null,
- autoLoad: false,
- listeners: {
- beforeload: function (store, op) {
- Ext.apply(store.proxy.extraParams, {
- number: 1,
- size: 1000
- });
- }
- }
- },
- vendorkind:{
- fields:[
- {name: 'id', type: 'int'},
- {name: 'vk_name', type: 'string'}
- ],
- proxy: {
- type: 'ajax',
- url: '/api/document/vendorkind/list',
- actionMethods: {
- read: 'GET'
- },
- reader: {
- type: 'json',
- rootProperty: 'data'
- },
- listeners: {
- exception: function(proxy, response, operation, eOpts) {
- if(operation.success) {
- if(response.timedout) {
- saas.util.BaseUtil.showErrorToast('请求超时');
- }
- }else {
- console.error('exception: ', response.responseJson);
- saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
- }
- }
- }
- },
- pageSize: null,
- autoLoad: false,
- listeners: {
- beforeload: function (store, op) {
- Ext.apply(store.proxy.extraParams, {
- number: 1,
- size: 1000
- });
- }
- }
- },
- productkind:{
- fields:[
- {name: 'id', type: 'int'},
- {name: 'pt_name', type: 'string'}
- ],
- proxy: {
- type: 'ajax',
- url: '/api/document/producttype/list',
- actionMethods: {
- read: 'GET'
- },
- reader: {
- type: 'json',
- rootProperty: 'data'
- },
- listeners: {
- exception: function(proxy, response, operation, eOpts) {
- if(operation.success) {
- if(response.timedout) {
- saas.util.BaseUtil.showErrorToast('请求超时');
- }
- }else {
- console.error('exception: ', response.responseJson);
- saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
- }
- }
- }
- },
- pageSize: null,
- autoLoad: false,
- listeners: {
- beforeload: function (store, op) {
- Ext.apply(store.proxy.extraParams, {
- number: 1,
- size: 1000
- });
- }
- }
- },
- inoutkind:{
- fields:[
- {name: 'id', type: 'int'},
- {name: 'ft_kind', type: 'string'},
- {name: 'ft_name', type: 'string'}
- ],
- proxy: {
- type: 'ajax',
- url: '/api/document/fundinouttype/list',
- actionMethods: {
- read: 'GET'
- },
- reader: {
- type: 'json',
- rootProperty: 'data'
- },
- listeners: {
- exception: function(proxy, response, operation, eOpts) {
- if(operation.success) {
- if(response.timedout) {
- saas.util.BaseUtil.showErrorToast('请求超时');
- }
- }else {
- console.error('exception: ', response.responseJson);
- saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
- }
- }
- }
- },
- pageSize: null,
- autoLoad: false,
- listeners: {
- beforeload: function (store, op) {
- Ext.apply(store.proxy.extraParams, {
- number: 1,
- size: 1000
- });
- }
- }
- }
- }
- });
|