kyAssetList.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. import { ZC_STATUS } from "@/config/dict";
  2. export default {
  3. height: 'auto',
  4. calcHeight: 30,
  5. tip: false,
  6. searchShow: true,
  7. searchMenuSpan: 6,
  8. border: true,
  9. index: true,
  10. editBtn: false,
  11. delBtn: false,
  12. searchLabelWidth: 140,
  13. labelWidth: 140,
  14. menuWidth: 290,
  15. dialogClickModal: false,
  16. dialogWidth: 500,
  17. dialogType: "drawer",
  18. column: [
  19. {
  20. label: '资产编码',
  21. prop: 'zcbm',
  22. type: 'input',
  23. span: 24,
  24. search: true,
  25. width: 100,
  26. align: 'center',
  27. editDisabled: true,
  28. showOverflowTooltip: true,
  29. rules: [
  30. {
  31. required: true,
  32. message: '请输入资产编码',
  33. trigger: 'blur',
  34. },
  35. ],
  36. },
  37. {
  38. label: '资产名称',
  39. prop: 'zcmc',
  40. type: 'input',
  41. span: 24,
  42. minWidth: 160,
  43. search: true,
  44. showOverflowTooltip: true,
  45. rules: [
  46. {
  47. required: true,
  48. message: '请输入资产名称',
  49. trigger: 'blur',
  50. },
  51. ],
  52. },
  53. {
  54. label: '资产类别',
  55. prop: 'zclb',
  56. type: 'select',
  57. dicUrl: '/api/kd-system/dict/dictionary?code=zclb',
  58. props: {
  59. label: 'dictValue',
  60. value: 'dictKey',
  61. },
  62. span: 24,
  63. width: 90,
  64. align: 'center',
  65. showOverflowTooltip: true,
  66. search: true,
  67. rules: [
  68. {
  69. required: true,
  70. message: '请选择资产类别',
  71. trigger: 'change',
  72. },
  73. ],
  74. },
  75. {
  76. label: '功率',
  77. prop: 'gl',
  78. type: 'number',
  79. min: 0,
  80. precision: 0,
  81. span: 24,
  82. width: 60,
  83. align: 'center',
  84. showOverflowTooltip: true,
  85. display: true
  86. },
  87. {
  88. label: '用途',
  89. prop: 'yt',
  90. type: 'select',
  91. dicUrl: '/api/kd-system/dict/dictionary?code=zcyt',
  92. props: {
  93. label: 'dictValue',
  94. value: 'dictKey',
  95. },
  96. search: true,
  97. span: 24,
  98. width: 65,
  99. align: 'center',
  100. showOverflowTooltip: true,
  101. rules: [
  102. {
  103. required: true,
  104. message: '请选择用途',
  105. trigger: 'blur',
  106. },
  107. ],
  108. },
  109. {
  110. label: '开始时间',
  111. prop: 'kssj',
  112. type: 'date',
  113. valueFormat: 'yyyy-MM-dd',
  114. span: 24,
  115. width: 90,
  116. search: true,
  117. align: 'center',
  118. showOverflowTooltip: true,
  119. rules: [
  120. {
  121. required: true,
  122. message: '请选择开始时间',
  123. trigger: 'blur',
  124. },
  125. ],
  126. },
  127. {
  128. label: '使用寿命(月)',
  129. prop: 'sysm',
  130. type: 'number',
  131. span: 24,
  132. width: 90,
  133. min: 0,
  134. precision: 0,
  135. search: true,
  136. align: 'center',
  137. showOverflowTooltip: true,
  138. rules: [
  139. {
  140. required: true,
  141. message: '请输入使用寿命',
  142. trigger: 'blur',
  143. },
  144. ],
  145. },
  146. {
  147. label: '已使用月数',
  148. prop: 'ysysm',
  149. type: 'number',
  150. span: 24,
  151. width: 85,
  152. min: 0,
  153. precision: 0,
  154. align: 'center',
  155. addDisplay: false,
  156. editDisplay: true,
  157. editDisabled: true,
  158. showOverflowTooltip: true,
  159. rules: [
  160. {
  161. required: true,
  162. message: '请输入已使用月数',
  163. trigger: 'blur',
  164. },
  165. ],
  166. },
  167. {
  168. label: '资产原值(元)',
  169. prop: 'zcyz',
  170. type: 'number',
  171. span: 24,
  172. width: 95,
  173. min: 0,
  174. precision: 2,
  175. align: 'center',
  176. showOverflowTooltip: true,
  177. rules: [
  178. {
  179. required: true,
  180. message: '请输入资产原值',
  181. trigger: 'blur',
  182. },
  183. ],
  184. },
  185. {
  186. label: '净残值率(%)',
  187. prop: 'jcz',
  188. type: 'number',
  189. span: 24,
  190. width: 70,
  191. min: 0,
  192. max: 100,
  193. align: 'center',
  194. showOverflowTooltip: true,
  195. rules: [
  196. {
  197. required: true,
  198. message: '请输入净残值率',
  199. trigger: 'change',
  200. },
  201. ],
  202. formatter:(row, value)=>{
  203. return value+'%'
  204. }
  205. },
  206. {
  207. label: '月折旧额/月摊销额(元)',
  208. prop: 'yzje',
  209. type: 'number',
  210. span: 24,
  211. width: 140,
  212. min: 0,
  213. precision: 2,
  214. align: 'center',
  215. showOverflowTooltip: true,
  216. rules: [
  217. {
  218. required: true,
  219. message: '请输入月折旧额/月摊销额',
  220. trigger: 'blur',
  221. },
  222. ],
  223. },
  224. {
  225. label: '状态',
  226. prop: 'status',
  227. type: 'select',
  228. dicData: ZC_STATUS,
  229. search: true,
  230. span: 24,
  231. width: 90,
  232. align: 'center',
  233. showOverflowTooltip: true,
  234. display: false,
  235. formatter(row, value) {
  236. if (row.zclb == '软件' && value == 2) {
  237. return '已足额摊销';
  238. } else {
  239. return ZC_STATUS[value] && ZC_STATUS[value].label;
  240. }
  241. },
  242. }
  243. ],
  244. };