| | |
| | | <template> |
| | | <view class="receipt-payment"> |
| | | <!-- 页面头部 --> |
| | | <van-nav-bar |
| | | title="回款登记" |
| | | left-text="返回" |
| | | left-arrow |
| | | @click-left="goBack" |
| | | fixed |
| | | placeholder |
| | | /> |
| | | <!-- 使用通用页面头部组件 --> |
| | | <PageHeader title="回款登记" @back="goBack" /> |
| | | |
| | | <!-- 搜索和筛选区域 --> |
| | | <view class="search-filter-section"> |
| | |
| | | /> |
| | | </view> |
| | | <view class="filter-button" @click="getList"> |
| | | <up-icon name="search" size="24" color="#999"></up-icon> |
| | | <u-icon name="search" size="24" color="#999"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 筛选开关 --> |
| | | <view class="switch-row"> |
| | | <text class="switch-label">不显示待回款为0</text> |
| | | <van-switch v-model="searchForm.status" @change="getList" size="18"/> |
| | | <u-switch v-model="searchForm.status" @change="getList" size="18"/> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <view class="document-icon"> |
| | | <up-icon name="file-text" size="16" color="#ffffff"></up-icon> |
| | | <u-icon name="file-text" size="16" color="#ffffff"></u-icon> |
| | | </view> |
| | | <text class="item-id">{{ item.salesContractNo }}</text> |
| | | </view> |
| | | </view> |
| | | <up-divider></up-divider> |
| | | <u-divider></u-divider> |
| | | <view class="item-details"> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">客户名称</text> |
| | |
| | | |
| | | <!-- 操作按钮 --> |
| | | <view class="action-buttons"> |
| | | <van-button |
| | | <u-button |
| | | type="primary" |
| | | size="small" |
| | | class="action-btn" |
| | |
| | | @click="openForm(item)" |
| | | > |
| | | 新增回款 |
| | | </van-button> |
| | | </u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | <!-- 无数据提示 --> |
| | | <view class="no-data" v-else> |
| | | <text>暂无回款数据</text> |
| | | <text>暂无数据</text> |
| | | </view> |
| | | |
| | | <!-- 回款方式选择器 --> |
| | | <van-popup v-model:show="showPaymentType" position="bottom"> |
| | | <van-picker |
| | | :columns="receipt_payment_type" |
| | | @confirm="onPaymentTypeConfirm" |
| | | @cancel="showPaymentType = false" |
| | | /> |
| | | </van-popup> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { showToast } from 'vant' |
| | | import {onShow} from "@dcloudio/uni-app"; |
| | | |
| | | const userStore = useUserStore() |
| | | |
| | | // 响应式数据 |
| | | const tableData = ref([]) |
| | | const tableLoading = ref(false) |
| | | const showPaymentType = ref(false) |
| | | const currentEditRow = ref(null) |
| | | |
| | | // 查询参数设置为-1获取全部数据 |
| | | const page = ref({ |
| | |
| | | customerContractNo: '', |
| | | projectName: '' |
| | | }) |
| | | |
| | | // 回款方式选项 |
| | | const receipt_payment_type = ref([ |
| | | { text: '现金', value: '1' }, |
| | | { text: '银行转账', value: '2' }, |
| | | { text: '支票', value: '3' }, |
| | | { text: '其他', value: '4' } |
| | | ]) |
| | | |
| | | // 格式化数字 |
| | | const formatNumber = (value) => { |
| | |
| | | uni.navigateTo({ url: '/pages/sales/receiptPayment/add' }) |
| | | } |
| | | |
| | | // 确认回款方式选择 |
| | | const onPaymentTypeConfirm = (value) => { |
| | | if (currentEditRow.value) { |
| | | currentEditRow.value.receiptPaymentType = value.value |
| | | } |
| | | showPaymentType.value = false |
| | | } |
| | | onShow(() => { |
| | | getList() |
| | | }) |