orderPartDetail.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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 clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
  85. import {findBySnShelfOrder} from '@/api/shelf.js'
  86. export default {
  87. components: {carNo},
  88. data() {
  89. return {
  90. info: null,
  91. list: [],
  92. }
  93. },
  94. computed: {
  95. totalNums(){
  96. let ret = 0
  97. this.list.map(item => {
  98. ret += item.totalQty
  99. })
  100. return ret
  101. }
  102. },
  103. onLoad() {
  104. this.info = this.$store.state.vuex_settleOrderDetail
  105. this.getDetail()
  106. },
  107. methods: {
  108. // 复制
  109. copyVin(vin){
  110. clipboard.setText(vin);
  111. uni.showToast({
  112. icon: 'none',
  113. title: 'vin码已复制成功'
  114. })
  115. },
  116. // 获取详情
  117. getDetail(){
  118. console.log(this.info.shelfOrderSn)
  119. findBySnShelfOrder({sn: this.info.shelfOrderSn}).then(res => {
  120. console.log(res,'++++++++')
  121. if(res.status == 200){
  122. this.list = res.data.shelfOrderDetailList || []
  123. }
  124. })
  125. },
  126. },
  127. }
  128. </script>
  129. <style lang="less">
  130. .orderpartDetail{
  131. .cpb_header{
  132. background-color: #FFFFFF;
  133. padding: 30rpx 15rpx;
  134. > div{
  135. padding: 0 10rpx;
  136. align-items: center;
  137. &:first-child{
  138. padding-right: 10rpx;
  139. }
  140. > div{
  141. &:first-child{
  142. padding-right: 20rpx;
  143. flex-grow: 1;
  144. color: #818b94;
  145. font-size: 24rpx;
  146. }
  147. }
  148. }
  149. .copyText{
  150. background-color: #EBEBEB;
  151. border-radius: 100rpx;
  152. padding: 0 20rpx;
  153. color: #033692;
  154. font-size: 20rpx;
  155. display: flex;
  156. align-items: center;
  157. justify-content: center;
  158. margin-left: 20rpx;
  159. }
  160. .carTits{
  161. font-size: 32rpx;
  162. font-weight: bold;
  163. color: #222222;
  164. line-height: normal;
  165. margin-bottom: 10rpx;
  166. flex-grow: 1;
  167. }
  168. .qhbtns{
  169. display: flex;
  170. align-items: center;
  171. justify-content: center;
  172. font-size: 20rpx;
  173. color: #0485F6;
  174. border:2rpx solid #0485F6;
  175. border-radius: 50rpx;
  176. background: rgba(88, 177, 255, 0.2);
  177. width: 200rpx;
  178. height: 36rpx;
  179. margin-left: 10rpx;
  180. }
  181. }
  182. .info{
  183. background-color: #FFFFFF;
  184. padding: 10rpx 30upx;
  185. font-size: 32rpx;
  186. margin-top: 20rpx;
  187. .infoList{
  188. display: flex;
  189. justify-content: space-between;
  190. align-items: center;
  191. padding: 22rpx 0;
  192. border-bottom: 2rpx solid #f2f2f2;
  193. &:last-child{border: none;}
  194. .title{
  195. font-weight: bold;
  196. }
  197. > text{
  198. &:first-child{
  199. color: #666E75;
  200. }
  201. }
  202. }
  203. .redText{
  204. color: #FB1E1E;
  205. }
  206. .item-list{
  207. border-bottom: 2rpx solid #f2f2f2;
  208. &:last-child{
  209. border: none;
  210. }
  211. > view{
  212. padding: 20rpx 0;
  213. &:first-child{
  214. margin-right: 20rpx;
  215. margin-top: 18rpx;
  216. }
  217. &:last-child{
  218. flex-grow: 1;
  219. }
  220. }
  221. .item-name{
  222. word-wrap: break-word;
  223. font-size: 32rpx;
  224. color: #333;
  225. margin-top: 10rpx;
  226. }
  227. .item-nums{
  228. padding: 10rpx 0;
  229. text{
  230. font-size: 32rpx;
  231. color: #222222;
  232. }
  233. }
  234. .item-head{
  235. display: flex;
  236. align-items: center;
  237. justify-content: space-between;
  238. color: #666;
  239. .price{
  240. color: #FB1E1E;
  241. font-size: 32rpx;
  242. }
  243. }
  244. }
  245. }
  246. }
  247. </style>