add.vue 29 KB

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