detail.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="shuntBack-detail-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
  3. <view class="shuntBack-detail-body">
  4. <view class="head-info" v-if="basicInfoData">
  5. <view class="states">
  6. <view>
  7. <u-icon :name="pageType=='success'?'icon_complete':'icon_cancel'" custom-prefix="iscm-icon" size="48"></u-icon>
  8. <text>{{pageType=='success'?'已完成':'已取消'}}</text>
  9. </view>
  10. </view>
  11. <view>
  12. <view class="label"><u-icon name="icon_order" custom-prefix="iscm-icon" size="32"></u-icon><text>调回单号</text></view>
  13. <view class="info-txt">{{basicInfoData.recallBillNo || '--'}}</view>
  14. </view>
  15. <view>
  16. <view class="label"><u-icon name="ison_shelf" custom-prefix="iscm-icon" size="32"></u-icon><text>货架名称</text></view>
  17. <view class="info-txt">{{basicInfoData.shelfInfo&&basicInfoData.shelfInfo.shelfName || '--'}}</view>
  18. </view>
  19. </view>
  20. <view class="part-list">
  21. <!-- 调回产品 -->
  22. <partList :list="partList" title="调回产品" model="view" :fromPage="pageType=='success'?'shuntBackDetail':'shuntBackDetailc'" ref="partList" noDataText="暂无产品"></partList>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import { shelfRecallFindBySn, shelfRecallDetail } from '@/api/shelfRecall'
  29. import partList from '@/pages/common/partList.vue'
  30. export default {
  31. components: { partList },
  32. data() {
  33. return {
  34. recallBillSn: '',
  35. basicInfoData:null,
  36. partList: [],
  37. customStyle: {
  38. borderRadius:'100rpx',
  39. fontSize:'30rpx',
  40. background: this.$config('primaryColor')
  41. },
  42. pageType: ''
  43. }
  44. },
  45. onReady() {
  46. uni.setNavigationBarColor({
  47. frontColor: '#ffffff',
  48. backgroundColor: this.$config('primaryColor')
  49. })
  50. },
  51. onLoad(option) {
  52. this.recallBillSn = option.sn
  53. this.pageType = option.type
  54. this.getDetail()
  55. this.getPartList()
  56. },
  57. methods: {
  58. // 查询详情
  59. getDetail(){
  60. shelfRecallFindBySn({ sn: this.recallBillSn }).then(res => {
  61. if(res.status == 200){
  62. this.basicInfoData = res.data || null
  63. }else{
  64. this.basicInfoData = null
  65. }
  66. })
  67. },
  68. // 查询列表
  69. getPartList(){
  70. const _this = this
  71. shelfRecallDetail({ recallBillSn: this.recallBillSn }).then(res => {
  72. if(res.status == 200 && res.data){
  73. res.data.map(item =>{
  74. item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
  75. item.putQty = item.confirmQty ? Number(item.confirmQty) : 0
  76. })
  77. this.partList = res.data || []
  78. }else{
  79. this.partList = []
  80. }
  81. })
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="less">
  87. .shuntBack-detail-wrap{
  88. position: relative;
  89. width: 100%;
  90. height: 100%;
  91. overflow: hidden;
  92. .shuntBack-detail-body{
  93. padding: 0 30rpx;
  94. height: 100%;
  95. overflow: auto;
  96. > view{
  97. padding: 10rpx 25rpx;
  98. background-color: #fff;
  99. margin-bottom: 20rpx;
  100. border-radius: 25rpx;
  101. box-shadow: 2rpx 3rpx 5rpx #eee;
  102. }
  103. .head-info{
  104. .states{
  105. border: 0;
  106. padding: 20rpx 0;
  107. > view{
  108. color: #191919;
  109. text-align: center;
  110. font-size: 40rpx;
  111. text{
  112. margin-left: 20rpx;
  113. }
  114. }
  115. }
  116. .info-txt{
  117. word-break: break-word;
  118. }
  119. font-size: 30rpx;
  120. > view{
  121. display: flex;
  122. border-bottom: 2rpx solid #f5f5f5;
  123. padding: 20rpx 0;
  124. > view:last-child{
  125. flex-grow: 1;
  126. width: 80%;
  127. }
  128. &:last-child{
  129. border:0;
  130. }
  131. }
  132. .label{
  133. display: flex;
  134. align-items: center;
  135. width: 220rpx;
  136. height: 44rpx;
  137. color: #7C7D7E;
  138. text{
  139. margin-left: 10rpx;
  140. }
  141. }
  142. }
  143. }
  144. .shuntBack-detail-footer{
  145. padding: 26upx 32upx 30upx;
  146. background-color: #fff;
  147. position: fixed;
  148. left: 0;
  149. bottom: 0;
  150. width: 100%;
  151. box-shadow: 3px 1px 7px #eee;
  152. }
  153. }
  154. </style>