index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <template>
  2. <view class="app-content">
  3. <view class="header">
  4. <view class="log" @tap="fall"></view>
  5. </view>
  6. <!-- <view class="nav">
  7. <view :class="action === index ? 'nav_lists': 'nav_list'" v-for="(item, index) in list" :key="index" @tap="lop(index)">{{item.name}}</view>
  8. </view> -->
  9. <uni-swiper-dot :info="info" :current="current" field="content" :mode="mode">
  10. <swiper class="swiper-box" @change="change" style="height:11rem">
  11. <swiper-item v-for="(item ,index) in info" :key="index" >
  12. <view class="swiper-item">
  13. <image style="width:100%" src="../../static/bg.png" mode="widthFix"></image>
  14. </view>
  15. </swiper-item>
  16. </swiper>
  17. </uni-swiper-dot>
  18. <view class="content" :style="{top:dataheight}">
  19. <uni-section title="行李详情" type="line"></uni-section>
  20. <view class="choice" @touchmove="movetran">
  21. <scroll-view scroll-y="true" class="scroll-Y">
  22. <view class="list">
  23. <view class="lable">航班号</view>
  24. <uni-easyinput :inputBorder="false" :styles="style" :disabled="true" v-model="dataheight"
  25. type="text" placeholder="航班号" />
  26. </uni-forms>
  27. <view class="listup"></view>
  28. </view>
  29. <view class="list" @click="show('simple')">
  30. <view class="lable">航班日期</view>
  31. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="true" v-model="datatime"
  32. type="text" placeholder="航班日期" />
  33. </uni-forms>
  34. <view class="listup"></view>
  35. </view>
  36. <view class="list">
  37. <view class="lable">行李牌号</view>
  38. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  39. type="text" placeholder="行李牌号" />
  40. </uni-forms>
  41. <view class="listup"></view>
  42. </view>
  43. <view class="list">
  44. <view class="lable">操作节点</view>
  45. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  46. type="text" placeholder="操作节点" />
  47. </uni-forms>
  48. <view class="listup"></view>
  49. </view>
  50. <view class="list">
  51. <view class="lable">操作位置</view>
  52. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  53. type="text" placeholder="操作位置" />
  54. </uni-forms>
  55. <view class="listup"></view>
  56. </view>
  57. <view class="list" @click="show = true">
  58. <view class="lable">操作时间</view>
  59. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="true" v-model="datacontime"
  60. type="text" placeholder="操作时间" />
  61. </uni-forms>
  62. <view class="listup"></view>
  63. </view>
  64. <view class="list">
  65. <view class="lable">操作人</view>
  66. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  67. type="text" placeholder="操作人" />
  68. </uni-forms>
  69. <view class="listup"></view>
  70. </view>
  71. <view class="list">
  72. <view class="lable">发往节点</view>
  73. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  74. type="text" placeholder="发往节点" />
  75. </uni-forms>
  76. <view class="listup"></view>
  77. </view>
  78. <view class="list">
  79. <view class="lable">发往位置</view>
  80. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  81. type="text" placeholder="发往位置" />
  82. </uni-forms>
  83. <view class="listup"></view>
  84. </view>
  85. <view class="list">
  86. <view class="lable">特殊行李类型</view>
  87. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  88. type="text" placeholder="特殊行李类型" />
  89. </uni-forms>
  90. <view class="listup"></view>
  91. </view>
  92. <view class="list">
  93. <view class="lable">异常类型</view>
  94. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  95. type="text" placeholder="异常类型" />
  96. </uni-forms>
  97. <view class="listup"></view>
  98. </view>
  99. <view class="list">
  100. <view class="lable">装车状态</view>
  101. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  102. type="text" placeholder="装车状态" />
  103. </uni-forms>
  104. <view class="listup"></view>
  105. </view>
  106. <view class="list">
  107. <view class="lable">装车序号</view>
  108. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  109. type="text" placeholder="装车序号" />
  110. </uni-forms>
  111. <view class="listup"></view>
  112. </view>
  113. <view class="list">
  114. <view class="lable">容器</view>
  115. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  116. type="text" placeholder="容器" />
  117. </uni-forms>
  118. <view class="listup"></view>
  119. </view>
  120. <view class="list">
  121. <view class="lable">备注</view>
  122. <uni-easyinput :inputBorder="false" :clearable="false" :styles="style" :disabled="false" v-model="dataheight"
  123. type="text" placeholder="备注" />
  124. </uni-forms>
  125. <view class="listup"></view>
  126. </view>
  127. </scroll-view>
  128. </view>
  129. </view>
  130. <luanqing-date-picker
  131. ref="datePickerObj"
  132. :isSimple="mode === 'simple'"
  133. :isMultiple="mode === 'multiple'"
  134. @finishSelectDate="finishSelectDate"
  135. :defaultCheckedList="['2023-03-28','2023-09-25']">
  136. </luanqing-date-picker>
  137. <uv-datetime-picker
  138. :show="show"
  139. v-model="value1"
  140. mode="datetime"
  141. @confirm ='confirm'
  142. @close = 'show = false'
  143. ></uv-datetime-picker>
  144. </view>
  145. </template>
  146. <script>
  147. export default {
  148. data() {
  149. return {
  150. style: {
  151. disableColor: "#fff",
  152. color: "#000"
  153. },
  154. detailedTable: [{
  155. name: '离港:HU7410 CKG-CSX (113/171)'
  156. },
  157. {
  158. name: '离港:HU7410 CKG-CSX (113/171)'
  159. },
  160. {
  161. name: '离港:HU7410 CKG-CSX (113/171)'
  162. },
  163. {
  164. name: '离港:HU7410 CKG-CSX (113/171)'
  165. },
  166. {
  167. name: '离港:HU7410 CKG-CSX (113/171)'
  168. }
  169. ],
  170. dataheight: '10.75rem',
  171. datatime: '2023-06-02',
  172. datacontime: '',
  173. info: [{
  174. content: '内容 A'
  175. }, {
  176. content: '内容 B'
  177. }, {
  178. content: '内容 C'
  179. }],
  180. current: 0,
  181. mode: 'round',
  182. mode: 'simple',
  183. show: false,
  184. value1: Number(new Date()),
  185. formatter:'yy'
  186. }
  187. },
  188. created(option) {},
  189. onLoad() {},
  190. onUnload() {},
  191. onShow() {},
  192. mounted() {},
  193. components: {},
  194. methods: {
  195. confirm (e) {
  196. this.show = false
  197. console.log(e.value)
  198. let timestamp = e.value
  199. // 此处时间戳以毫秒为单位
  200. let date = new Date(parseInt(timestamp));
  201. let Year = date.getFullYear();
  202. let Moth = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
  203. let Day = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
  204. let Hour = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours());
  205. let Minute = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
  206. let Sechond = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
  207. let GMT = Year + '-' + Moth + '-' + Day + ' '+ Hour +':'+ Minute
  208. this.datacontime = GMT
  209. },
  210. finishSelectDate(e){
  211. this.datatime = e[0]
  212. console.error("选择了日期:",e);
  213. },
  214. movetran(e) {
  215. let arr = uni.getSystemInfoSync().windowHeight;
  216. this.dataheight = (e.changedTouches[0].clientY / 16) + 'rem'
  217. if (e.changedTouches[0].clientY / 16 > 10.75) {
  218. this.dataheight = 10.75 + 'rem'
  219. } else if (e.changedTouches[0].clientY / 16 < 3.75) {
  220. this.dataheight = 3.75 + 'rem'
  221. }
  222. },
  223. uplist() {
  224. uni.redirectTo({
  225. url: "/pages/loadingdetails/index"
  226. })
  227. },
  228. lop(index) {
  229. this.action = index
  230. },
  231. seach() {
  232. uni.redirectTo({
  233. url: "/pages/search/index"
  234. })
  235. },
  236. fall() {
  237. uni.switchTab({
  238. url: "/pages/mypage/index"
  239. })
  240. },
  241. change(e) {
  242. this.current = e.detail.current;
  243. }
  244. },
  245. }
  246. </script>
  247. <style lang="scss" scoped>
  248. .app-content {
  249. >.header {
  250. width: 100%;
  251. height: 4.375rem;
  252. display: flex;
  253. justify-content: center;
  254. align-items: center;
  255. // background: rgba(49,85,99,1);
  256. color: rgb(16, 17, 22);
  257. font-family: Noto Sans SC;
  258. font-size: 1rem;
  259. position: fixed;
  260. left:0;
  261. top:0;
  262. z-index: 1;
  263. >.log {
  264. width: .375rem;
  265. height: .75rem;
  266. font-size: .75rem;
  267. position: absolute;
  268. left: 1.5rem;
  269. background: url('../../static/ico@1x.png') no-repeat;
  270. background-size: 100% 100%;
  271. }
  272. >.up {
  273. width: .8456rem;
  274. height: .8456rem;
  275. position: absolute;
  276. right: 1.5rem;
  277. background: url('../../static/search.png') no-repeat;
  278. background-size: 100% 100%;
  279. // color: rgb(37, 121, 160);
  280. // font-family: Noto Sans SC;
  281. // font-size: .875rem;
  282. // font-weight: 500;
  283. }
  284. }
  285. >.content {
  286. width: 100%;
  287. // height: calc(100vh - 20.9375rem - 4.375rem);
  288. padding-bottom: 0;
  289. position: absolute;
  290. bottom: 0;
  291. top: 10.75rem;
  292. border-radius: 6px 6px 0px 0px;
  293. overflow: hidden;
  294. background: rgb(255, 255, 255);
  295. >.choice {
  296. width: 100%;
  297. // height: 3.75rem;
  298. display: flex;
  299. align-items: center;
  300. padding: 0 0 0 0.8rem;
  301. box-sizing: border-box;
  302. >.scroll-Y {
  303. // height: calc(100% - 2.5rem - 2.75rem - 2.25rem - 2.25rem);
  304. width: 100%;
  305. height: 27.75rem;
  306. .list {
  307. height: 3.375rem;
  308. display: flex;
  309. align-items: center;
  310. border-bottom: 1px solid rgb(238, 238, 238);
  311. position: relative;
  312. color: rgb(0, 0, 0);
  313. font-family: Noto Sans SC;
  314. font-size: 13px;
  315. font-weight: 400;
  316. >.lable {
  317. color: rgb(0, 0, 0);
  318. font-family: Noto Sans SC;
  319. font-size: 13px;
  320. font-weight: 500;
  321. line-height: 19px;
  322. letter-spacing: 0px;
  323. text-align: left;
  324. width: 6rem;
  325. }
  326. >.listup {
  327. width: .25rem;
  328. height: .5rem;
  329. background: url('../../static/icos.png') no-repeat;
  330. background-size: 100% 100%;
  331. position: absolute;
  332. right: 1.5rem;
  333. }
  334. }
  335. }
  336. }
  337. .but {
  338. width: 20.5625rem;
  339. height: 2.5rem;
  340. background: linear-gradient(179.10deg, rgba(51, 161, 165, 1.00) 11.326%, rgba(59, 111, 142, 1.00) 119.032%, rgba(59, 111, 142, 1.00) 119.032%, rgba(59, 111, 142, 1.00) 119.032%);
  341. border-radius: .25rem;
  342. color: rgb(255, 255, 255);
  343. font-family: Noto Sans SC;
  344. font-size: 1rem;
  345. margin: 0 auto;
  346. display: flex;
  347. align-items: center;
  348. justify-content: center;
  349. margin-top: 0.25rem;
  350. margin-bottom: 2.25rem;
  351. }
  352. }
  353. }
  354. </style>