diff --git a/src/views/budget/budgetList.vue b/src/views/budget/budgetList.vue
index 0a992a2..50a6c02 100644
--- a/src/views/budget/budgetList.vue
+++ b/src/views/budget/budgetList.vue
@@ -770,14 +770,14 @@ export default {
},
{
label: '预算类型',
- prop: 'type',
+ prop: 'type_detail.name',
width: 115,
- formatter: (cell, data, value) => {
- const res = this.typesbefore.filter((item) => {
- return item.id === value
- })
- return res[0]?.name || '未知'
- }
+ // formatter: (cell, data, value) => {
+ // const res = this.typesbefore.filter((item) => {
+ // return item.id === value
+ // })
+ // return res[0]?.name || '未知'
+ // }
},
{
label: '所属年份',
diff --git a/src/views/budget/seeBudget.vue b/src/views/budget/seeBudget.vue
index 7113886..6426db7 100644
--- a/src/views/budget/seeBudget.vue
+++ b/src/views/budget/seeBudget.vue
@@ -162,14 +162,15 @@ export default {
},
{
label: '预算类型',
- prop: 'type',
+ // prop: 'type',
+ prop:'type_detail.name',
width: 115,
- formatter: (cell, data, value) => {
- const res = this.types.filter(item => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- }
+ // formatter: (cell, data, value) => {
+ // const res = this.types.filter(item => {
+ // return item.id === value
+ // })
+ // return res[0]?.value || '未知'
+ // }
},
{
label: '所属年份',
diff --git a/src/views/contract/components/editorContract.vue b/src/views/contract/components/editorContract.vue
index 8d10828..b0cdbd5 100644
--- a/src/views/contract/components/editorContract.vue
+++ b/src/views/contract/components/editorContract.vue
@@ -469,14 +469,14 @@ export default {
align: 'center'
},
{
- label: '分类',
- prop: 'type',
- formatter: (cell, data, value) => {
- const res = this.moneyWay.filter(item => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- }
+ label: '预算类型',
+ prop: 'type_detail.name',
+ // formatter: (cell, data, value) => {
+ // const res = this.moneyWay.filter(item => {
+ // return item.id === value
+ // })
+ // return res[0]?.value || '未知'
+ // }
},
{
label: '名称',
diff --git a/src/views/contract/components/paymentRegistration.vue b/src/views/contract/components/paymentRegistration.vue
index 043e942..1e98402 100644
--- a/src/views/contract/components/paymentRegistration.vue
+++ b/src/views/contract/components/paymentRegistration.vue
@@ -277,7 +277,7 @@
查看同类历史记录
-
+
@@ -717,14 +717,14 @@ export default {
type: 'selection'
},
{
- label: '分类',
- prop: 'type',
- formatter: (cell, data, value) => {
- const res = this.planTypes.filter(item => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- }
+ label: '预算类型',
+ prop: 'type_detail.name',
+ // formatter: (cell, data, value) => {
+ // const res = this.planTypes.filter(item => {
+ // return item.id === value
+ // })
+ // return res[0]?.value || '未知'
+ // }
},
{
label: '名称',
@@ -1041,7 +1041,7 @@ export default {
this.forms = this.contractTemplate
// 初始化第一个tab的数据源
this.forms1 = this.contractTemplate
-
+
// 检查是否有第二个事后支付表格模板
if (this.contract.contract_template2 && this.contract.contract_template2.template) {
this.hasSecondPostPaymentForm = true
@@ -1054,7 +1054,7 @@ export default {
this.hasSecondPostPaymentForm = false
this.forms2 = null
}
-
+
if (!this.contract.contract_template.contract_template_fields) {
this.contract.contract_template.contract_template_fields = this.contract.other_data || []
}
@@ -1154,7 +1154,7 @@ export default {
// 更新DOM中的值
const dom = tableIndex === 1 ? this.$refs.mainTable1 : this.$refs.mainTable2
-
+
if (dom) {
const input = dom.querySelector(`[data-field="${field.field}"]`)
if (input) {
@@ -1192,7 +1192,7 @@ export default {
// 根据当前选择的tab获取对应的表格DOM和模板字段
let currentDom = null
let templateFields = null
-
+
if (this.activePostPaymentTab === 'form1' && this.contract.contract_template) {
currentDom = this.$refs.mainTable1
templateFields = this.contract.contract_template.contract_template_fields
@@ -1200,7 +1200,7 @@ export default {
currentDom = this.$refs.mainTable2
templateFields = this.contract.contract_template2.contract_template_fields
}
-
+
if (currentDom && templateFields) {
// 获取所有输入控件
const inputs = currentDom.querySelectorAll('input, select, textarea')
@@ -1377,7 +1377,7 @@ export default {
} else if (this.activePostPaymentTab === 'form2') {
currentDom = this.$refs.mainTable2
}
-
+
if (currentDom) {
const currentPaymentInput = currentDom.querySelector('input[data-field="currentDuePayment"]')
if (currentPaymentInput) {
@@ -1398,7 +1398,7 @@ export default {
} else if (this.activePostPaymentTab === 'form2') {
currentDom = this.$refs.mainTable2
}
-
+
if (currentDom && this.contract.contract_template) {
const updatedForms = syncFormDomToHtml(currentDom, this.contract.contract_template.contract_template_fields)
// 更新对应的数据源
@@ -1449,7 +1449,7 @@ export default {
// 根据当前选择的tab获取对应的表格DOM
let currentDom = null
let templateFields = null
-
+
if (this.activePostPaymentTab === 'form1') {
currentDom = this.$refs.mainTable1
if (this.contract.contract_template) {
@@ -1461,7 +1461,7 @@ export default {
templateFields = this.contract.contract_template2.contract_template_fields
}
}
-
+
if (currentDom && templateFields) {
//console.log(templateFields)
const updatedForms = syncFormDomToHtml(currentDom, templateFields)
@@ -1494,22 +1494,22 @@ export default {
} else if (this.activePostPaymentTab === 'form2' && this.contract.contract_template2) {
templateFields = this.contract.contract_template2.contract_template_fields
}
-
+
if (templateFields) {
// 从放大窗口获取更新后的数据
const updatedForms = syncFormDomToHtml(dom, templateFields)
-
+
// 只更新当前激活tab的数据源
if (this.activePostPaymentTab === 'form1') {
this.forms1 = updatedForms
} else if (this.activePostPaymentTab === 'form2') {
this.forms2 = updatedForms
}
-
+
// 更新共享的forms数据(用于提交)
this.forms = updatedForms
this.contract.forms = updatedForms
-
+
// 重新设置监听器
this.$nextTick(() => {
if (this.activePostPaymentTab === 'form1' && this.$refs.mainTable1) {
@@ -1701,7 +1701,7 @@ export default {
// 初始计算一次
// this.calculateTotal()
-
+
console.log('setupAmountListeners: listeners setup completed for dom', dom)
console.log('Found inputs:', {
sdate: dom.querySelectorAll('input[data-field^="sdate"]').length,
@@ -1726,7 +1726,7 @@ export default {
} else if (this.activePostPaymentTab === 'form2') {
currentDom = this.$refs.mainTable2
}
-
+
if (currentDom) {
const sdateInput = currentDom.querySelector('input[data-field^="sdate"]')
const edateInput = currentDom.querySelector('input[data-field^="edate"]')
@@ -1768,7 +1768,7 @@ export default {
calculateTotal() {
console.log('calculateTotal called')
-
+
// 计算当前激活的表格的总金额
let currentDom = null
if (this.activePostPaymentTab === 'form1') {
@@ -1776,12 +1776,12 @@ export default {
} else if (this.activePostPaymentTab === 'form2') {
currentDom = this.$refs.mainTable2
}
-
+
if (currentDom) {
console.log('calculateTotal: calculating for current tab dom', currentDom)
this.calculateTableTotal(currentDom)
}
-
+
// 计算放大表格的总金额
if (this.$refs.zoomedTable) {
console.log('calculateTotal: calculating for zoomed table')
diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue
index 4799f92..b36a92b 100644
--- a/src/views/contract/contractList.vue
+++ b/src/views/contract/contractList.vue
@@ -1441,14 +1441,14 @@ export default {
fixed: 'left'
},
{
- label: '分类',
- prop: 'type',
- formatter: (cell, data, value) => {
- const res = this.moneyWay.filter(item => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- },
+ label: '预算类型',
+ prop: 'type_detail.name',
+ // formatter: (cell, data, value) => {
+ // const res = this.moneyWay.filter(item => {
+ // return item.id === value
+ // })
+ // return res[0]?.value || '未知'
+ // },
width: 100,
fixed: 'left'
},
diff --git a/src/views/contract/paymentRegistrationList.vue b/src/views/contract/paymentRegistrationList.vue
index bf5e06d..9a07116 100644
--- a/src/views/contract/paymentRegistrationList.vue
+++ b/src/views/contract/paymentRegistrationList.vue
@@ -272,13 +272,13 @@ export default {
planTableSearch: [
{
label: '分类',
- prop: 'type',
- formatter: (cell, data, value) => {
- const res = this.moneyWay.filter((item) => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- },
+ prop: 'type_detail.name',
+ // formatter: (cell, data, value) => {
+ // const res = this.moneyWay.filter((item) => {
+ // return item.id === value
+ // })
+ // return res[0]?.value || '未知'
+ // },
width: 170
},
{
diff --git a/src/views/contract/seeContract.vue b/src/views/contract/seeContract.vue
index 6abaefd..80e98b1 100644
--- a/src/views/contract/seeContract.vue
+++ b/src/views/contract/seeContract.vue
@@ -1013,14 +1013,14 @@ export default {
fixed: 'left'
},
{
- label: '分类',
- prop: 'type',
- formatter: (cell, data, value) => {
- const res = this.moneyWay.filter(item => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- },
+ label: '预算类型',
+ prop: 'type_detail.name',
+ // formatter: (cell, data, value) => {
+ // const res = this.moneyWay.filter(item => {
+ // return item.id === value
+ // })
+ // return res[0]?.value || '未知'
+ // },
width: 100,
fixed: 'left'
},
diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue
index 23fbf6f..5276754 100644
--- a/src/views/finance/components/examineRegistration.vue
+++ b/src/views/finance/components/examineRegistration.vue
@@ -172,13 +172,43 @@
placeholder="请选择资金列支渠道"
@change="moneyWayChange"
>
-
+
-
+
+
+
+ {return getSelectedNodes(data,node,'tree1')}"
+ />
+
+
+
+
+
+
{{ item.label }}
@@ -231,12 +261,23 @@ import {
} from 'element-ui'
import {
parseTime,
- moneyFormatter
+ moneyFormatter,
+ buildTree
} from '@/utils'
+import {
+ index as getPlanType
+} from '@/api/budget/plantype.js'
export default {
data() {
return {
+
+ checkArr: [],
+ defaultProps: {
+ children: 'children',
+ label: 'name'
+ },
+
planTotal: 0,
pageIndex: 1,
// 付款登记
@@ -244,6 +285,7 @@ export default {
contract: {},
payment: [], // 合同关联的付款登记
planTypes: [],
+ planTypes_arr:[],
payTable: [{
label: '申请金额',
prop: 'apply_money',
@@ -326,7 +368,9 @@ export default {
plansSelect: {
page: 1,
page_size: 10,
- name: ''
+ name: '',
+ type:'',
+ typeName:'',
},
planTable: [{
sortable: false,
@@ -340,15 +384,15 @@ export default {
width: 96
},
{
- label: '分类',
+ label: '预算类型',
width: 136,
- prop: 'type',
- formatter: (cell, data, value) => {
- const res = this.planTypes.filter(item => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- }
+ prop: 'type_detail.name',
+ // formatter: (cell, data, value) => {
+ // const res = this.planTypes.filter(item => {
+ // return item.id === value
+ // })
+ // return res[0]?.value || '未知'
+ // }
},
{
label: '科室',
@@ -407,8 +451,9 @@ export default {
}
},
async mounted() {
- // await this.getBudgets()
+ await this.getBudgets()
await this.getPlanTypes()
+
},
methods: {
delPlan(val) {
@@ -428,22 +473,22 @@ export default {
},
// 资金列支渠道选择后变化
moneyWayChange() {
- const page = 1
- const pageSize = this.plansSelect.page_size
- const name = this.plansSelect.name
- this.plansSelect = {
- page: page,
- page_size: pageSize,
- name: name
- }
+ // const page = 1
+ // const pageSize = this.plansSelect.page_size
+ // const name = this.plansSelect.name
+ // this.plansSelect = {
+ // page: page,
+ // page_size: pageSize,
+ // name: name
+ // }
if (this.paymentRegistrationForm.moneyWay) {
const _arr = []
this.paymentRegistrationForm.moneyWay.forEach((item, index) => {
_arr.push(item)
})
- this.plansSelect['type'] = _arr + ''
+ // this.plansSelect['type'] = _arr + ''
}
- this.getBudgets()
+ // this.getBudgets()
},
inputMoney(e, row) {
@@ -455,11 +500,51 @@ export default {
})
},
async getPlanTypes() {
- const res = await getparameter({
+ const res1 = await getparameter({
number: 'money_way'
})
- this.planTypes = res.detail
+ this.planTypes_arr = res1.detail
+ const res = await getPlanType({
+ page_size: 999,
+ page: 1,
+ sort_name: 'sort',
+ sort_type: 'asc',
+ filter: [{
+ key: 'year',
+ op: 'eq',
+ value: this.$moment().format('YYYY'),
+ }]
+ })
+ this.planTypes = buildTree(res.data)
+ },
+ changeType(e){
+ if(!e){
+ this.plansSelect.type = ''
+ this.plansSelect.typeName = ''
+ }
},
+ getSelectedNodes(data, node, ref) {
+ const ref_data = ref || 'tree'
+ this.$refs[ref_data].setCheckedKeys([])
+ this.checkArr = []
+ if (data.children && data.children.length > 0) {
+ this.$Message.warning('当前节点不可选择')
+ this.form.type = ''
+ this.select.type = ''
+ this.editorForm.type = ''
+ this.$refs[ref_data].setCheckedKeys([])
+ return
+ }
+ this.$refs[ref_data].setCheckedKeys([]) // 删除所有选中节点
+ this.$refs[ref_data].setCheckedNodes([data]) // 选中已选中节点
+ this.plansSelect.type = data.id
+ this.plansSelect.typeName = data.name
+ this.getBudgets()
+ this.$forceUpdate()
+ },
+
+
+
// 翻页
pageChange(e) {
this.pageIndex = e
@@ -685,4 +770,7 @@ export default {
z-index: 2;
}
}
+ ::v-deep .planselsct .el-checkbox__input .el-checkbox__inner {
+ border-radius: 50%;
+ }
diff --git a/src/views/finance/paymentRegistrationList.vue b/src/views/finance/paymentRegistrationList.vue
index 2e93134..0b038a7 100644
--- a/src/views/finance/paymentRegistrationList.vue
+++ b/src/views/finance/paymentRegistrationList.vue
@@ -223,13 +223,13 @@ export default {
planTableSearch: [
{
label: '分类',
- prop: 'type',
- formatter: (cell, data, value) => {
- const res = this.moneyWay.filter((item) => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- },
+ prop: 'type_detail.name',
+ // formatter: (cell, data, value) => {
+ // const res = this.moneyWay.filter((item) => {
+ // return item.id === value
+ // })
+ // return res[0]?.value || '未知'
+ // },
width: 120
},
{
@@ -513,10 +513,10 @@ export default {
if (this.selectDate) url += '&date=' + this.selectDate
if (this.keyword) url += '&keyword=' + this.keyword
if (typeof this.status !== 'undefined') {
- url += '&status=' + this.status
+ url += '&status=' + this.status
}
if (this.select.plan_id) {
- url += '&act_plan_link_id=' + this.select.plan_id
+ url += '&act_plan_link_id=' + this.select.plan_id
}
url += '&is_export=' + this.is_export
url = location.host + url
diff --git a/src/views/statisticalReport/components/addGovPlane.vue b/src/views/statisticalReport/components/addGovPlane.vue
index b54284c..db1d256 100644
--- a/src/views/statisticalReport/components/addGovPlane.vue
+++ b/src/views/statisticalReport/components/addGovPlane.vue
@@ -307,14 +307,14 @@ export default {
},
planTable: [
{
- label: '分类',
- prop: 'type',
- formatter: (cell, data, value) => {
- const res = this.moneyWay.filter((item) => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- },
+ label: '预算类型',
+ prop: 'type_detail.name',
+ // formatter: (cell, data, value) => {
+ // const res = this.moneyWay.filter((item) => {
+ // return item.id === value
+ // })
+ // return res[0]?.value || '未知'
+ // },
width: 100,
fixed: 'left'
},