123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <template>
- <view class="section about-receivables-plan">
- <view class="section-title">
- <image :src="$static('images/crm_about/receivables.png')" class="icon" />
- <text class="title">
- 回款计划
- </text>
- <view
- class="add-btn"
- @click="handleAdd">
- <text class="wk wk-plus icon-add" />
- <text>新建</text>
- </view>
- </view>
- <view class="section-body">
- <template v-if="list.length > 0">
- <view class="list">
- <view v-for="(item, index) in list" :key="index" class="list-item">
- <view class="list-item-info">
- <view class="box">
- <text class="left main">
- {{ item.num }}期
- </text>
- <text class="text">
- 回款方式:{{ item.returnType }}
- </text>
- </view>
- <view class="box">
- <text class="left text">
- 计划回款日 {{ formatTime(item.returnDate) }}
- </text>
- <text class="special">
- ¥{{ splitNumber(item.money) }}
- </text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <template v-else>
- <view class="no-data">
- 暂无数据
- </view>
- </template>
- </view>
- </view>
- </template>
- <script>
- import { splitNumber } from '@/utils/lib.js'
- import moment from 'moment'
- export default {
- name: 'AboutReceivablesPlan',
- props: {
- list: {
- type: Array,
- required: true
- },
- config: {
- type: Object,
- default: () => {}
- }
- },
- data() {
- return {}
- },
- methods: {
- formatTime(date) {
- if (!date) return '--'
- return moment(date).format('YYYY-MM-DD')
- },
- splitNumber(num) {
- return splitNumber(num)
- },
- handleAdd() {
- const crmType = this.config.type
- if (crmType === 'contract') {
- getApp().globalData.formBridge = {
- default: {
- contractId: [{
- contractId: this.config.detail.contractId,
- num: this.config.detail.num
- }],
- customerId: [{
- customerId: this.config.detail.customerId,
- customerName: this.config.detail.customerName
- }]
- },
- assignForm: {
- businessId: this.config.detail.businessId
- }
- }
- }
- this.$Router.navigateTo({
- url: '/pages_crm/receivables_plan/create'
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- @import './style.scss';
- .list {
- padding: 0 32rpx;
- &-item {
- @include left;
- &-info {
- flex: 1;
- border-bottom: 1rpx solid $border-color;
- @include padding;
- .box {
- @include left;
- .left {
- flex: 1;
- }
- .main {
- font-size: $wk-font-medium;
- color: $dark;
- line-height: 2;
- }
- .special {
- font-size: $wk-font-sm;
- color: $warning;
- font-weight: bold;
- }
- .text {
- font-size: 26rpx;
- color: $gray;
- }
- }
- }
- }
- .list-item:last-child {
- .list-item-info {
- border-bottom: 0 none;
- }
- }
- }
- </style>
|