fixedOrderInfo.vue 14 KB

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