Преглед изворни кода

战略合作时显示扫描件

shiyi пре 6 година
родитељ
комит
0128780733

+ 9 - 4
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -431,12 +431,13 @@ func (this *OilSupplierCertSubController) AddTechBus() {
 			datamain.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 			svc.InsertEntityBytbl(OilSupplierCertSubName, &datamain)
 
+			paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
 			filesvc := supplierfile.GetSupplierfileService(utils.DBE)
 			needList := filesvc.GetTechNeedFileList(dataother.CheckList[n].Id)
 
 			if supplierCertModel.InStyle == "4" {
 				var needFile supplierfile.FileList
-				needFile.FileName = "战略合作协议扫描件"
+				needFile.FileName = paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CooperationFile")
 				needList = append(needList, needFile)
 			}
 
@@ -447,7 +448,8 @@ func (this *OilSupplierCertSubController) AddTechBus() {
 			for i := 0; i < len(list); i++ {
 				hasField += list[i].NeedFileType + ","
 			}
-			mustField := "营业执照,组织代码,税务登记,开户许可,银行开户许可证,承诺书,企业信息系统截图,战略合作协议扫描件,"
+			//"营业执照,组织代码,组织机构代码证,税务登记证,税务登记,开户许可,银行开户许可证,承诺书,诚信合规承诺书,企业信息系统截图,战略合作协议扫描件,"
+			mustField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MustFieldName")
 			for i := 0; i < len(needList); i++ {
 				var entity supplierfile.OilSupplierFile
 				entity.SupplierId = dataother.SupplierId
@@ -507,8 +509,10 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 	svcCert := suppliercert.GetOilSupplierCertService(utils.DBE)
 	svcCert.GetEntityById(model.SupplierCertId, &supplierCertModel)
 
+	paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
 	filesvc := supplierfile.GetSupplierfileService(utils.DBE)
 	var needList []supplierfile.FileList
+
 	if model.SupplierTypeCode == "01" {
 		//		needList = filesvc.GetGoodsNeedFileList(model.SubClassId)
 	} else if model.SupplierTypeCode == "02" {
@@ -519,7 +523,7 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 
 	if supplierCertModel.InStyle == "4" {
 		var needFile supplierfile.FileList
-		needFile.FileName = "战略合作协议扫描件"
+		needFile.FileName = paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CooperationFile")
 		needList = append(needList, needFile)
 	}
 
@@ -532,7 +536,8 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 		for i := 0; i < len(list); i++ {
 			hasField += list[i].NeedFileType + ","
 		}
-		mustField := "营业执照,组织代码,税务登记,开户许可,银行开户许可证,承诺书,企业信息系统截图,战略合作协议扫描件,"
+		//"营业执照,组织代码,组织机构代码证,税务登记证,税务登记,开户许可,银行开户许可证,承诺书,诚信合规承诺书,企业信息系统截图,战略合作协议扫描件,"
+		mustField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MustFieldName")
 		for i := 0; i < len(needList); i++ {
 			var entity supplierfile.OilSupplierFile
 			entity.SupplierId = model.SupplierId

+ 8 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/supplierfile.go

@@ -103,6 +103,9 @@ func (this *SupplierfileController) FileList() {
 	asc := true
 	Order := this.GetString("Order")
 	Prop := this.GetString("Prop")
+
+
+
 	if Order != "" && Prop != "" {
 		orderby = Prop
 		if Order == "asc" {
@@ -117,6 +120,11 @@ func (this *SupplierfileController) FileList() {
 	if SupplierTypeCode != "" {
 		where = where + " and SupplierTypeCode in ( '000', '" + SupplierTypeCode + "')"
 	}
+	InStyle := this.GetString("InStyle")
+	if InStyle != "4" {
+		/*paramSvc := baseparameter.GetBaseparameterService(utils.DBE)*/
+		where = where + " and InStyle != '4'"
+	}
 	where = where + " and SupType != 2"
 	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo

+ 4 - 1
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -154,6 +154,7 @@
         SupplierId: 0,
         SupplierTypeCode: '',
         SupplierCertId: 0,
+        InStyle: '1',
 
         businessList: [],
         subfileList: [],
@@ -214,10 +215,11 @@
         }
 
       },
-      getvalue(SupplierId, SupplierTypeCode, certId) {
+      getvalue(SupplierId, SupplierTypeCode, certId, inStyle) {
         this.SupplierId = SupplierId
         this.SupplierTypeCode = SupplierTypeCode
         this.SupplierCertId = certId
+        this.InStyle = inStyle
         this.initData()
         this.getbusList()
       },
@@ -227,6 +229,7 @@
           SupplierId: this.SupplierId,
           SupplierTypeCode: this.SupplierTypeCode,
           _currentPage: 1,
+          InStyle: this.InStyle,
           _size: 1000,
         }
         _this.$axios.get('supplierfile/filelist', {

+ 7 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -98,7 +98,7 @@
             <div slot="header" class="clearfix">
               <span>企业人员结构情况</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="updateNumberEntity('EntityFormNumber')" v-if="formDataCert.Status <= 0">
+                <el-button type="primary" size="mini" @click="updateNumberEntity()" v-if="formDataCert.Status <= 0">
                   保存人员结构情况</el-button>
               </span>
             </div>
@@ -826,7 +826,8 @@ export default {
             this.$refs["subfileList"].getvalue(
               this.formData.Id,
               this.formData.SupplierTypeCode,
-              this.certId
+              this.certId,
+              this.formData.InStyle
             );
           })
           .catch(err => {
@@ -838,7 +839,8 @@ export default {
       this.$refs["subfileList"].getvalue(
         this.formData.Id,
         this.formData.SupplierTypeCode,
-        this.certId
+        this.certId,
+        this.formData.InStyle
       );
     },
     nextTab () {
@@ -1060,8 +1062,8 @@ export default {
       return true;
     },
     // 企业人员结构情况
-    updateNumberEntity (formName) {
-      this.$refs[formName].validate((valid) => {
+    updateNumberEntity () {
+      this.$refs['EntityFormNumber'].validate((valid) => {
         if (valid) {
           if (!this.CheckCompanyBase()) {
             return false;

+ 56 - 22
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -79,15 +79,15 @@
             <div slot="header" class="clearfix">
               <span>企业人员结构情况</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="updateNumberEntity" v-if="formDataCert.Status <= 0">
+                <el-button type="primary" size="mini" @click="updateNumberEntity()" v-if="formDataCert.Status <= 0">
                   保存人员结构情况</el-button>
               </span>
             </div>
 
-            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert">
+            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert" :rules="rules">
               <el-row>
                 <el-col :span="8">
-                  <el-form-item label="企业员工总数">
+                  <el-form-item label="企业员工总数" prop="WorkerTotal">
                     <el-input-number v-model="formDataCert.WorkerTotal" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -108,7 +108,7 @@
                 </el-col>
 
                 <el-col :span="8">
-                  <el-form-item label="技术、管理人员数量">
+                  <el-form-item label="技术、管理人员数量" prop="TechnicalNum">
                     <el-input-number v-model="formDataCert.TechnicalNum" controls-position="right" :min="0"
                       style="width: 100%"></el-input-number>
                   </el-form-item>
@@ -326,6 +326,20 @@
     name: 'oilsupplierEdit',
 
     data () {
+      var checkWorkerTotal = (rule, value, callback) => {
+        if (value <= 0) {
+          return callback(new Error('企业员工总数必须大于0'))
+        } else {
+          callback()
+        }
+      };
+      var checkTechnicalNum = (rule, value, callback) => {
+        if (value <= 0) {
+          return callback(new Error('技术、管理人员数量必须大于0'))
+        } else {
+          callback()
+        }
+      };
       return {
         activeName: '0',
         chooseAuditorVisible: false,
@@ -472,7 +486,21 @@
           classId: '03',
           workflowId: ''
         },
-        flag:'03'
+        flag:'03',
+        rules: {
+          WorkerTotal: [
+            {
+              validator: checkWorkerTotal,
+              trigger: 'blur'
+            }
+          ],
+          TechnicalNum: [
+            {
+              validator: checkTechnicalNum,
+              trigger: 'blur'
+            }
+          ]
+        }
       }
     },
     mounted() {
@@ -863,26 +891,32 @@
       },
       // 企业人员结构情况
       updateNumberEntity() {
-        if (!this.CheckCompanyBase()) {
-          return false
-        }
-        this.formDataCert.InStyle = this.formData.InStyle
-        api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            // 保存成功后,初始化数据,变成修改
-            this.initDatas()
-            this.$message({
-              type: 'success',
-              message: res.data.message
+        this.$refs['EntityFormNumber'].validate((valid) => {
+          if (valid) {
+            if (!this.CheckCompanyBase()) {
+              return false
+            }
+            this.formDataCert.InStyle = this.formData.InStyle
+            api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                // 保存成功后,初始化数据,变成修改
+                this.initDatas()
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            }).catch(err => {
+              console.error(err)
             })
           } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            })
+            return false;
           }
-        }).catch(err => {
-          console.error(err)
         })
       },
       selectAuditOrg() {