| | |
| | | <view class="lxfx"> |
| | | <view class="lxfxbiaoti">名片类型:</view> |
| | | <view class="lxfxnrr"> |
| | | <picker @change="changeIlk" :range="ilkList" :range-key="'name'" class="lxfxneirong" mode="selector"> |
| | | <picker @change="changeIlk" :range="ilkList" :range-key="'name'" class="lxfxneirong" |
| | | mode="selector"> |
| | | <view class="picker-content"> |
| | | {{selectedIlk.name || '请选择名片类型'}} |
| | | <text class="icon iconfont icon-jiantou"></text> |
| | |
| | | <view class="lxfxbiaoti">行业:</view> |
| | | <view class="lxfxnrr"> |
| | | <input class="lxfxneirong" :value="industryNmae" disabled readonly> |
| | | <input style="display: none;" type="hidden" name="industry_id" v-model="business.industry_id"> |
| | | <input style="display: none;" type="hidden" name="industry_id" |
| | | v-model="business.industry_id"> |
| | | </view> |
| | | </view> |
| | | <view class="lxfx"> |
| | | <view class="lxfxbiaoti">所在地区:</view> |
| | | <view class="lxfxnrr"> |
| | | <input class="lxfxneirong" :value="selectCity" disabled="true" @click="showMulLinkageThreePicker" placeholder="请选择省市区"> |
| | | <input style="display: none;" type="hidden" name="province_id" v-model="business.province_id"> |
| | | <input class="lxfxneirong" :value="selectCity" disabled="true" |
| | | @click="showMulLinkageThreePicker" placeholder="请选择省市区"> |
| | | <input style="display: none;" type="hidden" name="province_id" |
| | | v-model="business.province_id"> |
| | | <input style="display: none;" type="hidden" name="city_id" v-model="business.city_id"> |
| | | <input style="display: none;" type="hidden" name="region_id" v-model="business.region_id"> |
| | | <input style="display: none;" type="hidden" name="region_id" |
| | | v-model="business.region_id"> |
| | | </view> |
| | | </view> |
| | | <view class="lxfx"> |
| | |
| | | <scroll-view scroll-y="true" style="height: 600rpx;"> |
| | | <!-- 递归展示行业树形结构 --> |
| | | <view v-for="item in industryList" :key="item.industry_id"> |
| | | <view class="industry-item" |
| | | @tap="selectIndustry" :data-id="item.industry_id" |
| | | <view class="industry-item" @tap="selectIndustry" :data-id="item.industry_id" |
| | | :class="{ 'selected': business.industry_id == item.industry_id }"> |
| | | {{ item.name }} |
| | | </view> |
| | | <!-- 显示子行业 --> |
| | | <view v-if="item.child && item.child.length > 0" class="industry-child"> |
| | | <view class="industry-item industry-child-item" |
| | | v-for="child in item.child" :key="child.industry_id" |
| | | @tap="selectIndustry" :data-id="child.industry_id" |
| | | <view class="industry-item industry-child-item" v-for="child in item.child" |
| | | :key="child.industry_id" @tap="selectIndustry" :data-id="child.industry_id" |
| | | :class="{ 'selected': business.industry_id == child.industry_id }"> |
| | | {{ child.name }} |
| | | </view> |
| | |
| | | </scroll-view> |
| | | </view> |
| | | </Popup> |
| | | <mpvue-city-picker v-if="is_load" ref="mpvueCityPicker" :province="province" :city="city" :area="area" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onConfirm"></mpvue-city-picker> |
| | | <mpvue-city-picker v-if="is_load" ref="mpvueCityPicker" :province="province" :city="city" :area="area" |
| | | :pickerValueDefault="cityPickerValueDefault" @onConfirm="onConfirm"></mpvue-city-picker> |
| | | </view> |
| | | </form> |
| | | </view> |
| | |
| | | })); |
| | | // 尝试根据id查找,id可能是字符串或数字 |
| | | const ilkId = String(_this.business.ilk); |
| | | _this.selectedIlk = _this.ilkList.find(item => item.id === ilkId) || {}; |
| | | _this.selectedIlk = _this.ilkList.find(item => item.id === |
| | | ilkId) || {}; |
| | | } |
| | | }) |
| | | } |
| | |
| | | this._post('plus.business.industry/getIndustryTree', {}, res => { |
| | | if (res.data) { |
| | | _this.industryList = res.data.tree; |
| | | _this.findIndustryName(_this.industryList, _this.business.industry_id); |
| | | _this.findIndustryName(_this.industryList, _this.business |
| | | .industry_id); |
| | | } |
| | | }) |
| | | } |