gxclhc.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <el-dialog
  3. :model-value="modelValue"
  4. title="工序产量核查"
  5. fullscreen
  6. :before-close="()=>{emits('update:modelValue', false )}"
  7. >
  8. <el-button
  9. type="primary"
  10. style="width:80px; height: 40px;margin-bottom: 20px"
  11. @click="emits('update:modelValue', false )"
  12. >退出</el-button>
  13. <el-form inline>
  14. <el-form-item label="工单编号">
  15. <el-input
  16. v-model="input"
  17. style="width: 100px"
  18. @keyup.enter="handleGetTable"
  19. />
  20. <el-input
  21. v-model="cpmc"
  22. class="cpmc"
  23. readonly
  24. style="width: 400px;margin-left: 3px"
  25. />
  26. </el-form-item>
  27. <el-table
  28. :data="tableData"
  29. border
  30. highlight-current-row
  31. show-overflow-tooltip
  32. height="70vh"
  33. :row-style="{ height: '20px' }"
  34. :cell-style="{ padding: '0px' }"
  35. :header-row-style="{ height: '20px' }"
  36. :header-cell-style="{ padding: '0px' }"
  37. >
  38. <el-table-column
  39. label="印件及工序名称"
  40. width="250"
  41. prop="Gy0_yjno"
  42. />
  43. <el-table-column
  44. label="工序计划产量"
  45. width="120"
  46. prop="Gy0_计划接货数"
  47. />
  48. <el-table-column
  49. label="联数"
  50. width="80"
  51. prop="Gy0_ls"
  52. />
  53. <el-table-column
  54. label="折算车头产量"
  55. width="120"
  56. prop=""
  57. />
  58. <el-table-column
  59. label="实际上报产量"
  60. width="120"
  61. prop="Gy0_ls"
  62. />
  63. <el-table-column
  64. label="制程废品"
  65. width="120"
  66. prop=""
  67. />
  68. <el-table-column
  69. label="制程废品率"
  70. width="120"
  71. prop="制程废品率"
  72. />
  73. <el-table-column
  74. label="来料异常"
  75. width="120"
  76. prop="来料异常"
  77. />
  78. <el-table-column
  79. label="流程单数"
  80. width="120"
  81. prop="process_num"
  82. />
  83. <el-table-column
  84. label="当前设备"
  85. width="120"
  86. prop="Gy0_sbbh"
  87. />
  88. <el-table-column
  89. label="工序状态"
  90. width="120"
  91. prop="PD_WG"
  92. />
  93. <el-table-column
  94. label="首板生产日期"
  95. width="120"
  96. prop="sczl_rq"
  97. />
  98. </el-table>
  99. </el-form>
  100. </el-dialog>
  101. </template>
  102. <script>
  103. export default {
  104. name: 'Gxclhc',
  105. }
  106. // 4.1考核设置-获取工单印件资料
  107. import service from '@/utils/request'
  108. const getOrderProcessCount = (params) => {
  109. return service({
  110. url: '/mes_server/order_super_loss/getOrderProcessCount',
  111. method: 'get',
  112. params
  113. })
  114. }
  115. const getGxMc = (params) => {
  116. return service({
  117. url: '/mes_server/packaging_count_document/getGxMc',
  118. method: 'get',
  119. params
  120. })
  121. }
  122. </script>
  123. <script setup>
  124. import { watch, ref, reactive, defineProps, defineEmits, onBeforeUnmount } from 'vue'
  125. const props = defineProps(['modelValue', 'gdbh'])
  126. const emits = defineEmits(['update:modelValue'])
  127. const input = ref(props.gdbh)
  128. const cpmc = ref('')
  129. const tableData = ref([])
  130. const handleGetTable = async() => {
  131. const ret = await getGxMc({ gdbh: input.value })
  132. if (ret['code'] === 0) {
  133. cpmc.value = ret['data'][0]['Gd_cpmc']
  134. console.log(ret['data'])
  135. }
  136. const res = await getOrderProcessCount({ order: input.value })
  137. if (res['code'] === 0) {
  138. const { data } = res
  139. tableData.value = data.map(item => ({
  140. ...item,
  141. Gy0_yjno: `${item['Gy0_yjno']}-${item['Gy0_gxh']} ${item['Gy0_gxmc']} ${item['Add_gxmc']}`,
  142. }))
  143. }
  144. }
  145. handleGetTable()
  146. </script>
  147. <style scoped>
  148. :deep(.cpmc .el-input__inner) {
  149. color: red !important;
  150. }
  151. </style>