sparepartDetail.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <template>
  2. <view>
  3. <uni-nav-bar
  4. fixed="true"
  5. statusBar="true"
  6. left-icon="back"
  7. title="申请备品备件"
  8. @clickLeft="back"
  9. >
  10. <view class="nav-right" slot="right">
  11. <view class="text-box" @click="$refs.sparepartRef.open()">
  12. 明细清单
  13. </view>
  14. </view>
  15. </uni-nav-bar>
  16. <view class="sparepart-container">
  17. <view class="infos">
  18. <view class="col">
  19. <text class="label">申领单号</text>
  20. <text class="content">{{ infoData.applyOrder }}</text>
  21. </view>
  22. <view class="col">
  23. <text class="label">申请时间</text>
  24. <text class="content">{{ infoData.createTime }}</text>
  25. </view>
  26. <view class="col">
  27. <text class="label">期望完成时间</text>
  28. <text class="content">{{ infoData.expectedPerformanceTime }}</text>
  29. </view>
  30. <view class="col">
  31. <text class="label">出库单号</text>
  32. <text class="content">{{ infoData.stockOut }}</text>
  33. </view>
  34. </view>
  35. <view class="kd-step">
  36. <view
  37. class="kd-step-item"
  38. v-for="(item, index) in infoData.partApplyLogList"
  39. :key="item.id"
  40. >
  41. <view class="title">
  42. {{ item.type }} <text class="time">{{ item.createTime }}</text>
  43. </view>
  44. <view class="content">
  45. <view class="desc">
  46. <text>审核人:{{ item.content.auditName }}</text>
  47. <text>审核结果:{{ item.content.auditResult }}</text>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <SparepartDetail
  54. ref="sparepartRef"
  55. :list="infoData.stockOutApplyDetailList"
  56. />
  57. </view>
  58. </template>
  59. <script>
  60. import { get, postJ, post } from '@/utils/api.js'
  61. import SparepartDetail from '@/components/sparepart/detail.vue'
  62. import dayjs from 'dayjs'
  63. let [page, size, isEnd] = [1, 10, true]
  64. export default {
  65. components: { SparepartDetail },
  66. filters: {
  67. timeFilter (inp) {
  68. return inp && dayjs(inp).format('YYYY-MM-DD HH:mm')
  69. }
  70. },
  71. data () {
  72. return {
  73. visible: false,
  74. timeShow: false,
  75. time: '',
  76. registerObj: [''],
  77. infoData: {
  78. partApplyLogList: [],
  79. stockOutApplyDetailList: []
  80. },
  81. pageId: '',
  82. pickerDeptShow: false,
  83. list: [],
  84. treeList: [],
  85. classificationId: '',
  86. list2: [
  87. {
  88. title: '买家下单',
  89. desc: '2018-11-11'
  90. },
  91. {
  92. title: '卖家发货',
  93. desc: '2018-11-12'
  94. },
  95. {
  96. title: '买家签收',
  97. desc: '2018-11-13'
  98. },
  99. {
  100. title: '交易完成',
  101. desc: '2018-11-14'
  102. }
  103. ],
  104. active: 1
  105. }
  106. },
  107. onShow () {
  108. // this.getTreeList()
  109. },
  110. onLoad (options) {
  111. this.getInfo(options.applyOrder)
  112. },
  113. onReachBottom: function () {
  114. if (isEnd) {
  115. return
  116. }
  117. // 显示加载图标
  118. uni.showLoading({
  119. title: '数据加载中'
  120. })
  121. this.getMoreLists()
  122. },
  123. methods: {
  124. open (...args) {
  125. console.log(args)
  126. },
  127. getTreeList () {
  128. postJ(this.apiUrl + '/classificationTree/list', [4]).then(res => {
  129. // console.log(res)
  130. if (res.success) {
  131. this.treeList = res.data
  132. this.pickerDeptShow = true
  133. this.$refs.pickerDeptName.show()
  134. }
  135. })
  136. },
  137. getInfo (applyOrder) {
  138. post(this.apiUrl + '/stockOutApply/getdetails', { applyOrder }).then(
  139. res => {
  140. if (res.success) {
  141. this.infoData = res.data
  142. }
  143. }
  144. )
  145. }
  146. }
  147. }
  148. </script>
  149. <style lang="scss" scoped>
  150. /deep/.uni-data-tree-input {
  151. display: none;
  152. }
  153. .no_data {
  154. position: fixed;
  155. top: 50%;
  156. left: 50%;
  157. transform: translate(-50%, -50%);
  158. .center {
  159. text-align: center;
  160. color: #555;
  161. font-size: $uni-font-size-base;
  162. }
  163. }
  164. .footer {
  165. position: fixed;
  166. display: flex;
  167. justify-content: space-between;
  168. align-items: center;
  169. bottom: 0;
  170. width: 100%;
  171. height: 90rpx;
  172. text-align: center;
  173. border-top: 1rpx solid #eeecec;
  174. background-color: #ffffff;
  175. .bottom {
  176. font-size: $uni-font-size-lg;
  177. margin-left: 20rpx;
  178. .select-all {
  179. color: $j-primary-green;
  180. }
  181. }
  182. .footer-span-btn {
  183. height: 30rpx;
  184. line-height: 30rpx;
  185. font-size: $uni-font-size-lg;
  186. color: #ffffff;
  187. margin-right: 20rpx;
  188. padding: 10rpx 20rpx;
  189. text-align: center;
  190. background-color: $j-primary-green;
  191. border-radius: 40rpx;
  192. }
  193. }
  194. .footer-right {
  195. justify-content: flex-end;
  196. }
  197. .sparepart-container {
  198. padding: 40rpx 50rpx;
  199. .infos {
  200. border: 1rpx solid rgba(242, 242, 242, 1);
  201. margin-bottom: 40rpx;
  202. .col {
  203. height: 60rpx;
  204. line-height: 60rpx;
  205. display: flex;
  206. align-items: stretch;
  207. // &+.col{
  208. // margin-top: 4rpx;
  209. // }
  210. .label {
  211. display: inline-block;
  212. width: 200rpx;
  213. padding-right: 20rpx;
  214. text-align: right;
  215. background-color: rgba(215, 215, 215, 1);
  216. }
  217. .content {
  218. flex: 1;
  219. padding-left: 8rpx;
  220. border-bottom: 1rpx solid rgba(215, 215, 215, 1);
  221. border-right: 1rpx solid rgba(215, 215, 215, 1);
  222. }
  223. &:first-of-type .content {
  224. border: 1rpx solid rgba(215, 215, 215, 1);
  225. }
  226. &:last-of-type {
  227. margin-top: 12rpx;
  228. .content {
  229. border: 1rpx solid rgba(215, 215, 215, 1);
  230. }
  231. }
  232. }
  233. }
  234. .detail-title {
  235. font-size: 28rpx;
  236. padding: 20rpx 0;
  237. margin-top: 10rpx;
  238. }
  239. .detail-content {
  240. border: 1rpx solid rgba(242, 242, 242, 1);
  241. min-height: 50vh;
  242. .col {
  243. font-size: 28rpx;
  244. border-bottom: 1rpx solid rgba(242, 242, 242, 1);
  245. display: flex;
  246. padding: 10rpx;
  247. align-items: center;
  248. justify-content: space-between;
  249. background-color: rgba(242, 242, 242, 0.372549019607843);
  250. }
  251. .plus {
  252. width: 40rpx;
  253. height: 40rpx;
  254. line-height: 38rpx;
  255. text-align: center;
  256. background-color: $j-primary-border-green;
  257. color: #fff;
  258. margin: 16rpx 0 0 16rpx;
  259. }
  260. }
  261. /deep/.u-number-box {
  262. .u-number-box__minus,
  263. .u-number-box__plus,
  264. .u-number-box__input {
  265. font-size: 30rpx;
  266. height: 1.6em !important;
  267. }
  268. .u-number-box__input {
  269. width: 2em !important;
  270. }
  271. .u-number-box__minus,
  272. .u-number-box__plus {
  273. background-color: $j-primary-border-green !important;
  274. .u-icon__icon {
  275. color: #fff !important;
  276. }
  277. }
  278. }
  279. }
  280. .kd-step {
  281. .kd-step-item {
  282. padding-left: 30rpx;
  283. position: relative;
  284. padding-bottom: 60rpx;
  285. color: #d7d7d7;
  286. &::before {
  287. content: '';
  288. position: absolute;
  289. top: 28rpx;
  290. bottom: -10rpx;
  291. left: 0;
  292. transform: translateX(-50%);
  293. border: 1rpx dashed #d7d7d7;
  294. }
  295. &::after {
  296. content: '';
  297. position: absolute;
  298. top: 10rpx;
  299. left: 0;
  300. transform: translateX(-50%);
  301. width: 16rpx;
  302. height: 16rpx;
  303. border-radius: 16rpx;
  304. border: 1rpx dashed #d7d7d7;
  305. }
  306. &.active {
  307. &::after {
  308. background: $j-primary-border-green;
  309. }
  310. }
  311. &:last-of-type {
  312. color: #333;
  313. &::before {
  314. display: none;
  315. }
  316. &::after {
  317. background: $j-primary-border-green;
  318. border: 1rpx dashed $j-primary-border-green;
  319. }
  320. }
  321. .title {
  322. font-weight: bold;
  323. font-size: 28rpx;
  324. margin-bottom: 8rpx;
  325. display: flex;
  326. justify-content: space-between;
  327. text {
  328. font-weight: normal;
  329. }
  330. }
  331. .desc {
  332. background-color: #f2f2f2;
  333. height: 60rpx;
  334. display: flex;
  335. justify-content: space-between;
  336. align-items: center;
  337. font-size: 28rpx;
  338. padding: 0 20rpx;
  339. }
  340. }
  341. }
  342. </style>