dailyHistoricalDetails.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. <template>
  2. <div class="dailyHistoricalDetails">
  3. <div class="dailyHistoricalDetailsBox" v-if="setDailyDetailsBoxFlag">
  4. <!-- 顶部条-->
  5. <div class="navBarTOP">
  6. <van-nav-bar class="navBar" title="日报详情" left-arrow @click-left="onClickLeft">
  7. <template #right>
  8. <!-- 分享按钮 -->
  9. <!-- 分享过的不能在分享, fx分销的可以分享,reportTarget,status == -1过期未汇报不能分享 -->
  10. <div
  11. class="shareBtn"
  12. @click="clickShareFlag(-1)"
  13. v-if="reportTarget && source != 'share' && reportTarget.status != -1">
  14. <van-icon name="share" />
  15. <div class="vedioLinks" @click.stop>
  16. <span>一键分享日报,</span>
  17. <span>
  18. <span class="linkSpan" @click.stop="shareVedioLinks"> 点击查看 </span>
  19. 操作视频
  20. </span>
  21. <van-icon name="play" />
  22. </div>
  23. </div>
  24. </template>
  25. </van-nav-bar>
  26. </div>
  27. <div class="lineGrey"></div>
  28. <div class="lineGrey"></div>
  29. <div class="lineGrey"></div>
  30. <div class="lineGrey"></div>
  31. <div class="lineGrey"></div>
  32. <!-- 主体内容-->
  33. <div class="container linep" v-if="reportTargetAll">
  34. <p style="font-size: 16px; margin: 10px 0">
  35. {{ title }}
  36. </p>
  37. <p style="font-size: 16px; margin: 10px 0" v-if="reportTarget.commitTime">
  38. 提交时间: {{ reportTarget.commitTime }}
  39. </p>
  40. <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
  41. <target :homePageIndicatorDate="homePageIndicatorList"></target>
  42. </template>
  43. <template v-else>
  44. <van-collapse v-model="activeNames" style="margin-top: -3px">
  45. <template v-if="!YFQuota">
  46. <!-- YFQuota:应用服务平台 不显示各项指标 -->
  47. <Atarget :reportInfo="reportTarget"></Atarget>
  48. <Btarget :reportInfo="reportTarget"></Btarget>
  49. </template>
  50. </van-collapse>
  51. </template>
  52. <div class="contentContainer">
  53. <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
  54. <reportCustom
  55. ref="reportCustom"
  56. v-if="reportTarget.isHistory == '0'"
  57. :disabled="true"
  58. :reportCustomData="reportTarget.customTaskList"></reportCustom>
  59. <template v-else>
  60. <div v-if="GZQuota">
  61. <p class="contentContainerTitle">今日项目跟进数</p>
  62. <div style="padding: 10px 0">
  63. <van-field readonly v-model="projectFollowNum" type="digit" />
  64. </div>
  65. <p class="contentContainerTitle">今日TUC成功报备数量</p>
  66. <div style="padding: 10px 0">
  67. <van-field readonly v-model="tucReportingSuccessNum" type="digit" />
  68. </div>
  69. </div>
  70. <!-- 今日未拜访原因 如果不为空则展示,为空则不展示 -->
  71. <div v-if="reportTarget.notVisitReason && reportTarget.notVisitReason != ''">
  72. <p class="contentContainerTitle">截至日报提交时间,今日拜访0家店的原因</p>
  73. <div style="padding: 10px 0">
  74. <van-field
  75. readonly
  76. v-model="reportTarget.notVisitReason"
  77. rows="4"
  78. autosize
  79. type="textarea" />
  80. </div>
  81. </div>
  82. <p class="contentContainerTitle">今日机会与挑战总结</p>
  83. <div style="padding: 10px 0">
  84. <van-field v-model="Content" rows="4" autosize readonly type="textarea" />
  85. </div>
  86. <p class="contentContainerTitle">明日工作规划</p>
  87. <div style="padding: 10px 0">
  88. <van-field v-model="Content2" rows="4" autosize readonly type="textarea" />
  89. </div>
  90. </template>
  91. </div>
  92. <div
  93. class="contentContainer"
  94. v-if="reportTarget.status > 1 || reportTarget.reportRemarks != null">
  95. <p class="texttitle texttitledaily">
  96. <span class="opint"></span>
  97. <span v-if="reportTarget.status == 1">待审批</span>
  98. <span v-if="reportTarget.status == 3">审批完成</span>
  99. <span v-if="reportTarget.status == 2">退回重写</span>
  100. <span v-if="reportTarget.status == -1">过期未汇报</span>
  101. <span v-if="reportTarget.status > 1"><{{ ptitle }}审批></span>
  102. </p>
  103. <div style="padding: 10px 0" v-if="reportTarget.status > 1">
  104. <van-rate
  105. v-model="reportTarget.number"
  106. :size="25"
  107. readonly
  108. color="#ffd21e"
  109. void-icon="star"
  110. void-color="#eee" /><span class="rateText"
  111. >&nbsp;&nbsp;&nbsp;&nbsp;{{ reportTarget.number }}分</span
  112. >
  113. </div>
  114. <div style="padding: 10px 0" v-if="reportTarget.status > 1">
  115. <van-field v-model="successContent" rows="4" autosize readonly type="textarea" />
  116. </div>
  117. </div>
  118. <div class="contentContainer" v-if="reportTarget.reportRemarks != null">
  119. <div>
  120. <div v-for="(item, index) in reportTarget.reportRemarks" :key="index">
  121. <div class="contentContainerTitle redisplay">
  122. <div class="nameTitle">
  123. <template v-if="item.deptName">{{ item.deptName }}-</template
  124. >{{ item.postName }}-{{ item.nickName }}的点评
  125. </div>
  126. <div
  127. class="shareBtn"
  128. @click="clickShareFlag(index)"
  129. v-if="reportTarget && source != 'share' && reportTarget.status != -1">
  130. <van-icon name="share" />
  131. </div>
  132. </div>
  133. <div style="padding: 10px 0">
  134. <van-field
  135. v-model="item.remarkContent"
  136. rows="4"
  137. autosize
  138. readonly
  139. type="textarea" />
  140. </div>
  141. <!-- <p style="text-align: right">点评时间:{{ item.createTime }}</p> -->
  142. </div>
  143. </div>
  144. </div>
  145. <div class="contentContainer" v-if="reportTarget.comment">
  146. <p class="contentContainerTitle">点评</p>
  147. <div style="padding: 10px 0">
  148. <van-field
  149. v-model="managerRemarkContent"
  150. rows="4"
  151. autosize
  152. maxlength="800"
  153. show-word-limit
  154. type="textarea"
  155. :formatter="formatter" />
  156. </div>
  157. </div>
  158. </div>
  159. <br />
  160. <div class="contentborder" v-if="reportTarget.comment">
  161. <van-button type="info" size="small" plain class="Btn1" @click="submint"
  162. >提交点评</van-button
  163. >
  164. </div>
  165. <br />
  166. <br />
  167. <br />
  168. <!-- v-if="isDiy=='true'" v-if="reportTarget.status!=-1&&showEnvelopes&&(reportTarget.userId!=reportTarget.loginUserId)"-->
  169. <!-- <div class="envelopes" @click="openEnterpriseChat" >-->
  170. <!-- <img :src="envelopes">-->
  171. <!-- <p>红包奖励</p>-->
  172. <!-- </div>-->
  173. <!-- <div class="envelopes" @click="openEnterpriseChatv" v-if="reportTarget.status!=-1&&!showEnvelopes&&(reportTarget.userId!=reportTarget.loginUserId)">-->
  174. <!-- <img :src="envelopes">-->
  175. <!-- <p>红包提醒</p>-->
  176. <!-- </div>-->
  177. <!-- <div class="contentborder">-->
  178. <!-- <van-button type="info" size="small" plain class="Btn1" >红包会话测试</van-button>-->
  179. <!-- </div>-->
  180. <br />
  181. <br />
  182. <br />
  183. <br />
  184. </div>
  185. <share
  186. v-if="setShareFlag"
  187. :reportTarget="reportTarget"
  188. :reportId="$route.query.reportId"
  189. @setShareImg="setShareImg"
  190. @setDailyDetailsBox="setDailyDetailsBox"
  191. :urlList="urlList"
  192. :reportRemarksIndex="reportRemarksIndex"
  193. :reportContents="reportContents"
  194. :checkedPlan="checkedPlan"
  195. :isTarget="isTarget"
  196. :isReportCustom="isReportCustom"
  197. :isHistory="reportTarget.isHistory"></share>
  198. <!--分享图片列表 -->
  199. <el-dialog
  200. title="选择分享的内容"
  201. :visible.sync="shareImgFlag"
  202. width="90%"
  203. :append-to-body="true"
  204. :close-on-click-modal="false"
  205. @close="wuliaoTableClose"
  206. custom-class="shareImgFlag">
  207. <div>
  208. <!-- <p style="margin-bottom: 10px; margin-top: 0; display: flex">
  209. 今日总结&明日规划的文本内容<van-checkbox
  210. v-model="checkedPlan"
  211. style="margin-left: 10px"></van-checkbox>
  212. </p> -->
  213. <p
  214. style="margin-bottom: 10px; margin-top: 0; display: flex"
  215. v-if="reportTarget.isHistory == '0'">
  216. 日报指标<van-checkbox v-model="isTarget" style="margin-left: 10px"></van-checkbox>
  217. </p>
  218. <p
  219. style="margin-bottom: 10px; margin-top: 0; display: flex"
  220. v-if="reportTarget.isHistory == '0'">
  221. 日报填写内容<van-checkbox
  222. v-model="isReportCustom"
  223. style="margin-left: 10px"></van-checkbox>
  224. </p>
  225. <template v-if="reportTarget.photoSummary">
  226. <p style="margin-top: 0">请点击勾选想要分享的今日拜访照片</p>
  227. <div class="shareVisitImg">
  228. <template v-for="(itemImg, indexImg) in reportTarget.photoSummary">
  229. <div>
  230. <img :src="itemImg.fileUrl" alt="" @click="selectImg(itemImg)" />
  231. <van-icon
  232. @click.stop
  233. name="success"
  234. class="activaImg"
  235. color="#fff"
  236. size="15"
  237. style="
  238. position: absolute;
  239. right: 0;
  240. bottom: 0;
  241. /* margin: -15px 0 0 -15px; */
  242. pointer-events: none;
  243. background: #2b73cf;
  244. border: 2px solid #fff;
  245. "
  246. v-if="itemImg.checked" />
  247. </div>
  248. </template>
  249. </div>
  250. </template>
  251. </div>
  252. <span slot="footer" class="footer-btn">
  253. <van-button plain type="primary" @click="shareImgFlag = false">取 消</van-button>
  254. <van-button type="primary" @click="confirmShare">确 定</van-button>
  255. </span>
  256. </el-dialog>
  257. </div>
  258. </template>
  259. <script>
  260. import history from '@/assets/Icon/history.png';
  261. import envelopes from '@/assets/envelopes.png';
  262. import {
  263. userTodayPlanNum,
  264. insertRemark,
  265. getDetailById,
  266. updateReport,
  267. buryingPoint,
  268. getDictOption,
  269. } from '@/api/index';
  270. import axios from 'axios';
  271. import { ImagePreview } from 'vant';
  272. import visitedRealTime from '@/views/componentsTarget/visitedRealTime';
  273. import createStoreBJ from '@/views/componentsTarget/createStoreBJ';
  274. import placeOrder from '@/views/componentsTarget/placeOrder';
  275. import ZYPlaceOrder from '@/views/componentsTarget/ZYPlaceOrder';
  276. import performanceSAP from '@/views/componentsTarget/performanceSAP';
  277. import ZYSAP from '@/views/componentsTarget/ZYSAP';
  278. import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
  279. import share from '@/components/share';
  280. import reportCustom from './reportCustom';
  281. import target from './target.vue';
  282. import Atarget from '@/views/home/Atarget.vue';
  283. import Btarget from '@/views/home/Btarget.vue';
  284. export default {
  285. name: 'daily',
  286. components: {
  287. visitedRealTime,
  288. createStoreBJ,
  289. placeOrder,
  290. ZYPlaceOrder,
  291. performanceSAP,
  292. ZYSAP,
  293. veryGoodPlaceOrder,
  294. share,
  295. reportCustom,
  296. target,
  297. Atarget,
  298. Btarget,
  299. },
  300. data() {
  301. return {
  302. envelopes: envelopes,
  303. show: true,
  304. num: 0,
  305. title: '',
  306. ptitle: '',
  307. showEnvelopes: true,
  308. todayGoal: {},
  309. progressWidth: 0,
  310. history: history,
  311. imgArr: [],
  312. activeNames: [
  313. '1',
  314. '2',
  315. '3',
  316. '4',
  317. '5',
  318. '6',
  319. '7',
  320. '8',
  321. '10',
  322. '16',
  323. '17',
  324. '20',
  325. '21',
  326. '22',
  327. '23',
  328. '11',
  329. '29',
  330. '33',
  331. '40',
  332. '41',
  333. '42',
  334. '43',
  335. ],
  336. value: '2',
  337. message: '',
  338. powerGrade: '',
  339. Content: '',
  340. Content2: '',
  341. reportTargetAll: null,
  342. reportContents: [],
  343. reportTarget: {},
  344. successContent: '',
  345. managerRemarkContent: '',
  346. projectFollowNum: '',
  347. reportingNum: '',
  348. tucReportingSuccessNum: '',
  349. isDiy: false,
  350. type: '-1',
  351. imgList: [],
  352. JZQuota: false,
  353. titlejz: '',
  354. GZQuota: false,
  355. YFQuota: false, //应用服务
  356. saptitle: '业绩目标SAP(千元)',
  357. setShareFlag: false,
  358. source: '',
  359. reportRemarksIndex: -1,
  360. shareImgFlag: false,
  361. urlList: [],
  362. reportId: '',
  363. checkedPlan: true, //今日总结&明日规划
  364. setDailyDetailsBoxFlag: true,
  365. visitIMG1Flag: false,
  366. shareReportConfig: null,
  367. postName: '',
  368. homePageIndicatorList: null,
  369. isTarget: false, //日报指标
  370. isReportCustom: true, //日报填写内容
  371. };
  372. },
  373. watch: {
  374. $route(to, from) {
  375. this.powerGrade = localStorage.getItem('powerGrade');
  376. this.isDiy = localStorage.getItem('isDiy');
  377. if (to.path == '/dailyHistoricalDetails') {
  378. this.showEnvelopes = true;
  379. this.getDetailById();
  380. }
  381. // &&from.path=="/dailyApprovalList"
  382. // if(to.path=="/dailyDetails"&&from.path=="/myHistoricalDaily"){
  383. // this.getDetailById()
  384. // }
  385. },
  386. },
  387. activated() {
  388. this.setDailyDetailsBoxFlag = true;
  389. this.shareImgFlag = false;
  390. this.reportId = this.$route.query.reportId ? this.$route.query.reportId.replace('?', '') : '';
  391. console.log(this.reportId);
  392. this.source = this.$route.query.source;
  393. this.num = 0;
  394. this.userTodayPlanNum();
  395. this.setShareFlag = false;
  396. this.powerGrade = localStorage.getItem('powerGrade');
  397. this.isDiy = localStorage.getItem('isDiy');
  398. this.getDetailById();
  399. },
  400. methods: {
  401. setVisitIMG1Flag(item) {
  402. this.$set(item, 'visitIMG1Flag', !item.visitIMG1Flag);
  403. this.$forceUpdate();
  404. },
  405. setDailyDetailsBox(flag) {
  406. this.setDailyDetailsBoxFlag = flag;
  407. },
  408. setShareImg(flag) {
  409. this.setShareFlag = flag;
  410. },
  411. // 打开分享
  412. clickShareFlag(index = -1) {
  413. buryingPoint({
  414. systemModel: '日报审核',
  415. buryingPointType: 2,
  416. buryingPointValue: this.$route.query.reportId,
  417. buryingPointName: '日报详情分享',
  418. buryingPointPosition: '日报详情',
  419. });
  420. this.urlList = [];
  421. this.reportRemarksIndex = index;
  422. // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
  423. if (this.reportTarget.isHistory == '0') {
  424. this.setPhotoSummary();
  425. this.shareImgFlag = true;
  426. } else {
  427. this.setPhotoSummary();
  428. // 没有图片直接打开分享
  429. if (this.reportTarget.photoSummary && this.reportTarget.photoSummary.length) {
  430. // 选择分享的图片
  431. this.setShareFlag = true;
  432. }
  433. }
  434. },
  435. setPhotoSummary() {
  436. if (this.reportTarget.photoSummary && this.reportTarget.photoSummary.length) {
  437. // 重置分享图片状态
  438. this.reportTarget.photoSummary.forEach((item) => {
  439. this.$set(item, 'checked', false);
  440. });
  441. }
  442. },
  443. // 确认分享
  444. confirmShare() {
  445. // 旧的分享没有图标不会进来
  446. // 是否有图片
  447. if (this.reportTarget.photoSummary) {
  448. this.reportTarget.photoSummary.forEach((item) => {
  449. if (item.checked) this.urlList.push(item.fileUrl);
  450. });
  451. if (this.reportTarget.isHistory == '0') {
  452. if (this.urlList.length == 0 && !this.isTarget && !this.isReportCustom) {
  453. this.$notify({
  454. type: 'warning',
  455. message: '请选择分享内容!',
  456. className: 'notifyIndex',
  457. });
  458. return;
  459. }
  460. } else {
  461. if (this.urlList.length == 0 && !this.checkedPlan) {
  462. this.$notify({
  463. type: 'warning',
  464. message: '请选择分享内容!',
  465. className: 'notifyIndex',
  466. });
  467. return;
  468. }
  469. }
  470. } else {
  471. if (this.reportTarget.isHistory == '0') {
  472. if (!this.isTarget && !this.isReportCustom) {
  473. this.$notify({
  474. type: 'warning',
  475. message: '请选择分享内容!',
  476. className: 'notifyIndex',
  477. });
  478. return;
  479. }
  480. }
  481. }
  482. buryingPoint({
  483. systemModel: '日报审核',
  484. buryingPointType: 2,
  485. buryingPointValue: `文本${this.checkedPlan ? '是' : '否'},图片${this.urlList.length}`,
  486. buryingPointName: '日报分享确认',
  487. buryingPointPosition: '日报详情',
  488. });
  489. this.shareImgFlag = false;
  490. this.setShareFlag = true;
  491. },
  492. pviewFn(index) {
  493. var imgList = [];
  494. var photos = this.reportTarget.photoSummary;
  495. for (let i = 0; i < photos.length; i++) {
  496. imgList.push(photos[i].fileUrl);
  497. }
  498. ImagePreview({ images: imgList, startPosition: index });
  499. },
  500. openEnterpriseChatv() {
  501. this.$dialog
  502. .confirm({
  503. title: '系统提示',
  504. message: '是否发送红包提醒?',
  505. })
  506. .then(() => {
  507. this.$toast('提醒成功!');
  508. })
  509. .catch(() => {
  510. // on cancel
  511. });
  512. },
  513. formatter(value) {
  514. return value.replace(
  515. /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
  516. '',
  517. );
  518. },
  519. openEnterpriseChat(val) {
  520. let loading1 = this.$toast.loading({
  521. duration: 0,
  522. message: '加载中...',
  523. forbidClick: true,
  524. });
  525. let url = window.location.href;
  526. let that = this;
  527. let wx = this.wx;
  528. let qiyeData;
  529. var userIds = this.reportTarget.reportContents[0].createBy;
  530. const instance = axios.create();
  531. instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
  532. instance
  533. .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
  534. params: {
  535. url: url,
  536. },
  537. })
  538. .then((response) => {
  539. if (response.status == 200) {
  540. loading1.clear();
  541. qiyeData = response.data.data;
  542. wx.config({
  543. beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
  544. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  545. appId: qiyeData.appId, // 必填,企业微信的corpID
  546. timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
  547. nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
  548. signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
  549. jsApiList: ['ready', 'openEnterpriseChat'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
  550. });
  551. wx.ready(function () {
  552. wx.openEnterpriseChat({
  553. //localStorage.getItem("loginName")
  554. userIds: userIds,
  555. // externalUserIds:"dingxiaogai.sm",
  556. groupName: '我的红包群', // 会话名称。单聊时该参数传入空字符串""即可。localStorage.getItem("loginName")
  557. chatId: '', //CHATID 若要打开已有会话,需指定此参数。如果是新建会话,chatId必须为空串
  558. success: function (res) {
  559. that.showEnvelopes = false;
  560. var chatId = res.chatId; //返回当前群聊ID,仅当使用agentConfig注入该接口权限时才返回chatId
  561. },
  562. fail: function (res) {
  563. if (res.errMsg.indexOf('function not exist') > -1) {
  564. alert('版本过低请升级');
  565. }
  566. },
  567. });
  568. });
  569. } else {
  570. this.$toast.fail(dataList.msg);
  571. }
  572. });
  573. },
  574. submint() {
  575. let loading1 = this.$toast.loading({
  576. duration: 0,
  577. message: '数据提交中...',
  578. forbidClick: true,
  579. });
  580. if (this.managerRemarkContent.trim() == '') {
  581. this.$toast('点评内容未填写');
  582. return false;
  583. }
  584. if (this.managerRemarkContent.length > 800) {
  585. this.$toast('点评内容超过800字');
  586. return false;
  587. }
  588. var remak = {
  589. remarkContent: this.managerRemarkContent,
  590. reportId: this.reportId,
  591. };
  592. insertRemark(remak).then((res) => {
  593. loading1.clear();
  594. if (res.code == 200) {
  595. this.$dialog
  596. .alert({
  597. title: '系统提示',
  598. message: '提交成功',
  599. })
  600. .then(() => {
  601. this.managerRemarkContent = '';
  602. this.getDetailById();
  603. });
  604. } else {
  605. this.$toast.fail(res.msg);
  606. }
  607. });
  608. },
  609. getDetailById() {
  610. let loading1 = this.$toast.loading({
  611. duration: 0,
  612. message: '加载中...',
  613. forbidClick: true,
  614. });
  615. // 获取店招异常原因字典
  616. getDictOption({}, 'share_report_config').then((res) => {
  617. this.shareReportConfig = res.data;
  618. });
  619. this.homePageIndicatorList = null;
  620. getDetailById({ reportId: this.reportId }).then((res) => {
  621. loading1.clear();
  622. if (res.code == 500 && this.source == 'share') {
  623. this.$dialog
  624. .confirm({
  625. title: '系统提示',
  626. message: res.msg,
  627. showCancelButton: false,
  628. })
  629. .then(() => {
  630. this.$router.replace({
  631. path: '/My/index',
  632. });
  633. });
  634. } else {
  635. if (res.data.postName == '质感销售负责人' || res.data.postName == '质感销售专员') {
  636. this.homePageIndicatorList = res.data.homePageIndicatorList;
  637. }
  638. console.log(this.homePageIndicatorList);
  639. this.postName = res.data.postName;
  640. this.GZQuota = false;
  641. this.JZQuota = false;
  642. this.YFQuota = res.data.postType == 'YF' ? true : false;
  643. if (res.data.postType == 'JZ') {
  644. this.JZQuota = true;
  645. } else if (res.data.postType == 'GZ') {
  646. this.GZQuota = true;
  647. this.saptitle = '公裝业绩SAP(千元)';
  648. } else {
  649. this.saptitle = '业绩目标SAP(千元)';
  650. }
  651. this.title =
  652. res.data.deptName + '-' + res.data.postName + '-' + res.data.nickName + '的日报';
  653. this.ptitle = res.data.pdeptName + '-' + res.data.ppostName + '-' + res.data.pnickName;
  654. this.reportTargetAll = res.data.reportTargetAll;
  655. this.reportTarget = res.data;
  656. this.type = res.data.userType;
  657. if (res.data.status == 3) {
  658. this.successContent = res.data.successContent;
  659. } else {
  660. this.successContent = res.data.failContent;
  661. }
  662. this.Content = '';
  663. this.Content2 = '';
  664. this.reportContents = [];
  665. // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
  666. if (this.reportTarget.isHistory == '0') {
  667. if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
  668. for (let x = 0; x < this.reportTarget.customTaskList.length; x++) {
  669. let sfaReportCustomCollections =
  670. this.reportTarget.customTaskList[x].sfaReportCustomCollections;
  671. if (sfaReportCustomCollections) {
  672. for (let y = 0; y < sfaReportCustomCollections.length; y++) {
  673. let custom = this.shareReportConfig.filter(
  674. (val) =>
  675. val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName,
  676. );
  677. if (custom.length) {
  678. custom[0].content = sfaReportCustomCollections[y].answerValue;
  679. this.reportContents = this.reportContents.concat(custom);
  680. }
  681. }
  682. }
  683. }
  684. }
  685. } else {
  686. if (res.data.reportContents.length > 0) {
  687. this.Content = res.data.reportContents[0].dayContent;
  688. if (res.data.reportContents.length > 1) {
  689. this.Content2 = res.data.reportContents[1].dayContent;
  690. } else {
  691. this.Content2 = '';
  692. }
  693. if (res.data.reportContents.length > 2) {
  694. this.projectFollowNum = res.data.reportContents[2].projectFollowNum;
  695. this.tucReportingSuccessNum = res.data.reportContents[3].tucReportingSuccessNum;
  696. }
  697. }
  698. this.reportContents = [
  699. {
  700. dictValue: '今日机会与挑战总结',
  701. content: this.Content,
  702. },
  703. {
  704. dictValue: '明日工作计划',
  705. content: this.Content2,
  706. },
  707. ];
  708. }
  709. var imgList = [];
  710. if (res.data.photoSummary != null) {
  711. for (var k = 0; k < res.data.photoSummary.length; k++) {
  712. imgList.push(res.data.photoSummary[k].fileUrl + '');
  713. }
  714. }
  715. this.imgList = imgList;
  716. }
  717. var imgList = [];
  718. if (res.data.photoSummary != null) {
  719. if (res.data.photoSummary != null) {
  720. for (var k = 0; k < res.data.photoSummary.length; k++) {
  721. imgList.push(res.data.photoSummary[k].fileUrl + '');
  722. }
  723. }
  724. }
  725. this.imgList = imgList;
  726. });
  727. },
  728. userTodayPlanNum() {
  729. userTodayPlanNum().then((res) => {
  730. if (res.code == 200) {
  731. this.todayGoal = res.data;
  732. this.progressWidth = (this.todayGoal.finishNum / this.todayGoal.planNum) * 100 + '%';
  733. localStorage.setItem('nickName', res.data.user.nickName);
  734. localStorage.setItem('storeType', res.data.user.type);
  735. } else {
  736. this.$toast.fail(res.msg);
  737. }
  738. });
  739. },
  740. onClickLeft() {
  741. if (this.source == 'share') {
  742. this.$router.replace({
  743. path: '/My/index',
  744. });
  745. } else {
  746. this.$router.go(-1);
  747. }
  748. },
  749. wuliaoTableClose() {
  750. this.shareImgFlag = false;
  751. },
  752. // 选中的图片
  753. selectImg(item) {
  754. this.$set(item, 'checked', !item.checked);
  755. console.log(item);
  756. },
  757. },
  758. };
  759. </script>
  760. <style scoped lang="scss">
  761. .dailyHistoricalDetails {
  762. position: relative;
  763. background: #fff;
  764. width: 100%;
  765. height: 100%;
  766. .dailyHistoricalDetailsBox {
  767. background: #fff;
  768. }
  769. .shareBtn {
  770. width: 30px;
  771. height: 30px;
  772. border-radius: 50%;
  773. background: #666;
  774. display: flex;
  775. align-items: center;
  776. justify-content: center;
  777. position: relative;
  778. .van-icon-share {
  779. color: #fff;
  780. }
  781. .vedioLinks {
  782. max-width: vw(190);
  783. position: absolute;
  784. bottom: 1px;
  785. background: #dae7f6;
  786. padding: 2px 7px;
  787. /* word-break: keep-all; */
  788. white-space: nowrap;
  789. /* text-overflow: ellipsis; */
  790. right: 0;
  791. border-radius: 5px;
  792. font-size: 8px;
  793. right: 40px;
  794. display: flex;
  795. flex-direction: column;
  796. justify-content: center;
  797. align-items: flex-start;
  798. z-index: 999999;
  799. span {
  800. line-height: 13px;
  801. }
  802. .linkSpan {
  803. text-decoration: underline;
  804. }
  805. .van-icon-play {
  806. position: absolute;
  807. top: 12px;
  808. /* transform: rotate(270deg); */
  809. right: -8px;
  810. color: #dae7f6;
  811. }
  812. }
  813. }
  814. }
  815. .container {
  816. margin: 10px;
  817. }
  818. .container .van-collapse-item {
  819. margin-bottom: 10px;
  820. border-radius: 6px;
  821. overflow: hidden;
  822. }
  823. .linep p {
  824. margin: 6px 0 0 0;
  825. font-size: 14px;
  826. color: #666;
  827. }
  828. .linep .texttitle {
  829. color: #0057ba;
  830. position: relative;
  831. padding-left: 10px;
  832. }
  833. .linep .texttitledaily {
  834. color: #000;
  835. position: relative;
  836. padding-left: 10px;
  837. }
  838. .linep .texttitle2 {
  839. padding-left: 0;
  840. }
  841. .linep .texttitledaily .opint {
  842. position: absolute;
  843. left: 0px;
  844. top: 6px;
  845. margin-right: 6px;
  846. display: inline-block;
  847. width: 6px;
  848. height: 6px;
  849. border-radius: 10px;
  850. background-color: #0057ba;
  851. }
  852. .leftTitle {
  853. background-color: #74a4d9;
  854. color: #fff;
  855. display: inline-block;
  856. padding: 0 4px;
  857. border-radius: 2px;
  858. }
  859. .rightTitle {
  860. background-color: #e7b4bb;
  861. color: #fff;
  862. display: inline-block;
  863. padding: 0 4px;
  864. border-radius: 2px;
  865. }
  866. .redisplay {
  867. display: flex;
  868. align-items: center;
  869. justify-content: space-between;
  870. .nameTitle {
  871. flex: 1;
  872. }
  873. }
  874. </style>
  875. <style lang="scss">
  876. .linep .van-cell__title {
  877. color: #1e5398;
  878. font-weight: 500;
  879. }
  880. .linep .contentContainer {
  881. background-color: white;
  882. border-radius: 8px;
  883. padding: 10px 16px;
  884. margin-bottom: 10px;
  885. }
  886. .linep .contentContainer .contentContainerTitle {
  887. color: #222;
  888. }
  889. .linep .contentContainer .contentContainerTitle span {
  890. font-size: 12px;
  891. color: #666;
  892. }
  893. .linep .contentContainer .van-field__control {
  894. background-color: #ebf4ff;
  895. padding: 10px;
  896. border-radius: 8px;
  897. }
  898. .linep .contentContainer .van-cell {
  899. padding: 0;
  900. }
  901. .colorbalck {
  902. color: #333;
  903. }
  904. .van-dialog__confirm,
  905. .van-dialog__confirm:active {
  906. color: #0057ba;
  907. }
  908. .visitIMG1 img {
  909. display: block;
  910. width: 100%;
  911. height: 75px;
  912. border-radius: 6px;
  913. }
  914. .table-headermd {
  915. font-size: 12px;
  916. text-align: center;
  917. position: initial;
  918. width: 98% !important;
  919. margin: 0 auto;
  920. border-right: 0;
  921. border-radius: 10px;
  922. .el-table__cell {
  923. padding: 6px 0 !important;
  924. }
  925. }
  926. .table-headermd th.el-table__cell {
  927. background-color: #1989fa;
  928. color: #fff;
  929. }
  930. .el-dialog__wrapper {
  931. z-index: 9999 !important;
  932. display: flex;
  933. justify-content: center;
  934. align-items: center;
  935. background: rgba(0, 0, 0, 0.5) !important;
  936. .shareImgFlag {
  937. overflow: hidden;
  938. display: flex;
  939. flex-direction: column;
  940. max-height: 70%;
  941. margin-top: 0 !important;
  942. .el-dialog__header {
  943. height: 40px;
  944. display: flex;
  945. justify-content: right;
  946. .el-dialog__headerbtn {
  947. position: static !important;
  948. }
  949. }
  950. .el-dialog__body {
  951. padding: 30px 20px !important;
  952. overflow-y: auto;
  953. flex: 1;
  954. }
  955. .cell {
  956. font-size: 12px;
  957. }
  958. .footer-btn {
  959. display: flex;
  960. justify-content: space-around;
  961. }
  962. }
  963. }
  964. .shareImgFlag {
  965. .shareVisitImg {
  966. display: flex;
  967. flex-wrap: wrap;
  968. div {
  969. width: 22%;
  970. height: 80px;
  971. margin-right: 3%;
  972. margin-top: 10px;
  973. position: relative;
  974. img {
  975. width: 100%;
  976. height: 100%;
  977. }
  978. }
  979. }
  980. .el-dialog__header {
  981. display: flex;
  982. .el-dialog__title {
  983. flex: 1;
  984. display: flex;
  985. align-items: center;
  986. justify-content: center;
  987. }
  988. }
  989. }
  990. .notifyIndex {
  991. z-index: 999999 !important;
  992. }
  993. .table-headermd th.el-table__cell {
  994. background-color: #1989fa;
  995. color: #fff;
  996. }
  997. .table-headermd {
  998. font-size: 12px;
  999. text-align: center;
  1000. position: initial;
  1001. width: 98% !important;
  1002. margin: 0 auto;
  1003. border-right: 0;
  1004. border-radius: 10px;
  1005. .el-table__cell {
  1006. padding: 6px 0 !important;
  1007. }
  1008. }
  1009. .van-nav-bar__right:active {
  1010. opacity: 1 !important;
  1011. }
  1012. </style>