Commit b9b2b46a authored by tanjuanjuan's avatar tanjuanjuan

测试

parent 2ce7c4e1
......@@ -6,17 +6,18 @@
</template>
</wd-navbar>
<view class="container" v-if="formFlag">
{{test}}
<wd-form ref="form" :model="model" :rules="rules">
<wd-cell-group border>
<wd-input label="身份证号" prop="idCardNum" v-model="model.idCardNum" clearable placeholder="请输入身份证号"
<wd-input label="身份证号" prop="certno" v-model="model.certno" clearable placeholder="请输入身份证号"
@change="handleIDChange" />
<wd-calendar label="开始日期" :show-confirm="false" prop="startDate" v-model="model.startDate"
placeholder="请选择开始日期" @confirm="confirmStartDate" />
<wd-calendar label="开始日期" :show-confirm="false" prop="accrymBegn" v-model="model.accrymBegn"
placeholder="请选择开始日期" @confirm="confirmStartDate" :min-date="1600000001745"/>
<wd-calendar label="结束日期" :show-confirm="false" prop="endDate" v-model="model.endDate"
placeholder="请选择结束日期" @confirm="confirmEndDate" />
<wd-calendar label="结束日期" :show-confirm="false" prop="accrymEnd" v-model="model.accrymEnd"
placeholder="请选择结束日期" @confirm="confirmEndDate" :min-date="1600000001745"/>
</wd-cell-group>
<view class="footer">
......@@ -24,7 +25,23 @@
</view>
</wd-form>
</view>
<view class="container" v-else>
<view class="container notform" v-else>
{{test}}
<template v-for="item in results">
<wd-card type="rectangle" custom-class="insuitem">
<template #title>
<view>缴费时间:{{getDate(item.clctTime)}}</view>
</template>
<view>险种类型:{{item.insutype}}</view>
<view>参保身份:{{item.insuIdet}}</view>
<view>缴费金额:{{item.psnClctAmt}}</view>
<template #footer>
<wd-button size="small" plain>查看详情</wd-button>
</template>
</wd-card>
</template>
</view>
<!--<view class="container" v-else>
<wd-cell-group>
<wd-cell title="单位编号" value="内容" />
<wd-cell title="人员编号" value="内容" />
......@@ -46,59 +63,70 @@
<wd-cell title="其他缴费金额" value="内容" />
<wd-cell title="缴费总金额" value="内容" />
</wd-cell-group>
</view>
</view>-->
</view>
</template>
<script setup lang="ts">
import type { FormRules } from 'wot-design-uni/components/wd-form/types';
const test=ref()
const form = ref()
const formFlag = ref(true)
let submitstr=""
const navBarTitle = computed(() => {
let str = !formFlag.value ? "结果" : ""
return "居民缴费进度查询" + str;
})
const model = reactive({
idCardNum: null,
startDate: null,
endDate: null
certno: 0,
accrymBegn: 1600000001745,
accrymEnd: 1700000001745
})
const pageSize="10"
const currentPage="1"
const results=ref([])
const rules : FormRules = {
idCardNum: [
certno: [
{
required: true,
message: '请输入身份证号码',
}
],
startDate: [
accrymBegn: [
{
required: true,
message: '请选择开始时间',
}
],
endDate: [
accrymEnd: [
{
required: true,
message: '请选择结束时间',
}
]
}
const convertToJson=()=>{
//const normalobj={...model,pageNum:currentPage,pageSize,psnNo:'52000002000000000400011816'};
const normalobj={certno:model.certno,pageNum:currentPage,pageSize,psnNo:'52000002000000000400011816'};
//const normalobj={...model,pageNum:currentPage,pageSize,psnNo:'52000002000000000400011816'};
submitstr=JSON.stringify(normalobj)
}
const getDate=(timestamp)=>{
//const year =
}
onLoad(() => {
model.idCardNum = "200"
model.certno = "520202199704155913"
xma.xh.getUserProfile({
range: ['ACCOUNT'],
success(info) {
// console.log("in on load");
// info.data:
// { uAvatar: '', uIdCardNo: '', uMobile: '', uName: '', uNickname: '', uid: '' }
//console.log(info.data);
if (info) {
model.idCardNum = info.data.uIdCardNo;
} else {
model.idCardNum = "100"
}
console.log("getInfoData")
console.log(info.data);
test.value=info.data
console.log(test)
}
});
......@@ -119,19 +147,22 @@
.validate()
.then(({ valid, errors }) => {
if (valid) {
convertToJson()
console.log("****")
console.log(submitstr)
xma.request({
url: "/engine/rest/queryRsdtPsnClctDetlList",
url: "back/one-visit/one-visit/web/ybVisit/ybSgySm2",
method: "POST",
data:{
"access_key":"0",
"certno": "520202199704155913",
"psnNo": "52000002000000000400011816",
"pageNum": "1",
"pageSize": "10"
format: "json",
data: {
"biz_content":submitstr,
"url":"/engine/rest/queryRsdtPsnClctDetlList"
},
success:(res)=>{
success: (res) => {
console.log("***")
console.log(res)
console.log(res.data?.biz_data?.body?.data?.data)
results.value=res.data?.biz_data?.body?.data?.data||[]
formFlag.value=false
}
})
}
......@@ -154,10 +185,14 @@
padding: 10rpx;
box-sizing: border-box;
}
.container.notform{
background:rgb(246, 246, 246);
}
}
.custom-text {
color: rgb(85, 170, 255)
}
.insuitem{margin-bottom:20px;}
</style>
\ No newline at end of file
......@@ -29,8 +29,8 @@ export default defineConfig({
open: true,
// 代理配置
proxy: {
'/engine/rest/queryRsdtPsnClctDetlList': {
target: 'https://dzpztest.pubs.ylbzj.guizhou.gov.cn/',
'/back/one-visit/one-visit/web/ybVisit/ybSgySm2': {
target: 'https://onemoment.gywb.cn/',
changeOrigin: true,
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment