gaoluyang
2 天以前 9d496497c8f4b9fea9609efd20b96b44016c305d
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>
@@ -221,31 +222,31 @@
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="登记人:" prop="registrant">
              <el-input
                v-model="form.registrant"
                placeholder="请输入"
                clearable
                disabled
              />
            </el-form-item>
          </el-col>
               <el-col :span="12">
                  <el-form-item label="付款日期:" prop="paymentDate">
                     <el-date-picker
                        style="width: 100%"
                        v-model="form.paymentDate"
                        value-format="YYYY-MM-DD"
                        format="YYYY-MM-DD"
                        type="date"
                        placeholder="请选择"
                        clearable
                     />
                  </el-form-item>
               </el-col>
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="付款日期:" prop="paymentDate">
              <el-date-picker
                style="width: 100%"
                v-model="form.paymentDate"
                value-format="YYYY-MM-DD"
                format="YYYY-MM-DD"
                type="date"
                placeholder="请选择"
                clearable
              />
            </el-form-item>
          </el-col>
               <el-col :span="12">
                  <el-form-item label="登记人:" prop="registrant">
                     <el-input
                        v-model="form.registrant"
                        placeholder="请输入"
                        clearable
                        disabled
                     />
                  </el-form-item>
               </el-col>
          <el-col :span="12">
            <el-form-item label="登记日期:" prop="registrationtDate">
              <el-input
@@ -269,7 +270,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 +309,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 +407,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 +586,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">