多租户商城-商户小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

328 lines
10 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <view>
  3. <global-loading/>
  4. <view v-if="ifShow">
  5. <view class="unliquidated-topBackImg flex-items flex-column">
  6. <view class="totalAward-content flex-column font-color-FFF">
  7. <view class="flex-items-plus mar-top-60">
  8. <label class="fs60 amount">{{ ZSalesOrderData.total }}</label>
  9. </view>
  10. <view class="flex-row-plus flex-sp-around fs24 mar-top-30">
  11. <view class="awardBox">
  12. <view class="fs36 font-color-FFF">{{ ZSalesOrderData.directPrice }}</view>
  13. <view class="awardTit font-color-FFF">直接奖励(</view>
  14. </view>
  15. <view class="awardBox">
  16. <view class="fs36 font-color-FFF">{{ ZSalesOrderData.indirectPrice }}</view>
  17. <view class="awardTit font-color-FFF">间接奖励(</view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="awardType">
  23. <view class="awardType-box flex-center">
  24. <view class="awardType-content">
  25. <u-tabs :list="awardTypeList" bar-width="60" :bold="false" active-color="#C5AA7B" inactive-color="#999999"
  26. :is-scroll="false" :current="awardTypeFlag" @change="awardTypeActive"></u-tabs>
  27. </view>
  28. </view>
  29. <view v-if="awardTypeFlag == 0">
  30. <view v-if="ZStotallength>0">
  31. <view class="flex-center" v-for="(item, index) in ZSalesOrderDatalist" :key="index">
  32. <view class="directAward-box font-color-656 fs26" @click="arrowTypeChange1(index)">
  33. <view style="display: flex;" class="directAwardInfo">
  34. <view style="flex: 1;" class="flex-items flex-sp-between">
  35. <label class="orderId-box font-color-999">{{$t('common.orderno')}}{{ item.orderFormid }}</label>
  36. <view class="mar-right-50 font-color-999">
  37. 佣金<label class="font-color-C5AA7B">¥{{ item.commission }}</label>
  38. </view>
  39. </view>
  40. <view>
  41. <image v-if="item.ifOpen == false" class="arrow-down"
  42. src="https://ceres.zkthink.com/static/images/arrowDownIcon.png"></image>
  43. <image v-if="item.ifOpen == true" class="arrow-down"
  44. src="https://ceres.zkthink.com/static/images/arrowUpIcon.png"></image>
  45. </view>
  46. </view>
  47. <view v-if="item.ifOpen == true">
  48. <view class="flex-row-plus flex-items flex-sp-between mar-top-30">
  49. <label class="orderId-box font-color-999">{{$t('common.productnum')}}{{ item.products }}</label>
  50. <label class="commission-box mar-left-70 font-color-999">{{$t('Synthesis')}}¥{{ item.price }}</label>
  51. </view>
  52. <view class="flex-row-plus flex-items mar-top-30">
  53. <label class="orderId-box font-color-999">{{$t('common.buyer')}}{{ item.customerName }}</label>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view v-else class="emptyCart-box flex-items-plus flex-column">
  60. <image class="emptyCart-img" src="https://ceres.zkthink.com/static/img/bgnull.png"></image>
  61. <label class="font-color-999 fs26 mar-top-30">{{$t('client.emptydata')}}</label>
  62. </view>
  63. </view>
  64. <view v-if="awardTypeFlag == 1">storeName
  65. <view v-if="JStotallength>0">
  66. <view class="flex-center" v-for="(item, index) in JSalesOrderDatalist" :key="index">
  67. <view class="directAward-box font-color-656 fs26" @click="arrowTypeChange(index)">
  68. <view style="display: flex;" class="directAwardInfo">
  69. <view style="flex: 1;" class="flex-items flex-sp-between">
  70. <label class="orderId-box font-color-999">{{$t('common.orderno')}}{{ item.orderFormid }}</label>
  71. <view class="mar-right-50 font-color-999">
  72. 佣金<label class="font-color-C5AA7B">¥{{ item.commission }}</label>
  73. </view>
  74. </view>
  75. <view>
  76. <image v-if="item.ifOpen == false" class="arrow-down"
  77. src="https://ceres.zkthink.com/static/images/arrowDownIcon.png"></image>
  78. <image v-if="item.ifOpen == true" class="arrow-down"
  79. src="https://ceres.zkthink.com/static/images/arrowUpIcon.png"></image>
  80. </view>
  81. </view>
  82. <view v-if="item.ifOpen == true">
  83. <view class="flex-row-plus flex-items flex-sp-between mar-top-30">
  84. <label class="orderId-box font-color-999">{{$t('common.productnum')}}{{ item.products }}</label>
  85. <label class="commission-box mar-left-70 font-color-999">{{$t('Synthesis')}}¥{{ item.price }}</label>
  86. </view>
  87. <view class="flex-row-plus flex-items mar-top-30">
  88. <label class="orderId-box font-color-999">{{$t('common.buyer')}}{{ item.customerName }}</label>
  89. </view>
  90. <view class="flex-row-plus flex-items mar-top-30">
  91. <label class="orderId-box font-color-999">{{$t('common.distributor')}}{{ item.distributorName }}</label>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <view v-else class="emptyCart-box flex-items-plus flex-column">
  98. <image class="emptyCart-img" src="https://ceres.zkthink.com/static/img/bgnull.png"></image>
  99. <label class="font-color-999 fs26 mar-top-30">{{$t('client.emptydata')}}</label>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </template>
  106. <script>
  107. const NET = require('../../utils/request')
  108. const API = require('../../config/api')
  109. export default {
  110. data() {
  111. return {
  112. awardTypeList: [{
  113. name: '直接奖励'
  114. }, {
  115. name: '间接奖励'
  116. }],
  117. awardTypeFlag: 0,
  118. SalesOrderQuery: {
  119. model: {
  120. tenantCode: '',
  121. settleStatus: '',
  122. type: ''
  123. },
  124. current: 0,
  125. size: 10
  126. },
  127. SalesOrderData: [],
  128. ZSalesOrderData: [],
  129. JSalesOrderData: [],
  130. shopId: 0,
  131. distributorId: 0,
  132. ZStotallength: 0,
  133. JStotallength: 0,
  134. page: 1,
  135. pageSize: 20,
  136. loadingType: 0,
  137. loadingType1: 0,
  138. ZSalesOrderDatalist: [],
  139. JSalesOrderDatalist: [],
  140. ifShow: false
  141. }
  142. },
  143. onLoad: function (options) {
  144. this.shopId = options.shopId
  145. this.distributorId = options.distributorId
  146. this.getZSalesOrderData()
  147. this.getJSalesOrderData()
  148. },
  149. onReachBottom() {
  150. if (this.awardTypeFlag == 0) {
  151. if (this.loadingType == 1) {
  152. uni.stopPullDownRefresh()
  153. } else {
  154. this.page = this.page + 1
  155. this.getZSalesOrderData()
  156. }
  157. } else {
  158. if (this.loadingType1 == 1) {
  159. uni.stopPullDownRefresh()
  160. } else {
  161. this.page = this.page + 1
  162. this.getJSalesOrderData()
  163. }
  164. }
  165. },
  166. methods: {
  167. getZSalesOrderData() {
  168. // uni.showLoading({
  169. // mask: true,
  170. // title:'加载中...'
  171. // })
  172. NET.request(API.GetNotReward, {
  173. shopId: this.shopId,
  174. distributorId: this.distributorId,
  175. type: 1,
  176. page: this.page,
  177. pageSize: this.pageSize
  178. }, 'GET').then(res => {
  179. uni.hideLoading()
  180. if (res.data.page.list.length == 0) {
  181. this.loadingType = 1
  182. this.page = this.page
  183. }
  184. this.ZSalesOrderDatalist = this.ZSalesOrderDatalist.concat(res.data.page.list)
  185. this.ZSalesOrderData = res.data
  186. this.ZStotallength = this.ZSalesOrderData.page.total
  187. this.ifShow = true
  188. }).catch(res => {
  189. uni.hideLoading()
  190. })
  191. },
  192. getJSalesOrderData() {
  193. // uni.showLoading({
  194. // mask: true,
  195. // title:'加载中...'
  196. // })
  197. NET.request(API.GetNotReward, {
  198. shopId: this.shopId,
  199. distributorId: this.distributorId,
  200. type: 2,
  201. page: this.page,
  202. pageSize: this.pageSize
  203. }, 'GET').then(res => {
  204. uni.hideLoading()
  205. if (res.data.page.list.length == 0) {
  206. this.loadingType1 = 1
  207. uni.showToast({
  208. title: '已加载全部···',
  209. duration: 2000,
  210. icon: 'none'
  211. });
  212. this.page = this.page
  213. }
  214. this.JSalesOrderDatalist = this.JSalesOrderDatalist.concat(res.data.page.list)
  215. this.JSalesOrderData = res.data
  216. this.JStotallength = this.JSalesOrderData.page.total
  217. }).catch(res => {
  218. uni.hideLoading()
  219. })
  220. },
  221. awardTypeActive(type) {
  222. this.awardTypeFlag = type
  223. this.page = 1
  224. },
  225. arrowTypeChange1(arrowTypeId) {
  226. this.ZSalesOrderData.page.list[arrowTypeId].ifOpen = this.ZSalesOrderData.page.list[arrowTypeId].ifOpen == false ? true : false
  227. },
  228. arrowTypeChange(arrowTypeId) {
  229. this.JSalesOrderData.page.list[arrowTypeId].ifOpen = this.JSalesOrderData.page.list[arrowTypeId].ifOpen == false ? true : false
  230. }
  231. }
  232. }
  233. </script>
  234. <style lang="scss">
  235. page {
  236. background: #333333;
  237. }
  238. .emptyCart-box {
  239. margin-top: 70 upx;
  240. .emptyCart-img {
  241. width: 225 upx;
  242. height: 196 upx;
  243. }
  244. }
  245. .unliquidated-topBackImg {
  246. width: 100%;
  247. height: 360 rpx;
  248. background: url(https://ceres.zkthink.com/static/images/unliquidatedBg.png) no-repeat;
  249. background-size: 100%;
  250. margin-top: 30 rpx;
  251. .totalAward-content {
  252. width: 90%;
  253. .awardBox {
  254. text-align: center;
  255. .awardTit {
  256. opacity: 0.7;
  257. }
  258. }
  259. .amount {
  260. color: #FFEBC4;
  261. }
  262. }
  263. }
  264. .awardType-box {
  265. border-bottom: 1 upx solid #666666;
  266. .awardType-content {
  267. height: 80 upx;
  268. width: 500 upx;
  269. }
  270. }
  271. .directAward-box {
  272. width: 94%;
  273. border-bottom: 1 upx solid #666666;
  274. padding: 30 upx;
  275. display: flex;
  276. justify-content: flex-start;
  277. flex-direction: column;
  278. background: #FFFFFF;
  279. margin-top: 30 rpx;
  280. .orderId-box {
  281. display: flex;
  282. justify-content: flex-start;
  283. flex-direction: row;
  284. }
  285. .commission-box {
  286. width: 260 upx;
  287. }
  288. .arrow-down {
  289. width: 24 upx;
  290. height: 24 upx;
  291. }
  292. .directAwardInfo {
  293. }
  294. }
  295. .totalAwardEmpty-box {
  296. margin-top: 65 upx;
  297. .totalAwardEmpty {
  298. width: 270 upx;
  299. height: 270 upx;
  300. }
  301. }
  302. </style>
  303. <style scoped>
  304. .awardType /deep/ .u-tabs {
  305. background: none !important;
  306. }
  307. </style>