|
@@ -16,26 +16,49 @@
|
|
|
action: () => openModal('add'),
|
|
|
},
|
|
|
]"
|
|
|
- @get-list="getList">
|
|
|
- <template #timeSlot="{ item }"> {{ item.startDate }} - {{ item.stopDate }} </template>
|
|
|
+ @get-list="getList"
|
|
|
+ >
|
|
|
+ <template #timeSlot="{ item }">
|
|
|
+ {{ item.startDate }} - {{ item.stopDate }}
|
|
|
+ </template>
|
|
|
</byTable>
|
|
|
- <el-dialog :title="modalType == 'add' ? '添加公司' : '编辑公司'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loading">
|
|
|
- <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
|
|
|
+ <el-dialog
|
|
|
+ :title="modalType == 'add' ? '添加公司' : '编辑公司'"
|
|
|
+ v-if="dialogVisible"
|
|
|
+ v-model="dialogVisible"
|
|
|
+ width="600"
|
|
|
+ v-loading="loading"
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="formData.data"
|
|
|
+ :rules="rules"
|
|
|
+ ref="byform"
|
|
|
+ >
|
|
|
<template #timeGanger>
|
|
|
<div style="width: 100%">
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="11">
|
|
|
- <el-input v-model="formData.data.startDate" placeholder="请输入" />
|
|
|
+ <el-input
|
|
|
+ v-model="formData.data.startDate"
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
<el-col :span="2" style="text-align: center"> To </el-col>
|
|
|
<el-col :span="11">
|
|
|
- <el-input v-model="formData.data.stopDate" placeholder="请输入" />
|
|
|
+ <el-input
|
|
|
+ v-model="formData.data.stopDate"
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #allAddress>
|
|
|
- <el-row style="width: 100%;display: flex;justify-content: space-between;">
|
|
|
+ <el-row
|
|
|
+ style="width: 100%; display: flex; justify-content: space-between"
|
|
|
+ >
|
|
|
<el-col :span="7">
|
|
|
<el-form-item prop="countryId">
|
|
|
<el-select
|
|
@@ -82,7 +105,6 @@
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
-
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="7">
|
|
@@ -112,33 +134,46 @@
|
|
|
<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-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%;display: flex;justify-content: space-between;">
|
|
|
+ <el-row
|
|
|
+ style="width: 100%; display: flex; justify-content: space-between"
|
|
|
+ >
|
|
|
<el-col :span="7">
|
|
|
<el-form-item prop="countryEnStr">
|
|
|
- <el-input v-model="formData.data.countryEnStr" placeholder="请输入国家 (英文)" />
|
|
|
+ <el-input
|
|
|
+ v-model="formData.data.countryEnStr"
|
|
|
+ placeholder="请输入国家 (英文)"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="7">
|
|
|
<el-form-item prop="provinceEnStr">
|
|
|
- <el-input v-model="formData.data.provinceEnStr" placeholder="请输入省/洲 (英文)" />
|
|
|
+ <el-input
|
|
|
+ v-model="formData.data.provinceEnStr"
|
|
|
+ placeholder="请输入省/洲 (英文)"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="7">
|
|
|
<el-form-item prop="cityEnStr">
|
|
|
- <el-input v-model="formData.data.cityEnStr" placeholder="请输入城市 (英文)" />
|
|
|
+ <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-input v-model="formData.data.addressEn" type="textarea">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -154,19 +189,30 @@
|
|
|
:data="uploadDataOne"
|
|
|
:show-file-list="false"
|
|
|
:on-success="enterpriseLogoListSuccess"
|
|
|
- :before-upload="uploadFileOne">
|
|
|
+ :before-upload="uploadFileOne"
|
|
|
+ >
|
|
|
<el-image
|
|
|
- v-if="formData.data.enterpriseLogoList && formData.data.enterpriseLogoList.length > 0"
|
|
|
+ v-if="
|
|
|
+ formData.data.enterpriseLogoList &&
|
|
|
+ formData.data.enterpriseLogoList.length > 0
|
|
|
+ "
|
|
|
:src="formData.data.enterpriseLogoList[0].fileUrl"
|
|
|
fit="scale-down"
|
|
|
- class="avatar" />
|
|
|
- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
|
|
+ class="avatar"
|
|
|
+ />
|
|
|
+ <el-icon v-else class="avatar-uploader-icon"
|
|
|
+ ><Plus
|
|
|
+ /></el-icon>
|
|
|
</el-upload>
|
|
|
- <el-button
|
|
|
- class="delete-btn"
|
|
|
- type="danger"
|
|
|
- v-if="formData.data.enterpriseLogoList && formData.data.enterpriseLogoList.length > 0"
|
|
|
- @click="formData.data.enterpriseLogoList = []">
|
|
|
+ <el-button
|
|
|
+ class="delete-btn"
|
|
|
+ type="danger"
|
|
|
+ v-if="
|
|
|
+ formData.data.enterpriseLogoList &&
|
|
|
+ formData.data.enterpriseLogoList.length > 0
|
|
|
+ "
|
|
|
+ @click="formData.data.enterpriseLogoList = []"
|
|
|
+ >
|
|
|
删除
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
@@ -179,19 +225,30 @@
|
|
|
:data="uploadDataTwo"
|
|
|
:show-file-list="false"
|
|
|
:on-success="larSignListSuccess"
|
|
|
- :before-upload="uploadFileTwo">
|
|
|
+ :before-upload="uploadFileTwo"
|
|
|
+ >
|
|
|
<el-image
|
|
|
- v-if="formData.data.larSignList && formData.data.larSignList.length > 0"
|
|
|
+ v-if="
|
|
|
+ formData.data.larSignList &&
|
|
|
+ formData.data.larSignList.length > 0
|
|
|
+ "
|
|
|
:src="formData.data.larSignList[0].fileUrl"
|
|
|
fit="scale-down"
|
|
|
- class="avatar" />
|
|
|
- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
|
|
+ class="avatar"
|
|
|
+ />
|
|
|
+ <el-icon v-else class="avatar-uploader-icon"
|
|
|
+ ><Plus
|
|
|
+ /></el-icon>
|
|
|
</el-upload>
|
|
|
- <el-button
|
|
|
- class="delete-btn"
|
|
|
- type="danger"
|
|
|
- v-if="formData.data.larSignList && formData.data.larSignList.length > 0"
|
|
|
- @click="formData.data.larSignList = []">
|
|
|
+ <el-button
|
|
|
+ class="delete-btn"
|
|
|
+ type="danger"
|
|
|
+ v-if="
|
|
|
+ formData.data.larSignList &&
|
|
|
+ formData.data.larSignList.length > 0
|
|
|
+ "
|
|
|
+ @click="formData.data.larSignList = []"
|
|
|
+ >
|
|
|
删除
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
@@ -204,19 +261,30 @@
|
|
|
:data="uploadDataThree"
|
|
|
:show-file-list="false"
|
|
|
:on-success="officialSealListSuccess"
|
|
|
- :before-upload="uploadFileThree">
|
|
|
+ :before-upload="uploadFileThree"
|
|
|
+ >
|
|
|
<el-image
|
|
|
- v-if="formData.data.officialSealList && formData.data.officialSealList.length > 0"
|
|
|
+ v-if="
|
|
|
+ formData.data.officialSealList &&
|
|
|
+ formData.data.officialSealList.length > 0
|
|
|
+ "
|
|
|
:src="formData.data.officialSealList[0].fileUrl"
|
|
|
fit="scale-down"
|
|
|
- class="avatar" />
|
|
|
- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
|
|
+ class="avatar"
|
|
|
+ />
|
|
|
+ <el-icon v-else class="avatar-uploader-icon"
|
|
|
+ ><Plus
|
|
|
+ /></el-icon>
|
|
|
</el-upload>
|
|
|
- <el-button
|
|
|
- class="delete-btn"
|
|
|
- type="danger"
|
|
|
- v-if="formData.data.officialSealList && formData.data.officialSealList.length > 0"
|
|
|
- @click="formData.data.officialSealList = []">
|
|
|
+ <el-button
|
|
|
+ class="delete-btn"
|
|
|
+ type="danger"
|
|
|
+ v-if="
|
|
|
+ formData.data.officialSealList &&
|
|
|
+ formData.data.officialSealList.length > 0
|
|
|
+ "
|
|
|
+ @click="formData.data.officialSealList = []"
|
|
|
+ >
|
|
|
删除
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
@@ -229,19 +297,30 @@
|
|
|
:data="uploadDataFour"
|
|
|
:show-file-list="false"
|
|
|
:on-success="contractSealListSuccess"
|
|
|
- :before-upload="uploadFileFour">
|
|
|
+ :before-upload="uploadFileFour"
|
|
|
+ >
|
|
|
<el-image
|
|
|
- v-if="formData.data.contractSealList && formData.data.contractSealList.length > 0"
|
|
|
+ v-if="
|
|
|
+ formData.data.contractSealList &&
|
|
|
+ formData.data.contractSealList.length > 0
|
|
|
+ "
|
|
|
:src="formData.data.contractSealList[0].fileUrl"
|
|
|
fit="scale-down"
|
|
|
- class="avatar" />
|
|
|
- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
|
|
+ class="avatar"
|
|
|
+ />
|
|
|
+ <el-icon v-else class="avatar-uploader-icon"
|
|
|
+ ><Plus
|
|
|
+ /></el-icon>
|
|
|
</el-upload>
|
|
|
- <el-button
|
|
|
- class="delete-btn"
|
|
|
- type="danger"
|
|
|
- v-if="formData.data.contractSealList && formData.data.contractSealList.length > 0"
|
|
|
- @click="formData.data.contractSealList = []">
|
|
|
+ <el-button
|
|
|
+ class="delete-btn"
|
|
|
+ type="danger"
|
|
|
+ v-if="
|
|
|
+ formData.data.contractSealList &&
|
|
|
+ formData.data.contractSealList.length > 0
|
|
|
+ "
|
|
|
+ @click="formData.data.contractSealList = []"
|
|
|
+ >
|
|
|
删除
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
@@ -252,7 +331,13 @@
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="dialogVisible = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">确 定</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ v-no-double-click="submitForm"
|
|
|
+ size="large"
|
|
|
+ :loading="submitLoading"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -280,7 +365,9 @@ let modalType = ref("add");
|
|
|
let rules = ref({
|
|
|
name: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
|
|
|
countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
|
|
|
- countryEnStr: [{ required: true, message: "请输入国家 (英文)", trigger: "blur" }],
|
|
|
+ countryEnStr: [
|
|
|
+ { required: true, message: "请输入国家 (英文)", trigger: "blur" },
|
|
|
+ ],
|
|
|
});
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const contactInformationType = ref([]);
|
|
@@ -376,11 +463,15 @@ const config = computed(() => {
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(() => {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ "此操作将永久删除该数据, 是否继续?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
proxy
|
|
|
.post("/corporation/delete", {
|
|
|
id: row.id,
|
|
@@ -478,6 +569,14 @@ const formConfig = computed(() => {
|
|
|
prop: "taxpayerQualification",
|
|
|
label: "纳税人资质",
|
|
|
data: contactInformationType.value,
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "taxationCode",
|
|
|
+ label: "税号",
|
|
|
+ itemType: "text",
|
|
|
+ itemWidth: 50,
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
@@ -500,27 +599,31 @@ const formConfig = computed(() => {
|
|
|
];
|
|
|
});
|
|
|
const getDict = () => {
|
|
|
- proxy.getDictOne(["enterprise_type", "taxpayer_qualification"]).then((res) => {
|
|
|
- enterpriseType.value = res["enterprise_type"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- contactInformationType.value = res["taxpayer_qualification"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .getDictOne(["enterprise_type", "taxpayer_qualification"])
|
|
|
+ .then((res) => {
|
|
|
+ enterpriseType.value = res["enterprise_type"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ contactInformationType.value = res["taxpayer_qualification"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ });
|
|
|
};
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
- proxy.post("/corporation/page", sourceList.value.pagination).then((message) => {
|
|
|
- sourceList.value.data = message.rows;
|
|
|
- sourceList.value.pagination.total = message.total;
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = false;
|
|
|
- }, 200);
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/corporation/page", sourceList.value.pagination)
|
|
|
+ .then((message) => {
|
|
|
+ sourceList.value.data = message.rows;
|
|
|
+ sourceList.value.pagination.total = message.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
};
|
|
|
const countryData = ref([]);
|
|
|
const provinceData = ref([]);
|
|
@@ -594,18 +697,26 @@ const getDtl = (row) => {
|
|
|
if (formData.data.provinceId) {
|
|
|
getCityData(formData.data.provinceId, "30");
|
|
|
}
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 1 }).then((resFile) => {
|
|
|
- formData.data.enterpriseLogoList = resFile[res.id];
|
|
|
- });
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 2 }).then((resFile) => {
|
|
|
- formData.data.larSignList = resFile[res.id];
|
|
|
- });
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 3 }).then((resFile) => {
|
|
|
- formData.data.officialSealList = resFile[res.id];
|
|
|
- });
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 4 }).then((resFile) => {
|
|
|
- formData.data.contractSealList = resFile[res.id];
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 1 })
|
|
|
+ .then((resFile) => {
|
|
|
+ formData.data.enterpriseLogoList = resFile[res.id];
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 2 })
|
|
|
+ .then((resFile) => {
|
|
|
+ formData.data.larSignList = resFile[res.id];
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 3 })
|
|
|
+ .then((resFile) => {
|
|
|
+ formData.data.officialSealList = resFile[res.id];
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 4 })
|
|
|
+ .then((resFile) => {
|
|
|
+ formData.data.contractSealList = resFile[res.id];
|
|
|
+ });
|
|
|
dialogVisible.value = true;
|
|
|
});
|
|
|
};
|
|
@@ -711,13 +822,12 @@ const remoteMethod = (keyword, type) => {
|
|
|
}
|
|
|
return;
|
|
|
};
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.tenant {
|
|
|
padding: 20px;
|
|
|
- .delete-btn{
|
|
|
+ .delete-btn {
|
|
|
margin-top: 10px;
|
|
|
margin-left: 25px;
|
|
|
}
|