khsz.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. disabled
  11. style="width:80px; height: 40px;margin-bottom: 20px"
  12. @click=""
  13. >更新</el-button>
  14. <el-button
  15. type="primary"
  16. style="width:80px; height: 40px;margin-bottom: 20px"
  17. @click="emits('update:modelValue', false )"
  18. >退出</el-button>
  19. <el-form
  20. inline
  21. @submit.native.prevent
  22. >
  23. <el-form-item label="工单编号">
  24. <el-input
  25. v-model="input"
  26. autocomplete="off"
  27. style="width: 100px"
  28. @keyup.enter="handleGetTable"
  29. />
  30. </el-form-item>
  31. <el-table
  32. :data="tableData"
  33. border
  34. height="70vh"
  35. :row-style="{ height: '20px' }"
  36. :cell-style="{ padding: '0px' }"
  37. :header-row-style="{ height: '20px' }"
  38. :header-cell-style="{ padding: '0px' }"
  39. >
  40. <el-table-column
  41. label="工单编号"
  42. width="100"
  43. prop="Yj_gdbh"
  44. />
  45. <el-table-column
  46. label="印件编码"
  47. width="100"
  48. prop="yj_Yjdh"
  49. />
  50. <el-table-column
  51. label="印件号"
  52. width="100"
  53. prop="yj_Yjno"
  54. />
  55. <el-table-column
  56. label="印件名称"
  57. width="400"
  58. prop="yj_yjmc"
  59. />
  60. <el-table-column
  61. label="当前考核设置"
  62. width="150"
  63. prop="当前考核设置"
  64. />
  65. <el-table-column
  66. label="新考核设置"
  67. width="150"
  68. >
  69. <template #default="{ row }">
  70. <!-- 使用 el-select 来创建选择框 -->
  71. <el-select
  72. v-model="row.新考核设置"
  73. placeholder="请选择"
  74. >
  75. <el-option
  76. label="参与"
  77. value="参与"
  78. />
  79. <el-option
  80. label="剔除"
  81. value="剔除"
  82. />
  83. </el-select>
  84. </template>
  85. </el-table-column>
  86. </el-table>
  87. </el-form>
  88. </el-dialog>
  89. </template>
  90. <script>
  91. export default {
  92. name: 'Khsz',
  93. }
  94. // 4.1考核设置-获取工单印件资料
  95. import service from '@/utils/request'
  96. export const getOrderYj = (params) => {
  97. return service({
  98. url: '/mes_server/order_super_loss/getOrderYj',
  99. method: 'get',
  100. params
  101. })
  102. }
  103. </script>
  104. <script setup>
  105. import { watch, ref, reactive, defineProps, defineEmits, onBeforeUnmount } from 'vue'
  106. const props = defineProps(['modelValue', 'gdbh'])
  107. const emits = defineEmits(['update:modelValue'])
  108. const input = ref(props.gdbh)
  109. const tableData = ref([])
  110. const handleGetTable = async() => {
  111. const res = await getOrderYj({ order: input.value })
  112. if (res['code'] === 0) {
  113. const { data } = res
  114. data['当前考核设置'] = data['质量考核'] === 0 ? '参与' : '剔除'
  115. data['新考核设置'] = data['当前考核设置']
  116. const arr = [data]
  117. console.log(arr)
  118. tableData.value = arr
  119. }
  120. }
  121. </script>
  122. <style scoped>
  123. </style>