进件代码调整,增加进件列表页面和筛选
This commit is contained in:
@@ -60,7 +60,10 @@
|
||||
|
||||
const bankInstId = defineModel('bankInstId');
|
||||
|
||||
|
||||
|
||||
const bankAliasCode=defineModel('bankAliasCode')
|
||||
|
||||
const wxProvinceCode=defineModel('wxProvinceCode')
|
||||
|
||||
|
||||
const selid = ref('')
|
||||
@@ -86,6 +89,7 @@
|
||||
function submit() {
|
||||
modelValue.value = selItem.value.bankAlias
|
||||
bankInstId.value = selItem.value.bankCode
|
||||
bankAliasCode.value=selItem.value.bankAliasCode;
|
||||
console.log('modelValue', modelValue.value);
|
||||
console.log('bankInstId', bankInstId.value);
|
||||
show.value = false;
|
||||
@@ -105,6 +109,9 @@
|
||||
if (findShop) {
|
||||
selid.value = 'shop_' + findShop.id
|
||||
selItem.value = findShop
|
||||
bankInstId.value = findShop.bankCode
|
||||
bankAliasCode.value = findShop.bankAliasCode
|
||||
wxProvinceCode.value=findShop.wxProvinceCode
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
</view>
|
||||
|
||||
<template v-if="form.contactPersonType=='SUPER'">
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 联系人身份证正面</view>
|
||||
<my-upload-img v-model="form.contactIdCardFrontPic.url" :size="200"
|
||||
@uploadSuccess="uploadSuccess($event,'IdCard','contactIdCardFrontPic')"></my-upload-img>
|
||||
</view>
|
||||
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 联系人身份证背面</view>
|
||||
<my-upload-img v-model="form.contactIdCardBackPic.url" :size="200"
|
||||
@uploadSuccess="uploadSuccess($event,'IdCard','contactIdCardBackPic')"></my-upload-img>
|
||||
@@ -66,17 +66,17 @@
|
||||
</up-radio>
|
||||
</up-radio-group>
|
||||
</view> -->
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 联系人姓名</view>
|
||||
<up-input placeholder="联系人姓名" :placeholder-class="placeholderClass"
|
||||
v-model="form.contactName"></up-input>
|
||||
</view>
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 联系人身份证号</view>
|
||||
<up-input placeholder="联系人身份证号" :placeholder-class="placeholderClass"
|
||||
v-model="form.contactPersonId"></up-input>
|
||||
</view>
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 联系人身份证开始日期</view>
|
||||
<up-datetime-picker hasInput :minDate="minDate" :maxDate="maxDate" format="YYYY-MM-DD"
|
||||
placeholder="请选择" v-model="form.contactPersonIdStartDate" mode="date">
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
</view>
|
||||
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 联系人身份证到期日期</view>
|
||||
<view class="u-m-b-16">
|
||||
<up-radio-group v-model="contactPersonIdEndDateType">
|
||||
@@ -100,19 +100,19 @@
|
||||
|
||||
|
||||
</view>
|
||||
<view class="form-item ">
|
||||
<view class="form-item required ">
|
||||
<view class="title"> 联系人电话</view>
|
||||
<up-input placeholder="联系人电话" :placeholder-class="placeholderClass"
|
||||
v-model="form.contactPhone"></up-input>
|
||||
</view>
|
||||
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 联系人通讯地址</view>
|
||||
<up-input placeholder="联系人通讯地址" :placeholder-class="placeholderClass"
|
||||
v-model="form.contactAddr"></up-input>
|
||||
</view>
|
||||
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 联系人邮箱
|
||||
</view>
|
||||
<up-input placeholder="联系人邮箱" :placeholder-class="placeholderClass"
|
||||
@@ -266,7 +266,11 @@
|
||||
deep: true,
|
||||
immediate: true
|
||||
})
|
||||
|
||||
watch(()=>form.contactPersonIdEndDate,(newval)=>{
|
||||
if(dayjs(newval).format('YYYY-MM-DD')==='2099-12-31'){
|
||||
contactPersonIdEndDateType.value=2
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
||||
@@ -169,6 +169,12 @@
|
||||
}, {
|
||||
deep: true
|
||||
})
|
||||
|
||||
watch(()=>form.licenceEndDate,(newval)=>{
|
||||
if(dayjs(newval).format('YYYY-MM-DD')==='2099-12-31'){
|
||||
licenceEndDateType.value=2
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -251,6 +251,12 @@ import { includes } from 'lodash';
|
||||
}, {
|
||||
deep: true
|
||||
})
|
||||
|
||||
watch(()=>form.legalPersonIdEndDate,(newval)=>{
|
||||
if(dayjs(newval).format('YYYY-MM-DD')==='2099-12-31'){
|
||||
endDateType.value=2
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<view class="u-font-32 font-bold u-m-32 text-center">结算信息</view>
|
||||
<view class="container">
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 结算类型</view>
|
||||
<up-radio-group v-model="form.settlementType">
|
||||
<up-radio v-for="(value,key) in settlementTypes" :label="value" :name="key">
|
||||
@@ -49,7 +49,7 @@
|
||||
</template>
|
||||
|
||||
|
||||
<view class="form-item ">
|
||||
<view class="form-item required" >
|
||||
<view class="title"> 结算卡类型</view>
|
||||
<up-radio-group v-model="form.settlementCardType">
|
||||
<up-radio v-for="(value,key) in settlementCardTypes" :label="value" :name="key">
|
||||
@@ -80,35 +80,38 @@
|
||||
</view>
|
||||
<view class="form-item required">
|
||||
<view class="title"> 银行</view>
|
||||
<bankSelect v-model="form.bankName" v-model:bankInstId="form.bankInstId"></bankSelect>
|
||||
<bankSelect v-model="form.bankName" v-model:bankInstId="form.bankInstId"
|
||||
v-model:wxProvinceCode="wxProvinceCode"
|
||||
v-model:bankAliasCode="form.bankType"
|
||||
></bankSelect>
|
||||
</view>
|
||||
<view class="form-item " v-if="pro_city_area&&form.bankName">
|
||||
<view class="title"> 支行</view>
|
||||
<bankBranchList :query="bankBranchListQuery" v-model:bankBranchName="form.bankBranchName"
|
||||
v-model:bankBranchCode="form.bankBranchCode"></bankBranchList>
|
||||
</view>
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 结算账户卡号</view>
|
||||
<up-input placeholder="结算账户卡号" :placeholder-class="placeholderClass"
|
||||
v-model="form.settlementCardNo"></up-input>
|
||||
</view>
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 结算账户户名</view>
|
||||
<up-input placeholder="结算账户户名" :placeholder-class="placeholderClass"
|
||||
v-model="form.settlementName"></up-input>
|
||||
</view>
|
||||
<view class="form-item ">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 结算银行预留手机号</view>
|
||||
<up-input placeholder="结算银行预留手机号" :placeholder-class="placeholderClass"
|
||||
v-model="form.bankMobile"></up-input>
|
||||
</view>
|
||||
<view class="form-item ">
|
||||
<!-- <view class="form-item ">
|
||||
<view class="title"> 开户行行别名称</view>
|
||||
<up-input placeholder="开户行行别名称" :placeholder-class="placeholderClass"
|
||||
v-model="form.bankName"></up-input>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
|
||||
<!--
|
||||
<view class="form-item ">
|
||||
<view class="title"> 开户行缩写</view>
|
||||
<up-input placeholder="开户行缩写" :placeholder-class="placeholderClass"></up-input>
|
||||
@@ -117,7 +120,7 @@
|
||||
<view class="title"> 开户行编号
|
||||
</view>
|
||||
<up-input placeholder="开户行编号" :placeholder-class="placeholderClass" v-model="form.bankType"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item ">
|
||||
<view class="title"> 支行开户行行别名称
|
||||
|
||||
@@ -133,15 +136,17 @@
|
||||
<up-input placeholder="支行开户行编号" :placeholder-class="placeholderClass"
|
||||
v-model="form.bankBranchCode"></up-input>
|
||||
</view>
|
||||
-->
|
||||
|
||||
|
||||
<template v-if="form.settlementCardType*1==21">
|
||||
<view class="form-item required">
|
||||
<view class="title"> 开户许可证</view>
|
||||
<my-upload-img v-model="form.openAccountLicencePic.url" :size="200"></my-upload-img>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<view class="form-item ">
|
||||
<view class="title"> 开户许可证</view>
|
||||
<my-upload-img v-model="form.openAccountLicencePic.url" :size="200"></my-upload-img>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -180,6 +185,8 @@
|
||||
} from '@/http/api/order/entryManager.js'
|
||||
const showCitySelect = ref(false)
|
||||
const showBankSelect = ref(true)
|
||||
|
||||
const wxProvinceCode=ref('')
|
||||
|
||||
function uploadSuccess(url, type, key) {
|
||||
uni.showLoading({
|
||||
@@ -307,7 +314,8 @@
|
||||
}
|
||||
console.log(form);
|
||||
}, {
|
||||
deep: true,immediate:true
|
||||
deep: true,
|
||||
immediate: true
|
||||
})
|
||||
|
||||
const emits = defineEmits(['update'])
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<scroll-view scroll-x="true" scroll-with-animation :scroll-left="scrollLeft" class="steps-scroll-container"
|
||||
ref="scrollViewRef">
|
||||
<view class="steps-content" ref="contentRef">
|
||||
<view v-for="(item,index) in list" class="step-item" :key="index" :data-index="index" ref="stepItemRefs">
|
||||
<view v-for="(item,index) in list" class="step-item" :key="index" :data-index="index"
|
||||
:class="'step_'+index"
|
||||
ref="stepItemRefs">
|
||||
<view class="step-inner">
|
||||
<view class="index" :class="{active:index<=cur}">
|
||||
<text>{{index+1}}</text>
|
||||
@@ -23,12 +25,13 @@
|
||||
import {
|
||||
ref,
|
||||
nextTick,
|
||||
getCurrentInstance
|
||||
getCurrentInstance,
|
||||
watch
|
||||
} from 'vue';
|
||||
|
||||
const cur = defineModel({
|
||||
default:0
|
||||
})
|
||||
default: 0
|
||||
})
|
||||
const scrollLeft = ref(0)
|
||||
const scrollViewRef = ref(null)
|
||||
const contentRef = ref(null) // 内容容器ref
|
||||
@@ -36,60 +39,66 @@
|
||||
const instance = getCurrentInstance()
|
||||
|
||||
function isActive(index) {
|
||||
return cur.value === index
|
||||
return index <= cur.value
|
||||
}
|
||||
|
||||
// 核心:精准居中计算(基于元素相对于内容容器的偏移)
|
||||
const calcScrollCenter = (index) => {
|
||||
nextTick(async () => {
|
||||
try {
|
||||
const query = uni.createSelectorQuery().in(instance)
|
||||
const calcScrollCenter = async (index) => {
|
||||
try {
|
||||
console.log('calcScrollCenter');
|
||||
const query = uni.createSelectorQuery().in(instance)
|
||||
|
||||
// 1. 获取滚动容器宽度
|
||||
const [scrollViewRect] = await new Promise(resolve => {
|
||||
query.select('.steps-scroll-container').boundingClientRect(rect => resolve([
|
||||
rect
|
||||
])).exec()
|
||||
})
|
||||
const scrollViewWidth = scrollViewRect?.width || 0
|
||||
// 1. 获取滚动容器宽度
|
||||
const [scrollViewRect] = await new Promise(resolve => {
|
||||
query.select('.steps-scroll-container').boundingClientRect(rect => resolve([
|
||||
rect
|
||||
])).exec()
|
||||
})
|
||||
const scrollViewWidth = scrollViewRect?.width || 0
|
||||
// 2. 获取当前步骤项的布局信息
|
||||
const [itemRect] = await new Promise(resolve => {
|
||||
query.select(`.step_${index}`).boundingClientRect(rect =>
|
||||
resolve([rect])).exec()
|
||||
})
|
||||
console.log('itemRect',itemRect);
|
||||
// 3. 获取内容容器的布局信息
|
||||
const [contentRect] = await new Promise(resolve => {
|
||||
query.select('.steps-content').boundingClientRect(rect => resolve([rect]))
|
||||
.exec()
|
||||
})
|
||||
|
||||
// 2. 获取当前步骤项的布局信息
|
||||
const [itemRect] = await new Promise(resolve => {
|
||||
query.select(`.step-item[data-index="${index}"]`).boundingClientRect(rect =>
|
||||
resolve([rect])).exec()
|
||||
})
|
||||
if (!itemRect || !contentRect) return
|
||||
|
||||
// 3. 获取内容容器的布局信息
|
||||
const [contentRect] = await new Promise(resolve => {
|
||||
query.select('.steps-content').boundingClientRect(rect => resolve([rect]))
|
||||
.exec()
|
||||
})
|
||||
// 关键修正:元素相对于内容容器的左偏移(而非视口)
|
||||
const itemOffsetLeft = itemRect.left - contentRect.left
|
||||
// 居中公式:滚动距离 = 元素偏移 - (容器宽度/2) + (元素宽度/2)
|
||||
let targetScrollLeft = itemOffsetLeft - (scrollViewWidth / 2) + (itemRect.width / 2)
|
||||
|
||||
if (!itemRect || !contentRect) return
|
||||
// 4. 计算最大可滚动距离(边界限制)
|
||||
const maxScrollLeft = Math.max(0, contentRect.width - scrollViewWidth)
|
||||
// 限制滚动范围,避免超出边界
|
||||
targetScrollLeft = Math.max(0, Math.min(targetScrollLeft, maxScrollLeft))
|
||||
|
||||
// 关键修正:元素相对于内容容器的左偏移(而非视口)
|
||||
const itemOffsetLeft = itemRect.left - contentRect.left
|
||||
// 居中公式:滚动距离 = 元素偏移 - (容器宽度/2) + (元素宽度/2)
|
||||
let targetScrollLeft = itemOffsetLeft - (scrollViewWidth / 2) + (itemRect.width / 2)
|
||||
// 5. 设置滚动距离(强制整数,避免小数导致的偏移)
|
||||
scrollLeft.value = Math.round(targetScrollLeft)
|
||||
|
||||
// 4. 计算最大可滚动距离(边界限制)
|
||||
const maxScrollLeft = Math.max(0, contentRect.width - scrollViewWidth)
|
||||
// 限制滚动范围,避免超出边界
|
||||
targetScrollLeft = Math.max(0, Math.min(targetScrollLeft, maxScrollLeft))
|
||||
|
||||
// 5. 设置滚动距离(强制整数,避免小数导致的偏移)
|
||||
scrollLeft.value = Math.round(targetScrollLeft)
|
||||
} catch (e) {
|
||||
console.error('计算居中失败:', e)
|
||||
}
|
||||
})
|
||||
console.log('scrollLeft', scrollLeft.value);
|
||||
} catch (e) {
|
||||
console.error('计算居中失败:', e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const emits = defineEmits(['itemClick'])
|
||||
// 点击事件
|
||||
const handleClick = (index) => {
|
||||
if (cur.value === index) return
|
||||
if (index > cur.value) {
|
||||
emits('itemClick', index)
|
||||
return
|
||||
}
|
||||
cur.value = index
|
||||
calcScrollCenter(index)
|
||||
// calcScrollCenter(index)
|
||||
}
|
||||
|
||||
// 初始化居中
|
||||
@@ -97,6 +106,10 @@
|
||||
calcScrollCenter(cur.value)
|
||||
})
|
||||
|
||||
watch(() => cur.value, (newval) => {
|
||||
calcScrollCenter(newval)
|
||||
})
|
||||
|
||||
// 步骤列表
|
||||
const list = ref(['基础信息', '法人信息', '营业执照信息', '门店信息', '结算信息'])
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user