dialog-lotReporting.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <dialog-base class="dialog-body" ref="baseDialog" title="添加批次报工">
  3. <view style="overflow: auto;height: 800rpx;">
  4. <view v-for="(item, index) in lotData" :key="index" class="list-item" >
  5. <view class="item-info uni-row">
  6. <text class="label">批次号</text>
  7. <text class="label right">{{ item['lotCode'] }}</text>
  8. </view>
  9. <view class="item-info uni-row">
  10. <text class="label">生产计划单号</text>
  11. <text class="label right">{{ item['productionPlanNo'] }}</text>
  12. </view>
  13. <view class="item-info uni-row">
  14. <text class="label">产品描述</text>
  15. <text class="label right">{{ item['productDescription'] }}</text>
  16. </view>
  17. <view class="item-info uni-row">
  18. <text class="label">箱号</text>
  19. <text class="label right">{{ item['carrierName'] }}</text>
  20. </view>
  21. <view class="item-info uni-row">
  22. <text class="label">下道工序</text>
  23. <view class="label right uni-row">{{ item['nextProcess'] ? item['nextProcess'].processAlias : '-' }}
  24. (<view style="color: #1684fc;" @click.stop="handleClickProcessList(item)">&nbsp;工艺列表&nbsp;
  25. </view>)
  26. </view>
  27. </view>
  28. <view class='middle'>
  29. <view class='segment'></view>
  30. <uni-icons type="paperclip" size="30" style="margin: 10rpx;"></uni-icons>
  31. <view class='segment'></view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="list-item">
  36. <view class="item-info uni-row">
  37. <text class="label">下序车间</text>
  38. <uni-data-select v-model="curDaywork.workshopId" :localdata="workshopList" @change="handleChangeWorkshop"
  39. :clear="false"
  40. style="outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
  41. </view>
  42. <view class="item-info uni-row">
  43. <text class="label">下序工段</text>
  44. <uni-data-select v-model="curDaywork.deptId" :localdata="deptList"
  45. :clear="false"
  46. style="outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
  47. </view>
  48. </view>
  49. <!-- 抽屉 -->
  50. <view>
  51. </view>
  52. <view style="z-index: 99999;">
  53. <uni-drawer ref="showRight" mode="right" :mask-click="true">
  54. <view class="scroll-view">
  55. <scroll-view class="scroll-view-box" style="height:100%;">
  56. <view style="width: 100%;text-align: center;;font-size: 48rpx;margin: 48rpx 0 24rpx 0;">工艺列表
  57. </view>
  58. <view style="font-size: 24rpx;width: 100%;text-align: center;color: red;margin-bottom: 48rpx;">
  59. 仅显示当前工序后面工艺</view>
  60. <view class="info-content" v-for="(item,index) in curProcessAfte" :key="index"
  61. style="width: 100%;margin: 8rpx 0 8rpx 14%;">
  62. <text>{{ index + 1 }}.{{item.processAlias}}</text>
  63. </view>
  64. </scroll-view>
  65. </view>
  66. </uni-drawer>
  67. </view>
  68. <view class="add-btn-container uni-row">
  69. <button type="default" class="leftBtn" @click="handleFinishScan">结束扫码</button>
  70. <button type="default" class="rightBtn" @click="handleContinueScan">继续扫码</button>
  71. </view>
  72. </dialog-base>
  73. </template>
  74. <script setup>
  75. import {
  76. ref,
  77. getCurrentInstance
  78. } from 'vue'
  79. import {
  80. getDictInfoByType
  81. } from '@/api/dict/dict.js'
  82. const baseDialog = ref(null)
  83. const lotData = ref(null)
  84. const curDaywork = ref({})
  85. const workshopList = ref([])
  86. const curProcessAfte = ref([])
  87. const deptList = ref([])
  88. const showRight = ref(null) // 抽屉
  89. function open(data) {
  90. lotData.value = data
  91. baseDialog.value.open()
  92. init()
  93. }
  94. function init() {
  95. //查询车间
  96. }
  97. function handleClickProcessList(item) {
  98. let curProcessAfterList = [{processAlias:'下料'},{processAlias:'大切断'},{processAlias:'分选'},{processAlias:'下料'},{processAlias:'大切断'},{processAlias:'分选'}];
  99. // let nextIndex = 0;
  100. // for (let i = 0; i < item.processSequence.length; i++) {
  101. // if (item.nextProcess.id == item.processSequence[i].id) {
  102. // nextIndex = i;
  103. // }
  104. // }
  105. // for (let i = 0; i < item.processSequence.length; i++) {
  106. // if (i >= nextIndex) {
  107. // curProcessAfterList.push(item.processSequence[i]);
  108. // }
  109. // }
  110. // console.log(curProcessAfterList)
  111. curProcessAfte.value = curProcessAfterList;
  112. showRight.value.open();
  113. }
  114. //切换车间
  115. function handleChangeWorkshop() {
  116. }
  117. //结束扫码
  118. function handleFinishScan() {
  119. }
  120. //继续扫码
  121. function handleContinueScan() {
  122. }
  123. function close() {
  124. baseDialog.value.close()
  125. }
  126. defineExpose({
  127. open
  128. })
  129. </script>
  130. <style lang="scss">
  131. .dialog-body {
  132. // height: 60%;
  133. // margin: auto auto;
  134. overflow: auto;
  135. }
  136. .item-info {
  137. margin: 8rpx;
  138. .label {
  139. font-size: 28rpx;
  140. width: 220rpx;
  141. color: #808080;
  142. &.right {
  143. flex: 1;
  144. color: #000000;
  145. }
  146. }
  147. }
  148. .middle {
  149. display: flex;
  150. flex-direction: row;
  151. align-items: center;
  152. justify-content: center
  153. }
  154. .segment {
  155. width: 280rpx;
  156. background-color: rgba(213, 213, 213, 1);
  157. border: 1rpx solid rgba(213, 213, 213, 1);
  158. }
  159. .middle {
  160. display: flex;
  161. flex-direction: row;
  162. align-items: center;
  163. justify-content: center
  164. }
  165. .segment {
  166. width: 80rpx;
  167. background-color: rgba(213, 213, 213, 1);
  168. border: 1rpx solid rgba(213, 213, 213, 1);
  169. }
  170. .add-btn-container {
  171. margin-top: 32rpx;
  172. .leftBtn {
  173. flex: 1;
  174. background-color: rgb(164, 173, 179);
  175. color: #FFFFFF;
  176. }
  177. .rightBtn {
  178. flex: 1;
  179. margin-left: 24rpx;
  180. background-color: rgb(91, 214, 165);
  181. color: #FFFFFF;
  182. }
  183. }
  184. </style>