orderDetail.vue 9.0 KB

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