details.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <template>
  2. <div>
  3. <div class="feed_box">
  4. <div v-for="(item, index) in dataList" :key="index" class="card_box">
  5. <div class="rx-bc">
  6. <div class="item_box rx-bc">
  7. <div class="round">{{ index + 1 }}</div>
  8. <div class="time">投料时间:{{ item.executorTime }} </div>
  9. </div>
  10. <div class="item_box rx-bc">
  11. <div class="time">报工人 {{ item.executorName }}</div>
  12. </div>
  13. <div class="item_box rx-bc">
  14. <div class="time">工序名称: {{ item.taskName }}</div>
  15. </div>
  16. </div>
  17. <div class="rx-bc">
  18. <div class="item_box rx-bc">
  19. <div
  20. class="time"
  21. v-if="item.executorList && item.executorList.length != 0"
  22. >执行人:<span v-for="it in item.executorList"
  23. >【{{ it.name }}】</span
  24. >
  25. </div>
  26. </div>
  27. <div class="item_box rx-bc">
  28. <div class="time">班组名称: {{ item.teamName }}</div>
  29. </div>
  30. </div>
  31. <div v-for="(it, idx) in item.orderInfoList" :key="it.taskId">
  32. <workOrderBom
  33. :item="it"
  34. :isDetails="true"
  35. :isReportWork="false"
  36. ></workOrderBom>
  37. <paramBom
  38. v-if="it.paramDetailList.length != 0"
  39. :list="it.paramDetailList"
  40. ></paramBom>
  41. <deviceBom
  42. v-if="it.equipmentList.length != 0"
  43. :list="it.equipmentList"
  44. :isDetails="true"
  45. ></deviceBom>
  46. <productsBom
  47. v-if="
  48. Object.prototype.hasOwnProperty.call(it, 'inProductList') &&
  49. it.inProductList[0] &&
  50. it.singleReport == 1
  51. "
  52. :productsObj="it.inProductList[0]"
  53. :itemObj="it"
  54. ></productsBom>
  55. <batchProductsBom
  56. v-if="
  57. Object.prototype.hasOwnProperty.call(it, 'inProductList') &&
  58. it.inProductList[0] &&
  59. it.singleReport == 0
  60. "
  61. :productsObj="it.inProductList[0]"
  62. :itemObj="it"
  63. :isEdit="isEdit"
  64. ></batchProductsBom>
  65. <modelBom v-if="it.modelList.length != 0" :list="it.modelList">
  66. </modelBom>
  67. <instanceBom
  68. v-if="it.instanceList.length != 0"
  69. :isDetails="true"
  70. :list="it.instanceList"
  71. :currentTaskDiagram="currentTaskDiagram"
  72. :equipmentList="it.equipmentList"
  73. :workInfo="it"
  74. ></instanceBom>
  75. <!-- <semiProductBom
  76. v-if="it.semiProductList.length != 0"
  77. :isDetails="true"
  78. :list="it.semiProductList"
  79. :currentTaskDiagram="currentTaskDiagram"
  80. :equipmentList="it.equipmentList"
  81. :workInfo="it"
  82. ></semiProductBom> -->
  83. <semiProductJobBom
  84. v-if="it.semiProductList.length != 0"
  85. :list="it.semiProductList"
  86. :equipmentList="it.equipmentList"
  87. :currentTaskDiagram="it.currentTaskDiagram"
  88. :item="it"
  89. :isDetails="true"
  90. title="物料清单"
  91. >
  92. </semiProductJobBom>
  93. <turnoverBom
  94. v-if="it.turnover.length != 0"
  95. :list="it.turnover"
  96. :isDetails="true"
  97. :wordItem="it"
  98. pattern="feed"
  99. ></turnoverBom>
  100. <packingBom
  101. v-if="it.packingList.length != 0"
  102. :list="it.packingList"
  103. ></packingBom>
  104. <palletBom
  105. v-if="
  106. Object.prototype.hasOwnProperty.call(it, 'palletList') &&
  107. it.palletList.length != 0
  108. "
  109. :list="it.palletList"
  110. ></palletBom>
  111. <revolvingDiskBom
  112. v-if="
  113. Object.prototype.hasOwnProperty.call(it, 'revolvingDiskList') &&
  114. it.revolvingDiskList.length != 0
  115. "
  116. :list="it.revolvingDiskList"
  117. ></revolvingDiskBom>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </template>
  123. <script>
  124. import { feedByOrderIds } from '@/api/produce/feeding';
  125. import workOrderBom from './components/workOrderBom.vue';
  126. import deviceBom from './components/deviceBom.vue';
  127. import modelBom from './components/modelBom.vue';
  128. import instanceBom from './components/instanceBom.vue';
  129. // import semiProductBom from './components/semiProductBom';
  130. import packingBom from './components/packingBom.vue';
  131. import palletBom from './components/palletBom';
  132. import revolvingDiskBom from './components/revolvingDiskBom.vue';
  133. import productsBom from './components/productsBom.vue';
  134. import batchProductsBom from './components/batchProductsBom.vue';
  135. import turnoverBom from './components/turnoverBom.vue';
  136. import semiProductJobBom from '@/views/produce/components/jobBooking/components/semiProductJobBom.vue';
  137. import paramBom from '../feeding/components/paramBom.vue';
  138. export default {
  139. components: {
  140. workOrderBom,
  141. deviceBom,
  142. modelBom,
  143. instanceBom,
  144. packingBom,
  145. palletBom,
  146. revolvingDiskBom,
  147. semiProductJobBom,
  148. productsBom,
  149. batchProductsBom,
  150. turnoverBom,
  151. paramBom
  152. },
  153. props: {
  154. routeObj: {
  155. type: Object,
  156. default() {
  157. return {};
  158. }
  159. },
  160. curTaskObj: {
  161. type: Object,
  162. default() {
  163. return () => {};
  164. }
  165. }
  166. },
  167. watch: {
  168. // curTaskObj: {
  169. // handler(obj) {
  170. // console.log(obj, '1131313');
  171. // if (obj && obj.taskId != -2) {
  172. // console.log(obj, '777777');
  173. // this.getList(obj.taskId);
  174. // }
  175. // },
  176. // deep: true,
  177. // immediate: true
  178. // }
  179. curTaskObj: {
  180. handler(obj) {
  181. if (!obj || !obj.taskId) return;
  182. if (obj.taskId === -2) return;
  183. this.getList(obj.taskId);
  184. },
  185. deep: true,
  186. immediate: true
  187. }
  188. },
  189. data() {
  190. return {
  191. ids: [],
  192. taskId: null,
  193. dataList: [],
  194. currentTaskDiagram: {
  195. isFirstTask: 0
  196. },
  197. isLoad: false,
  198. isEdit: true
  199. };
  200. },
  201. created() {
  202. // this.getList();
  203. },
  204. methods: {
  205. async getList(taskId) {
  206. let param = {
  207. ids: [this.routeObj.id],
  208. taskId: taskId
  209. };
  210. const res = await feedByOrderIds(param);
  211. console.log('feedByOrderIds',res);
  212. this.dataList = JSON.parse(JSON.stringify(res));
  213. console.log(this.dataList);
  214. }
  215. }
  216. };
  217. </script>
  218. <style scoped lang="scss">
  219. .rx-bc {
  220. display: flex;
  221. align-items: center;
  222. justify-content: space-between;
  223. }
  224. .item_box {
  225. margin-top: 5px;
  226. margin-bottom: 6px;
  227. padding: 0 10px;
  228. .round {
  229. width: 20px;
  230. height: 20px;
  231. line-height: 20px;
  232. border-radius: 50%;
  233. background: #157a2c;
  234. color: #fff;
  235. text-align: center;
  236. font-size: 12px;
  237. }
  238. .time {
  239. color: #157a2c;
  240. font-family: PingFang HK;
  241. font-size: 14px;
  242. font-style: normal;
  243. font-weight: 500;
  244. margin-left: 8px;
  245. }
  246. }
  247. </style>