@@ -127,7 +141,38 @@
list_areas: [],
list_types: [],
list_datas: [],
-
+ year_datas:[],
+ year_datas_item:[{
+ prop: 'year',
+ label: '年份',
+ align: 'center',
+ width: 100
+ },{
+ prop: 'all_year',
+ label: '年度总预算',
+ align: 'center',
+ width: 150
+ },{
+ prop: 'quarter_1',
+ label: '第一季度预算',
+ align: 'center',
+ width: 150
+ },{
+ prop: 'quarter_2',
+ label: '第二季度预算',
+ align: 'center',
+ width: 150
+ },{
+ prop: 'quarter_3',
+ label: '第三季度预算',
+ align: 'center',
+ width: 150
+ },{
+ prop: 'quarter_4',
+ label: '第四季度预算',
+ align: 'center',
+ width: 150
+ }],
// 填报数据
fill_datas:[],
fill_datas_item: [{
@@ -153,7 +198,8 @@
business_id: '',
area_id: '',
year: '',
- month: '',
+ month: '',
+ year_datas:[],
id_fill_datas_fill_id_relation: []
},
rules: {
@@ -194,7 +240,14 @@
this.business_name = res.name
this.list_areas = res.area_ids_details ? res.area_ids_details : []
this.list_types = res.id_business_types_business_id_relation ? res.id_business_types_business_id_relation : []
- this.list_datas = res.id_business_datas_business_id_relation ? res.id_business_datas_business_id_relation : []
+ if(res.id_business_datas_business_id_relation){
+ this.list_datas = res.id_business_datas_business_id_relation.sort((a, b) => parseInt(a.sort) - parseInt(b.sort))
+ }
+ // this.list_datas = res.id_business_datas_business_id_relation ? res.id_business_datas_business_id_relation : []
+ // 区域年度预算
+ this.year_datas = res.id_budgets_business_id_relation
+ this.form.year_datas = res.id_budgets_business_id_relation.filter(item=>{return item.area_id===this.form.area_id && item.year==this.form.year})
+
// 初始化 填报数据
if(this.type==='add'){
this.form.area_id = this.stateObj.area_id ? this.stateObj.area_id : ''
@@ -210,15 +263,22 @@
area_id: this.area_id,
business_type_id: item.id,
business_data_id: item1.id,
- value: 0
+ value: 0,
+ sort:item1.sort
})
}
})
})
console.log("_arr",_arr)
- this.fill_datas = _arr
+ this.fill_datas = _arr.sort()
}
},
+ changeYear(e){
+ // 区域年度预算
+ console.log(e,this.year_datas)
+ this.form.year_datas = this.year_datas.filter(item=>{return item.area_id===this.form.area_id && item.year==e})
+
+ },
changeArea(e){
this.form.area_id = e ? e : ''
let _arr = []
@@ -232,12 +292,16 @@
area_id: e,
business_type_id: item.id,
business_data_id: item1.id,
- value: 0
+ value: 0,
+ sort:item1.sort
})
}
})
})
this.fill_datas = _arr
+
+ this.form.year_datas = this.year_datas.filter(item=>{return item.area_id === e && item.year===this.form.year})
+ console.log("this.form.year_datas",e,this.year_datas,this.form.year_datas)
},
@@ -301,7 +365,6 @@
this.form.id_fill_datas_fill_id_relation = res.id_fill_datas_fill_id_relation ? res
.id_fill_datas_fill_id_relation : []
this.fill_datas = this.form.id_fill_datas_fill_id_relation
-
})
},
},
@@ -318,13 +381,18 @@
} else {
this.id = ''
this.business_id = ''
- this.business_name = ''
+ this.business_name = ''
+ this.list_areas = []
+ this.list_types = []
+ this.list_datas = []
+ this.year_datas = []
this.type = "add"
this.form = {
business_id: '',
area_id: '',
year: '',
- month: '',
+ month: '',
+ year_datas:[],
id_fill_datas_fill_id_relation: []
}
this.$refs['dialog'].reset()
diff --git a/src/views/report/components/addIndex.vue b/src/views/report/components/addIndex.vue
index 4f51778..afbcddf 100644
--- a/src/views/report/components/addIndex.vue
+++ b/src/views/report/components/addIndex.vue
@@ -85,6 +85,13 @@
+
@@ -147,7 +154,7 @@
prop: 'name',
label: '数据名称',
align: 'left',
- width: 620
+ width: 630
}],
form: {
name: '',
@@ -204,7 +211,8 @@
},
addDataRow() {
this.form.id_business_datas_business_id_relation.push({
- name:''
+ name:'',
+ sort:0
})
},
delDataRow(index,id) {
@@ -291,8 +299,10 @@
this.form = this.base.requestToForm(res, this.form)
this.form.area_ids = res.area_ids ? res.area_ids : [],
this.form.id_business_types_business_id_relation = res.id_business_types_business_id_relation?res.id_business_types_business_id_relation:[]
-
- this.form.id_business_datas_business_id_relation = res.id_business_datas_business_id_relation?res.id_business_datas_business_id_relation:[]
+ if(res.id_business_datas_business_id_relation){
+ this.form.id_business_datas_business_id_relation = res.id_business_datas_business_id_relation.sort((a, b) => parseInt(a.sort) - parseInt(b.sort))
+ }
+ // this.form.id_business_datas_business_id_relation = res.id_business_datas_business_id_relation?res.id_business_datas_business_id_relation:[]
})
},
diff --git a/src/views/report/components/addYear.vue b/src/views/report/components/addYear.vue
new file mode 100644
index 0000000..bf14e9e
--- /dev/null
+++ b/src/views/report/components/addYear.vue
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+ *填报区域:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/report/components/showFill.vue b/src/views/report/components/showFill.vue
new file mode 100644
index 0000000..fa628a9
--- /dev/null
+++ b/src/views/report/components/showFill.vue
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+ 业务类型
+
+ {{form.business_id_details?form.business_id_details[0]['name']:''}}
+
+
+
+ 填报区域
+
+ {{form.area_id_details?form.area_id_details[0]['name']:''}}
+
+
+
+ 填报年份
+
+ {{form.year}}
+
+
+
+ 填报月份
+
+ {{monthArr[parseInt(form.month)-1]}}
+
+
+
+ 年度预算
+
+
+
+
+
+ 数据填报
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/report/fill.vue b/src/views/report/fill.vue
index cef99d4..e6b8a21 100644
--- a/src/views/report/fill.vue
+++ b/src/views/report/fill.vue
@@ -24,22 +24,30 @@
-
-
-
-
-
- {{item.name}}
-
-
-
+ :table-item="table_item">
+
+
+
+
+
+ {{item.name}}
+
+
+
- 数据填报
- 填报查看
+
+ 月度数据填报
+ 月度填报查看
+
+
+
+ 年度预算填报
+ 年度预算查看
+
+
@@ -47,19 +55,23 @@
+
+
+
+
diff --git a/vue.config.js b/vue.config.js
index c82404e..5201527 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
- outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin_test',
+ outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项