| | |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="发票日期"> |
| | | <el-date-picker |
| | | v-model="searchForm.issueDateRange" |
| | | style="width: 250px" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="daterange" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | clearable |
| | | @change="handleIssueDateChange" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="发票金额"> |
| | | <el-input |
| | | v-model="searchForm.invoiceAmountStart" |
| | | style="width: 110px" |
| | | placeholder="最小" |
| | | clearable |
| | | @change="handleQuery" |
| | | /> |
| | | <span style="margin: 0 6px">-</span> |
| | | <el-input |
| | | v-model="searchForm.invoiceAmountEnd" |
| | | style="width: 110px" |
| | | placeholder="最大" |
| | | clearable |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-checkbox |
| | | v-model="searchForm.status" |
| | |
| | | show-summary |
| | | v-loading="childrenLoading" |
| | | :summary-method="summarizeMainTable2" |
| | | stripe |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | |
| | | </el-table-column> |
| | | <el-table-column label="付款方式" prop="paymentMethod"> |
| | | <template #default="scope"> |
| | | <el-select |
| | | <el-input |
| | | :disabled="!scope.row.editType" |
| | | v-model="scope.row.paymentMethod" |
| | | placeholder="请选择" |
| | | placeholder="请输入" |
| | | clearable |
| | | > |
| | | <el-option label="电汇" value="电汇" /> |
| | | <el-option label="承兑" value="承兑" /> |
| | | </el-select> |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="登记人" prop="registrant" /> |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款方式:" prop="paymentMethod"> |
| | | <el-select |
| | | <el-input |
| | | v-model="form.paymentMethod" |
| | | placeholder="请选择" |
| | | placeholder="请输入" |
| | | clearable |
| | | > |
| | | <el-option label="电汇" value="电汇" /> |
| | | <el-option label="承兑" value="承兑" /> |
| | | </el-select> |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | width:200 |
| | | }, |
| | | { |
| | | label: "发票日期", |
| | | prop: "issueDate", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "发票金额(元)", |
| | | prop: "invoiceAmount", |
| | | formatData: (params) => { |
| | |
| | | searchForm: { |
| | | supplierNameOrContractNo: "", |
| | | status: false, |
| | | issueDateRange: [], |
| | | issueDateStart: undefined, |
| | | issueDateEnd: undefined, |
| | | invoiceAmountStart: undefined, |
| | | invoiceAmountEnd: undefined, |
| | | }, |
| | | form: { |
| | | purchaseContractNumber: "", |
| | |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | // 发票日期区间变化 |
| | | const handleIssueDateChange = (val) => { |
| | | if (val && val.length === 2) { |
| | | searchForm.issueDateStart = val[0]; |
| | | searchForm.issueDateEnd = val[1]; |
| | | } else { |
| | | searchForm.issueDateStart = undefined; |
| | | searchForm.issueDateEnd = undefined; |
| | | } |
| | | handleQuery(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | invoiceListPage({ ...searchForm, ...page }).then((res) => { |
| | | const params = { ...searchForm, ...page }; |
| | | // 发票日期区间用 start/end 传给后端,去掉仅前端用的数组 |
| | | delete params.issueDateRange; |
| | | if (params.invoiceAmountStart === "" || params.invoiceAmountStart === null) delete params.invoiceAmountStart; |
| | | if (params.invoiceAmountEnd === "" || params.invoiceAmountEnd === null) delete params.invoiceAmountEnd; |
| | | invoiceListPage(params).then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | | page.total = res.total; |