Quellcode durchsuchen

承接合同和分包合同新增开票进度和收票进度;

合同导出可选择字段名动态输出
余思翰 vor 1 Monat
Ursprung
Commit
d8fe53a5ec

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcContractController.java Datei anzeigen

@@ -286,7 +286,7 @@ public class CmcContractController extends BaseController
286 286
                 paidPercentage = "0%";
287 287
             }
288 288
             else {
289
-                paidPercentage = paidAmount.divide(contract.getAmount().multiply(new BigDecimal(100))).setScale(2, RoundingMode.HALF_UP) + "%";
289
+                paidPercentage = paidAmount.divide(contract.getAmount(), RoundingMode.HALF_UP).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP) + "%";
290 290
             }
291 291
             contract.setPaidAmount(paidAmount);
292 292
             contract.setPaidPercentage(paidPercentage);

+ 50
- 0
oa-ui/src/api/oa/contract/contractInvoice.js Datei anzeigen

@@ -0,0 +1,50 @@
1
+/*
2
+ * @Author: ysh
3
+ * @Date: 2025-02-12 10:55:08
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2025-07-23 16:46:53
6
+ */
7
+import request from '@/utils/request'
8
+
9
+// 查询开票列表
10
+export function listContractInvoice(query) {
11
+  return request({
12
+    url: '/oa/contractInvoice/list',
13
+    method: 'get',
14
+    params: query
15
+  })
16
+}
17
+
18
+// 查询开票详细
19
+export function getContractInvoice(invoiceId) {
20
+  return request({
21
+    url: '/oa/contractInvoice/' + invoiceId,
22
+    method: 'get'
23
+  })
24
+}
25
+
26
+// 新增开票记录
27
+export function addContractInvoice(data) {
28
+  return request({
29
+    url: '/oa/contractInvoice',
30
+    method: 'post',
31
+    data: data
32
+  })
33
+}
34
+
35
+// 修改开票记录
36
+export function updateContractInvoice(data) {
37
+  return request({
38
+    url: '/oa/contractInvoice',
39
+    method: 'put',
40
+    data: data
41
+  })
42
+}
43
+
44
+// 删除开票记录
45
+export function delContractInvoice(contractId) {
46
+  return request({
47
+    url: '/oa/contractInvoice/' + contractId,
48
+    method: 'delete'
49
+  })
50
+}

+ 119
- 18
oa-ui/src/views/oa/contract/components/paymentProgress.vue Datei anzeigen

@@ -2,11 +2,11 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-02-12 13:40:48
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-02-14 15:32:51
5
+ * @LastEditTime: 2025-07-23 16:51:15
6 6
 -->
7 7
 <template>
8 8
   <div>
9
-    <el-form ref="form" :model="form" label-width="130px" :disabled="isDisabled">
9
+    <el-form ref="form" :model="form" label-width="130px">
10 10
       <el-form-item label="合同名称" prop="contractName">
11 11
         <el-input style="width: 100%;" disabled v-model="form.contractName" placeholder="请输入合同名称"></el-input>
12 12
       </el-form-item>
@@ -35,6 +35,56 @@
35 35
       <el-form-item label="合同备注" prop="remark">
36 36
         <el-input type="textarea" disabled v-model="form.remark" :autosize="{ minRows: 4 }" />
37 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="(invoice, index) in invoiceList" :key="index">
48
+            <td>
49
+              {{ index + 1 }}
50
+            </td>
51
+            <td>
52
+              <el-input-number style="width:100%" :controls="false" v-model="invoice.invoiceAmount" clearable
53
+                @blur="changeInvoiceAmount(invoice)"
54
+                :disabled="!$store.getters.roles.includes('business')"></el-input-number>
55
+            </td>
56
+            <td>
57
+              {{ invoice.invoicePercentage }}
58
+            </td>
59
+            <td>
60
+              <el-date-picker style="width:100%" v-model="invoice.invoiceTime" value-format="yyyy-MM-dd" type="date"
61
+                placeholder="选择日期" :disabled="!$store.getters.roles.includes('business')">
62
+              </el-date-picker>
63
+            </td>
64
+            <td>
65
+              <el-input v-model="invoice.remark" type="textarea" clearable :autosize="{ minRows: 2 }"
66
+                :disabled="!$store.getters.roles.includes('business')"></el-input>
67
+            </td>
68
+            <td v-show="$store.getters.roles.includes('business')">
69
+              <div class="delete-btn" @click="deletInvoiceItem(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
+              {{ invoiceSumAmount.toFixed(2) }}
80
+            </td>
81
+            <td>
82
+              {{ invoiceSumPercent.toFixed(2) }}
83
+            </td>
84
+          </tr>
85
+        </table>
86
+        <el-button icon="el-icon-plus" size="mini" @click="addInvoiceList()" type="primary" plain></el-button>
87
+      </el-form-item>
38 88
       <el-form-item style="text-align: left;" label="回款进度">
39 89
         <table border="1" style="width:100%" v-loading="loading">
40 90
           <tr>
@@ -50,22 +100,22 @@
50 100
             </td>
51 101
             <td>
52 102
               <el-input-number style="width:100%" :controls="false" v-model="paid.paidAmount" clearable
53
-                @blur="changePercentage(paid)"></el-input-number>
103
+                @blur="changePercentage(paid)"
104
+                :disabled="!$store.getters.roles.includes('finance', 'nfinance')"></el-input-number>
54 105
             </td>
55 106
             <td>
56
-              <!-- <el-input-number style="width:100%" :controls="false" v-model="paid.paidPercentage" clearable
57
-                @blur=""></el-input-number> -->
58 107
               {{ paid.paidPercentage }}
59 108
             </td>
60 109
             <td>
61 110
               <el-date-picker style="width:100%" v-model="paid.paidTime" value-format="yyyy-MM-dd" type="date"
62
-                placeholder="选择日期">
111
+                placeholder="选择日期" :disabled="!$store.getters.roles.includes('finance', 'nfinance')">
63 112
               </el-date-picker>
64 113
             </td>
65 114
             <td>
66
-              <el-input v-model="paid.remark" type="textarea" clearable :autosize="{ minRows: 2 }"></el-input>
115
+              <el-input v-model="paid.remark" type="textarea" clearable :autosize="{ minRows: 2 }"
116
+                :disabled="!$store.getters.roles.includes('finance', 'nfinance')"></el-input>
67 117
             </td>
68
-            <td v-show="!isDisabled">
118
+            <td v-show="$store.getters.roles.includes('finance', 'nfinance')">
69 119
               <div class="delete-btn" @click="deletPaiItem(index)">
70 120
                 <i class="el-icon-circle-close"></i>
71 121
               </div>
@@ -96,6 +146,7 @@
96 146
 <script>
97 147
 import { listPartyA } from "@/api/oa/partyA/partyA";
98 148
 import { listContractPaid, getContractPaid, addContractPaid, updateContractPaid, delContractPaid } from "@/api/oa/contract/contractPaid";
149
+import { listContractInvoice, addContractInvoice, delContractInvoice } from "@/api/oa/contract/contractInvoice";
99 150
 export default {
100 151
   props: {
101 152
     form: {
@@ -115,27 +166,28 @@ export default {
115 166
       sumPercent: 0,
116 167
       loading: true,
117 168
       isDisabled: true,
169
+      invoiceList: [{
170
+        invoiceAmount: 0,
171
+        invoicePercentage: 0,
172
+        invoiceTime: '',
173
+        remark: ''
174
+      }],
175
+      invoiceSumAmount: 0,
176
+      invoiceSumPercent: 0,
118 177
     }
119 178
   },
120 179
   watch: {
121 180
     'form.contractId'(newVal) {
122 181
       this.getPaidList();
182
+      this.getInvoiceList();
123 183
     }
124 184
   },
125 185
   created() {
126 186
     this.getPartyAList();
127 187
     this.getPaidList();
128
-    this.isDisabledFn();
188
+    this.getInvoiceList();
129 189
   },
130 190
   methods: {
131
-    isDisabledFn() {
132
-      let roles = ['finance', 'nfinance']
133
-      if (this.$store.getters.roles.some(e => roles.includes(e))) {
134
-        this.isDisabled = false
135
-      } else {
136
-        this.isDisabled = true
137
-      }
138
-    },
139 191
     // 查询业主单位列表
140 192
     getPartyAList() {
141 193
       listPartyA({
@@ -162,10 +214,39 @@ export default {
162 214
         this.loading = false;
163 215
       })
164 216
     },
217
+    getInvoiceList() {
218
+      this.loading = true;
219
+      listContractInvoice({ contractId: this.form.contractId }).then(res => {
220
+        if (res.total > 0) {
221
+          this.invoiceList = res.rows;
222
+        } else {
223
+          this.invoiceList = [{
224
+            invoiceAmount: 0,
225
+            invoicePercentage: 0,
226
+            invoiceTime: '',
227
+            remark: ''
228
+          }]
229
+        }
230
+        this.getInvoiceSum();
231
+        this.loading = false;
232
+      })
233
+    },
165 234
     getSum() {
166 235
       this.sumAmount = this.paidList.reduce((sum, item) => sum + Number(item.paidAmount), 0);
167 236
       this.sumPercent = this.paidList.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
168 237
     },
238
+    getInvoiceSum() {
239
+      this.invoiceSumAmount = this.invoiceList.reduce((sum, item) => sum + Number(item.invoiceAmount), 0);
240
+      this.invoiceSumPercent = this.invoiceList.reduce((sum, item) => sum + Number(item.invoicePercentage), 0);
241
+    },
242
+    addInvoiceList() {
243
+      this.invoiceList.push({
244
+        invoiceAmount: 0,
245
+        invoicePercentage: 0,
246
+        invoiceTime: '',
247
+        remark: ''
248
+      });
249
+    },
169 250
     addPaiList() {
170 251
       this.paidList.push({
171 252
         paidPercentage: 0,
@@ -184,11 +265,26 @@ export default {
184 265
       }
185 266
       this.getSum();
186 267
     },
268
+    deletInvoiceItem(index) {
269
+      let arr = this.invoiceList;
270
+      if (arr.length == 1) {
271
+        return;
272
+      }
273
+      if (index >= 0 && index < arr.length) {
274
+        arr.splice(index, 1);
275
+      }
276
+      this.getInvoiceSum();
277
+    },
187 278
     changePercentage(paid) {
188 279
       let percent = ((paid.paidAmount / this.form.amount) * 100).toFixed(2);
189 280
       paid.paidPercentage = Number(percent);
190 281
       this.getSum();
191 282
     },
283
+    changeInvoiceAmount(invoice) {
284
+      let percent = ((invoice.invoiceAmount / this.form.amount) * 100).toFixed(2);
285
+      invoice.invoicePercentage = Number(percent);
286
+      this.getInvoiceSum();
287
+    },
192 288
     async confirm() {
193 289
       const contractId = this.form.contractId
194 290
       await delContractPaid(contractId);
@@ -196,7 +292,12 @@ export default {
196 292
         p.contractId = contractId
197 293
         await addContractPaid(p);
198 294
       }
199
-      this.$message.success('回款进度已更新');
295
+      await delContractInvoice(contractId);
296
+      for (let i of this.invoiceList) {
297
+        i.contractId = contractId
298
+        await addContractInvoice(i);
299
+      }
300
+      this.$message.success('更新成功');
200 301
       this.$emit('cancel')
201 302
       this.$emit('getList')
202 303
     }

+ 121
- 19
oa-ui/src/views/oa/contract/components/subProgress.vue Datei anzeigen

@@ -2,11 +2,11 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-02-12 13:40:48
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-02-14 15:34:18
5
+ * @LastEditTime: 2025-07-23 16:54:28
6 6
 -->
7 7
 <template>
8 8
   <div>
9
-    <el-form ref="form" :model="form" label-width="130px" :disabled="isDisabled">
9
+    <el-form ref="form" :model="form" label-width="130px">
10 10
       <el-form-item label="合同名称" prop="subContractName">
11 11
         <el-input style="width: 100%;" v-model="form.subContractName" disabled placeholder="请输入合同名称"></el-input>
12 12
       </el-form-item>
@@ -26,7 +26,57 @@
26 26
         <el-input-number :controls="false" disabled v-model="form.subAmount" placeholder="请输入分包合同金额" />(元)
27 27
       </el-form-item>
28 28
       <el-form-item label="合同备注" prop="remark">
29
-        <el-input type="textarea" disabled v-model="form.remark" :autosize="{minRows:4}" />
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="(invoice, index) in invoiceList" :key="index">
41
+            <td>
42
+              {{ index + 1 }}
43
+            </td>
44
+            <td>
45
+              <el-input-number style="width:100%" :controls="false" v-model="invoice.invoiceAmount" clearable
46
+                @blur="changeInvoiceAmount(invoice)"
47
+                :disabled="!$store.getters.roles.includes('business')"></el-input-number>
48
+            </td>
49
+            <td>
50
+              {{ invoice.invoicePercentage }}
51
+            </td>
52
+            <td>
53
+              <el-date-picker style="width:100%" v-model="invoice.invoiceTime" value-format="yyyy-MM-dd" type="date"
54
+                placeholder="选择日期" :disabled="!$store.getters.roles.includes('business')">
55
+              </el-date-picker>
56
+            </td>
57
+            <td>
58
+              <el-input v-model="invoice.remark" type="textarea" clearable :autosize="{ minRows: 2 }"
59
+                :disabled="!$store.getters.roles.includes('business')"></el-input>
60
+            </td>
61
+            <td v-show="$store.getters.roles.includes('business')">
62
+              <div class="delete-btn" @click="deletInvoiceItem(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
+              {{ invoiceSumAmount.toFixed(2) }}
73
+            </td>
74
+            <td>
75
+              {{ invoiceSumPercent.toFixed(2) }}
76
+            </td>
77
+          </tr>
78
+        </table>
79
+        <el-button icon="el-icon-plus" size="mini" @click="addInvoiceList()" type="primary" plain></el-button>
30 80
       </el-form-item>
31 81
       <el-form-item style="text-align: left;" label="付款进度">
32 82
         <table border="1" style="width:100%" v-loading="loading">
@@ -43,7 +93,8 @@
43 93
             </td>
44 94
             <td>
45 95
               <el-input-number style="width:100%" :controls="false" v-model="paid.paidAmount" clearable
46
-                @blur="changePercentage(paid)"></el-input-number>
96
+                @blur="changePercentage(paid)"
97
+                :disabled="!$store.getters.roles.includes('finance', 'nfinance')"></el-input-number>
47 98
             </td>
48 99
             <td>
49 100
               <!-- <el-input-number style="width:100%" :controls="false" v-model="paid.paidPercentage" clearable
@@ -52,13 +103,14 @@
52 103
             </td>
53 104
             <td>
54 105
               <el-date-picker style="width:100%" v-model="paid.paidTime" value-format="yyyy-MM-dd" type="date"
55
-                placeholder="选择日期">
106
+                placeholder="选择日期" :disabled="!$store.getters.roles.includes('finance', 'nfinance')">
56 107
               </el-date-picker>
57 108
             </td>
58 109
             <td>
59
-              <el-input v-model="paid.remark" type="textarea" clearable :autosize="{ minRows: 2 }"></el-input>
110
+              <el-input v-model="paid.remark" type="textarea" clearable :autosize="{ minRows: 2 }"
111
+                :disabled="!$store.getters.roles.includes('finance', 'nfinance')"></el-input>
60 112
             </td>
61
-            <td v-show="!isDisabled">
113
+            <td v-show="$store.getters.roles.includes('finance', 'nfinance')">
62 114
               <div class="delete-btn" @click="deletPaiItem(index)">
63 115
                 <i class="el-icon-circle-close"></i>
64 116
               </div>
@@ -89,6 +141,7 @@
89 141
 <script>
90 142
 import { listPartner } from "@/api/oa/partner/partner";
91 143
 import { listContractPaid, addContractPaid, delContractPaid } from "@/api/oa/contract/contractPaid";
144
+import { listContractInvoice, addContractInvoice, delContractInvoice } from "@/api/oa/contract/contractInvoice";
92 145
 export default {
93 146
   props: {
94 147
     form: {
@@ -107,29 +160,29 @@ export default {
107 160
       sumAmount: 0,
108 161
       sumPercent: 0,
109 162
       loading: true,
110
-      isDisabled:true,
163
+      isDisabled: true,
164
+      invoiceList: [{
165
+        invoiceAmount: 0,
166
+        invoicePercentage: 0,
167
+        invoiceTime: '',
168
+        remark: ''
169
+      }],
170
+      invoiceSumAmount: 0,
171
+      invoiceSumPercent: 0,
111 172
     }
112 173
   },
113 174
   watch: {
114 175
     'form.subContractId'(newVal) {
115 176
       this.getPaidList();
177
+      this.getInvoiceList();
116 178
     }
117 179
   },
118 180
   created() {
119 181
     this.getPartnerList();
120 182
     this.getPaidList();
121
-    this.isDisabledFn();
122
-    
183
+    this.getInvoiceList();
123 184
   },
124 185
   methods: {
125
-    isDisabledFn(){
126
-      let roles = ['finance', 'nfinance']
127
-      if(this.$store.getters.roles.some(e => roles.includes(e))){
128
-        this.isDisabled = false
129
-      }else{
130
-        this.isDisabled = true
131
-      }
132
-    },
133 186
     // 查询承接单位列表
134 187
     getPartnerList() {
135 188
       listPartner({
@@ -156,10 +209,39 @@ export default {
156 209
         this.loading = false;
157 210
       })
158 211
     },
212
+    getInvoiceList() {
213
+      this.loading = true;
214
+      listContractInvoice({ contractId: this.form.subContractId }).then(res => {
215
+        if (res.total > 0) {
216
+          this.invoiceList = res.rows;
217
+        } else {
218
+          this.invoiceList = [{
219
+            invoiceAmount: 0,
220
+            invoicePercentage: 0,
221
+            invoiceTime: '',
222
+            remark: ''
223
+          }]
224
+        }
225
+        this.getInvoiceSum();
226
+        this.loading = false;
227
+      })
228
+    },
159 229
     getSum() {
160 230
       this.sumAmount = this.paidList.reduce((sum, item) => sum + Number(item.paidAmount), 0);
161 231
       this.sumPercent = this.paidList.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
162 232
     },
233
+    getInvoiceSum() {
234
+      this.invoiceSumAmount = this.invoiceList.reduce((sum, item) => sum + Number(item.invoiceAmount), 0);
235
+      this.invoiceSumPercent = this.invoiceList.reduce((sum, item) => sum + Number(item.invoicePercentage), 0);
236
+    },
237
+    addInvoiceList() {
238
+      this.invoiceList.push({
239
+        invoiceAmount: 0,
240
+        invoicePercentage: 0,
241
+        invoiceTime: '',
242
+        remark: ''
243
+      });
244
+    },
163 245
     addPaiList() {
164 246
       this.paidList.push({
165 247
         paidPercentage: 0,
@@ -178,11 +260,26 @@ export default {
178 260
       }
179 261
       this.getSum();
180 262
     },
263
+    deletInvoiceItem(index) {
264
+      let arr = this.invoiceList;
265
+      if (arr.length == 1) {
266
+        return;
267
+      }
268
+      if (index >= 0 && index < arr.length) {
269
+        arr.splice(index, 1);
270
+      }
271
+      this.getInvoiceSum();
272
+    },
181 273
     changePercentage(paid) {
182 274
       let percent = ((paid.paidAmount / this.form.subAmount) * 100).toFixed(2);
183 275
       paid.paidPercentage = Number(percent);
184 276
       this.getSum();
185 277
     },
278
+    changeInvoiceAmount(invoice) {
279
+      let percent = ((invoice.invoiceAmount / this.form.subAmount) * 100).toFixed(2);
280
+      invoice.invoicePercentage = Number(percent);
281
+      this.getInvoiceSum();
282
+    },
186 283
     async confirm() {
187 284
       const contractId = this.form.subContractId
188 285
       await delContractPaid(contractId);
@@ -190,7 +287,12 @@ export default {
190 287
         p.contractId = contractId
191 288
         await addContractPaid(p);
192 289
       }
193
-      this.$message.success('付款进度已更新');
290
+      await delContractInvoice(contractId);
291
+      for (let i of this.invoiceList) {
292
+        i.contractId = contractId
293
+        await addContractInvoice(i);
294
+      }
295
+      this.$message.success('更新成功');
194 296
       this.$emit('cancel')
195 297
       this.$emit('getList')
196 298
     }

+ 57
- 40
oa-ui/src/views/oa/contract/index.vue Datei anzeigen

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:52:00
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2025-07-17 10:57:14
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2025-07-23 17:17:19
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -22,11 +22,10 @@
22 22
             :value="partyA.partyAId">
23 23
           </el-option>
24 24
         </el-select>
25
-      </el-form-item>      
25
+      </el-form-item>
26 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>
27
+        <el-input v-model="queryParams.queryString" placeholder="请输入关键字" clearable @keyup.enter.native="handleQuery" />
28
+      </el-form-item>
30 29
       <el-form-item>
31 30
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
32 31
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -39,7 +38,7 @@
39 38
           v-hasPermi="['oa:contract:add']">登记承接合同</el-button>
40 39
       </el-col>
41 40
       <el-col :span="1.5">
42
-        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
41
+        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="exportOpen = true"
43 42
           v-hasPermi="['oa:contract:export']">导出</el-button>
44 43
       </el-col>
45 44
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -53,50 +52,35 @@
53 52
       <el-table-column label="甲方单位" align="center" prop="partyA.partyAName" width="220px" />
54 53
       <el-table-column label="合同编码(公司)" align="center" prop="contractCode" />
55 54
       <el-table-column label="合同编号(业主)" align="center" prop="contractNumber" />
56
-      <!-- <el-table-column label="履约保证金" align="center" prop="deposit" /> -->
57
-      <!-- <el-table-column label="合同文件" align="center" prop="contractDocument" show-overflow-tooltip>
58
-        <template slot-scope="scope">
59
-          <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + scope.row.contractDocument}`)">
60
-            {{ getFileName(scope.row.contractDocument) }}
61
-          </el-link>
62
-        </template>
63
-      </el-table-column> -->
64
-      <el-table-column label="拟稿日期" align="center" prop="draftTime">
55
+      <el-table-column label="拟稿日期" align="center" prop="draftTime" width="110px">
65 56
         <template slot-scope="scope">
66 57
           <span>{{ parseTime(scope.row.draftTime, '{y}-{m}-{d}') }}</span>
67 58
         </template>
68 59
       </el-table-column>
69
-      <el-table-column label="签订日期" align="center" prop="signDate">
60
+      <el-table-column label="签订日期" align="center" prop="signDate" width="110px">
70 61
         <template slot-scope="scope">
71 62
           <span>{{ parseTime(scope.row.signDate, '{y}-{m}-{d}') }}</span>
72 63
         </template>
73 64
       </el-table-column>
74
-      <el-table-column prop="percentage" align="center" label="回款进度" width="120px" sortable>
65
+      <el-table-column prop="percentage" align="center" label="开票/回款进度" width="130px" sortable>
75 66
         <template slot-scope="scope">
76
-          <el-progress :text-inside="true" :stroke-width="26" :status="formatStatus(scope.row.percentage)"
77
-            :percentage="scope.row.percentage" text-color="#fff"></el-progress>
67
+          <div class="mb10">
68
+            <el-progress :text-inside="true" :stroke-width="26" :status="formatStatus(scope.row.percentage)"
69
+              :percentage="scope.row.percentage" text-color="#fff"></el-progress>
70
+            <div>
71
+              {{ scope.row.paidAmount }}
72
+            </div>
73
+          </div>
74
+          <div>
75
+            <el-progress :text-inside="true" :stroke-width="26" :status="formatStatus(scope.row.percentage)"
76
+              :percentage="scope.row.percentage" text-color="#fff"></el-progress>
78 77
             <div>
79
-              {{scope.row.paidAmount}}
78
+              {{ scope.row.paidAmount }}
80 79
             </div>
80
+          </div>
81 81
         </template>
82 82
       </el-table-column>
83
-      <!-- <el-table-column label="签订备注" align="center" prop="signRemark" /> -->
84
-      <!-- <el-table-column label="签订扫描件" align="center" prop="signScan" show-overflow-tooltip>
85
-        <template slot-scope="scope">
86
-          <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + scope.row.signScan}`)">
87
-            {{ getFileName(scope.row.signScan) }}
88
-          </el-link>
89
-        </template>
90
-      </el-table-column> -->
91
-      <!-- <el-table-column label="评审方式" align="center" prop="commentType">
92
-        <template slot-scope="scope">
93
-          <el-tag :type="scope.row.commentType == '2' ? 'success' : 'warning'">
94
-            {{ getCommentType(scope.row.commentType) }}
95
-          </el-tag>
96
-        </template>
97
-      </el-table-column> -->
98
-      <!-- <el-table-column label="合同备注" align="center" prop="remark" /> -->
99
-      <el-table-column label="拟稿人" align="center" prop="drafter">
83
+      <el-table-column label="拟稿人" align="center" prop="drafter" width="110px">
100 84
         <template slot-scope="scope">
101 85
           {{ getUserName(scope.row.drafter) }}
102 86
         </template>
@@ -128,6 +112,22 @@
128 112
     <el-dialog :title="title" :visible.sync="progressOpen" width="50%" append-to-body>
129 113
       <payment-progress :form="progressContract" @cancel="progressOpen = false" @getList="getList"></payment-progress>
130 114
     </el-dialog>
115
+    <!-- 导出对话框 -->
116
+    <el-dialog :title="title" :visible.sync="exportOpen" width="50%" append-to-body>
117
+      <el-form>
118
+        <el-form-item label="导出字段名" label-width="100px">
119
+          <el-checkbox-group v-model="selectedFields">
120
+            <el-checkbox v-for="field in fieldsObj" :key="field.value" :label="field.value">
121
+              {{ field.label }}
122
+            </el-checkbox>
123
+          </el-checkbox-group>
124
+        </el-form-item>
125
+      </el-form>
126
+      <div slot="footer" class="dialog-footer">
127
+        <el-button type="primary" @click="handleExport">导出</el-button>
128
+        <el-button @click="exportOpen = false">取消</el-button>
129
+      </div>
130
+    </el-dialog>
131 131
   </div>
132 132
 </template>
133 133
 
@@ -198,6 +198,20 @@ export default {
198 198
       queryLoading: true,
199 199
       progressContract: {},
200 200
       progressOpen: false,
201
+      exportOpen: false,
202
+      fieldsObj: [
203
+        { label: '合同名称', value: 'contractName' },
204
+        { label: '合同金额', value: 'amount' },
205
+        { label: '甲方单位', value: 'partyAName' },
206
+        { label: '合同编码(公司)', value: 'contractCode' },
207
+        { label: '合同编号(业主)', value: 'contractNumber' },
208
+        { label: '拟稿人', value: 'drafter' },
209
+        { label: '拟稿日期', value: 'draftTime' },
210
+        { label: '签订日期', value: 'signDate' },
211
+        { label: '实际回款金额', value: 'paidAmount' },
212
+        { label: '实际回款比例', value: 'paidPercentage' },
213
+      ],
214
+      selectedFields: []
201 215
     };
202 216
   },
203 217
   created() {
@@ -425,8 +439,11 @@ export default {
425 439
     },
426 440
     /** 导出按钮操作 */
427 441
     handleExport() {
428
-      this.download('oa/contract/export', {
429
-        ...this.queryParams
442
+      let selectFields = this.selectedFields.join(',');
443
+      console.log(selectFields);
444
+      this.download('oa/contract/exportSelectFields', {
445
+        ...this.queryParams,
446
+        selectFields: selectFields
430 447
       }, `contract_${new Date().getTime()}.xlsx`)
431 448
     },
432 449
     remoteMethod(val) {

Laden…
Abbrechen
Speichern