公司业务

20240205
luoJunYong.123 3 years ago
parent af811c1aef
commit cd068026ed
  1. 78
      src/pages/manage/list/business/deposit.vue
  2. 112
      src/pages/manage/list/business/transfer.vue
  3. 133
      src/pages/manage/list/business/withdrawal.vue
  4. 56
      src/utils/utilFunction.js

@ -74,6 +74,7 @@
import { mapState } from 'vuex'
import { checkHanzi, checkName, ismoney, rateListen, myValidate } from '@/utils/utilFunction.js'
import { vercustomer, verrate } from '@/utils/verify.js'
import { addOperation, getOperation } from '@/api/http';
export default {
name: 'index',
components:{},
@ -119,6 +120,20 @@ export default {
second:[//
],
myTable: {
241: {
prop: 'customerName',
type: '3'
},
240: {
prop: 'username',
type: '3'
},
244: {
prop: 'depositNum',
type: '3'
}
}
}
},
created() {
@ -126,15 +141,70 @@ export default {
},
mounted() {
this.$refs.username.focus()
this.getFormData()
},
methods: {
getFormData(){
let param= {
parentId: '0,5,27,225'
}
getOperation(param).then((data)=>{
// console.log(data)
if(data.status == 200) {
var list = data.data.judgmentRuleReqs
for (var i = 0; i < list.length; i++) {
const { answerId, emptyTwo } = list[i]
if (answerId === '242') {this.form.currency = emptyTwo}
else if (answerId === '243') {this.form.currencyMark = emptyTwo}
else if (answerId === '245') {this.form.interestRate = emptyTwo;}
else if (answerId === '246') {this.form.abstract = emptyTwo}
else {
this.form[this.myTable[answerId].prop] = emptyTwo
}
}
}
}).catch((error)=>{
})
},
submitForm() {
let projectId = sessionStorage.getItem('projectId')
let startTime = sessionStorage.getItem('startTime')
this.$refs.form.validate(myValidate(() => {
//
this.$message({
message: '验证成功',
center: true
});
this.visible = true;
let formList = [];
const parentId = '0,5,27,225'
if(this.form.currency){
formList.push({ "answerId":'242', "emptyOne": "19", "emptyTwo": this.form.currency, "operationIds": parentId + ',242', "type": "1" })//
}
if(this.form.currencyMark){
formList.push({ "answerId":'243', "emptyOne": "7", "emptyTwo": this.form.currencyMark, "operationIds": parentId + ',243', "type": "3" })//
}
if(this.form.interestRate){
formList.push( {"answerId":'245',"emptyOne": "5", "emptyTwo": this.form.interestRate, "operationIds": parentId + ",245", "type": "3"})//
}
if(this.form.abstract){
formList.push( {"answerId":'246',"emptyOne": "5", "emptyTwo": this.form.abstract, "operationIds": parentId + ",246", "type": "3"})//
}
let tmpIndex = 100;
for(const key in this.myTable) {
const { prop, type } = this.myTable[key]
formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": this.form[prop], "operationIds": parentId + ',' + key, type })
}
let params= {
parentId,
lcJudgmentRuleReq:formList,
projectId:+projectId,
startTime:startTime,
}
addOperation(params).then((data)=>{
this.$message({
message: '提交成功',
type: 'success'
});
}).catch((error)=>{
})
}, this.$refs));
},
ismoney: ismoney,

@ -165,6 +165,56 @@ export default {
second:[//
],
myTable: {
// transoutNum: '', //
// certificateNum: '', //
// customerName: '', //
// transinNum: '', //
// transinName: '', //
// money: '', //
247: {
prop: 'username',
type: '3'
},
248: {
prop: 'customerName',
type: '3'
},
249: {
prop: 'voucherNum',
type: '3'
},
254: {
prop: 'money',
type: '3'
}
},
myTable2: {
250: {
prop: 'issueDate',
type: '3'
},
251: {
prop: 'currency',
type: '3'
},
252: {
prop: 'currencyMark',
type: '3'
},
255: {
prop: 'payWay',
type: '3'
},
253: {
prop: 'certificateType',
type: '3'
},
256: {
prop: 'abstract',
type: '3'
}
}
}
},
created() {
@ -174,13 +224,67 @@ export default {
this.$refs.transoutNum.focus()
},
methods: {
getFormData(){
let param= {
parentId: '0,5,27,226'
}
getOperation(param).then((data)=>{
// console.log(data)
if(data.status == 200) {
var list = data.data.judgmentRuleReqs
for (var i = 0; i < list.length; i++) {
const { answerId, emptyTwo } = list[i]
if (answerId === '242') {this.form.currency = emptyTwo}
else if (answerId === '243') {this.form.currencyMark = emptyTwo}
else if (answerId === '245') {this.form.interestRate = emptyTwo;}
else if (answerId === '246') {this.form.abstract = emptyTwo}
else {
this.form[this.myTable[answerId].prop] = emptyTwo
}
}
}
}).catch((error)=>{
})
},
submitForm() {
let projectId = sessionStorage.getItem('projectId')
let startTime = sessionStorage.getItem('startTime')
this.$refs.form.validate(myValidate(() => {
//
this.$message({
message: '验证成功',
center: true
});
this.visible = true;
let formList = [];
const parentId = '0,5,27,225'
if(this.form.currency){
formList.push({ "answerId":'242', "emptyOne": "19", "emptyTwo": this.form.currency, "operationIds": parentId + ',242', "type": "1" })//
}
if(this.form.currencyMark){
formList.push({ "answerId":'243', "emptyOne": "7", "emptyTwo": this.form.currencyMark, "operationIds": parentId + ',243', "type": "3" })//
}
if(this.form.interestRate){
formList.push( {"answerId":'245',"emptyOne": "5", "emptyTwo": this.form.interestRate, "operationIds": parentId + ",245", "type": "3"})//
}
if(this.form.abstract){
formList.push( {"answerId":'246',"emptyOne": "5", "emptyTwo": this.form.abstract, "operationIds": parentId + ",246", "type": "3"})//
}
let tmpIndex = 100;
for(const key in this.myTable) {
const { prop, type } = this.myTable[key]
formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": this.form[prop], "operationIds": parentId + ',' + key, type })
}
let params= {
parentId,
lcJudgmentRuleReq:formList,
projectId:+projectId,
startTime:startTime,
}
addOperation(params).then((data)=>{
this.$message({
message: '提交成功',
type: 'success'
});
}).catch((error)=>{
})
}, this.$refs));
},
ismoney: ismoney,

@ -90,8 +90,9 @@
<script>
import { mapState } from 'vuex'
import { myValidate, ismoney, checkName, checkHanzi } from '@/utils/utilFunction.js'
import { myValidate, ismoney, checkName, checkHanzi, autoPlay, autoPlay2 } from '@/utils/utilFunction.js'
import { vercustomer, verrate } from '@/utils/verify.js'
import { addOperation, getOperation } from '@/api/http';
export default {
name: 'index',
components:{},
@ -146,6 +147,51 @@ export default {
second:[//
],
myTable: {
247: {
prop: 'username',
type: '3'
},
248: {
prop: 'customerName',
type: '3'
},
249: {
prop: 'voucherNum',
type: '3'
},
254: {
prop: 'money',
type: '3'
}
},
myTable2: {
250: {
prop: 'issueDate',
type: '3'
},
251: {
prop: 'currency',
type: '3'
},
252: {
prop: 'currencyMark',
type: '3'
},
255: {
prop: 'payWay',
type: '3'
},
253: {
prop: 'certificateType',
type: '3'
},
256: {
prop: 'abstract',
type: '3'
}
}
}
},
created() {
@ -153,17 +199,92 @@ export default {
},
mounted() {
this.$refs.username.focus()
this.getFormData()
},
methods: {
getFormData(){
// let param= {
// parentId: '0,5,27,226'
// }
// getOperation(param).then((data)=>{
// // console.log(data)
// if(data.status == 200) {
// var list = data.data.judgmentRuleReqs
// const tmpObj = Object.assign(this.myTable, this.myTable2)
// for (var i = 0; i < list.length; i++) {
// const { answerId, emptyTwo } = list[i]
// this.form[tmpObj[answerId].prop] = emptyTwo
// }
// }
// }).catch((error)=>{
// })
const parentId = '0,5,27,226'
autoPlay2(parentId, this.form, this.myTable2, this.myTable)
},
submitForm() {
let projectId = sessionStorage.getItem('projectId')
let startTime = sessionStorage.getItem('startTime')
this.$refs.form.validate(myValidate(() => {
//
this.$message({
message: '验证成功',
center: true
});
}, this.$refs));
this.visible = true;
const formList = []
const parentId = '0,5,27,226'
autoPlay(parentId, this.form, this.myTable2, this.myTable, projectId, startTime)
// let tmpIndex = 100;
// for(const key in this.myTable2) {
// const { prop, type } = this.myTable2[key]
// if(this.form[prop]){
// formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": this.form[prop], "operationIds": parentId + ',' + key, type })
// }
// }
// for(const key in this.myTable) {
// const { prop, type } = this.myTable[key]
// formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": this.form[prop], "operationIds": parentId + ',' + key, type })
// }
// let params= {
// parentId,
// lcJudgmentRuleReq:formList,
// projectId:+projectId,
// startTime:startTime,
// }
// addOperation(params).then((data)=>{
// this.$message({
// message: '',
// type: 'success'
// });
// }).catch((error)=>{
// })
// emptyOne
// let tmpIndex = 100;
// for(const key in this.myTable2) {
// const { prop, type } = this.myTable[key]
// if(this.form[prop]){
// formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": this.form[prop], "operationIds": parentId + ',' + key, type })
// }
// }
// for(const key in this.myTable) {
// const { prop, type } = this.myTable[key]
// formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": this.form[prop], "operationIds": parentId + ',' + key, type })
// }
// let params= {
// parentId,
// lcJudgmentRuleReq:formList,
// projectId:+projectId,
// startTime:startTime,
// }
// addOperation(params).then((data)=>{
// this.$message({
// message: '',
// type: 'success'
// });
// }).catch((error)=>{
// })
}, this.$refs));
},
ismoney: ismoney,
checkName: checkName,

@ -1,4 +1,5 @@
import { MessageBox, Message } from 'element-ui';
import { addOperation, getOperation } from '@/api/http';
const phoneListen = function(val, form, prop) {
if(/^[0-9]*$/.test(val)) {
@ -110,6 +111,57 @@ const myValidate = (callback, refs) => {
}
}
const autoPlay = (parentId, form, myTable2, myTable, projectId, startTime) => {
let formList = [];
// const parentId = '0,5,27,226'
// 因为没说emptyOne是多少
let tmpIndex = 100;
for(const key in myTable2) {
const { prop, type } = myTable2[key]
if(form[prop]){
formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": form[prop], "operationIds": parentId + ',' + key, type })
}
}
for(const key in myTable) {
console.log(myTable[key])
const { prop, type } = myTable[key]
formList.push({ answerId: key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": form[prop], "operationIds": parentId + ',' + key, type })
}
let params= {
parentId,
lcJudgmentRuleReq:formList,
projectId:+projectId,
startTime:startTime,
}
addOperation(params).then((data)=>{
Message.success({
center: true,
message: '提交成功'
})
}).catch((error)=>{
})
}
const autoPlay2 = (parentId, form, myTable2, myTable) => {
let param= {
// parentId: '0,5,27,226'
parentId
}
getOperation(param).then((data)=>{
// console.log(data)
if(data.status == 200) {
var list = data.data.judgmentRuleReqs
const tmpObj = Object.assign(myTable, myTable2)
for (var i = 0; i < list.length; i++) {
const { answerId, emptyTwo } = list[i]
form[tmpObj[answerId].prop] = emptyTwo
}
}
}).catch((error)=>{
})
}
export {
phoneListen,
mailBoxListen,
@ -119,5 +171,7 @@ const myValidate = (callback, refs) => {
checkHanzi,
myValidate,
checkName,
rateListen
rateListen,
autoPlay,
autoPlay2
}
Loading…
Cancel
Save