|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
- <div class="cost-all">
|
|
|
+ <div class="cost-all" v-loading="costloading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
|
|
|
+ element-loading-background="rgba(0, 0, 0, 0.8)">
|
|
|
<div class="cost-box">
|
|
|
<div class="cost-haed">
|
|
|
<div class="ser-btn">
|
|
@@ -29,8 +30,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="cost-input">
|
|
|
- <el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
- <el-form-item label="税率:">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" ref="inputs" :rules="rules">
|
|
|
+ <el-form-item label="税率:" prop="tax">
|
|
|
<el-input v-model="AGroupCostParameter.tax" placeholder="税率"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="货币:">
|
|
@@ -40,7 +41,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="汇率:">
|
|
|
+ <el-form-item label="汇率:" prop="rate">
|
|
|
<el-input v-model="AGroupCostParameter.rate" placeholder="汇率"></el-input>
|
|
|
</el-form-item>
|
|
|
<div v-if="costTypevalue == 'A'">
|
|
@@ -213,7 +214,7 @@
|
|
|
:label="item.label"></el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
<el-table :summary-method="getSummaries" show-summary :data="tableData" :border="true" size="small"
|
|
|
- row-class-name="row" cell-class-name="column" :highlight-current-row="true" fit>
|
|
|
+ row-class-name="row" cell-class-name="column" :highlight-current-row="true" fit :height="centerheight">
|
|
|
<template v-for="(item, index) in tableLabel">
|
|
|
<el-table-column :key="index" :prop="item.prop" :width="item.width" :label="item.label"
|
|
|
v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
|
|
@@ -508,6 +509,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ costloading: true,
|
|
|
outerVisible: false,
|
|
|
innerVisible: false,
|
|
|
//checkList: ['DAY', 'ITIN', 'VA', 'VF', 'VRD', 'T/G S', 'DATE'], //列表默认选中
|
|
@@ -1980,9 +1982,20 @@ export default {
|
|
|
sumTopPrice: [],
|
|
|
DJLables: ['VF', 'T/G S', 'T/G OF', 'T/G M', 'T/G A', 'T/G TF', 'T/G EF', 'C/F M', 'C/F OF', 'B', 'L', 'D', 'EF', 'B/R/F', 'TE', 'T/G T', 'DRV T', 'T/L F'],
|
|
|
GwLables: ['T/V', 'E/C T', 'I/F', '1/L'],
|
|
|
- OtherCostProperty: ['visaCB', 'hscb', 'cpcb', 'bxcb', 'hscb', 'djcb', 'gwcb', 'lyjcb'],
|
|
|
- OtherCostPropertyBJ: ['visa', 'hs', 'cp', 'bx', 'hs', 'dj', 'gw', 'lyj'],
|
|
|
+ OtherCostProperty: ['visaCB', 'hcpcb', 'cpcb', 'bxcb', 'hscb', 'djcb', 'gwcb', 'lyjcb'],
|
|
|
+ OtherCostPropertyBJ: ['visa', 'hcp', 'cp', 'bx', 'hs', 'dj', 'gw', 'lyj'],
|
|
|
peopleNumber: 1,
|
|
|
+ centerheight: 700,
|
|
|
+ defaultheight: 50,
|
|
|
+ rules: {
|
|
|
+
|
|
|
+ rate: [
|
|
|
+ { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ currency: [
|
|
|
+ { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -1992,6 +2005,19 @@ export default {
|
|
|
// // console.log(item2)
|
|
|
// // item1为新值,item2为旧值
|
|
|
// },
|
|
|
+ 'tableData.length': {
|
|
|
+ handler(newValue, oldValue) {
|
|
|
+ if (newValue !== oldValue) {
|
|
|
+ if (this.tableData.length > 3) {
|
|
|
+ this.centerheight = 700;
|
|
|
+ } else {
|
|
|
+ this.centerheight = this.defaultheight + (this.tableData.length * 220);
|
|
|
+ }
|
|
|
+ console.log('高度' + this.centerheight);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
getSummaries(param) {
|
|
@@ -2037,7 +2063,7 @@ export default {
|
|
|
prices[index] = "总计:";
|
|
|
return;
|
|
|
}
|
|
|
- if (column.label == 'DATE' || column.label == 'ITIN' || column.label == 'VT' || column.label == 'VN' || column.label == 'ACCO N' || column.label == 'VA' || column.label == 'VRD') {
|
|
|
+ if (column.label == 'DATE' || column.label == 'ITIN' || column.label == 'VT' || column.label == 'VN' || column.label == 'ACCO N' || column.label == 'VA' || column.label == 'VRD' || column.label == 'T/G N' || column.label == 'T/G WH' || column.label == '操作') {
|
|
|
prices[index] = "——";
|
|
|
return;
|
|
|
}
|
|
@@ -2053,10 +2079,10 @@ export default {
|
|
|
|
|
|
}, 0);
|
|
|
|
|
|
- if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR' || column.label == 'B' || column.label == 'L' || column.label == 'D' || column.label == 'EF' || column.label == 'TE' || column.label == 'T/G T' || column.label == 'P/C') {
|
|
|
- prices[index] = '共' + sums[index] * that.peopleNumber + ' 人均' + sums[index] + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
+ if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR' || column.label == 'B' || column.label == 'L' || column.label == 'D' || column.label == 'EF' || column.label == 'TE' || column.label == 'T/G T' || column.label == 'P/C' || column.label == ' DRV T') {
|
|
|
+ prices[index] = '共' + (sums[index] * that.peopleNumber).toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index]).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
} else {
|
|
|
- prices[index] = '共' + sums[index] + ' 人均' + (sums[index] / that.peopleNumber).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
+ prices[index] = '共' + sums[index].toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index] / that.peopleNumber).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
sums[index] = parseFloat((sums[index] / that.peopleNumber).toFixed(2));
|
|
|
}
|
|
|
|
|
@@ -2077,10 +2103,10 @@ export default {
|
|
|
}
|
|
|
}, 0);
|
|
|
|
|
|
- if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR' || column.label == 'B' || column.label == 'L' || column.label == 'D' || column.label == 'EF' || column.label == 'TE' || column.label == 'T/G T' || column.label == 'P/C') {
|
|
|
- prices[index] = 'A段费用' + prices[index] + '\r\n B段费用 共' + sums1[index] * that.BGroupCostParameter.costTypenumber + ' 人均' + sums1[index] + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
+ if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR' || column.label == 'B' || column.label == 'L' || column.label == 'D' || column.label == 'EF' || column.label == 'TE' || column.label == 'T/G T' || column.label == 'P/C' || column.label == ' DRV T') {
|
|
|
+ prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + (sums1[index] * that.BGroupCostParameter.costTypenumber).toFixed(2) + " " + this.AGroupCostParameter.currency + '\r\n人均' + sums1[index] + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
} else {
|
|
|
- prices[index] = 'A段费用' + prices[index] + '\r\n B段费用 共' + sums1[index] + ' 人均' + (sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
+ prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + sums1[index].toFixed(2) + " " + this.AGroupCostParameter.currency + '\r\n人均' + (sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
sums1[index] = ((sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2));
|
|
|
}
|
|
|
|
|
@@ -2225,6 +2251,7 @@ export default {
|
|
|
)
|
|
|
},
|
|
|
loadData(id) {
|
|
|
+ this.costloading = true;
|
|
|
this.tableData = [];
|
|
|
var that = this;
|
|
|
this.$axios.post('/api/Groups/GroupCostInit', {
|
|
@@ -2631,7 +2658,9 @@ export default {
|
|
|
}]
|
|
|
}
|
|
|
}
|
|
|
+ that.costloading = false;
|
|
|
}).catch(err => {
|
|
|
+ that.costloading = false;
|
|
|
this.$message({
|
|
|
message: '网络异常!',
|
|
|
type: 'error'
|
|
@@ -3477,5 +3506,10 @@ export default {
|
|
|
.hiddenElement {
|
|
|
visibility: hidden;
|
|
|
|
|
|
+}
|
|
|
+
|
|
|
+.cost-all .el-table__footer-wrapper .cell {
|
|
|
+ white-space: pre;
|
|
|
+
|
|
|
}
|
|
|
</style>
|