grossWeightDetail.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="warp">
  3. <view class="title">
  4. 基本信息
  5. </view>
  6. <view class="content">
  7. <view class="row">
  8. <view class="left">仓库</view>
  9. <view class="right">{{detailData.warehouseName}}</view>
  10. </view>
  11. <view class="row">
  12. <view class="left">编号</view>
  13. <view class="right">{{detailData.number}}</view>
  14. </view>
  15. <view class="row">
  16. <view class="left">客户</view>
  17. <view class="right">{{detailData.customer}}</view>
  18. </view>
  19. <view class="row">
  20. <view class="left">车牌号</view>
  21. <view class="right">{{detailData.carNumber}}</view>
  22. </view>
  23. <view class="row">
  24. <view class="left">仓位号</view>
  25. <view class="right">{{detailData.binNumber}}</view>
  26. </view>
  27. <view class="row">
  28. <view class="left">囤位号</view>
  29. <view class="right">{{detailData.storageNumber}}</view>
  30. </view>
  31. <view class="row">
  32. <view class="left">货名</view>
  33. <view class="right">{{detailData.goodsName}}</view>
  34. </view>
  35. <view class="row row-bottom">
  36. <view class="left">毛重(公斤)</view>
  37. <input class="right-bottom" placeholder="输入毛重" v-model="detailData.grossWeight"></input>
  38. </view>
  39. </view>
  40. <u-button v-if='tabbar' type="primary" class="submit" @click="submit">提交</u-button>
  41. <u-toast ref="uToast" />
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. tabbar:true,
  49. windowHeight: '',
  50. detailData: {
  51. grossWeight:''
  52. }
  53. }
  54. },
  55. onShow() {},
  56. onLoad(options) {
  57. uni.onWindowResize((res) => {
  58. if(res.size.windowHeight < this.windowHeight){
  59. this.tabbar = false
  60. }else{
  61. this.tabbar = true
  62. }
  63. })
  64. this.detailData = JSON.parse(options.detailData)
  65. uni.getSystemInfo({
  66. success:(res) => {
  67. this.windowHeight = res.windowHeight;
  68. // console.log(res)
  69. this.system = res.system // ios
  70. this.platform = res.platform // 14.3
  71. }
  72. })
  73. console.log(this.detailData)
  74. },
  75. methods: {
  76. submit(){
  77. let that = this
  78. uni.showModal({
  79. content:"确定提交检斤信息?",
  80. success:function(res) {
  81. if (res.confirm) {
  82. that.$api.doRequest('post', '/weighingManagement/api/editGrossWeight',that.detailData).then(res => {
  83. if(res.data.code==200){
  84. that.$refs.uToast.show({
  85. title: '提交成功',
  86. type: 'success'
  87. })
  88. uni.navigateBack({
  89. })
  90. }else{
  91. that.$refs.uToast.show({
  92. title: '提交失败',
  93. type: 'error',
  94. })
  95. }
  96. })
  97. } else if (res.cancel) {
  98. console.log('用户点击取消');
  99. }
  100. console.log(that.detailData)
  101. }
  102. })
  103. }
  104. }
  105. }
  106. </script>
  107. <style scoped lang="scss">
  108. uni-page-body{
  109. overflow: hidden;
  110. }
  111. .warp{
  112. background: white;
  113. margin: 20rpx;
  114. padding: 20rpx;
  115. border-radius: 20rpx;
  116. .title{
  117. font-size: 28rpx;
  118. font-weight: 500;
  119. color: #333333;
  120. }
  121. }
  122. .content{
  123. .row{
  124. display: flex;
  125. justify-content: space-between;
  126. padding:31rpx 0;
  127. .right{
  128. font-size: 28rpx;
  129. font-weight: 600;
  130. color: #333333;
  131. }
  132. }
  133. .row-bottom{
  134. border: 0;
  135. .right-bottom{
  136. width: 300rpx;
  137. text-align: right;
  138. font-size: 28rpx;
  139. font-weight: 600;
  140. color: #333333;
  141. }
  142. }
  143. }
  144. .submit{
  145. position: fixed;
  146. bottom:40rpx;
  147. width: 90%;
  148. background: #22C572;
  149. border-radius: 50rpx;
  150. }
  151. </style>