Explorar o código

新增完成度设置

ymz hai 2 meses
pai
achega
5249664a34

+ 2 - 1
.env.development

@@ -5,4 +5,5 @@ VUE_APP_TYPE= 'dev'
 # VUE_APP_URL = 'https://mic.cnbg.com.cn'
 # VUE_APP_URL = 'https://cnbg.yaoyi.net'
 # VUE_APP_URL = 'http://192.168.110.25:9999'
-VUE_APP_URL = 'https://mic-t.cnbg.com.cn'
+# VUE_APP_URL = 'https://mic-t.cnbg.com.cn'
+VUE_APP_URL = 'http://nk5xzj.natappfree.cc'

+ 4 - 9
src/views/paymentVoucherNotification/distributeVoucher/components/createDialig.vue

@@ -281,15 +281,6 @@ export default {
       });
     },
     review(row, type) {
-      console.log('row', row);
-      let arr = [
-        {
-          id: row.packageId,
-          scorePackageName: row.packageName
-        }
-      ];
-      this.redemptionPkgList = arr;
-
       this.type = type;
       this.title = '审核';
       this.form.supervisionDeductScore = row.supervisionDeductScore;
@@ -314,7 +305,11 @@ export default {
     },
     async redemptionValStat(id) {
       const res = await redemptionValStatApi(id);
+
       if (res.data.code === 0) {
+        if (res.data.data.taskApprovedScoreRateNinetyPercent) {
+          this.$refs.table1.setInfo(res.data.data.taskApprovedScoreRateNinetyPercent);
+        }
         this.detailInfo = res.data.data;
         this.form.pkgName = res.data.data.pkgName;
         this.form.pkgScore = res.data.data.pkgScore;

+ 2 - 1
src/views/paymentVoucherNotification/distributeVoucher/components/table/table1.js

@@ -7,7 +7,8 @@ const tablenum = [
     max: 90,
     percentageOfIndividualitems: 0,
     totalPercentage: 0,
-    total: 0
+    total: 0,
+    disabled: true
   },
   {
     itemId: 1,

+ 14 - 9
src/views/paymentVoucherNotification/distributeVoucher/components/table/table1.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-table :data="tableData" border style="width: 100%" :header-cell-style="{'text-align': 'center'}" :cell-style="{'text-align': 'center'}" :span-method="objectSpanMethod">
+    <el-table :data="tableData" border style="width: 100%" :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }" :span-method="objectSpanMethod">
       <el-table-column prop="category" label="《产品市场服务协议》指标描述"> </el-table-column>
       <el-table-column prop="subCategory" label="《市场服务包合同》指标描述"> </el-table-column>
       <el-table-column label="评价值">
@@ -17,7 +17,7 @@
                 :controls="false"
                 :min="0"
                 :max="scope.row.max"
-                @change="e => percentageChange(e, scope.row)"
+                @change="(e) => percentageChange(e, scope.row)"
               /><span>%</span>
             </div>
           </template>
@@ -39,6 +39,7 @@
 
 <script>
 import tableData from './table1';
+import BigNumber from 'bignumber.js';
 export default {
   data() {
     return {
@@ -46,29 +47,33 @@ export default {
     };
   },
   methods: {
+    setInfo(info) {
+      const result = new BigNumber(info).multipliedBy('0.9');
+      this.tableData[0].total = result;
+    },
     initInfo(info) {
       const tableDataCopy = JSON.parse(JSON.stringify(tableData));
       this.tableData = tableDataCopy;
     },
     redemptionFn(redemptionResult) {
       const tableDataCopy = JSON.parse(JSON.stringify(tableData));
-      tableDataCopy.forEach(item => {
-        const curr = redemptionResult.find(iten => iten.itemId === item.itemId);
+      tableDataCopy.forEach((item) => {
+        const curr = redemptionResult.find((iten) => iten.itemId === item.itemId);
         if (curr) {
           item.total = curr.total;
         }
       });
       this.tableData = tableDataCopy;
-      this.tableData.forEach(item => {
+      this.tableData.forEach((item) => {
         this.percentageChange(item.total, item);
       });
     },
 
     percentageChange(e, item) {
       const label = item.category;
-      const arr = this.tableData.filter(item => item.category === label);
+      const arr = this.tableData.filter((item) => item.category === label);
       const sum = arr.reduce((total, item) => total + item.total, 0);
-      this.tableData.forEach(item => {
+      this.tableData.forEach((item) => {
         if (item.category === label) {
           item.percentageOfIndividualitems = sum;
         }
@@ -78,12 +83,12 @@ export default {
       let sumC = this.tableData[6].percentageOfIndividualitems;
 
       const sumD = sumA * sumB * sumC;
-      this.tableData.forEach(item => {
+      this.tableData.forEach((item) => {
         item.totalPercentage = sumD / 10000;
       });
       this.$emit('totalPercentageChange', sumD);
     },
-    objectSpanMethod({row, column, rowIndex, columnIndex}) {
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (columnIndex === 0 || columnIndex === 3) {
         if (rowIndex === 0) {
           return {