detail.vue 4.3 KB

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