planOrderInfo.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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" mode="scaleToFill" />
  20. <view class="mid">
  21. <view class="info">
  22. <span class="label">
  23. {{ $t('spare.orderCode') }}
  24. </span>
  25. <span class="type fixed">{{ $t('order.plan') }}</span>
  26. </view>
  27. <text class="code">{{ orderInfo.code || '' }}</text>
  28. </view>
  29. <view class="orderStatus-info" v-if="orderInfo.orderType == '4'">
  30. <u--image width="100rpx" height="88rpx" v-if="orderInfo.orderStatus == 0"
  31. src="/subpages/static/czzn-img/state/no-take-order.png"></u--image>
  32. <u--image width="100rpx" height="88rpx" v-if="orderInfo.orderStatus == 1"
  33. src="/subpages/static/czzn-img/state/start-take-order.png"></u--image>
  34. <u--image width="100rpx" height="88rpx" v-if="orderInfo.orderStatus == 2"
  35. src="/subpages/static/czzn-img/state/completed.png"></u--image>
  36. <u--image width="100rpx" height="88rpx"
  37. v-if="orderInfo.enabledMarkType == 1 || orderInfo.orderStatus == 4"
  38. src="/subpages/static/czzn-img/state/cancellation.png"></u--image>
  39. </view>
  40. </view>
  41. <view class="order-card-info">
  42. <view class="order-type" v-if="orderInfo.isMain == 2">
  43. <u-tag :text="$t('order.mainOrder')" type="success"></u-tag>
  44. </view>
  45. <p class="cell">
  46. <text class="label">{{ $t('order.orderDate') }}</text>
  47. <text class="info">{{ orderInfo.setDate || '' }}</text>
  48. </p>
  49. <p class="cell">
  50. <text class="label">{{ $t('order.vehicleType') }}</text>
  51. <text class="info" v-if="orderInfo.vehicleType == '101'">{{ $t('order.saleOrder') }}</text>
  52. <text class="info" v-if="orderInfo.vehicleType == '102'">{{ $t('order.purchaseOrder') }}</text>
  53. <text class="info" v-if="orderInfo.vehicleType == '103'">{{ $t('order.materialsOrder') }}</text>
  54. <text class="info" v-if="orderInfo.vehicleType == '104'">{{ $t('order.transferOrder') }}</text>
  55. </p>
  56. <p class="cell">
  57. <text class="label">{{ $t('order.companyName') }}</text>
  58. <text class="info">{{ orderInfo.companyName || '' }}</text>
  59. </p>
  60. <view class="cell">
  61. <text class="label">{{ $t('order.materialName') }}</text>
  62. <text class="info">{{ orderInfo.materialName || '' }}</text>
  63. </view>
  64. <view class="cell">
  65. <text class="label">{{ $t('order.planNumber') }}</text>
  66. <text class="info">{{ orderInfo.orderNumber || '0' }}{{ orderInfo.orderType ==
  67. '4' ? $t('customer_meter.unitN') : $t('customer_meter.unitT') }}</text>
  68. </view>
  69. <template v-if="orderInfo.orderStatus != 0 && orderInfo.weighingStatus != 0">
  70. <p class="cell">
  71. <text class="label">{{ $t('order.tareWeight') }}</text>
  72. <text class="info">{{ orderInfo.tareWeight || '0' }}</text>
  73. </p>
  74. <p class="cell">
  75. <text class="label">{{ $t('order.grossWeight') }}</text>
  76. <text class="info">{{ orderInfo.grossWeight || '0' }}</text>
  77. </p>
  78. </template>
  79. <template v-if="orderInfo.orderStatus != 0 && orderInfo.weighingStatus != 0">
  80. <p class="cell">
  81. <text class="label">{{ $t('order.netWeight') }}</text>
  82. <text class="info">{{ orderInfo.netWeight || '0' }}</text>
  83. </p>
  84. </template>
  85. <template v-if="orderInfo.orderStatus != 0 && orderInfo.weighingStatus == 1">
  86. <p class="cell">
  87. <text class="label">{{ $t('order.inTime') }}</text>
  88. <text class="info">{{ orderInfo.inTime || '' }}</text>
  89. </p>
  90. </template>
  91. <template v-if="orderInfo.orderStatus != 0 && orderInfo.weighingStatus == 2">
  92. <p class="cell">
  93. <text class="label">{{ $t('order.outTime') }}</text>
  94. <text class="info">{{ orderInfo.outTime || '' }}</text>
  95. </p>
  96. </template>
  97. <template v-if="orderInfo.orderStatus == 2">
  98. <p class="cell">
  99. <text class="label">{{ $t('order.outDate') }}</text>
  100. <text class="info">{{ orderInfo.outDoorTime || '' }}</text>
  101. </p>
  102. </template>
  103. <view class="cell">
  104. <text class="label">{{ $t('order.planNumber') }}</text>
  105. <text class="info">{{ orderInfo.orderNumber || '0' }}{{ orderInfo.orderType ==
  106. '4' ? $t('customer_meter.unitN') : $t('customer_meter.unitT') }}</text>
  107. </view>
  108. <view class="cell" v-for="(item,index) in vehicles">
  109. <text class="label">{{ $t('order.vehicle')+(index+1) }}</text>
  110. <text class="info">{{ item.vehicle || '' }}</text>
  111. </view>
  112. </view>
  113. </view>
  114. <view v-for="(item, index) in orderInfos" class="order-card" :key="index">
  115. <!-- <view class="order-card-title">
  116. <span class="type" v-if="item.orderType == '1'">{{ $t('order.temp') }}</span>
  117. <span class="type" v-if="item.orderType == '2'">{{ $t('order.fixed') }}</span>
  118. <text class="info">{{ item.tenantName || '' }}</text>
  119. <text class="no">No {{ item.code || '' }}</text>
  120. <view class="orderStatus-info">
  121. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 0"
  122. src="../../subpages/static/czzn-img/state/not-factory.png"></u--image>
  123. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 1 && item.weighingStatus == 0"
  124. src="../../subpages/static/czzn-img/state/in-factory.png"></u--image>
  125. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 2"
  126. src="../../subpages/static/czzn-img/state/completed.png"></u--image>
  127. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 1 && item.weighingStatus != 0"
  128. src="../../subpages/static/czzn-img/state/weighed.png"></u--image>
  129. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 4"
  130. src="../../subpages/static/czzn-img/state/cancelllation.png"></u--image>
  131. </view>
  132. </view> -->
  133. <view class="order-info-title">
  134. <image class="img" src="/subpages/static/czzn-img/order/orderInfo-tenant.png" mode="scaleToFill" />
  135. <view class="mid">
  136. <view class="info">
  137. <span class="label">
  138. {{ $t('spare.orderCode') }}
  139. </span>
  140. <span class="type" v-if="item.orderType == '1'">{{ $t('order.temp') }}</span>
  141. <span class="type fixed" v-if="item.orderType == '2'">{{ $t('order.fixed') }}</span>
  142. </view>
  143. <text class="code">{{ item.code || '' }}</text>
  144. </view>
  145. <view class="orderStatus-info" v-if="item.orderType != '4'">
  146. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 0"
  147. src="/subpages/static/czzn-img/state/not-factory.png"></u--image>
  148. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 1 && item.weighingStatus == 0"
  149. src="/subpages/static/czzn-img/state/in-factory.png"></u--image>
  150. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 2"
  151. src="/subpages/static/czzn-img/state/completed.png"></u--image>
  152. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 1 && item.weighingStatus != 0"
  153. src="/subpages/static/czzn-img/state/weighed.png"></u--image>
  154. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 4"
  155. src="/subpages/static/czzn-img/state/cancellation.png"></u--image>
  156. </view>
  157. <!-- <span class="type" v-if="orderInfo.orderType == '1'">{{ $t('order.temp') }}</span>
  158. <span class="type" v-if="orderInfo.orderType == '2'">{{ $t('order.fixed') }}</span> -->
  159. <view class="orderStatus-info" v-if="item.orderType == '4'">
  160. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 0"
  161. src="/subpages/static/czzn-img/state/no-take-order.png"></u--image>
  162. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 1"
  163. src="/subpages/static/czzn-img/state/start-take-order.png"></u--image>
  164. <u--image width="100rpx" height="88rpx" v-if="item.orderStatus == 2"
  165. src="/subpages/static/czzn-img/state/completed.png"></u--image>
  166. <u--image width="100rpx" height="88rpx" v-if="item.enabledMarkType == 1 || item.orderStatus == 4"
  167. src="/subpages/static/czzn-img/state/cancellation.png"></u--image>
  168. </view>
  169. </view>
  170. <view class="order-card-info">
  171. <!-- <view class="order-type">
  172. <span class="tag tag-ls" v-if="item.orderType == '1'">{{ $t('order.temp') }}</span>
  173. <span class="tag tag-gd" v-if="item.orderType == '2'">{{ $t('order.fixed') }}</span>
  174. </view> -->
  175. <view class="row">
  176. <p class="cell">
  177. <text class="label">{{ $t('order.vehicle') }}</text>
  178. <text class="info">{{ item.vehicle }}</text>
  179. </p>
  180. </view>
  181. <view class="row">
  182. <p class="cell">
  183. <text class="label">{{ $t('order.tareWeight') }}</text>
  184. <text class="info">{{ item.tareWeight || '0' }}</text>
  185. </p>
  186. <p class="cell">
  187. <text class="label">{{ $t('order.grossWeight') }}</text>
  188. <text class="info">{{ item.grossWeight || '0' }}</text>
  189. </p>
  190. </view>
  191. <view class="row">
  192. <p class="cell">
  193. <text class="label">{{ $t('order.netWeight') }}</text>
  194. <text class="info">{{ item.netWeight || '0' }}</text>
  195. </p>
  196. <p class="cell">
  197. <text class="label">{{ $t('order.orderNumber') }}</text>
  198. <text class="info">{{ item.orderNumber || '0' }} T</text>
  199. </p>
  200. </view>
  201. <view class="row">
  202. <p class="cell">
  203. <text class="label">{{ $t('order.inTime') }}</text>
  204. <text class="info">{{ item.inTime || '' }}</text>
  205. </p>
  206. </view>
  207. <view class="row" v-if="item.weighingStatus == 2">
  208. <p class="cell">
  209. <text class="label">{{ $t('order.outTime') }}</text>
  210. <text class="info">{{ item.outTime || '' }}</text>
  211. </p>
  212. </view>
  213. <view class="row" v-if="item.orderStatus == 2">
  214. <p class="cell">
  215. <text class="label">{{ $t('order.outDate') }}</text>
  216. <text class="info">{{ item.outDoorTime || '' }}</text>
  217. </p>
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. </template>
  226. <script>
  227. import {
  228. getFixedOrderList
  229. } from "../../api/order"
  230. export default {
  231. data() {
  232. return {
  233. loading: false,
  234. statusBarHeight: null,
  235. orderInfo:{},
  236. orderInfos:[],
  237. vehicles:[],
  238. keyword: '',
  239. };
  240. },
  241. onLoad(options) {
  242. this.onGetPlanOrderList(options)
  243. let sysInfo = wx.getSystemInfoSync(); //状态栏的高度
  244. this.statusBarHeight = sysInfo.statusBarHeight;
  245. this.rect = wx.getMenuButtonBoundingClientRect();
  246. console.log(this.rect, this.statusBarHeight);
  247. },
  248. methods: {
  249. onGetPlanOrderList(data) {
  250. var that = this;
  251. getFixedOrderList(data).then(res => {
  252. if (res.statusCode == 200 && res.data.code==0) {
  253. that.orderInfo = res.data.data.orderInfo
  254. that.orderInfos = res.data.data.orderInfos
  255. that.vehicles = res.data.data.vehicles
  256. }
  257. console.log("获取到的计划订单信息、", that.orderInfo);
  258. })
  259. },
  260. pageBack() {
  261. uni.navigateBack({
  262. delta: 1
  263. })
  264. }
  265. },
  266. };
  267. </script>
  268. <style>
  269. /* #ifndef APP-NVUE */
  270. view {
  271. display: flex;
  272. box-sizing: border-box;
  273. flex-direction: column;
  274. }
  275. page {
  276. box-sizing: border-box;
  277. /* padding: 40rpx 40rpx 80rpx; */
  278. height: 100%;
  279. background: url('../../subpages/static/czzn-img/order/order-detail2.png') no-repeat;
  280. background-size: 750rpx auto;
  281. }
  282. /* #endif*/
  283. </style>
  284. <style lang="scss" scoped>
  285. @import '../../common/css/public.scss';
  286. </style>