优化进件切换进件信息
This commit is contained in:
@@ -311,13 +311,14 @@ const longTime = ref('2099-12-31')
|
|||||||
const wxProvinceCode = ref('')
|
const wxProvinceCode = ref('')
|
||||||
|
|
||||||
// 获取进件详情
|
// 获取进件详情
|
||||||
async function getDetailAjax(shopId: string, licenceNo: string) {
|
async function getDetailAjax(shopId: string) {
|
||||||
try {
|
try {
|
||||||
const res: any = await entryManagerDetail({
|
const res: any = await entryManagerDetail({
|
||||||
shopId: shopId,
|
shopId: shopId
|
||||||
licenceNo: licenceNo
|
|
||||||
})
|
})
|
||||||
form.value = res
|
if (res && res.shopId) {
|
||||||
|
form.value = res
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
@@ -325,8 +326,6 @@ async function getDetailAjax(shopId: string, licenceNo: string) {
|
|||||||
|
|
||||||
// 获取containerDomInfo信息
|
// 获取containerDomInfo信息
|
||||||
function getContainerDomInfo() {
|
function getContainerDomInfo() {
|
||||||
console.log('getContainerDomInfo');
|
|
||||||
|
|
||||||
containerDomInfo.value = containerRef.value?.getBoundingClientRect() ?? {}
|
containerDomInfo.value = containerRef.value?.getBoundingClientRect() ?? {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,14 +335,18 @@ onMounted(() => {
|
|||||||
getContainerDomInfo()
|
getContainerDomInfo()
|
||||||
window.addEventListener('resize', debouncedCheckWidth)
|
window.addEventListener('resize', debouncedCheckWidth)
|
||||||
|
|
||||||
|
const type = route.query.type
|
||||||
const shopId: string = String(route.query.shopId ?? '')
|
const shopId: string = String(route.query.shopId ?? '')
|
||||||
const licenceNo: string = String(route.query.licenceNo ?? '')
|
const licenceNo: string = String(route.query.licenceNo ?? '')
|
||||||
if (shopId && licenceNo) {
|
|
||||||
formType.value = 'editor'
|
if (shopId) {
|
||||||
getDetailAjax(shopId, licenceNo)
|
getDetailAjax(shopId)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (licenceNo && type && type == 'editor') {
|
||||||
|
formType.value = 'editor'
|
||||||
}
|
}
|
||||||
|
|
||||||
const type = route.query.type
|
|
||||||
if (type && type == 'check') {
|
if (type && type == 'check') {
|
||||||
formType.value = 'check'
|
formType.value = 'check'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<el-input v-model="form.appId" placeholder="请输入appId" :style="inputStyle"></el-input>
|
<el-input v-model="form.appId" placeholder="请输入appId" :style="inputStyle"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="appSecret" prop="appSecret">
|
<el-form-item label="appSecret" prop="appSecret">
|
||||||
<el-input type="textarea" rows="4" v-model="form.appSecret" placeholder="请输入appSecret"
|
<el-input type="textarea" :rows="4" v-model="form.appSecret" placeholder="请输入appSecret"
|
||||||
:style="inputStyle"></el-input>
|
:style="inputStyle"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row mt14">
|
<div class="row mt14">
|
||||||
<el-form label-width="150" label-position="left" v-loading="loading">
|
<el-form label-width="150" label-position="left" v-loading="loading">
|
||||||
|
<el-form-item label="信息来源" v-if="isHeadShop != 1">
|
||||||
|
<el-radio-group :model-value="typeValue" @change="typeValueChange">
|
||||||
|
<el-radio label="进件信息" :value="route.query.shopId"></el-radio>
|
||||||
|
<el-radio label="复用主店信息" :value="route.query.mainId" v-if="mainInfo && mainInfo.shopId"></el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<template v-if="!form.shopId">
|
<template v-if="!form.shopId">
|
||||||
<el-form-item label-width="0">
|
<el-form-item label-width="0">
|
||||||
<el-text>您还未申请进件</el-text>
|
<el-text>您还未申请进件</el-text>
|
||||||
@@ -10,9 +16,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-form-item label="信息来源" v-if="shopId != mainInfo.shopId">
|
|
||||||
<el-tag disable-transitions>复用主店信息</el-tag>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="商户号">
|
<el-form-item label="商户号">
|
||||||
<el-text>{{ form.merchantCode }}</el-text>
|
<el-text>{{ form.merchantCode }}</el-text>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -47,7 +50,7 @@
|
|||||||
<el-form-item label="创建时间">
|
<el-form-item label="创建时间">
|
||||||
<el-text>{{ form.createTime }}</el-text>
|
<el-text>{{ form.createTime }}</el-text>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="shopId == mainInfo.shopId">
|
<el-form-item v-if="typeValue == shopId">
|
||||||
<el-button link type="primary"
|
<el-button link type="primary"
|
||||||
v-if="form.wechatStatus == 'INIT' || form.wechatStatus == 'AUDIT' || form.wechatStatus == 'SIGN' || form.alipayStatus == 'INIT' || form.alipayStatus == 'AUDIT' || form.alipayStatus == 'SIGN'"
|
v-if="form.wechatStatus == 'INIT' || form.wechatStatus == 'AUDIT' || form.wechatStatus == 'SIGN' || form.alipayStatus == 'INIT' || form.alipayStatus == 'AUDIT' || form.alipayStatus == 'SIGN'"
|
||||||
@click="checkStatusHandle()">查询</el-button>
|
@click="checkStatusHandle()">查询</el-button>
|
||||||
@@ -74,13 +77,13 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { shopMerchantGet, getMainMerchant, shopMerchantPut } from '@/api/common'
|
import { shopMerchantGet, getMainMerchant, shopMerchantPut, entryManagerDetail } from '@/api/common'
|
||||||
import singCodeDialog from '@/views/applyments/components/singCodeDialog.vue';
|
import singCodeDialog from '@/views/applyments/components/singCodeDialog.vue';
|
||||||
|
|
||||||
const singCodeDialogRef = ref(null)
|
const singCodeDialogRef = ref(null)
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const shopId = route.query.shopId
|
const shopId = ref(route.query.shopId)
|
||||||
const userTypeList = ref([
|
const userTypeList = ref([
|
||||||
{
|
{
|
||||||
value: '0',
|
value: '0',
|
||||||
@@ -148,6 +151,7 @@ function statusListFilter(status) {
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const form = ref({})
|
const form = ref({})
|
||||||
|
|
||||||
|
|
||||||
// 查询状态
|
// 查询状态
|
||||||
async function checkStatusHandle() {
|
async function checkStatusHandle() {
|
||||||
try {
|
try {
|
||||||
@@ -168,10 +172,12 @@ async function checkStatusHandle() {
|
|||||||
const mainInfo = ref({})
|
const mainInfo = ref({})
|
||||||
async function headShopApplmentInfo() {
|
async function headShopApplmentInfo() {
|
||||||
try {
|
try {
|
||||||
const res = await getMainMerchant({
|
if (route.query.mainId) {
|
||||||
shopId: route.query.mainId
|
const res = await getMainMerchant({
|
||||||
})
|
shopId: route.query.mainId
|
||||||
mainInfo.value = res
|
})
|
||||||
|
mainInfo.value = res
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
@@ -180,9 +186,9 @@ async function headShopApplmentInfo() {
|
|||||||
// 跳转进件逻辑处理
|
// 跳转进件逻辑处理
|
||||||
const mainDialogVisable = ref(false)
|
const mainDialogVisable = ref(false)
|
||||||
const mainDialogVisableLoading = ref(false)
|
const mainDialogVisableLoading = ref(false)
|
||||||
|
const isHeadShop = ref(route.query.isHeadShop)
|
||||||
async function toApplyment() {
|
async function toApplyment() {
|
||||||
let shopType = route.query.shopType
|
let shopType = route.query.shopType
|
||||||
let isHeadShop = route.query.isHeadShop
|
|
||||||
if (shopType == 'chain' || shopType == 'join') {
|
if (shopType == 'chain' || shopType == 'join') {
|
||||||
if (isHeadShop == 1) {
|
if (isHeadShop == 1) {
|
||||||
toApplymentRouter()
|
toApplymentRouter()
|
||||||
@@ -202,7 +208,7 @@ async function toApplyment() {
|
|||||||
|
|
||||||
// 跳转进件
|
// 跳转进件
|
||||||
function toApplymentRouter() {
|
function toApplymentRouter() {
|
||||||
router.push({ name: 'applyment_in', query: { shopId: shopId } });
|
router.push({ name: 'applyment_in', query: { shopId: shopId.value } });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 复用主店的进件信息
|
// 复用主店的进件信息
|
||||||
@@ -210,8 +216,8 @@ async function shopMerchantPutAjax() {
|
|||||||
try {
|
try {
|
||||||
mainDialogVisableLoading.value = true
|
mainDialogVisableLoading.value = true
|
||||||
await shopMerchantPut({
|
await shopMerchantPut({
|
||||||
shopId: shopId,
|
shopId: shopId.value,
|
||||||
relatedLicenceNo: mainInfo.value.licenceNo,
|
relatedId: mainInfo.value.shopId,
|
||||||
nativeMerchantDTO: {
|
nativeMerchantDTO: {
|
||||||
wechatMerchantId: mainInfo.value.wechatMerchantId,
|
wechatMerchantId: mainInfo.value.wechatMerchantId,
|
||||||
alipayMerchantId: mainInfo.value.alipayMerchantId,
|
alipayMerchantId: mainInfo.value.alipayMerchantId,
|
||||||
@@ -237,22 +243,56 @@ function toDetail(type) {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'applyment_in',
|
name: 'applyment_in',
|
||||||
query: {
|
query: {
|
||||||
shopId: form.value.shopId,
|
shopId: shopId.value,
|
||||||
licenceNo: businessLicenceInfo.licenceNo,
|
licenceNo: businessLicenceInfo.licenceNo,
|
||||||
type: type
|
type: type
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 切换进件类型
|
||||||
|
const typeValue = ref('')
|
||||||
|
async function typeValueChange(e) {
|
||||||
|
await ElMessageBox.confirm('确定要切换进件类型吗?', '注意').then(async () => {
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
loading.value = true
|
||||||
|
await shopMerchantPut({
|
||||||
|
shopId: shopId.value,
|
||||||
|
relatedId: e,
|
||||||
|
})
|
||||||
|
typeValue.value = e
|
||||||
|
updateData()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}).catch(() => { })
|
||||||
|
}
|
||||||
|
|
||||||
// 刷新进件数据
|
// 刷新进件数据
|
||||||
async function updateData() {
|
async function updateData() {
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const res = await shopMerchantGet({
|
const res = await shopMerchantGet({
|
||||||
shopId: shopId
|
shopId: shopId.value
|
||||||
})
|
})
|
||||||
form.value = (res && res.shopDirectMerchant) ? res.shopDirectMerchant
|
|
||||||
: ''
|
if (res && res.shopDirectMerchant) {
|
||||||
|
form.value = res.shopDirectMerchant
|
||||||
|
typeValue.value = res.relatedId
|
||||||
|
} else {
|
||||||
|
typeValue.value = shopId.value
|
||||||
|
const applymentRes = await entryManagerDetail({ shopId: shopId.value })
|
||||||
|
if (applymentRes && applymentRes.shopId) {
|
||||||
|
form.value = applymentRes
|
||||||
|
} else {
|
||||||
|
form.value = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
@@ -261,6 +301,7 @@ async function updateData() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
updateData()
|
updateData()
|
||||||
|
headShopApplmentInfo()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item v-if="scope.row.isHeadShop == 1" :command="0">添加分店</el-dropdown-item>
|
<el-dropdown-item v-if="scope.row.isHeadShop == 1" :command="0">添加分店</el-dropdown-item>
|
||||||
<el-dropdown-item :command="{ row: scope.row, command: 1 }">
|
<el-dropdown-item :command="{ row: scope.row, command: 1 }">
|
||||||
三方配置
|
支付配置
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item :command="2">续费记录</el-dropdown-item>
|
<el-dropdown-item :command="2">续费记录</el-dropdown-item>
|
||||||
<el-dropdown-item :command="3">前往店铺</el-dropdown-item>
|
<el-dropdown-item :command="3">前往店铺</el-dropdown-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user