my_task.vue 8.9 KB

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