reportdetail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. <template>
  2. <div>
  3. <div :class="colortop"></div>
  4. <div style="display:flex;">
  5. <div class="reportdetail_mx_title" :class="colortitle" v-if="reporttype==1">客户销售记录</div>
  6. <div class="reportdetail_mx_title" :class="colortitle" v-if="reporttype==2">产品销售记录</div>
  7. <div class="reportdetail_mx_subtitle">2019年1月~2019年6月
  8. <svg class="icon" aria-hidden="true">
  9. <use xlink:href="#icon-xuanze1"></use>
  10. </svg></div>
  11. </div>
  12. <!-- 客户信息 来源于1-客户销售排名统计表 -->
  13. <div class="reportmx_main" v-if="reporttype == 1">
  14. <div style="font-size:24px;font-weight:bold">沙特石油王子有限公司</div>
  15. <div style="font-size:15px;">业务员:张小姗</div>
  16. <div style="font-size:14px;color:#666;margin-top:5px">共下单 8 次,10 款产品共 4000 件</div>
  17. <div style="font-size:14px;color:#f20">合计金额 4,000,000元</div>
  18. </div>
  19. <!-- 产品信息 来源于2-产品销售排名统计表 -->
  20. <div class="reportmx_main" v-if="reporttype == 2">
  21. <div style="font-size:24px;font-weight:bold">电竞椅 S-150</div>
  22. <div style="font-size:14px;">规格 55.5*66*129CM</div>
  23. <div style="font-size:14px;"><span>背垫尺寸 85*48CM</span><span style="margin-left:10px">坐垫尺寸 52*53CM</span></div>
  24. <div style="font-size:14px;">
  25. <span>座深 41CM</span>
  26. <span style="margin-left:10px">座高 48CM</span>
  27. <span style="margin-left:10px">净重 17.5KG</span>
  28. <span style="margin-left:10px">毛重 19KG</span>
  29. </div>
  30. <div style="font-size:14px;color:#666;margin-top:5px">共下单 8 次,10 个客户共 4000 件</div>
  31. <div style="font-size:14px;color:#f20">合计金额 4,000,000元</div>
  32. </div>
  33. <div class="img_wap" v-if="reporttype == 2">
  34. <div style="flex:0 0 90%;margin: 0 auto;">
  35. <img src="../../assets/zhutu_01.jpg" class="img-bingtu"></img>
  36. </div>
  37. </div>
  38. <div class="liubai"></div>
  39. <!-- 业务员明细、区域明细 -->
  40. <div v-if="reporttype==2">
  41. <div class="reportmx_mx" style="padding: 0px;">
  42. <div style="display:flex;font-size:16px;font-weight:bold;color:#666;">
  43. <div style="margin:0 auto" v-if="reporttype==2">区域明细</div>
  44. </div>
  45. <div class="reportdetail_mx_for " v-for="(areaitem,index) in arealist" :key="index">
  46. <div class="reportdetail_mx_index">{{index+1}}</div>
  47. <div style="padding:0 0 0 5px; ">
  48. <div style="display:flex;align-items: center">
  49. <div style="font-size: 15px;font-weight: bold;margin-right:20px">{{areaitem.areaname}}</div>
  50. <div class="reportdetail_mx_amt">{{areaitem.amt}}元</div>
  51. <div class="reportdetail_mx_qty">{{areaitem.qty}}张</div>
  52. <div class="reportdetail_mx_qty">{{areaitem.percent}}%</div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="liubai"></div>
  58. <div class="reportmx_mx" style="padding: 0px;">
  59. <div style="display:flex;font-size:16px;font-weight:bold;color:#666;">
  60. <div style="margin:0 auto" v-if="reporttype==2">业务员明细</div>
  61. </div>
  62. <div class="reportdetail_mx_for " v-for="(saleritem,index) in saleramtlist" :key="index">
  63. <div class="reportdetail_mx_index">{{index+1}}</div>
  64. <div style="padding:0 0 0 5px; ">
  65. <div style="display:flex;align-items: center">
  66. <div style="font-size: 15px;font-weight: bold;margin-right:20px">{{saleritem.salername}}</div>
  67. <div class="reportdetail_mx_amt">{{saleritem.amt}}元</div>
  68. <div class="reportdetail_mx_qty">{{saleritem.qty}}张</div>
  69. <div class="reportdetail_mx_qty">{{saleritem.percent}}%</div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="liubai"></div>
  75. </div>
  76. <div class="reportmx_mx">
  77. <div style="display:flex;font-size:16px;font-weight:bold;color:#666;">
  78. <div style="margin:0 auto" v-if="reporttype==1">产品明细</div>
  79. <div style="margin:0 auto" v-if="reporttype==2">客户明细</div>
  80. </div>
  81. <div class="reportdetail_mx_for mx_border" v-for="(saleritem,index) in saleramtlist" :key="index">
  82. <div class="reportdetail_mx_index">{{index+1}}</div>
  83. <div style="padding:0 0 0 5px; ">
  84. <div class="reportdetail_mx_name">
  85. <div v-if="reporttype==0">{{saleritem.salername}}</div>
  86. <div v-if="reporttype==1">{{saleritem.mtrlname}}</div>
  87. <div v-if="reporttype==2">{{saleritem.cusname}}</div>
  88. </div>
  89. <div class="reportdetail_mx_mode" v-if="reporttype==1">150*79*60cm</div>
  90. <div class="reportdetail_mx_mode" v-if="reporttype==2">业务员:{{saleritem.salername}}</div>
  91. <div style="display:flex;align-items: center">
  92. <div class="reportdetail_mx_amt">{{saleritem.amt}}元</div>
  93. <div class="reportdetail_mx_qty">{{saleritem.qty}}张</div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </template>
  100. <script>
  101. export default {
  102. data() {
  103. return {
  104. reporttype: 1, //来源 0-业务员销售排名统计表(同时显示客户列表、产品列表) 1-客户销售排名统计表(显示产品列表) 2-产品销售排名统计表(显示客户列表)
  105. saleramtlist: [{
  106. salername: "张小姗",
  107. cusname: "沙特石油王子有限公司",
  108. mtrlname: "经理椅 NF-8920",
  109. amt: "600,000",
  110. percent: "30",
  111. qty: 600
  112. },
  113. {
  114. salername: "李小四",
  115. cusname: "俄罗斯老铁有限公司",
  116. mtrlname: "经理椅 NF-8927",
  117. amt: "500,000",
  118. percent: "20",
  119. qty: 500
  120. },
  121. {
  122. salername: "王小五",
  123. cusname: "英国王室有限公司",
  124. mtrlname: "职员椅 NF-3343",
  125. amt: "400,000",
  126. percent: "15",
  127. qty: 400
  128. },
  129. {
  130. salername: "吴小丽",
  131. cusname: "法国浪漫有限公司",
  132. mtrlname: "电竞椅 S-150",
  133. amt: "300,000",
  134. percent: "10",
  135. qty: 300
  136. },
  137. {
  138. salername: "陆小六",
  139. cusname: "意大利时尚有限公司",
  140. mtrlname: "电竞椅 S-103",
  141. amt: "250,000",
  142. percent: "5",
  143. qty: 250
  144. },
  145. {
  146. salername: "刘小七",
  147. cusname: "丹麦饼匠有限公司",
  148. mtrlname: "电竞椅 S-120",
  149. amt: "210,000",
  150. percent: "4",
  151. qty: 210
  152. },
  153. {
  154. salername: "方小八",
  155. cusname: "德国战车有限公司",
  156. mtrlname: "职员椅 NF-6004M",
  157. amt: "200,000",
  158. percent: "3",
  159. qty: 200
  160. },
  161. {
  162. salername: "冯小轩",
  163. cusname: "澳大利亚袋鼠有限公司",
  164. mtrlname: "办公布椅 NF-513V",
  165. amt: "190,000",
  166. percent: "2",
  167. qty: 190
  168. },
  169. {
  170. salername: "马小梅",
  171. cusname: "新加坡花园有限公司",
  172. mtrlname: "办公布椅 NF-513M",
  173. amt: "180,000",
  174. percent: "1",
  175. qty: 180
  176. },
  177. {
  178. salername: "高小松",
  179. cusname: "美利坚老鹰有限公司",
  180. mtrlname: "休闲椅 901",
  181. amt: "170,000",
  182. percent: "0.9",
  183. qty: 170
  184. }
  185. ],
  186. arealist: [{
  187. areaname: "欧洲 ",
  188. amt: "2,000,000",
  189. qty: 2000,
  190. percent:50
  191. },{
  192. areaname: "亚洲 ",
  193. amt: "1,200,000",
  194. qty: 1200,
  195. percent:30
  196. },{
  197. areaname: "大洋洲",
  198. amt: "500,000",
  199. qty: 500,
  200. percent:12.5
  201. },{
  202. areaname: "非洲 ",
  203. amt: "300,000",
  204. qty: 300,
  205. percent:7.5
  206. }]
  207. }
  208. },
  209. computed: {
  210. colortop: function () {
  211. return {
  212. kindred: this.reporttype == 0,
  213. kindblue: this.reporttype == 1,
  214. kindgreen: this.reporttype == 2
  215. };
  216. },
  217. colortitle: function () {
  218. return {
  219. bgred: this.reporttype == 0,
  220. bgblue: this.reporttype == 1,
  221. bggreen: this.reporttype == 2
  222. };
  223. }
  224. }
  225. }
  226. </script>
  227. <style>
  228. body {
  229. margin: 0;
  230. padding: 0;
  231. background-color: #ffffff;
  232. font-family: "微软雅黑";
  233. }
  234. .img_wap {
  235. display: flex;
  236. margin-top: 20px;
  237. }
  238. .img-bingtu {
  239. width: 100%;
  240. }
  241. .reportdetail_mx_bar {
  242. border-top: 8px solid dodgerblue;
  243. }
  244. .kindblue {
  245. border-top: 8px solid dodgerblue;
  246. }
  247. .kindgreen {
  248. border-top: 8px solid yellowgreen;
  249. }
  250. .bgblue {
  251. background-color: dodgerblue;
  252. }
  253. .bggreen {
  254. background-color: yellowgreen;
  255. }
  256. .reportdetail_mx_title {
  257. color: white;
  258. font-size: 15px;
  259. font-weight: bold;
  260. padding: 3px 8px;
  261. margin-left: 20px;
  262. border-bottom-left-radius: 8px;
  263. border-bottom-right-radius: 8px;
  264. }
  265. .reportdetail_mx_subtitle {
  266. position: absolute;
  267. right: 10px;
  268. padding: 3px;
  269. font-size: 15px;
  270. font-weight: bold;
  271. line-height: 20px;
  272. color: grey;
  273. margin-top: 3px;
  274. }
  275. .reportmx_main {
  276. margin: 5px 10px 0 20px;
  277. }
  278. .reportmx_mx {
  279. margin: 0 10px 0 10px;
  280. padding: 0 0 30px 0;
  281. }
  282. .liubai {
  283. width: 100%;
  284. height: 10px;
  285. background-color: rgb(246, 246, 246);
  286. margin: 10px 0;
  287. }
  288. .reportdetail_mx_for {
  289. display: flex;
  290. /* margin: 5px 0 15px 10px; */
  291. align-items: center;
  292. padding: 5px 0 5px 0
  293. }
  294. .mx_border {
  295. border-bottom: 1px solid #eee;
  296. }
  297. .reportdetail_mx_index {
  298. flex: 0 0 10%;
  299. text-align: center;
  300. /* align-items: center; */
  301. font-size: 20px;
  302. font-family: 'Courier New', Courier, monospace;
  303. font-weight: bold;
  304. }
  305. .reportdetail_mx_name {
  306. flex: 0 0 80%;
  307. font-size: 15px;
  308. font-weight: bold
  309. }
  310. .reportdetail_mx_mode {
  311. font-size: 13px;
  312. color: #666
  313. }
  314. .reportdetail_mx_amt {
  315. font-size: 15px;
  316. font-weight: bold;
  317. color: #fd7526
  318. }
  319. .reportdetail_mx_qty {
  320. margin-left: 20px;
  321. font-size: 15px;
  322. color: #666
  323. }
  324. </style>