Commit bac454a6 authored by dcy's avatar dcy

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

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