procureOrder.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <view class="orderDetail-digitalShel flex flex_column">
  3. <view class="contHead" :style="{background:state!= 'CLOSE' ? '#066cff':'#ff5500',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="#fff">
  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. <view class="info partList" v-if="partList.length">
  17. <view class="infoList">
  18. <view class="title">
  19. <u-icon name="info-circle" color="#ffaa00" size="28"></u-icon><text>请耐心等待汽配经销商进行配送</text>
  20. </view>
  21. <view>
  22. {{partList.length}}款,共<text class="redText">{{totalNums}}</text>件
  23. </view>
  24. </view>
  25. <view v-for="item in partList" :key="item.id" class="flex align-center item-list">
  26. <view style="height: 150rpx;">
  27. <u-image :src="item.product.images" border-radius="16" width="200" height="150" bg-color="#EBEBEB" ></u-image>
  28. <view class="back-price">返<text>¥{{item.giveAmount}}</text></view>
  29. </view>
  30. <view>
  31. <view class="item-name">
  32. <text>{{item.product.productName}}</text>
  33. </view>
  34. <view class="item-nums">
  35. <text>{{item.product.origCode}}</text>
  36. </view>
  37. <view class="item-head">
  38. <view>
  39. 数量:<text class="redText">{{item.qty}}</text>{{item.product&&item.product.unit||''}}
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="info" v-if="info">
  46. <view class="infoList">
  47. <view class="title">单据信息</view>
  48. <view class="statu"></view>
  49. </view>
  50. <view class="infoList dju">
  51. <text>订单号</text>
  52. <text>{{info.purchaseNo||'--'}}</text>
  53. </view>
  54. <view class="infoList">
  55. <text>下单时间</text>
  56. <text>{{info.purchaseDate||'--'}}</text>
  57. </view>
  58. <view class="infoList">
  59. <text>下单人员</text>
  60. <text>{{info.purchaserName || '--'}}</text>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. name: 'procureDetailOrder',
  69. data() {
  70. return {
  71. loading: false,
  72. info: null,
  73. statusText: '',
  74. statusIcon: '', // 结算状态icon
  75. statusMessage: '',
  76. partList: [], // 配件列表
  77. state: 'success'
  78. }
  79. },
  80. onLoad(option) {
  81. const data = this.$store.state.vuex_tempData
  82. if(data){
  83. this.info = data
  84. this.partList = data.detailList
  85. }
  86. uni.setNavigationBarTitle({
  87. title: ''
  88. })
  89. // 更改标题栏背景色
  90. uni.setNavigationBarColor({
  91. frontColor: '#ffffff',
  92. backgroundColor: this.state!= 'error' ? '#066cff':'#ff5500',
  93. })
  94. },
  95. onShow() {
  96. this.statusText = '提交成功'
  97. this.statusIcon = 'checkmark-circle'
  98. },
  99. onUnload() {
  100. this.$store.state.vuex_tempData = null
  101. },
  102. computed: {
  103. totalNums(){
  104. let ret = 0
  105. this.partList.map(item => {
  106. ret += item.qty
  107. })
  108. return ret
  109. }
  110. },
  111. methods: {
  112. message(title){
  113. uni.showToast({
  114. icon:'none',
  115. title: title
  116. })
  117. },
  118. }
  119. }
  120. </script>
  121. <style lang="less">
  122. page{
  123. height: 100%;
  124. }
  125. .orderDetail-digitalShel{
  126. height: 100%;
  127. .redText{
  128. color: #FB1E1E;
  129. }
  130. .order-body{
  131. flex-grow: 1;
  132. overflow: auto;
  133. .partList{
  134. margin-top: 20rpx;
  135. }
  136. }
  137. .contHead {
  138. .statusH{
  139. > view{
  140. padding: 10upx 12%;
  141. font-size: 34upx;
  142. }
  143. .status-row{
  144. font-size: 42upx;
  145. text{
  146. margin-left: 10rpx;
  147. }
  148. }
  149. .messageText{
  150. font-size: 30upx;
  151. text-align: center;
  152. text{
  153. color: #ffaa00;
  154. }
  155. padding: 10rpx 0;
  156. }
  157. }
  158. .orderTj{
  159. padding: 0 20rpx 20rpx;
  160. background-color: #fff;
  161. > view{
  162. text-align: center;
  163. border-right: 2rpx solid #eee;
  164. width: 50%;
  165. color: #666E75;
  166. .redText{
  167. color: #FB1E1E;
  168. }
  169. &:last-child{
  170. border: 0;
  171. }
  172. > view{
  173. color: #666E75;
  174. &:first-child{
  175. font-size: 56rpx;
  176. }
  177. }
  178. }
  179. border-radius: 20rpx 20rpx 0 0;
  180. }
  181. }
  182. .info{
  183. background-color: #FFFFFF;
  184. padding: 10rpx 30upx;
  185. font-size: 32rpx;
  186. margin-bottom: 20rpx;
  187. .infoList{
  188. display: flex;
  189. justify-content: space-between;
  190. align-items: center;
  191. padding: 20rpx 0;
  192. border-bottom: 2rpx solid #f2f2f2;
  193. &:last-child{
  194. border: none;
  195. }
  196. .title{
  197. font-weight: bold;
  198. > text{
  199. color: #ff9808;
  200. font-size: 24upx;
  201. }
  202. }
  203. > text{
  204. &:first-child{
  205. color: #666E75;
  206. }
  207. }
  208. }
  209. .item-list{
  210. border-bottom: 2rpx solid #f2f2f2;
  211. padding: 20rpx 0;
  212. &:last-child{
  213. border: none;
  214. }
  215. > view{
  216. &:first-child{
  217. margin-right: 20rpx;
  218. margin-top: 18rpx;
  219. position: relative;
  220. overflow: hidden;
  221. width: 200rpx;
  222. }
  223. .back-price{
  224. zoom: calc(0.8);
  225. padding: 6rpx 55rpx;
  226. background: rgb(255 87 34 / 0.6);
  227. position: absolute;
  228. top: 16rpx;
  229. left: -50rpx;
  230. color: #fff;
  231. z-index: 2;
  232. font-size: 20rpx;
  233. text-align: center;
  234. transform: rotate(-40deg);
  235. display: flex;
  236. align-items: center;
  237. text{
  238. font-size: 28rpx;
  239. }
  240. }
  241. &:last-child{
  242. flex-grow: 1;
  243. width: 60%;
  244. }
  245. }
  246. .item-name{
  247. word-wrap: break-word;
  248. font-size: 32rpx;
  249. color: #333;
  250. font-weight: bold;
  251. margin-top: 10rpx;
  252. }
  253. .item-nums{
  254. padding: 10rpx 0;
  255. text{
  256. font-size: 32rpx;
  257. color: #222222;
  258. }
  259. }
  260. .item-head{
  261. display: flex;
  262. align-items: center;
  263. justify-content: space-between;
  264. color: #666;
  265. > view{
  266. &:first-child{
  267. font-size: 28rpx;
  268. text{
  269. margin-right: 30rpx;
  270. }
  271. }
  272. }
  273. .item-no{
  274. font-size: 28rpx;
  275. background: rgba(3, 54, 146, 0.15);
  276. color: #033692;
  277. border-radius: 100rpx;
  278. padding: 2rpx 30rpx;
  279. margin-right: 20rpx;
  280. display: block;
  281. }
  282. }
  283. }
  284. }
  285. .footer{
  286. padding: 20upx 60upx;
  287. background: #FFFFFF;
  288. button{
  289. &:after{
  290. border: 0;
  291. }
  292. color: #585858;
  293. font-size: 32rpx;
  294. margin: 0 20rpx;
  295. }
  296. }
  297. }
  298. </style>