Commit 3213bd4b authored by tianhongyang's avatar tianhongyang

成本汇总 月份判断更正

parent d32e1f81
......@@ -2,8 +2,8 @@
<div class="cost-summary-container">
<!-- 按项目汇总 成本汇总切换 -->
<div class="category-type-container">
<div class="category-list-item" v-for="(type,index) of categoryList" :key="type.value"
:class="{'is-current-category' : currentCategory == type.value}" @click.stop="currentCategoryChange(type.value)">{{type.label}}</div>
<div class="category-list-item" v-for="(type, index) of categoryList" :key="type.value"
:class="{ 'is-current-category': currentCategory == type.value }" @click.stop="currentCategoryChange(type.value)">{{ type.label }}</div>
</div>
<!-- 成本菜单以及列表 -->
<div class="cost-summary-content-container">
......@@ -28,10 +28,10 @@
</div>
<!-- 锁定成本 导出excel 编辑成本 -->
<div class="project-table-list-haeder-right">
<div class="lock-cost-btn" :class="{'current-month-lock' : currentMonthLock}" @click="!currentMonthLock ? lockCostHandler() : ''">锁定成本
<div class="lock-cost-btn" :class="{ 'current-month-lock': currentMonthLock }" @click="!currentMonthLock ? lockCostHandler() : ''">锁定成本
</div>
<div class="export-excel-btn" @click="exportExcel">导出Excel表</div>
<div class="edit-cost-btn" @click="addActualCostEditStatus ? saveCostModify() : editCost()">{{addActualCostEditStatus ? "保存成本" : "编辑成本"}}
<div class="edit-cost-btn" @click="addActualCostEditStatus ? saveCostModify() : editCost()">{{ addActualCostEditStatus ? "保存成本" : "编辑成本" }}
</div>
</div>
</div>
......@@ -44,18 +44,18 @@
<!-- 本月费用(含税) -->
<template slot="taxInclusiveExpense" slot-scope="scope">
<!-- 本月费用(含税)编辑单元格 -->
<el-form-item :prop="`tableDataList.${getTableTreeProp(dataForm.tableDataList,scope.row.id)}.taxInclusiveExpense`"
<el-form-item :prop="`tableDataList.${getTableTreeProp(dataForm.tableDataList, scope.row.id)}.taxInclusiveExpense`"
:rules="checkRules.amountCheck" v-if="addActualCostEditStatus" class="inner-edit-input-item">
<el-input placeholder="请输入" v-model="scope.row.taxInclusiveExpense" clearable
@input="v => editIptValueRectify(v,scope.row,'taxInclusiveExpense')"></el-input>
@input="v => editIptValueRectify(v, scope.row, 'taxInclusiveExpense')"></el-input>
</el-form-item>
</template>
<!-- 本月费用(不含税) -->
<template slot="taxExclusiveExpense" slot-scope="scope">
<el-form-item :prop="`tableDataList.${getTableTreeProp(dataForm.tableDataList,scope.row.id)}.taxExclusiveExpense`"
<el-form-item :prop="`tableDataList.${getTableTreeProp(dataForm.tableDataList, scope.row.id)}.taxExclusiveExpense`"
:rules="checkRules.amountCheck" v-if="addActualCostEditStatus" class="inner-edit-input-item">
<el-input placeholder="请输入" v-model="scope.row.taxExclusiveExpense" clearable
@input="v => editIptValueRectify(v,scope.row,'taxExclusiveExpense')"></el-input>
@input="v => editIptValueRectify(v, scope.row, 'taxExclusiveExpense')"></el-input>
</el-form-item>
</template>
</custom-table>
......@@ -361,7 +361,7 @@ export default {
const _now = this.getNowMonth();
this.expenseDate = saveReset ? this.expenseDate : _now;
// 默认以当前月数据为准 若不包含当前月 需要手动push数据
if (!data.includes(_now)) {
if (!data.find(item => item.expenseDate == _now)) {
data.push({
label: dayjs(_now).format("YYYY年MM月"),
expenseDate: _now,
......@@ -653,7 +653,7 @@ export default {
this.addActualCostEditStatus = true;
this.selectActualCostTime = selectTime;
// 判断是否包含 选择的年月 包含则修改 未包含则新增
const findReslut = this.originMonthList.includes(selectTime) || this.monthList.find(item => item.expenseDate == selectTime);
const findReslut = this.originMonthList.find(item => item.expenseDate == selectTime) || this.monthList.find(item => item.expenseDate == selectTime);
const params = this.createRequestConditions();
if (!findReslut) {
// 不包含当前所选月 新增数据
......@@ -793,7 +793,7 @@ export default {
return null;
},
},
}
};
</script>
<style lang="scss" scoped>
.cost-summary-container {
......@@ -875,8 +875,10 @@ export default {
.project-table-list-haeder-left {
display: flex;
align-items: center;
.project-month-select-options {
width: 140px;
.el-input__inner {
height: 32px;
line-height: 32px;
......@@ -887,13 +889,16 @@ export default {
color: #232323;
font-weight: 350;
}
.el-input__suffix {
right: 12px;
.el-input__icon {
line-height: 32px;
width: auto;
}
}
.el-input__prefix {
display: none;
}
......@@ -923,6 +928,7 @@ export default {
}
.lock-cost-btn {
/* 当前月锁定 */
&.current-month-lock {
cursor: not-allowed;
......@@ -957,19 +963,23 @@ export default {
th {
height: 40px;
}
.cell {
font-size: 14px;
font-weight: 350;
}
.number-index-td {
.cell {
display: flex;
align-items: center;
.el-table__expand-icon {
margin-right: 5px;
}
}
}
.inner-edit-input-item {
margin-bottom: 0px;
......@@ -995,6 +1005,7 @@ export default {
border-color: #0081ff;
}
}
.el-input__clear {
line-height: 32px;
}
......
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