|
@@ -14,9 +14,9 @@
|
|
|
<div class="stepFlex">
|
|
|
<div v-for="(record,key) in stepList" :key="key" class="stepFlex-item">
|
|
|
<div
|
|
|
- :class="[(record.val <formState.dataModel?.statusVal || formState.dataModel?.statusVal==stepList[stepList.length-1].val) ? 'greenCircle' :record.val == formState.dataModel?.statusVal ? 'now' : 'greyCircle']"></div>
|
|
|
+ :class="[(record.val < curStepData?.statusVal || curStepData?.statusVal == stepList[stepList.length-1].val) ? 'greenCircle' :record.val == curStepData?.statusVal ? 'now' : 'grayCircle']"></div>
|
|
|
<div v-if="key !== stepList.length - 1"
|
|
|
- :class="[record.val < formState.dataModel?.statusVal ? 'greenline' : 'greyline']"></div>
|
|
|
+ :class="[record.val < curStepData?.statusVal ? 'greenLine' : 'grayLine']"></div>
|
|
|
<div class="stepFlex-item-label">
|
|
|
<p class="stepFlex-item-label-title">{{ record.title }}</p>
|
|
|
<p class="stepFlex-item-label-desc">{{ record.desc }}</p>
|
|
@@ -31,79 +31,78 @@
|
|
|
基本信息
|
|
|
</div>
|
|
|
</ion-item>
|
|
|
+ <ion-label class="title-item">统一信用代码<span class="danger">*</span></ion-label>
|
|
|
<ion-item mode="md" :class="[v$.dataModel.companyCode.$error?'ion-invalid':'ion-valid']">
|
|
|
- <ion-label style="width: 100px;">统一信用代码<span class="danger">*</span></ion-label>
|
|
|
<ion-input placeholder="请输入统一信用代码" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="formState.dataModel.companyCode">
|
|
|
+ v-model="dataModel.companyCode" class="custom">
|
|
|
</ion-input>
|
|
|
<ion-note slot="error">统一信用代码不能为空</ion-note>
|
|
|
</ion-item>
|
|
|
+ <ion-label class="title-item">企业名称<span class="danger">*</span></ion-label>
|
|
|
<ion-item mode="md" :class="[v$.dataModel.companyName.$error?'ion-invalid':'ion-valid']">
|
|
|
- <ion-label style="width: 100px;">企业名称<span class="danger">*</span></ion-label>
|
|
|
<ion-input placeholder="请输入企业名称" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="formState.dataModel.companyName">
|
|
|
+ v-model="dataModel.companyName" class="custom">
|
|
|
</ion-input>
|
|
|
<ion-note slot="error">企业名称不能为空</ion-note>
|
|
|
</ion-item>
|
|
|
+ <ion-label class="title-item">服务驿站<span class="danger">*</span></ion-label>
|
|
|
<ion-item mode="md" :class="[v$.dataModel.siteID.$error?'ion-invalid':'ion-valid']">
|
|
|
- <div style="width: 27%;">
|
|
|
- <ion-label style="width: 100px;">服务驿站<span class="danger">*</span></ion-label>
|
|
|
- </div>
|
|
|
- <div style="width: 73%;text-align: left;">
|
|
|
- <ion-select interface="action-sheet" placeholder="请选择服务驿站" cancel-text="取消" style="max-width: 70%;"
|
|
|
- id="siteID" v-model="formState.dataModel.siteID">
|
|
|
- <ion-select-option v-for="(record,key) in siteList" :key="key"
|
|
|
- v-model:value="record.siteID">
|
|
|
+ <ion-select id="siteID" name="siteID" cancel-text="取消" v-model="dataModel.siteID"
|
|
|
+ interface="action-sheet" placeholder="请选择服务驿站" style="width: 100%;text-align: left;">
|
|
|
+ <ion-select-option v-for="(record,key) in siteList" :key="key" v-model:value="record.siteID">
|
|
|
{{ record.siteName }}
|
|
|
</ion-select-option>
|
|
|
</ion-select>
|
|
|
- </div>
|
|
|
<ion-note slot="error">服务驿站不能为空</ion-note>
|
|
|
</ion-item>
|
|
|
+ <ion-label class="title-item">企业办公地址<span class="danger">*</span></ion-label>
|
|
|
<ion-item mode="md" :class="[v$.dataModel.address.$error?'ion-invalid':'ion-valid']">
|
|
|
- <ion-label style="width: 100px;">企业办公地址<span class="danger">*</span></ion-label>
|
|
|
- <ion-input placeholder="请输入企业办公地址" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="formState.dataModel.address">
|
|
|
- </ion-input>
|
|
|
+ <ion-textarea placeholder="请输入企业办公地址" label-placement="stacked" :rows="3" :clear-input="true"
|
|
|
+ v-model="dataModel.address" class="custom" >
|
|
|
+ </ion-textarea>
|
|
|
<ion-note slot="error">企业办公地址不能为空</ion-note>
|
|
|
</ion-item>
|
|
|
- <ion-item mode="md" :class="[v$.dataModel.address.$error?'ion-invalid':'ion-valid']">
|
|
|
- <ion-label style="width: 100px;">企业联系人<span class="danger">*</span></ion-label>
|
|
|
+ <ion-label class="title-item">企业联系人<span class="danger">*</span></ion-label>
|
|
|
+ <ion-item mode="md" :class="[v$.dataModel.userName.$error?'ion-invalid':'ion-valid']">
|
|
|
<ion-input placeholder="请输入企业联系人" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="formState.dataModel.userName">
|
|
|
+ v-model="dataModel.userName" class="custom">
|
|
|
</ion-input>
|
|
|
<ion-note slot="error">企业联系人不能为空</ion-note>
|
|
|
</ion-item>
|
|
|
+ <ion-label class="title-item">联系电话<span class="danger">*</span></ion-label>
|
|
|
<ion-item mode="md" :class="[v$.dataModel.userMobile.$error?'ion-invalid':'ion-valid']">
|
|
|
- <ion-label style="width: 100px;">企业联系电话<span class="danger">*</span></ion-label>
|
|
|
- <ion-input placeholder="请输入企业联系电话" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="formState.dataModel.userMobile">
|
|
|
+ <ion-input placeholder="请输入联系电话" label-placement="stacked" :clear-input="true"
|
|
|
+ v-model="dataModel.userMobile" class="custom">
|
|
|
</ion-input>
|
|
|
<ion-note slot="error">企业联系电话不能为空</ion-note>
|
|
|
</ion-item>
|
|
|
- <ion-item mode="md" :class="[v$.dataModel.insuredCount.$error?'ion-invalid':'ion-valid']">
|
|
|
- <ion-label style="width: 100px;">参保人数<span class="danger">*</span></ion-label>
|
|
|
- <ion-input placeholder="请输入参保人数" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="formState.dataModel.insuredCount">
|
|
|
- </ion-input>
|
|
|
- <ion-note slot="error">参保人数不能为空</ion-note>
|
|
|
- </ion-item>
|
|
|
+ <ion-label class="title-item">企业状态<span class="danger">*</span></ion-label>
|
|
|
<ion-item mode="md" :class="[v$.dataModel.recordStatus.$error?'ion-invalid':'ion-valid']">
|
|
|
- <div style="width: 27%;">
|
|
|
- <ion-label style="width: 100px;">企业状态</ion-label>
|
|
|
- </div>
|
|
|
- <div style="width: 73%;text-align: left;">
|
|
|
- <ion-select interface="action-sheet" placeholder="请选择企业状态" cancel-text="取消" style="max-width: 70%;"
|
|
|
- id="recordStatus" v-model="formState.dataModel.recordStatus">
|
|
|
- <ion-select-option v-for="(record,key) in companyStatuslist" :key="key"
|
|
|
- v-model:value="record.value">
|
|
|
- {{ record.name }}
|
|
|
- </ion-select-option>
|
|
|
- </ion-select>
|
|
|
- </div>
|
|
|
+ <ion-select id="recordStatus" name="recordStatus" cancel-text="取消" v-model="dataModel.recordStatus"
|
|
|
+ interface="action-sheet" placeholder="请选择企业状态" style="width: 100%;text-align: left;">
|
|
|
+ <ion-select-option v-for="(record,key) in companyStatusList" :key="key"
|
|
|
+ v-model:value="record.value">
|
|
|
+ {{ record.name }}
|
|
|
+ </ion-select-option>
|
|
|
+ </ion-select>
|
|
|
+ <ion-note slot="error">企业状态不能为空</ion-note>
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">是否缺工<span class="danger">*</span></ion-label>
|
|
|
+ <ion-item mode="md" :class="[v$.dataModel.isShortAge.$error?'ion-invalid':'ion-valid']">
|
|
|
+ <ion-select id="isShortAge" name="isShortAge" cancel-text="取消" v-model="dataModel.isShortAge"
|
|
|
+ interface="action-sheet" placeholder="请选择是否缺工" style="width: 100%;text-align: left;">
|
|
|
+ <ion-select-option v-for="(record,key) in shortAgeTypeList" :key="key"
|
|
|
+ v-model:value="record.value">
|
|
|
+ {{ record.name }}
|
|
|
+ </ion-select-option>
|
|
|
+ </ion-select>
|
|
|
<ion-note slot="error">企业状态不能为空</ion-note>
|
|
|
</ion-item>
|
|
|
- <ion-item mode="md" style="">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <ion-item mode="md" >
|
|
|
<div class="panel-title2" style="width: 25%;">
|
|
|
<div class="item-flag"></div>
|
|
|
其他信息
|
|
@@ -115,99 +114,95 @@
|
|
|
style="font-size: 24px;"></ion-icon>
|
|
|
</div>
|
|
|
</ion-item>
|
|
|
- <ion-item v-show="isShow" mode="md" :class="[v$.dataModel.regionCode.$error?'ion-invalid':'ion-valid']">
|
|
|
- <div style="width: 27%;">
|
|
|
- <ion-label style="width: 100px;">所属县区<span class="danger">*</span></ion-label>
|
|
|
- </div>
|
|
|
- <div style="width: 73%;">
|
|
|
- <ion-select interface="action-sheet" placeholder="请选择所属县区" cancel-text="取消" @ionChange="changeCity"
|
|
|
- style="max-width: 70%;"
|
|
|
- id="regionCode" v-model="formState.dataModel.regionCode">
|
|
|
- <ion-select-option v-for="(record,key) in regionList" :key="key"
|
|
|
+ <ion-list v-show="isShow" >
|
|
|
+ <ion-label class="title-item">法定代表人(负责人)</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-input placeholder="请输入法定代表人" label-placement="stacked" :clear-input="true"
|
|
|
+ v-model="dataModel.frName" class="custom">
|
|
|
+ </ion-input>
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">营业执照有效期</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-datetime-button datetime="validTime"></ion-datetime-button>
|
|
|
+ <ion-modal :keep-contents-mounted="true">
|
|
|
+ <ion-datetime id="validTime" placeholder="营业执照有效期"
|
|
|
+ v-model="dataModel.validTime" :prefer-wheel="true"
|
|
|
+ dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
|
|
|
+ :show-default-buttons="true" >
|
|
|
+ </ion-datetime>
|
|
|
+ </ion-modal>
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">企业邮箱</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-input placeholder="请输入企业邮箱" label-placement="stacked" :clear-input="true"
|
|
|
+ v-model="dataModel.companyEmail" class="custom">
|
|
|
+ </ion-input>
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">企业归类</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-select interface="action-sheet" placeholder="请选择企业归类" cancel-text="取消"
|
|
|
+ id="companyType" v-model="dataModel.companyType" style="width: 100%;text-align: left;">
|
|
|
+ <ion-select-option v-for="(record,key) in companyTypeList" :key="key"
|
|
|
v-model:value="record.code">
|
|
|
{{ record.name }}
|
|
|
</ion-select-option>
|
|
|
</ion-select>
|
|
|
- </div>
|
|
|
- <ion-note slot="error">所属县区不能为空</ion-note>
|
|
|
- </ion-item>
|
|
|
- <ion-item v-show="isShow" mode="md" :class="[v$.dataModel.streetCode.$error?'ion-invalid':'ion-valid']">
|
|
|
- <div style="width: 27%;">
|
|
|
- <ion-label style="width: 100px;">所属街道<span class="danger">*</span></ion-label>
|
|
|
- </div>
|
|
|
- <div style="width: 73%;">
|
|
|
- <ion-select interface="action-sheet" placeholder="请选择所属街道" cancel-text="取消" style="max-width: 70%;"
|
|
|
- id="streetCode" v-model="formState.dataModel.streetCode">
|
|
|
- <ion-select-option v-for="(record,key) in streetList" :key="key"
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">企业规模</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-select interface="action-sheet" placeholder="请选择企业规模" cancel-text="取消"
|
|
|
+ id="companyModel" v-model="dataModel.companyModel" style="width: 100%;text-align: left;">
|
|
|
+ <ion-select-option v-for="(record,key) in companyModelList" :key="key"
|
|
|
+ v-model:value="record.code" style="width:100%;text-align: left;">
|
|
|
+ {{ record.name }}
|
|
|
+ </ion-select-option>
|
|
|
+ </ion-select>
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">所属县区</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-select interface="action-sheet" placeholder="请选择所属县区" cancel-text="取消" @ionChange="changeCity"
|
|
|
+ id="regionCode" v-model="dataModel.regionCode" style="width:100%;text-align: left;">
|
|
|
+ <ion-select-option v-for="(record,key) in regionList" :key="key"
|
|
|
v-model:value="record.code">
|
|
|
{{ record.name }}
|
|
|
</ion-select-option>
|
|
|
</ion-select>
|
|
|
- </div>
|
|
|
- <ion-note slot="error">所属街道不能为空</ion-note>
|
|
|
- </ion-item>
|
|
|
- <ion-item v-show="isShow" mode="md" :class="[v$.dataModel.companyModel.$error?'ion-invalid':'ion-valid']">
|
|
|
- <ion-label style="width: 100px;">企业规模<span class="danger">*</span></ion-label>
|
|
|
- <ion-input placeholder="请输入企业规模" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="formState.dataModel.companyModel">
|
|
|
- </ion-input>
|
|
|
- <ion-note slot="error">企业规模不能为空</ion-note>
|
|
|
- </ion-item>
|
|
|
- <ion-item v-show="isShow">
|
|
|
- <div style="width: 27%;">
|
|
|
- <ion-label style="width: 100px;">企业归类</ion-label>
|
|
|
- </div>
|
|
|
- <div style="width: 73%;">
|
|
|
- <ion-select interface="action-sheet" placeholder="请选择企业归类" cancel-text="取消" style="max-width: 70%;"
|
|
|
- id="companyType" v-model="formState.dataModel.companyType">
|
|
|
- <ion-select-option v-for="(record,key) in studentStatuslist" :key="key"
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">所属街道</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-select interface="action-sheet" placeholder="请选择所属街道" cancel-text="取消"
|
|
|
+ id="streetCode" v-model="dataModel.streetCode" style="width: 100%;text-align: left;">
|
|
|
+ <ion-select-option v-for="(record,key) in streetList" :key="key"
|
|
|
v-model:value="record.code">
|
|
|
{{ record.name }}
|
|
|
</ion-select-option>
|
|
|
</ion-select>
|
|
|
- </div>
|
|
|
- </ion-item>
|
|
|
- <ion-item v-show="isShow" mode="md" :class="[v$.dataModel.companyEmail.$error?'ion-invalid':'ion-valid']">
|
|
|
- <ion-label style="width: 100px;">企业邮箱<span class="danger">*</span></ion-label>
|
|
|
- <ion-input placeholder="请选择企业邮箱" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="formState.dataModel.companyEmail">
|
|
|
- </ion-input>
|
|
|
- <ion-note slot="error">企业邮箱不能为空</ion-note>
|
|
|
- </ion-item>
|
|
|
- <ion-item v-show="isShow" mode="md" :class="[v$.dataModel.frName.$error?'ion-invalid':'ion-valid']">
|
|
|
- <ion-label style="width: 100px;">法人代表<span class="danger">*</span></ion-label>
|
|
|
- <ion-input placeholder="请选择法人代表" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="formState.dataModel.frName">
|
|
|
- </ion-input>
|
|
|
- <ion-note slot="error">法人代表不能为空</ion-note>
|
|
|
- </ion-item>
|
|
|
- <ion-item v-show="isShow" mode="md" >
|
|
|
-<!-- <ion-datetime style="text-align:center;" presentation="date" max="2099" min="2000" cancelText="取消" doneText="选择" placeholder="上班时间"-->
|
|
|
-<!-- v-model="formState.dataModel.validTime" name="validTime" id="validTime"></ion-datetime>-->
|
|
|
-
|
|
|
-<!-- <ion-datetime display-format="YYYY-MM-DD" presentation="date" name="birthday"-->
|
|
|
-<!-- doneText="确定" cancelText="取消" v-model="formState.dataModel.validTime"-->
|
|
|
-<!-- :picker-options="{ buttons: [{ text: 'Done', handler: doneHandler }] }">-->
|
|
|
-<!-- -->
|
|
|
-<!-- </ion-datetime>-->
|
|
|
-<!-- <ion-button @click="showSelectedDate">-->
|
|
|
-<!-- Show Selected Date-->
|
|
|
-<!-- </ion-button>-->
|
|
|
-
|
|
|
- <div style="width: 30%;">
|
|
|
- <ion-label style="width: 150px;">营业执照有效期<span class="danger">*</span></ion-label>
|
|
|
- </div>
|
|
|
- <div style="width: 70%;">
|
|
|
- <ion-datetime-button datetime="validTime" style="width: 70%;"></ion-datetime-button>
|
|
|
- <ion-modal :keep-contents-mounted="true">
|
|
|
- <ion-datetime id="validTime" placeholder="营业执照有效期"
|
|
|
- v-model="formState.dataModel.validTime"
|
|
|
- dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
|
|
|
- :show-default-buttons="true">
|
|
|
- </ion-datetime>
|
|
|
- </ion-modal>
|
|
|
- </div>
|
|
|
- </ion-item>
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">用工情况(人)</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-input type="number" placeholder="请输入用工人数" label-placement="stacked" :clear-input="true"
|
|
|
+ v-model="dataModel.insuredCount" class="custom">
|
|
|
+ </ion-input>
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">参保人数(人)</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-input type="number" placeholder="请输入参保人数" label-placement="stacked" :clear-input="true"
|
|
|
+ v-model="dataModel.insuredCount" class="custom">
|
|
|
+ </ion-input>
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">经营范围</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-textarea placeholder="请输入经营范围" :rows="3" label-placement="stacked" :clear-input="true"
|
|
|
+ v-model="dataModel.businScope" class="custom">
|
|
|
+ </ion-textarea>
|
|
|
+ </ion-item>
|
|
|
+ <ion-label class="title-item">企业简介</ion-label>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <ion-textarea placeholder="请输入企业简介" :rows="3" label-placement="stacked" :clear-input="true"
|
|
|
+ v-model="dataModel.companyDesc" class="custom">
|
|
|
+ </ion-textarea>
|
|
|
+ </ion-item>
|
|
|
+ </ion-list>
|
|
|
</ion-list>
|
|
|
</form>
|
|
|
</ion-content>
|
|
@@ -221,79 +216,85 @@
|
|
|
</ion-page>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
-import {defineComponent, ref, toRefs, reactive, computed, watch} from "vue";
|
|
|
+import {defineComponent, ref, reactive, computed, watch, toRefs} from "vue";
|
|
|
import {getRegionList, getSiteList, getStreeList,getCurrentDate} from '@/api/company/index'
|
|
|
-import {useRoute, useRouter} from "vue-router";
|
|
|
+import {useRoute,useRouter} from "vue-router";
|
|
|
import {alertController, onIonViewDidEnter} from "@ionic/vue";
|
|
|
import {useVuelidate} from "@vuelidate/core";
|
|
|
+import {getCompanyById} from "@/api/company";
|
|
|
import {chevronDownOutline, chevronUpOutline, arrowBackOutline} from 'ionicons/icons';
|
|
|
-import {minLength, required} from "@vuelidate/validators";
|
|
|
+import {minLength,required} from "@vuelidate/validators";
|
|
|
|
|
|
-interface FormState {
|
|
|
- dataModel: any;
|
|
|
+interface StepParams{
|
|
|
+ name: string,
|
|
|
+ statusVal: number
|
|
|
}
|
|
|
-
|
|
|
export default defineComponent({
|
|
|
name: 'PracticeIntentionEdit',
|
|
|
setup() {
|
|
|
- const router = useRouter();
|
|
|
const route = useRoute();
|
|
|
- const formState = reactive<FormState>({dataModel: {}});
|
|
|
- const stepList = ref([{title: '基础信息', desc: '企业基础信息', val: 1}, {
|
|
|
- title: '岗位信息',
|
|
|
- desc: '企业岗位信息',
|
|
|
- val: 2
|
|
|
- }]);
|
|
|
+ const router = useRouter();
|
|
|
+ const curStepData = ref<StepParams>({
|
|
|
+ name:"",
|
|
|
+ statusVal: 1
|
|
|
+ });
|
|
|
const isShow = ref<any>(false);
|
|
|
+ const formState = reactive({
|
|
|
+ dataModel: {
|
|
|
+ companyCode: null,
|
|
|
+ companyName: null,
|
|
|
+ siteID: null,
|
|
|
+ address: null,
|
|
|
+ userName:null,
|
|
|
+ userMobile:null,
|
|
|
+ recordStatus: 1,
|
|
|
+ isShortAge: null,
|
|
|
+ frName: null,
|
|
|
+ validTime:new Date(),
|
|
|
+ companyEmail:null,
|
|
|
+ companyType:null,
|
|
|
+ companyModel:null,
|
|
|
+ regionCode:null,
|
|
|
+ streetCode:null,
|
|
|
+
|
|
|
+ }});
|
|
|
+
|
|
|
+ const stepList = ref([
|
|
|
+ {title: '基础信息', desc: '企业基础信息', val: 1},
|
|
|
+ {title: '岗位信息', desc: '企业岗位信息', val: 2}
|
|
|
+ ]);
|
|
|
+ const companyTypeList = ref<any>([]);
|
|
|
+ const companyModelList = ref<any>([]);
|
|
|
const regionList = ref<any>([]);
|
|
|
const streetList = ref<any>([]);
|
|
|
const siteList = ref<any>([]);
|
|
|
- const companyStatuslist = [
|
|
|
+ const companyStatusList = [
|
|
|
{value: 1, name: '在营'},
|
|
|
{value: 0, name: '关闭'},
|
|
|
];
|
|
|
+ const shortAgeTypeList =[
|
|
|
+ {value: 1, name: '是'},
|
|
|
+ {value: 0, name: '否'},
|
|
|
+ ];
|
|
|
|
|
|
const showSelectedDate=()=>{
|
|
|
console.log('Selected Date:', formState.dataModel.validTime);
|
|
|
}
|
|
|
-
|
|
|
- const doneHandler=()=>{
|
|
|
+ const doneHandler=()=>{
|
|
|
console.log('Selected Date:',formState.dataModel.validTime);
|
|
|
}
|
|
|
|
|
|
const rules = computed(() => {
|
|
|
return {
|
|
|
- // dataModel: {
|
|
|
- // companyName: {required: true},
|
|
|
- // companyCode: {required: true},
|
|
|
- // siteID: {required: true},
|
|
|
- // regionCode: {required: true},
|
|
|
- // streetCode: {required: true},
|
|
|
- // address: {required: true},
|
|
|
- // companyModel: {required: true},
|
|
|
- // userName: {required: true},
|
|
|
- // userMobile: {required: true},
|
|
|
- // companyEmail: {required: true},
|
|
|
- // frName: {required: true},
|
|
|
- // validTime: {required: true},
|
|
|
- // recordStatus: {required: true},
|
|
|
- // insuredCount: {required: true},
|
|
|
- // }
|
|
|
dataModel: {
|
|
|
- companyName: {required},
|
|
|
companyCode: {required},
|
|
|
+ companyName: {required},
|
|
|
siteID: {required},
|
|
|
- regionCode: {required},
|
|
|
- streetCode: {required},
|
|
|
address: {required},
|
|
|
- companyModel: {required},
|
|
|
userName: {required},
|
|
|
userMobile: {required},
|
|
|
- companyEmail: {required},
|
|
|
- frName: {required},
|
|
|
- validTime: {required},
|
|
|
recordStatus: {required},
|
|
|
- insuredCount: {required},
|
|
|
+ isShortAge: {required},
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -322,44 +323,44 @@ export default defineComponent({
|
|
|
regionList.value = data;
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
const getStreetListData = (code: any) => {
|
|
|
getStreeList({code: code}).then(data => {
|
|
|
streetList.value = data;
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- const getSitetListData = () => {
|
|
|
+ const getSiteListData = () => {
|
|
|
getSiteList({}).then(data => {
|
|
|
siteList.value = data;
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
const changeCity = () => {
|
|
|
console.log(formState.dataModel.regionCode);
|
|
|
if (formState.dataModel.regionCode)
|
|
|
getStreetListData(formState.dataModel.regionCode);
|
|
|
}
|
|
|
|
|
|
- const initData = () => {
|
|
|
- getRegionListData();
|
|
|
- getSitetListData();
|
|
|
+ const loadData = async (companyID: any,status:any) => {
|
|
|
+ curStepData.value.statusVal = status;
|
|
|
+ console.log("当前companyID",companyID);
|
|
|
+ const reqData = await getCompanyById(companyID);
|
|
|
+ formState.dataModel = reqData;
|
|
|
+ console.log('dataModel',formState.dataModel);
|
|
|
};
|
|
|
|
|
|
- onIonViewDidEnter(() => {
|
|
|
- initData();
|
|
|
- if (route.query.pageStatus == '1') {
|
|
|
- formState.dataModel = {recordStatus: 1, statusVal: 1};
|
|
|
- formState.dataModel.validTime = getCurrentDate();
|
|
|
+ watch(() => route.query, () => {
|
|
|
+ if (route.query.reload) {
|
|
|
+ loadData(route.query.companyID,route.query.status);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- watch(() => route.query, () => {
|
|
|
- if (route.query.date) {
|
|
|
- if (route.query.pageStatus == '1') {
|
|
|
- formState.dataModel = {recordStatus: 1, statusVal: 1};
|
|
|
- formState.dataModel.validTime = getCurrentDate();
|
|
|
- }
|
|
|
+ const reload = (companyID:any,status:any) => {
|
|
|
+ isShow.value = false;
|
|
|
+ loadData(companyID,status);
|
|
|
+ }
|
|
|
+
|
|
|
+ onIonViewDidEnter(() => {
|
|
|
+ if (route.query.reload) {
|
|
|
+ reload(route.query.companyID,route.query.status);
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -375,14 +376,6 @@ export default defineComponent({
|
|
|
await alert.present();
|
|
|
}
|
|
|
|
|
|
- // const getCurrentDate = () => {
|
|
|
- // const validDate = new Date();
|
|
|
- // // 获取年月日
|
|
|
- // const year = validDate.getFullYear();
|
|
|
- // const month = validDate.getMonth() + 1; // 注意月份是从0开始的,需要加1
|
|
|
- // const day = validDate.getDate();
|
|
|
- // return `${year}-${month}-${day}`;
|
|
|
- // }
|
|
|
|
|
|
const back=()=>{
|
|
|
isShow.value=false;
|
|
@@ -390,32 +383,57 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
- formState,
|
|
|
- stepList,
|
|
|
- initData,
|
|
|
- onCancel,
|
|
|
- next,
|
|
|
- route,
|
|
|
- back,
|
|
|
+ ...toRefs(formState),
|
|
|
arrowBackOutline,
|
|
|
chevronDownOutline,
|
|
|
chevronUpOutline,
|
|
|
+ route,
|
|
|
+ isShow,
|
|
|
router,
|
|
|
+ v$,
|
|
|
+ curStepData,
|
|
|
+ stepList,
|
|
|
+ companyTypeList,
|
|
|
+ siteList,
|
|
|
regionList,
|
|
|
streetList,
|
|
|
- companyStatuslist,
|
|
|
+ shortAgeTypeList,
|
|
|
+ companyStatusList,
|
|
|
+ companyModelList,
|
|
|
+ next,
|
|
|
+ back,
|
|
|
+ onCancel,
|
|
|
+ getRegionListData,
|
|
|
+ getSiteListData,
|
|
|
changeCity,
|
|
|
- v$,
|
|
|
- siteList,
|
|
|
- isShow,
|
|
|
showSelectedDate,
|
|
|
+ loadData,
|
|
|
doneHandler
|
|
|
}
|
|
|
+ },mounted(){
|
|
|
+ this.getRegionListData();
|
|
|
+ this.getSiteListData();
|
|
|
+ const companyID = this.route.query.companyID;
|
|
|
+ const status = this.route.query.status;
|
|
|
+ this.loadData(companyID,status);
|
|
|
}
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
+
|
|
|
+.custom{
|
|
|
+ --placeholder-color: gray;
|
|
|
+ --placeholder-font-style:italic;
|
|
|
+ --placeholder-opacity: 1;
|
|
|
+}
|
|
|
+
|
|
|
+.title-item{
|
|
|
+ margin-left: 15px;
|
|
|
+ color:#3a7be0;
|
|
|
+ font-size: 20px;
|
|
|
+}
|
|
|
+
|
|
|
ion-item {
|
|
|
--border-width: 0;
|
|
|
--border-style: none;
|
|
@@ -474,7 +492,7 @@ ion-item {
|
|
|
border: 4px solid #c5e8f9;
|
|
|
}
|
|
|
|
|
|
- .greyCircle {
|
|
|
+ .grayCircle {
|
|
|
top: calc(50% - 15px);
|
|
|
left: calc(50% - 4px);
|
|
|
position: absolute;
|
|
@@ -485,7 +503,7 @@ ion-item {
|
|
|
background-color: #ccc;
|
|
|
}
|
|
|
|
|
|
- .greenline {
|
|
|
+ .greenLine {
|
|
|
width: 100%;
|
|
|
top: calc(50% - 11px);
|
|
|
left: calc(50% - 2px);
|
|
@@ -494,7 +512,7 @@ ion-item {
|
|
|
position: absolute;
|
|
|
}
|
|
|
|
|
|
- .greyline {
|
|
|
+ .grayLine {
|
|
|
height: 0;
|
|
|
border: 1px dashed #ccc;
|
|
|
width: 100%;
|