进件修改

This commit is contained in:
2026-01-17 09:40:18 +08:00
parent 6535b6f580
commit 2bd52f85b9
8 changed files with 151 additions and 78 deletions

View File

@@ -27,6 +27,7 @@
<up-loadmore :status="isEnd?'nomore':'loading'"></up-loadmore> <up-loadmore :status="isEnd?'nomore':'loading'"></up-loadmore>
</scroll-view> </scroll-view>
<!-- <view :style="{height:slotHeight+'px'}"></view> -->
<view class="u-flex gap-20 u-m-t-30"> <view class="u-flex gap-20 u-m-t-30">
<view class="u-flex-1"> <view class="u-flex-1">
<my-button type="default" @click="close">取消</my-button> <my-button type="default" @click="close">取消</my-button>
@@ -61,7 +62,7 @@
const bankInstId = defineModel('bankInstId'); const bankInstId = defineModel('bankInstId');
const bankAliasCode=defineModel('bankAliasCode') const bankAliasCode = defineModel('bankAliasCode')
@@ -88,12 +89,13 @@
function submit() { function submit() {
modelValue.value = selItem.value.bankAlias modelValue.value = selItem.value.bankAlias
bankInstId.value = selItem.value.bankCode bankInstId.value = selItem.value.bankCode
bankAliasCode.value=selItem.value.bankAliasCode; bankAliasCode.value = selItem.value.bankAliasCode;
console.log('modelValue', modelValue.value); console.log('modelValue', modelValue.value);
console.log('bankInstId', bankInstId.value); console.log('bankInstId', bankInstId.value);
show.value = false; show.value = false;
} }
function search() { function search() {
isEnd.value = false isEnd.value = false
query.page = 1 query.page = 1
@@ -183,6 +185,11 @@
} }
} }
const slotHeight = ref(0)
uni.onKeyboardHeightChange(res => {
console.log('onKeyboardHeightChange', res.height)
slotHeight.value = res.height
})
onMounted(init); onMounted(init);
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@@ -71,7 +71,7 @@
const show = ref(false); const show = ref(false);
const modelValue = defineModel(); const modelValue = defineModel();
const bankbank_branch_name = defineModel('bankbank_branch_name', { const bank_branch_name = defineModel('bank_branch_name', {
default: '', default: '',
}); });
@@ -79,7 +79,11 @@
function returnLabel() { function returnLabel() {
const findShop = list.value.find(v => v.bank_branch_id == modelValue.value) const findShop = list.value.find(v => v.bank_branch_id == modelValue.value)
return findShop ? findShop.bank_branch_name : '' if(findShop){
return findShop ? findShop.bank_branch_name : ''
}else{
return bank_branch_name.value||'请选择'
}
} }
const selItem = ref(null) const selItem = ref(null)
@@ -98,7 +102,7 @@
function submit() { function submit() {
modelValue.value = selItem.value.bank_branch_id modelValue.value = selItem.value.bank_branch_id
bankbank_branch_name.value = selItem.value.bank_branch_name bank_branch_name.value = selItem.value.bank_branch_name
show.value = false; show.value = false;
} }

View File

@@ -46,7 +46,7 @@
</up-radio-group> </up-radio-group>
</view> </view>
<template v-if="form.contactPersonType=='SUPER'"> <template v-if="true">
<view class="form-item required"> <view class="form-item required">
<view class="title"> 联系人身份证正面国徽</view> <view class="title"> 联系人身份证正面国徽</view>
<my-upload-img v-model="form.contactIdCardFrontPic.url" :size="200" <my-upload-img v-model="form.contactIdCardFrontPic.url" :size="200"
@@ -54,7 +54,7 @@
</view> </view>
<view class="form-item required"> <view class="form-item required">
<view class="title"> 联系人身份证头像</view> <view class="title"> 联系人身份证头像</view>
<my-upload-img v-model="form.contactIdCardBackPic.url" :size="200" <my-upload-img v-model="form.contactIdCardBackPic.url" :size="200"
@uploadSuccess="uploadSuccess($event,'IdCard','contactIdCardBackPic')"></my-upload-img> @uploadSuccess="uploadSuccess($event,'IdCard','contactIdCardBackPic')"></my-upload-img>
</view> </view>

View File

@@ -85,8 +85,8 @@
</view> </view>
<view class="form-item " v-if="pro_city_area&&form.bankName"> <view class="form-item " v-if="pro_city_area&&form.bankName">
<view class="title"> 支行</view> <view class="title"> 支行</view>
<bankBranchList :query="bankBranchListQuery" v-model:bankBranchName="form.bankBranchName" <bankBranchList :query="bankBranchListQuery" v-model:bank_branch_name="form.bankBranchName"
v-model:bankBranchCode="form.bankBranchCode"></bankBranchList> v-model="form.bankBranchCode"></bankBranchList>
</view> </view>
<view class="form-item required"> <view class="form-item required">
<view class="title"> 结算卡号</view> <view class="title"> 结算卡号</view>
@@ -186,7 +186,7 @@
const regions = ref([]) const regions = ref([])
function getRegionData(arr = []) { function getRegionData(arr) {
regions.value = arr regions.value = arr
} }

View File

@@ -15,6 +15,42 @@ export const rules = {
alipayAccount: { alipayAccount: {
required: true, required: true,
errorMsg: '请填写支付宝账号', errorMsg: '请填写支付宝账号',
},
'contactIdCardFrontPic.url': {
required: true,
errorMsg: '请上传联系人身份证正面',
},
'contactIdCardBackPic.url': {
required: true,
errorMsg: '联系人身份证反面',
},
contactName: {
required: true,
errorMsg: '请填写联系人姓名',
},
contactPersonId: {
required: true,
errorMsg: '请填写联系人身份证号',
},
contactPersonIdStartDate: {
required: true,
errorMsg: '请填写联系人身份证开始日期',
},
contactPersonIdEndDate: {
required: true,
errorMsg: '请填写联系人身份证到期日期',
},
contactPhone: {
required: true,
errorMsg: '请填写联系人电话',
},
contactAddr: {
required: true,
errorMsg: '请填写联系人通讯地址',
},
contactEmail: {
required: true,
errorMsg: '请填写联系人邮箱',
} }
}, },
legalPersonInfo: { legalPersonInfo: {
@@ -64,26 +100,26 @@ export const rules = {
}, },
}, },
businessLicenceInfo:{ businessLicenceInfo: {
'licensePic.url':{ 'licensePic.url': {
required: true, required: true,
errorMsg:'请上传营业执照照片' errorMsg: '请上传营业执照照片'
}, },
licenceName:{ licenceName: {
required: true, required: true,
errorMsg:'请输入营业执照全称' errorMsg: '请输入营业执照全称'
}, },
licenceNo:{ licenceNo: {
required: true, required: true,
errorMsg:'请输入营业执照号码' errorMsg: '请输入营业执照号码'
}, },
licenceStartDate:{ licenceStartDate: {
required: true, required: true,
errorMsg:'请选择营业执照开始日期' errorMsg: '请选择营业执照开始日期'
}, },
registeredAddress:{ registeredAddress: {
required: true, required: true,
errorMsg:'请填写营业执照注册地址' errorMsg: '请填写营业执照注册地址'
} }
}, },
storeInfo: { storeInfo: {

View File

@@ -164,7 +164,7 @@
async getRegon(){ async getRegon(){
const res=await region() const res=await region()
this.provinces=res||[] this.provinces=res||[]
this.emits('init',res) this.$emit('init',res)
}, },
init() { init() {
if (this.areaCode.length == 3) { if (this.areaCode.length == 3) {

View File

@@ -115,7 +115,7 @@
<script setup> <script setup>
import { import {
onLoad onLoad,onShow
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import { import {
computed, computed,
@@ -293,10 +293,14 @@
const options=reactive({}) const options=reactive({})
onLoad(async (opt) => { onLoad(async (opt) => {
Object.assign(options,opt) Object.assign(options,opt)
if(opt.type=='addBranch'){
})
onShow(async()=>{
if(options.type=='addBranch'){
// 添加分店 // 添加分店
const res = await await shopInfoApi.getShopDetail({ const res = await await shopInfoApi.getShopDetail({
id: opt.id id: options.id
}) })
form.isHeadShop=0 form.isHeadShop=0
form.mainId=res.id form.mainId=res.id
@@ -306,10 +310,10 @@
}) })
return return
}else{ }else{
if (opt.id) { if (options.id) {
rules.accountName.required = false rules.accountName.required = false
const res = await await shopInfoApi.getShopDetail({ const res = await await shopInfoApi.getShopDetail({
id: opt.id id: options.id
}) })
for (let key in form) { for (let key in form) {
form[key] = res[key] form[key] = res[key]
@@ -323,7 +327,6 @@
}) })
} }
} }
}) })
watchEffect(()=>{ watchEffect(()=>{
console.log(form.shopType) console.log(form.shopType)

View File

@@ -122,26 +122,25 @@
</view> </view>
<view class="u-flex u-row-between"> <view class="u-flex u-row-between">
<text class="font-bold">商户号</text> <text class="font-bold">商户号</text>
<text class="">{{form.shopDirectMerchant.merchantCode}}</text> <text class="">{{mainEntryManagerRes.merchantCode}}</text>
</view> </view>
<view class="u-flex u-row-between u-m-t-24"> <view class="u-flex u-row-between u-m-t-24">
<text class="font-bold">商户类型</text> <text class="font-bold">商户类型</text>
<text class="">{{returnType(form.shopDirectMerchant.userType)}}</text> <text class="">{{returnType(mainEntryManagerRes.userType)}}</text>
</view> </view>
<view class="status"> <view class="status">
<view class="u-flex u-row-between "> <view class="u-flex u-row-between ">
<text class="font-bold">支付宝进件状态</text> <text class="font-bold">支付宝进件状态</text>
<view class="state" <view class="state" :class="returnStatusClass(mainEntryManagerRes.alipayStatus)">
:class="returnStatusClass(form.shopDirectMerchant.alipayStatus)"> {{returnStatusLabel(mainEntryManagerRes.alipayStatus)}}
{{returnStatusLabel(form.shopDirectMerchant.alipayStatus)}}
</view> </view>
</view> </view>
<view v-if="form.shopDirectMerchant.alipayStatus==='SIGN'" class="u-m-t-16"> <view v-if="mainEntryManagerRes.alipayStatus==='SIGN'" class="u-m-t-16">
<my-button @click="showCode(form.shopDirectMerchant,'aliPay')">查看签约码</my-button> <my-button @click="showCode(mainEntryManagerRes,'aliPay')">查看签约码</my-button>
</view> </view>
<view class="u-m-t-14" v-if="form.shopDirectMerchant.alipayErrorMsg"> <view class="u-m-t-14" v-if="mainEntryManagerRes.alipayErrorMsg">
<up-alert title="拒绝原因" type="error" <up-alert title="拒绝原因" type="error"
:description="form.shopDirectMerchant.alipayErrorMsg"></up-alert> :description="mainEntryManagerRes.alipayErrorMsg"></up-alert>
</view> </view>
</view> </view>
@@ -150,27 +149,27 @@
<view class="u-flex u-row-between"> <view class="u-flex u-row-between">
<text class="font-bold">微信进件状态</text> <text class="font-bold">微信进件状态</text>
<view class="state" <view class="state"
:class="returnStatusClass(form.shopDirectMerchant.wechatStatus)"> :class="returnStatusClass(mainEntryManagerRes.wechatStatus)">
{{returnStatusLabel(form.shopDirectMerchant.wechatStatus)}} {{returnStatusLabel(mainEntryManagerRes.wechatStatus)}}
</view> </view>
</view> </view>
<view v-if="form.shopDirectMerchant.wechatStatus==='SIGN'" class="u-m-t-16"> <view v-if="mainEntryManagerRes.wechatStatus==='SIGN'" class="u-m-t-16">
<my-button @click="showCode(form.shopDirectMerchant,'wx')">查看签约码</my-button> <my-button @click="showCode(mainEntryManagerRes,'wx')">查看签约码</my-button>
</view> </view>
</view> </view>
<view class="u-m-t-14" v-if="form.shopDirectMerchant.wechatErrorMsg"> <view class="u-m-t-14" v-if="mainEntryManagerRes.wechatErrorMsg">
<up-alert title="拒绝原因" type="error" <up-alert title="拒绝原因" type="error"
:description="form.shopDirectMerchant.wechatErrorMsg"></up-alert> :description="mainEntryManagerRes.wechatErrorMsg"></up-alert>
</view> </view>
</view> </view>
<view class="u-flex u-row-between u-m-t-24"> <view class="u-flex u-row-between u-m-t-24">
<text class="font-bold">最后提交时间</text> <text class="font-bold">最后提交时间</text>
<text class="">{{form.shopDirectMerchant.updateTime}}</text> <text class="">{{mainEntryManagerRes.updateTime}}</text>
</view> </view>
<view class="u-flex u-row-between u-m-t-24"> <view class="u-flex u-row-between u-m-t-24">
<text class="font-bold">创建时间</text> <text class="font-bold">创建时间</text>
<text class="">{{form.shopDirectMerchant.createTime}}</text> <text class="">{{mainEntryManagerRes.createTime}}</text>
</view> </view>
</view> </view>
</template> </template>
@@ -255,7 +254,7 @@
// url: '/entryManager/add/add?shopId=' + query.shopId // url: '/entryManager/add/add?shopId=' + query.shopId
// }) // })
// } else { // } else {
// form.shopDirectMerchant = mainEntryManagerRes.value // mainEntryManagerRes = mainEntryManagerRes.value
// } // }
// } // }
// }) // })
@@ -370,7 +369,7 @@
const form = reactive({ const form = reactive({
shopId: 0, shopId: 0,
channel: "native", channel: "native",
relatedLicenceNo: "", relatedId: "",
nativeMerchantDTO: { nativeMerchantDTO: {
wechatMerchantId: "", wechatMerchantId: "",
alipayMerchantId: "", alipayMerchantId: "",
@@ -432,7 +431,7 @@
const shopInfo = ref(null) const shopInfo = ref(null)
const shopMerchant=ref(null) const shopMerchant = ref(null)
async function init() { async function init() {
const shopInfoRes = await shopInfoApi.getShopDetail({ const shopInfoRes = await shopInfoApi.getShopDetail({
id: query.shopId id: query.shopId
@@ -453,20 +452,27 @@
shopMerchantApi.shopMerchant({ shopMerchantApi.shopMerchant({
shopId: query.shopId shopId: query.shopId
}).then(res => { }).then(res => {
if(res){ if (res) {
if (res.shopDirectMerchant) { if (res.shopDirectMerchant) {
useInfo.value = 1 useInfo.value = 1
} else { } else {
useInfo.value = 0 useInfo.value = 0
} }
shopMerchant.value=res shopMerchant.value = res
if (res.relatedId == shopInfo.value.id) {
useInfo.value = 0
}
if (mainEntryManagerRes.value && res.relatedId == mainEntryManagerRes.value.shopId) {
useInfo.value = 1
}
Object.assign(form, res) Object.assign(form, res)
} }
loadingFinish.value=true loadingFinish.value = true
}) })
} }
const loadingFinish=ref(false) const loadingFinish = ref(false)
onLoad((opt) => { onLoad((opt) => {
query.shopId = opt.shopId query.shopId = opt.shopId
form.shopId = opt.shopId form.shopId = opt.shopId
@@ -479,6 +485,7 @@
res = await shopMerchantApi.editShopMerchant({ res = await shopMerchantApi.editShopMerchant({
shopId: form.shopId, shopId: form.shopId,
channel: form.channel, channel: form.channel,
relatedId:shopInfo.value.id,
polyMerchantDTO: { polyMerchantDTO: {
storeId: form.polyMerchantDTO.storeId, storeId: form.polyMerchantDTO.storeId,
merchantName: form.polyMerchantDTO.merchantName, merchantName: form.polyMerchantDTO.merchantName,
@@ -487,24 +494,27 @@
} }
}) })
} else { } else {
if (useInfo.value == 1) {
//使用主店
}
res = await shopMerchantApi.editShopMerchant({ res = await shopMerchantApi.editShopMerchant({
shopId: form.shopId, shopId: form.shopId,
channel: form.channel, channel: form.channel,
relatedLicenceNo: form.relatedLicenceNo, relatedId: useInfo.value == 1 ? mainEntryManagerRes.value.shopId : query.shopId,
nativeMerchantDTO: { // nativeMerchantDTO: {
wechatMerchantId: form.nativeMerchantDTO.wechatMerchantId, // wechatMerchantId: form.nativeMerchantDTO.wechatMerchantId,
alipayMerchantId: form.nativeMerchantDTO.alipayMerchantId, // alipayMerchantId: form.nativeMerchantDTO.alipayMerchantId,
alipayAuthInfo: { // alipayAuthInfo: {
user_id: form.nativeMerchantDTO.alipayAuthInfo.user_id, // user_id: form.nativeMerchantDTO.alipayAuthInfo.user_id,
open_id: form.nativeMerchantDTO.alipayAuthInfo.open_id, // open_id: form.nativeMerchantDTO.alipayAuthInfo.open_id,
auth_app_id: form.nativeMerchantDTO.alipayAuthInfo.auth_app_id, // auth_app_id: form.nativeMerchantDTO.alipayAuthInfo.auth_app_id,
app_auth_token: form.nativeMerchantDTO.alipayAuthInfo.app_auth_token, // app_auth_token: form.nativeMerchantDTO.alipayAuthInfo.app_auth_token,
expires_in: form.nativeMerchantDTO.alipayAuthInfo.expires_in, // expires_in: form.nativeMerchantDTO.alipayAuthInfo.expires_in,
app_refresh_token: form.nativeMerchantDTO.alipayAuthInfo.app_refresh_token, // app_refresh_token: form.nativeMerchantDTO.alipayAuthInfo.app_refresh_token,
re_expires_in: form.nativeMerchantDTO.alipayAuthInfo.re_expires_in, // re_expires_in: form.nativeMerchantDTO.alipayAuthInfo.re_expires_in,
order_no: form.nativeMerchantDTO.alipayAuthInfo.order_no, // order_no: form.nativeMerchantDTO.alipayAuthInfo.order_no,
} // }
} // }
}) })
} }
@@ -518,7 +528,7 @@
} }
function submit() { function submit() {
if (form.channel == 'native' && !entryManagerRes.value) { if (useInfo.value == 0 && form.channel == 'native' && !entryManagerRes.value) {
return uni.$u.toast('您还未申请进件,清先申请进件') return uni.$u.toast('您还未申请进件,清先申请进件')
} }
refForm.value.validate().then(valid => { refForm.value.validate().then(valid => {
@@ -538,16 +548,25 @@
console.log('key', key) console.log('key', key)
rules[key].required = newval == 'poly' ? true : false; rules[key].required = newval == 'poly' ? true : false;
} }
if (newval == 'poly') {
form.polyMerchantDTO =shopMerchant.value.polyMerchantDTO|| {
storeId: "",
merchantName: "",
appId: "",
appSecret: "",
payPassword: "",
wechatSmallAppid: "",
alipaySmallAppid: "",
}
}
}) })
watch(() => useInfo.value, (newval) => { watch(() => useInfo.value, (newval) => {
console.log('newval',newval); console.log('newval', newval);
if (newval) { if (newval) {
form.shopDirectMerchant = mainEntryManagerRes.value||(shopMerchant.value?(shopMerchant.value.shopDirectMerchant):null )
form.nativeMerchantDTO = null
} else { } else {
form.shopDirectMerchant = null
form.nativeMerchantDTO = entryManagerRes.value
} }
}) })
</script> </script>
@@ -612,4 +631,8 @@
} }
} }
} }
:deep(.u-alert__content__desc) {
word-break: break-all;
}
</style> </style>