columns.tsx 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. import { ref } from "vue";
  2. import { cg_order_source_options } from "/@/utils/status";
  3. const good_type = [
  4. {
  5. value: "1",
  6. label: "库存"
  7. },
  8. {
  9. value: "2",
  10. label: "非库存"
  11. },
  12. {
  13. value: "3",
  14. label: "咨询"
  15. }
  16. ];
  17. export function useColumns() {
  18. const columns = ref([
  19. {
  20. type: "selection",
  21. width: 55,
  22. hide: ({ checkList }) => !checkList.includes("勾选列")
  23. },
  24. {
  25. label: "序号",
  26. type: "index",
  27. width: 70,
  28. hide: ({ checkList }) => !checkList.includes("序号列")
  29. },
  30. {
  31. label: "采购单编号",
  32. prop: "sequenceNo",
  33. width: "120px"
  34. },
  35. {
  36. label: "商品单号",
  37. prop: "goodNo",
  38. width: "120px"
  39. },
  40. {
  41. label: "商品名称",
  42. prop: "goodName",
  43. width: "120px"
  44. },
  45. {
  46. label: "业务公司编号",
  47. prop: "companyNo",
  48. width: "120px"
  49. },
  50. {
  51. label: "业务公司名称",
  52. prop: "companyName",
  53. width: "120px"
  54. },
  55. {
  56. label: "供应商编号",
  57. prop: "supplierNo",
  58. width: "120px"
  59. },
  60. {
  61. label: "供应商名称",
  62. prop: "supplierName",
  63. width: "120px"
  64. },
  65. {
  66. label: "备库编号",
  67. prop: "bkCode",
  68. width: "120px"
  69. },
  70. {
  71. label: "确认单编号",
  72. width: "120px",
  73. prop: "goodNo"
  74. },
  75. {
  76. label: "状态",
  77. prop: "cgdType",
  78. width: 95,
  79. cellRenderer: ({ row, props }) => (
  80. <el-tag size={props.size} type="" effect="plain">
  81. {row.status === "0" ? "未对账" : "对账"}
  82. </el-tag>
  83. )
  84. },
  85. {
  86. label: "订单来源",
  87. prop: "cgdSource",
  88. width: 95,
  89. cellRenderer: ({ row, props }) => (
  90. <el-tag size={props.size} type="" effect="plain">
  91. {(
  92. cg_order_source_options.find(
  93. item => item.value == row.cgdSource + ""
  94. ) || {}
  95. ).label || "--"}
  96. </el-tag>
  97. )
  98. },
  99. {
  100. label: "商品类型",
  101. prop: "cgdType",
  102. width: 95,
  103. cellRenderer: ({ row, props }) => (
  104. <el-tag size={props.size} type="" effect="plain">
  105. {(good_type.find(item => item.value == row.cgdType + "") || {})
  106. .label || "--"}
  107. </el-tag>
  108. )
  109. },
  110. {
  111. label: "采购员",
  112. prop: "ownerName",
  113. width: 75
  114. },
  115. {
  116. label: "创建时间",
  117. prop: "addtime",
  118. width: 155
  119. },
  120. {
  121. label: "操作",
  122. fixed: "right",
  123. width: 55,
  124. slot: "operation"
  125. }
  126. ]);
  127. return {
  128. columns
  129. };
  130. }
  131. export const cgd_status = [
  132. {
  133. value: "0",
  134. label: "未对账"
  135. },
  136. {
  137. value: "1",
  138. label: "对账"
  139. }
  140. ];
  141. export const cgd_type = [
  142. {
  143. value: "1",
  144. label: "库存"
  145. },
  146. {
  147. value: "2",
  148. label: "非库存"
  149. },
  150. {
  151. value: "3",
  152. label: "咨询"
  153. }
  154. ];
  155. export const cgd_source = [
  156. {
  157. value: "1",
  158. label: "直接下单"
  159. },
  160. {
  161. value: "2",
  162. label: "咨询"
  163. },
  164. {
  165. value: "3",
  166. label: "项目"
  167. },
  168. {
  169. value: "4",
  170. label: "平台"
  171. },
  172. {
  173. value: "5",
  174. label: "有赞"
  175. }
  176. ];
  177. export const product_type = [
  178. {
  179. value: "1",
  180. label: "正常商品"
  181. },
  182. {
  183. value: "2",
  184. label: "赠品"
  185. },
  186. {
  187. value: "3",
  188. label: "样品"
  189. }
  190. ];
  191. export const send_type = [
  192. {
  193. value: "1",
  194. label: "包邮"
  195. },
  196. {
  197. value: "2",
  198. label: "自提"
  199. }
  200. ];
  201. export const pay_status = [
  202. {
  203. value: "1",
  204. label: "未付款"
  205. },
  206. {
  207. value: "2",
  208. label: "部分付款"
  209. },
  210. {
  211. value: "3",
  212. label: "已付款"
  213. }
  214. ];
  215. export const inv_status = [
  216. {
  217. value: "1",
  218. label: "未回票"
  219. },
  220. {
  221. value: "2",
  222. label: "部分回票"
  223. },
  224. {
  225. value: "3",
  226. label: "已回票"
  227. }
  228. ];