add.vue 30 KB

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