Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

addreception.vue 7.7 KiB

pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <template>
  2. <view class="cented-box">
  3. <view class="Pinspeak">客户信息</view>
  4. <view class="chented">
  5. <view class="title">
  6. <view class="titletext">客户姓名</view>
  7. <view class="titletext2">
  8. <input class="titletext-input" v-model="parames.name" placeholder-class="titletext-input" type="text" placeholder="请输入客户姓名(必填)" />
  9. </view>
  10. <view class="titleimg">
  11. <!-- <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> -->
  12. </view>
  13. </view>
  14. <view class="title">
  15. <view class="titletext">客户性别</view>
  16. <view class="titletext2 displayclick" style="display: flex;align-items: center;padding-left: 10rpx;">
  17. <view class="sexRadio" @click="changeSex(1)" :class="{active:parames.sex == 1}">男士</view>
  18. <view class="sexRadio" @click="changeSex(2)" :class="{active:parames.sex == 2}">女士</view>
  19. </view>
  20. </view>
  21. <view class="title">
  22. <view class="titletext">联系电话</view>
  23. <view class="titletext2">
  24. <input class="titletext-input" v-model="parames.phone" placeholder-class="titletext-input" type="text" placeholder="请输入联系电话" />
  25. </view>
  26. </view>
  27. <view class="title">
  28. <view class="titletext">接待人数</view>
  29. <view class="titletext2" style="display: flex;align-items: center;justify-content: space-around;">
  30. <view class="num" v-for="i in 6" :key="i" :class="{active:parames.howMany == i+1}"
  31. @click="changeHowMany(i+1)">
  32. {{i + 1}}
  33. </view>
  34. </view>
  35. </view>
  36. <view class="title" style="border: none;" @click="Buildingselection()">
  37. <view class="titletext">客户来源</view>
  38. <view class="titletext2" style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 90rpx;padding-left: 10rpx;">
  39. {{parames.sourceName||'请选择客户来源'}}
  40. </view>
  41. <view class="titleimg">
  42. <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="Pinspeak" v-if="shifoinfo==0">顾问</view>
  47. <view class="chented" v-if="shifoinfo==0" @click="clickShowhid()">
  48. <view class="title" style="border: none;">
  49. <view class="titletext">接待顾问</view>
  50. <view class="titletext2" style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 90rpx;padding-left: 10rpx;">
  51. {{text || '请选择接待顾问'}}
  52. </view>
  53. <view class="titleimg">
  54. <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="clive" @click="save">确定</view>
  59. <view v-if="Showhiddenunits">
  60. <u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list" @cancel="cancel" @confirm="confirm"></u-select>
  61. </view>
  62. <view v-if="Showhid">
  63. <u-select :mask-close-able="false" v-model="Showhid" mode="single-column" :list="freeList" @cancel="cancel1" @confirm="confirm1"></u-select>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. var app = getApp();
  69. var util = require("../../../utils/util.js");
  70. var config = require("../../../config");
  71. export default {
  72. data() {
  73. return {
  74. Showhiddenunits:false,
  75. list: [
  76. {label: '自然到访',value:'自然到访'},
  77. {label: '渠道推荐',value:'渠道推荐'},
  78. ],
  79. parames: {
  80. name: '',
  81. // 性别1男 2女
  82. sex: 1,
  83. phone: '',
  84. source: null,
  85. sourceName: null,
  86. howMany: 1,
  87. agentId:null,
  88. projectId:''
  89. },
  90. shifoinfo:0,
  91. freeList:[],
  92. Showhid:false,
  93. text:null
  94. };
  95. },
  96. onShow: function() {
  97. this.parames.projectId=uni.getStorageSync('buildingID').id;
  98. this.init()
  99. this.getFreeList();
  100. },
  101. methods: {
  102. save() {
  103. const {
  104. dataCode
  105. } = uni.getStorageSync("weapp_session_userInfo_data");
  106. if (this.parames.name.length==0) {
  107. uni.showToast({
  108. icon: "none",
  109. title: "客户姓名不能为空"
  110. })
  111. return;
  112. }
  113. if (this.parames.phone && !this.$u.test.mobile(this.parames.phone)) {
  114. uni.showToast({
  115. icon: "none",
  116. title: "手机号码格式不正确"
  117. })
  118. return;
  119. }
  120. uni.showLoading({
  121. title: "保存中",
  122. mask: true
  123. })
  124. if (dataCode == 6) {
  125. this.$u.post("/customer/gwAdd", this.parames).then(res => {
  126. uni.hideLoading();
  127. uni.showToast({
  128. icon: "none",
  129. title: "保存成功"
  130. })
  131. // uni.setStorageSync('addcustomer', true)
  132. uni.navigateBack()
  133. })
  134. } else {
  135. this.$u.post("/customer/add", this.parames).then(res => {
  136. uni.hideLoading();
  137. uni.showToast({
  138. icon: "none",
  139. title: "保存成功"
  140. })
  141. // uni.setStorageSync('addcustomer', true)
  142. uni.navigateBack()
  143. })
  144. }
  145. },
  146. changeSex(sex) {
  147. this.parames.sex = sex;
  148. },
  149. changeHowMany(num) {
  150. this.parames.howMany = num;
  151. },
  152. clickShowhid(){
  153. if(this.freeList.length==0){
  154. uni.showToast({
  155. icon:'none',
  156. title: '当前无可用排班顾问',
  157. duration: 2000
  158. });
  159. }else{
  160. this.Showhid=true;
  161. }
  162. },
  163. cancel1(){
  164. this.Showhid=false;
  165. },
  166. confirm1(e) {
  167. this.text=e[0].label;
  168. this.parames.agentId=e[0].value;
  169. this.Showhid=false;
  170. },
  171. Buildingselection(){
  172. this.Showhiddenunits=true;
  173. },
  174. cancel(){
  175. this.Showhiddenunits=false;
  176. },
  177. confirm(e) {
  178. this.parames.sourceName=e[0].value;
  179. this.Showhiddenunits=false;
  180. },
  181. init(){
  182. uni.request({
  183. url: config.service.getSelfAssignedByHouseId+"?houseId="+this.parames.projectId,
  184. method: "GET",
  185. header: {
  186. 'content-type': 'application/json',
  187. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  188. },
  189. success: (data) => {
  190. if(data.data.code==10000){
  191. this.shifoinfo=data.data.data.selfAssigned
  192. }
  193. }
  194. })
  195. },
  196. //获取顾问列表
  197. getFreeList() {
  198. this.$u.get("/zkAgentPool/freeList?itemId="+this.parames.projectId).then(res => {
  199. this.freeList = res;
  200. this.freeList.forEach(item=>{
  201. item.label=item.name;
  202. item.value=item.agentId
  203. })
  204. })
  205. },
  206. }
  207. };
  208. </script>
  209. <style lang="scss" scoped>
  210. .sexRadio{
  211. color: #BFBFBF;
  212. border: 1rpx solid #BFBFBF;
  213. font-size: 24upx;
  214. width: 100rpx;
  215. height: 43rpx;
  216. text-align: center;
  217. line-height: 40rpx;
  218. &:last-child {
  219. margin-left: 20rpx;
  220. }
  221. &.active {
  222. color: #2B6FFF;
  223. border-color: #2B6FFF;
  224. }
  225. }
  226. .num {
  227. width: 50rpx;
  228. height: 50rpx;
  229. background: rgba(43, 110, 253, 0.1);
  230. color: #2B6EFD;
  231. font-size: 30rpx;
  232. display: flex;
  233. align-items: center;
  234. justify-content: center;
  235. &.active {
  236. background: #2B6EFD;
  237. color: #FFFFFF;
  238. }
  239. }
  240. .cented-box{
  241. background: #F8F8F8;
  242. width: 100%;
  243. height: 100vh;
  244. }
  245. .Pinspeak{
  246. width: 100%;
  247. height: 92rpx;
  248. border-bottom: 1rpx solid #E0E0E0;
  249. font-size: 32rpx;
  250. font-weight: 500;
  251. color: #333333;
  252. text-indent: 30rpx;
  253. line-height: 92rpx;
  254. background: #FFFFFF;
  255. margin-top: 20rpx;
  256. }
  257. .chented{
  258. width: 100%;
  259. padding-left: 30rpx;
  260. padding-right: 30rpx;
  261. background-color: #FFFFFF;
  262. .title{
  263. width: 100%;
  264. height: 90rpx;
  265. border-bottom: 1rpx solid #E0E0E0;
  266. display: flex;
  267. align-items: center;
  268. .titletext{
  269. width: 21%;
  270. height: 90rpx;
  271. font-size: 30rpx;
  272. font-weight: 400;
  273. color: #333333;
  274. line-height: 90rpx;
  275. text-indent: 10rpx;
  276. }
  277. .titletext2{
  278. width: 71%;
  279. height: 90rpx;
  280. }
  281. .titletext-input{
  282. width: 100%;
  283. height: 90rpx;
  284. font-size: 30rpx;
  285. font-weight: 400;
  286. color: #B2B2B2;
  287. line-height: 90rpx;
  288. padding-left: 10rpx;
  289. }
  290. .titleimg{
  291. width: 8%;
  292. text-align: right;
  293. .titleimg1{
  294. width: 16rpx;
  295. height: 36rpx;
  296. }
  297. }
  298. }
  299. }
  300. .clive{
  301. width: 690rpx;
  302. height: 88rpx;
  303. background: #2671E2;
  304. text-align: center;
  305. line-height: 88rpx;
  306. color: #FFFFFF;
  307. border-radius: 8rpx;
  308. margin: 0 auto;
  309. margin-top: 300rpx;
  310. font-size: 32rpx;
  311. }
  312. </style>