addintention.vue 30 KB

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