add.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178
  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. if (this.handleType == 'edit') {
  394. this.remarksParams.questionMan = data.questionMan
  395. this.remarksParams.consult = data.consult
  396. this.checkedCategorysList = data.consult.split(',').map(i => parseInt(i, 0))
  397. this.categorys = this.categorys.map((el, index) => {
  398. if (data.consult.includes(el.id)) {
  399. el.isChecked = true
  400. } else {
  401. el.isChecked = false
  402. }
  403. return el
  404. })
  405. }
  406. this.priceFlagText = this.pinceFilters(data.pinceSensitve)
  407. this.intenFlagText = this.intenActionsFilters(data.satisfied)
  408. this.followStateText = this.followupFilters(data.followup)
  409. this.getCulbInfo()
  410. })
  411. .catch(error => {
  412. this.$util.msg(error.msg, 2000)
  413. })
  414. },
  415. getUserClubConsults() {
  416. //查询咨询类别
  417. this.UserService.getUserClubConsults()
  418. .then(response => {
  419. this.categorys = response.data.map((el, index) => {
  420. el.isChecked = false
  421. return el
  422. })
  423. })
  424. .catch(error => {
  425. console.log('=========>获取咨询类别列表失败')
  426. })
  427. },
  428. bindRemarkAction(index, event) {
  429. this.assActionList = []
  430. this.checkRemarkIndex = index
  431. if (event.detail.value != '') {
  432. this.UserService.getCmremarkslist({ remarks: event.detail.value })
  433. .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. //隐藏对应的联想弹窗
  451. item.isAssociation = false
  452. },
  453. SelectAssociationFn(ass, item) {
  454. //选择关键词
  455. item.isAssociation = false
  456. item.label = ass
  457. },
  458. addListFn(item, index) {
  459. //添加
  460. let obj = { label: '', isAssociation: false }
  461. item.isAssociation = false
  462. this.remarksList.push(obj)
  463. },
  464. deleteLogistItemFn(item, index) {
  465. this.remarksList.splice(index, 1)
  466. },
  467. bindPickerChange(type, e) {
  468. //选择筛选条件
  469. switch (type) {
  470. case 1:
  471. this.priceFlagText = this.priceActions[e.target.value].name
  472. this.remarksParams.pinceSensitve = this.priceActions[e.target.value].value
  473. break
  474. case 2:
  475. this.intenFlagText = this.intenActions[e.target.value].name
  476. this.remarksParams.satisfied = this.intenActions[e.target.value].value
  477. break
  478. case 3:
  479. this.followStateText = this.stateActions[e.target.value].name
  480. this.remarksParams.followup = this.stateActions[e.target.value].value
  481. break
  482. }
  483. },
  484. async editButtonConfim() {
  485. //保存资料备注
  486. if (this.isConfirmLoding) {
  487. return
  488. }
  489. const userInfo = await this.$api.getStorage()
  490. if (this.remarksParams.questionMan == '') {
  491. this.$util.msg('请输入咨询人姓名', 2000)
  492. return
  493. }
  494. if (this.remarksParams.consult == '') {
  495. this.$util.msg('请选择咨询类别', 2000)
  496. return
  497. }
  498. //统一处理关键词
  499. let remarksList = []
  500. for (const el of this.remarksList) {
  501. if (el.label != '') {
  502. remarksList.push(el.label)
  503. }
  504. }
  505. if (remarksList.length == 0) {
  506. this.$util.msg('请输入关键词记录', 2000)
  507. return
  508. }
  509. if (!this.remarksParams.pinceSensitve) {
  510. this.$util.msg('请选择价格敏感度', 2000)
  511. return
  512. }
  513. if (!this.remarksParams.satisfied) {
  514. this.$util.msg('请选择意向程度', 2000)
  515. return
  516. }
  517. if (!this.remarksParams.followup) {
  518. this.$util.msg('请选择跟进状态', 2000)
  519. return
  520. }
  521. this.remarksParams.remarks = JSON.stringify(remarksList)
  522. console.log('remarksParams', this.remarksParams)
  523. this.remarksParams.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  524. this.isConfirmLoding = true
  525. this.UserService.getUserClubRemarksSave({
  526. params: JSON.stringify(this.remarksParams)
  527. })
  528. .then(response => {
  529. this.$util.msg('保存成功', 3000, true, 'success')
  530. this.isConfirmLoding = false
  531. setTimeout(() => {
  532. uni.navigateBack({
  533. delta: 1
  534. })
  535. }, 1000)
  536. })
  537. .catch(error => {
  538. this.$util.msg(error.msg, 2000)
  539. this.isConfirmLoding = false
  540. })
  541. },
  542. choiceCategorys(category, index) {
  543. // 选择类别
  544. category.isChecked = !category.isChecked
  545. if (category.isChecked) {
  546. if (!this.contains(this.checkedCategorysList, category.id)) {
  547. this.checkedCategorysList.push(category.id)
  548. }
  549. } else {
  550. this.checkedCategorysList.splice(this.checkedCategorysList.indexOf(category.id), 1)
  551. }
  552. this.remarksParams.consult = this.checkedCategorysList.join(',')
  553. },
  554. handleShowReportPopup() {
  555. // 显示报备弹窗
  556. this.isReportpopup = true
  557. },
  558. handleShowGoodPopup() {
  559. // 显示添加商品弹窗
  560. this.isGoodspopup = true
  561. },
  562. handleClean() {
  563. //删除选择的商品
  564. this.remarksParams.productId === 0
  565. this.handleGoods = []
  566. },
  567. handleChoiceaGoodsData(data) {
  568. console.log('data', data)
  569. this.handleGoods = []
  570. this.remarksParams.productId = data.productId
  571. this.handleGoods.push(data)
  572. },
  573. handleChoiceaReportData(data) {
  574. console.log('data', data)
  575. this.reportText = data.reportText
  576. this.remarksParams.reportId = data.reportId
  577. },
  578. contains(arr, val) {
  579. // 校验
  580. return arr.some(item => item === val)
  581. },
  582. uploadFile(array) {
  583. //上传资质文件
  584. console.log(array)
  585. uploadFilePdfDocDocxXlsx()
  586. .then(res => {
  587. let data = JSON.parse(res.data).data
  588. let obj = {
  589. fileName: uni.getStorageSync('fileName'),
  590. ossName: data.ossName
  591. }
  592. array.push(obj)
  593. console.log('array', array)
  594. })
  595. .catch(err => {
  596. console.log(err)
  597. })
  598. },
  599. uploadPhotoFn(array) {
  600. //添加图片
  601. uploadFileImage().then(res => {
  602. array.push(JSON.parse(res.data).data)
  603. })
  604. },
  605. deleteFileFn(array, index) {
  606. console.log(array)
  607. //删除文件
  608. this.UploadService.PostFileDelete({
  609. ossName: array[index].ossName
  610. })
  611. .then(res => {
  612. array.splice(index, 1)
  613. })
  614. .catch(error => {
  615. console.log('删除文件异常提示===>', error.msg)
  616. })
  617. },
  618. deletePhotoFn(array, index) {
  619. //删除图片
  620. array.splice(index, 1)
  621. },
  622. previewImg(image, index) {
  623. //顶部商品图片预览
  624. isPreviewImg = true
  625. let previewUrls = image
  626. uni.previewImage({
  627. current: index, //图片索引
  628. urls: previewUrls, //必须是http图片,本地图片无效
  629. longPressActions: ''
  630. })
  631. },
  632. conInput(e) {
  633. //备注文字字数限制
  634. let value = e.detail.value
  635. let len = parseInt(value.length)
  636. if (len > this.max) return
  637. this.min = len
  638. if (this.min == 200) {
  639. this.$util.msg('您输入的字数已达上限', 2000)
  640. }
  641. },
  642. handleClickClunInfo() {
  643. //修改机构资料
  644. if (this.userInfo.userIdentity === 2) {
  645. this.$api.navigateTo(`/pages/seller/login/apply?userID=${this.userInfo.userId}`)
  646. } else if (this.userInfo.userIdentity === 4) {
  647. this.$api.navigateTo(`/pages/seller/login/information?userID=${this.userInfo.userId}`)
  648. }
  649. },
  650. followupFilters(value) {
  651. // 订单来源
  652. const map = {
  653. 1: '跟进中',
  654. 2: '跟进完成',
  655. 3: '已放弃'
  656. }
  657. return map[value]
  658. },
  659. pinceFilters(value) {
  660. // 意向
  661. const map = {
  662. 1: '敏感',
  663. 2: '适中',
  664. 3: '不敏感',
  665. 4: '不明确'
  666. }
  667. return map[value]
  668. },
  669. intenActionsFilters(value) {
  670. // 意向
  671. const map = {
  672. 1: '意向强烈',
  673. 2: '意向一般',
  674. 3: '意向平淡',
  675. 4: '随便看看'
  676. }
  677. return map[value]
  678. }
  679. },
  680. onShow() {}
  681. }
  682. </script>
  683. <style lang="scss">
  684. page {
  685. height: auto;
  686. background: #ffffff;
  687. }
  688. .remarks-content-club {
  689. width: 100%;
  690. height: 252rpx;
  691. padding: 24rpx;
  692. box-sizing: border-box;
  693. border-bottom: 20rpx solid #f7f7f7;
  694. .content-club-le {
  695. width: 660rpx;
  696. float: left;
  697. .club-le-text {
  698. width: 100%;
  699. height: 60rpx;
  700. line-height: 60rpx;
  701. font-size: $font-size-28;
  702. color: #333333;
  703. .label {
  704. color: #999999;
  705. &.phone {
  706. margin-left: 48rpx;
  707. }
  708. }
  709. }
  710. }
  711. .content-club-ri {
  712. width: 40rpx;
  713. height: 160rpx;
  714. float: right;
  715. line-height: 160rpx;
  716. text-align: center;
  717. color: #b2b2b2;
  718. }
  719. }
  720. .remarks-content {
  721. width: 100%;
  722. height: auto;
  723. box-sizing: border-box;
  724. padding: 0 24rpx;
  725. padding-bottom: 160rpx;
  726. .list-view-title {
  727. width: 100%;
  728. height: auto;
  729. margin-bottom: 16rpx;
  730. margin-top: 40rpx;
  731. .list-view-h1 {
  732. line-height: 40rpx;
  733. font-size: $font-size-28;
  734. color: #333333;
  735. text-align: left;
  736. text {
  737. color: #ff2a2a;
  738. }
  739. }
  740. .list-view-p {
  741. line-height: 30rpx;
  742. color: #fea785;
  743. font-size: $font-size-20;
  744. }
  745. }
  746. .tui-remarks-content {
  747. width: 100%;
  748. height: auto;
  749. margin-bottom: 24rpx;
  750. .tui-remarks-goods-input {
  751. width: 100%;
  752. height: 180rpx;
  753. box-sizing: border-box;
  754. background-color: #f7f7f7;
  755. padding: 26rpx;
  756. border-radius: 6rpx;
  757. .input-add {
  758. width: 128rpx;
  759. height: 128rpx;
  760. line-height: 128rpx;
  761. float: left;
  762. text-align: center;
  763. box-sizing: border-box;
  764. border: 1px dashed #b2b2b2;
  765. border-radius: 6rpx;
  766. .iconfont {
  767. font-size: 44rpx;
  768. color: #b2b2b2;
  769. }
  770. }
  771. .input-text {
  772. height: 128rpx;
  773. box-sizing: border-box;
  774. padding: 0 32rpx;
  775. line-height: 128rpx;
  776. text-align: left;
  777. font-size: 26rpx;
  778. color: #b2b2b2;
  779. float: left;
  780. }
  781. }
  782. .tui-remarks-showgoods {
  783. width: 100%;
  784. height: 180rpx;
  785. box-sizing: border-box;
  786. .tui-remarks-btn {
  787. width: 90rpx;
  788. height: 180rpx;
  789. float: right;
  790. .btn {
  791. width: 100%;
  792. height: 90rpx;
  793. float: left;
  794. line-height: 90rpx;
  795. text-align: center;
  796. font-size: 26rpx;
  797. &.delete {
  798. color: #f94b4b;
  799. }
  800. &.update {
  801. color: #1890f9;
  802. }
  803. }
  804. }
  805. .tui-remarks-goods {
  806. width: 612rpx;
  807. height: 180rpx;
  808. box-sizing: border-box;
  809. background-color: #f7f7f7;
  810. padding: 26rpx;
  811. border-radius: 6rpx;
  812. float: left;
  813. .goods-image {
  814. width: 128rpx;
  815. height: 128rpx;
  816. float: left;
  817. image {
  818. width: 128rpx;
  819. height: 128rpx;
  820. display: block;
  821. border-radius: 4rpx;
  822. }
  823. }
  824. .goods-main {
  825. width: 432rpx;
  826. height: 128rpx;
  827. box-sizing: border-box;
  828. padding-left: 32rpx;
  829. float: right;
  830. .name {
  831. width: 100%;
  832. height: 60rpx;
  833. box-sizing: border-box;
  834. line-height: 60rpx;
  835. color: #333333;
  836. text-overflow: ellipsis;
  837. overflow: hidden;
  838. display: -webkit-box;
  839. -webkit-line-clamp: 1;
  840. line-clamp: 1;
  841. -webkit-box-orient: vertical;
  842. font-size: 26rpx;
  843. }
  844. .shop {
  845. line-height: 60rpx;
  846. color: #999999;
  847. font-size: 26rpx;
  848. text-overflow: ellipsis;
  849. overflow: hidden;
  850. display: -webkit-box;
  851. -webkit-line-clamp: 1;
  852. line-clamp: 1;
  853. -webkit-box-orient: vertical;
  854. }
  855. }
  856. }
  857. }
  858. }
  859. .list-view-radio {
  860. width: 100%;
  861. height: 90rpx;
  862. box-sizing: border-box;
  863. padding: 0 10rpx;
  864. border: 1px solid #b2b2b2;
  865. border-radius: 6rpx;
  866. margin-bottom: 30rpx;
  867. position: relative;
  868. &.btn {
  869. border: none;
  870. margin-top: 40rpx;
  871. }
  872. .input {
  873. width: 100%;
  874. height: 90rpx;
  875. line-height: 90rpx;
  876. float: left;
  877. box-sizing: border-box;
  878. font-size: $font-size-24;
  879. color: #333333;
  880. padding: 0 10rpx;
  881. padding-right: 90rpx;
  882. }
  883. .iconfont {
  884. width: 50rpx;
  885. height: 90rpx;
  886. display: block;
  887. line-height: 90rpx;
  888. text-align: center;
  889. font-size: 30rpx;
  890. color: #999999;
  891. position: absolute;
  892. right: 0;
  893. top: 0;
  894. }
  895. }
  896. .list-view-list-main {
  897. width: 100%;
  898. height: auto;
  899. box-sizing: border-box;
  900. margin-bottom: 30rpx;
  901. position: relative;
  902. .list-view-list {
  903. width: 100%;
  904. height: 90rpx;
  905. box-sizing: border-box;
  906. margin-bottom: 30rpx;
  907. .list-view-input {
  908. width: 614rpx;
  909. height: 90rpx;
  910. float: left;
  911. position: relative;
  912. .input {
  913. width: 614rpx;
  914. height: 90rpx;
  915. box-sizing: border-box;
  916. padding: 0 20rpx;
  917. border: 1px solid #b2b2b2;
  918. border-radius: 6rpx;
  919. font-size: $font-size-24;
  920. color: #333333;
  921. }
  922. .list-view-assAction {
  923. width: 614rpx;
  924. min-height: 270rpx;
  925. box-sizing: border-box;
  926. padding: 10rpx 0;
  927. background: rgba(255, 255, 255, 1);
  928. box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.15);
  929. border-radius: 6rpx;
  930. position: absolute;
  931. top: -288rpx;
  932. left: 0;
  933. z-index: 999;
  934. overflow: hidden;
  935. .tui-popup-scroll {
  936. width: 100%;
  937. height: 270rpx;
  938. }
  939. .ass-list {
  940. width: 100%;
  941. height: 90rpx;
  942. box-sizing: border-box;
  943. padding: 0 24rpx;
  944. line-height: 90rpx;
  945. font-size: $font-size-26;
  946. color: #666666;
  947. text-align: left;
  948. border-bottom: 1px solid #e1e1e1;
  949. &:last-child {
  950. border-bottom: none;
  951. }
  952. }
  953. }
  954. }
  955. .list-view-btn {
  956. width: 88rpx;
  957. height: 90rpx;
  958. float: right;
  959. text-align: center;
  960. line-height: 90rpx;
  961. .icon-zengjia {
  962. color: #1890f9;
  963. font-size: $font-size-48;
  964. }
  965. .icon-shanchu4 {
  966. color: #e15616;
  967. font-size: $font-size-48;
  968. }
  969. }
  970. }
  971. }
  972. .remarks-category {
  973. width: 100%;
  974. float: left;
  975. .checkbox-list {
  976. height: 60rpx;
  977. font-size: $font-size-28;
  978. line-height: 60rpx;
  979. border-radius: 10rpx;
  980. margin-right: 20rpx;
  981. margin-bottom: 10rpx;
  982. box-sizing: border-box;
  983. float: left;
  984. .icon-yixuanze {
  985. margin-right: 10rpx;
  986. color: #e15616;
  987. }
  988. .icon-weixuanze {
  989. margin-right: 10rpx;
  990. color: #b2b2b2;
  991. }
  992. }
  993. .item-text {
  994. display: inline-block;
  995. font-size: 26rpx;
  996. color: #333333;
  997. border-radius: 28rpx;
  998. line-height: 50rpx;
  999. }
  1000. }
  1001. .remarks-input {
  1002. width: 100%;
  1003. height: 90rpx;
  1004. padding: 0 16rpx;
  1005. margin: 20rpx 0 0 0;
  1006. border-radius: 6rpx;
  1007. position: relative;
  1008. border: 1px solid #b2b2b2;
  1009. box-sizing: border-box;
  1010. .input {
  1011. width: 100%;
  1012. height: 90rpx;
  1013. line-height: 90rpx;
  1014. font-size: $font-size-26;
  1015. color: $text-color;
  1016. z-index: 1;
  1017. }
  1018. }
  1019. .remarks-textarea {
  1020. width: 100%;
  1021. height: 226rpx;
  1022. padding: 16rpx;
  1023. margin: 20rpx 0 0 0;
  1024. border-radius: 6rpx;
  1025. position: relative;
  1026. border: 1px solid #b2b2b2;
  1027. box-sizing: border-box;
  1028. .textarea {
  1029. width: 100%;
  1030. height: 100%;
  1031. line-height: 36rpx;
  1032. font-size: $font-size-26;
  1033. color: $text-color;
  1034. z-index: 1;
  1035. }
  1036. .limit-text {
  1037. position: absolute;
  1038. right: 20rpx;
  1039. bottom: 16rpx;
  1040. line-height: 44rpx;
  1041. font-size: $font-size-24;
  1042. color: #b2b2b2;
  1043. }
  1044. }
  1045. .list-view {
  1046. width: 100%;
  1047. height: 40rpx;
  1048. margin-top: 20rpx;
  1049. .list-view-file {
  1050. width: 132rpx;
  1051. height: 44rpx;
  1052. line-height: 44rpx;
  1053. font-size: $font-size-20;
  1054. text-align: center;
  1055. color: #ffffff;
  1056. background-color: $color-system;
  1057. border-radius: 8rpx;
  1058. float: left;
  1059. margin-top: 10rpx;
  1060. }
  1061. .list-view-text {
  1062. width: 100%;
  1063. float: left;
  1064. .input {
  1065. width: 560rpx;
  1066. height: 44rpx;
  1067. box-sizing: border-box;
  1068. line-height: 44rpx;
  1069. color: #333333;
  1070. text-overflow: ellipsis;
  1071. overflow: hidden;
  1072. display: -webkit-box;
  1073. -webkit-line-clamp: 1;
  1074. line-clamp: 1;
  1075. -webkit-box-orient: vertical;
  1076. float: left;
  1077. }
  1078. .delbtn {
  1079. width: 96rpx;
  1080. height: 44rpx;
  1081. border-radius: 8rpx;
  1082. background-color: #fff2ec;
  1083. font-size: $font-size-24;
  1084. color: #e15616;
  1085. line-height: 44rpx;
  1086. text-align: center;
  1087. float: left;
  1088. }
  1089. }
  1090. }
  1091. .list-view-upload {
  1092. width: 100%;
  1093. height: auto;
  1094. .photo-item {
  1095. display: inline-block;
  1096. width: 112rpx;
  1097. height: 112rpx;
  1098. margin: 10rpx 0;
  1099. margin-right: 25rpx;
  1100. border-radius: 10rpx;
  1101. border: 1px solid #f5f5f5;
  1102. position: relative;
  1103. float: left;
  1104. &.add {
  1105. width: 112rpx;
  1106. height: 112rpx;
  1107. border-color: #b2b2b2;
  1108. text-align: center;
  1109. line-height: 112rpx;
  1110. margin-right: 0rpx;
  1111. .icon-jiahao {
  1112. font-size: $font-size-44;
  1113. color: #b2b2b2;
  1114. font-weight: bold;
  1115. }
  1116. }
  1117. .icon-iconfontguanbi {
  1118. width: 30rpx;
  1119. height: 30rpx;
  1120. border-radius: 50%;
  1121. display: block;
  1122. position: absolute;
  1123. right: -10rpx;
  1124. top: -10rpx;
  1125. background: #f94b4b;
  1126. text-align: center;
  1127. line-height: 30rpx;
  1128. color: #ffffff;
  1129. font-size: $font-size-22;
  1130. }
  1131. image {
  1132. width: 112rpx;
  1133. height: 112rpx;
  1134. border-radius: 10rpx;
  1135. }
  1136. }
  1137. .photo-list {
  1138. width: 100%;
  1139. height: 116rpx;
  1140. overflow: hidden;
  1141. white-space: nowrap;
  1142. display: flex;
  1143. align-items: flex-start;
  1144. }
  1145. }
  1146. }
  1147. .remarks-btn {
  1148. width: 100%;
  1149. padding-top: 20rpx;
  1150. position: fixed;
  1151. bottom: 0;
  1152. left: 0;
  1153. background-color: #ffffff;
  1154. z-index: 99;
  1155. .edit-button-canel {
  1156. width: 100%;
  1157. height: 88rpx;
  1158. line-height: 88rpx;
  1159. text-align: center;
  1160. color: #e15616;
  1161. font-size: $font-size-24;
  1162. }
  1163. .edit-button {
  1164. width: 600rpx;
  1165. height: 90rpx;
  1166. background: $btn-confirm;
  1167. line-height: 90rpx;
  1168. text-align: center;
  1169. color: #ffffff;
  1170. font-size: $font-size-30;
  1171. margin: 0 auto;
  1172. border-radius: 45rpx;
  1173. }
  1174. }
  1175. </style>