editCompany.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. <template>
  2. <view class="ms-detail">
  3. <nav-bar title="编辑公司信息" color="#000"></nav-bar>
  4. <view class="ms-content">
  5. <view class="ms-title">编辑公司及品牌信息</view>
  6. <view class="ms-item">
  7. <view class="ms-item-title" @click="checkBaseMsg">
  8. <view class="ms-title-txt">基本信息{{ filledInCount[0] }}/5</view>
  9. <view class="ms-title-icon">
  10. <image src="@/static/images/my/my/top-up.svg" mode="scaleToFill" class="top" v-if="baseMsg" />
  11. <image src="@/static/images/my/my/right.svg" mode="scaleToFill" class="right" v-else />
  12. </view>
  13. </view>
  14. <view class="ms-item-content" v-if="baseMsg" @click="goCompanyMsg">
  15. <view class="name-content-item">
  16. <view class="name-item">品牌logo</view>
  17. <view class="value-item">
  18. <text v-if="!companyinfo.companyLogo">未添加</text>
  19. <image :src="companyinfo.companyLogo" mode="scaleToFill" v-else />
  20. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  21. </view>
  22. </view>
  23. <view class="name-content-item">
  24. <view class="name-item">公司名称</view>
  25. <view class="value-item">
  26. <text v-if="!companyinfo.companyName">未添加</text>
  27. <text v-else>{{ companyinfo.companyName }}</text>
  28. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  29. </view>
  30. </view>
  31. <view class="name-content-item">
  32. <view class="name-item">公司全称</view>
  33. <view class="value-item">
  34. <text v-if="!companyinfo.companyAllName">未添加</text>
  35. <text v-else>{{ companyinfo.companyAllName }}</text>
  36. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  37. </view>
  38. </view>
  39. <view class="name-content-item">
  40. <view class="name-item">融资阶段</view>
  41. <view class="value-item">
  42. <text v-if="!companyinfo.companyDevelop">未添加</text>
  43. <text v-else>{{ companyinfo.companyDevelop }}</text>
  44. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  45. </view>
  46. </view>
  47. <view class="name-content-item">
  48. <view class="name-item">人员规模</view>
  49. <view class="value-item">
  50. <text v-if="!companyinfo.companyPeople || companyinfo.companyPeople === '0'">未添加</text>
  51. <text v-else>{{ companyinfo.companyPeople }}</text>
  52. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="ms-item">
  58. <view class="ms-item-title" @click="checkCompanyFund">
  59. <view class="ms-title-txt">公司福利 {{ filledInCount[1] }}/2</view>
  60. <view class="ms-title-icon">
  61. <image src="@/static/images/my/my/top-up.svg" mode="scaleToFill" class="top" v-if="companyFund" />
  62. <image src="@/static/images/my/my/right.svg" mode="scaleToFill" class="right" v-else />
  63. </view>
  64. </view>
  65. <view class="ms-item-content" v-if="companyFund" @click="goCompanyMsg">
  66. <view class="name-content-item">
  67. <view class="name-item">标准工作时间</view>
  68. <view class="value-item">
  69. <text v-if="!companyinfo.workTime">未添加</text>
  70. <text v-else>{{ companyinfo.workTime }}</text>
  71. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  72. </view>
  73. </view>
  74. <view class="name-content-item">
  75. <view class="name-item">福利待遇</view>
  76. <view class="value-item">
  77. <text v-if="!companyinfo.welfare">未添加</text>
  78. <text v-else>已添加{{ companyinfo.welfare.split(',').length }}项</text>
  79. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="ms-item">
  85. <view class="ms-item-title" @click="goCompanyMsg">
  86. <view class="ms-title-txt">公司介绍</view>
  87. <view class="ms-title-icon">
  88. <text v-if="!companyinfo.companyContent">未添加</text>
  89. <text v-else>已添加</text>
  90. </view>
  91. </view>
  92. <!-- <view class="ms-item-content" v-if="companyDetail">
  93. <view class="name-content-item">
  94. <view class="name-item">标准工作时间</view>
  95. <view class="value-item">
  96. <text>09:00-18:00</text>
  97. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  98. </view>
  99. </view>
  100. <view class="name-content-item">
  101. <view class="name-item">福利待遇</view>
  102. <view class="value-item"
  103. ><text>已添加2项</text>
  104. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  105. </view>
  106. </view>
  107. </view> -->
  108. </view>
  109. <view class="ms-item">
  110. <view class="ms-item-title" @click="goCompanyMsg">
  111. <view class="ms-title-txt">主营业务</view>
  112. <view class="ms-title-icon">
  113. <text v-if="!companyinfo.companyScope">未添加</text>
  114. <text v-else>已添加{{ companyinfo.companyScope.split(',').length }}项</text>
  115. </view>
  116. </view>
  117. <!-- <view class="ms-item-content" v-if="mainWork">
  118. <view class="name-content-item">
  119. <view class="name-item">标准工作时间</view>
  120. <view class="value-item">
  121. <text>09:00-18:00</text>
  122. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  123. </view>
  124. </view>
  125. <view class="name-content-item">
  126. <view class="name-item">福利待遇</view>
  127. <view class="value-item"
  128. ><text>已添加2项</text>
  129. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  130. </view>
  131. </view>
  132. </view> -->
  133. </view>
  134. <view class="ms-item">
  135. <view class="ms-item-title" @click="goCompanyMsg">
  136. <view class="ms-title-txt">公司相册</view>
  137. <view class="ms-title-icon">
  138. <text v-if="!companyinfo.photos">未添加</text>
  139. <text v-else>已添加{{ companyinfo.photos.split(',').length }}张</text>
  140. </view>
  141. </view>
  142. <!-- <view class="ms-item-content" v-if="companyImg">
  143. <view class="name-content-item">
  144. <view class="name-item">标准工作时间</view>
  145. <view class="value-item">
  146. <text>09:00-18:00</text>
  147. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  148. </view>
  149. </view>
  150. <view class="name-content-item">
  151. <view class="name-item">福利待遇</view>
  152. <view class="value-item"
  153. ><text>已添加2项</text>
  154. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  155. </view>
  156. </view>
  157. </view> -->
  158. </view>
  159. <view class="ms-item">
  160. <view class="ms-item-title" @click="goCompanyMsg">
  161. <view class="ms-title-txt">人才发展</view>
  162. <view class="ms-title-icon">
  163. <text v-if="!companyinfo.companyPeopleDevelop">未添加</text>
  164. <text v-else>已添加{{ companyinfo.companyPeopleDevelop.split(',').length }}项</text>
  165. </view>
  166. </view>
  167. <!-- <view class="ms-item-content" v-if="peopleDev">
  168. <view class="name-content-item">
  169. <view class="name-item">标准工作时间</view>
  170. <view class="value-item">
  171. <text>09:00-18:00</text>
  172. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  173. </view>
  174. </view>
  175. <view class="name-content-item">
  176. <view class="name-item">福利待遇</view>
  177. <view class="value-item"
  178. ><text>已添加2项</text>
  179. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  180. </view>
  181. </view>
  182. </view> -->
  183. </view>
  184. </view>
  185. </view>
  186. </template>
  187. <script>
  188. import navBar from "@/components/nav-bar/index.vue";
  189. export default {
  190. data() {
  191. return {
  192. baseMsg: false,
  193. companyFund: false,
  194. companyDetail: false,
  195. mainWork: false,
  196. companyImg: false,
  197. peopleDev: false,
  198. companyinfo: {}
  199. };
  200. },
  201. components: {
  202. navBar,
  203. },
  204. onLoad() {
  205. this.getcompanystatus()
  206. },
  207. computed: {
  208. filledInCount() {
  209. let arr = [0, 0]
  210. if (this.companyinfo.companyLogo) arr[0] += 1
  211. if (this.companyinfo.companyName) arr[0] += 1
  212. if (this.companyinfo.companyAllName) arr[0] += 1
  213. if (this.companyinfo.companyDevelop) arr[0] += 1
  214. if (this.companyinfo.companyPeople && this.companyinfo.companyPeople !== '0') arr[0] += 1
  215. if (this.companyinfo.workTime) arr[1] += 1
  216. if (this.companyinfo.welfare) arr[1] += 1
  217. return arr
  218. }
  219. },
  220. methods: {
  221. checkBaseMsg() {
  222. this.baseMsg = !this.baseMsg;
  223. },
  224. checkCompanyFund() {
  225. this.companyFund = !this.companyFund;
  226. },
  227. checkCompanyDetail() {
  228. this.companyDetail = !this.companyDetail;
  229. },
  230. checkMainWork() {
  231. this.mainWork = !this.mainWork;
  232. },
  233. checkCompanyImg() {
  234. this.companyImg = !this.companyImg;
  235. },
  236. checkPeopleDev() {
  237. this.peopleDev = !this.peopleDev;
  238. },
  239. goCompanyMsg() {
  240. uni.setStorageSync('companyInfo', this.companyinfo);
  241. uni.navigateTo({ url: `/my/renzheng/companyMsg?update=${true}` })
  242. },
  243. // 查询用户企业状态
  244. getcompanystatus() {
  245. this.$Request.get("/app/company/selectCompanyByUserId", "")
  246. .then((res) => {
  247. if (res.code != 0) {
  248. uni.showToast({
  249. title: res.msg || "查询状态失败",
  250. icon: "none"
  251. });
  252. return;
  253. }
  254. this.companyinfo = res.data || {};
  255. this.$queue.setData('companyId', res.data.companyId);
  256. console.log("查询用户企业状态", this.companyinfo)
  257. })
  258. .catch((err) => {
  259. console.error("查询失败:", err);
  260. uni.showToast({
  261. title: "网络异常",
  262. icon: "none"
  263. });
  264. });
  265. },
  266. },
  267. };
  268. </script>
  269. <style scoped lang="scss">
  270. .ms-detail {
  271. position: absolute;
  272. left: 0;
  273. right: 0;
  274. bottom: 0;
  275. top: 0;
  276. display: flex;
  277. flex-direction: column;
  278. overflow: hidden;
  279. .ms-content {
  280. flex: 1;
  281. width: 100%;
  282. padding: 40rpx;
  283. box-sizing: border-box;
  284. overflow: hidden;
  285. overflow-y: auto;
  286. .ms-title {
  287. color: rgba(51, 51, 51, 1);
  288. font-family: DM Sans;
  289. font-size: 48rpx;
  290. font-weight: 700;
  291. line-height: 60rpx;
  292. }
  293. .ms-item {
  294. .ms-item-title {
  295. color: rgba(31, 44, 55, 1);
  296. font-family: DM Sans;
  297. font-size: 28rpx;
  298. font-weight: 500;
  299. line-height: 44rpx;
  300. text-align: left;
  301. display: flex;
  302. justify-content: space-between;
  303. align-items: center;
  304. margin-top: 20rpx;
  305. margin-bottom: 16rpx;
  306. .ms-title-txt {}
  307. .ms-title-icon {
  308. color: rgba(153, 153, 153, 1);
  309. font-family: DM Sans;
  310. font-size: 24rpx;
  311. font-weight: 400;
  312. line-height: 32rpx;
  313. .top {
  314. width: 28rpx;
  315. height: 18rpx;
  316. margin-left: 8rpx;
  317. }
  318. .right {
  319. width: 18rpx;
  320. height: 28rpx;
  321. margin-left: 8rpx;
  322. }
  323. }
  324. }
  325. .ms-item-content {
  326. box-sizing: border-box;
  327. border: 1rpx solid rgba(227, 231, 236, 1);
  328. border-radius: 12rpx;
  329. background: rgba(255, 255, 255, 1);
  330. padding: 36rpx;
  331. .name-content-item {
  332. display: flex;
  333. justify-content: space-between;
  334. align-items: center;
  335. padding: 9rpx 0;
  336. box-sizing: border-box;
  337. .name-item {
  338. color: rgba(153, 153, 153, 1);
  339. font-family: DM Sans;
  340. font-size: 24rpx;
  341. font-weight: 400;
  342. line-height: 32rpx;
  343. }
  344. .value-item {
  345. display: flex;
  346. justify-content: center;
  347. align-items: center;
  348. color: rgba(153, 153, 153, 1);
  349. font-family: DM Sans;
  350. font-size: 24rpx;
  351. font-weight: 400;
  352. line-height: 32rpx;
  353. letter-spacing: 0%;
  354. text {
  355. margin-right: 8rpx;
  356. }
  357. image {
  358. width: 50rpx;
  359. height: 50rpx;
  360. border-radius: 50%;
  361. margin-right: 8rpx;
  362. background: linear-gradient(90deg,
  363. rgba(13, 39, 247, 1),
  364. rgba(19, 193, 234, 1) 100%);
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. }
  372. </style>