forOrder.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  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/rejectDetail')">
  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-name flex">
  21. <view class="">产品名称</view>
  22. <view class="">检验日期:2022年10月30日</view>
  23. </view>
  24. <view class="main-info flex">
  25. <scroll-view scroll-x="true" class="main-price">
  26. <view class="image-box">
  27. <view class="image-item" v-for="(itm,ind) in 10">
  28. <image src="../../static/img/user-item2.png" mode=""></image>
  29. </view>
  30. </view>
  31. </scroll-view>
  32. </view>
  33. <view class="main-num flex">
  34. <view class="mainnum-item">
  35. 合作公司:浙江皮革厂有限公司 13526232012
  36. </view>
  37. </view>
  38. <view class="bottom flex">
  39. <view class="bottom-font">
  40. 不合格数量:<text class="red">285</text>
  41. </view>
  42. <view class="btn-box">
  43. <view class="box2" @click.stop="open()">处理</view>
  44. <view class="box2" @click.stop="navTo('/pages/user/myorderDispose?type=2')">联系厂家</view>
  45. </view>
  46. </view>
  47. </view>
  48. </scroll-view>
  49. </swiper-item>
  50. </swiper>
  51. <uni-popup ref="popup" type="center">
  52. <view class="popup-box">
  53. <view class="popup-title">
  54. 输入意见
  55. </view>
  56. <view class="popup-main">
  57. <textarea placeholder="请点击输入..." class="popup-main-font" name="" id="" cols="30"
  58. rows="10"></textarea>
  59. </view>
  60. <view class="popup-btn-box flex">
  61. <view class="popup-btn-item qx" @click="cancel()">
  62. 取消
  63. </view>
  64. <view class="popup-btn-item qd">
  65. 确定
  66. </view>
  67. </view>
  68. </view>
  69. </uni-popup>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. tabCurrentIndex: 0,
  77. navList: [{
  78. state: '',
  79. text: '全部',
  80. loadingType: 'more',
  81. orderList: [],
  82. page: 1, //当前页数
  83. limit: 10 //每次信息条数
  84. },
  85. {
  86. state: '',
  87. text: '待处理',
  88. loadingType: 'more',
  89. orderList: [],
  90. page: 1, //当前页数
  91. limit: 10 //每次信息条数
  92. },
  93. {
  94. state: '',
  95. text: '已处理',
  96. loadingType: 'more',
  97. orderList: [],
  98. page: 1, //当前页数
  99. limit: 10 //每次信息条数
  100. }
  101. ]
  102. }
  103. },
  104. onLoad() {},
  105. onShow() {},
  106. onReachBottom() {},
  107. onReady() {},
  108. methods: {
  109. //swiper 切换
  110. changeTab(e) {
  111. this.tabCurrentIndex = e.target.current;
  112. this.loadData('tabChange');
  113. },
  114. //顶部tab点击
  115. tabClick(index) {
  116. this.tabCurrentIndex = index;
  117. },
  118. loadData() {
  119. },
  120. open() {
  121. this.$refs.popup.open()
  122. },
  123. cancel() {
  124. this.$refs.popup.close()
  125. },
  126. navTo(url) {
  127. uni.navigateTo({
  128. url
  129. })
  130. }
  131. }
  132. };
  133. </script>
  134. <style lang="scss">
  135. page,
  136. .content {
  137. min-height: 100%;
  138. height: auto;
  139. }
  140. .navbar {
  141. display: flex;
  142. height: 40px;
  143. padding: 0 5px;
  144. background: #fff;
  145. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
  146. position: relative;
  147. z-index: 10;
  148. .nav-item {
  149. flex: 1;
  150. display: flex;
  151. justify-content: center;
  152. align-items: center;
  153. height: 100%;
  154. font-size: 15px;
  155. color: $font-color-dark;
  156. position: relative;
  157. &.current {
  158. color: #FF4C4C;
  159. &:after {
  160. content: '';
  161. position: absolute;
  162. left: 50%;
  163. bottom: 0;
  164. transform: translateX(-50%);
  165. width: 44px;
  166. height: 0;
  167. border-bottom: 2px solid #FF4C4C;
  168. }
  169. }
  170. }
  171. }
  172. .swiper-box {
  173. height: calc(100vh - 40px);
  174. }
  175. .list-scroll-content {
  176. height: 100%;
  177. }
  178. .popup-box {
  179. width: 582rpx;
  180. background: #FFFFFF;
  181. border-radius: 7rpx;
  182. padding: 64rpx 32rpx 54rpx;
  183. .popup-title {
  184. text-align: center;
  185. font-size: 42rpx;
  186. font-family: PingFang SC;
  187. font-weight: bold;
  188. color: #2D2D2D;
  189. }
  190. .popup-main {
  191. margin-top: 42rpx;
  192. width: 100%;
  193. height: 194rpx;
  194. background: #F4F4F4;
  195. border-radius: 10rpx;
  196. padding: 20rpx;
  197. .popup-main-font {
  198. width: 100%;
  199. height: 100%;
  200. font-size: 34rpx;
  201. font-family: PingFang SC;
  202. font-weight: 500;
  203. color: #999999;
  204. }
  205. }
  206. .popup-btn-box {
  207. margin-top: 50rpx;
  208. .popup-btn-item {
  209. display: flex;
  210. justify-content: center;
  211. align-items: center;
  212. width: 248rpx;
  213. height: 78rpx;
  214. border-radius: 5rpx;
  215. font-size: 34rpx;
  216. font-family: PingFang SC;
  217. font-weight: 500;
  218. }
  219. .qx {
  220. color: #333333;
  221. background: #FFFFFF;
  222. border: 1px solid #999999;
  223. }
  224. .qd {
  225. background: #069CFA;
  226. color: #FFFFFF;
  227. }
  228. }
  229. }
  230. .main {
  231. width: 700rpx;
  232. background: #FFFFFF;
  233. border-radius: 24rpx;
  234. margin: 20rpx auto 0;
  235. padding: 0 15rpx;
  236. line-height: 1;
  237. .main-id {
  238. padding: 35rpx 14rpx 30rpx;
  239. font-size: 28rpx;
  240. font-family: PingFang SC;
  241. font-weight: 500;
  242. color: #666666;
  243. border-bottom: 1px solid #ededed;
  244. }
  245. .type1 {
  246. font-size: 26rpx;
  247. font-family: PingFang SC;
  248. font-weight: 500;
  249. color: #FF2D2D;
  250. }
  251. .type2 {
  252. font-size: 26rpx;
  253. font-family: PingFang SC;
  254. font-weight: 500;
  255. color: #999999;
  256. }
  257. .main-name {
  258. padding: 20rpx 14rpx 16rpx;
  259. font-size: 28rpx;
  260. font-family: PingFang SC;
  261. font-weight: 500;
  262. color: #363636;
  263. }
  264. .main-info {
  265. padding: 0 14rpx;
  266. .main-price {
  267. width: 100%;
  268. .image-box {
  269. display: flex;
  270. align-items: center;
  271. .image-item {
  272. margin-left: 10rpx;
  273. width: 110rpx;
  274. height: 110rpx;
  275. flex-shrink: 0;
  276. image {
  277. width: 100%;
  278. height: 100%;
  279. }
  280. }
  281. }
  282. }
  283. .main-more {
  284. display: flex;
  285. align-items: center;
  286. .mainm-font {
  287. margin-right: 10rpx;
  288. font-size: 26rpx;
  289. font-family: PingFang SC;
  290. font-weight: 500;
  291. color: #333333;
  292. }
  293. .mainm-jt {
  294. width: 12rpx;
  295. height: 22rpx;
  296. }
  297. }
  298. }
  299. .main-num {
  300. padding: 24rpx 14rpx 20rpx;
  301. border-bottom: 1px solid #ededed;
  302. .mainnum-item {
  303. font-size: 28rpx;
  304. font-family: PingFang SC;
  305. font-weight: 500;
  306. color: #333333;
  307. .red {
  308. color: #FF4C4C
  309. }
  310. }
  311. }
  312. .bottom {
  313. padding: 20rpx 0;
  314. .btn-box {
  315. display: flex;
  316. justify-content: flex-end;
  317. align-items: center;
  318. }
  319. .bottom-font {
  320. font-size: 28rpx;
  321. font-family: PingFang SC;
  322. font-weight: 500;
  323. color: #333333;
  324. .red {
  325. color: #FF4C4C
  326. }
  327. }
  328. .box2 {
  329. margin-left: 10rpx;
  330. width: 144rpx;
  331. height: 55rpx;
  332. border: 2px solid #FF2D2D;
  333. border-radius: 28rpx;
  334. display: flex;
  335. justify-content: center;
  336. align-items: center;
  337. font-size: 26rpx;
  338. font-family: PingFang SC;
  339. font-weight: 500;
  340. color: #FF2D2D;
  341. }
  342. }
  343. }
  344. </style>