gaoluyang
3 天以前 642ce80036a23316710ff1fe1ab8526a39b33c9c
src/views/salesManagement/receiptPayment/index.vue
@@ -3,15 +3,32 @@
    <div class="search_form">
      <el-form :inline="true" :model="searchForm" style="width: 100%">
        <el-row justify="space-between">
          <el-col :span="20">
            <el-form-item label="回款登记">
          <el-col :span="24">
            <el-form-item label="客户名称">
              <el-input
                v-model="searchForm.searchText"
                style="width: 240px"
                placeholder="输入客户名称/合同号搜索"
                v-model="searchForm.customerName"
                placeholder="请输入"
                @change="handleQuery"
                clearable
                prefix-icon="Search"
              />
            </el-form-item>
            <el-form-item label="客户合同号">
              <el-input
                v-model="searchForm.customerContractNo"
                placeholder="请输入"
                @change="handleQuery"
                clearable
                prefix-icon="Search"
              />
            </el-form-item>
            <el-form-item label="项目名称">
              <el-input
                v-model="searchForm.projectName"
                placeholder="请输入"
                @change="handleQuery"
                clearable
                prefix-icon="Search"
              />
            </el-form-item>
            <el-form-item>
@@ -25,17 +42,19 @@
              <el-button type="primary" @click="handleQuery"> 搜索 </el-button>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item style="float: right; margin-right: unset">
              <el-button type="primary" @click="openForm('add')">
                新增回款
              </el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <div class="table_list">
      <div class="actions">
        <div></div>
        <div>
          <el-button type="primary" icon="Plus" @click="openForm('add')">
            新增回款
          </el-button>
          <el-button icon="Download" @click="handleOut"> 导出 </el-button>
        </div>
      </div>
      <el-table
        :data="tableData"
        border
@@ -46,7 +65,8 @@
        :summary-method="summarizeMainTable"
        :expand-row-keys="expandedRowKeys"
        @expand-change="expandChange"
        height="calc(100vh - 18.5em)"
        height="calc(100vh - 21.5em)"
      >
        <el-table-column align="center" type="selection" width="55" />
        <el-table-column type="expand">
@@ -99,6 +119,7 @@
                    size="small"
                    @click="changeEditType(scope.row)"
                    v-if="!scope.row.editType"
                              :disabled="scope.row.registrant !== userStore.nickName"
                    >编辑</el-button
                  >
                  <el-button
@@ -107,6 +128,7 @@
                    size="small"
                    @click="saveReceiptPayment(scope.row)"
                    v-if="scope.row.editType"
                              :disabled="scope.row.registrant !== userStore.nickName"
                    >保存</el-button
                  >
                  <el-button
@@ -114,6 +136,7 @@
                    type="primary"
                    size="small"
                    @click="delReceiptRecord(scope.row)"
                              :disabled="scope.row.registrant !== userStore.nickName"
                    >删除</el-button
                  >
                </template>
@@ -126,49 +149,59 @@
          label="销售合同号"
          prop="salesContractNo"
          show-overflow-tooltip
          width="240"
        />
        <el-table-column
          label="客户合同号"
          prop="customerContractNo"
          show-overflow-tooltip
          width="240"
        />
        <el-table-column
          label="客户名称"
          prop="customerName"
          show-overflow-tooltip
          width="240"
        />
        <el-table-column
          label="项目名称"
          prop="projectName"
          show-overflow-tooltip
          width="340"
        />
        <el-table-column
          label="产品大类"
          prop="productCategory"
          show-overflow-tooltip
          width="100"
        />
        <el-table-column
          label="发票号"
          prop="invoiceNo"
          show-overflow-tooltip
          width="200"
        />
        <el-table-column
          label="发票金额(元)"
          prop="invoiceTotal"
          show-overflow-tooltip
          :formatter="formattedNumber"
          width="200"
        />
        <el-table-column label="税率" prop="taxRate" show-overflow-tooltip />
        <el-table-column label="税率(%)" prop="taxRate" show-overflow-tooltip />
        <el-table-column
          label="回款金额(元)"
          prop="receiptPaymentAmountTotal"
          show-overflow-tooltip
          :formatter="formattedNumber"
          width="200"
        />
        <el-table-column
          label="待回款金额(元)"
          prop="noReceiptAmount"
          show-overflow-tooltip
          width="200"
        >
          <template #default="{ row, column }">
            <el-text type="danger">
@@ -255,12 +288,9 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="本次回款金额:" prop="receiptPaymentAmount">
              <el-input
                type="number"
                min="0"
              <el-input-number :step="0.01" :min="0" style="width: 100%"
                v-model="form.receiptPaymentAmount"
                placeholder="请输入"
                :step="0.01"
                clearable
              />
            </el-form-item>
@@ -322,7 +352,7 @@
<script setup>
import pagination from "@/components/PIMTable/Pagination.vue";
import { ref } from "vue";
import { onMounted, ref } from "vue";
import {
  receiptPaymentSaveOrUpdate,
  bindInvoiceNoRegPage,
@@ -351,7 +381,10 @@
const data = reactive({
  searchForm: {
    searchText: "",
    status: false,
    status: true,
    customerName: "",
    customerContractNo: "",
    projectName: "",
  },
  form: {
    salesContractNo: "",
@@ -543,7 +576,29 @@
  });
};
getList();
// 导出
const handleOut = () => {
  ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", {
    confirmButtonText: "确认",
    cancelButtonText: "取消",
    type: "warning",
  })
    .then(() => {
      const ids = selectedRows.value.map((item) => item.id);
      proxy.download(
        `/receiptPayment/export`,
        { ids: `${ids}` },
        "回款登记档案.xlsx"
      );
    })
    .catch(() => {
      proxy.$modal.msg("已取消");
    });
};
onMounted(() => {
  getList();
});
</script>
<style scoped lang="scss">
@@ -553,4 +608,9 @@
::v-deep(.el-checkbox__label) {
  font-weight: bold;
}
.actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
</style>