| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="filters" :inline="true"> |
| | | <el-form :model="filters" |
| | | :inline="true"> |
| | | <el-form-item label="付款单号:"> |
| | | <el-input v-model="filters.paymentCode" placeholder="请输入付款单号" clearable style="width: 200px;" /> |
| | | <el-input v-model="filters.paymentNumber" |
| | | placeholder="请输入付款单号" |
| | | clearable |
| | | style="width: 200px;" /> |
| | | </el-form-item> |
| | | <el-form-item label="供应商:"> |
| | | <el-select v-model="filters.supplierId" placeholder="请选择供应商" clearable style="width: 200px;"> |
| | | <el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id" /> |
| | | <el-select v-model="filters.supplierId" |
| | | placeholder="请选择供应商" |
| | | clearable |
| | | filterable |
| | | style="width: 200px;"> |
| | | <el-option v-for="item in supplierList" |
| | | :key="item.id" |
| | | :label="item.supplierName" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="付款方式:"> |
| | | <el-select v-model="filters.paymentMethod" placeholder="请选择付款方式" clearable style="width: 150px;"> |
| | | <el-option label="银行转账" value="bank_transfer" /> |
| | | <el-option label="现金" value="cash" /> |
| | | <el-option label="支票" value="check" /> |
| | | <el-option label="汇票" value="draft" /> |
| | | <el-select v-model="filters.paymentMethod" |
| | | placeholder="请选择付款方式" |
| | | clearable |
| | | style="width: 150px;"> |
| | | <el-option v-for="item in checkout_payment" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="状态:"> |
| | | <el-select v-model="filters.status" placeholder="请选择状态" clearable style="width: 150px;"> |
| | | <el-option label="待付款" value="pending" /> |
| | | <el-option label="已完成" value="completed" /> |
| | | <el-option label="已取消" value="cancelled" /> |
| | | </el-select> |
| | | <el-form-item label="付款日期:"> |
| | | <el-date-picker v-model="filters.dateRange" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | clearable |
| | | style="width: 240px;" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="getTableData">搜索</el-button> |
| | | <el-button type="primary" |
| | | @click="onSearch">搜索</el-button> |
| | | <el-button @click="resetFilters">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="table_list"> |
| | | <div class="actions"> |
| | | <div> |
| | | <el-statistic title="本期付款合计" :value="totalPaymentAmount" precision="2" prefix="¥" /> |
| | | <el-statistic title="本页付款合计" |
| | | :value="totalPaymentAmount" |
| | | :precision="2" |
| | | prefix="¥" /> |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="add" icon="Plus">新增付款</el-button> |
| | | <el-button @click="handleOut" icon="Download">导出</el-button> |
| | | <el-button @click="handleExport" |
| | | icon="Download">导出</el-button> |
| | | </div> |
| | | </div> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="columns" |
| | | :tableData="dataList" |
| | | :page="{ |
| | | <PIMTable rowKey="id" |
| | | :column="columns" |
| | | :tableData="dataList" |
| | | :tableLoading="tableLoading" |
| | | :page="{ |
| | | current: pagination.currentPage, |
| | | size: pagination.pageSize, |
| | | total: pagination.total, |
| | | }" |
| | | @pagination="changePage" |
| | | > |
| | | @pagination="changePage"> |
| | | <template #amount="{ row }"> |
| | | <span class="text-danger">¥{{ formatMoney(row.amount) }}</span> |
| | | </template> |
| | | <template #paymentMethod="{ row }"> |
| | | <el-tag>{{ getPaymentMethodLabel(row.paymentMethod) }}</el-tag> |
| | | </template> |
| | | <template #status="{ row }"> |
| | | <el-tag :type="row.status === 'completed' ? 'success' : row.status === 'pending' ? 'warning' : 'info'"> |
| | | {{ row.status === 'completed' ? '已完成' : row.status === 'pending' ? '待付款' : '已取消' }} |
| | | </el-tag> |
| | | </template> |
| | | <template #operation="{ row }"> |
| | | <el-button type="primary" link @click="view(row)">查看</el-button> |
| | | <el-button type="primary" link @click="edit(row)" v-if="row.status === 'pending'">编辑</el-button> |
| | | <el-button type="success" link @click="handleComplete(row)" v-if="row.status === 'pending'">完成</el-button> |
| | | <el-button type="danger" link @click="handleCancel(row)" v-if="row.status === 'pending'">取消</el-button> |
| | | <el-button :disabled="row.accountStatemen" |
| | | type="danger" |
| | | link |
| | | @click="handleDelete(row)">删除</el-button> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | |
| | | <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false"> |
| | | <el-form :model="form" :rules="rules" ref="formRef" label-width="120px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款单号" prop="paymentCode"> |
| | | <el-input v-model="form.paymentCode" placeholder="系统自动生成" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="关联申请单" prop="applyCode"> |
| | | <el-select v-model="form.applyCode" placeholder="请选择关联申请单" style="width: 100%;" :disabled="isEdit"> |
| | | <el-option v-for="item in applyList" :key="item.applyCode" :label="item.applyCode" :value="item.applyCode" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="供应商" prop="supplierId"> |
| | | <el-select v-model="form.supplierId" placeholder="请选择供应商" style="width: 100%;" :disabled="isEdit"> |
| | | <el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款日期" prop="paymentDate"> |
| | | <el-date-picker v-model="form.paymentDate" type="date" placeholder="选择日期" value-format="YYYY-MM-DD" style="width: 100%;" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款金额" prop="amount"> |
| | | <el-input-number v-model="form.amount" :min="0" :precision="2" style="width: 100%;" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款方式" prop="paymentMethod"> |
| | | <el-select v-model="form.paymentMethod" placeholder="请选择付款方式" style="width: 100%;"> |
| | | <el-option label="银行转账" value="bank_transfer" /> |
| | | <el-option label="现金" value="cash" /> |
| | | <el-option label="支票" value="check" /> |
| | | <el-option label="汇票" value="draft" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="银行账号" prop="bankAccount" v-if="form.paymentMethod === 'bank_transfer'"> |
| | | <el-input v-model="form.bankAccount" placeholder="请输入银行账号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="开户行" prop="bankName" v-if="form.paymentMethod === 'bank_transfer'"> |
| | | <el-input v-model="form.bankName" placeholder="请输入开户行" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" type="textarea" :rows="3" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button type="primary" @click="submitForm">确定</el-button> |
| | | <el-button @click="dialogVisible = false">取消</el-button> |
| | | </template> |
| | | </FormDialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, reactive, onMounted, computed } from "vue"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import FormDialog from "@/components/Dialog/FormDialog.vue"; |
| | | import { ref, reactive, computed, onMounted, getCurrentInstance } from "vue"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import { getOptions } from "@/api/procurementManagement/procurementLedger.js"; |
| | | import { |
| | | listPageAccountPurchasePayment, |
| | | deleteAccountPurchasePayment, |
| | | } from "@/api/financialManagement/accountPurchasePayment.js"; |
| | | |
| | | defineOptions({ |
| | | name: "付款单", |
| | | }); |
| | | defineOptions({ |
| | | name: "付款单", |
| | | }); |
| | | |
| | | const filters = reactive({ |
| | | paymentCode: "", |
| | | supplierId: "", |
| | | paymentMethod: "", |
| | | status: "", |
| | | }); |
| | | const { proxy } = getCurrentInstance(); |
| | | const { checkout_payment } = proxy.useDict("checkout_payment"); |
| | | |
| | | const pagination = reactive({ |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }); |
| | | |
| | | const columns = [ |
| | | { label: "付款单号", prop: "paymentCode", width: "150" }, |
| | | { label: "关联申请单", prop: "applyCode", width: "150" }, |
| | | { label: "供应商", prop: "supplierName", width: "180" }, |
| | | { label: "付款日期", prop: "paymentDate", width: "120" }, |
| | | { label: "付款金额", prop: "amount", slot: "amount" }, |
| | | { label: "付款方式", prop: "paymentMethod", slot: "paymentMethod" }, |
| | | { label: "状态", prop: "status", slot: "status" }, |
| | | { label: "备注", prop: "remark", showOverflowTooltip: true }, |
| | | { label: "操作", prop: "operation", slot: "operation", width: "220", fixed: "right" }, |
| | | ]; |
| | | |
| | | const dataList = ref([]); |
| | | const dialogVisible = ref(false); |
| | | const dialogTitle = ref(""); |
| | | const formRef = ref(null); |
| | | const isEdit = ref(false); |
| | | const currentId = ref(null); |
| | | |
| | | const supplierList = [ |
| | | { id: 1, name: "北京原材料供应商" }, |
| | | { id: 2, name: "上海电子元器件公司" }, |
| | | { id: 3, name: "广州包装材料厂" }, |
| | | { id: 4, name: "深圳五金配件公司" }, |
| | | ]; |
| | | |
| | | const applyList = [ |
| | | { applyCode: "FK2024001", supplierId: 1, amount: 5000 }, |
| | | { applyCode: "FK2024002", supplierId: 2, amount: 8000 }, |
| | | { applyCode: "FK2024003", supplierId: 3, amount: 3000 }, |
| | | ]; |
| | | |
| | | const form = reactive({ |
| | | paymentCode: "", |
| | | applyCode: "", |
| | | supplierId: "", |
| | | paymentDate: "", |
| | | amount: 0, |
| | | paymentMethod: "bank_transfer", |
| | | bankAccount: "", |
| | | bankName: "", |
| | | remark: "", |
| | | }); |
| | | |
| | | const rules = { |
| | | applyCode: [{ required: true, message: "请选择关联申请单", trigger: "change" }], |
| | | supplierId: [{ required: true, message: "请选择供应商", trigger: "change" }], |
| | | paymentDate: [{ required: true, message: "请选择付款日期", trigger: "change" }], |
| | | amount: [{ required: true, message: "请输入付款金额", trigger: "blur" }], |
| | | paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }], |
| | | }; |
| | | |
| | | const mockData = [ |
| | | { id: 1, paymentCode: "FKD2024001", applyCode: "FK2024001", supplierId: 1, supplierName: "北京原材料供应商", paymentDate: "2024-01-15", amount: 5000, paymentMethod: "bank_transfer", status: "completed", bankAccount: "6222021234567890123", bankName: "工商银行", remark: "" }, |
| | | { id: 2, paymentCode: "FKD2024002", applyCode: "FK2024002", supplierId: 2, supplierName: "上海电子元器件公司", paymentDate: "2024-01-18", amount: 8000, paymentMethod: "bank_transfer", status: "pending", bankAccount: "6222029876543210987", bankName: "建设银行", remark: "" }, |
| | | { id: 3, paymentCode: "FKD2024003", applyCode: "FK2024003", supplierId: 3, supplierName: "广州包装材料厂", paymentDate: "2024-01-20", amount: 3000, paymentMethod: "cash", status: "completed", remark: "" }, |
| | | ]; |
| | | |
| | | const totalPaymentAmount = computed(() => { |
| | | return dataList.value.reduce((sum, item) => sum + Number(item.amount), 0); |
| | | }); |
| | | |
| | | const formatMoney = (value) => { |
| | | if (value === undefined || value === null) return "0.00"; |
| | | return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ","); |
| | | }; |
| | | |
| | | const getPaymentMethodLabel = (method) => { |
| | | const map = { |
| | | bank_transfer: "银行转账", |
| | | cash: "现金", |
| | | check: "支票", |
| | | draft: "汇票", |
| | | }; |
| | | return map[method] || method; |
| | | }; |
| | | |
| | | const getTableData = () => { |
| | | let result = [...mockData]; |
| | | if (filters.paymentCode) { |
| | | result = result.filter(item => item.paymentCode.includes(filters.paymentCode)); |
| | | } |
| | | if (filters.supplierId) { |
| | | result = result.filter(item => item.supplierId === filters.supplierId); |
| | | } |
| | | if (filters.paymentMethod) { |
| | | result = result.filter(item => item.paymentMethod === filters.paymentMethod); |
| | | } |
| | | if (filters.status) { |
| | | result = result.filter(item => item.status === filters.status); |
| | | } |
| | | pagination.total = result.length; |
| | | dataList.value = result.slice((pagination.currentPage - 1) * pagination.pageSize, pagination.currentPage * pagination.pageSize); |
| | | }; |
| | | |
| | | const resetFilters = () => { |
| | | filters.paymentCode = ""; |
| | | filters.supplierId = ""; |
| | | filters.paymentMethod = ""; |
| | | filters.status = ""; |
| | | pagination.currentPage = 1; |
| | | getTableData(); |
| | | }; |
| | | |
| | | const changePage = ({ current, size }) => { |
| | | pagination.currentPage = current; |
| | | pagination.pageSize = size; |
| | | getTableData(); |
| | | }; |
| | | |
| | | const add = () => { |
| | | isEdit.value = false; |
| | | dialogTitle.value = "新增付款"; |
| | | Object.assign(form, { |
| | | paymentCode: "FKD" + Date.now().toString().slice(-8), |
| | | applyCode: "", |
| | | const filters = reactive({ |
| | | paymentNumber: "", |
| | | supplierId: "", |
| | | paymentDate: new Date().toISOString().split('T')[0], |
| | | amount: 0, |
| | | paymentMethod: "bank_transfer", |
| | | bankAccount: "", |
| | | bankName: "", |
| | | remark: "", |
| | | paymentMethod: "", |
| | | dateRange: [], |
| | | }); |
| | | dialogVisible.value = true; |
| | | }; |
| | | |
| | | const edit = (row) => { |
| | | isEdit.value = true; |
| | | currentId.value = row.id; |
| | | dialogTitle.value = "编辑付款"; |
| | | Object.assign(form, row); |
| | | dialogVisible.value = true; |
| | | }; |
| | | |
| | | const view = (row) => { |
| | | ElMessage.info(`查看付款单: ${row.paymentCode}`); |
| | | }; |
| | | |
| | | const handleComplete = (row) => { |
| | | ElMessageBox.confirm("确认该付款单已完成吗?", "提示", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "info", |
| | | }).then(() => { |
| | | const index = mockData.findIndex(item => item.id === row.id); |
| | | if (index !== -1) { |
| | | mockData[index].status = "completed"; |
| | | } |
| | | ElMessage.success("付款完成"); |
| | | getTableData(); |
| | | const pagination = reactive({ |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }); |
| | | }; |
| | | |
| | | const handleCancel = (row) => { |
| | | ElMessageBox.confirm("确认取消该付款单吗?", "提示", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | const index = mockData.findIndex(item => item.id === row.id); |
| | | if (index !== -1) { |
| | | mockData[index].status = "cancelled"; |
| | | } |
| | | ElMessage.success("已取消"); |
| | | getTableData(); |
| | | const columns = [ |
| | | { label: "付款单号", prop: "paymentNumber", width: "150" }, |
| | | { label: "关联申请单", prop: "invoiceApplicationNo", width: "150" }, |
| | | { label: "供应商", prop: "supplierName", width: "180" }, |
| | | { label: "付款日期", prop: "paymentDate", width: "120" }, |
| | | { label: "付款金额", prop: "amount", dataType: "slot", slot: "amount" }, |
| | | { |
| | | label: "付款方式", |
| | | prop: "paymentMethod", |
| | | dataType: "slot", |
| | | slot: "paymentMethod", |
| | | width: "120", |
| | | }, |
| | | { label: "备注", prop: "remark", showOverflowTooltip: true }, |
| | | { |
| | | label: "操作", |
| | | prop: "operation", |
| | | dataType: "slot", |
| | | slot: "operation", |
| | | width: "80", |
| | | fixed: "right", |
| | | }, |
| | | ]; |
| | | |
| | | const dataList = ref([]); |
| | | const tableLoading = ref(false); |
| | | const supplierList = ref([]); |
| | | |
| | | const totalPaymentAmount = computed(() => |
| | | dataList.value.reduce((sum, item) => sum + Number(item.amount ?? 0), 0) |
| | | ); |
| | | |
| | | const formatMoney = value => { |
| | | if (value === undefined || value === null) return "0.00"; |
| | | return Number(value) |
| | | .toFixed(2) |
| | | .replace(/\B(?=(\d{3})+(?!\d))/g, ","); |
| | | }; |
| | | |
| | | const getPaymentMethodLabel = value => { |
| | | if (value === undefined || value === null || value === "") return "-"; |
| | | const item = checkout_payment.value?.find( |
| | | m => String(m.value) === String(value) |
| | | ); |
| | | return item?.label ?? value; |
| | | }; |
| | | |
| | | const normalizeTableRow = row => ({ |
| | | ...row, |
| | | paymentNumber: row.paymentNumber ?? row.paymentCode, |
| | | invoiceApplicationNo: row.invoiceApplicationNo ?? row.applyCode ?? "", |
| | | amount: row.paymentAmount ?? row.amount, |
| | | bankAccountNum: row.bankAccountNum ?? row.bankAccount ?? "", |
| | | bankAccountName: row.bankAccountName ?? row.bankName ?? "", |
| | | }); |
| | | }; |
| | | |
| | | const handleOut = () => { |
| | | ElMessage.success("导出成功"); |
| | | }; |
| | | |
| | | const submitForm = () => { |
| | | formRef.value.validate((valid) => { |
| | | if (valid) { |
| | | const supplier = supplierList.find(item => item.id === form.supplierId); |
| | | if (isEdit.value) { |
| | | const index = mockData.findIndex(item => item.id === currentId.value); |
| | | if (index !== -1) { |
| | | mockData[index] = { ...mockData[index], ...form, supplierName: supplier?.name }; |
| | | } |
| | | ElMessage.success("编辑成功"); |
| | | } else { |
| | | const newId = mockData.length > 0 ? Math.max(...mockData.map(item => item.id)) + 1 : 1; |
| | | mockData.push({ id: newId, ...form, supplierName: supplier?.name, status: "pending" }); |
| | | ElMessage.success("新增成功"); |
| | | const getSupplierList = () => { |
| | | getOptions().then(res => { |
| | | if (res.code === 200) { |
| | | supplierList.value = res.data ?? []; |
| | | } |
| | | dialogVisible.value = false; |
| | | getTableData(); |
| | | } |
| | | }); |
| | | }; |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getTableData(); |
| | | }); |
| | | const appendFilterParams = params => { |
| | | if (filters.paymentNumber) { |
| | | params.paymentNumber = filters.paymentNumber; |
| | | } |
| | | if (filters.supplierId) { |
| | | params.supplierId = filters.supplierId; |
| | | } |
| | | if (filters.paymentMethod) { |
| | | params.paymentMethod = filters.paymentMethod; |
| | | } |
| | | if (filters.dateRange?.length === 2) { |
| | | params.startDate = filters.dateRange[0]; |
| | | params.endDate = filters.dateRange[1]; |
| | | } |
| | | return params; |
| | | }; |
| | | |
| | | const buildListParams = () => |
| | | appendFilterParams({ |
| | | current: pagination.currentPage, |
| | | size: pagination.pageSize, |
| | | }); |
| | | |
| | | const buildExportParams = () => appendFilterParams({}); |
| | | |
| | | const handleExport = () => { |
| | | proxy.download( |
| | | "/accountPurchasePayment/exportAccountPurchasePayment", |
| | | buildExportParams(), |
| | | `付款单_${Date.now()}.xlsx` |
| | | ); |
| | | }; |
| | | |
| | | const getTableData = () => { |
| | | tableLoading.value = true; |
| | | listPageAccountPurchasePayment(buildListParams()) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | dataList.value = (res.data?.records ?? []).map(normalizeTableRow); |
| | | pagination.total = res.data?.total ?? 0; |
| | | } else { |
| | | dataList.value = []; |
| | | pagination.total = 0; |
| | | ElMessage.error(res.msg || "查询失败"); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | dataList.value = []; |
| | | pagination.total = 0; |
| | | ElMessage.error("查询失败"); |
| | | }) |
| | | .finally(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | const onSearch = () => { |
| | | pagination.currentPage = 1; |
| | | getTableData(); |
| | | }; |
| | | |
| | | const resetFilters = () => { |
| | | filters.paymentNumber = ""; |
| | | filters.supplierId = ""; |
| | | filters.paymentMethod = ""; |
| | | filters.dateRange = []; |
| | | pagination.currentPage = 1; |
| | | getTableData(); |
| | | }; |
| | | |
| | | const changePage = ({ page, limit }) => { |
| | | pagination.currentPage = page; |
| | | pagination.pageSize = limit; |
| | | getTableData(); |
| | | }; |
| | | |
| | | const handleDelete = row => { |
| | | ElMessageBox.confirm(`确认删除付款单「${row.paymentNumber}」吗?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | deleteAccountPurchasePayment([row.id]) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | ElMessage.success("删除成功"); |
| | | getTableData(); |
| | | } else { |
| | | ElMessage.error(res.msg || "删除失败"); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.error("删除失败"); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getSupplierList(); |
| | | getTableData(); |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .actions { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 15px; |
| | | } |
| | | .actions { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 15px; |
| | | } |
| | | |
| | | .text-danger { |
| | | color: #f56c6c; |
| | | font-weight: bold; |
| | | } |
| | | .text-danger { |
| | | color: #f56c6c; |
| | | font-weight: bold; |
| | | } |
| | | </style> |