yujialong 1 month ago
parent 093734eec2
commit df11004ed0
  1. 7
      src/App.vue
  2. 98
      src/pages/manage/list/personalLoans/detail.vue
  3. 109
      src/pages/manage/list/personalLoans/list.vue
  4. 30
      src/pages/report/index.vue

@ -14,6 +14,7 @@ import selectBusiness from '@/components/selectBusiness'
import TipDialog from '@/components/tipDialog'
import { mapState, mapMutations } from 'vuex'
import Bus from '@/libs/bus'
import store from '@/store'
export default {
name: 'App',
components: {
@ -22,6 +23,12 @@ export default {
TipDialog
},
created () {
//
if (!document.referrer) {
store.commit('user/logout')
return false
}
//localStorage
if (util.local.get(Setting.storeKey)) {
this.$store.replaceState(Object.assign({}, this.$store.state, util.local.get(Setting.storeKey)))

@ -206,31 +206,12 @@
<el-button type="primary" @click="loanSubmit">确定</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="extensionVisible" width="500px" z-index="6000" append-to-body :show-close="false"
custom-class="dia">
<div class="data-dia23">
<div slot="title" class="dia-header">
<div class="data-title">请选择展期期限</div>
</div>
<div style="padding: 30px 0;">
<el-select v-model="extensionPeriod" placeholder="请选择" size="small" style="width: 100%;">
<el-option v-for="(item, i) in extensions" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="extensionVisible = false">取消</el-button>
<el-button type="primary" @click="extensionSubmit">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { phoneListen, myValidate, checkHanzi, checkName, ismoney, autoPlay, autoPlay2, inputListen, messageIdCard, messageCard, messagePassword } from '@/utils/utilFunction.js';
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js'
import { addOperation, personalBasicSave, loanContractSave, personalBasicFind, grantALoan, operationExtension, calculateTheReturnInterestSum } from '@/api/http'
import { addOperation, personalBasicSave, loanContractSave, personalBasicFind, grantALoan, calculateTheReturnInterestSum } from '@/api/http'
import Util from '@/libs/util'
const moduleName = 'personalLoans/detail'
@ -386,61 +367,6 @@ export default {
curStep: 1,
disbursementDate: '',
loanVisible: false,
extensionVisible: false,
extensionPeriod: 1,
extensions: [
{
id: 1,
name: '1个月',
pointId: 278,
},
{
id: 2,
name: '2个月',
pointId: 279,
},
{
id: 3,
name: '3个月',
pointId: 280,
},
{
id: 4,
name: '4个月',
pointId: 281,
},
{
id: 5,
name: '5个月',
pointId: 282,
},
{
id: 6,
name: '6个月',
pointId: 283,
},
{
id: 7,
name: '7个月',
pointId: 284,
},
{
id: 8,
name: '8个月',
pointId: 285,
},
{
id: 9,
name: '9个月',
pointId: 286,
},
{
id: 10,
name: '10个月',
pointId: 287,
},
],
}
},
mounted () {
@ -652,28 +578,6 @@ export default {
showExtension () {
this.extensionVisible = true
},
//
async extensionSubmit () {
if (!this.extensionPeriod) return this.$message.error('请选择展期期限!')
const { data } = await operationExtension({
id: this.form.contractId,
extensionPeriod: this.extensionPeriod,
})
this.$message[data.status === 200 ? 'success' : 'error'](data.message)
if (data.status === 200) {
//
const preId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',766,767'
await addOperation({
parentId: preId,
lcJudgmentRuleReq: [{ answerId: 866, emptyOne: 152, emptyTwo: this.extensions.find(e => e.id === this.extensionPeriod).pointId, operationIds: preId + ',866', type: 1 }],
projectId: +sessionStorage.getItem('projectId'),
startTime: sessionStorage.getItem('startTime')
})
setTimeout(this.$router.push('/counter/list/manage/personalLoans'), 1500)
}
},
phoneListen,
checkName,

@ -100,6 +100,25 @@
@current-change="handleCurrentChangePayment" :total="totalRepayment"></el-pagination>
</div>
</el-dialog>
<el-dialog :visible.sync="extensionVisible" width="500px" z-index="6000" append-to-body :show-close="false"
custom-class="dia">
<div class="data-dia23">
<div slot="title" class="dia-header">
<div class="data-title">请选择展期期限</div>
</div>
<div style="padding: 30px 0;">
<el-select v-model="extensionPeriod" placeholder="请选择" size="small" style="width: 100%;">
<el-option v-for="(item, i) in extensions" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="extensionVisible = false">取消</el-button>
<el-button type="primary" @click="extensionSubmit">确定</el-button>
</span>
</el-dialog>
</div>
</template>
@ -107,7 +126,7 @@
import { tableRowClassName, headerCellStyle } from '@/assets/js/myConfig'
import MyDialog from '@/components/dialogTwo'
import NeedBefore from '@/components/needBefore'
import { batchProcessing, personalBasicList, repaymentPlan, addOperation } from '@/api/http';
import { batchProcessing, personalBasicList, repaymentPlan, addOperation, operationExtension } from '@/api/http';
const moduleName = 'personalLoans/list'
import { mapMutations, mapGetters } from 'vuex'
@ -149,6 +168,61 @@ export default {
status: '',
},
curRow: {},
extensionVisible: false,
extensionPeriod: 1,
extensions: [
{
id: 1,
name: '1个月',
pointId: 278,
},
{
id: 2,
name: '2个月',
pointId: 279,
},
{
id: 3,
name: '3个月',
pointId: 280,
},
{
id: 4,
name: '4个月',
pointId: 281,
},
{
id: 5,
name: '5个月',
pointId: 282,
},
{
id: 6,
name: '6个月',
pointId: 283,
},
{
id: 7,
name: '7个月',
pointId: 284,
},
{
id: 8,
name: '8个月',
pointId: 285,
},
{
id: 9,
name: '9个月',
pointId: 286,
},
{
id: 10,
name: '10个月',
pointId: 287,
},
],
}
},
watch: {
@ -196,8 +270,36 @@ export default {
this.page = val
this.getData()
},
toDetail (row, show) {
this.$router.push(`/counter/list/manage/personalLoans-detail?show=${show === 2 ? 2 : row.contractNo !== '——' ? 1 : ''}&id=${row.personalLoanId}`)
toDetail (row, type) {
if (type === 2) {
this.curRow = row
this.extensionVisible = true
} else {
this.$router.push(`/counter/list/manage/personalLoans-detail?show=${type === 2 ? 2 : row.contractNo !== '——' ? 1 : ''}&id=${row.personalLoanId}`)
}
},
//
async extensionSubmit () {
if (!this.extensionPeriod) return this.$message.error('请选择展期期限!')
const { data } = await operationExtension({
id: this.curRow.contractId,
extensionPeriod: this.extensionPeriod,
})
this.$message[data.status === 200 ? 'success' : 'error'](data.message)
if (data.status === 200) {
//
const preId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',766,767'
await addOperation({
parentId: preId,
lcJudgmentRuleReq: [{ answerId: 866, emptyOne: 152, emptyTwo: this.extensions.find(e => e.id === this.extensionPeriod).pointId, operationIds: preId + ',866', type: 1 }],
projectId: +sessionStorage.getItem('projectId'),
startTime: sessionStorage.getItem('startTime')
})
this.extensionVisible = false
this.getData()
}
},
//
async repayment (row) {
@ -297,6 +399,7 @@ export default {
</script>
<style lang="scss" scoped>
@import '@/styles/dialog.scss';
@import '@/assets/css/tablebg.scss';
.inner {

@ -137,7 +137,8 @@
<script>
import { Loading } from "element-ui";
import util from '@/libs/util'
import Util from '@/libs/util'
import Axios from 'axios'
import breadcrumb from '@/components/breadcrumb'
import quill from "@/components/quill";
import { reportDetail, exportBankExperimentReport, updateReport } from "@/api/http.js";
@ -145,6 +146,9 @@ export default {
data () {
return {
reportId: this.$route.query.reportId,
headers: {
token: sessionStorage.getItem('token')
},
title: "实验报告",
loading: false,
form: {},
@ -214,7 +218,7 @@ export default {
})
this.expData = list
},
exportPage () {
async exportPage () {
const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => {
@ -233,17 +237,21 @@ export default {
this.loadIns = Loading.service({
background: "#fff"
});
exportBankExperimentReport({
...form,
experimentalData: list
}).then(res => {
this.loadIns.close();
this.loading = false;
util.downloadFileDirect(`实验报告.docx`, new Blob([res.data]))
}).catch(res => {
try {
const res = await Axios.post(`${location.origin}/occupationlab/occupationlab/achievement/exportBankExperimentReport`, {
...form,
experimentalData: list
}, {
headers: this.headers,
responseType: 'blob'
})
const name = res.headers['content-disposition']
Util.downloadFileDirect(name ? decodeURI(name) : `实验报告.docx`, new Blob([res.data]))
} finally {
this.loadIns.close();
this.loading = false;
})
}
},
editReport () { //
if (this.editing) {

Loading…
Cancel
Save