Commit 129491c5 authored by huangjie's avatar huangjie

*

parent d4cdf80f
......@@ -172,6 +172,15 @@ export function projectVolume(data) {
});
}
//措施费-获取实际成本月份列表
export function actualMonths(data) {
return request({
url: '/cb/cost/measures/actual/months',
method: 'GET',
params:data
});
}
// 工料汇总
......@@ -193,8 +202,8 @@ export const getFeedSummaryMenuTreeApi = (params = {}) => request({
* recordDate : string;
* projectId : number;
* cbStage : number
* }} params
* @returns
* }} params
* @returns
*/
export const getFeedSummaryListApi = (params = {}) => request({
url: "/cb/quantity/summary/subjectList",
......
......@@ -11,12 +11,21 @@
</div>
<div class="profitloss">
<div class="search">
<el-date-picker size="small" style="width: 140px"
v-model="expenseDate"
type="month"
placeholder="选择月" @change="changetime"
:picker-options="pickerOptions">
</el-date-picker>
<!--<el-date-picker size="small" style="width: 140px"-->
<!--v-model="expenseDate"-->
<!--type="month"-->
<!--placeholder="选择月" @change="changetime"-->
<!--value-format="yyyy-MM"-->
<!--:picker-options="pickerOptions">-->
<!--</el-date-picker>-->
<el-select v-model="expenseDate">
<el-option
v-for="item in dateoptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-button v-if="!isall" type="primary" size="small" @click="addcost">添加实际成本</el-button>
</div>
<!--汇总-->
......@@ -183,7 +192,7 @@
getMeasureslist,
getSummarydata,
projectVolume,
pushProjectvolume
pushProjectvolume,actualMonths
} from '@/api/projectCostLedger'
export default {
......@@ -247,14 +256,15 @@
isall:true,//是否汇总
dialogVisible:false,
queryParam:{},//推送工程量数据
dateoptions:[],
};
},
//可访问data属性
created() {
let month = new Date().getMonth() +1
let year = new Date().getFullYear()
this.expenseDate = year + '-' + (month>= 9? month:'0'+ month)
this.expenseDate = year + (month>= 9? month:'0'+ month)
this.actualMonths()
},
//计算集
computed: {
......@@ -262,13 +272,25 @@
},
//方法集
methods: {
actualMonths(){
const formData = new FormData();
formData.append("projectId", this.projectId);
formData.append("id", this.id);
actualMonths(formData).then(res=>{
let data = res.data
data.forEach(item=>{
item.value = item
item.label = item.substring(1,4)+'-'+item.substring(5,6)
})
})
},
select(menuPath){
this.id = menuPath
let month = this.expenseDate.replace('-', "");
// let month = this.expenseDate.replace('-', "");
let param = {
projectId:this.projectId,
id:this.id,
month:month
month:this.expenseDate
}
if(menuPath == 0){//费用汇总
this.isall = true
......@@ -283,6 +305,7 @@
this.tableData = res.data
})
}
this.actualMonths()
},
async init(detail = '') {
try {
......@@ -318,9 +341,6 @@
}
},
changetime(val){
let month = val.getMonth() +1
let year = val.getFullYear()
this.expenseDate = year + '-' + (month>= 9? month:'0'+ month)
this.select(this.id)
},
//推送工作量
......@@ -336,6 +356,7 @@
projectVolume(row.id).then(res=>{
if(res.data){
let datas = res.data
this.queryParam.currentProjectVolume = datas.currentProjectVolume
this.queryParam.ipmProjectCode = datas.ipmProjectCode
this.queryParam.ipmContractCode = datas.ipmContractCode
this.queryParam.ipmBizCode = datas.ipmBizCode
......
......@@ -15,6 +15,7 @@
v-model="expenseDate"
type="month"
placeholder="选择月" @change="changetime"
value-format="yyyy-MM"
>
</el-date-picker>
</div>
......@@ -254,10 +255,6 @@
}
},
changetime(val){
console.log(val)
// let month = val.getMonth() +1
// let year = val.getFullYear()
// this.expenseDate = year + '-' + (month>= 9? month:'0'+ month)
this.select(this.id)
},
},
......
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