2
3
Prechádzať zdrojové kódy

前后:承包商年度导出;查看不判断权限

dubch 4 rokov pred
rodič
commit
466284266d

+ 69 - 0
src/dashoo.cn/backend/api/business/oilcontract/contractSumScore/contractSumScoreService.go

@@ -124,6 +124,49 @@ func (s *OilContractSumScoreService) GetPagingComputeEntitiesWithOrderBytbl(page
 	}
 	return total
 }
+func (s *OilContractSumScoreService) GetComputeEntity(entitiesPtr interface{}, where string) {
+	var sql string
+	sql =  `select YEAR(NOW()) as Year,contract.ContractClass,contract.SupplierId,contract.SupplierName,count(review.id) as count, `
+
+	sql += ` sum(case when items.SequenceNo in  ('1') AND items.Type = 2 AND items.Value > 0 then 1 else 0 end )  B1, `
+	sql += ` sum(case when items.SequenceNo in  ('2') AND items.Type = 2 AND items.Value > 0 then 1 else 0 end )  B2, `
+	sql += ` sum(case when items.SequenceNo in  ('3') AND items.Type = 2 AND items.Value > 0 then 1 else 0 end )  B3, `
+	sql += ` sum(case when items.SequenceNo in  ('4') AND items.Type = 2 AND items.Value > 0 then 1 else 0 end )  B4, `
+	sql += ` sum(case when items.SequenceNo in  ('5') AND items.Type = 2 AND items.Value > 0 then 1 else 0 end )  B5, `
+	sql += ` sum(case when items.SequenceNo in  ('6') AND items.Type = 2 AND items.Value > 0 then 1 else 0 end )  B6, `
+	sql += ` sum(case when items.SequenceNo in  ('7') AND items.Type = 2 AND items.Value > 0 then 1 else 0 end )  B7, `
+	sql += ` sum(case when items.SequenceNo in  ('8') AND items.Type = 2 AND items.Value > 0 then 1 else 0 end )  B8, `
+
+	sql += ` ROUND(sum(case when items.SequenceNo in  ('1') AND items.Type =1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type =1 then 1 else 0 end),2) Score1,  `
+	sql += ` ROUND(sum(case when items.SequenceNo in  ('2') AND items.Type =1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type =1 then 1 else 0 end),2) Score2,  `
+	sql += ` ROUND(sum(case when items.SequenceNo in  ('3') AND items.Type =1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type =1 then 1 else 0 end),2) Score3,  `
+	sql += ` ROUND(sum(case when items.SequenceNo in  ('4') AND items.Type =1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type =1 then 1 else 0 end),2) Score4,  `
+	sql += ` ROUND(sum(case when items.SequenceNo in  ('5') AND items.Type =1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type =1 then 1 else 0 end),2) Score5,  `
+	sql += ` ROUND(sum(case when items.SequenceNo in  ('6') AND items.Type =1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type =1 then 1 else 0 end),2) Score6,  `
+	sql += ` ROUND(sum(case when items.SequenceNo in  ('7') AND items.Type =1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type =1 then 1 else 0 end),2) Score7,  `
+	sql += ` ROUND(sum(case when items.SequenceNo in  ('8') AND items.Type =1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type =1 then 1 else 0 end),2) Score8,  `
+	sql += ` ROUND(sum(case when items.SequenceNo in  ('9') AND items.Type =1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type =1 then 1 else 0 end),2) Score9,  `
+	sql += ` ROUND(sum(case when items.ParentId = 0 AND items.Type = 1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type = 1 then 1 else 0 end),2) Score,  `
+	sql += ` case when ROUND(sum(case when items.ParentId = 0 AND items.Type = 1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type = 1 then 1 else 0 end),2) <60 then 3 when ROUND(sum(case when items.ParentId = 0 AND items.Type = 1 then items.Score else 0 end)/sum(case when items.SequenceNo in  ('1') AND items.Type = 1 then 1 else 0 end),2) <80 then 2 else 1 end as Evaluate `
+	sql += ` from ` + controllers.OilContractReviewName + ` review `
+	sql += ` left join ` + controllers.OilContractName + ` contract on review.ContractId=contract.id `
+	sql += ` left join ` + controllers.OilContractEvaluationItemsName + ` items on items.ContentReviewId=review.id and items.LevelCode=1 `
+	sql += ` where ` + where
+	sql += ` group by contract.SupplierId,contract.SupplierName `
+
+	s.DBE.SQL(sql).Get(entitiesPtr)
+}
+func (s *OilContractSumScoreService) GetComputeEntity1(entitiesPtr interface{}, where string) {
+	var sql string
+	sql =  `select group_concat(DISTINCT items.Remark) as Content1`
+	sql += ` from ` + controllers.OilContractEvaluationItemsName + ` items `
+	sql += ` left join ` + controllers.OilContractReviewName + ` review on items.ContentReviewId=review.id and items.LevelCode=2 `
+	sql += ` left join ` + controllers.OilContractName + ` contract on review.ContractId=contract.id `
+	sql += ` where ` + where
+	sql += ` group by items.ParentId `
+
+	s.DBE.SQL(sql).Find(entitiesPtr)
+}
 func (s *OilContractSumScoreService) GetSumListEntitiesWithOrderBytbl(entitiesPtr interface{}, where string) {
 
 	var sql string
@@ -171,3 +214,29 @@ func (s *OilContractSumScoreService) GetComputeEntityBytbl(where string) OilCont
 	s.DBE.SQL(sql).Get(&model)
 	return model
 }
+
+func (s *OilContractSumScoreService)GetCount(where string) (total int64) {
+	var resultsSlice []map[string][]byte
+	//获取总记录数
+	sqlCount := ` select count(*) from OilContract`
+	sqlCount += ` where ` + where
+
+	resultsSlice, _ = s.DBE.Query(sqlCount)
+	if len(resultsSlice) > 0 {
+		results := resultsSlice[0]
+		for _, value := range results {
+			total, _ = strconv.ParseInt(string(value), 10, 64)
+			break
+		}
+	}
+	return total
+}
+
+func (s *OilContractSumScoreService)GetSum(entitiesPtr interface{},where string){
+
+	sql := ` select sum(Amount) as Amount from OilContract`
+	sql += ` where ` + where
+
+	s.DBE.SQL(sql).Get(entitiesPtr)
+}
+

+ 1 - 1
src/dashoo.cn/backend/api/conf/app.conf

@@ -66,7 +66,7 @@ contractUrl=http://weed1.labsop.cn:9390/4,03b0345ae913f9
 reviewGoodsUrl=http://weed1.labsop.cn:9390/6,03b06cfaec27ac
 reviewServiceUrl=http://weed1.labsop.cn:9390/4,03b0451e356a36
 reviewBasisUrl=http://weed1.labsop.cn:9390/6,03b041cda73303
-contractSumScoreUrl=http://weed1.labsop.cn:9390/3,03b05dcfbab784
+contractSumScoreUrl=http://weed1.labsop.cn:9390/3,04b52a0cbe710e
 ServiceSumScoreUrl=http://weed1.labsop.cn:9390/1,036a3addb41d61
 GoodsSumScoreUrl=http://weed1.labsop.cn:9390/3,036a40af17839b
 

+ 107 - 54
src/dashoo.cn/backend/api/controllers/oilcontract/contractSumScore.go

@@ -1,6 +1,7 @@
 package oilcontract
 
 import (
+	"dashoo.cn/backend/api/business/oilcontract/contract"
 	"dashoo.cn/backend/api/business/oilcontract/contractSumScoreItems"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/business2/permission"
@@ -729,71 +730,114 @@ func (this *OilContractSumScoreController) UpdateEntity() {
 }
 
 // @Title 从数据录入数据导出到word文档
-// @Description 数据存入word
+// @Description 数据存入word1
 // @Success	200	{object} controllers.Request
 // @router /exportword/:id [get]
 func (this *OilContractSumScoreController) DocExport() {
-	Id := this.Ctx.Input.Param(":id")
-	var errinfo ErrorInfo
-	if Id == "" {
-		errinfo.Message = "操作失败!请求信息不完整"
-		errinfo.Code = -2
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-		return
+
+	where := " 1=1"
+	SupplierId := this.Ctx.Input.Param(":id")
+	ContractClass := this.GetString("ContractClass", "02")
+	Result2 := this.GetString("Result2")
+
+	if SupplierId != "" {
+		where = where + " and contract.SupplierId = " + SupplierId
+	}
+	if ContractClass != "" {
+		where = where + " and contract.ContractClass = '" + ContractClass + "'"
 	}
 
-	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	// 今年的汇总
+	year := strconv.Itoa(time.Now().Year())
+	month := "01"
+	day := "01"
+	where = where + " and review.CreateOn>='" + year + "-" + month + "-" + day + "' "
+
+	//if CreateOn != "" {
+	//	dates := strings.Split(CreateOn, ",")
+	//	if len(dates) == 2 {
+	//		minDate := dates[0]
+	//		maxDate := dates[1]
+	//		where = where + " and review.CreateOn>='" + minDate + "' and review.CreateOn<='" + maxDate + "'"
+	//	}
+	//}
+
+	// 审核通过的参与核算
+	where = where + " and review.Status='8' "
 
-	var model contractSumScore.OilContractSumScore
 	svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
-	svc.GetEntityByIdBytbl(OilContractSumScoreName, Id, &model)
+	var list contractSumScore.OilContractComputeSumScoreVo
+	svc.GetComputeEntity(&list, where)
+
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
 
 	var supplierModel supplier.OilSupplier
 	supplierSvc := supplier.GetOilSupplierService(utils.DBE)
-	supplierSvc.GetEntityByIdBytbl(OilSupplierName, model.SupplierId, &supplierModel)
+	supplierSvc.GetEntityById (SupplierId, &supplierModel)
+
+	var model contractSumScore.OilContractSumScore
+	//svc.GetEntity(&model, "SupplierId = " + supplierModel.Id)
 
 	var supplierCertModel suppliercert.OilSupplierCert
 	suppliercertSvc := suppliercert.GetOilSupplierCertService(utils.DBE)
-	suppliercertSvc.GetEntityByIdBytbl(OilSupplierCertName, model.SupplierId, &supplierCertModel)
+	suppliercertSvc.GetEntityByIdBytbl(OilSupplierCertName, supplierModel.Id, &supplierCertModel)
 
-	var item contractSumScoreItems.OilContractSumScoreItems
-	itemSvc := contractSumScoreItems.GetOilContractSumScoreItemsService(utils.DBE)
-	where := " 1=1 AND SumScoreId= '" + utils.ToStr(model.Id) + "' AND Category =  '0' "
-	itemSvc.GetEntityByWhere(OilContractSumScoreItemsName, where, &item)
+	var item []contractSumScoreItems.OilContractSumScoreItems
+	var con contract.OilContract
+	svc.GetComputeEntity1(&item, "contract.SupplierId = " + SupplierId)
+	//itemSvc := contractSumScoreItems.GetOilContractSumScoreItemsService(utils.DBE)
+	//where1 := " 1=1 AND SumScoreId= '" + utils.ToStr(model.Id) + "' AND Category =  '0' "
+	//itemSvc.GetEntityByWhere(OilContractSumScoreItemsName, where1, &item)
+	total := svc.GetCount( "SupplierId = " + SupplierId)
+	svc.GetSum(&con,"SupplierId = " + SupplierId + " and PlanFinishDate >= '"+ year + "-01-01" + "' and PlanFinishDate <= '"+ year + "-12-31'")
 
 	datamap := structToMapDemo(model)
+	datamap["SupplierName"] = supplierModel.SupplierName
 	datamap["AccessCardNo"] = supplierCertModel.AccessCardNo
 	datamap["ContactName"] = supplierModel.ContactName
 	datamap["Mobile"] = supplierModel.Mobile
-	datamap["Result1"] = item.Result2
-	datamap["Result2"] = item.Result1
-
-	datamap["SumScore1"] = item.SumScore1
-	datamap["Content1"] = item.Content1
-	datamap["SumScore2"] = item.SumScore2
-	datamap["Content2"] = item.Content2
-	datamap["SumScore3"] = item.SumScore3
-	datamap["Content3"] = item.Content3
-	datamap["SumScore4"] = item.SumScore4
-	datamap["Content4"] = item.Content4
-	datamap["SumScore5"] = item.SumScore5
-	datamap["Content5"] = item.Content5
-	datamap["SumScore6"] = item.SumScore6
-	datamap["Content6"] = item.Content6
-	datamap["SumScore7"] = item.SumScore7
-	datamap["Content7"] = item.Content7
-	datamap["SumScore8"] = item.SumScore8
-	datamap["Content8"] = item.Content8
-
-	datamap["B1"] = item.B1
-	datamap["B2"] = item.B2
-	datamap["B3"] = item.B3
-	datamap["B4"] = item.B4
-	datamap["B5"] = item.B5
-	datamap["B6"] = item.B6
-	datamap["B7"] = item.B7
-	datamap["B8"] = item.B8
+	datamap["Result1"] = Result2
+	if list.Evaluate == "1" {
+		datamap["Result2"] = "优秀"
+	} else if list.Evaluate == "2" {
+		datamap["Result2"] = "合格"
+	} else if list.Evaluate == "3" {
+		datamap["Result2"] = "不合格"
+	} else {
+		datamap["Result2"] = "观察使用"
+	}
+	datamap["SumScore"] = list.Score
+	datamap["SumScore1"] = list.Score1
+	datamap["Count"] = total
+	Amount := 10000.00
+	if con.Amount != "" {
+		Amount ,_ = strconv.ParseFloat(con.Amount, 64)
+	}
+	datamap["Money"] = Amount/10000
+	datamap["Content1"] = strings.TrimLeft(item[0].Content1, ",")
+	datamap["SumScore2"] = list.Score2
+	datamap["Content2"] = strings.TrimLeft(item[1].Content1, ",")
+	datamap["SumScore3"] = list.Score3
+	datamap["Content3"] = strings.TrimLeft(item[2].Content1, ",")
+	datamap["SumScore4"] = list.Score4
+	datamap["Content4"] = strings.TrimLeft(item[3].Content1, ",")
+	datamap["SumScore5"] = list.Score5
+	datamap["Content5"] = strings.TrimLeft(item[4].Content1, ",")
+	datamap["SumScore6"] = list.Score6
+	datamap["Content6"] = strings.TrimLeft(item[5].Content1, ",")
+	datamap["SumScore7"] = list.Score7
+	datamap["Content7"] = strings.TrimLeft(item[6].Content1, ",")
+	datamap["SumScore8"] = list.Score8
+	datamap["Content8"] = strings.TrimLeft(item[7].Content1, ",")
+
+	datamap["B1"] = list.B1
+	datamap["B2"] = list.B2
+	datamap["B3"] = list.B3
+	datamap["B4"] = list.B4
+	datamap["B5"] = list.B5
+	datamap["B6"] = list.B6
+	datamap["B7"] = list.B7
+	datamap["B8"] = list.B8
 
 	datamap["Year"] = model.Year
 	datamap["Department"] = model.Unit
@@ -802,11 +846,11 @@ func (this *OilContractSumScoreController) DocExport() {
 	datamap["CreateDate"] = t.Format("2006年01月02日")
 	datamap["Creater"] = this.User.Realname
 
-	if item.Conclusion == 1 {
+	if list.Evaluate == "1" {
 		datamap["Conclusion"] = "☑优秀 □合格 □观察使用 □不合格"
-	} else if item.Conclusion == 2 {
+	} else if list.Evaluate == "2" {
 		datamap["Conclusion"] = "□优秀 ☑合格 □观察使用 □不合格"
-	} else if item.Conclusion == 3 {
+	} else if list.Evaluate == "3" {
 		datamap["Conclusion"] = "□优秀 □合格 □观察使用 ☑不合格"
 	} else {
 		datamap["Conclusion"] = "□优秀 □合格 ☑观察使用 □不合格"
@@ -819,11 +863,20 @@ func (this *OilContractSumScoreController) DocExport() {
 	retDocUrl := svcActiviti.FillWordTemplate(datamap, Url, fileName)
 	//retDocUrl := svcActiviti.FillWordWatermarkTemplate(datamap, Url, fileName, model.SupplierName)
 	var datainfo ErrorDataInfo
-	datainfo.Code = 0
-	datainfo.Item = retDocUrl
-	datainfo.Message = "导出成功"
-	this.Data["json"] = &datainfo
-	this.ServeJSON()
+	if retDocUrl != "" {
+		datainfo.Code = 0
+		datainfo.Item = retDocUrl
+		datainfo.Message = "导出成功"
+		this.Data["json"] = &datainfo
+		this.ServeJSON()
+	} else {
+		datainfo.Code = -1
+		datainfo.Item = retDocUrl
+		datainfo.Message = "导出失败"
+		this.Data["json"] = &datainfo
+		this.ServeJSON()
+	}
+
 }
 
 // @Title 从数据录入数据导出到Excel文档

BIN
src/dashoo.cn/doc/承包商年度评价表和综合年度评价表模板.docx


+ 4 - 3
src/dashoo.cn/frontend_web/src/api/oilcontract/contractSumScore.js

@@ -68,10 +68,11 @@ export default {
   },
 
   // 导出评论合同
-  docexportEle (id, myAxios) {
+  docexportEle (params, id, myAxios) {
     return myAxios({
-      url: `/contract-score/exportword/${id}`,
-      method: 'get'
+      url: `/contract-score/exportword/` + id,
+      method: 'GET',
+      params: params
     })
   },
   // 导出评论excel

+ 19 - 3
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis-year/_opera/operation.vue

@@ -12,8 +12,9 @@
           <i class="icon icon-table2"></i> 查看
         </span>
         <span style="float: right;">
-          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" v-if="formData.Id!=0"
-                     @click="exportExcel">导出</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px"
+                     @click="exportExcel" :loading="excelLoading">导出</el-button>
+          <!--
            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="formData.Status=='7'&&auditBtn"
                       @click="commonAuditClick(7)">企管法规处审批</el-button>
            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="formData.Status=='4'&&auditBtn"
@@ -375,6 +376,7 @@ export default {
       },
       activeName: '1',
       serviceId: '',
+      excelLoading: false,
       // 评价信息
       evaluateData: {
         Id: 0
@@ -440,7 +442,11 @@ export default {
   methods: {
     // 导出
     exportExcel () {
-      api.docexportEle(this.formData.Id, this.$axios).then(res => {
+      this.excelLoading = true
+      let params = {
+        Result2 : this.evaluateData.Result2
+      }
+      api.docexportEle(params, this.evaluateData.SupplierId, this.$axios).then(res => {
         if (res.data.code === 0) {
           let docurl = res.data.item
           // 内网服务器专用
@@ -451,7 +457,17 @@ export default {
           } else {
             location.href = 'http://' + docurl
           }
+          this.$message({
+            type: 'success',
+            message: res.data.message
+          })
+        } else {
+          this.$message({
+            type: 'warning',
+            message: res.data.message
+          })
         }
+        this.excelLoading = false
       }).catch(err => {
         console.error(err)
       })

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis-year/index.vue

@@ -44,7 +44,7 @@
         </el-form>
       </div>
       <el-table id="rebateSetTable" highlight-current-row stripe size="mini" :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" v-loading="tableLoading">
-        <el-table-column label="操作" header-align="center" width="100" align="center" fixed v-if="jurisdictionBoolean">
+        <el-table-column label="操作" header-align="center" width="100" align="center" fixed >
           <template slot-scope="scope">
               <el-button type="text" title="查看" size="small" icon="el-icon-edit" @click="onNavigateScore(scope.row)">查看</el-button>
           </template>

+ 10 - 7
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-goods-year/index.vue

@@ -37,12 +37,12 @@
               </el-dropdown-menu>
             </el-dropdown>
             <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">导入</el-button> -->
-            <el-button type="primary" size="mini" style="margin-left:10px;" @click="exportExcel">导出</el-button>
+            <el-button type="primary" size="mini" style="margin-left:10px;" @click="exportExcel" :loading="excelLoading">导出</el-button>
           </el-form-item>
         </el-form>
       </div>
       <el-table id="rebateSetTable" highlight-current-row stripe size="mini" :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" v-loading="tableLoading">
-        <el-table-column label="操作" v-if="jurisdictionBoolean" header-align="center" width="100" align="center" fixed>
+        <el-table-column label="操作" header-align="center" width="100" align="center" fixed>
             <template slot-scope="scope">
                 <el-button type="text" title="查看" size="small" icon="el-icon-edit" @click="onNavigateScore(scope.row)">查看</el-button>
             </template>
@@ -50,6 +50,11 @@
 
         <el-table-column sortable show-overflow-tooltip prop="SupplierName" header-align="center" min-width="130" align="center" label="供应商名称"></el-table-column>
         <el-table-column sortable show-overflow-tooltip prop="Score" header-align="center" label="评价得分(100分)" align="center" width="140"></el-table-column>
+        <el-table-column sortable show-overflow-tooltip prop="Evaluate" label="评价结果" header-align="center" width="100" align="center">
+          <template slot-scope="scope">
+            {{evaluateFun(scope.row.Evaluate)}}
+          </template>
+        </el-table-column>
         <el-table-column sortable show-overflow-tooltip label="评价内容及得分" header-align="center">
           <el-table-column sortable show-overflow-tooltip prop="Score1" align="center" header-align="center" label="产品质量(30分)" width="140"></el-table-column>
           <el-table-column sortable show-overflow-tooltip prop="Score2" align="center" header-align="center" label="合同履约(20分)" width="140"></el-table-column>
@@ -57,11 +62,6 @@
           <el-table-column sortable show-overflow-tooltip prop="Score4" align="center" header-align="center" label="诚信经营(15分)" width="140"></el-table-column>
           <el-table-column sortable show-overflow-tooltip prop="Score5" align="center" header-align="center" label="协同响应(20分)" width="140"></el-table-column>
         </el-table-column>
-        <el-table-column sortable show-overflow-tooltip prop="Evaluate" label="评价结果" header-align="center" width="100" align="center">
-          <template slot-scope="scope">
-            {{evaluateFun(scope.row.Evaluate)}}
-          </template>
-        </el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
                      :page-sizes="[10, 50, 100, 200, 500]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
@@ -184,6 +184,7 @@
       return {
         tableLoading: false,
         dialogVisible: false,
+        excelLoading: false,
         //列表数据
         entityList: [],
         //分页参数
@@ -415,6 +416,7 @@
         })
       },
       exportExcel() {
+        this.excelLoading = true
         //分页及列表条件
         let params = {
           _currentPage: this.currentPage,
@@ -456,6 +458,7 @@
               message: res.data.message
             })
           }
+          this.excelLoading = false
         }).catch(err => {
           console.error(err)
         })

+ 10 - 7
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-service-year/index.vue

@@ -39,29 +39,29 @@
                 <el-dropdown-item command="clear">查询重置</el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
-             <el-button type="primary" size="mini" style="margin-left:10px;" @click="exportExcel">导出</el-button>
+             <el-button type="primary" size="mini" style="margin-left:10px;" @click="exportExcel" :loading="excelLoading">导出</el-button>
           </el-form-item>
         </el-form>
       </div>
       <el-table id="rebateSetTable" highlight-current-row stripe size="mini" :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" v-loading="tableLoading">
-        <el-table-column v-if="jurisdictionBoolean" label="操作" header-align="center" width="100" align="center" fixed>
+        <el-table-column label="操作" header-align="center" width="100" align="center" fixed>
           <template slot-scope="scope">
               <el-button type="text" title="查看" size="small" icon="el-icon-edit" @click="onNavigateScore(scope.row)">查看</el-button>
           </template>
         </el-table-column>
         <el-table-column sortable show-overflow-tooltip prop="SupplierName" header-align="center" min-width="130" align="center" label="服务商名称"></el-table-column>
         <el-table-column sortable show-overflow-tooltip prop="Score" header-align="center" label="评价得分" width="120" align="center"></el-table-column>
+        <el-table-column sortable show-overflow-tooltip prop="Evaluate" align="center" label="评价结果" header-align="center" width="100" >
+          <template slot-scope="scope">
+            {{evaluateFun(scope.row.Evaluate)}}
+          </template>
+        </el-table-column>
         <el-table-column sortable show-overflow-tooltip label="评价内容及得分" header-align="center">
           <el-table-column sortable show-overflow-tooltip prop="Score1" align="center" header-align="center" label="项目管理(40分)" width="140"></el-table-column>
           <el-table-column sortable show-overflow-tooltip prop="Score2" align="center" header-align="center" label="HSE管理(30分)" width="140"></el-table-column>
           <el-table-column sortable show-overflow-tooltip prop="Score3" align="center" header-align="center" label="合同履行(15分)" width="140"></el-table-column>
           <el-table-column sortable show-overflow-tooltip prop="Score4" align="center" header-align="center" label="企业诚信(15分)" width="140"></el-table-column>
         </el-table-column>
-        <el-table-column sortable show-overflow-tooltip prop="Evaluate" align="center" label="评价结果" header-align="center" width="100" >
-          <template slot-scope="scope">
-            {{evaluateFun(scope.row.Evaluate)}}
-          </template>
-        </el-table-column>
       </el-table>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
                      :page-sizes="[10, 50, 100, 200, 500]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
@@ -178,6 +178,7 @@
         tableLoading: false,
         jurisdictionBoolean:false,
         dialogVisible: false,
+        excelLoading: false,
         //列表数据
         entityList: [],
         //分页参数
@@ -350,6 +351,7 @@
         }
       },
       exportExcel() {
+        this.excelLoading = true
         //分页及列表条件
         let params = {
           _currentPage: this.currentPage,
@@ -391,6 +393,7 @@
               message: res.data.message
             })
           }
+          this.excelLoading = false
         }).catch(err => {
           console.error(err)
         })