2
3
dubch 5 лет назад
Родитель
Сommit
5b4990853a

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

@@ -461,7 +461,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_OilGoodsAptitudeClass class ON a.Code=class.Code LEFT JOIN tmp_OilGoodsAptitude goods ON class.Id=goods.ClassId  where (" + having + ")"
+	sqlCount := "SELECT count(*) as total FROM OilSupplierCertSub a LEFT JOIN tmp_OilGoodsAptitudeClass class ON a.Code=class.Code LEFT JOIN tmp_OilGoodsAptitude goods ON class.Id=goods.ClassId  where (" + having + ") "
 
 	var totalResult TotalResult
 	s.DBE.SQL(sql).Find(entitiesPtr)

+ 11 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go

@@ -2058,7 +2058,9 @@ func (this *OilGoodsAptitudeController) GetDelCertSubList() {
 					list[a].Checked = 1
 					sql1 := "select Name from Base_TableHeader where Code = 'F01' and CategoryCode = '01'"
 					model1, _ := svc.DBE.QueryString(sql1)
-					list[a].HeaderName += model1[0]["Name"] + " "
+					if strings.Index(list[a].HeaderName, model1[0]["Name"]) == -1 {
+						list[a].HeaderName += model1[0]["Name"] + " "
+					}
 				}
 			} else if i > 10 {
 				if value == "1" && strings.Index(item.HeaderCodes, "F"+strconv.Itoa(i)) < 0 {
@@ -2138,8 +2140,9 @@ func (this *OilGoodsAptitudeController) DelTmpSupplierCertSub() {
 					errinfo.Message = "删除失败!"
 					this.Data["json"] = &errinfo
 					this.ServeJSON()
+				} else {
+					continue
 				}
-				continue
 			}
 			code := strings.Split(model[0]["Codes"], ",")
 			i := 1
@@ -2154,6 +2157,8 @@ func (this *OilGoodsAptitudeController) DelTmpSupplierCertSub() {
 							errinfo.Message = "删除失败!"
 							this.Data["json"] = &errinfo
 							this.ServeJSON()
+						} else {
+							break
 						}
 					}
 				} else if i > 10 {
@@ -2166,6 +2171,8 @@ func (this *OilGoodsAptitudeController) DelTmpSupplierCertSub() {
 							errinfo.Message = "删除失败!"
 							this.Data["json"] = &errinfo
 							this.ServeJSON()
+						} else {
+							break
 						}
 					}
 				} else {
@@ -2178,6 +2185,8 @@ func (this *OilGoodsAptitudeController) DelTmpSupplierCertSub() {
 							errinfo.Message = "删除失败!"
 							this.Data["json"] = &errinfo
 							this.ServeJSON()
+						} else {
+							break
 						}
 					}
 				}

+ 5 - 8
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/_opera/showdelcertsub.vue

@@ -20,15 +20,9 @@
           <el-form-item label="企业名称">
             <el-input size="mini" v-model="searchForm.SupplierName" placeholder="请输入内容"></el-input>
           </el-form-item>
-
           <el-form-item>
-            <el-dropdown split-button type="primary" size="mini" @click="initDatas($event)" @command="searchCommand">
-              查询
-              <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item command="search">高级查询</el-dropdown-item>
-                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
-              </el-dropdown-menu>
-            </el-dropdown>
+            <el-button type="primary" size="mini" style="margin-left: 8px" @click="initDatas($event)">查询</el-button>
+            <!--                    <el-button type="primary" @click="toPdf" size="mini" style="margin-left: 25px">下载待删除准入范围</el-button>-->
           </el-form-item>
           <el-form-item>
            <!--<el-button type="primary" size="mini" @click="exportExcel">导出</el-button>-->
@@ -444,6 +438,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
+        this.loading = true
         let params = {
           SupplierId: row.Id
         }
@@ -451,6 +446,7 @@ export default {
         console.log(params)
         api.delTmpSupplierCertSub(params, this.$axios).then(res => {
           console.log(res)
+          this.loading = false
           if (res.data.code === 0) {
             this.$message({
               type: 'success',
@@ -543,6 +539,7 @@ export default {
       _this.SupplierId = row.Id
     },
     opencertsub (row) {
+      this.currentPageSub = 1
       this.certsubList = []
       this.dialogVisibleCertsSub = true
       this.Id = row.Id

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

@@ -33,7 +33,7 @@
                 style="width: 100%" @sort-change="orderby" :row-class-name="tableRowClassName">
         <el-table-column label="操作" width="260px" align="center" fixed="right" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-button type="text" @click="opencertsub(scope.row)" title="查看待删除准入范围" size="mini" icon="el-icon-document" width="120px">待删除准入范围</el-button>
+            <el-button type="text" @click="opencertsub(scope.row)" title="查看准入范围" size="mini" icon="el-icon-document" width="120px">准入范围</el-button>
           </template>
         </el-table-column>
         <!--内框表格剩余栏显示-->
@@ -79,10 +79,10 @@
           <span style="float: right;">
                 <el-form ref="form" :inline="true" style="margin-top: -10px">
                   <el-form-item label="编码">
-                    <el-input size="mini" v-model="searchFormSub.Code" style="width: 100%"></el-input>
+                    <el-input size="mini" v-model="searchFormSub.Code" placeholder="请输入内容" style="width: 100%"></el-input>
                   </el-form-item>
                   <el-form-item label="名称">
-                    <el-input size="mini" v-model="searchFormSub.Name" style="width: 100%"></el-input>
+                    <el-input size="mini" v-model="searchFormSub.Name" placeholder="请输入内容" style="width: 100%"></el-input>
                   </el-form-item>
                   <el-form-item>
                     <el-button type="primary" size="mini" style="margin-left: 8px" @click="search">查询</el-button>
@@ -91,7 +91,7 @@
                 </el-form>
               </span>
         </div>
-        <el-table :data="certsubList" border size="mini" :row-class-name="subRowClassName">
+        <el-table :data="certsubList" border size="mini" :row-class-name="subRowClassName" v-loading="certsubListLoading">
 <!--          <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>-->
@@ -163,6 +163,7 @@
         conList: [],
         loading: false,
         dialogVisibleCertsSub: false,
+        certsubListLoading: false,
         searchForm: {
           AccessCardNo: '',
           SupplierName: '',
@@ -369,13 +370,14 @@
         })
       },
       opencertsub (row) {
+        this.currentPageSub = 1
         this.certsubList = []
         this.dialogVisibleCertsSub = true
+        this.certsubListLoading = true
         this.Id = row.Id
         this.SupplierCertId = row.CertId
         this.SupplierTypeCode = row.SupplierTypeCode
         this.SupplierName = row.SupplierName
-        this.currentPageSub = 1
         this.getCertSub(row)
       },
       getCertSub (row) {
@@ -393,6 +395,7 @@
           .then(res => {
             _this.certsubList = res.data.items
             _this.currentItemCountSub = res.data.currentItemCount
+            this.certsubListLoading = false
           })
           .catch(err => {
             console.error(err)