mymechantsdetails.vue 28 KB

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