outWarehousing.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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="" 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, shelfReplenishPutStock } 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. modalConfirm(){
  96. const arr = []
  97. this.partList.map((item, index) => {
  98. if (item.putQty || item.putQty == 0) {
  99. arr.push({ productSn: item.productSn, putQty: item.putQty })
  100. }
  101. })
  102. const params = {
  103. replenishBillSn: this.replenishBillSn,
  104. detailList: arr
  105. }
  106. shelfReplenishPutStock(params).then(res => {
  107. if(res.status == 200){
  108. uni.$emit('refreshBL')
  109. uni.navigateBack()
  110. }
  111. this.toashMsg(res.message)
  112. })
  113. },
  114. // 打印贴签 confirm
  115. modalPrint(type){
  116. this.printModal = false
  117. if(type == 'manual'){ // 手动打印
  118. uni.navigateTo({ url: "/pages/replenishmentManage/manualPrint?sn="+this.replenishBillSn })
  119. }else if(type == 'scan'){ // 扫码打印
  120. uni.navigateTo({ url: "/pages/replenishmentManage/scanCodePrint?sn="+this.replenishBillSn })
  121. }
  122. }
  123. }
  124. }
  125. </script>
  126. <style lang="less">
  127. .replenishment-outWarehousing-wrap{
  128. position: relative;
  129. width: 100%;
  130. height: 100%;
  131. overflow: hidden;
  132. padding-bottom: 136upx;
  133. .replenishment-outWarehousing-body{
  134. padding: 0 30rpx;
  135. height: 100%;
  136. overflow: auto;
  137. > view{
  138. padding: 10rpx 25rpx;
  139. background-color: #fff;
  140. margin-bottom: 20rpx;
  141. border-radius: 25rpx;
  142. box-shadow: 2rpx 3rpx 5rpx #eee;
  143. }
  144. .head-info{
  145. .states{
  146. border: 0;
  147. padding: 20rpx 0;
  148. > view{
  149. color: #191919;
  150. text-align: center;
  151. font-size: 40rpx;
  152. text{
  153. margin-left: 20rpx;
  154. }
  155. }
  156. }
  157. .info-txt{
  158. word-break: break-word;
  159. }
  160. font-size: 30rpx;
  161. > view{
  162. display: flex;
  163. border-bottom: 2rpx solid #f5f5f5;
  164. padding: 20rpx 0;
  165. > view:last-child{
  166. flex-grow: 1;
  167. width: 80%;
  168. }
  169. &:last-child{
  170. border:0;
  171. }
  172. }
  173. .label{
  174. display: flex;
  175. align-items: center;
  176. width: 220rpx;
  177. height: 44rpx;
  178. color: #7C7D7E;
  179. text{
  180. margin-left: 10rpx;
  181. }
  182. }
  183. }
  184. }
  185. .replenishment-outWarehousing-footer{
  186. padding: 26upx 32upx 30upx;
  187. background-color: #fff;
  188. position: fixed;
  189. left: 0;
  190. bottom: 0;
  191. width: 100%;
  192. box-shadow: 3px 1px 7px #eee;
  193. display: flex;
  194. justify-content: space-between;
  195. align-items: center;
  196. .button{
  197. width: 45%;
  198. }
  199. }
  200. }
  201. </style>