add.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318
  1. <template>
  2. <view class="container qualifications" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0' }">
  3. <view class="remarks-content-club" @click="handleClickClunInfo">
  4. <view class="content-club-le">
  5. <view class="club-le-text">
  6. <text class="label">机构名称:</text> <text class="text">{{ clubInfo.name }}</text>
  7. </view>
  8. <view class="club-le-text">
  9. <text class="label">联系人:</text> <text class="text">{{ clubInfo.linkMan }}</text>
  10. <text class="label phone">手机号:</text> <text class="text">{{ clubInfo.contractMobile }}</text>
  11. </view>
  12. <view class="club-le-text">
  13. <text class="label">地址:</text>
  14. <text class="text" v-if="clubInfo.provincialAddress"
  15. >{{ clubInfo.provincialAddress }}{{ clubInfo.address }}</text
  16. >
  17. </view>
  18. </view>
  19. <view class="content-club-ri"> <text class="iconfont icon-xiayibu"></text> </view>
  20. </view>
  21. <view class="remarks-content">
  22. <view class="list-view-title">
  23. <view class="list-view-h1"><text>*</text>沟通情况:</view>
  24. </view>
  25. <view class="remarks-category">
  26. <radio-group @change="radioChange">
  27. <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
  28. <radio
  29. :value="item.value"
  30. style="transform:scale(0.7)"
  31. color="#FF5B00"
  32. :checked="index === current"
  33. />
  34. <label :for="item.value" class="label">
  35. <text>{{ item.name }}</text>
  36. </label>
  37. </label>
  38. </radio-group>
  39. <checkbox-group v-if="current === 0" style="margin-top: 10rpx;">
  40. <label class="label">
  41. <checkbox value="cb" style="transform:scale(0.7)" color="#FF5B00" />电话
  42. </label>
  43. <label class="label">
  44. <checkbox value="cb" style="transform:scale(0.7)" color="#FF5B00" />微信
  45. </label>
  46. </checkbox-group>
  47. </view>
  48. <view class="list-view-title">
  49. <view class="list-view-h1"><text>*</text>咨询人:</view>
  50. </view>
  51. <view class="remarks-input">
  52. <input
  53. class="input"
  54. type="text"
  55. v-model="remarksParams.questionMan"
  56. value=""
  57. placeholder="请输入和你聊天的客户姓名"
  58. maxlength="15"
  59. />
  60. </view>
  61. <view class="list-view-title"> <view class="list-view-h1">客户来源:</view> </view>
  62. <view class="list-view-radio">
  63. <picker @change="bindPickerChange(4, $event)" :value="index" :range="sourceActions" range-key="name">
  64. <input
  65. class="input"
  66. type="text"
  67. disabled="false"
  68. v-model="sourceStateText"
  69. value=""
  70. placeholder="请选择"
  71. />
  72. <text class="iconfont icon-xiangyou"></text>
  73. </picker>
  74. </view>
  75. <view class="list-view-title"> <view class="list-view-h1">客户性别:</view> </view>
  76. <view class="list-view-radio">
  77. <picker @change="bindPickerChange(5, $event)" :value="index" :range="genderActions" range-key="name">
  78. <input
  79. class="input"
  80. type="text"
  81. disabled="false"
  82. v-model="genderText"
  83. value=""
  84. placeholder="请选择"
  85. />
  86. <text class="iconfont icon-xiangyou"></text>
  87. </picker>
  88. </view>
  89. <view class="list-view-title"> <view class="list-view-h1">客户年龄:</view> </view>
  90. <view class="list-view-radio">
  91. <picker @change="bindPickerChange(6, $event)" :value="index" :range="ageActions" range-key="name">
  92. <input class="input" type="text" disabled="false" v-model="ageText" value="" placeholder="请选择" />
  93. <text class="iconfont icon-xiangyou"></text>
  94. </picker>
  95. </view>
  96. <view class="list-view-title"> <view class="list-view-h1">加群情况:</view> </view>
  97. <view class="list-view-radio">
  98. <picker @change="bindPickerChange(7, $event)" :value="index" :range="additiveActions" range-key="name">
  99. <input
  100. class="input"
  101. type="text"
  102. disabled="false"
  103. v-model="additiveText"
  104. value=""
  105. placeholder="请选择"
  106. />
  107. <text class="iconfont icon-xiangyou"></text>
  108. </picker>
  109. </view>
  110. <view class="list-view-title">
  111. <view class="list-view-h1"><text>*</text>咨询类别:</view>
  112. </view>
  113. <view class="remarks-category">
  114. <view
  115. class="checkbox-list"
  116. :class="category.isChecked ? 'checked' : ''"
  117. v-for="(category, index) in categorys"
  118. :key="index"
  119. @click="choiceCategorys(category, index)"
  120. >
  121. <text class="iconfont" :class="category.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"></text>
  122. {{ category.className }}
  123. </view>
  124. </view>
  125. <!-- <view class="list-view-title"> <view class="list-view-h1">机构类型:</view> </view>
  126. <view class="remarks-input">
  127. <input
  128. class="input"
  129. type="text"
  130. v-model="remarksParams.clubType"
  131. value=""
  132. placeholder="如美甲店,医院"
  133. maxlength="15"
  134. />
  135. </view> -->
  136. <view class="list-view-title"> <view class="list-view-h1">咨询商品:</view> </view>
  137. <view class="tui-remarks-content">
  138. <view class="tui-remarks-goods-input" v-if="handleGoods.length === 0" @click="handleShowGoodPopup">
  139. <view class="input-add"> <text class="iconfont icon-jiahao"></text> </view>
  140. <view class="input-text"> 点击添加客户咨询的商品 </view>
  141. </view>
  142. <view class="tui-remarks-showgoods" v-else>
  143. <view class="tui-remarks-goods" v-for="(pros, index) in handleGoods" :key="index">
  144. <view class="goods-image"> <image :src="pros.image" mode=""></image> </view>
  145. <view class="goods-main">
  146. <view class="name"> {{ pros.name }} </view>
  147. <view class="shop"> 供应商:{{ pros.shopName }} </view>
  148. </view>
  149. </view>
  150. <view class="tui-remarks-btn">
  151. <view class="btn delete" @click="handleClean">删除</view>
  152. <view class="btn update" @click="handleShowGoodPopup">更换</view>
  153. </view>
  154. </view>
  155. </view>
  156. <view class="list-view-title">
  157. <view class="list-view-h1"><text>*</text>标签记录:</view>
  158. <view class="list-view-p">
  159. 请总结客户的个人画像和咨询内容,尽量使用简短的描述性词语,杜绝口语化的词语 (优先选择以下展示的标签)
  160. </view>
  161. </view>
  162. <view class="list-view-list-main">
  163. <view class="list-label-list">
  164. <text class="list-label"
  165. :class="item.isChecked ? 'active' : ''"
  166. v-for="(item, index) in labelsList"
  167. :key="index"
  168. @click="handleCheckedLabel(item,index)"
  169. >
  170. {{ item.name }}
  171. </text>
  172. </view>
  173. </view>
  174. <view class="list-view-title">
  175. <view class="list-view-h1">机构静态标签:</view>
  176. <view class="list-view-p"> (若你对客户的静态特点有更多维度进行描述,请手动填) </view>
  177. </view>
  178. <view class="list-view-list-main">
  179. <view class="list-view-list" v-for="(item, index) in staticLabelsList" :key="index">
  180. <view class="list-view-input">
  181. <input
  182. class="input"
  183. type="text"
  184. v-model="item.label"
  185. placeholder="请输入标签,不超过10个汉字"
  186. maxlength="10"
  187. @focus="hideStaticLabelsAction(item, $event)"
  188. @blur="hideStaticLabelsAction(item, $event)"
  189. @input="handleStaticLabelsAction(index, $event)"
  190. />
  191. <view class="list-view-assAction" v-if="item.isAssociation">
  192. <scroll-view class="tui-popup-scroll train" scroll-y="true">
  193. <view
  194. class="ass-list"
  195. v-for="(ass, assIndex) in staticLabelsActionList"
  196. :key="assIndex"
  197. @click="handleSelectStaticLabels(ass.remarks, item)"
  198. >{{ ass.remarks }}</view
  199. >
  200. </scroll-view>
  201. </view>
  202. </view>
  203. <view class="list-view-btn">
  204. <text
  205. class="iconfont icon-zengjia"
  206. v-if="staticLabelsList.length < 9 && index === staticLabelsList.length - 1"
  207. @click="handleAddStaticLabels(item, index)"
  208. ></text>
  209. <text
  210. class="iconfont icon-shanchu4"
  211. v-if="staticLabelsList.length > 1 && index != staticLabelsList.length - 1"
  212. @click="handleDelStaticLabels(item, index)"
  213. ></text>
  214. </view>
  215. </view>
  216. </view>
  217. <view class="list-view-title">
  218. <view class="list-view-h1">机构动态标签:</view>
  219. <view class="list-view-p"> (若你对客户的购买诉求有更多维度进行描述,请手动填) </view>
  220. </view>
  221. <view class="list-view-list-main">
  222. <view class="list-view-list" v-for="(item, index) in trendsLabelsList" :key="index">
  223. <view class="list-view-input">
  224. <input
  225. class="input"
  226. type="text"
  227. v-model="item.label"
  228. placeholder="请输入标签,不超过10个汉字"
  229. maxlength="10"
  230. @focus="hideTrendsLabelsAction(item, $event)"
  231. @blur="hideTrendsLabelsAction(item, $event)"
  232. @input="handleTrendsLabelsAction(index, $event)"
  233. />
  234. <view class="list-view-assAction" v-if="item.isAssociation">
  235. <scroll-view class="tui-popup-scroll train" scroll-y="true">
  236. <view
  237. class="ass-list"
  238. v-for="(ass, assIndex) in trendsLabelsActionList"
  239. :key="assIndex"
  240. @click="handleSelectTrendsLabels(ass.remarks, item)"
  241. >{{ ass.remarks }}</view
  242. >
  243. </scroll-view>
  244. </view>
  245. </view>
  246. <view class="list-view-btn">
  247. <text
  248. class="iconfont icon-zengjia"
  249. v-if="trendsLabelsList.length < 9 && index === trendsLabelsList.length - 1"
  250. @click="handleAddTrendsLabels(item, index)"
  251. ></text>
  252. <text
  253. class="iconfont icon-shanchu4"
  254. v-if="trendsLabelsList.length > 1 && index != trendsLabelsList.length - 1"
  255. @click="handleDelTrendsLabels(item, index)"
  256. ></text>
  257. </view>
  258. </view>
  259. </view>
  260. <view class="list-view-title">
  261. <view class="list-view-h1">关联报备:</view>
  262. <view class="list-view-p">(若客户咨询的事项不确定采美能不能做,请创建并关联报备向上级反馈)</view>
  263. </view>
  264. <view class="list-view-radio" @click="handleShowReportPopup">
  265. <input
  266. class="input"
  267. type="text"
  268. disabled="false"
  269. v-model="reportText"
  270. value=""
  271. placeholder="请选择报备"
  272. />
  273. <text class="iconfont icon-xiangyou"></text>
  274. </view>
  275. <view class="list-view-title">
  276. <view class="list-view-h1"><text>*</text>价格敏感度:</view>
  277. </view>
  278. <view class="list-view-radio">
  279. <picker @change="bindPickerChange(1, $event)" :value="index" :range="priceActions" range-key="name">
  280. <input
  281. class="input"
  282. type="text"
  283. disabled="false"
  284. v-model="priceFlagText"
  285. value=""
  286. placeholder="请选择"
  287. />
  288. <text class="iconfont icon-xiangyou"></text>
  289. </picker>
  290. </view>
  291. <view class="list-view-title">
  292. <view class="list-view-h1"><text>*</text>意向程度:</view>
  293. </view>
  294. <view class="list-view-radio">
  295. <picker @change="bindPickerChange(2, $event)" :value="index" :range="intenActions" range-key="name">
  296. <input
  297. class="input"
  298. type="text"
  299. disabled="false"
  300. v-model="intenFlagText"
  301. value=""
  302. placeholder="请选择"
  303. />
  304. <text class="iconfont icon-xiangyou"></text>
  305. </picker>
  306. </view>
  307. <view class="list-view-title">
  308. <view class="list-view-h1"><text>*</text>跟进状态:</view>
  309. </view>
  310. <view class="list-view-radio">
  311. <picker @change="bindPickerChange(3, $event)" :value="index" :range="stateActions" range-key="name">
  312. <input
  313. class="input"
  314. type="text"
  315. disabled="false"
  316. v-model="followStateText"
  317. value=""
  318. placeholder="请选择"
  319. />
  320. <text class="iconfont icon-xiangyou"></text>
  321. </picker>
  322. </view>
  323. <view class="list-view-title"> <view class="list-view-h1">额外说明:</view> </view>
  324. <view class="remarks-textarea">
  325. <textarea
  326. class="textarea"
  327. v-model="remarksParams.extra"
  328. value=""
  329. placeholder="请输入其他需要说明的内容"
  330. maxlength="200"
  331. @input="conInput"
  332. />
  333. <text class="limit-text">{{ min }}/{{ max }}</text>
  334. </view>
  335. <view class="list-view-title">
  336. <view class="list-view-h1">上传图片</view>
  337. <view class="list-view-p">(可上传与客户的聊天截图或其他重要图片资料,最多10张)</view>
  338. </view>
  339. <view class="list-view-upload clearfix">
  340. <view class="photo-item" v-for="(image, imageIndex) in remarksParams.imageList" :key="imageIndex">
  341. <image
  342. :src="image"
  343. mode="aspectFill"
  344. @click.stop="previewImg(remarksParams.imageList, imageIndex)"
  345. ></image>
  346. <text
  347. class="iconfont icon-iconfontguanbi"
  348. @click.stop="deletePhotoFn(remarksParams.imageList, imageIndex)"
  349. ></text>
  350. </view>
  351. <view
  352. class="photo-item add"
  353. @click.stop="uploadPhotoFn(remarksParams.imageList)"
  354. v-if="remarksParams.imageList.length < 10 || remarksParams.imageList.length == 0"
  355. >
  356. <text class="iconfont icon-jiahao"></text>
  357. </view>
  358. </view>
  359. <view class="list-view-title">
  360. <view class="list-view-h1">上传文件</view>
  361. <view class="list-view-p">(可上传与客户相关的文件资料,最多10份,支持word,excel,ppt和pdf格式文件)</view>
  362. </view>
  363. <view class="list-view" v-for="(file, fileIndex) in remarksParams.fileList" :key="fileIndex">
  364. <view class="list-view-text">
  365. <view class="input">{{ file.fileName }}</view>
  366. <view class="delbtn" @click.stop="deleteFileFn(remarksParams.fileList, fileIndex)">删除</view>
  367. </view>
  368. </view>
  369. <view class="list-view">
  370. <view class="list-view-file" @click="uploadFile(remarksParams.fileList)">选择文件</view>
  371. </view>
  372. </view>
  373. <view class="remarks-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
  374. <view class="edit-button" @click="editButtonConfim">确定</view>
  375. </view>
  376. <!-- 商品列表弹窗 -->
  377. <cm-goodspopup
  378. ref="cmgoodspopup"
  379. v-if="isGoodspopup"
  380. :show="isGoodspopup"
  381. @handleChoiceaGoods="handleChoiceaGoodsData"
  382. >
  383. </cm-goodspopup>
  384. <!-- 机构报备弹窗 -->
  385. <cm-reportpopup
  386. ref="cmreportpopup"
  387. v-if="isReportpopup"
  388. :show="isReportpopup"
  389. :popupType="1"
  390. :reportInfo="reportInfo"
  391. @handleChoiceaReport="handleChoiceaReportData"
  392. >
  393. </cm-reportpopup>
  394. </view>
  395. </template>
  396. <script>
  397. import { mapState, mapMutations } from 'vuex'
  398. import authorize from '@/common/config/authorize.js'
  399. import { uploadFileImage, uploadFilePdfDocDocxXlsx } from '@/services/public.js'
  400. import cmGoodspopup from '../components/cm-goods-popup'
  401. import cmReportpopup from '../components/cm-report-popup'
  402. import addMixins from './mixins/addMixins.js'
  403. var isPreviewImg
  404. export default {
  405. mixins: [addMixins],
  406. components: {
  407. cmGoodspopup,
  408. cmReportpopup
  409. },
  410. data() {
  411. return {
  412. hideButton: true,
  413. isIphoneX: this.$store.state.isIphoneX,
  414. shopOrderId: 0,
  415. logisticsBatchId: 0,
  416. productActions: [],
  417. remarksParams: {
  418. clubId: 0,
  419. questionMan: '',
  420. clubType: '', //机构类型
  421. remarks: [], // 关键词
  422. extra: '', //额外说明
  423. fileList: [],
  424. imageList: [],
  425. serviceProviderId: 0,
  426. consult: '', // 咨询类别
  427. pinceSensitve: 0, //价格敏感度
  428. satisfied: 0, // 意向程度
  429. followup: 0, // 跟进状态
  430. productId: 0, // 商品Id
  431. reportId: 0 // 报备Id
  432. },
  433. min: 0,
  434. max: 200,
  435. handleType: '',
  436. clubUserId: 0,
  437. clubInfo: {},
  438. userInfo: {},
  439. checkedCategorysList: [],
  440. categorys: [],
  441. isConfirmLoding: false,
  442. reportText: '',
  443. remarksList: [
  444. {
  445. label: '',
  446. isAssociation: false
  447. }
  448. ],
  449. checkRemarkIndex: 0,
  450. assActionList: [],
  451. isGoodspopup: false,
  452. isReportpopup: false,
  453. isHashReport: false,
  454. handleGoods: [],
  455. reportInfo: {
  456. clubId: 0,
  457. name: '',
  458. linkMan: ''
  459. }
  460. }
  461. },
  462. onLoad(option) {
  463. console.log(option)
  464. if (option.type == 'edit') {
  465. this.getUserClubConsults()
  466. this.getUserClubRemarksDetail(option.remarksId)
  467. this.handleType = option.type
  468. uni.setNavigationBarTitle({ title: '修改记录' })
  469. } else {
  470. this.clubUserId = option.userId
  471. this.getCulbInfo(option.userId)
  472. this.getUserClubConsults()
  473. }
  474. },
  475. methods: {
  476. ...mapMutations(['login']),
  477. async getCulbInfo(userId) {
  478. // 查询机构信息
  479. try{
  480. const res = await this.UserService.OrganizationUpdateModifyInfo({ userId: userId })
  481. const data = res.data
  482. this.clubInfo = data.club
  483. this.userInfo = data.user
  484. this.reportInfo.name = this.clubInfo.name
  485. this.reportInfo.linkMan = this.clubInfo.linkMan
  486. this.remarksParams.clubId = this.reportInfo.clubId = this.clubInfo.clubId
  487. if (this.handleType != 'edit') {
  488. this.remarksParams.questionMan = this.clubInfo.linkMan
  489. }
  490. }catch(error){
  491. console.log('=============>', error.msg)
  492. }
  493. },
  494. async getUserClubRemarksDetail(remarksId) {
  495. //修改回显资料备注信息
  496. try{
  497. const res = await this.UserService.getUserClubRemarksDetail({ remarksId: remarksId })
  498. const data = res.data
  499. this.clubUserId = data.userId
  500. this.remarksList = data.remarks.map((el, index) => {
  501. el.isAssociation = false
  502. return el
  503. })
  504. this.remarksParams.remarksId = data.remarksId
  505. this.remarksParams.extra = data.extra
  506. this.remarksParams.clubType = data.clubType
  507. this.remarksParams.pinceSensitve = data.pinceSensitve
  508. this.remarksParams.satisfied = data.satisfied
  509. this.remarksParams.followup = data.followup
  510. this.remarksParams.fileList = data.fileList
  511. this.remarksParams.imageList = data.imageList
  512. this.remarksParams.productId = data.productId
  513. if (this.handleType == 'edit') {
  514. if (data.reportId) {
  515. this.isHashReport = true
  516. this.remarksParams.reportId = data.reportId
  517. }
  518. this.remarksParams.questionMan = data.questionMan
  519. this.remarksParams.consult = data.consult
  520. this.checkedCategorysList = data.consult.split(',').map(i => parseInt(i, 0))
  521. this.categorys = this.categorys.map((el, index) => {
  522. if (data.consult.includes(el.id)) {
  523. el.isChecked = true
  524. } else {
  525. el.isChecked = false
  526. }
  527. return el
  528. })
  529. }
  530. if (data.productId) {
  531. let pro = {
  532. image: data.mainImage,
  533. name: data.productName,
  534. shopName: data.shopName
  535. }
  536. this.handleGoods.push(pro)
  537. }
  538. this.reportText = data.reportText ? data.reportText : ''
  539. this.priceFlagText = this.pinceFilters(data.pinceSensitve)
  540. this.intenFlagText = this.intenActionsFilters(data.satisfied)
  541. this.followStateText = this.followupFilters(data.followup)
  542. this.getCulbInfo(data.userId)
  543. }catch(error){
  544. this.$util.msg(error.msg, 2000)
  545. }
  546. },
  547. async getUserClubConsults() {
  548. //查询咨询类别
  549. try{
  550. const res = await this.UserService.getUserClubConsults()
  551. const data = res.data
  552. this.categorys = data.map((el, index) => {
  553. el.isChecked = false
  554. return el
  555. })
  556. }catch(error){
  557. console.log('=========>获取咨询类别列表失败')
  558. }
  559. },
  560. bindPickerChange(type, e) {
  561. //选择筛选条件
  562. switch (type) {
  563. case 1:
  564. this.priceFlagText = this.priceActions[e.target.value].name
  565. this.remarksParams.pinceSensitve = this.priceActions[e.target.value].value
  566. break
  567. case 2:
  568. this.intenFlagText = this.intenActions[e.target.value].name
  569. this.remarksParams.satisfied = this.intenActions[e.target.value].value
  570. break
  571. case 3:
  572. this.followStateText = this.stateActions[e.target.value].name
  573. this.remarksParams.followup = this.stateActions[e.target.value].value
  574. break
  575. case 4: // 客户来源
  576. this.sourceStateText = this.stateActions[e.target.value].name
  577. this.remarksParams.followup = this.stateActions[e.target.value].value
  578. break
  579. case 5: // 客户性别
  580. this.genderText = this.stateActions[e.target.value].name
  581. this.remarksParams.followup = this.stateActions[e.target.value].value
  582. break
  583. case 6: // 客户年龄
  584. this.ageText = this.stateActions[e.target.value].name
  585. this.remarksParams.followup = this.stateActions[e.target.value].value
  586. break
  587. case 7: // 加群请假
  588. this.additiveText = this.stateActions[e.target.value].name
  589. this.remarksParams.followup = this.stateActions[e.target.value].value
  590. break
  591. }
  592. },
  593. async editButtonConfim() {
  594. //保存资料备注
  595. if (this.isConfirmLoding) {
  596. return
  597. }
  598. const userInfo = await this.$api.getStorage()
  599. if (this.remarksParams.questionMan == '') {
  600. this.$util.msg('请输入咨询人姓名', 2000)
  601. return
  602. }
  603. if (this.remarksParams.consult == '') {
  604. this.$util.msg('请选择咨询类别', 2000)
  605. return
  606. }
  607. //统一处理关键词
  608. let staticLabelsList = []
  609. for (const el of this.staticLabelsList) {
  610. if (el.label != '') {
  611. staticLabelsList.push(el.label)
  612. }
  613. }
  614. if (staticLabelsList.length == 0) {
  615. this.$util.msg('请输入关键词记录', 2000)
  616. return
  617. }
  618. if (!this.remarksParams.pinceSensitve) {
  619. this.$util.msg('请选择价格敏感度', 2000)
  620. return
  621. }
  622. if (!this.remarksParams.satisfied) {
  623. this.$util.msg('请选择意向程度', 2000)
  624. return
  625. }
  626. if (!this.remarksParams.followup) {
  627. this.$util.msg('请选择跟进状态', 2000)
  628. return
  629. }
  630. this.remarksParams.remarks = JSON.stringify(staticLabelsList)
  631. console.log('remarksParams', this.remarksParams)
  632. this.remarksParams.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  633. this.isConfirmLoding = true
  634. this.UserService.getUserClubRemarksSave({
  635. params: JSON.stringify(this.remarksParams)
  636. })
  637. .then(response => {
  638. this.$util.msg('保存成功', 3000, true, 'success')
  639. this.isConfirmLoding = false
  640. setTimeout(() => {
  641. uni.navigateBack({
  642. delta: 1
  643. })
  644. }, 1000)
  645. })
  646. .catch(error => {
  647. this.$util.msg(error.msg, 2000)
  648. this.isConfirmLoding = false
  649. })
  650. },
  651. choiceCategorys(category, index) {
  652. // 选择类别
  653. category.isChecked = !category.isChecked
  654. if (category.isChecked) {
  655. if (!this.contains(this.checkedCategorysList, category.id)) {
  656. this.checkedCategorysList.push(category.id)
  657. }
  658. } else {
  659. this.checkedCategorysList.splice(this.checkedCategorysList.indexOf(category.id), 1)
  660. }
  661. this.remarksParams.consult = this.checkedCategorysList.join(',')
  662. },
  663. handleShowReportPopup() {
  664. // 显示报备弹窗
  665. if (this.isHashReport) {
  666. this.$util.msg('请取消已有关联后再重新关联报备', 2000)
  667. return
  668. }
  669. this.isReportpopup = true
  670. },
  671. handleShowGoodPopup() {
  672. // 显示添加商品弹窗
  673. this.isGoodspopup = true
  674. },
  675. handleClean() {
  676. //删除选择的商品
  677. this.remarksParams.productId === 0
  678. this.handleGoods = []
  679. },
  680. handleChoiceaGoodsData(data) {
  681. console.log('data', data)
  682. this.handleGoods = []
  683. this.remarksParams.productId = data.productId
  684. this.handleGoods.push(data)
  685. },
  686. handleChoiceaReportData(data) {
  687. console.log('data', data)
  688. this.reportText = data.reportText
  689. this.remarksParams.reportId = data.reportId
  690. },
  691. contains(arr, val) {
  692. // 校验
  693. return arr.some(item => item === val)
  694. },
  695. uploadFile(array) {
  696. //上传资质文件
  697. console.log(array)
  698. uploadFilePdfDocDocxXlsx()
  699. .then(res => {
  700. let data = JSON.parse(res.data).data
  701. let obj = {
  702. fileName: uni.getStorageSync('fileName'),
  703. ossName: data.ossName
  704. }
  705. array.push(obj)
  706. console.log('array', array)
  707. })
  708. .catch(err => {
  709. console.log(err)
  710. })
  711. },
  712. uploadPhotoFn(array) {
  713. //添加图片
  714. uploadFileImage().then(res => {
  715. array.push(JSON.parse(res.data).data)
  716. })
  717. },
  718. deleteFileFn(array, index) {
  719. console.log(array)
  720. //删除文件
  721. this.UploadService.PostFileDelete({
  722. ossName: array[index].ossName
  723. })
  724. .then(res => {
  725. array.splice(index, 1)
  726. })
  727. .catch(error => {
  728. console.log('删除文件异常提示===>', error.msg)
  729. })
  730. },
  731. deletePhotoFn(array, index) {
  732. //删除图片
  733. array.splice(index, 1)
  734. },
  735. previewImg(image, index) {
  736. //顶部商品图片预览
  737. isPreviewImg = true
  738. let previewUrls = image
  739. uni.previewImage({
  740. current: index, //图片索引
  741. urls: previewUrls, //必须是http图片,本地图片无效
  742. longPressActions: ''
  743. })
  744. },
  745. conInput(e) {
  746. //备注文字字数限制
  747. let value = e.detail.value
  748. let len = parseInt(value.length)
  749. if (len > this.max) return
  750. this.min = len
  751. if (this.min == 200) {
  752. this.$util.msg('您输入的字数已达上限', 2000)
  753. }
  754. },
  755. handleClickClunInfo() {
  756. //修改机构资料
  757. if (this.userInfo.userIdentity === 2) {
  758. this.$api.navigateTo(`/pages/seller/login/apply?userID=${this.userInfo.userId}`)
  759. } else if (this.userInfo.userIdentity === 4) {
  760. this.$api.navigateTo(`/pages/seller/login/information?userID=${this.userInfo.userId}`)
  761. }
  762. },
  763. followupFilters(value) {
  764. // 订单来源
  765. const map = {
  766. 1: '跟进中',
  767. 2: '跟进完成',
  768. 3: '已放弃'
  769. }
  770. return map[value]
  771. },
  772. pinceFilters(value) {
  773. // 意向
  774. const map = {
  775. 1: '敏感',
  776. 2: '适中',
  777. 3: '不敏感',
  778. 4: '不明确'
  779. }
  780. return map[value]
  781. },
  782. intenActionsFilters(value) {
  783. // 意向
  784. const map = {
  785. 1: '意向强烈',
  786. 2: '意向一般',
  787. 3: '意向平淡',
  788. 4: '随便看看'
  789. }
  790. return map[value]
  791. }
  792. },
  793. onShow() {}
  794. }
  795. </script>
  796. <style lang="scss">
  797. page {
  798. height: auto;
  799. background: #ffffff;
  800. }
  801. .remarks-content-club {
  802. width: 100%;
  803. height: 288rpx;
  804. padding: 24rpx;
  805. box-sizing: border-box;
  806. border-bottom: 20rpx solid #f7f7f7;
  807. .content-club-le {
  808. width: 660rpx;
  809. float: left;
  810. .club-le-text {
  811. width: 100%;
  812. height: 60rpx;
  813. line-height: 60rpx;
  814. font-size: $font-size-28;
  815. color: #333333;
  816. .label {
  817. color: #999999;
  818. &.phone {
  819. margin-left: 48rpx;
  820. }
  821. }
  822. }
  823. }
  824. .content-club-ri {
  825. width: 40rpx;
  826. height: 160rpx;
  827. float: right;
  828. line-height: 160rpx;
  829. text-align: center;
  830. color: #b2b2b2;
  831. }
  832. }
  833. .remarks-content {
  834. width: 100%;
  835. height: auto;
  836. box-sizing: border-box;
  837. padding: 0 24rpx;
  838. padding-bottom: 160rpx;
  839. .list-view-title {
  840. width: 100%;
  841. height: auto;
  842. margin-bottom: 16rpx;
  843. margin-top: 40rpx;
  844. .list-view-h1 {
  845. line-height: 40rpx;
  846. font-size: $font-size-28;
  847. color: #333333;
  848. text-align: left;
  849. text {
  850. color: #ff2a2a;
  851. }
  852. }
  853. .list-view-p {
  854. line-height: 30rpx;
  855. color: #fea785;
  856. font-size: $font-size-20;
  857. }
  858. }
  859. .tui-remarks-content {
  860. width: 100%;
  861. height: auto;
  862. margin-bottom: 24rpx;
  863. .tui-remarks-goods-input {
  864. width: 100%;
  865. height: 180rpx;
  866. box-sizing: border-box;
  867. background-color: #f7f7f7;
  868. padding: 26rpx;
  869. border-radius: 6rpx;
  870. .input-add {
  871. width: 128rpx;
  872. height: 128rpx;
  873. line-height: 128rpx;
  874. float: left;
  875. text-align: center;
  876. box-sizing: border-box;
  877. border: 1px dashed #b2b2b2;
  878. border-radius: 6rpx;
  879. .iconfont {
  880. font-size: 44rpx;
  881. color: #b2b2b2;
  882. }
  883. }
  884. .input-text {
  885. height: 128rpx;
  886. box-sizing: border-box;
  887. padding: 0 32rpx;
  888. line-height: 128rpx;
  889. text-align: left;
  890. font-size: 26rpx;
  891. color: #b2b2b2;
  892. float: left;
  893. }
  894. }
  895. .tui-remarks-showgoods {
  896. width: 100%;
  897. height: 180rpx;
  898. box-sizing: border-box;
  899. .tui-remarks-btn {
  900. width: 90rpx;
  901. height: 180rpx;
  902. float: right;
  903. .btn {
  904. width: 100%;
  905. height: 90rpx;
  906. float: left;
  907. line-height: 90rpx;
  908. text-align: center;
  909. font-size: 26rpx;
  910. &.delete {
  911. color: #f94b4b;
  912. }
  913. &.update {
  914. color: #1890f9;
  915. }
  916. }
  917. }
  918. .tui-remarks-goods {
  919. width: 612rpx;
  920. height: 180rpx;
  921. box-sizing: border-box;
  922. background-color: #f7f7f7;
  923. padding: 26rpx;
  924. border-radius: 6rpx;
  925. float: left;
  926. .goods-image {
  927. width: 128rpx;
  928. height: 128rpx;
  929. float: left;
  930. image {
  931. width: 128rpx;
  932. height: 128rpx;
  933. display: block;
  934. border-radius: 4rpx;
  935. }
  936. }
  937. .goods-main {
  938. width: 432rpx;
  939. height: 128rpx;
  940. box-sizing: border-box;
  941. padding-left: 32rpx;
  942. float: right;
  943. .name {
  944. width: 100%;
  945. height: 60rpx;
  946. box-sizing: border-box;
  947. line-height: 60rpx;
  948. color: #333333;
  949. text-overflow: ellipsis;
  950. overflow: hidden;
  951. display: -webkit-box;
  952. -webkit-line-clamp: 1;
  953. line-clamp: 1;
  954. -webkit-box-orient: vertical;
  955. font-size: 26rpx;
  956. }
  957. .shop {
  958. line-height: 60rpx;
  959. color: #999999;
  960. font-size: 26rpx;
  961. text-overflow: ellipsis;
  962. overflow: hidden;
  963. display: -webkit-box;
  964. -webkit-line-clamp: 1;
  965. line-clamp: 1;
  966. -webkit-box-orient: vertical;
  967. }
  968. }
  969. }
  970. }
  971. }
  972. .list-view-radio {
  973. width: 100%;
  974. height: 90rpx;
  975. box-sizing: border-box;
  976. padding: 0 10rpx;
  977. border: 1px solid #b2b2b2;
  978. border-radius: 6rpx;
  979. margin-bottom: 30rpx;
  980. position: relative;
  981. &.btn {
  982. border: none;
  983. margin-top: 40rpx;
  984. }
  985. .input {
  986. width: 100%;
  987. height: 90rpx;
  988. line-height: 90rpx;
  989. float: left;
  990. box-sizing: border-box;
  991. font-size: $font-size-24;
  992. color: #333333;
  993. padding: 0 10rpx;
  994. padding-right: 90rpx;
  995. }
  996. .iconfont {
  997. width: 50rpx;
  998. height: 90rpx;
  999. display: block;
  1000. line-height: 90rpx;
  1001. text-align: center;
  1002. font-size: 30rpx;
  1003. color: #999999;
  1004. position: absolute;
  1005. right: 0;
  1006. top: 0;
  1007. }
  1008. }
  1009. .list-view-list-main {
  1010. width: 100%;
  1011. height: auto;
  1012. box-sizing: border-box;
  1013. margin-bottom: 30rpx;
  1014. position: relative;
  1015. .list-label-list{
  1016. width: 100%;
  1017. height: auto;
  1018. box-sizing: border-box;
  1019. .list-label{
  1020. display: inline-block;
  1021. padding: 0 20rpx;
  1022. height: 48rpx;
  1023. line-height: 48rpx;
  1024. background: #F7F7F7;
  1025. text-align: center;
  1026. margin-right: 20rpx;
  1027. margin-bottom: 20rpx;
  1028. font-size: 26rpx;
  1029. color: #666666;
  1030. &.active{
  1031. background: #FEF6F3;
  1032. color: #FF5B00;
  1033. }
  1034. }
  1035. }
  1036. .list-view-list {
  1037. width: 100%;
  1038. height: 90rpx;
  1039. box-sizing: border-box;
  1040. margin-bottom: 30rpx;
  1041. .list-view-input {
  1042. width: 614rpx;
  1043. height: 90rpx;
  1044. float: left;
  1045. position: relative;
  1046. .input {
  1047. width: 614rpx;
  1048. height: 90rpx;
  1049. box-sizing: border-box;
  1050. padding: 0 20rpx;
  1051. border: 1px solid #b2b2b2;
  1052. border-radius: 6rpx;
  1053. font-size: $font-size-24;
  1054. color: #333333;
  1055. }
  1056. .list-view-assAction {
  1057. width: 614rpx;
  1058. min-height: 270rpx;
  1059. box-sizing: border-box;
  1060. padding: 10rpx 0;
  1061. background: rgba(255, 255, 255, 1);
  1062. box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.15);
  1063. border-radius: 6rpx;
  1064. position: absolute;
  1065. top: -288rpx;
  1066. left: 0;
  1067. z-index: 999;
  1068. overflow: hidden;
  1069. .tui-popup-scroll {
  1070. width: 100%;
  1071. height: 270rpx;
  1072. }
  1073. .ass-list {
  1074. width: 100%;
  1075. height: 90rpx;
  1076. box-sizing: border-box;
  1077. padding: 0 24rpx;
  1078. line-height: 90rpx;
  1079. font-size: $font-size-26;
  1080. color: #666666;
  1081. text-align: left;
  1082. border-bottom: 1px solid #e1e1e1;
  1083. &:last-child {
  1084. border-bottom: none;
  1085. }
  1086. }
  1087. }
  1088. }
  1089. .list-view-btn {
  1090. width: 88rpx;
  1091. height: 90rpx;
  1092. float: right;
  1093. text-align: center;
  1094. line-height: 90rpx;
  1095. .icon-zengjia {
  1096. color: #1890f9;
  1097. font-size: $font-size-48;
  1098. }
  1099. .icon-shanchu4 {
  1100. color: #ff5b00;
  1101. font-size: $font-size-48;
  1102. }
  1103. }
  1104. }
  1105. }
  1106. .remarks-category {
  1107. width: 100%;
  1108. float: left;
  1109. margin-bottom: 20rpx;
  1110. .label {
  1111. color: #666666;
  1112. font-size: 28rpx;
  1113. margin-right: 50rpx;
  1114. }
  1115. .checkbox-list {
  1116. height: 60rpx;
  1117. font-size: $font-size-28;
  1118. line-height: 60rpx;
  1119. border-radius: 10rpx;
  1120. margin-right: 20rpx;
  1121. margin-bottom: 10rpx;
  1122. box-sizing: border-box;
  1123. float: left;
  1124. .icon-yixuanze {
  1125. margin-right: 10rpx;
  1126. color: #ff5b00;
  1127. }
  1128. .icon-weixuanze {
  1129. margin-right: 10rpx;
  1130. color: #b2b2b2;
  1131. }
  1132. }
  1133. .item-text {
  1134. display: inline-block;
  1135. font-size: 26rpx;
  1136. color: #333333;
  1137. border-radius: 28rpx;
  1138. line-height: 50rpx;
  1139. }
  1140. }
  1141. .remarks-input {
  1142. width: 100%;
  1143. height: 90rpx;
  1144. padding: 0 16rpx;
  1145. margin: 20rpx 0 0 0;
  1146. border-radius: 6rpx;
  1147. position: relative;
  1148. border: 1px solid #b2b2b2;
  1149. box-sizing: border-box;
  1150. .input {
  1151. width: 100%;
  1152. height: 90rpx;
  1153. line-height: 90rpx;
  1154. font-size: $font-size-26;
  1155. color: $text-color;
  1156. z-index: 1;
  1157. }
  1158. }
  1159. .remarks-textarea {
  1160. width: 100%;
  1161. height: 226rpx;
  1162. padding: 16rpx;
  1163. margin: 20rpx 0 0 0;
  1164. border-radius: 6rpx;
  1165. position: relative;
  1166. border: 1px solid #b2b2b2;
  1167. box-sizing: border-box;
  1168. .textarea {
  1169. width: 100%;
  1170. height: 100%;
  1171. line-height: 36rpx;
  1172. font-size: $font-size-26;
  1173. color: $text-color;
  1174. z-index: 1;
  1175. }
  1176. .limit-text {
  1177. position: absolute;
  1178. right: 20rpx;
  1179. bottom: 16rpx;
  1180. line-height: 44rpx;
  1181. font-size: $font-size-24;
  1182. color: #b2b2b2;
  1183. }
  1184. }
  1185. .list-view {
  1186. width: 100%;
  1187. height: 40rpx;
  1188. margin-top: 20rpx;
  1189. .list-view-file {
  1190. width: 132rpx;
  1191. height: 44rpx;
  1192. line-height: 44rpx;
  1193. font-size: $font-size-20;
  1194. text-align: center;
  1195. color: #ffffff;
  1196. background-color: $color-system;
  1197. border-radius: 8rpx;
  1198. float: left;
  1199. margin-top: 10rpx;
  1200. }
  1201. .list-view-text {
  1202. width: 100%;
  1203. float: left;
  1204. .input {
  1205. width: 560rpx;
  1206. height: 44rpx;
  1207. box-sizing: border-box;
  1208. line-height: 44rpx;
  1209. color: #333333;
  1210. text-overflow: ellipsis;
  1211. overflow: hidden;
  1212. display: -webkit-box;
  1213. -webkit-line-clamp: 1;
  1214. line-clamp: 1;
  1215. -webkit-box-orient: vertical;
  1216. float: left;
  1217. }
  1218. .delbtn {
  1219. width: 96rpx;
  1220. height: 44rpx;
  1221. border-radius: 8rpx;
  1222. background-color: #fff2ec;
  1223. font-size: $font-size-24;
  1224. color: #ff5b00;
  1225. line-height: 44rpx;
  1226. text-align: center;
  1227. float: left;
  1228. }
  1229. }
  1230. }
  1231. .list-view-upload {
  1232. width: 100%;
  1233. height: auto;
  1234. .photo-item {
  1235. display: inline-block;
  1236. width: 112rpx;
  1237. height: 112rpx;
  1238. margin: 10rpx 0;
  1239. margin-right: 25rpx;
  1240. border-radius: 10rpx;
  1241. border: 1px solid #f5f5f5;
  1242. position: relative;
  1243. float: left;
  1244. &.add {
  1245. width: 112rpx;
  1246. height: 112rpx;
  1247. border-color: #b2b2b2;
  1248. text-align: center;
  1249. line-height: 112rpx;
  1250. margin-right: 0rpx;
  1251. .icon-jiahao {
  1252. font-size: $font-size-44;
  1253. color: #b2b2b2;
  1254. font-weight: bold;
  1255. }
  1256. }
  1257. .icon-iconfontguanbi {
  1258. width: 30rpx;
  1259. height: 30rpx;
  1260. border-radius: 50%;
  1261. display: block;
  1262. position: absolute;
  1263. right: -10rpx;
  1264. top: -10rpx;
  1265. background: #f94b4b;
  1266. text-align: center;
  1267. line-height: 30rpx;
  1268. color: #ffffff;
  1269. font-size: $font-size-22;
  1270. }
  1271. image {
  1272. width: 112rpx;
  1273. height: 112rpx;
  1274. border-radius: 10rpx;
  1275. }
  1276. }
  1277. .photo-list {
  1278. width: 100%;
  1279. height: 116rpx;
  1280. overflow: hidden;
  1281. white-space: nowrap;
  1282. display: flex;
  1283. align-items: flex-start;
  1284. }
  1285. }
  1286. }
  1287. .remarks-btn {
  1288. width: 100%;
  1289. padding-top: 20rpx;
  1290. position: fixed;
  1291. bottom: 0;
  1292. left: 0;
  1293. background-color: #ffffff;
  1294. z-index: 99;
  1295. .edit-button-canel {
  1296. width: 100%;
  1297. height: 88rpx;
  1298. line-height: 88rpx;
  1299. text-align: center;
  1300. color: #ff5b00;
  1301. font-size: $font-size-24;
  1302. }
  1303. .edit-button {
  1304. width: 600rpx;
  1305. height: 90rpx;
  1306. background: $btn-confirm;
  1307. line-height: 90rpx;
  1308. text-align: center;
  1309. color: #ffffff;
  1310. font-size: $font-size-30;
  1311. margin: 0 auto;
  1312. border-radius: 45rpx;
  1313. }
  1314. }
  1315. </style>