arriveInfo.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. <template>
  2. <view class="order-infos">
  3. <!-- #ifdef MP-WEIXIN -->
  4. <view class="topbar"
  5. :style="rect?'height:'+rect.height+'px;line-height:'+rect.height+'px;margin-top:'+rect.top+'px':''">
  6. <!-- #endif -->
  7. <!-- #ifndef MP-WEIXIN -->
  8. <view class="topbar" :style="statusBarHeight?'margin-top:'+statusBarHeight+'px':''">
  9. <!-- #endif -->
  10. <view class="back-icon" :style="rect?'padding:'+(rect.height-24)+'rpx 20rpx':''">
  11. <u-icon name="arrow-left" size="24" color="#ffffff" @click="pageBack"></u-icon>
  12. </view>
  13. 订单详情
  14. </view>
  15. <view class="after">
  16. <view class="order-info-card">
  17. <view class="order-card">
  18. <view class="order-info-title">
  19. <image class="img" src="../../subpages/static/czzn-img/order/orderInfo-tenant.png"
  20. mode="scaleToFill" />
  21. <view class="mid">
  22. <view class="info">
  23. <span class="label">
  24. {{$t('spare.orderCode')}}
  25. </span>
  26. <span class="type" v-if="orderInfo.orderType == '1'">{{ $t('order.temp') }}</span>
  27. <span class="type" v-if="orderInfo.orderType == '2'">{{ $t('order.fixed') }}</span>
  28. <view class="order-type" v-if="orderInfo.isMain==2">
  29. <u-tag :text="$t('order.mainOrder')" type="success"></u-tag>
  30. </view>
  31. </view>
  32. <text class="code">{{ orderInfo.code || '' }}</text>
  33. </view>
  34. <view class="orderStatus-info" v-if="orderInfo.orderType != '4'">
  35. <u--image width="100rpx" height="88rpx" v-if="orderInfo.orderStatus == 0"
  36. src="/subpages/static/czzn-img/state/not-factory.png"></u--image>
  37. <u--image width="100rpx" height="88rpx"
  38. v-if="orderInfo.orderStatus == 1 && orderInfo.weighingStatus == 0"
  39. src="/subpages/static/czzn-img/state/in-factory.png"></u--image>
  40. <u--image width="100rpx" height="88rpx" v-if="orderInfo.orderStatus == 2"
  41. src="/subpages/static/czzn-img/state/completed.png"></u--image>
  42. <u--image width="100rpx" height="88rpx"
  43. v-if="orderInfo.orderStatus == 1 && orderInfo.weighingStatus != 0"
  44. src="/subpages/static/czzn-img/state/weighed.png"></u--image>
  45. <u--image width="100rpx" height="88rpx" v-if="orderInfo.orderStatus == 4"
  46. src="/subpages/static/czzn-img/state/cancellation.png"></u--image>
  47. </view>
  48. <!-- <span class="type" v-if="orderInfo.orderType == '1'">{{ $t('order.temp') }}</span>
  49. <span class="type" v-if="orderInfo.orderType == '2'">{{ $t('order.fixed') }}</span> -->
  50. <view class="orderStatus-info" v-if="orderInfo.orderType == '4'">
  51. <u--image width="100rpx" height="88rpx" v-if="orderInfo.orderStatus == 0"
  52. src="/subpages/static/czzn-img/state/no-take-order.png"></u--image>
  53. <u--image width="100rpx" height="88rpx" v-if="orderInfo.orderStatus == 1"
  54. src="/subpages/static/czzn-img/state/start-take-order.png"></u--image>
  55. <u--image width="100rpx" height="88rpx" v-if="orderInfo.orderStatus == 2"
  56. src="/subpages/static/czzn-img/state/completed.png"></u--image>
  57. <u--image width="100rpx" height="88rpx"
  58. v-if="orderInfo.enabledMarkType == 1 || orderInfo.orderStatus == 4"
  59. src="/subpages/static//czzn-img/state/cancellation.png"></u--image>
  60. </view>
  61. </view>
  62. <view class="order-card-info">
  63. <p class="cell">
  64. <text class="label">{{ $t('order.orderDate') }}</text>
  65. <text class="info">{{ orderInfo.setDate || '' }}</text>
  66. </p>
  67. <!-- <p class="cell">
  68. <text class="label">{{ $t('order.vehicleType') }}</text>
  69. <text class="info"
  70. v-if="orderInfo.vehicleType == '101'">{{ $t('order.saleOrder') }}</text>
  71. <text class="info"
  72. v-if="orderInfo.vehicleType == '102'">{{ $t('order.purchaseOrder') }}</text>
  73. <text class="info"
  74. v-if="orderInfo.vehicleType == '103'">{{ $t('order.materialsOrder') }}</text>
  75. <text class="info"
  76. v-if="orderInfo.vehicleType == '104'">{{ $t('order.transferOrder') }}</text>
  77. </p> -->
  78. <p class="cell">
  79. <text class="label">{{ $t('order.companyName') }}</text>
  80. <text class="info">{{ orderInfo.companyName || '' }}</text>
  81. </p>
  82. <view class="cell">
  83. <text class="label">{{ $t('order.materialName') }}</text>
  84. <text class="info">{{ orderInfo.materialName || '' }}</text>
  85. </view>
  86. <view class="cell">
  87. <text class="label">{{ $t('order.orderNumber') }}</text>
  88. <!-- <text class="info">{{ orderInfo.orderNumber || '0' }}{{orderInfo.orderType ==
  89. '4' ? $t('customer_meter.unitN') : $t('customer_meter.unitT') }}</text> -->
  90. <text class="info"
  91. :style="'font-size: 9pt;font-weight: bold;'+(orderInfo.companyClientType=='109'?'color: green;':'color: red;')">
  92. {{ orderInfo.orderNumber || '0' }}{{ orderInfo.materialKind=='101' && orderInfo.companyClientType=='109'?$t('customer_meter.unitB') :(orderInfo.orderType ==
  93. '4' ? $t('customer_meter.unitN') : $t('customer_meter.unitT')) }}</text>
  94. </view>
  95. <p class="cell">
  96. <text class="label">{{ $t('order.driver') }}</text>
  97. <text class="info">{{ orderInfo.driver || '' }}</text>
  98. </p>
  99. <p class="cell">
  100. <text class="label">{{ $t('order.vehicle') }}</text>
  101. <text class="info">{{ orderInfo.vehicle || '' }}</text>
  102. </p>
  103. <template v-if="orderInfo.arriveFlag == 1">
  104. <p class="cell">
  105. <text class="label">{{ $t('base.common.arrive') }}</text>
  106. <text class="info">{{ orderInfo.arriveUserName || '' }}</text>
  107. </p>
  108. <p class="cell">
  109. <text class="label">{{ $t('base.common.arriveTime') }}</text>
  110. <text class="info">{{ orderInfo.arriveTime || '' }}</text>
  111. </p>
  112. </template>
  113. <!-- <p class="cell">
  114. <text class="label">{{ $t('order.phone') }}</text>
  115. <text class="info">{{ orderInfo.phone || '' }}</text>
  116. </p> -->
  117. <!-- <template
  118. v-if="orderInfo.orderStatus != 0 && orderInfo.weighingStatus != 0 && orderInfo.materialKind!='101'">
  119. <p class="cell">
  120. <text class="label">{{ $t('order.tareWeight') }}</text>
  121. <text class="info">{{ orderInfo.tareWeight || '0' }}</text>
  122. </p>
  123. <p class="cell">
  124. <text class="label">{{ $t('order.grossWeight') }}</text>
  125. <text class="info">{{ orderInfo.grossWeight || '0' }}</text>
  126. </p>
  127. </template>
  128. <template
  129. v-if="orderInfo.orderStatus != 0 && orderInfo.weighingStatus != 0 && orderInfo.materialKind!='101'">
  130. <p class="cell">
  131. <text class="label">{{ $t('order.netWeight') }}</text>
  132. <text class="info">{{ orderInfo.netWeight || '0' }}</text>
  133. </p>
  134. </template>
  135. <template v-if="orderInfo.orderStatus != 0 && orderInfo.weighingStatus == 1">
  136. <p class="cell">
  137. <text class="label">{{ $t('order.inTime') }}</text>
  138. <text class="info">{{ orderInfo.inTime || '' }}</text>
  139. </p>
  140. </template>
  141. <template v-if="orderInfo.orderStatus != 0 && orderInfo.weighingStatus == 2">
  142. <p class="cell">
  143. <text class="label">{{ $t('order.outTime') }}</text>
  144. <text class="info">{{ orderInfo.outTime || '' }}</text>
  145. </p>
  146. </template>
  147. <template v-if="orderInfo.orderStatus == 2">
  148. <p class="cell">
  149. <text class="label">{{ $t('order.outDate') }}</text>
  150. <text class="info">{{ orderInfo.outDoorTime || '' }}</text>
  151. </p>
  152. </template> -->
  153. </view>
  154. </view>
  155. <view class="order-card" v-for="(item, index) in orderHaxMixedList" :key="index">
  156. <view class="order-info-title">
  157. <image class="img" src="../../subpages/static/czzn-img/order/orderInfo-tenant.png"
  158. mode="scaleToFill" />
  159. <view class="mid">
  160. <view class="info">
  161. <span class="label">
  162. {{$t('spare.orderCode')}}
  163. </span>
  164. <span class="type" v-if="item.orderType == '1'">{{ $t('order.temp') }}</span>
  165. <span class="type" v-if="item.orderType == '2'">{{ $t('order.fixed') }}</span>
  166. <view class="order-type">
  167. <u-tag :text="$t('spare.suppOrder')" type="error"></u-tag>
  168. </view>
  169. </view>
  170. <text class="code">{{ item.code || '' }}</text>
  171. </view>
  172. <view class="orderStatus-info" v-if="item.orderType != '4'">
  173. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 0"
  174. src="/subpages/static/czzn-img/state/not-factory.png"></u--image>
  175. <u--image width="100rpx" height="88rpx"
  176. v-if="item.orderStatus == 1 && item.weighingStatus == 0"
  177. src="/subpages/static/czzn-img/state/in-factory.png"></u--image>
  178. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 2"
  179. src="/subpages/static/czzn-img/state/completed.png"></u--image>
  180. <u--image width="100rpx" height="88rpx"
  181. v-if="item.orderStatus == 1 && item.weighingStatus != 0"
  182. src="/subpages/static/czzn-img/state/weighed.png"></u--image>
  183. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 4"
  184. src="/subpages/static/czzn-img/state/cancellation.png"></u--image>
  185. </view>
  186. <view class="orderStatus-info" v-if="item.orderType == '4'">
  187. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 0"
  188. src="/subpages/static/czzn-img/state/no-take-order.png"></u--image>
  189. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 1"
  190. src="/subpages/static/czzn-img/state/start-take-order.png"></u--image>
  191. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 2"
  192. src="/subpages/static/czzn-img/state/completed.png"></u--image>
  193. <u--image width="100rpx" height="88rpx"
  194. v-if="item.enabledMarkType == 1 || item.orderStatus == 4"
  195. src="/subpages/static/czzn-img/state/cancellation.png"></u--image>
  196. </view>
  197. </view>
  198. <view class="order-card-info">
  199. <p class="cell">
  200. <text class="label">{{ $t('order.orderDate') }}</text>
  201. <text class="info">{{ item.setDate || '' }}</text>
  202. </p>
  203. <p class="cell">
  204. <text class="label">{{ $t('order.vehicleType') }}</text>
  205. <text class="info" v-if="item.vehicleType == '101'">{{ $t('order.saleOrder') }}</text>
  206. <text class="info"
  207. v-if="item.vehicleType == '102'">{{ $t('order.purchaseOrder') }}</text>
  208. <text class="info"
  209. v-if="item.vehicleType == '103'">{{ $t('order.materialsOrder') }}</text>
  210. <text class="info"
  211. v-if="item.vehicleType == '104'">{{ $t('order.transferOrder') }}</text>
  212. <!-- <span class="tag tag-ls" v-if="item.orderType == '1'">{{ $t('order.temp') }}</span>
  213. <span class="tag tag-gd" v-if="item.orderType == '2'">{{ $t('order.fixed') }}</span> -->
  214. </p>
  215. <p class="cell">
  216. <text class="label">{{ $t('order.companyName') }}</text>
  217. <text class="info">{{ item.companyName || '' }}</text>
  218. </p>
  219. <p class="cell">
  220. <text class="label">{{ $t('order.materialName') }}</text>
  221. <text class="info">{{ item.materialName || '' }}</text>
  222. </p>
  223. <p class="cell">
  224. <text class="label">{{ $t('order.orderNumber') }}</text>
  225. <text class="info">{{ item.orderNumber || '0' }}{{ item.orderType ==
  226. '4' ? $t('customer_meter.unitN') : $t('customer_meter.unitT') }}</text>
  227. </p>
  228. <p class="cell">
  229. <text class="label">{{ $t('order.driver') }}</text>
  230. <text class="info">{{ item.driver || '' }}</text>
  231. </p>
  232. <p class="cell">
  233. <text class="label">{{ $t('order.vehicle') }}</text>
  234. <text class="info">{{ item.vehicle || '' }}</text>
  235. </p>
  236. <template v-if="item.orderStatus != 0 && item.weighingStatus != 0">
  237. <p class="cell">
  238. <text class="label">{{ $t('order.tareWeight') }}</text>
  239. <text class="info">{{ item.tareWeight || '0' }}</text>
  240. </p>
  241. <p class="cell">
  242. <text class="label">{{ $t('order.grossWeight') }}</text>
  243. <text class="info">{{ item.grossWeight || '0' }}</text>
  244. </p>
  245. </template>
  246. <template>
  247. <p class="cell">
  248. <text class="label">{{ $t('order.netWeight') }}</text>
  249. <text class="info">{{ item.netWeight || '0' }}</text>
  250. </p>
  251. </template>
  252. <template v-if="item.orderStatus != 0 && item.weighingStatus == 1">
  253. <p class="cell">
  254. <text class="label">{{ $t('order.inTime') }}</text>
  255. <text class="info">{{ item.inTime || '' }}</text>
  256. </p>
  257. </template>
  258. <template v-if="item.orderStatus != 0 && item.weighingStatus == 2">
  259. <p class="cell">
  260. <text class="label">{{ $t('order.outTime') }}</text>
  261. <text class="info">{{ item.outTime || '' }}</text>
  262. </p>
  263. </template>
  264. <template v-if="item.orderStatus == 2">
  265. <p class="cell">
  266. <text class="label">{{ $t('order.outDate') }}</text>
  267. <text class="info">{{ item.outDoorTime || '' }}</text>
  268. </p>
  269. </template>
  270. </view>
  271. </view>
  272. <u-divider v-if="vehicleArriveDetailInfo" text="以下为到货图片" textColor="#2979ff"
  273. lineColor="#2979ff"></u-divider>
  274. <u-swiper :list="vehicleArriveDetailInfo" previousMargin="30" nextMargin="30" circular
  275. :autoplay="false" radius="5" bgColor="#ffffff"></u-swiper>
  276. </view>
  277. </view>
  278. </view>
  279. </template>
  280. <script>
  281. import {
  282. getOrderArriveInfo,
  283. } from '../../api/order'
  284. export default {
  285. data() {
  286. return {
  287. orderInfo: {},
  288. vehicleArriveDetailInfo: [],
  289. rect: undefined,
  290. statusBarHeight: null,
  291. }
  292. },
  293. onLoad(options) {
  294. this.bindOrderInfo(options)
  295. let sysInfo = uni.getSystemInfoSync(); //状态栏的高度
  296. this.statusBarHeight = sysInfo.statusBarHeight;
  297. // #ifdef MP-WEIXIN
  298. this.rect = wx.getMenuButtonBoundingClientRect();
  299. // #endif
  300. console.log(this.rect, this.statusBarHeight);
  301. },
  302. methods: {
  303. bindOrderInfo(data) {
  304. getOrderArriveInfo(data.orderId).then(res => {
  305. console.log("获取到到货数据,", res);
  306. if (res.statusCode == 200) {
  307. this.orderInfo = res.data.data
  308. if (res.data.data.vehicleArriveDetailInfo) {
  309. res.data.data.vehicleArriveDetailInfo.forEach(item => {
  310. this.vehicleArriveDetailInfo.push(item.address)
  311. });
  312. }
  313. }
  314. })
  315. },
  316. pageBack() {
  317. uni.navigateBack({
  318. delta: 1
  319. })
  320. }
  321. }
  322. }
  323. </script>
  324. <style>
  325. /* #ifndef APP-NVUE */
  326. view {
  327. display: flex;
  328. box-sizing: border-box;
  329. flex-direction: column;
  330. }
  331. page {
  332. box-sizing: border-box;
  333. /* padding: 40rpx 40rpx 80rpx; */
  334. height: 100%;
  335. background: url('../../subpages/static/czzn-img/order/orderInfo-bg.jpg') no-repeat;
  336. background-size: 750rpx auto;
  337. background-color: #f5f7fa;
  338. }
  339. /* #endif*/
  340. </style>
  341. <style lang="scss" scoped>
  342. @import '../../common/css/public.scss';
  343. </style>