detail.vue 5.5 KB

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