my_task.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  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. }
  79. else{
  80. uni.showToast({
  81. title: res.data.message,
  82. icon:'none',
  83. duration: 2000
  84. })
  85. }
  86. }).catch(res => {
  87. uni.showToast({
  88. title: res.data.message,
  89. icon:'none',
  90. duration: 2000
  91. })
  92. })
  93. },
  94. tabcarchange(statusFlag){
  95. this.statusFlag=statusFlag
  96. this.pageSize = 1
  97. this.getIndexBuyData()
  98. },
  99. }
  100. }
  101. </script>
  102. <style lang="scss" scoped>
  103. page,
  104. .content {
  105. }
  106. .line{
  107. display:inline-block;
  108. padding:5px;
  109. position:relative;
  110. font-size:17px;
  111. margin-right: 126px;
  112. }
  113. .cu-tag.badge {
  114. right: 26rpx;
  115. }
  116. .cu-item {
  117. height: 80rpx;
  118. display: inline-block;
  119. line-height: 80rpx;
  120. }
  121. .search-form {
  122. background: #fff;
  123. box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  124. }
  125. .title-tip {
  126. color: #E63113;
  127. text-align: right;
  128. }
  129. .tag-bule {
  130. background: #CDE7FB;
  131. color: #0B4572;
  132. }
  133. .tag-green {
  134. background: #C6F7BC;
  135. color: #065112;
  136. }
  137. .tag-yellow {
  138. background: #FBF4B1;
  139. color: #5C4409;
  140. }
  141. .tag {
  142. padding: 5px;
  143. display: inline-flex;
  144. font-size: 22rpx;
  145. margin: 3px;
  146. }
  147. .text-white {
  148. color: #fff;
  149. }
  150. .text-white text {
  151. position: relative;
  152. z-index: 2;
  153. background: linear-gradient(45deg, #3DC146, #B2D612);
  154. padding: 5px 10px;
  155. border-radius: 38rpx;
  156. }
  157. .guess-section {
  158. padding-bottom: 100upx;
  159. display: flex;
  160. flex-wrap: wrap;
  161. padding: 0 30upx;
  162. background: #fff;
  163. .guess-item {
  164. display: flex;
  165. flex-direction: column;
  166. width: 98%;
  167. border-bottom: 1px solid #ccc;
  168. }
  169. .image-wrapper {
  170. width: 100%;
  171. height: 330upx;
  172. border-radius: 3px;
  173. overflow: hidden;
  174. image {
  175. width: 100%;
  176. height: 100%;
  177. opacity: 1;
  178. }
  179. }
  180. .title {
  181. font-size: $font-lg;
  182. color: #121212;
  183. }
  184. .price-orther {
  185. font-size: $font-sm;
  186. color: $font-color-base;
  187. }
  188. .price {
  189. font-size: 64rpx;
  190. color: #39b54a;
  191. line-height: 1;
  192. padding-right: 10upx;
  193. }
  194. .goods1 {
  195. font-size: $font-sm;
  196. color: $font-color-base;
  197. }
  198. .goods2 {
  199. font-size: $font-sm;
  200. color: $font-color-base;
  201. padding-left: 10%;
  202. }
  203. .goods3 {
  204. font-size: $font-sm;
  205. color: $font-color-base;
  206. padding-left: 10%;
  207. }
  208. .goods4 {
  209. font-size: $font-sm;
  210. color: #ff5500;
  211. }
  212. .goods5 {
  213. font-size: $font-sm;
  214. color: $font-color-base;
  215. }
  216. .view-item {
  217. width: 100%;
  218. // line-height: 40upx;
  219. padding-top: 10upx;
  220. }
  221. .confirm-btn {
  222. margin-left: 20%;
  223. }
  224. .date-time {
  225. margin-left: 30%;
  226. }
  227. .padding-xs-tmp {
  228. padding: 15upx 10upx 10upx 10upx;
  229. }
  230. }
  231. .navbar {
  232. position: fixed;
  233. left: 0;
  234. top: var(--window-top);
  235. display: flex;
  236. width: 100%;
  237. height: 80upx;
  238. background: #fff;
  239. box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
  240. z-index: 10;
  241. .nav-item {
  242. flex: 1;
  243. display: flex;
  244. justify-content: center;
  245. align-items: center;
  246. height: 100%;
  247. font-size: 30upx;
  248. color: $font-color-dark;
  249. position: relative;
  250. &.current {
  251. color: $base-color;
  252. &:after {
  253. content: '';
  254. position: absolute;
  255. left: 50%;
  256. bottom: 0;
  257. transform: translateX(-50%);
  258. width: 120upx;
  259. height: 0;
  260. border-bottom: 4upx solid $base-color;
  261. }
  262. }
  263. }
  264. .p-box {
  265. display: flex;
  266. flex-direction: column;
  267. .yticon {
  268. display: flex;
  269. align-items: center;
  270. justify-content: center;
  271. width: 30upx;
  272. height: 14upx;
  273. line-height: 1;
  274. margin-left: 4upx;
  275. font-size: 26upx;
  276. color: #888;
  277. &.active {
  278. color: $base-color;
  279. }
  280. }
  281. .xia {
  282. transform: scaleY(-1);
  283. }
  284. }
  285. .cate-item {
  286. display: flex;
  287. justify-content: center;
  288. align-items: center;
  289. height: 100%;
  290. width: 80upx;
  291. position: relative;
  292. font-size: 44upx;
  293. &:after {
  294. content: '';
  295. position: absolute;
  296. left: 0;
  297. top: 50%;
  298. transform: translateY(-50%);
  299. border-left: 1px solid #ddd;
  300. width: 0;
  301. height: 36upx;
  302. }
  303. }
  304. }
  305. /* 分类 */
  306. .cate-mask {
  307. position: fixed;
  308. left: 0;
  309. top: var(--window-top);
  310. bottom: 0;
  311. width: 100%;
  312. background: rgba(0, 0, 0, 0);
  313. z-index: 95;
  314. transition: .3s;
  315. .cate-content {
  316. width: 630upx;
  317. height: 100%;
  318. background: #fff;
  319. float: right;
  320. transform: translateX(100%);
  321. transition: .3s;
  322. }
  323. &.none {
  324. display: none;
  325. }
  326. &.show {
  327. background: rgba(0, 0, 0, .4);
  328. .cate-content {
  329. transform: translateX(0);
  330. }
  331. }
  332. }
  333. .cate-list {
  334. display: flex;
  335. flex-direction: column;
  336. height: 100%;
  337. .cate-item {
  338. display: flex;
  339. align-items: center;
  340. height: 90upx;
  341. padding-left: 30upx;
  342. font-size: 28upx;
  343. color: #555;
  344. position: relative;
  345. }
  346. .two {
  347. height: 64upx;
  348. color: #303133;
  349. font-size: 30upx;
  350. background: #f8f8f8;
  351. }
  352. .active {
  353. color: $base-color;
  354. }
  355. }
  356. /* 销售信息 */
  357. .introduce-section {
  358. background: #fff;
  359. padding: 20upx 30upx;
  360. padding-bottom: 100upx;
  361. .guess-item {
  362. padding-bottom: 20upx;
  363. border-bottom: 1px solid #ccc;
  364. }
  365. .title {
  366. font-size: 13upx;
  367. color: $font-color-dark;
  368. font-weight: bold;
  369. height: 100upx;
  370. line-height: 50upx;
  371. flex: 2.5;
  372. margin-left: -4px;
  373. padding: 0px 24px;
  374. }
  375. .title-tip {
  376. flex: 1;
  377. }
  378. .price-box {
  379. display: flex;
  380. align-items: baseline;
  381. height: 57px;
  382. padding: 5px 0;
  383. font-size: 13px;
  384. color: #fa436a;
  385. }
  386. .price {
  387. font-size: $font-lg + 2upx;
  388. }
  389. .m-price {
  390. margin: 0 12upx;
  391. color: $font-color-light;
  392. text-decoration: line-through;
  393. }
  394. .coupon-tip {
  395. align-items: center;
  396. padding: 4upx 10upx;
  397. background: $uni-color-primary;
  398. font-size: $font-sm;
  399. color: #fff;
  400. border-radius: 6upx;
  401. line-height: 1;
  402. transform: translateY(-4upx);
  403. }
  404. .bot-row {
  405. display: flex;
  406. align-items: center;
  407. height: 50upx;
  408. font-size: $font-sm;
  409. color: $font-color-light;
  410. view {
  411. flex: 1;
  412. }
  413. }
  414. }
  415. .titles{
  416. display: -webkit-inline-box;
  417. }
  418. .titleds_aa{
  419. float: right;
  420. }
  421. </style>