gxclhc.vue 3.7 KB

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