index.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <div>
  3. <div class="header">
  4. <div class="header_top">
  5. <Button
  6. type="primary"
  7. class="header_btn"
  8. ghost
  9. @click="handleShow"
  10. :icon="is_show ? 'ios-arrow-dropup' : 'ios-arrow-dropdown'"
  11. >
  12. <div style="margin-right: 0.6rem">
  13. {{ is_show ? "收起" : "展开" }}
  14. </div></Button
  15. >
  16. <div style="margin-right: 1rem; color: #66a9f0">王小伟</div>
  17. </div>
  18. <div class="header_middle">
  19. <b-dropdown size="sm" text="Large" class="m-2" :disabled="is_use">
  20. <b-dropdown-item-button>Action</b-dropdown-item-button>
  21. <b-dropdown-item-button>Another action</b-dropdown-item-button>
  22. <b-dropdown-item-button>Something else here</b-dropdown-item-button>
  23. </b-dropdown>
  24. <b-dropdown size="sm" text="Large" class="m-2" :disabled="is_use">
  25. <b-dropdown-item-button>Action</b-dropdown-item-button>
  26. <b-dropdown-item-button>Another action</b-dropdown-item-button>
  27. <b-dropdown-item-button>Something else here</b-dropdown-item-button>
  28. </b-dropdown>
  29. <b-dropdown size="sm" text="Large" class="m-2" :disabled="is_use">
  30. <b-dropdown-item-button>Action</b-dropdown-item-button>
  31. <b-dropdown-item-button>Another action</b-dropdown-item-button>
  32. <b-dropdown-item-button>Something else here</b-dropdown-item-button>
  33. </b-dropdown>
  34. </div>
  35. <div class="header_middle1 ot">
  36. <div class="ft">58 &nbsp;</div>
  37. <div class="ft">12 &nbsp;</div>
  38. <div class="ft">12 &nbsp;</div>
  39. </div>
  40. <div class="header_footer">
  41. <div style="margin-left: 1rem">已完成56/10</div>
  42. <div style="margin-right: 1.4rem">已完成10%</div>
  43. </div>
  44. </div>
  45. <div class="bdy">
  46. <div style="font-size: 1.3rem; font-weight: bold">发货单号</div>
  47. <div>
  48. <Select
  49. v-model="selected"
  50. style="
  51. margin-top: 1rem;
  52. height: 3.4rem;
  53. width: 100%;
  54. font-size: 1.5rem;
  55. border-radius: 0.6rem;
  56. background: #fff;
  57. border: 0.1rem solid;
  58. "
  59. filterable
  60. clearable
  61. placeholder="请选择"
  62. >
  63. <Option v-for="(item,index) in options" :key="index" :label="item.text" :value="item.value"/>
  64. </Select>
  65. </div>
  66. <div class="bdy_btn">
  67. <Button
  68. type="primary"
  69. class="header_btn"
  70. style="margin-right: 3rem; height: 2.6rem"
  71. @click="handleReturn"
  72. >
  73. 返回</Button
  74. >
  75. <Button
  76. type="primary"
  77. class="header_btn"
  78. style="margin-left: 3rem; height: 2.6rem"
  79. @click="handelGoSure"
  80. >
  81. 确认</Button
  82. >
  83. </div>
  84. </div>
  85. </div>
  86. </template>
  87. <script>
  88. export default {
  89. data () {
  90. return {
  91. is_show: true,
  92. is_use: false,
  93. selected: '',
  94. options: []
  95. }
  96. },
  97. created () {
  98. const data = {
  99. url: 'http://121.36.142.167:7774/jbl/api/module-data/goods_check_list/page',
  100. post:{"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[],"size":15,"specialConditions":[],"dynamicFormCode":"goods_check","developmentSystemId":null,"debugFlag":true}
  101. }
  102. this.axios.post('/api/testdwy', { ...data }).then(res => {
  103. this.options = res.data.content.filter(v => v.status === "NOT_APPROVED")
  104. this.options.forEach(v => {
  105. v.value = v.dynamic_form_value_id
  106. v.text = v.goods_check_no
  107. })
  108. })
  109. },
  110. methods: {
  111. handelGoSure () {
  112. if (!this.selected) {
  113. return this.$Message.warning('请先选择盘点单号!')
  114. }
  115. this.$router.push({ path: '/cms/Inventory/detail', query: { id: this.selected } })
  116. },
  117. handleReturn () {
  118. this.$router.push('/cms/home')
  119. },
  120. handleShow () {
  121. this.is_show = !this.is_show
  122. console.log(document.getElementsByClassName('header'))
  123. if (this.is_show) {
  124. document.getElementsByClassName('header')[0].style = 'height:7rem;overflow:hidden;transition:all .4s;'
  125. setTimeout(() => {
  126. document.getElementsByClassName('header')[0].style = 'overflow:none;'
  127. this.is_use = false
  128. }, 400)
  129. } else {
  130. this.is_use = true
  131. document.getElementsByClassName('header')[0].style = 'height:2.7rem;overflow:hidden;transition:all .4s;'
  132. }
  133. }
  134. }
  135. }
  136. </script>
  137. <style lang="scss" scoped>
  138. .header {
  139. width: 94%;
  140. height: 7rem;
  141. // overflow: hidden;
  142. // transition: all 0.4s;
  143. position: relative;
  144. top: 0.5rem;
  145. left: 3%;
  146. box-shadow: 0.16rem 0.1rem 0.1rem 0.1rem #9d9b9b;
  147. border-radius: 1rem;
  148. padding: 0.4rem 0.7rem 0 1rem;
  149. background: #fff;
  150. }
  151. .header_btn {
  152. border-radius: 1rem;
  153. padding: 0.1rem;
  154. width: 5rem;
  155. display: flex;
  156. justify-content: space-around;
  157. align-items: center;
  158. }
  159. .header_top {
  160. display: flex;
  161. justify-content: space-between;
  162. align-items: center;
  163. }
  164. .ot {
  165. position: relative;
  166. top: -1.3rem;
  167. }
  168. .header_middle1 {
  169. display: flex;
  170. justify-content: space-between;
  171. align-items: center;
  172. .ft {
  173. font-size: 1.5rem;
  174. width: 5rem;
  175. text-align: center;
  176. }
  177. }
  178. .header_middle {
  179. position: relative;
  180. top: -0.3rem;
  181. display: flex;
  182. justify-content: space-between;
  183. align-items: center;
  184. }
  185. /deep/ .btn-group > .btn,
  186. .btn-group-vertical > .btn {
  187. background: #ffffff;
  188. color: #2c3e50;
  189. outline: none;
  190. border: none;
  191. margin: 0;
  192. z-index: 3;
  193. }
  194. .header_footer {
  195. position: relative;
  196. top: -1.7rem;
  197. display: flex;
  198. justify-content: space-between;
  199. align-items: center;
  200. div {
  201. font-size: 0.5rem;
  202. color: rgb(244, 136, 42);
  203. }
  204. }
  205. .bdy {
  206. padding: 1rem;
  207. position: relative;
  208. width: 94%;
  209. top: 3rem;
  210. height: 14rem;
  211. border-radius: 1rem;
  212. left: 3%;
  213. box-shadow: 0.16rem 0.1rem 0.1rem 0.1rem #9d9b9b;
  214. background: #fff;
  215. }
  216. .bdy_btn {
  217. margin-top: 3rem;
  218. display: flex;
  219. justify-content: center;
  220. align-items: center;
  221. }
  222. /deep/ .ivu-select-selection{
  223. height: 100%;
  224. border:none;
  225. }
  226. /deep/.ivu-select-input{
  227. height: 3.4rem;
  228. font-size:1.5rem
  229. }
  230. </style>