|
@@ -21,8 +21,10 @@
|
|
|
</view>
|
|
|
<view class="">
|
|
|
渔家乐
|
|
|
- <!-- <u-icon name="arrow-right"></u-icon> -->
|
|
|
</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">
|
|
@@ -33,13 +35,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="one" @click="nav">
|
|
|
+ <view class="one">
|
|
|
<view class="">
|
|
|
企业类型
|
|
|
</view>
|
|
|
- <view class="">
|
|
|
- <!-- <u-icon name="arrow-right"></u-icon> -->
|
|
|
- 渔家乐
|
|
|
+ <view class="right">
|
|
|
+ <input type="text" v-model="companyType" border="none" placeholder="请输入"
|
|
|
+ style="height: 48rpx; text-align: right;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -47,8 +49,10 @@
|
|
|
<view class="mobile">
|
|
|
企业法人
|
|
|
</view>
|
|
|
+
|
|
|
<view class="right">
|
|
|
- {{list.legalPerson}}
|
|
|
+ <input type="text" v-model="list.legalPerson" border="none" placeholder="请输入"
|
|
|
+ style="height: 48rpx;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -56,8 +60,9 @@
|
|
|
<view class="mobile">
|
|
|
法人身份证号码
|
|
|
</view>
|
|
|
+
|
|
|
<view class="right">
|
|
|
- {{list.idCard}}
|
|
|
+ <input type="text" v-model="list.idCard" border="none" placeholder="请输入" style="height: 48rpx;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -65,8 +70,10 @@
|
|
|
<view class="mobile" style="width: 350rpx;">
|
|
|
统一社区信用代码
|
|
|
</view>
|
|
|
+
|
|
|
<view class="right">
|
|
|
- {{list.creditCode}}
|
|
|
+ <input type="text" v-model="list.creditCode" border="none" placeholder="请输入"
|
|
|
+ style="height: 48rpx;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -75,7 +82,8 @@
|
|
|
企业地址
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
- {{list.areaDetail}}
|
|
|
+ <input type="text" v-model="list.areaDetail" border="none" placeholder="请输入"
|
|
|
+ style="height: 48rpx;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -89,8 +97,9 @@
|
|
|
<view class="mobile">
|
|
|
联系人姓名
|
|
|
</view>
|
|
|
+
|
|
|
<view class="right">
|
|
|
- {{list.linkName}}
|
|
|
+ <input type="text" v-model="list.linkName" border="none" placeholder="请输入" style="height: 48rpx;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -98,8 +107,9 @@
|
|
|
<view class="mobile">
|
|
|
联系人号码
|
|
|
</view>
|
|
|
+
|
|
|
<view class="right">
|
|
|
- {{list.phone}}
|
|
|
+ <input type="text" v-model="list.phone" border="none" placeholder="请输入" style="height: 48rpx;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -109,27 +119,27 @@
|
|
|
</view>
|
|
|
<view class="from-content" style="padding: 30rpx;">
|
|
|
<view class="tenant-image">
|
|
|
- <view>
|
|
|
+ <view @click="idCardFront">
|
|
|
<image :src="list.idCardFront" mode=""></image>
|
|
|
<view>法人身份证国徽面</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="idCardReverse">
|
|
|
<image :src="list.idCardReverse" mode=""></image>
|
|
|
<view>法人身份证人像面</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="licensePic">
|
|
|
<image :src="list.licensePic" mode=""></image>
|
|
|
<view>营业执照</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="usccl">
|
|
|
<image :src="list.usccl" mode=""></image>
|
|
|
<view>统一社会信息代码证</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="shopSign">
|
|
|
<image :src="list.shopSign" mode=""></image>
|
|
|
<view>门头照</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view @click="shopImgs">
|
|
|
<image :src="list.shopImgs" mode=""></image>
|
|
|
<view>店铺照片</view>
|
|
|
</view>
|
|
@@ -161,7 +171,7 @@
|
|
|
</u-popup>
|
|
|
|
|
|
<view class="from-content">
|
|
|
- <button class="tenant-button">
|
|
|
+ <button class="tenant-button" @click="merchant">
|
|
|
立即保存
|
|
|
</button>
|
|
|
</view>
|
|
@@ -194,24 +204,82 @@
|
|
|
name: '硕士',
|
|
|
}
|
|
|
],
|
|
|
+ fishermanId: uni.getStorageSync('merchantId'),
|
|
|
+ list: {},
|
|
|
dto: {
|
|
|
- realName: '黄沙村渔家乐', //昵称
|
|
|
- modifyPhone: '18755113256', //手机号
|
|
|
- headUrl: '', // 头像
|
|
|
- idCode: '', // 证件号
|
|
|
+ name: '', //商户名称
|
|
|
+ busName: '', //企业名称
|
|
|
+ merchantType: 10, //商户类型
|
|
|
+ companyType: '', //企业类型
|
|
|
+ legalPerson: '', //企业法人
|
|
|
+ idCard: '', //法人身份证号码
|
|
|
+ creditCode: '', //统一社区信用代码
|
|
|
+ areaDetail: '', //企业地址
|
|
|
+ linkName: '', //联系人姓名
|
|
|
+ phone: '', //联系人号码
|
|
|
+ idCardFront: '', //法人身份证国徽面
|
|
|
+ idCardReverse: '', //法人身份证人像面
|
|
|
+ licensePic: '', //营业执照
|
|
|
+ usccl: '', //统一社会信息代码证
|
|
|
+ shopSign: '', //门头照
|
|
|
+ shopImgs: '', //店铺照片
|
|
|
id: ''
|
|
|
},
|
|
|
- fishermanId: uni.getStorageSync('merchantId'),
|
|
|
- list: {}
|
|
|
+ typeList: {},
|
|
|
+ companyType: ''
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.getList()
|
|
|
+ this.getDict()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- // 上传头像
|
|
|
- upImage() {
|
|
|
+ // 获取数据
|
|
|
+ getList() {
|
|
|
+ // this.$api.get('/merchant/merchantFisherman/home?id=' + this.homestayId).then(res => {
|
|
|
+ // console.log(res.data);
|
|
|
+ // })
|
|
|
+ let id = this.fishermanId
|
|
|
+ this.$api.get(`/merchant/merchantFisherman/home/${id}`).then(res => {
|
|
|
+ console.log(res.data);
|
|
|
+ this.list = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取企业类型字典
|
|
|
+ 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.name = this.list.name
|
|
|
+ this.dto.busName = this.list.busName
|
|
|
+ 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.shopSign = this.list.shopSign
|
|
|
+ this.dto.shopImgs = this.list.shopImgs
|
|
|
+ this.dto.id = uni.getStorageSync('merchantId')
|
|
|
+
|
|
|
+ this.$api.put('/merchant/merchantFisherman/home', this.dto).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 上传头像法人身份证国徽面
|
|
|
+ idCardFront() {
|
|
|
uni.chooseImage({
|
|
|
sourceType: ['album'], //从相册选择
|
|
|
success: chooseImageRes => {
|
|
@@ -226,7 +294,8 @@
|
|
|
success: res => {
|
|
|
// uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
|
|
|
let data = JSON.parse(res.data);
|
|
|
- this.dto.headUrl = data.data.url
|
|
|
+ this.dto.idCardFront = data.data.url
|
|
|
+ this.list.idCardFront = data.data.url
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -236,18 +305,137 @@
|
|
|
});
|
|
|
|
|
|
},
|
|
|
+ // 上传法人身份证人像面
|
|
|
+ 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');
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- getList() {
|
|
|
- // this.$api.get('/merchant/merchantFisherman/home?id=' + this.homestayId).then(res => {
|
|
|
- // console.log(res.data);
|
|
|
- // })
|
|
|
- let id = this.fishermanId
|
|
|
- this.$api.get(`/merchant/merchantFisherman/home/${id}`).then(res => {
|
|
|
- console.log(res.data);
|
|
|
- this.list = res.data.data
|
|
|
- })
|
|
|
- }
|
|
|
+ }, // 上传营业执照
|
|
|
+ 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.shopSign = data.data.url
|
|
|
+ this.list.shopSign = 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');
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
+ },
|
|
|
}
|
|
|
|
|
|
|