dailyHistoricalDetails.vue 30 KB

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