dialog-lot.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <dialog-base ref="baseDialog" title="添加新批次">
  3. <view class="list-title"><text class="label">批次号:{{form['batchNumber']}}</text></view>
  4. <view class="list-container">
  5. <view class="list-container-item uni-row">
  6. <text class="label">产品描述</text>
  7. <text class="label value">{{form['caseNumber']}}</text>
  8. </view>
  9. <view class="list-container-item uni-row">
  10. <text class="label">关联箱号</text>
  11. <text class="label value">{{form['caseNumber']}}</text>
  12. </view>
  13. <view class="list-container-item uni-row">
  14. <text class="label">当前工序</text>
  15. <text class="label value">{{form['totalWorkingHours']}}</text>
  16. </view>
  17. <view class="list-container-item uni-row" style="border-bottom: 1px solid #999999;">
  18. <text class="label">投产数量</text>
  19. <text class="label value">{{form['qualifiedQuantity']}}</text>
  20. </view>
  21. </view>
  22. <!-- <view class="list-title"><text class="label">请选择设备:</text></view>
  23. <view class="equipment-container uni-row ">
  24. <view v-for="(item, index) in equiments" :class="{'item':true,'selected': selectedButton === item}" :key="index" @click="selectButton(item)"><text class="label" >{{item}}</text></view>
  25. </view> -->
  26. <!-- </scroll-view> -->
  27. <view class="add-btn-container uni-row">
  28. <button type="primary" class="btn" >确认</button>
  29. </view>
  30. </dialog-base>
  31. </template>
  32. <script setup>
  33. import {
  34. ref,
  35. getCurrentInstance
  36. } from 'vue'
  37. const baseDialog = ref(null)
  38. const selectedButton = ref(null)
  39. const form = ref({
  40. batchNumber: "DC23727410070",
  41. caseNumber: "X12522、X522、X15522、J5211、J5112",
  42. totalWorkingHours: 135.5,
  43. qualifiedQuantity: 600,
  44. invest: 1000,
  45. previousProcess: "NC车1",
  46. currentProcess: "热处理",
  47. NextProcess: "清洗",
  48. status: 0
  49. })
  50. // const equiments = ref(['009-21','009-22','009-23','009-24','009-25','009-26','009-27','009-28','009-29'])
  51. // const selectButton = (data) => {
  52. // selectedButton.value = data;
  53. // }
  54. const open = (data) => {
  55. // console.log(dialog.value)
  56. baseDialog.value.open()
  57. }
  58. defineExpose({
  59. open
  60. })
  61. function handleScanCode(){
  62. uni.scanCode({
  63. onlyFromCamera: true,
  64. success: function (res) {
  65. }
  66. });
  67. }
  68. </script>
  69. <style lang="scss">
  70. .dialog-body {
  71. .list-title {
  72. margin: 40rpx 0 20rpx 0;
  73. .label {
  74. font-size: 32rpx;
  75. font-weight: bold;
  76. }
  77. }
  78. .list-container {
  79. width: 100%;
  80. display: flex;
  81. align-items: flex-start;
  82. padding: 0 4rpx;
  83. .list-container-item {
  84. width: 100%;
  85. border: 1px solid #999999;
  86. border-bottom: none;
  87. padding: 12rpx 8rpx;
  88. .label {
  89. font-size: 28rpx;
  90. color: gray;
  91. width: 144rpx;
  92. &.value {
  93. flex: 1;
  94. }
  95. }
  96. }
  97. }
  98. .add-btn-container {
  99. margin-top: 32rpx;
  100. .btn {
  101. flex: 1;
  102. }
  103. }
  104. }
  105. </style>