detail.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. console.log(res.data)
  81. if(res.status == 200 && res.data){
  82. this.partList = res.data || []
  83. }else{
  84. this.partList = []
  85. }
  86. })
  87. }
  88. }
  89. }
  90. </script>
  91. <style lang="less">
  92. .replenishment-detail-wrap{
  93. position: relative;
  94. width: 100%;
  95. height: 100%;
  96. overflow: hidden;
  97. .replenishment-detail-body{
  98. padding: 0 30rpx;
  99. height: 100%;
  100. overflow: auto;
  101. > view{
  102. padding: 10rpx 25rpx;
  103. background-color: #fff;
  104. margin-bottom: 20rpx;
  105. border-radius: 25rpx;
  106. box-shadow: 2rpx 3rpx 5rpx #eee;
  107. }
  108. .head-info{
  109. .states{
  110. border: 0;
  111. padding: 20rpx 0;
  112. > view{
  113. color: #191919;
  114. text-align: center;
  115. font-size: 40rpx;
  116. text{
  117. margin-left: 20rpx;
  118. }
  119. }
  120. }
  121. .info-txt{
  122. word-break: break-word;
  123. }
  124. font-size: 30rpx;
  125. > view{
  126. display: flex;
  127. border-bottom: 2rpx solid #f5f5f5;
  128. padding: 20rpx 0;
  129. > view:last-child{
  130. flex-grow: 1;
  131. width: 80%;
  132. }
  133. &:last-child{
  134. border:0;
  135. }
  136. }
  137. .label{
  138. display: flex;
  139. align-items: center;
  140. width: 220rpx;
  141. height: 44rpx;
  142. color: #7C7D7E;
  143. text{
  144. margin-left: 10rpx;
  145. }
  146. }
  147. }
  148. }
  149. .replenishment-detail-footer{
  150. padding: 26upx 32upx 30upx;
  151. background-color: #fff;
  152. position: fixed;
  153. left: 0;
  154. bottom: 0;
  155. width: 100%;
  156. box-shadow: 3px 1px 7px #eee;
  157. }
  158. }
  159. </style>