| | |
| | | clearable |
| | | prefix-icon="Search" |
| | | /> |
| | | <span class="search_title" style="margin-left: 10px">订单号:</span> |
| | | <el-input |
| | | v-model="orderNoSearch" |
| | | style="width: 240px" |
| | | placeholder="输入订单号搜索" |
| | | @change="filterReceiptRecord" |
| | | clearable |
| | | prefix-icon="Search" |
| | | /> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >搜索</el-button |
| | | > |
| | |
| | | width="110" |
| | | /> |
| | | <el-table-column |
| | | label="销售合同号" |
| | | label="订单号" |
| | | prop="salesContractNo" |
| | | show-overflow-tooltip |
| | | width="200" |
| | |
| | | invoiceDate: "", |
| | | }, |
| | | }); |
| | | const orderNoSearch = ref(""); |
| | | const customerId = ref(""); |
| | | const { searchForm } = toRefs(data); |
| | | const originReceiptRecord = ref([]); |
| | |
| | | console.log("param", param); |
| | | customerInteractions(param).then((res) => { |
| | | originReceiptRecord.value = res.data; |
| | | handlePagination({ page: 1, limit: recordPage.size }); |
| | | recordTotal.value = res.data.length; |
| | | recordPage.current = 1; |
| | | filterReceiptRecord(); |
| | | }); |
| | | }; |
| | | |
| | |
| | | const handlePagination = ({ page, limit }) => { |
| | | recordPage.current = page; |
| | | recordPage.size = limit; |
| | | filterReceiptRecord(); |
| | | }; |
| | | |
| | | const start = (page - 1) * limit; |
| | | const end = start + limit; |
| | | |
| | | receiptRecord.value = originReceiptRecord.value.slice(start, end); |
| | | // 根据订单号过滤右边表格数据 |
| | | const filterReceiptRecord = () => { |
| | | let filteredData = originReceiptRecord.value; |
| | | if (orderNoSearch.value) { |
| | | filteredData = originReceiptRecord.value.filter(item => |
| | | item.salesContractNo && item.salesContractNo.includes(orderNoSearch.value) |
| | | ); |
| | | } |
| | | recordTotal.value = filteredData.length; |
| | | const start = (recordPage.current - 1) * recordPage.size; |
| | | const end = start + recordPage.size; |
| | | receiptRecord.value = filteredData.slice(start, end); |
| | | }; |
| | | |
| | | onMounted(() => { |