银行判分修改

master
yujialong 2 years ago
parent 79c3abb6ae
commit 0580a92061
  1. 1
      README.md
  2. 105
      src/views/Transaction.vue

@ -0,0 +1 @@
# 判分点前端

@ -335,6 +335,43 @@
</div>
</div>
</template>
<template v-if="scope.row.type == 6">
<div class="box money-box">
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check1" :disabled="isView || scope.row.isDisabled">100元</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val1" :disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check2" :disabled="isView || scope.row.isDisabled">50元</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val2" :disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check3" :disabled="isView || scope.row.isDisabled">20元</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val3" :disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check4" :disabled="isView || scope.row.isDisabled">10元</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val4" :disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check5" :disabled="isView || scope.row.isDisabled">5元</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val5" :disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check6" :disabled="isView || scope.row.isDisabled">1元</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val6" :disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check7" :disabled="isView || scope.row.isDisabled">5角</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val7" :disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check8" :disabled="isView || scope.row.isDisabled">1角</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val8" :disabled="isView || scope.row.isDisabled" />
</div>
</div>
</template>
</div>
</template>
</el-table-column>
@ -413,6 +450,7 @@ export default {
SelectedObj:[],
counts:0,
loading:true,
moneys: [100, 50, 20, 10, 5, 1, 0.5, 0.1]
};
},
computed: {
@ -537,6 +575,7 @@ export default {
this.configVisible = false
},
anewPosttingDatas(judgmentRuleList){
console.log("🚀 ~ file: Transaction.vue ~ line 577 ~ anewPosttingDatas ~ judgmentRuleList", judgmentRuleList)
let length = judgmentRuleList.length;
let tempArr = [];
if(this.tableData.length > 0){
@ -554,6 +593,10 @@ export default {
obj.operationIds = item.operationIds
if(item.type == undefined || item.type == ''){
obj.type = null
for (let i = 1; i < 9; i++) {
obj['check' + i] = false
obj['val' + i] = ''
}
}else{
obj.type = item.type
}
@ -590,6 +633,7 @@ export default {
}
}
});
console.log(444, tempArr)
for(var i=0;i<tempArr.length;i++){
this.tableData.push(tempArr[i]);
}
@ -634,6 +678,21 @@ export default {
obj.value3 = item.emptyTwo.substring(1, item.emptyTwo.indexOf("~"));
obj.value4 = item.emptyTwo.substring(item.emptyTwo.indexOf("~") + 1, item.emptyTwo.length - 1);
obj.value5 = item.emptyTwo[item.emptyTwo.length - 1];
} else if (item.type == 6) {
obj.subjectId = Number(item.emptyOne);
const money = item.emptyTwo.split(',') //
const { moneys } = this
for (let i = 1; i < 9; i++) {
obj['check' + i] = false
obj['val' + i] = ''
}
money.map(e => {
const val = e.split('-')
const i = moneys.findIndex(n => n == val[0])
console.log(33, i)
obj['check' + (i + 1)] = true
obj['val' + (i + 1)] = val[1]
})
}
tempArr.push(obj);
if (length > 1 && index !== (length - 1)) {
@ -687,15 +746,15 @@ export default {
}
},
getTreeData() { //
if(this.treeDataStore.length) {
const tmp = deepCopy(this.treeDataStore)
this.treeData = this.toTreeId(tmp);
if (this.$route.query.lcId) {
this.lcId = this.$route.query.lcId;
this.getInfoData(this.$route.query.lcId);
}
this.loading = false
}else {
// if(this.treeDataStore.length) {
// const tmp = deepCopy(this.treeDataStore)
// this.treeData = this.toTreeId(tmp);
// if (this.$route.query.lcId) {
// this.lcId = this.$route.query.lcId;
// this.getInfoData(this.$route.query.lcId);
// }
// this.loading = false
// }else {
this.$post(this.api.getProcess).then(({ process, status, message }) => {
if (status == 200) {
if (process.length) {
@ -713,7 +772,7 @@ export default {
}).catch(err => {
this.loading = false
});
}
// }
},
toTreeId(data, parentId) { // id++,便key,id
let result = [];
@ -816,6 +875,14 @@ export default {
// obj.emptyOne = i.value1; //
obj.emptyOne = i.subjectId ? i.subjectId.toString() : "";
obj.emptyTwo = `${i.value2}${i.value3}~${i.value4}${i.value5}`;
} else if (i.type == 6) {
const money = []
const { moneys } = this
for (let n = 1; n < 9; n++) {
if (i['check' + n] && i['val' + n]) money.push(moneys[n - 1] + '-' + i['val' + n])
}
obj.emptyOne = i.subjectId ? i.subjectId.toString() : "";
obj.emptyTwo = money.join()
}
tempArr.push(obj);
}
@ -974,6 +1041,13 @@ export default {
this.$message.warning(`第一个指标必须小于第二个指标`);
return;
}
} else if (row.type == 6) {
for (let i = 1; i < 9; i++) {
if (row['check' + i] && row['val' + i] === '') {
this.$message.warning(`请输入数量`)
return
}
}
}
}
row.isSave = true;
@ -1265,7 +1339,6 @@ export default {
width: auto;
}
}
.action {
flex: 1;
text-align: left;
@ -1329,7 +1402,15 @@ export default {
}
}
}
.money-box {
.line {
margin: 12px 0 !important;
}
/deep/.money-check {
width: 80px;
text-align: left;
}
}
/deep/.el-dialog__wrapper {
:hover {
cursor: pointer;

Loading…
Cancel
Save