companyHouse.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template>
  2. <div class="companyhouse">
  3. <div class="searchbox">
  4. <van-row>
  5. <van-col :span="22">
  6. <uni-search-bar placeholder="请输入公司名称" @confirm="confirm" clearButton="none" cancelButton="none"
  7. v-model="search.qymc"></uni-search-bar>
  8. </van-col>
  9. <van-col :span="2">
  10. <img @click="jumpAddCompanyPage()" src="../../../static/add_company.png"
  11. style="height: 50rpx; width: 50rpx; margin-top: 25rpx" alt="" />
  12. </van-col>
  13. </van-row>
  14. </div>
  15. <van-tabs :active="active" @change="onChange">
  16. <van-tab title="全部" :name="null"></van-tab>
  17. <van-tab title="在园" :name="1"></van-tab>
  18. <van-tab title="挂靠" :name="2"></van-tab>
  19. <van-tab title="异地生产" :name="3"></van-tab>
  20. <van-tab title="飞地" :name="4"></van-tab>
  21. </van-tabs>
  22. <div style="display: flex; background: white; padding: 0rpx 16rpx">
  23. <uni-data-checkbox v-model="entryArray" mode="tag" :multiple="true" :localdata="dic_SelectList.SETTLE_IN_STATUS"
  24. selectedTextColor="#1D18BC" selectedColor="rgba(29,24,188,0.05);" @change="getCompanyList">
  25. </uni-data-checkbox>
  26. </div>
  27. <div class="list">
  28. <div v-if="companyList.length != 0">
  29. <div class="list-row" v-for="(item, index) in companyList" :key="index">
  30. <div class="cell_1 width90">
  31. <div class="width70 height44rpx mb8rpx float_left">
  32. <div class="first_title chaochuyincang">{{ item.qymc }}</div>
  33. </div>
  34. <div class="width30 height44rpx mb8rpx float_left" @click="jumpPage(item.id)">
  35. <div class="roomstatus1 txt_center" style="font-size: 24rpx">
  36. {{ getDicType(item.settleInType) }}
  37. </div>
  38. </div>
  39. <div class="width100 height40rpx mb8rpx clear_both">
  40. <div class="second_title width50 height40rpx float_left" style="
  41. overflow: hidden;
  42. text-overflow: ellipsis;
  43. white-space: nowrap;
  44. ">
  45. 所属楼盘:{{
  46. item.area == null || !item.area ? "未知" : item.area
  47. }}
  48. </div>
  49. <div class="second_title_1 width50 height40rpx float_left" @click="jumpPage(item.id)">
  50. 注册资本:{{ !item.zczj ? "暂无" : item.zczj + "万" }}
  51. </div>
  52. </div>
  53. <div @click="jumpPage(item.id)" class="width100 height28rpx font24rpx fontcolor251FCA chaochuyincang">
  54. {{ item.qybq == null || !item.qybq ? "暂无标签" : item.qybq }}
  55. </div>
  56. </div>
  57. <div class="cell_3 width10" @click="jumpPage(item.id)">
  58. <img src="../../../static/mine/youjiantou.png" alt="" />
  59. </div>
  60. </div>
  61. </div>
  62. <div v-else>
  63. <van-empty class="disblock marginauto" style="background: white" description="暂无数据" />
  64. </div>
  65. </div>
  66. </div>
  67. </template>
  68. <script>
  69. import { listVo, getByCodes, getUserLocalStorageInfo } from "@/js_sdk/http";
  70. import vanEmpty from "../../../wxcomponents/weapp/dist/empty/index";
  71. export default {
  72. components: {
  73. vanEmpty,
  74. },
  75. data() {
  76. return {
  77. entryArray: [],
  78. dic_key: ["MNP_BUILDING_TYPE", "SETTLE_IN_STATUS"],
  79. dic_SelectList: {},
  80. active: 0,
  81. form: {
  82. entryStatus: [],
  83. },
  84. statusList: [
  85. { label: "全部", value: null },
  86. { label: "在园", value: "1" },
  87. { label: "挂靠", value: "2" },
  88. { label: "异地生产", value: "3" },
  89. { label: "飞地", value: "4" },
  90. ],
  91. companyList: [],
  92. search: {
  93. pageSize: 10,
  94. userId: "",
  95. pageNum: 1,
  96. },
  97. };
  98. },
  99. onShow() {
  100. this.search.userId = getUserLocalStorageInfo().user.id;
  101. this.getByCodes();
  102. this.getCompanyList();
  103. },
  104. methods: {
  105. async getMoreListData() {
  106. let that = this;
  107. that.search.pageNum = that.search.pageNum + 1;
  108. let list = await listVo(that.search);
  109. if (list.rows == 0) {
  110. that.$showToast("没有更多数据了");
  111. } else {
  112. list.rows.forEach((e) => {
  113. that.companyList.push(e);
  114. });
  115. }
  116. },
  117. onReachBottom() {
  118. this.getMoreListData();
  119. }, //下拉执行的时候触发 (下拉刷新)
  120. onChange(e) {
  121. this.search.settleInType = e.detail.name == null ? "" : e.detail.name;
  122. this.getCompanyList();
  123. },
  124. getDicType(value) {
  125. if (this.dic_SelectList.MNP_BUILDING_TYPE) {
  126. let MNP_BUILDING_TYPE = this.dic_SelectList.MNP_BUILDING_TYPE;
  127. let index = MNP_BUILDING_TYPE.findIndex((e) => e.value == value);
  128. if (index != -1) return MNP_BUILDING_TYPE[index].label;
  129. else return "暂无";
  130. }
  131. },
  132. async getByCodes() {
  133. this.search.pageNum = 1;
  134. let data = await getByCodes(JSON.stringify(this.dic_key));
  135. this.dic_SelectList = this.$common.handleDicList(data);
  136. this.dic_SelectList.SETTLE_IN_STATUS =
  137. this.dic_SelectList.SETTLE_IN_STATUS.map((e) => {
  138. return {
  139. text: e.label,
  140. value: e.value,
  141. };
  142. });
  143. },
  144. async getCompanyList() {
  145. this.search.entryStatus = this.entryArray.toString();
  146. this.search.pageSize = 10;
  147. this.search.pageNum = 1;
  148. let list = await listVo(this.search);
  149. this.companyList = list.rows;
  150. },
  151. jumpAddCompanyPage() {
  152. uni.navigateTo({
  153. url: "/pages/subPackages/addCompany/addCompany",
  154. });
  155. },
  156. blur(e) { },
  157. focus(e) {
  158. // pages / subPackages / merchants / merchants;
  159. },
  160. input(e) { },
  161. cancel(e) { },
  162. change(e) { },
  163. clear(e) { },
  164. confirm(e) {
  165. this.getCompanyList();
  166. },
  167. jumpPage(e) {
  168. uni.navigateTo({
  169. url: "/pages/subPackages/companyDetails/companyDetails?id=" + e,
  170. });
  171. },
  172. },
  173. };
  174. </script>
  175. <style lang="scss">
  176. .searchbox {
  177. display: block;
  178. background: white;
  179. }
  180. .chaochuyincang {
  181. white-space: nowrap;
  182. overflow: hidden;
  183. text-overflow: ellipsis;
  184. }
  185. .labelcolmt26 {
  186. input {
  187. font-size: 24rpx;
  188. border-radius: 8rpx 8rpx 8rpx 8rpx;
  189. border: 2rpx solid #cccccc;
  190. text-align: center;
  191. }
  192. .van-col {
  193. margin-top: 26rpx !important;
  194. }
  195. label {
  196. color: #333333;
  197. font-size: 30rpx;
  198. margin: 0;
  199. margin-top: 0 !important;
  200. }
  201. .uni-data-checklist {
  202. margin-top: -10rpx !important;
  203. }
  204. }
  205. </style>