瀏覽代碼

前后:合同业绩评价导出的bug

MAC 5 年之前
父節點
當前提交
983e81794f

+ 1 - 1
src/dashoo.cn/backend/api/business/oilcontract/contractSumScoreItems/contractSumScoreItems.go

@@ -5,7 +5,7 @@ import "time"
 type OilContractSumScoreItems struct{
 	Id               int       `json:"Id" xorm:"not null pk autoincr comment('ID') INT(11) 'Id'"`
 	SumScoreId       int       `json:"SumScoreId" xorm:"default 0 comment('主表ID') INT(11) 'SumScoreId'"`
-	Conclusion       int       `json:"Conclusion" xorm:"default 0 comment('0不合格,1观察使用,2合格,3优秀') INT(11) 'Conclusion'"`
+	Conclusion       int       `json:"Conclusion" xorm:"default 0 comment('3不合格,2合格,1优秀') INT(11) 'Conclusion'"`
 	SumScore         float64   `json:"SumScore" xorm:"default 0.00 comment('实际分值') DECIMAL(11,2) 'SumScore'"`
 	Category         int       `json:"Category" xorm:"not null default 0 comment('0二级单位创建1专业处创建') INT(11) 'Category'"`
 	Content1    	 string    `json:"Content1" xorm:"default '0' comment('评价内容') VARCHAR(50) 'Content1'"`

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

@@ -63,10 +63,10 @@ callbackHost=http://localhost:10091/api
 # BaseUrl=http://localhost:8080/acti-api/api/acti
 
 contractUrl=http://weed1.labsop.cn:9390/4,03b0345ae913f9
-reviewGoodsUrl=http://weed1.labsop.cn:9390/5,03b0473e9e63ab
+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,03b0515f8fd0c5
+contractSumScoreUrl=http://weed1.labsop.cn:9390/3,03b05dcfbab784
 ServiceSumScoreUrl=http://weed1.labsop.cn:9390/1,036a3addb41d61
 GoodsSumScoreUrl=http://weed1.labsop.cn:9390/3,036a40af17839b
 

+ 17 - 0
src/dashoo.cn/backend/api/controllers/oilcontract/contractReview.go

@@ -3,6 +3,7 @@ package oilcontract
 import (
 	"dashoo.cn/backend/api/business/oilcontract/contract"
 	"dashoo.cn/backend/api/business/oilcontract/contractEvaluationItems"
+	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/organize"
 	"dashoo.cn/business2/permission"
 
@@ -267,6 +268,10 @@ func (this *OilContractReviewController) DocExport() {
 	where3 := " Id= '" + utils.ToStr(model.ContractId) + "' "
 	contractSvc.GetEntityByWhere(OilContractName,where3,&contractModel)
 
+	var supplierEntity supplier.OilSupplier
+	supplierSvc := supplier.GetOilSupplierService(utils.DBE)
+	supplierSvc.GetEntityByIdBytbl(OilSupplierName, contractModel.SupplierId, &supplierEntity)
+
 	datamap := structToMapDemo(model)
 
 	var score       = 0.00
@@ -274,6 +279,7 @@ func (this *OilContractReviewController) DocExport() {
 	// 新增配置项
 	for i,v := range items {
 		fmt.Print(i)
+		fmt.Print(utils.ToStr(v.ItemId))
 
 		if v.Type == 1 {
 			datamap["score_"+utils.ToStr(v.ItemId)] = v.Score
@@ -315,6 +321,17 @@ func (this *OilContractReviewController) DocExport() {
 		datamap["ConstructionOwner"]    = contractModel.ConstructionOwner
 		datamap["ConstructionTelphone"] = contractModel.ConstructionTelphone
 	}
+	if supplierEntity.Id != 0 {
+		if supplierEntity.Grade == "一级" {
+			datamap["OperType"] = "☑一级供应商 □二级制造商 □二级贸易商 □代理商"
+		}else if supplierEntity.OperType == "制造商" {
+			datamap["OperType"] = "□一级供应商 ☑二级制造商 □二级贸易商 □代理商"
+		}else if supplierEntity.OperType == "代理商"{
+			datamap["OperType"] = "□一级供应商 □二级制造商 □二级贸易商 ☑代理商"
+		}else if supplierEntity.OperType == "贸易商"{
+			datamap["OperType"] = "□一级供应商 □二级制造商 ☑二级贸易商 □代理商"
+		}
+	}
 
 	//	获取组织名称
 	svcorg := organize.GetOrganizeService(utils.DBE)

+ 12 - 2
src/dashoo.cn/backend/api/controllers/oilcontract/contractSumScore.go

@@ -734,8 +734,8 @@ func (this *OilContractSumScoreController) DocExport() {
 	datamap["AccessCardNo"] = supplierCertModel.AccessCardNo
 	datamap["ContactName"]  = supplierModel.ContactName
 	datamap["Mobile"]       = supplierModel.Mobile
-	datamap["Result1"]      = item.Result1
-	datamap["Result2"]      = item.Result2
+	datamap["Result1"]      = item.Result2
+	datamap["Result2"]      = item.Result1
 
 	datamap["SumScore1"]    = item.SumScore1
 	datamap["Content1"]     = item.Content1
@@ -770,6 +770,16 @@ func (this *OilContractSumScoreController) DocExport() {
 	datamap["CreateDate"] = t.Format("2006年01月02日")
 	datamap["Creater"]    = this.User.Realname
 
+	if item.Conclusion == 1 {
+		datamap["Conclusion"] = "☑优秀 □合格 □观察使用 □不合格"
+	}else if item.Conclusion == 2 {
+		datamap["Conclusion"] = "□优秀 ☑合格 □观察使用 □不合格"
+	}else if item.Conclusion == 3 {
+		datamap["Conclusion"] = "□优秀 □合格 □观察使用 ☑不合格"
+	}else {
+		datamap["Conclusion"] = "□优秀 □合格 ☑观察使用 □不合格"
+	}
+
 	fileName := "承包商年度评价表和综合年度评价表.docx"
 	Url      := utils.Cfg.MustValue("workflow", "contractSumScoreUrl")
 

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


二進制
src/dashoo.cn/doc/承包商日常业绩评价表模板.docx


二進制
src/dashoo.cn/doc/服务商年度评价表.xlsx


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

@@ -81,7 +81,7 @@
           <el-table-column sortable show-overflow-tooltip prop="SumScore1" header-align="center" label="项目组织实施(10分)" align="center"
                            min-width="155"></el-table-column>
           <el-table-column sortable show-overflow-tooltip prop="SumScore2" header-align="center" label="项目质量管理(20分)" align="center"
-                           min-width="155"></el-table-column>
+                           width="160"></el-table-column>
           <el-table-column sortable show-overflow-tooltip prop="SumScore3" header-align="center" align="center"
                            label="项目职业健康安全与环境管理(20分)" min-width="255"></el-table-column>
           <el-table-column sortable show-overflow-tooltip prop="SumScore4" header-align="center" label="项目成本管理(5分)" align="center"

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis/_opera/evaluate.vue

@@ -152,7 +152,7 @@
       </el-tabs>
     </el-card>
 
-    <submit-popup ref="submitpopup" :eveId="formData.Id" :selectDeptBoolean2="true" :formData="formData"
+    <submit-popup ref="submitpopup" :eveId="parseInt(formData.Id)" :selectDeptBoolean2="true" :formData="formData"
                   @refreshPage="refreshPage"></submit-popup>
 
 

+ 1 - 2
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-goods/_opera/evaluate.vue

@@ -152,7 +152,7 @@
       </el-tabs>
     </el-card>
 
-    <submit-popup ref="submitpopup" :eveId="formData.Id" :formData="formData" @refreshPage="refreshPage"></submit-popup>
+    <submit-popup ref="submitpopup" :eveId="parseInt(formData.Id)" :formData="formData" @refreshPage="refreshPage"></submit-popup>
 
 
   </div>
@@ -226,7 +226,6 @@ export default {
       auditBtn: false,
       auditBtnBoolean: true,
       auditBtnBooleanZhuan: true,
-      auditstepcode: '',
 
       departmentBoolean: false,
       checkBUtton: false,

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-service/_opera/evaluate.vue

@@ -152,7 +152,7 @@
       </el-tabs>
     </el-card>
 
-    <submit-popup ref="submitpopup" :eveId="formData.Id" :selectDeptBoolean="false" :formData="formData"
+    <submit-popup ref="submitpopup" :eveId="parseInt(formData.Id)" :selectDeptBoolean="false" :formData="formData"
                   @refreshPage="refreshPage"></submit-popup>