administration.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. <template>
  2. <view class="content">
  3. <view class="navbar">
  4. <view v-for="(item, index) in navList" :key="index" class="nav-item"
  5. :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
  6. </view>
  7. <swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
  8. <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
  9. <scroll-view class="list-scroll-content" scroll-y>
  10. <view class="main" v-for="(item,index) in 10" @click="navTo('/pages/foreign/orderDetail')">
  11. <view class="main-id flex">
  12. <view class="">产品货号:9876543211025666</view>
  13. <view class="type1" v-if="index%2 == 0">
  14. 进行中
  15. </view>
  16. <view class="type2" v-else>
  17. 已完成
  18. </view>
  19. </view>
  20. <view class="main-info flex">
  21. <scroll-view scroll-x="true" class="main-price">
  22. <view class="image-box">
  23. <view class="image-item" v-for="(itm,ind) in 10">
  24. <image src="../../static/img/user-item2.png" mode=""></image>
  25. </view>
  26. </view>
  27. </scroll-view>
  28. <view class="main-more">
  29. <view class="mainm-font">
  30. 查看详细
  31. </view>
  32. <image class="mainm-jt" src="../../static/img/jt.png" mode=""></image>
  33. </view>
  34. </view>
  35. <view class="main-name flex">
  36. <view class="">创建日期:2022年10月30日</view>
  37. <view class="">到货日期:2022年10月30日</view>
  38. </view>
  39. <view class="main-name flex">
  40. <view class="mainnum-item">
  41. 合作公司:浙江皮革厂有限公司 13526232012
  42. </view>
  43. </view>
  44. <view class="main-name flex">
  45. <view class="mainnum-item">
  46. 不合格数量: <text class="red">285</text> 合格数量:<text class="red">285</text>
  47. </view>
  48. </view>
  49. <view class="bottom flex">
  50. <view class="btn-box">
  51. <view class="box2" @click.stop="navTo('/pages/foreign/checkout')">检验记录</view>
  52. <view v-if="tabCurrentIndex !=2" class="box2">立即联系</view>
  53. <view v-if="tabCurrentIndex !=2" class="box1" @click.stop="open()">提交检验</view>
  54. </view>
  55. </view>
  56. </view>
  57. </scroll-view>
  58. </swiper-item>
  59. </swiper>
  60. <uni-popup ref="popup" type="center">
  61. <view class="popup-box">
  62. <view class="popup-title">
  63. 检验数量
  64. </view>
  65. <view class="popup-main">
  66. <view class="popup-jian" @click="jj('0')">
  67. -
  68. </view>
  69. <input v-model="num" placeholder="请输入检验数量" class="popup-main-font" />
  70. <view class="popup-jia" @click="jj('1')">
  71. +
  72. </view>
  73. </view>
  74. <view class="popup-tip">
  75. 请输入检验数量
  76. </view>
  77. <view class="popup-btn-box flex">
  78. <view class="popup-btn-item qx" @click="cancel()">
  79. 取消
  80. </view>
  81. <view class="popup-btn-item qd">
  82. 确定
  83. </view>
  84. </view>
  85. </view>
  86. </uni-popup>
  87. </view>
  88. </template>
  89. <script>
  90. export default {
  91. data() {
  92. return {
  93. tabCurrentIndex: 0,
  94. num: 0,
  95. navList: [{
  96. state: '',
  97. text: '全部',
  98. loadingType: 'more',
  99. orderList: [],
  100. page: 1, //当前页数
  101. limit: 10 //每次信息条数
  102. },
  103. {
  104. state: '',
  105. text: '进行中',
  106. loadingType: 'more',
  107. orderList: [],
  108. page: 1, //当前页数
  109. limit: 10 //每次信息条数
  110. },
  111. {
  112. state: '',
  113. text: '已完成',
  114. loadingType: 'more',
  115. orderList: [],
  116. page: 1, //当前页数
  117. limit: 10 //每次信息条数
  118. }
  119. ]
  120. }
  121. },
  122. onLoad() {},
  123. onShow() {},
  124. onReachBottom() {},
  125. onReady() {},
  126. methods: {
  127. //swiper 切换
  128. changeTab(e) {
  129. this.tabCurrentIndex = e.target.current;
  130. this.loadData('tabChange');
  131. },
  132. //顶部tab点击
  133. tabClick(index) {
  134. this.tabCurrentIndex = index;
  135. },
  136. loadData() {
  137. },
  138. open() {
  139. this.$refs.popup.open()
  140. },
  141. cancel() {
  142. this.$refs.popup.close()
  143. },
  144. navTo(url) {
  145. uni.navigateTo({
  146. url
  147. })
  148. },
  149. jj(opt) {
  150. if (opt == 0) {
  151. this.num = this.num * 1 - 1
  152. } else {
  153. this.num = this.num * 1 + 1
  154. }
  155. }
  156. }
  157. };
  158. </script>
  159. <style lang="scss">
  160. page,
  161. .content {
  162. min-height: 100%;
  163. height: auto;
  164. }
  165. .navbar {
  166. display: flex;
  167. height: 40px;
  168. padding: 0 5px;
  169. background: #fff;
  170. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
  171. position: relative;
  172. z-index: 10;
  173. .nav-item {
  174. flex: 1;
  175. display: flex;
  176. justify-content: center;
  177. align-items: center;
  178. height: 100%;
  179. font-size: 15px;
  180. color: $font-color-dark;
  181. position: relative;
  182. &.current {
  183. color: #FF4C4C;
  184. &:after {
  185. content: '';
  186. position: absolute;
  187. left: 50%;
  188. bottom: 0;
  189. transform: translateX(-50%);
  190. width: 44px;
  191. height: 0;
  192. border-bottom: 2px solid #FF4C4C;
  193. }
  194. }
  195. }
  196. }
  197. .swiper-box {
  198. height: calc(100vh - 40px);
  199. }
  200. .list-scroll-content {
  201. height: 100%;
  202. }
  203. .popup-box {
  204. width: 582rpx;
  205. background: #FFFFFF;
  206. border-radius: 30rpx;
  207. padding: 64rpx 32rpx 20rpx;
  208. .popup-title {
  209. text-align: center;
  210. font-size: 36rpx;
  211. font-family: PingFang SC;
  212. font-weight: bold;
  213. color: #333333;
  214. }
  215. .popup-main {
  216. margin: 42rpx auto 0;
  217. border-radius: 10rpx;
  218. display: flex;
  219. align-items: center;
  220. justify-content: center;
  221. .popup-jian {
  222. width: 89rpx;
  223. height: 77rpx;
  224. background: #FFFFFF;
  225. border: 1px solid #CFCFCF;
  226. border-radius: 3rpx;
  227. display: flex;
  228. justify-content: center;
  229. align-items: center;
  230. font-size: 43rpx;
  231. font-family: Microsoft YaHei;
  232. font-weight: 400;
  233. color: #333333;
  234. }
  235. .popup-jia {
  236. width: 89rpx;
  237. height: 77rpx;
  238. background: #FFFFFF;
  239. border: 1px solid #CFCFCF;
  240. border-radius: 3rpx;
  241. display: flex;
  242. justify-content: center;
  243. align-items: center;
  244. font-size: 43rpx;
  245. font-family: Microsoft YaHei;
  246. font-weight: 400;
  247. color: #F35B64;
  248. }
  249. .popup-main-font {
  250. padding: 0 10rpx;
  251. text-align: center;
  252. width: 140rpx;
  253. height: 77rpx;
  254. font-size: 32rpx;
  255. font-family: Microsoft YaHei;
  256. font-weight: 400;
  257. color: #333333;
  258. border-bottom: 1px solid #CFCFCF;
  259. border-top: 1px solid #CFCFCF;
  260. }
  261. }
  262. .popup-tip {
  263. text-align: center;
  264. margin-top: 34rpx;
  265. }
  266. .popup-btn-box {
  267. margin-top: 50rpx;
  268. .popup-btn-item {
  269. display: flex;
  270. justify-content: center;
  271. align-items: center;
  272. width: 248rpx;
  273. height: 78rpx;
  274. border-radius: 5rpx;
  275. font-size: 34rpx;
  276. font-family: PingFang SC;
  277. font-weight: 500;
  278. }
  279. .qd {
  280. color: #FF4C4C;
  281. }
  282. }
  283. }
  284. .main {
  285. width: 700rpx;
  286. background: #FFFFFF;
  287. border-radius: 24rpx;
  288. margin: 20rpx auto 0;
  289. padding: 0 15rpx;
  290. line-height: 1;
  291. .main-id {
  292. padding: 35rpx 14rpx 30rpx;
  293. font-size: 28rpx;
  294. font-family: PingFang SC;
  295. font-weight: 500;
  296. color: #666666;
  297. border-bottom: 1px solid #ededed;
  298. }
  299. .type1 {
  300. font-size: 26rpx;
  301. font-family: PingFang SC;
  302. font-weight: 500;
  303. color: #FF2D2D;
  304. }
  305. .type2 {
  306. font-size: 26rpx;
  307. font-family: PingFang SC;
  308. font-weight: 500;
  309. color: #999999;
  310. }
  311. .main-name {
  312. padding: 0 14rpx 20rpx;
  313. font-size: 26rpx;
  314. font-family: PingFang SC;
  315. font-weight: 500;
  316. color: #363636;
  317. }
  318. .main-info {
  319. padding: 20rpx 14rpx;
  320. .main-price {
  321. width: 480rpx;
  322. .image-box {
  323. display: flex;
  324. align-items: center;
  325. .image-item {
  326. margin-left: 10rpx;
  327. width: 110rpx;
  328. height: 110rpx;
  329. flex-shrink: 0;
  330. image {
  331. width: 100%;
  332. height: 100%;
  333. }
  334. }
  335. }
  336. }
  337. .main-more {
  338. display: flex;
  339. align-items: center;
  340. .mainm-font {
  341. margin-right: 10rpx;
  342. font-size: 26rpx;
  343. font-family: PingFang SC;
  344. font-weight: 500;
  345. color: #333333;
  346. }
  347. .mainm-jt {
  348. width: 12rpx;
  349. height: 22rpx;
  350. }
  351. }
  352. }
  353. .main-num {
  354. padding: 24rpx 14rpx 20rpx;
  355. border-bottom: 1px solid #ededed;
  356. .mainnum-item {
  357. font-size: 28rpx;
  358. font-family: PingFang SC;
  359. font-weight: 500;
  360. color: #333333;
  361. }
  362. }
  363. .red {
  364. color: #FF4C4C
  365. }
  366. .bottom {
  367. border-top: 1px solid #eeeeee;
  368. padding: 20rpx 0;
  369. .btn-box {
  370. width: 100%;
  371. display: flex;
  372. justify-content: flex-end;
  373. align-items: center;
  374. }
  375. .bottom-font {
  376. font-size: 28rpx;
  377. font-family: PingFang SC;
  378. font-weight: 500;
  379. color: #333333;
  380. .red {
  381. color: #FF4C4C
  382. }
  383. }
  384. .box2 {
  385. margin-left: 10rpx;
  386. width: 144rpx;
  387. height: 55rpx;
  388. border: 2px solid #EBEBEB;
  389. border-radius: 28rpx;
  390. display: flex;
  391. justify-content: center;
  392. align-items: center;
  393. font-size: 26rpx;
  394. font-family: PingFang SC;
  395. font-weight: 500;
  396. color: #666666;
  397. }
  398. .box1 {
  399. margin-left: 10rpx;
  400. width: 144rpx;
  401. height: 55rpx;
  402. border: 2px solid #FF2D2D;
  403. border-radius: 28rpx;
  404. display: flex;
  405. justify-content: center;
  406. align-items: center;
  407. font-size: 26rpx;
  408. font-family: PingFang SC;
  409. font-weight: 500;
  410. color: #FF2D2D;
  411. }
  412. }
  413. }
  414. </style>