Browse Source

表单下载

lining 5 years ago
parent
commit
f2b3ce8031

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

@@ -62,9 +62,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/6,2fe2d9949468
-basisModuleHost=http://weed1.labsop.cn:9390/1,2fe101019c4d
-techModuleHost=http://weed1.labsop.cn:9390/6,2fe01891af44
+goodsModuleHost=http://weed1.labsop.cn:9390/6,387ef1cde26d
+basisModuleHost=http://weed1.labsop.cn:9390/4,387f41329d9c
+techModuleHost=http://weed1.labsop.cn:9390/2,388095f31c3d
 goodsPdfHost=http://weed1.labsop.cn:9390/1,363c179f05a5
 basisPdfHost=http://weed1.labsop.cn:9390/5,363a63175da9
 techPdfHost=http://weed1.labsop.cn:9390/4,363bbbd2d097

+ 41 - 7
src/dashoo.cn/backend/api/controllers/oilsupplier/supplierdataentry.go

@@ -5,6 +5,7 @@ import (
 	"dashoo.cn/backend/api/business/oilsupplier/supplierdataentry"
 	"dashoo.cn/backend/api/business/workflow"
 	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/business3/userRole"
 	"dashoo.cn/utils"
 	"encoding/json"
 	"fmt"
@@ -194,13 +195,6 @@ func (this *SupplierDataEntryController) DocExport() {
 	//datamap["BusinessScope"] = model1.BusinessScope
 	//datamap["Telphone"] = model1.Telphone
 
-	//审批意见
-	for i := 0; i < len(historicTasks); i++ {
-		if historicTasks[i].TaskName == "业务处室专业审批" {
-			datamap["OfficeRemarks"] = historicTasks[i].Remarks
-		}
-	}
-
 	//model2
 	datamap["WorkerTotal"] = model2.WorkerTotal
 	datamap["ContractNum"] = model2.ContractNum
@@ -260,6 +254,46 @@ func (this *SupplierDataEntryController) DocExport() {
 		datamap["Aremark" + strconv.Itoa(i + 1)] = item.Remark
 	}
 
+	//审批意见
+	datamap["FName"] = "" // 初审
+	datamap["FOpinion"] = ""
+	datamap["YDate"] = "    年  月  日" // 初审
+	datamap["SName"] = ""
+	datamap["SDate"] = "    年  月  日" // 复审
+	datamap["OName"] = ""
+	datamap["ODate"] = "    年  月  日" // 专业处室
+	datamap["SOpinion"] = ""
+	datamap["OfficeRemarks"] = ""
+	datamap["ZDate"] = "    年  月  日" // 集中评审
+	datamap["ZOPinion"] = ""
+	for i := 0; i < len(historicTasks); i++ {
+		fmt.Println(historicTasks[i].EndTime)
+		if historicTasks[i].TaskName == "业务处室专业审批" {
+			var user userRole.Base_User
+			svc.GetEntityById(historicTasks[i].Assignee, &user)
+			datamap["OfficeRemarks"] = historicTasks[i].Remarks
+			datamap["OName"] = user.Realname
+			datamap["ODate"] = time.Unix(historicTasks[i].EndTime / 1e3, 0).Format("2006年01月02日")
+		} else if historicTasks[i].TaskName == "二级单位初审" {
+			var user userRole.Base_User
+			svc.GetEntityById(historicTasks[i].Assignee, &user)
+			datamap["FOpinion"] = historicTasks[i].Remarks
+			datamap["FName"] = user.Realname
+			datamap["YDate"] = time.Unix(historicTasks[i].EndTime / 1e3,0).Format("2006年01月02日")
+		} else if historicTasks[i].TaskName == "二级单位复审" {
+			var user userRole.Base_User
+			svc.GetEntityById(historicTasks[i].Assignee, &user)
+			datamap["SOpinion"] = historicTasks[i].Remarks
+			datamap["SName"] = user.Realname
+			datamap["SDate"] = time.Unix(historicTasks[i].EndTime / 1e3,0).Format("2006年01月02日")
+		} else if historicTasks[i].TaskName == "集中评审" {
+			var user userRole.Base_User
+			svc.GetEntityById(historicTasks[i].Assignee, &user)
+			datamap["ZOPinion"] = historicTasks[i].Remarks
+			datamap["ZDate"] = time.Unix(historicTasks[i].EndTime / 1e3,0).Format("2006年01月02日")
+		}
+	}
+
 	//var interfaceSlice3 = make([]interface{}, len(tabledata3))
 	//for i, d := range tabledata3 {
 	//	interfaceSlice3[i] = d

+ 27 - 28
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -91,19 +91,10 @@
     </el-card>
 
     <el-dialog :title="Title" :visible.sync="visible" top="5vh" width="900px">
-      <el-form ref="subfileForm" :model="SubfileForm" label-width="100px">
+      <el-form ref="subfileForm" :model="SubfileForm" :rules="rules" label-width="100px">
         <el-row>
-          <!-- <el-col :span="12">
-            <el-form-item label="资质名称" required>
-              <el-select ref="refSupplierCertSub" v-model="SubfileForm.SupplierCertSubId" style="width:100%"
-                placeholder="请选择资质名称" @change="getCode()">
-                <el-option v-for="item in businessList" :label="item.Name" :value="item.Id" :key="item.Id">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col> -->
           <el-col :span="12">
-            <el-form-item label="资质名称" required>
+            <el-form-item label="资质名称" prop="NeedFileType">
               <!-- <el-input v-model="SubfileForm.NeedFileType" placeholder="请输文件类型"></el-input> -->
               <el-select v-model="SubfileForm.NeedFileType" placeholder="请输文件类型" size="medium" :disabled="IsMust">
                 <el-option v-for="item in dynamicTableColumns" :key="item.prop" :label="item.label" :value="item.label">
@@ -112,7 +103,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="有效日期" prop="EffectDate" required :rules="{ type: 'date', required: true, message: '请选择有效日期', trigger: 'change' }">
+            <el-form-item label="有效日期" prop="EffectDate">
               <el-date-picker style="width: 100%" v-model="SubfileForm.EffectDate" type="date" placeholder="请选择有效日期">
               </el-date-picker>
             </el-form-item>
@@ -266,7 +257,14 @@
         waituploads: [], // 等待上传的附件列表
         doclist: [],
         dynamicTableColumns: [],
-        IsCompanyUser: ''
+        IsCompanyUser: '',
+        rules: {
+          NeedFileType: [
+            {required: true, message: '资质名称不能为空', trigger: 'blur'}
+          ],
+          EffectDate:
+            [{ required: true, message: '请选择有效日期', trigger: 'change' }]
+        }
       }
     },
     created () {
@@ -358,34 +356,35 @@
           })
       },
       makesure () {
-        this.$refs['subfileForm'].validate((valid) => {
+        let _this = this
+        _this.$refs['subfileForm'].validate((valid) => {
           if (valid) {
-            if (this.Title == '新增文件') {
-              if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+            if (_this.Title == '新增文件') {
+              if (_this.$refs.refuploadattach.uploadFiles && _this.$refs.refuploadattach.uploadFiles.length > 0) {
                 // 上传附件是否完成判断
-                if (!this.attachissuccess()) {
-                  this.$message.error('有附件未成功上传!不能保存数据')
+                if (!_this.attachissuccess()) {
+                  _this.$message.error('有附件未成功上传!不能保存数据')
                   return
                 }
-                this.getattachissuccess()
-                this.addSubfile()
+                _this.getattachissuccess()
+                _this.addSubfile()
               } else {
-                this.$message({
+                _this.$message({
                   type: 'warning',
                   message: '请上传文件!'
                 })
               }
-            } else if (this.Title == '上传文件') {
-              if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+            } else if (_this.Title == '上传文件') {
+              if (_this.$refs.refuploadattach.uploadFiles && _this.$refs.refuploadattach.uploadFiles.length > 0) {
                 // 上传附件是否完成判断
-                if (!this.attachissuccess()) {
-                  this.$message.error('有附件未成功上传!不能保存数据')
+                if (!_this.attachissuccess()) {
+                  _this.$message.error('有附件未成功上传!不能保存数据')
                   return
                 }
-                this.getattachissuccess()
-                this.editSubfile()
+                _this.getattachissuccess()
+                _this.editSubfile()
               } else {
-                this.$message({
+                _this.$message({
                   type: 'warning',
                   message: '请上传文件!'
                 })