From 821205d09297946ec40cf90f74482ea8ad6dbd1e Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期二, 23 四月 2024 18:10:39 +0800 Subject: [PATCH] 合同导入、规则、展示 --- src/views/system/calculate/report/index.vue | 92 ++++++++++++++++++++++++++------------------- 1 files changed, 53 insertions(+), 39 deletions(-) diff --git a/src/views/system/calculate/report/index.vue b/src/views/system/calculate/report/index.vue index 6dea7bd..3665b14 100644 --- a/src/views/system/calculate/report/index.vue +++ b/src/views/system/calculate/report/index.vue @@ -67,9 +67,7 @@ <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">鏍哥畻</el-button> </div> <div class="text item">鍚堝悓<span class="time">{{ checkUnitName }}</span></div> - <div class="text item">鎬婚噾棰�<span class="time">{{ "1000鍏�" }}</span></div> <div class="text item">鎵e噺閲戦<span class="time">{{ "10鍏�" }}</span></div> - <div class="text item">鍓╀綑閲戦<span class="time">{{ "990鍏�" }}</span></div> <div class="text item">鏈�鏂版牳绠楁椂闂� <span class="time">{{ item.checkTime }}</span> </div> @@ -118,32 +116,41 @@ <el-table-column prop="score" label="鑰冩牳鍒嗘暟" - width="180" + doNotSum + > + <template slot-scope="scope"> + <el-link @click="toScorePage(scope.row)">{{scope.row.score}}</el-link> + </template> + </el-table-column> + <el-table-column + prop="ruleName" + label="閫傜敤瑙勫垯" doNotSum> </el-table-column> - <el-table-column - prop="score" - label="鎵e垎绯绘暟" - width="180"> - <template slot-scope="scope"> - <el-tooltip class="item" effect="dark" :content="'鑰冩牳瑙勫垯锛�' + scope.row.description" placement="top"> - <span>{{ scope.row.value }}</span> - </el-tooltip> - </template> - </el-table-column> - <el-table-column - label="鎵e噺閲戦(鍏�)" + <el-table-column + prop="score" + label="鎵e垎绯绘暟" + > + <template slot-scope="scope"> + <el-tooltip class="item" effect="dark" :content="'鑰冩牳瑙勫垯锛�' + scope.row.description" placement="top"> + <span>{{ scope.row.value }}</span> + </el-tooltip> + </template> + </el-table-column> + <el-table-column + label="鎵e噺閲戦(鍏�)" prop="money" - width="180"> - <template slot-scope="scope"> + width="180"> + <template slot-scope="scope"> <el-input type="number" :precision="2" :step="0.1" :min="0" :max="1000000" v-model="scope.row.money" - placeholder="璇疯緭鍏ユ墸鍑忛噾棰�"> - </el-input> - </template> - </el-table-column> + disabled + placeholder="璇疯緭鍏ユ墸鍑忛噾棰�"> + </el-input> + </template> + </el-table-column> </el-table> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> @@ -164,7 +171,7 @@ </template> <script> -import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; +import { getCalculateReports, getCalculateReportById, deleteCalculateReportByIds, addCalculateReport, editCalculateReport } from "@/api/platform/calculate-report"; export default { name: "CheckResult", @@ -179,15 +186,17 @@ tableData: [{ time: '2024-03-03', score: '94', - value: '0.01', - money: '', + value: '1%', + ruleName: '<95', + money: '10', description: '姣忓皯1鍒嗘墸褰撴湀鎬绘湇鍔¤垂鐨�1%銆備緥濡傦細褰撴湀鑰冩牳寰楀垎91.5鍒嗭紝鎵i櫎褰撴湀鏈嶅姟璐�3.5%鐨勯噾棰�', }, { time: '2024-04-03', score: '95', value: '0', - money: '', - description: '姣忓皯1鍒嗘墸褰撴湀鎬绘湇鍔¤垂鐨�1%銆備緥濡傦細褰撴湀鑰冩牳寰楀垎91.5鍒嗭紝鎵i櫎褰撴湀鏈嶅姟璐�3.5%鐨勯噾棰�', + ruleName: '鈮�95', + money: '0', + description: '涓嶆墸娆�', }, ], manualScoreOpen: false, manualScoreForm: {}, @@ -253,7 +262,7 @@ this.queryParams["start"] = this.daterangeCheckTime[0]; this.queryParams["end"] = this.daterangeCheckTime[1]; } - listCheckResult(this.queryParams).then(response => { + getCalculateReports(this.queryParams).then(response => { this.checkResultList = response.rows; this.total = response.total; this.loading = false; @@ -290,11 +299,11 @@ this.$modal.msgWarning("璇峰~鍐欏垎鏁�"); return } - manualScore(this.manualScoreForm).then(res => { - this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); - this.cancelManualScore(); - this.getList(); - }) + // manualScore(this.manualScoreForm).then(res => { + // this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); + // this.cancelManualScore(); + // this.getList(); + // }) }, handleDetail(row) { console.log("row", row) @@ -308,7 +317,7 @@ let text = row.publish == 1 ? '鍙栨秷鍙戝竷' : '鍙戝竷'; const ids = row.id || this.ids; this.$modal.confirm('鏄惁纭' + text + '鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return publishCheckResult(ids); + // return publishCheckResult(ids); }).then(() => { this.getList(); this.$modal.msgSuccess(text + "鎴愬姛"); @@ -342,7 +351,7 @@ handleUpdate(row) { this.reset(); const id = row.id || this.ids - getCheckResult(id).then(response => { + getCalculateReportById(id).then(response => { this.form = response.data; this.open = true; this.title = "淇敼鑰冩牳缁撴灉"; @@ -354,13 +363,13 @@ this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { - updateCheckResult(this.form).then(response => { + editCalculateReport(this.form).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); this.open = false; this.getList(); }); } else { - addCheckResult(this.form).then(response => { + addCalculateReport(this.form).then(response => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; this.getList(); @@ -373,7 +382,7 @@ handleDelete(row) { const ids = row.id || this.ids; this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delCheckResult(ids); + return deleteCalculateReportByIds(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); @@ -385,6 +394,7 @@ ...this.queryParams }, `checkResult_${new Date().getTime()}.xlsx`) }, + /** 鍚堣琛� */ getSummaries(param) { const { columns, data } = param; const sums = []; @@ -411,12 +421,16 @@ sums[index] = '-'; // 鎴栬�呭叾浠栦綘鎯宠鏄剧ず鐨勫唴瀹� } } else { - sums[index] = 'N/A'; + sums[index] = '-'; } }); return sums; - } + }, + toScorePage() { + // 浣跨敤Vue Router杩涜椤甸潰璺宠浆 + this.$router.push('/contract/score/index'); + }, } }; </script> -- Gitblit v1.8.0