gaoluyang
5 天以前 af4f913751c08fd6ef70cb183de2fb3c604bab38
src/views/procurementManagement/paymentHistory/index.vue
@@ -32,27 +32,29 @@
        >
          搜索
        </el-button>
        <el-button @click="handleExport">导出</el-button>
      </el-form-item>
    </el-form>
    <div class="table_list">
      <PIMTable
        rowKey="id"
        :column="tableColumn"
        :tableData="tableData"
        :page="page"
        :isSelection="true"
        :isShowSummary="isShowSummarySon"
        :summaryMethod="summarizeMainTable1"
        :handleSelectionChange="handleSelectionChange"
        @selection-change="handleSelectionChange"
        :tableLoading="tableLoading"
        @pagination="pagination"
        :total="total"
        :total="page.total"
      ></PIMTable>
    </div>
  </div>
</template>
<script setup>
import { ref } from "vue";
import { ref, reactive, getCurrentInstance, onMounted } from "vue";
import { Search } from "@element-plus/icons-vue";
import { paymentHistoryListPage } from "@/api/procurementManagement/paymentEntry.js";
import useFormData from "@/hooks/useFormData";
@@ -62,18 +64,23 @@
const isShowSummarySon = ref(true);
const tableColumn = ref([
  {
    label: "采购合同号",
    prop: "purchaseContractNumber",
  },
  {
    label: "付款日期",
    prop: "paymentDate",
  },
  {
    label: "供应商名称",
    prop: "supplierName",
    width:240
  },
  {
    label: "付款金额",
    prop: "currentPaymentAmount",
    formatData: (params) => {
      return parseFloat(params).toFixed(2);
      return params ? parseFloat(params).toFixed(2) : 0;
    },
  },
  {
@@ -95,16 +102,14 @@
const page = reactive({
  current: 1,
  size: 100,
  total: 0,
});
const total = ref(0);
const { form: searchForm } = useFormData({
  searchText: undefined,
  paymentDate: [
    dayjs().startOf("month").format("YYYY-MM-DD"),
    dayjs().endOf("month").format("YYYY-MM-DD"),
  ],
  paymentDateStart: dayjs().startOf("month").format("YYYY-MM-DD"),
  paymentDateEnd: dayjs().endOf("month").format("YYYY-MM-DD"),
  paymentDate: [],
  paymentDateStart: undefined,
  paymentDateEnd: undefined,
});
// 查询列表
@@ -124,7 +129,7 @@
  paymentHistoryListPage({ ...rest, ...page }).then((res) => {
    tableLoading.value = false;
    tableData.value = res.records;
    total.value = res.total;
      page.total = res.total;
  });
};
// 子表合计方法
@@ -154,6 +159,12 @@
  getList();
};
// 导出
const handleExport = () => {
  const { paymentDate, ...rest } = searchForm;
  proxy.download("/purchase/paymentRegistration/export", { ...rest, ...page }, "付款流水.xlsx");
};
onMounted(() => {
  getList();
});