-
其他投标单位
+
其他参与投标单位名称
diff --git a/src/views/contract/components/paymentRegistration.vue b/src/views/contract/components/paymentRegistration.vue
index f3852f6..23aa84b 100644
--- a/src/views/contract/components/paymentRegistration.vue
+++ b/src/views/contract/components/paymentRegistration.vue
@@ -47,8 +47,8 @@
已付笔数
{{ actNumsTotal() }}
-
-
+
@@ -459,7 +459,7 @@ function numberToChinese(num) {
if (num === 0) {
return '零元'
}
-
+
const units = ['', '拾', '佰', '仟', '万', '拾', '佰', '仟', '亿', '拾', '佰', '仟', '万']
const digits = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']
const [integer, decimal] = num.toString().split('.')
@@ -505,7 +505,7 @@ function numberToChinese(num) {
}
}
}
-
+
if (!decimal || parseInt(decimal) === 0) {
result += '整'
}
@@ -977,12 +977,12 @@ export default {
message: '必填'
}
],
- act_date: [
- {
- required: this.contract_category.required_act_date === 1,
- message: '必填'
- }
- ]
+ // act_date: [
+ // {
+ // required: this.contract_category.required_act_date === 1,
+ // message: '必填'
+ // }
+ // ]
}
const res = await getFundLog({
contract_id: this.contract.id,
@@ -1456,7 +1456,7 @@ export default {
input.addEventListener('change', this.calculateTotal)
input.addEventListener('blur', this.calculateTotal)
})
-
+
// 获取所有以 fen 开头的输入框
const fenAmountInputs = dom.querySelectorAll('input[data-field^="fen"]')
// 移除旧的监听器
@@ -1496,7 +1496,7 @@ export default {
totalInput.removeEventListener('input', (e) => this.updateUpperCaseFromTotal(e, dom))
totalInput.removeEventListener('change', (e) => this.updateUpperCaseFromTotal(e, dom))
totalInput.removeEventListener('blur', (e) => this.updateUpperCaseFromTotal(e, dom))
-
+
totalInput.addEventListener('input', (e) => this.updateUpperCaseFromTotal(e, dom))
totalInput.addEventListener('change', (e) => this.updateUpperCaseFromTotal(e, dom))
totalInput.addEventListener('blur', (e) => this.updateUpperCaseFromTotal(e, dom))
@@ -1558,7 +1558,7 @@ export default {
const value = parseFloat(input.value) || 0
wanTotal += value
})
-
+
const wanInput = dom.querySelector('input[data-field="wTotal"]')
if (wanInput) {
wanInput.value = wanTotal===0?'0':wanTotal
@@ -1737,7 +1737,7 @@ export default {
const totalInput = dom.querySelector('input[data-field="total"]')
const upperCaseInput = dom.querySelector('input[data-field="upperCaseAmount"]')
-
+
if (totalInput && upperCaseInput) {
this.total = parseFloat(totalInput.value.replace(/¥/g, '')) || 0
upperCaseInput.value = numberToChinese(this.total)
@@ -2098,7 +2098,7 @@ export default {
display: flex;
flex-direction: column;
max-height: 80vh;
-
+
::v-deep .el-dialog__body {
flex: 1;
overflow-y: auto;
diff --git a/src/views/contract/seeContract.vue b/src/views/contract/seeContract.vue
index a19ba24..e0639c6 100644
--- a/src/views/contract/seeContract.vue
+++ b/src/views/contract/seeContract.vue
@@ -4,32 +4,6 @@
-
-
- 合同分类
-
-
-
-
-
-
- 事务类型
-
-
-
-
-
-
- 合同类型
-
-
-
关键字
@@ -69,6 +43,51 @@
@on-change="(e)=>select.year = e"
/>
+
+
+
+ 预算金额
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 合同分类
+
+
+
+
+
+
+ 事务类型
+
+
+
+
+
+
+ 合同类型
+
+
创建日期
@@ -144,14 +163,6 @@
-
-
- 预算金额
-
-
- -
-
-
@@ -218,7 +229,8 @@
-
+
+
-
-
+
+
-
+
@@ -96,6 +98,7 @@ export default {
type: [], // 预算类型
departments: [],
select: {
+ page_size:999,
pageIndex: 1,
year: '',
type: '',
@@ -126,33 +129,6 @@ export default {
align: 'left',
fixed: 'left'
},
- {
- prop: 'type',
- label: '预算类型',
- width: 120,
- formatter: (cell, data, value) => {
- const res = this.type.filter(item => {
- return item.id === value
- })
- return res[0]?.value || '未知'
- }
- },
- {
- prop: 'year',
- label: '所属年份',
- width: 160
- },
- {
- prop: 'plan_department.name',
- label: '相关科室',
- width: 180
- },
- {
- prop: 'content',
- label: '描述',
- align: 'left',
- minWidth: 300
- },
{
prop: 'money',
width: 180,
@@ -199,7 +175,34 @@ export default {
} >
)
}
- }
+ },
+ {
+ prop: 'type',
+ label: '预算类型',
+ width: 120,
+ formatter: (cell, data, value) => {
+ const res = this.type.filter(item => {
+ return item.id === value
+ })
+ return res[0]?.value || '未知'
+ }
+ },
+ {
+ prop: 'year',
+ label: '所属年份',
+ width: 160
+ },
+ {
+ prop: 'plan_department.name',
+ label: '相关科室',
+ width: 180
+ },
+ {
+ prop: 'content',
+ label: '描述',
+ align: 'left',
+ width: 300
+ },
]
}
},
@@ -296,7 +299,7 @@ export default {
async getPlanProgress() {
const res = await getProgress({
- page_size: 10,
+ page_size: this.select.page_size,
page: this.select.pageIndex,
year: this.select.year,
type: this.select.type,
@@ -304,23 +307,72 @@ export default {
top_pid: 1,
...this.select
})
- for (var m of res.list.data) {
- m.pid_info_name = m.pid_info?.name
- }
- this.list =
- mergeTableRow({
- data: res.list.data,
- mergeColNames: ['pid_info_name'], // 需要合并的列,默认合并列相同的数据
- firstMergeColNames: ['pid_info_name'], // 受影响的列,只合并以firstMerge为首的同类型数据
- firstMerge: 'pid_info_name' // 以哪列为基础进行合并,一般为第一列
- })
+ // for (var m of res.list.data) {
+ // m.pid_info_name = m.pid_info?.name
+ // }
+ // this.list =
+ // mergeTableRow({
+ // data: res.list.data,
+ // mergeColNames: ['pid_info_name'], // 需要合并的列,默认合并列相同的数据
+ // firstMergeColNames: ['pid_info_name'], // 受影响的列,只合并以firstMerge为首的同类型数据
+ // firstMerge: 'pid_info_name' // 以哪列为基础进行合并,一般为第一列
+ // })
+ this.list = this.concactPid(res.list.data)
this.total = res.list.total
this.useMoneyTotal = res.use_money_total
this.moneyTotal = res.money
this.updateMoneyTotal = res.update_money
this.rateTotal = this.toper(this.updateMoneyTotal, this.moneyTotal, this.useMoneyTotal)
- console.log(res)
+ console.log("list",this.list)
+ },
+ concactPid(arr){
+ const groupByPid = {};
+ arr.forEach(item => {
+ const key = item.pid;
+ if (!groupByPid[key]) {
+ groupByPid[key] = [];
+ }
+ groupByPid[key].push(item);
+ });
+
+ // 2. 构建合并后的数组
+ const mergedResult = Object.values(groupByPid).map(children => {
+ // 从分组的第一项中获取 pid_info(因同 pid 的 pid_info 相同)
+ const pidInfo = children[0].pid_info;
+
+ // 计算父级的 use_money_total(children 中 use_money_total 之和,null 视为 0)
+ const useMoneyTotal = children.reduce((sum, child) => {
+ const value = child.use_money_total ?? 0; // 处理 null
+ return parseFloat(sum) + parseFloat(value);
+ }, 0);
+
+ // 构建父级对象
+ return {
+ pid: children[0].pid, // 父级 pid 与分组的 pid 一致
+ id:pidInfo.pid+'-'+pidInfo.id,
+ pid_info_name: pidInfo.name,
+ money: parseFloat(pidInfo.money).toFixed(2),
+ type: pidInfo.type,
+ update_money: parseFloat(pidInfo.update_money).toFixed(2),
+ use_money_total: parseFloat(useMoneyTotal).toFixed(2), // 子项总和
+ children: children // 保留所有子项
+ };
+ });
+
+ const arrayWithPer = mergedResult.map(row => {
+ // 计算 per(公式:use_money_total / (update_money || money),处理 null 和 NaN)
+ const useMoneyTotal = Number(row.use_money_total ?? 0); // null 视为 0,转换为数字
+ const denominator = Number(row.update_money) || Number(row.money); // 取 update_money 或 money
+ const calculation_result = isNaN(useMoneyTotal / denominator) ? 0 : useMoneyTotal / denominator;
+
+ return {
+ ...row,
+ calculation_result: calculation_result // 新增 per 字段
+ };
+ });
+ const sortedArray = arrayWithPer.sort((a, b) => b.calculation_result - a.calculation_result);
+ return sortedArray
}
}
}
From 873bedd41af4bd5f36bf5de705c4ed6985ab05d6 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Sat, 26 Jul 2025 18:01:05 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=90=88=E5=90=8C=E4=BC=9A=E7=AD=BE?=
=?UTF-8?q?=E5=A4=84=E7=90=86=20=E6=8E=A5=E5=8F=A3=E6=8D=A2=E6=AD=A3?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.production | 4 +-
.../contract/components/contractSign.vue | 58 +++++++++----------
src/views/contract/contractList.vue | 9 ++-
.../dashboard/components/budgetStatic.vue | 8 ++-
.../statisticalReport/budgetProgress.vue | 18 +++---
5 files changed, 55 insertions(+), 42 deletions(-)
diff --git a/.env.production b/.env.production
index 98c9e90..c262da9 100644
--- a/.env.production
+++ b/.env.production
@@ -4,6 +4,6 @@ ENV = 'production'
# base api
VUE_APP_DOMIAN=''
VUE_APP_BASE_API = ''
-#VUE_APP_OUT_URL = http://192.168.60.18:2021
-VUE_APP_OUT_URL = http://192.168.60.18:8001
+VUE_APP_OUT_URL = http://192.168.60.18:2021
+#VUE_APP_OUT_URL = http://192.168.60.18:8001
VUE_APP_UPLOAD=http://192.168.60.99:9003/api/admin/upload-file
diff --git a/src/views/contract/components/contractSign.vue b/src/views/contract/components/contractSign.vue
index f60a85c..841e226 100644
--- a/src/views/contract/components/contractSign.vue
+++ b/src/views/contract/components/contractSign.vue
@@ -141,7 +141,7 @@
- *其他参与投标单位名称
+ 其他参与投标单位名称
新增
@@ -163,7 +163,7 @@
- *事前询价情况
+ 事前询价情况
@@ -182,7 +182,7 @@
- *事后审计情况
+ 事后审计情况
@@ -201,7 +201,7 @@
- *合同内的支付条款
+ 合同内的支付条款
0) {
- // 判断属性中是否为空
- for (var p of this.form.other_tender_name) {
- if (!p) {
- this.$Message.warning(`投标单位名称不能为空,请补充或删除`)
- return
- }
- }
- }
+ // if(this.form.other_tender_name.length<1){
+ // this.$Message.warning(`请添加其他参与投标单位名称`)
+ // return
+ // }
+ // if(!this.form.quotation_situation){
+ // this.$Message.warning(`事前询价情况不能为空`)
+ // return
+ // }
+ // if(!this.form.audit_situation){
+ // this.$Message.warning(`事后审计情况不能为空`)
+ // return
+ // }
+ // if(!this.form.payment_content){
+ // this.$Message.warning(`合同内的支付条款不能为空`)
+ // return
+ // }
+ // if (this.form.other_tender_name.length > 0) {
+ // // 判断属性中是否为空
+ // for (var p of this.form.other_tender_name) {
+ // if (!p) {
+ // this.$Message.warning(`投标单位名称不能为空,请补充或删除`)
+ // return
+ // }
+ // }
+ // }
}
if(this.contract.is_end===1){
diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue
index 51294e2..212b86e 100644
--- a/src/views/contract/contractList.vue
+++ b/src/views/contract/contractList.vue
@@ -686,6 +686,8 @@
:value="item.id"
/>
+
{
select.page = e;
getPlanProgress();
@@ -49,9 +50,11 @@ export default {
type: [],
drawer: false,
select: {
- page_size: 10,
+ page_size: 100,
page: 1,
top_pid: 1,
+ sort_name:'pid',
+ sort_type:'ASC'
},
total: 0,
list: [],
@@ -160,7 +163,7 @@ export default {
},
async getPlanProgress(val) {
const res = await getProgress({
- year:val,
+ year:this.year,
...this.select
})
for (let m of res.list.data) {
@@ -235,6 +238,7 @@ export default {
watch: {
year: {
handler:function(val) {
+ console.log("val",val)
this.getPlanProgress(val)
},
immediate: true
diff --git a/src/views/statisticalReport/budgetProgress.vue b/src/views/statisticalReport/budgetProgress.vue
index 51a2e99..be67a69 100644
--- a/src/views/statisticalReport/budgetProgress.vue
+++ b/src/views/statisticalReport/budgetProgress.vue
@@ -150,13 +150,16 @@ export default {
return (
{
- this.$router.push({
- path: '/contract/paymentRegistrationList_1',
- query: {
- plan_id: row.id,
- plan_name: `[${row.year}]-${row.name}`
- }
- })
+ if(!row.isParent){
+ this.$router.push({
+ path: '/contract/paymentRegistrationList_1',
+ query: {
+ plan_id: row.id,
+ plan_name: `[${row.year}]-${row.name}`
+ }
+ })
+ }
+
}
}}>{ row.use_money_total }
)
@@ -354,6 +357,7 @@ export default {
pid_info_name: pidInfo.name,
money: parseFloat(pidInfo.money).toFixed(2),
type: pidInfo.type,
+ isParent:true,
update_money: parseFloat(pidInfo.update_money).toFixed(2),
use_money_total: parseFloat(useMoneyTotal).toFixed(2), // 子项总和
children: children // 保留所有子项