|
@@ -1,28 +1,24 @@
|
|
<template>
|
|
<template>
|
|
<div class="tenant">
|
|
<div class="tenant">
|
|
- <!-- <Banner /> -->
|
|
|
|
- <div class="content">
|
|
|
|
- <byTable
|
|
|
|
- :source="sourceList.data"
|
|
|
|
- :pagination="sourceList.pagination"
|
|
|
|
- :config="config"
|
|
|
|
- :loading="loading"
|
|
|
|
- highlight-current-row
|
|
|
|
- :selectConfig="selectConfig"
|
|
|
|
- :table-events="{
|
|
|
|
- //element talbe事件都能传
|
|
|
|
- select: select,
|
|
|
|
- }"
|
|
|
|
- :action-list="[
|
|
|
|
- {
|
|
|
|
- text: '添加公司',
|
|
|
|
- action: () => openModal('add'),
|
|
|
|
- },
|
|
|
|
- ]"
|
|
|
|
- @get-list="getList">
|
|
|
|
- <template #timeSlot="{ item }"> {{ item.startDate }} - {{ item.stopDate }} </template>
|
|
|
|
- </byTable>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <byTable
|
|
|
|
+ :source="sourceList.data"
|
|
|
|
+ :pagination="sourceList.pagination"
|
|
|
|
+ :config="config"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ :selectConfig="selectConfig"
|
|
|
|
+ :table-events="{
|
|
|
|
+ select: select,
|
|
|
|
+ }"
|
|
|
|
+ :action-list="[
|
|
|
|
+ {
|
|
|
|
+ text: '添加公司',
|
|
|
|
+ action: () => openModal('add'),
|
|
|
|
+ },
|
|
|
|
+ ]"
|
|
|
|
+ @get-list="getList">
|
|
|
|
+ <template #timeSlot="{ item }"> {{ item.startDate }} - {{ item.stopDate }} </template>
|
|
|
|
+ </byTable>
|
|
<el-dialog :title="modalType == 'add' ? '添加公司' : '编辑公司'" v-model="dialogVisible" width="600" v-loading="loading">
|
|
<el-dialog :title="modalType == 'add' ? '添加公司' : '编辑公司'" v-model="dialogVisible" width="600" v-loading="loading">
|
|
<byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
|
|
<byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
|
|
<template #timeGanger>
|
|
<template #timeGanger>
|
|
@@ -36,7 +32,67 @@
|
|
<el-input v-model="formData.data.stopDate" placeholder="请输入" />
|
|
<el-input v-model="formData.data.stopDate" placeholder="请输入" />
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- </div>
|
|
|
|
|
|
+ </div> </template
|
|
|
|
+ ><template #allAddress>
|
|
|
|
+ <el-row style="width: 100%">
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item prop="countryId">
|
|
|
|
+ <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
|
|
|
|
+ <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item prop="provinceName">
|
|
|
|
+ <selectCity
|
|
|
|
+ placeholder="省/洲"
|
|
|
|
+ @change="(val) => getCityData(val, '30', true)"
|
|
|
|
+ addressId="provinceId"
|
|
|
|
+ addressName="provinceName"
|
|
|
|
+ v-model="formData.data"
|
|
|
|
+ :data="provinceData">
|
|
|
|
+ </selectCity>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item prop="cityName">
|
|
|
|
+ <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"></selectCity>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row style="margin-top: 20px; width: 100%">
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item prop="address">
|
|
|
|
+ <el-input v-model="formData.data.address" type="textarea"> </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </template>
|
|
|
|
+ <template #allAddressEnglish>
|
|
|
|
+ <el-row style="width: 100%">
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item prop="countryEnStr">
|
|
|
|
+ <el-input v-model="formData.data.countryEnStr" placeholder="请输入国家 (英文)" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item prop="provinceEnStr">
|
|
|
|
+ <el-input v-model="formData.data.provinceEnStr" placeholder="请输入省/洲 (英文)" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item prop="cityEnStr">
|
|
|
|
+ <el-input v-model="formData.data.cityEnStr" placeholder="请输入城市 (英文)" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row style="margin-top: 20px; width: 100%">
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item prop="addressEn">
|
|
|
|
+ <el-input v-model="formData.data.addressEn" type="textarea"> </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</template>
|
|
</template>
|
|
<template #file>
|
|
<template #file>
|
|
<div style="width: 100%">
|
|
<div style="width: 100%">
|
|
@@ -130,23 +186,25 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|
import byTable from "@/components/byTable/index";
|
|
import byTable from "@/components/byTable/index";
|
|
import byForm from "@/components/byForm/index";
|
|
import byForm from "@/components/byForm/index";
|
|
import useUserStore from "@/store/modules/user";
|
|
import useUserStore from "@/store/modules/user";
|
|
-import { computed, defineComponent, ref } from "vue";
|
|
|
|
|
|
+import { computed, ref } from "vue";
|
|
|
|
+import selectCity from "@/components/selectCity/index.vue";
|
|
|
|
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
const submitLoading = ref(false);
|
|
const submitLoading = ref(false);
|
|
const sourceList = ref({
|
|
const sourceList = ref({
|
|
data: [],
|
|
data: [],
|
|
pagination: {
|
|
pagination: {
|
|
- total: 3,
|
|
|
|
|
|
+ total: 0,
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
let dialogVisible = ref(false);
|
|
let dialogVisible = ref(false);
|
|
-let roomDialogVisible = ref(false);
|
|
|
|
let modalType = ref("add");
|
|
let modalType = ref("add");
|
|
let rules = ref({
|
|
let rules = ref({
|
|
name: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
|
|
name: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
|
|
|
|
+ countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
|
|
|
|
+ countryEnStr: [{ required: true, message: "请输入国家 (英文)", trigger: "blur" }],
|
|
});
|
|
});
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
const selectConfig = [];
|
|
const selectConfig = [];
|
|
@@ -219,7 +277,6 @@ const config = computed(() => {
|
|
width: "200",
|
|
width: "200",
|
|
align: "right",
|
|
align: "right",
|
|
},
|
|
},
|
|
- // 渲染 el-button,一般用在最后一列。
|
|
|
|
renderHTML(row) {
|
|
renderHTML(row) {
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
@@ -241,13 +298,11 @@ const config = computed(() => {
|
|
},
|
|
},
|
|
el: "button",
|
|
el: "button",
|
|
click() {
|
|
click() {
|
|
- // 弹窗提示是否删除
|
|
|
|
ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- // 删除
|
|
|
|
proxy
|
|
proxy
|
|
.post("/corporation/delete", {
|
|
.post("/corporation/delete", {
|
|
id: row.id,
|
|
id: row.id,
|
|
@@ -322,6 +377,23 @@ const formConfig = reactive([
|
|
label: "营业期限",
|
|
label: "营业期限",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ type: "slot",
|
|
|
|
+ slotName: "allAddress",
|
|
|
|
+ label: "公司地址",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: "slot",
|
|
|
|
+ slotName: "allAddressEnglish",
|
|
|
|
+ label: "公司地址 (英文)",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: "input",
|
|
|
|
+ prop: "corporationNumber",
|
|
|
|
+ label: "公司电话",
|
|
|
|
+ itemType: "text",
|
|
|
|
+ placeholder: "请输入公司电话",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
type: "select",
|
|
type: "select",
|
|
prop: "taxpayerQualification",
|
|
prop: "taxpayerQualification",
|
|
label: "纳税人资质",
|
|
label: "纳税人资质",
|
|
@@ -346,6 +418,37 @@ const formConfig = reactive([
|
|
label: "签章",
|
|
label: "签章",
|
|
},
|
|
},
|
|
]);
|
|
]);
|
|
|
|
+const getDict = () => {
|
|
|
|
+ const tenantId = useUserStore().user.tenantId;
|
|
|
|
+ proxy
|
|
|
|
+ .post("/dictTenantData/page", {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 999,
|
|
|
|
+ tenantId: tenantId,
|
|
|
|
+ dictCode: "enterprise_type",
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ formConfig[2].data = res.rows.map((x) => ({
|
|
|
|
+ label: x.dictValue,
|
|
|
|
+ value: x.dictKey,
|
|
|
|
+ }));
|
|
|
|
+ enterpriseType.value = res.rows;
|
|
|
|
+ });
|
|
|
|
+ proxy
|
|
|
|
+ .post("/dictTenantData/page", {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 999,
|
|
|
|
+ tenantId: tenantId,
|
|
|
|
+ dictCode: "taxpayer_qualification",
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ formConfig[7].data = res.rows.map((x) => ({
|
|
|
|
+ label: x.dictValue,
|
|
|
|
+ value: x.dictKey,
|
|
|
|
+ }));
|
|
|
|
+ contactInformationType.value = res.rows;
|
|
|
|
+ });
|
|
|
|
+};
|
|
const getList = async (req) => {
|
|
const getList = async (req) => {
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
loading.value = true;
|
|
loading.value = true;
|
|
@@ -357,15 +460,44 @@ const getList = async (req) => {
|
|
}, 200);
|
|
}, 200);
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+const countryData = ref([]);
|
|
|
|
+const provinceData = ref([]);
|
|
|
|
+const cityData = ref([]);
|
|
|
|
+const getCityData = (id, type, isChange) => {
|
|
|
|
+ proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
|
|
|
|
+ if (type === "20") {
|
|
|
|
+ provinceData.value = res;
|
|
|
|
+ if (isChange) {
|
|
|
|
+ formData.data.provinceId = "";
|
|
|
|
+ formData.data.provinceName = "";
|
|
|
|
+ formData.data.cityId = "";
|
|
|
|
+ formData.data.cityName = "";
|
|
|
|
+ }
|
|
|
|
+ } else if (type === "30") {
|
|
|
|
+ cityData.value = res;
|
|
|
|
+ if (isChange) {
|
|
|
|
+ formData.data.cityId = "";
|
|
|
|
+ formData.data.cityName = "";
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ countryData.value = res;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+getCityData("0");
|
|
|
|
+getDict();
|
|
|
|
+getList();
|
|
const openModal = () => {
|
|
const openModal = () => {
|
|
dialogVisible.value = true;
|
|
dialogVisible.value = true;
|
|
modalType.value = "add";
|
|
modalType.value = "add";
|
|
formData.data = {
|
|
formData.data = {
|
|
|
|
+ countryId: "44",
|
|
enterpriseLogoList: [],
|
|
enterpriseLogoList: [],
|
|
larSignList: [],
|
|
larSignList: [],
|
|
officialSealList: [],
|
|
officialSealList: [],
|
|
contractSealList: [],
|
|
contractSealList: [],
|
|
};
|
|
};
|
|
|
|
+ getCityData(formData.data.countryId, "20");
|
|
};
|
|
};
|
|
const selection = ref({
|
|
const selection = ref({
|
|
data: [],
|
|
data: [],
|
|
@@ -386,17 +518,18 @@ const submitForm = () => {
|
|
submitLoading.value = false;
|
|
submitLoading.value = false;
|
|
getList();
|
|
getList();
|
|
},
|
|
},
|
|
- (err) => (submitLoading.value = false)
|
|
|
|
|
|
+ () => (submitLoading.value = false)
|
|
);
|
|
);
|
|
});
|
|
});
|
|
};
|
|
};
|
|
const getDtl = (row) => {
|
|
const getDtl = (row) => {
|
|
- dialogVisible.value = true;
|
|
|
|
modalType.value = "edit";
|
|
modalType.value = "edit";
|
|
proxy.post("/corporation/detail", { id: row.id }).then((res) => {
|
|
proxy.post("/corporation/detail", { id: row.id }).then((res) => {
|
|
res.type = res.type + "";
|
|
res.type = res.type + "";
|
|
res.taxpayerQualification = res.taxpayerQualification + "";
|
|
res.taxpayerQualification = res.taxpayerQualification + "";
|
|
formData.data = res;
|
|
formData.data = res;
|
|
|
|
+ getCityData(formData.data.countryId, "20");
|
|
|
|
+ getCityData(formData.data.provinceId, "30");
|
|
proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 1 }).then((resFile) => {
|
|
proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 1 }).then((resFile) => {
|
|
formData.data.enterpriseLogoList = resFile[res.id];
|
|
formData.data.enterpriseLogoList = resFile[res.id];
|
|
});
|
|
});
|
|
@@ -409,43 +542,11 @@ const getDtl = (row) => {
|
|
proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 4 }).then((resFile) => {
|
|
proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 4 }).then((resFile) => {
|
|
formData.data.contractSealList = resFile[res.id];
|
|
formData.data.contractSealList = resFile[res.id];
|
|
});
|
|
});
|
|
|
|
+ dialogVisible.value = true;
|
|
});
|
|
});
|
|
};
|
|
};
|
|
const enterpriseType = ref([]);
|
|
const enterpriseType = ref([]);
|
|
const contactInformationType = ref([]);
|
|
const contactInformationType = ref([]);
|
|
-const getDict = () => {
|
|
|
|
- const tenantId = useUserStore().user.tenantId;
|
|
|
|
- proxy
|
|
|
|
- .post("/dictTenantData/page", {
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 999,
|
|
|
|
- tenantId: tenantId,
|
|
|
|
- dictCode: "enterprise_type",
|
|
|
|
- })
|
|
|
|
- .then((res) => {
|
|
|
|
- formConfig[2].data = res.rows.map((x) => ({
|
|
|
|
- label: x.dictValue,
|
|
|
|
- value: x.dictKey,
|
|
|
|
- }));
|
|
|
|
- enterpriseType.value = res.rows;
|
|
|
|
- });
|
|
|
|
- proxy
|
|
|
|
- .post("/dictTenantData/page", {
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 999,
|
|
|
|
- tenantId: tenantId,
|
|
|
|
- dictCode: "taxpayer_qualification",
|
|
|
|
- })
|
|
|
|
- .then((res) => {
|
|
|
|
- formConfig[7].data = res.rows.map((x) => ({
|
|
|
|
- label: x.dictValue,
|
|
|
|
- value: x.dictKey,
|
|
|
|
- }));
|
|
|
|
- contactInformationType.value = res.rows;
|
|
|
|
- });
|
|
|
|
-};
|
|
|
|
-getList();
|
|
|
|
-getDict();
|
|
|
|
const uploadDataOne = ref({});
|
|
const uploadDataOne = ref({});
|
|
const uploadFileOne = async (file) => {
|
|
const uploadFileOne = async (file) => {
|
|
const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
|
|
const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
|