瀏覽代碼

BF: 准入范围不显示

yuedefeng 6 年之前
父節點
當前提交
b3d2aa06da

+ 23 - 43
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -1,6 +1,7 @@
 package oilsupplier
 
 import (
+	"bytes"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
 	"dashoo.cn/business/parameter"
@@ -354,14 +355,19 @@ func (this *OilSupplierCertSubController) AddGoodsBus() {
 			var list []supplierfile.OilSupplierFile
 			where := "SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "'"
 			svc.GetEntitysByWhere(OilSupplierFileName, where, &list)
-			/*hasField := ""
+
+			buffer := bytes.NewBufferString("")
 			for i := 0; i < len(list); i++ {
-				hasField += list[i].NeedFileType + ","
-			}*/
+				buffer.WriteString(list[i].NeedFileType)
+				buffer.WriteString(",")
+			}
+			hasField := buffer.String()
+
 			//三证合一或五证合一不需要的字段
 			mergerCertSkipField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MergerCertSkipFieldName")
 			//"营业执照,组织代码,组织机构代码证,税务登记证,税务登记,开户许可,银行开户许可证,承诺书,诚信合规承诺书,企业信息系统截图,战略合作协议扫描件,"
 			mustField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MustFieldName")
+
 			for i := 0; i < len(needList); i++ {
 				var entity supplierfile.OilSupplierFile
 				entity.SupplierId = dataother.SupplierId
@@ -381,21 +387,10 @@ func (this *OilSupplierCertSubController) AddGoodsBus() {
 				entity.CreateBy = this.User.Realname
 				entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 				entity.SupType = 1
-				/*if strings.Contains(hasField, needList[i].FileName+",") {
+				if strings.Contains(hasField, needList[i].FileName+",") {
 					//已存在,不能重复添加
 					continue
-				}*/
-				isRepeat := false
-				for idx := 0; idx < len(list); idx++ {
-					if list[idx].NeedFileType == needList[i].FileName {
-						isRepeat = true
-						break
-					}
 				}
-				if isRepeat == true {
-					continue
-				}
-
 				svc.InsertEntityBytbl(OilSupplierFileName, &entity)
 			}
 
@@ -455,10 +450,13 @@ func (this *OilSupplierCertSubController) AddTechBus() {
 			var list []supplierfile.OilSupplierFile
 			where := "SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "'"
 			svc.GetEntitysByWhere(OilSupplierFileName, where, &list)
-			/*hasField := ""
+
+			var buffer bytes.Buffer
 			for i := 0; i < len(list); i++ {
-				hasField += list[i].NeedFileType + ","
-			}*/
+				buffer.WriteString(list[i].NeedFileType)
+				buffer.WriteString(",")
+			}
+			hasField := buffer.String()
 			//"营业执照,组织代码,组织机构代码证,税务登记证,税务登记,开户许可,银行开户许可证,承诺书,诚信合规承诺书,企业信息系统截图,战略合作协议扫描件,"
 			mustField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MustFieldName")
 			for i := 0; i < len(needList); i++ {
@@ -476,19 +474,9 @@ func (this *OilSupplierCertSubController) AddTechBus() {
 				entity.CreateBy = this.User.Realname
 				entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 				entity.SupType = 1
-				/*if strings.Contains(hasField, needList[i].FileName+",") {
+				if strings.Contains(hasField, needList[i].FileName+",") {
 					//已存在,不能重复添加
 					continue
-				}*/
-				isRepeat := false
-				for idx := 0; idx < len(list); idx++ {
-					if list[idx].NeedFileType == needList[i].FileName {
-						isRepeat = true
-						break
-					}
-				}
-				if isRepeat == true {
-					continue
 				}
 				svc.InsertEntityBytbl(OilSupplierFileName, &entity)
 			}
@@ -553,10 +541,12 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 		where := "SupplierId = '" + strconv.Itoa(model.SupplierId) + "'"
 		svc.GetEntitysByWhere(OilSupplierFileName, where, &list)
 
-		/*hasField := ""
+		var buffer bytes.Buffer
 		for i := 0; i < len(list); i++ {
-			hasField += list[i].NeedFileType + ","
-		}*/
+			buffer.WriteString(list[i].NeedFileType)
+			buffer.WriteString(",")
+		}
+		hasField := buffer.String()
 		//"营业执照,组织代码,组织机构代码证,税务登记证,税务登记,开户许可,银行开户许可证,承诺书,诚信合规承诺书,企业信息系统截图,战略合作协议扫描件,"
 		mustField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MustFieldName")
 		for i := 0; i < len(needList); i++ {
@@ -574,19 +564,9 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 			entity.CreateBy = this.User.Realname
 			entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 			entity.SupType = 1
-			/*if strings.Contains(hasField, needList[i].FileName+",") {
+			if strings.Contains(hasField, needList[i].FileName+",") {
 				//已存在,不能重复添加
 				continue
-			}*/
-			isRepeat := false
-			for idx := 0; idx < len(list); idx++ {
-				if list[idx].NeedFileType == needList[i].FileName {
-					isRepeat = true
-					break
-				}
-			}
-			if isRepeat == true {
-				continue
 			}
 			svc.InsertEntityBytbl(OilSupplierFileName, &entity)
 		}

+ 2 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue

@@ -126,14 +126,14 @@
         default: false
       }
     },
-    created() {
+    /*created() {
       this.initData()
     },
     computed: {
       ...mapGetters({
         session: 'session'
       })
-    },
+    },*/
     data() {
       var CheckSelectedOption = (rule, value, callback) => {
         if (this.selectedOptList && this.selectedOptList.length < 1) {

+ 2 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodslist.vue

@@ -73,14 +73,14 @@
         default: false
       }
     },
-    created() {
+    /*created() {
       this.initData()
     },
     computed: {
       ...mapGetters({
         session: 'session'
       })
-    },
+    },*/
     watch: {
       filterText(val) {
         this.$refs.orgmanagetree.filter(val);

+ 2 - 7
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -10,7 +10,7 @@
           分办
         </el-button>
       </div>
-      <el-table :data="businessList" border bordertooltip-effect="dark" style="height: calc(100vh - 500px);">
+      <el-table :data="businessList" border bordertooltip-effect="dark">
         <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
         <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
         <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
@@ -202,20 +202,16 @@
     },
     methods: {
       initTableHeader(){
-        console.log("flag:"+this.flag)
         if(this.flag=='01'){
           setapi.initGoodTableHeader(this.$axios).then(res => {
-          console.log(res)
           this.dynamicTableColumns=res.data.items
         })
         }else if(this.flag=='02'){
           setapi.initBbTableHeader(this.$axios).then(res => {
-          console.log(res)
           this.dynamicTableColumns=res.data.items
           })
         }else{
           setapi.initTsTableHeader(this.$axios).then(res => {
-          console.log(res)
           this.dynamicTableColumns=res.data.items
           })
         }
@@ -232,10 +228,10 @@
       initData() {
         let _this = this
         const params = {
+          InStyle: this.InStyle,
           SupplierId: this.SupplierId,
           SupplierTypeCode: this.SupplierTypeCode,
           _currentPage: 1,
-          InStyle: this.InStyle,
           _size: 1000,
         }
         _this.$axios.get('supplierfile/filelist', {
@@ -245,7 +241,6 @@
             _this.subfileList = res.data.items
             _this.currentItemCount = res.data.currentItemCount
             for (let idx in _this.subfileList) {
-              console.log(_this.subfileList[idx])
               _this.subfileList[idx].FileUrlList = _this.subfileList[idx].FileUrl.split('$')
 
             }

+ 2 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/techlist.vue

@@ -73,14 +73,14 @@
         default: false
       }
     },
-    created() {
+    /*created() {
       this.initData()
     },
     computed: {
       ...mapGetters({
         session: 'session'
       })
-    },
+    },*/
     data() {
       return {
         SupplierId: 0,

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

@@ -681,14 +681,14 @@
             this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId, this.formDataCert.InStyle)
           }).catch(err => {
             console.error(err)
           })
         }
       },
       getbuslist() {
-        this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+        this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId, this.formDataCert.InStyle)
       },
       nextTab() {
         let totalTab = 3

+ 4 - 6
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -309,8 +309,6 @@
             :canadd="add_flat"
             :flag="flag"
             @close="selectAuditOrg"
-            height="360px"
-            style="margin-top: 20px"
           ></subfile-list>
         </el-tab-pane>
 
@@ -858,8 +856,8 @@
               this.$refs["subfileList"].getvalue(
                 this.formData.Id,
                 this.formData.SupplierTypeCode,
-              this.certId,
-              this.formData.InStyle
+                this.certId,
+                this.formDataCert.InStyle
               );
             })
             .catch(err => {
@@ -871,8 +869,8 @@
         this.$refs["subfileList"].getvalue(
           this.formData.Id,
           this.formData.SupplierTypeCode,
-        this.certId,
-        this.formData.InStyle
+          this.certId,
+          this.formDataCert.InStyle
         );
       },
       nextTab() {

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

@@ -709,14 +709,14 @@
             this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['techList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId, this.formDataCert.InStyle)
           }).catch(err => {
             console.error(err)
           })
         }
       },
       getbuslist() {
-        this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+        this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId, this.formDataCert.InStyle)
       },
 
       getDictOptions() {