|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<view class="top"></view>
|
|
|
- <u-navbar title="店铺设置" :autoBack="true" :placeholder="true"></u-navbar>
|
|
|
+ <u-navbar title="店铺设置" :autoBack="false" :placeholder="true" @click='goPage'></u-navbar>
|
|
|
<view class='pub-box'>
|
|
|
<view class='title-box'>
|
|
|
<view class='title'>开票信息</view>
|
|
|
@@ -13,7 +13,7 @@
|
|
|
<view class="type" v-if='item.status'>{{item.status}}</view>
|
|
|
</view>
|
|
|
<view class="u-flex u-flex-1 u-row-right">
|
|
|
- <view class='item-p one-line-text' :class='{active:item.isHas}'>{{item.content}}</view>
|
|
|
+ <view class='item-p one-line-text' :class='item.class'>{{item.content}}</view>
|
|
|
<u-icon v-if='item.isMore' class="icon" name="arrow-right"></u-icon>
|
|
|
<view v-else class="pls"></view>
|
|
|
</view>
|
|
|
@@ -29,7 +29,7 @@
|
|
|
<view>设施服务</view>
|
|
|
</view>
|
|
|
<view class="u-flex">
|
|
|
- <view class='item-p'>{{indexOption.content?'已配置':'去配置'}}</view>
|
|
|
+ <view :class="indexOption.content?'active':'item-p'">{{indexOption.content?'已配置':'去配置'}}</view>
|
|
|
<u-icon class="icon" name="arrow-right"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -45,7 +45,7 @@
|
|
|
|
|
|
</view>
|
|
|
<view class="u-flex">
|
|
|
- <view class='item-p'>已配置</view>
|
|
|
+ <view class="active">已配置</view>
|
|
|
<u-icon class="icon" name="arrow-right"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -55,14 +55,14 @@
|
|
|
<view class="type">{{filterType(shopStatus.status)}}</view>
|
|
|
</view>
|
|
|
<view class="u-flex">
|
|
|
- <view class='item-p'>已配置</view>
|
|
|
+ <view class="active">已配置</view>
|
|
|
<u-icon class="icon" name="arrow-right"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 店铺名称 -->
|
|
|
- <TipModal :isShow="modalShow" title='店铺名称' @close='modalShow=false' @sure='sure'></TipModal>
|
|
|
+ <TipModal :isShow="modalShow" title='店铺名称' @close='modalShow=false' @sure='storeSure' ref='storeRef'></TipModal>
|
|
|
<!-- 开业时间 -->
|
|
|
<u-picker v-model="timeShow" mode="time" @confirm="selectTime" title='开业时间'></u-picker>
|
|
|
<!-- 门店电话 -->
|
|
|
@@ -130,10 +130,10 @@ export default {
|
|
|
selectedTags: [], // 用于存储被选中的标签索引
|
|
|
selectedBus: [], // 用于存储被选中的标签索引
|
|
|
shopStatus: {
|
|
|
- status:null
|
|
|
+ status: null
|
|
|
}, //经营资质审核状态
|
|
|
nameStatus: {
|
|
|
- status:null
|
|
|
+ status: null
|
|
|
}, //门店名称审核状态
|
|
|
renovationStatus: "", //装修审核状态
|
|
|
typeArr: [{
|
|
|
@@ -166,60 +166,59 @@ export default {
|
|
|
return [
|
|
|
{
|
|
|
title: '店铺logo',
|
|
|
- content: '去配置',
|
|
|
+ content: data.logo || '去配置',
|
|
|
+ class: `${data.logo ? 'active' : 'item-p'}`,
|
|
|
status: false, //是否有状态
|
|
|
isMore: true, //是否显示更多
|
|
|
- isHas: true, //是否配置了
|
|
|
type: 1
|
|
|
},
|
|
|
{
|
|
|
title: '门店名称',
|
|
|
content: data.storeName || '去配置',
|
|
|
status: this.filterType(this.nameStatus.status),
|
|
|
+ class: `${data.storeName ? 'active' : 'item-p'}`,
|
|
|
isMore: true,
|
|
|
- isHas: false,
|
|
|
type: 2
|
|
|
},
|
|
|
{
|
|
|
title: '营业状态',
|
|
|
content: this.filterStatus(data.merchantStatus) || '去配置',
|
|
|
+ class: `${data.merchantStatus ? 'active' : 'item-p'}`,
|
|
|
isMore: true,
|
|
|
- isHas: true,
|
|
|
type: 3
|
|
|
},
|
|
|
{
|
|
|
title: '营业时间',
|
|
|
content: ` ${!data.contentStatus ? "去配置" : '已配置'} `,
|
|
|
+ class: `${data.contentStatus ? 'active' : 'item-p'}`,
|
|
|
isMore: true,
|
|
|
- isHas: true,
|
|
|
type: 4
|
|
|
},
|
|
|
// {
|
|
|
// title: '开业时间',
|
|
|
// content: data.openingTime || '去配置',
|
|
|
// isMore: true,
|
|
|
- // isHas: true,
|
|
|
// type: 5
|
|
|
// },
|
|
|
{
|
|
|
title: '门店分类',
|
|
|
content: data.qualificationList && data.qualificationList[0].categoryName,
|
|
|
+ class: `${data.qualificationList && data.qualificationList[0].categoryName ? 'active' : 'item-p'}`,
|
|
|
isMore: false,
|
|
|
- isHas: true,
|
|
|
type: 6
|
|
|
},
|
|
|
{
|
|
|
title: '门店电话',
|
|
|
content: data.storePhone || '去配置',
|
|
|
+ class: `${data.storePhone ? 'active' : 'item-p'}`,
|
|
|
isMore: true,
|
|
|
- isHas: true,
|
|
|
type: 7
|
|
|
},
|
|
|
{
|
|
|
title: '门店地址',
|
|
|
content: data.address || '去配置',
|
|
|
+ class: `${data.address ? 'active' : 'item-p'}`,
|
|
|
isMore: true,
|
|
|
- isHas: true,
|
|
|
type: 8
|
|
|
}
|
|
|
]
|
|
|
@@ -247,10 +246,16 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
else if (item.type == 2) {
|
|
|
- // this.modalShow = true
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/store/storeInfo?params=${queryString}`
|
|
|
- })
|
|
|
+ if (this.nameStatus.status == 2 || this.nameStatus.status == 0) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/store/storeInfo?params=${queryString}`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.modalShow = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.storeRef.setValue(this.indexOption.storeName)
|
|
|
+ })
|
|
|
+ }
|
|
|
} else if (item.type == 3) {
|
|
|
if (this.renovationStatus == 1 && this.indexOption.localMerchantInfoExamine.status == 1) {
|
|
|
this.selectedBus = this.businessShowList.filter((e => e.value == this.indexOption.merchantStatus))
|
|
|
@@ -285,8 +290,49 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- sure() {
|
|
|
- this.modalShow = false
|
|
|
+ //店铺名称修改
|
|
|
+ storeSure(newName) {
|
|
|
+ this.checkInit(newName)
|
|
|
+ },
|
|
|
+ //去重检查
|
|
|
+ async checkInit(newName) {
|
|
|
+ let params = {
|
|
|
+ country: this.indexOption.country,
|
|
|
+ storeName: this.indexOption.storeName,
|
|
|
+ id: this.indexOption.merchantId
|
|
|
+ }
|
|
|
+ let res = await this.$http.get('/merchant/register/checkDuplicate', {
|
|
|
+ params: params
|
|
|
+ })
|
|
|
+ if (res.data.success) {
|
|
|
+ this.settleInit(newName)
|
|
|
+ } else {
|
|
|
+ uni.showToast({ icon: 'none', title: res.data.message })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ settleInit(newName) {
|
|
|
+ const params = {
|
|
|
+ afterValue: this.indexOption.storeName,
|
|
|
+ beforeValue: newName,
|
|
|
+ merchantId: this.indexOption.merchantId,
|
|
|
+ status: 0,
|
|
|
+ type: 0 //0门店名称 1经营资质
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$http.post('/localMerchantInfoChangeExamine/localMerchantInfoChangeExamine/add', params).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '提交成功'
|
|
|
+ })
|
|
|
+ this.modalShow = false
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
//门店电话修改
|
|
|
async phoneSure(val) {
|
|
|
@@ -324,7 +370,7 @@ export default {
|
|
|
},
|
|
|
//0:待审核,1:通过,2:驳回
|
|
|
filterType(type) {
|
|
|
- if (this.typeArr && type != undefined && type!=null) {
|
|
|
+ if (this.typeArr && type != undefined && type != null) {
|
|
|
return this.typeArr.find(item => item.type == type).name;
|
|
|
}
|
|
|
|
|
|
@@ -340,7 +386,7 @@ export default {
|
|
|
if (type == 1) {
|
|
|
this.shopStatus = res.data.result || { status: null } //0:待审核,1:通过,2:驳回
|
|
|
} else {
|
|
|
- this.nameStatus = res.data.result || { status: null }
|
|
|
+ this.nameStatus = res.data.result || { status: null }
|
|
|
}
|
|
|
},
|
|
|
//装修
|
|
|
@@ -376,6 +422,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ goPage() {
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/index/index'
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|