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.

пре 2 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <template>
  2. <view class="box">
  3. <view class="screen">
  4. <!-- 录音标示 -->
  5. <view class="screen-record">
  6. <view class="screen-record-text">
  7. 最新状态
  8. </view>
  9. <view class="screen-record-tab">
  10. <scroll-view scroll-x style="width: 100%;">
  11. <view style="display: flex;">
  12. <block v-for="(item,index) in stateList" :key="index">
  13. <view style="flex-shrink: 0;"
  14. :class="[screen.state==index?'screen-record-chose':'screen-record-nochose']"
  15. @click="screen.state=index">
  16. {{item.stageName}}
  17. </view>
  18. </block>
  19. </view>
  20. </scroll-view>
  21. </view>
  22. </view>
  23. <!-- 录音标示 -->
  24. <view class="screen-record">
  25. <view class="screen-record-text">
  26. 意向级别
  27. </view>
  28. <view class="screen-record-tab">
  29. <view :class="[screen.level==1?'screen-record-chose':'screen-record-nochose']"
  30. @click="screen.level=1">
  31. A
  32. </view>
  33. <view :class="[screen.level==2?'screen-record-chose':'screen-record-nochose']"
  34. @click="screen.level=2">
  35. B
  36. </view>
  37. <view :class="[screen.level==3?'screen-record-chose':'screen-record-nochose']"
  38. @click="screen.level=3">
  39. C
  40. </view>
  41. <view :class="[screen.level==4?'screen-record-chose':'screen-record-nochose']"
  42. @click="screen.level=4">
  43. D
  44. </view>
  45. </view>
  46. </view>
  47. <!-- <view class="screen-record" style="height: auto;">
  48. <view class="screen-record-text" style="margin-bottom: 20rpx;">
  49. 客户类型
  50. </view>
  51. <u-search placeholder="请输入搜索" v-model="keyword" :clearabled="true" :show-action="false" @change="search"></u-search>
  52. <scroll-view style="height: 180rpx;" scroll-y="true" >
  53. <view class="screen-record-tab" style="flex-wrap: wrap;">
  54. <view v-for="(item,index) in customerType" :key="index">
  55. <view :class="[item.check?'screen-record-chose':'screen-record-nochose']" style="margin-bottom: 20rpx;" @click="checkbox(index)">
  56. {{item.keywords}}
  57. </view>
  58. </view>
  59. </view>
  60. </scroll-view>
  61. </view> -->
  62. <view class="screen-record">
  63. <view class="screen-record-text">
  64. 跟进内容
  65. </view>
  66. <view class="screen-record-tab">
  67. <input type="text" placeholder="请输入跟进内容" v-model="screen.con" />
  68. </view>
  69. </view>
  70. <view class="screen-foot">
  71. <view class="screen-foot-sure" @click="screensure">
  72. 保存
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. export default {
  80. data() {
  81. return {
  82. value: '',
  83. screenShow: false,
  84. selectshow: false,
  85. selectTipshow: false,
  86. buildingID: '',
  87. keyword: '',
  88. screen: {
  89. state: '0',
  90. con: "",
  91. level: '1'
  92. },
  93. stateList: [],
  94. recordList: [],
  95. nextPage: 1,
  96. totalRecord: '',
  97. freeList: [],
  98. customerType: [],
  99. customerId: ''
  100. }
  101. },
  102. onShow() {
  103. },
  104. onLoad(e) {
  105. this.customerId = e.id
  106. this.buildingID = uni.getStorageSync('buildingID').id;
  107. this.recordList = []
  108. // this.getMyCustom()
  109. // this.getFreeList()
  110. this.getNewStatus()
  111. this.getCustomerType();
  112. },
  113. methods: {
  114. //选择顾问
  115. actionSelectCallback(e) {
  116. this.screen.agentId = e[0].value;
  117. this.screen.agentIdtext = e[0].label;
  118. },
  119. getCustomerType() {
  120. this.$u.get("/customer/queryKeyWords").then(res => {
  121. res.map(item => {
  122. item.check = false
  123. })
  124. this.customerType = res;
  125. })
  126. },
  127. getNewStatus() {
  128. var that = this;
  129. let premo = {
  130. houseId: uni.getStorageSync('buildingID').id
  131. }
  132. this.$u.post('/customer/getStage', premo)
  133. .then(res => {
  134. this.stateList = res
  135. })
  136. },
  137. checkbox(idx) {
  138. console.log(idx)
  139. this.customerType[idx].check = !this.customerType[idx].check
  140. },
  141. search(e) {
  142. console.log(e)
  143. },
  144. //选择标签
  145. selectCallback(e) {
  146. console.log(e[0].label)
  147. },
  148. //筛选确认
  149. screensure() {
  150. // 获取选择过的数据
  151. // let type=[]
  152. let words = []
  153. this.customerType.map(item => {
  154. if (item.check) {
  155. // type.push(item.id)
  156. words.push(item.keywords)
  157. }
  158. })
  159. // if (words.length == 0 ) {
  160. // uni.showModal({
  161. // title: '提示',
  162. // content: '请选择、类型',
  163. // showCancel: false
  164. // });
  165. // return;
  166. // }
  167. uni.showLoading({
  168. title: "保存中~",
  169. mask: true
  170. })
  171. // console.log(type)
  172. let param = {
  173. "stageCode": this.stateList[this.screen.state].stageCode,
  174. "stageName": this.stateList[this.screen.state].stageName,
  175. "remarks": this.screen.con,
  176. words,
  177. // "settingTime":"",
  178. "agentRelationPo": {
  179. "customerId": this.customerId,
  180. "level": this.screen.level,
  181. "state": this.stateList[this.screen.state].id
  182. }
  183. }
  184. this.$u.post('/customer/addZkDailyWorkRecord', param)
  185. .then(res => {
  186. // util.showSuccess("提交成功");
  187. uni.hideLoading();
  188. uni.navigateBack();
  189. })
  190. },
  191. }
  192. }
  193. </script>
  194. <style lang="scss" scoped>
  195. .box {
  196. width: 100%;
  197. height: 100%;
  198. background: #F8F8F8;
  199. }
  200. .screen {
  201. // box-sizing: border-box;
  202. // padding: 0 30rpx;
  203. background: #FFFFFF;
  204. .screen-counselor {
  205. display: flex;
  206. height: 106rpx;
  207. // padding: 40rpx 30rpx 36rpx 30rpx;
  208. padding: 0 30rpx;
  209. box-sizing: border-box;
  210. border-bottom: 1px solid #CCCCCC;
  211. .screen-text {
  212. margin: 40rpx 0 36rpx 0;
  213. font-size: 30rpx;
  214. font-weight: 400;
  215. color: #333333;
  216. line-height: 30rpx;
  217. }
  218. .screen-sel {
  219. display: flex;
  220. justify-content: space-between;
  221. width: 500rpx;
  222. margin-left: 60rpx;
  223. .screen-sel-img {
  224. margin: 40rpx 0 36rpx 0;
  225. width: 14rpx;
  226. height: 30rpx;
  227. }
  228. .screen-inp {
  229. margin-top: 20rpx;
  230. }
  231. }
  232. }
  233. .screen-record {
  234. height: 192rpx;
  235. // width: 100%;
  236. overflow: hidden;
  237. padding: 0 30rpx;
  238. box-sizing: border-box;
  239. border-bottom: 1px solid #CCCCCC;
  240. .screen-record-text {
  241. margin-top: 36rpx;
  242. font-size: 30rpx;
  243. font-weight: 400;
  244. color: #333333;
  245. line-height: 30rpx;
  246. }
  247. .screen-record-tab {
  248. margin-top: 30rpx;
  249. display: flex;
  250. // justify-content: space-around;
  251. .screen-record-chose {
  252. width: 151rpx;
  253. height: 60rpx;
  254. background: #FFFFFF;
  255. border-radius: 4rpx;
  256. border: 1px solid #2671E2;
  257. text-align: center;
  258. line-height: 60rpx;
  259. margin-right: 22rpx;
  260. }
  261. .screen-record-nochose {
  262. width: 151rpx;
  263. height: 60rpx;
  264. background: #FFFFFF;
  265. border-radius: 4rpx;
  266. border: 1px solid #C9C9C9;
  267. text-align: center;
  268. line-height: 60rpx;
  269. margin-right: 22rpx;
  270. }
  271. }
  272. }
  273. .screen-foot {
  274. height: 88rpx;
  275. display: flex;
  276. width: 100%;
  277. margin-top: 160rpx;
  278. .screen-foot-reset {
  279. width: 80%;
  280. text-align: center;
  281. margin: 0 auto;
  282. line-height: 88rpx;
  283. font-size: 30rpx;
  284. font-weight: 400;
  285. color: #666666;
  286. }
  287. .screen-foot-sure {
  288. width: 80%;
  289. margin: 0 auto;
  290. text-align: center;
  291. line-height: 88rpx;
  292. font-size: 30rpx;
  293. font-weight: 400;
  294. color: #FFFFFF;
  295. background: #2671E2;
  296. }
  297. }
  298. }
  299. </style>