index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <div>
  3. <van-nav-bar title="应急仓库" left-arrow placeholder @click-left="goback" :fixed="true" @click-right="bjclick">
  4. <template #right>
  5. <van-icon size="18" name="question-o" />
  6. <!-- <router-link to="/warehouse/search"><van-icon name="search" size="18" /></router-link> -->
  7. </template>
  8. </van-nav-bar>
  9. <van-sticky>
  10. <van-search v-model="value1" disabled @click="gosearch" placeholder="请输入搜索关键词" />
  11. </van-sticky>
  12. <div v-if="!isempt">
  13. <div class="content">
  14. <div class="itemc" v-for="item in cklist" >
  15. <div class="itemcc">
  16. <div class="title" @click="gotockedit(item)">{{item.name}}
  17. <div class="btng">
  18. <!-- <div class="wbtn"></div> -->
  19. <div class="hbtn" @click.stop="gotowzedit(item)"></div>
  20. </div>
  21. </div>
  22. <div class="content">
  23. <div>
  24. <span class="left-title">管理单位:</span
  25. ><span class="left-content">{{item.manageUnit}}</span>
  26. </div>
  27. <div>
  28. <span class="left-title">联系人:</span
  29. ><span class="left-content">{{item.contactName}}</span>
  30. </div>
  31. <div>
  32. <span class="left-title">联系方式:</span
  33. ><span class="left-content">{{item.contactPhone}}</span>
  34. </div>
  35. <div>
  36. <span class="left-title">地址:</span
  37. ><span class="left-content"
  38. >{{item.address}}</span
  39. >
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <div><van-empty v-if="isempt" description="无仓库" /></div>
  47. </div>
  48. </template>
  49. <script setup>
  50. import { ref, reactive, onUpdated, onMounted, watch } from 'vue';
  51. import { useCommonStore, useIncidentStore, useMainStore } from '@/store';
  52. import { RouterView, useRoute, useRouter } from 'vue-router';
  53. import {
  54. api_getckList,
  55. } from '@/service/warehouse';
  56. import { Toast, Notify, Dialog } from 'vant';
  57. import { BaseMediaUrl } from '@/utils';
  58. import { upload } from '@/api/common';
  59. import router from '@/router';
  60. const value1 = ref("");
  61. const cklist = ref([])
  62. const gotockedit=(item)=>{
  63. localStorage.setItem("cck",JSON.stringify(item))
  64. localStorage.setItem("cedit",false)
  65. router.push("/warehouse/edit"+(taskid==""?"":`?taskid=${taskid}`))
  66. }
  67. const gotowzedit=(item)=>{
  68. localStorage.setItem("cck",JSON.stringify(item))
  69. localStorage.setItem("cedit",false)
  70. router.push("/warehouse/detail1"+(taskid==""?"":`?taskid=${taskid}`))
  71. }
  72. const gosearch = () => {
  73. router.push("/warehouse/search");
  74. }
  75. const bjclick = () => {
  76. useMainStore().gotohelp("4ebfdaebd5e347f28383b039ed9d11bd");
  77. }
  78. const goback = () => {
  79. try {
  80. uni.navigateBack();
  81. } catch (E) {}
  82. //window.history.back();
  83. };
  84. let taskid = "";
  85. onMounted(()=>{
  86. Toast.loading({
  87. message: '加载中...',
  88. duration: 0,
  89. forbidClick: true,
  90. });
  91. api_getckList("").then(res=>{
  92. Toast.clear();
  93. // console.log(res);
  94. cklist.value = res.rows;
  95. })
  96. })
  97. </script>
  98. <style lang="scss">
  99. .content label,
  100. .content span {
  101. font-size: 15px;
  102. font-family: PingFangSC, PingFangSC-Regular;
  103. color: #333333;
  104. }
  105. .bjbtn {
  106. font-size: 14px;
  107. font-weight: 500;
  108. color: #ffffff;
  109. font-size: 13px;
  110. font-weight: 500;
  111. background: #bb0000;
  112. padding: 3px 8px;
  113. border-radius: 2px;
  114. }
  115. .content {
  116. .itemc {
  117. padding: 12px 15px;
  118. padding-bottom: 0;;
  119. .itemcc {
  120. background: #ffffff;
  121. border-radius: 2%;
  122. box-shadow: 0px 2px 6px 0px rg;
  123. .title {
  124. font-size: 16px;
  125. font-family: PingFangSC, PingFangSC-Medium;
  126. font-weight: 500;
  127. padding: 11px 15px;
  128. border-bottom: 1px solid #f0f2f5;
  129. position: relative;color:#0b33a8;
  130. .btng {
  131. position: absolute;
  132. right:15px;
  133. top:11px;
  134. .wbtn {
  135. background: url("../../assets/icons/incident/storehouse@2x.png");
  136. width: 24px;
  137. height: 24px;
  138. background-size: 100% 100%;
  139. display:inline-block;
  140. margin-right:16px;
  141. }
  142. .hbtn {
  143. background: url("../../assets/icons/incident/materials@2x.png");
  144. width: 24px;
  145. height: 24px;
  146. background-size: 100% 100%;
  147. display:inline-block;
  148. }
  149. }
  150. }
  151. .content {
  152. padding: 11px 15px;
  153. margin-bottom: 3px;
  154. font-size: 14px;
  155. word-wrap: break-word;
  156. .left-title {
  157. color: #999999;
  158. }
  159. .left-content {
  160. color: rgb(38, 38, 38);
  161. word-wrap: break-word;
  162. }
  163. }
  164. }
  165. }
  166. .cell-header {
  167. font-family: PingFangSC, PingFangSC-Regular;
  168. font-weight: 400;
  169. line-height: 42px;
  170. padding: 0px 15px;
  171. span {
  172. font-size: 12px;
  173. }
  174. div {
  175. font-size: 14px;
  176. color: #0b33a8;
  177. }
  178. }
  179. }
  180. </style>