orderPartDetail.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <template>
  2. <view class="orderpartDetail">
  3. <!-- 头部车辆信息 -->
  4. <div class="flex align-center cpb_header" v-if="info">
  5. <div>
  6. <u-image :src="info.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
  7. </div>
  8. <div>
  9. <div class="flex align-center" v-if="info.vehicleNumber">
  10. <carNo color="#0055ff" :val="info.vehicleNumber"></carNo>
  11. </div>
  12. <div class="flex align-center">
  13. <div class="carTits ellipsis-two">
  14. {{info.vehicleModel}}{{info.vehicleModel}}
  15. </div>
  16. </div>
  17. <div class="flex align-center">
  18. <div>VIN码:{{info.vin||'暂无'}}</div>
  19. <div v-if="info.vin" class="copyText" @click="copyVin(info.vin)"><span>复制</span></div>
  20. </div>
  21. </div>
  22. </div>
  23. <view class="info partList" v-if="list.length">
  24. <view class="infoList">
  25. <view class="title">配件列表</view>
  26. <view>
  27. {{list.length}}款,共<text class="redText">{{totalNums}}</text>件
  28. </view>
  29. </view>
  30. <view v-for="item in list" :key="item.id" class="flex align-center item-list">
  31. <view>
  32. <u-image :src="item.images" border-radius="16" width="130" height="130" bg-color="#EBEBEB" ></u-image>
  33. </view>
  34. <view>
  35. <view class="item-name">
  36. <text>{{item.productName}}</text>
  37. </view>
  38. <view class="item-nums">
  39. <text>{{item.productCode}}</text>
  40. </view>
  41. <view class="item-head">
  42. <view class="price">¥{{item.salePrice}}</view>
  43. <text class="nums">x {{item.totalQty}}</text>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="info" v-if="info">
  49. <view class="infoList">
  50. <view class="title">单据信息</view>
  51. <view class="statu"></view>
  52. </view>
  53. <view class="infoList dju">
  54. <text>订单编号</text>
  55. <text>{{info.shelfOrderNo||'--'}}</text>
  56. </view>
  57. <view class="infoList">
  58. <text>下单时间</text>
  59. <text>{{info.shelfOrderDate||'--'}}</text>
  60. </view>
  61. <view class="infoList">
  62. <text>下单人员</text>
  63. <text>{{info.orderPersonName||'--'}}</text>
  64. </view>
  65. </view>
  66. <view class="info">
  67. <view class="infoList">
  68. <text>出库时间</text>
  69. <text>{{info.outDate||'--'}}</text>
  70. </view>
  71. <view class="infoList">
  72. <text>出库人员</text>
  73. <text>{{info.outPersonName||'--'}}</text>
  74. </view>
  75. <view class="infoList">
  76. <text>支付时间</text>
  77. <text>{{info.payDate||'--'}}</text>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. import carNo from '@/components/carNo.vue'
  84. import {findBySnShelfOrder} from '@/api/shelf.js'
  85. export default {
  86. components: {carNo},
  87. data() {
  88. return {
  89. info: null,
  90. list: [],
  91. }
  92. },
  93. computed: {
  94. totalNums(){
  95. let ret = 0
  96. this.list.map(item => {
  97. ret += item.totalQty
  98. })
  99. return ret
  100. }
  101. },
  102. onLoad() {
  103. this.info = this.$store.state.vuex_settleOrderDetail
  104. this.getDetail()
  105. },
  106. methods: {
  107. // 复制
  108. copyVin(vin){
  109. uni.setClipboardData({
  110. data: vin||'',
  111. })
  112. },
  113. // 获取详情
  114. getDetail(){
  115. console.log(this.info.shelfOrderSn)
  116. findBySnShelfOrder({sn: this.info.shelfOrderSn}).then(res => {
  117. console.log(res,'++++++++')
  118. if(res.status == 200){
  119. this.list = res.data.shelfOrderDetailList || []
  120. }
  121. })
  122. },
  123. },
  124. }
  125. </script>
  126. <style lang="less">
  127. .orderpartDetail{
  128. .cpb_header{
  129. background-color: #FFFFFF;
  130. padding: 30rpx 15rpx;
  131. > div{
  132. padding: 0 10rpx;
  133. align-items: center;
  134. &:first-child{
  135. padding-right: 10rpx;
  136. }
  137. > div{
  138. &:first-child{
  139. padding-right: 20rpx;
  140. flex-grow: 1;
  141. color: #818b94;
  142. font-size: 24rpx;
  143. }
  144. }
  145. }
  146. .copyText{
  147. background-color: #EBEBEB;
  148. border-radius: 100rpx;
  149. padding: 0 20rpx;
  150. color: #033692;
  151. font-size: 20rpx;
  152. display: flex;
  153. align-items: center;
  154. justify-content: center;
  155. margin-left: 20rpx;
  156. }
  157. .carTits{
  158. font-size: 32rpx;
  159. font-weight: bold;
  160. color: #222222;
  161. line-height: normal;
  162. margin-bottom: 10rpx;
  163. flex-grow: 1;
  164. }
  165. .qhbtns{
  166. display: flex;
  167. align-items: center;
  168. justify-content: center;
  169. font-size: 20rpx;
  170. color: #0485F6;
  171. border:2rpx solid #0485F6;
  172. border-radius: 50rpx;
  173. background: rgba(88, 177, 255, 0.2);
  174. width: 200rpx;
  175. height: 36rpx;
  176. margin-left: 10rpx;
  177. }
  178. }
  179. .info{
  180. background-color: #FFFFFF;
  181. padding: 10rpx 30upx;
  182. font-size: 32rpx;
  183. margin-top: 20rpx;
  184. .infoList{
  185. display: flex;
  186. justify-content: space-between;
  187. align-items: center;
  188. padding: 22rpx 0;
  189. border-bottom: 2rpx solid #f2f2f2;
  190. &:last-child{border: none;}
  191. .title{
  192. font-weight: bold;
  193. }
  194. > text{
  195. &:first-child{
  196. color: #666E75;
  197. }
  198. }
  199. }
  200. .redText{
  201. color: #FB1E1E;
  202. }
  203. .item-list{
  204. border-bottom: 2rpx solid #f2f2f2;
  205. &:last-child{
  206. border: none;
  207. }
  208. > view{
  209. padding: 20rpx 0;
  210. &:first-child{
  211. margin-right: 20rpx;
  212. margin-top: 18rpx;
  213. }
  214. &:last-child{
  215. flex-grow: 1;
  216. }
  217. }
  218. .item-name{
  219. word-wrap: break-word;
  220. font-size: 32rpx;
  221. color: #333;
  222. margin-top: 10rpx;
  223. }
  224. .item-nums{
  225. padding: 10rpx 0;
  226. text{
  227. font-size: 32rpx;
  228. color: #222222;
  229. }
  230. }
  231. .item-head{
  232. display: flex;
  233. align-items: center;
  234. justify-content: space-between;
  235. color: #666;
  236. .price{
  237. color: #FB1E1E;
  238. font-size: 32rpx;
  239. }
  240. }
  241. }
  242. }
  243. }
  244. </style>