column.js 5.6 KB

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