md
This commit is contained in:
parent
bff0a789de
commit
c3377b0373
@ -202,7 +202,7 @@
|
||||
|
||||
</XdTable>
|
||||
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="70%" :close-on-click-modal="false" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="90%" :close-on-click-modal="false" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||
<EmisTmsCostFeeForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisTmsCostFeeForm>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
@ -48,10 +48,10 @@
|
||||
'padding': '0px!important',
|
||||
'padding-left': '0px!important',
|
||||
'padding-right': '0px!important',
|
||||
'font-size':'11px'
|
||||
'font-size':'12px'
|
||||
}"
|
||||
:header-cell-style="{
|
||||
'font-size':'11px'
|
||||
'font-size':'12px'
|
||||
}"
|
||||
|
||||
border
|
||||
@ -60,10 +60,12 @@
|
||||
size="mini"
|
||||
max-height="300px"
|
||||
style="width: 100%"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
>
|
||||
<el-table-column prop="feeName" :label="$t('费用类别')" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span style="font-weight:600;color:red"><dict-tag :options="dict.type.emis_cost_fee_type" :value="scope.row.feeType"/></span>
|
||||
<span style="font-weight:600;color:black"><dict-tag :options="dict.type.emis_cost_fee_type" :value="scope.row.feeType"/></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" :label="$t('单价')" align="center" min-width="80">
|
||||
@ -206,7 +208,7 @@
|
||||
<span style="color: red">运单列表</span>
|
||||
</span>
|
||||
<div style="display:inline-flex; width: 50%;" >
|
||||
<el-input v-model="form.params.billCodeStr" rows="2" type="textarea" placeholder="请填写单号,多单请使用逗号隔开" />
|
||||
<el-input v-model="form.params.billCodeStr" rows="1" type="textarea" placeholder="请填写单号,多单请使用逗号隔开" />
|
||||
<el-button type="primary" @click="addBillToApply">加入单号</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
@ -627,6 +629,32 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
//指定列求和
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
if (
|
||||
column.property === 'fee'
|
||||
) {
|
||||
const values = data.map(item => Number(item.fee));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留0位小数
|
||||
}
|
||||
});
|
||||
return sums
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
@ -688,8 +716,8 @@ export default {
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
border: none;
|
||||
background: #ffffcd;
|
||||
font-size: 10px;
|
||||
background: #fffff4;
|
||||
font-size: 12px;
|
||||
padding: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
@ -707,8 +735,8 @@ export default {
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
border: none;
|
||||
background: #ffffcd;
|
||||
font-size: 10px;
|
||||
background: #fffff4;
|
||||
font-size: 12px;
|
||||
padding: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user