Browse Source

前后:bug

dubch 5 years ago
parent
commit
62cfcd6b6d

+ 6 - 4
src/dashoo.cn/backend/api/business/oilsupplier/goodsaptitude/oilgoodsaptitudeService.go

@@ -501,7 +501,8 @@ func (s *OilGoodsAptitudeService) GetPagingTmpSubEntities(pageIndex, itemsPerPag
 		 FROM OilSupplierCertSub a
 		 LEFT JOIN OilSupplierFile files ON a.SupplierId=files.SupplierId
 		 LEFT JOIN Base_TableHeader header ON files.NeedFileType=header.Name
-		 LEFT JOIN tmp_OilGoodsAptitude goods ON a.SubClassId=goods.ClassId`
+		 LEFT JOIN tmp_OilGoodsAptitudeClass class ON a.Code=class.Code
+		 LEFT JOIN tmp_OilGoodsAptitude goods ON class.Id=goods.ClassId`
 	sql += " where (" + having + ")"
 	sql += ` GROUP BY a.Id `
 	if asc {
@@ -511,7 +512,7 @@ func (s *OilGoodsAptitudeService) GetPagingTmpSubEntities(pageIndex, itemsPerPag
 	}
 	sql += ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
 
-	sqlCount := "SELECT count(*) as total FROM OilSupplierCertSub a LEFT JOIN OilSupplierFile files ON a.SupplierId=files.SupplierId LEFT JOIN Base_TableHeader header ON files.NeedFileType=header.Name LEFT JOIN tmp_OilGoodsAptitude goods ON a.SubClassId=goods.ClassId where (" + having + ")"
+	sqlCount := "SELECT count(*) as total FROM OilSupplierCertSub a LEFT JOIN OilSupplierFile files ON a.SupplierId=files.SupplierId LEFT JOIN Base_TableHeader header ON files.NeedFileType=header.Name LEFT JOIN tmp_OilGoodsAptitudeClass class ON a.Code=class.Code LEFT JOIN tmp_OilGoodsAptitude goods ON class.Id=goods.ClassId  where (" + having + ")"
 	sqlCount += " where (" + having + ")"
 
 	var totalResult TotalResult
@@ -531,7 +532,8 @@ func (s *OilGoodsAptitudeService) GetPagingSubEntities(pageIndex, itemsPerPage i
 		 FROM OilSupplierCertSub a
 		 LEFT JOIN OilSupplierFile files ON a.SupplierId=files.SupplierId
 		 LEFT JOIN Base_TableHeader header ON files.NeedFileType=header.Name
-		 LEFT JOIN OilGoodsAptitude goods ON a.SubClassId=goods.ClassId
+		 LEFT JOIN OilGoodsAptitudeClass class ON a.Code=class.Code
+		 LEFT JOIN OilGoodsAptitude goods ON class.Id=goods.ClassId
 		 LEFT JOIN OilSupplierContrastNew con ON con.Id=a.SupplierId`
 	sql += " where (" + having + ")"
 	sql += ` GROUP BY a.Id `
@@ -544,7 +546,7 @@ func (s *OilGoodsAptitudeService) GetPagingSubEntities(pageIndex, itemsPerPage i
 		sql += ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
 	}
 
-	sqlCount := "SELECT count(*) as total FROM OilSupplierCertSub a LEFT JOIN OilSupplierFile files ON a.SupplierId=files.SupplierId LEFT JOIN Base_TableHeader header ON files.NeedFileType=header.Name LEFT JOIN OilGoodsAptitude goods ON a.SubClassId=goods.ClassId where (" + having + ")"
+	sqlCount := "SELECT count(*) as total FROM OilSupplierCertSub a LEFT JOIN OilSupplierFile files ON a.SupplierId=files.SupplierId LEFT JOIN Base_TableHeader header ON files.NeedFileType=header.Name LEFT JOIN OilGoodsAptitudeClass class ON a.Code=class.Code LEFT JOIN OilGoodsAptitude goods ON class.Id=goods.ClassId where (" + having + ")"
 	sqlCount += " where (" + having + ")"
 
 	var totalResult TotalResult

+ 3 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go

@@ -2021,6 +2021,9 @@ func (this *OilGoodsAptitudeController) GetDelCertSubList() {
 		sql := "SELECT CONCAT_WS(',',IF(ifnull(F01, '') = '', '', F01),IF(ifnull(F02, '') = '', '', F02),IF(ifnull(F03, '') = '', '', F03),IF(ifnull(F04, '') = '', '', F04),IF(ifnull(F05, '') = '', '', F05),IF(ifnull(F06, '') = '', '', F06),IF(ifnull(F07, '') = '', '', F07),IF(ifnull(F08, '') = '', '', F08),IF(ifnull(F09, '') = '', '', F09),IF(ifnull(F10, '') = '', '', F10),IF(ifnull(F11, '') = '', '', F11),IF(ifnull(F12, '') = '', '', F12),IF(ifnull(F13, '') = '', '', F13),IF(ifnull(F14, '') = '', '', F14),IF(ifnull(F15, '') = '', '', F15),IF(ifnull(F16, '') = '', '', F16),IF(ifnull(F17, '') = '', '', F17),IF(ifnull(F18, '') = '', '', F18),IF(ifnull(F19, '') = '', '', F19),IF(ifnull(F20, '') = '', '', F20),IF(ifnull(F21, '') = '', '', F21),IF(ifnull(F22, '') = '', '', F22),IF(ifnull(F23, '') = '', '', F23),IF(ifnull(F24, '') = '', '', F24),IF(ifnull(F25, '') = '', '', F25),IF(ifnull(F26, '') = '', '', F26),IF(ifnull(F27, '') = '', '', F27),IF(ifnull(F28, '') = '', '', F28),IF(ifnull(F29, '') = '', '', F29),IF(ifnull(F30, '') = '', '', F30),IF(ifnull(F31, '') = '', '', F31),IF(ifnull(F32, '') = '', '', F32),IF(ifnull(F33, '') = '', '', F33),IF(ifnull(F34, '') = '', '', F34),IF(ifnull(F35, '') = '', '', F35),IF(ifnull(F36, '') = '', '', F36),IF(ifnull(F37, '') = '', '', F37),IF(ifnull(F38, '') = '', '', F38),IF(ifnull(F39, '') = '', '', F39),IF(ifnull(F40, '') = '', '', F40),IF(ifnull(F41, '') = '', '', F41),IF(ifnull(F42, '') = '', '', F42),IF(ifnull(F43, '') = '', '', F43),IF(ifnull(F44, '') = '', '', F44),IF(ifnull(F45, '') = '', '', F45),IF(ifnull(F46, '') = '', '', F46)) AS Codes FROM tmp_OilGoodsAptitude "
 		sql += " where ClassId = "+ strconv.Itoa(item.SubClassId)
 		model, _ := svc.DBE.QueryString(sql)
+		if model == nil {
+			continue
+		}
 		code := strings.Split(model[0]["Codes"], ",")
 		i := 1
 		for _, value := range code {

+ 5 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/tmpsuppliercheck.vue

@@ -92,11 +92,11 @@
               </span>
         </div>
         <el-table :data="certsubList" border size="mini" :row-class-name="subRowClassName">
-          <el-table-column label="操作" width="160px" align="center" fixed="right" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <el-button type="text" style="color: #F56C6C" @click="delcertsubbyid(scope.row)" title="删除" size="mini" icon="el-icon-delete" width="90px">删除</el-button>
-            </template>
-          </el-table-column>
+<!--          <el-table-column label="操作" width="160px" align="center" fixed="right" show-overflow-tooltip>-->
+<!--            <template slot-scope="scope">-->
+<!--              <el-button type="text" style="color: #F56C6C" @click="delcertsubbyid(scope.row)" title="删除" size="mini" icon="el-icon-delete" width="90px">删除</el-button>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
           <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="HeaderName" label="缺少资质" show-overflow-tooltip></el-table-column>

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

@@ -1041,7 +1041,9 @@ export default {
       }
     },
     SetFormData (fdata) {
-      this.isCanUpdateSupplier(fdata.Id)
+      if (fdata.Id) {
+        this.isCanUpdateSupplier(fdata.Id)
+      }
       this.formData.Id = fdata.Id
       this.formData.SupplierName = fdata.SupplierName
       this.formData.OilCertificateNo = fdata.OilCertificateNo

+ 3 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -1053,7 +1053,9 @@ export default {
       }
     },
     SetFormData (fdata) {
-      this.isCanUpdateSupplier(fdata.Id)
+      if (fdata.Id) {
+        this.isCanUpdateSupplier(fdata.Id)
+      }
       this.formData.Id = fdata.Id
       this.formData.SupplierName = fdata.SupplierName
       this.formData.OilCertificateNo = fdata.OilCertificateNo

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

@@ -1032,7 +1032,9 @@ export default {
       }
     },
     SetFormData (fdata) {
-      this.isCanUpdateSupplier(fdata.Id)
+      if (fdata.Id) {
+        this.isCanUpdateSupplier(fdata.Id)
+      }
       this.formData.Id = fdata.Id
       this.formData.SupplierName = fdata.SupplierName
       this.formData.OilCertificateNo = fdata.OilCertificateNo