orderDetail.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <template>
  2. <view class="orderDetail-digitalShel flex flex_column">
  3. <view class="contHead">
  4. <view class="statusH">
  5. <view class="flex flex_column align_center">
  6. <view class="status-row">
  7. <u-icon :name="statusIcon" size="42" color="#333">
  8. </u-icon>
  9. <text>{{statusText}}</text>
  10. </view>
  11. <view class="messageText">{{statusMessage}}</view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="order-body">
  16. <!-- 头部车辆信息 -->
  17. <div class="flex align-center cpb_header" v-if="info">
  18. <div>
  19. <u-image :src="info.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
  20. </div>
  21. <div class="flex flex_column justify_center align_start">
  22. <view class="carModel flex align-center" v-if="info.vehicleNumber" >
  23. <view><carNo color="#0055ff" :val="info.vehicleNumber"></carNo></view>
  24. <text style="margin-left: 20rpx;" v-if="info.vehicleModel">{{info.vehicleModel.split(' ')[0]}}</text>
  25. </view>
  26. <view class="carModel flex align-center" v-if="!info.vehicleNumber" >
  27. <text>{{info.vehicleModel}}</text>
  28. </view>
  29. <div class="flex align-center">
  30. <div>VIN码:{{info.vin||'暂无'}}</div>
  31. <div v-if="info.vin" class="copyText" @click="copyVin"><span>复制</span></div>
  32. </div>
  33. </div>
  34. </div>
  35. <view class="info partList" v-if="partList.length">
  36. <view class="infoList">
  37. <view class="title">配件列表</view>
  38. <view>
  39. {{partList.length}}款,共<text class="redText">{{totalNums}}</text>件
  40. </view>
  41. </view>
  42. <view v-for="item in partList" :key="item.productSn" class="flex align-center item-list">
  43. <view>
  44. <u-image :src="item.images" border-radius="16" width="130" height="130" bg-color="#EBEBEB" ></u-image>
  45. </view>
  46. <view>
  47. <view class="item-name">
  48. <text>{{item.productName}}</text>
  49. </view>
  50. <view class="item-head">
  51. <text>{{item.productCode}}</text>
  52. <view>
  53. 数量:<text class="redText">{{item.qty}}</text>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view class="info" v-if="info">
  60. <view class="infoList">
  61. <view class="title">单据信息</view>
  62. <view class="statu"></view>
  63. </view>
  64. <view class="infoList dju">
  65. <text>订单编号</text>
  66. <text>{{info.tempNo||'--'}}</text>
  67. </view>
  68. <view class="infoList">
  69. <text>下单时间</text>
  70. <text>{{info.tempDate||'--'}}</text>
  71. </view>
  72. <view class="infoList">
  73. <text>下单人员</text>
  74. <text>{{info.personName || '--'}}</text>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. import carNo from '@/components/carNo.vue'
  82. import uniIcons from "@/components/uni-icons/uni-icons.vue"
  83. import moment from 'moment'
  84. import { getShelfTempBillDetail } from '@/api/shelf.js'
  85. export default {
  86. name: 'orderDetail-digitalShel',
  87. components: {
  88. uniIcons,
  89. carNo
  90. },
  91. data() {
  92. return {
  93. info: null,
  94. statusText: '',
  95. statusIcon: '', // 结算状态icon
  96. statusMessage: '',
  97. partList: [], // 配件列表
  98. shelfOrderSn: null
  99. }
  100. },
  101. onReady() {
  102. },
  103. onLoad(option) {
  104. this.shelfOrderSn = option.orderSn
  105. },
  106. onShow() {
  107. this.getDetail()
  108. },
  109. computed: {
  110. totalNums(){
  111. let ret = 0
  112. this.partList.map(item => {
  113. ret += item.qty
  114. })
  115. return ret
  116. }
  117. },
  118. methods: {
  119. // 复制
  120. copyVin(){
  121. uni.setClipboardData({
  122. data: this.info.vin||'',
  123. })
  124. },
  125. message(title){
  126. uni.showToast({
  127. icon:'none',
  128. title: title
  129. })
  130. },
  131. // 打开扫描取货
  132. sanCodeRow () {
  133. uni.navigateTo({
  134. url:"/pages/digitalShelf/scanBarcode/scanBarcode?shelfOrderSn="+this.shelfOrderSn
  135. })
  136. },
  137. // 获取详情
  138. getDetail(){
  139. getShelfTempBillDetail({sn: this.shelfOrderSn}).then(res => {
  140. console.log(res,'++++++++')
  141. if(res.status == 200){
  142. this.info = res.data
  143. this.partList = res.data.detailList || []
  144. if(this.info.billState == 'WAIT_AUDIT'){
  145. this.statusText = '待审核'
  146. this.statusIcon = 'hourglass-half-fill'
  147. this.statusMessage = ''
  148. }
  149. if(this.info.billState == 'AUDIT_REJECT'){
  150. this.statusText = '审核不通过'
  151. this.statusIcon = 'close-circle'
  152. this.statusMessage = ''
  153. }
  154. if(this.info.billState == 'WAIT_OUT_WAREHOUSE'){
  155. this.statusText = '待收货'
  156. this.statusIcon = 'hourglass-half-fill'
  157. this.statusMessage = ''
  158. }
  159. if(this.info.billState == 'FINISH'){
  160. this.statusText = '已完结'
  161. this.statusIcon = 'checkmark-circle'
  162. this.statusMessage = ''
  163. }
  164. }
  165. })
  166. },
  167. }
  168. }
  169. </script>
  170. <style lang="less">
  171. page{
  172. height: 100%;
  173. }
  174. .orderDetail-digitalShel{
  175. height: 100%;
  176. .redText{
  177. color: #FB1E1E;
  178. }
  179. .order-body{
  180. flex-grow: 1;
  181. overflow: auto;
  182. .cpb_header{
  183. margin-top: 20rpx;
  184. background-color: #FFFFFF;
  185. padding: 30rpx 15rpx;
  186. > div{
  187. padding: 0 10rpx;
  188. &:first-child{
  189. padding-right: 10rpx;
  190. align-items: center;
  191. }
  192. > div{
  193. &:first-child{
  194. padding-right: 20rpx;
  195. flex-grow: 1;
  196. color: #818b94;
  197. font-size: 24rpx;
  198. }
  199. }
  200. }
  201. .copyText{
  202. background-color: #EBEBEB;
  203. border-radius: 100rpx;
  204. padding: 0 20rpx;
  205. color: #033692;
  206. font-size: 20rpx;
  207. display: flex;
  208. align-items: center;
  209. justify-content: center;
  210. margin-left: 20rpx;
  211. }
  212. .carTits{
  213. font-size: 32rpx;
  214. font-weight: bold;
  215. color: #222222;
  216. line-height: normal;
  217. margin-bottom: 10rpx;
  218. flex-grow: 1;
  219. }
  220. .qhbtns{
  221. display: flex;
  222. align-items: center;
  223. justify-content: center;
  224. font-size: 20rpx;
  225. color: #0485F6;
  226. border:2rpx solid #0485F6;
  227. border-radius: 50rpx;
  228. background: rgba(88, 177, 255, 0.2);
  229. width: 200rpx;
  230. height: 36rpx;
  231. margin-left: 10rpx;
  232. }
  233. }
  234. .partList{
  235. margin-top: 20rpx;
  236. }
  237. }
  238. .contHead {
  239. .statusH{
  240. > view{
  241. padding: 10upx 12%;
  242. font-size: 34upx;
  243. }
  244. .status-row{
  245. font-size: 42upx;
  246. text{
  247. margin-left: 10rpx;
  248. }
  249. }
  250. .messageText{
  251. font-size: 30upx;
  252. text-align: center;
  253. text{
  254. color: #ffaa00;
  255. }
  256. padding: 10rpx 0;
  257. }
  258. }
  259. .orderTj{
  260. padding: 0 20rpx 20rpx;
  261. background-color: #fff;
  262. > view{
  263. text-align: center;
  264. border-right: 2rpx solid #eee;
  265. width: 50%;
  266. color: #666E75;
  267. .redText{
  268. color: #FB1E1E;
  269. }
  270. &:last-child{
  271. border: 0;
  272. }
  273. > view{
  274. color: #666E75;
  275. &:first-child{
  276. font-size: 56rpx;
  277. }
  278. }
  279. }
  280. border-radius: 20rpx 20rpx 0 0;
  281. }
  282. }
  283. .info{
  284. background-color: #FFFFFF;
  285. padding: 10rpx 30upx;
  286. font-size: 32rpx;
  287. margin-bottom: 20rpx;
  288. .infoList{
  289. display: flex;
  290. justify-content: space-between;
  291. align-items: center;
  292. padding: 20rpx 0;
  293. border-bottom: 2rpx solid #f2f2f2;
  294. &:last-child{
  295. border: none;
  296. }
  297. .title{
  298. font-weight: bold;
  299. }
  300. > text{
  301. &:first-child{
  302. color: #666E75;
  303. }
  304. }
  305. }
  306. .item-list{
  307. border-bottom: 2rpx solid #f2f2f2;
  308. &:last-child{
  309. border: none;
  310. }
  311. > view{
  312. padding: 20rpx 0;
  313. &:first-child{
  314. margin-right: 20rpx;
  315. margin-top: 18rpx;
  316. }
  317. &:last-child{
  318. flex-grow: 1;
  319. }
  320. }
  321. .item-name{
  322. word-wrap: break-word;
  323. font-size: 32rpx;
  324. color: #333;
  325. font-weight: bold;
  326. margin-top: 10rpx;
  327. }
  328. .item-nums{
  329. padding: 10rpx 0;
  330. text{
  331. font-size: 32rpx;
  332. color: #222222;
  333. }
  334. }
  335. .item-head{
  336. display: flex;
  337. align-items: center;
  338. justify-content: space-between;
  339. color: #666;
  340. > view{
  341. &:first-child{
  342. font-size: 28rpx;
  343. text{
  344. margin-right: 30rpx;
  345. }
  346. }
  347. }
  348. .item-no{
  349. font-size: 28rpx;
  350. background: rgba(3, 54, 146, 0.15);
  351. color: #033692;
  352. border-radius: 100rpx;
  353. padding: 2rpx 30rpx;
  354. margin-right: 20rpx;
  355. display: block;
  356. }
  357. }
  358. }
  359. }
  360. .footer{
  361. padding: 20upx 60upx;
  362. background: #FFFFFF;
  363. button{
  364. &:after{
  365. border: 0;
  366. }
  367. color: #585858;
  368. font-size: 32rpx;
  369. margin: 0 20rpx;
  370. width: 320rpx;
  371. }
  372. }
  373. }
  374. </style>