cancellingStocks.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view class="cancelStockPages" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
  3. <view class="cancelStockPages-body">
  4. <view class="head-info" v-if="info">
  5. <view class="states">
  6. <view>
  7. <u-icon name="icon_withdrawal" custom-prefix="iscm-icon" size="48"></u-icon>
  8. <text>待退货</text>
  9. </view>
  10. </view>
  11. <view>
  12. <view class="label"><u-icon name="ison_shelf" custom-prefix="iscm-icon" size="32"></u-icon><text>货架名称</text></view>
  13. <view>{{info.shelfName}}</view>
  14. </view>
  15. <view>
  16. <view class="label"><u-icon name="icon_position" custom-prefix="iscm-icon" size="32"></u-icon><text>客户地址</text></view>
  17. <view>{{info.shelfAddress}}</view>
  18. </view>
  19. </view>
  20. <view class="part-list">
  21. <!-- 配件列表 -->
  22. <partList ref="partList" :list="partList" @allChecked="allCheckedCallback"></partList>
  23. </view>
  24. </view>
  25. <view class="cancelStockPages-footer">
  26. <view>
  27. <u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
  28. </view>
  29. <view>
  30. <u-button shape="circle" :custom-style="{background:$config('primaryColor')}" type="primary">确定退库</u-button>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import { shelfRecallFindBySn, detailQueryCount, shelfRecallDetail } from '@/api/shelfRecall.js'
  37. import partList from '../common/partList.vue'
  38. export default {
  39. components: {
  40. partList
  41. },
  42. data() {
  43. return {
  44. allChecked: false,
  45. recallBillSn: '',
  46. info:null,
  47. partList: []
  48. }
  49. },
  50. onReady() {
  51. uni.setNavigationBarColor({
  52. frontColor: '#ffffff',
  53. backgroundColor: this.$config('primaryColor')
  54. })
  55. },
  56. onLoad(option) {
  57. this.recallBillSn = option.recallBillSn
  58. this.getDetail()
  59. this.getPartList()
  60. },
  61. methods: {
  62. // 全选
  63. allCheckeChange(e){
  64. this.$refs.partList.allSelect(e.value)
  65. },
  66. allCheckedCallback(val){
  67. this.allChecked = val
  68. },
  69. getDetail(){
  70. shelfRecallFindBySn({sn:this.recallBillSn}).then(res => {
  71. if(res.status == 200){
  72. this.info = res.data
  73. }
  74. })
  75. },
  76. getPartList(){
  77. shelfRecallDetail({recallBillSn:this.recallBillSn}).then(res => {
  78. if(res.status == 200){
  79. this.partList = res.data.data
  80. }
  81. })
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="less">
  87. .cancelStockPages{
  88. width: 100%;
  89. height: 100vh;
  90. display: flex;
  91. flex-direction: column;
  92. .cancelStockPages-body{
  93. padding: 0 30rpx;
  94. flex-grow: 1;
  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. font-size: 30rpx;
  117. > view{
  118. display: flex;
  119. border-bottom: 2rpx solid #f5f5f5;
  120. padding: 20rpx 0;
  121. > view:last-child{
  122. flex-grow: 1;
  123. width: 80%;
  124. }
  125. &:last-child{
  126. border:0;
  127. }
  128. }
  129. .label{
  130. display: flex;
  131. align-items: center;
  132. width: 220rpx;
  133. height: 44rpx;
  134. color: #7C7D7E;
  135. text{
  136. margin-left: 10rpx;
  137. }
  138. }
  139. }
  140. }
  141. .cancelStockPages-footer{
  142. background-color: #fff;
  143. padding: 20rpx 40rpx;
  144. display: flex;
  145. align-items: center;
  146. justify-content: space-between;
  147. }
  148. }
  149. </style>