my_task.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  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='statusFlag==1?"active":""'>未完成</view>
  11. <view @click='tabcarchange(3)' class='line' :class='statusFlag==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. current: 1,
  45. warehouseInOutInfo: {
  46. pageSize: 10,
  47. currentPage: 1
  48. }
  49. };
  50. },
  51. onLoad(options) {
  52. this.getIndexBuyData();
  53. this.getIndexBuyData()
  54. },
  55. methods: {
  56. getIndexBuyData() {
  57. console.log(11111)
  58. const that = this
  59. var pages = that.pages
  60. var limit = that.limit
  61. console.log(2112454)
  62. this.warehouseInOutInfo.statusFlag = this.statusFlag
  63. //this.warehouseInOutInfo.status = this.status
  64. this.$api.doRequest('get', '/warehouseInOutInfo/selectInfo', this.warehouseInOutInfo).then(res => {
  65. console.log(res, "对象")
  66. if (res.data.code == 200) {
  67. let data = res.data.data.records
  68. console.log(data, "13246")
  69. //采购信息
  70. if (data.length > 0) {
  71. that.taskInfo = that.taskInfo.concat(data)
  72. that.isLoadMore = false
  73. } else {
  74. if (that.pages > 1) {
  75. that.pages -= 1
  76. }
  77. that.isLoadMore = true
  78. that.loadStatus = 'nomore'
  79. }
  80. uni.hideLoading()
  81. this.taskInfo = res.data.data.records
  82. } else {
  83. uni.showToast({
  84. title: res.data.message,
  85. icon: 'none',
  86. duration: 2000
  87. })
  88. }
  89. }).catch(res => {
  90. uni.showToast({
  91. title: res.data.message,
  92. icon: 'none',
  93. duration: 2000
  94. })
  95. })
  96. },
  97. tabcarchange(statusFlag) {
  98. this.statusFlag = statusFlag
  99. this.pageSize = 1
  100. this.getIndexBuyData()
  101. },
  102. navToDetailPage(item) {
  103. if(item.statusFlag == 3){
  104. uni.navigateTo({
  105. url: `/pageD/warehousings/warehousingDetails?id=${item.id}`
  106. })
  107. }else{
  108. uni.navigateTo({
  109. url: `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}`
  110. })
  111. }
  112. }
  113. }
  114. }
  115. </script>
  116. <style lang="scss" scoped>
  117. page,
  118. .content {
  119. background: #F5F6FA;
  120. }
  121. .line {
  122. display: inline-block;
  123. padding: 5px;
  124. position: relative;
  125. font-size: 17px;
  126. width: 187px;
  127. padding-left: 68px;
  128. }
  129. .line.active {
  130. font-size: 19px;
  131. font-weight: 900;
  132. }
  133. .line.active:after {
  134. content: '';
  135. display: block;
  136. position: absolute;
  137. width: 18px;
  138. left: 50%;
  139. transform: translateX(-50%);
  140. bottom: 0;
  141. border-bottom: 1px solid #22C572;
  142. }
  143. .cu-tag.badge {
  144. right: 26rpx;
  145. }
  146. .cu-item {
  147. height: 80rpx;
  148. display: inline-block;
  149. line-height: 80rpx;
  150. }
  151. .search-form {
  152. background: #fff;
  153. box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  154. }
  155. .title-tip {
  156. color: #00aa00;
  157. text-align: center;
  158. font-size: 7px;
  159. }
  160. .tag-bule {
  161. background: #a8e4a5;
  162. color: #000000;
  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. .view-item {
  218. width: 100%;
  219. // line-height: 40upx;
  220. padding-top: 10upx;
  221. }
  222. .confirm-btn {
  223. margin-left: 20%;
  224. }
  225. .date-time {
  226. margin-left: 30%;
  227. }
  228. .padding-xs-tmp {
  229. padding: 15upx 10upx 10upx 10upx;
  230. }
  231. }
  232. .navbar {
  233. position: fixed;
  234. left: 0;
  235. top: var(--window-top);
  236. display: flex;
  237. width: 100%;
  238. height: 80upx;
  239. background: #fff;
  240. box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
  241. z-index: 10;
  242. .nav-item {
  243. flex: 1;
  244. display: flex;
  245. justify-content: center;
  246. align-items: center;
  247. height: 100%;
  248. font-size: 30upx;
  249. color: $font-color-dark;
  250. position: relative;
  251. &.current {
  252. color: $base-color;
  253. &:after {
  254. content: '';
  255. position: absolute;
  256. left: 50%;
  257. bottom: 0;
  258. transform: translateX(-50%);
  259. width: 120upx;
  260. height: 0;
  261. border-bottom: 4upx solid $base-color;
  262. }
  263. }
  264. }
  265. .p-box {
  266. display: flex;
  267. flex-direction: column;
  268. .yticon {
  269. display: flex;
  270. align-items: center;
  271. justify-content: center;
  272. width: 30upx;
  273. height: 14upx;
  274. line-height: 1;
  275. margin-left: 4upx;
  276. font-size: 26upx;
  277. color: #888;
  278. &.active {
  279. color: $base-color;
  280. }
  281. }
  282. .xia {
  283. transform: scaleY(-1);
  284. }
  285. }
  286. .cate-item {
  287. display: flex;
  288. justify-content: center;
  289. align-items: center;
  290. height: 100%;
  291. width: 80upx;
  292. position: relative;
  293. font-size: 44upx;
  294. &:after {
  295. content: '';
  296. position: absolute;
  297. left: 0;
  298. top: 50%;
  299. transform: translateY(-50%);
  300. border-left: 1px solid #ddd;
  301. width: 0;
  302. height: 36upx;
  303. }
  304. }
  305. }
  306. /* 分类 */
  307. .cate-mask {
  308. position: fixed;
  309. left: 0;
  310. top: var(--window-top);
  311. bottom: 0;
  312. width: 100%;
  313. background: rgba(0, 0, 0, 0);
  314. z-index: 95;
  315. transition: .3s;
  316. .cate-content {
  317. width: 630upx;
  318. height: 100%;
  319. background: #fff;
  320. float: right;
  321. transform: translateX(100%);
  322. transition: .3s;
  323. }
  324. &.none {
  325. display: none;
  326. }
  327. &.show {
  328. background: rgba(0, 0, 0, .4);
  329. .cate-content {
  330. transform: translateX(0);
  331. }
  332. }
  333. }
  334. .cate-list {
  335. display: flex;
  336. flex-direction: column;
  337. height: 100%;
  338. .cate-item {
  339. display: flex;
  340. align-items: center;
  341. height: 90upx;
  342. padding-left: 30upx;
  343. font-size: 28upx;
  344. color: #555;
  345. position: relative;
  346. }
  347. .two {
  348. height: 64upx;
  349. color: #303133;
  350. font-size: 30upx;
  351. background: #f8f8f8;
  352. }
  353. .active {
  354. color: $base-color;
  355. }
  356. }
  357. /* 销售信息 */
  358. .introduce-section {
  359. background: #fff;
  360. padding: 20upx 30upx;
  361. padding-bottom: 100upx;
  362. .guess-item {
  363. padding-bottom: 20upx;
  364. border-bottom: 1px solid #ccc;
  365. }
  366. .title {
  367. font-size: 13upx;
  368. color: $font-color-dark;
  369. font-weight: bold;
  370. height: 100upx;
  371. line-height: 50upx;
  372. flex: 2.5;
  373. margin-left: -4px;
  374. padding: 0px 24px;
  375. }
  376. .title-tip {
  377. flex: 1;
  378. -webkit-tap-highlight-color:transparent;
  379. }
  380. .price-box {
  381. display: flex;
  382. align-items: baseline;
  383. height: 57px;
  384. padding: 5px 0;
  385. font-size: 13px;
  386. color: #fa436a;
  387. }
  388. .price {
  389. font-size: 15px;
  390. }
  391. .m-price {
  392. margin: 0 12upx;
  393. color: $font-color-light;
  394. text-decoration: line-through;
  395. }
  396. .coupon-tip {
  397. align-items: center;
  398. padding: 4upx 10upx;
  399. background: $uni-color-primary;
  400. font-size: $font-sm;
  401. color: #fff;
  402. border-radius: 6upx;
  403. line-height: 1;
  404. transform: translateY(-4upx);
  405. }
  406. .bot-row {
  407. display: flex;
  408. align-items: center;
  409. height: 50upx;
  410. font-size: $font-sm;
  411. color: $font-color-light;
  412. view {
  413. flex: 1;
  414. }
  415. }
  416. }
  417. .titles {
  418. display: -webkit-inline-box;
  419. }
  420. .titleds_aa {
  421. float: right;
  422. }
  423. </style>