Răsfoiți Sursa

前后:制造商非制造商判断资质判断;合同列表

dubch 4 ani în urmă
părinte
comite
2965700fd8

+ 1 - 1
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsubService.go

@@ -102,7 +102,7 @@ func (s *OilSupplierCertSubService) GetIds (certId string, typeCode string, enti
 	if isManufacturer == 1 {
 	if isManufacturer == 1 {
 		// 0 和 1
 		// 0 和 1
 		sql += " and IsManufacturer != 2"
 		sql += " and IsManufacturer != 2"
-	} else {
+	} else if isManufacturer == 2 {
 		sql += " and IsManufacturer = 2"
 		sql += " and IsManufacturer = 2"
 	}
 	}
 	s.DBE.SQL(sql).Get(entitiesPtr)
 	s.DBE.SQL(sql).Get(entitiesPtr)

+ 9 - 1
src/dashoo.cn/backend/api/controllers/oilcontract/contract.go

@@ -51,6 +51,7 @@ func (this *OilContractController) GetEntityList() {
 	SupplierId := this.GetString("SupplierId")
 	SupplierId := this.GetString("SupplierId")
 	SupplierName := this.GetString("SupplierName")
 	SupplierName := this.GetString("SupplierName")
 	ImportSupplierName := this.GetString("ImportSupplierName")
 	ImportSupplierName := this.GetString("ImportSupplierName")
+	ImportUnitName := this.GetString("ImportUnitName")
 	Status := this.GetString("Status")
 	Status := this.GetString("Status")
 	SettleStatus := this.GetString("SettleStatus")
 	SettleStatus := this.GetString("SettleStatus")
 	ProjectName := this.GetString("ProjectName")
 	ProjectName := this.GetString("ProjectName")
@@ -132,6 +133,10 @@ func (this *OilContractController) GetEntityList() {
 		where = where + " and ImportSupplierName like '%" + ImportSupplierName + "%'"
 		where = where + " and ImportSupplierName like '%" + ImportSupplierName + "%'"
 	}
 	}
 
 
+	if ImportUnitName != "" {
+		where = where + " and SecondUnitName like '%" + ImportUnitName + "%'"
+	}
+
 	if Status != "" {
 	if Status != "" {
 		where = where + " and Status=" + Status + " "
 		where = where + " and Status=" + Status + " "
 	}
 	}
@@ -574,7 +579,7 @@ func (this *OilContractController) ImportExcel() {
 				con1.SubmitDate, _ = time.ParseInLocation("2006-01-02", convertToFormatDay(sheet.Rows[i].Cells[34].Value), time.Local)
 				con1.SubmitDate, _ = time.ParseInLocation("2006-01-02", convertToFormatDay(sheet.Rows[i].Cells[34].Value), time.Local)
 				con1.SealName = sheet.Rows[i].Cells[42].String()
 				con1.SealName = sheet.Rows[i].Cells[42].String()
 				//con1.PoNumber = sheet.Rows[i].Cells[31].String()
 				//con1.PoNumber = sheet.Rows[i].Cells[31].String()
-				con1.ImportStatus = 0
+				//con1.ImportStatus = 0
 				svc.UpdateEntityById(con1.Id, &con1)
 				svc.UpdateEntityById(con1.Id, &con1)
 				continue
 				continue
 			}
 			}
@@ -797,6 +802,9 @@ func (this *OilContractController) ImportUpdate() {
 
 
 // excel日期字段格式化 yyyy-mm-dd
 // excel日期字段格式化 yyyy-mm-dd
 func convertToFormatDay(excelDaysString string) string {
 func convertToFormatDay(excelDaysString string) string {
+	if strings.Index(excelDaysString, "/") != -1 {
+		return excelDaysString
+	}
 	// 2006-01-02 距离 1900-01-01的天数
 	// 2006-01-02 距离 1900-01-01的天数
 	baseDiffDay := int64(38719) //在网上工具计算的天数需要加2天,什么原因没弄清楚
 	baseDiffDay := int64(38719) //在网上工具计算的天数需要加2天,什么原因没弄清楚
 	curDiffDay := excelDaysString
 	curDiffDay := excelDaysString

+ 25 - 15
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -2627,24 +2627,29 @@ func (this *OilSupplierController) CheckSupplierFile() {
 
 
 		var ids suppliercertsub.Ids
 		var ids suppliercertsub.Ids
 		var ids1 suppliercertsub.Ids
 		var ids1 suppliercertsub.Ids
-		certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
-		certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
+		certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3)
+
 		var needList []supplierfile.FileList
 		var needList []supplierfile.FileList
 		var needList1 []supplierfile.FileList
 		var needList1 []supplierfile.FileList
 
 
 		if cert.SupplierTypeCode == "01" {
 		if cert.SupplierTypeCode == "01" {
 			//需要的资质
 			//需要的资质
-			needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "1")
-			needList1 = filesvc.GetGoodsNeedFileListNew(ids1.Id, "2")
-			for _, need := range needList1 {
-				needList = append(needList, need)
-			}
+			needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "2")
 			if file.Type == 1 { //制造商
 			if file.Type == 1 { //制造商
+				//如果是制造商,准入范围按照各项准入范围的类型判断
+				var ids suppliercertsub.Ids
+				certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
+				certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
+				needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "1")
+				needList1 = filesvc.GetGoodsNeedFileListNew(ids1.Id, "2")
 				var needFile supplierfile.FileList
 				var needFile supplierfile.FileList
 				// 质量管理体系认证证书
 				// 质量管理体系认证证书
 				CNPCrenkezhengshu := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CNPCrenkezhengshu")
 				CNPCrenkezhengshu := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CNPCrenkezhengshu")
 				needFile.FileName = CNPCrenkezhengshu
 				needFile.FileName = CNPCrenkezhengshu
 				needList = append(needList, needFile)
 				needList = append(needList, needFile)
+				for _, need := range needList1 {
+					needList = append(needList, need)
+				}
 			}
 			}
 		} else if cert.SupplierTypeCode == "02" {
 		} else if cert.SupplierTypeCode == "02" {
 			needList = filesvc.GetBasicNeedFileListNew(ids.Id)
 			needList = filesvc.GetBasicNeedFileListNew(ids.Id)
@@ -2737,20 +2742,16 @@ func (this *OilSupplierController) CheckSupplierFileNew(){
 
 
 	var ids suppliercertsub.Ids
 	var ids suppliercertsub.Ids
 	certsubService := suppliercertsub.GetOilSupplierCertSubService(utils.DBE)
 	certsubService := suppliercertsub.GetOilSupplierCertSubService(utils.DBE)
-	certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
+	certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3)
+	//certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
 	var ids1 suppliercertsub.Ids
 	var ids1 suppliercertsub.Ids
-	certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
+	//certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
 	var needList []supplierfile.FileList
 	var needList []supplierfile.FileList
 	var needList1 []supplierfile.FileList
 	var needList1 []supplierfile.FileList
 
 
 	if cert.SupplierTypeCode == "01" {
 	if cert.SupplierTypeCode == "01" {
 		//需要的资质
 		//需要的资质
-		//needList = filesvc.GetGoodsNeedFileListNew(ids.Id, strconv.Itoa(file.Type))
-		needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "1")
-		needList1 = filesvc.GetGoodsNeedFileListNew(ids1.Id, "2")
-		for _, need := range needList1 {
-			needList = append(needList, need)
-		}
+
 		total := certsubService.GetCountIsManufacturer(strconv.Itoa(cert.Id))
 		total := certsubService.GetCountIsManufacturer(strconv.Itoa(cert.Id))
 		if file.Type == 2 && total > 0 {
 		if file.Type == 2 && total > 0 {
 			errinfo.Message = "非制造商准入范围不能为制造商,请手动修改!"
 			errinfo.Message = "非制造商准入范围不能为制造商,请手动修改!"
@@ -2768,12 +2769,21 @@ func (this *OilSupplierController) CheckSupplierFileNew(){
 			this.ServeJSON()
 			this.ServeJSON()
 			return
 			return
 		}
 		}
+		needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "2")
 		if file.Type == 1 { //制造商
 		if file.Type == 1 { //制造商
+			var ids suppliercertsub.Ids
+			certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
+			certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
+			needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "1")
+			needList1 = filesvc.GetGoodsNeedFileListNew(ids1.Id, "2")
 			var needFile supplierfile.FileList
 			var needFile supplierfile.FileList
 			// 质量管理体系认证证书
 			// 质量管理体系认证证书
 			CNPCrenkezhengshu := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CNPCrenkezhengshu")
 			CNPCrenkezhengshu := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CNPCrenkezhengshu")
 			needFile.FileName = CNPCrenkezhengshu
 			needFile.FileName = CNPCrenkezhengshu
 			needList = append(needList, needFile)
 			needList = append(needList, needFile)
+			for _, need := range needList1 {
+				needList = append(needList, need)
+			}
 		}
 		}
 	} else if cert.SupplierTypeCode == "02" {
 	} else if cert.SupplierTypeCode == "02" {
 		needList = filesvc.GetBasicNeedFileListNew(ids.Id)
 		needList = filesvc.GetBasicNeedFileListNew(ids.Id)

+ 15 - 9
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-import/index.vue

@@ -284,6 +284,9 @@
         <el-form-item label="合同编号">
         <el-form-item label="合同编号">
           <el-input size="mini" clearable v-model="searchForm.ContractNo" style="width: 150px;" placeholder="请输入合同编号"></el-input>
           <el-input size="mini" clearable v-model="searchForm.ContractNo" style="width: 150px;" placeholder="请输入合同编号"></el-input>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="二级单位">
+          <el-input size="mini" clearable v-model="searchForm.ImportUnitName" style="width: 150px;" placeholder="请输入二级单位"></el-input>
+        </el-form-item>
         <el-form-item label="状态" style="width: 150px">
         <el-form-item label="状态" style="width: 150px">
           <el-select size="mini" v-model="searchForm.Status" placeholder="请选择" style="width: 100px" clearable>
           <el-select size="mini" v-model="searchForm.Status" placeholder="请选择" style="width: 100px" clearable>
             <el-option label="全部" value="" key="01"></el-option>
             <el-option label="全部" value="" key="01"></el-option>
@@ -316,7 +319,7 @@
             height="500"
             height="500"
             size="small"
             size="small"
             style="width: 100%" v-loading="tableSelectLoading">
             style="width: 100%" v-loading="tableSelectLoading">
-           <el-table-column type="index"  min-width="70" label="序号" align="center" show-overflow-tooltip></el-table-column>
+<!--           <el-table-column type="index"  min-width="70" label="序号" align="center" show-overflow-tooltip></el-table-column>-->
           <el-table-column  prop="ClassName"  min-width="110" label="合同类别" align="center" show-overflow-tooltip></el-table-column>
           <el-table-column  prop="ClassName"  min-width="110" label="合同类别" align="center" show-overflow-tooltip></el-table-column>
           <el-table-column  prop="ContractClass"  min-width="140" label="选择类别" align="center" show-overflow-tooltip >
           <el-table-column  prop="ContractClass"  min-width="140" label="选择类别" align="center" show-overflow-tooltip >
             <template slot-scope="scope">
             <template slot-scope="scope">
@@ -450,7 +453,7 @@
         </el-form>
         </el-form>
 
 
       <div style="display: flex;justify-content: flex-end;margin-top: 16px;">
       <div style="display: flex;justify-content: flex-end;margin-top: 16px;">
-        <el-button type="primary" :loading="uploadTrueClickLoading1" size="mini" @click="deleteList">清空列表</el-button>
+        <el-button v-if="importAuditProf" type="primary" :loading="uploadTrueClickLoading1" size="mini" @click="deleteList">清空列表</el-button>
         <el-button type="primary" :loading="uploadTrueClickLoading" size="mini" @click="uploadTrueClick">确 认</el-button>
         <el-button type="primary" :loading="uploadTrueClickLoading" size="mini" @click="uploadTrueClick">确 认</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
@@ -521,8 +524,10 @@
               default:
               default:
                 return '--'
                 return '--'
             }
             }
-          } else if (name === 'OpenDate' || name === 'EndDate' || name === 'PlanFinishDate' || name === 'SubmitDate') {
-            let timeString = this.timeStyle(item)
+          } else if (name === 'OpenDate' || name === 'EndDate' || name === 'StartDate' || name === 'PlanFinishDate' || name === 'SubmitDate') {
+            // let timeString = this.timeStyle(item)
+            // return timeString
+            let timeString = this.jstimehandle(item)
             return timeString
             return timeString
           } else if (name === 'SettleStatus') {
           } else if (name === 'SettleStatus') {
             var items = Number(item)
             var items = Number(item)
@@ -686,7 +691,8 @@
           ModifiedUserId: '',
           ModifiedUserId: '',
           ModifiedBy: '',
           ModifiedBy: '',
           ClassName: '',
           ClassName: '',
-          ImportSupplierName: ''
+          ImportSupplierName: '',
+          ImportUnitName: ''
         },
         },
         formData: {
         formData: {
           Id: '',
           Id: '',
@@ -860,15 +866,15 @@
           },
           },
 
 
           {
           {
-            prop: 'OpenDate',
-            label: '开工日期',
+            prop: 'StartDate',
+            label: '履行期限(始)',
             width: 100,
             width: 100,
             sort: true
             sort: true
           },
           },
 
 
           {
           {
-            prop: 'PlanFinishDate',
-            label: '计划竣工时间',
+            prop: 'EndDate',
+            label: '履行期限(止)',
             width: 100,
             width: 100,
             sort: true
             sort: true
           },
           },