index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="详情" @clickLeft="back">
  4. </uni-nav-bar>
  5. <view class="main" v-if="query.type == '库区'">
  6. <view class="row">
  7. <view class="row-item">
  8. <text class="t1">所属仓库</text>
  9. <text class="t2">{{ formData.warehouseName }}</text>
  10. </view>
  11. </view>
  12. <view class="row">
  13. <view class="row-item">
  14. <text class="t1">库区编号</text>
  15. <text class="t2">{{ formData.code }}</text>
  16. </view>
  17. </view>
  18. <view class="row">
  19. <view class="row-item">
  20. <text class="t1">库区名称</text>
  21. <text class="t2">{{ formData.name }}</text>
  22. </view>
  23. </view>
  24. <view class="row">
  25. <view class="row-item">
  26. <text class="t1">库区类型</text>
  27. <text class="t2">{{ formData.typeName }}</text>
  28. </view>
  29. </view>
  30. <view class="row">
  31. <view class="row-item">
  32. <text class="t1">库区属性</text>
  33. <text class="t2">{{ formData.attributeName }}</text>
  34. </view>
  35. </view>
  36. <view class="row">
  37. <view class="row-item">
  38. <text class="t1">库区位置</text>
  39. <text class="t2">{{ formData.address }}</text>
  40. </view>
  41. </view>
  42. <view class="row">
  43. <view class="row-item">
  44. <text class="t1">库区长(cm)</text>
  45. <text class="t2">{{ formData.areaLength }}</text>
  46. </view>
  47. </view>
  48. <view class="row">
  49. <view class="row-item">
  50. <text class="t1">库区宽(cm)</text>
  51. <text class="t2">{{ formData.areaWide }}</text>
  52. </view>
  53. </view>
  54. <view class="row">
  55. <view class="row-item">
  56. <text class="t1">库区高(cm)</text>
  57. <text class="t2">{{ formData.areaHigh }}</text>
  58. </view>
  59. </view>
  60. <view class="row">
  61. <view class="row-item">
  62. <text class="t1">货架数量</text>
  63. <text class="t2">{{ formData.num }}</text>
  64. </view>
  65. </view>
  66. <view class="row">
  67. <view class="row-item">
  68. <text class="t1">备注</text>
  69. <text class="t2">{{ formData.areaRemark }}</text>
  70. </view>
  71. </view>
  72. <view class="row">
  73. <view class="row-item">
  74. <text class="t1">货架编号</text>
  75. <text class="t2">{{ areaShelf }}</text>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="main" v-if="query.type == '货架'">
  80. <view class="row">
  81. <view class="row-item">
  82. <text class="t1">所属仓库</text>
  83. <text class="t2">{{ formData.warehouseName }}</text>
  84. </view>
  85. </view>
  86. <view class="row">
  87. <view class="row-item">
  88. <text class="t1">库区编号</text>
  89. <text class="t2">{{ formData.warehouseAreaCode }}</text>
  90. </view>
  91. </view>
  92. <view class="row">
  93. <view class="row-item">
  94. <text class="t1">货架编号</text>
  95. <text class="t2">{{ formData.goodsshelvesCode }}</text>
  96. </view>
  97. </view>
  98. <view class="row">
  99. <view class="row-item">
  100. <text class="t1">货架行数</text>
  101. <text class="t2">{{ formData.goodsshelvesLine }}</text>
  102. </view>
  103. </view>
  104. <view class="row">
  105. <view class="row-item">
  106. <text class="t1">货架列数</text>
  107. <text class="t2">{{ formData.goodsshelvesColumn }}</text>
  108. </view>
  109. </view>
  110. <view class="row">
  111. <view class="row-item">
  112. <text class="t1">货架长(cm)</text>
  113. <text class="t2">{{ formData.goodsshelvesLength }}</text>
  114. </view>
  115. </view>
  116. <view class="row">
  117. <view class="row-item">
  118. <text class="t1">货架宽(cm)</text>
  119. <text class="t2">{{ formData.goodsshelvesWide }}</text>
  120. </view>
  121. </view>
  122. <view class="row">
  123. <view class="row-item">
  124. <text class="t1">货架高(cm)</text>
  125. <text class="t2">{{ formData.goodsshelvesHigh }}</text>
  126. </view>
  127. </view>
  128. <view class="row">
  129. <view class="row-item">
  130. <text class="t1">货位数量</text>
  131. <text class="t2">{{ formData.stockLocationList.length }}</text>
  132. </view>
  133. </view>
  134. <view class="row">
  135. <view class="row-item">
  136. <text class="t1">是否规则</text>
  137. <text class="t2">{{ formData.isRegular == 1 ? '是' : '否' }}</text>
  138. </view>
  139. </view>
  140. <view class="row">
  141. <view class="row-item">
  142. <text class="t1">备注</text>
  143. <text class="t2">{{ formData.areaRemark }}</text>
  144. </view>
  145. </view>
  146. <view class="row">
  147. <view class="row-item">
  148. <text class="t1">货位编号</text>
  149. <text class="t2">{{ goodShelf }}</text>
  150. </view>
  151. </view>
  152. </view>
  153. <view class="main" v-if="query.type == '货位'">
  154. <view class="row">
  155. <view class="row-item">
  156. <text class="t1">所属仓库</text>
  157. <text class="t2">{{ formData.warehouseName }}</text>
  158. </view>
  159. </view>
  160. <view class="row">
  161. <view class="row-item">
  162. <text class="t1">库区编号</text>
  163. <text class="t2">{{ formData.warehouseAreaCode }}</text>
  164. </view>
  165. </view>
  166. <view class="row">
  167. <view class="row-item">
  168. <text class="t1">货架编号</text>
  169. <text class="t2">{{ formData.warehouseAreaGoodsCode }}</text>
  170. </view>
  171. </view>
  172. <view class="row">
  173. <view class="row-item">
  174. <text class="t1">货位编号</text>
  175. <text class="t2">{{ formData.goodsAllocationCode }}</text>
  176. </view>
  177. </view>
  178. <view class="row">
  179. <view class="row-item">
  180. <text class="t1">货位长(cm)</text>
  181. <text class="t2">{{ formData.goodsAllocationLength }}</text>
  182. </view>
  183. </view>
  184. <view class="row">
  185. <view class="row-item">
  186. <text class="t1">货位宽(cm)</text>
  187. <text class="t2">{{ formData.goodsAllocationWide }}</text>
  188. </view>
  189. </view>
  190. <view class="row">
  191. <view class="row-item">
  192. <text class="t1">货位高(cm)</text>
  193. <text class="t2">{{ formData.goodsAllocationHigh }}</text>
  194. </view>
  195. </view>
  196. <view class="row">
  197. <view class="row-item">
  198. <text class="t1">限重(kg)</text>
  199. <text class="t2">{{ formData.weightLimit }}</text>
  200. </view>
  201. </view>
  202. <view class="row">
  203. <view class="row-item">
  204. <text class="t1">基本货位容积(cm³)</text>
  205. <text class="t2">{{ formData.volumeUnit }}</text>
  206. </view>
  207. </view>
  208. <view class="row">
  209. <view class="scroll_box">
  210. <scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="lower">
  211. <uni-table border stripe emptyText="暂无更多数据" style="width: 100%;">
  212. <uni-tr style="width: 100%;">
  213. <uni-th width="50" align="center">序号</uni-th>
  214. <uni-th width="120" align="center">物品编码</uni-th>
  215. <uni-th width="120" align="center">名称</uni-th>
  216. <uni-th width="100" align="center">型号</uni-th>
  217. <uni-th width="100" align="center">规格</uni-th>
  218. <uni-th width="150" align="center">数量</uni-th>
  219. </uni-tr>
  220. <!-- 表格数据行 -->
  221. <uni-tr v-for="(item, index) in formData.productList" :key="index">
  222. <uni-td>
  223. <view>{{index+Number(1)}}</view>
  224. </uni-td>
  225. <uni-td>
  226. <view class="ellipsis">
  227. {{ item.code }}
  228. </view>
  229. </uni-td>
  230. <uni-td>
  231. <view>{{ item.name }}</view>
  232. </uni-td>
  233. <uni-td>
  234. <view>{{ item.modelType }}</view>
  235. </uni-td>
  236. <uni-td>
  237. <view>{{ item.specification }}</view>
  238. </uni-td>
  239. <uni-td>
  240. <view>{{ item.availableCount }}</view>
  241. </uni-td>
  242. </uni-tr>
  243. </uni-table>
  244. </scroll-view>
  245. </view>
  246. </view>
  247. </view>
  248. </view>
  249. </template>
  250. <script>
  251. // import ScanCode from '@/components/ScanCode.vue'
  252. import {
  253. wmsQrcodeScan
  254. } from '@/api/warehouseManagement'
  255. import {
  256. warehouseDefinition_areaType,
  257. warehouseDefinition_areaAttribute
  258. } from '@/enum/dict.js'
  259. export default {
  260. components: {
  261. },
  262. data() {
  263. return {
  264. query: {},
  265. formData: {},
  266. }
  267. },
  268. onShow() {
  269. },
  270. onLoad(options) {
  271. this.query = options
  272. console.log(this.query)
  273. wmsQrcodeScan({code: this.query.type + ':' +this.query.id }).then(res => {
  274. console.log(res)
  275. res.typeName = warehouseDefinition_areaType.find(item => item.code == res.type)?.label || ''
  276. res.attributeName = warehouseDefinition_areaAttribute.find(item => item.code == res.attribute)?.label || ''
  277. this.formData = res
  278. })
  279. },
  280. computed: {
  281. areaShelf() {
  282. const codelist = this.formData?.warehouseGoodsShelvesList?.map(item => item.goodsshelvesCode) || []
  283. return codelist.join(',');
  284. },
  285. goodShelf() {
  286. const codelist = this.formData?.stockLocationList?.map(item => item.goodsAllocationCode) || []
  287. return codelist.join(',');
  288. }
  289. },
  290. methods: {
  291. }
  292. }
  293. </script>
  294. <style lang="scss" scoped>
  295. .mainBox {
  296. /deep/.required-form .u-form-item__body__left__content__label::before {
  297. content: '*';
  298. color: red;
  299. }
  300. }
  301. .main {
  302. padding: 0 30rpx;
  303. .row {
  304. display: flex;
  305. align-items: center;
  306. justify-content: space-between;
  307. padding: 20rpx 0;
  308. border-bottom: 1px dashed #dedede;
  309. .row-item {
  310. .t1 {
  311. font-weight: bold;
  312. font-size: 28rpx;
  313. color: #333333;
  314. margin-right: 20rpx;
  315. }
  316. .t2 {
  317. font-size: 28rpx;
  318. color: #333333;
  319. }
  320. }
  321. }
  322. }
  323. .scroll_box {
  324. flex: 1;
  325. overflow: scroll;
  326. .scroll-Y {
  327. height: 100%;
  328. }
  329. }
  330. /deep/.uni-table {
  331. min-width: 100vw !important;
  332. font-size: 28rpx;
  333. .uni-table-td,
  334. .uni-table-th {
  335. padding: 10rpx !important;
  336. text-align: center !important;
  337. font-size: 28rpx;
  338. color: #000000;
  339. }
  340. }
  341. </style>