| | |
| | | <template> |
| | | <view class="sales-account"> |
| | | <PageHeader title="销售报价" @back="goBack" /> |
| | | |
| | | <PageHeader title="销售报价" |
| | | @back="goBack" /> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <up-input |
| | | class="search-text" |
| | | v-model="quotationNo" |
| | | placeholder="请输入报价单号搜索" |
| | | clearable |
| | | @change="getList" |
| | | /> |
| | | <up-input class="search-text" |
| | | v-model="quotationNo" |
| | | placeholder="请输入报价单号搜索" |
| | | clearable |
| | | @change="getList" /> |
| | | </view> |
| | | <view class="filter-button" @click="getList"> |
| | | <up-icon name="search" size="24" color="#999"></up-icon> |
| | | <view class="filter-button" |
| | | @click="getList"> |
| | | <up-icon name="search" |
| | | size="24" |
| | | color="#999"></up-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="tabs-section"> |
| | | <up-tabs |
| | | v-model="tabValue" |
| | | :list="tabList" |
| | | itemStyle="width: 20%;height: 80rpx;" |
| | | @change="onTabChange" |
| | | /> |
| | | <up-tabs v-model="tabValue" |
| | | :list="tabList" |
| | | itemStyle="width: 20%;height: 80rpx;" |
| | | @change="onTabChange" /> |
| | | </view> |
| | | |
| | | <view v-if="quotationList.length > 0" class="ledger-list"> |
| | | <view v-for="item in quotationList" :key="item.id" class="ledger-item"> |
| | | <view v-if="quotationList.length > 0" |
| | | class="ledger-list"> |
| | | <view v-for="item in quotationList" |
| | | :key="item.id" |
| | | class="ledger-item"> |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <view class="document-icon"> |
| | | <up-icon name="file-text" size="16" color="#ffffff"></up-icon> |
| | | <up-icon name="file-text" |
| | | size="16" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-id">{{ item.quotationNo || "-" }}</text> |
| | | </view> |
| | | <text class="item-index">{{ item.status || "-" }}</text> |
| | | <up-tag :text="item.status || '待审批'" |
| | | :type="getStatusType(item.status)" |
| | | size="mini" |
| | | shape="circle" /> |
| | | </view> |
| | | |
| | | <up-divider></up-divider> |
| | | |
| | | <view class="item-details"> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">客户名称</text> |
| | |
| | | <text class="detail-value">{{ item.validDate || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">付款方式</text> |
| | | <text class="detail-value">{{ item.paymentMethod || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">报价金额</text> |
| | | <text class="detail-value highlight">{{ formatAmount(item.totalAmount) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <view class="detail-row" |
| | | v-if="item.remark"> |
| | | <text class="detail-label">备注</text> |
| | | <text class="detail-value">{{ item.remark || "-" }}</text> |
| | | <text class="detail-value">{{ item.remark }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="action-buttons"> |
| | | <up-button |
| | | class="action-btn" |
| | | size="small" |
| | | type="primary" |
| | | :disabled="!canEdit(item)" |
| | | @click="goEdit(item)" |
| | | > |
| | | 编辑 |
| | | </up-button> |
| | | <up-button class="action-btn" size="small" @click="goDetail(item)">详情</up-button> |
| | | <up-button class="action-btn" size="small" type="error" plain @click="handleDelete(item)"> |
| | | <up-button class="action-btn" |
| | | size="small" |
| | | type="primary" |
| | | :disabled="!canEdit(item)" |
| | | @click="goEdit(item)"> |
| | | 编辑 |
| | | </up-button> |
| | | <up-button class="action-btn" |
| | | size="small" |
| | | @click="goDetail(item)">详情</up-button> |
| | | <up-button class="action-btn" |
| | | size="small" |
| | | type="error" |
| | | plain |
| | | @click="handleDelete(item)"> |
| | | 删除 |
| | | </up-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view v-else class="no-data"> |
| | | <view v-else |
| | | class="no-data"> |
| | | <text>暂无销售报价数据</text> |
| | | </view> |
| | | |
| | | <view class="fab-button" @click="goAdd"> |
| | | <up-icon name="plus" size="28" color="#ffffff"></up-icon> |
| | | <view class="fab-button" |
| | | @click="goAdd"> |
| | | <up-icon name="plus" |
| | | size="28" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | import { reactive, ref } from "vue"; |
| | | import { onShow } from "@dcloudio/uni-app"; |
| | | import PageHeader from "@/components/PageHeader.vue"; |
| | | import { deleteQuotation, getQuotationList } from "@/api/salesManagement/salesQuotation"; |
| | | import { |
| | | deleteQuotation, |
| | | getQuotationList, |
| | | } from "@/api/salesManagement/salesQuotation"; |
| | | |
| | | const quotationNo = ref(""); |
| | | const quotationList = ref([]); |
| | |
| | | }; |
| | | |
| | | const goAdd = () => { |
| | | uni.removeStorageSync("salesQuotationDetail"); |
| | | uni.navigateTo({ url: "/pages/sales/salesQuotation/edit" }); |
| | | }; |
| | | |
| | | const goEdit = item => { |
| | | if (!canEdit(item)) return; |
| | | uni.setStorageSync("salesQuotationDetail", item || {}); |
| | | uni.navigateTo({ url: `/pages/sales/salesQuotation/edit?id=${item.id}` }); |
| | | }; |
| | | |
| | |
| | | return `¥${num.toFixed(2)}`; |
| | | }; |
| | | |
| | | const getStatusType = status => { |
| | | const statusMap = { |
| | | 待审批: "info", |
| | | 审核中: "primary", |
| | | 通过: "success", |
| | | 拒绝: "danger", |
| | | }; |
| | | return statusMap[status] || "info"; |
| | | }; |
| | | |
| | | const getList = () => { |
| | | uni.showLoading({ title: "加载中...", mask: true }); |
| | | getQuotationList({ |