| | |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <up-input class="search-text" |
| | | v-model="quotationNo" |
| | | v-model="query.quotationNo" |
| | | placeholder="请输入报价单号搜索" |
| | | clearable |
| | | @change="getList" /> |
| | | </view> |
| | | <view class="filter-button" |
| | | @click="getList"> |
| | | <up-icon name="search" |
| | | @click="showFilter = true"> |
| | | <up-icon name="list" |
| | | size="24" |
| | | color="#999"></up-icon> |
| | | </view> |
| | |
| | | <view class="detail-row"> |
| | | <text class="detail-label">客户名称</text> |
| | | <text class="detail-value">{{ item.customer || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">所属项目</text> |
| | | <text class="detail-value">{{ item.projectName || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">业务员</text> |
| | |
| | | size="28" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | |
| | | <FilterPanel v-model:show="showFilter" |
| | | :model-value="query" |
| | | title="报价筛选" |
| | | :fields="filterFields" |
| | | @search="onFilterSearch" |
| | | @reset="onFilterSearch" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { reactive, ref } from "vue"; |
| | | import { computed, reactive, ref } from "vue"; |
| | | import { onShow } from "@dcloudio/uni-app"; |
| | | import PageHeader from "@/components/PageHeader.vue"; |
| | | import FilterPanel from "@/components/FilterPanel.vue"; |
| | | import { |
| | | deleteQuotation, |
| | | getQuotationList, |
| | | } from "@/api/salesManagement/salesQuotation"; |
| | | import { loadProjectOptions } from "@/utils/projectOptions"; |
| | | |
| | | const quotationNo = ref(""); |
| | | const quotationList = ref([]); |
| | | const showFilter = ref(false); |
| | | const projectOptions = ref([]); |
| | | |
| | | const query = reactive({ |
| | | quotationNo: "", |
| | | projectId: "", |
| | | }); |
| | | |
| | | const filterFields = computed(() => [ |
| | | { |
| | | prop: "quotationNo", |
| | | label: "报价单号", |
| | | type: "input", |
| | | placeholder: "请输入报价单号", |
| | | }, |
| | | { |
| | | prop: "projectId", |
| | | label: "所属项目", |
| | | type: "select", |
| | | options: projectOptions.value, |
| | | }, |
| | | ]); |
| | | |
| | | const tabList = reactive([ |
| | | { name: "全部", value: "" }, |
| | |
| | | uni.showLoading({ title: "加载中...", mask: true }); |
| | | getQuotationList({ |
| | | ...page, |
| | | quotationNo: quotationNo.value, |
| | | quotationNo: query.quotationNo, |
| | | projectId: query.projectId || undefined, |
| | | status: getCurrentStatus(), |
| | | }) |
| | | .then(res => { |
| | |
| | | }) |
| | | .finally(() => { |
| | | uni.hideLoading(); |
| | | }); |
| | | }; |
| | | |
| | | // FilterPanel 只回吐筛选值,写回 query 后统一查询 |
| | | const onFilterSearch = values => { |
| | | Object.assign(query, values); |
| | | getList(); |
| | | }; |
| | | |
| | | let projectsLoaded = false; |
| | | |
| | | const loadProjects = () => { |
| | | if (projectsLoaded) return; |
| | | projectsLoaded = true; |
| | | loadProjectOptions() |
| | | .then(options => { |
| | | projectOptions.value = options; |
| | | }) |
| | | .catch(() => { |
| | | projectsLoaded = false; |
| | | }); |
| | | }; |
| | | |
| | |
| | | |
| | | onShow(() => { |
| | | getList(); |
| | | loadProjects(); |
| | | }); |
| | | </script> |
| | | |