|
|
@@ -18,8 +18,8 @@
|
|
|
<!-- 表格 -->
|
|
|
<el-table :data="tableData" border style="width: 100%" :resizable="false">
|
|
|
<el-table-column prop="bankName" label="开户银行" width="140" show-overflow-tooltip :resizable="false" />
|
|
|
- <el-table-column prop="bankAccount" label="开户账户" width="140" :resizable="false" />
|
|
|
- <el-table-column prop="taxId" label="纳税人识别号" width="160" :resizable="false" />
|
|
|
+ <el-table-column prop="bankAccount" label="开户账户" width="180" :resizable="false" />
|
|
|
+ <el-table-column prop="taxId" label="纳税人识别号" width="180" :resizable="false" />
|
|
|
<el-table-column prop="address" label="地址" min-width="140" show-overflow-tooltip :resizable="false" />
|
|
|
<el-table-column prop="phone" label="电话" width="120" :resizable="false" />
|
|
|
<el-table-column label="操作" width="120" fixed="right" :resizable="false">
|
|
|
@@ -70,7 +70,7 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { ref, reactive, onMounted } from 'vue';
|
|
|
-import { Phone, Search } from '@element-plus/icons-vue';
|
|
|
+import { Search } from '@element-plus/icons-vue';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import { getEnterpriseInfo } from '@/api/pc/enterprise';
|
|
|
import { getInvoiceList, addInvoice, updateInvoice, deleteInvoice } from '@/api/pc/enterprise';
|
|
|
@@ -82,6 +82,7 @@ const formRef = ref();
|
|
|
const editingId = ref<number | null>(null);
|
|
|
const total = ref(0);
|
|
|
const invoiceTopic = ref('');
|
|
|
+const taxNo = ref('');
|
|
|
|
|
|
const queryParams = reactive({ pageNum: 1, pageSize: 10, keyword: '', searchType: 'accountName' });
|
|
|
const form = reactive({ invoiceTitle: '', taxNo: '', bankName: '', bankAccount: '', address: '', phone: '', bankId: null, bankCode: '' });
|
|
|
@@ -90,7 +91,10 @@ const rules = {
|
|
|
taxNo: [{ required: true, message: '请输入纳税人识别号', trigger: 'blur' }],
|
|
|
bankName: [{ required: true, message: '请输入开户银行', trigger: 'blur' }],
|
|
|
bankAccount: [{ required: true, message: '请输入开户账户', trigger: 'blur' }],
|
|
|
- phone: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }]
|
|
|
+ phone: [
|
|
|
+ { required: true, message: '请输入手机号', trigger: 'blur' },
|
|
|
+ { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }
|
|
|
+ ]
|
|
|
};
|
|
|
|
|
|
const tableData = ref([]);
|
|
|
@@ -128,6 +132,7 @@ const loadEnterpriseInfo = async () => {
|
|
|
if (res.code === 200 && res.data) {
|
|
|
const data = res.data;
|
|
|
invoiceTopic.value = data.invoiceTop;
|
|
|
+ taxNo.value = data.socialCreditCode;
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('加载企业信息失败:', error);
|
|
|
@@ -157,12 +162,13 @@ const handleAdd = () => {
|
|
|
resetForm();
|
|
|
dialogTitle.value = '新增开票信息';
|
|
|
form.invoiceTitle = invoiceTopic.value || '';
|
|
|
+ form.taxNo = taxNo.value || '';
|
|
|
dialogVisible.value = true;
|
|
|
};
|
|
|
const handleEdit = (row: any) => {
|
|
|
editingId.value = row.id;
|
|
|
form.invoiceTitle = invoiceTopic.value || '';
|
|
|
- form.taxNo = row.taxId;
|
|
|
+ form.taxNo = row.taxNo;
|
|
|
form.bankName = row.bankName;
|
|
|
form.bankAccount = row.bankAccount;
|
|
|
form.address = row.address;
|