|
@@ -371,6 +371,31 @@
|
|
|
</el-table>
|
|
|
<div style="text-align: center;padding: 10px 0;"><el-button @click="addStrip" type="primary">添 加 <i
|
|
|
class="el-icon-plus"></i></el-button></div>
|
|
|
+ <div>
|
|
|
+ <el-table :data="[{ a: 1 }]" border style="width: 100%">
|
|
|
+ <el-table-column v-for="item in columnTotalData" :key="item.label"
|
|
|
+ :width="item.width ? item.width : columnWidth"
|
|
|
+ :label="item.tips ? item.tips + '(' + getCurr + ')' : ''"
|
|
|
+ v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
|
|
|
+ {{ item.totalPrice }}
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column class="czbtn" :width="100">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-table :data="[{ a: 1 }]" border style="width: 100%">
|
|
|
+ <el-table-column v-for="item in columnTotalData" :key="item.label"
|
|
|
+ :width="item.width ? item.width : columnWidth"
|
|
|
+ :label="item.singleTips ? item.singleTips + '(' + getCurr + ')' : ''"
|
|
|
+ v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
|
|
|
+ {{ item.singlePrice }}
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column class="czbtn" :width="100">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="sheet-box">
|
|
|
<div class="sheet-li">
|
|
|
<div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
|
|
@@ -2267,7 +2292,274 @@ export default {
|
|
|
],
|
|
|
dialogSelectObject: {
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+ columnTotalData: [
|
|
|
+ {
|
|
|
+ "label": "DAY",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "",
|
|
|
+ width: 85,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "DATE",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "",
|
|
|
+ width: 85,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "ITIN",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "VA",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "",
|
|
|
+ width: 77,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "VT",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "VF",
|
|
|
+ "tips": "车费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "车费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "VN",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "VRD",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/G S",
|
|
|
+ "tips": "导游工资",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "导游工资人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/G N",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/G WH",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/G OF",
|
|
|
+ "tips": "导游超时费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "导游超时费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/G M",
|
|
|
+ "tips": "导游餐补",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "导游餐补人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/G A",
|
|
|
+ "tips": "导游房补",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "导游房补人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/G TF",
|
|
|
+ "tips": "导游交通费",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "导游交通费人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/G EF",
|
|
|
+ "tips": "导游景点费",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "导游景点费人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "C/F M",
|
|
|
+ "tips": "司机餐补",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "司机餐补人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "C/F OF",
|
|
|
+ "tips": "司机超时费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "司机超时费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "B",
|
|
|
+ "tips": "早餐费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "早餐费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "L",
|
|
|
+ "tips": "午餐费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "午餐费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "D",
|
|
|
+ "tips": "晚餐费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "晚餐费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "TBR",
|
|
|
+ "tips": "双人间费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "双人间费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "SGR",
|
|
|
+ "tips": "单间费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "单间费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "JS/ES",
|
|
|
+ "tips": "小套房/豪华套房费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "小套房/豪华套房费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "SUITE",
|
|
|
+ "tips": "套房费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "套房费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "ACCO N",
|
|
|
+ "tips": "",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/V",
|
|
|
+ "tips": "公务活动费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "公务活动费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "1/L",
|
|
|
+ "tips": "公务活动费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "公务活动费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "I/F",
|
|
|
+ "tips": "公务翻译费用",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "公务翻译费用人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "EF",
|
|
|
+ "tips": "景点门票",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "景点门票人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "B/R/F",
|
|
|
+ "tips": "饮料零食水果",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "饮料零食水果人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "TE",
|
|
|
+ "tips": "出行物资",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "出行物资人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/G T",
|
|
|
+ "tips": "导游小费",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "导游小费人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "DRV T",
|
|
|
+ "tips": "司机小费",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "司机小费人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "P/C",
|
|
|
+ "tips": "零用金",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "零用金人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "T/L F",
|
|
|
+ "tips": "领队费",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "领队费人均"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "E/C T",
|
|
|
+ "tips": "会务费",
|
|
|
+ "totalPrice": 0,
|
|
|
+ "singlePrice": 0,
|
|
|
+ "singleTips": "会务费人均"
|
|
|
+ }
|
|
|
+ ]
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -2279,7 +2571,7 @@ export default {
|
|
|
} else {
|
|
|
this.centerheight = this.defaultheight + (this.tableData.length * 230) - ((this.tableData.length - 1) * 50);
|
|
|
}
|
|
|
- //console.log('高度' + this.centerheight);
|
|
|
+ ////console.log('高度' + this.centerheight);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2288,21 +2580,22 @@ export default {
|
|
|
methods: {
|
|
|
getSummaries(param) {
|
|
|
var that = this;
|
|
|
- ////console.log(param)
|
|
|
+ //console.log(param)
|
|
|
const { columns, data } = param;
|
|
|
const sums = [];
|
|
|
const sums1 = [];
|
|
|
const texts = [];
|
|
|
var prices = [];
|
|
|
+ var BUpdate= []
|
|
|
var thisData = data;
|
|
|
var ATime = { start: that.addOneDay(that.AGroupCostParameter.costTypeStartTime, 0), end: that.addOneDay(that.AGroupCostParameter.costTypeendTime, 0) };
|
|
|
var BTime = { start: that.addOneDay(that.BGroupCostParameter.costTypeStartTime, 0), end: that.addOneDay(that.BGroupCostParameter.costTypeendTime, 0) };
|
|
|
|
|
|
- //console.log('ATime,BTime', ATime, BTime);
|
|
|
+ ////console.log('ATime,BTime', ATime, BTime);
|
|
|
var data1 = [];
|
|
|
var data2 = [];
|
|
|
|
|
|
- //console.log('datas', data);
|
|
|
+ ////console.log('datas', data);
|
|
|
|
|
|
if (that.costTypevalue == 'B') {
|
|
|
for (var i = 0; i < thisData.length; i++) {
|
|
@@ -2310,10 +2603,13 @@ export default {
|
|
|
if (forTime == '' && i != 0) {
|
|
|
forTime = thisData[i - 1].date;
|
|
|
}
|
|
|
- if (forTime >= ATime.start && forTime <= ATime.end) {
|
|
|
+ if (forTime) {
|
|
|
+ forTime = new Date(forTime).getDate();
|
|
|
+ }
|
|
|
+ if (forTime >= new Date(ATime.start).getDate() && forTime <= new Date(ATime.end).getDate()) {
|
|
|
data1.push(thisData[i])
|
|
|
}
|
|
|
- if (forTime >= BTime.start && forTime <= BTime.end) {
|
|
|
+ if (forTime >= new Date(BTime.start).getDate() && forTime <= new Date(BTime.end).getDate()) {
|
|
|
data2.push(thisData[i])
|
|
|
}
|
|
|
}
|
|
@@ -2328,10 +2624,12 @@ export default {
|
|
|
columns.forEach((column, index) => {
|
|
|
if (index === 0) {
|
|
|
prices[index] = "总计:";
|
|
|
+ that.lableSetPrice(column.label, '', '');
|
|
|
return;
|
|
|
}
|
|
|
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] = "——";
|
|
|
+ that.lableSetPrice(column.label, '', '');
|
|
|
return;
|
|
|
}
|
|
|
const values = thisData.map(item => Number(item[column.property]));
|
|
@@ -2346,13 +2644,16 @@ export default {
|
|
|
|
|
|
}, 0);
|
|
|
|
|
|
- if (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' || column.label == 'DRV T') {
|
|
|
+ if (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' || column.label == 'DRV T') {
|
|
|
+ that.lableSetPrice(column.label, (sums[index] * that.peopleNumber).toFixed(2), (sums[index]).toFixed(2));
|
|
|
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 if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR') {
|
|
|
+ that.lableSetPrice(column.label, (sums[index]).toFixed(2), (sums[index]).toFixed(2));
|
|
|
prices[index] = '共' + (sums[index]).toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index]).toFixed(2) + " " + this.AGroupCostParameter.currency
|
|
|
}
|
|
|
else {
|
|
|
+ that.lableSetPrice(column.label, sums[index].toFixed(2), (sums[index] / that.peopleNumber).toFixed(2));
|
|
|
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));
|
|
|
}
|
|
@@ -2374,13 +2675,16 @@ export default {
|
|
|
}
|
|
|
}, 0);
|
|
|
|
|
|
- if (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' || 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] + ')';
|
|
|
+ if (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' || column.label == 'DRV T') {
|
|
|
+ BUpdate.push({label:column.label, total:(sums1[index] * that.BGroupCostParameter.costTypenumber).toFixed(2),single:(sums1[index]).toFixed(2)});
|
|
|
+ prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + (sums1[index] * that.BGroupCostParameter.costTypenumber).toFixed(2) + " " + this.AGroupCostParameter.currency + '\r\n人均' + (sums1[index]).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
}
|
|
|
else if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR') {
|
|
|
- prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + (sums1[index]).toFixed(2) + " " + this.AGroupCostParameter.currency + '\r\n人均' + sums1[index] + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
+ BUpdate.push({label:column.label, total:(sums1[index]).toFixed(2), single:(sums1[index]).toFixed(2)});
|
|
|
+ prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + (sums1[index]).toFixed(2) + " " + this.AGroupCostParameter.currency + '\r\n人均' + (sums1[index]).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
|
|
|
}
|
|
|
else {
|
|
|
+ BUpdate.push({label:column.label, total:sums1[index].toFixed(2), single:(sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2)});
|
|
|
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));
|
|
|
}
|
|
@@ -2413,17 +2717,24 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.titleText = texts;
|
|
|
- //console.log(that.sumTopPrice, 'sumTopPrice---------------');
|
|
|
+ ////console.log(that.sumTopPrice, 'sumTopPrice---------------');
|
|
|
this.CalculatedPrice();
|
|
|
- ////console.log(that.sumTopPrice, '------------');
|
|
|
+ //////console.log(that.sumTopPrice, '------------');
|
|
|
setTimeout(() => {
|
|
|
this.setLastTitle(prices);
|
|
|
+ if(that.costTypevalue == 'B'){
|
|
|
+ //遍历bupdate
|
|
|
+ BUpdate.forEach(function (item) {
|
|
|
+ that.BlableSetPrice(item.label, item.total, item.single);
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}, 1000);
|
|
|
|
|
|
return prices;
|
|
|
},
|
|
|
handleEdit(index, row, buttonIndex) {
|
|
|
- ////console.log(index, row, buttonIndex);
|
|
|
+ //////console.log(index, row, buttonIndex);
|
|
|
this.rowIndex = index; // 行的索引
|
|
|
var api = '';
|
|
|
switch (buttonIndex) {
|
|
@@ -2464,7 +2775,7 @@ export default {
|
|
|
'Authorization': that.token,
|
|
|
}
|
|
|
}).then(resp => {
|
|
|
- //console.log(resp.data.data, '------------------------------------');
|
|
|
+ ////console.log(resp.data.data, '------------------------------------');
|
|
|
that.outerVisible = true;
|
|
|
if (resp.data.code == 200) {
|
|
|
that.dialogTableData = resp.data.data;
|
|
@@ -2476,7 +2787,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
handleDelete(index, row, rows) {
|
|
|
- //console.log(index, row, rows);
|
|
|
+ ////console.log(index, row, rows);
|
|
|
this.$confirm('此操作将删除该条信息, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
@@ -2563,7 +2874,7 @@ export default {
|
|
|
'Authorization': that.token,
|
|
|
}
|
|
|
}).then(resp => {
|
|
|
- //console.log(resp.data.data, '------------------------------------');
|
|
|
+ ////console.log(resp.data.data, '------------------------------------');
|
|
|
if (resp.data.code == 200) {
|
|
|
|
|
|
that.options = resp.data.data.groupList;
|
|
@@ -2583,7 +2894,7 @@ export default {
|
|
|
for (var i = 0; i < that.CheckBoxListSelect.length; i++) {
|
|
|
if (item.cbType == that.CheckBoxListSelect[i].cbType) {
|
|
|
that.CheckBoxListSelect[i].cbValues = item.cbValues.split(',');
|
|
|
- //console.log(item.cbValues.split(','));
|
|
|
+ ////console.log(item.cbValues.split(','));
|
|
|
break;
|
|
|
}
|
|
|
if (that.CheckBoxListSelect[i].diid == 0) {
|
|
@@ -2986,10 +3297,10 @@ export default {
|
|
|
let item = that.equalWhere[j];
|
|
|
for (var p in item) {
|
|
|
if (baoPi[i].type == p) {
|
|
|
- //console.log("key:" + p + "已经匹配 value:" + item[p]);
|
|
|
+ ////console.log("key:" + p + "已经匹配 value:" + item[p]);
|
|
|
for (var m = 0; m < that.sheetDatal.length; m++) {
|
|
|
if (that.sheetDatal[m].EnLabel == item[p]) {
|
|
|
- //console.log(" 1 key:" + that.sheetDatal[m].EnLabel + "已经匹配 1 value:" + baoPi[i].price);
|
|
|
+ ////console.log(" 1 key:" + that.sheetDatal[m].EnLabel + "已经匹配 1 value:" + baoPi[i].price);
|
|
|
that.sheetDatal[m].childList[0].tips = baoPi[i].price;
|
|
|
}
|
|
|
}
|
|
@@ -3138,7 +3449,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.Dataformat();
|
|
|
- //console.log(Data, "save-------Data");
|
|
|
+ ////console.log(Data, "save-------Data");
|
|
|
|
|
|
var that = this;
|
|
|
this.$axios.post('/api/Groups/SaveGroupCost', Data, {
|
|
@@ -3146,7 +3457,7 @@ export default {
|
|
|
'Authorization': that.token,
|
|
|
}
|
|
|
}).then(resp => {
|
|
|
- //console.log(resp.data.data, '------------------------------------');
|
|
|
+ ////console.log(resp.data.data, '------------------------------------');
|
|
|
if (resp.data.code == 200) {
|
|
|
this.$message({
|
|
|
message: '保存成功!',
|
|
@@ -3394,7 +3705,7 @@ export default {
|
|
|
this.currentPage = val;
|
|
|
},
|
|
|
SelChange(row, oldrow) {
|
|
|
- //console.log(row, oldrow);
|
|
|
+ ////console.log(row, oldrow);
|
|
|
this.dialogSelectObject = row;
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
@@ -3517,8 +3828,8 @@ export default {
|
|
|
SUITEsum = SUITEsum * rate;
|
|
|
BSUITEsum = BSUITEsum * rate;
|
|
|
|
|
|
- // //console.log(Djsum, GWsum, LYJsum, 'Djsum,GWsum,LYJsum');
|
|
|
- // //console.log(SGRsum, TBRsum, JSESsum, SUITEsum, 'SGRsum,TBRsum,JSESsum,SUITEsum');
|
|
|
+ // ////console.log(Djsum, GWsum, LYJsum, 'Djsum,GWsum,LYJsum');
|
|
|
+ // ////console.log(SGRsum, TBRsum, JSESsum, SUITEsum, 'SGRsum,TBRsum,JSESsum,SUITEsum');
|
|
|
|
|
|
var sgrfilter = this.costTypeHotelNumbers.filter(x => {
|
|
|
return x.type == 'Default'
|
|
@@ -3672,7 +3983,7 @@ export default {
|
|
|
let GWCSUITE = (leftSum + Number(this.AGroupCostParameter.suitecb) + Number(this.AGroupCostParameter.gwccb)).toFixed(2);
|
|
|
let GWCSGR = (leftSum + Number(this.AGroupCostParameter.sgrcb) + Number(this.AGroupCostParameter.gwccb)).toFixed(2);
|
|
|
let GWCJSES = (leftSum + Number(this.AGroupCostParameter.jsescb) + Number(this.AGroupCostParameter.gwccb)).toFixed(2);
|
|
|
- ////console.log(JJCSGR, JJCTBR, JJCSUITE, GWCSUITE, GWCSGR, GWCJSES, '666--------------------------');
|
|
|
+ //////console.log(JJCSGR, JJCTBR, JJCSUITE, GWCSUITE, GWCSGR, GWCJSES, '666--------------------------');
|
|
|
|
|
|
var rightSum = 0;
|
|
|
this.OtherCostPropertyBJ.forEach((x) => {
|
|
@@ -3746,7 +4057,7 @@ export default {
|
|
|
// }
|
|
|
|
|
|
|
|
|
- ////console.log(groupCosts, gtroupQuotes, groupProfit, 'groupCosts, gtroupQuotes, groupProfit');
|
|
|
+ //////console.log(groupCosts, gtroupQuotes, groupProfit, 'groupCosts, gtroupQuotes, groupProfit');
|
|
|
|
|
|
},
|
|
|
OtherCost() {
|
|
@@ -3797,7 +4108,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
NumberSetTime(number, index) {
|
|
|
- //console.log(number, index, this.grouptitleinfo.visitStartDate);
|
|
|
+ ////console.log(number, index, this.grouptitleinfo.visitStartDate);
|
|
|
number = parseInt(number);
|
|
|
if (!isNaN(number)) {
|
|
|
var time = this.addOneDay(this.grouptitleinfo.visitStartDate, number - 1)
|
|
@@ -3821,7 +4132,7 @@ export default {
|
|
|
return `${year}-${month}-${day}`;
|
|
|
},
|
|
|
costTypeSelect(val) {
|
|
|
- //console.log('costTypeSelect--------------------------------------------------------', val);
|
|
|
+ ////console.log('costTypeSelect--------------------------------------------------------', val);
|
|
|
},
|
|
|
async formVerify() {
|
|
|
return new Promise((resolve, reject) => {
|
|
@@ -3855,7 +4166,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
topcheckboxChange(val, label) {
|
|
|
- //console.log(val, label, 'topcheckboxChangeval');
|
|
|
+ ////console.log(val, label, 'topcheckboxChangeval');
|
|
|
var that = this;
|
|
|
if (!val) {
|
|
|
this.$confirm('此操作将清空整列数据, 是否继续?', '提示', {
|
|
@@ -3864,7 +4175,7 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
|
|
|
- //console.log('确定清空数据');
|
|
|
+ ////console.log('确定清空数据');
|
|
|
var fliterList = this.sumTopPrice.filter(x => x.label == label);
|
|
|
if (fliterList.length != 0) {
|
|
|
fliterList[0].Aprice = 0;
|
|
@@ -3920,7 +4231,7 @@ export default {
|
|
|
for (var i = 0; i < that.tableData.length; i++) {
|
|
|
that.tableData[i][prop] = initval;
|
|
|
}
|
|
|
- //console.log(that.tableData, 'that.tableData数据');
|
|
|
+ ////console.log(that.tableData, 'that.tableData数据');
|
|
|
}
|
|
|
|
|
|
this.$message({
|
|
@@ -3949,7 +4260,7 @@ export default {
|
|
|
'Authorization': this.token,
|
|
|
}
|
|
|
}).then(resp => {
|
|
|
- //console.log(resp.data.data, '------------------------------------');
|
|
|
+ ////console.log(resp.data.data, '------------------------------------');
|
|
|
if (resp.data.code == 200) {
|
|
|
this.$message({
|
|
|
message: '操作成功!' + resp.data.msg,
|
|
@@ -4161,7 +4472,7 @@ export default {
|
|
|
'Authorization': this.token,
|
|
|
}
|
|
|
}).then(resp => {
|
|
|
- //console.log(resp, '------------------------------------');
|
|
|
+ ////console.log(resp, '------------------------------------');
|
|
|
try {
|
|
|
if (resp.data.code != 200) {
|
|
|
throw resp.data.msg;
|
|
@@ -4193,7 +4504,7 @@ export default {
|
|
|
},
|
|
|
async GetGroupCostExcel() {
|
|
|
|
|
|
- //console.log(this.titleText, 'this.titleText');
|
|
|
+ ////console.log(this.titleText, 'this.titleText');
|
|
|
|
|
|
var isTrue = await this.save();
|
|
|
if (!isTrue) {
|
|
@@ -4249,14 +4560,14 @@ export default {
|
|
|
data.rightInfo = rightObject;
|
|
|
data.titleModel = this.titleText;
|
|
|
|
|
|
- //console.log(data);
|
|
|
+ ////console.log(data);
|
|
|
|
|
|
this.$axios.post('/api/Groups/ExportGroupCostExcelFile', data, {
|
|
|
headers: {
|
|
|
'Authorization': this.token,
|
|
|
}
|
|
|
}).then(resp => {
|
|
|
- //console.log(resp, '------------------------------------');
|
|
|
+ ////console.log(resp, '------------------------------------');
|
|
|
if (resp.data.code == 200) {
|
|
|
var file = resp.data.data;
|
|
|
that.fileDownload(file.data, file.strFileName);
|
|
@@ -4451,7 +4762,7 @@ export default {
|
|
|
'Authorization': this.token,
|
|
|
}
|
|
|
}).then(resp => {
|
|
|
- //console.log(resp, '------------------------------------');
|
|
|
+ ////console.log(resp, '------------------------------------');
|
|
|
if (resp.data.code == 200) {
|
|
|
var file = resp.data.data;
|
|
|
that.fileDownload(file.data, file.strFileName);
|
|
@@ -4518,10 +4829,10 @@ export default {
|
|
|
that.tableData.splice(index + 1, 0, row)
|
|
|
}
|
|
|
|
|
|
- //console.log('that.tableData', that.tableData)
|
|
|
+ ////console.log('that.tableData', that.tableData)
|
|
|
var thisDay = 1;
|
|
|
for (var i = 0; i < that.tableData.length; i++) {
|
|
|
- //console.log("iiiiiiiiiiiiiiii", i, Number(that.tableData.day))
|
|
|
+ ////console.log("iiiiiiiiiiiiiiii", i, Number(that.tableData.day))
|
|
|
if (Number(that.tableData[i].day) > 0) {
|
|
|
that.tableData[i].day = thisDay;
|
|
|
thisDay++;
|
|
@@ -4579,13 +4890,13 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //console.log(numberList, "numberList!");
|
|
|
- //console.log(that.tableData, "that.tableData!");
|
|
|
+ ////console.log(numberList, "numberList!");
|
|
|
+ ////console.log(that.tableData, "that.tableData!");
|
|
|
for (var i = 0; i < that.tableData.length; i++) {
|
|
|
that.tableData[i].day = that.tableData[i].day.toString();
|
|
|
for (var j = 0; j < numberList.length; j++) {
|
|
|
if (that.tableData[i][numberList[j]] === "") {
|
|
|
- //console.log(i + "行数据异常!", numberList[j]);
|
|
|
+ ////console.log(i + "行数据异常!", numberList[j]);
|
|
|
that.tableData[i][numberList[j]] = 0;
|
|
|
}
|
|
|
}
|
|
@@ -4642,7 +4953,7 @@ export default {
|
|
|
return result;
|
|
|
},
|
|
|
handleChange(currentValue, oldValue) {
|
|
|
- //console.log(currentValue, oldValue);
|
|
|
+ ////console.log(currentValue, oldValue);
|
|
|
if (currentValue == undefined) {
|
|
|
|
|
|
}
|
|
@@ -4655,7 +4966,7 @@ export default {
|
|
|
var weekday = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
|
|
|
return weekday[myDay];
|
|
|
} catch (e) {
|
|
|
- //console.log("时间格式不正确!")
|
|
|
+ ////console.log("时间格式不正确!")
|
|
|
return "时间格式不正确!";
|
|
|
}
|
|
|
}
|
|
@@ -4748,7 +5059,7 @@ export default {
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
|
//汇率
|
|
|
- console.log("汇率--", res.data.data);
|
|
|
+ //console.log("汇率--", res.data.data);
|
|
|
that.currencyOption = res.data.data.teamRates;
|
|
|
}
|
|
|
})
|
|
@@ -4756,7 +5067,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
changeCurrency(data) {
|
|
|
- console.log('data', data);
|
|
|
+ //console.log('data', data);
|
|
|
for (let index = 0; index < this.currencyOption.length; index++) {
|
|
|
if (this.currencyOption[index].currencyId == data) {
|
|
|
this.AGroupCostParameter.rate = this.currencyOption[index].rate;
|
|
@@ -4765,34 +5076,43 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
inSelectChangeCheck() {
|
|
|
- console.log('inSelectChangeCheck');
|
|
|
+ //console.log('inSelectChangeCheck');
|
|
|
var arr = [];
|
|
|
var pusharr = [];
|
|
|
+ var topArr = [];
|
|
|
+ var topPushArr = [];
|
|
|
if (this.costTypevalue == 'A') {
|
|
|
var defaultP = this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0];
|
|
|
|
|
|
if (defaultP.sgr == 0) {
|
|
|
arr.push('酒店SGR');
|
|
|
+ topArr.push('SGR')
|
|
|
} else {
|
|
|
pusharr.push('酒店SGR');
|
|
|
+ topPushArr.push('SGR')
|
|
|
}
|
|
|
if (defaultP.tbr == 0) {
|
|
|
arr.push('酒店TBR');
|
|
|
+ topArr.push('TBR')
|
|
|
} else {
|
|
|
pusharr.push('酒店TBR');
|
|
|
+ topPushArr.push('TBR')
|
|
|
}
|
|
|
if (defaultP.jses == 0) {
|
|
|
arr.push('酒店JSES');
|
|
|
+ topArr.push('JS/ES')
|
|
|
} else {
|
|
|
pusharr.push('酒店JSES');
|
|
|
+ topPushArr.push('JS/ES')
|
|
|
}
|
|
|
if (defaultP.suite == 0) {
|
|
|
+ topArr.push('SUITE')
|
|
|
arr.push('酒店SUITE');
|
|
|
}
|
|
|
else {
|
|
|
pusharr.push('酒店SUITE');
|
|
|
+ topPushArr.push('SUITE')
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
var HotelA = this.costTypeHotelNumbers.filter(item => item.type == 'A')[0];
|
|
|
var HotelB = this.costTypeHotelNumbers.filter(item => item.type == 'B')[0];
|
|
@@ -4812,11 +5132,16 @@ export default {
|
|
|
}
|
|
|
|
|
|
var leftCheck = this.CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues;
|
|
|
+ var topCheck = this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues;
|
|
|
var resultArr = leftCheck.filter(item => !arr.includes(item));
|
|
|
+ var topResultArr = topCheck.filter(item => !topArr.includes(item));
|
|
|
resultArr = [...resultArr, ...pusharr];
|
|
|
resultArr = [...new Set(resultArr)];
|
|
|
- console.log('resultArr', resultArr);
|
|
|
+ //console.log('resultArr', resultArr);
|
|
|
+ topResultArr = [...topResultArr, ...topPushArr];
|
|
|
+ topResultArr = [...new Set(topResultArr)];
|
|
|
this.CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues = resultArr;
|
|
|
+ this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues = topResultArr;
|
|
|
},
|
|
|
GivePeopleNumber() {
|
|
|
var number = this.grouptitleinfo.visitPNumber;
|
|
@@ -4835,12 +5160,38 @@ export default {
|
|
|
if (this.AGroupCostParameter.gwrs == 0) {
|
|
|
this.AGroupCostParameter.gwrs = number;
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ lableSetPrice(lable, total, single) {
|
|
|
+ //遍历this.columnTotalData
|
|
|
+ for (var i = 0; i < this.columnTotalData.length; i++) {
|
|
|
+ if (this.columnTotalData[i].label == lable) {
|
|
|
+ this.columnTotalData[i].totalPrice = total;
|
|
|
+ this.columnTotalData[i].singlePrice = single;
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ BlableSetPrice(lable, total, single) {
|
|
|
+ for (var i = 0; i < this.columnTotalData.length; i++) {
|
|
|
+ if (this.columnTotalData[i].label == lable) {
|
|
|
+ var aT = Number(this.columnTotalData[i].totalPrice).toFixed(2);
|
|
|
+ var aS = Number(this.columnTotalData[i].singlePrice).toFixed(2);
|
|
|
+ if(!isNaN(aT)){
|
|
|
+ this.columnTotalData[i].totalPrice = 'A段费用' + aT +'\r\n B段费用' + total;
|
|
|
+ }
|
|
|
+ if(!isNaN(aS)){
|
|
|
+ this.columnTotalData[i].singlePrice = 'A段费用' + aS + '\r\n B段费用' + single;
|
|
|
+ }
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
|
this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
|
|
|
var costLoadData = localStorage.getItem('costLoadData');
|
|
|
+ document.querySelectorAll('.el-table__footer')[0].style.display = "none"
|
|
|
if (costLoadData) {
|
|
|
var JSONP = JSON.parse(costLoadData);
|
|
|
var diidP = Number(JSONP.diid);
|
|
@@ -4863,7 +5214,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
columnWidth() {
|
|
|
- if (this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 15) {
|
|
|
+ if (this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 20) {
|
|
|
return ''
|
|
|
} else {
|
|
|
return 75
|
|
@@ -4902,6 +5253,22 @@ export default {
|
|
|
}
|
|
|
return [];
|
|
|
},
|
|
|
+ getCurr() {
|
|
|
+ var currStr = '';
|
|
|
+ var curr = this.AGroupCostParameter.currency;
|
|
|
+ var currResult = Number(curr);
|
|
|
+ if (isNaN(currResult)) {
|
|
|
+ currStr = curr;
|
|
|
+ } else {
|
|
|
+ for (let index = 0; index < this.currencyOption.length; index++) {
|
|
|
+ if (this.currencyOption[index].currencyId == currResult) {
|
|
|
+ currStr = this.currencyOption[index].currencyCode;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return currStr;
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|