dialog-lotInfo.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <dialog-base class="dialog-body" ref="baseDialog" title="批次详情">
  3. <view style="overflow: auto;">
  4. <view class='middle'>
  5. <view class='segment'></view>
  6. <uni-icons type="paperclip" size="30" style="margin-left: 16rpx;"></uni-icons>
  7. <view class="lotTitle">批次信息</view>
  8. <view class='segment'></view>
  9. </view>
  10. <view class="item-info uni-row">
  11. <text class="label">批次号</text>
  12. <text class="label right">{{ lotData['lotCode'] }}</text>
  13. </view>
  14. <view class="item-info uni-row">
  15. <text class="label">产品描述</text>
  16. <text class="label right"
  17. style="word-break: break-all;">{{ store.planDetails['productDescription'] ? store.planDetails['productDescription'] : '-' }}</text>
  18. </view>
  19. <view class="item-info uni-row">
  20. <text class="label">箱号</text>
  21. <text class="label right">{{ lotData['carrierName'] ? lotData['carrierName'] : '-' }}</text>
  22. </view>
  23. <view class="item-info uni-row">
  24. <text class="label">投入数</text>
  25. <text
  26. class="label right">{{lotData['processQualifiedNum'] == 0 ? lotData['productionQuantity'] : lotData['processQualifiedNum']}}</text>
  27. </view>
  28. <view class="item-info uni-row">
  29. <text class="label">已完成工序</text>
  30. <text class="label right">{{ lotData.prevProcess ? lotData['prevProcess'].processAlias : '-'}}</text>
  31. </view>
  32. <view class="item-info uni-row">
  33. <text class="label">待加工工序</text>
  34. <text
  35. class="label right">{{ lotData.currentProcess ? lotData['currentProcess'].processAlias : '-'}}</text>
  36. </view>
  37. <view class="item-info uni-row">
  38. <text class="label">下道工序</text>
  39. <text class="label right">{{ lotData.nextDeptProcess ? lotData['nextDeptProcess'] : '-' }}</text>
  40. </view>
  41. <view class="item-info uni-row">
  42. <text class="label">所在区域</text>
  43. <text class="label right">{{ getPlaceText(lotData) }}</text>
  44. </view>
  45. <view class='middle'>
  46. <view class='segment'></view>
  47. <uni-icons type="paperclip" size="30" style="margin-left: 16rpx;"></uni-icons>
  48. <view class="lotTitle">领料信息</view>
  49. <view class='segment'></view>
  50. </view>
  51. <view class="item-info uni-row">
  52. <text class="label">炉号</text>
  53. <text id="manufacturer"
  54. class="label right">{{ furnaceNoInfo.furnaceNumber ? furnaceNoInfo.furnaceNumber : '-'}}</text>
  55. </view>
  56. <view class="item-info uni-row">
  57. <text class="label">计划单号</text>
  58. <text id="manufacturer"
  59. class="label right">{{ furnaceNoInfo.productionPlanNo ? furnaceNoInfo.productionPlanNo : '-'}}</text>
  60. </view>
  61. <view class="item-info uni-row">
  62. <text class="label">序号</text>
  63. <text class="label right">{{ furnaceNoInfo.lineNumber ? furnaceNoInfo.lineNumber : '-'}}</text>
  64. </view>
  65. <view class="item-info uni-row">
  66. <text class="label">厂家</text>
  67. <text class="label right">{{ furnaceNoInfo.factory ? furnaceNoInfo.factory : '-'}}</text>
  68. </view>
  69. <view class="item-info uni-row">
  70. <text class="label">牌号</text>
  71. <text class="label right">{{ furnaceNoInfo.brandNumber ? furnaceNoInfo.brandNumber : '-' }}</text>
  72. </view>
  73. <view class="item-info uni-row">
  74. <text class="label">规格</text>
  75. <text class="label right">{{ furnaceNoInfo.spec ? furnaceNoInfo.spec : '-' }}</text>
  76. </view>
  77. <view class="item-info uni-row">
  78. <text class="label">形状</text>
  79. <text class="label right">{{ furnaceNoInfo.shape ? furnaceNoInfo.shape : '-'}}</text>
  80. </view>
  81. <view class="item-info uni-row">
  82. <text class="label">材料直径</text>
  83. <text class="label right">{{ furnaceNoInfo.diameter ? furnaceNoInfo.diameter : '-' }}</text>
  84. </view>
  85. <view class="item-info uni-row">
  86. <text class="label">原料编码</text>
  87. <text
  88. class="label right">{{ furnaceNoInfo.rawMaterialCode ? furnaceNoInfo.rawMaterialCode : '-' }}</text>
  89. </view>
  90. <view class="item-info uni-row">
  91. <text class="label">来料日期</text>
  92. <text class="label right">{{ furnaceNoInfo.incomingDate ? furnaceNoInfo.incomingDate : '-' }}</text>
  93. </view>
  94. <view class="item-info uni-row">
  95. <text class="label">技术要求1</text>
  96. <text
  97. class="label right">{{ furnaceNoInfo.firstTechnicalRequirement ? furnaceNoInfo.firstTechnicalRequirement : '-' }}</text>
  98. </view>
  99. <view class="item-info uni-row">
  100. <text class="label">技术要求2</text>
  101. <text
  102. class="label right">{{ furnaceNoInfo.secondTechnicalRequirement ? furnaceNoInfo.secondTechnicalRequirement : '-' }}</text>
  103. </view>
  104. </view>
  105. </dialog-base>
  106. </template>
  107. <script setup>
  108. import {
  109. ref,
  110. getCurrentInstance
  111. } from 'vue'
  112. import {
  113. store
  114. } from '../../store';
  115. import {
  116. getFurnaceNoInfoByDayworkId
  117. } from '@/api/business/furnaceNoInfo.js'
  118. const baseDialog = ref(null)
  119. const lotData = ref(null)
  120. const furnaceNoInfo = ref(null)
  121. function open() {
  122. lotData.value = store.dayworkInfo;
  123. getFurnaceNoInfoByDayworkId({
  124. dayworkId: store.dayworkInfo.id
  125. }).then(res => {
  126. if (res.code == 200) {
  127. furnaceNoInfo.value = res.rows.length == 0 ? [{}] : res.rows[0];
  128. baseDialog.value.open();
  129. } else {
  130. uni.showToast({
  131. icon: 'none',
  132. title: '炉号信息获取异常,请稍后重试'
  133. })
  134. }
  135. })
  136. }
  137. function getPlaceText(item) {
  138. let place = item.dayworkItemList[0].place == "" ? item.dayworkItemList[0].turnoverArea == "" ?
  139. '-' : '默认周转区' : item.dayworkItemList[0].place
  140. let deptName = item.dayworkItemList[0].deptName
  141. return place == "-" ? deptName == "" ? "-" : deptName : deptName + "-" + place
  142. }
  143. function close() {
  144. baseDialog.value.close()
  145. }
  146. defineExpose({
  147. open
  148. })
  149. </script>
  150. <style lang="scss">
  151. .dialog-body {
  152. // height: 60%;
  153. // margin: auto auto;
  154. overflow: auto;
  155. }
  156. .item-info {
  157. margin: 8rpx;
  158. .label {
  159. font-size: 28rpx;
  160. width: 220rpx;
  161. color: #808080;
  162. &.right {
  163. flex: 1;
  164. color: #000000;
  165. }
  166. }
  167. }
  168. .status-btn {
  169. justify-content: flex-end;
  170. align-items: center;
  171. .turnover-tag {
  172. padding-right: 12rpx;
  173. padding-left: 12rpx;
  174. border-radius: 8rpx;
  175. border: 1rpx solid #FF7901;
  176. background-color: #FF7901;
  177. font-size: 28rpx;
  178. color: #FFFFFF;
  179. }
  180. .reporting-tag {
  181. padding-right: 12rpx;
  182. padding-left: 12rpx;
  183. border-radius: 8rpx;
  184. margin-left: 16rpx;
  185. border: 1rpx solid #1684fc;
  186. background-color: #1684fc;
  187. font-size: 28rpx;
  188. color: #FFFFFF;
  189. }
  190. }
  191. .middle {
  192. display: flex;
  193. flex-direction: row;
  194. align-items: center;
  195. justify-content: center
  196. }
  197. .segment {
  198. width: 80rpx;
  199. background-color: rgba(213, 213, 213, 1);
  200. border: 1rpx solid rgba(213, 213, 213, 1);
  201. }
  202. .lotTitle {
  203. margin: 16rpx 16rpx 16rpx 0;
  204. }
  205. </style>