index.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <template>
  2. <view>
  3. <view class="showErr" v-show="showErr">
  4. <image src="../../static/img/no_record.png" mode="widthFix"></image>
  5. </view>
  6. <view v-show="!showErr" class="nav">
  7. <view class="nav_top">
  8. <view class="title">
  9. 代理公司月进货业绩奖励
  10. </view>
  11. </view>
  12. <view class="nav_middle">
  13. <view class="yuan" />
  14. <view class="mingxi">
  15. <view class="mingxi_ying" />
  16. <view class="mingxi_title">
  17. {{ data.year }}年{{ data.month }}月
  18. </view>
  19. <view class="list">
  20. <view class="list_title">
  21. 进货明细及金额
  22. </view>
  23. <view class="list_table">
  24. <view class="top flexS">
  25. <text style="margin-right: 10rpx;">款式</text>
  26. <text>数量</text>
  27. <text>单价</text>
  28. <text style="margin-left: 20rpx;">总金额</text>
  29. </view>
  30. <view class="item flexS" v-for="(item, index) in data.detail" :key="index">
  31. <text>{{ item.good_name.substring(item.good_name.length - 3, item.good_name.length) }}</text>
  32. <text>{{ item.num }}</text>
  33. <text>¥{{ Number(item.price) }}</text>
  34. <text>¥{{ Number(item.money) }}</text>
  35. </view>
  36. </view>
  37. <view class="list_right">
  38. <text class="text1">共{{ allNum }}套/件,</text>
  39. <text>合计;</text>
  40. <text class="red">¥{{ allMoney }}</text>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="tip flexC">
  45. <view class="flexS">
  46. <text class="bold">满足区间</text>
  47. <text>{{ data.money_between }}</text>
  48. </view>
  49. <view class="flexS">
  50. <text class="bold">奖励比例</text>
  51. <text>{{ data.scale }}</text>
  52. </view>
  53. <view class="flexS">
  54. <text class="bold">奖励金额</text>
  55. <text class="red">¥{{ Number(data.reward_money) }}</text>
  56. </view>
  57. </view>
  58. <view class="zhanghu flexC">
  59. <view class="zhanghu_title">
  60. 收款账户信息
  61. </view>
  62. <view class="flexS">
  63. <text class="left">姓名</text>
  64. <text>{{ data.account_name }}</text>
  65. </view>
  66. <view class="flexS">
  67. <text class="left">账户</text>
  68. <text>{{ NewCar(data.account_number) }}</text>
  69. </view>
  70. <view class="flexS">
  71. <text class="left">银行</text>
  72. <text>{{ data.account_bank }}</text>
  73. </view>
  74. <view class="flexS">
  75. <text class="red left" style="font-weight: bold;">奖励是否发放完毕</text>
  76. <text class="red">{{ Number(data.reward_money) >= Number(data.real_money) ? '是' : '否' }}</text>
  77. <!-- <text class="left">奖励是否发放完毕</text>
  78. <text :class="Number(data.reward_money) >= Number(data.real_money) ? 'green' : 'red'">{{ Number(data.reward_money) >= Number(data.real_money) ? '是' : '否' }}</text> -->
  79. </view>
  80. </view>
  81. <view class="jiangliTittle">
  82. 奖励发放详情
  83. </view>
  84. <view class="jiangli" :class="index == 0?'border1': 'border2'" v-for="(item, index) in moneyList" :key="index">
  85. <view class="flexS">
  86. <text class="left">发放金额</text>
  87. <text>¥{{ item.money }}</text>
  88. </view>
  89. <view class="flexS">
  90. <text class="left">发放时间</text>
  91. <text>{{ item.time }}</text>
  92. </view>
  93. <view class="flexS">
  94. <text class="left">发放方式</text>
  95. <text>{{ item.send_way }}</text>
  96. </view>
  97. <view class="flexS">
  98. <text class="left">备注</text>
  99. <text class="remark">{{ item.remark }}</text>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </template>
  106. <script>
  107. import { GetRewardCrown } from '../../api/index.js';
  108. export default {
  109. data() {
  110. return {
  111. showErr: false,
  112. id: '',
  113. token: '',
  114. data: {},
  115. allNum: 0,
  116. allMoney: 0,
  117. status: '',
  118. moneyList: []
  119. }
  120. },
  121. onLoad(){
  122. this.id = this.$route.query.id
  123. this.token = this.$route.query.token
  124. this.getInfo()
  125. },
  126. methods: {
  127. NewCar(v) {
  128. if (v) {
  129. // v = "6217853600008665059"
  130. return v.replace(/^(\d{4})\d+(\d{4})$/,'$1********$2')
  131. }
  132. },
  133. getInfo() {
  134. GetRewardCrown({ id: this.id, token: this.token }).then(res => {
  135. if (res.code == 200) {
  136. this.showErr = false
  137. this.data = res.data
  138. let that = this
  139. this.data.detail.forEach(e => {
  140. that.allNum += e.num
  141. that.allMoney += Number(e.money)
  142. })
  143. const { log } = res.data
  144. this.moneyList = JSON.parse(log)
  145. } else {
  146. this.showErr = true
  147. }
  148. }).catch(err => {
  149. this.showErr = true
  150. })
  151. }
  152. },
  153. }
  154. </script>
  155. <style lang="scss" scoped>
  156. page {
  157. background-color: #F5F5F5;
  158. color: #333;
  159. font-size: 28rpx;
  160. }
  161. .flexS {
  162. display: flex;
  163. // align-items: center;
  164. justify-content: space-between;
  165. }
  166. .flexC {
  167. display: flex;
  168. justify-content: space-between;
  169. flex-direction: column;
  170. }
  171. .red {
  172. color: #FB231F;
  173. // font-weight: bold;
  174. }
  175. .green {
  176. color: #67C23A;
  177. font-weight: bold;
  178. }
  179. .showErr {
  180. height: 100vh;
  181. background-color: #fff;
  182. text-align: center;
  183. image {
  184. width: 70%;
  185. margin-top: 200rpx;
  186. }
  187. }
  188. .nav {
  189. padding-bottom: 52rpx;
  190. &_top {
  191. height: 244rpx;
  192. background: linear-gradient(90deg, #5FBC23 0%, #85CE52 100%);
  193. .title {
  194. font-size: 38rpx;
  195. text-align: center;
  196. font-weight: bold;
  197. color: #fff;
  198. padding-top: 20rpx;
  199. }
  200. }
  201. &_middle {
  202. margin-top: -132rpx;
  203. .yuan {
  204. width: 100%;
  205. height: 28rpx;
  206. background: #419F05;
  207. border-radius: 490rpx 490rpx 490rpx 490rpx;
  208. }
  209. .mingxi {
  210. background-color: #fff;
  211. margin: -14rpx 24rpx 0 24rpx;
  212. border-radius: 0px 0px 16rpx 16rpx;
  213. &_ying {
  214. height: 24rpx;
  215. background: linear-gradient(180deg, #419F05 0%, rgba(65,159,5,0) 100%);
  216. opacity: 0.49;
  217. }
  218. &_title {
  219. font-size: 48rpx;
  220. font-family: HarmonyOS Sans SC-Bold, HarmonyOS Sans SC;
  221. font-weight: bold;
  222. color: #419F05;
  223. margin: 8rpx 0 36rpx 0;
  224. text-align: center;
  225. }
  226. .list {
  227. padding: 0 24rpx 36rpx 24rpx;
  228. &_title {
  229. font-size: 34rpx;
  230. font-family: PingFang SC-Bold, PingFang SC;
  231. font-weight: bold;
  232. color: #333333;
  233. }
  234. &_table {
  235. margin-top: 24rpx;
  236. padding: 24rpx 0 32rpx 0;
  237. background: #F9F9FB;
  238. .top {
  239. padding-bottom: 20rpx;
  240. border-bottom: 2rpx solid #EEEEEE;
  241. text {
  242. text-align: center;
  243. display: inline-block;
  244. width: 25%;
  245. font-size: 30rpx;
  246. font-family: PingFang SC-Bold, PingFang SC;
  247. font-weight: bold;
  248. }
  249. }
  250. .item {
  251. margin-top: 30rpx;
  252. text {
  253. width: 25%;
  254. text-align: center;
  255. display: inline-block;
  256. font-size: 30rpx;
  257. font-family: PingFang SC-Bold, PingFang SC;
  258. }
  259. }
  260. }
  261. &_right {
  262. text-align: right;
  263. margin-top: 24rpx;
  264. text {
  265. font-size: 28rpx;
  266. font-family: HarmonyOS Sans SC-Bold, HarmonyOS Sans SC;
  267. font-weight: bold;
  268. }
  269. .text1 {
  270. color: #999999;
  271. }
  272. }
  273. }
  274. }
  275. .tip {
  276. border-top: 2rpx dashed #CCCCCC;
  277. margin: 0 24rpx;
  278. padding: 24rpx;
  279. background: #FFFFFF;
  280. border-radius: 16rpx 16rpx 16rpx 16rpx;
  281. height: 180rpx;
  282. font-size: 30rpx;
  283. .bold {
  284. font-weight: bold;
  285. font-size: 32rpx;
  286. }
  287. }
  288. .zhanghu {
  289. margin: 24rpx;
  290. padding: 24rpx;
  291. background: #FFFFFF;
  292. border-radius: 16rpx 16rpx 16rpx 16rpx;
  293. height: 328rpx;
  294. border-top: 20rpx #D3EDC0 solid;
  295. &_title {
  296. font-size: 34rpx;
  297. font-family: PingFang SC-Bold, PingFang SC;
  298. font-weight: bold;
  299. color: #333333;
  300. }
  301. text {
  302. font-size: 30rpx;
  303. }
  304. .left {
  305. font-size: 32rpx;
  306. }
  307. }
  308. .jiangliTittle {
  309. padding: 24rpx 24rpx 0 24rpx;
  310. margin: 24rpx 24rpx 0 24rpx;
  311. background: #FFFFFF;
  312. border-radius: 16rpx 16rpx 0 0;
  313. border-top: 20rpx #D3EDC0 solid;
  314. font-size: 34rpx;
  315. font-family: PingFang SC-Bold, PingFang SC;
  316. font-weight: bold;
  317. color: #333333;
  318. padding-top: 24rpx;
  319. }
  320. .border1 {
  321. border-radius: 0 0 16rpx 16rpx;
  322. }
  323. .border2 {
  324. border-radius: 16rpx 16rpx 16rpx 16rpx;
  325. border-top: 2rpx dashed #CCCCCC;
  326. }
  327. .jiangli {
  328. padding: 24rpx 24rpx 0 24rpx;
  329. margin: 0 24rpx;
  330. background: #FFFFFF;
  331. &_title {
  332. font-size: 34rpx;
  333. font-family: PingFang SC-Bold, PingFang SC;
  334. font-weight: bold;
  335. color: #333333;
  336. }
  337. text {
  338. font-size: 30rpx;
  339. display: inline-block;
  340. margin-bottom: 24rpx;
  341. }
  342. .left {
  343. font-size: 32rpx;
  344. }
  345. .remark {
  346. width: 360rpx;
  347. text-align: right;
  348. }
  349. }
  350. }
  351. }
  352. </style>