Commit f99457db authored by WangRui's avatar WangRui
parents 727c520f 09a4505e
......@@ -32,7 +32,7 @@ npm run preview 本地预览打包完的文件
4. 合同签约 (E签宝, 预览签署文件, 由消息推送后做) (✋ 2) ✅
5. 还款计划 (支付, 只能从上到下支付)(✋ 2)
6. 还款计划查询 (发票预览下载) (✋ 2)
7. 自助服务 ( ✋.5)
7. 自助服务 ( ✋.5)✅
8. 客户信息变更 (✋ 1)
#### 首页
......
......@@ -13,7 +13,8 @@
"build:infoChange": "VITE_TARGET=infoChange vite build --mode test",
"build:relatedProject": "VITE_TARGET=relatedProject vite build --mode test",
"build:repayPlanCheck": "VITE_TARGET=repayPlanCheck vite build --mode test",
"build:contractSign": "VITE_TARGET=contractSign vite build --mode test"
"build:contractSign": "VITE_TARGET=contractSign vite build --mode test",
"build:projectList": "VITE_TARGET=projectList vite build --mode test"
},
"dependencies": {
"@hips/plugin-vue-jssdk": "^1.1.2",
......
......@@ -89,8 +89,8 @@ const updateForm = async () => {
isComplete = planStore.planData?.isComplete;
if (testQuotationId) {
let res = await api.getFormInfo({ testQuotationId: '' + testQuotationId })
if (res.result === 'SUCCESS') {
let resData = res.data[0];
if (res.success) {
let resData = res.rows[0];
formConfig.replace(formConfigArr.map(item => {
item.value = resData[item.propName] || '';
if (item.propName === "firstGoldRatio") {
......@@ -99,6 +99,8 @@ const updateForm = async () => {
item.value = resData[item.propName].split(' ')[0] || '';
} else if (item.propName === "contractRate") {
item.value = resData[item.propName] * 100 || '';
} else if (item.propName === "repayment") {
item.value = '均等还款'
}
item.disabled = true;
return item;
......@@ -107,6 +109,13 @@ const updateForm = async () => {
} else {
formConfig.replace(formConfigArr.map(item => {
if (item.propName !== "repayment") {
if (['firstGoldRatio', 'priceOfItem', 'term'].includes(item.propName)) {
item.value = 0;
} else if (['contractRate', 'firstRentDay'].includes(item.propName)) {
item.value = '';
} else if (item.propName === "repayment") {
item.value = '均等还款'
}
item.disabled = false;
}
return item;
......@@ -210,9 +219,9 @@ const backLast = () => {
</style>
<route>
{
meta: {
keepAlive: true
}
{
meta: {
keepAlive: true
}
</route>
\ No newline at end of file
}
</route>
\ No newline at end of file
<template>
<div class="container">
<NavBar title="融资计算器" left-arrow @click-left="goBack" />
<NavBar title="融资计算器" left-arrow @click-left="goBack(true)" />
<section class="list">
<PullRefresh v-model="refreshing" @refresh="getList" class="scroll">
......@@ -33,8 +33,8 @@ const listValue = $ref([])
let getList = async () => {
let list = await api.financingCalculator({ userId: window.localStorage.getItem('userId') })
if (list.data && list.data.length) {
list = list.data.map(item =>
if (list.rows && list.rows.length) {
list = list.rows.map(item =>
({ ...item, title: item.creationDate.split(' ')[0], values: [["物件价格", "融资金额", "每期还款"], [`¥ ${item.priceOfItem}`, `¥ ${item.financeAmount}`, `¥ ${item.dueAmount}`]] })
)
} else {
......@@ -48,10 +48,11 @@ getList()
const router = useRouter();
const jump = async (testQuatationId) => {
if (testQuatationId) {
let res = await api.planInfo({ testQuatationId: testQuatationId + '' })
if (res.result === 'SUCCESS') {
res.data.cashflow = res.data.cashflow.map(item => { item.chargeDueDate = item.chargeDueDate.split(" ")[0]; return item })
planStore.planData = { ...res.data, isComplete: true };
let res = await api.planInfo({ testQuotationId: testQuatationId + '' })
if (res.success && res.rows.length) {
let obj = res.rows[0]
obj.cashflow = obj.cashflow.map(item => { item.chargeDueDate = item.chargeDueDate.split(" ")[0]; return item })
planStore.planData = { ...obj, isComplete: true };
router.push({ name: 'calculator-views-plan' })
} else {
Toast.fail('获取不到计算数据');
......
......@@ -68,7 +68,7 @@ const save = async () => {
let res = await api.saveInfo(plan)
if (res.result == "SUCCESS") {
if (res.success) {
router.push({ name: 'calculator-views' })
Toast.success('保存成功');
} else {
......
import { get, put, post, File, deleteReq } from '@/utils/http'
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_HTTP_BASE_URL
const api = {
// getMakingList (data) { // 查询合同制作列表
// return get(
// `${baseURL}/hlct/v1/0/contracts/toMake`,
// {...data}
// )
// },
// 客户信息变更申请按钮
changeApprove(data = {}) {
return post(`${baseURL}/app/api/app/master/change/request/approve`, { ...data, userId: window.localStorage.getItem('userId') })
},
// 选择项目
contractNumber() {
return post(`${baseURL}/app/api/app/contract/number`, { userId: window.localStorage.getItem('userId') })
},
// 首页
changeQuery() {
return post(`${baseURL}/app/api/app/master/change/query`, { userId: window.localStorage.getItem('userId') })
},
};
export default api;
<template>
<SwipeCell class="swipe" :disabled="true">
<div class="box" @click="$emit('click')">
<SwipeCell class="swipe box" :disabled="true">
<div @click="$emit('click')">
<p>
<span>申请编号:</span>
<span>{{ info.id }}</span>
......
const state = {};
import { ref } from 'vue'
import { defineStore } from 'pinia'
export default {
namespaced: true,
state,
};
export const useInfoChange = defineStore('infoChangeStore', () => {
const data = ref({})
return { data }
})
......@@ -3,147 +3,364 @@
<NavBar title="客户信息变更" left-arrow @click-left="goBack" />
<div class="content">
<section class="form-area">
<section class="form-area" v-if="!isOpenConfig">
<Tabs v-model:active="active" title-active-color="#0277bc" color="#0277bc">
<Tab title="地址信息">
<AuForm v-model="addressFormConfig" :key="addressForm" />
<Field v-model="message" rows="2" autosize label="备注说明" type="textarea" maxlength="200"
placeholder="最多可编写200字" show-word-limit />
<AuForm v-model="addressFormConfig" />
<Field v-model="refV01" rows="2" autosize label="备注说明" type="textarea" maxlength="200"
placeholder="最多可编写200字" show-word-limit :readonly="readonly" />
</Tab>
<Tab title="联系人信息">
<AuForm v-model="contactPersonConfig" :key="contactPerson" />
<Field v-model="message" rows="2" autosize label="备注说明" type="textarea" maxlength="200"
placeholder="最多可编写200字" show-word-limit />
<AuForm v-model="contactPersonConfig" />
<Field v-model="remark" rows="2" autosize label="备注说明" type="textarea" maxlength="200"
placeholder="最多可编写200字" show-word-limit :readonly="readonly" />
</Tab>
</Tabs>
</section>
<section v-show="isOpenConfig">
<AuForm v-model="middleConfig" />
</section>
<section class="sub">
<Button type="primary" block>申请</Button>
<Button type="primary" v-if="!readonly" block @click="buttonClick">{{ isOpenConfig ? "下一步" : "申请" }}</Button>
</section>
</div>
</div>
</div>
</template>
<script setup>
import { goBack } from "@/utils/globalFun"
import { NavBar, Button, Field, Tab, Tabs } from "vant";
import { NavBar, Button, Field, Tab, Tabs, Toast } from "vant";
import AuForm from '@/components/AuForm.vue';
import AuFormClass from "@/components/useAuForm";
import { areaList } from '@vant/area-data';
import api from "../api";
import { useRoute } from "vue-router";
import { useInfoChange } from '../store/index'
import { phoneReg } from "@/utils/Reg"
import { onMounted } from "vue";
const infoChangeStore = useInfoChange()
console.log("目前维护的数据", infoChangeStore.data);
const route = useRoute()
const readonly = $ref(false)
const isOpenConfig = $ref(true);
const getMode = () => {
console.log(route.query);
if (route.query.isReturn === "false") {
isOpenConfig = false
readonly = true
} else if (route.query.isReturn === "true") {
isOpenConfig = false
readonly = false
} else {
isOpenConfig = true
}
}
getMode()
const active = $ref(0)
const message = $ref('')
const refV01 = $ref('')
const remark = $ref('')
const addressForm = $ref();
const addressFormConfig = $ref(new AuFormClass([
{
title: '地址类型',
propName: 'paymentReqDate',
propName: 'addressType',
type: 'cell',
value: '',
isRequired: true,
select: []
select: [
{
text: "通讯地址",
value: "SERVICE_ADDRESS"
},
{
text: "身份证地址",
value: "ID_ADDRESS"
},
{
text: "家庭地址",
value: "HOUSE_ADDRESS"
},
{
text: "单位地址",
value: "WORK_ADDRESS"
},
{
text: "其他",
value: "OTHERS"
},
]
},
{
title: '省/市/区',
propName: 'paymentReqDat3e',
propName: 'area',
type: 'cell',
value: '',
isRequired: true,
select: []
select: areaList
},
{
title: '详细地址',
propName: 'paymentReqDat3e',
propName: 'address',
type: 'input',
value: '',
isRequired: true
isRequired: false
},
{
title: '邮编',
propName: 'paymentReqDat3e',
propName: 'zipcode',
type: 'input',
value: '',
isRequired: true
isRequired: false
},
{
title: '电话',
propName: 'paymentReqDat3e',
propName: 'phone',
type: 'input',
value: '',
isRequired: true
isRequired: false,
},
{
title: '手机',
propName: 'paymentRe3qDat3e',
propName: 'cellPhone',
type: 'input',
value: '',
isRequired: true,
isRequired: false,
reg: phoneReg
}
]))
const contactPerson = $ref();
], { disabled: readonly }))
const contactPersonConfig = $ref(new AuFormClass([
{
title: '联系人类型',
propName: 'paymentReqDate',
propName: 'contactType',
type: 'cell',
value: '',
isRequired: true,
select: []
select: [
{
text: "主联系人",
value: "RENT_CONTACT"
},
{
text: "次联系人",
value: "SECONDARY_CONTACT"
}
]
},
{
title: '联系人姓名',
propName: 'paymentReqDat3e',
propName: 'contactPerson',
type: 'input',
value: '',
isRequired: true,
},
{
title: '职务',
propName: 'paymentReqDat3e',
propName: 'position',
type: 'cell',
value: '',
isRequired: true,
select: []
select: [
{
text: "高级领导",
value: "1"
},
{
text: "中级领导",
value: "2"
},
{
text: "一般员工",
value: "3"
},
{
text: "无",
value: "9"
},
]
},
{
title: '证件类型',
propName: 'paymentReqDat3e',
propName: 'idType',
type: 'cell',
value: '',
isRequired: true,
select: [
{
text: "户口薄",
value: "RESIDENCE_BOOKLET"
},
{
text: "港澳居民来往内地通行证",
value: "GA_TRAVEL_PERMIT"
},
{
text: "台湾同胞来往内地通行证",
value: "TW_TRAVEL_PERMIT"
},
{
text: "外国人居留证",
value: "RES_PERMIT_FOREIGNERS"
},
{
text: "警官证",
value: "POLICE_ID_CARD"
},
{
text: "香港身份证",
value: "HK_ID_CARD"
},
{
text: "澳门身份证",
value: "AM_ID_CARD"
},
{
text: "台湾身份证",
value: "TW_ID_CARD"
},
{
text: "居民身份证及其他以公号码为标识的件",
value: "ID_CARD"
},
{
text: "军人身份证件",
value: "SOLDIER_ID_CARD"
},
{
text: "统一社会信用代码",
value: "SOCIAL_CREDIT_CODE"
}
]
},
{
title: '证件号码',
propName: 'idCardNo',
type: 'input',
value: '',
isRequired: true,
select: []
},
{
title: '电话',
propName: 'paymentReqDat3e',
propName: 'phone',
type: 'input',
value: '',
isRequired: true
isRequired: true,
reg: phoneReg
},
{
title: '邮箱',
propName: 'paymentReqDat3e',
propName: 'email',
type: 'input',
value: '',
isRequired: true
isRequired: false
},
{
title: '传真',
propName: 'paymentReqDat3e',
propName: 'fax',
type: 'input',
value: '',
isRequired: true
isRequired: false
},
{
title: '家庭住址',
propName: 'paymentRe3qDat3e',
propName: 'familyAddress',
type: 'input',
value: '',
isRequired: true,
isRequired: false,
}
], { disabled: readonly }))
const middleConfig = $ref(new AuFormClass([
{
title: '项目编号',
propName: 'itemProjectNumber',
type: 'cell',
value: '',
isRequired: true,
select: []
},
{
title: '客户名称',
propName: 'bpName',
type: 'input',
value: '',
isRequired: true,
disabled: true
},
]))
const bpObj = $ref({})
const fillForm = () => {
addressFormConfig.fillValues(infoChangeStore.data)
contactPersonConfig.fillValues(infoChangeStore.data)
contactPersonConfig.fillValues(infoChangeStore.data)
}
onMounted(() => {
fillForm()
})
const queryPrj = async () => {
let res = await api.contractNumber()
if (res.success && res.rows.length) {
middleConfig.setFormValue("itemProjectNumber", "select", res.rows.map(item => {
return {
text: item.itemProjectNumber,
value: item.itemProjectNumber,
bpId: item.bpId,
bpName: item.bpName,
bpClass: item.bpClass,
contractId: item.contractId,
bpStatus: item.bpStatus
}
}))
let select = middleConfig.getFormValue("itemProjectNumber", true)?.select;
middleConfig.watchForm("itemProjectNumber", (n, o) => {
let obj = select.find(item => item.value === n)
if (obj.value) {
console.log(obj);
bpObj.bpClass = obj.bpClass
bpObj.bpId = obj.bpId
bpObj.bpStatus = obj.bpStatus
middleConfig.setFormValue("bpName", "value", obj.bpName)
}
})
}
}
queryPrj()
const submit = async () => {
let obj1 = middleConfig.getValues()
let obj2 = addressFormConfig.getValues()
let obj3 = contactPersonConfig.getValues()
let provinceId = obj2.area
let cityId = obj2.area
let districtId = obj2.area
let params = { hlsBpMasterAddress: { ...obj2, refV01, provinceId, cityId, districtId }, hlsBpMasterContactInfo: { ...obj3, remark }, ...bpObj }
// 地址差个手机
let res = await api.changeApprove(params)
}
const buttonClick = () => {
if (isOpenConfig && middleConfig.validate()) {
isOpenConfig = false
} else if (!isOpenConfig && !readonly && addressFormConfig.validate() && contactPersonConfig.validate()) {
submit()
} else {
Toast.fail('请将数据填写完整')
}
}
</script>
<style lang="less" scoped>
......
......@@ -5,12 +5,12 @@
<section class="list">
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval">
<ChangeListItem v-for="item in infos" :info="item" @click="jump" />
<ChangeListItem v-for="item in infos" :info="item" @click="jump(item)" />
</List>
</PullRefresh>
</section>
<Plus @click="jump" />
<Plus @click="jump({})" />
</div>
</template>
......@@ -21,29 +21,56 @@ import ChangeListItem from '../components/ChangeListItem.vue'
import Plus from '@/components/Plus.vue'
import api from "../api";
import { useRouter } from "vue-router";
import { useInfoChange } from '../store/index'
const infos = $ref([
{
id: 'BG001001001',
applyDate: '2022-8-18',
status: '拒绝'
}
])
const infoChangeStore = useInfoChange()
const refreshing = $ref(true);
const refreshing = $ref(false);
const finished = $ref(true);
const infos = $ref([])
let queryList = async () => {
refreshing = true
let res = await api.changeQuery({})
if (res.success && res.total > 0) {
res.rows.forEach(item => {
infos.push({
id: item.changeReqNumber,
applyDate: item.creationDate,
status: item.reqStatusN,
...item
})
})
}
refreshing = false
}
queryList()
const onRefresh = () => {
// 下拉重置参数,重新加载
infos = []
queryList()
};
const loadApproval = () => {
queryList()
}
const router = useRouter();
const jump = () => {
router.push({ name: 'infoChange-views-changeForm' })
const jump = (item) => {
infoChangeStore.data = item
// 申请中/审批通过时申请页面为只读
// 审批退回时可再次维护并重新提交
if (item.reqStatus && item.reqStatus === 'RETURN') {
router.push({ path: '/infochange/views/changeform', query: { isReturn: true } })
} else if (item.reqStatus && item.reqStatus !== 'RETURN') {
router.push({ path: '/infochange/views/changeform', query: { isReturn: false } })
} else {
router.push({ path: '/infochange/views/changeform', query: {} })
}
}
</script>
......
......@@ -31,12 +31,12 @@ const listValue = $ref([])
const getList = async () => {
let res = await api.getlist()
if (res.result === 'SUCCESS' && res.data.length) {
listValue = res.data.map(item => {
if (res.success && res.rows.length) {
listValue = res.rows.map(item => {
return {
title: item.intentionNumber,
other_title: item.creationDate,
values: [["合同金额", "状态"], ["¥ " + item.contractAmount, item.intentionStatusN]],
values: [["合同金额", "状态"], ["¥ " + (item.contractAmount || '0.00'), item.intentionStatusN]],
intentionId: item.intentionId
}
})
......@@ -54,8 +54,8 @@ const router = useRouter();
const jump = async (intentionId = '') => {
if (intentionId) {
let res = await api.getDetail({ intentionId: intentionId + '' })
if (res.result === 'SUCCESS' && res.data.length) {
formStore.intentionData = res.data[0];
if (res.success && res.rows.length) {
formStore.intentionData = res.rows[0];
router.push({ name: 'intention-views-intentionForm' })
}
} else {
......
......@@ -28,7 +28,6 @@ import { useIntention } from '../store/index'
import { unref } from "vue";
import api from "../api";
import { areaList } from '@vant/area-data';
console.log(areaList);
const formStore = useIntention()
let location = useLocation()
......
......@@ -144,8 +144,8 @@ export async function HlpsUpload(source, target, headers, successCb) {
}
// 判断还有可返回的路由吗? 无则退出
export const goBack = () => {
if (window.history.state.position > 0) return window.history.back();
export const goBack = (isExit = false) => {
if (window.history.state.position > 0 && !isExit) return window.history.back();
// 海马汇退出子应用方法
let args = {
......
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