Commit 129491c5 authored by huangjie's avatar huangjie

*

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