my_task.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. <template name="task">
  2. <view class="content">
  3. <view class="cu-bar search bg-white">
  4. <view class="search-form round" @click="naviageToPage('/pageA/product/search?TabCur=')">
  5. <text style='color: #ccc;' class="cuIcon-search"></text>
  6. <input type="text" placeholder="请输入合同编号、车牌号或派车编号" confirm-type="search"></input>
  7. </view>
  8. </view>
  9. <view style='background:#fff;padding:0 145px;display:table-footer-group ;'>
  10. <view @click='tabcarchange(1)' class='line' :class='TabCur==1?"active":""'>未完成</view>
  11. <view @click='tabcarchange(3)' class='line' :class='TabCur==3?"active":""'>已完成</view>
  12. </view>
  13. <view class="introduce-section">
  14. <view v-for="(item, index) in taskInfo" :key="index" class="guess-item" @click="navToDetailPage(item)">
  15. <view class="price-box">
  16. <view class='tag tag-bule radius line-pink'>入库任务</view>
  17. <view class="title">辽H12345(C001){{item.car_no}}{{item.tran_car_no}}</view>
  18. </view>
  19. <view class="titles ">CG12345678{{item.contract_no}}</view>
  20. <view class="titles titleds_aa">2021-06-30{{item.predict_date}}</view>
  21. </view>
  22. <view v-show="isLoadMore">
  23. <uni-load-more :status="loadStatus"></uni-load-more>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. name: "task",
  31. data() {
  32. return {
  33. PageCur: "task",
  34. taskInfo: [],
  35. pages: 1, //页数
  36. limit: 10, //每次取条目数
  37. loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
  38. isLoadMore: false, //是否加载中
  39. showTran: true,
  40. scrollTop: 0,
  41. statusFlag: 1,
  42. TabCur: 0,
  43. current: 1,
  44. warehouseInOutInfo: {
  45. pageSize: 10,
  46. currentPage: 1
  47. }
  48. };
  49. },
  50. onLoad(options) {
  51. this.getIndexBuyData();
  52. this.getIndexBuyData()
  53. },
  54. methods: {
  55. getIndexBuyData() {
  56. console.log(11111)
  57. const that = this
  58. var pages = that.pages
  59. var limit = that.limit
  60. console.log(2112454)
  61. this.warehouseInOutInfo.statusFlag = this.statusFlag
  62. this.$api.doRequest('get', '/warehouseInOutInfo/selectInfo', this.warehouseInOutInfo).then(res => {
  63. console.log(12545645)
  64. if (res.data.code == 200) {
  65. let data = res.data.data
  66. //采购信息
  67. if (data.length > 0) {
  68. that.taskInfo = that.taskInfo.concat(data)
  69. that.isLoadMore = false
  70. } else {
  71. if (that.pages > 1) {
  72. that.pages -= 1
  73. }
  74. that.isLoadMore = true
  75. that.loadStatus = 'nomore'
  76. }
  77. uni.hideLoading()
  78. } else {
  79. uni.showToast({
  80. title: res.data.message,
  81. icon: 'none',
  82. duration: 2000
  83. })
  84. }
  85. }).catch(res => {
  86. uni.showToast({
  87. title: res.data.message,
  88. icon: 'none',
  89. duration: 2000
  90. })
  91. })
  92. },
  93. tabcarchange(statusFlag) {
  94. this.statusFlag = statusFlag
  95. this.pageSize = 1
  96. this.getIndexBuyData()
  97. },
  98. }
  99. }
  100. </script>
  101. <style lang="scss" scoped>
  102. page,
  103. .content {
  104. background: #F5F6FA;
  105. }
  106. .line {
  107. display: inline-block;
  108. padding: 5px;
  109. position: relative;
  110. font-size: 17px;
  111. width: 187px;
  112. padding-left: 68px;
  113. }
  114. .line.active {
  115. font-size: 19px;
  116. font-weight: 900;
  117. }
  118. .line.active:after {
  119. content: '';
  120. display: block;
  121. position: absolute;
  122. width: 18px;
  123. left: 50%;
  124. transform: translateX(-50%);
  125. bottom: 0;
  126. border-bottom: 1px solid #22C572;
  127. }
  128. .cu-tag.badge {
  129. right: 26rpx;
  130. }
  131. .cu-item {
  132. height: 80rpx;
  133. display: inline-block;
  134. line-height: 80rpx;
  135. }
  136. .search-form {
  137. background: #fff;
  138. box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  139. }
  140. .title-tip {
  141. color: #E63113;
  142. text-align: right;
  143. }
  144. .tag-bule {
  145. background: #CDE7FB;
  146. color: #0B4572;
  147. }
  148. .tag-green {
  149. background: #C6F7BC;
  150. color: #065112;
  151. }
  152. .tag-yellow {
  153. background: #FBF4B1;
  154. color: #5C4409;
  155. }
  156. .tag {
  157. padding: 5px;
  158. display: inline-flex;
  159. font-size: 22rpx;
  160. margin: 3px;
  161. }
  162. .text-white {
  163. color: #fff;
  164. }
  165. .text-white text {
  166. position: relative;
  167. z-index: 2;
  168. background: linear-gradient(45deg, #3DC146, #B2D612);
  169. padding: 5px 10px;
  170. border-radius: 38rpx;
  171. }
  172. .guess-section {
  173. padding-bottom: 100upx;
  174. display: flex;
  175. flex-wrap: wrap;
  176. padding: 0 30upx;
  177. background: #fff;
  178. .guess-item {
  179. display: flex;
  180. flex-direction: column;
  181. width: 98%;
  182. border-bottom: 1px solid #ccc;
  183. }
  184. .image-wrapper {
  185. width: 100%;
  186. height: 330upx;
  187. border-radius: 3px;
  188. overflow: hidden;
  189. image {
  190. width: 100%;
  191. height: 100%;
  192. opacity: 1;
  193. }
  194. }
  195. .title {
  196. font-size: $font-lg;
  197. color: #121212;
  198. }
  199. .price-orther {
  200. font-size: $font-sm;
  201. color: $font-color-base;
  202. }
  203. .price {
  204. font-size: 64rpx;
  205. color: #39b54a;
  206. line-height: 1;
  207. padding-right: 10upx;
  208. }
  209. .goods1 {
  210. font-size: $font-sm;
  211. color: $font-color-base;
  212. }
  213. .goods2 {
  214. font-size: $font-sm;
  215. color: $font-color-base;
  216. padding-left: 10%;
  217. }
  218. .goods3 {
  219. font-size: $font-sm;
  220. color: $font-color-base;
  221. padding-left: 10%;
  222. }
  223. .goods4 {
  224. font-size: $font-sm;
  225. color: #ff5500;
  226. }
  227. .goods5 {
  228. font-size: $font-sm;
  229. color: $font-color-base;
  230. }
  231. .view-item {
  232. width: 100%;
  233. // line-height: 40upx;
  234. padding-top: 10upx;
  235. }
  236. .confirm-btn {
  237. margin-left: 20%;
  238. }
  239. .date-time {
  240. margin-left: 30%;
  241. }
  242. .padding-xs-tmp {
  243. padding: 15upx 10upx 10upx 10upx;
  244. }
  245. }
  246. .navbar {
  247. position: fixed;
  248. left: 0;
  249. top: var(--window-top);
  250. display: flex;
  251. width: 100%;
  252. height: 80upx;
  253. background: #fff;
  254. box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
  255. z-index: 10;
  256. .nav-item {
  257. flex: 1;
  258. display: flex;
  259. justify-content: center;
  260. align-items: center;
  261. height: 100%;
  262. font-size: 30upx;
  263. color: $font-color-dark;
  264. position: relative;
  265. &.current {
  266. color: $base-color;
  267. &:after {
  268. content: '';
  269. position: absolute;
  270. left: 50%;
  271. bottom: 0;
  272. transform: translateX(-50%);
  273. width: 120upx;
  274. height: 0;
  275. border-bottom: 4upx solid $base-color;
  276. }
  277. }
  278. }
  279. .p-box {
  280. display: flex;
  281. flex-direction: column;
  282. .yticon {
  283. display: flex;
  284. align-items: center;
  285. justify-content: center;
  286. width: 30upx;
  287. height: 14upx;
  288. line-height: 1;
  289. margin-left: 4upx;
  290. font-size: 26upx;
  291. color: #888;
  292. &.active {
  293. color: $base-color;
  294. }
  295. }
  296. .xia {
  297. transform: scaleY(-1);
  298. }
  299. }
  300. .cate-item {
  301. display: flex;
  302. justify-content: center;
  303. align-items: center;
  304. height: 100%;
  305. width: 80upx;
  306. position: relative;
  307. font-size: 44upx;
  308. &:after {
  309. content: '';
  310. position: absolute;
  311. left: 0;
  312. top: 50%;
  313. transform: translateY(-50%);
  314. border-left: 1px solid #ddd;
  315. width: 0;
  316. height: 36upx;
  317. }
  318. }
  319. }
  320. /* 分类 */
  321. .cate-mask {
  322. position: fixed;
  323. left: 0;
  324. top: var(--window-top);
  325. bottom: 0;
  326. width: 100%;
  327. background: rgba(0, 0, 0, 0);
  328. z-index: 95;
  329. transition: .3s;
  330. .cate-content {
  331. width: 630upx;
  332. height: 100%;
  333. background: #fff;
  334. float: right;
  335. transform: translateX(100%);
  336. transition: .3s;
  337. }
  338. &.none {
  339. display: none;
  340. }
  341. &.show {
  342. background: rgba(0, 0, 0, .4);
  343. .cate-content {
  344. transform: translateX(0);
  345. }
  346. }
  347. }
  348. .cate-list {
  349. display: flex;
  350. flex-direction: column;
  351. height: 100%;
  352. .cate-item {
  353. display: flex;
  354. align-items: center;
  355. height: 90upx;
  356. padding-left: 30upx;
  357. font-size: 28upx;
  358. color: #555;
  359. position: relative;
  360. }
  361. .two {
  362. height: 64upx;
  363. color: #303133;
  364. font-size: 30upx;
  365. background: #f8f8f8;
  366. }
  367. .active {
  368. color: $base-color;
  369. }
  370. }
  371. /* 销售信息 */
  372. .introduce-section {
  373. background: #fff;
  374. padding: 20upx 30upx;
  375. padding-bottom: 100upx;
  376. .guess-item {
  377. padding-bottom: 20upx;
  378. border-bottom: 1px solid #ccc;
  379. }
  380. .title {
  381. font-size: 13upx;
  382. color: $font-color-dark;
  383. font-weight: bold;
  384. height: 100upx;
  385. line-height: 50upx;
  386. flex: 2.5;
  387. margin-left: -4px;
  388. padding: 0px 24px;
  389. }
  390. .title-tip {
  391. flex: 1;
  392. }
  393. .price-box {
  394. display: flex;
  395. align-items: baseline;
  396. height: 57px;
  397. padding: 5px 0;
  398. font-size: 13px;
  399. color: #fa436a;
  400. }
  401. .price {
  402. font-size: $font-lg + 2upx;
  403. }
  404. .m-price {
  405. margin: 0 12upx;
  406. color: $font-color-light;
  407. text-decoration: line-through;
  408. }
  409. .coupon-tip {
  410. align-items: center;
  411. padding: 4upx 10upx;
  412. background: $uni-color-primary;
  413. font-size: $font-sm;
  414. color: #fff;
  415. border-radius: 6upx;
  416. line-height: 1;
  417. transform: translateY(-4upx);
  418. }
  419. .bot-row {
  420. display: flex;
  421. align-items: center;
  422. height: 50upx;
  423. font-size: $font-sm;
  424. color: $font-color-light;
  425. view {
  426. flex: 1;
  427. }
  428. }
  429. }
  430. .titles {
  431. display: -webkit-inline-box;
  432. }
  433. .titleds_aa {
  434. float: right;
  435. }
  436. </style>