add.vue 30 KB

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