|
@@ -26,11 +26,16 @@
|
|
|
<div class="form-title">基本信息</div>
|
|
|
<div class="form-input">
|
|
|
<ion-label>企业名称<span class="danger">*</span></ion-label>
|
|
|
- <ion-input placeholder="请输入企业名称" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="dataModel.companyName" class="custom" :style="isAdd?'width: 78%;':''">
|
|
|
- </ion-input>
|
|
|
- <ion-label v-if="isAdd" style="float:right;width:80px;color:#02A5F0FF;position: relative;bottom:34px;left:14px;"
|
|
|
- @click="onGetFirmByCompanyName">同步</ion-label>
|
|
|
+ <div>
|
|
|
+ <ion-input placeholder="请输入企业名称" label-placement="stacked" :style="{float: 'left',width:isAdd?'78%':'100%'}"
|
|
|
+ @click="onOpenCompany" v-model="dataModel.companyName" class="custom" readonly >
|
|
|
+ </ion-input>
|
|
|
+ <ion-item v-if="isAdd" style="width:22%;float: right;padding:0px;margin: 0px;">
|
|
|
+ <company-selection-like ref="refCompanySelectionLike" @resultInfo="onResultInfo"></company-selection-like>
|
|
|
+ </ion-item>
|
|
|
+ </div>
|
|
|
+<!-- <ion-label v-if="isAdd" style="float:right;width:80px;color:#02A5F0FF;position: relative;bottom:34px;left:14px;"-->
|
|
|
+<!-- @click="onGetFirmByCompanyName">同步</ion-label>-->
|
|
|
<!-- <ion-note slot="error">企业名称不能为空</ion-note>-->
|
|
|
</div>
|
|
|
<div class="form-input">
|
|
@@ -305,6 +310,7 @@ import {getSysDictionaryList} from "@/api/system/dictionary";
|
|
|
import dayjs from "dayjs";
|
|
|
import IndustrySelection from "@/components/industrySelection.vue";
|
|
|
import {getPosition} from "@/utils/position";
|
|
|
+import CompanySelectionLike from "@/components/companySelectionLike.vue";
|
|
|
|
|
|
interface StepParams{
|
|
|
loginUserID: string,
|
|
@@ -313,7 +319,7 @@ interface StepParams{
|
|
|
}
|
|
|
export default defineComponent({
|
|
|
name: "companyInfoEdit",
|
|
|
- components:{IndustrySelection},
|
|
|
+ components:{IndustrySelection,CompanySelectionLike},
|
|
|
setup() {
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
@@ -397,6 +403,7 @@ export default defineComponent({
|
|
|
const streetList = ref<any>([]);
|
|
|
const siteList = ref<any>([]);
|
|
|
const shortAgeTypeList = ref<any>([]);
|
|
|
+ const refCompanySelectionLike = ref();
|
|
|
|
|
|
const getCompanyModelList = async function(){
|
|
|
const companyModelResult :any = await getSysDictionaryList("CompanyModel");
|
|
@@ -506,30 +513,32 @@ export default defineComponent({
|
|
|
const onGetFirmByCompanyName = async function() {
|
|
|
if(formState.dataModel.companyName){
|
|
|
await setInfoLoadingOpen(true);
|
|
|
- const matchedFirmInfo :any = await normalFirm(formState.dataModel.companyName);
|
|
|
+ let matchedFirmInfo :any = await normalFirm(formState.dataModel.companyName);
|
|
|
if(matchedFirmInfo){
|
|
|
- formState.dataModel.frName = matchedFirmInfo.frName;
|
|
|
- formState.dataModel.registeredCapital = matchedFirmInfo.registeredCapital;
|
|
|
- formState.dataModel.companyCode = matchedFirmInfo.companyCode;
|
|
|
- formState.dataModel.insuredCount = matchedFirmInfo.insuredCount;
|
|
|
- formState.dataModel.userMobile = matchedFirmInfo.userMobile;
|
|
|
- formState.dataModel.companyEmail = matchedFirmInfo.companyEmail;
|
|
|
- formState.dataModel.companyAddress = matchedFirmInfo.companyAddress;
|
|
|
- formState.dataModel.businScope = matchedFirmInfo.businScope;
|
|
|
- formState.dataModel.industryID = matchedFirmInfo.industryID;
|
|
|
- formState.dataModel.industryName = matchedFirmInfo.industryName;
|
|
|
- formState.dataModel.signInPoliticalArea = matchedFirmInfo.signInPoliticalArea;
|
|
|
- formState.dataModel.establishmentTime = matchedFirmInfo.establishmentTime;
|
|
|
await setInfoLoadingOpen(false);
|
|
|
infoAlterData.title = "提示";
|
|
|
infoAlterData.message = "同步成功!";
|
|
|
await setInfoAlertOpen(true);
|
|
|
}else{
|
|
|
+ matchedFirmInfo = {};
|
|
|
await setInfoLoadingOpen(false);
|
|
|
infoAlterData.title = "错误";
|
|
|
infoAlterData.message = "查找不到该企业,请核实企业名称是否正确!";
|
|
|
await setInfoAlertOpen(true);
|
|
|
}
|
|
|
+
|
|
|
+ formState.dataModel.frName = matchedFirmInfo.frName;
|
|
|
+ formState.dataModel.registeredCapital = matchedFirmInfo.registeredCapital;
|
|
|
+ formState.dataModel.companyCode = matchedFirmInfo.companyCode;
|
|
|
+ formState.dataModel.insuredCount = matchedFirmInfo.insuredCount;
|
|
|
+ formState.dataModel.userMobile = matchedFirmInfo.userMobile;
|
|
|
+ formState.dataModel.companyEmail = matchedFirmInfo.companyEmail;
|
|
|
+ formState.dataModel.companyAddress = matchedFirmInfo.companyAddress;
|
|
|
+ formState.dataModel.businScope = matchedFirmInfo.businScope;
|
|
|
+ formState.dataModel.industryID = matchedFirmInfo.industryID;
|
|
|
+ formState.dataModel.industryName = matchedFirmInfo.industryName;
|
|
|
+ formState.dataModel.signInPoliticalArea = matchedFirmInfo.signInPoliticalArea;
|
|
|
+ formState.dataModel.establishmentTime = matchedFirmInfo.establishmentTime;
|
|
|
}else{
|
|
|
infoAlterData.title = "提示";
|
|
|
infoAlterData.message = "请输入企业名称!";
|
|
@@ -560,6 +569,19 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ const onResultInfo = (data: any)=>{
|
|
|
+ formState.dataModel.companyName = data.text;
|
|
|
+ onGetFirmByCompanyName();
|
|
|
+ }
|
|
|
+
|
|
|
+ const onOpenCompany = () => {
|
|
|
+ if(!isAdd.value){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ refCompanySelectionLike.value.onOpen();
|
|
|
+ }
|
|
|
+
|
|
|
const onBack = () => {
|
|
|
router.push({path:'/jobUserInfo/index', query: {userId: curStepData.value.loginUserID,openId: curStepData.value.openID}});
|
|
|
}
|
|
@@ -643,6 +665,9 @@ export default defineComponent({
|
|
|
isAdd,
|
|
|
isShow,
|
|
|
v$,
|
|
|
+ refCompanySelectionLike,
|
|
|
+ onOpenCompany,
|
|
|
+ onResultInfo,
|
|
|
isLongDate,
|
|
|
curStepData,
|
|
|
stepList,
|