123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645 |
- <template>
- <view class="page" :style="{'min-height':(h)+'px','padding-top':mt+'px'}">
- <c-nav-bar title="商户信息"></c-nav-bar>
- <view class="tenant-title">
- <text>基本信息</text>
- </view>
- <view class="from-content">
- <view class="one-realName">
- <view class="realName">
- 商户名称
- </view>
- <!-- <u--input v-model="realName" border="none" pl ></u--input> -->
- <view class="right">
- <input type="text" v-model="list.name" border="none" placeholder="请输入昵称" />
- </view>
- </view>
- <view class="one" @click="nav">
- <view class="">
- 商户类型
- </view>
- <view class="" v-if="">
- 渔家乐
- </view>
- <!-- <view class="right">
- <input type="text" v-model="list.phone" border="none" placeholder="请输入" style="height: 48rpx;" />
- </view> -->
- </view>
- <view class="one-mobile">
- <view class="mobile">
- 企业名称
- </view>
- <view class="right">
- <input type="text" v-model="list.companyName" border="none" placeholder="请输入"
- style="height: 48rpx;" />
- </view>
- </view>
- <view class="one">
- <view class="">
- 企业类型
- </view>
- <view class="right">
- <input type="text" v-model="companyType" border="none" placeholder="请输入"
- style="height: 48rpx; text-align: right;" />
- </view>
- </view>
- <view class="one-mobile">
- <view class="mobile">
- 企业法人
- </view>
- <view class="right">
- <input type="text" v-model="list.legalPerson" border="none" placeholder="请输入"
- style="height: 48rpx;" />
- </view>
- </view>
- <view class="one-mobile">
- <view class="mobile">
- 法人身份证号码
- </view>
- <view class="right">
- <input type="text" v-model="list.idCard" border="none" placeholder="请输入" style="height: 48rpx;" />
- </view>
- </view>
- <view class="one-mobile">
- <view class="mobile" style="width: 350rpx;">
- 统一社会信用代码
- </view>
- <view class="right">
- <input type="text" v-model="list.creditCode" border="none" placeholder="请输入"
- style="height: 48rpx;" />
- </view>
- </view>
- <view class="one-mobile">
- <view class="mobile">
- 企业地址
- </view>
- <view class="right">
- <input type="text" v-model="list.areaDetail" border="none" placeholder="请输入"
- style="height: 48rpx;" />
- </view>
- </view>
- </view>
- <view class="tenant-title">
- <text>联系人信息</text>
- </view>
- <view class="from-content">
- <view class="one-mobile">
- <view class="mobile">
- 联系人姓名
- </view>
- <view class="right">
- <input type="text" v-model="list.linkName" border="none" placeholder="请输入" style="height: 48rpx;" />
- </view>
- </view>
- <view class="one-mobile">
- <view class="mobile">
- 联系人号码
- </view>
- <view class="right">
- <input type="text" v-model="list.phone" border="none" placeholder="请输入" style="height: 48rpx;" />
- </view>
- </view>
- </view>
- <view class="tenant-title">
- <text>商家相册</text>
- </view>
- <view class="from-content" style="padding: 30rpx;">
- <view class="tenant-image">
- <view @click="idCardReverse">
- <image :src="list.idCardReverse" mode=""></image>
- <view>法人身份证国徽面</view>
- </view>
- <view @click="idCardFront">
- <image :src="list.idCardFront" mode=""></image>
- <view>法人身份证人像面</view>
- </view>
- <view @click="licensePic">
- <image :src="list.licensePic" mode=""></image>
- <view>营业执照</view>
- </view>
- <!-- <view @click="usccl">
- <image :src="list.usccl" mode=""></image>
- <view>统一社会信息代码证</view>
- </view> -->
- <view @click="shopSign">
- <image :src="list.storeFrontPic" mode=""></image>
- <view>门头照/店铺照片</view>
- </view>
- <!-- <view @click="shopImgs">
- <image :src="list.shopImgs" mode=""></image>
- <view>店铺照片</view>
- </view> -->
- </view>
- </view>
- <!-- 选择弹框学历要求 -->
- <u-popup :show="showTwo" @close="close" :round="24" @open="open">
- <view class="pop">
- <view class="hander">
- <view class="left" @click="showTwo=false">
- 取消
- </view>
- <view class="center">
- <!-- 学历要求 -->
- </view>
- <view class="right" @click="showTwo=false">
- 确定
- </view>
- </view>
- <view class="At-last" v-for="item,index in JobList">
- <view class="item" @click="choose(item,index)" :class="indexDb==index?'activeItem':''">
- {{item.name}}
- </view>
- </view>
- </view>
- </u-popup>
- <view class="from-content">
- <button class="tenant-button" @click="merchant">
- 立即保存
- </button>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- h: uni.getSystemInfoSync().windowHeight - 87,
- mt: uni.getSystemInfoSync().statusBarHeight + 44,
- titleHeader: '个人信息',
- fileList: [],
- JobList: [{
- name: '不限'
- }, {
- name: '高中',
- },
- {
- name: '中专/技校',
- },
- {
- name: '大专',
- },
- {
- name: '本科',
- },
- {
- name: '硕士',
- }
- ],
- fishermanId: uni.getStorageSync('merchantId'),
- merchantType: uni.getStorageSync('merchantType'),
- list: {},
- dto: {
- name: '', //商户名称
- companyName: '', //企业名称
- merchantType: 10, //商户类型
- companyType: '', //企业类型
- legalPerson: '', //企业法人
- idCard: '', //法人身份证号码
- creditCode: '', //统一社区信用代码
- areaDetail: '', //企业地址
- linkName: '', //联系人姓名
- phone: '', //联系人号码
- idCardFront: '', //法人身份证国徽面
- idCardReverse: '', //法人身份证人像面
- licensePic: '', //营业执照
- // usccl: '', //统一社会信息代码证
- storeFrontPic: '', //门头照
- shopImgs: '', //店铺照片
- id: '',
- areaDetail: '', //企业地址
- },
- typeList: {},
- companyType: ''
- }
- },
- onLoad() {
- this.getList()
- },
- methods: {
- // 获取数据
- getList() {
- // this.$api.get('/merchant/merchantFisherman/home?id=' + this.homestayId).then(res => {
- // console.log(res.data);
- // })
- let id = this.fishermanId
- this.$api.get(`/api/merchant/food/merchant/${id}`).then(res => {
- console.log(res.data);
- this.list = res.data.data
- this.getDict()
- })
- },
- // 获取企业类型字典
- getDict() {
- this.$api.get('/sys/dict/type/all').then(res => {
- console.log(res.data)
- //this.$store.state.Dict = Object.assign(res.data);
- // this.dictValue
- this.typeList = res.data.data.find((p) => p.dictType == 'CompanyType').dataList;
- console.log(this.typeList);
- this.companyType = this.typeList.find((p) => p.dictValue == this.list.companyType).dictLabel
- console.log(this.companyType);
- })
- },
- // 立即保存
- merchant() {
- this.dto.idCardFront = this.list.idCardFront
- this.dto.name = this.list.name
- this.dto.companyName = this.list.companyName
- this.dto.merchantType = this.list.merchantType
- this.dto.companyType = this.list.companyType
- this.dto.legalPerson = this.list.legalPerson
- this.dto.idCard = this.list.idCard
- this.dto.creditCode = this.list.creditCode
- this.dto.idCardReverse = this.list.idCardReverse
- this.dto.licensePic = this.list.licensePic
- // this.dto.usccl = this.list.usccl
- this.dto.storeFrontPic = this.list.storeFrontPic
- this.dto.shopImgs = this.list.shopImgs
- this.dto.linkName = this.list.linkName
- this.dto.phone = this.list.phone
- this.dto.areaDetail = this.list.areaDetail
- this.dto.id = uni.getStorageSync('merchantId')
- this.$api.put('/api/merchant/food/updateMerchantInfo', this.dto).then(res => {
- console.log('0000', res.data);
- if (res.data.code == 0) {
- this.$showToast('保存成功');
- setTimeout(() => {
- this.getList()
- }, 1000)
- }
- })
- },
- // 上传头像法人身份证国徽面
- idCardFront() {
- uni.chooseImage({
- sourceType: ['album'], //从相册选择
- success: chooseImageRes => {
- const tempFilePaths = chooseImageRes.tempFilePaths;
- uni.uploadFile({
- url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
- filePath: tempFilePaths[0],
- name: 'file',
- header: {
- token: wx.getStorageSync('access_token')
- },
- success: res => {
- // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
- let data = JSON.parse(res.data);
- this.dto.idCardFront = data.data.url
- this.list.idCardFront = data.data.url
- }
- });
- },
- fail: err => {
- this.myToast('图片上传失败', 'none');
- }
- });
- },
- // 上传法人身份证人像面
- idCardReverse() {
- uni.chooseImage({
- sourceType: ['album'], //从相册选择
- success: chooseImageRes => {
- const tempFilePaths = chooseImageRes.tempFilePaths;
- uni.uploadFile({
- url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
- filePath: tempFilePaths[0],
- name: 'file',
- header: {
- token: wx.getStorageSync('access_token')
- },
- success: res => {
- // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
- let data = JSON.parse(res.data);
- this.dto.idCardReverse = data.data.url
- this.list.idCardReverse = data.data.url
- }
- });
- },
- fail: err => {
- this.myToast('图片上传失败', 'none');
- }
- });
- }, // 上传营业执照
- licensePic() {
- uni.chooseImage({
- sourceType: ['album'], //从相册选择
- success: chooseImageRes => {
- const tempFilePaths = chooseImageRes.tempFilePaths;
- uni.uploadFile({
- url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
- filePath: tempFilePaths[0],
- name: 'file',
- header: {
- token: wx.getStorageSync('access_token')
- },
- success: res => {
- // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
- let data = JSON.parse(res.data);
- this.dto.licensePic = data.data.url
- this.list.licensePic = data.data.url
- }
- });
- },
- fail: err => {
- this.myToast('图片上传失败', 'none');
- }
- });
- }, // 上传统一社会信息代码证
- // usccl() {
- // uni.chooseImage({
- // sourceType: ['album'], //从相册选择
- // success: chooseImageRes => {
- // const tempFilePaths = chooseImageRes.tempFilePaths;
- // uni.uploadFile({
- // url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
- // filePath: tempFilePaths[0],
- // name: 'file',
- // header: {
- // token: wx.getStorageSync('access_token')
- // },
- // success: res => {
- // // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
- // let data = JSON.parse(res.data);
- // this.dto.usccl = data.data.url
- // this.list.usccl = data.data.url
- // }
- // });
- // },
- // fail: err => {
- // this.myToast('图片上传失败', 'none');
- // }
- // });
- // }, // 上传门头照
- shopSign() {
- uni.chooseImage({
- sourceType: ['album'], //从相册选择
- success: chooseImageRes => {
- const tempFilePaths = chooseImageRes.tempFilePaths;
- uni.uploadFile({
- url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
- filePath: tempFilePaths[0],
- name: 'file',
- header: {
- token: wx.getStorageSync('access_token')
- },
- success: res => {
- // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
- let data = JSON.parse(res.data);
- this.dto.storeFrontPic = data.data.url
- this.list.storeFrontPic = data.data.url
- }
- });
- },
- fail: err => {
- this.myToast('图片上传失败', 'none');
- }
- });
- }, // 上传店铺照片
- shopImgs() {
- uni.chooseImage({
- sourceType: ['album'], //从相册选择
- success: chooseImageRes => {
- const tempFilePaths = chooseImageRes.tempFilePaths;
- uni.uploadFile({
- url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
- filePath: tempFilePaths[0],
- name: 'file',
- header: {
- token: wx.getStorageSync('access_token')
- },
- success: res => {
- // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
- let data = JSON.parse(res.data);
- this.dto.shopImgs = data.data.url
- this.list.shopImgs = data.data.url
- }
- });
- },
- fail: err => {
- this.myToast('图片上传失败', 'none');
- }
- });
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .page {
- box-sizing: border-box;
- // padding: 30rpx;
- // padding-top: 150rpx;
- }
- //标题样式
- .tenant-title {
- height: 88rpx;
- background: #F5F8FA;
- padding-left: 30rpx;
- text {
- line-height: 88rpx;
- font-size: 28rpx;
- color: #007A69;
- }
- }
- //商家相册样式
- .tenant-image {
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-around;
- >view {
- width: 47%;
- text-align: center;
- image {
- width: 100%;
- height: 212rpx;
- background: #F6F8F9;
- }
- view {
- margin: 15rpx 0 45rpx 0;
- }
- }
- }
- //保存样式
- .tenant-button {
- background: #007A69;
- border-radius: 40rpx;
- font-weight: bold;
- font-size: 28rpx;
- color: #FFFFFF;
- height: 88rpx;
- line-height: 88rpx;
- }
- .from-content {
- padding: 30rpx;
- .title {
- margin: 40rpx 0 36rpx;
- font-size: 30rpx;
- font-weight: Regular;
- color: #111111;
- }
- .one-image {
- width: 100%;
- display: flex;
- justify-content: space-between;
- .image {
- width: 124rpx;
- height: 124rpx;
- border-radius: 100rpx;
- image {
- width: 100%;
- height: 100%;
- border-radius: 100rpx;
- }
- }
- .user {
- margin-top: 24rpx;
- font-size: 30rpx;
- color: #111;
- font-weight: Regular;
- }
- }
- .one-realName {
- width: 100%;
- display: flex;
- align-items: center;
- height: 120rpx;
- line-height: 120rpx;
- border-bottom: 1rpx solid #EFEFEF;
- .realName {
- width: 188rpx;
- height: 120rpx;
- font-size: 30rpx;
- color: #333333;
- font-weight: Regular;
- }
- .right {
- text-align: right;
- width: 100%;
- font-size: 30rpx;
- color: #666666;
- font-weight: Regular;
- // display: flex;
- // justify-content: space-between;
- }
- }
- .one-mobile {
- display: flex;
- width: 100%;
- align-items: center;
- height: 120rpx;
- line-height: 120rpx;
- border-bottom: 1rpx solid #EFEFEF;
- .right {
- width: 100%;
- text-align: right;
- font-size: 30rpx;
- color: #666666;
- font-weight: Regular;
- }
- .mobile {
- width: 380rpx !important;
- height: 120rpx;
- font-size: 30rpx;
- color: #333333;
- font-weight: Regular;
- }
- .replacement {
- border-radius: 50rpx;
- width: 80rpx;
- height: 48rpx;
- line-height: 48rpx;
- border: 1rpx solid #025EA7;
- color: #025EA7;
- font-weight: Regular;
- font-size: 24rpx;
- text-align: center;
- }
- }
- .one {
- height: 120rpx;
- line-height: 120rpx;
- display: flex;
- border-bottom: 1rpx solid #EFEFEF;
- justify-content: space-between;
- align-items: center;
- font-size: 30rpx;
- color: #333333;
- font-weight: Regular;
- }
- }
- .btn {
- margin: 120rpx auto;
- width: 650rpx;
- height: 88rpx;
- display: flex;
- background-color: #01B9F9;
- line-height: 88rpx;
- border-radius: 50rpx;
- .btn-btn {
- margin: 0 auto;
- font-size: 32rpx;
- color: #FFFFFF;
- font-weight: Regular;
- }
- }
- </style>
|