dmChengjiao2Screen.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. <template>
  2. <dm-pop-view ref='popView' title="筛选" :isShowConfirm="false" :maskTapHide='true'>
  3. <scroll-view class="screen_container" scroll-y="true">
  4. <dm-time-level-screen :isChengjiao2="true" :sortType="sortType" :queryDateType="queryDateType" @queryDateTypeAction="queryDateTypeAction" @sortTypeAction="sortTypeAction"></dm-time-level-screen>
  5. <dm-date-screen style="margin-top: 40rpx;" :defaultParameter="tempDefaultParameter" @screenDateAction="screenDateAction"></dm-date-screen>
  6. <view class="screen_item_title">成交进度</view>
  7. <view class="level_tag_view">
  8. <text class="level_tag" :style="{ color: item.isSelect ? '#fff' : '#666', 'background-color': item.isSelect ? themeColor : '#F1F5F9' }"
  9. v-for="(item, i) in progressList" :key="i" @click="selectProgress(item)">
  10. <view class="level_tag_title">
  11. {{ item.title }}
  12. </view>
  13. <view class="level_tag_subTitle" v-if="item.subTitle!=null">
  14. ({{item.subTitle}})
  15. </view>
  16. </text>
  17. </view>
  18. <view class="screen_item_title">成交业态</view>
  19. <view class="level_tag_view">
  20. <view class="level_tag" :style="{ color: item.isSelect ? '#fff' : '#666', 'background-color': item.isSelect ? themeColor : '#F1F5F9' }"
  21. v-for="(item, i) in yetaiList" :key="i" @click="selectYetai(item)">
  22. <view class="level_tag_title">
  23. {{ item.title }}
  24. </view>
  25. <view class="level_tag_subTitle" v-if="item.subTitle!=null">
  26. ({{item.subTitle}})
  27. </view>
  28. </view>
  29. </view>
  30. <view class="screen_item_title">成交构成</view>
  31. <view class="level_tag_view">
  32. <text class="level_tag" :style="{ color: item.isSelect ? '#fff' : '#666', 'background-color': item.isSelect ? themeColor : '#F1F5F9' }"
  33. v-for="(item, i) in gouchengList" :key="i" @click="selectGoucheng(item)">
  34. <view class="level_tag_title">
  35. {{ item.title }}
  36. </view>
  37. <view class="level_tag_subTitle" v-if="item.subTitle!=null">
  38. ({{item.subTitle}})
  39. </view>
  40. </text>
  41. </view>
  42. <view class="reportOrganize" @click="selectChengjiaoType" v-if="formType == 2 || formType == 3">
  43. <view class="organizeName">
  44. {{formTypeResponseSelect != null ? formTypeResponseSelect.title : formType == 2 ? '请选择推荐成交类型': '请选择报备成交类型'}}
  45. </view>
  46. <image class="organizeIcon" src="../../static/icons/icon_aboutUs_DropDown.png" mode=""></image>
  47. </view>
  48. </scroll-view>
  49. <dm-picker-view ref="formTypeResponsePicker" :options="formTypeResponse" :value="formTypeResponseSelect != null ? formTypeResponseSelect.value : 0" :title="formType == 2 ? '请选择推荐成交类型': '请选择报备成交类型'" @confirm="confirmAction"></dm-picker-view>
  50. <view class="bottom_btn" style="margin-top: 60rpx;">
  51. <text class="reset_btn" :style="{'background-color':themeColor25}" @click="resetAction">重置</text>
  52. <text class="pop_btn" :style="{'background-color':themeColor}" @click="sureAction">确定</text>
  53. </view>
  54. </dm-pop-view>
  55. </template>
  56. <script>
  57. import dmPopView from './dmPopView.vue'
  58. import dmPickerView from './dmPickerView.vue'
  59. import dmTimeLevelScreen from './dmTimeLevelScreen.vue'
  60. import dmDateScreen from './dmDateScreen.vue'
  61. let app = getApp();
  62. export default {
  63. props: {
  64. houseId: {
  65. type: [String, Number],
  66. default: ''
  67. },
  68. defaultParameter: Object,
  69. sortSel: [Number, String],
  70. timeLevelSel: [Number, String]
  71. },
  72. data() {
  73. return {
  74. themeColor: null,
  75. fuzhuColor: null,
  76. themeColor50: null,
  77. themeColor25: null,
  78. fuzhuColor50: null,
  79. progressList: [], // 成交进度
  80. yetaiList: [], // 成交业态
  81. gouchengList: [] ,// 成交构成
  82. formTypeResponse: [],
  83. changjiaoTypeList: [],
  84. formTypeResponseSelect: null,
  85. formType: 0,
  86. sortType: 0,
  87. queryDateType: 0,
  88. tempDefaultParameter: null
  89. }
  90. },
  91. mounted() {
  92. this.themeColor = app.globalData.themeColor
  93. this.themeColor50 = app.globalData.themeColor50
  94. this.themeColor25 = app.globalData.themeColor25
  95. this.fuzhuColor = app.globalData.fuzhuColor
  96. this.fuzhuColor50 = app.globalData.fuzhuColor50
  97. this.resetAction()
  98. },
  99. methods: {
  100. show() {
  101. this.$refs.popView.show()
  102. },
  103. // 正序、倒叙
  104. sortTypeAction(e) {
  105. // this.$emit('sortTypeAction', e)
  106. // debugger
  107. this.sortType = e
  108. },
  109. // 选择时间维度(条件)
  110. queryDateTypeAction(e) {
  111. // this.$emit('queryDateTypeAction', e)
  112. this.queryDateType = e
  113. },
  114. // 选择时间
  115. screenDateAction(val, start, end) {
  116. // this.$emit('screenDateAction', val, start, end)
  117. this.tempDefaultParameter = {
  118. value: this.tempDefaultParameter.value,
  119. dateType: val,
  120. startDate: start,
  121. endDate: end,
  122. terminal: this.tempDefaultParameter.terminal
  123. }
  124. },
  125. selectProgress(e) {
  126. if (e.value == 0) {
  127. this.progressList.forEach((item) => {
  128. item.isSelect = false
  129. })
  130. this.progressList[0].isSelect = true
  131. }
  132. else {
  133. this.progressList[0].isSelect = false
  134. var isHave = false
  135. this.progressList.forEach((item, idx) => {
  136. if (e.value == item.value) {
  137. item.isSelect = !item.isSelect
  138. }
  139. if (item.isSelect) {
  140. isHave = true
  141. }
  142. })
  143. if (!isHave) {
  144. this.progressList[0].isSelect = true
  145. }
  146. }
  147. },
  148. selectYetai(e) {
  149. if (e.value == 0) {
  150. this.yetaiList.forEach((item) => {
  151. item.isSelect = false
  152. })
  153. this.yetaiList[0].isSelect = true
  154. }
  155. else {
  156. this.yetaiList[0].isSelect = false
  157. var isHave = false
  158. this.yetaiList.forEach((item, idx) => {
  159. if (e.value == item.value) {
  160. item.isSelect = !item.isSelect
  161. }
  162. if (item.isSelect) {
  163. isHave = true
  164. }
  165. })
  166. if (!isHave) {
  167. this.yetaiList[0].isSelect = true
  168. }
  169. }
  170. },
  171. selectGoucheng(e) {
  172. var self = this
  173. this.gouchengList.forEach((item, idx) => {
  174. item.isSelect = false
  175. if (e.value == item.value) {
  176. item.isSelect = true
  177. self.formType = item.value
  178. self.formTypeResponseSelect = null
  179. if (item.value == 2 || item.value == 3) {
  180. self.getDealFormTips(item.value)
  181. }
  182. }
  183. })
  184. },
  185. async getDealFormTips(type) {
  186. var tempformType = 1
  187. if (type == 2) { // 推荐成交
  188. tempformType = 1
  189. }
  190. else {// 报备成交
  191. tempformType = 2
  192. }
  193. let res = await this.$myRequest({
  194. url: '/elab-marketing-user/dealLedger/getDealFormTips',
  195. data: {
  196. houseId: this.houseId,
  197. formType: tempformType,
  198. dateType: this.defaultParameter.dateType,
  199. mindate: this.defaultParameter.startDate,
  200. maxdate: this.defaultParameter.endDate,
  201. timeDimension: this.queryDateType
  202. }
  203. })
  204. if (res.data.success && res.data.single) {
  205. this.formTypeResponse = res.data.single.formTypeResponse || []
  206. if (res.data.single.showXsxcx == 1) {
  207. var dic = {
  208. relationMess: "线上小程序用户",
  209. relationOrganizeName: '',
  210. relationOrganizeType: ''
  211. }
  212. this.formTypeResponse.push(dic)
  213. }
  214. this.formTypeResponse.forEach((item, idx) => {
  215. item['title'] = item.relationMess
  216. item['value'] = idx
  217. })
  218. this.$forceUpdate()
  219. }
  220. },
  221. selectChengjiaoType() {
  222. this.$refs.formTypeResponsePicker.show()
  223. },
  224. confirmAction(e) {
  225. console.log('选择类型:', e)
  226. this.formTypeResponseSelect = e.selItem
  227. },
  228. resetAction() {
  229. this.progressList = [
  230. {title: '全部', isSelect: true, value: 0},
  231. {title: '认购', isSelect: false, value: 1},
  232. {title: '签约', isSelect: false, value: 2},
  233. {title: '已结首付', isSelect: false, value: 3},
  234. {title: '已结全款', isSelect: false, value: 4},
  235. {title: '已退房', isSelect: false, value: 6},
  236. ]
  237. this.yetaiList = [
  238. {title: '全部', isSelect: true, value: 0},
  239. {title: '住宅', isSelect: false, value: 1},
  240. {title: '公寓', isSelect: false, value: 2},
  241. {title: '商业', isSelect: false, value: 3},
  242. {title: '写字楼', isSelect: false, value: 4},
  243. {title: '公共配套', isSelect: false, value: 5},
  244. {title: '地下室', subTitle: '不含车位', isSelect: false, value: 6},
  245. {title: '政策住宅', isSelect: false, value: 7},
  246. {title: '车位', isSelect: false, value: 8},
  247. {title: '其他', isSelect: false, value: 9},
  248. ]
  249. this.gouchengList = [
  250. {title: '全部', isSelect: true, value: 0},
  251. {title: '其他自然成交', isSelect: false, value: 1},
  252. {title: '推荐成交', isSelect: false, value: 2},
  253. {title: '报备成交', isSelect: false, value: 3},
  254. {title: '线上自然成交', isSelect: false, value: 4},
  255. {title: '自然到访成交', isSelect: false, value: 5},
  256. ]
  257. this.formTypeResponseSelect = null
  258. this.formTypeResponse = []
  259. this.tempDefaultParameter = JSON.parse(JSON.stringify(this.defaultParameter))
  260. this.sortType = this.sortSel
  261. this.queryDateType = this.timeLevelSel
  262. },
  263. sureAction() {
  264. var transactionProgressList = []
  265. this.progressList.forEach((item) => {
  266. if (item.isSelect) {
  267. transactionProgressList.push(item.value)
  268. }
  269. })
  270. var productTypeList = []
  271. this.yetaiList.forEach((item) => {
  272. if (item.isSelect) {
  273. productTypeList.push(item.value)
  274. }
  275. })
  276. var screenParmas = {
  277. timeLevelSel: this.queryDateType,
  278. sortSel: this.sortType,
  279. defaultParameter: this.tempDefaultParameter,
  280. //成交进度
  281. transactionProgress: transactionProgressList || [0],
  282. // 成交业态
  283. productType: productTypeList || [0],
  284. // 成交构成
  285. formType: this.formType,
  286. relationOrganizeName: this.formTypeResponseSelect != null ? this.formTypeResponseSelect.relationOrganizeName : null,
  287. relationOrganizeType: this.formTypeResponseSelect != null ? this.formTypeResponseSelect.relationOrganizeType : null,
  288. }
  289. this.$emit('screenAction', screenParmas)
  290. this.$refs.popView.hide()
  291. }
  292. },
  293. components: {
  294. dmPopView,
  295. dmPickerView,
  296. dmTimeLevelScreen,
  297. dmDateScreen
  298. },
  299. watch: {
  300. defaultParameter: {
  301. handler(e) {
  302. this.tempDefaultParameter = JSON.parse(JSON.stringify(e))
  303. if (this.formType == 2 || this.formType == 3) {
  304. self.getDealFormTips(this.formType)
  305. }
  306. },
  307. deep: true,
  308. immediate: true
  309. },
  310. timeLevelSel: {
  311. handler(e) {
  312. this.queryDateType = e
  313. this.$forceUpdate()
  314. },
  315. immediate: true
  316. },
  317. sortSel: {
  318. handler(e) {
  319. this.sortType = e
  320. this.$forceUpdate()
  321. },
  322. immediate: true
  323. }
  324. }
  325. }
  326. </script>
  327. <style scoped lang="scss">
  328. .screen_container {
  329. position: relative;
  330. margin-bottom: 190rpx;
  331. width: 750rpx;
  332. max-height: 1000rpx;
  333. .screen_item_title {
  334. margin-left: 30rpx;
  335. margin-top: 54rpx;
  336. line-height: 44rpx;
  337. font-size: 32rpx;
  338. font-family: Verdana, Verdana-Bold;
  339. font-weight: 700;
  340. text-align: left;
  341. color: #454545;
  342. }
  343. .level_tag_view {
  344. margin-left: 30rpx;
  345. margin-top: 0rpx;
  346. display: flex;
  347. flex-wrap: wrap;
  348. .level_tag {
  349. margin-right: 16rpx;
  350. width: 220rpx;
  351. height: 72rpx;
  352. border-radius: 12rpx;
  353. margin-top: 20rpx;
  354. display: flex;
  355. flex-direction: column;
  356. justify-content: center;
  357. align-items: center;
  358. .level_tag_title {
  359. font-size: 28rpx;
  360. font-family: Verdana, Verdana-Regular;
  361. font-weight: 400;
  362. text-align: center;
  363. }
  364. .level_tag_subTitle {
  365. margin-top: -5rpx;
  366. font-size: 20rpx;
  367. font-family: Verdana, Verdana-Regular;
  368. font-weight: 400;
  369. text-align: center;
  370. }
  371. }
  372. }
  373. .reportOrganize {
  374. margin-top: 20rpx;
  375. margin-left: 30rpx;
  376. margin-right: 30rpx;
  377. padding: 0 30rpx;
  378. box-sizing: border-box;
  379. border-radius: 16rpx;
  380. background-color: #F1F5F9;
  381. height: 94rpx;
  382. display: flex;
  383. justify-content: space-between;
  384. align-items: center;
  385. line-height: 94rpx;
  386. .organizeName {
  387. font-size: 28rpx;
  388. font-family: Verdana, Verdana-Regular;
  389. font-weight: 400;
  390. text-align: left;
  391. color: #666666;
  392. }
  393. .organizeIcon {
  394. width: 14rpx;
  395. height: 9rpx;
  396. }
  397. }
  398. .screen_item_sub {
  399. margin-top: 8rpx;
  400. margin-bottom: 40rpx;
  401. margin-left: 30rpx;
  402. line-height: 34rpx;
  403. font-size: 24rpx;
  404. font-family: Verdana, Verdana-Regular;
  405. font-weight: 400;
  406. text-align: left;
  407. color: #999999;
  408. }
  409. .score_view {
  410. margin-top: 30rpx;
  411. margin-bottom: 120rpx;
  412. display: flex;
  413. justify-content: center;
  414. align-items: center;
  415. height: 82rpx;
  416. .score_text {
  417. font-size: 70rpx;
  418. font-family: 'DIN Alternate', 'DIN Alternate-Bold';
  419. font-weight: 700;
  420. }
  421. .score_unit {
  422. padding-top: 25rpx;
  423. font-size: 28rpx;
  424. font-family: Verdana, Verdana-Regular;
  425. font-weight: 400;
  426. }
  427. }
  428. }
  429. .bottom_btn {
  430. display: flex;
  431. justify-content: center;
  432. position: fixed;
  433. width: 100%;
  434. left: 0;
  435. bottom: 60rpx;
  436. .reset_btn {
  437. width: 156rpx;
  438. height: 80rpx;
  439. border-radius: 40rpx;
  440. font-size: 28rpx;
  441. font-family: Verdana, Verdana-Bold;
  442. font-weight: 700;
  443. text-align: center;
  444. line-height: 80rpx;
  445. color: #666666;
  446. }
  447. .pop_btn {
  448. margin-left: 30rpx;
  449. width: 444rpx;
  450. height: 80rpx;
  451. border-radius: 40rpx;
  452. font-size: 28rpx;
  453. font-family: Verdana, Verdana-Bold;
  454. font-weight: 700;
  455. text-align: center;
  456. line-height: 80rpx;
  457. color: #ffffff;
  458. }
  459. }
  460. </style>