main.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <view>
  3. <view class="head">
  4. <view class="header-wrap">
  5. <view class="index-header">
  6. <view class="map-wrap"></view>
  7. <view class="input-wrap">
  8. <text class="iconfont">仓库管理</text>
  9. </view>
  10. <view class="map-wrap"></view>
  11. </view>
  12. </view>
  13. <view class="blank"></view>
  14. </view>
  15. <view class="uni-padding-wrap uni-common-mt">
  16. <view class="button-sp-area">
  17. <br>
  18. <button type="success" @click="groupDisk()" class="button btn">组盘入库</button>
  19. <br>
  20. <button type="success" @click="sorting_out()" class="button btn">出库确认</button>
  21. <br>
  22. <button type="primary" @click="product()" class="button btn">货物查询</button>
  23. <br>
  24. <button type="primary" @click="container()" class="button btn">托盘查询</button>
  25. <br>
  26. <button type="primary" @click="stocktaking()" class="button btn">盘库管理</button>
  27. <br>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. let _this = null;
  34. let reqRootUrl = plus.storage.getItem("reqRootUrl");
  35. export default {
  36. data() {
  37. return {
  38. title: 'button',
  39. loading: false,
  40. timer: null, // 定时器
  41. }
  42. },
  43. onLoad() {
  44. this._timer = null;
  45. _this = this;
  46. },
  47. onShow() {
  48. },
  49. onUnload() {
  50. this.clearTimer();
  51. this.loading = false;
  52. },
  53. methods: {
  54. openTypeError(error) {
  55. console.error('open-type error:', error);
  56. },
  57. clearTimer() {
  58. if (this._timer != null) {
  59. clearTimeout(this._timer);
  60. }
  61. },
  62. groupDisk: function() {
  63. setTimeout(() => {
  64. uni.vibrateShort();
  65. uni.navigateTo({
  66. url: '/pages/sample/group',
  67. })
  68. }, 500);
  69. },
  70. sorting_out: function(code) {
  71. setTimeout(() => {
  72. uni.vibrateShort();
  73. uni.navigateTo({
  74. url: '/pages/sample/sorting_out',
  75. })
  76. }, 500);
  77. },
  78. product: function(code) {
  79. setTimeout(() => {
  80. uni.setStorageSync("source", "main")
  81. uni.vibrateShort();
  82. uni.navigateTo({
  83. // url: '/pages/sample/tts',
  84. url: '/pages/sample/product',
  85. })
  86. }, 500);
  87. },
  88. container: function(code) {
  89. setTimeout(() => {
  90. uni.vibrateShort();
  91. uni.navigateTo({
  92. // url: '/pages/sample/tts',
  93. url: '/pages/sample/container',
  94. })
  95. }, 500);
  96. },
  97. stocktaking: function(code) {
  98. setTimeout(() => {
  99. uni.vibrateShort();
  100. uni.navigateTo({
  101. // url: '/pages/sample/tts',
  102. url: '/pages/sample/stocktaking',
  103. })
  104. }, 500);
  105. },
  106. isEmpty: function(obj) {
  107. return typeof obj === undefined || obj == null || obj === "" || obj ===
  108. "000000000000000000000000" ||
  109. obj.length === 0;
  110. },
  111. }
  112. }
  113. </script>
  114. <style>
  115. button {
  116. margin-top: 30rpx;
  117. margin-bottom: 30rpx;
  118. }
  119. .button-sp-area {
  120. margin: 0 auto;
  121. width: 60%;
  122. }
  123. .mini-btn {
  124. margin-right: 10rpx;
  125. }
  126. .button {
  127. background-color: #4CAF50;
  128. /* 设置背景色 */
  129. color: white;
  130. /* 设置文字颜色 */
  131. text-align: center;
  132. border-radius: 6px;
  133. /* 添加边角半径 */
  134. box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  135. /* 添加阴影效果 */
  136. transition: all 0.3s ease;
  137. /* 过渡动画时间为0.3秒 */
  138. }
  139. .button:hover {
  140. transform: scale(1.1);
  141. /* 当鼠标悬停在按钮上时放大到原始比例的1.1倍 */
  142. }
  143. </style>
  144. <style lang="scss">
  145. $color-base: #0039a6;
  146. $words-color-base: #333333;
  147. $words-color-light: #999999;
  148. .header-wrap {
  149. width: 100%;
  150. position: fixed;
  151. top: 0;
  152. z-index: 999;
  153. .index-header {
  154. height: 88upx;
  155. line-height: 88upx;
  156. padding: 0 30upx;
  157. padding-top: 40upx;
  158. background-color: $color-base;
  159. font-Size: 28upx;
  160. color: #fff;
  161. display: flex;
  162. align-items: center;
  163. justify-content: space-between;
  164. .fanhui {
  165. color: #fff !important;
  166. font-size: 28px;
  167. padding-top: 5px;
  168. font-weight: 700;
  169. }
  170. .lanya {
  171. color: #fff !important;
  172. font-size: 28px;
  173. padding-top: 5px;
  174. }
  175. .map-wrap {
  176. padding-top: 5px;
  177. }
  178. }
  179. }
  180. .blank {
  181. height: 126upx;
  182. }
  183. .btn {
  184. border-radius: 50%;
  185. width: 95px;
  186. height: 95px;
  187. margin: auto;
  188. text-align: center;
  189. line-height: 95px;
  190. border-color: #0039a6;
  191. font-size: 16px;
  192. }
  193. </style>