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