report.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. <template>
  2. <view class="baobei">
  3. <!-- <u-navbar :title="config.store_title" title-color="#fff" :background="{background:'#1F7EFF'}" :border-bottom="false" :isBack="false">
  4. <view class="u-flex nav-left" slot="left">
  5. <u-icon name="map-fill" size="34" color="#fff"></u-icon>
  6. <text class="text">{{defaultcity.city || '定位中'}}</text>
  7. </view>
  8. </u-navbar> -->
  9. <view class="" style="padding: 0 24rpx;">
  10. <view class="broker-title">
  11. 基本信息
  12. </view>
  13. <view class="broker-row u-flex">
  14. <view class="broker-row-left u-flex">
  15. <text>意向项目</text>
  16. </view>
  17. <text class="input-right">{{loupanname}}</text>
  18. <!-- <input type="text" placeholder="请输入您意向楼盘" class="input-right" :disabled="true" v-model="loupanname"> -->
  19. </view>
  20. <view class="broker-row u-flex">
  21. <view class="broker-row-left u-flex">
  22. <text>客户姓名</text>
  23. </view>
  24. <input type="text" placeholder="请输入" class="input-right" v-model="kehuname">
  25. </view>
  26. <view class="broker-row u-flex">
  27. <view class="broker-row-left u-flex">
  28. <text>联系方式</text>
  29. </view>
  30. <input type="number" placeholder="请输入" class="input-right" v-model="kehutel">
  31. </view>
  32. </view>
  33. <u-gap bg-color="#F5F5F5" height="20"></u-gap>
  34. <view class="" style="padding: 0 24rpx;">
  35. <view class="broker-title">
  36. 其他信息
  37. </view>
  38. <view class="broker-row u-flex">
  39. <view class="broker-row-left u-flex">
  40. <text>带看人姓名</text>
  41. </view>
  42. <input type="text" placeholder="请输入" class="input-right" v-model="name">
  43. </view>
  44. <view class="broker-row u-flex">
  45. <view class="broker-row-left u-flex">
  46. <text>联系方式</text>
  47. </view>
  48. <input type="number" placeholder="请输入" class="input-right" v-model="tel">
  49. </view>
  50. <view class="broker-row u-flex" v-if="certification_type == 1">
  51. <view class="broker-row-left u-flex">
  52. <text>中介门店</text>
  53. </view>
  54. <input type="text" placeholder="请输入" class="input-right" v-model="shop">
  55. </view>
  56. <view class="broker-row u-flex">
  57. <view class="broker-row-left u-flex">
  58. <text>预约看房日期</text>
  59. </view>
  60. <biaofunDatetimePicker ref="biaofunDatetimePicker" placeholder="请选择看房日期" class="input-right"
  61. :start="$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd hh:MM')" @change="changetime">
  62. </biaofunDatetimePicker>
  63. <!-- <input type="text" placeholder="请选择看房日期" class="input-right" :disabled="true" v-model="time"> -->
  64. <u-icon name="arrow-right" color="#CCCCCC"></u-icon>
  65. </view>
  66. </view>
  67. <view class="baobei-down u-flex-col u-col-center ">
  68. <view class="xieyi u-flex u-row-center">
  69. <u-checkbox v-model="xieyi" active-color="#1F7EFF" size="26"></u-checkbox>
  70. <view class="text" @click="xieyi = !xieyi">
  71. 勾选并同意<text @click.stop="totext(3)">《报备活动规则》</text>
  72. </view>
  73. </view>
  74. <view class="tijiao" @click="save">
  75. 确认
  76. </view>
  77. </view>
  78. <u-popup v-model="show" :maskCloseAble="false" mode="center" border-radius="20">
  79. <view @click="clear" class="" style="font-weight: 400;text-align: right;padding: 30rpx 30rpx 0 0;box-sizing: border-box;">
  80. X
  81. </view>
  82. <view class="baobei-popup u-flex-col u-col-center">
  83. <image src="../../static/images/baobei-img.png" class="image" mode=""></image>
  84. <view class="baobei-tips u-flex-col u-col-center">
  85. <text>您还未进行信息认证</text>
  86. <text>请您前去认证</text>
  87. </view>
  88. <view class="baobei-btn u-flex u-row-between">
  89. <text @click="toshenqing(2)">全民经纪人</text>
  90. <text @click="toshenqing(1)">中介经纪人</text>
  91. </view>
  92. </view>
  93. </u-popup>
  94. <u-popup v-model="showover" :closeable="true" mode="center" border-radius="20">
  95. <view class="over-popup u-flex-col u-col-center u-row-center">
  96. <u-icon name="checkmark-circle-fill" color="#14CB30" size="168"></u-icon>
  97. <view class="over-text u-flex-col u-col-center">
  98. <text>已提交客户资料,开发商审核中</text>
  99. <text>防截客锁定中,请耐心等待</text>
  100. </view>
  101. </view>
  102. </u-popup>
  103. <u-select v-model="quyushow" :list="quyulist" label-name="name" value-name="id" @confirm="changequyu">
  104. </u-select>
  105. <u-select v-model="loupanshow" :list="loupanlist" label-name="name" value-name="id" @confirm="changeloupan">
  106. </u-select>
  107. </view>
  108. </template>
  109. <script>
  110. import {
  111. mapState
  112. } from "vuex"
  113. import biaofunDatetimePicker from "../../components/biaofun-datetime-picker/biaofun-datetime-picker.vue"
  114. export default {
  115. data() {
  116. return {
  117. show: false,
  118. xieyi: false,
  119. showover: false,
  120. quyulist: [],
  121. quyushow: false,
  122. quyuname: '',
  123. quyuid: '',
  124. loupanlist: [],
  125. loupanshow: false,
  126. loupanname: '',
  127. loupanid: '',
  128. kehuname: '',
  129. kehutel: '',
  130. name: '',
  131. tel: '',
  132. shop: '',
  133. time: '',
  134. certification_type: '',
  135. quyuIpt: true,
  136. }
  137. },
  138. onLoad(option) {
  139. this.loupanid = option.id
  140. this.loupanname = uni.getStorageSync("detailName")
  141. this.getquyu()
  142. },
  143. onShow() {
  144. uni.setNavigationBarTitle({
  145. title: this.config.store_title
  146. })
  147. if (this.$islogin()) {
  148. this.show = true
  149. } else {
  150. this.getuser()
  151. }
  152. },
  153. computed: {
  154. ...mapState(['config', 'defaultcity'])
  155. },
  156. components: {
  157. biaofunDatetimePicker
  158. },
  159. methods: {
  160. totext(type) {
  161. uni.navigateTo({
  162. url: "/pages/mine/xieyi?type=" + type
  163. })
  164. },
  165. clear() {
  166. uni.switchTab({
  167. url: "/pages/index/index"
  168. })
  169. },
  170. save() {
  171. if (!this.kehuname) {
  172. this.$u.toast('请输入客户姓名')
  173. return
  174. }
  175. if (!this.$u.test.mobile(this.kehutel)) {
  176. this.$u.toast('请输入正确的客户联系方式')
  177. return
  178. }
  179. if (!this.name) {
  180. this.$u.toast('请输入带看人姓名')
  181. return
  182. }
  183. if (!this.$u.test.mobile(this.tel)) {
  184. this.$u.toast('请输入正确的带看人联系方式')
  185. return
  186. }
  187. if (!this.shop && this.certification_type == 1) {
  188. this.$u.toast('请输入中介门店')
  189. return
  190. }
  191. if (!this.time) {
  192. this.$u.toast('请选择看房日期')
  193. return
  194. }
  195. if (this.time < this.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd hh:MM:ss')) {
  196. this.$u.toast('看房日期不得小于当前时间')
  197. return
  198. }
  199. if (!this.xieyi) {
  200. this.$u.toast("请勾选协议")
  201. return
  202. }
  203. this.$u.post('/api/Report/submit_report', {
  204. // area_id: this.quyuid,
  205. property_id: this.loupanid,
  206. client_name: this.kehuname,
  207. client_phone: this.kehutel,
  208. report_name: this.name,
  209. report_phone: this.tel,
  210. shop: this.shop,
  211. time: this.time
  212. }).then(res => {
  213. if (res.code == 1) {
  214. // this.showover = true
  215. this.quyuid = ''
  216. this.quyuname = ''
  217. this.loupanid = ''
  218. this.loupanname = ''
  219. this.kehuname = ''
  220. this.kehutel = ''
  221. this.name = ''
  222. this.tel = ''
  223. this.shop = ''
  224. this.time = ''
  225. this.xieyi = false
  226. this.$refs.biaofunDatetimePicker.clearTime()
  227. this.$u.toast("已提交客户资料,开发商审核中")
  228. setTimeout(() => {
  229. uni.switchTab({
  230. url: "/pages/index/index"
  231. })
  232. }, 2000)
  233. } else {
  234. this.$u.toast(res.msg)
  235. }
  236. })
  237. },
  238. changetime(e) {
  239. this.time = `${e.f1} ${e.f8}:00`
  240. },
  241. changeloupan(e) {
  242. this.loupanid = e[0].value
  243. this.loupanname = e[0].label
  244. },
  245. changequyu(e) {
  246. this.quyuid = e[0].value
  247. this.quyuname = e[0].label
  248. this.$u.post('/api/Report/area_property_list', {
  249. area_id: this.quyuid
  250. }).then(res => {
  251. this.loupanlist = res.data
  252. })
  253. },
  254. getquyu() {
  255. this.$u.post('/api/Data/area_list', {
  256. level: 3,
  257. city_id: this.defaultcity.city_id
  258. }).then(res => {
  259. this.quyulist = res.data
  260. })
  261. },
  262. toshenqing(type) {
  263. if (this.$islogin()) return
  264. uni.navigateTo({
  265. url: "/pages/index/broker?type=" + type
  266. })
  267. },
  268. getuser() {
  269. uni.showLoading({
  270. mask: true,
  271. title: "请稍后"
  272. })
  273. this.$u.post('/api/Member/member_info').then(res => {
  274. this.certification_type = res.data.certification_type
  275. if (res.data.certification_type == 0) {
  276. this.show = true
  277. } else {
  278. this.show = false
  279. }
  280. })
  281. }
  282. },
  283. }
  284. </script>
  285. <style lang="scss">
  286. .baobei {
  287. .over-popup {
  288. width: 650rpx;
  289. height: 564rpx;
  290. background: #FFFFFF;
  291. border-radius: 20rpx;
  292. .over-text {
  293. margin-top: 32rpx;
  294. font-size: 24rpx;
  295. font-family: PingFangSC-Regular, PingFang SC;
  296. font-weight: 400;
  297. color: #999999;
  298. }
  299. }
  300. .baobei-down {
  301. position: fixed;
  302. bottom: 120rpx;
  303. left: 0;
  304. width: 750rpx;
  305. .tijiao {
  306. margin: 30rpx auto;
  307. width: 702rpx;
  308. line-height: 82rpx;
  309. background: #1F7EFF;
  310. border-radius: 8rpx;
  311. text-align: center;
  312. font-size: 28rpx;
  313. font-family: PingFangSC-Regular, PingFang SC;
  314. font-weight: 400;
  315. color: #FFFFFF;
  316. }
  317. .xieyi {
  318. .text {
  319. font-size: 20rpx;
  320. font-family: PingFangSC-Regular, PingFang SC;
  321. font-weight: 400;
  322. color: #999999;
  323. text {
  324. color: #1F7EFF;
  325. }
  326. }
  327. }
  328. }
  329. .broker-row {
  330. height: 82rpx;
  331. border-bottom: 2rpx solid #F5F5F5;
  332. .input-right {
  333. flex: 1;
  334. font-size: 24rpx;
  335. }
  336. .broker-row-left {
  337. width: 252rpx;
  338. text:first-child {
  339. font-size: 24rpx;
  340. font-family: PingFangSC-Regular, PingFang SC;
  341. font-weight: 400;
  342. color: #999999;
  343. }
  344. text:nth-child(2) {
  345. font-size: 24rpx;
  346. font-family: PingFangSC-Regular, PingFang SC;
  347. font-weight: 400;
  348. color: #F83838;
  349. }
  350. }
  351. }
  352. .broker-title {
  353. padding: 24rpx 0;
  354. font-size: 28rpx;
  355. font-family: PingFangSC-Medium, PingFang SC;
  356. font-weight: 500;
  357. color: #333333;
  358. }
  359. .baobei-popup {
  360. width: 650rpx;
  361. height: 806rpx;
  362. background: #FFFFFF;
  363. border-radius: 20rpx;
  364. padding-top: 126rpx;
  365. .baobei-btn {
  366. width: 100%;
  367. padding: 0 44rpx;
  368. text:first-child {
  369. width: 262rpx;
  370. line-height: 100rpx;
  371. background: #FFA120;
  372. border-radius: 20rpx;
  373. text-align: center;
  374. font-size: 34rpx;
  375. font-family: PingFangSC-Medium, PingFang SC;
  376. font-weight: 500;
  377. color: #FFFFFF;
  378. }
  379. text:last-child {
  380. width: 262rpx;
  381. line-height: 100rpx;
  382. background: #1F7EFF;
  383. border-radius: 20rpx;
  384. text-align: center;
  385. font-size: 34rpx;
  386. font-family: PingFangSC-Medium, PingFang SC;
  387. font-weight: 500;
  388. color: #FFFFFF;
  389. }
  390. }
  391. .baobei-tips {
  392. font-size: 28rpx;
  393. font-family: PingFangSC-Medium, PingFang SC;
  394. font-weight: 500;
  395. color: #C5C5C5;
  396. margin-bottom: 98rpx;
  397. }
  398. .image {
  399. width: 214rpx;
  400. height: 242rpx;
  401. margin-bottom: 72rpx;
  402. }
  403. }
  404. .nav-left {
  405. padding: 0 20rpx;
  406. .text {
  407. font-size: 32rpx;
  408. font-family: PingFangSC-Medium, PingFang SC;
  409. font-weight: 500;
  410. color: #FFFFFF;
  411. margin-left: 5rpx;
  412. }
  413. }
  414. }
  415. </style>