gaoluyang
2025-12-04 f39ab142a99fe58b942dee749d1c6a20ac0d4ee6
src/views/procurementManagement/paymentEntry/index.vue
@@ -27,6 +27,7 @@
          </el-col>
          <el-col :span="4">
            <el-form-item style="float: right; margin-right: unset">
              <el-button @click="handleExport" style="margin-right: 10px">导出</el-button>
              <el-button type="primary" @click="openForm('add')">
                新增付款
              </el-button>
@@ -103,7 +104,6 @@
                           size="small"
                           @click="changeEditType(scope.row)"
                           v-if="!scope.row.editType"
                           :disabled="scope.row.registrant !== userStore.nickName"
                        >编辑</el-button
                        >
                        <el-button
@@ -112,7 +112,6 @@
                           size="small"
                           @click="saveReceiptPayment(scope.row)"
                           v-if="scope.row.editType"
                           :disabled="scope.row.registrant !== userStore.nickName"
                        >保存</el-button
                        >
                        <el-button
@@ -120,7 +119,6 @@
                           type="primary"
                           size="small"
                           @click="handleDelete(scope.row)"
                           :disabled="scope.row.registrant !== userStore.nickName"
                        >删除</el-button
                        >
                     </template>
@@ -252,7 +250,6 @@
                v-model="form.registrationtDate"
                placeholder="请输入"
                clearable
                disabled
              />
            </el-form-item>
          </el-col>
@@ -269,7 +266,7 @@
</template>
<script setup>
import { ref } from "vue";
import { ref, reactive, toRefs, getCurrentInstance, nextTick, onMounted } from "vue";
import { Search } from "@element-plus/icons-vue";
import { ElMessageBox } from "element-plus";
import useUserStore from "@/store/modules/user.js";
@@ -308,6 +305,20 @@
    prop: "supplierName",
    width:240
  },
   {
      label: "付款状态",
      prop: "statusName",
      dataType: "tag",
      formatType: (params) => {
         if (params == '未完成付款') {
            return "danger";
         } else if (params == '已完成付款') {
            return "success";
         } else {
            return null;
         }
      },
   },
  {
    label: "发票号",
    prop: "invoiceNumber",
@@ -392,7 +403,11 @@
const isShowSummarySon = ref(true);
const expandedRowKeys = ref([]);
const getStatusTagType = (statusName = '') => {
   const normalized = statusName.trim();
   if (!normalized) return 'info';
   return normalized === '未完成付款' ? 'danger' : 'success';
};
// 子表合计方法
const summarizeMainTable1 = (param) => {
  return proxy.summarizeTable(
@@ -567,7 +582,25 @@
  const day = String(today.getDate()).padStart(2, "0");
  return `${year}-${month}-${day}`;
}
getList();
// 导出
const handleExport = () => {
  ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", {
    confirmButtonText: "确认",
    cancelButtonText: "取消",
    type: "warning",
  })
    .then(() => {
      proxy.download("/purchase/registration/exportOne", { ...searchForm, ...page }, "付款登记.xlsx");
    })
    .catch(() => {
      proxy.$modal.msg("已取消");
    });
};
onMounted(() => {
  getList();
});
</script>
<style scoped lang="scss">