Browse Source

准入评审表导出

huahaiyan 6 years ago
parent
commit
5b3c15022e

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

@@ -83,9 +83,9 @@ callbackHost=http://36dcae10.ngrok.io
 # AposeUrl=http://localhost:8080/acti-api/api/apose
 # BaseUrl=http://localhost:8080/acti-api/api/acti
 
-goodsModuleHost=http://weed1.labsop.cn:9390/1,260f8721befc
-basisModuleHost=http://weed1.labsop.cn:9390/2,26101dab3692
-techModuleHost=http://weed1.labsop.cn:9390/3,261195740758
+goodsModuleHost=http://weed1.labsop.cn:9390/3,28f046b04ec1
+basisModuleHost=http://weed1.labsop.cn:9390/6,28f159601b19
+techModuleHost=http://weed1.labsop.cn:9390/4,28efba13116a
 goodsPdfHost=http://weed1.labsop.cn:9390/4,25ab20466969
 basisPdfHost=http://weed1.labsop.cn:9390/3,25ac524b9715
 techPdfHost=http://weed1.labsop.cn:9390/6,25ad0b7df344

+ 59 - 38
src/dashoo.cn/backend/api/controllers/oilsupplier/supplierdataentry.go

@@ -58,6 +58,7 @@ func StructToMapDemo(obj interface{}) map[string]interface{} {
 func (this *SupplierDataEntryController) DocExport() {
 	// 填物资类信息表首页信息
 	Id := this.Ctx.Input.Param(":tbid")
+	certId := this.GetString("CertId")
 	var Url string
 	var fileName string
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
@@ -67,7 +68,7 @@ func (this *SupplierDataEntryController) DocExport() {
 	svc := supplierdataentry.GetSupplierDataEntryService(utils.DBE)
 	where1 := "1=1"
 	where1 += " AND Id = '" + Id + "'"
-	where2 := "SupplierId = '" + Id + "'"
+	where2 := "Id = '" + certId + "'"
 	svc.GetEntityByWhere(OilSupplierName, where1, &model1)
 	svc.GetEntityByWhere(OilSupplierCertName, where2, &model2)
 
@@ -91,7 +92,7 @@ func (this *SupplierDataEntryController) DocExport() {
 	svc.GetEntitysByOrderbyWhere(OilWinningProjectName, where3, "1", &tabledata6)
 	svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where3, "1", &tabledata7)
 
-	datamap := StructToMapDemo(model1)
+	datamap := StructToMapDemo(model1.OilSupplier)
 
 	if model2.SupplierTypeCode == "01" {
 		//Url = "http://weed1.labsop.cn:9390/1,248318341f7c"
@@ -111,41 +112,61 @@ func (this *SupplierDataEntryController) DocExport() {
 
 	//model1
 	datamap["SetupTime"] = model1.SetupTime.Format("2006年01月02日")
-	datamap["QualifCert"] = model1.QualifCert
-	datamap["QualifCertLevel"] = model1.QualifCertLevel
-	datamap["SpecIndustryCert"] = model1.SpecIndustryCert
-	datamap["MaunLicense"] = model1.MaunLicense
-	datamap["HseTraining"] = model1.HseTraining
-	datamap["Fax"] = model1.Fax
-	datamap["CompanyTel"] = model1.CompanyTel
-	datamap["SupplierName"] = model1.SupplierName
-	datamap["SpecTypeCode"] = model1.SpecTypeName
-	datamap["Country"] = model1.Country
-	datamap["MaunAgent"] = model1.MaunAgent
-	datamap["SupplierCertificate"] = model1.SupplierCertificate
-	datamap["MgrUnit"] = model1.MgrUnit
-	datamap["Grade"] = model1.Grade
-	datamap["CommercialNo"] = model1.CommercialNo
-	datamap["CountryTaxNo"] = model1.CountryTaxNo
-	datamap["OrganCode"] = model1.OrganCode
-	datamap["Address"] = model1.Address
-	datamap["ZipCode"] = model1.ZipCode
-	datamap["LinkAddress"] = model1.LinkAddress
-	datamap["LinkZipCode"] = model1.LinkZipCode
-	datamap["QualitySystemCert"] = model1.QualitySystemCert
-	datamap["ProductQualityCert"] = model1.ProductQualityCert
-	datamap["MaunLicense"] = model1.MaunLicense
-	datamap["LegalPerson"] = model1.LegalPerson
-	datamap["CompanyType"] = model1.CompanyType
-	datamap["ContactName"] = model1.ContactName
-	datamap["RegCapital"] = model1.RegCapital
-	datamap["DepositBank"] = model1.DepositBank
-	datamap["BankAccount"] = model1.BankAccount
-	datamap["Mobile"] = model1.Mobile
-	datamap["EMail"] = model1.EMail
-	datamap["BankCreditRating"] = model1.BankCreditRating
-	datamap["BusinessScope"] = model1.BusinessScope
-	datamap["Telphone"] = model1.Telphone
+	if model1.OperType != "" {
+		if model1.OperType == "1" || model1.OperType == "制造商"{
+			datamap["OperType"] = "☑制造商  □代理商  □贸易商"
+		}else if model1.OperType == "2" || model1.OperType == "代理商"{
+			datamap["OperType"] = "□制造商  ☑代理商  □贸易商"
+		}else if model1.OperType == "3" || model1.OperType == "代理商"{
+			datamap["OperType"] = "□制造商  □代理商  ☑贸易商"
+		}else {
+			datamap["OperType"] = "□制造商  □代理商  □贸易商"
+		}
+	}
+	if model1.SpecTypeCode != "" {
+		if model1.SpecTypeCode == "1"{
+			datamap["SpecTypeCode"] = "☑一般外部 □多元企业"
+		}else if model1.SpecTypeCode == "2"{
+			datamap["SpecTypeCode"] = "□一般外部 ☑多元企业"
+		}else {
+			datamap["SpecTypeCode"] = "□一般外部 □多元企业"
+		}
+	}
+	//datamap["QualifCert"] = model1.QualifCert
+	//datamap["QualifCertLevel"] = model1.QualifCertLevel
+	//datamap["SpecIndustryCert"] = model1.SpecIndustryCert
+	//datamap["MaunLicense"] = model1.MaunLicense
+	//datamap["HseTraining"] = model1.HseTraining
+	//datamap["Fax"] = model1.Fax
+	//datamap["CompanyTel"] = model1.CompanyTel
+	//datamap["SupplierName"] = model1.SupplierName
+	//datamap["SpecTypeCode"] = model1.SpecTypeName
+	//datamap["Country"] = model1.Country
+	//datamap["MaunAgent"] = model1.MaunAgent
+	//datamap["SupplierCertificate"] = model1.SupplierCertificate
+	//datamap["MgrUnit"] = model1.MgrUnit
+	//datamap["Grade"] = model1.Grade
+	//datamap["CommercialNo"] = model1.CommercialNo
+	//datamap["CountryTaxNo"] = model1.CountryTaxNo
+	//datamap["OrganCode"] = model1.OrganCode
+	//datamap["Address"] = model1.Address
+	//datamap["ZipCode"] = model1.ZipCode
+	//datamap["LinkAddress"] = model1.LinkAddress
+	//datamap["LinkZipCode"] = model1.LinkZipCode
+	//datamap["QualitySystemCert"] = model1.QualitySystemCert
+	//datamap["ProductQualityCert"] = model1.ProductQualityCert
+	//datamap["MaunLicense"] = model1.MaunLicense
+	//datamap["LegalPerson"] = model1.LegalPerson
+	//datamap["CompanyType"] = model1.CompanyType
+	//datamap["ContactName"] = model1.ContactName
+	//datamap["RegCapital"] = model1.RegCapital
+	//datamap["DepositBank"] = model1.DepositBank
+	//datamap["BankAccount"] = model1.BankAccount
+	//datamap["Mobile"] = model1.Mobile
+	//datamap["EMail"] = model1.EMail
+	//datamap["BankCreditRating"] = model1.BankCreditRating
+	//datamap["BusinessScope"] = model1.BusinessScope
+	//datamap["Telphone"] = model1.Telphone
 
 	//审批意见
 	for i := 0; i < len(historicTasks); i++ {
@@ -244,7 +265,7 @@ func (this *SupplierDataEntryController) DocExport() {
 		ColsNum: 4,
 	}
 	datamap["TableComment"] = []string{"MajorEquipments", "ThreeYears", "Patent", "Winning"}
-
+	//retDocUrl := svcActiviti.FillWordTemplate(datamap, Url, fileName)
 	retDocUrl := svcActiviti.FillWordWatermarkTemplate(datamap, Url, fileName, model1.SupplierName)
 	var datainfo ErrorDataInfo
 	datainfo.Code = 0

+ 3 - 2
src/dashoo.cn/frontend_web/src/api/oilsupplier/dataentry.js

@@ -1,8 +1,9 @@
 export default {
-  docexport (tbid, myAxios) {
+  docexport (tbid, params, myAxios) {
     return myAxios({
       url: '/supplierdataentry/exportword/' + tbid,
-      method: 'post'
+      method: 'post',
+      params: params
     })
   },
   pdfexport (tbid, typecode, myAxios) {

+ 5 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -448,7 +448,7 @@ export default {
           SecondAudit: '',
           ThirdAudit: '',
           CertId: '',
-          AuditRemark: "",
+          AuditRemark: '',
           TypeCode: '02'
         },
         orgtreeprops: {
@@ -686,7 +686,10 @@ export default {
       // 导出到Word文件
       toWord () {
         let id = this.formData.Id
-        dataapi.docexport(id, this.$axios)
+        let params = {
+          CertId: this.certId
+        }
+        dataapi.docexport(id, params, this.$axios)
           .then(res => {
             // response
             if (res.data.code === 0) {

+ 13 - 10
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -451,7 +451,7 @@ import FloatImgBtn from '@/components/floatButton/index'
           SecondAudit: '',
           ThirdAudit: '',
           CertId: '',
-          AuditRemark: "",
+          AuditRemark: '',
           TypeCode: '01'
         },
         orgtreeprops: {
@@ -620,12 +620,12 @@ import FloatImgBtn from '@/components/floatButton/index'
   },
     mounted () {
       this.serviceId = this.$route.params.opera + ''
-    if (this.$route.query.rtn) {
+      if (this.$route.query.rtn) {
         this.showReturn = 0
       }
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
-    }
+      }
       if (this.serviceId !== 'add' && this.serviceId > 0) {
         this.formData.Id = this.serviceId
       } else {
@@ -877,7 +877,10 @@ import FloatImgBtn from '@/components/floatButton/index'
       // 导出到Word文件
       toWord () {
         let id = this.formData.Id
-        dataapi.docexport(id, this.$axios)
+        let params = {
+          CertId: this.certId
+        }
+        dataapi.docexport(id, params, this.$axios)
           .then(res => {
             // response
             if (res.data.code === 0) {
@@ -1173,7 +1176,7 @@ import FloatImgBtn from '@/components/floatButton/index'
       auditOrgChang (val) {
         console.log('------val', val)
         let auditstepcode = 'SECOND_TRIAL'
-      api.getAuditerByFirst(val, auditstepcode, this.$axios)
+        api.getAuditerByFirst(val, auditstepcode, this.$axios)
           .then(res => {
             this.secauditerOptions = res.data.item
           })
@@ -1253,8 +1256,8 @@ import FloatImgBtn from '@/components/floatButton/index'
 
       addEntity () {
         this.formData.SupplierTypeCode = '01'
-      this.formData.SupplierTypeName = '物资类'
-      api
+        this.formData.SupplierTypeName = '物资类'
+        api
           .addEntity(this.formData, this.$axios)
           .then(res => {
             if (res.data.code === 0) {
@@ -1493,11 +1496,11 @@ import FloatImgBtn from '@/components/floatButton/index'
       jstimehandle (val) {
         if (val === '') {
           return '----'
-      } else if (val === '0001-01-01T08:00:00+08:00') {
+        } else if (val === '0001-01-01T08:00:00+08:00') {
           return '----'
-      } else if (val === '5000-01-01T23:59:59+08:00') {
+        } else if (val === '5000-01-01T23:59:59+08:00') {
           return '永久'
-      } else {
+        } else {
           val = val.replace('T', ' ')
           return val.substring(0, 10)
         }

+ 6 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -443,7 +443,7 @@
           SecondAudit: '',
           ThirdAudit: '',
           CertId: '',
-          AuditRemark: "",
+          AuditRemark: '',
           TypeCode: '03'
         },
         orgtreeprops: {
@@ -713,7 +713,10 @@
       // 导出到Word文件
       toWord () {
         let id = this.formData.Id
-        dataapi.docexport(id, this.$axios)
+        let params = {
+          CertId: this.certId
+        }
+        dataapi.docexport(id, params, this.$axios)
           .then(res => {
             // response
             if (res.data.code === 0) {
@@ -1054,7 +1057,7 @@
       auditOrgChang (val) {
         console.log('------val', val)
         let auditstepcode = 'SECOND_TRIAL'
-      api
+        api
           .getAuditerByFirst(val, auditstepcode, this.$axios)
           .then(res => {
             this.secauditerOptions = res.data.item

+ 4 - 1
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -878,7 +878,10 @@ export default {
     },
     // 导出到Word文件
     toWord (val) {
-      dataapi.docexport(val.Id, this.$axios)
+      let params = {
+        CertId: this.certId
+      }
+      dataapi.docexport(val.Id, params, this.$axios)
         .then(res => {
           // response
           if (res.data.code === 0) {

+ 13 - 7
src/dashoo.cn/frontend_web/src/pages/select/specialselect/index.vue

@@ -122,7 +122,7 @@ export default {
     this.getDictOptions()
     this.initDatas()
     this.initNftOptions()
-    //watermark.set("大港油田企业法规处")
+    // watermark.set("大港油田企业法规处")
   },
   data () {
     return {
@@ -308,9 +308,12 @@ export default {
       }
       return wbout
     },
-    //导出到Word文件
+    // 导出到Word文件
     toWord (val) {
-      dataapi.docexport(val.Id, this.$axios)
+      let params = {
+        CertId: this.certId
+      }
+      dataapi.docexport(val.Id, params, this.$axios)
         .then(res => {
           // response
           if (res.data.code === 0) {
@@ -331,9 +334,12 @@ export default {
           console.error(err)
         })
     },
-    //导出准入范围到pdf
+    // 导出准入范围到pdf
     toPdf (val) {
-      dataapi.pdfexport(val.Id, this.$axios)
+      let params = {
+        CertId: this.certId
+      }
+      dataapi.docexport(val.Id, params, this.$axios)
         .then(res => {
           // response
           if (res.data.code === 0) {
@@ -370,8 +376,8 @@ export default {
             }
           }
         }).catch(err => {
-        console.error(err)
-      })
+          console.error(err)
+        })
     },
     // 列表排序功能
     orderby (column) {