outWarehousing.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view class="replenishment-outWarehousing-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
  3. <view class="replenishment-outWarehousing-body">
  4. <view class="head-info" v-if="basicInfoData">
  5. <view class="states">
  6. <view>
  7. <u-icon name="icon_out" 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 class="info-txt">{{basicInfoData.shelfInfo&&basicInfoData.shelfInfo.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 class="info-txt">{{basicInfoData.customerAddr}}</view>
  18. </view>
  19. </view>
  20. <view class="part-list">
  21. <!-- 配件列表 -->
  22. <partList :list="partList" title="配件列表" model="view" fromPage="replenishmentOut" ref="partList" noDataText="暂无配件"></partList>
  23. </view>
  24. </view>
  25. <view class="replenishment-outWarehousing-footer">
  26. <u-button class="button" @click="printModal=true" :custom-style="customDefalutStyle" hover-class="none" shape="circle">打印标签</u-button>
  27. <u-button class="button" @click="goSendOutGoods" :loading="loading" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
  28. </view>
  29. <!-- 打印贴签 -->
  30. <print-sticker-modal :openModal="printModal" @confirm="modalPrint" @close="printModal=false" />
  31. </view>
  32. </template>
  33. <script>
  34. import printStickerModal from './printStickerModal.vue'
  35. import { shelfReplenishDetail, shelfReplenishDetailList } from '@/api/shelfReplenish'
  36. import partList from '@/pages/common/partList.vue'
  37. export default {
  38. components: { partList, printStickerModal },
  39. data() {
  40. return {
  41. loading: false,
  42. replenishBillSn: '',
  43. basicInfoData:null,
  44. partList: [],
  45. customStyle: {
  46. borderRadius:'100rpx',
  47. fontSize:'30rpx',
  48. background: this.$config('primaryColor')
  49. },
  50. customDefalutStyle: {
  51. borderRadius:'100rpx',
  52. fontSize:'30rpx',
  53. color: this.$config('primaryColor'),
  54. background: '#fff'
  55. },
  56. printModal: false
  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.getDetail()
  68. this.getPartList()
  69. },
  70. methods: {
  71. // 查询详情
  72. getDetail(){
  73. shelfReplenishDetail({ sn: this.replenishBillSn }).then(res => {
  74. if(res.status == 200){
  75. this.basicInfoData = res.data || null
  76. }else{
  77. this.basicInfoData = null
  78. }
  79. })
  80. },
  81. // 查询列表
  82. getPartList(){
  83. const _this = this
  84. shelfReplenishDetailList({ replenishBillSn: this.replenishBillSn }).then(res => {
  85. if(res.status == 200 && res.data){
  86. res.data.map(item =>{
  87. item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
  88. })
  89. this.partList = res.data || []
  90. }else{
  91. this.partList = []
  92. }
  93. })
  94. },
  95. // 打印贴签 confirm
  96. modalPrint(type){
  97. this.printModal = false
  98. if(type == 'manual'){ // 手动打印
  99. uni.navigateTo({ url: "/pages/replenishmentManage/manualPrint?sn="+this.replenishBillSn })
  100. }else if(type == 'scan'){ // 扫码打印
  101. uni.navigateTo({ url: "/pages/replenishmentManage/scanCodePrint?sn="+this.replenishBillSn })
  102. }
  103. },
  104. // 发货出库
  105. goSendOutGoods(){
  106. uni.navigateTo({ url: "/pages/replenishmentManage/sendOutGoods?sn="+this.replenishBillSn+'&shelfSn='+this.basicInfoData.shelfSn })
  107. }
  108. }
  109. }
  110. </script>
  111. <style lang="less">
  112. page {
  113. height: 100vh;
  114. }
  115. .replenishment-outWarehousing-wrap{
  116. position: relative;
  117. width: 100%;
  118. height: 100%;
  119. overflow: hidden;
  120. padding-bottom: 136upx;
  121. .replenishment-outWarehousing-body{
  122. padding: 0 30rpx;
  123. height: 100%;
  124. overflow: auto;
  125. > view{
  126. padding: 10rpx 25rpx;
  127. background-color: #fff;
  128. margin-bottom: 20rpx;
  129. border-radius: 25rpx;
  130. box-shadow: 2rpx 3rpx 5rpx #eee;
  131. }
  132. .head-info{
  133. .states{
  134. border: 0;
  135. padding: 20rpx 0;
  136. > view{
  137. color: #191919;
  138. text-align: center;
  139. font-size: 40rpx;
  140. text{
  141. margin-left: 20rpx;
  142. }
  143. }
  144. }
  145. .info-txt{
  146. word-break: break-word;
  147. }
  148. font-size: 30rpx;
  149. > view{
  150. display: flex;
  151. border-bottom: 2rpx solid #f5f5f5;
  152. padding: 20rpx 0;
  153. > view:last-child{
  154. flex-grow: 1;
  155. width: 80%;
  156. }
  157. &:last-child{
  158. border:0;
  159. }
  160. }
  161. .label{
  162. display: flex;
  163. align-items: center;
  164. width: 220rpx;
  165. height: 44rpx;
  166. color: #7C7D7E;
  167. text{
  168. margin-left: 10rpx;
  169. }
  170. }
  171. }
  172. }
  173. .replenishment-outWarehousing-footer{
  174. padding: 26upx 32upx 30upx;
  175. background-color: #fff;
  176. position: fixed;
  177. left: 0;
  178. bottom: 0;
  179. width: 100%;
  180. box-shadow: 3px 1px 7px #eee;
  181. display: flex;
  182. justify-content: space-between;
  183. align-items: center;
  184. .button{
  185. width: 45%;
  186. }
  187. }
  188. }
  189. </style>