Commit bac454a6 authored by dcy's avatar dcy

费用申请界面下,存在两条费用记录,第一行费用记录修改不成功,无论怎么改,提交审核的总是下一行

parent c7c928e4
......@@ -15,48 +15,48 @@
<el-form-item> <el-button @click="addCost">添加申请</el-button></el-form-item>
</el-form>
<el-table :data="list">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="费用类型">
<template v-slot:default = "scope">
<dict-selector :disabled="isModify[forbidden(scope.row)]" :type="DICT_TYPE.FEE_TYPE" v-model="scope.row.feeType" />
</template>
</el-table-column>
<el-table-column label="金额">
<template v-slot:default = 'scope'>
<el-input :disabled="isModify[forbidden(scope.row)]" v-model="scope.row.applicationFee" ></el-input>
</template>
</el-table-column>
<el-table-column label="货币类型">
<template v-slot:default = 'scope'>
<dict-selector :disabled="isModify[forbidden(scope.row)]" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" v-model="scope.row.applicationFeeCurrency" />
</template>
</el-table-column>
<el-table-column label="付款类型">
<template v-slot = {row}>
<dict-selector :disabled="isModify[forbidden(row)]" :type="DICT_TYPE.PAYMENT_TYPE" v-model="row.payType" />
</template>
</el-table-column>
<el-table-column label="备注">
<template v-slot:default="scope">
<el-input :disabled="isModify[forbidden(scope.row)]" v-model="scope.row.remarks" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="确认收款">
<template v-slot:default ="scope">
<dict-tag :type="DICT_TYPE.RECEIVE_FLAG" :value="scope.row.receiveFlag" />
</template>
</el-table-column>
<el-table-column label="申请人">
<template v-slot:default ="scope">
{{scope.row.status === 0 ?'未提交': scope.row.applicationAuthor}}
</template>
</el-table-column>
<el-table-column label="操作">
<template v-slot:default = 'scope'>
<el-button type="text" v-if="scope.row.status !== 0">{{STATUS[scope.row.status]}}</el-button>
<el-button type="text" v-if="scope.row.status === 2" @click="modify(scope.row)">修改</el-button>
</template>
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="费用类型">
<template v-slot:default = "scope">
<dict-selector :disabled="isModify[forbidden(scope.row)]" :type="DICT_TYPE.FEE_TYPE" v-model="scope.row.feeType" />
</template>
</el-table-column>
<el-table-column label="金额">
<template v-slot:default = 'scope'>
<el-input :disabled="isModify[forbidden(scope.row)]" v-model="scope.row.applicationFee" ></el-input>
</template>
</el-table-column>
<el-table-column label="货币类型">
<template v-slot:default = 'scope'>
<dict-selector :disabled="isModify[forbidden(scope.row)]" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" v-model="scope.row.applicationFeeCurrency" />
</template>
</el-table-column>
<el-table-column label="付款类型">
<template v-slot = {row}>
<dict-selector :disabled="isModify[forbidden(row)]" :type="DICT_TYPE.PAYMENT_TYPE" v-model="row.payType" />
</template>
</el-table-column>
<el-table-column label="备注">
<template v-slot:default="scope">
<el-input :disabled="isModify[forbidden(scope.row)]" v-model="scope.row.remarks" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="确认收款">
<template v-slot:default ="scope">
<dict-tag :type="DICT_TYPE.RECEIVE_FLAG" :value="scope.row.receiveFlag" />
</template>
</el-table-column>
<el-table-column label="申请人">
<template v-slot:default ="scope">
{{scope.row.status === 0 ?'未提交': scope.row.applicationAuthor}}
</template>
</el-table-column>
<el-table-column label="操作">
<template v-slot:default = 'scope'>
<el-button type="text" v-if="scope.row.status !== 0">{{STATUS[scope.row.status]}}</el-button>
<el-button type="text" v-if="scope.row.status === 2" @click="modify(scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
<div style="padding: 20px">
<work-flow xmlkey="free_apply" v-model="selectedUsers" />
......@@ -114,7 +114,7 @@ export default {
computed:{
forbidden(){
return (row)=>{
return this.list.findIndex(e => e.id = row.id)
return this.list.findIndex(e => e.id === row.id)
}
},
IsExamine(){
......@@ -173,8 +173,9 @@ export default {
})
},
modify(row){
if(this.list.some(i => i.status === 0 || i.status === 1))return this.$message.warning('当前有未提交的数据或审核中的数据不能修改')
this.isModifyIf = true;
this.$set(this.isModify, this.list.findIndex(e => e.id = row.id), false )
this.$set(this.isModify, this.list.findIndex(e => e.id === row.id), false )
},
examineFn(){
let item = this.list.find(e => e.status === 1);
......@@ -200,6 +201,7 @@ export default {
watch:{
dialogVisible(val){
if(val){
this.isModify = []
this.getOrderList()
getOrder(this.orderId).then(r =>{
if(r.code === 0){
......
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