From 56da388794a933b4bbea3fef7c6df888b5e1b3f4 Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Fri, 7 Apr 2023 17:31:01 +0800
Subject: [PATCH] 2023-4-7
---
src/api/achievements/types.js | 34 +
src/api/out/index.js | 13 +
src/components/XyDialog/index.vue | 162 ++-
src/layout/index.vue | 2 +-
src/main.js | 8 +
src/utils/request.js | 2 +-
.../achievements/components/addTypes.vue | 199 ++++
src/views/achievements/types.vue | 84 ++
src/views/budget/budgetList.vue | 2 +-
src/views/budget/point.vue | 77 ++
.../contract/components/detailContract.vue | 924 ++++++++++--------
src/views/contract/contractList.vue | 21 +-
src/views/dashboard/index.vue | 8 +-
vue.config.js | 4 +-
14 files changed, 1104 insertions(+), 436 deletions(-)
create mode 100644 src/api/achievements/types.js
create mode 100644 src/api/out/index.js
create mode 100644 src/views/achievements/components/addTypes.vue
create mode 100644 src/views/achievements/types.vue
create mode 100644 src/views/budget/point.vue
diff --git a/src/api/achievements/types.js b/src/api/achievements/types.js
new file mode 100644
index 0000000..1af3442
--- /dev/null
+++ b/src/api/achievements/types.js
@@ -0,0 +1,34 @@
+import request from '@/utils/request'
+import * as url from 'url'
+
+export function index(params) {
+ return request({
+ method: "get",
+ url: "/api/admin/target_type/index",
+ params
+ })
+}
+
+export function show(params) {
+ return request({
+ method: "get",
+ url: "/api/admin/target_type/show",
+ params
+ })
+}
+
+export function save(data) {
+ return request({
+ method: "post",
+ url: "/api/admin/target_type/save",
+ data
+ })
+}
+
+export function destroy(params) {
+ return request({
+ method: "get",
+ url: "/api/admin/target_type/destroy",
+ params
+ })
+}
diff --git a/src/api/out/index.js b/src/api/out/index.js
new file mode 100644
index 0000000..ba3bec4
--- /dev/null
+++ b/src/api/out/index.js
@@ -0,0 +1,13 @@
+import request from "@/utils/request"
+export function getOutDetail({ tbname,out_contract_id }) {
+ return request({
+ method: 'get',
+ url: '/index.php',
+ requestBase: '/old',
+ params: {
+ s: "/Api/flowDetail",
+ tbname,
+ out_contract_id
+ }
+ })
+}
diff --git a/src/components/XyDialog/index.vue b/src/components/XyDialog/index.vue
index 54604b9..2a0f5b0 100644
--- a/src/components/XyDialog/index.vue
+++ b/src/components/XyDialog/index.vue
@@ -41,20 +41,45 @@ export default {
},
methods: {
footerRender(){
- return (
-
-
-
-
- )
+ if(this.type === 'form'){
+ return (
+
+
+
+
+ )
+ }
+ if(this.type === 'normal'){
+ return (
+
+
+
+
+ )
+ }
},
showChange(e){
this.$emit('update:isShow',e)
},
- cancelClick(){
- this.$emit('update:isShow',false)
+ validate(){
+ return new Promise((resolve,reject)=>{
+ this.$refs['elForm'].validate().then(res=>{
+ if(res){
+ resolve(res)
+ }else{
+ reject(res)
+ }
+ }).catch(err=>{
+ reject(err)
+ this.$Message.warning({
+ content:'请填写完整信息',
+ duration:1
+ })
+ })
+ })
},
reset(){
+ this.$emit('reset')
if(this.type === 'normal'){
return
}
@@ -75,6 +100,16 @@ export default {
},
okClick(){
this.$emit('on-ok')
+ },
+ clearValidate(){
+ this.$refs['elForm'].clearValidate()
+ }
+ },
+ watch:{
+ isShow(val){
+ if(!val && this.type === 'form'){
+ this.reset()
+ }
}
},
render(h) {
@@ -88,7 +123,7 @@ export default {
footer slot:
footerContent
*/
- const {cancelClick,okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this
+ const {okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this
return (
{
- formItems.push(
-
- {eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)}
-
- )
- })
+ for(let key in form){
+ if(form.hasOwnProperty(key) && $scopedSlots[key]){
+ formItems.push(
+
+ {eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)}
+
+ )
+ }
+ }
return (
- {$scopedSlots.normalContent ? $scopedSlots.normalContent() : ''}
+ {$scopedSlots.default ? $scopedSlots.default() : ''}
)
}
},
+ header(){
+ if($scopedSlots.headerContent){
+ return $scopedSlots.headerContent()
+ }
+ },
footer(){
{
- if(type === 'form') return ($scopedSlots.footerContent ? $scopedSlots.footerContent() : footerRender())
- if(type === 'normal') return (
-
-
-
-
- )
+ if(type === 'form' || type === 'normal') return ($scopedSlots.footerContent ? $scopedSlots.footerContent() : footerRender())
}
}
}}>
@@ -167,6 +203,72 @@ export default {
diff --git a/src/views/achievements/types.vue b/src/views/achievements/types.vue
new file mode 100644
index 0000000..c7c5376
--- /dev/null
+++ b/src/views/achievements/types.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+ 关键字
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/budget/budgetList.vue b/src/views/budget/budgetList.vue
index 8fe7e4e..7b513ed 100644
--- a/src/views/budget/budgetList.vue
+++ b/src/views/budget/budgetList.vue
@@ -28,7 +28,7 @@
-
+
diff --git a/src/views/budget/point.vue b/src/views/budget/point.vue
new file mode 100644
index 0000000..568c8cf
--- /dev/null
+++ b/src/views/budget/point.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+ 关键字
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/contract/components/detailContract.vue b/src/views/contract/components/detailContract.vue
index c6e8598..eedaaff 100644
--- a/src/views/contract/components/detailContract.vue
+++ b/src/views/contract/components/detailContract.vue
@@ -1,51 +1,73 @@
-
+
项目基本信息
项目名称
-
{{detail.name}}
+
{{ detail.name }}
项目类型
-
{{typeFormatter(detail.type)}}
+
+ {{ typeFormatter(detail.type) }}
+
-
+
采购形式
-
{{detail.purchase_way.value}}
+
+ {{ detail.purchase_way.value }}
+
采购方式
-
{{detail.purchase_type.value}}
+
+ {{ detail.purchase_type.value }}
+
-
+
签订时间
-
{{detail.date}}
+
{{ detail.date }}
服务时间
-
{{detail.start_date}}至{{detail.end_date}}
+
+ {{ detail.start_date }}至{{ detail.end_date }}
+
项目预算
-
{{moneyFormat(detail.plan_price)}}
+
+ {{ moneyFormat(detail.plan_price) }}
+
(元)
资金渠道
-
{{moneyWayFormatter(detail.money_way_detail)}}
+
+ {{ moneyWayFormatter(detail.money_way_detail) }}
+
关联预算计划
-
+
@@ -55,43 +77,138 @@
签订信息
合同金额
-
{{moneyFormat(detail.money)}}
+
+ {{ moneyFormat(detail.money) }}
+
(元)
-
+
承包商\供应商
-
{{detail.supply}}
+
{{ detail.supply }}
执行部门
-
{{detail.carry_department}}
+
+ {{ detail.carry_department }}
+
+
+
+
+
+
合同会签信息
+
+
合同金额
+
+ {{ moneyFormat(outContractDetail.flow_detail.total) }}
+
+
(元)
+
+
+
+
甲方
+
+ {{ outContractDetail.flow_detail.jiafang }}
+
+
+
+
乙方
+
+ {{ outContractDetail.flow_detail.yifang }}
+
+
+
+
+
+
采购信息
+
+
名称
+
+ {{ outCaigouDetail.flow_detail.content_name }}
+
+
+
+
规格
+
+ {{ outCaigouDetail.flow_detail.content_guige }}
+
+
+
+
类型
+
+ {{ outCaigouDetail.flow_detail.type }}
+
+
+
+
预算
+
+ {{ moneyFormat(outCaigouDetail.flow_detail.yusuan) }}
付款计划
-
{$refs['detailContractSign'].planId = row.id;$refs['detailContractSign'].isShow = true}">
+ @editor="
+ (row) => {
+ $refs['detailContractSign'].planId = row.id;
+ $refs['detailContractSign'].isShow = true;
+ }
+ "
+ >
日志
-
+
@@ -104,434 +221,451 @@
-
+
diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue
index a439764..f3ee6fb 100644
--- a/src/views/contract/contractList.vue
+++ b/src/views/contract/contractList.vue
@@ -264,8 +264,9 @@
+ (水电煤、报刊订阅、网络通讯、车辆使用等费用付款)
-
(水电煤、报刊订阅、网络通讯、车辆使用等费用付款)
+
@@ -1385,7 +1386,7 @@ export default {
}
let res = await getOatoken()
let url =
- `${process.env.VUE_APP_OUT_URL}?s=/flow/add/modid/8&oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
+ `${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/8&oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
let bidding = window.open(url, 'bidding',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
@@ -1400,11 +1401,18 @@ export default {
"type": this.type.filter(item => {
return item.value === row.type
})[0]?.label,
- "yusuan": row?.plan_price
+ "yusuan": row?.plan_price.toString(),
+ "zijinlaiyuan":row.money_way_detail.reduce((prev,cur,index) => {
+ if(index === 0) {
+ return cur.value
+ }else{
+ return prev + "," + cur.value
+ }
+ },"")
}
let res = await getOatoken()
let url =
- `${process.env.VUE_APP_OUT_URL}?s=/flow/add/modid/8&oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
+ `${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/8&username=${this.$store.state.user.username}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
let buyProcess = window.open(url, 'buyProcess',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
@@ -1419,7 +1427,7 @@ export default {
}
let res = await getOatoken()
let url =
- `${process.env.VUE_APP_OUT_URL}?s=/flow/add/modid/9&oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
+ `${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/9&username=${this.$store.state.user.username}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
let signProcess = window.open(url, 'signProcess',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
@@ -1797,4 +1805,7 @@ export default {
content: '(元)'
}
}
+.xy-table-item-label{
+ width: 200px;
+}
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 605cfe5..96c7aa0 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -12,20 +12,20 @@
-
{{moneyFormat(statistic.progress.money_total_1)}}
+
{{moneyFormat(statistic.progress ? statistic.progress.money_total_1 : 0)}}
年初预算合计金额
-
{{moneyFormat(statistic.progress.money_total_2)}}
+
{{moneyFormat(statistic.progress ? statistic.progress.money_total_2 : 0)}}
调整后预算合计金额
-
{{moneyFormat(statistic.progress.use_money_total)}}
+
{{moneyFormat(statistic.progress? statistic.progress.use_money_total : 0)}}
已支付金额
- {{toper(statistic.progress.money_total_1,statistic.progress.money_total_2,statistic.progress.use_money_total)}}%
+ {{toper(statistic.progress ? statistic.progress.money_total_1 : 0,statistic.progress ? statistic.progress.money_total_2 : 0,statistic.progress? statistic.progress.use_money_total : 0)}}%
进展率
diff --git a/vue.config.js b/vue.config.js
index 4e90011..20c9e5c 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -50,7 +50,7 @@ module.exports = {
target: process.env.VUE_APP_OUT_URL,
changeOrigin: true, //配置跨域
pathRewrite: {
- ['^/oa' ]: process.env.VUE_APP_OUT_URL
+ ['^/oa']: process.env.VUE_APP_OUT_URL
}
},
[process.env.VUE_APP_DOMIAN]: {
@@ -64,7 +64,7 @@ module.exports = {
target: process.env.VUE_APP_OUT_OLD,
changeOrigin: true, //配置跨域
pathRewrite: {
- ['^' + process.env.VUE_APP_OUT_OLD]: process.env.VUE_APP_OUT_OLD
+ ['^/old']: process.env.VUE_APP_OUT_OLD
}
}
}