diff --git a/src/pages/manage/list/business/transfer.vue b/src/pages/manage/list/business/transfer.vue index 7f44963..ca129b2 100644 --- a/src/pages/manage/list/business/transfer.vue +++ b/src/pages/manage/list/business/transfer.vue @@ -158,13 +158,9 @@ export default { second:[// 二级卡数组 ], - options:[], visible:false, options:[], activeIndex:'1', - second:[// 二级卡数组 - - ], myTable: { 257: { prop: 'transoutNum', diff --git a/src/pages/manage/list/business/withdrawal.vue b/src/pages/manage/list/business/withdrawal.vue index a298798..9b9e8c6 100644 --- a/src/pages/manage/list/business/withdrawal.vue +++ b/src/pages/manage/list/business/withdrawal.vue @@ -142,11 +142,7 @@ export default { ], options:[], visible:false, - options:[], activeIndex:'1', - second:[// 二级卡数组 - - ], myTable: { 247: { prop: 'username', @@ -207,13 +203,65 @@ export default { 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.visible = true; const parentId = '0,5,27,226' autoPlay(parentId, this.form, this.myTable2, this.myTable, projectId, startTime) + autoPlay(parentId, this.form, this.myTable2, this.myTable) + // 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, diff --git a/src/utils/utilFunction.js b/src/utils/utilFunction.js index 0689bd3..51ec915 100644 --- a/src/utils/utilFunction.js +++ b/src/utils/utilFunction.js @@ -116,7 +116,9 @@ const myValidate = (callback, refs) => { } } -const autoPlay = (parentId, form, myTable2, myTable, projectId, startTime) => { +const autoPlay = (parentId, form, myTable2, myTable) => { + let projectId = sessionStorage.getItem('projectId') + let startTime = sessionStorage.getItem('startTime') let formList = []; // const parentId = '0,5,27,226' // 因为没说emptyOne是多少 @@ -124,14 +126,14 @@ const autoPlay = (parentId, form, myTable2, myTable, projectId, startTime) => { 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 }) + formList.push({ "answerId": key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": form[prop], "operationIds": parentId + ',' + key, "type":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 }) + formList.push({ "answerId": key + '', "emptyOne": '' + tmpIndex++, "emptyTwo": form[prop], "operationIds": parentId + ',' + key, "type":type }) } let params= { parentId,