confirmation.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <!-- 登记称重详情 -->
  2. <template>
  3. <view class="confirmationPage">
  4. <view class="title-p" style="margin-top:20rpx;">基础信息</view>
  5. <view class="title-weight-p">报备单编号:{{info.reportNo}}</view>
  6. <view class="text-p">实验室:{{info.subName}}({{info.roomNum}})</view>
  7. <view class="text-p">上门回收日期:{{info.expectTime}}({{info.expectWeek}})</view>
  8. <view class="text-p">报备人:{{info.reportName}}({{info.reportAccount}})</view>
  9. <view class="text-p">报备时间:{{info.reportTime}}</view>
  10. <view class="text-p">称重登记人:{{userName}}({{user}})</view>
  11. <view class="text-p">称重登记时间:{{currentTime}}</view>
  12. <view class="title-p">称重登记内容</view>
  13. <view class="text-weight-box">
  14. <view>危险废物种类</view>
  15. <view>共{{info.details.length}}种</view>
  16. </view>
  17. <view class="text-box" v-for="(item,index) in info.details" :key="index">
  18. <view>{{item.typeName}}</view>
  19. <view>{{item.weight}}kg</view>
  20. </view>
  21. <view class="title-p" v-if="info.images[0]">图片</view>
  22. <view class="img-box" v-if="info.images[0]">
  23. <view>
  24. <img :src="baseUrl+img" v-for="(img,imgIndex) in info.images" :key="imgIndex">
  25. </view>
  26. </view>
  27. <view class="flex-null-p"></view>
  28. <view class="bottom-button-p" @click="hwmsAppRegisterOrderPresign()">回收人员确认</view>
  29. </view>
  30. </template>
  31. <script>
  32. import {
  33. config
  34. } from '@/api/request/config.js'
  35. import {
  36. hwmsAppRegisterOrderPresign,
  37. } from '@/pages_hazardousWasteRecycling/api/index.js'
  38. export default {
  39. data() {
  40. return {
  41. baseUrl:config.base_url,
  42. newData:{
  43. images:[],
  44. },
  45. info:{
  46. details:[],
  47. images:[],
  48. },
  49. userName:uni.getStorageSync('user-name'),
  50. user:uni.getStorageSync('userName'),
  51. currentTime:'',
  52. }
  53. },
  54. onLoad(option) {
  55. this.currentTime = this.formatDate(new Date());
  56. this.$set(this,'newData',JSON.parse(decodeURIComponent(option.data)));
  57. this.$set(this,'info',JSON.parse(decodeURIComponent(option.info)));
  58. },
  59. onShow() {
  60. },
  61. mounted() {
  62. },
  63. methods: {
  64. formatDate(date) {
  65. const year = date.getFullYear();
  66. const month = String(date.getMonth() + 1).padStart(2, '0');
  67. const day = String(date.getDate()).padStart(2, '0');
  68. const hours = String(date.getHours()).padStart(2, '0');
  69. const minutes = String(date.getMinutes()).padStart(2, '0');
  70. const seconds = String(date.getSeconds()).padStart(2, '0');
  71. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  72. },
  73. confirmatinButton(){
  74. // uni.navigateTo({
  75. // url: "/pages_hazardousWasteRecycling/views/weighingRegistration/signatureComponent?data=" + encodeURIComponent(JSON.stringify(this.newData))
  76. // });
  77. uni.navigateTo({
  78. url: "/pages_hazardousWasteRecycling/views/weighingRegistration/signatureListComponent?data=" + encodeURIComponent(JSON.stringify(this.newData))
  79. });
  80. },
  81. //前置留痕
  82. async hwmsAppRegisterOrderPresign(){
  83. const {
  84. data
  85. } = await hwmsAppRegisterOrderPresign(this.newData);
  86. if (data.code == 200) {
  87. uni.navigateTo({
  88. url: "/pages_hazardousWasteRecycling/views/weighingRegistration/signatureListComponent?data=" + encodeURIComponent(JSON.stringify(this.newData))
  89. });
  90. }
  91. },
  92. },
  93. }
  94. </script>
  95. <style lang="stylus" scoped>
  96. .confirmationPage{
  97. height: 100%;
  98. display flex;
  99. flex-direction column;
  100. background-color: #fff;
  101. position: relative;
  102. overflow-x: hidden;
  103. overflow-y: scroll;
  104. .title-p{
  105. line-height:80rpx;
  106. font-size:34rpx;
  107. padding:0 30rpx;
  108. color:#0183FA;
  109. }
  110. .title-weight-p{
  111. line-height:60rpx;
  112. font-size:32rpx;
  113. padding:0 50rpx;
  114. color:#333;
  115. font-weight:700;
  116. }
  117. .text-p{
  118. line-height:60rpx;
  119. font-size:32rpx;
  120. padding:0 50rpx;
  121. color:#333;
  122. }
  123. .signature-box{
  124. display: flex;
  125. line-height:60rpx;
  126. font-size:32rpx;
  127. padding:0 50rpx;
  128. view{
  129. flex:1;
  130. }
  131. img{
  132. width:400rpx;
  133. height:160rpx;
  134. margin-top:15rpx;
  135. }
  136. }
  137. .img-box{
  138. line-height:60rpx;
  139. font-size:32rpx;
  140. padding:0 50rpx;
  141. margin-bottom:80rpx;
  142. // view:nth-child(1){
  143. // line-height:60rpx;
  144. // font-size:32rpx;
  145. // color:#333;
  146. // font-weight:700;
  147. // }
  148. view:nth-child(1){
  149. img{
  150. display: inline-block;
  151. width:210rpx;
  152. height:210rpx;
  153. }
  154. img:nth-child(2){
  155. margin:0 10rpx;
  156. }
  157. }
  158. }
  159. .positon-p{
  160. position: absolute;
  161. top:20rpx;
  162. right:30rpx;
  163. }
  164. .text-weight-box{
  165. display: flex;
  166. line-height:60rpx;
  167. font-size:32rpx;
  168. padding:0 50rpx;
  169. color:#333;
  170. font-weight:700;
  171. view:nth-child(1){
  172. flex:1;
  173. }
  174. view:nth-child(2){
  175. }
  176. }
  177. .text-box{
  178. display: flex;
  179. line-height:60rpx;
  180. font-size:32rpx;
  181. padding:0 50rpx;
  182. color:#333;
  183. view:nth-child(1){
  184. flex:1;
  185. }
  186. view:nth-child(2){
  187. }
  188. }
  189. .remark-box{
  190. line-height:60rpx;
  191. font-size:32rpx;
  192. padding:0 30rpx;
  193. color:#333;
  194. view:nth-child(1){
  195. line-height:80rpx;
  196. font-size:32rpx;
  197. color:#333;
  198. font-weight:700;
  199. }
  200. view:nth-child(2){
  201. padding:0 20rpx;
  202. line-height:50rpx;
  203. font-size:32rpx;
  204. color:#333;
  205. }
  206. }
  207. .flex-null-p{
  208. width:2rpx;
  209. height:20rpx;
  210. }
  211. .bottom-button-p{
  212. width:700rpx;
  213. height:80rpx;
  214. line-height:80rpx;
  215. font-size:34rpx;
  216. color:#fff;
  217. background-color: #0183FA;
  218. margin:40rpx 25rpx;
  219. border-radius:10rpx;
  220. text-align: center;
  221. }
  222. .colorA{
  223. color:#0183FA;
  224. }
  225. .colorB{
  226. color:#00CD66;
  227. }
  228. .colorC{
  229. color:#FF6A6A;
  230. }
  231. }
  232. </style>