Btarget.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. <template>
  2. <div class="Btarget">
  3. <div v-if="type != 4" class="container linep">
  4. <van-collapse v-model="activeNames">
  5. <!-- 拜访数据(实时) -->
  6. <van-collapse-item name="7" v-if="powerGrade == 1 && !GZdata">
  7. <template #title>
  8. <div>拜访数据(实时)</div>
  9. <!-- 工装不显示 -->
  10. </template>
  11. <visitedRealTime
  12. :reportTargetAll="reportTargetAll"
  13. :powerGrade="powerGrade"
  14. :JZQuota="JZQuota"></visitedRealTime>
  15. </van-collapse-item>
  16. <!-- 建店布机 -->
  17. <van-collapse-item name="2" v-if="!JZQuota && !GZdata" title="建店布机">
  18. <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
  19. </van-collapse-item>
  20. <!-- 下单点数 -->
  21. <van-collapse-item v-if="powerGrade == 1 && !JZQuota && !GZdata" name="33" title="下单点数">
  22. <placeOrder :reportTargetAll="reportTargetAll"></placeOrder>
  23. </van-collapse-item>
  24. <!-- 专业时时丽分销店下单 -->
  25. <van-collapse-item name="16" v-if="!JZQuota && !GZdata" title="专业时时丽分销店下单">
  26. <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
  27. </van-collapse-item>
  28. <!-- 超好贴分销店下单 -->
  29. <van-collapse-item name="17" v-if="!JZQuota && !GZdata" title="超好贴分销店下单">
  30. <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
  31. </van-collapse-item>
  32. <van-collapse-item v-if="powerGrade != 1 && !JZQuota && !GZdata" name="32" title="客户开拓">
  33. <van-row>
  34. <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
  35. <van-col span="24">
  36. <p>
  37. 全年开发数:<span class="colorbalck">{{
  38. Micrometer(reportTargetAll.customerAct)
  39. }}</span>
  40. </p>
  41. </van-col>
  42. <van-col span="24">
  43. <p>
  44. 全年进度率:
  45. <span class="colorbalck"> {{ reportTargetAll.customerYearRate }}% </span>
  46. </p>
  47. </van-col>
  48. </van-row>
  49. </van-collapse-item>
  50. <van-collapse-item v-if="powerGrade == 2" name="8" title="当日门店拜访情况(实时)">
  51. <div v-if="reportTargetAll.realTimeVisits == null" style="margin-top: -10px">
  52. <p style="text-align: center; color: #666">暂无数据</p>
  53. </div>
  54. <div v-if="reportTargetAll.realTimeVisits != null" style="margin-top: -10px">
  55. <div class="container" style="width: 100%; margin: 0 auto; padding: 10px 0">
  56. <el-table
  57. :data="reportTargetAll.realTimeVisits"
  58. border
  59. class="table-headermd table-headermdhome"
  60. style="width: 100%">
  61. <el-table-column label="业务员" prop="userName">
  62. <template slot-scope="scope">
  63. <span class="tipTitle">{{ scope.row.userName }}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="拜访次数" prop="visitAct" />
  67. <el-table-column :label="'金牌店\n拜访率'" prop="jpVisitRate">
  68. <template slot-scope="scope">
  69. <span class="tipTitle">{{ scope.row.jpVisitRate }}%</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column :label="'同城店\n拜访率'" prop="tcVisitRate">
  73. <template slot-scope="scope">
  74. <span class="tipTitle">{{ scope.row.tcVisitRate }}%</span>
  75. </template>
  76. </el-table-column>
  77. </el-table>
  78. </div>
  79. </div>
  80. </van-collapse-item>
  81. </van-collapse>
  82. </div>
  83. <div v-if="type == 4" class="container linep">
  84. <van-collapse v-model="activeNames" v-if="reportInfo.customerUserTargets">
  85. <van-collapse-item
  86. :name="index + ''"
  87. :title="item.nickName"
  88. v-for="(item, index) in reportInfo.customerUserTargets"
  89. :key="index">
  90. <van-row>
  91. <van-col span="24"
  92. ><p class="indexTile" style="margin-top: -2px">
  93. <van-icon :name="bfindex" class="indexicon"></van-icon>拜访
  94. </p></van-col
  95. >
  96. <van-col span="12"
  97. ><p><span class="leftTitle">本日实际</span></p></van-col
  98. >
  99. <van-col span="12"
  100. ><p><span class="rightTitle">本月实际</span></p></van-col
  101. >
  102. <van-col span="12"
  103. ><p>
  104. 拜访点数:<span class="colorbalck">{{ Micrometer(item.dayVisitCount) }}</span>
  105. </p></van-col
  106. >
  107. <van-col span="12"
  108. ><p>
  109. 拜访点数:<span class="colorbalck">{{ Micrometer(item.monthVisitCount) }}</span>
  110. </p></van-col
  111. >
  112. <van-col span="24"
  113. ><p class="indexTile">
  114. <van-icon :name="storeindex" class="indexicon"></van-icon>建店
  115. </p></van-col
  116. >
  117. <van-col span="12"
  118. ><p><span class="leftTitle">本日新增</span></p></van-col
  119. >
  120. <van-col span="12"
  121. ><p><span class="rightTitle">本月实际</span></p></van-col
  122. >
  123. <van-col span="12"
  124. ><p>
  125. 分销店点数:<span class="colorbalck">{{ Micrometer(item.dayFxdAct) }}</span>
  126. </p></van-col
  127. >
  128. <van-col span="12"
  129. ><p>
  130. 分销店点数:<span class="colorbalck">{{ Micrometer(item.monthFxdAct) }}</span>
  131. </p></van-col
  132. >
  133. <van-col span="24"
  134. ><p class="indexTile">
  135. <van-icon :name="oderindex" class="indexicon"></van-icon>下单
  136. </p></van-col
  137. >
  138. <van-col span="12"
  139. ><p><span class="leftTitle">昨日新增</span></p></van-col
  140. >
  141. <van-col span="12"
  142. ><p><span class="rightTitle">本月实际</span></p></van-col
  143. >
  144. <van-col span="12"
  145. ><p>
  146. 下单点数:<span class="colorbalck">{{ Micrometer(item.yesOrderAct) }}</span>
  147. </p></van-col
  148. >
  149. <van-col span="12"
  150. ><p>
  151. 下单点数:<span class="colorbalck">{{ Micrometer(item.monthOrderAct) }}</span>
  152. </p></van-col
  153. >
  154. </van-row>
  155. </van-collapse-item>
  156. </van-collapse>
  157. </div>
  158. </div>
  159. </template>
  160. <script>
  161. import createStoreBJ from '@/views/componentsTarget/createStoreBJ';
  162. import visitedRealTime from '@/views/componentsTarget/visitedRealTime';
  163. import placeOrder from '@/views/componentsTarget/placeOrder';
  164. import ZYPlaceOrder from '@/views/componentsTarget/ZYPlaceOrder';
  165. import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
  166. import neiqiangzhonggaoduanSAP from '@/views/componentsTarget/neiqiangzhonggaoduanSAP';
  167. export default {
  168. components: {
  169. createStoreBJ,
  170. visitedRealTime,
  171. placeOrder,
  172. ZYPlaceOrder,
  173. veryGoodPlaceOrder,
  174. neiqiangzhonggaoduanSAP,
  175. },
  176. props: {
  177. reportInfo: {
  178. type: Object,
  179. },
  180. },
  181. watch: {
  182. reportInfo: {
  183. handler(val) {
  184. if (val.postType == 'GZ') {
  185. this.GZdata = true;
  186. this.saptitle = '公裝业绩SAP(千元)';
  187. } else {
  188. this.saptitle = '业绩目标SAP(千元)';
  189. this.GZdata = false;
  190. }
  191. if (val.postType == 'JZ') {
  192. this.JZQuota = true;
  193. } else {
  194. this.JZQuota = false;
  195. }
  196. this.reportInfoData = val;
  197. this.powerGrade = val.positionId;
  198. if (val.reportTargetAll != null) {
  199. this.reportTargetAll = val.reportTargetAll;
  200. }
  201. this.type = val.userType;
  202. },
  203. deep: true,
  204. immediate: true,
  205. },
  206. },
  207. data() {
  208. return {
  209. type: '-1',
  210. JZQuota: false,
  211. GZdata: false,
  212. saptitle: '业绩目标SAP(千元)',
  213. powerGrade: '2',
  214. reportTargetAll: {},
  215. activeNames: [
  216. '1',
  217. '2',
  218. '3',
  219. '4',
  220. '5',
  221. '6',
  222. '7',
  223. '8',
  224. '10',
  225. '11',
  226. '12',
  227. '16',
  228. '17',
  229. '20',
  230. '21',
  231. '22',
  232. '23',
  233. '24',
  234. '25',
  235. '26',
  236. '27',
  237. '28',
  238. '29',
  239. '30',
  240. '31',
  241. '32',
  242. '33',
  243. '34',
  244. '35',
  245. '36',
  246. '37',
  247. '38',
  248. '39',
  249. '40',
  250. '41',
  251. '42',
  252. '43',
  253. ],
  254. };
  255. },
  256. };
  257. </script>
  258. <style scoped>
  259. .homeTitle {
  260. padding: 6px 16px;
  261. }
  262. .homeTitle .van-icon__image {
  263. width: 1.4em;
  264. height: auto;
  265. }
  266. .container {
  267. /* margin: 10px; */
  268. }
  269. .container .van-collapse-item {
  270. margin-bottom: 10px;
  271. border-radius: 6px;
  272. overflow: hidden;
  273. }
  274. .progressContentlist {
  275. font-size: 14px;
  276. border-bottom: 1px dashed #f1f1f1;
  277. padding: 10px 0;
  278. }
  279. .linep p {
  280. margin: 10px 0 0 0;
  281. font-size: 14px;
  282. color: #666;
  283. }
  284. .leftTitle {
  285. background-color: #74a4d9;
  286. color: #fff;
  287. display: inline-block;
  288. padding: 0 4px;
  289. border-radius: 2px;
  290. }
  291. .rightTitle {
  292. background-color: #e7b4bb;
  293. color: #fff;
  294. display: inline-block;
  295. padding: 0 4px;
  296. border-radius: 2px;
  297. white-space: nowrap;
  298. }
  299. </style>
  300. <style lang="scss">
  301. .myTab .van-tabs__nav--card {
  302. margin: 0 !important;
  303. border-left: 0;
  304. border-right: 0;
  305. }
  306. .myTab .van-tabs__wrap,
  307. .van-tabs__nav--card {
  308. height: 39px;
  309. }
  310. .myTab .van-tab {
  311. line-height: 40px;
  312. }
  313. .linep .van-collapse-item__content {
  314. color: #666;
  315. }
  316. .linep .van-collapse-item__content {
  317. color: #666;
  318. }
  319. .linep .van-cell__title {
  320. color: #1e5398;
  321. font-weight: 500;
  322. font-size: 16px;
  323. }
  324. .homeCellIcon {
  325. line-height: 34px;
  326. }
  327. .homeTitle .van-cell__title {
  328. color: #444;
  329. font-size: 16px;
  330. font-weight: bold;
  331. padding-left: 4px;
  332. line-height: 36px;
  333. height: 36px;
  334. }
  335. .updataTime {
  336. color: #999;
  337. font-size: 12px;
  338. text-align: center;
  339. }
  340. .homeTitle .van-tag--danger {
  341. /* border-radius: 20px; */
  342. }
  343. .van-dialog__confirm,
  344. .van-dialog__confirm:active {
  345. color: #0057ba;
  346. }
  347. .tipTitleBox p {
  348. margin: 0;
  349. line-height: 28px;
  350. color: #555;
  351. }
  352. .tipTitleBox .p {
  353. color: #555;
  354. font-size: 16px;
  355. border-bottom: 1px solid #f5f5f5;
  356. margin: 0;
  357. margin-bottom: 10px;
  358. text-align: center;
  359. padding: 14px 0px;
  360. }
  361. .storeTypeHome .van-collapse-item__content {
  362. padding: 0;
  363. }
  364. .storeTypeHome .storeTypeHomeList .van-cell__title {
  365. color: #4a4a4a;
  366. font-size: 14px;
  367. }
  368. .storeTypeHome .monthNoVisit {
  369. padding: 10px;
  370. margin: 10px;
  371. border-radius: 5px;
  372. background-color: #ebf4ff;
  373. }
  374. .storeTypeHome .leftContent {
  375. padding-right: 68px;
  376. position: relative;
  377. }
  378. .storeTypeHome .monthNoVisitStatstext {
  379. font-size: 12px;
  380. background-color: #0057ba;
  381. position: absolute;
  382. right: 0;
  383. top: 6px;
  384. padding: 2px 6px 2px 12px;
  385. border-bottom-left-radius: 60px;
  386. border-top-left-radius: 60px;
  387. color: #fff;
  388. }
  389. .ABtarage {
  390. .table-headermd {
  391. font-size: 12px;
  392. text-align: center;
  393. position: initial;
  394. width: 98% !important;
  395. margin: 0 auto;
  396. border-right: 0;
  397. }
  398. .table-headermdhome {
  399. font-size: 14px;
  400. }
  401. .table-headermdhome th.el-table__cell > .cell {
  402. white-space: pre;
  403. }
  404. .table-headermd .el-table__header,
  405. .table-headermd .el-table__body {
  406. width: 100% !important;
  407. }
  408. .table-headermdhome.van-cell {
  409. padding: 0 6px;
  410. height: 100%;
  411. }
  412. .table-headermd th.el-table__cell > .cell {
  413. padding: 0 4px;
  414. text-align: center;
  415. }
  416. .table-headermdhometh.el-table__cell:first-child > .cell {
  417. text-align: left;
  418. }
  419. .table-headermd th.el-table__cell {
  420. background-color: #1989fa;
  421. color: #fff;
  422. }
  423. .table-headermdhome th.el-table__cell {
  424. background-color: #fff;
  425. color: #444;
  426. }
  427. .table-headermd .el-table__cell {
  428. padding: 4px 0;
  429. }
  430. .table-headermdhome.el-table .cell {
  431. padding: 0 4px;
  432. text-align: center;
  433. }
  434. .table-headermdhome .tipTitle {
  435. overflow: hidden;
  436. text-overflow: ellipsis;
  437. display: -webkit-box;
  438. -webkit-box-orient: vertical;
  439. -webkit-line-clamp: 2;
  440. text-align: center;
  441. }
  442. .table-headermd::before {
  443. height: 0;
  444. }
  445. .table-headermd .cell,
  446. .el-table--border .el-table__cell:first-child .cell {
  447. padding: 0 4px;
  448. }
  449. }
  450. .colBack {
  451. width: 100%;
  452. height: 100%;
  453. display: block;
  454. /* overflow: unset; */
  455. position: relative;
  456. z-index: 2;
  457. float: left;
  458. z-index: 2;
  459. .back {
  460. position: absolute;
  461. background: rgb(226, 240, 217);
  462. height: 100%;
  463. display: block;
  464. overflow: hidden;
  465. /* z-index: 1; */
  466. border-radius: 12px;
  467. bottom: -4px;
  468. }
  469. .backLeft {
  470. width: 45%;
  471. left: -12px;
  472. }
  473. .backRight {
  474. width: 50%;
  475. left: calc(50% - 12px);
  476. }
  477. .van-col {
  478. position: relative;
  479. z-index: 3;
  480. }
  481. }
  482. </style>