Commit 6b760d40 authored by 14699's avatar 14699

'功能完善'

parent 3ddc9ecd
NODE_ENV='development'
VITE_LOCAL='true'
VITE_DEBUG='true'
VITE_HTTP_HEADER={}
VITE_HTTP_BASE_URL='http://139.196.201.22:8080/leaf_dev'
......
NODE_ENV='production'
VITE_LOCAL='false'
VITE_DEBUG='false'
VITE_HTTP_HEADER={}
VITE_HTTP_BASE_URL='http://139.196.201.22:8080/leaf_dev'
......
NODE_ENV=production
NODE_ENV=test
VITE_LOCAL='false'
VITE_DEBUG='true'
VITE_HTTP_HEADER={}
VITE_HTTP_BASE_URL='http://139.196.201.22:8080/leaf_dev'
......
......@@ -5,17 +5,28 @@
"dev": "vite ",
"build": "vite build",
"preview": "vite preview",
"build:selfService": "set VITE_TARGET=selfService&& vite build --mode test",
"build:intention": "set VITE_TARGET=intention&& vite build --mode test",
"build:calculator": "set VITE_TARGET=calculator&& vite build --mode test",
"build:about": "set VITE_TARGET=about&& vite build --mode test",
"build:complaint": "set VITE_TARGET=complaint&& vite build --mode test",
"build:infoChange": "set VITE_TARGET=infoChange&& vite build --mode test",
"build:relatedProject": "set VITE_TARGET=relatedProject&& vite build --mode test",
"build:repayPlan": "set VITE_TARGET=repayPlan&& vite build --mode test",
"build:contractSign": "set VITE_TARGET=contractSign&& vite build --mode test",
"build:projectList": "set VITE_TARGET=projectList&& vite build --mode test",
"build:makeRepayment": "set VITE_TARGET=makeRepayment&& vite build --mode test"
"build:selfService:test": "set VITE_TARGET=selfService&& vite build --mode test",
"build:selfService:production": "set VITE_TARGET=selfService&& vite build --mode production",
"build:intention:test": "set VITE_TARGET=intention&& vite build --mode test",
"build:intention:production": "set VITE_TARGET=intention&& vite build --mode production",
"build:calculator:test": "set VITE_TARGET=calculator&& vite build --mode test",
"build:calculator:production": "set VITE_TARGET=calculator&& vite build --mode production",
"build:about:test": "set VITE_TARGET=about&& vite build --mode test",
"build:about:production": "set VITE_TARGET=about&& vite build --mode production",
"build:complaint:test": "set VITE_TARGET=complaint&& vite build --mode test",
"build:complaint:production": "set VITE_TARGET=complaint&& vite build --mode production",
"build:infoChange:test": "set VITE_TARGET=infoChange&& vite build --mode test",
"build:infoChange:production": "set VITE_TARGET=infoChange&& vite build --mode production",
"build:relatedProject:test": "set VITE_TARGET=relatedProject&& vite build --mode test",
"build:relatedProject:production": "set VITE_TARGET=relatedProject&& vite build --mode production",
"build:repayPlan:test": "set VITE_TARGET=repayPlan&& vite build --mode test",
"build:repayPlan:production": "set VITE_TARGET=repayPlan&& vite build --mode production",
"build:contractSign:test": "set VITE_TARGET=contractSign&& vite build --mode test",
"build:contractSign:production": "set VITE_TARGET=contractSign&& vite build --mode production",
"build:projectList:test": "set VITE_TARGET=projectList&& vite build --mode test",
"build:projectList:production": "set VITE_TARGET=projectList&& vite build --mode production",
"build:makeRepayment:test": "set VITE_TARGET=makeRepayment&& vite build --mode test",
"build:makeRepayment:production": "set VITE_TARGET=makeRepayment&& vite build --mode production"
},
"dependencies": {
"@hips/plugin-vue-jssdk": "^1.1.2",
......
......@@ -31,48 +31,40 @@ export default {
};
},
async mounted() {
localStorage.setItem('userId', 5) // 可删
localStorage.setItem('phone', "18388105084")
const TempAccess = import.meta.env.DEV ? 'bcec5d6e-6d4e-4cff-abcc-b5a92ad6b58b' : ''
if (import.meta.env.DEV) window.localStorage.setItem('access_token', TempAccess) // 可删
let homePage = { path: "applications", replace: true }
this.clearLocalStorage()
const TempAccess = import.meta.env.VITE_LOCAL== 'true' ? 'bcec5d6e-6d4e-4cff-abcc-b5a92ad6b58b' : ''
console.log('import.meta.env',JSON.stringify(import.meta.env))
let jumpRouter = await login(TempAccess)
console.log('jumpRouter',jumpRouter);
this.getBusinessToken(jumpRouter)
this.getBusinessToken()
if (import.meta.env.PROD) {
// 得保证 每个子应用中首页有 title
let jumRouter;
try {
jumRouter = await login(TempAccess);
} catch (error) {
jumRouter = {}
}
if (jumRouter.path) {
// 通过消息传入跳转页面的情况
homePage = { ...homePage, jumRouter }
} else {
// 一般点击进入
let index = this.$router.getRoutes().filter(route => route.meta.title);
if (index[0] && index[0].path) {
homePage.path = index[0].path;
} else {
console.info('未找到路由')
}
}
}
this.$router.push(homePage);
},
methods: {
async getBusinessToken() {
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
async getBusinessToken(jumpRouter) {
if (import.meta.env.VITE_LOCAL == 'true') {
window.localStorage.setItem('userId', 5)
window.localStorage.setItem('phone', "18388105084")
}
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`, {
mobilePhone: window.localStorage.getItem('phone'), loginType: 'HLS_LOGIN', hlsUserId: window.localStorage.getItem('userId'), receivets: + new Date() + ''
})
if (res.success && res.total > 0) {
if (res.success && res.rows.length > 0) {
window.localStorage.setItem('_token', res.rows[0]?.token)
window.localStorage.setItem('access_token', res.rows[0]?.token)
const route = this.$router;
if (import.meta.env.VITE_LOCAL== 'true') {
route.replace("/applications");
} else {
// 匹配注册路由中的title 找到首页
let index = this.$router.getRoutes().filter(route => route.meta.title);
route.replace(jumpRouter.path ? jumRouter.path : index[0]?.path);
}
}
},
clearLocalStorage() {
for (var key in window.localStorage){
window.localStorage.removeItem(key);
}
}
}
......
......@@ -22,7 +22,7 @@
<!-- 百分比字符串input -->
<Field v-else-if="item.type === 'rate'" v-model="modelValue.value[index].value" :class="getClass(item)"
:placeholder="placeHolder(item.value, 'input', item)" :label="item.title" input-align="right"
@focus="fieldOnFocus(modelValue.value[index])" :readonly="item.disabled">
@focus="fieldOnFocus(modelValue.value[index])" :readonly="item.disabled" :formatter="currencyFormatter" format-trigger="onBlur">
<template #extra> %
</template>
</Field>
......@@ -123,8 +123,12 @@ const currentDate = ref(new Date())
const cascaderValue = ref('')
// const miniDate = ref(new Date('1920-01-1 00:46:53'))
const currencyFormatter = (value) => currency(value.replace(/[^0-9.]*/g, ''))
// const rateFormatter = (value) => toPercent(value, false)
const currencyFormatter = (value) => currency(value.replace(/[^0-9.]*/g, ''));
const numberFormatter = function(value) {
console.log(value)
if (!value || isNaN(+value)) return '0.00'
return +value.toFixed(2)
};
function placeHolder(value, type, item = {}) {
let val = value
......@@ -141,7 +145,6 @@ function placeHolder(value, type, item = {}) {
if (type === 'rate') {
val = toPercent(item.value, false)
}
return item.disabled ? val + ''
: val ? val + '' : typeList[type]
}
......
......@@ -83,7 +83,7 @@ hr {
table {
width: 100%;
table-layout: fixed;
th {
color: gray;
}
......@@ -92,6 +92,9 @@ table {
text-align: center;
height: 25px;
line-height: 20px;
word-break: break-all;
word-wrap: break-word;
white-space: normal;
}
}
......@@ -102,7 +105,7 @@ table.only_two tr>td:nth-child(1) {
table.only_two tr>th:nth-child(2),
table.only_two tr>td:nth-child(2) {
text-align: left;
text-align: right;
}
table.only_two tr>td:nth-child(2) {
......
......@@ -30,7 +30,7 @@
<div class="plan-list">
<slot name="list"></slot>
</div>
<div class="plan-footer">
<div class="plan-footer" v-if="showFooter">
<slot name="footer"></slot>
</div>
</div>
......@@ -61,6 +61,10 @@ defineProps({
times: '0'
}
},
showFooter: {
type: Boolean,
default: true
},
})
const onClickRight = () => {
......@@ -168,7 +172,7 @@ header {
right: 20vw;
top: 2vw;
height: 5vh;
width: 7vh;
width: 50px;
background-color: #fff;
border-radius: 5px;
font-weight: 600;
......
This diff is collapsed.
......@@ -105,7 +105,6 @@ export default class AuFormClass {
}
else if (item.type === 'rate') {
console.log(outSideValue);
item.value = toPercent(+outSideValue, false)
}
......
import { post } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
// 首页查询
......
......@@ -55,11 +55,11 @@ const formConfigArr = [
title: '首付款比例',
propName: 'firstGoldRatio',
type: 'rate',
value: '0',
value: '',
isRequired: true
},
{
title: '首租金日',
title: '首租金日',
propName: 'firstRentDay',
type: 'cell',
value: '',
......@@ -112,7 +112,7 @@ const updateForm = async () => {
formConfig.replace(formConfigArr.map(item => {
if (item.propName !== "repayment") {
if (['firstGoldRatio', 'priceOfItem', 'term'].includes(item.propName)) {
item.value = 0;
item.value = '';
} else if (['firstRentDay'].includes(item.propName)) {
item.value = '';
} else if (item.propName === "contractRate") {
......
<template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="backToLast">
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" :showFooter="!isComplete" @onLeftClick="goBack">
<template #list>
<div class="repay_list" v-if="plan.financeAmount">
<div class="repay_content" v-for="item in plan.cashflow">
......@@ -40,6 +40,7 @@ import { onActivated } from 'vue';
import api from "../api";
import { usePlan } from '../store/index'
import { useRouter } from "vue-router";
import { goBack } from "@/utils/globalFun"
let currencyObj = $ref({})
let plan = $ref({})
......@@ -66,13 +67,13 @@ const save = async () => {
if (isComplete) {
const planStore = usePlan()
planStore.planData = {};
return router.push({ name: 'calculator-views' })
return router.go(-2)
}
let res = await api.saveInfo(plan)
if (res.success) {
router.push({ name: 'calculator-views' })
router.go(-2)
Toast.success('保存成功');
} else {
Toast.fail('保存失败');
......
import { post } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
commit(data = {}) {
......
......@@ -57,7 +57,7 @@ const formConfig = $ref(new AuFormClass([
propName: 'machineNumber',
type: 'input',
value: '',
isRequired: false
isRequired: true
},
{
title: '联系方式',
......@@ -77,7 +77,7 @@ const save = async () => {
Toast.success('提交成功!感谢您的反馈')
setTimeout(() => {
goBack()
}, 2000);
}, 500);
} else {
Toast.fail('提交失败!请稍后重试')
}
......
import { post } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
// 首页查询
......
......@@ -10,7 +10,7 @@
<Notice detail="只对已关联的项目发送合同签约链接" />
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
<List v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="loadApproval">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval">
<SignListItem v-for="item in notList" :sdata="item" @click="eSign(item.signUrl)" />
</List>
</PullRefresh>
......@@ -18,7 +18,7 @@
<Tab title="已签署">
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
<List v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="loadApproval">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval">
<SignListItem v-for="item in alreadyList" :sdata="item" @click="pdfPre(item)" />
</List>
</PullRefresh>
......@@ -33,6 +33,7 @@ import { goBack } from "@/utils/globalFun"
import { NavBar, List, PullRefresh, Tab, Tabs, Search, Toast } from "vant";
import Notice from '@/components/Notice.vue'
import SignListItem from '../components/SignListItem.vue'
import popMessage from '@/components/popMessage.vue'
import api from "../api";
import { useRouter } from "vue-router";
......@@ -42,9 +43,8 @@ let alreadyList = $ref([])
const active = $ref(0)
let searchValue = $ref('')
let refreshing = $ref(false);
let finished = $ref(false);
let loading = $ref(false);
let refreshing = $ref(true);
let finished = $ref(true);
let pager = {
page: 1,
......@@ -64,7 +64,6 @@ let queryList = async () => {
projectNumber: searchValue,
...pager
})
loading = true
if (res.success && res.rows.length > 0) {
res.rows.forEach(item => {
let temp = {
......@@ -74,20 +73,21 @@ let queryList = async () => {
dl: item.agencyName,
date: item.deadlineDate
}
if (active === 0) {
notList.push(temp)
} else {
alreadyList.push({ ...temp, isSign: true })
}
})
if(res.rows.length >= 10) {
finished = false
}
} else {
finished = true
// Toast.fail('获取列表失败!');
}
refreshing = false
}
queryList();
const onRefresh = () => {
// 下拉重置参数,重新加载
......@@ -96,8 +96,8 @@ const onRefresh = () => {
} else {
alreadyList = []
}
finished = false
refreshing = false
finished = true
refreshing = true
pager.page = 1;
pager.pageSize = 10;
queryList()
......
import { post } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL == 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
// 客户信息变更申请按钮
......
......@@ -5,7 +5,11 @@
<span>申请编号:</span>
<span>{{ info.id }}</span>
</p>
<hr />
<!-- <hr />-->
<p>
<span>客户名称:</span>
<span>{{ info.bpName }}</span>
</p>
<p>
<span>申请日期:</span>
<span>{{ info.applyDate }}</span>
......@@ -44,7 +48,12 @@ defineEmits(['click'])
padding: 8px 8px;
p {
line-height: 20px;
line-height: 30px;
height: 30px;
}
p:nth-child(1){
border-bottom: 1px solid #f7f8f8;
}
span:nth-child(1) {
......@@ -61,7 +70,7 @@ defineEmits(['click'])
hr {
border: 1px solid #f7f8f8;
background-color: #f7f8f8;
/*background-color: #f7f8f8;*/
}
.swipe {
......
......@@ -46,7 +46,6 @@ import moment from 'moment'
import {getBirthdayByIdNO,getSexByIdNO} from '@/utils/tool'
const infoChangeStore = useInfoChange()
console.log("目前维护的数据", infoChangeStore.data);
const route = useRoute()
let readonly = $ref(false)
......@@ -292,48 +291,48 @@ const orgContactPersonRaw = [
isRequired: true,
select: [
{
text: "户口薄",
value: "RESIDENCE_BOOKLET"
text: "澳门身份证",
value: "AM_ID_CARD"
},
{
text: "港澳居民来往内地通行证",
value: "GA_TRAVEL_PERMIT"
},
{
text: "台湾同胞来往内地通行证",
value: "TW_TRAVEL_PERMIT"
text: "香港身份证",
value: "HK_ID_CARD"
},
{
text: "外国人居留证",
value: "RES_PERMIT_FOREIGNERS"
text: "居民身份证及其他以公号码为标识的件",
value: "ID_CARD"
},
{
text: "警官证",
value: "POLICE_ID_CARD"
},
{
text: "香港身份证",
value: "HK_ID_CARD"
},
{
text: "澳门身份证",
value: "AM_ID_CARD"
text: "户口薄",
value: "RESIDENCE_BOOKLET"
},
{
text: "台湾身份证",
value: "TW_ID_CARD"
text: "外国人居留证",
value: "RES_PERMIT_FOREIGNERS"
},
{
text: "居民身份证及其他以公号码为标识的件",
value: "ID_CARD"
text: "统一社会信用代码",
value: "SOCIAL_CREDIT_CODE"
},
{
text: "军人身份证件",
value: "SOLDIER_ID_CARD"
},
{
text: "统一社会信用代码",
value: "SOCIAL_CREDIT_CODE"
text: "台湾身份证",
value: "TW_ID_CARD"
},
{
text: "台湾同胞来往内地通行证",
value: "TW_TRAVEL_PERMIT"
}
]
},
......@@ -439,48 +438,44 @@ const npContactPersonRaw = [
isRequired: true,
select: [
{
text: "户口薄",
value: "RESIDENCE_BOOKLET"
text: "澳门身份证",
value: "AM_ID_CARD"
},
{
text: "港澳居民来往内地通行证",
value: "GA_TRAVEL_PERMIT"
},
{
text: "台湾同胞来往内地通行证",
value: "TW_TRAVEL_PERMIT"
text: "香港身份证",
value: "HK_ID_CARD"
},
{
text: "外国人居留证",
value: "RES_PERMIT_FOREIGNERS"
text: "居民身份证及其他以公号码为标识的件",
value: "ID_CARD"
},
{
text: "警官证",
value: "POLICE_ID_CARD"
},
{
text: "香港身份证",
value: "HK_ID_CARD"
},
{
text: "澳门身份证",
value: "AM_ID_CARD"
},
{
text: "台湾身份证",
value: "TW_ID_CARD"
text: "户口薄",
value: "RESIDENCE_BOOKLET"
},
{
text: "居民身份证及其他以公号码为标识的件",
value: "ID_CARD"
text: "外国人居留证",
value: "RES_PERMIT_FOREIGNERS"
},
{
text: "军人身份证件",
value: "SOLDIER_ID_CARD"
},
{
text: "统一社会信用代码",
value: "SOCIAL_CREDIT_CODE"
text: "台湾身份证",
value: "TW_ID_CARD"
},
{
text: "台湾同胞来往内地通行证",
value: "TW_TRAVEL_PERMIT"
}
]
},
......@@ -501,11 +496,11 @@ const npContactPersonRaw = [
select: [
{
value: 'FEMALE',
text: ''
text: ''
},
{
value: 'MALE',
text: ''
text: ''
},
]
},
......@@ -607,7 +602,6 @@ const fillForm = () => {
}
}
npContactPersonConfig.watchForm("idCardNo", (n, o) => {
console.log("idCardNo",n)
let obj = npContactPersonConfig.getValues();
if(obj.idType === 'ID_CARD'){
let date_of_birth = getBirthdayByIdNO(n);
......@@ -679,7 +673,7 @@ const submit = async () => {
const NextStepWork = () => {
if(bpObj.bpEffectiveStatus != 'STOCK'){
Toast.fail('存量客户无法发起变更')
Toast.fail('存量客户无法发起变更')
}
else if(bpObj.bpStatus == 'PENDING' || bpObj.bpStatus == 'APPROVING'){
Toast.fail('该客户已有新的变更记录')
......
......@@ -25,7 +25,7 @@ import { useInfoChange } from '../store/index'
const infoChangeStore = useInfoChange()
let refreshing = $ref(false);
let refreshing = $ref(true);
const finished = $ref(true);
let infos = $ref([])
......@@ -62,7 +62,7 @@ const getDetail = async (item) => {
let res = await api.requestDetail({ bpClass: item.bpClass, changeReqId: item.changeReqId })
if (res.success && res.rows.length && res.rows[0].hlsBpMasterAddress.length) {
let hlsBpMasterAddress = res.rows[0].hlsBpMasterAddress[0]
hlsBpMasterAddress.area = hlsBpMasterAddress.countryIdN + hlsBpMasterAddress.provinceIdN + hlsBpMasterAddress.cityIdN
hlsBpMasterAddress.area = hlsBpMasterAddress.provinceIdN + hlsBpMasterAddress.cityIdN + hlsBpMasterAddress.districtIdN
let hlsBpMasterContactInfo = res.rows[0].hlsBpMasterContactInfo[0]
return { hlsBpMasterAddress, hlsBpMasterContactInfo }
} else {
......@@ -85,6 +85,7 @@ const jump = async (item) => {
if (infoChangeStore.data.hlsBpMasterAddress)
router.push({ path: '/infochange/views/changeform', query: { isReturn: false } })
} else {
infoChangeStore.data = {}
infoChangeStore.data.bpObj = item;
router.push({ path: '/infochange/views/changeform', query: {} })
}
......
import { post } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
// 首页查询
......
......@@ -60,6 +60,7 @@ const jump = async (intentionId = '') => {
router.push({ name: 'intention-views-intentionForm' })
}
} else {
formStore.intentionData = {}
router.push({ name: 'intention-views-intentionForm' })
}
}
......
......@@ -10,7 +10,7 @@
</section>
<section class="sub">
<Button type="primary" v-show="!messageDisabled" @click="save" block>确认</Button>
<Button type="primary" v-show="!messageDisabled" @click="save" block>申请</Button>
</section>
</div>
</div>
......@@ -25,7 +25,7 @@ import { useLocation } from "@/utils/location"
import { phoneReg, cellPhoneReg } from "@/utils/Reg"
import { useRouter } from "vue-router";
import { useIntention } from '../store/index'
import { unref } from "vue";
import { unref} from "vue";
import api from "../api";
import { areaList } from '@vant/area-data';
import { currency } from "@/utils/textFormat";
......@@ -116,6 +116,7 @@ const toLast = () => {
goBack()
}
const save = async () => {
if (formConfig.validate()) {
let formValueObj = formConfig.getValues()
......@@ -126,13 +127,13 @@ const save = async () => {
if(validateValue) {
let res = await api.saveInfo({ remark: message, ...formValueObj, financeAmount: +formValueObj.financeAmount})
if (res.success) {
Toast.success('保存成功');
Toast.success('已提交申请至小松融资租赁公司');
} else {
Toast.fail('保存失败, 请稍后重试');
}
setTimeout(() => {
toLast()
}, 2000);
}, 1000);
}
} else {
Toast({ message: '请正确填写完整信息', position: 'top' });
......@@ -145,9 +146,10 @@ const getLocation = () => {
console.log(info);
let provineReg = new RegExp(info.address.province)
let cityReg = new RegExp(info.address.city)
let temp1 = agentList.filter(item => provineReg.test(item.text));
let temp1 = agentList.filter(item => provineReg.test(item.provinceIdN));
console.log(agentList);
if (temp1.length > 0) {
let temp2 = temp1.filter(item => cityReg.test(item.text))
let temp2 = temp1.filter(item => cityReg.test(item.cityIdN))
if (temp2.length > 0) {
formConfig.setFormValue('agentBpName', 'value', temp2[0].value)
formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone)
......@@ -181,9 +183,9 @@ const handleSelect = (value) => {
const handleAgent = async () => {
if (formStore.agentList.length) {
agentList = formStore.agentList
} else {
// if (formStore.agentList.length) {
// agentList = formStore.agentList
// } else {
let agentRes = await api.getAgent()
if (agentRes.success) {
agentList = agentRes.rows.map(item => ({
......@@ -194,11 +196,11 @@ const handleAgent = async () => {
cellPhone: item.cellPhone,
})
).map(item => {
return { text: item.provinceIdN + item.cityIdN + item.bpName, value: item.bpName, ...item }
return { text: item.bpName, value: item.bpCode, ...item }
}).sort((a, b) => (a.text.localeCompare(b.text)))
formStore.agentList = agentList;
}
}
// }
formConfig.setFormValue('agentBpName', 'select', agentList);
formConfig.watchForm("firstGoldRatio", (n, o) => {
......@@ -212,8 +214,10 @@ const handleAgent = async () => {
});
getFormVal();
};
handleAgent();
const checkValues = (values) => {
if (+values.financeAmount <= 0) {
Toast({ message: '请输入正确的合同总额', position: 'top' });
......
import { get, put, post, File, deleteReq } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
// 首页查询
......
......@@ -3,8 +3,7 @@
<NavBar title="还款计划" left-arrow @click-left="goBack" />
<section class="list">
<Search v-model="searchVal" placeholder="请输入项目编号/融资金额" />
<Search v-model="value" placeholder="请输入项目编号/融资金额" @update:model-value="onSearch"/>
<Notice detail="只可对已关联的项目还款" />
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
......@@ -29,16 +28,23 @@ import {currency} from '@/utils/textFormat'
const makeRepaymentStore = useMakeRepayment()
const searchVal = $ref('');
const value = $ref('');
let listValue = $ref([])
let refreshing = $ref(true);
const finished = $ref(true);
const getList = async () => {
const onSearch = (value) => {
const param = {
numberOrAmount: value
}
getList(param)
}
const getList = async (param) => {
// 下拉重置参数,重新加载
let list = await api.getRepayPlantList({userId: window.localStorage.getItem('userId')});
let list = await api.getRepayPlantList({userId: window.localStorage.getItem('userId'),...param});
if(list.success){
list = list.rows.map(item => ({
...item,
......
<template>
<NavBar title="罚息明细" left-arrow @click-left="goBack" />
<section class="hint" v-if="damageDetailInfo.length<1">
<div class="detail">暂无数据</div>
</section>
<Collapse v-model="activeNames" v-for="(item, index) of damageDetailInfo">
<CollapseItem :title="item.periods" :name="index+1" :value="item.amount">
<CellGroup v-for="(k) of item.detail">
......@@ -10,7 +13,8 @@
</template>
<script setup>
import { Collapse, CollapseItem, Cell, CellGroup, NavBar } from 'vant';
import { Collapse, CollapseItem, Cell, CellGroup, NavBar } from 'vant'
import Notice from '@/components/Notice.vue'
import {ref, reactive} from "vue";
import api from "../api";
import {goBack} from '../../../utils/globalFun';
......@@ -18,40 +22,7 @@ import { useMakeRepayment } from '../store/index';
import { currency } from "@/utils/textFormat";
const makeRepaymentStore = useMakeRepayment()
let damageDetailInfo = $ref([
// {
// periods: '第一期',
// amount: '4300.88',
// detail: [
// {
// name: '违约金1',
// debait: '2300',
// date: '2022-12-08',
// },
// {
// name: '违约金2',
// debait: '2300.88',
// date: '2022-12-08',
// }
// ]
// },
// {
// periods: '第二期',
// amount: '4300.88',
// detail: [
// {
// name: '违约金1',
// debait: '2300',
// date: '2022-12-08',
// },
// {
// name: '违约金2',
// debait: '2300.88',
// date: '2022-12-08',
// }
// ]
// }
]);
let damageDetailInfo = $ref([]);
const activeNames = ref([]);
......@@ -78,5 +49,20 @@ getDailyLiquidatedDetail();
</script>
<style lang="less" scoped>
.hint {
box-sizing: border-box;
// height: 60px;
width: 95%;
margin: 5px auto 10px;
/*background-color: #f0f9e5;*/
padding: 6px 7px;
margin-top: 5%;
}
.detail {
box-sizing: border-box;
width: 100%;
text-align: center;
color: gray;
line-height: 20px;
}
</style>
<template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="goBack" navText="罚息明细" @onClickRight="goDamagesDetail">
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" :showFooter="false" @onLeftClick="goBack" navText="罚息明细" @onClickRight="goDamagesDetail">
<template #list>
<div class="repay_list">
<div class="repay_content" v-for="(item, index) in cashflow">
......
import { get, put, post, File, deleteReq } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
// 首页查询
......
......@@ -3,7 +3,7 @@
<NavBar title="项目查询" left-arrow @click-left="goBack" />
<section class="list">
<Search v-model="value" placeholder="请输入项目编号/机型/代理店" @search="onSearch"/>
<Search v-model="value" placeholder="请输入项目编号/机型/代理店" @update:model-value="onSearch"/>
<Notice detail="只对已关联的项目进行查询" />
<PullRefresh v-model="refreshing" @refresh="getList" class="scroll">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval">
......
<template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="backToLast">
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" :showFooter="false" @onLeftClick="backToLast">
<template #list>
<div class="repay_list">
<div class="repay_content" v-for="item in cashflow">
......
......@@ -23,7 +23,8 @@ import GuarantorList from '../components/GuarantorList.vue'
import { onActivated } from "vue";
import api from "../api";
import { useProjectList } from "../store";
import { useRouter, useRoute } from "vue-router";
import { useRouter, useRoute } from "vue-router"
import { currency } from "@/utils/textFormat";
const route = useRoute();
const router = useRouter();
......@@ -235,7 +236,8 @@ const projectInfoDetail = async () => {
let billingInfo = [];
let leaseInfo = [];
if (rows[0]?.basicInformationList.length !== 0) {
baseInfo = rows[0].basicInformationList[0];
baseInfo = rows[0].basicInformationList[0]
baseInfo.applyDate = baseInfo.applyDate?.split(' ')[0] || ''
formBaseConfig.replace(formBaseConfigArr.map(item => {
item.value = baseInfo[item.propName] || '';
return item
......@@ -263,6 +265,7 @@ const projectInfoDetail = async () => {
}
if(rows[0]?.leaseInformationList.length !== 0){
leaseInfo = rows[0].leaseInformationList[0]
leaseInfo.leaseValue = currency(leaseInfo.leaseValue)
formleaseInfoConfig.replace(formleaseInfoArr.map(item => {
item.value = leaseInfo[item.propName] || '';
return item
......
import { post } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
// 首页查询
......
......@@ -33,8 +33,8 @@ import { useRouter } from "vue-router";
let listValue = $ref([])
let pager = { page: 1, pageSize: 10 }
let refreshing = $ref(false);
let finished = $ref(false);
let refreshing = $ref(true);
let finished = $ref(true);
const queryList = async () => {
refreshing = true
......@@ -46,10 +46,14 @@ const queryList = async () => {
...item,
title: item.contractNumber + '' || '',
other_title: item.acceptDate?.split(' ')[0] || '',
values: [["机型", "机号", "状态", "代理店"], [item.model, item.machineNumber, item.contractStatus, item.agencyName]]
// values: [["机型", "机号", "代理店"], [item.model, item.machineNumber, item.agencyName]]
values: [["机型", "机号", "状态", "代理店"], [item.model, item.machineNumber, item.contractStatus?item.contractStatus:'', item.agencyName]]
}
listValue.push(temp)
})
if(res.rows.length >=10 ){
finished = false
}
} else {
finished = true
}
......@@ -79,7 +83,7 @@ const jump = () => {
const unbind = async (associationId) => {
Dialog.confirm({
title: '确认取消绑定',
title: '是否对该项目取消解绑',
message: '',
})
.then(async () => {
......
<template>
<div class="container">
<NavBar title="关联项目" left-arrow @click-left="lastStep" />
<div class="content">
<section class="form-area">
<template v-if="(step == 1)">
......@@ -9,8 +8,8 @@
</template>
<template v-else-if="(step == 2)">
<Field v-model="secondFormConfig.tel" type="tel" label="手机号" placeholder="请输入手机号" input-align="right"
class="required" />
<Field v-model="secondFormConfig.tel" type="tel" label="合同经办人手机号" placeholder="请输入手机号" input-align="right"
class="required field_label" />
<Field v-model="secondFormConfig.sms" center clearable label="验证码" placeholder="请输入短信验证码" class="required">
<template #button>
<Button size="small" :disabled="buttonValues !== '获取验证码'" type="primary" @click="getSms">
......@@ -26,9 +25,10 @@
<section class="sub">
<Button v-if="(step < 3)" type="primary" block @click="nextStep">下一步</Button>
<Button v-else type="primary" block @click="submit">确认绑定</Button>
<Button v-else type="primary" block @click="confirmSubmit">确认绑定</Button>
</section>
</div>
<popMessage :isShow="showMessagePop" @closePopup="closePopMessage" @onConfirm="submit"></popMessage>
</div>
</template>
......@@ -40,6 +40,7 @@ import AuFormClass from "@/components/useAuForm";
import { phoneReg } from '@/utils/Reg'
import api from "../api";
import { useRouter } from "vue-router";
import popMessage from '@/components/popMessage.vue'
let step = $ref(1);
......@@ -118,18 +119,21 @@ const lastFormConfig = $ref(new AuFormClass([
disabled: true
},
]))
let showMessagePop = $ref(false)
let isRead = false
let checkSms = async () => {
let res = await api.codeValid({
code: secondFormConfig.sms,
phone: secondFormConfig.tel,
projectLeaseItemId: shouldSaveContractId.toString(),
receivets: + new Date() + ''
})
if (res.success && res.total > 0 && res.rows[0]) {
step++
return true
} else {
Toast.fail('信息校验失败')
Toast.fail('验证码输入错误,请重新输入')
return false
}
}
......@@ -141,7 +145,7 @@ let checkPrj = async () => {
shouldSaveContractId = res.rows[0].projectLeaseItemId
return true
} else {
Toast.fail('未找到该项目')
Toast.fail('该机型机号不存在,请重新输入')
return false
}
}
......@@ -162,13 +166,12 @@ let queryContractInfo = async () => {
}
const nextStep = async () => {
console.log(step);
if (step === 1 && firstFormConfig.validate()) {
FirstFormValues = firstFormConfig.getValues()
if (await checkPrj()) {
step++
}else {
Toast.fail('未查询到该关联项目')
Toast.fail('该机型机号不存在,请重新输入')
}
} else if (step === 2 && secondFormConfig.sms && secondFormConfig.tel) {
if (checkSms()) {
......@@ -218,12 +221,25 @@ const lastStep = () => {
}
}
const router = useRouter()
const confirmSubmit = () => {
if(!isRead){
showMessagePop = true
} else {
submit()
}
}
const closePopMessage = () => {
showMessagePop = false
}
const submit = async () => {
showMessagePop = false;
let res = await api.contractBind({
projectLeaseItemId: shouldSaveContractId.toString(),
receivets: + new Date() + ''
})
isRead = true;
if (res.success && res.total > 0 && res.rows[0]?.associationId) {
Toast.success('绑定成功')
setTimeout(() => {
......@@ -255,4 +271,7 @@ const submit = async () => {
content: '*';
color: red;
}
:deep(.field_label .van-field__label) {
width: 120px !important;
}
</style>
import { get, put, post, File, deleteReq } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL == 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
//列表查询
......
......@@ -3,7 +3,7 @@
<NavBar title="还款计划查询" left-arrow @click-left="goBack" />
<section class="list">
<Search v-model="searchVal" placeholder="请输入项目编号/融资金额" />
<Search v-model="value" placeholder="请输入项目编号/融资金额" @update:model-value="onSearch"/>
<Notice detail="只可对已关联的项目还款" />
......@@ -27,16 +27,22 @@ import { useRouter } from "vue-router";
import {currency} from '@/utils/textFormat'
import { useIntention } from "../store";
const searchVal = $ref('');
const value = $ref('');
const formStore = useIntention();
let listValue = $ref([]);
let refreshing = $ref(true);
const finished = $ref(true);
const getList = async () => {
const onSearch = (value) => {
const param = {
numberOrAmount: value
}
getList(param)
};
const getList = async (param) => {
// 下拉重置参数,重新加载
let res = await api.getRepayPlantList({userId: window.localStorage.getItem('userId')});
let res = await api.getRepayPlantList({userId: window.localStorage.getItem('userId'),...param});
let list = []
if(res.success){
list = res.rows.map(item => ({
......@@ -63,6 +69,7 @@ const jump = (item) => {
formStore.contractId = item.contractId;
router.push({ name: 'repayPlan-views-plan' })
}
</script>
<style scoped lang="less">
......
<template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="goBack" >
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" :showFooter="false" @onLeftClick="goBack" >
<template #list>
<div class="repay_list">
<div class="repay_content" v-for="item in cashflow">
......@@ -42,7 +42,6 @@
</div>
</template>
<template #footer>
</template>
</RepayPlan>
</template>
......
import { get, put, post, File, deleteReq } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
//列表查询
getSelfServiceList(data={}) {
......
......@@ -6,15 +6,16 @@
<CellGroup inset>
<Field required v-model="form.contractNumber" is-link readonly label="项目编号" @click="showProjectNumber = true"
input-align="right" />
<Field v-model="form.code" readonly label="授权对象编码" input-align="right" />
<Field v-model="form.bpName" readonly label="项目承租人" input-align="right" />
<Field required v-model="form.areaName" is-link readonly label="所属地区" @click="showArea = true"
input-align="right" />
<Field required v-model="form.agencyName" is-link readonly label="代理店名称" @click="showPicker = true"
input-align="right" />
<Field v-model="form.code" readonly label="授权对象编码" input-align="right" />
</CellGroup>
</section>
<section class="sub">
<Button type="primary" block @click="confirm">授权</Button>
<Button type="primary" block @click="confirm">确认</Button>
</section>
<Popup v-model:show="showProjectNumber" position="bottom">
<Picker :columns="projectNumberColumns" :columns-field-names="{text:'contractNumber', value: 'contractId'}" @confirm="projectNumberConfirm" @cancel="showProjectNumber = false" >
......@@ -27,7 +28,7 @@
<Popup v-model:show="showPicker" position="bottom">
<Picker :columns="agencyColumns" :columns-field-names="{text:'agencyName', value: 'agencyId'}" @confirm="agencyConfrim" @cancel="showPicker = false" >
<template #columns-top>
<Search v-model="agencyValue" placeholder="请输入搜索关键词" @click-left-icon="searchAgency" />
<Search v-model="agencyValue" placeholder="请输入搜索关键词" @update:model-value="searchAgency" />
</template>
</Picker>
</Popup>
......@@ -73,23 +74,32 @@ const projectNumber = {
pageSize: 1000
}
const projectNumberConfirm = (selectValues) => {
if(selectValues){
form.contractNumber = selectValues.contractNumber;
form.contractId = selectValues.contractId;
form.projectLeaseItemId = selectValues.projectLeaseItemId;
form.bpName = selectValues.bpName;
}
showProjectNumber = false;
}
const areaConfirm = ( selectedValues) => {
if(selectedValues) {
form.areaName = selectedValues.value;
form.areaCode = selectedValues.code;
showArea = false;
getAgencyList();
}
showArea = false;
}
const agencyConfrim = (selectedValues) => {
console.log(selectedValues);
if(selectedValues){
form.agencyName = selectedValues.agencyName;
form.agencyId = selectedValues.agencyId;
form.code = selectedValues.agencyCode;
}
showPicker = false;
}
......@@ -101,30 +111,38 @@ const areaChange = (selectValues) => {
}
//代理店模糊查询
const searchAgency = () => {
const searchAgency = (agencyValue) => {
agencyColumns = [];
getAgencyList({agencyName: agencyValue})
}
const confirm = async () => {
const confirm = () => {
Dialog.confirm({
title: '提示',
message: '是否确认授权',
// showCancelButton: false
}).then(() => {
confirmAgent()
});
};
const confirmAgent = async () => {
const param = {
contractId: form.contractId,
projectLeaseItemId: form.projectLeaseItemId,
agencyId: form.agencyId,
receivets: new Date(),
}
const res = await api.confrimAgent(param);
if(res.success){
// Toast.success('授权成功')
Dialog.confirm({
title: '授权成功',
message: ''
}).then(() => {
Toast.success('授权成功')
setTimeout(() => {
goBack()
});
}, 500);
}else{
Toast.fail(res.message?res.message:'授权失败')
}
}
const getContractList = async () => {
const res = await api.getContracNumberList({receivets: + new Date() + '', ...projectNumber})
projectNumberColumns = res.rows
......
......@@ -31,8 +31,7 @@ const queryList = async () => {
refreshing = true
let res = await api.getSelfServiceList({ receivets: + new Date() + '', ...pagination })
if (res.success && res.total > 0) {
if(res.total > 10){finished = false}
if (res.success && res.rows.length > 0) {
res.rows.forEach(item => {
listValue.push({
title: item.authDate.split(' ')[0] + '' || '',
......@@ -40,6 +39,9 @@ const queryList = async () => {
...item
})
})
if(res.rows.length >=10){
finished = false
}
} else {
finished = true
}
......
......@@ -108,13 +108,12 @@ axios.interceptors.response.use((response) => {
HandBridge.postMessage(JSON.stringify(argument))
});
} else {
if(!url.includes('bp-masters/wt-ocr') && !url.includes('invoice-input-hds/in-ocr')){
// if(!url.includes('bp-masters/wt-ocr') && !url.includes('invoice-input-hds/in-ocr')){
Dialog.alert({
title: "提示",
message: err.response?.data?.message || err.message
});
}
// }
}
return Promise.resolve(err.response?.data)
})
......@@ -143,7 +142,22 @@ export function get(url, param = {}) {
headers: headers,
params: param,
}).then((res) => {
if(res.code == '403'){
Dialog.alert({
title: "提示",
message: '登录失效,重新登录'
}).then(() => {
let argument = {
className: 'BaseBridge',
function: 'closeWebView',
successCallBack: 'onSuccess',
failCallBack: 'onError',
}
HandBridge.postMessage(JSON.stringify(argument))
});
} else {
resolve(res)
}
}).catch((err) => {
reject(err)
})
......@@ -171,7 +185,23 @@ export function post(url, param = {}) {
url,
data: {...param, _token: window.localStorage.getItem('_token')},
}).then((res) => {
console.log('返回参数',res)
if(res.code == '403'){
Dialog.alert({
title: "提示",
message: '登录失效,重新登录'
}).then(() => {
let argument = {
className: 'BaseBridge',
function: 'closeWebView',
successCallBack: 'onSuccess',
failCallBack: 'onError',
}
HandBridge.postMessage(JSON.stringify(argument))
});
} else {
resolve(res)
}
}).catch((err) => {
reject(err)
})
......
......@@ -7,14 +7,21 @@ export function bridgeLogin() {
window.onSuccess = function (message) {
console.log('BaseBridge:', message)
let object = handleSpecialCharacters(message)
let phone = object.loginAccount
if(phone.length > 11){
phone = phone.replace(' ','').replace('-','')
phone = phone.substring(phone.length -11,phone.length)
}
const data = {
token: object.token,
hips_token: object.token,
userId: object.userId,
organizationId: object.tenantId,
phone:phone,
loginAccount: object.loginAccount,
pushExtra: object.pushExtra
}
window.localStorage.setItem('userId', object.userId)
window.localStorage.setItem('phone', object.loginAccount)
window.localStorage.setItem('phone', phone)
resolve(data)
}
......@@ -42,7 +49,7 @@ export default async function login(token = '') {
result.token = token
}
window.localStorage.access_token = result.token
window.localStorage.hips_token = result.token
return NoticeAndReplaceRouter(result.pushExtra)
}
......
// 转成金钱字符串
export function currency(num, dotNum = 2) {
if (num===null || num===undefined || isNaN(+num)) return num;
if (num===null || num===undefined || num=== '' || isNaN(+num)){
return num;
} else {
return (+num).toLocaleString("en-US", { style: "decimal", minimumFractionDigits: dotNum, maximumFractionDigits: dotNum });
}
}
// 金钱去除逗号
......@@ -25,7 +28,7 @@ export function dateFormatUP(dateString) {
// 小数转成百分数
export function toPercent(val, needSign = true, dotNum = 2) {
if (!val || isNaN(+val)) return '0.00%';
if (!val || isNaN(+val)) return val;
let res = (+val).toLocaleString("zh-CN", { style: "percent", minimumFractionDigits: dotNum });
return needSign ? res : res.replace('%', '');
}
......
......@@ -43,6 +43,7 @@ const setRouteConfig = (VITE_TARGET) => {
export default ({ mode }) => {
let VITE_TARGET = loadEnv(mode, process.cwd()).VITE_TARGET;
let VITE_HTTP_BASE_URL = loadEnv(mode, process.cwd()).VITE_HTTP_BASE_URL;
let VITE_DEBUG = loadEnv(mode, process.cwd()).VITE_DEBUG;
console.log(`当前配置: 环境:${mode}, 目标目录:${VITE_TARGET}, 后台基系统:${VITE_HTTP_BASE_URL}`);
return {
......@@ -51,7 +52,7 @@ export default ({ mode }) => {
vue({ reactivityTransform: true }),
Pages(setRouteConfig(VITE_TARGET)),
legacy({
targets: ['defaults', 'since 2016']
targets: ['defaults', 'since 2016','not IE 11']
}),
styleImport({
resolves: [VantResolve()],
......@@ -86,10 +87,11 @@ export default ({ mode }) => {
},
build: {
minify: 'terser',
target: ['es2015'],
terserOptions: {
compress: {
drop_console: false,
drop_debugger: true,
drop_debugger: VITE_DEBUG,
},
},
outDir: `dist/${VITE_TARGET}`,
......
......@@ -1383,7 +1383,7 @@ vite@3.1.8:
vue-demi@*:
version "0.13.11"
resolved "http://nexus.saas.hand-china.com/repository/hzero-npm-group/vue-demi/-/vue-demi-0.13.11.tgz"
resolved "h3.1.8ttp://nexus.saas.hand-china.com/repository/hzero-npm-group/vue-demi/-/vue-demi-0.13.11.tgz"
integrity sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==
vue-pdf-embed@^1.1.5:
......
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