workOrder.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <ele-pro-table
  3. ref="equiTable"
  4. :columns="columns"
  5. :datasource="datasource"
  6. :selection.sync="selection"
  7. :current.sync="current"
  8. highlight-current-row
  9. row-key="id"
  10. height="20vh"
  11. >
  12. </ele-pro-table>
  13. </template>
  14. <script>
  15. import { workOrder } from '@/api/bpm/components/exceptionManagement';
  16. export default {
  17. components: {},
  18. props: {
  19. selectList: Array,
  20. type: {
  21. default: 1 //1多选 2单选
  22. }
  23. },
  24. data() {
  25. return {
  26. equipmentdialog: false,
  27. current: null,
  28. planType: [
  29. { label: '所有计划类型', value: null },
  30. { label: '内销计划', value: '1' },
  31. { label: '外销计划', value: '2' },
  32. { label: '预制计划', value: '3' }
  33. ],
  34. columns: [
  35. {
  36. width: 45,
  37. type: 'selection',
  38. columnKey: 'selection',
  39. align: 'center',
  40. reserveSelection: true,
  41. show: this.type == 1
  42. },
  43. {
  44. columnKey: 'index',
  45. label: '序号',
  46. type: 'index',
  47. width: 55,
  48. align: 'center',
  49. showOverflowTooltip: true,
  50. fixed: 'left'
  51. },
  52. {
  53. label: '生产订单号',
  54. align: 'center',
  55. minWidth: 180,
  56. prop: 'code',
  57. showOverflowTooltip: true,
  58. fixed: 'left'
  59. },
  60. {
  61. prop: 'productionPlanCode',
  62. label: '计划编号',
  63. align: 'center',
  64. showOverflowTooltip: true,
  65. minWidth: 180
  66. },
  67. {
  68. prop: 'produceRoutingName',
  69. label: '工艺路线',
  70. minWidth: 130,
  71. showOverflowTooltip: true,
  72. align: 'center'
  73. },
  74. {
  75. prop: 'productCode',
  76. label: '产品编码',
  77. align: 'center',
  78. showOverflowTooltip: true,
  79. minWidth: 180
  80. },
  81. {
  82. prop: 'productName',
  83. label: '产品名称',
  84. align: 'center',
  85. showOverflowTooltip: true,
  86. minWidth: 120
  87. },
  88. {
  89. prop: 'brandNo',
  90. label: '牌号',
  91. align: 'center',
  92. minWidth: 100,
  93. showOverflowTooltip: true
  94. },
  95. {
  96. prop: 'batchNo',
  97. label: '批号',
  98. align: 'center',
  99. minWidth: 100,
  100. showOverflowTooltip: true
  101. },
  102. {
  103. prop: 'model',
  104. label: '型号',
  105. minWidth: 120,
  106. showOverflowTooltip: true,
  107. align: 'center'
  108. },
  109. {
  110. prop: 'priority',
  111. label: '优先级',
  112. align: 'center',
  113. minWidth: 90,
  114. showOverflowTooltip: true,
  115. sortable: 'custom'
  116. },
  117. {
  118. prop: 'formingNum',
  119. label: '要求生产数量',
  120. align: 'center',
  121. showOverflowTooltip: true,
  122. minWidth: 110
  123. },
  124. {
  125. prop: 'formingWeight',
  126. label: '要求生产重量',
  127. align: 'center',
  128. showOverflowTooltip: true,
  129. minWidth: 110
  130. },
  131. {
  132. prop: 'planStartTime',
  133. label: '计划开始时间',
  134. align: 'center',
  135. showOverflowTooltip: true,
  136. minWidth: 110
  137. },
  138. {
  139. prop: 'planCompleteTime',
  140. label: '计划结束时间',
  141. align: 'center',
  142. showOverflowTooltip: true,
  143. minWidth: 110
  144. },
  145. {
  146. prop: 'createTime',
  147. label: '创建时间',
  148. align: 'center',
  149. showOverflowTooltip: true,
  150. minWidth: 110
  151. },
  152. {
  153. prop: 'serialNo',
  154. label: '客户代号',
  155. align: 'center',
  156. minWidth: 110,
  157. showOverflowTooltip: true
  158. },
  159. {
  160. prop: 'simpleName',
  161. label: '客户简称',
  162. align: 'center',
  163. minWidth: 120,
  164. showOverflowTooltip: true
  165. }
  166. ],
  167. categoryLevelId: null,
  168. code: null,
  169. selection: []
  170. };
  171. },
  172. watch: {},
  173. methods: {
  174. datasource({ page, where, limit }) {
  175. return workOrder({
  176. ...where,
  177. pageNum: page,
  178. size: limit
  179. });
  180. },
  181. /* 刷新表格 */
  182. reload(where) {
  183. this.$nextTick(() =>
  184. this.$refs.equiTable.reload({ page: 1, limit: 10, where })
  185. );
  186. },
  187. // 选择
  188. getValue() {
  189. this.selection.forEach((item) => {
  190. item['objType'] = 2;
  191. });
  192. return JSON.parse(JSON.stringify(this.selection));
  193. }
  194. }
  195. };
  196. </script>