companyHouse.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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
  57. class="second_title width50 height40rpx float_left"
  58. style="
  59. overflow: hidden;
  60. text-overflow: ellipsis;
  61. white-space: nowrap;
  62. "
  63. >
  64. 所属楼盘:{{
  65. item.area == null || !item.area ? "未知" : item.area
  66. }}
  67. </div>
  68. <div class="second_title_1 width50 height40rpx float_left">
  69. 注册资本:{{ !item.zczj ? "暂无" : item.zczj + "万" }}
  70. </div>
  71. </div>
  72. <div
  73. class="width100 height28rpx font24rpx fontcolor251FCA chaochuyincang"
  74. >
  75. {{ item.qybq == null || !item.qybq ? "暂无标签" : item.qybq }}
  76. </div>
  77. </div>
  78. <div class="cell_3 width10" @click="jumpPage(item.id)">
  79. <img src="../../../static/mine/youjiantou.png" alt="" />
  80. </div>
  81. </div>
  82. </div>
  83. <div v-else>
  84. <van-empty
  85. class="disblock marginauto"
  86. style="background: white"
  87. description="暂无数据"
  88. />
  89. </div>
  90. </div>
  91. </div>
  92. </template>
  93. <script>
  94. import { listVo, getByCodes, getUserLocalStorageInfo } from "@/js_sdk/http";
  95. import vanEmpty from "../../../wxcomponents/weapp/dist/empty/index";
  96. export default {
  97. components: {
  98. vanEmpty,
  99. },
  100. data() {
  101. return {
  102. entryArray: [],
  103. dic_key: ["MNP_BUILDING_TYPE", "SETTLE_IN_STATUS"],
  104. dic_SelectList: {},
  105. active: 0,
  106. form: {
  107. entryStatus: [],
  108. },
  109. statusList: [
  110. { label: "全部", value: null },
  111. { label: "在园", value: "1" },
  112. { label: "挂靠", value: "2" },
  113. { label: "异地生产", value: "3" },
  114. { label: "飞地", value: "4" },
  115. ],
  116. companyList: [],
  117. search: {
  118. pageSize: 10,
  119. userId: "",
  120. pageNum: 1,
  121. },
  122. };
  123. },
  124. onShow() {
  125. this.search.userId = getUserLocalStorageInfo().user.id;
  126. this.getByCodes();
  127. this.getCompanyList();
  128. },
  129. methods: {
  130. async getMoreListData() {
  131. let that = this;
  132. that.search.pageNum = that.search.pageNum + 1;
  133. let list = await listVo(that.search);
  134. if (list.rows == 0) {
  135. that.$showToast("没有更多数据了");
  136. } else {
  137. list.rows.forEach((e) => {
  138. that.companyList.push(e);
  139. });
  140. }
  141. },
  142. onReachBottom() {
  143. this.getMoreListData();
  144. }, //下拉执行的时候触发 (下拉刷新)
  145. onChange(e) {
  146. this.search.settleInType = e.detail.name == null ? "" : e.detail.name;
  147. this.getCompanyList();
  148. },
  149. getDicType(value) {
  150. if (this.dic_SelectList.MNP_BUILDING_TYPE) {
  151. let MNP_BUILDING_TYPE = this.dic_SelectList.MNP_BUILDING_TYPE;
  152. let index = MNP_BUILDING_TYPE.findIndex((e) => e.value == value);
  153. if (index != -1) return MNP_BUILDING_TYPE[index].label;
  154. else return "暂无";
  155. }
  156. },
  157. async getByCodes() {
  158. this.search.pageNum = 1;
  159. let data = await getByCodes(JSON.stringify(this.dic_key));
  160. this.dic_SelectList = this.$common.handleDicList(data);
  161. this.dic_SelectList.SETTLE_IN_STATUS =
  162. this.dic_SelectList.SETTLE_IN_STATUS.map((e) => {
  163. return {
  164. text: e.label,
  165. value: e.value,
  166. };
  167. });
  168. },
  169. async getCompanyList() {
  170. this.search.entryStatus = this.entryArray.toString();
  171. this.search.pageSize = 10;
  172. this.search.pageNum = 1;
  173. let list = await listVo(this.search);
  174. this.companyList = list.rows;
  175. },
  176. jumpAddCompanyPage() {
  177. uni.navigateTo({
  178. url: "/pages/subPackages/addCompany/addCompany",
  179. });
  180. },
  181. blur(e) {},
  182. focus(e) {
  183. // pages / subPackages / merchants / merchants;
  184. },
  185. input(e) {},
  186. cancel(e) {},
  187. change(e) {},
  188. clear(e) {},
  189. confirm(e) {
  190. this.getCompanyList();
  191. },
  192. jumpPage(e) {
  193. uni.navigateTo({
  194. url: "/pages/subPackages/companyDetails/companyDetails?id=" + e,
  195. });
  196. },
  197. },
  198. };
  199. </script>
  200. <style lang="scss">
  201. .searchbox {
  202. display: block;
  203. background: white;
  204. }
  205. .chaochuyincang {
  206. white-space: nowrap;
  207. overflow: hidden;
  208. text-overflow: ellipsis;
  209. }
  210. .labelcolmt26 {
  211. input {
  212. font-size: 24rpx;
  213. border-radius: 8rpx 8rpx 8rpx 8rpx;
  214. border: 2rpx solid #cccccc;
  215. text-align: center;
  216. }
  217. .van-col {
  218. margin-top: 26rpx !important;
  219. }
  220. label {
  221. color: #333333;
  222. font-size: 30rpx;
  223. margin: 0;
  224. margin-top: 0 !important;
  225. }
  226. .uni-data-checklist {
  227. margin-top: -10rpx !important;
  228. }
  229. }
  230. </style>