addintention.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227
  1. <template>
  2. <div class="addintention">
  3. <div class="form">
  4. <uni-forms label-width="100%">
  5. <uni-forms-item label="企业名称:">
  6. <!-- v-model="form.saleCpName" -->
  7. <input
  8. type="text"
  9. v-model="form.saleCpName"
  10. class="inputstyle"
  11. placeholder="请输入"
  12. />
  13. </uni-forms-item>
  14. <uni-forms-item label="关联企业">
  15. <input
  16. type="text"
  17. v-model="form.companyId"
  18. class="inputstyle"
  19. placeholder="请输入"
  20. />
  21. </uni-forms-item>
  22. <uni-forms-item label="企业联系人">
  23. <input
  24. v-model="form.projectManager"
  25. class="inputstyle"
  26. placeholder="请输入"
  27. />
  28. </uni-forms-item>
  29. <uni-forms-item label="联系电话:">
  30. <input
  31. v-model="form.managerPhone"
  32. class="inputstyle"
  33. placeholder="请输入"
  34. />
  35. </uni-forms-item>
  36. <uni-forms-item label="总计划投资">
  37. <input
  38. v-model="form.totalInvestment"
  39. class="inputstyle"
  40. placeholder="请输入"
  41. />
  42. </uni-forms-item>
  43. <uni-forms-item label="拟使用载体/地块(m²)">
  44. <input
  45. v-model="form.landArea"
  46. class="inputstyle"
  47. placeholder="请输入"
  48. />
  49. </uni-forms-item>
  50. </uni-forms>
  51. </div>
  52. <div class="form">
  53. <uni-forms label-width="100%">
  54. <uni-forms-item label="信息来源部门:">
  55. <picker
  56. class="pickerstyle"
  57. immediate-change="true"
  58. range-key="text"
  59. @change="getMessageSourceDept"
  60. :range="MESSAGE_SOURCE_DEPT"
  61. >
  62. <view class="picklabel">
  63. {{
  64. !form.messageSourceDeptName
  65. ? "请选择"
  66. : form.messageSourceDeptName
  67. }}
  68. </view>
  69. </picker>
  70. <!-- <uni-data-select
  71. v-model="messageSourceDept"
  72. :localdata="MESSAGE_SOURCE_DEPT"
  73. @change="getMessageSourceDept"
  74. ></uni-data-select> -->
  75. </uni-forms-item>
  76. <uni-forms-item label="信息来源人:">
  77. <input
  78. v-model="form.messageSourcePeople"
  79. class="inputstyle"
  80. placeholder="请输入"
  81. />
  82. </uni-forms-item>
  83. <uni-forms-item label="跟踪人">
  84. <input
  85. v-model="form.manageTrackingUserId"
  86. class="inputstyle"
  87. placeholder="请输入"
  88. />
  89. <!-- <uni-data-select
  90. v-model="form.manageTrackingUserId"
  91. :localdata="trackUserList"
  92. @change="getManageTrackingUserId"
  93. ></uni-data-select> -->
  94. </uni-forms-item>
  95. <uni-forms-item label="相关部门">
  96. <picker
  97. class="pickerstyle"
  98. range-key="text"
  99. @change="getRelevantDepId"
  100. :range="aboutDept"
  101. >
  102. <view class="picklabel">
  103. {{ !form.relevantDepName ? "请选择" : form.relevantDepName }}
  104. </view>
  105. </picker>
  106. <!-- <uni-data-select
  107. v-model="form.industryCategory"
  108. :localdata="aboutDept"
  109. ></uni-data-select> -->
  110. </uni-forms-item>
  111. </uni-forms>
  112. </div>
  113. <div class="list">
  114. <div class="project-column pdt32 pdl32 pdr32 border_bottom_ccc">
  115. <div
  116. class="pdb16 height50rpx chuzuborder lh50rpx disflex align_items_center"
  117. >
  118. <div class="lh50rpx">关联房源</div>
  119. <van-icon
  120. name="add"
  121. class="ml16"
  122. size="50rpx"
  123. color="#2527AA"
  124. @click="jumpChosseHouse('房源')"
  125. />
  126. </div>
  127. </div>
  128. <div
  129. class="list-row"
  130. v-if="fangyuanList.length != 0"
  131. v-for="(item, index) in fangyuanList"
  132. :key="item.id"
  133. >
  134. <div class="cell_1">
  135. <div class="width100 height50rpx mgb20">
  136. <div class="first_title float_left">
  137. {{ item.roomString }}
  138. </div>
  139. <div
  140. class="status_label txt_center width20 float_left"
  141. v-if="item.reservationStatus == 1"
  142. >
  143. 意向
  144. </div>
  145. <div
  146. class="status_label txt_center width20 float_left"
  147. v-if="item.reservationStatus == 2"
  148. >
  149. 锁定
  150. </div>
  151. <div
  152. class="status_label txt_center width20 float_left"
  153. v-if="item.reservationStatus == 3"
  154. >
  155. 预约
  156. </div>
  157. <div
  158. class="status_label txt_center width20 float_left"
  159. v-if="item.reservationStatus == 4"
  160. >
  161. 到期时间
  162. </div>
  163. <div
  164. class="status_label txt_center width20 float_left"
  165. v-if="item.reservationStatus == 5"
  166. >
  167. 签约
  168. </div>
  169. <div
  170. class="status_label txt_center width20 float_left"
  171. v-if="item.reservationStatus == 6"
  172. >
  173. 签约合同
  174. </div>
  175. <div
  176. class="status_label txt_center width20 float_left"
  177. v-if="item.reservationStatus == 7"
  178. >
  179. 锁定到期
  180. </div>
  181. </div>
  182. <div class="width100 height40rpx pdb16 border_bottom_ccc">
  183. <div class="second_title height40rpx">
  184. 到期日期:{{ !item.endTime ? "暂无" : item.endTime }}
  185. </div>
  186. </div>
  187. <div class="button_list pdb20 pdt20">
  188. <div class="bottom_cell">
  189. <div class="button_row" @click="fangyuanListSplice(index)">
  190. 解绑
  191. </div>
  192. <div class="button_row">
  193. <picker
  194. mode="date"
  195. :value="date"
  196. @change="getChooseTime($event, index, 2)"
  197. >
  198. 锁定
  199. </picker>
  200. </div>
  201. <div class="button_row">
  202. <picker
  203. mode="date"
  204. :value="date"
  205. @change="getChooseTime($event, index, 3)"
  206. >
  207. 预约
  208. </picker>
  209. </div>
  210. <div class="button_row" @click="signing(index)">签约</div>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. <div class="form">
  217. <uni-forms label-width="100%">
  218. <uni-forms-item label="项目名称:">
  219. <input
  220. v-model="form.projectName"
  221. class="inputstyle"
  222. placeholder="请输入"
  223. />
  224. </uni-forms-item>
  225. <uni-forms-item label="产业类别">
  226. <!-- <uni-data-select
  227. v-model="form.industryCategory"
  228. :localdata="INDUSTRY_CATEGORY"
  229. ></uni-data-select> -->
  230. <picker
  231. class="pickerstyle"
  232. range-key="text"
  233. @change="getIndustryCategory"
  234. :range="INDUSTRY_CATEGORY"
  235. >
  236. <view class="picklabel">
  237. {{
  238. !form.industryCategoryName
  239. ? "请选择"
  240. : form.industryCategoryName
  241. }}
  242. </view>
  243. </picker>
  244. </uni-forms-item>
  245. <uni-forms-item label="项目类型">
  246. <picker
  247. class="pickerstyle"
  248. range-key="text"
  249. @change="getProjectType"
  250. :range="PROJECT_TYPE"
  251. >
  252. <view class="picklabel">
  253. {{ !form.projectTypeName ? "请选择" : form.projectTypeName }}
  254. </view>
  255. </picker>
  256. </uni-forms-item>
  257. <uni-forms-item label="项目简介:">
  258. <uni-easyinput
  259. type="textarea"
  260. class="bgcF9F9F9 height218rpx"
  261. v-model="form.projectInfo"
  262. placeholder="请输入"
  263. />
  264. </uni-forms-item>
  265. <uni-forms-item label="租赁需求:">
  266. <uni-easyinput
  267. type="textarea"
  268. class="bgcF9F9F9 height218rpx"
  269. v-model="form.leaseRequirements"
  270. placeholder="请输入"
  271. />
  272. </uni-forms-item>
  273. </uni-forms>
  274. </div>
  275. <div class="form" style="padding-bottom: 192rpx">
  276. <uni-forms ref="baseForm" label-width="100%">
  277. <uni-forms-item label="目前阶段:">
  278. <uni-data-checkbox
  279. style="padding: 8rpx 0 8rpx 0"
  280. v-model="form.projectStatus"
  281. mode="tag"
  282. :localdata="muqianjieduan"
  283. selectedTextColor="#1D18BC"
  284. selectedColor="rgba(29,24,188,0.05);"
  285. @change="getjieduan"
  286. />
  287. </uni-forms-item>
  288. <uni-forms-item
  289. label="签约载体:"
  290. required
  291. v-if="form.projectStatus == 3"
  292. >
  293. <van-icon
  294. @click="jumpChosseHouse('载体')"
  295. name="add"
  296. class="marginl8"
  297. size="40rpx"
  298. color="#2527AA"
  299. style="position: absolute; top: -28px; left: 68px"
  300. />
  301. <div class="zaiti_list">
  302. <div
  303. v-for="(item, index) in zaitiList"
  304. :key="index"
  305. style="display: flex"
  306. >
  307. <div class="pdb8 zaiti ml16 float_left">
  308. {{ item.roomString }}#
  309. </div>
  310. <van-icon
  311. class="ml8 float_left"
  312. name="clear"
  313. size="50rpx"
  314. color="#777777"
  315. @click="zaitiListSplice(index)"
  316. />
  317. </div>
  318. </div>
  319. </uni-forms-item>
  320. <uni-forms-item label="备注:">
  321. <uni-easyinput
  322. type="textarea"
  323. class="bgcF9F9F9 height218rpx"
  324. v-model="form.projectRemark"
  325. placeholder="请输入"
  326. />
  327. </uni-forms-item>
  328. </uni-forms>
  329. </div>
  330. <choose-time @getEndTime="getEndTime()" ref="chooseTime"></choose-time>
  331. <view class="‘btn-view‘">
  332. <div class="btn" @click="addyixiang()">添加</div>
  333. </view>
  334. </div>
  335. </template>
  336. <script>
  337. import tools from "../../subPackages/components/tkitree/tools.js";
  338. import vantUploader from "../../../wxcomponents/weapp/dist/uploader";
  339. import chooseTime from "./chooseTime.vue";
  340. import {
  341. getSelectUserTwo,
  342. getSelectDeptTwo,
  343. findRoomInfoListByIds,
  344. findCompanyList,
  345. addyixiang,
  346. findDeptList,
  347. getByCodes,
  348. findTrackUserList,
  349. } from "@/js_sdk/http";
  350. export default {
  351. name: "addintention",
  352. components: {
  353. chooseTime,
  354. vantUploader,
  355. },
  356. data() {
  357. return {
  358. dic_key: [
  359. "PROJECT_TYPE",
  360. "project_status",
  361. "INDUSTRY_CATEGORY",
  362. "MESSAGE_SOURCE_DEPT",
  363. ],
  364. saleCpName: "",
  365. dic_SelectList: {},
  366. show: false,
  367. aboutDept: [],
  368. defaultSelected: [],
  369. companyList_index: 0,
  370. companyList: [],
  371. range: [],
  372. fileList: [],
  373. fangyuanList: [],
  374. zaitiList: [],
  375. messageSourceDept: null,
  376. messageSourceDeptName: null,
  377. manageTrackingUserId: null,
  378. form: {
  379. manageTrackingUserId: null,
  380. manageTrackingUserId: null,
  381. messageSourceDept: null,
  382. messageSourceDeptName: null,
  383. createdBy: "",
  384. projectType: 1,
  385. successTime: "",
  386. companyId: null,
  387. xiangguanren: "",
  388. xinxidengji: "",
  389. xiangmudengji: "",
  390. relevantUserId: "",
  391. manageMessengerId: "",
  392. xiangmudengjiIds: "",
  393. genzongbumen: "",
  394. manageTrackingDepId: "",
  395. xiangguanbumen: "",
  396. relevantDepId: "",
  397. fangyuanListIds: "",
  398. successSaleRoomList: "",
  399. projectManager: "",
  400. managerPhone: "",
  401. projectName: "",
  402. projectInfo: "",
  403. leaseRequirements: "",
  404. },
  405. currentDate: new Date().getTime(),
  406. minDate: new Date().getTime(),
  407. formatter(type, value) {
  408. if (type === "year") {
  409. return `${value}年`;
  410. }
  411. if (type === "month") {
  412. return `${value}月`;
  413. }
  414. return value;
  415. },
  416. value: null,
  417. rules: {
  418. // 对name字段进行必填验证
  419. name: {
  420. rules: [
  421. {
  422. required: true,
  423. errorMessage: "请输入",
  424. },
  425. {
  426. minLength: 3,
  427. maxLength: 5,
  428. errorMessage: "姓名长度在 {minLength} 到 {maxLength} 个字符",
  429. },
  430. ],
  431. },
  432. // 对email字段进行必填验证
  433. email: {
  434. rules: [
  435. {
  436. format: "email",
  437. errorMessage: "请输入正确的邮箱地址",
  438. },
  439. ],
  440. },
  441. },
  442. INDUSTRY_CATEGORY: [],
  443. PROJECT_TYPE: [],
  444. range: [
  445. { value: 0, text: "篮球" },
  446. { value: 1, text: "足球" },
  447. { value: 2, text: "游泳" },
  448. ],
  449. muqianjieduan: [],
  450. MESSAGE_SOURCE_DEPT: [],
  451. trackUserList: [],
  452. };
  453. },
  454. onLoad(option) {
  455. let that = this;
  456. if (option.ids != "null" && option.id) {
  457. findRoomInfoListByIds(option.ids).then((data) => {
  458. // that.fangyuanList = [];
  459. data.forEach((a) => {
  460. that.fangyuanList.push(a);
  461. });
  462. that.fangyuanList = that.fangyuanList;
  463. for (let i = 0; i < that.fangyuanList.length; i++) {
  464. for (let j = i + 1; j < that.fangyuanList.length; j++) {
  465. if (that.fangyuanList[i].id == that.fangyuanList[j].id) {
  466. if (!that.fangyuanList[i].endTime) {
  467. that.fangyuanList.splice(i, 1);
  468. } else if (!that.fangyuanList[j].endTime) {
  469. that.fangyuanList.splice(j, 1);
  470. } else {
  471. that.fangyuanList.splice(j, 1);
  472. }
  473. }
  474. }
  475. }
  476. that.fangyuanListIds = "";
  477. that.fangyuanListIds = e.result.join(",");
  478. });
  479. }
  480. that.findCompanyList();
  481. that.form.createdBy = JSON.parse(
  482. uni.getStorageSync("laocui_user_info")
  483. ).user.id;
  484. that.findDeptList();
  485. that.getByCodes();
  486. that.findTrackUserList();
  487. uni.$on("getuser", function (e) {
  488. console.log(e);
  489. findRoomInfoListByIds(e.result.join(",")).then((data) => {
  490. if (e.type == "房源") {
  491. // that.fangyuanList = [];
  492. console.log({ data });
  493. let fangyuanList = [...that.fangyuanList, ...data];
  494. console.log(fangyuanList);
  495. // data.forEach((a) => {
  496. // that.fangyuanList.push(a);
  497. // });
  498. for (let i = 0; i < fangyuanList.sort().length; i++) {
  499. for (let j = 1; j < fangyuanList.sort().length; j++) {
  500. console.log(i, j);
  501. if (i != j && fangyuanList[i].id === fangyuanList[j].id) {
  502. console.log(i);
  503. fangyuanList.splice(i, 1);
  504. j--;
  505. }
  506. }
  507. }
  508. console.log({ fangyuanList });
  509. that.fangyuanList = [];
  510. that.fangyuanList = fangyuanList;
  511. that.fangyuanListIds = "";
  512. that.fangyuanListIds = e.result.join(",");
  513. }
  514. if (e.type == "载体") {
  515. let all = [...that.zaitiList, ...data];
  516. // for (let i = 0; i < all.length; i++) {
  517. // for (let j = 1; j < all.length; j++) {
  518. // if (all[i] == all[j]) {
  519. // all.splice(i, 1);
  520. // }
  521. // }
  522. // }
  523. for (let i = 0; i < all.sort().length; i++) {
  524. for (let j = i + 1; j < all.sort().length; j++) {
  525. if (all[i].id == all[j].id) {
  526. all.splice(i, 1);
  527. j--;
  528. }
  529. }
  530. }
  531. that.zaitiList = all;
  532. // that.form.successSaleRoomList = "";
  533. // that.form.successSaleRoomList = e.result.join(",");
  534. }
  535. });
  536. });
  537. },
  538. onShow() {
  539. let that = this;
  540. console.log(123);
  541. },
  542. methods: {
  543. getChooseTime(event, i, type) {
  544. console.log({ event, i, type });
  545. this.fangyuanList[i].endTime = "";
  546. this.fangyuanList[i].reservationStatus = "";
  547. this.fangyuanList[i].reservationStatus = type;
  548. this.fangyuanList[i].endTime = event.detail.value;
  549. this.$forceUpdate();
  550. },
  551. async findTrackUserList() {
  552. let data = await findTrackUserList();
  553. this.trackUserList = data.map((e) => {
  554. return {
  555. text: e.truename,
  556. value: e.id,
  557. };
  558. });
  559. console.log(data);
  560. },
  561. getMessageSourceDept(e) {
  562. console.log("MESSAGE_SOURCE_DEPT", this.MESSAGE_SOURCE_DEPT);
  563. let { detail } = e;
  564. let text = this.MESSAGE_SOURCE_DEPT[detail.value].text;
  565. let value = this.MESSAGE_SOURCE_DEPT[detail.value].value;
  566. this.form.messageSourceDept = value;
  567. this.form.messageSourceDeptName = text;
  568. this.$forceUpdate();
  569. },
  570. getIndustryCategory(e) {
  571. // 产业类别
  572. let { detail } = e;
  573. let text = this.INDUSTRY_CATEGORY[detail.value].text;
  574. let value = this.INDUSTRY_CATEGORY[detail.value].value;
  575. this.form.industryCategory = value;
  576. this.form.industryCategoryName = text;
  577. this.$forceUpdate();
  578. },
  579. getRelevantDepId(e) {
  580. let { detail } = e;
  581. let text = this.aboutDept[detail.value].text;
  582. let value = this.aboutDept[detail.value].value;
  583. console.log("valuevaluevalue", value);
  584. this.form.relevantDepId = value;
  585. this.form.relevantDepName = text;
  586. this.$forceUpdate();
  587. },
  588. getProjectType(e) {
  589. let { detail } = e;
  590. let text = this.PROJECT_TYPE[detail.value].text;
  591. let value = this.PROJECT_TYPE[detail.value].value;
  592. this.form.projectType = value;
  593. this.form.projectTypeName = text;
  594. this.$forceUpdate();
  595. },
  596. getManageTrackingUserId(e) {
  597. let { detail } = e;
  598. console.log(
  599. "this.trackUserList[detail.value]",
  600. this.trackUserList[detail.value]
  601. );
  602. let text = this.trackUserList[detail.value].text;
  603. let value = this.trackUserList[detail.value].value;
  604. this.form.manageTrackingUserId = value;
  605. this.form.manageTrackingUserId = text;
  606. this.$forceUpdate();
  607. },
  608. async getByCodes() {
  609. let data = await getByCodes(JSON.stringify(this.dic_key));
  610. console.log(data);
  611. this.dic_SelectList = this.$common.handleDicList(data);
  612. this.INDUSTRY_CATEGORY = this.dic_SelectList.INDUSTRY_CATEGORY.map(
  613. (e) => {
  614. return {
  615. text: e.label,
  616. value: e.value,
  617. };
  618. }
  619. );
  620. this.PROJECT_TYPE = this.dic_SelectList.PROJECT_TYPE.map((e) => {
  621. return {
  622. text: e.label,
  623. value: e.value,
  624. };
  625. });
  626. this.muqianjieduan = this.dic_SelectList.project_status.map((e) => {
  627. return {
  628. text: e.label,
  629. value: e.value,
  630. };
  631. });
  632. console.log("this.muqianjieduan", this.muqianjieduan);
  633. this.MESSAGE_SOURCE_DEPT = this.dic_SelectList.MESSAGE_SOURCE_DEPT.map(
  634. (e) => {
  635. return {
  636. text: e.label,
  637. value: e.value,
  638. };
  639. }
  640. );
  641. console.log(this.dic_SelectList);
  642. },
  643. async findDeptList() {
  644. let aboutDept = await findDeptList();
  645. this.aboutDept = aboutDept.map((e) => {
  646. return {
  647. text: e.deptName,
  648. label: e.deptName,
  649. value: e.id,
  650. };
  651. });
  652. this.aboutDept = [
  653. ...this.aboutDept,
  654. {
  655. text: "红沙湾服务中心",
  656. label: "红沙湾服务中心",
  657. value: "红沙湾服务中心",
  658. },
  659. { text: "经济发展局", label: "经济发展局", value: "经济发展局" },
  660. { text: "产业集团", label: "产业集团", value: "产业集团" },
  661. { text: "招商局", label: "招商局", value: "招商局" },
  662. ];
  663. },
  664. confirm(e) {
  665. var xiangguanbumen = [];
  666. var relevantDepId = [];
  667. for (var p in e) {
  668. xiangguanbumen.push(e[p].label);
  669. relevantDepId.push(e[p].value);
  670. }
  671. this.form.xiangguanbumen = xiangguanbumen.join(",");
  672. this.form.relevantDepId = relevantDepId.join(",");
  673. },
  674. chosseAboutCompany() {
  675. this.show = true;
  676. },
  677. signing(i) {
  678. let that = this;
  679. if (that.zaitiList.length > 0) {
  680. let isReport = false;
  681. for (let index = 0; index < that.zaitiList.length; index++) {
  682. if (that.zaitiList[index].id === that.fangyuanList[i].id) {
  683. that.$showToast("该载体已存在与签约载体列表内");
  684. isReport = true;
  685. return;
  686. }
  687. }
  688. if (!isReport) {
  689. that.zaitiList.push(this.fangyuanList[i]);
  690. }
  691. } else {
  692. that.zaitiList.push(this.fangyuanList[i]);
  693. }
  694. },
  695. getEndTime(i, time, type) {
  696. this.fangyuanList[i].endTime = "";
  697. this.fangyuanList[i].reservationStatus = "";
  698. this.fangyuanList[i].reservationStatus = type;
  699. this.fangyuanList[i].endTime = time;
  700. this.$forceUpdate();
  701. },
  702. yuyueChooseTime(i, type) {
  703. this.$refs.chooseTime.onOpen(i, type);
  704. },
  705. fangyuanListSplice(i) {
  706. let that = this;
  707. uni.showModal({
  708. title: "提示",
  709. content: "解绑后该房源将从项目绑定记录中删除,是否确认?",
  710. cancelText: "取消", // 取消按钮的文字
  711. confirmText: "确认", // 确认按钮的文字
  712. showCancel: true, // 是否显示取消按钮,默认为 true
  713. success: (res) => {
  714. if (res.confirm) {
  715. that.fangyuanList.splice(i, 1);
  716. this.$showToast("已删除");
  717. } else {
  718. }
  719. },
  720. });
  721. },
  722. getjieduan(e) {
  723. console.log(this.form.projectStatus);
  724. },
  725. deleteFileList(event) {
  726. this.fileList.splice(event.detail.index, 1);
  727. },
  728. async addyixiang() {
  729. let that = this;
  730. let saleRoomList;
  731. if (that.fangyuanList && that.fangyuanList.length > 0) {
  732. saleRoomList = that.fangyuanList.map((e) => {
  733. return {
  734. remark: !e.roomString ? null : e.roomString,
  735. reservationStatus: !e.reservationStatus ? 1 : e.reservationStatus,
  736. parkRoomId: e.id,
  737. endTime: !e.endTime ? null : e.endTime,
  738. successStatus: null,
  739. };
  740. });
  741. } else {
  742. saleRoomList = [];
  743. }
  744. let successSaleRoomList;
  745. if (that.zaitiList && that.zaitiList.length > 0) {
  746. successSaleRoomList = that.zaitiList.map((e) => {
  747. return {
  748. remark: !e.roomString ? "" : e.roomString,
  749. reservationStatus: !e.reservationStatus ? 1 : e.reservationStatus,
  750. parkRoomId: e.id,
  751. endTime: !e.endTime ? null : e.endTime,
  752. successStatus: null,
  753. };
  754. });
  755. } else {
  756. successSaleRoomList = [];
  757. }
  758. let successPictureAddress = [];
  759. if (that.fileList.length > 0) {
  760. successPictureAddress = that.fileList.map((e) => {
  761. return {
  762. name: e.name,
  763. size: e.size,
  764. url: e.imgUrl,
  765. };
  766. });
  767. }
  768. let data = await addyixiang({
  769. ...that.form,
  770. saleRoomList: JSON.stringify(saleRoomList),
  771. successPictureAddress: JSON.stringify(successPictureAddress),
  772. successSaleRoomList: JSON.stringify(successSaleRoomList),
  773. successRoom: this.zaitiList
  774. .map((e) => {
  775. return e.roomString;
  776. })
  777. .join(","),
  778. });
  779. console.log(JSON.stringify(successPictureAddress));
  780. console.log(successPictureAddress);
  781. if (data.code == 200) {
  782. uni.navigateBack({});
  783. } else {
  784. that.$showToast(data.msg);
  785. }
  786. },
  787. getQymc(index) {
  788. let that = this;
  789. that.form.companyId = that.companyList[index].id;
  790. return that.companyList[index].qymc;
  791. },
  792. bindPickerChange(e) {
  793. let that = this;
  794. that.companyList_index = e.detail.value;
  795. },
  796. async findCompanyList() {
  797. let data = await findCompanyList();
  798. this.companyList = data;
  799. this.companyList[0].id;
  800. },
  801. zaitiListSplice(index) {
  802. this.zaitiList.splice(index, 1);
  803. },
  804. // /wx/SaleController/findRoomInfoListByIds
  805. async findRoomInfoListByIds() {
  806. let data = await findRoomInfoListByIds(ids);
  807. return data;
  808. },
  809. xiangmudengji(e) {
  810. var names = [];
  811. var ids = [];
  812. for (var p in e) {
  813. if (e[p].type == "u") {
  814. names.push(e[p].name);
  815. ids.push(e[p].id);
  816. }
  817. }
  818. this.form.xiangmudengji = names.join(",");
  819. this.form.xiangmudengjiIds = ids.join(",");
  820. },
  821. selectGenzongDep(e) {
  822. var names = [];
  823. var ids = [];
  824. for (var p in e) {
  825. names.push(e[p].name);
  826. ids.push(e[p].id);
  827. }
  828. this.form.genzongbumen = names[names.length - 1];
  829. this.form.manageTrackingDepId = ids[ids.length - 1];
  830. },
  831. selectXiangguanDep(e) {
  832. var names = [];
  833. var ids = [];
  834. for (var p in e) {
  835. names.push(e[p].name);
  836. ids.push(e[p].id);
  837. }
  838. this.form.xiangguanbumen = names.join(",");
  839. this.form.relevantDepId = ids.join(",");
  840. },
  841. selectDengjiyuan(e) {
  842. var names = [];
  843. var ids = [];
  844. for (var p in e) {
  845. if (e[p].type == "u") {
  846. names.push(e[p].name);
  847. ids.push(e[p].id);
  848. }
  849. }
  850. this.form.xinxidengji = names.join(",");
  851. this.form.manageMessengerId = ids.join(",");
  852. },
  853. userSelectorConfirm(e) {
  854. var names = [];
  855. var ids = [];
  856. for (var p in e) {
  857. if (e[p].type == "u") {
  858. names.push(e[p].name);
  859. ids.push(e[p].id);
  860. }
  861. }
  862. this.form.xiangguanren = names.join(",");
  863. this.form.relevantUserId = ids.join(",");
  864. },
  865. // 取消回调事件
  866. treeCancel(e) {},
  867. async getSelectUserTwo(key) {
  868. let that = this;
  869. let departmentList = await getSelectUserTwo("");
  870. that.range = tools.transData(
  871. departmentList.data,
  872. "id",
  873. "parentid",
  874. "children"
  875. );
  876. that.$refs[key]._show();
  877. },
  878. async getSelectDeptTwo(key) {
  879. let that = this;
  880. let departmentList = await getSelectDeptTwo("");
  881. that.range = tools.transData(
  882. departmentList.data,
  883. "id",
  884. "parentid",
  885. "children"
  886. );
  887. that.$refs[key]._show();
  888. },
  889. jumpChosseHouse(e) {
  890. uni.navigateTo({
  891. url: "/pages/subPackages/chosseHouse/chosseHouse?type=" + e,
  892. });
  893. },
  894. afterRead(event) {
  895. let that = this;
  896. const { file } = event.detail;
  897. uni.uploadFile({
  898. url: that.$constant.BASE_URI + "/wx/fileController/upload2",
  899. filePath: file.url,
  900. name: "file",
  901. formData: { user: "test" },
  902. success(res) {
  903. // 上传完成需要更新 fileList
  904. let data = JSON.parse(res.data);
  905. that.fileList.push({
  906. name: JSON.parse(data.data[0]).name,
  907. size: JSON.parse(data.data[0]).size,
  908. imgUrl: "/FileController/download/" + data.data[1],
  909. url:
  910. that.$constant.BASE_URI +
  911. "/FileController/download/" +
  912. data.data[1],
  913. isImage: true,
  914. });
  915. },
  916. fail(res) {},
  917. });
  918. },
  919. beforeRead(event) {
  920. const { file, callback } = event.detail;
  921. callback(file.type === "image");
  922. },
  923. binddata() {},
  924. submit() {},
  925. },
  926. };
  927. </script>
  928. <style lang="scss">
  929. .inputstyle {
  930. border-color: #e5e5e5;
  931. background-color: #fff;
  932. display: flex;
  933. box-sizing: border-box;
  934. flex-direction: row;
  935. align-items: center;
  936. border: 1px solid #dcdfe6;
  937. border-radius: 4px;
  938. padding-left: 10px;
  939. font-size: 14px;
  940. }
  941. .pickerstyle {
  942. border-color: #e5e5e5;
  943. background-color: #fff;
  944. display: flex;
  945. box-sizing: border-box;
  946. flex-direction: row;
  947. align-items: center;
  948. border: 1px solid #dcdfe6;
  949. border-radius: 4px;
  950. padding-left: 10px;
  951. font-size: 14px;
  952. .picklabel {
  953. height: auto;
  954. padding-top: 15rpx;
  955. background: none;
  956. padding-bottom: 15rpx;
  957. color: #606266;
  958. width: 600rpx;
  959. }
  960. }
  961. .form_row {
  962. height: 40rpx;
  963. font-weight: 400;
  964. font-size: 24rpx;
  965. }
  966. .uni-select__selector {
  967. /* #ifndef APP-NVUE */
  968. box-sizing: border-box;
  969. /* #endif */
  970. position: absolute;
  971. top: calc(100% + 12px);
  972. left: 0;
  973. width: 100%;
  974. background-color: #ffffff;
  975. border: 1px solid #ebeef5;
  976. border-radius: 6px;
  977. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  978. z-index: 99999 !important;
  979. padding: 4px 0;
  980. }
  981. .addintention {
  982. .btn-view {
  983. width: 100%;
  984. height: 100rpx;
  985. padding: 20rpx 10%;
  986. background-color: #ffffff;
  987. position: fixed;
  988. bottom: 0;
  989. left: 0;
  990. z-index: 9999;
  991. }
  992. .inputstyle {
  993. border: 1px solid #dcdfe6;
  994. border-radius: 4px;
  995. height: 35px;
  996. line-height: 1;
  997. display: flex;
  998. align-items: center;
  999. }
  1000. .btn {
  1001. width: 80%;
  1002. height: 90rpx;
  1003. border-radius: 50rpx 50rpx 50rpx 50rpx;
  1004. background: #1d18bc;
  1005. line-height: 90rpx;
  1006. text-align: center;
  1007. color: white;
  1008. }
  1009. .uni-forms-item__label {
  1010. text {
  1011. font-size: 28rpx;
  1012. font-weight: 500;
  1013. //color: #333333;
  1014. }
  1015. }
  1016. .zaiti_list {
  1017. width: 100%;
  1018. min-height: 50rpx;
  1019. line-height: 50rpx;
  1020. }
  1021. .zaiti {
  1022. color: #777777;
  1023. }
  1024. .zaiti:first-child {
  1025. margin: 0 !important;
  1026. }
  1027. .bottom_cell {
  1028. float: right;
  1029. width: 100%;
  1030. height: 42rpx;
  1031. display: flex;
  1032. justify-content: flex-end;
  1033. }
  1034. .button_row {
  1035. color: #1d18bc;
  1036. width: 96rpx;
  1037. height: 42rpx;
  1038. border-radius: 60rpx 60rpx 60rpx 60rpx;
  1039. opacity: 1;
  1040. margin-left: 16rpx;
  1041. float: left;
  1042. text-align: center;
  1043. line-height: 42rpx;
  1044. font-size: 24rpx;
  1045. border: 2rpx solid #1d18bc;
  1046. }
  1047. .project-column {
  1048. border-radius: 8rpx 8rpx 0rpx 0rpx;
  1049. //height: 44rpx;
  1050. font-size: 32rpx;
  1051. font-family: PingFang SC-Medium, PingFang SC;
  1052. font-weight: 500;
  1053. color: #333333;
  1054. background: #ffffff;
  1055. }
  1056. .status_label {
  1057. width: 96rpx;
  1058. height: 50rpx;
  1059. line-height: 50rpx;
  1060. background: rgba(29, 24, 188, 0.05);
  1061. color: #1d18bc;
  1062. font-weight: 500;
  1063. font-size: 24rpx;
  1064. border-radius: 8rpx 8rpx 8rpx 8rpx;
  1065. }
  1066. .first_title {
  1067. line-height: 50rpx;
  1068. font-weight: 500;
  1069. }
  1070. .uni-forms-item {
  1071. display: block !important;
  1072. margin: 0;
  1073. }
  1074. .addyixiang {
  1075. color: #3f3fb4;
  1076. background: #eaeaf2;
  1077. width: 170rpx;
  1078. height: 50rpx;
  1079. text-align: center;
  1080. line-height: 50rpx;
  1081. border: 2rpx #a6a6a9 dashed;
  1082. }
  1083. .list-row {
  1084. width: calc(100% - 64rpx);
  1085. padding: 16rpx 32rpx 18rpx 32rpx;
  1086. background: #ffffff;
  1087. margin-bottom: 16rpx;
  1088. display: flex;
  1089. //height: 278rpx;
  1090. border-radius: 8rpx 8rpx 8rpx 8rpx;
  1091. }
  1092. .icon_phone {
  1093. }
  1094. .list-row {
  1095. width: calc(100% - 64rpx);
  1096. padding: 32rpx 32rpx 38rpx 32rpx;
  1097. background: #ffffff;
  1098. margin-bottom: 16rpx;
  1099. display: flex;
  1100. //height: 278rpx;
  1101. border-radius: 8rpx 8rpx 8rpx 8rpx;
  1102. }
  1103. .mb32rpx {
  1104. margin-bottom: 32rpx;
  1105. }
  1106. .second_title {
  1107. float: left;
  1108. font-size: 28rpx;
  1109. font-family: PingFang SC-Medium, PingFang SC;
  1110. font-weight: 500;
  1111. color: #777777;
  1112. width: 100%;
  1113. }
  1114. .call_icon {
  1115. height: 40rpx;
  1116. width: 40rpx;
  1117. margin-top: -5rpx;
  1118. margin-left: 5rpx;
  1119. float: left;
  1120. }
  1121. .second_title_2 {
  1122. float: left;
  1123. width: 38%;
  1124. font-size: 28rpx;
  1125. font-family: PingFang SC-Medium, PingFang SC;
  1126. font-weight: 500;
  1127. text-align: right;
  1128. color: #777777;
  1129. }
  1130. .list {
  1131. width: calc(100% - 64rpx);
  1132. margin: 32rpx;
  1133. }
  1134. .form {
  1135. width: calc(100% - 128rpx);
  1136. margin: 32rpx;
  1137. background: #ffffff;
  1138. padding: 32rpx;
  1139. .label {
  1140. height: 53rpx;
  1141. line-height: 53rpx;
  1142. }
  1143. }
  1144. .checklist-box {
  1145. margin: 0 !important;
  1146. margin-right: 16rpx !important;
  1147. }
  1148. .labelcolmt26 {
  1149. .van-cell {
  1150. padding: 0 0 0 28rpx !important;
  1151. }
  1152. .van-col {
  1153. margin-top: 26rpx !important;
  1154. }
  1155. label {
  1156. color: #333333;
  1157. font-size: 30rpx;
  1158. margin-top: 10rpx !important;
  1159. }
  1160. .uni-data-checklist {
  1161. margin-top: -10rpx !important;
  1162. }
  1163. }
  1164. .status {
  1165. .uni-data-checklist {
  1166. margin-top: 0rpx !important;
  1167. }
  1168. label {
  1169. color: #333333;
  1170. font-size: 30rpx;
  1171. padding-right: 0rpx !important;
  1172. }
  1173. }
  1174. }
  1175. </style>