my_task.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  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: #8fe08b;
  164. color: #000000;
  165. }
  166. .tag {
  167. padding: 5px;
  168. display: inline-flex;
  169. font-size: 22rpx;
  170. margin: 3px;
  171. }
  172. .text-white {
  173. color: #fff;
  174. }
  175. .text-white text {
  176. position: relative;
  177. z-index: 2;
  178. background: linear-gradient(45deg, #3DC146, #B2D612);
  179. padding: 5px 10px;
  180. border-radius: 38rpx;
  181. }
  182. .guess-section {
  183. padding-bottom: 100upx;
  184. display: flex;
  185. flex-wrap: wrap;
  186. padding: 0 30upx;
  187. background: #fff;
  188. .guess-item {
  189. display: flex;
  190. flex-direction: column;
  191. width: 98%;
  192. border-bottom: 1px solid #ccc;
  193. }
  194. .image-wrapper {
  195. width: 100%;
  196. height: 330upx;
  197. border-radius: 3px;
  198. overflow: hidden;
  199. image {
  200. width: 100%;
  201. height: 100%;
  202. opacity: 1;
  203. }
  204. }
  205. .title {
  206. font-size: $font-lg;
  207. color: #121212;
  208. }
  209. .price-orther {
  210. font-size: $font-sm;
  211. color: $font-color-base;
  212. }
  213. .price {
  214. font-size: 64rpx;
  215. color: #39b54a;
  216. line-height: 1;
  217. padding-right: 10upx;
  218. }
  219. .view-item {
  220. width: 100%;
  221. // line-height: 40upx;
  222. padding-top: 10upx;
  223. }
  224. .confirm-btn {
  225. margin-left: 20%;
  226. }
  227. .date-time {
  228. margin-left: 30%;
  229. }
  230. .padding-xs-tmp {
  231. padding: 15upx 10upx 10upx 10upx;
  232. }
  233. }
  234. .navbar {
  235. position: fixed;
  236. left: 0;
  237. top: var(--window-top);
  238. display: flex;
  239. width: 100%;
  240. height: 80upx;
  241. background: #fff;
  242. box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
  243. z-index: 10;
  244. .nav-item {
  245. flex: 1;
  246. display: flex;
  247. justify-content: center;
  248. align-items: center;
  249. height: 100%;
  250. font-size: 30upx;
  251. color: $font-color-dark;
  252. position: relative;
  253. &.current {
  254. color: $base-color;
  255. &:after {
  256. content: '';
  257. position: absolute;
  258. left: 50%;
  259. bottom: 0;
  260. transform: translateX(-50%);
  261. width: 120upx;
  262. height: 0;
  263. border-bottom: 4upx solid $base-color;
  264. }
  265. }
  266. }
  267. .p-box {
  268. display: flex;
  269. flex-direction: column;
  270. .yticon {
  271. display: flex;
  272. align-items: center;
  273. justify-content: center;
  274. width: 30upx;
  275. height: 14upx;
  276. line-height: 1;
  277. margin-left: 4upx;
  278. font-size: 26upx;
  279. color: #888;
  280. &.active {
  281. color: $base-color;
  282. }
  283. }
  284. .xia {
  285. transform: scaleY(-1);
  286. }
  287. }
  288. .cate-item {
  289. display: flex;
  290. justify-content: center;
  291. align-items: center;
  292. height: 100%;
  293. width: 80upx;
  294. position: relative;
  295. font-size: 44upx;
  296. &:after {
  297. content: '';
  298. position: absolute;
  299. left: 0;
  300. top: 50%;
  301. transform: translateY(-50%);
  302. border-left: 1px solid #ddd;
  303. width: 0;
  304. height: 36upx;
  305. }
  306. }
  307. }
  308. /* 分类 */
  309. .cate-mask {
  310. position: fixed;
  311. left: 0;
  312. top: var(--window-top);
  313. bottom: 0;
  314. width: 100%;
  315. background: rgba(0, 0, 0, 0);
  316. z-index: 95;
  317. transition: .3s;
  318. .cate-content {
  319. width: 630upx;
  320. height: 100%;
  321. background: #fff;
  322. float: right;
  323. transform: translateX(100%);
  324. transition: .3s;
  325. }
  326. &.none {
  327. display: none;
  328. }
  329. &.show {
  330. background: rgba(0, 0, 0, .4);
  331. .cate-content {
  332. transform: translateX(0);
  333. }
  334. }
  335. }
  336. .cate-list {
  337. display: flex;
  338. flex-direction: column;
  339. height: 100%;
  340. .cate-item {
  341. display: flex;
  342. align-items: center;
  343. height: 90upx;
  344. padding-left: 30upx;
  345. font-size: 28upx;
  346. color: #555;
  347. position: relative;
  348. }
  349. .two {
  350. height: 64upx;
  351. color: #303133;
  352. font-size: 30upx;
  353. background: #f8f8f8;
  354. }
  355. .active {
  356. color: $base-color;
  357. }
  358. }
  359. /* 销售信息 */
  360. .introduce-section {
  361. background: #fff;
  362. padding: 20upx 30upx;
  363. padding-bottom: 100upx;
  364. .guess-item {
  365. padding-bottom: 20upx;
  366. border-bottom: 1px solid #ccc;
  367. }
  368. .title {
  369. font-size: 13upx;
  370. color: $font-color-dark;
  371. font-weight: bold;
  372. height: 100upx;
  373. line-height: 50upx;
  374. flex: 2.5;
  375. margin-left: -4px;
  376. padding: 0px 24px;
  377. }
  378. .title-tip {
  379. flex: 1;
  380. -webkit-tap-highlight-color:transparent;
  381. }
  382. .price-box {
  383. display: flex;
  384. align-items: baseline;
  385. height: 57px;
  386. padding: 5px 0;
  387. font-size: 13px;
  388. color: #fa436a;
  389. }
  390. .price {
  391. font-size: 15px;
  392. }
  393. .m-price {
  394. margin: 0 12upx;
  395. color: $font-color-light;
  396. text-decoration: line-through;
  397. }
  398. .coupon-tip {
  399. align-items: center;
  400. padding: 4upx 10upx;
  401. background: $uni-color-primary;
  402. font-size: $font-sm;
  403. color: #fff;
  404. border-radius: 6upx;
  405. line-height: 1;
  406. transform: translateY(-4upx);
  407. }
  408. .bot-row {
  409. display: flex;
  410. align-items: center;
  411. height: 50upx;
  412. font-size: $font-sm;
  413. color: $font-color-light;
  414. view {
  415. flex: 1;
  416. }
  417. }
  418. }
  419. .titles {
  420. display: -webkit-inline-box;
  421. }
  422. .titleds_aa {
  423. float: right;
  424. }
  425. </style>