From 53f3c86126eb3f9511b057621592710480a3919b Mon Sep 17 00:00:00 2001
From: "271556543@qq.com" <271556543@qq.com>
Date: Thu, 21 Jul 2022 17:36:19 +0800
Subject: [PATCH] 2022.7.21
---
src/api/contract/contract.js | 1 +
src/api/contractSign/contractSign.js | 9 +
src/api/dashboard/notice.js | 9 +
src/api/paymentRegistration/fundLog.js | 17 +
src/components/XyTable/index.vue | 26 +-
src/styles/index.scss | 4 +
.../contract/components/contractSign.vue | 68 ++++
.../contract/components/detailContract.vue | 253 ++++++++++++
.../contract/components/editorContract.vue | 70 ++--
.../components/paymentRegistration.vue | 333 ++++++++++++++++
src/views/contract/contractList.vue | 370 ++----------------
.../contract/paymentRegistrationList.vue | 63 ++-
src/views/dashboard/index.vue | 9 +
13 files changed, 861 insertions(+), 371 deletions(-)
create mode 100644 src/api/contractSign/contractSign.js
create mode 100644 src/api/dashboard/notice.js
create mode 100644 src/api/paymentRegistration/fundLog.js
create mode 100644 src/views/contract/components/contractSign.vue
create mode 100644 src/views/contract/components/detailContract.vue
create mode 100644 src/views/contract/components/paymentRegistration.vue
diff --git a/src/api/contract/contract.js b/src/api/contract/contract.js
index 8a093ed..c680e6b 100644
--- a/src/api/contract/contract.js
+++ b/src/api/contract/contract.js
@@ -39,3 +39,4 @@ export function editorContract(data){
data
})
}
+
diff --git a/src/api/contractSign/contractSign.js b/src/api/contractSign/contractSign.js
new file mode 100644
index 0000000..c4177f6
--- /dev/null
+++ b/src/api/contractSign/contractSign.js
@@ -0,0 +1,9 @@
+import request from "@/utils/request";
+
+export function addContractSign(data){
+ return request({
+ method:'post',
+ url:'/api/admin/sign_plan/store',
+ data
+ })
+}
diff --git a/src/api/dashboard/notice.js b/src/api/dashboard/notice.js
new file mode 100644
index 0000000..ee08ff5
--- /dev/null
+++ b/src/api/dashboard/notice.js
@@ -0,0 +1,9 @@
+import request from "@/utils/request";
+
+export function getNotice(params){
+ return request({
+ method:'get',
+ url:'/api/admin/notice/index',
+ params
+ })
+}
diff --git a/src/api/paymentRegistration/fundLog.js b/src/api/paymentRegistration/fundLog.js
new file mode 100644
index 0000000..e60fb0d
--- /dev/null
+++ b/src/api/paymentRegistration/fundLog.js
@@ -0,0 +1,17 @@
+import request from "@/utils/request";
+
+export function getFundLog(params){
+ return request({
+ method:'get',
+ url:'/api/admin/fund_log/index',
+ params
+ })
+}
+
+export function addFundLog(data){
+ return request({
+ method:'post',
+ url:"/api/admin/fund_log/store",
+ data
+ })
+}
diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue
index cb52b2a..91b978e 100644
--- a/src/components/XyTable/index.vue
+++ b/src/components/XyTable/index.vue
@@ -82,8 +82,22 @@ export default {
editorClick(row){
this.$emit('editor',row)
},
+ selectClick(selection, row){
+ this.$emit('select',selection, row)
+ },
createIndexRow(){
return
+ },
+ toggleRowSelection(row){
+ this.$nextTick(()=>{
+ this.$refs.table.toggleRowSelection(row);
+ })
+ },
+ clearSelection(){
+ this.$refs.table.clearSelection();
+ },
+ toggleAllSelection(){
+ this.$refs.table.toggleAllSelection()
}
},
created() {
@@ -92,11 +106,12 @@ export default {
mounted() {
},
render(h) {
- let {height,createIndexRow,tableStyle,treeProps,showSummary,showHeader,$scopedSlots,showIndex,defaultExpandAll,headerCellStyle,headerRowStyle,rowStyle,cellStyle,indent,tableHeight,tableItem,list,deleteClick,editorClick} = this
+ let {selectClick,height,createIndexRow,tableStyle,treeProps,showSummary,showHeader,$scopedSlots,showIndex,defaultExpandAll,headerCellStyle,headerRowStyle,rowStyle,cellStyle,indent,tableHeight,tableItem,list,deleteClick,editorClick} = this
return (
{ tableItem && tableItem.length>0 ?
(
+ fit={true}
+ on={{['select']:selectClick}}>
{
//序号
showIndex ? createIndexRow() : ''
@@ -171,7 +187,8 @@ export default {
label={item1.label}
width={item1.width ?? 'auto'}
min-width={item1.minWidth ?? item1.width}
- sortable={item1.sortable ?? true}>
+ sortable={item1.sortable ?? true}
+ type={item1.type ?? ''}>
)
}
@@ -190,7 +207,8 @@ export default {
align={item.align ?? 'center'}
label={item.label}
prop={item.prop}
- sortable={item.sortable ?? true}>
+ sortable={item.sortable ?? true}
+ type={item.type ?? ''}>
)
}
diff --git a/src/styles/index.scss b/src/styles/index.scss
index c376d83..8905018 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -183,3 +183,7 @@ top: 41px !important;
background: #ddd;
}
+.app-main{
+ background: #EFF2F9;
+}
+
diff --git a/src/views/contract/components/contractSign.vue b/src/views/contract/components/contractSign.vue
new file mode 100644
index 0000000..e127ec7
--- /dev/null
+++ b/src/views/contract/components/contractSign.vue
@@ -0,0 +1,68 @@
+
+
+
+
+
+
合同信息
+
+
合同名称
+
{{contract.name}}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/contract/components/detailContract.vue b/src/views/contract/components/detailContract.vue
new file mode 100644
index 0000000..956f884
--- /dev/null
+++ b/src/views/contract/components/detailContract.vue
@@ -0,0 +1,253 @@
+
+
+
+
+
+
+
项目基本信息
+
+
项目名称
+
{{detail.name}}
+
+
+
项目类型
+
{{detail.type}}
+
+
+
+
采购形式
+
{{detail && detail.purchase_way.value}}
+
+
+
采购方式
+
{{detail && detail.purchase_type.value}}
+
+
+
+
项目预算
+
{{detail.plan_price}}
+
(万)
+
+
+
资金渠道
+
{{detail && detail.money_way.value}}
+
+
+
+
+
签订信息
+
+
合同金额
+
{{detail.money}}
+
(万)
+
+
+
+
承包商\供应商
+
{{detail.supply}}
+
+
+
执行部门
+
{{detail.carry_department}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/contract/components/editorContract.vue b/src/views/contract/components/editorContract.vue
index 13268bf..0c991ab 100644
--- a/src/views/contract/components/editorContract.vue
+++ b/src/views/contract/components/editorContract.vue
@@ -22,9 +22,9 @@
- *采购类型
+ *采购形式
-
- *采购形式
+ *采购方式
-
+
@@ -91,7 +91,7 @@
-
+
@@ -169,13 +169,7 @@ export default {
{
sortable:false,
width:36,
- customFn:(row)=>{
- return (
-
- this.selectPlan(e,row)}}>
-
- )
- }
+ type:"selection"
},
{
label:"分类",
@@ -209,30 +203,22 @@ export default {
}
},
methods: {
- //预算计划表默认选择
- isInArray(id){
- this.detail.plan.map(item=>{
- return item.value.plan_id === id ? true : false
- })
- },
//选择计划
- selectPlan(e,row){
- if(e){
- this.detail.plan.push({
- label:row.name,
- value:{
- plan_id:row.id,
- use_money:row.useMoney ?? row.money,
- new_money:row.money
+ selectPlan(sel,row){
+ if(sel){
+ this.detail.plan = sel.map(item => {
+ return {
+ label:item.name,
+ value:{
+ plan_id:item.id,
+ use_money:item.useMoney ?? item.money,
+ new_money:item.money
+ }
}
})
}else{
- this.detail.plan.map((item,index)=>{
- if(item.value.plan_id === row.id){
- this.detail.plan.splice(index,1)
- }
- })
+ this.detail.plan = []
}
},
delPlan(val){
@@ -247,11 +233,27 @@ export default {
let res = await getBudget({name:this.planSearch,page_size:10,page:this.plansPageIndex})
this.plans = res.data
this.planTotal = res.total
+
+ this.toggleSelection(this.detail.plan.map(item => {
+ return item.value.plan_id
+ }))
},
planPageChange(e){
this.plansPageIndex = e
this.getBudgets()
},
+ //默认选择计划
+ toggleSelection(plans) {
+ if (plans) {
+ this.plans.filter(plan => {
+ return plans.includes(plan.id)
+ }).map(row => {
+ this.$refs.editorPlanTable.toggleRowSelection(row)
+ })
+ } else {
+ this.$refs.editorPlanTable.clearSelection()
+ }
+ },
async getDetail(id){
let res = await detailContract({id:id})
this.contrantId = res.id
@@ -296,10 +298,12 @@ export default {
})
this.$emit('success')
})
- }
+ },
+
},
mounted() {
- }
+
+ },
}
diff --git a/src/views/contract/components/paymentRegistration.vue b/src/views/contract/components/paymentRegistration.vue
new file mode 100644
index 0000000..e55f508
--- /dev/null
+++ b/src/views/contract/components/paymentRegistration.vue
@@ -0,0 +1,333 @@
+
+
+
+
+
+
+
+
合同名称
+
{{contract.name}}
+
+
+
合同金额
+
{{contract.money}}
+
+
+
+
已付金额
+
{{totalMoney()}} (元)
+
+
+
支付占比
+
{{percentPay()}}%
+
+
+
已付笔数
+
{{payment.length}}
+
+
+ 点击查看列表
+
+
+
+
+
+
+
+ 暂无已付笔数
+
+
+
+
+
+
+
+
+
+ *申请付款金额
+
+
+
+
+
+
+
+ *本期扣款金额
+
+
+
+
+
+
+
+ *实际支付金额
+
+
+
+
+
+
+
+ *款项类型
+
+
+
+
+
+
+
+
+
+
+ *是否最后一笔
+
+
+
+
+
+
+
+
+
+
+
+ scope.row.useMoney = e"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue
index 7f74a83..14b820d 100644
--- a/src/views/contract/contractList.vue
+++ b/src/views/contract/contractList.vue
@@ -72,7 +72,6 @@
:parser="value => value.replace(/$s?|(,*)/g, '')"/>
-