add.vue 30 KB

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