dailyHistoricalDetails.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023
  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 && reportTarget.status != -1">
  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 && reportTarget.status != -1">
  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.isReportCustom = true;
  421. this.urlList = [];
  422. this.reportRemarksIndex = index;
  423. // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
  424. if (this.reportTarget.isHistory == '0') {
  425. this.setPhotoSummary();
  426. this.shareImgFlag = true;
  427. } else {
  428. this.setPhotoSummary();
  429. // 没有图片直接打开分享
  430. if (this.reportTarget.photoSummary && this.reportTarget.photoSummary.length) {
  431. // 选择分享的图片
  432. this.setShareFlag = true;
  433. }
  434. }
  435. },
  436. setPhotoSummary() {
  437. if (this.reportTarget.photoSummary && this.reportTarget.photoSummary.length) {
  438. // 重置分享图片状态
  439. this.reportTarget.photoSummary.forEach((item) => {
  440. this.$set(item, 'checked', false);
  441. });
  442. }
  443. },
  444. // 确认分享
  445. confirmShare() {
  446. // 旧的分享没有图标不会进来
  447. // 是否有图片
  448. if (this.reportTarget.photoSummary) {
  449. this.reportTarget.photoSummary.forEach((item) => {
  450. if (item.checked) this.urlList.push(item.fileUrl);
  451. });
  452. if (this.reportTarget.isHistory == '0') {
  453. if (this.urlList.length == 0 && !this.isTarget && !this.isReportCustom) {
  454. this.$notify({
  455. type: 'warning',
  456. message: '请选择分享内容!',
  457. className: 'notifyIndex',
  458. });
  459. return;
  460. }
  461. } else {
  462. if (this.urlList.length == 0 && !this.checkedPlan) {
  463. this.$notify({
  464. type: 'warning',
  465. message: '请选择分享内容!',
  466. className: 'notifyIndex',
  467. });
  468. return;
  469. }
  470. }
  471. } else {
  472. if (this.reportTarget.isHistory == '0') {
  473. if (!this.isTarget && !this.isReportCustom) {
  474. this.$notify({
  475. type: 'warning',
  476. message: '请选择分享内容!',
  477. className: 'notifyIndex',
  478. });
  479. return;
  480. }
  481. }
  482. }
  483. buryingPoint({
  484. systemModel: '日报审核',
  485. buryingPointType: 2,
  486. buryingPointValue: `文本${this.checkedPlan ? '是' : '否'},图片${this.urlList.length}`,
  487. buryingPointName: '日报分享确认',
  488. buryingPointPosition: '日报详情',
  489. });
  490. this.shareImgFlag = false;
  491. this.setShareFlag = true;
  492. },
  493. pviewFn(index) {
  494. var imgList = [];
  495. var photos = this.reportTarget.photoSummary;
  496. for (let i = 0; i < photos.length; i++) {
  497. imgList.push(photos[i].fileUrl);
  498. }
  499. ImagePreview({ images: imgList, startPosition: index });
  500. },
  501. openEnterpriseChatv() {
  502. this.$dialog
  503. .confirm({
  504. title: '系统提示',
  505. message: '是否发送红包提醒?',
  506. })
  507. .then(() => {
  508. this.$toast('提醒成功!');
  509. })
  510. .catch(() => {
  511. // on cancel
  512. });
  513. },
  514. formatter(value) {
  515. return value.replace(
  516. /[\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,
  517. '',
  518. );
  519. },
  520. openEnterpriseChat(val) {
  521. let loading1 = this.$toast.loading({
  522. duration: 0,
  523. message: '加载中...',
  524. forbidClick: true,
  525. });
  526. let url = window.location.href;
  527. let that = this;
  528. let wx = this.wx;
  529. let qiyeData;
  530. var userIds = this.reportTarget.reportContents[0].createBy;
  531. const instance = axios.create();
  532. instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
  533. instance
  534. .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
  535. params: {
  536. url: url,
  537. },
  538. })
  539. .then((response) => {
  540. if (response.status == 200) {
  541. loading1.clear();
  542. qiyeData = response.data.data;
  543. wx.config({
  544. beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
  545. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  546. appId: qiyeData.appId, // 必填,企业微信的corpID
  547. timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
  548. nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
  549. signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
  550. jsApiList: ['ready', 'openEnterpriseChat'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
  551. });
  552. wx.ready(function () {
  553. wx.openEnterpriseChat({
  554. //localStorage.getItem("loginName")
  555. userIds: userIds,
  556. // externalUserIds:"dingxiaogai.sm",
  557. groupName: '我的红包群', // 会话名称。单聊时该参数传入空字符串""即可。localStorage.getItem("loginName")
  558. chatId: '', //CHATID 若要打开已有会话,需指定此参数。如果是新建会话,chatId必须为空串
  559. success: function (res) {
  560. that.showEnvelopes = false;
  561. var chatId = res.chatId; //返回当前群聊ID,仅当使用agentConfig注入该接口权限时才返回chatId
  562. },
  563. fail: function (res) {
  564. if (res.errMsg.indexOf('function not exist') > -1) {
  565. alert('版本过低请升级');
  566. }
  567. },
  568. });
  569. });
  570. } else {
  571. this.$toast.fail(dataList.msg);
  572. }
  573. });
  574. },
  575. submint() {
  576. let loading1 = this.$toast.loading({
  577. duration: 0,
  578. message: '数据提交中...',
  579. forbidClick: true,
  580. });
  581. if (this.managerRemarkContent.trim() == '') {
  582. this.$toast('点评内容未填写');
  583. return false;
  584. }
  585. if (this.managerRemarkContent.length > 800) {
  586. this.$toast('点评内容超过800字');
  587. return false;
  588. }
  589. var remak = {
  590. remarkContent: this.managerRemarkContent,
  591. reportId: this.reportId,
  592. };
  593. insertRemark(remak).then((res) => {
  594. loading1.clear();
  595. if (res.code == 200) {
  596. this.$dialog
  597. .alert({
  598. title: '系统提示',
  599. message: '提交成功',
  600. })
  601. .then(() => {
  602. this.managerRemarkContent = '';
  603. this.getDetailById();
  604. });
  605. } else {
  606. this.$toast.fail(res.msg);
  607. }
  608. });
  609. },
  610. getDetailById() {
  611. let loading1 = this.$toast.loading({
  612. duration: 0,
  613. message: '加载中...',
  614. forbidClick: true,
  615. });
  616. // 获取店招异常原因字典
  617. getDictOption({}, 'share_report_config').then((res) => {
  618. this.shareReportConfig = res.data;
  619. });
  620. this.homePageIndicatorList = null;
  621. getDetailById({ reportId: this.reportId }).then((res) => {
  622. loading1.clear();
  623. if (res.code == 500 && this.source == 'share') {
  624. this.$dialog
  625. .confirm({
  626. title: '系统提示',
  627. message: res.msg,
  628. showCancelButton: false,
  629. })
  630. .then(() => {
  631. this.$router.replace({
  632. path: '/My/index',
  633. });
  634. });
  635. } else {
  636. if (res.data.postName == '质感销售负责人' || res.data.postName == '质感销售专员') {
  637. this.homePageIndicatorList = res.data.homePageIndicatorList;
  638. }
  639. console.log(this.homePageIndicatorList);
  640. this.postName = res.data.postName;
  641. this.GZQuota = false;
  642. this.JZQuota = false;
  643. this.YFQuota = res.data.postType == 'YF' ? true : false;
  644. if (res.data.postType == 'JZ') {
  645. this.JZQuota = true;
  646. } else if (res.data.postType == 'GZ') {
  647. this.GZQuota = true;
  648. this.saptitle = '公裝业绩SAP(千元)';
  649. } else {
  650. this.saptitle = '业绩目标SAP(千元)';
  651. }
  652. this.title =
  653. res.data.deptName + '-' + res.data.postName + '-' + res.data.nickName + '的日报';
  654. this.ptitle = res.data.pdeptName + '-' + res.data.ppostName + '-' + res.data.pnickName;
  655. this.reportTargetAll = res.data.reportTargetAll;
  656. this.reportTarget = res.data;
  657. this.type = res.data.userType;
  658. if (res.data.status == 3) {
  659. this.successContent = res.data.successContent;
  660. } else {
  661. this.successContent = res.data.failContent;
  662. }
  663. this.Content = '';
  664. this.Content2 = '';
  665. this.reportContents = [];
  666. // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
  667. if (this.reportTarget.isHistory == '0') {
  668. if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
  669. for (let x = 0; x < this.reportTarget.customTaskList.length; x++) {
  670. let sfaReportCustomCollections =
  671. this.reportTarget.customTaskList[x].sfaReportCustomCollections;
  672. if (sfaReportCustomCollections) {
  673. for (let y = 0; y < sfaReportCustomCollections.length; y++) {
  674. let custom = this.shareReportConfig.filter(
  675. (val) =>
  676. val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName,
  677. );
  678. if (custom.length) {
  679. custom[0].content = sfaReportCustomCollections[y].answerValue;
  680. this.reportContents = this.reportContents.concat(custom);
  681. }
  682. }
  683. }
  684. }
  685. }
  686. } else {
  687. if (res.data.reportContents.length > 0) {
  688. this.Content = res.data.reportContents[0].dayContent;
  689. if (res.data.reportContents.length > 1) {
  690. this.Content2 = res.data.reportContents[1].dayContent;
  691. } else {
  692. this.Content2 = '';
  693. }
  694. if (res.data.reportContents.length > 2) {
  695. this.projectFollowNum = res.data.reportContents[2].projectFollowNum;
  696. this.tucReportingSuccessNum = res.data.reportContents[3].tucReportingSuccessNum;
  697. }
  698. }
  699. this.reportContents = [
  700. {
  701. dictValue: '今日机会与挑战总结',
  702. content: this.Content,
  703. },
  704. {
  705. dictValue: '明日工作计划',
  706. content: this.Content2,
  707. },
  708. ];
  709. }
  710. var imgList = [];
  711. if (res.data.photoSummary != null) {
  712. for (var k = 0; k < res.data.photoSummary.length; k++) {
  713. imgList.push(res.data.photoSummary[k].fileUrl + '');
  714. }
  715. }
  716. this.imgList = imgList;
  717. }
  718. var imgList = [];
  719. if (res.data.photoSummary != null) {
  720. if (res.data.photoSummary != null) {
  721. for (var k = 0; k < res.data.photoSummary.length; k++) {
  722. imgList.push(res.data.photoSummary[k].fileUrl + '');
  723. }
  724. }
  725. }
  726. this.imgList = imgList;
  727. });
  728. },
  729. userTodayPlanNum() {
  730. userTodayPlanNum().then((res) => {
  731. if (res.code == 200) {
  732. this.todayGoal = res.data;
  733. this.progressWidth = (this.todayGoal.finishNum / this.todayGoal.planNum) * 100 + '%';
  734. localStorage.setItem('nickName', res.data.user.nickName);
  735. localStorage.setItem('storeType', res.data.user.type);
  736. } else {
  737. this.$toast.fail(res.msg);
  738. }
  739. });
  740. },
  741. onClickLeft() {
  742. if (this.source == 'share') {
  743. this.$router.replace({
  744. path: '/My/index',
  745. });
  746. } else {
  747. this.$router.go(-1);
  748. }
  749. },
  750. wuliaoTableClose() {
  751. this.shareImgFlag = false;
  752. },
  753. // 选中的图片
  754. selectImg(item) {
  755. this.$set(item, 'checked', !item.checked);
  756. console.log(item);
  757. },
  758. },
  759. };
  760. </script>
  761. <style scoped lang="scss">
  762. .dailyHistoricalDetails {
  763. position: relative;
  764. background: #fff;
  765. width: 100%;
  766. height: 100%;
  767. .dailyHistoricalDetailsBox {
  768. background: #fff;
  769. }
  770. .shareBtn {
  771. width: 30px;
  772. height: 30px;
  773. border-radius: 50%;
  774. background: #666;
  775. display: flex;
  776. align-items: center;
  777. justify-content: center;
  778. position: relative;
  779. .van-icon-share {
  780. color: #fff;
  781. }
  782. .vedioLinks {
  783. max-width: vw(190);
  784. position: absolute;
  785. bottom: 1px;
  786. background: #dae7f6;
  787. padding: 2px 7px;
  788. /* word-break: keep-all; */
  789. white-space: nowrap;
  790. /* text-overflow: ellipsis; */
  791. right: 0;
  792. border-radius: 5px;
  793. font-size: 8px;
  794. right: 40px;
  795. display: flex;
  796. flex-direction: column;
  797. justify-content: center;
  798. align-items: flex-start;
  799. z-index: 999999;
  800. span {
  801. line-height: 13px;
  802. }
  803. .linkSpan {
  804. text-decoration: underline;
  805. }
  806. .van-icon-play {
  807. position: absolute;
  808. top: 12px;
  809. /* transform: rotate(270deg); */
  810. right: -8px;
  811. color: #dae7f6;
  812. }
  813. }
  814. }
  815. }
  816. .container {
  817. margin: 10px;
  818. }
  819. .container .van-collapse-item {
  820. margin-bottom: 10px;
  821. border-radius: 6px;
  822. overflow: hidden;
  823. }
  824. .linep p {
  825. margin: 6px 0 0 0;
  826. font-size: 14px;
  827. color: #666;
  828. }
  829. .linep .texttitle {
  830. color: #0057ba;
  831. position: relative;
  832. padding-left: 10px;
  833. }
  834. .linep .texttitledaily {
  835. color: #000;
  836. position: relative;
  837. padding-left: 10px;
  838. }
  839. .linep .texttitle2 {
  840. padding-left: 0;
  841. }
  842. .linep .texttitledaily .opint {
  843. position: absolute;
  844. left: 0px;
  845. top: 6px;
  846. margin-right: 6px;
  847. display: inline-block;
  848. width: 6px;
  849. height: 6px;
  850. border-radius: 10px;
  851. background-color: #0057ba;
  852. }
  853. .leftTitle {
  854. background-color: #74a4d9;
  855. color: #fff;
  856. display: inline-block;
  857. padding: 0 4px;
  858. border-radius: 2px;
  859. }
  860. .rightTitle {
  861. background-color: #e7b4bb;
  862. color: #fff;
  863. display: inline-block;
  864. padding: 0 4px;
  865. border-radius: 2px;
  866. }
  867. .redisplay {
  868. display: flex;
  869. align-items: center;
  870. justify-content: space-between;
  871. .nameTitle {
  872. flex: 1;
  873. }
  874. }
  875. </style>
  876. <style lang="scss">
  877. .linep .van-cell__title {
  878. color: #1e5398;
  879. font-weight: 500;
  880. }
  881. .linep .contentContainer {
  882. background-color: white;
  883. border-radius: 8px;
  884. padding: 10px 16px;
  885. margin-bottom: 10px;
  886. }
  887. .linep .contentContainer .contentContainerTitle {
  888. color: #222;
  889. }
  890. .linep .contentContainer .contentContainerTitle span {
  891. font-size: 12px;
  892. color: #666;
  893. }
  894. .linep .contentContainer .van-field__control {
  895. background-color: #ebf4ff;
  896. padding: 10px;
  897. border-radius: 8px;
  898. }
  899. .linep .contentContainer .van-cell {
  900. padding: 0;
  901. }
  902. .colorbalck {
  903. color: #333;
  904. }
  905. .van-dialog__confirm,
  906. .van-dialog__confirm:active {
  907. color: #0057ba;
  908. }
  909. .visitIMG1 img {
  910. display: block;
  911. width: 100%;
  912. height: 75px;
  913. border-radius: 6px;
  914. }
  915. .table-headermd {
  916. font-size: 12px;
  917. text-align: center;
  918. position: initial;
  919. width: 98% !important;
  920. margin: 0 auto;
  921. border-right: 0;
  922. border-radius: 10px;
  923. .el-table__cell {
  924. padding: 6px 0 !important;
  925. }
  926. }
  927. .table-headermd th.el-table__cell {
  928. background-color: #1989fa;
  929. color: #fff;
  930. }
  931. .el-dialog__wrapper {
  932. z-index: 9999 !important;
  933. display: flex;
  934. justify-content: center;
  935. align-items: center;
  936. background: rgba(0, 0, 0, 0.5) !important;
  937. .shareImgFlag {
  938. overflow: hidden;
  939. display: flex;
  940. flex-direction: column;
  941. max-height: 70%;
  942. margin-top: 0 !important;
  943. .el-dialog__header {
  944. height: 40px;
  945. display: flex;
  946. justify-content: right;
  947. .el-dialog__headerbtn {
  948. position: static !important;
  949. }
  950. }
  951. .el-dialog__body {
  952. padding: 30px 20px !important;
  953. overflow-y: auto;
  954. flex: 1;
  955. }
  956. .cell {
  957. font-size: 12px;
  958. }
  959. .footer-btn {
  960. display: flex;
  961. justify-content: space-around;
  962. }
  963. }
  964. }
  965. .shareImgFlag {
  966. .shareVisitImg {
  967. display: flex;
  968. flex-wrap: wrap;
  969. div {
  970. width: 22%;
  971. height: 80px;
  972. margin-right: 3%;
  973. margin-top: 10px;
  974. position: relative;
  975. img {
  976. width: 100%;
  977. height: 100%;
  978. }
  979. }
  980. }
  981. .el-dialog__header {
  982. display: flex;
  983. .el-dialog__title {
  984. flex: 1;
  985. display: flex;
  986. align-items: center;
  987. justify-content: center;
  988. }
  989. }
  990. .el-dialog__title {
  991. height: 50px;
  992. line-height: 50px !important;
  993. }
  994. .el-dialog__footer {
  995. padding: 0;
  996. }
  997. }
  998. .notifyIndex {
  999. z-index: 999999 !important;
  1000. }
  1001. .van-nav-bar__right:active {
  1002. opacity: 1 !important;
  1003. }
  1004. </style>