companyHouse.vue 6.3 KB

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