AI销管
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

298 lines
6.6 KiB

  1. <template>
  2. <view class="cented-box">
  3. <view class="chented" style="margin-bottom: 26rpx;">
  4. <view class="title" style="border: none;">
  5. <view class="titletext">姓名</view>
  6. <view class="titletext2">
  7. <input maxlength="10" class="titletext-input" style="color: #333333;" v-model="parames.name"
  8. placeholder-class="titletext-input" placeholder-style="color:#B2B2B2;" type="text"
  9. placeholder="请输入客户姓名(必填)" />
  10. </view>
  11. <view class="titleimg">
  12. <!-- <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> -->
  13. </view>
  14. </view>
  15. </view>
  16. <view class="chented">
  17. <view class="title">
  18. <view class="titletext">性别</view>
  19. <view class="titletext2 displayclick" style="display: flex;align-items: center;padding-left: 10rpx;">
  20. <view class="sexRadio" @click="changeSex(1)" :class="{active:parames.sex == 1}">男士</view>
  21. <view class="sexRadio" @click="changeSex(2)" :class="{active:parames.sex == 2}">女士</view>
  22. </view>
  23. </view>
  24. <view class="title">
  25. <view class="titletext">到访人数</view>
  26. <view class="titletext2" style="display: flex;align-items: center;justify-content: space-around;">
  27. <view class="num" v-for="i in 6" :key="i" :class="{active:parames.howMany == i+1}"
  28. @click="changeHowMany(i+1)">
  29. {{i + 1}}
  30. </view>
  31. </view>
  32. </view>
  33. <view class="title" @click="Buildingselection()">
  34. <view class="titletext">到访途径</view>
  35. <view class="titletext2"
  36. style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 110rpx;padding-left: 10rpx;">
  37. <!-- {{parames.sourceName||'请选择客户来源'}} -->
  38. <text v-if="parames.sourceName" style="color: #333333;">{{parames.sourceName}}</text>
  39. <text v-else>请选择客户来源</text>
  40. </view>
  41. <view class="titleimg">
  42. <image class="titleimg1" src="../../static/images/arrow.png" mode=""></image>
  43. </view>
  44. </view>
  45. <!-- <view class="title" style="border: none;" @click="Buildingselection()">
  46. <view class="titletext">咨询业务</view>
  47. <view class="titletext2"
  48. style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 110rpx;padding-left: 10rpx;">
  49. <text v-if="parames.sourceName" style="color: #333333;">{{parames.sourceName}}</text>
  50. <text v-else>请选择咨询业务</text>
  51. </view>
  52. <view class="titleimg">
  53. <image class="titleimg1" src="../../static/images/arrow.png" mode=""></image>
  54. </view>
  55. </view> -->
  56. </view>
  57. <!-- <view class="clive" @click="save">提交</view> -->
  58. <button class="clive" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" @click="save">提交</button>
  59. <view v-if="Showhiddenunits">
  60. <u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list"
  61. @cancel="cancel" @confirm="confirm"></u-select>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. var app = getApp();
  67. var config = require("@/config");
  68. export default {
  69. data() {
  70. return {
  71. Showhiddenunits: false,
  72. list: [{
  73. label: '自然到访',
  74. value: '自然到访'
  75. },
  76. {
  77. label: '渠道推荐',
  78. value: '渠道推荐'
  79. },
  80. ],
  81. parames: {
  82. name: '',
  83. // 性别1男 2女
  84. sex: 1,
  85. sourceName: null,
  86. howMany: 1,
  87. agentId: null,
  88. projectId: '',
  89. phone:''
  90. },
  91. daitiReceptionobj: {},
  92. };
  93. },
  94. onShow() {
  95. this.parames.projectId = uni.getStorageSync('buildingID').id;
  96. },
  97. // agentId: null
  98. // howMany: 1
  99. // name: "1111"
  100. // phone: "17622221111"
  101. // projectId: "256142e1e2cb47b4a979d56ec9644545"
  102. // sex: 1
  103. // sourceName: "自然到访"
  104. methods: {
  105. save() {
  106. if (this.parames.name.length == 0) {
  107. uni.showToast({
  108. icon: "none",
  109. title: "姓名不能为空"
  110. })
  111. return;
  112. }
  113. // uni.getUserInfo({
  114. // success(e) {
  115. // console.log(e)
  116. // }
  117. // })
  118. },
  119. getPhoneNumber(e){
  120. if (this.parames.name.length == 0) {
  121. uni.showToast({
  122. icon: "none",
  123. title: "姓名不能为空",
  124. })
  125. return;
  126. }else{
  127. if(e.detail.errMsg=="getPhoneNumber:ok"){
  128. this.parames.phone = e.detail.errMsg
  129. this.$u.post("/customer/add", this.parames).then(res => {
  130. if(res.code == 10000){
  131. uni.navigateTo({
  132. url:'/pages/mine/registerResult'
  133. })
  134. }
  135. })
  136. }else{
  137. return;
  138. }
  139. }
  140. },
  141. changeSex(sex) {
  142. this.parames.sex = sex;
  143. },
  144. changeHowMany(num) {
  145. this.parames.howMany = num;
  146. },
  147. Buildingselection() {
  148. this.Showhiddenunits = true;
  149. },
  150. cancel() {
  151. this.Showhiddenunits = false;
  152. },
  153. confirm(e) {
  154. this.parames.sourceName = e[0].value;
  155. this.Showhiddenunits = false;
  156. },
  157. }
  158. };
  159. </script>
  160. <style lang="scss" scoped>
  161. .sexRadio {
  162. color: #BFBFBF;
  163. border: 1rpx solid #BFBFBF;
  164. font-size: 24upx;
  165. width: 120rpx;
  166. height: 60rpx;
  167. text-align: center;
  168. display: flex;
  169. align-items: center;
  170. justify-content: center;
  171. &:last-child {
  172. margin-left: 20rpx;
  173. }
  174. &.active {
  175. background: #2B6FFF;
  176. color: #fff;
  177. border-color: #2B6FFF;
  178. }
  179. }
  180. .num {
  181. width: 50rpx;
  182. height: 50rpx;
  183. background: rgba(43, 110, 253, 0.1);
  184. color: #2B6EFD;
  185. font-size: 30rpx;
  186. display: flex;
  187. align-items: center;
  188. justify-content: center;
  189. &.active {
  190. background: #2B6EFD;
  191. color: #FFFFFF;
  192. }
  193. }
  194. .cented-box {
  195. background: #F8F8F8;
  196. width: 100%;
  197. height: 100vh;
  198. }
  199. .Pinspeak {
  200. width: 100%;
  201. height: 92rpx;
  202. border-bottom: 1rpx solid #E0E0E0;
  203. font-size: 32rpx;
  204. font-weight: bold;
  205. color: #333333;
  206. text-indent: 30rpx;
  207. line-height: 92rpx;
  208. background: #FFFFFF;
  209. margin-top: 20rpx;
  210. padding-left: 10rpx;
  211. }
  212. .chented {
  213. width: 100%;
  214. padding-left: 30rpx;
  215. padding-right: 30rpx;
  216. background-color: #FFFFFF;
  217. .title {
  218. width: 100%;
  219. height: 110rpx;
  220. border-bottom: 1rpx solid #E0E0E0;
  221. display: flex;
  222. align-items: center;
  223. .titletext {
  224. width: 21%;
  225. height: 110rpx;
  226. font-size: 30rpx;
  227. font-weight: 400;
  228. color: #333333;
  229. line-height: 110rpx;
  230. text-indent: 10rpx;
  231. }
  232. .titletext2 {
  233. width: 71%;
  234. height: 110rpx;
  235. }
  236. .titletext-input {
  237. width: 100%;
  238. height: 110rpx;
  239. font-size: 30rpx;
  240. font-weight: 400;
  241. color: #B2B2B2;
  242. line-height: 110rpx;
  243. padding-left: 10rpx;
  244. }
  245. .titleimg {
  246. width: 8%;
  247. text-align: right;
  248. .titleimg1 {
  249. width: 16rpx;
  250. height: 36rpx;
  251. }
  252. }
  253. }
  254. }
  255. .clive {
  256. position: absolute;
  257. bottom: 32rpx;
  258. left: 30rpx;
  259. right: 30rpx;
  260. width: 690rpx;
  261. height: 88rpx;
  262. background: #2671E2;
  263. text-align: center;
  264. line-height: 88rpx;
  265. color: #FFFFFF;
  266. border-radius: 8rpx;
  267. font-size: 32rpx;
  268. }
  269. </style>