Commit 8d133a3b authored by 14699's avatar 14699

'移动端需求优化'

parent 6b760d40
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
"build:projectList:test": "set VITE_TARGET=projectList&& vite build --mode test", "build:projectList:test": "set VITE_TARGET=projectList&& vite build --mode test",
"build:projectList:production": "set VITE_TARGET=projectList&& vite build --mode production", "build:projectList:production": "set VITE_TARGET=projectList&& vite build --mode production",
"build:makeRepayment:test": "set VITE_TARGET=makeRepayment&& vite build --mode test", "build:makeRepayment:test": "set VITE_TARGET=makeRepayment&& vite build --mode test",
"build:makeRepayment:production": "set VITE_TARGET=makeRepayment&& vite build --mode production" "build:makeRepayment:production": "set VITE_TARGET=makeRepayment&& vite build --mode production",
"build:homeMessage:test": "set VITE_TARGET=homeMessage&& vite build --mode test",
"build:homeMessage:production": "set VITE_TARGET=homeMessage&& vite build --mode production"
}, },
"dependencies": { "dependencies": {
"@hips/plugin-vue-jssdk": "^1.1.2", "@hips/plugin-vue-jssdk": "^1.1.2",
......
...@@ -42,8 +42,8 @@ export default { ...@@ -42,8 +42,8 @@ export default {
methods: { methods: {
async getBusinessToken(jumpRouter) { async getBusinessToken(jumpRouter) {
if (import.meta.env.VITE_LOCAL == 'true') { if (import.meta.env.VITE_LOCAL == 'true') {
window.localStorage.setItem('userId', 5) window.localStorage.setItem('userId', 17) //5
window.localStorage.setItem('phone', "18388105084") window.localStorage.setItem('phone', "17864386578") //17864386578
} }
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
let res = await post(`${baseURL}/app/api/app/user/token/get`, { let res = await post(`${baseURL}/app/api/app/user/token/get`, {
......
...@@ -125,14 +125,12 @@ const cascaderValue = ref('') ...@@ -125,14 +125,12 @@ const cascaderValue = ref('')
const currencyFormatter = (value) => currency(value.replace(/[^0-9.]*/g, '')); const currencyFormatter = (value) => currency(value.replace(/[^0-9.]*/g, ''));
const numberFormatter = function(value) { const numberFormatter = function(value) {
console.log(value)
if (!value || isNaN(+value)) return '0.00' if (!value || isNaN(+value)) return '0.00'
return +value.toFixed(2) return +value.toFixed(2)
}; };
function placeHolder(value, type, item = {}) { function placeHolder(value, type, item = {}) {
let val = value let val = value
const typeList = { const typeList = {
cell: '请选择', cell: '请选择',
input: '请输入', input: '请输入',
...@@ -140,7 +138,7 @@ function placeHolder(value, type, item = {}) { ...@@ -140,7 +138,7 @@ function placeHolder(value, type, item = {}) {
if (type === 'cell' && isObject(item.select[0])) { if (type === 'cell' && isObject(item.select[0])) {
let target = item.select.find(ele => ele.value === val) let target = item.select.find(ele => ele.value === val)
val = target?.text ?? target?.meaning val = target?.text ?? target?.meaning ?? ''
} }
if (type === 'rate') { if (type === 'rate') {
val = toPercent(item.value, false) val = toPercent(item.value, false)
...@@ -241,7 +239,7 @@ function getClass(item) { ...@@ -241,7 +239,7 @@ function getClass(item) {
// 必须填写 // 必须填写
:deep(.required .van-cell__title::before) { :deep(.required .van-cell__title::before) {
content: '*'; content: '*';
color: red; color: red !important;
} }
// 检验失败后 // 检验失败后
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<section class="list"> <section class="list">
<PullRefresh v-model="refreshing" @refresh="getList" class="scroll"> <PullRefresh v-model="refreshing" @refresh="getList" class="scroll">
<Notice detail="登录后可使用完整功能" v-if="showNotice"/>
<List :finished="finished" finished-text="没有更多了"> <List :finished="finished" finished-text="没有更多了">
<Empty v-if="!listValue.length" description="无计算记录" /> <Empty v-if="!listValue.length" description="无计算记录" />
<ListItem v-else v-for="item in listValue" :title="item.title" :values="item.values" <ListItem v-else v-for="item in listValue" :title="item.title" :values="item.values"
...@@ -22,6 +22,7 @@ import { goBack } from "@/utils/globalFun" ...@@ -22,6 +22,7 @@ import { goBack } from "@/utils/globalFun"
import { NavBar, List, PullRefresh, Empty, Toast } from "vant"; import { NavBar, List, PullRefresh, Empty, Toast } from "vant";
import ListItem from '@/components/ListItem.vue' import ListItem from '@/components/ListItem.vue'
import Plus from '@/components/Plus.vue' import Plus from '@/components/Plus.vue'
import Notice from '@/components/Notice.vue'
import api from "../api"; import api from "../api";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { usePlan } from '../store/index' import { usePlan } from '../store/index'
...@@ -32,8 +33,14 @@ const planStore = usePlan() ...@@ -32,8 +33,14 @@ const planStore = usePlan()
let refreshing = $ref(true); let refreshing = $ref(true);
const finished = $ref(true); const finished = $ref(true);
let listValue = $ref([]) let listValue = $ref([])
let showNotice = window.localStorage.getItem('userRole') == 'tourist'?true:false
let getList = async () => { let getList = async () => {
// 游客模式 不查询
if(window.localStorage.getItem('userRole') == 'tourist') {
refreshing = false;
return
}
let list = await api.financingCalculator({ userId: window.localStorage.getItem('userId') }) let list = await api.financingCalculator({ userId: window.localStorage.getItem('userId') })
if (list.rows && list.rows.length) { if (list.rows && list.rows.length) {
list = list.rows.map(item => list = list.rows.map(item =>
......
...@@ -64,7 +64,7 @@ onActivated(() => { ...@@ -64,7 +64,7 @@ onActivated(() => {
const router = useRouter(); const router = useRouter();
const save = async () => { const save = async () => {
if (isComplete) { if (isComplete || window.localStorage.getItem('userRole') == 'tourist') {
const planStore = usePlan() const planStore = usePlan()
planStore.planData = {}; planStore.planData = {};
return router.go(-2) return router.go(-2)
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<section class="form-area"> <section class="form-area">
<AuForm v-model="formConfig" :key="form" /> <AuForm v-model="formConfig" :key="form" />
<Field class="message" v-model="suggestInformation" rows="2" :autosize="{ minHeight: 100 }" label="投诉与建议" <Field class= "message" :class="{'fail':isSuggestClick}" v-model="suggestInformation" rows="2" :autosize="{ minHeight: 100 }" label="投诉与建议"
type="textarea" maxlength="300" placeholder="请输入你的宝贵意见(最多300字)" show-word-limit /> type="textarea" maxlength="300" placeholder="请输入你的宝贵意见(最多300字)" show-word-limit/>
</section> </section>
<section class="sub"> <section class="sub">
...@@ -68,8 +68,10 @@ const formConfig = $ref(new AuFormClass([ ...@@ -68,8 +68,10 @@ const formConfig = $ref(new AuFormClass([
} }
])) ]))
const suggestInformation = $ref('') const suggestInformation = $ref('')
let isSuggestClick = $ref(false)
const save = async () => { const save = async () => {
isSuggestClick = !suggestInformation
if (formConfig.validate() && suggestInformation.trim().length) { if (formConfig.validate() && suggestInformation.trim().length) {
let formObj = formConfig.getValues(); let formObj = formConfig.getValues();
let res = await api.commit({suggestInformation, ...formObj}) let res = await api.commit({suggestInformation, ...formObj})
...@@ -85,6 +87,12 @@ const save = async () => { ...@@ -85,6 +87,12 @@ const save = async () => {
Toast({ message: '请将必填项填写完整', position: 'top' }); Toast({ message: '请将必填项填写完整', position: 'top' });
} }
} }
function getClass() {
let flag = false
if(suggestInformation.length > 0) flag = true
console.log(!flag&&isSuggestClick)
return [!flag&&isSuggestClick? 'fail' : '']
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -121,9 +129,9 @@ const save = async () => { ...@@ -121,9 +129,9 @@ const save = async () => {
flex-direction: column; flex-direction: column;
} }
:deep(.message label) { /*:deep(.message label) {*/
color: #323233; /* color: #323233;*/
} /*}*/
:deep(.message textarea) { :deep(.message textarea) {
border: 1px solid #f1f1f1; border: 1px solid #f1f1f1;
...@@ -136,6 +144,14 @@ const save = async () => { ...@@ -136,6 +144,14 @@ const save = async () => {
content: '*'; content: '*';
color: red; color: red;
} }
.fail{
color: red !important;
}
:deep(.fail .van-cell__title) {
color: red !important;
}
</style> </style>
<route> <route>
......
...@@ -2,8 +2,8 @@ import { ref } from 'vue' ...@@ -2,8 +2,8 @@ import { ref } from 'vue'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
export const usePlan = defineStore('plan', () => { export const usePlanData = defineStore('usePlanDataStore', () => {
const planData = ref({}) const planData = ref({})
const active = ref(0)
return { planData } return { planData }
}) })
<template> <template>
<div class="container"> <div class="container">
<NavBar title="合同签约" left-arrow @click-left="goBack" /> <NavBar title="合同签约" left-arrow @click-left="goBack(true)" />
<section class="list"> <section class="list">
<Tabs v-model:active="active" title-active-color="#0277bc" color="#0277bc" @change="TabChange"> <Tabs v-model:active="active" title-active-color="#0277bc" color="#0277bc" @change="TabChange">
<Search v-model="searchValue" placeholder="请输入合同编号/代理店" @search="onSearch"/> <Search v-model="searchValue" placeholder="请输入合同编号/代理店" @update:model-value="onSearch"/>
<Tab title="未签署"> <Tab title="未签署">
<Notice detail="只对已关联的项目发送合同签约链接" /> <Notice detail="只对已关联的项目发送合同签约链接" />
...@@ -34,24 +34,42 @@ import { NavBar, List, PullRefresh, Tab, Tabs, Search, Toast } from "vant"; ...@@ -34,24 +34,42 @@ import { NavBar, List, PullRefresh, Tab, Tabs, Search, Toast } from "vant";
import Notice from '@/components/Notice.vue' import Notice from '@/components/Notice.vue'
import SignListItem from '../components/SignListItem.vue' import SignListItem from '../components/SignListItem.vue'
import popMessage from '@/components/popMessage.vue' import popMessage from '@/components/popMessage.vue'
import {watchEffect} from "vue";
import api from "../api"; import api from "../api";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { usePlanData } from '../store/index'
let notList = $ref([]) let notList = $ref([])
let alreadyList = $ref([]) let alreadyList = $ref([])
const usePlanDataStore = usePlanData()
const active = $ref(0) let active = $ref(0)
let searchValue = $ref('') let searchValue = $ref('')
let refreshing = $ref(true); let refreshing = $ref(true);
let finished = $ref(true); let finished = $ref(true);
let pager = { let pager = {
page: 1, page: 1,
pageSize: 10 pageSize: 10
} }
watchEffect(() => {
if(usePlanDataStore.active){
active = usePlanDataStore.active
}
})
const onSearch = () => { const onSearch = () => {
if (active === 0) {
notList = []
} else {
alreadyList = []
}
finished = true;
refreshing = true;
pager.page = 1;
pager.pageSize = 10;
queryList() queryList()
} }
...@@ -62,8 +80,13 @@ let queryList = async () => { ...@@ -62,8 +80,13 @@ let queryList = async () => {
agencyName: searchValue, agencyName: searchValue,
receivets: + new Date() + '', receivets: + new Date() + '',
projectNumber: searchValue, projectNumber: searchValue,
...pager // ...pager
}) })
if (active === 0) {
notList = []
} else {
alreadyList = []
}
if (res.success && res.rows.length > 0) { if (res.success && res.rows.length > 0) {
res.rows.forEach(item => { res.rows.forEach(item => {
let temp = { let temp = {
...@@ -98,12 +121,14 @@ const onRefresh = () => { ...@@ -98,12 +121,14 @@ const onRefresh = () => {
} }
finished = true finished = true
refreshing = true refreshing = true
searchValue = '';
pager.page = 1; pager.page = 1;
pager.pageSize = 10; pager.pageSize = 10;
queryList() queryList()
}; };
let TabChange = () => { let TabChange = () => {
usePlanDataStore.active = active
if ((active === 0 && !notList.length) || (active === 1 && !alreadyList.length)) { if ((active === 0 && !notList.length) || (active === 1 && !alreadyList.length)) {
onRefresh() onRefresh()
} }
...@@ -117,13 +142,19 @@ const loadApproval = () => { ...@@ -117,13 +142,19 @@ const loadApproval = () => {
const router = useRouter(); const router = useRouter();
const pdfPre = (item) => { const pdfPre = (item) => {
// router.push({ name: 'contractSign-views-pdfPre' }) if(item.esignFlowId){
router.push({ name: 'contractSign-views-pdfPreList', item: item }) router.push({ path: '/contractsign/views/pdfprelist', query: { esignFlowId: item.esignFlowId } })
} else {
Toast('未获取到签署合同,请联系管理员!');
}
} }
let eSign = (eUrl) => { const eSign = (eUrl) => {
// eUrl = 'http://www.baidu.com' if(eUrl){
router.push({ path: '/contractsign/views/esign', query: { url: eUrl } }) router.push({ path: '/contractsign/views/esign', query: { url: eUrl } })
} else {
Toast('未获取到签署合同链接,请联系管理员!');
}
} }
</script> </script>
...@@ -142,6 +173,7 @@ let eSign = (eUrl) => { ...@@ -142,6 +173,7 @@ let eSign = (eUrl) => {
box-sizing: border-box; box-sizing: border-box;
height: calc(100vh - 56vw); height: calc(100vh - 56vw);
overflow-y: auto; overflow-y: auto;
padding-top: 10px;
} }
</style> </style>
......
...@@ -13,12 +13,15 @@ import { goBack } from "@/utils/globalFun" ...@@ -13,12 +13,15 @@ import { goBack } from "@/utils/globalFun"
import { NavBar, Toast } from "vant"; import { NavBar, Toast } from "vant";
import VuePdfEmbed from 'vue-pdf-embed' import VuePdfEmbed from 'vue-pdf-embed'
import { watchEffect } from 'vue' import { watchEffect } from 'vue'
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
let isLoading = $ref(true) let isLoading = $ref(true)
const page = $ref(null) const page = $ref(null)
const pdfRef = $ref('') const pdfRef = $ref('')
let pageCount = $ref(1) let pageCount = $ref(1)
const pdfSource = $ref('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf') let pdfSource = $ref(route.query.url)
watchEffect(() => { watchEffect(() => {
if (isLoading) { if (isLoading) {
......
...@@ -2,36 +2,57 @@ ...@@ -2,36 +2,57 @@
<div class="container"> <div class="container">
<NavBar title="合同预览列表" left-arrow @click-left="goBack" /> <NavBar title="合同预览列表" left-arrow @click-left="goBack" />
<section class="list"> <section class="list">
<ListItem v-for="item in preList" :values="item.documentName" @click="jump(item.intentionId)" /> <PullRefresh v-model="refreshing" @refresh="getDailyLiquidatedDetail" class="scroll">
<List :finished="finished" finished-text="没有更多了">
<div class="item" v-for="item in preList">
<div class="left">
<img src="../../../assets/list.png"/>
<div class="title">{{item.documentName}}</div>
</div>
<div class="button-status sign" @click="jump(item)">查看</div>
</div>
</List>
</PullRefresh>
</section> </section>
</div> </div>
</template> </template>
<script setup> <script setup>
import { goBack } from "@/utils/globalFun" import { goBack } from "@/utils/globalFun"
import { NavBar, List, PullRefresh, Empty } from "vant"; import { NavBar, List, PullRefresh, Empty, Toast} from "vant";
import ListItem from '@/components/ListItem.vue' import ListItem from '@/components/ListItem.vue'
import api from "../api"; import api from "../api";
import { useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { useIntention } from '../store/index'
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
let refreshing = $ref(true);
const finished = $ref(true);
const esignFlowId = $ref(route.item.esignFlowId); const esignFlowId = route.query.esignFlowId;
let preList = $ref([]); let preList = $ref([]);
const getDailyLiquidatedDetail = async () => { const getDailyLiquidatedDetail = async () => {
const res = await api.preListQuery({"esignFlowId": esignFlowId}) const res = await api.preListQuery({"esignFlowId": esignFlowId})
refreshing = false;
if(res.success){ if(res.success){
preList = res.rows preList = res.rows
} else { } else {
Toast.fail('请求失败,请联系管理员!'); Toast('请求失败,请联系管理员!');
} }
}; };
getDailyLiquidatedDetail(); getDailyLiquidatedDetail();
const jump = (item) => {
if(item.fileUrl){
router.push({ path: '/contractsign/views/pdfPre', query: { url: item.fileUrl } })
} else {
Toast('未获取到签署文件!');
}
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
...@@ -50,5 +71,43 @@ getDailyLiquidatedDetail(); ...@@ -50,5 +71,43 @@ getDailyLiquidatedDetail();
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
} }
.item{
width: 100%;
height: 50px;
margin:0 auto;
background-color: #fff;
margin-top:10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.left {
display: flex;
}
.item img{
width: 20px;
height: 20px;
margin-left: 16px;
}
.item .title{
font-size: 14px;
color: #656464;
margin-left: 16px;
font-weight: 600;
line-height: 20px;
}
.button-status{
width: 54px;
height: 20px;
font-size: 12px;
border-radius: 10px;
display: flex;
justify-content: center;
align-items: center;
margin-right: 15px;
}
.sign{
color: #2499FF;
}
</style> </style>
import { post } from '@/utils/http'
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
// 消息查询
messageQuery(data = {}) {
return post(`${baseURL}/app/api/app/user/msg/notice`, data)
},
};
export default api;
const state = {};
export default {
};
<template>
<div class="container">
<div class="title-content">
<div class="title-left">最新消息</div>
<div class="title-right">{{messageTotal}}</div>
</div>
<NoticeBar v-if="messageList.length === 0" left-icon="volume-o" color="#2979FF" background="#EAF2FF" text="暂无消息"/>
<NoticeBar v-if="messageList.length>0" left-icon="volume-o" scrollable color="#2979FF" background="#EAF2FF" :text="messageList[0].messageContent"/>
<NoticeBar v-if="messageList.length>1" left-icon="volume-o" scrollable color="#2979FF" background="#EAF2FF" :text="messageList[1].messageContent"/>
<div class="title-content">
<div class="title-left">还款计划消息</div>
<div class="title-right">{{repaymentMessageTotal}}</div>
</div>
<NoticeBar v-if="repaymentMessageList.length=== 0" left-icon="volume-o" color="#2979FF" background="#EAF2FF" text="暂无消息"/>
<NoticeBar v-if="repaymentMessageList.length>0" left-icon="volume-o" scrollable color="#2979FF" background="#EAF2FF" :text="repaymentMessageList[0].messageContent"/>
<NoticeBar v-if="repaymentMessageList.length>1" left-icon="volume-o" scrollable color="#2979FF" background="#EAF2FF" :text="repaymentMessageList[1].messageContent"/>
</div>
</template>
<script setup>
import api from "../api";
import { NoticeBar, List } from "vant";
let messageList = $ref([])
let messageTotal = $ref()
let repaymentMessageList = $ref([])
let repaymentMessageTotal = $ref()
const getList = async () => {
let res = await api.messageQuery({
readFlag: 'N'
})
if (res.success && res.rows.length > 0) {
messageList = res.rows
messageTotal = res.total + '条新消息'
}
};
getList()
const getRepaymentList = async () => {
let result = await api.messageQuery({
readFlag: 'N',
messageCode: "repaymentMessage"
})
if (result.success && result.rows.length > 0) {
repaymentMessageList = result.rows
repaymentMessageTotal = result.total + '条新消息'
}
};
getRepaymentList()
</script>
<style scoped lang="less">
.page{
background-color: #fff;
}
.container{
background-color: #fff;
}
.title-content{
display: flex;
justify-content: space-between;
height: 40px;
line-height: 40px;
padding: 0px 10px 0px 10px;
background-color: #EAF2FF;
}
</style>
<route>
{
meta: {
title: '首页消息'
}
}
</route>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<script setup> <script setup>
import { goBack } from "@/utils/globalFun" import { goBack } from "@/utils/globalFun"
import nation from "@/utils/nation" import nation from "@/utils/nation"
import { NavBar, Button, Field, Tab, Tabs, Toast } from "vant"; import { NavBar, Button, Field, Tab, Tabs, Toast, Dialog} from "vant";
import AuForm from '@/components/AuForm.vue'; import AuForm from '@/components/AuForm.vue';
import AuFormClass from "@/components/useAuForm"; import AuFormClass from "@/components/useAuForm";
import { areaList } from '@vant/area-data'; import { areaList } from '@vant/area-data';
...@@ -588,6 +588,7 @@ const fillForm = () => { ...@@ -588,6 +588,7 @@ const fillForm = () => {
orgAddressFormConfig.clearForm() orgAddressFormConfig.clearForm()
orgContactPersonConfig.clearForm() orgContactPersonConfig.clearForm()
} else { } else {
console.log(infoChangeStore.data)
refV01 = infoChangeStore.data.hlsBpMasterAddress?.refV01 refV01 = infoChangeStore.data.hlsBpMasterAddress?.refV01
remark = infoChangeStore.data.hlsBpMasterContactInfo?.remark remark = infoChangeStore.data.hlsBpMasterContactInfo?.remark
provinceId = infoChangeStore.data.hlsBpMasterAddress?.provinceId provinceId = infoChangeStore.data.hlsBpMasterAddress?.provinceId
...@@ -652,19 +653,22 @@ queryPrj() ...@@ -652,19 +653,22 @@ queryPrj()
const submit = async () => { const submit = async () => {
let obj2 = bpObj.bpClass === 'ORG'?orgAddressFormConfig.getValues() : npAddressFormConfig.getValues() let obj2 = bpObj.bpClass === 'ORG'?orgAddressFormConfig.getValues() : npAddressFormConfig.getValues()
let obj3 = bpObj.bpClass === 'ORG'?orgContactPersonConfig.getValues() : npContactPersonConfig.getValues() let obj3 = bpObj.bpClass === 'ORG'?orgContactPersonConfig.getValues() : npContactPersonConfig.getValues()
// let provinceId = obj2.area obj2 = obj2.addressType?{...infoChangeStore.data.hlsBpMasterAddress,...obj2,refV01, provinceId, cityId, districtId}:{}
// let cityId = obj2.area obj3 = obj3.contactType?{...infoChangeStore.data.hlsBpMasterContactInfo,...obj3, remark }:{}
// let districtId = obj2.area console.log(obj3)
obj3.dateOfBirth = moment(obj3.dateOfBirth).format('YYYY-MM-DD') console.log(obj3.length)
if(obj3){
let params = { hlsBpMasterAddress: { ...obj2, refV01, provinceId, cityId, districtId}, hlsBpMasterContactInfo: { ...obj3, remark }, ...bpObj } obj3.dateOfBirth = obj3.dateOfBirth?moment(obj3.dateOfBirth).format('YYYY-MM-DD'):''
console.log(obj3.dateOfBirth)
}
let params = { ...bpObj, hlsBpMasterAddress: obj2, hlsBpMasterContactInfo: obj3 }
let res = await api.changeApprove(params) let res = await api.changeApprove(params)
if (res.success) { if (res.success) {
Toast.success('提交成功') Toast.success('提交成功')
setTimeout(() => { setTimeout(() => {
goBack() goBack()
}, 2000); }, 1000);
} else { } else {
Toast.fail(res.message) Toast.fail(res.message)
} }
...@@ -683,13 +687,19 @@ const NextStepWork = () => { ...@@ -683,13 +687,19 @@ const NextStepWork = () => {
}; };
const buttonClick = () => { const buttonClick = () => {
if (isOpenConfig && middleConfig.validate()) { if (isOpenConfig && middleConfig.validate()) {
NextStepWork() NextStepWork()
} else if (!isOpenConfig && !readonly && ((bpObj.bpClass === "ORG" && orgAddressFormConfig.validate() && orgContactPersonConfig.validate()) || (bpObj.bpClass === "NP" && npAddressFormConfig.validate() && npContactPersonConfig.validate()))) { } else if (!isOpenConfig && !readonly){
submit() checkForm()
} else { } else {
Toast.fail('请将数据填写完整')
} }
// else if (!isOpenConfig && !readonly && ((bpObj.bpClass === "ORG" && orgAddressFormConfig.validate() && orgContactPersonConfig.validate()) || (bpObj.bpClass === "NP" && npAddressFormConfig.validate() && npContactPersonConfig.validate()))) {
// submit()
// } else {
// Toast.fail('请将数据填写完整')
// }
} }
const goLastPage = () => { const goLastPage = () => {
...@@ -706,6 +716,91 @@ const handleSelect = (value) => { ...@@ -706,6 +716,91 @@ const handleSelect = (value) => {
} }
} }
const checkForm = () => {
let contractObj = bpObj.bpClass === 'ORG'? orgContactPersonConfig.getValues():npContactPersonConfig.getValues();
let addressObj = bpObj.bpClass === 'ORG'? orgAddressFormConfig.getValues():npAddressFormConfig.getValues();
let contractCheckFlag = false;
let addressCheckFlag = false;
let addressFlag = false;
let contractFlag = false;
// 地址页时点击申请
if(active === 0 ){
// 判断地址信息是否填写完整
addressCheckFlag = bpObj.bpClass === 'ORG'? orgAddressFormConfig.validate():npAddressFormConfig.validate()
if(addressCheckFlag){
// 遍历联系人信息是否填写
Object.values(contractObj).forEach(item => {
if(item !== ''){
contractFlag = true
return item
}
})
// 联系人信息已填写信息
if(contractFlag){
// 校验联系人信息完整度
contractCheckFlag = bpObj.bpClass === 'ORG'? orgContactPersonConfig.validate():npContactPersonConfig.validate()
if(contractCheckFlag) {
submit()
} else {
active = 1
Toast.fail('请将联系人信息补充完整!')
}
} else {
Dialog.confirm({
title: '提示',
message: '是否变更联系人信息?',
confirmButtonText: '是',
cancelButtonText: '否'
}).then(() => {
active = 1
}).catch(() => {
submit()
})
}
} else {
Toast.fail('请将地址信息补充完整!')
}
} else {
// 判断联系人信息是否填写完整
contractCheckFlag = bpObj.bpClass === 'ORG'? orgContactPersonConfig.validate():npContactPersonConfig.validate()
if(contractCheckFlag){
// 遍历地址信息是否填写
Object.values(addressObj).forEach(item => {
if(item !== ''){
addressFlag = true
return item
}
})
// 地址信息已填写信息
if(addressFlag){
// 校验地址信息信息完整度
addressCheckFlag = bpObj.bpClass === 'ORG'? orgAddressFormConfig.validate():npAddressFormConfig.validate()
if(addressCheckFlag) {
submit()
} else {
active = 0
Toast.fail('请将地址信息补充完整!')
}
} else {
Dialog.confirm({
title: '提示',
message: '是否变更地址信息?',
confirmButtonText: '是',
cancelButtonText: '否'
}).then(() => {
active = 0
}).catch(() => {
submit()
})
}
} else {
Toast.fail('请将联系人信息补充完整!')
}
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -60,13 +60,14 @@ const router = useRouter(); ...@@ -60,13 +60,14 @@ const router = useRouter();
const getDetail = async (item) => { const getDetail = async (item) => {
let res = await api.requestDetail({ bpClass: item.bpClass, changeReqId: item.changeReqId }) let res = await api.requestDetail({ bpClass: item.bpClass, changeReqId: item.changeReqId })
if (res.success && res.rows.length && res.rows[0].hlsBpMasterAddress.length) { if (res.success && res.rows.length>0) {
let hlsBpMasterAddress = res.rows[0].hlsBpMasterAddress[0] let hlsBpMasterAddress = res.rows[0].hlsBpMasterAddress[0]
hlsBpMasterAddress.area = hlsBpMasterAddress.provinceIdN + hlsBpMasterAddress.cityIdN + hlsBpMasterAddress.districtIdN if(hlsBpMasterAddress){
hlsBpMasterAddress.area = hlsBpMasterAddress.provinceIdN + hlsBpMasterAddress.cityIdN + hlsBpMasterAddress.districtIdN
}
let hlsBpMasterContactInfo = res.rows[0].hlsBpMasterContactInfo[0] let hlsBpMasterContactInfo = res.rows[0].hlsBpMasterContactInfo[0]
return { hlsBpMasterAddress, hlsBpMasterContactInfo } return { hlsBpMasterAddress, hlsBpMasterContactInfo }
} else { } else {
Toast.fail('获取信息详情失败')
return {} return {}
} }
}; };
...@@ -77,13 +78,11 @@ const jump = async (item) => { ...@@ -77,13 +78,11 @@ const jump = async (item) => {
if (item.reqStatus && item.reqStatus === 'RETURN') { if (item.reqStatus && item.reqStatus === 'RETURN') {
infoChangeStore.data = await getDetail(item) infoChangeStore.data = await getDetail(item)
infoChangeStore.data.bpObj = item; infoChangeStore.data.bpObj = item;
if (infoChangeStore.data.hlsBpMasterAddress) router.push({ path: '/infochange/views/changeform', query: { isReturn: true } })
router.push({ path: '/infochange/views/changeform', query: { isReturn: true } })
} else if (item.reqStatus && item.reqStatus !== 'RETURN') { } else if (item.reqStatus && item.reqStatus !== 'RETURN') {
infoChangeStore.data = await getDetail(item) infoChangeStore.data = await getDetail(item)
infoChangeStore.data.bpObj = item; infoChangeStore.data.bpObj = item;
if (infoChangeStore.data.hlsBpMasterAddress) router.push({ path: '/infochange/views/changeform', query: { isReturn: false } })
router.push({ path: '/infochange/views/changeform', query: { isReturn: false } })
} else { } else {
infoChangeStore.data = {} infoChangeStore.data = {}
infoChangeStore.data.bpObj = item; infoChangeStore.data.bpObj = item;
......
...@@ -108,6 +108,7 @@ let message = $ref('') ...@@ -108,6 +108,7 @@ let message = $ref('')
let formConfig = $ref(new AuFormClass(formRaw)) let formConfig = $ref(new AuFormClass(formRaw))
let messageDisabled = $ref(false) let messageDisabled = $ref(false)
let agentList = [] let agentList = []
let checkAgentObj = {}
const router = useRouter() const router = useRouter()
...@@ -125,7 +126,8 @@ const save = async () => { ...@@ -125,7 +126,8 @@ const save = async () => {
} }
let validateValue = checkValues(formValueObj); let validateValue = checkValues(formValueObj);
if(validateValue) { if(validateValue) {
let res = await api.saveInfo({ remark: message, ...formValueObj, financeAmount: +formValueObj.financeAmount}) console.log(checkAgentObj)
let res = await api.saveInfo({ remark: message, ...formValueObj, financeAmount: +formValueObj.financeAmount,...checkAgentObj})
if (res.success) { if (res.success) {
Toast.success('已提交申请至小松融资租赁公司'); Toast.success('已提交申请至小松融资租赁公司');
} else { } else {
...@@ -141,21 +143,34 @@ const save = async () => { ...@@ -141,21 +143,34 @@ const save = async () => {
}; };
const getLocation = () => { const getLocation = () => {
Toast.loading({
duration: 0,
forbidClick: true,
message: '加载中...',
});
location(function (res) { location(function (res) {
let info = JSON.parse(res); let info = JSON.parse(res);
console.log(info); console.log(info);
let provineReg = new RegExp(info.address.province) let provineReg = new RegExp(info.address.province)
let cityReg = new RegExp(info.address.city) let cityReg = new RegExp(info.address.city)
let temp1 = agentList.filter(item => provineReg.test(item.provinceIdN)); let temp1 = agentList.filter(item => provineReg.test(item.provinceIdN));
console.log(agentList); Toast.clear();
if (temp1.length > 0) { if (temp1.length > 0) {
let temp2 = temp1.filter(item => cityReg.test(item.cityIdN)) let temp2 = temp1.filter(item => cityReg.test(item.cityIdN))
if (temp2.length > 0) { if (temp2.length > 0) {
formConfig.setFormValue('agentBpName', 'value', temp2[0].value) formConfig.setFormValue('agentBpName', 'value', temp2[0].value)
formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone) formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone)
checkAgentObj = {
agentBpName: temp2[0].bpName,
agentBpId: temp2[0].bpId
}
} else { } else {
formConfig.setFormValue('agentBpName', 'value', temp1[0].value) formConfig.setFormValue('agentBpName', 'value', temp1[0].value)
formConfig.setFormValue('agentPhone', 'value', temp1[0].cellPhone) formConfig.setFormValue('agentPhone', 'value', temp1[0].cellPhone)
checkAgentObj = {
agentBpName: temp1[0].bpName,
agentBpId: temp1[0].bpId
}
} }
} }
}, function (error) { }, function (error) {
...@@ -170,7 +185,7 @@ const getFormVal = () => { ...@@ -170,7 +185,7 @@ const getFormVal = () => {
formConfig.setAll('disabled', () => true); formConfig.setAll('disabled', () => true);
messageDisabled = true; messageDisabled = true;
} else { } else {
getLocation() getLocation()
} }
}; };
...@@ -178,6 +193,10 @@ const handleSelect = (value) => { ...@@ -178,6 +193,10 @@ const handleSelect = (value) => {
console.log('选择框选择后拿到的值:', value) console.log('选择框选择后拿到的值:', value)
if(value.type === "picker"){ if(value.type === "picker"){
formConfig.setFormValue('agentPhone', 'value', value.cellPhone) formConfig.setFormValue('agentPhone', 'value', value.cellPhone)
checkAgentObj = {
agentBpName: value.bpName,
agentBpId: value.bpId
}
} }
}; };
...@@ -194,9 +213,10 @@ const handleAgent = async () => { ...@@ -194,9 +213,10 @@ const handleAgent = async () => {
bpName: item.bpName, bpName: item.bpName,
bpCode: item.bpCode, bpCode: item.bpCode,
cellPhone: item.cellPhone, cellPhone: item.cellPhone,
bpId: item.bpId,
}) })
).map(item => { ).map(item => {
return { text: item.bpName, value: item.bpCode, ...item } return { text: item.bpName, value: item.bpName, ...item }
}).sort((a, b) => (a.text.localeCompare(b.text))) }).sort((a, b) => (a.text.localeCompare(b.text)))
formStore.agentList = agentList; formStore.agentList = agentList;
} }
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
round round
position="bottom" position="bottom"
class="payModalStyle" class="payModalStyle"
:style="{ height: '70%' }"
> >
<div class="van-nav-bar-pay van-hairline--bottom" data-v-8b47ba6a=""> <div class="van-nav-bar-pay van-hairline--bottom" data-v-8b47ba6a="">
<div class="van-nav-bar__content"> <div class="van-nav-bar__content">
...@@ -16,15 +15,19 @@ ...@@ -16,15 +15,19 @@
</div> </div>
<div class="pay-money-content"> <div class="pay-money-content">
<Field v-model="orderAmount" type="number" label="¥" readonly /> <Field v-model="orderAmount" type="number" label="¥" readonly />
<div class="pay-money-update" style="float: right" @click="updatAmount">修改</div> <div class="pay-money-update" style="float: right" @click="updatAmount" v-if="isModify">修改</div>
</div> </div>
<div class="pay-money-mode"> <div class="pay-money-mode">
<div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a=""> <div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a="">
<div class="van-cell__title"><span>订单金额</span><!----></div> <div class="van-cell__title"><span>应付金额</span></div>
<div class="van-cell__value_mode"><span>{{payAmount}}</span></div>
</div>
<div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a="">
<div class="van-cell__title"><span>本次支付金额</span></div>
<div class="van-cell__value_mode"><span>{{orderAmount}}</span></div> <div class="van-cell__value_mode"><span>{{orderAmount}}</span></div>
</div> </div>
<div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a=""> <div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a="">
<div class="van-cell__title"><span>支付方式</span><!----></div> <div class="van-cell__title"><span>支付方式</span></div>
<div class="van-cell__value_mode"><span>{{checkArray[checked]}}</span></div> <div class="van-cell__value_mode"><span>{{checkArray[checked]}}</span></div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"></i> <i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"></i>
</div> </div>
...@@ -88,26 +91,26 @@ ...@@ -88,26 +91,26 @@
<!-- <Cell title="支付方式" is-link value="内容" />--> <!-- <Cell title="支付方式" is-link value="内容" />-->
</div> </div>
</Popup> </Popup>
<Popup v-model:show="showDialog" position="bottom" :style="{ height: '60%', padding: '20px' }"> <!-- <Popup v-model:show="showDialog" position="bottom" :style="{ height: '60%', padding: '20px' }">-->
<i class="van-badge__wrapper van-icon van-icon-cross van-popup__close-icon van-popup__close-icon--top-right van-haptics-feedback" role="button" tabindex="0"><!----><!----><!----></i> <!-- <i class="van-badge__wrapper van-icon van-icon-cross van-popup__close-icon van-popup__close-icon&#45;&#45;top-right van-haptics-feedback" role="button" tabindex="0">&lt;!&ndash;&ndash;&gt;&lt;!&ndash;&ndash;&gt;&lt;!&ndash;&ndash;&gt;</i>-->
<div> <!-- <div>-->
<div :style="{fontWeight: '600', marginLeft: '130px'}">请输入密码</div> <!-- <div :style="{fontWeight: '600', marginLeft: '130px'}">请输入密码</div>-->
<div :style="{marginLeft: '135px',marginTop:'10px', marginBottom: '20px'}"> <!-- <div :style="{marginLeft: '135px',marginTop:'10px', marginBottom: '20px'}">-->
<span :style="{fontSize: '13px'}">金额:{{orderAmount}}</span> <!-- <span :style="{fontSize: '13px'}">金额:{{orderAmount}}</span>-->
</div> <!-- </div>-->
<PasswordInput <!-- <PasswordInput-->
:value="password" <!-- :value="password"-->
:gutter="10" <!-- :gutter="10"-->
:focused="showKeyboard" <!-- :focused="showKeyboard"-->
@focus="showKeyboard = true" <!-- @focus="showKeyboard = true"-->
/> <!-- />-->
<div class="finish-pay" @click="handleFinishAmount">完成</div> <!-- <div class="finish-pay" @click="handleFinishAmount">完成</div>-->
<NumberKeyboard <!-- <NumberKeyboard-->
v-model="password" <!-- v-model="password"-->
:show="showKeyboard" <!-- :show="showKeyboard"-->
/> <!-- />-->
</div> <!-- </div>-->
</Popup> <!-- </Popup>-->
</template> </template>
<script setup> <script setup>
...@@ -125,10 +128,11 @@ const props = defineProps({ ...@@ -125,10 +128,11 @@ const props = defineProps({
default: { default: {
cashflowId: '', cashflowId: '',
payAmount: '', payAmount: '',
cfItem: '',
} }
}, },
}) })
const emit = defineEmits(['payMoneyClick', 'closePage']) const emit = defineEmits(['payMoneyClick', 'closePage', 'paySuccess', 'payFail'])
// const state = reactive({ // const state = reactive({
// showDialog: true, //弹窗 // showDialog: true, //弹窗
...@@ -136,14 +140,18 @@ const emit = defineEmits(['payMoneyClick', 'closePage']) ...@@ -136,14 +140,18 @@ const emit = defineEmits(['payMoneyClick', 'closePage'])
const showDialog = ref(false); const showDialog = ref(false);
const show = ref(false); const show = ref(false);
const checked = ref('ALI_PAY'); const checked = ref('ALI_PAY');
const payAmount = ref();
const orderAmount = ref(); const orderAmount = ref();
const showModeFlag = ref(true); const showModeFlag = ref(true);
const password = ref([]); const password = ref([]);
const showKeyboard = ref(true); const showKeyboard = ref(true);
const checkArray = {UNION_PAY:'云闪付(银行卡)',WECHAT_PAY:'微信支付',ALI_PAY:'支付宝'}; const checkArray = {UNION_PAY:'云闪付(银行卡)',WECHAT_PAY:'微信支付',ALI_PAY:'支付宝'};
let isModify = ref(false); // 支付金额是否可修改 现金流项目为 罚息:9,租金:1 可修改部分支付
watchEffect(() => { watchEffect(() => {
payAmount.value = props.payInfoObj.payAmount
orderAmount.value = props.payInfoObj.payAmount orderAmount.value = props.payInfoObj.payAmount
isModify = (props.payInfoObj.cfItem == 1 || props.payInfoObj.cfItem == 9)?true:false
}) })
const cancel = () => { const cancel = () => {
...@@ -159,46 +167,77 @@ const onDelete = () => { ...@@ -159,46 +167,77 @@ const onDelete = () => {
} }
const payMoney = () => { const payMoney = () => {
// showDialog.value = true;
// Dialog.alert({
// // title: '标题',
// showConfirmButton: false,
// allowHtml: true,
// message: `<div>哈哈哈哈1111</div>`,
// }).then(() => {
// // on close
// });
// emit('closePage', false);
if(!checked.value){ if(!checked.value){
Toast.fail('请先选择支付方式!') Toast.fail('请先选择支付方式!')
} }
else if(+orderAmount <= 0 || +orderAmount > +props.payInfoObj.payAmount){ else if(+orderAmount.value <= 0 || +orderAmount.value > +props.payInfoObj.payAmount){
Toast.fail('请输入正确的支付金额!') Toast(`支付金额请输入0~${props.payInfoObj.payAmount}的金额!`)
} else { } else {
const info = { const info = {
// payAmount: orderAmount.value, payAmount: orderAmount.value,
payAmount: '0.01',
payType: checked.value, payType: checked.value,
cashflowId: props.payInfoObj.cashflowId cashflowId: props.payInfoObj.cashflowId
} }
//emit('payMoneyClick', info); // if(checked.value == 'WECHAT_PAY'){
goPayApp(info) // Toast.fail('微信支付当前暂不支持!')
// } else {
goPayApp(info)
// }
} }
}; };
const goPayApp = async (param) => { const goPayApp = async (param) => {
// 下拉重置参数,重新加载
let res = await api.getPay({...param,receivets: + new Date() + '',}); let res = await api.getPay({...param,receivets: + new Date() + '',});
console.log(res) console.log(res)
if(res.rows[0].qrCode){ let paramsData = {}
openWebLink(res.rows[0].qrCode) if(res.success){
.then((res) => {console.log(res)}) if(res.rows[0].appPayRequest){
.catch((err) => {console.log(err)}); if(param.payType == 'WECHAT_PAY'){
}else{ paramsData = {
Toast.fail('当前支付方式暂不支持!') "channel":"01",
appPayRequest:res.rows[0].appPayRequest
}
} else if(param.payType == 'ALI_PAY'){
paramsData = {
"channel":"03",
"appPayRequest":res.rows[0].appPayRequest
}
} else if(param.payType == 'UNION_PAY'){
paramsData = {
"channel":"00",
"appPayRequest":res.rows[0].appPayRequest
}
}
unifyPay(paramsData)
} else {
Toast('支付参数获取失败,请联系管理员!')
}
} else {
let message = res?res:'支付下单失败,请联系管理员!';
Toast(message)
} }
}; };
const unifyPay = (paramsData) => {
console.log("paramsData:",paramsData)
window.unifyPayBackNormal = function(res){
console.log('UnifyPay normal = \n\n'+res)
emit('paySuccess', res);
};
window.unifyPayBackException = function(res) {
console.log('UnifyPay exception = \n\n'+res)
emit('payFail', res);
};
let params = {
className:"UnifyPayBridge",
function:"unifyPay",
params:paramsData,
successCallBack:"unifyPayBackNormal",
failCallBack:"unifyPayBackException"
}
HandBridge.postMessage(JSON.stringify(params));
};
const handleFinishAmount = () => { const handleFinishAmount = () => {
showDialog.value = false; showDialog.value = false;
...@@ -228,13 +267,19 @@ const handleFinishAmount = () => { ...@@ -228,13 +267,19 @@ const handleFinishAmount = () => {
.pay-money-content{ .pay-money-content{
display: flex; display: flex;
width: 100%; width: 100%;
.van-cell {
width: 80%;
margin-left: 20px;
padding: 0;
line-height: 40px;
}
} }
.pay-money-update{ .pay-money-update{
/*float: left;*/ /*float: left;*/
/*margin-top: -40px;*/ /*margin-top: -40px;*/
/*margin-right: 15px;*/ padding-left: 10px;
color: #1989fa; color: #1989fa;
margin-top: 15px; // margin-top: 15px;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
} }
...@@ -282,8 +327,8 @@ const handleFinishAmount = () => { ...@@ -282,8 +327,8 @@ const handleFinishAmount = () => {
color: #1989fa; color: #1989fa;
} }
:deep(.van-cell__title.van-field__label) { :deep(.van-cell__title.van-field__label) {
margin-top: 10px; //margin-top: 10px;
width: 10% ; width: 5% ;
} }
:deep(.van-field__label label) { :deep(.van-field__label label) {
font-size: 20px; font-size: 20px;
...@@ -301,4 +346,7 @@ const handleFinishAmount = () => { ...@@ -301,4 +346,7 @@ const handleFinishAmount = () => {
:deep(.van-password-input__security li){ :deep(.van-password-input__security li){
border: 1px solid #c4c4c4; border: 1px solid #c4c4c4;
} }
.pay-money-mode{
margin-bottom: 20px;
}
</style> </style>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<Search v-model="value" placeholder="请输入项目编号/融资金额" @update:model-value="onSearch"/> <Search v-model="value" placeholder="请输入项目编号/融资金额" @update:model-value="onSearch"/>
<Notice detail="只可对已关联的项目还款" /> <Notice detail="只可对已关联的项目还款" />
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll"> <PullRefresh v-model="refreshing" @refresh="getList" class="scroll">
<List :finished="finished" finished-text="没有更多了"> <List :finished="finished" finished-text="没有更多了">
<ListItem v-for="item in listValue" :other_title="item.other_title" :title="item.title" :values="item.values" <ListItem v-for="item in listValue" :other_title="item.other_title" :title="item.title" :values="item.values"
@click="jump(item.contractId)" /> @click="jump(item.contractId)" />
...@@ -44,9 +44,10 @@ const onSearch = (value) => { ...@@ -44,9 +44,10 @@ const onSearch = (value) => {
const getList = async (param) => { const getList = async (param) => {
// 下拉重置参数,重新加载 // 下拉重置参数,重新加载
let list = await api.getRepayPlantList({userId: window.localStorage.getItem('userId'),...param}); let res = await api.getRepayPlantList({userId: window.localStorage.getItem('userId'),astrictStatus:'Y',...param});
if(list.success){ let list = []
list = list.rows.map(item => ({ if(res.success){
list = res.rows.map(item => ({
...item, ...item,
title: item.contractNumber, title: item.contractNumber,
other_title: item.applyDate?.split(' ')[0], other_title: item.applyDate?.split(' ')[0],
......
...@@ -3,13 +3,17 @@ ...@@ -3,13 +3,17 @@
<section class="hint" v-if="damageDetailInfo.length<1"> <section class="hint" v-if="damageDetailInfo.length<1">
<div class="detail">暂无数据</div> <div class="detail">暂无数据</div>
</section> </section>
<Collapse v-model="activeNames" v-for="(item, index) of damageDetailInfo"> <div class="list">
<CollapseItem :title="item.periods" :name="index+1" :value="item.amount"> <Collapse v-model="activeNames" v-for="(item, index) of damageDetailInfo">
<CellGroup v-for="(k) of item.detail"> <CollapseItem :title="item.periods" :name="index+1" :value="item.amount">
<Cell :title="k.name" :value="k.debait" :label="k.date" /> <!-- <div class="cell-item">-->
</CellGroup> <CellGroup v-for="(k) of item.detail">
</CollapseItem> <Cell :title="k.name" :value="k.debait" :label="k.date" />
</Collapse> </CellGroup>
<!-- </div>-->
</CollapseItem>
</Collapse>
</div>
</template> </template>
<script setup> <script setup>
...@@ -32,14 +36,26 @@ const getDailyLiquidatedDetail = async () => { ...@@ -32,14 +36,26 @@ const getDailyLiquidatedDetail = async () => {
damageDetailInfo = res.rows.map(items => ({ damageDetailInfo = res.rows.map(items => ({
...items, ...items,
periods: `第${items.times}期`, periods: `第${items.times}期`,
amount: currency(items.dueAmount), amount: currency(items.sumPenaltyAmt),
detail: items.file.map(item => ({ detail: items.file.map(item => ({
...item, ...item,
name: `罚息`, name: `罚息`,
debait: currency(item.dueAmount), debait: currency(item.penaltyAmt.toFixed(2)),
date: item.creationDate?.split(' ')[0] date: item.creationDate?.split(' ')[0]
})) }))
})) }))
if(damageDetailInfo.length > 0){
for(let i = 0; i<damageDetailInfo.length;i++){
if(+damageDetailInfo[i].deductPenaltyAmount > 0){
damageDetailInfo[i].detail.push({
...damageDetailInfo[i].detail,
name: `减免罚息`,
debait: currency(damageDetailInfo[i].deductPenaltyAmount.toFixed(2)),
date: damageDetailInfo[i].deductPenaltyDate?.split(' ')[0]
})
}
}
}
} else { } else {
Toast.fail('请求失败,请联系管理员!'); Toast.fail('请求失败,请联系管理员!');
} }
...@@ -65,4 +81,13 @@ getDailyLiquidatedDetail(); ...@@ -65,4 +81,13 @@ getDailyLiquidatedDetail();
color: gray; color: gray;
line-height: 20px; line-height: 20px;
} }
.list{
box-sizing: border-box;
height: calc(100vh - 10vw);
overflow-y: auto;
}
.cell-item{
height: 210px;
overflow-y: auto;
}
</style> </style>
...@@ -27,20 +27,23 @@ ...@@ -27,20 +27,23 @@
<div class="right-item"> <div class="right-item">
<span></span> <span></span>
<span class="flag-button paid" v-if="item.writeOffFlag == 'FULL'"> <span class="flag-button paid" v-if="item.writeOffFlag == 'FULL'">
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}} <Icon name="passed" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span> </span>
<span v-else-if="checkCashflow(item,index)" class="flag-button payment" @click="handleClick(item)"> <span v-else-if="checkCashflow(item,index)" class="flag-button payment" @click="handleClick(item)">
支付 支付
</span> </span>
<span v-else-if="item.overdueStatus == 'Y'" class="flag-button overtime">
<Icon name="clock-o" style="margin-right: 1px;padding-top: 2px;" />{{item.overdueStatusN}}
</span>
<span v-else class="flag-button paying"> <span v-else class="flag-button paying">
<Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}} <Icon name="clock-o" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span> </span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<Pay :visible="showModal" :payInfoObj="payInfo" @payMoneyClick="pay" @closePage="handleColse"/> <Pay :visible="showModal" :payInfoObj="payInfo" @paySuccess="paySuccessFunction" @payFail="payFailFunction" @closePage="handleColse"/>
</template> </template>
<template #footer> <template #footer>
</template> </template>
...@@ -65,24 +68,44 @@ let cashflow = [] ...@@ -65,24 +68,44 @@ let cashflow = []
let payInfo = $ref({}); let payInfo = $ref({});
let showModal = ref(false); let showModal = ref(false);
const route = useRoute() const route = useRoute()
const router = useRouter();
const handleClick = (item) => { const handleClick = (item) => {
showModal.value = true showModal.value = true
payInfo = {cashflowId:item.cashflowId,payAmount:item.obligation} payInfo = {cashflowId:item.cashflowId,payAmount:item.obligation,cfItem:item.cfItem}
} }
const handleColse = (param) => { const handleColse = (param) => {
showModal.value = param; showModal.value = param;
} }
const pay = (value) => { // 支付成功回调
// console.log(value, value.showDialog); const paySuccessFunction = (result) => {
// payInfo.value = value; showModal.value = false;
// showDialog.value = true; //{"resultCode":"1000","resultMsg":"用户取消了云闪付支付"}
// console.log(showDialog.value) let message = '支付成功!'
// console.log(payInfo.value) Dialog.confirm({
} title: '提示',
const router = useRouter(); message: message,
showCancelButton: false
}).then(() => {
getRepayPlanInfo();
})
};
// 支付失败回调
const payFailFunction = (result) => {
showModal.value = false;
//{"resultCode":"1000","resultMsg":"用户取消了云闪付支付"}
let message = result.resultMsg?result.resultMsg:'支付失败,请联系管理员!'
Dialog.confirm({
title: '提示',
message: message,
showCancelButton: false
}).then(() => {
getRepayPlanInfo();
})
};
const goDamagesDetail = () => { const goDamagesDetail = () => {
router.push({ name: 'makeRepayment-views-liquidatedDamagesDetails' }) router.push({ name: 'makeRepayment-views-liquidatedDamagesDetails' })
......
...@@ -26,14 +26,14 @@ ...@@ -26,14 +26,14 @@
</div> </div>
<div class="right-item"> <div class="right-item">
<span></span> <span></span>
<span class="flag-button paying" v-if="item.writeOffFlag === 'NOT'"> <span class="flag-button paid" v-if="item.writeOffFlag === 'FULL'">
<Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}} <Icon name="passed" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span> </span>
<span class="flag-button paid" v-else-if="item.writeOffFlag === 'FULL'"> <span class="flag-button overtime" v-else-if="item.overdueStatus === 'Y'">
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}} <Icon name="clock-o" style="margin-right: 1px;padding-top: 2px;" />{{item.overdueStatusN}}
</span> </span>
<span class="flag-button overtime" v-else> <span class="flag-button paying" v-else>
<Icon style="margin-right: 1px;" name="info-o" />{{item.writeOffFlagN}} <Icon style="margin-right: 1px;padding-top: 2px;" name="info-o" />{{item.writeOffFlagN}}
</span> </span>
</div> </div>
</div> </div>
......
...@@ -237,6 +237,7 @@ const submit = async () => { ...@@ -237,6 +237,7 @@ const submit = async () => {
showMessagePop = false; showMessagePop = false;
let res = await api.contractBind({ let res = await api.contractBind({
projectLeaseItemId: shouldSaveContractId.toString(), projectLeaseItemId: shouldSaveContractId.toString(),
phone: secondFormConfig.tel,
receivets: + new Date() + '' receivets: + new Date() + ''
}) })
isRead = true; isRead = true;
......
...@@ -10,7 +10,13 @@ const api = { ...@@ -10,7 +10,13 @@ const api = {
//还款计划明细 //还款计划明细
getRepaymentDetails(data={}){ getRepaymentDetails(data={}){
return post(`${baseURL}/app/api/app/project/repayment/details`, data) return post(`${baseURL}/app/api/app/project/repayment/details`, data)
},
// 发票下载
downloadInvoice(data={}){
return post(`${baseURL}/app/api/app/repayment/payment/invoice/get`, data)
} }
}; };
export default api; export default api;
......
...@@ -5,5 +5,6 @@ import { defineStore } from 'pinia' ...@@ -5,5 +5,6 @@ import { defineStore } from 'pinia'
export const useIntention = defineStore('formStore', () => { export const useIntention = defineStore('formStore', () => {
const repayPlanData = ref({}) const repayPlanData = ref({})
const contractId = ref('') const contractId = ref('')
return { repayPlanData, contractId } const invoiceList = ref([])
return { repayPlanData, contractId, invoiceList}
}) })
<template>
<div class="container">
<NavBar title="发票列表" left-arrow @click-left="goBack" />
<section class="list">
<PullRefresh class="scroll">
<List :finished="finished" finished-text="没有更多了">
<div class="item" v-for="item in preList">
<div class="left">
<img src="../../../assets/list.png"/>
<div class="title">{{item.documentName}}</div>
</div>
<div class="button-status sign" @click="jump(item)">查看</div>
</div>
</List>
</PullRefresh>
</section>
</div>
</template>
<script setup>
import { goBack,HIPSDownLoad} from "@/utils/globalFun"
import { NavBar, List, PullRefresh, Empty, Toast} from "vant";
import ListItem from '@/components/ListItem.vue'
import api from "../api";
import { useRoute, useRouter } from "vue-router";
import { useIntention } from "../store";
const route = useRoute();
const router = useRouter();
let refreshing = $ref(true);
const finished = $ref(true);
const formStore = useIntention()
let preList = $ref(formStore.invoiceList);
// const getDailyLiquidatedDetail = async () => {
// const res = await api.preListQuery({"esignFlowId": esignFlowId})
// refreshing = false;
// if(res.success){
// preList = res.rows
// } else {
// Toast('请求失败,请联系管理员!');
// }
// };
// getDailyLiquidatedDetail();
const jump = (item) => {
if(item.downloadUrl){
if (/.pdf/.test(item.downloadUrl)) {
router.push({ path: '/repayPlan/views/invoicePre', query: { url: item.downloadUrl } })
// HIPSDownLoad(item.downloadUrl)
} else {
HIPSDownLoad(item.downloadUrl)
// Toast('发票文件格式有误,请联系管理员!');
}
} else {
Toast('未获取到签署文件!');
}
}
</script>
<style scoped lang="less">
.list {
box-sizing: border-box;
height: calc(100vh - var(--van-nav-bar-height));
display: flex;
flex-direction: column;
justify-content: space-between;
padding-top: 8px;
padding-bottom: 10px;
}
.scroll {
box-sizing: border-box;
height: 100%;
overflow-y: auto;
}
.item{
width: 100%;
height: 50px;
margin:0 auto;
background-color: #fff;
margin-top:10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.left {
display: flex;
}
.item img{
width: 20px;
height: 20px;
margin-left: 16px;
}
.item .title{
font-size: 14px;
color: #656464;
margin-left: 16px;
font-weight: 600;
line-height: 20px;
}
.button-status{
width: 54px;
height: 20px;
font-size: 12px;
border-radius: 10px;
display: flex;
justify-content: center;
align-items: center;
margin-right: 15px;
}
.sign{
color: #2499FF;
}
</style>
<template>
<div class="container">
<NavBar title="发票查看" left-arrow @click-left="goBack" />
<div class="content">
<VuePdfEmbed ref="pdfRef" :source="pdfSource" :page="page" @rendered="handleDocumentRender"></VuePdfEmbed>
</div>
</div>
</template>
<script setup>
import { goBack } from "@/utils/globalFun"
import { NavBar, Toast } from "vant";
import VuePdfEmbed from 'vue-pdf-embed'
import { watchEffect } from 'vue'
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
let isLoading = $ref(true)
const page = $ref(null)
const pdfRef = $ref('')
let pageCount = $ref(1)
const pdfSource = $ref('')
let iframeUrl = $ref(route.query.url)
watchEffect(() => {
if (isLoading) {
Toast.loading({ message: '加载中...', forbidClick: true, overlay: true, duration: 0 });
} else {
Toast.clear()
}
})
const handleDocumentRender = (args) => {
console.log(args)
isLoading = false
pageCount = pdfRef.pageCount
}
</script>
<style lang="less" scoped>
.content {
height: calc(100% - var(--van-nav-bar-height));
overflow-y: auto;
}
.vue-pdf-embed {
}
</style>
...@@ -25,16 +25,16 @@ ...@@ -25,16 +25,16 @@
</p> </p>
</div> </div>
<div class="right-item"> <div class="right-item">
<span>明细</span> <span @click="downloadInvoice(item)">明细</span>
<span class="flag-button paying" v-if="item.writeOffFlag === 'NOT'"> <span class="flag-button paid" v-if="item.writeOffFlag === 'FULL'">
<Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}} <Icon name="passed" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span> </span>
<span class="flag-button paid" v-else-if="item.writeOffFlag === 'FULL'"> <span class="flag-button overtime" v-else-if="item.overdueStatus === 'Y'">
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}} <Icon style="margin-right: 1px;padding-top: 2px;" name="info-o" />{{item.overdueStatusN}}
</span> </span>
<span class="flag-button overtime" v-else> <span class="flag-button paying" v-else>
<Icon style="margin-right: 1px;" name="info-o" />{{item.writeOffFlagN}} <Icon name="clock-o" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span> </span>
</div> </div>
</div> </div>
</div> </div>
...@@ -49,12 +49,13 @@ ...@@ -49,12 +49,13 @@
<script setup> <script setup>
import RepayPlan from '@/components/RepayPlan.vue' import RepayPlan from '@/components/RepayPlan.vue'
import { goBack } from "@/utils/globalFun" import { goBack } from "@/utils/globalFun"
import { Icon } from 'vant' import { Icon, Toast} from 'vant';
import {useRoute} from 'vue-router' import { useRouter } from "vue-router";
import api from "../api"; import api from "../api";
import { currency } from "@/utils/textFormat" import { currency } from "@/utils/textFormat";
import { useIntention } from "../store"; import { useIntention } from "../store";
const router = useRouter();
const formStore = useIntention() const formStore = useIntention()
let currencyObj = $ref({}) let currencyObj = $ref({})
let cashflow = [] let cashflow = []
...@@ -75,6 +76,21 @@ const getRepayPlanInfo = async () => { ...@@ -75,6 +76,21 @@ const getRepayPlanInfo = async () => {
} }
} }
getRepayPlanInfo() getRepayPlanInfo()
const downloadInvoice = async (item) => {
const res = await api.downloadInvoice({"cashflowId": item.cashflowId})
if(res.success) {
if(res.rows.length >0){
formStore.invoiceList = res.rows;
router.push({ path: '/repayPlan/views/invoiceList'})
} else {
Toast('未获取到发票信息,请联系业务员!')
}
} else {
let message = res.message?res.message:'未获取到发票信息,请联系业务员!';
Toast(message)
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -145,7 +145,10 @@ export async function HlpsUpload(source, target, headers, successCb) { ...@@ -145,7 +145,10 @@ export async function HlpsUpload(source, target, headers, successCb) {
// 判断还有可返回的路由吗? 无则退出 // 判断还有可返回的路由吗? 无则退出
export const goBack = (isExit = false) => { export const goBack = (isExit = false) => {
if (Object.prototype.toString.call(isExit) === "[object PointerEvent]") isExit = false console.log('isExit',isExit)
console.log(Object.prototype.toString.call(isExit))
console.log('window.history.state.position',window.history.state.position)
if (Object.prototype.toString.call(isExit) === "[object PointerEvent]" || Object.prototype.toString.call(isExit) === "[object MouseEvent]") isExit = false
if (window.history.state.position > 0 && !isExit) { if (window.history.state.position > 0 && !isExit) {
window.history.back(); window.history.back();
return return
...@@ -159,4 +162,4 @@ export const goBack = (isExit = false) => { ...@@ -159,4 +162,4 @@ export const goBack = (isExit = false) => {
failCallBack: "onError", failCallBack: "onError",
}; };
HandBridge.postMessage(JSON.stringify(args)); HandBridge.postMessage(JSON.stringify(args));
}; };
\ No newline at end of file
...@@ -185,7 +185,6 @@ export function post(url, param = {}) { ...@@ -185,7 +185,6 @@ export function post(url, param = {}) {
url, url,
data: {...param, _token: window.localStorage.getItem('_token')}, data: {...param, _token: window.localStorage.getItem('_token')},
}).then((res) => { }).then((res) => {
console.log('返回参数',res)
if(res.code == '403'){ if(res.code == '403'){
Dialog.alert({ Dialog.alert({
title: "提示", title: "提示",
......
...@@ -20,6 +20,9 @@ export function bridgeLogin() { ...@@ -20,6 +20,9 @@ export function bridgeLogin() {
loginAccount: object.loginAccount, loginAccount: object.loginAccount,
pushExtra: object.pushExtra pushExtra: object.pushExtra
} }
if(object.loginAccount === '15826841439'){
window.localStorage.setItem('userRole', 'tourist')
}
window.localStorage.setItem('userId', object.userId) window.localStorage.setItem('userId', object.userId)
window.localStorage.setItem('phone', phone) window.localStorage.setItem('phone', phone)
resolve(data) resolve(data)
......
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