billHistoryDetail.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <view class="content flex flex_column" v-if="billInfo">
  3. <view class="b_head">
  4. <view class="head_list">
  5. <text>分享时间</text>
  6. <text>{{billInfo.createDate}}</text>
  7. </view>
  8. <view class="head_list" v-if="billList.customer">
  9. <text>客户名称</text>
  10. <text>{{billInfo.customer.customerName}}</text>
  11. </view>
  12. <view class="head_list">
  13. <text>对账周期</text>
  14. <text>{{timeInfo || '--'}}</text>
  15. </view>
  16. <view class="head_list">
  17. <text>付款状态</text>
  18. <text>{{billInfo.billStatus != 'UNSETTLE'?'未付款':billInfo.settleStyleSnDictValue ? '已付款('+billInfo.settleStyleSnDictValue+')':'已付款'}}</text>
  19. </view>
  20. </view>
  21. <view class="b_detail">
  22. <view class="detail_list u-flex">
  23. <view class="detail_box">
  24. <text>总单数:</text>
  25. <text>{{billInfo.detailNum}}</text>
  26. </view>
  27. <view class="detail_box">
  28. <text>待收金额合计:</text>
  29. <text>{{billInfo.totalAmount}}</text>
  30. </view>
  31. </view>
  32. <view class="detail_list u-flex">
  33. <view class="detail_box">
  34. <text>折让金额:</text>
  35. <text>{{billInfo.discountAmount}}</text>
  36. </view>
  37. <view class="detail_box">
  38. <text>折让后待收金额:</text>
  39. <text>{{billInfo.settleAmount}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="detail_con">
  44. <billList ref="billInfo" :list="billList" ></billList>
  45. </view>
  46. <view class="footer">
  47. <u-button type="primary" :custom-style="customStyle" shape="circle">再次发送对账单</u-button>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import billList from './billListComponent.vue'
  53. import { findBySn,insert} from '@/api/verify.js';
  54. import getDate from '@/libs/getDate.js';
  55. export default {
  56. components: { billList },
  57. data() {
  58. return {
  59. customStyle:{
  60. backgroundColor: this.$config('primaryColor'),
  61. color: '#fff',
  62. verifySn:''
  63. },
  64. billInfo:null,
  65. billList:[],
  66. timeInfo:''
  67. };
  68. },
  69. onReady() {
  70. uni.setNavigationBarColor({
  71. frontColor: '#ffffff',
  72. backgroundColor: this.$config('primaryColor')
  73. });
  74. },
  75. onLoad(options) {
  76. if(options && options.billId){
  77. this.verifySn=options.billId
  78. this.loadData({verifySn:options.billId})
  79. }
  80. },
  81. methods:{
  82. loadData(ajaxData){
  83. findBySn(ajaxData).then(res => {
  84. if (res.status == 200) {
  85. this.billInfo=res.data;
  86. this.billList=res.data.detailList;
  87. let timeobj=getDate.editDay(res.data.bizBeginDate,res.data.bizEndDate);
  88. this.timeInfo= timeobj.starttime +'~'+timeobj.endtime
  89. this.$refs.billInfo.setData(res.data.detailList);
  90. }
  91. });
  92. },
  93. submitOrder(){//发送对账单
  94. let ajaxData={
  95. detailNum:this.billInfo.detailNum,
  96. totalAmount:this.billInfo.totalAmount,
  97. discountAmount:this.billInfo.discountAmount,
  98. settleAmount:this.billInfo.settleAmount,
  99. detailList:this.billList,
  100. targetSn: this.billInfo.customer.customerSn,
  101. bizBeginDate: this.billInfo.bizBeginDate,
  102. bizEndDate: this.billInfo.bizEndDate
  103. }
  104. insert(ajaxData).then(res => {
  105. if (res.status == 200) {
  106. //去分享
  107. }
  108. });
  109. },
  110. }
  111. };
  112. </script>
  113. <style lang="scss" scoped>
  114. .content {
  115. height: 100vh;
  116. width: 100%;
  117. .b_head {
  118. background-color: #fff;
  119. .head_list {
  120. padding:14rpx 20rpx;
  121. border-bottom: 1rpx solid #f8f8f8;
  122. text {
  123. &:first-child {
  124. color: $uni-text-color-grey;
  125. display: inline-block;
  126. width: 160rpx;
  127. }
  128. }
  129. }
  130. }
  131. .b_detail{
  132. margin:6rpx 0;
  133. background-color: #fff;
  134. padding:20rpx;
  135. box-sizing: border-box;
  136. .detail_list{
  137. margin-bottom: 10rpx;
  138. &:last-child{
  139. margin-bottom: 0rpx;
  140. }
  141. .detail_box::after{
  142. content:';';
  143. color:$uni-text-color-grey;
  144. }
  145. .detail_box{
  146. text{
  147. &:first-child{
  148. color:$uni-text-color-grey;
  149. }
  150. &:last-child{
  151. color:$uni-color-warning;
  152. font-weight: 600;
  153. }
  154. }
  155. }
  156. }
  157. }
  158. .detail_con{
  159. flex-grow: 1;
  160. overflow: auto;
  161. background-color: #fff;
  162. }
  163. .footer{
  164. padding:10rpx 20rpx;
  165. background:#fff;
  166. margin-top:20rpx;
  167. }
  168. }
  169. </style>