| | |
| | | <template>
|
| | | <view class="container">
|
| | | <view class="main-content">
|
| | | <view class="base">
|
| | | <box-title :title="'基本信息'"></box-title>
|
| | | <u-form labelWidth="70" :model="form" :rules="rules" ref="form" class="form">
|
| | |
|
| | | <u-form labelWidth="80" :model="form" :rules="rules" ref="form" class="form">
|
| | |
|
| | | <view class="base">
|
| | | <box-title :title="'基本信息'"></box-title>
|
| | |
|
| | | <u-form-item label="场所位置" required class="form-item" prop="location" @click="getLocation">
|
| | | <u--input border="none" v-model="form.location" placeholder="请选择场所位置"></u--input>
|
| | | <u--textarea border="none" v-model="form.location" placeholder="请选择场所位置"></u--textarea>
|
| | | <u-icon slot="right" name="arrow-right"></u-icon>
|
| | | </u-form-item>
|
| | |
|
| | | <u-form-item label="经纬度" required class="form-item">
|
| | | <u--input border="none" v-model="jwd" placeholder="请选择场所位置" disabled
|
| | | disabledColor="#ffffff"></u--input>
|
| | | </u-form-item>
|
| | | <!-- <u-form-item class="form-item" label="标准地址" required prop="houseCodeBinds"
|
| | | @click="isShowPopup = true">
|
| | | <u--input v-if="!addressNames.length" border="none" disabled disabledColor="#ffffff"
|
| | | placeholder="请选择标准地址">
|
| | | </u--input>
|
| | | |
| | | <view v-if="addressNames.length">
|
| | | <view class="f-28" v-for="i in addressNames">
|
| | | {{i}}
|
| | | </view>
|
| | | </view>
|
| | | <u-icon slot="right" name="arrow-right"></u-icon>
|
| | | </u-form-item> -->
|
| | | <u-form-item label="场所名称" required class="form-item" prop="placeName">
|
| | | <u--input border="none" v-model="form.placeName" placeholder="请填写场所名称"></u--input>
|
| | | </u-form-item>
|
| | | <u-form-item label="法人信息" required class="form-item" prop="legalPerson">
|
| | | <u--input border="none" v-model="form.legalPerson" placeholder="请填写法人信息"></u--input>
|
| | | </u-form-item>
|
| | | <!-- <u-form-item label="法人身份证" :required="isRequired" class="form-item" prop="legalIdCard">
|
| | | <u--input border="none" v-model="form.legalIdCard" placeholder="请填写法人身份证"></u--input>
|
| | | </u-form-item> -->
|
| | | <u-form-item label="法人电话" class="form-item" prop="legalTel" required>
|
| | | <u--input border="none" type="number" v-model="form.legalTel" placeholder="请填写法人电话"></u--input>
|
| | | </u-form-item>
|
| | | </u-form>
|
| | | </view>
|
| | | <!-- <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="微信号:"
|
| | | prop="legalWxAccount">
|
| | | <u--input border="none" type="idcard" v-model="form.legalWxAccount" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | |
|
| | | <u-form-item @click="showGenderPicker = true" class="form-item" label="性别" prop="legalGender">
|
| | | <u--input border="none" v-model="genderValue" disabled disabledColor="#ffffff"
|
| | | placeholder="请选择性别">
|
| | | </u--input>
|
| | | <u-icon slot="right" name="arrow-right"></u-icon>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="年龄:"
|
| | | prop="legalAge">
|
| | | <u--input border="none" type="number" v-model="form.legalAge" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item @click="showNationPicker = true" class="form-item" label="民族" prop="ethnicity">
|
| | | <u--input border="none" v-model="nationValue" disabled disabledColor="#ffffff"
|
| | | placeholder="请选择民族">
|
| | | </u--input>
|
| | | <u-icon slot="right" name="arrow-right"></u-icon>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="工作单位:"
|
| | | prop="employer">
|
| | | <u--input border="none" type="idcard" v-model="form.employer" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="岗位性质:"
|
| | | prop="legalJobNature">
|
| | | <u--input border="none" type="idcard" v-model="form.legalJobNature" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="户籍地址:"
|
| | | prop="legalRegisteredAddress">
|
| | | <u--textarea border="none" type="idcard" v-model="form.legalRegisteredAddress"
|
| | | placeholder="请输入">
|
| | | </u--textarea>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="居住地址:"
|
| | | prop="legalTempAddress">
|
| | | <u--textarea border="none" type="idcard" v-model="form.legalTempAddress" placeholder="请输入">
|
| | | </u--textarea>
|
| | | </u-form-item> -->
|
| | |
|
| | | </view>
|
| | |
|
| | |
|
| | | <view class="item bgc-ff mt-20">
|
| | |
|
| | | <view class="box-title">
|
| | | <box-title title="房东信息"></box-title>
|
| | | </view>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="姓名:" prop="landlordName">
|
| | | <u--input border="none" v-model="form.landlordName" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="身份证号:" prop="landlordIdCard">
|
| | | <u--input border="none" type="idcard" v-model="form.landlordIdCard" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="手机号:" prop="landlordPhone">
|
| | | <u--input border="none" type="number" v-model="form.landlordPhone" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="微信号:" prop="landlordWxAccount">
|
| | | <u--input border="none" v-model="form.landlordWxAccount" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | |
|
| | | </view>
|
| | | </u-form>
|
| | | <view class="license">
|
| | | <box-title title="营业执照"></box-title>
|
| | | <view class="upload-img">
|
| | |
| | | </view>
|
| | | </view>
|
| | | <view class="practitioner">
|
| | | <box-title title="从业人员信息"></box-title>
|
| | | <view class="info" v-for="(item, index) in personNum" :key="index">
|
| | | <view class="title">人员信息-#{{ index*1 + 1 }}</view>
|
| | | <view style="padding:20rpx 30rpx;">
|
| | | <box-title title="从业人员信息"></box-title>
|
| | | </view>
|
| | | <view class="info" v-for="(item, index) in personNumArr" :key="index">
|
| | | <view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
|
| | | <view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
|
| | | <view>
|
| | | <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
|
| | | </view>
|
| | | </view>
|
| | | <formItem ref="formItemRef"></formItem>
|
| | | </view>
|
| | |
|
| | | <view class="add-person">
|
| | | <view class="add-person" style="padding:20rpx 30rpx;" v-if="!currentId">
|
| | | <u-button type="success" plain @click="addPerson">再加一人</u-button>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | |
|
| | | <u-popup :show="isShowPopup" mode="bottom" :round="12" closeable="true" @close="isShowPopup = false">
|
| | | <view class="popup-content">
|
| | | <view class="popup-title f-30">选择标准地址</view>
|
| | | <scroll-view class="popup-list" :scroll-y="true">
|
| | | <u-checkbox-group v-model="checkedPlace" iconPlacement="right" placement="column"
|
| | | @change="checkboxChange" shape="circle">
|
| | | <view class="popup-list-item flex j-c-s-b" v-for="(i,k) in placeList" :key="k">
|
| | | <text class="f-28" style="width:85%">{{i.addressName}}</text>
|
| | | <u-checkbox :name="k"></u-checkbox>
|
| | | </view>
|
| | |
|
| | | </u-checkbox-group>
|
| | | </scroll-view>
|
| | |
|
| | | </view>
|
| | |
|
| | | </u-popup>
|
| | |
|
| | | <u-picker :defaultIndex="nationTypeListIndex" :closeOnClickOverlay="true" :show="showNationPicker"
|
| | | :columns="[nationTypeList]" @close="showNationPicker = false" @cancel="showNationPicker = false"
|
| | | keyName="name" @confirm="confirmNation"></u-picker>
|
| | |
|
| | | <u-picker :defaultIndex="genderIndex" :closeOnClickOverlay="true" :show="showGenderPicker" :columns="[gender]"
|
| | | @close="showGenderPicker = false" @cancel="showGenderPicker = false" keyName="name"
|
| | | @confirm="confirmGender"></u-picker>
|
| | |
|
| | |
|
| | | <footer-btn @click="submit"></footer-btn>
|
| | |
| | | import {
|
| | | minioBaseUrl
|
| | | } from '@/common/setting'
|
| | | import {
|
| | | getPlaceList
|
| | | } from '@/api/place/place.js'
|
| | | import {
|
| | | bizDictionary
|
| | | } from '@/api/system/dict.js'
|
| | | export default {
|
| | | mixins: [uploadMixin],
|
| | | components: {
|
| | |
| | | legalPerson: '',
|
| | | legalTel: '',
|
| | | imageUrls: [],
|
| | | planImageUrls: []
|
| | | planImageUrls: [],
|
| | | houseCodeBinds: "",
|
| | | legalWxAccount: "",
|
| | | employer: "",
|
| | | legalAge: "",
|
| | | legalJobNature: "",
|
| | | legalRegisteredAddress: "",
|
| | | legalTempAddress: "",
|
| | | images: [],
|
| | | landlordName: "",
|
| | | landlordPhone: "",
|
| | | landlordIdCard: "",
|
| | | landlordWxAccount: ""
|
| | | },
|
| | | rules: {
|
| | | "location": {
|
| | |
| | | }
|
| | | ]
|
| | | },
|
| | | personNum: 1,
|
| | | personNum: 0,
|
| | | curSelectSite: {},
|
| | | jwd: ""
|
| | | jwd: "",
|
| | | placeList: [],
|
| | | isShowPopup: false,
|
| | | checkedPlace: [],
|
| | | addressNames: [],
|
| | | nationTypeList: [], //民族
|
| | | nationTypeIndex: [0],
|
| | | nationValue: "",
|
| | | gender: [{ //性别
|
| | | value: 1,
|
| | | name: '男',
|
| | | },
|
| | | {
|
| | | value: 0,
|
| | | name: '女',
|
| | | }
|
| | | ],
|
| | | genderIndex: [0],
|
| | | genderValue: "",
|
| | | showNationPicker: false,
|
| | | showGenderPicker: false,
|
| | | personNumArr: [],
|
| | | }
|
| | | },
|
| | | onShow() {
|
| | |
| | | onReady() {
|
| | | //onReady 为uni-app支持的生命周期之一
|
| | | this.$refs.form.setRules(this.rules)
|
| | |
|
| | | },
|
| | | mounted() {
|
| | | this.$nextTick(() => {
|
| | | this.getCsDetails()
|
| | | })
|
| | |
|
| | | async mounted() {
|
| | | await this.getBizDict();
|
| | | this.getCsDetails();
|
| | | },
|
| | |
|
| | | methods: {
|
| | |
|
| | |
|
| | | // 获取民族
|
| | | getBizDict() {
|
| | | const param = {
|
| | | code: "nationType"
|
| | | }
|
| | | bizDictionary(param).then(res => {
|
| | | if (res.code == 200) {
|
| | | res.data.forEach(e => {
|
| | | this.nationTypeList.push({
|
| | | name: e.dictValue,
|
| | | value: Number(e.dictKey)
|
| | | })
|
| | | })
|
| | | }
|
| | | })
|
| | | },
|
| | |
|
| | | checkboxChange(n) {
|
| | | console.log('change', n);
|
| | | let list = n;
|
| | | let ids = [];
|
| | | let names = []
|
| | | for (let i = 0, ii = list.length; i < ii; i++) {
|
| | | ids.push(this.placeList[list[i]].addressCode)
|
| | | names.push(this.placeList[list[i]].addressName)
|
| | | }
|
| | |
|
| | | this.$set(this.form, "houseCodeBinds", ids.join(","))
|
| | | this.addressNames = names;
|
| | | },
|
| | |
|
| | | getPlace(location) {
|
| | | getPlaceList({
|
| | | addressName: location
|
| | | }).then(res => {
|
| | | console.log(res)
|
| | | this.placeList = res.data;
|
| | | })
|
| | | },
|
| | |
|
| | | getLocation() {
|
| | | uni.chooseLocation({
|
| | | success: (res) => {
|
| | |
| | | }
|
| | | })
|
| | | },
|
| | |
|
| | | getCsDetails() {
|
| | | getPlaceDetail({
|
| | | placeId: this.curSelectSite.id
|
| | | }).then(detailRes => {
|
| | |
|
| | | const {
|
| | | code,
|
| | | data
|
| | |
| | | })
|
| | | return
|
| | | }
|
| | | this.getPlace(data.location);
|
| | | if (data.lat) {
|
| | | this.jwd = `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | this.personNum = placePractitioner.length
|
| | | this.personNumArr = placePractitioner;
|
| | | // const componetns = this.$refs.formItemRef || []
|
| | | placePractitioner.forEach((item, index) => {
|
| | | this.$nextTick(() => {
|
| | | if (item.ethnicity) {
|
| | | let obj = this.$getIndex(this.nationTypeList, item.ethnicity,
|
| | | "value", "name")
|
| | | this.$refs.formItemRef[index].nationValue = obj.name;
|
| | | this.$refs.formItemRef[index].nationTypeIndex = obj.index;
|
| | | }
|
| | |
|
| | | if (typeof(item.gender) == 'number') {
|
| | | let obj = this.$getIndex(this.$refs.formItemRef[index].gender, item
|
| | | .gender, "value", "name")
|
| | | this.$refs.formItemRef[index].genderValue = obj.name;
|
| | | this.$refs.formItemRef[index].genderIndex = obj.index;
|
| | | }
|
| | | if (item.employerImg == "" || item.employerImg == null) {
|
| | | item.employerImg = [];
|
| | | } else {
|
| | | item.employerImg = this.$setImageUrl(item.employerImg, 2)
|
| | | }
|
| | | this.$refs.formItemRef[index].form = item
|
| | | })
|
| | | })
|
| | |
|
| | | // this.$refs.formItemRef.forEach((item, index) => {
|
| | | // item.form = placePractitioner[index]
|
| | | // })
|
| | | })
|
| | | },
|
| | |
|
| | |
|
| | |
|
| | | //选择民族
|
| | | confirmNation(e) {
|
| | | this.nationIndex = e.indexs;
|
| | | this.nationValue = e.value[0].name;
|
| | | this.form.ethnicity = e.value[0].value;
|
| | | this.showNationPicker = false;
|
| | | },
|
| | |
|
| | | //选择性别
|
| | | confirmGender(e) {
|
| | | this.genderIndex = e.indexs;
|
| | | this.genderValue = e.value[0].name;
|
| | | this.form.legalGender = e.value[0].value;
|
| | | this.showGenderPicker = false;
|
| | | },
|
| | |
|
| | |
|
| | |
| | | })
|
| | | })
|
| | | },
|
| | | addPerson() {
|
| | | this.personNum++
|
| | | },
|
| | |
|
| | | submit() {
|
| | | if (this.personNum > 0) {
|
| | | const placePractitioner = []
|
| | | this.$refs.formItemRef.forEach(item => {
|
| | | console.log("item====>", item);
|
| | | item.form.placeId = this.form.placeId
|
| | | if (item.form.employerImg == null) {
|
| | | item.form.employerImg = "";
|
| | | } else {
|
| | | item.form.employerImg = this.$formattingUrls(item.form.employerImg);
|
| | | }
|
| | | // item.form.employerImg = "";
|
| | | placePractitioner.push(item.form)
|
| | | })
|
| | | this.form.placePractitioner = placePractitioner
|
| | |
| | |
|
| | | pushPage() {
|
| | | this.$u.func.globalNavigator(`/subPackage/workbench/views/cshw?placeId=${this.form.placeId}`)
|
| | | },
|
| | |
|
| | | addPerson() {
|
| | | this.personNum++
|
| | | this.personNumArr.push(1)
|
| | | },
|
| | |
|
| | | deletePerson(index) {
|
| | | this.personNum--;
|
| | | this.personNumArr.splice(index, 1)
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | border: 1rpx solid #EEEEEE;
|
| | | background-color: #fff;
|
| | | }
|
| | |
|
| | |
|
| | | .popup-content {
|
| | | width: 100%;
|
| | | padding: 0 30rpx 30rpx;
|
| | | box-sizing: border-box;
|
| | | background-color: #fff;
|
| | | // height: 800rpx;
|
| | |
|
| | | .popup-title {
|
| | | padding: 30rpx 0;
|
| | | text-align: center;
|
| | | font-weight: bold;
|
| | | }
|
| | |
|
| | | .popup-list {
|
| | | height: 600rpx;
|
| | | margin-top: 20rpx;
|
| | | }
|
| | |
|
| | | .popup-list-item {
|
| | | padding: 20rpx 0;
|
| | | border-bottom: 1px solid #f1f1f1;
|
| | | position: relative;
|
| | | }
|
| | |
|
| | | .address-name {
|
| | | width: 90%;
|
| | | }
|
| | |
|
| | | .check-icon {
|
| | | position: absolute;
|
| | | right: 20rpx;
|
| | | top: 20rpx;
|
| | | }
|
| | | }
|
| | |
|
| | | .item {
|
| | | padding: 0 30rpx;
|
| | | border-radius: 8rpx;
|
| | | }
|
| | | </style> |