my_task.vue 8.7 KB

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