Parcourir la source

完善移动端,新增合同列表回款进度、付款进度

余思翰 il y a 2 mois
Parent
révision
863b48e1ae

+ 40
- 29
oa-ui-app/App.vue Voir le fichier

@@ -1,34 +1,45 @@
1 1
 <script>
2
-  import config from './config'
3
-  import store from '@/store'
4
-  import { getToken } from '@/utils/auth'
2
+	import config from './config'
3
+	import store from '@/store'
4
+	import {
5
+		getToken
6
+	} from '@/utils/auth'
5 7
 
6
-  export default {
7
-    onLaunch: function() {
8
-      this.initApp()
9
-    },
10
-    methods: {
11
-      // 初始化应用
12
-      initApp() {
13
-        // 初始化应用配置
14
-        this.initConfig()
15
-        // 检查用户登录状态
16
-        //#ifdef H5
17
-        this.checkLogin()
18
-        //#endif
19
-      },
20
-      initConfig() {
21
-        this.globalData.config = config
22
-      },
23
-      checkLogin() {
24
-        if (!getToken()) {
25
-          this.$tab.reLaunch('/pages/login') 
26
-        }
27
-      }
28
-    }
29
-  }
8
+	export default {
9
+		onLaunch: function() {
10
+			this.initApp();
11
+			uni.addInterceptor("reLaunch", {
12
+				invoke(e) {
13
+					// 因为刷新后进行后退会调用这个路径,所以需要劫持然后调用back方法。
14
+					if (e.url == "/") {
15
+						history.back();
16
+						return false;
17
+					}
18
+				},
19
+			});
20
+		},
21
+		methods: {
22
+			// 初始化应用
23
+			initApp() {
24
+				// 初始化应用配置
25
+				this.initConfig()
26
+				// 检查用户登录状态
27
+				//#ifdef H5
28
+				this.checkLogin()
29
+				//#endif
30
+			},
31
+			initConfig() {
32
+				this.globalData.config = config
33
+			},
34
+			checkLogin() {
35
+				if (!getToken()) {
36
+					this.$tab.reLaunch('/pages/login')
37
+				}
38
+			}
39
+		}
40
+	}
30 41
 </script>
31 42
 
32 43
 <style lang="scss">
33
-  @import '@/static/scss/index.scss'
34
-</style>
44
+	@import '@/static/scss/index.scss'
45
+</style>

+ 9
- 0
oa-ui-app/api/system/user.js Voir le fichier

@@ -1,5 +1,6 @@
1 1
 import upload from '@/utils/upload'
2 2
 import request from '@/utils/request'
3
+import { parseStrEmpty } from '@/utils/common.js'
3 4
 
4 5
 // 用户密码重置
5 6
 export function updateUserPwd(oldPassword, newPassword) {
@@ -22,6 +23,14 @@ export function getUserProfile() {
22 23
   })
23 24
 }
24 25
 
26
+// 查询用户详细
27
+export function getUser(userId) {
28
+  return request({
29
+    url: '/system/user/' + parseStrEmpty(userId),
30
+    method: 'get'
31
+  })
32
+}
33
+
25 34
 // 修改用户个人信息
26 35
 export function updateUserProfile(data) {
27 36
   return request({

+ 1
- 1
oa-ui-app/config.js Voir le fichier

@@ -1,7 +1,7 @@
1 1
 // 应用全局配置
2 2
 module.exports = {
3 3
   // baseUrl: 'https://vue.ruoyi.vip/prod-api',
4
-  baseUrl: 'http://localhost:8080',
4
+  baseUrl: 'http://192.168.28.119:8080',
5 5
   // 应用信息
6 6
   appInfo: {
7 7
     // 应用名称

+ 3
- 0
oa-ui-app/main.js Voir le fichier

@@ -3,7 +3,10 @@ import App from './App'
3 3
 import store from './store' // store
4 4
 import plugins from './plugins' // plugins
5 5
 import './permission' // permission
6
+import uView from './uni_modules/uview-ui'
7
+
6 8
 Vue.use(plugins)
9
+Vue.use(uView)
7 10
 
8 11
 Vue.config.productionTip = false
9 12
 Vue.prototype.$store = store

+ 131
- 96
oa-ui-app/pages.json Voir le fichier

@@ -1,97 +1,132 @@
1 1
 {
2
-  "pages": [{
3
-    "path": "pages/login",
4
-    "style": {
5
-      "navigationBarTitleText": "登录"
6
-    }
7
-  }, {
8
-    "path": "pages/index",
9
-    "style": {
10
-      "navigationBarTitleText": "CMC综合办公系统移动端",
11
-      "navigationStyle": "custom"
12
-    }
13
-  }, {
14
-    "path": "pages/work/index",
15
-    "style": {
16
-      "navigationBarTitleText": "工作台"
17
-    }
18
-  }, {
19
-    "path": "pages/mine/index",
20
-    "style": {
21
-      "navigationBarTitleText": "我的"
22
-    }
23
-  }, {
24
-    "path": "pages/mine/avatar/index",
25
-    "style": {
26
-      "navigationBarTitleText": "修改头像"
27
-    }
28
-  }, {
29
-    "path": "pages/mine/info/index",
30
-    "style": {
31
-      "navigationBarTitleText": "个人信息"
32
-    }
33
-  }, {
34
-    "path": "pages/mine/info/edit",
35
-    "style": {
36
-      "navigationBarTitleText": "编辑资料"
37
-    }
38
-  }, {
39
-    "path": "pages/mine/pwd/index",
40
-    "style": {
41
-      "navigationBarTitleText": "修改密码"
42
-    }
43
-  }, {
44
-    "path": "pages/mine/setting/index",
45
-    "style": {
46
-      "navigationBarTitleText": "应用设置"
47
-    }
48
-  }, {
49
-    "path": "pages/mine/help/index",
50
-    "style": {
51
-      "navigationBarTitleText": "常见问题"
52
-    }
53
-  }, {
54
-    "path": "pages/mine/about/index",
55
-    "style": {
56
-      "navigationBarTitleText": "关于我们"
57
-    }
58
-  }, {
59
-    "path": "pages/common/webview/index",
60
-    "style": {
61
-      "navigationBarTitleText": "浏览网页"
62
-    }
63
-  }, {
64
-    "path": "pages/common/textview/index",
65
-    "style": {
66
-      "navigationBarTitleText": "浏览文本"
67
-    }
68
-  }],
69
-  "tabBar": {
70
-    "color": "#000000",
71
-    "selectedColor": "#000000",
72
-    "borderStyle": "white",
73
-    "backgroundColor": "#ffffff",
74
-    "list": [{
75
-        "pagePath": "pages/index",
76
-        "iconPath": "static/images/tabbar/home.png",
77
-        "selectedIconPath": "static/images/tabbar/home_.png",
78
-        "text": "首页"
79
-      }, {
80
-        "pagePath": "pages/work/index",
81
-        "iconPath": "static/images/tabbar/work.png",
82
-        "selectedIconPath": "static/images/tabbar/work_.png",
83
-        "text": "工作台"
84
-      }, {
85
-        "pagePath": "pages/mine/index",
86
-        "iconPath": "static/images/tabbar/mine.png",
87
-        "selectedIconPath": "static/images/tabbar/mine_.png",
88
-        "text": "我的"
89
-      }
90
-    ]
91
-  },
92
-  "globalStyle": {
93
-    "navigationBarTextStyle": "black",
94
-    "navigationBarTitleText": "RuoYi",
95
-    "navigationBarBackgroundColor": "#FFFFFF"
96
-  }
97
-}
2
+	"pages": [{
3
+			"path": "pages/login",
4
+			"style": {
5
+				"navigationBarTitleText": "登录"
6
+			}
7
+		}, {
8
+			"path": "pages/index",
9
+			"style": {
10
+				"navigationBarTitleText": "CMC综合办公系统移动端",
11
+				"navigationStyle": "custom"
12
+			}
13
+		}, {
14
+			"path": "pages/work/index",
15
+			"style": {
16
+				"navigationBarTitleText": "工作台"
17
+			}
18
+		}, {
19
+			"path": "pages/mine/index",
20
+			"style": {
21
+				"navigationBarTitleText": "我的"
22
+			}
23
+		}, {
24
+			"path": "pages/mine/avatar/index",
25
+			"style": {
26
+				"navigationBarTitleText": "修改头像"
27
+			}
28
+		}, {
29
+			"path": "pages/mine/info/index",
30
+			"style": {
31
+				"navigationBarTitleText": "个人信息"
32
+			}
33
+		}, {
34
+			"path": "pages/mine/info/edit",
35
+			"style": {
36
+				"navigationBarTitleText": "编辑资料"
37
+			}
38
+		}, {
39
+			"path": "pages/mine/pwd/index",
40
+			"style": {
41
+				"navigationBarTitleText": "修改密码"
42
+			}
43
+		}, {
44
+			"path": "pages/mine/setting/index",
45
+			"style": {
46
+				"navigationBarTitleText": "应用设置"
47
+			}
48
+		}, {
49
+			"path": "pages/mine/help/index",
50
+			"style": {
51
+				"navigationBarTitleText": "常见问题"
52
+			}
53
+		}, {
54
+			"path": "pages/mine/about/index",
55
+			"style": {
56
+				"navigationBarTitleText": "关于我们"
57
+			}
58
+		}, {
59
+			"path": "pages/common/webview/index",
60
+			"style": {
61
+				"navigationBarTitleText": "浏览网页"
62
+			}
63
+		}, {
64
+			"path": "pages/common/textview/index",
65
+			"style": {
66
+				"navigationBarTitleText": "浏览文本"
67
+			}
68
+		},
69
+		{
70
+			"path": "pages/message/index",
71
+			"style": {
72
+				"navigationBarTitleText": "消息",
73
+				"enablePullDownRefresh": true
74
+			}
75
+		},
76
+		{
77
+			"path": "pages/message/apply/apply",
78
+			"style": {
79
+				"navigationBarTitleText": "待审列表",
80
+				"enablePullDownRefresh": true
81
+			}
82
+		},
83
+		{
84
+			"path" : "pages/message/apply/detail",
85
+			"style" : 
86
+			{
87
+				"navigationBarTitleText" : "表单信息"
88
+			}
89
+		},
90
+		{
91
+			"path" : "pages/message/apply/components/declare/declare",
92
+			"style" : 
93
+			{
94
+				"navigationBarTitleText" : ""
95
+			}
96
+		}
97
+	],
98
+	"tabBar": {
99
+		"color": "#000000",
100
+		"selectedColor": "#000000",
101
+		"borderStyle": "white",
102
+		"backgroundColor": "#ffffff",
103
+		"list": [{
104
+				"pagePath": "pages/message/index",
105
+				"iconPath": "static/images/tabbar/msg_1.png",
106
+				"selectedIconPath": "static/images/tabbar/msg_2.png",
107
+				"text": "消息"
108
+			},
109
+			{
110
+				"pagePath": "pages/index",
111
+				"iconPath": "static/images/tabbar/home.png",
112
+				"selectedIconPath": "static/images/tabbar/home_.png",
113
+				"text": "项目"
114
+			}, {
115
+				"pagePath": "pages/work/index",
116
+				"iconPath": "static/images/tabbar/apply_1.png",
117
+				"selectedIconPath": "static/images/tabbar/apply_2.png",
118
+				"text": "工作台"
119
+			}, {
120
+				"pagePath": "pages/mine/index",
121
+				"iconPath": "static/images/tabbar/my_1.png",
122
+				"selectedIconPath": "static/images/tabbar/my_2.png",
123
+				"text": "我的"
124
+			}
125
+		]
126
+	},
127
+	"globalStyle": {
128
+		"navigationBarTextStyle": "black",
129
+		"navigationBarTitleText": "RuoYi",
130
+		"navigationBarBackgroundColor": "#FFFFFF"
131
+	}
132
+}

+ 10
- 8
oa-ui-app/pages/login.vue Voir le fichier

@@ -14,23 +14,23 @@
14 14
         <view class="iconfont icon-password icon"></view>
15 15
         <input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
16 16
       </view>
17
-      <view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
17
+      <!-- <view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
18 18
         <view class="iconfont icon-code icon"></view>
19 19
         <input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
20 20
         <view class="login-code"> 
21 21
           <image :src="codeUrl" @click="getCode" class="login-code-img"></image>
22 22
         </view  >
23
-      </view>
23
+      </view> -->
24 24
       <view class="action-btn">
25 25
         <button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
26 26
       </view>
27 27
     </view>
28 28
 
29
-    <view class="xieyi text-center">
29
+    <!-- <view class="xieyi text-center">
30 30
       <text class="text-grey1">登录即代表同意</text>
31 31
       <text @click="handleUserAgrement" class="text-blue">《用户协议》</text>
32 32
       <text @click="handlePrivacy" class="text-blue">《隐私协议》</text>
33
-    </view>
33
+    </view> -->
34 34
   </view>
35 35
 </template>
36 36
 
@@ -81,9 +81,11 @@
81 81
           this.$modal.msgError("请输入您的账号")
82 82
         } else if (this.loginForm.password === "") {
83 83
           this.$modal.msgError("请输入您的密码")
84
-        } else if (this.loginForm.code === "" && this.captchaEnabled) {
85
-          this.$modal.msgError("请输入验证码")
86
-        } else {
84
+        } 
85
+				// else if (this.loginForm.code === "" && this.captchaEnabled) {
86
+    //       this.$modal.msgError("请输入验证码")
87
+    //     } 
88
+				else {
87 89
           this.$modal.loading("登录中,请耐心等待...")
88 90
           this.pwdLogin()
89 91
         }
@@ -103,7 +105,7 @@
103 105
       loginSuccess(result) {
104 106
         // 设置用户信息
105 107
         this.$store.dispatch('GetInfo').then(res => {
106
-          this.$tab.reLaunch('/pages/index')
108
+          this.$tab.reLaunch('/pages/message/index')
107 109
         })
108 110
       }
109 111
     }

+ 27
- 1
oa-ui-app/static/scss/global.scss Voir le fichier

@@ -20,7 +20,9 @@
20 20
 .text-grey2 {
21 21
 	color: #aaa;
22 22
 }
23
-
23
+.text-justify{
24
+	text-align:justify;
25
+}
24 26
 .list-cell-arrow::before {
25 27
     content: ' ';
26 28
     height: 10px;
@@ -88,3 +90,27 @@
88 90
       }
89 91
     }
90 92
   }
93
+
94
+
95
+	::v-deep .uni-input-input:disabled{
96
+		-webkit-text-fill-color: #333333;
97
+	}
98
+	
99
+	::v-deep .uni-textarea-textarea:disabled{
100
+		-webkit-text-fill-color: #333333;
101
+	}
102
+	
103
+	
104
+	// 提交按钮
105
+	.submit-btn {
106
+		border-radius: 8px;
107
+		background-color: #007AFF;
108
+		font-size: 16px;
109
+	}
110
+	// 保存按钮
111
+	.save-btn {
112
+		border-radius: 8px;
113
+		background-color: #f9ae3d;
114
+		color:#fff;
115
+		font-size: 16px;
116
+	}

+ 3
- 1
oa-ui-app/static/scss/index.scss Voir le fichier

@@ -3,4 +3,6 @@
3 3
 // color-ui
4 4
 @import "@/static/scss/colorui.css";
5 5
 // iconfont
6
-@import "@/static/font/iconfont.css";
6
+@import "@/static/font/iconfont.css";
7
+
8
+@import "./uni_modules/uview-ui/index.scss";

+ 1
- 1
oa-ui-app/uni.scss Voir le fichier

@@ -1,7 +1,7 @@
1 1
 /**
2 2
  * uni-app内置的常用样式变量
3 3
  */
4
-
4
+@import './uni_modules/uview-ui/theme.scss';
5 5
 /* 行为相关颜色 */
6 6
 $uni-color-primary: #007aff;
7 7
 $uni-color-success: #4cd964;

+ 51
- 0
oa-ui-app/utils/common.js Voir le fichier

@@ -51,4 +51,55 @@ export function tansParams(params) {
51 51
     }
52 52
   }
53 53
   return result
54
+}
55
+
56
+
57
+
58
+// 转换字符串,undefined,null等转化为""
59
+export function parseStrEmpty(str) {
60
+  if (!str || str == "undefined" || str == "null") {
61
+    return "";
62
+  }
63
+  return str;
64
+}
65
+
66
+
67
+export function parseTime(time, pattern) {
68
+  if (arguments.length === 0 || !time) {
69
+    return null
70
+  }
71
+  const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
72
+  let date
73
+  if (typeof time === 'object') {
74
+    date = time
75
+  } else {
76
+    if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
77
+      time = parseInt(time)
78
+    } else if (typeof time === 'string') {
79
+      time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
80
+    }
81
+    if ((typeof time === 'number') && (time.toString().length === 10)) {
82
+      time = time * 1000
83
+    }
84
+    date = new Date(time)
85
+  }
86
+  const formatObj = {
87
+    y: date.getFullYear(),
88
+    m: date.getMonth() + 1,
89
+    d: date.getDate(),
90
+    h: date.getHours(),
91
+    i: date.getMinutes(),
92
+    s: date.getSeconds(),
93
+    a: date.getDay()
94
+  }
95
+  const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
96
+    let value = formatObj[key]
97
+    // Note: getDay() returns 0 on Sunday
98
+    if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
99
+    if (result.length > 0 && value < 10) {
100
+      value = '0' + value
101
+    }
102
+    return value || 0
103
+  })
104
+  return time_str
54 105
 }

+ 21
- 5
oa-ui/src/views/index.vue Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-01-03 09:23:11
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-13 14:47:16
5
+ * @LastEditTime: 2025-02-13 11:22:54
6 6
 -->
7 7
 
8 8
 <template>
@@ -218,12 +218,12 @@ export default {
218 218
           privilege: ['oa:device:list']
219 219
         }, {
220 220
           id: 7,
221
-          name: '投标管理',
222
-          icon: 'example',
221
+          name: '承接合同',
222
+          icon: 'contractSign',
223 223
           bgColor: '#F7C59F',
224 224
           boxShadow: '0 5px 20px rgba(247,197,159,0.5)',
225
-          path: '/business/tender',
226
-          privilege: ['oa:tender:query']
225
+          path: '/business/contract/contract',
226
+          privilege: ['oa:contract:list']
227 227
         }, {
228 228
           id: 8,
229 229
           name: '人事管理',
@@ -232,6 +232,22 @@ export default {
232 232
           boxShadow: '0 5px 20px rgba(32,178,170,0.5)',
233 233
           path: '/oa/staff/people',
234 234
           privilege: ['oa:salary:list']
235
+        },{
236
+          id: 9,
237
+          name: '项目结算',
238
+          icon: 'buy',
239
+          bgColor: '#ff6f61',
240
+          boxShadow: '0 5px 20px rgba(255,111,97,0.5)',
241
+          path: '/product/settle/project',
242
+          privilege: ['oa:settle:list']
243
+        },{
244
+          id: 10,
245
+          name: '借款管理',
246
+          icon: 'borrow',
247
+          bgColor: '#001a6e',
248
+          boxShadow: '0 5px 20px rgba(0,26,110,0.5)',
249
+          path: '/product/budget/borrow',
250
+          privilege: ['oa:borrow:list']
235 251
         },
236 252
         // {
237 253
         //   id: 9,

+ 2
- 2
oa-ui/src/views/oa/borrow/index.vue Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:59
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-01-02 14:05:40
5
+ * @LastEditTime: 2025-02-13 11:07:30
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -200,7 +200,7 @@ export default {
200 200
           this.queryParams.undertakingDept = null;
201 201
         }
202 202
       }
203
-      if (this.roles.some(e => e === 'leader')) {
203
+      if (this.roles.some(e => e === 'leader' || e=== 'finance')) {
204 204
         this.queryParams.applyDept = null;
205 205
         this.queryParams.undertakingDept = null;
206 206
       }

+ 231
- 0
oa-ui/src/views/oa/contract/components/paymentProgress.vue Voir le fichier

@@ -0,0 +1,231 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2025-02-12 13:40:48
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2025-02-13 10:29:05
6
+-->
7
+<template>
8
+  <div>
9
+    <el-form ref="form" :model="form" label-width="130px" :disabled="isDisabled">
10
+      <el-form-item label="合同名称" prop="contractName">
11
+        <el-input style="width: 100%;" disabled v-model="form.contractName" placeholder="请输入合同名称"></el-input>
12
+      </el-form-item>
13
+      <el-form-item label="甲方单位" prop="partyAId">
14
+        <el-select v-model="form.partyAId" filterable placeholder="请选择" disabled style="width: 100%;">
15
+          <el-option v-for="item in partyAList" :key="item.value" :label="item.partyAName" :value="item.partyAId">
16
+          </el-option>
17
+        </el-select>
18
+      </el-form-item>
19
+      <el-form-item label="合同编码" prop="contractCode">
20
+        <el-input style="width: 100%;" disabled v-model="form.contractCode" placeholder="请输入合同编码"></el-input>
21
+      </el-form-item>
22
+      <el-form-item label="合同编号" prop="contractNumber">
23
+        <el-input style="width:  100%;" disabled v-model="form.contractNumber" placeholder="请输入合同编号"></el-input>
24
+      </el-form-item>
25
+      <el-form-item label="合同金额" prop="amount">
26
+        <el-input style="width:50%;" disabled v-model="form.amount" placeholder="请输入合同金额">
27
+          <template slot="append">元</template>
28
+        </el-input>
29
+      </el-form-item>
30
+      <el-form-item style="text-align: left;" label="履约保证金" prop="deposit">
31
+        <el-input style="width:50%;" disabled v-model="form.deposit" placeholder="请输入履约保证金">
32
+          <template slot="append">元</template>
33
+        </el-input>
34
+      </el-form-item>
35
+      <el-form-item label="合同备注" prop="remark">
36
+        <el-input type="textarea" disabled v-model="form.remark" :autosize="{minRows:4}" />
37
+      </el-form-item>
38
+      <el-form-item style="text-align: left;" label="回款进度">
39
+        <table border="1" style="width:100%" v-loading="loading">
40
+          <tr>
41
+            <td style="width: 50px;">序号</td>
42
+            <td>回款金额</td>
43
+            <td>回款比例(%)</td>
44
+            <td>回款时间</td>
45
+            <td style="width: 150px;">备注</td>
46
+          </tr>
47
+          <tr v-for="(paid, index) in paidList" :key="index">
48
+            <td>
49
+              {{ index + 1 }}
50
+            </td>
51
+            <td>
52
+              <el-input-number style="width:100%" :controls="false" v-model="paid.paidAmount" clearable
53
+                @blur="changePercentage(paid)"></el-input-number>
54
+            </td>
55
+            <td>
56
+              <!-- <el-input-number style="width:100%" :controls="false" v-model="paid.paidPercentage" clearable
57
+                @blur=""></el-input-number> -->
58
+              {{ paid.paidPercentage }}
59
+            </td>
60
+            <td>
61
+              <el-date-picker style="width:100%" v-model="paid.paidTime" value-format="yyyy-MM-dd" type="date"
62
+                placeholder="选择日期">
63
+              </el-date-picker>
64
+            </td>
65
+            <td>
66
+              <el-input v-model="paid.remark" type="textarea" clearable :autosize="{ minRows: 2 }"></el-input>
67
+            </td>
68
+            <td v-show="!isDisabled">
69
+              <div class="delete-btn" @click="deletPaiItem(index)">
70
+                <i class="el-icon-circle-close"></i>
71
+              </div>
72
+            </td>
73
+          </tr>
74
+          <tr>
75
+            <td>
76
+              合计
77
+            </td>
78
+            <td>
79
+              {{ sumAmount.toFixed(2) }}
80
+            </td>
81
+            <td>
82
+              {{ sumPercent.toFixed(2) }}
83
+            </td>
84
+          </tr>
85
+        </table>
86
+        <el-button icon="el-icon-plus" size="mini" @click="addPaiList()" type="primary" plain></el-button>
87
+      </el-form-item>
88
+    </el-form>
89
+    <el-row class="text-center">
90
+      <el-button type="primary" @click="confirm">确定</el-button>
91
+      <el-button @click="$emit('cancel')">取消</el-button>
92
+    </el-row>
93
+  </div>
94
+</template>
95
+
96
+<script>
97
+import { listPartyA } from "@/api/oa/partyA/partyA";
98
+import { listContractPaid, getContractPaid, addContractPaid, updateContractPaid, delContractPaid } from "@/api/oa/contract/contractPaid";
99
+export default {
100
+  props: {
101
+    form: {
102
+      type: Object
103
+    }
104
+  },
105
+  data() {
106
+    return {
107
+      partyAList: [],
108
+      paidList: [{
109
+        paidPercentage: 0,
110
+        paidAmount: 0,
111
+        paidTime: '',
112
+        remark: ''
113
+      }],
114
+      sumAmount: 0,
115
+      sumPercent: 0,
116
+      loading: true,
117
+      isDisabled:true,
118
+    }
119
+  },
120
+  watch: {
121
+    'form.contractId'(newVal) {
122
+      this.getPaidList();
123
+    }
124
+  },
125
+  created() {
126
+    this.getPartyAList();
127
+    this.getPaidList();
128
+    this.isDisabledFn();
129
+  },
130
+  methods: {
131
+    isDisabledFn(){
132
+      if(this.$store.getters.roles.includes('finance')){
133
+        this.isDisabled = false
134
+      }else{
135
+        this.isDisabled = true
136
+      }
137
+    },
138
+    // 查询业主单位列表
139
+    getPartyAList() {
140
+      listPartyA({
141
+        pageNum: 1,
142
+        pageSize: 99999999
143
+      }).then(response => {
144
+        this.partyAList = response.rows;
145
+      })
146
+    },
147
+    getPaidList() {
148
+      this.loading = true;
149
+      listContractPaid({ contractId: this.form.contractId }).then(res => {
150
+        if (res.total > 0) {
151
+          this.paidList = res.rows;
152
+        } else {
153
+          this.paidList = [{
154
+            paidPercentage: 0,
155
+            paidAmount: 0,
156
+            paidTime: '',
157
+            remark: ''
158
+          }]
159
+        }
160
+        this.getSum();
161
+        this.loading = false;
162
+      })
163
+    },
164
+    getSum() {
165
+      this.sumAmount = this.paidList.reduce((sum, item) => sum + Number(item.paidAmount), 0);
166
+      this.sumPercent = this.paidList.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
167
+    },
168
+    addPaiList() {
169
+      this.paidList.push({
170
+        paidPercentage: 0,
171
+        paidAmount: 0,
172
+        paidTime: '',
173
+        remark: ''
174
+      });
175
+    },
176
+    deletPaiItem(index) {
177
+      let arr = this.paidList;
178
+      if (arr.length == 1) {
179
+        return;
180
+      }
181
+      if (index >= 0 && index < arr.length) {
182
+        arr.splice(index, 1);
183
+      }
184
+      this.getSum();
185
+    },
186
+    changePercentage(paid) {
187
+      let percent = ((paid.paidAmount / this.form.amount) * 100).toFixed(2);
188
+      paid.paidPercentage = percent;
189
+      this.getSum();
190
+    },
191
+    async confirm() {
192
+      const contractId = this.form.contractId
193
+      await delContractPaid(contractId);
194
+      for (let p of this.paidList) {
195
+        p.contractId = contractId
196
+        await addContractPaid(p);
197
+      }
198
+      this.$message.success('回款进度已更新');
199
+      this.$emit('cancel')
200
+      this.$emit('getList')
201
+    }
202
+  },
203
+}
204
+</script>
205
+
206
+<style lang="scss" scoped>
207
+@import "@/assets/styles/element-reset.scss";
208
+
209
+.delete-btn {
210
+  color: #F56C6C;
211
+  cursor: pointer;
212
+
213
+  i {
214
+    font-size: 25px;
215
+  }
216
+}
217
+
218
+table {
219
+  /*边框*/
220
+  /* border: 1px solid black; */
221
+  text-align: center;
222
+  border-collapse: collapse;
223
+  border: 1px solid #a5abb0;
224
+
225
+  /*设置背景颜色*/
226
+  /* background-color: #bfa; */
227
+  td {
228
+    padding: 5px;
229
+  }
230
+}
231
+</style>

+ 225
- 0
oa-ui/src/views/oa/contract/components/subProgress.vue Voir le fichier

@@ -0,0 +1,225 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2025-02-12 13:40:48
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2025-02-13 10:33:15
6
+-->
7
+<template>
8
+  <div>
9
+    <el-form ref="form" :model="form" label-width="130px" :disabled="isDisabled">
10
+      <el-form-item label="合同名称" prop="subContractName">
11
+        <el-input style="width: 100%;" v-model="form.subContractName" disabled placeholder="请输入合同名称"></el-input>
12
+      </el-form-item>
13
+      <el-form-item label="承接单位" prop="partnerId">
14
+        <el-select style="width:84%;" v-model="form.partnerId" filterable placeholder="请选择" disabled clearable>
15
+          <el-option v-for="item in partnerList" :key="item.value" :label="item.partnerName" :value="item.partnerId">
16
+          </el-option>
17
+        </el-select>
18
+      </el-form-item>
19
+      <el-form-item label="联系人" prop="contactPerson">
20
+        <el-input v-model="form.contactPerson" disabled placeholder="请输入联系人" />
21
+      </el-form-item>
22
+      <el-form-item label="联系电话" prop="telephone">
23
+        <el-input v-model="form.telephone" disabled placeholder="请输入联系电话" />
24
+      </el-form-item>
25
+      <el-form-item label="分包合同金额" prop="subAmount">
26
+        <el-input-number :controls="false" disabled v-model="form.subAmount" placeholder="请输入分包合同金额" />(元)
27
+      </el-form-item>
28
+      <el-form-item label="合同备注" prop="remark">
29
+        <el-input type="textarea" disabled v-model="form.remark" :autosize="{minRows:4}" />
30
+      </el-form-item>
31
+      <el-form-item style="text-align: left;" label="付款进度">
32
+        <table border="1" style="width:100%" v-loading="loading">
33
+          <tr>
34
+            <td style="width: 50px;">序号</td>
35
+            <td>付款金额</td>
36
+            <td>付款比例(%)</td>
37
+            <td>付款时间</td>
38
+            <td style="width: 150px;">备注</td>
39
+          </tr>
40
+          <tr v-for="(paid, index) in paidList" :key="index">
41
+            <td>
42
+              {{ index + 1 }}
43
+            </td>
44
+            <td>
45
+              <el-input-number style="width:100%" :controls="false" v-model="paid.paidAmount" clearable
46
+                @blur="changePercentage(paid)"></el-input-number>
47
+            </td>
48
+            <td>
49
+              <!-- <el-input-number style="width:100%" :controls="false" v-model="paid.paidPercentage" clearable
50
+                @blur=""></el-input-number> -->
51
+              {{ paid.paidPercentage }}
52
+            </td>
53
+            <td>
54
+              <el-date-picker style="width:100%" v-model="paid.paidTime" value-format="yyyy-MM-dd" type="date"
55
+                placeholder="选择日期">
56
+              </el-date-picker>
57
+            </td>
58
+            <td>
59
+              <el-input v-model="paid.remark" type="textarea" clearable :autosize="{ minRows: 2 }"></el-input>
60
+            </td>
61
+            <td v-show="!isDisabled">
62
+              <div class="delete-btn" @click="deletPaiItem(index)">
63
+                <i class="el-icon-circle-close"></i>
64
+              </div>
65
+            </td>
66
+          </tr>
67
+          <tr>
68
+            <td>
69
+              合计
70
+            </td>
71
+            <td>
72
+              {{ sumAmount.toFixed(2) }}
73
+            </td>
74
+            <td>
75
+              {{ sumPercent.toFixed(2) }}
76
+            </td>
77
+          </tr>
78
+        </table>
79
+        <el-button icon="el-icon-plus" size="mini" @click="addPaiList()" type="primary" plain></el-button>
80
+      </el-form-item>
81
+    </el-form>
82
+    <el-row class="text-center">
83
+      <el-button type="primary" @click="confirm">确定</el-button>
84
+      <el-button @click="$emit('cancel')">取消</el-button>
85
+    </el-row>
86
+  </div>
87
+</template>
88
+
89
+<script>
90
+import { listPartner } from "@/api/oa/partner/partner";
91
+import { listContractPaid, addContractPaid, delContractPaid } from "@/api/oa/contract/contractPaid";
92
+export default {
93
+  props: {
94
+    form: {
95
+      type: Object
96
+    }
97
+  },
98
+  data() {
99
+    return {
100
+      partnerList: [],
101
+      paidList: [{
102
+        paidPercentage: 0,
103
+        paidAmount: 0,
104
+        paidTime: '',
105
+        remark: ''
106
+      }],
107
+      sumAmount: 0,
108
+      sumPercent: 0,
109
+      loading: true,
110
+      isDisabled:true,
111
+    }
112
+  },
113
+  watch: {
114
+    'form.subContractId'(newVal) {
115
+      this.getPaidList();
116
+    }
117
+  },
118
+  created() {
119
+    this.getPartnerList();
120
+    this.getPaidList();
121
+    this.isDisabledFn();
122
+    
123
+  },
124
+  methods: {
125
+    isDisabledFn(){
126
+      if(this.$store.getters.roles.includes('finance')){
127
+        this.isDisabled = false
128
+      }else{
129
+        this.isDisabled = true
130
+      }
131
+    },
132
+    // 查询承接单位列表
133
+    getPartnerList() {
134
+      listPartner({
135
+        pageNum: 1,
136
+        pageSize: 99999999
137
+      }).then(response => {
138
+        this.partnerList = response.rows;
139
+      })
140
+    },
141
+    getPaidList() {
142
+      this.loading = true;
143
+      listContractPaid({ contractId: this.form.subContractId }).then(res => {
144
+        if (res.total > 0) {
145
+          this.paidList = res.rows;
146
+        } else {
147
+          this.paidList = [{
148
+            paidPercentage: 0,
149
+            paidAmount: 0,
150
+            paidTime: '',
151
+            remark: ''
152
+          }]
153
+        }
154
+        this.getSum();
155
+        this.loading = false;
156
+      })
157
+    },
158
+    getSum() {
159
+      this.sumAmount = this.paidList.reduce((sum, item) => sum + Number(item.paidAmount), 0);
160
+      this.sumPercent = this.paidList.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
161
+    },
162
+    addPaiList() {
163
+      this.paidList.push({
164
+        paidPercentage: 0,
165
+        paidAmount: 0,
166
+        paidTime: '',
167
+        remark: ''
168
+      });
169
+    },
170
+    deletPaiItem(index) {
171
+      let arr = this.paidList;
172
+      if (arr.length == 1) {
173
+        return;
174
+      }
175
+      if (index >= 0 && index < arr.length) {
176
+        arr.splice(index, 1);
177
+      }
178
+      this.getSum();
179
+    },
180
+    changePercentage(paid) {
181
+      let percent = ((paid.paidAmount / this.form.subAmount) * 100).toFixed(2);
182
+      paid.paidPercentage = percent;
183
+      this.getSum();
184
+    },
185
+    async confirm() {
186
+      const contractId = this.form.subContractId
187
+      await delContractPaid(contractId);
188
+      for (let p of this.paidList) {
189
+        p.contractId = contractId
190
+        await addContractPaid(p);
191
+      }
192
+      this.$message.success('付款进度已更新');
193
+      this.$emit('cancel')
194
+      this.$emit('getList')
195
+    }
196
+  },
197
+}
198
+</script>
199
+
200
+<style lang="scss" scoped>
201
+@import "@/assets/styles/element-reset.scss";
202
+
203
+.delete-btn {
204
+  color: #F56C6C;
205
+  cursor: pointer;
206
+
207
+  i {
208
+    font-size: 25px;
209
+  }
210
+}
211
+
212
+table {
213
+  /*边框*/
214
+  /* border: 1px solid black; */
215
+  text-align: center;
216
+  border-collapse: collapse;
217
+  border: 1px solid #a5abb0;
218
+
219
+  /*设置背景颜色*/
220
+  /* background-color: #bfa; */
221
+  td {
222
+    padding: 5px;
223
+  }
224
+}
225
+</style>

+ 58
- 12
oa-ui/src/views/oa/contract/index.vue Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:52:00
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-06 16:19:55
5
+ * @LastEditTime: 2025-02-13 09:56:22
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -67,21 +67,27 @@
67 67
           <span>{{ parseTime(scope.row.signDate, '{y}-{m}-{d}') }}</span>
68 68
         </template>
69 69
       </el-table-column>
70
+      <el-table-column prop="percentage" align="center" label="回款进度" width="120px" sortable>
71
+        <template slot-scope="scope">
72
+          <el-progress :text-inside="true" :stroke-width="26" :status="formatStatus(scope.row.percentage)"
73
+            :percentage="scope.row.percentage" text-color="#fff"></el-progress>
74
+        </template>
75
+      </el-table-column>
70 76
       <!-- <el-table-column label="签订备注" align="center" prop="signRemark" /> -->
71
-      <el-table-column label="签订扫描件" align="center" prop="signScan" show-overflow-tooltip>
77
+      <!-- <el-table-column label="签订扫描件" align="center" prop="signScan" show-overflow-tooltip>
72 78
         <template slot-scope="scope">
73 79
           <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + scope.row.signScan}`)">
74 80
             {{ getFileName(scope.row.signScan) }}
75 81
           </el-link>
76 82
         </template>
77
-      </el-table-column>
78
-      <el-table-column label="评审方式" align="center" prop="commentType">
83
+      </el-table-column> -->
84
+      <!-- <el-table-column label="评审方式" align="center" prop="commentType">
79 85
         <template slot-scope="scope">
80 86
           <el-tag :type="scope.row.commentType == '2' ? 'success' : 'warning'">
81 87
             {{ getCommentType(scope.row.commentType) }}
82 88
           </el-tag>
83 89
         </template>
84
-      </el-table-column>
90
+      </el-table-column> -->
85 91
       <!-- <el-table-column label="合同备注" align="center" prop="remark" /> -->
86 92
       <el-table-column label="拟稿人" align="center" prop="drafter">
87 93
         <template slot-scope="scope">
@@ -94,6 +100,8 @@
94 100
             v-hasPermi="['oa:contract:query']">查看</el-button>
95 101
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
96 102
             v-hasPermi="['oa:contract:edit']">修改</el-button>
103
+          <el-button size="mini" type="text" icon="el-icon-edit-outline" @click="handleProgress(scope.row)"
104
+            v-hasPermi="['oa:contract:paid']">回款进度</el-button>
97 105
         </template>
98 106
       </el-table-column>
99 107
     </el-table>
@@ -109,6 +117,10 @@
109 117
     <el-dialog :title="title" :visible.sync="openInfo" width="60%" append-to-body>
110 118
       <contract-form :taskForm="taskForm" :taskName="''" :flowDisabled="false"></contract-form>
111 119
     </el-dialog>
120
+    <!-- 回款进度 -->
121
+    <el-dialog :title="title" :visible.sync="progressOpen" width="50%" append-to-body>
122
+      <payment-progress :form="progressContract" @cancel="progressOpen = false" @getList="getList"></payment-progress>
123
+    </el-dialog>
112 124
   </div>
113 125
 </template>
114 126
 
@@ -123,8 +135,10 @@ import { todoList, getNextFlowNodeByStart } from "@/api/flowable/todo";
123 135
 import { Snowflake } from '@/utils/snowFlake.js'
124 136
 import { listContractComment, addContractComment, updateContractComment } from "@/api/oa/contract/contractComment";
125 137
 import contractEdit from './components/edit.vue'
138
+import PaymentProgress from './components/paymentProgress.vue';
139
+import { listContractPaid } from "@/api/oa/contract/contractPaid";
126 140
 export default {
127
-  components: { contractInfo, ContractForm, contractEdit },
141
+  components: { contractInfo, ContractForm, contractEdit, PaymentProgress },
128 142
   name: "Contract",
129 143
   data() {
130 144
     return {
@@ -172,8 +186,10 @@ export default {
172 186
       taskForm: {},
173 187
       commentList: [],
174 188
       commentOpen: false,
175
-      queryPartyAList:[],
176
-      queryLoading:true,
189
+      queryPartyAList: [],
190
+      queryLoading: true,
191
+      progressContract: {},
192
+      progressOpen: false,
177 193
     };
178 194
   },
179 195
   created() {
@@ -185,9 +201,18 @@ export default {
185 201
       this.loading = true;
186 202
       listContract(this.queryParams).then(response => {
187 203
         this.contractList = response.rows;
188
-
189 204
         this.total = response.total;
190
-        this.loading = false;
205
+        for (let contract of this.contractList) {
206
+          listContractPaid({ contractId: contract.contractId }).then(res => {
207
+            if (res.total > 0) {
208
+              let percentage = res.rows.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
209
+              this.$set(contract, 'percentage', Number(percentage.toFixed(2)))
210
+            } else {
211
+              this.$set(contract, 'percentage', 0)
212
+            }
213
+            this.loading = false;
214
+          })
215
+        }
191 216
       });
192 217
     },
193 218
     // 取消按钮
@@ -266,6 +291,12 @@ export default {
266 291
         })
267 292
       });
268 293
     },
294
+    // 回款进度操作
295
+    handleProgress(row) {
296
+      this.progressContract = row;
297
+      this.title = '回款进度';
298
+      this.progressOpen = true;
299
+    },
269 300
     // 登记合同
270 301
     async handleRegister() {
271 302
       let response = await listDefinition({
@@ -367,7 +398,7 @@ export default {
367 398
         ...this.queryParams
368 399
       }, `contract_${new Date().getTime()}.xlsx`)
369 400
     },
370
-    remoteMethod(val){
401
+    remoteMethod(val) {
371 402
       listPartyA({
372 403
         pageNum: 1,
373 404
         pageSize: 30,
@@ -376,7 +407,22 @@ export default {
376 407
         this.queryPartyAList = res.rows;
377 408
         this.queryLoading = false;
378 409
       })
379
-    }
410
+    },
411
+    formatStatus(row) {
412
+      if (!row) {
413
+        row = 0
414
+        return 'exception'
415
+      }
416
+      if (row <= 20) {
417
+        return 'exception'
418
+      } else if (row > 20 && row <= 50) {
419
+        return 'warning'
420
+      } else if (row > 50 && row <= 80) {
421
+        return null
422
+      } else {
423
+        return 'success'
424
+      }
425
+    },
380 426
   }
381 427
 };
382 428
 </script>

+ 54
- 7
oa-ui/src/views/oa/contract/subContract.vue Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:52:00
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-04 15:47:18
5
+ * @LastEditTime: 2025-02-13 10:40:03
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -68,8 +68,14 @@
68 68
           <span>{{ parseTime(scope.row.signDate, '{y}-{m}-{d}') }}</span>
69 69
         </template>
70 70
       </el-table-column>
71
+      <el-table-column prop="percentage" align="center" label="付款进度" width="120px" sortable>
72
+        <template slot-scope="scope">
73
+          <el-progress :text-inside="true" :stroke-width="26" :status="formatStatus(scope.row.percentage)"
74
+            :percentage="scope.row.percentage" text-color="#fff"></el-progress>
75
+        </template>
76
+      </el-table-column>
71 77
       <!-- <el-table-column label="签订备注" align="center" prop="signRemark" /> -->
72
-      <el-table-column label="签订扫描件" align="center" prop="signScan">
78
+      <!-- <el-table-column label="签订扫描件" align="center" prop="signScan">
73 79
         <template slot-scope="scope">
74 80
           <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + scope.row.signScan}`)">
75 81
             {{ getFileName(scope.row.signScan) }}
@@ -82,7 +88,7 @@
82 88
             {{ setCommentType(scope.row.commentType) }}
83 89
           </el-tag>
84 90
         </template>
85
-      </el-table-column>
91
+      </el-table-column> -->
86 92
       <el-table-column label="拟稿人" align="center" prop="drafter">
87 93
         <template slot-scope="scope">
88 94
           {{ getUserName(scope.row.drafter) }}
@@ -95,6 +101,8 @@
95 101
             v-hasPermi="['oa:subContract:query']">查看</el-button>
96 102
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
97 103
             v-hasPermi="['oa:subContract:edit']">修改</el-button>
104
+          <el-button size="mini" type="text" icon="el-icon-edit-outline" @click="handleProgress(scope.row)"
105
+            v-hasPermi="['oa:contract:paid']">付款进度</el-button>
98 106
         </template>
99 107
       </el-table-column>
100 108
     </el-table>
@@ -110,6 +118,10 @@
110 118
     <el-dialog :title="title" :visible.sync="openInfo" append-to-body width="60%">
111 119
       <sub-contract :taskForm="taskForm" :taskName="''" :flowDisabled="false"></sub-contract>
112 120
     </el-dialog>
121
+    <!-- 回款进度 -->
122
+    <el-dialog :title="title" :visible.sync="progressOpen" width="50%" append-to-body>
123
+      <sub-progress :form="progressContract" @cancel="progressOpen = false" @getList="getList"></sub-progress>
124
+    </el-dialog>
113 125
   </div>
114 126
 </template>
115 127
 
@@ -123,9 +135,11 @@ import { todoList, getNextFlowNodeByStart } from "@/api/flowable/todo";
123 135
 import { Snowflake } from '@/utils/snowFlake.js'
124 136
 import { listContractComment, addContractComment, updateContractComment, delContractComment } from "@/api/oa/contract/contractComment";
125 137
 import SubEdit from './components/subEdit.vue';
138
+import SubProgress from "./components/subProgress.vue";
139
+import { listContractPaid } from "@/api/oa/contract/contractPaid";
126 140
 
127 141
 export default {
128
-  components: { subContract, SubEdit },
142
+  components: { subContract, SubEdit, SubProgress },
129 143
   name: "SubContract",
130 144
   data() {
131 145
     return {
@@ -170,13 +184,15 @@ export default {
170 184
       form: {},
171 185
       // 表单校验
172 186
       rules: {
173
-        
187
+
174 188
       },
175 189
       taskForm: {
176 190
         formId: ''
177 191
       },
178 192
       commentList: [],
179 193
       commentOpen: false,
194
+      progressOpen: false,
195
+      progressContract: {}
180 196
     };
181 197
   },
182 198
   created() {
@@ -189,7 +205,17 @@ export default {
189 205
       listSubContract(this.queryParams).then(response => {
190 206
         this.subContractList = response.rows;
191 207
         this.total = response.total;
192
-        this.loading = false;
208
+        for (let subContract of this.subContractList) {
209
+          listContractPaid({ contractId: subContract.subContractId }).then(res => {
210
+            if (res.total > 0) {
211
+              let percentage = res.rows.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
212
+              this.$set(subContract, 'percentage', Number(percentage.toFixed(2)))
213
+            } else {
214
+              this.$set(subContract, 'percentage', 0)
215
+            }
216
+            this.loading = false;
217
+          })
218
+        }
193 219
       });
194 220
     },
195 221
     remoteMethod(val) {
@@ -268,6 +294,12 @@ export default {
268 294
         })
269 295
       });
270 296
     },
297
+    // 回款进度操作
298
+    handleProgress(row) {
299
+      this.progressContract = row;
300
+      this.title = '付款进度';
301
+      this.progressOpen = true;
302
+    },
271 303
     async handleRegister() {
272 304
       let response = await listDefinition({
273 305
         pageNum: 1,
@@ -376,7 +408,22 @@ export default {
376 408
       } else {
377 409
         return '会议评审'
378 410
       }
379
-    }
411
+    },
412
+    formatStatus(row) {
413
+      if (!row) {
414
+        row = 0
415
+        return 'exception'
416
+      }
417
+      if (row <= 20) {
418
+        return 'exception'
419
+      } else if (row > 20 && row <= 50) {
420
+        return 'warning'
421
+      } else if (row > 50 && row <= 80) {
422
+        return null
423
+      } else {
424
+        return 'success'
425
+      }
426
+    },
380 427
   }
381 428
 };
382 429
 </script>

+ 0
- 1
oa-ui/src/views/oa/project/index.vue Voir le fichier

@@ -547,7 +547,6 @@ export default {
547 547
       return path
548 548
     },
549 549
     sortIsFinshed(a,b){
550
-      console.log(a,b);
551 550
       return Number(a.isFinished) - Number(b.isFinished)
552 551
     }
553 552
   },

+ 1
- 1
oa-ui/src/views/oa/settle/index.vue Voir le fichier

@@ -185,7 +185,7 @@ export default {
185 185
       if (this.roles.some(element => element === "dept")) {
186 186
         this.queryParams.undertakingDept = this.deptId;
187 187
       }
188
-      if (this.roles.some(e => e === 'leader')) {
188
+      if (this.roles.some(e => e === 'leader'  || e=== 'finance' )) {
189 189
         this.queryParams.undertakingDept = null;
190 190
       }
191 191
       if (this.queryProjectIdByName) {

Loading…
Annuler
Enregistrer