detail.vue 4.6 KB

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