|
@@ -1,8 +1,8 @@
|
1
|
1
|
<!--
|
2
|
2
|
* @Author: ysh
|
3
|
3
|
* @Date: 2024-06-21 18:52:00
|
4
|
|
- * @LastEditors: Please set LastEditors
|
5
|
|
- * @LastEditTime: 2025-02-17 15:12:03
|
|
4
|
+ * @LastEditors: wrh
|
|
5
|
+ * @LastEditTime: 2025-07-17 10:57:14
|
6
|
6
|
-->
|
7
|
7
|
<template>
|
8
|
8
|
<div class="app-container">
|
|
@@ -22,7 +22,11 @@
|
22
|
22
|
:value="partyA.partyAId">
|
23
|
23
|
</el-option>
|
24
|
24
|
</el-select>
|
25
|
|
- </el-form-item>
|
|
25
|
+ </el-form-item>
|
|
26
|
+ <el-form-item label="工作内容" prop="queryString">
|
|
27
|
+ <el-input v-model="queryParams.queryString" placeholder="请输入关键字" clearable
|
|
28
|
+ @keyup.enter.native="handleQuery" />
|
|
29
|
+ </el-form-item>
|
26
|
30
|
<el-form-item>
|
27
|
31
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
28
|
32
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
@@ -128,7 +132,7 @@
|
128
|
132
|
</template>
|
129
|
133
|
|
130
|
134
|
<script>
|
131
|
|
-import { listContract, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
|
|
135
|
+import { listContract, listContractFuzzy, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
|
132
|
136
|
import { listPartyA } from "@/api/oa/partyA/partyA";
|
133
|
137
|
import contractInfo from './contractInfo.vue';
|
134
|
138
|
import ContractForm from '../../flowable/form/business/contractForm.vue';
|
|
@@ -178,7 +182,8 @@ export default {
|
178
|
182
|
signDate: null,
|
179
|
183
|
signRemark: null,
|
180
|
184
|
signScan: null,
|
181
|
|
- commentType: null
|
|
185
|
+ commentType: null,
|
|
186
|
+ queryString: undefined,
|
182
|
187
|
},
|
183
|
188
|
// 表单参数
|
184
|
189
|
form: {},
|
|
@@ -202,23 +207,44 @@ export default {
|
202
|
207
|
/** 查询cmc合同评审列表 */
|
203
|
208
|
getList() {
|
204
|
209
|
this.loading = true;
|
205
|
|
- listContract(this.queryParams).then(response => {
|
206
|
|
- this.contractList = response.rows;
|
207
|
|
- this.total = response.total;
|
208
|
|
- for (let contract of this.contractList) {
|
209
|
|
- listContractPaid({ contractId: contract.contractId }).then(res => {
|
210
|
|
- if (res.total > 0) {
|
211
|
|
- let percentage = res.rows.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
|
212
|
|
- let paidAmount = res.rows.reduce((sum, item) => sum + Number(item.paidAmount), 0);
|
213
|
|
- this.$set(contract, 'percentage', Number(percentage.toFixed(2)))
|
214
|
|
- this.$set(contract, 'paidAmount', Number(paidAmount.toFixed(2)))
|
215
|
|
- } else {
|
216
|
|
- this.$set(contract, 'percentage', 0)
|
217
|
|
- }
|
218
|
|
- this.loading = false;
|
219
|
|
- })
|
220
|
|
- }
|
221
|
|
- });
|
|
210
|
+ if (this.queryParams.queryString == '' || this.queryParams.queryString == undefined || this.queryParams.queryString == null) {
|
|
211
|
+ listContract(this.queryParams).then(response => {
|
|
212
|
+ this.contractList = response.rows;
|
|
213
|
+ this.total = response.total;
|
|
214
|
+ for (let contract of this.contractList) {
|
|
215
|
+ listContractPaid({ contractId: contract.contractId }).then(res => {
|
|
216
|
+ if (res.total > 0) {
|
|
217
|
+ let percentage = res.rows.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
|
|
218
|
+ let paidAmount = res.rows.reduce((sum, item) => sum + Number(item.paidAmount), 0);
|
|
219
|
+ this.$set(contract, 'percentage', Number(percentage.toFixed(2)))
|
|
220
|
+ this.$set(contract, 'paidAmount', Number(paidAmount.toFixed(2)))
|
|
221
|
+ } else {
|
|
222
|
+ this.$set(contract, 'percentage', 0)
|
|
223
|
+ }
|
|
224
|
+ this.loading = false;
|
|
225
|
+ })
|
|
226
|
+ }
|
|
227
|
+ });
|
|
228
|
+ }
|
|
229
|
+ else {
|
|
230
|
+ listContractFuzzy(this.queryParams).then(response => {
|
|
231
|
+ this.contractList = response.rows;
|
|
232
|
+ this.total = response.total;
|
|
233
|
+ for (let contract of this.contractList) {
|
|
234
|
+ listContractPaid({ contractId: contract.contractId }).then(res => {
|
|
235
|
+ if (res.total > 0) {
|
|
236
|
+ let percentage = res.rows.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
|
|
237
|
+ let paidAmount = res.rows.reduce((sum, item) => sum + Number(item.paidAmount), 0);
|
|
238
|
+ this.$set(contract, 'percentage', Number(percentage.toFixed(2)))
|
|
239
|
+ this.$set(contract, 'paidAmount', Number(paidAmount.toFixed(2)))
|
|
240
|
+ } else {
|
|
241
|
+ this.$set(contract, 'percentage', 0)
|
|
242
|
+ }
|
|
243
|
+ this.loading = false;
|
|
244
|
+ })
|
|
245
|
+ }
|
|
246
|
+ });
|
|
247
|
+ }
|
222
|
248
|
},
|
223
|
249
|
// 取消按钮
|
224
|
250
|
cancel() {
|