|
@@ -87,6 +87,11 @@
|
|
{{ scope.row.T_money }}
|
|
{{ scope.row.T_money }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column label="审批金额" width="100">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-input v-model="scope.row.T_approval_money" :disabled="data.drawerTiti=='详情'?true:false" placeholder="审批金额" />
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="费用事由" width="150">
|
|
<el-table-column label="费用事由" width="150">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{ scope.row.T_reasons }}
|
|
{{ scope.row.T_reasons }}
|
|
@@ -177,12 +182,13 @@ const data = reactive({
|
|
T_State:null,
|
|
T_State:null,
|
|
T_date:null,
|
|
T_date:null,
|
|
T_money:null,
|
|
T_money:null,
|
|
- T_approval_money:null,
|
|
|
|
|
|
+ T_approval_money:0,
|
|
T_reimburse_details:[{
|
|
T_reimburse_details:[{
|
|
Id:null,
|
|
Id:null,
|
|
T_State:null,
|
|
T_State:null,
|
|
T_fee_details:null,
|
|
T_fee_details:null,
|
|
T_fee_details_name:null,
|
|
T_fee_details_name:null,
|
|
|
|
+ T_approval_money:null,
|
|
T_fee_type:null,
|
|
T_fee_type:null,
|
|
T_fee_type_name:null,
|
|
T_fee_type_name:null,
|
|
T_img:null,
|
|
T_img:null,
|
|
@@ -215,6 +221,11 @@ watch(() => props.fromDatas,cur => {
|
|
Reimburse_GetApi()
|
|
Reimburse_GetApi()
|
|
},{deep:true})
|
|
},{deep:true})
|
|
|
|
|
|
|
|
+watch(() => data.formData.T_reimburse_details,cur => {
|
|
|
|
+ data.formData.T_approval_money = cur.reduce((sum, e) => sum + Number(e.T_approval_money || 0), 0)
|
|
|
|
+},{deep:true})
|
|
|
|
+
|
|
|
|
+
|
|
const Reimburse_GetApi = async ()=>{
|
|
const Reimburse_GetApi = async ()=>{
|
|
const res:any = await Reimburse_List({
|
|
const res:any = await Reimburse_List({
|
|
T_uuid:props.fromDatas.T_uuid,
|
|
T_uuid:props.fromDatas.T_uuid,
|
|
@@ -236,12 +247,22 @@ const changeState = async (id: number, row: any) => {
|
|
//函数
|
|
//函数
|
|
const subFun = async ()=>{
|
|
const subFun = async ()=>{
|
|
const arr = [...data.formData.T_remit_detail]
|
|
const arr = [...data.formData.T_remit_detail]
|
|
|
|
+ const arrObj = [...data.formData.T_reimburse_details]
|
|
|
|
+
|
|
|
|
+
|
|
const arrMap:any = []
|
|
const arrMap:any = []
|
|
arr.forEach((item:any)=>{
|
|
arr.forEach((item:any)=>{
|
|
arrMap.push(item.T_time + ',' + item.T_money)
|
|
arrMap.push(item.T_time + ',' + item.T_money)
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ const arrObjMap:any = []
|
|
|
|
+ arrObj.forEach((item:any)=>{
|
|
|
|
+ arrObjMap.push(item.Id + ',' + item.T_approval_money)
|
|
|
|
+ })
|
|
|
|
+
|
|
const resIt:any = await Reimburse_Edit({
|
|
const resIt:any = await Reimburse_Edit({
|
|
T_id:data.Id,
|
|
T_id:data.Id,
|
|
|
|
+ T_approval_details:arrObjMap.length==0?'':arrObjMap.join('|')+'|',
|
|
T_approval_money:data.formData.T_approval_money,
|
|
T_approval_money:data.formData.T_approval_money,
|
|
T_remit_detials:arrMap.length==0?'':arrMap.join('|')+'|'
|
|
T_remit_detials:arrMap.length==0?'':arrMap.join('|')+'|'
|
|
})
|
|
})
|