orderDetail.vue 9.0 KB

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