KindModel.js 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. /**
  2. * Created by zhouy on 2018/10/18.
  3. */
  4. Ext.define('saas.view.document.kind.KindModel', {
  5. extend: 'Ext.app.ViewModel',
  6. alias: 'viewmodel.document-kind',
  7. data: {
  8. title: '客户类型'
  9. },
  10. stores: {
  11. customerkind: {
  12. fields:[
  13. {name: 'id', type: 'int'},
  14. {name: 'ck_name', type: 'string'}
  15. ],
  16. proxy: {
  17. type: 'ajax',
  18. url: '/api/document/customerkind/list',
  19. actionMethods: {
  20. read: 'GET'
  21. },
  22. reader: {
  23. type: 'json',
  24. rootProperty: 'data'
  25. }
  26. },
  27. pageSize: null,
  28. autoLoad: false,
  29. listeners: {
  30. beforeload: function (store, op) {
  31. Ext.apply(store.proxy.extraParams, {
  32. number: 1,
  33. size: 1000
  34. });
  35. }
  36. }
  37. },
  38. vendorkind:{
  39. fields:[
  40. {name: 'id', type: 'int'},
  41. {name: 'vk_name', type: 'string'}
  42. ],
  43. proxy: {
  44. type: 'ajax',
  45. url: '/api/document/vendorkind/list',
  46. actionMethods: {
  47. read: 'GET'
  48. },
  49. reader: {
  50. type: 'json',
  51. rootProperty: 'data'
  52. }
  53. },
  54. pageSize: null,
  55. autoLoad: false,
  56. listeners: {
  57. beforeload: function (store, op) {
  58. Ext.apply(store.proxy.extraParams, {
  59. number: 1,
  60. size: 1000
  61. });
  62. }
  63. }
  64. },
  65. productkind:{
  66. fields:[
  67. {name: 'id', type: 'int'},
  68. {name: 'pt_name', type: 'string'}
  69. ],
  70. proxy: {
  71. type: 'ajax',
  72. url: '/api/document/producttype/list',
  73. actionMethods: {
  74. read: 'GET'
  75. },
  76. reader: {
  77. type: 'json',
  78. rootProperty: 'data'
  79. }
  80. },
  81. pageSize: null,
  82. autoLoad: false,
  83. listeners: {
  84. beforeload: function (store, op) {
  85. Ext.apply(store.proxy.extraParams, {
  86. number: 1,
  87. size: 1000
  88. });
  89. }
  90. }
  91. },
  92. productbrand:{
  93. fields:[
  94. {name: 'id', type: 'int'},
  95. {name: 'pb_name', type: 'string'}
  96. ],
  97. proxy: {
  98. type: 'ajax',
  99. url: '/api/document/productbrand/list',
  100. actionMethods: {
  101. read: 'GET'
  102. },
  103. reader: {
  104. type: 'json',
  105. rootProperty: 'data'
  106. }
  107. },
  108. pageSize: null,
  109. autoLoad: false,
  110. listeners: {
  111. beforeload: function (store, op) {
  112. Ext.apply(store.proxy.extraParams, {
  113. number: 1,
  114. size: 1000
  115. });
  116. }
  117. }
  118. },
  119. bankinformation:{
  120. fields:[
  121. {name: 'id', type: 'int'},
  122. {name: 'bk_bankname', type: 'string'},
  123. {name: 'bk_bankcode', type: 'string'},
  124. {name: 'bk_type', type: 'string'},
  125. {name: 'bk_beginamount', type: 'float'},
  126. {name: 'bk_thisamount', type: 'float'},
  127. {name: 'bk_date', type: 'date'}
  128. ],
  129. proxy: {
  130. type: 'ajax',
  131. url: '/api/document/bankinformation/list',
  132. actionMethods: {
  133. read: 'GET'
  134. },
  135. reader: {
  136. type: 'json',
  137. rootProperty: 'data.list'
  138. }
  139. },
  140. pageSize: null,
  141. autoLoad: false,
  142. listeners: {
  143. beforeload: function (store, op) {
  144. Ext.apply(store.proxy.extraParams, {
  145. number: 1,
  146. size: 1000
  147. });
  148. }
  149. }
  150. },
  151. inoutkind:{
  152. fields:[
  153. {name: 'id', type: 'int'},
  154. {name: 'ft_type', type: 'string'},
  155. {name: 'ft_name', type: 'string'}
  156. ],
  157. proxy: {
  158. type: 'ajax',
  159. url: '/api/document/fundinouttype/list',
  160. actionMethods: {
  161. read: 'GET'
  162. },
  163. reader: {
  164. type: 'json',
  165. rootProperty: 'data'
  166. }
  167. },
  168. pageSize: null,
  169. autoLoad: false,
  170. listeners: {
  171. beforeload: function (store, op) {
  172. Ext.apply(store.proxy.extraParams, {
  173. number: 1,
  174. size: 1000
  175. });
  176. }
  177. }
  178. },
  179. warehouse: {
  180. fields:[
  181. {name: 'id', type: 'int'},
  182. {name: 'wh_code', type: 'string'},
  183. {name: 'wh_type', type: 'string'},
  184. {name: 'wh_description', type: 'string'},
  185. {name: 'wh_statuscode', type: 'string'},
  186. {name: 'wh_status', type: 'string'}
  187. ],
  188. proxy: {
  189. type: 'ajax',
  190. url: '/api/document/warehouse/list',
  191. actionMethods: {
  192. read: 'GET'
  193. },
  194. reader: {
  195. type: 'json',
  196. rootProperty: 'data.list'
  197. }
  198. },
  199. pageSize: null,
  200. autoLoad: false,
  201. listeners: {
  202. beforeload: function (store, op) {
  203. Ext.apply(store.proxy.extraParams, {
  204. number: 1,
  205. size: 1000
  206. });
  207. }
  208. }
  209. },
  210. address: {
  211. fields:[
  212. {name: 'id', type: 'int'},
  213. {name: 'ad_address', type: 'string'},
  214. {name: 'ad_recorddate', type: 'date'}
  215. ],
  216. proxy: {
  217. type: 'ajax',
  218. url: '/api/document/address/list',
  219. actionMethods: {
  220. read: 'GET'
  221. },
  222. reader: {
  223. type: 'json',
  224. rootProperty: 'data'
  225. }
  226. },
  227. pageSize: null,
  228. autoLoad: false,
  229. listeners: {
  230. beforeload: function (store, op) {
  231. Ext.apply(store.proxy.extraParams, {
  232. number: 1,
  233. size: 1000
  234. });
  235. }
  236. }
  237. },
  238. productunit: {
  239. fields:[
  240. {name: 'id', type: 'int'},
  241. {name: 'pu_name', type: 'string'}
  242. ],
  243. proxy: {
  244. type: 'ajax',
  245. url: '/api/document/productunit/list',
  246. actionMethods: {
  247. read: 'GET'
  248. },
  249. reader: {
  250. type: 'json',
  251. rootProperty: 'data'
  252. }
  253. },
  254. pageSize: null,
  255. autoLoad: false,
  256. listeners: {
  257. beforeload: function (store, op) {
  258. Ext.apply(store.proxy.extraParams, {
  259. number: 1,
  260. size: 1000
  261. });
  262. }
  263. }
  264. }
  265. }
  266. });