detail.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="报损报溢详情" @clickLeft="back"></uni-nav-bar>
  4. <view>
  5. <CellInfo label="报损报溢编码" :value="infoData.code"></CellInfo>
  6. <CellInfo label="名称" :value="infoData.name"></CellInfo>
  7. <CellInfo label="报损报溢部门" :value="infoData.executeGroupName"></CellInfo>
  8. <CellInfo label="报损报溢人" :value="infoData.executorName"></CellInfo>
  9. <!-- <CellInfo label="审核人部门" :value="infoData.auditDeptName"></CellInfo>
  10. <CellInfo label="审核人" :value="infoData.auditName"></CellInfo> -->
  11. <CellInfo label="备注" :value="infoData.remark"></CellInfo>
  12. </view>
  13. <uni-section title="报损报溢明细" type="line">
  14. <view class="order-box">盘点工单{{ formData.workOrderCode }}</view>
  15. <view v-for="(item, index) in formData.list" :key="index" class="list-card">
  16. <view class="status" :style="{ color: colorInfo[item.status] }">
  17. <text>{{ statusInfo[item.status] }}</text>
  18. <text>数量:{{ item[countInfo[item.status]] }}</text>
  19. </view>
  20. <view class="row first">
  21. <view class="col" style="width: 100%">
  22. <text class="main">{{ item.categoryName }}</text>
  23. {{ item.categoryCode }}
  24. </view>
  25. <view class="col" style="width: 100%">
  26. <text class="main">包装编码:</text>
  27. {{ item.packageNo }}
  28. </view>
  29. <view class="col" style="width: 100%">
  30. <text class="main">仓库:</text>
  31. {{ item.info.warehouseName }}
  32. </view>
  33. </view>
  34. <view class="row">
  35. <view class="col">
  36. <text class="label">包装数量:</text>
  37. {{ item.info.packingCountBase }}
  38. </view>
  39. <view class="col">
  40. <text class="label">包装单位:</text>
  41. {{ item.info.packingUnit }}
  42. </view>
  43. <view class="col">
  44. <text class="label">重量:</text>
  45. {{ item.info.weight }}
  46. </view>
  47. <view class="col">
  48. <text class="label">重量单位:</text>
  49. {{ item.info.weightUnit }}
  50. </view>
  51. <view class="col">
  52. <text class="label">批次号:</text>
  53. {{ item.batchNo }}
  54. </view>
  55. </view>
  56. </view>
  57. </uni-section>
  58. </view>
  59. </template>
  60. <script>
  61. import { getReportPlanDetailById } from '@/api/warehouseManagement'
  62. import CellInfo from '@/components/CellInfo.vue'
  63. export default {
  64. components: { CellInfo },
  65. data() {
  66. return {
  67. pickerIndex: 0,
  68. statusInfo: {
  69. 2: '盘盈',
  70. 3: '丢失',
  71. 4: '破损'
  72. },
  73. countInfo: {
  74. 2: 'surplusQuantity',
  75. 3: 'loseQuantity',
  76. 4: 'wornQuantity'
  77. },
  78. colorInfo: {
  79. 2: 'red',
  80. 3: 'green',
  81. 4: 'black'
  82. },
  83. statusOption: [
  84. {
  85. label: '盘盈',
  86. value: '2',
  87. numKey: 'surplusQuantity'
  88. },
  89. {
  90. label: '丢失',
  91. value: '3',
  92. numKey: 'loseQuantity'
  93. },
  94. {
  95. label: '破损',
  96. value: '4',
  97. numKey: 'wornQuantity'
  98. }
  99. ],
  100. deptList: [],
  101. userList: [],
  102. infoData: {
  103. auditId: '',
  104. auditName: '',
  105. verifyDeptCode: '',
  106. verifyDeptName: '',
  107. workOrderCode: '',
  108. list: []
  109. },
  110. formData: {}
  111. }
  112. },
  113. onLoad({ id }) {
  114. this.getDetail(id)
  115. },
  116. methods: {
  117. async getDetail(id) {
  118. getReportPlanDetailById(id).then(res => {
  119. this.infoData = res
  120. this.formData.workOrderCode = res.info[0].code
  121. this.formData.list = res.info[0].planDetailVOList
  122. })
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss" scoped>
  128. .footBox {
  129. position: fixed;
  130. bottom: 0;
  131. left: 0;
  132. right: 0;
  133. }
  134. .mainBox {
  135. padding-bottom: 90rpx;
  136. /deep/ .list-cell {
  137. padding: 10rpx 0;
  138. }
  139. .order-box {
  140. color: #7f7f7f;
  141. background-color: rgba(215, 215, 215, 0.729411764705882);
  142. line-height: 44rpx;
  143. border-radius: 44rpx;
  144. text-align: center;
  145. font-size: 28rpx;
  146. margin: 0 20rpx;
  147. }
  148. .list-card {
  149. border-bottom: 6rpx solid #f2f2f2;
  150. position: relative;
  151. .status {
  152. padding: 6rpx 20rpx;
  153. font-weight: bold;
  154. font-size: 28rpx;
  155. display: flex;
  156. justify-content: space-between;
  157. align-items: center;
  158. border-bottom: 1rpx solid #f2f2f2;
  159. }
  160. .del {
  161. position: absolute;
  162. color: $uni-color-order-error !important;
  163. bottom: 5rpx;
  164. right: 10rpx;
  165. font-size: 50rpx !important;
  166. }
  167. .row {
  168. display: flex;
  169. justify-content: space-between;
  170. align-items: center;
  171. font-size: 28rpx;
  172. flex-wrap: wrap;
  173. padding: 10rpx 20rpx;
  174. color: #7d7d7d;
  175. &.first {
  176. color: #000;
  177. font-size: 28rpx;
  178. border-bottom: 1rpx solid #f2f2f2;
  179. .col {
  180. width: 100%;
  181. }
  182. }
  183. .col {
  184. width: 50%;
  185. }
  186. .label {
  187. margin-right: 10rpx;
  188. display: inline-block;
  189. width: 180rpx;
  190. text-align: right;
  191. }
  192. .main {
  193. margin-right: 10rpx;
  194. }
  195. }
  196. }
  197. }
  198. </style>