KindModel.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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'
  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_description', type: 'string'},
  184. {name: 'wh_statuscode', type: 'string'},
  185. {name: 'wh_status', type: 'string'}
  186. ],
  187. proxy: {
  188. type: 'ajax',
  189. url: '/api/document/warehouse/list',
  190. actionMethods: {
  191. read: 'GET'
  192. },
  193. reader: {
  194. type: 'json',
  195. rootProperty: 'data.list'
  196. }
  197. },
  198. pageSize: null,
  199. autoLoad: false,
  200. listeners: {
  201. beforeload: function (store, op) {
  202. Ext.apply(store.proxy.extraParams, {
  203. number: 1,
  204. size: 1000
  205. });
  206. }
  207. }
  208. },
  209. address: {
  210. fields:[
  211. {name: 'id', type: 'int'},
  212. {name: 'ad_address', type: 'string'},
  213. {name: 'ad_recorddate', type: 'date'}
  214. ],
  215. proxy: {
  216. type: 'ajax',
  217. url: '/api/document/address/list',
  218. actionMethods: {
  219. read: 'GET'
  220. },
  221. reader: {
  222. type: 'json',
  223. rootProperty: 'data'
  224. }
  225. },
  226. pageSize: null,
  227. autoLoad: false,
  228. listeners: {
  229. beforeload: function (store, op) {
  230. Ext.apply(store.proxy.extraParams, {
  231. number: 1,
  232. size: 1000
  233. });
  234. }
  235. }
  236. },
  237. productunit: {
  238. fields:[
  239. {name: 'id', type: 'int'},
  240. {name: 'pu_name', type: 'string'}
  241. ],
  242. proxy: {
  243. type: 'ajax',
  244. url: '/api/document/productunit/list',
  245. actionMethods: {
  246. read: 'GET'
  247. },
  248. reader: {
  249. type: 'json',
  250. rootProperty: 'data'
  251. }
  252. },
  253. pageSize: null,
  254. autoLoad: false,
  255. listeners: {
  256. beforeload: function (store, op) {
  257. Ext.apply(store.proxy.extraParams, {
  258. number: 1,
  259. size: 1000
  260. });
  261. }
  262. }
  263. }
  264. }
  265. });