Commit bb46ca10 authored by dragondean@qq.com's avatar dragondean@qq.com

费用申请优化

parent de5e35b1
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot:default = 'scope'> <template v-slot:default = 'scope'>
<!--<el-button type="text" v-if="scope.row.status !== 0&&scope.row.status !== 1">{{STATUS[scope.row.status]}}</el-button> <el-button type="text" v-if="scope.row.status !== 0&&scope.row.status !== 1">{{STATUS[scope.row.status]}}</el-button>
<el-button type="text" v-if="scope.row.status == 1" @click="examineFn">{{$t('审核中')}}</el-button> <!--el-button type="text" v-if="scope.row.status == 1" @click="examineFn">{{$t('审核中')}}</el-button>
<el-button type="text" v-if="scope.row.status === 2" @click="modify(scope.row)">{{$t('修改')}}</el-button>--> <el-button type="text" v-if="scope.row.status === 2" @click="modify(scope.row)">{{$t('修改')}}</el-button>-->
<el-button type="text" :disabled="!!scope.row.status" @click="del(scope.$index)">删除</el-button> <el-button type="text" v-if="scope.row.status === 0" @click="del(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<work-flow xmlkey="free_apply" v-model="selectedUsers" /> <work-flow xmlkey="free_apply" v-model="selectedUsers" />
</div> </div>
<div style="text-align: center;margin-top: 20px;"> <div style="text-align: center;margin-top: 20px;">
<el-button type="primary" v-if="!processInstanceId" style="margin-right: 30px;" @click="submit">{{$t('提交')}}</el-button> <el-button type="primary" v-if="!processInstanceId" style="margin-right: 30px;" :disabled="!feeList.length" @click="submit">{{$t('提交')}}</el-button>
<el-button type="primary" v-if="processInstanceId" style="margin-right: 30px;" @click="goProcessDetail">{{$t('审核中')}}</el-button> <el-button type="primary" v-if="processInstanceId" style="margin-right: 30px;" @click="goProcessDetail">{{$t('审核中')}}</el-button>
<el-button type="primary" v-if="processInstanceId" style="margin-right: 30px;" @click="cancel">{{$t('取消审核')}}</el-button> <el-button type="primary" v-if="processInstanceId" style="margin-right: 30px;" @click="cancel">{{$t('取消审核')}}</el-button>
<el-button @click="$emit('update:dialogVisible',false)">{{$t('返回')}}</el-button> <el-button @click="$emit('update:dialogVisible',false)">{{$t('返回')}}</el-button>
...@@ -117,6 +117,11 @@ export default { ...@@ -117,6 +117,11 @@ export default {
selectedUsers:[] selectedUsers:[]
} }
}, },
computed:{
feeList(){
return this.list.filter(item => item.status === 0)
}
},
created() { created() {
this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach( e =>{ this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach( e =>{
this.STATUS[e.value] = e.label this.STATUS[e.value] = e.label
...@@ -160,8 +165,15 @@ export default { ...@@ -160,8 +165,15 @@ export default {
}) })
}, },
submit(){ submit(){
// 判断费用申请是否有未填项
const errList = this.feeList.filter(item => {
return !item['feeType'] || !item['applicationFee'] || !item['applicationFeeCurrency'] || !item['payType']
})
if(errList.length){
return this.$message.error('请填写完整费用申请信息')
}
feeApplicationCreateBatch( { feeApplicationCreateBatch( {
orderFeeApplicationCreateReqVOList: this.list.filter(item => !item.status), orderFeeApplicationCreateReqVOList: this.feeList,
copyUserId:this.selectedUsers, copyUserId:this.selectedUsers,
orderId: this.orderId orderId: this.orderId
}).then(r=>{ }).then(r=>{
......
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