outWarehousing.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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" 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. replenishBillSn: '',
  42. basicInfoData:null,
  43. partList: [],
  44. customStyle: {
  45. borderRadius:'100rpx',
  46. fontSize:'30rpx',
  47. background: this.$config('primaryColor')
  48. },
  49. customDefalutStyle: {
  50. borderRadius:'100rpx',
  51. fontSize:'30rpx',
  52. color: this.$config('primaryColor'),
  53. background: '#fff'
  54. },
  55. printModal: false
  56. }
  57. },
  58. onReady() {
  59. uni.setNavigationBarColor({
  60. frontColor: '#ffffff',
  61. backgroundColor: this.$config('primaryColor')
  62. })
  63. },
  64. onLoad(option) {
  65. this.replenishBillSn = option.sn
  66. this.getDetail()
  67. this.getPartList()
  68. },
  69. methods: {
  70. // 查询详情
  71. getDetail(){
  72. shelfReplenishDetail({ sn: this.replenishBillSn }).then(res => {
  73. if(res.status == 200){
  74. this.basicInfoData = res.data || null
  75. }else{
  76. this.basicInfoData = null
  77. }
  78. })
  79. },
  80. // 查询列表
  81. getPartList(){
  82. const _this = this
  83. shelfReplenishDetailList({ replenishBillSn: this.replenishBillSn }).then(res => {
  84. if(res.status == 200 && res.data){
  85. res.data.map(item =>{
  86. item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
  87. })
  88. this.partList = res.data || []
  89. }else{
  90. this.partList = []
  91. }
  92. })
  93. },
  94. // 打印贴签 confirm
  95. modalPrint(type){
  96. this.printModal = false
  97. if(type == 'manual'){ // 手动打印
  98. uni.navigateTo({ url: "/pages/replenishmentManage/manualPrint?sn="+this.replenishBillSn })
  99. }else if(type == 'scan'){ // 扫码打印
  100. uni.navigateTo({ url: "/pages/replenishmentManage/scanCodePrint?sn="+this.replenishBillSn })
  101. }
  102. },
  103. // 发货出库
  104. goSendOutGoods(){
  105. uni.navigateTo({ url: "/pages/replenishmentManage/sendOutGoods?sn="+this.replenishBillSn+'&shelfSn='+this.basicInfoData.shelfSn })
  106. }
  107. }
  108. }
  109. </script>
  110. <style lang="less">
  111. page {
  112. height: 100vh;
  113. }
  114. .replenishment-outWarehousing-wrap{
  115. position: relative;
  116. width: 100%;
  117. height: 100%;
  118. overflow: hidden;
  119. padding-bottom: 136upx;
  120. .replenishment-outWarehousing-body{
  121. padding: 0 30rpx;
  122. height: 100%;
  123. overflow: auto;
  124. > view{
  125. padding: 10rpx 25rpx;
  126. background-color: #fff;
  127. margin-bottom: 20rpx;
  128. border-radius: 25rpx;
  129. box-shadow: 2rpx 3rpx 5rpx #eee;
  130. }
  131. .head-info{
  132. .states{
  133. border: 0;
  134. padding: 20rpx 0;
  135. > view{
  136. color: #191919;
  137. text-align: center;
  138. font-size: 40rpx;
  139. text{
  140. margin-left: 20rpx;
  141. }
  142. }
  143. }
  144. .info-txt{
  145. word-break: break-word;
  146. }
  147. font-size: 30rpx;
  148. > view{
  149. display: flex;
  150. border-bottom: 2rpx solid #f5f5f5;
  151. padding: 20rpx 0;
  152. > view:last-child{
  153. flex-grow: 1;
  154. width: 80%;
  155. }
  156. &:last-child{
  157. border:0;
  158. }
  159. }
  160. .label{
  161. display: flex;
  162. align-items: center;
  163. width: 220rpx;
  164. height: 44rpx;
  165. color: #7C7D7E;
  166. text{
  167. margin-left: 10rpx;
  168. }
  169. }
  170. }
  171. }
  172. .replenishment-outWarehousing-footer{
  173. padding: 26upx 32upx 30upx;
  174. background-color: #fff;
  175. position: fixed;
  176. left: 0;
  177. bottom: 0;
  178. width: 100%;
  179. box-shadow: 3px 1px 7px #eee;
  180. display: flex;
  181. justify-content: space-between;
  182. align-items: center;
  183. .button{
  184. width: 45%;
  185. }
  186. }
  187. }
  188. </style>