column.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. export const TableColumns = [
  2. { item: { key: "code", title: "订单生成单号" }, attr: {} },
  3. {
  4. item: { key: "status", title: "状态" },
  5. attr: {
  6. is: "el-dict-tag",
  7. dictName: "purchase_task_status",
  8. },
  9. },
  10. { item: { key: "demandCode", title: "需求单号" }, attr: {} },
  11. { item: { key: "materialName", title: "物料" }, attr: {} },
  12. {
  13. item: { key: "materialCode", title: "物料编码" },
  14. attr: {},
  15. },
  16. {
  17. item: { key: "materialDesc", title: "物料描述" },
  18. attr: {},
  19. },
  20. {
  21. item: { key: "manufacturerName", title: "生产厂家" },
  22. attr: {},
  23. },
  24. { item: { key: "puQty", title: "采购数量" }, attr: {} },
  25. {
  26. item: { key: "executeQty", title: "已执行数量" },
  27. attr: {},
  28. },
  29. {
  30. item: { key: "residueQty", title: "未执行数量" },
  31. attr: {},
  32. },
  33. {
  34. item: { key: "priceType", title: "价格类型" },
  35. attr: { is: "el-dict-tag", dictName: "sys_price_type" },
  36. },
  37. { item: { key: "puUnitName", title: "采购单位" }, attr: {} },
  38. { item: { key: "buyerName", title: "采购员" }, attr: {} },
  39. {
  40. item: { key: "supplierName", title: "建议供应商" },
  41. attr: {},
  42. },
  43. { item: { key: "puOrgName", title: "采购组织" }, attr: {} },
  44. { item: { key: "currencyName", title: "币种" }, attr: {} },
  45. { item: { key: "source", title: "需求来源" }, attr: {} },
  46. {
  47. item: { key: "customerName", title: "收货客户" },
  48. attr: {},
  49. },
  50. {
  51. item: { key: "assignSupplierName", title: "指定供应商" },
  52. attr: {},
  53. },
  54. { item: { key: "demandDate", title: "需求时间" }, attr: {} },
  55. { item: { key: "projectName", title: "项目名称" }, attr: {} },
  56. {
  57. item: { key: "demandPersonalName", title: "需求人" },
  58. attr: {},
  59. },
  60. {
  61. item: { key: "demandOrgName", title: "需求组织" },
  62. attr: {},
  63. },
  64. {
  65. item: { key: "demandDeptName", title: "需求部门" },
  66. attr: {},
  67. },
  68. {
  69. item: { key: "isBack", title: "是否退回" },
  70. attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
  71. },
  72. { item: { key: "baskCause", title: "退回原因" }, attr: {} },
  73. { item: { key: "backDate", title: "退回日期" }, attr: {} },
  74. { item: { key: "unitName", title: "单位" }, attr: {} },
  75. ].map(({ item, attr }) => ({
  76. attr,
  77. item: { ...item, hidden: true, fixed: false },
  78. }));
  79. console.log("t", TableColumns);
  80. export const SearchColumns = [
  81. {
  82. item: {
  83. key: "classIds",
  84. title: "物料分类",
  85. },
  86. attr: {
  87. is: "el-popover-multiple-tree-select",
  88. referName: "MATERIALCLASSIFY_PARAM",
  89. valueKey: "id",
  90. },
  91. },
  92. {
  93. item: {
  94. key: "materialCodes",
  95. title: "物料编码",
  96. },
  97. attr: {
  98. is: "el-popover-multiple-select-v2",
  99. valueKey: "code",
  100. referName: "MATERIAL_PARAM",
  101. },
  102. },
  103. {
  104. item: {
  105. key: "materialDesc",
  106. title: "物料描述",
  107. },
  108. attr: {
  109. is: "el-input",
  110. },
  111. },
  112. {
  113. item: {
  114. key: "code",
  115. title: "单据号",
  116. },
  117. attr: {
  118. is: "el-input",
  119. },
  120. },
  121. {
  122. item: {
  123. key: "puOrgIds",
  124. title: "采购组织",
  125. },
  126. attr: {
  127. is: "el-popover-multiple-select-v2",
  128. referName: "ORG_PARAM",
  129. valueKey: "id",
  130. },
  131. },
  132. {
  133. item: {
  134. key: "status",
  135. title: "状态",
  136. },
  137. attr: {
  138. is: "el-select",
  139. dictName: "purchase_task_status",
  140. clearable: true,
  141. },
  142. },
  143. {
  144. item: {
  145. key: "date",
  146. title: "创建时间",
  147. },
  148. attr: {
  149. is: "el-date-picker",
  150. type: "daterange",
  151. unlinkPanels: true,
  152. rangeSeparator: "至",
  153. valueFormat: "yyyy-MM-dd",
  154. endPlaceholder: "结束日期",
  155. startPlaceholder: "开始日期",
  156. pickerOptions: pickerOptions,
  157. value: [],
  158. },
  159. },
  160. {
  161. item: {
  162. key: "buyers",
  163. title: "采购员",
  164. },
  165. attr: {
  166. is: "el-popover-multiple-select-v2",
  167. referName: "CONTACTS_PARAM",
  168. valueKey: "code",
  169. },
  170. },
  171. {
  172. item: {
  173. key: "manufacturerName",
  174. title: "生产厂家",
  175. },
  176. attr: {
  177. is: "el-input",
  178. },
  179. },
  180. {
  181. item: {
  182. key: "customerName",
  183. title: "收货客户",
  184. },
  185. attr: {
  186. is: "el-popover-select-v2",
  187. referName: "CUSTOMERDEPT_PARAM",
  188. valueKey: "name",
  189. },
  190. },
  191. {
  192. item: {
  193. key: "documentsCodes",
  194. title: "需求来源",
  195. span: 12,
  196. },
  197. attr: {
  198. is: "el-input",
  199. placeholder: "请输入来源单据号,多个用,分隔",
  200. },
  201. },
  202. {
  203. item: {
  204. key: "materialCodes",
  205. title: "物料编码",
  206. span: 12,
  207. },
  208. attr: {
  209. is: "el-input",
  210. placeholder: "请输入物料编码,多个用,分隔",
  211. },
  212. },
  213. ];
  214. const pickerOptions = {
  215. shortcuts: [
  216. {
  217. text: "昨天",
  218. onClick(picker) {
  219. const end = new Date();
  220. const start = new Date();
  221. start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
  222. picker.$emit("pick", [start, end]);
  223. },
  224. },
  225. {
  226. text: "最近三天",
  227. onClick(picker) {
  228. const end = new Date();
  229. const start = new Date();
  230. start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
  231. picker.$emit("pick", [start, end]);
  232. },
  233. },
  234. {
  235. text: "最近一周",
  236. onClick(picker) {
  237. const end = new Date();
  238. const start = new Date();
  239. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  240. picker.$emit("pick", [start, end]);
  241. },
  242. },
  243. {
  244. text: "最近一个月",
  245. onClick(picker) {
  246. const end = new Date();
  247. const start = new Date();
  248. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  249. picker.$emit("pick", [start, end]);
  250. },
  251. },
  252. {
  253. text: "最近三个月",
  254. onClick(picker) {
  255. const end = new Date();
  256. const start = new Date();
  257. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  258. picker.$emit("pick", [start, end]);
  259. },
  260. },
  261. {
  262. text: "最近半年",
  263. onClick(picker) {
  264. const end = new Date();
  265. const start = new Date();
  266. start.setTime(start.getTime() - 3600 * 1000 * 24 * 180);
  267. picker.$emit("pick", [start, end]);
  268. },
  269. },
  270. ],
  271. };